mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-04 05:51:34 +00:00
The jittery clock and trng security features require high permissions to be initialized. In the future these initializations and the permission level drop may be moved to RO. This change adds permission level checks before trying to access any registers that require high permission, so when we update RO to change the permission RW can still function fine. BUG=chrome-os-partner:59107 BRANCH=none TEST=Move the permission drop to the beginning of main and verify the system still boots. Change-Id: I5b7cb856decd0640288ad3476f875ec9edc42635 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/405840
23 lines
586 B
C
23 lines
586 B
C
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef __CROS_EC_INIT_CHIP_H
|
|
#define __CROS_EC_INIT_CHIP_H
|
|
|
|
enum permission_level {
|
|
PERMISSION_LOW = 0x00,
|
|
PERMISSION_MEDIUM = 0x33, /* APPS run at medium */
|
|
PERMISSION_HIGH = 0x3C,
|
|
PERMISSION_HIGHEST = 0x55
|
|
};
|
|
|
|
int runlevel_is_high(void);
|
|
void init_runlevel(const enum permission_level desired_level);
|
|
|
|
void init_jittery_clock(int highsec);
|
|
void init_sof_clock(void);
|
|
|
|
#endif /* __CROS_EC_INIT_CHIP_H */
|