Yep, mm_vm_dump sounds like what you're looking for. You can add a call where you like and it will go to the log UART.
On Thu, 16 Jul 2020 at 19:14, Raghu K via Hafnium < hafnium@lists.trustedfirmware.org> wrote:
Quick search indicates mm_vm_dump() and the functions it calls in src/mm.c should do what you want. i've not tried it or don't know the format, but this may be what you are looking for.
-Raghu
On 7/16/20 11:03 AM, Madhukar Pappireddy via Hafnium wrote:
Hi,
I was wondering if there is support in Hafnium to dump page tables to a
log file. I am new to the Hafnium project and would appreciate any help. Below is an example from TF-A which provides such provision.
......<snip> VERBOSE: Translation tables state: VERBOSE: Xlat regime: EL3 VERBOSE: Max allowed PA: 0xfffffffff VERBOSE: Max allowed VA: 0xfffffffff VERBOSE: Max mapped PA: 0x2f1fffff VERBOSE: Max mapped VA: 0x2f1fffff VERBOSE: Initial lookup level: 1 VERBOSE: Entries @initial lookup level: 64 VERBOSE: Used 3 sub-tables out of 5 (spare: 2) [LV1] VA:0x0 size:0x40000000 [LV2] VA:0x0 size:0x200000 [LV3] VA:0x0 PA:0x0 size:0x1000 MEM-RO-EXEC-S [LV3] VA:0x1000 PA:0x1000 size:0x1000 MEM-RO-EXEC-S [LV3] VA:0x2000 PA:0x2000 size:0x1000 MEM-RO-EXEC-S [LV3] VA:0x3000 PA:0x3000 size:0x1000 MEM-RO-EXEC-S [LV3] VA:0x4000 PA:0x4000 size:0x1000 MEM-RO-EXEC-S [LV3] VA:0x5000 PA:0x5000 size:0x1000 MEM-RO-EXEC-S [LV3] VA:0x6000 PA:0x6000 size:0x1000 MEM-RO-EXEC-S [LV3] VA:0x7000 PA:0x7000 size:0x1000 MEM-RO-EXEC-S [LV3] VA:0x8000 PA:0x8000 size:0x1000 MEM-RO-XN-S [LV3] VA:0x9000 PA:0x9000 size:0x1000 MEM-RO-XN-S [LV3] VA:0xa000 PA:0xa000 size:0x1000 MEM-RO-XN-S [LV3] VA:0xb000 size:0x1000 [LV3] (500 invalid descriptors omitted) [LV2] VA:0x200000 size:0x200000 [LV2] (30 invalid descriptors omitted) [LV2] VA:0x4000000 size:0x200000 ..... <snip>
Thanks, Madhukar
-- Hafnium mailing list Hafnium@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/hafnium