mirror of
https://github.com/panpaul/tiny_os
synced 2024-09-20 09:45:19 +08:00
fix: extern_addr: remove as_phys_addr, lds will provide virt addr
This commit is contained in:
parent
beb792d426
commit
83abc72e04
@ -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())
|
||||||
|
Loading…
Reference in New Issue
Block a user