Skip to content

hii: support 64-bit HiiDB addresses#12

Open
dishendradeshmukh1986 wants to merge 1 commit into
linuxboot:mainfrom
dishendradeshmukh1986:hii-64bit-address
Open

hii: support 64-bit HiiDB addresses#12
dishendradeshmukh1986 wants to merge 1 commit into
linuxboot:mainfrom
dishendradeshmukh1986:hii-64bit-address

Conversation

@dishendradeshmukh1986

Copy link
Copy Markdown

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.

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>
@dishendradeshmukh1986

Copy link
Copy Markdown
Author

Validated on board with HiiDB exported above 4GB:

  • cargo test --lib
  • cargo build --release
  • uefisettings hii show-ifr
  • uefisettings hii list-strings
  • uefisettings hii list-questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant