Skip to content

Commit

Permalink
fix: use expose_addr instead of addr if required
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
  • Loading branch information
mkroening committed Nov 16, 2024
1 parent 37661bf commit 46b5014
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/arch/riscv64/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ pub struct Console(());

impl Console {
pub fn write_bytes(&mut self, bytes: &[u8]) {
sbi_rt::console_write(Physical::new(bytes.len(), bytes.as_ptr().addr(), 0));
sbi_rt::console_write(Physical::new(bytes.len(), bytes.as_ptr().expose_addr(), 0));
}
}
2 changes: 1 addition & 1 deletion src/os/uefi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub unsafe fn boot_kernel(kernel_info: LoadedKernel, fdt: Vec<u8>) -> ! {
entry_point,
} = kernel_info;

let device_tree = DeviceTreeAddress::new(u64::try_from(fdt.leak().as_ptr().addr()).unwrap());
let device_tree = DeviceTreeAddress::new(u64::try_from(fdt.leak().as_ptr().expose_addr()).unwrap());

let boot_info = BootInfo {
hardware_info: HardwareInfo {
Expand Down

0 comments on commit 46b5014

Please sign in to comment.