Hiidb access from userspace not working
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- linux, rust
- Lĩnh vực
- cli, operating-systems
Hướng nghiên cứu
Bắt đầu với đường dẫn đọc /dev/mem được thực thi bởi hii extract-db và các lệnh show-ifr, list-questions và list-strings, tập trung vào lỗi read_exact được báo cáo sau khi seek. Tái hiện lỗi bằng cách sử dụng biến EFI HiiDb và vùng bộ nhớ mà biến này tham chiếu, sau đó xác minh rằng công cụ có thể đọc và phân tích toàn bộ cơ sở dữ liệu HII trên hệ thống ARM bị ảnh hưởng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi all,
I'm working on accessing and modifying BIOS/UEFI settings (such as toggling hardware ports) from Linux userspace on an ARM-based system using the uefisettings tool. The goal is to interact with the HII (Human Interface Infrastructure) database that stores BIOS configuration menus.
Current Setup:
I'm using EDK2, and have customized the HiiDatabaseDxe driver to manually create an EFI variable named HiiDb-1b838190-4625-4ead-abc9-cd5e6af18fe0, following the format expected by uefisettings.
This variable contains:
UEFI variable flags for boot/runtime access.
The size of the HII database.
The physical memory address where the HII database is located in /dev/mem.
Example:
$ hexdump -C /sys/firmware/efi/efivars/HiiDb-1b838190-4625-4ead-abc9-cd5e6af18fe0
00000000 06 00 00 00 18 0d 00 00 00 00 c9 ed |............|
I verified that /dev/mem at 0xEDC90000 (as pointed to in the variable) contains valid-looking IFR data and string content.
I also see other EFI variable files under /sys/firmware/efi/efivars/ for specific formsets, holding BIOS option values.
Problems I'm Facing:
uefisettings fails to parse the HII database, and commands like show-ifr, list-questions, list-strings, or even hii extract-db fail with:
Can't parse more package lists
I added debug logging inside uefisettings, and noticed:
The seek operation on /dev/mem works correctly.
But the subsequent read_exact fails to copy data into the expected buffer (it seems like a zero-length or incomplete read).
I'm not familiar with Rust, and I suspect this might be a memory allocation issue—possibly stack vs heap or incorrect buffer sizing.
What Works:
The HII database is clearly published and accessible in memory.
The format of the manually created HiiDb-* variable matches expectations.
I can read specific efivars corresponding to BIOS option values for particular formsets.
What I Need Help With:
Why is uefisettings unable to read the data correctly from /dev/mem despite a valid memory region and variable?
Could this be due to Rust’s read_exact requiring specific buffer alignment or size?
How can I debug or modify this behavior?
Are there any known limitations or required conditions (e.g., memory page alignment, permissions, architecture-specific quirks) for uefisettings ?
Is there a way to feed the extracted HII binary data into uefisettings directly, bypassing the need for /dev/mem access?
Any Rust-side fix or workaround suggestions to make the tool read the HII data correctly?
Any documentation or working examples where others have successfully parsed and modified BIOS settings via uefisettings?
I wanted to understand what I need to do exactly to make uefisettings work to modify options of Bios from userspace. Any documentation or guidence can really help me . I am breaking my head from last month to figure out why it fails .
Any guidance or suggestions would be deeply appreciated—especially on resolving the read_exact issue and getting uefisettings to recognize and work with the HII database correctly.
Thanks in advance!
- Ngôn ngữ chính
- Rust
- Star
- 100
- Fork
- 13
- Merge trung bình
- 10 giờ 5 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của linuxboot/uefisettings
-
Hii - issue with package parsingĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
linuxboot/uefisettings#16 · 4 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
linuxboot/uefisettings#10 ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
linuxboot/uefisettings#7 · 3 bình luận ·
-
Mention other similar projectsCó thể làm lại được @xaionaro đã nhận 637 ngày trước và không có pull request nào đang mở. Đang mởdocumentation
linuxboot/uefisettings#6 · 1 người được giao ·
-
32 bit builds are brokenĐang mởbug waiting for response
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
linuxboot/uefisettings#4 · 3 bình luận ·
Tất cả issue của linuxboot/uefisettings
Issue tương tự
-
Trash, bin or rubbish?Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 63/100
pop-os/cosmic-files#2117 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
L: java:gradle L: java:maven L: ruby:bundler T: bug 🐞
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
dependabot/dependabot-core#16547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug status:ready-for-test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
UniClipboard/UniClipboard#1985 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
RustCrypto/SSH#596 ·
-
area:breg rust
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
registrystack/registry-stack#2034 ·
Maintainer thường phản hồi trong vòng 1 ngày