Don't use super

This commit is contained in:
Andre Richter 2019-02-03 21:42:39 +01:00
parent 14022d69c3
commit c21c46b362
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E
5 changed files with 11 additions and 11 deletions

View File

@ -177,10 +177,10 @@ pub unsafe fn init() {
// Finally, fill the single LVL3 table (4 KiB granule). Differentiate // Finally, fill the single LVL3 table (4 KiB granule). Differentiate
// between code+RO and RW pages. // between code+RO and RW pages.
let (ro_start_addr, ro_end_addr) = super::get_ro_start_end(); let (ro_start_addr, ro_end_addr) = crate::memory::get_ro_start_end();
let ro_first_page_index = ro_start_addr / super::PAGESIZE; let ro_first_page_index = ro_start_addr / crate::memory::PAGESIZE;
let ro_last_page_index = ro_end_addr / super::PAGESIZE; let ro_last_page_index = ro_end_addr / crate::memory::PAGESIZE;
let common = STAGE1_DESCRIPTOR::VALID::True let common = STAGE1_DESCRIPTOR::VALID::True
+ STAGE1_DESCRIPTOR::TYPE::Table + STAGE1_DESCRIPTOR::TYPE::Table

View File

@ -36,7 +36,7 @@ pub struct BumpAllocator {
unsafe impl Alloc for BumpAllocator { unsafe impl Alloc for BumpAllocator {
unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr> { unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr> {
let start = super::aligned_addr_unchecked(self.next, layout.align()); let start = crate::memory::aligned_addr_unchecked(self.next, layout.align());
let end = start + layout.size(); let end = start + layout.size();
if end <= self.pool_end { if end <= self.pool_end {

View File

@ -186,10 +186,10 @@ pub unsafe fn init() {
// Finally, fill the single LVL3 table (4 KiB granule). Differentiate // Finally, fill the single LVL3 table (4 KiB granule). Differentiate
// between code+RO and RW pages. // between code+RO and RW pages.
let (ro_start_addr, ro_end_addr) = super::get_ro_start_end(); let (ro_start_addr, ro_end_addr) = crate::memory::get_ro_start_end();
let ro_first_page_index = ro_start_addr / super::PAGESIZE; let ro_first_page_index = ro_start_addr / crate::memory::PAGESIZE;
let ro_last_page_index = ro_end_addr / super::PAGESIZE; let ro_last_page_index = ro_end_addr / crate::memory::PAGESIZE;
let common = STAGE1_DESCRIPTOR::VALID::True let common = STAGE1_DESCRIPTOR::VALID::True
+ STAGE1_DESCRIPTOR::TYPE::Table + STAGE1_DESCRIPTOR::TYPE::Table

View File

@ -36,7 +36,7 @@ pub struct BumpAllocator {
unsafe impl Alloc for BumpAllocator { unsafe impl Alloc for BumpAllocator {
unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr> { unsafe fn alloc(&mut self, layout: Layout) -> Result<NonNull<u8>, AllocErr> {
let start = super::aligned_addr_unchecked(self.next, layout.align()); let start = crate::memory::aligned_addr_unchecked(self.next, layout.align());
let end = start + layout.size(); let end = start + layout.size();
if end <= self.pool_end { if end <= self.pool_end {

View File

@ -186,10 +186,10 @@ pub unsafe fn init() {
// Finally, fill the single LVL3 table (4 KiB granule). Differentiate // Finally, fill the single LVL3 table (4 KiB granule). Differentiate
// between code+RO and RW pages. // between code+RO and RW pages.
let (ro_start_addr, ro_end_addr) = super::get_ro_start_end(); let (ro_start_addr, ro_end_addr) = crate::memory::get_ro_start_end();
let ro_first_page_index = ro_start_addr / super::PAGESIZE; let ro_first_page_index = ro_start_addr / crate::memory::PAGESIZE;
let ro_last_page_index = ro_end_addr / super::PAGESIZE; let ro_last_page_index = ro_end_addr / crate::memory::PAGESIZE;
let common = STAGE1_DESCRIPTOR::VALID::True let common = STAGE1_DESCRIPTOR::VALID::True
+ STAGE1_DESCRIPTOR::TYPE::Table + STAGE1_DESCRIPTOR::TYPE::Table