x86: expose APIs for dumping MMU entry flags

Add two new non-static APIs for dumping out the
page table entries for a specified memory address,
and move to the main MMU code. Has debugging uses
when trying to figure out why memory domains are not
set up correctly.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-11-19 12:49:39 -08:00 committed by Anas Nashif
commit e45c6eeebc
3 changed files with 66 additions and 57 deletions

View file

@ -328,6 +328,14 @@ static inline u64_t *z_x86_get_pte(struct x86_page_tables *ptables,
return z_x86_pt_get_pte(z_x86_get_pt(ptables, addr), addr);
}
/**
* Dump out page table entries for a particular memory address
*
* For the provided memory address, dump out the P, W, XD, US flags
* at each paging level to the error log.
*/
void z_x86_dump_mmu_flags(struct x86_page_tables *ptables, uintptr_t addr);
/**
* Debug function for dumping out page tables
*