Revert "Fix possible UB in rmm::init."

This reverts commit 4626c74b78.
This commit is contained in:
4lDO2
2024-09-08 20:22:46 +02:00
parent 9673fa26b6
commit 815ac3da4a
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ pub enum BootloaderMemoryKind {
pub struct BootloaderMemoryEntry {
pub base: u64,
pub size: u64,
pub kind: u64,
pub kind: BootloaderMemoryKind,
}
unsafe fn page_flags<A: Arch>(virt: VirtualAddress) -> PageFlags<RmmA> {
@@ -347,7 +347,7 @@ pub unsafe fn init(
// Copy memory map from bootloader location, and page align it
let mut area_i = 0;
for bootloader_area in bootloader_areas.iter() {
if { bootloader_area.kind } != BootloaderMemoryKind::Free as u64 {
if { bootloader_area.kind } != BootloaderMemoryKind::Free {
// Not a free area
continue;
}
+2 -2
View File
@@ -29,7 +29,7 @@ pub enum BootloaderMemoryKind {
pub struct BootloaderMemoryEntry {
pub base: u64,
pub size: u64,
pub kind: u64,
pub kind: BootloaderMemoryKind,
}
unsafe fn page_flags<A: Arch>(virt: VirtualAddress) -> PageFlags<A> {
@@ -327,7 +327,7 @@ pub unsafe fn init(
// Copy memory map from bootloader location, and page align it
let mut area_i = 0;
for bootloader_area in bootloader_areas.iter() {
if { bootloader_area.kind } != BootloaderMemoryKind::Free as u64 {
if { bootloader_area.kind } != BootloaderMemoryKind::Free {
// Not a free area
continue;
}
+2 -2
View File
@@ -28,7 +28,7 @@ pub enum BootloaderMemoryKind {
pub struct BootloaderMemoryEntry {
pub base: u64,
pub size: u64,
pub kind: u64,
pub kind: BootloaderMemoryKind,
}
unsafe fn page_flags<A: Arch>(virt: VirtualAddress) -> PageFlags<A> {
@@ -321,7 +321,7 @@ pub unsafe fn init(
let areas_raw = &mut *AREAS.get();
for bootloader_area in bootloader_areas.iter() {
if { bootloader_area.kind } != BootloaderMemoryKind::Free as u64 {
if { bootloader_area.kind } != BootloaderMemoryKind::Free {
// Not a free area
continue;
}