代码拉取完成,页面将自动刷新
/* SPDX-License-Identifier: Apache-2.0
* Copyright 2024 The TenonOS Authors
*/
#include <uk/config.h>
#include <uk/plat/memory.h>
/* ------------------------- Memory Map of myd-jd9x -----------------------
*
* 0x0000,0000,0000 - 0x0000,3FFF,FFFF Device: attr:device
* 0x0000,4000,0000 - 0x0000,FFFF,FFFF Normal Mem: 1-4GB attr:normal
* 0x0001,0000,0000 - 0x0004,3FFF,FFFF Normal Mem: 4GB-17GB attr:normal
* 0x0005,0000,0000 - 0x0006,FFFF,FFFF PCIe_MAPPED_IO attr:device
* Notice: The page tables below use the Unikraft indexing convention.
*/
struct ukplat_memregion_desc bpt_unmap_mrd __section(".data") = {
.pbase = ALIGN_DOWN(0x40000000UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x40000000UL, __PAGE_SIZE),
.pg_off = 0x0UL,
.len = 0xc0000000UL,
.pg_count = PAGE_COUNT(0xc0000000UL),
.type = UKPLAT_MEMRT_RESERVED,
.flags = UKPLAT_MEMRF_UNMAP
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif
};
#ifdef CONFIG_STATIC_PGTABLE
struct ukplat_memregion_desc
bpt_memregion[] __section(".tn_static_memregion") = {
/* DEVICE
* Virtual address: 0x0000000000000000 - 0x000000003FFFFFFF
* Physical address: 0x0000000000000000 - 0x000000003FFFFFFF
*/
{ .pbase = ALIGN_DOWN(0x0UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x0UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x40000000UL,
.pg_count = PAGE_COUNT(0x40000000UL),
.type = UKPLAT_MEMRT_RESERVED,
.flags = UKPLAT_MEMRF_VALUE_IS_WR |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_DEVICE_nGnRnE) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PMD)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
},
/* RAM
* Virtual address: 0x0000000040a04000 - 0x0000000040bfffff
* Physical address: 0x0000000040a04000 - 0x0000000040bfffff
*/
{ .pbase = ALIGN_DOWN(0x40a04000UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x40a04000UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x1fc000UL,
.pg_count = PAGE_COUNT(0x1fc000UL),
.type = UKPLAT_MEMRT_FREE,
.flags = UKPLAT_MEMRF_VALUE_IS_WR | UKPLAT_MEMRF_UXN |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_NORMAL_WB) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PAGE)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
},
/* RAM
* Virtual address: 0x0000000040C00000 - 0x00000000459FFFFF
* Physical address: 0x0000000040C00000 - 0x00000000459FFFFF
*/
{ .pbase = ALIGN_DOWN(0x40C00000UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x40C00000UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x4E00000UL,
.pg_count = PAGE_COUNT(0x4E00000UL),
.type = UKPLAT_MEMRT_FREE,
.flags = UKPLAT_MEMRF_VALUE_IS_WR | UKPLAT_MEMRF_UXN |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_NORMAL_WB) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PMD)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
},
/* RAM
* Virtual address: 0x0000000057200000 - 0x00000000771FFFFF
* Physical address: 0x0000000057200000 - 0x00000000771FFFFF
*/
{ .pbase = ALIGN_DOWN(0x57200000UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x57200000UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x20000000UL,
.pg_count = PAGE_COUNT(0x20000000UL),
.type = UKPLAT_MEMRT_FREE,
.flags = UKPLAT_MEMRF_VALUE_IS_WR | UKPLAT_MEMRF_UXN |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_NORMAL_WB) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PMD)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
},
/* RAM
* Virtual address: 0x000000007C600000 - 0x000000007FFFFFFF
* Physical address: 0x000000007C600000 - 0x000000007FFFFFFF
*/
{ .pbase = ALIGN_DOWN(0x7C600000UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x7C600000UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x3A00000UL,
.pg_count = PAGE_COUNT(0x3A00000UL),
.type = UKPLAT_MEMRT_FREE,
.flags = UKPLAT_MEMRF_VALUE_IS_WR | UKPLAT_MEMRF_UXN |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_NORMAL_WB) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PMD)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
},
/* RAM
* Virtual address: 0x0000000080000000 - 0x00000000BFFFFFFF
* Physical address: 0x0000000080000000 - 0x00000000BFFFFFFF
*/
{ .pbase = ALIGN_DOWN(0x80000000UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x80000000UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x40000000UL,
.pg_count = PAGE_COUNT(0x40000000UL),
.type = UKPLAT_MEMRT_FREE,
.flags = UKPLAT_MEMRF_VALUE_IS_WR | UKPLAT_MEMRF_UXN |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_NORMAL_WB) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PUD)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
},
/* DEVICE
* Virtual address: 0x0000000100000000 - 0x000000043FFFFFFF
* Physical address: 0x0000000100000000 - 0x000000043FFFFFFF
*/
{ .pbase = ALIGN_DOWN(0x100000000UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x100000000UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x340000000UL,
.pg_count = PAGE_COUNT(0x340000000UL),
.type = UKPLAT_MEMRT_RESERVED,
.flags = UKPLAT_MEMRF_VALUE_IS_WR |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_DEVICE_nGnRnE) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PUD)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
},
/* DEVICE
* Virtual address: 0x0000000500000000 - 0x00000006FFFFFFFF
* Physical address: 0x0000000500000000 - 0x00000006FFFFFFFF
*/
{ .pbase = ALIGN_DOWN(0x500000000UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0x500000000UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x200000000UL,
.pg_count = PAGE_COUNT(0x200000000UL),
.type = UKPLAT_MEMRT_RESERVED,
.flags = UKPLAT_MEMRF_VALUE_IS_WR |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_DEVICE_nGnRnE) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PUD)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
}
};
#ifdef CONFIG_PAGING
struct ukplat_memregion_desc
direct_map_mrd __section(".tn_direct_memregion") = {
/* Direct-mapped
* Virtual address: 0x0000ff8000000000 - 0x0000ffffffffffff
* Physical address: 0x0000000000000000 - 0x0000008000000000
*/
.pbase = ALIGN_DOWN(0x0UL, __PAGE_SIZE),
.vbase = ALIGN_DOWN(0xff8000000000UL, __PAGE_SIZE),
.pg_off = 0x0,
.len = 0x8000000000UL,
.pg_count = PAGE_COUNT(0x8000000000UL),
.type = UKPLAT_MEMRT_RESERVED,
.flags = UKPLAT_MEMRF_VALUE_IS_WR |
UKPLAT_MEMRF_MAIR(UKPLAT_MEMRF_MAIR_NORMAL_WB) |
UKPLAT_MEMRF_LEVEL(UKPLAT_MEMRF_LEVEL_PUD)
#ifdef CONFIG_UKPLAT_MEMRNAME
,
.name = { 0 }
#endif /* CONFIG_UKPLAT_MEMRNAME */
};
#endif
__u32 bpt_memregion_count =
sizeof(bpt_memregion) / sizeof(struct ukplat_memregion_desc);
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。