Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale device tree address #403

Open
sunshine-lcc opened this issue Apr 5, 2022 · 1 comment
Open

Locale device tree address #403

sunshine-lcc opened this issue Apr 5, 2022 · 1 comment

Comments

@sunshine-lcc
Copy link

I wonder if there is a way to get the address of the device tree by UEFI in aarch64? It's wonderful if the crate can provide an interface to get the address of device tree.

@GabrielMajeri
Copy link
Collaborator

Hello! You might want to look into navigating the EFI Configuration Table structure, accessible with the .config_table() method on the SystemTable. It provides access to a list of descriptors of well-known, predefined "configuration tables", and according to the UEFI spec (page 104), you should be able to find a config table entry for Device Tree:

//
// Devicetree table, in Flattened Devicetree Blob (DTB) format
//
#define EFI_DTB_TABLE_GUID \
{0xb1b621d5, 0xf19c, 0x41a5, \
{0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0}}

We have some constant GUIDs defined for common tables, but not for DeviceTree (yet). If you're interested in making it easier to access this information for users of the uefi-rs crate, we'd welcome a PR adding it to the list 🙂

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

No branches or pull requests

3 participants