Commit Graph

3187 Commits

Author SHA1 Message Date
Philipp Schuster 8820a0eb58 uefi: add boot::[un_]install_multiple_protocol_interface()
Having these functions is very helpful if one installs multiple protocol
interfaces in a driver at once. The caveat is unfortunately that Rust
handling of varargs isn't very convenient. I also didn't come up with
a working + nice way using normal macros to workaround.

Instead, I looked into the implementation in edk2 [0]. The logic is
fairly simple and can be emulated on a higher-level by us.

[0] https://github.com/tianocore/edk2/blob/66346d5edeac2a00d3cf2f2f3b5f66d423c07b3e/MdeModulePkg/Core/Dxe/Hand/Handle.c#L630
2026-01-02 13:44:22 +01:00
Philipp Schuster 0a8f6c64c6 uefi: protocols: cleanup [re_,un_]install_protocol_interface() 2026-01-02 13:42:14 +01:00
Philipp Schuster 8daafb1dd2 uefi: protocols: cleanup register_protocol_notify[_by_guid]() 2026-01-02 13:42:14 +01:00
Philipp Schuster 15b2c29e72 uefi: protocols: cleanup test_protocol[_by_guid]()
The majority of our protocol-related public functions use a generic
approach with `<P: ProtocolPointer + ?Sized>`. Unfortunately:

- we are inconsistent with that
- this hinders some use-cases where the GUID is only known at
  runtime

Therefore, this is the first commit of a series of commits that
improves the situation by providing base functions that use the
generic-based API and `by_guid` counterparts for more runtime-
flexibility.
2026-01-02 13:42:14 +01:00
renovate[bot] 920e50bf7b Merge pull request #1853 from rust-osdev/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2025-12-29 02:19:07 +00:00
renovate[bot] 2e2398829e chore(deps): lock file maintenance 2025-12-29 02:14:00 +00:00
renovate[bot] b460cfe037 Merge pull request #1849 from rust-osdev/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2025-12-27 23:25:40 +00:00
renovate[bot] b2fd0500dc chore(deps): lock file maintenance 2025-12-27 23:17:38 +00:00
Nicholas Bishop 7fea06474d Merge pull request #1850 from rust-osdev/http
uefi: http: fix integration test
2025-12-27 23:10:40 +00:00
Philipp Schuster eb0a3494bf tests: improve debuggability 2025-12-27 22:18:36 +01:00
Philipp Schuster 256827771b uefi: http: improve code by directly passing in the vector
This makes usage more natural as one can pass in the
possibly uncomplete body of the http response type.
2025-12-27 22:18:36 +01:00
Philipp Schuster e11822765f uefi: http: improve doc 2025-12-27 22:14:16 +01:00
Philipp Schuster bdc806f7c3 tests: fix failing integration-test
Since recently, example.com isn't sending a Content-Length header and
uses a chunked encoding. It is not trivial to implement this so we skip
this situation for now.
2025-12-27 22:14:16 +01:00
Philipp Schuster bea014a379 uefi: improve Http::get_mode_data 2025-12-27 22:14:16 +01:00
Nicholas Bishop 8cbc3c0354 Merge pull request #1830 from seijikun/mr-pci-enumerate3
uefi: Refactor PciRootBridgeIo::enumerate() with tree-topology information
2025-12-12 03:50:58 +00:00
renovate[bot] d3105c267e Merge pull request #1844 from rust-osdev/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2025-12-10 15:42:56 +00:00
renovate[bot] 75612ea2c1 chore(deps): lock file maintenance 2025-12-10 15:32:11 +00:00
Philipp Schuster 8ba5b7efdc Merge pull request #1841 from Virv12/blockio2
Implement BlockIO2
2025-12-06 19:31:44 +00:00
Filippo Casarin 67b855ee6c uefi: add BlockIO2 protocol wrapper 2025-12-03 16:30:46 +01:00
Filippo Casarin 0bcde9ae92 uefi-raw: add BlockIo2 protocol 2025-12-03 16:30:29 +01:00
Philipp Schuster 585b4dd4bd Merge pull request #1836 from Virv12/snp
Change SimpleNetwork::wait_for_packet to return `Option<Event>`
2025-12-01 12:31:47 +00:00
Filippo Casarin 9a3d55380e Change SimpleNetwork::wait_for_packet to return Option<Event>
A reference to an `Event` is useless since every api takes an `&mut Event`, now
we return the `Event` by value.
2025-12-01 13:13:44 +01:00
renovate[bot] 17750c15fc Merge pull request #1838 from rust-osdev/renovate/lock-file-maintenance
chore(deps): lock file maintenance
2025-12-01 01:20:25 +00:00
renovate[bot] dc2cbd7389 Merge pull request #1837 from rust-osdev/renovate/crate-ci-typos-1.x
chore(deps): update crate-ci/typos action to v1.40.0
2025-12-01 01:19:20 +00:00
renovate[bot] f9f775df34 chore(deps): lock file maintenance 2025-12-01 01:15:38 +00:00
renovate[bot] 2c4698b127 chore(deps): update crate-ci/typos action to v1.40.0 2025-12-01 01:14:40 +00:00
Markus Ebner 3d29ddaed1 uefi: Refactor PciRootBridgeIo::enumerate() with tree-topology information
- Refactored return type from standard BTreeSet to custom PciTree struct
- Removed special FullPciIoAddress type, since segment number is PciRoot dependent
- During enumeration, skip branches we have already seen
- During enumeration, collect tree topology information (which child bus linked from where)
- Add complicated pci structure in integration test vm
- Print child busses for every device entry in integration test
2025-11-26 21:54:32 +01:00
Philipp Schuster 159f825784 Merge pull request #1835 from seijikun/mr-nvme-broadcast
uefi: Add special broadcast nvme namespace
2025-11-26 10:00:10 +00:00
Markus Ebner 2e7f99e31f uefi: Add special broadcast nvme namespace 2025-11-26 09:33:41 +01:00
Philipp Schuster 593ec6b04a Merge pull request #1822 from crawfxrd/hii-bindings
uefi-raw: Add bindings for most HII protocols
2025-11-25 16:35:58 +00:00
Tim Crawford 3eb5b8da07 uefi-raw: Add bindings for most HII protocols
Add bindings for the following protocols:

