mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
05d25ce7e9
Add support for a scm call to protect a contiguous physical address range. Add a config option to use this api to protect the kernel text section. Otherwise, the user may specify the region through module parameters. Change-Id: Ie751ec72deb1a1692093559fe8c6784e8bf912a2 Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
36 lines
916 B
Text
36 lines
916 B
Text
Introduction
|
|
============
|
|
|
|
The scm-mpu driver allows enabling xpu protection of arbitrary physical memory
|
|
addresses as a debug mechanism.
|
|
|
|
Software description
|
|
====================
|
|
|
|
Several methods of controlling this feature are provided.
|
|
|
|
* CONFIG_KERNEL_TEXT_MPU_PROT - Enables protection of the kernel code and
|
|
read-only sections by default.
|
|
|
|
* kernel command line
|
|
scm_mpu.mpu_start=0x0
|
|
scm_mpu.mpu_size=0x1000
|
|
|
|
* /sys/module/scm_mpu/parameters
|
|
echo 0x0 > mpu_start
|
|
echo 0x1000 > mpu_size
|
|
echo 0x11 > mpu_enable
|
|
|
|
The sysfs interface may also be used to unlock previously defined regions.
|
|
echo 0x0 > mpu_start
|
|
echo 0x1000 > mpu_size
|
|
echo 0x10 > mpu_enable
|
|
|
|
Limitations
|
|
===========
|
|
The number of distinct regions allowed is limited by available resources.
|
|
|
|
No provisions are made for "carving out" or otherwise removing xpu protected
|
|
regions from the linux memory map.
|
|
|
|
XPU protection currently uses 4K alignment.
|