Skip to content

Commit 6354879

Browse files
josephlrrbradford
authored andcommitted
mmio: Remove Virtio-over-MMIO support
The code currently does not work and relies on hard-coded addresses. Removing this code makes the remainder of the code easier to refactor (by avoiding lifetime complexity). It also makes adding support for new block devices easier (as we can assume all devices get discovered via PCI). Also adds an explicit "Halting.." log, making it clear the firmware is _intentionally_ hanging. Signed-off-by: Joe Richey <joerichey@google.com>
1 parent 62f9772 commit 6354879

File tree

3 files changed

+1
-123
lines changed

3 files changed

+1
-123
lines changed

src/main.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ mod efi;
3232
mod fat;
3333
mod loader;
3434
mod mem;
35-
mod mmio;
3635
mod part;
3736
mod pci;
3837
mod pe;
@@ -182,9 +181,6 @@ pub extern "C" fn rust64_start() -> ! {
182181
},
183182
);
184183

185-
let mut mmio_transport = mmio::VirtioMMIOTransport::new(0xd000_0000u64);
186-
let mut device = block::VirtioBlockDevice::new(&mut mmio_transport);
187-
boot_from_device(&mut device);
188-
184+
log!("Unable to boot from any virtio-blk device. Halting..");
189185
unsafe { halt_loop() }
190186
}

src/mmio.rs

Lines changed: 0 additions & 116 deletions
This file was deleted.

src/virtio.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414

1515
/// Virtio related errors
1616
pub enum Error {
17-
VirtioMagicInvalid,
18-
VirtioVersionInvalid,
1917
VirtioUnsupportedDevice,
2018
VirtioLegacyOnly,
2119
VirtioFeatureNegotiationFailed,

0 commit comments

Comments
 (0)