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

Rationalise virtio-mmio devices #7

Open
r1mikey opened this issue Nov 2, 2024 · 0 comments
Open

Rationalise virtio-mmio devices #7

r1mikey opened this issue Nov 2, 2024 · 0 comments
Assignees

Comments

@r1mikey
Copy link
Owner

r1mikey commented Nov 2, 2024

virtio is described to the system via FDT as plain old virtio nodes, which need to be probed for their types. inetboot currently rewrites a few of these based on what it knows, rather than discovering anything.

One of two/three/four things needs to happen:

  1. inetboot rewrites things based on probing and knowledge of what compatible strings are needed (still yucky, doesn't solve the ACPI case)
  2. We create a virtio nexus driver which probes the firmware for virtio devices, does the necessary discovery and fires up appropriate sub-devices, or...
  3. Each virtio device gets a nexus driver (instantiated via FDT/ACPI), which probes the device and has a (single?) child device implementing the desired functionality (this is probably the best approach, but I don't know that it will definitely work)

Assuming ACPI also just exposes virtio nodes with nothing helpful in the _CID list (need to check this), then approach 3 is by far the cleanest way for us to do this. In ACPI the HID for these should be LNRO0005. They should have ACPI_RESOURCE_TYPE_FIXED_MEMORY32 and ACPI_RESOURCE_TYPE_EXTENDED_IRQ resources. This should give enough information to figure out the device type.

@r1mikey r1mikey self-assigned this Nov 2, 2024
@r1mikey r1mikey changed the title virtio-mmio nexus? Rationalise virtio-mmio devices Nov 2, 2024
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

No branches or pull requests

1 participant