MCPcopy Create free account
hub / github.com/coreboot/coreboot / lpae_map_init

Function lpae_map_init

payloads/libpayload/arch/arm/virtual.c:85–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85static void lpae_map_init(void)
86{
87 pgd_t *pgd;
88
89 die_if(!(read_ttbcr() >> 31), "LPAE is not enabled\n");
90
91 /* get work block address */
92 work_block = ALIGN_UP((uintptr_t)_end, 2*MiB);
93 assert(work_block);
94 printf("Work block for LPAE mapping is @ %p\n", (void *)work_block);
95
96 /* get the address of the 1st pmd from pgd[0] */
97 pgd = (pgd_t *)((uintptr_t)read_ttbr0() & PGD_MASK);
98 ttb_buff = (pmd_t *)((uintptr_t)pgd[0] & PGD_MASK);
99 assert(ttb_buff);
100
101 original_map = ttb_buff[work_block >> BLOCK_SHIFT];
102}
103
104static void lpae_flush_work_block(void)
105{

Callers 1

lpae_map_phys_addrFunction · 0.85

Calls 3

printfFunction · 0.85
read_ttbr0Function · 0.85
read_ttbcrFunction · 0.50

Tested by

no test coverage detected