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

vm_arm: use gic path to find phandle #52

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

chrisguikema
Copy link
Contributor

This commit defines the gic path for each platform, which is used to parse the device tree to find the gic phandle, instead of relying on the user to provide the correct value.

I could use some help to validate that this functions properly. I did my best to find the proper gic for each platform, but I may have messed things up.

#49

@chrisguikema
Copy link
Contributor Author

welp theres a fdt_get_phandle function that does all this for me...

@@ -164,7 +164,7 @@ static const int free_plat_interrupts[] = { 220 + GIC_LIC_INTID_BASE };
#define DTB_ADDR (LINUX_RAM_BASE + 0x01000000)
#define INITRD_MAX_SIZE 0x1900000 //25 MB
#define INITRD_ADDR (DTB_ADDR - INITRD_MAX_SIZE) //0x80700000
#define GIC_IRQ_PHANDLE 0x1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that the GIC_NODE_PATH has to match with the name in the DTS, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct.

This commit defines the gic path for each platform, which is used to
parse the device tree to find the gic phandle, instead of relying on
the user to provide the correct value.

Signed-off-by: Chris Guikema <[email protected]>
@chrisguikema
Copy link
Contributor Author

Test with: seL4/seL4_projects_libs#83

Copy link
Member

@axel-h axel-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now

@axel-h
Copy link
Member

axel-h commented Oct 27, 2022

The builds fail with ‘vm_t’ {aka ‘struct vm’} has no member named ‘gic_path’, This need a PR in https://github.com/seL4/seL4_projects_libs then also for libsel4vm/include/sel4vm/guest_vm.h

@chrisguikema
Copy link
Contributor Author

I'm going to break this up into 2 PRs, so we can get the phandle through, without needing to modify the vm struct.

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.

4 participants