fix: extern_addr: remove as_phys_addr, lds will provide virt addr

This commit is contained in:
Paul Pan 2024-04-12 18:36:28 +08:00
parent beb792d426
commit 83abc72e04

View File

@ -1,4 +1,4 @@
use vspace::addr::{PhysAddr, VirtAddr}; use vspace::addr::VirtAddr;
extern "C" { extern "C" {
pub type ExternSymbol; pub type ExternSymbol;
@ -20,11 +20,6 @@ impl ExternSymbol {
self.as_ptr() as usize self.as_ptr() as usize
} }
#[inline(always)]
pub fn as_phys_addr(&'static self) -> PhysAddr {
PhysAddr::from(self.as_usize())
}
#[inline(always)] #[inline(always)]
pub fn as_virt_addr(&'static self) -> VirtAddr { pub fn as_virt_addr(&'static self) -> VirtAddr {
VirtAddr::from(self.as_usize()) VirtAddr::from(self.as_usize())