Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 14_virtual_mem_part2_mmio_remap/kernel/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<ATYPE: AddressType> Sub<Address<ATYPE>> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: Address<ATYPE>) -> Self::Output {
match self.value.checked_sub(rhs.value) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl<ATYPE: AddressType> MemoryRegion<ATYPE> {
self.end_exclusive
}

/// Returns the exclusive end page address.
/// Returns the inclusive end page address.
pub fn end_inclusive_page_addr(&self) -> PageAddress<ATYPE> {
self.end_exclusive.checked_offset(-1).unwrap()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ SECTIONS
. += 8 * 1024 * 1024;
__mmio_remap_end_exclusive = .;

ASSERT((. & PAGE_MASK) == 0, "End of boot core stack is not page aligned")
ASSERT((. & PAGE_MASK) == 0, "MMIO remap reservation is not page aligned")

/***********************************************************************************************
* Misc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<ATYPE: AddressType> Sub<Address<ATYPE>> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: Address<ATYPE>) -> Self::Output {
match self.value.checked_sub(rhs.value) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ impl<ATYPE: AddressType> MemoryRegion<ATYPE> {
self.end_exclusive
}

/// Returns the exclusive end page address.
/// Returns the inclusive end page address.
pub fn end_inclusive_page_addr(&self) -> PageAddress<ATYPE> {
self.end_exclusive.checked_offset(-1).unwrap()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<ATYPE: AddressType> Sub<Address<ATYPE>> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: Address<ATYPE>) -> Self::Output {
match self.value.checked_sub(rhs.value) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl<ATYPE: AddressType> MemoryRegion<ATYPE> {
self.end_exclusive
}

/// Returns the exclusive end page address.
/// Returns the inclusive end page address.
pub fn end_inclusive_page_addr(&self) -> PageAddress<ATYPE> {
self.end_exclusive.checked_offset(-1).unwrap()
}
Expand Down
2 changes: 1 addition & 1 deletion 17_kernel_symbols/kernel/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<ATYPE: AddressType> Sub<Address<ATYPE>> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: Address<ATYPE>) -> Self::Output {
match self.value.checked_sub(rhs.value) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand Down
2 changes: 1 addition & 1 deletion 17_kernel_symbols/kernel/src/memory/mmu/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl<ATYPE: AddressType> MemoryRegion<ATYPE> {
self.end_exclusive
}

/// Returns the exclusive end page address.
/// Returns the inclusive end page address.
pub fn end_inclusive_page_addr(&self) -> PageAddress<ATYPE> {
self.end_exclusive.checked_offset(-1).unwrap()
}
Expand Down
4 changes: 2 additions & 2 deletions 18_backtrace/kernel/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<ATYPE: AddressType> Sub<usize> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: usize) -> Self::Output {
match self.value.checked_sub(rhs) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand All @@ -113,7 +113,7 @@ impl<ATYPE: AddressType> Sub<Address<ATYPE>> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: Address<ATYPE>) -> Self::Output {
match self.value.checked_sub(rhs.value) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand Down
2 changes: 1 addition & 1 deletion 18_backtrace/kernel/src/memory/mmu/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl<ATYPE: AddressType> MemoryRegion<ATYPE> {
self.end_exclusive
}

/// Returns the exclusive end page address.
/// Returns the inclusive end page address.
pub fn end_inclusive_page_addr(&self) -> PageAddress<ATYPE> {
self.end_exclusive.checked_offset(-1).unwrap()
}
Expand Down
4 changes: 2 additions & 2 deletions 19_kernel_heap/kernel/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl<ATYPE: AddressType> Sub<usize> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: usize) -> Self::Output {
match self.value.checked_sub(rhs) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand All @@ -114,7 +114,7 @@ impl<ATYPE: AddressType> Sub<Address<ATYPE>> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: Address<ATYPE>) -> Self::Output {
match self.value.checked_sub(rhs.value) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand Down
2 changes: 1 addition & 1 deletion 19_kernel_heap/kernel/src/memory/mmu/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl<ATYPE: AddressType> MemoryRegion<ATYPE> {
self.end_exclusive
}

/// Returns the exclusive end page address.
/// Returns the inclusive end page address.
pub fn end_inclusive_page_addr(&self) -> PageAddress<ATYPE> {
self.end_exclusive.checked_offset(-1).unwrap()
}
Expand Down
4 changes: 2 additions & 2 deletions 20_timer_callbacks/kernel/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl<ATYPE: AddressType> Sub<usize> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: usize) -> Self::Output {
match self.value.checked_sub(rhs) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand All @@ -114,7 +114,7 @@ impl<ATYPE: AddressType> Sub<Address<ATYPE>> for Address<ATYPE> {
#[inline(always)]
fn sub(self, rhs: Address<ATYPE>) -> Self::Output {
match self.value.checked_sub(rhs.value) {
None => panic!("Overflow on Address::sub"),
None => panic!("Underflow on Address::sub"),
Some(x) => Self::new(x),
}
}
Expand Down
2 changes: 1 addition & 1 deletion 20_timer_callbacks/kernel/src/memory/mmu/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl<ATYPE: AddressType> MemoryRegion<ATYPE> {
self.end_exclusive
}

/// Returns the exclusive end page address.
/// Returns the inclusive end page address.
pub fn end_inclusive_page_addr(&self) -> PageAddress<ATYPE> {
self.end_exclusive.checked_offset(-1).unwrap()
}
Expand Down