- HiiFont (EFI_HII_FONT_PROTOCOL)
- HiiFontEx (EFI_HII_FONT_EX_PROTOCOL)
- HiiString (EFI_HII_STRING_PROTOCOL)
- HiiImage (EFI_HII_IMAGE_PROTOCOL)
- HiiImageEx (EFI_HII_IMAGE_EX_PROTOCOL)
- HiiPopup (EFI_HII_POPUP_PROTOCOL)
- FormBrowser2 (EFI_FORM_BROWSER2_PROTOCOL)

Ref: UEFI 2.11: 34 HII Protocols
Ref: UEFI 2.11: 35 HII Configuration Processing and Browser Protocol
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2025-11-25 08:19:03 -07:00
Philipp Schuster 9d8b07e919 Merge pull request #1821 from rust-osdev/renovate/syn-2.x-lockfile
chore(deps): update rust crate syn to v2.0.111
2025-11-25 12:04:06 +00:00
Philipp Schuster 0bb28df12b Merge pull request #1832 from rust-osdev/renovate/clap-4.x-lockfile
chore(deps): update rust crate clap to v4.5.53
2025-11-25 12:04:01 +00:00
Philipp Schuster 9e1b74fd67 Merge pull request #1834 from crawfxrd/fmp-bindings
uefi-raw: Add bindings for FMP
2025-11-25 12:02:47 +00:00
Tim Crawford 36e6a94cf9 uefi-raw: Add bindings for FMP
Ref: UEFI 2.11: 23 Firmware Update and Reporting
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2025-11-24 10:04:39 -07:00
renovate[bot] 2a8acd5473 chore(deps): update rust crate syn to v2.0.111 2025-11-24 06:12:11 +00:00
renovate[bot] 651ccebc56 chore(deps): update rust crate clap to v4.5.53 2025-11-24 06:12:05 +00:00
Philipp Schuster e0578b9af8 Merge pull request #1833 from rust-osdev/renovate/actions-checkout-6.x
chore(deps): update actions/checkout action to v6
2025-11-24 06:05:04 +00:00
renovate[bot] d32719b50c chore(deps): update actions/checkout action to v6 2025-11-24 01:02:13 +00:00
Philipp Schuster 7a7d4aba07 Merge pull request #1828 from seijikun/mr-atapassthru-lbamap
uefi: Make AtaDevice::execute_command() return AtaResponse on error
2025-11-21 13:17:11 +00:00
Markus Ebner 3e8685fdc0 uefi: Return AtaResponse from failed AtaDevice::execute_command()
The AtaResponse contains status register values that help identifying what
went wrong.
2025-11-21 14:12:27 +01:00
Markus Ebner f75e9c77b6 uefi: Add valuable commentary to map Ata command fields to LBA addressing 2025-11-21 14:12:27 +01:00
Philipp Schuster 43222e3193 Merge pull request #1829 from seijikun/mr-pci-enumerate2
uefi: Fix broken bridge recursion in PCI enumeration
2025-11-21 13:06:28 +00:00
Markus Ebner 677583a7f3 uefi: Change PciRootBridgeIo::enumerate() start only at first bus nr 2025-11-21 02:28:35 +01:00
Markus Ebner 32c0944ba7 uefi: Fix broken bridge recursion in PCI enumeration 2025-11-21 01:29:37 +01:00
Philipp Schuster 039429b0fe Merge pull request #1827 from jasonbking/secure-io-raw
uefi-raw: add Storage Security Command protocol type definitions
2025-11-20 10:45:58 +00:00
Jason King 5436558f56 uefi-raw: add Storage Security Command protocol type definitions 2025-11-19 19:41:32 -06:00
Philipp Schuster bbe1c5a5ea Merge pull request #1797 from JayKickliter/jsk/uefi-raw/add-tcpv4
uefi-raw: add Tcp4 protocol type definitions
2025-11-19 13:12:26 +00:00
Philipp Schuster 5966f9493f uefi-raw: doc: fix 2025-11-19 14:07:39 +01:00
Jay Kickliter f89d22d004 uefi-raw: add tcpv4 protocol definitions 2025-11-19 14:07:39 +01:00