Convert some println -> log::info!.

Signed-off-by: Wren Turkal <wt@penguintechs.org>
This commit is contained in:
Wren Turkal
2020-08-08 02:25:19 -07:00
parent dafd2e9f98
commit 5301057324
3 changed files with 8 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ use spin::RwLock;
use crate::stop::kstop;
use crate::log::info;
use crate::memory::Frame;
use crate::paging::{ActivePageTable, Page, PhysicalAddress, VirtualAddress};
use crate::paging::entry::EntryFlags;
@@ -124,7 +125,7 @@ pub unsafe fn init(active_table: &mut ActivePageTable, already_supplied_rsdps: O
// Search for RSDP
if let Some(rsdp) = RSDP::get_rsdp(active_table, already_supplied_rsdps) {
println!("RSDP: {:?}", rsdp);
info!("RSDP: {:?}", rsdp);
let rxsdt = get_sdt(rsdp.sdt_address(), active_table);
for &c in rxsdt.signature.iter() {

View File

@@ -87,10 +87,10 @@ pub unsafe extern fn kstart(args_ptr: *const KernelArgs) -> ! {
log::init_logger(|r| println!("{}:{} -- {}", r.target(), r.level(), r.args()));
info!("Redox OS starting...");
println!("Kernel: {:X}:{:X}", kernel_base, kernel_base + kernel_size);
println!("Stack: {:X}:{:X}", stack_base, stack_base + stack_size);
println!("Env: {:X}:{:X}", env_base, env_base + env_size);
println!("RSDPs: {:X}:{:X}", acpi_rsdps_base, acpi_rsdps_base + acpi_rsdps_size);
info!("Kernel: {:X}:{:X}", kernel_base, kernel_base + kernel_size);
info!("Stack: {:X}:{:X}", stack_base, stack_base + stack_size);
info!("Env: {:X}:{:X}", env_base, env_base + env_size);
info!("RSDPs: {:X}:{:X}", acpi_rsdps_base, acpi_rsdps_base + acpi_rsdps_size);
let ext_mem_ranges = if args.acpi_rsdps_base != 0 && args.acpi_rsdps_size > 0 {
Some([(acpi_rsdps_base as usize, acpi_rsdps_size as usize)])

View File

@@ -1,6 +1,7 @@
//! # Memory management
//! Some code was borrowed from [Phil Opp's Blog](http://os.phil-opp.com/allocating-frames.html)
use crate::log::info;
pub use crate::paging::{PAGE_SIZE, PhysicalAddress};
use self::bump::BumpAllocator;
@@ -76,7 +77,7 @@ pub unsafe fn init(kernel_start: usize, kernel_end: usize) {
for (i, entry) in MEMORY_MAP.iter_mut().enumerate() {
*entry = *(0x500 as *const MemoryArea).add(i);
if entry._type != MEMORY_AREA_NULL {
println!("{:?}", entry);
info!("{:?}", entry);
}
}