Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Hiidb access from userspace not working

Đang mở
#8 13 bình luận 0 reaction 0 người được giao Xem trên GitHub

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ả

investigation

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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của linuxboot/uefisettings

Tất cả issue của linuxboot/uefisettings

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.