qemu/trustzone: add secure memory config
According to the qemu source code, hw/arm/virt.c. The secure memory of the ARM Virt board is [0xe000000~0xf000000] and the non-secure memory is configured as [0x40000000~0xffffffff]. We made the following adjustments based on the above virt board configuration Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
cb0e8454d7
commit
f41f0324a5
@ -47,6 +47,10 @@ static const struct section_mapping_s g_section_mapping[] =
|
|||||||
VIRT_IO_PSECTION, VIRT_IO_VSECTION,
|
VIRT_IO_PSECTION, VIRT_IO_VSECTION,
|
||||||
MMU_IOFLAGS, _NSECTIONS(VIRT_IO_SECSIZE)
|
MMU_IOFLAGS, _NSECTIONS(VIRT_IO_SECSIZE)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
VIRT_SEC_MEM_PSECTION, VIRT_SEC_MEM_VSECTION,
|
||||||
|
MMU_MEMFLAGS, _NSECTIONS(VIRT_SEC_MEM_SECSIZE)
|
||||||
|
},
|
||||||
{
|
{
|
||||||
VIRT_PCIE_PSECTION, VIRT_PCIE_VSECTION,
|
VIRT_PCIE_PSECTION, VIRT_PCIE_VSECTION,
|
||||||
MMU_IOFLAGS, _NSECTIONS(VIRT_PCIE_SECSIZE)
|
MMU_IOFLAGS, _NSECTIONS(VIRT_PCIE_SECSIZE)
|
||||||
|
@ -39,19 +39,22 @@
|
|||||||
/* Qemu virt Physical Memory Map ********************************************/
|
/* Qemu virt Physical Memory Map ********************************************/
|
||||||
|
|
||||||
#define VIRT_FLASH_PSECTION 0x00000000 /* 0x00000000-0x08000000 */
|
#define VIRT_FLASH_PSECTION 0x00000000 /* 0x00000000-0x08000000 */
|
||||||
#define VIRT_IO_PSECTION 0x08000000 /* 0x08000000-0x0f000000 */
|
#define VIRT_IO_PSECTION 0x08000000 /* 0x08000000-0x0e000000 */
|
||||||
|
#define VIRT_SEC_MEM_PSECTION 0x0e000000 /* 0x0e000000-0x0f000000 */
|
||||||
#define VIRT_PCIE_PSECTION 0x10000000 /* 0x10000000-0x40000000 */
|
#define VIRT_PCIE_PSECTION 0x10000000 /* 0x10000000-0x40000000 */
|
||||||
|
|
||||||
/* Qemu virt Virtual Memory Map *********************************************/
|
/* Qemu virt Virtual Memory Map *********************************************/
|
||||||
|
|
||||||
#define VIRT_FLASH_VSECTION VIRT_FLASH_PSECTION
|
#define VIRT_FLASH_VSECTION VIRT_FLASH_PSECTION
|
||||||
#define VIRT_IO_VSECTION VIRT_IO_PSECTION
|
#define VIRT_IO_VSECTION VIRT_IO_PSECTION
|
||||||
|
#define VIRT_SEC_MEM_VSECTION VIRT_SEC_MEM_PSECTION
|
||||||
#define VIRT_PCIE_VSECTION VIRT_PCIE_PSECTION
|
#define VIRT_PCIE_VSECTION VIRT_PCIE_PSECTION
|
||||||
|
|
||||||
/* Sizes of memory regions in bytes. */
|
/* Sizes of memory regions in bytes. */
|
||||||
|
|
||||||
#define VIRT_FLASH_SECSIZE (128*1024*1024)
|
#define VIRT_FLASH_SECSIZE (128*1024*1024)
|
||||||
#define VIRT_IO_SECSIZE (112*1024*1024)
|
#define VIRT_IO_SECSIZE (96*1024*1024)
|
||||||
|
#define VIRT_SEC_MEM_SECSIZE (16*1024*1024)
|
||||||
#define VIRT_PCIE_SECSIZE (3*256*1024*1024)
|
#define VIRT_PCIE_SECSIZE (3*256*1024*1024)
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
Loading…
Reference in New Issue
Block a user