Skip to content

Commit 1de4099

Browse files
committed
boot: Remove impl of Info for Linux Boot Protocol
The Linux Boot Protocol is no longer supported for starting RVH and as such there is no need to implemement that trait. In this case the trait was also being overloaded for access to some code for booting *with* the Linux Boot Protocol and so those functions are now directly included in `boot::Params`. Signed-off-by: Rob Bradford <[email protected]>
1 parent 2c51237 commit 1de4099

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/boot.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use core::mem;
55

66
use crate::{
77
bootinfo::{EntryType, Info, MemoryEntry},
8-
common,
98
fat::{Error, Read},
109
mem::MemoryRegion,
1110
};
@@ -131,22 +130,12 @@ impl Params {
131130
self.e820_table[i as usize] = info.entry(i as usize).into();
132131
}
133132
}
134-
}
135133

136-
impl Info for Params {
137-
fn name(&self) -> &str {
138-
"Linux Boot Protocol"
139-
}
140-
fn rsdp_addr(&self) -> u64 {
141-
self.acpi_rsdp_addr
142-
}
143-
fn cmdline(&self) -> &[u8] {
144-
unsafe { common::from_cstring(self.hdr.cmd_line_ptr as u64) }
145-
}
146-
fn num_entries(&self) -> usize {
134+
pub fn num_entries(&self) -> usize {
147135
self.e820_entries as usize
148136
}
149-
fn entry(&self, idx: usize) -> MemoryEntry {
137+
138+
pub fn entry(&self, idx: usize) -> MemoryEntry {
150139
assert!(idx < self.num_entries());
151140
let entry = self.e820_table[idx];
152141
MemoryEntry::from(entry)

0 commit comments

Comments
 (0)