Format: Display memory values in hex
This commit is contained in:
parent
74ac9835c3
commit
d1ea875699
@ -53,7 +53,7 @@ You do not need to clean any files after making changes. The `lib`, `kernel`, an
|
||||
### Configuration
|
||||
|
||||
- Variable `LIMINEDIR`: Location of binary files for limine. Default is `/usr/share/limine`.
|
||||
- Variable `TARGET`: rustc target triple to compile for. Default is `x86_64-unknown-none`. Options are listed [here](#targets).
|
||||
- Variable `TARGET`: rustc target triple to compile for. Default is `x86_64-unknown-none`. Options are listed [in the targets section](#targets).
|
||||
- Argument `-p`: Rust build profile to use. Default is `dev`. Options are `dev` and `release`.
|
||||
|
||||
> [!NOTE]
|
||||
|
@ -1,8 +1,15 @@
|
||||
// Copyright (c) 2025 shibedrill
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#[cfg(not(any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "riscv64", target_arch = "loongarch64")))]
|
||||
compile_error!("Gila does not support compiling for this architecture! Supported architectures are: x86_64, aarch64, riscv64, loongarch64");
|
||||
#[cfg(not(any(
|
||||
target_arch = "x86_64",
|
||||
target_arch = "aarch64",
|
||||
target_arch = "riscv64",
|
||||
target_arch = "loongarch64"
|
||||
)))]
|
||||
compile_error!(
|
||||
"Gila does not support compiling for this architecture! Supported architectures are: x86_64, aarch64, riscv64, loongarch64"
|
||||
);
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
pub mod x86_64;
|
||||
|
@ -19,24 +19,16 @@ lazy_static! {
|
||||
|
||||
// Recoverable exception: Occurs on division failure.
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn x86_divide_error() {
|
||||
|
||||
}
|
||||
pub extern "C" fn x86_divide_error() {}
|
||||
|
||||
// Recoverable exception: Occurs on failure in BOUND instruction.
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn x86_bound_range() {
|
||||
|
||||
}
|
||||
pub extern "C" fn x86_bound_range() {}
|
||||
|
||||
// Recoverable exception: Invalid opcode.
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn x86_invalid_opcode() {
|
||||
|
||||
}
|
||||
pub extern "C" fn x86_invalid_opcode() {}
|
||||
|
||||
// Recoverable exception: FPU not available or enabled.
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn x86_device_unavailable() {
|
||||
|
||||
}
|
||||
pub extern "C" fn x86_device_unavailable() {}
|
||||
|
@ -180,9 +180,14 @@ unsafe extern "C" fn main() -> ! {
|
||||
log_trace!("{log_msg}");
|
||||
let total = usable + reclaimable + hardware + unusable;
|
||||
log_info!(
|
||||
"Boot: Memory report:\n\t\tFree: {usable}\n\t\tAvailable: {reclaimable}\n\t\tUsable: {}\n\t\tHardware: {hardware}\n\t\tUnusable: {unusable}\n\t\tTotal: {}",
|
||||
"Boot: Memory report:
|
||||
\tFree: 0x{usable:X}
|
||||
\tAvailable: 0x{reclaimable:X}
|
||||
\tUsable: 0x{:X}
|
||||
\tHardware: 0x{hardware:X}
|
||||
\tUnusable: 0x{unusable:X}
|
||||
\tTotal: 0x{total:X}",
|
||||
usable + reclaimable,
|
||||
total
|
||||
);
|
||||
} else {
|
||||
panic!("Memory map contains no entries");
|
||||
|
Loading…
Reference in New Issue
Block a user