blob: 29771c9fe01b9c6b5b672ade6abaae9aa0b48f85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef __CROS_EC_MPU_H
#define __CROS_EC_MPU_H
/* This matches up with core/cortex-m/include/mpu.h */
/* Location of iram.text */
extern char __iram_text_start;
extern char __iram_text_end;
/** Enable MPU */
void mpu_enable(void);
/**
* Returns the value of MPU type register
*
* @returns 0 for now (always)
*/
uint32_t mpu_get_type(void);
/** Protect RAM from code execution */
int mpu_protect_data_ram(void);
/** Protect code RAM from being overwritten */
int mpu_protect_code_ram(void);
/** Protect internal mapped flash memory from code execution */
int mpu_lock_ro_flash(void);
int mpu_lock_rw_flash(void);
#endif /* __CROS_EC_CPU_H */
|