hii: support 64-bit HiiDB addresses#12
Conversation
Some platforms export the HiiDB buffer above 4GB, so the physical address in the efivarfs payload does not always fit in 32 bits. Parse both the existing 32-bit payload and a 64-bit address payload so the tool can consume either firmware format. Read the exported buffer with page-sized /dev/mem mmap mappings instead of seek/read. This works for high reserved DRAM ranges where read from /dev/mem may fail. Copy the mapped data byte-by-byte to avoid faults from wider unaligned loads on memory with strict access requirements. Add parser coverage for both 32-bit and 64-bit HiiDB payloads. Signed-off-by: Dishendra Deshmukh <dishendra.deshmukh@arm.com>
|
Validated on board with HiiDB exported above 4GB:
|
|
Did you have an opportunity to verify it haven't regressed for 32-bit HiiDB? |
|
The change is backward-compatible by design. It dispatches based on
I verified this with a standalone parser test using synthetic HiiDB records. The I also checked stock AArch64 AAVMF and x86_64 OVMF under QEMU. Both booted in Based on the parser-level validation, the 64-bit support does not regress the |
I get the intention. I just want to be extra safe.
I see. Thanks. I'll recheck on another computer where it should work. |
|
OK, I confirmed on a real server with 32bit HiiDB: |
Some platforms export the HiiDB buffer above 4GB, so the physical address in the efivarfs payload does not always fit in 32 bits.
Parse both the existing 32-bit payload and a 64-bit address payload so the tool can consume either firmware format.
Read the exported buffer with page-sized /dev/mem mmap mappings instead of seek/read. This works for high reserved DRAM ranges where read from /dev/mem may fail.
Copy the mapped data byte-by-byte to avoid faults from wider unaligned loads on memory with strict access requirements.
Add parser coverage for both 32-bit and 64-bit HiiDB payloads.