mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 18:26:32 +00:00
新版文件系统重构完成 (#198)
1.重构:VFS 2. 重构:ProcFS 3. 重构:DevFS 4. 重构:FAT32 5. 重构:AHCI驱动 6. 新增:RamFS 7. 新增:MountFS 8. 新增:FAT12 9. 新增:FAT16 10. 重构:设备抽象 Co-authored-by: guanjinquan <1666320330@qq.com> Co-authored-by: DaJiYuQia <88259094+DaJiYuQia@users.noreply.github.com>
This commit is contained in:
@ -1,3 +1,17 @@
|
||||
use crate::include::bindings::bindings::PAGE_OFFSET;
|
||||
|
||||
pub mod allocator;
|
||||
pub mod gfp;
|
||||
pub mod mmio_buddy;
|
||||
|
||||
/// @brief 将内核空间的虚拟地址转换为物理地址
|
||||
#[inline(always)]
|
||||
pub fn virt_2_phys(addr: usize) -> usize {
|
||||
addr - PAGE_OFFSET as usize
|
||||
}
|
||||
|
||||
/// @brief 将物理地址转换为内核空间的虚拟地址
|
||||
#[inline(always)]
|
||||
pub fn phys_2_virt(addr: usize) -> usize {
|
||||
addr + PAGE_OFFSET as usize
|
||||
}
|
||||
|
Reference in New Issue
Block a user