chore: FrameCap: fix typo and rename func

This commit is contained in:
Paul Pan 2024-05-06 01:02:33 +08:00
parent f0891ff87d
commit c710cdcd15

View File

@ -29,7 +29,7 @@ impl KernelObject for FrameObject {
* > args[1]: | asid | base_ptr | unused | * > args[1]: | asid | base_ptr | unused |
* > | [63:48] | [47:9] | [8:0] | * > | [63:48] | [47:9] | [8:0] |
* *
* in out implementation, FrameCap layout: * in our implementation, FrameCap layout:
* > args[0]: [asid, frame_size, is_device, vm_right] * > args[0]: [asid, frame_size, is_device, vm_right]
* > args[1]: mapped_addr * > args[1]: mapped_addr
* > ptr: base_ptr * > ptr: base_ptr
@ -92,7 +92,7 @@ impl<'a> FrameCap<'a> {
1 << bits 1 << bits
} }
pub fn asid(&self) -> usize { pub fn mapped_asid(&self) -> usize {
(self.cte.cap.get().args[0] >> Self::ASID_OFFSET) & Self::ASID_MASK (self.cte.cap.get().args[0] >> Self::ASID_OFFSET) & Self::ASID_MASK
} }