x86_64: Cleanup boot messages to fit in vga text mode better

This commit is contained in:
K. Lange 2021-10-20 18:49:40 +09:00
parent 0f2d7334b0
commit b6caef5d7e
2 changed files with 7 additions and 6 deletions

View File

@ -146,7 +146,7 @@ size_t arch_cpu_mhz(void) {
}
void arch_clock_initialize(void) {
dprintf("Calibrating system timestamp counter.\n");
dprintf("tsc: Calibrating system timestamp counter.\n");
arch_boot_time = read_cmos();
uintptr_t end_lo, end_hi;
uint32_t start_lo, start_hi;
@ -205,8 +205,9 @@ void arch_clock_initialize(void) {
if (tsc_mhz == 0) tsc_mhz = 2000; /* uh oh */
tsc_basis_time = start / tsc_mhz;
dprintf("TSC timed at %lu MHz. Use tsc_mhz= to override if this is very wrong.\n", tsc_mhz);
dprintf("Boot time is %lus. Initial TSC timestamp was %luus.\n", arch_boot_time, tsc_basis_time);
dprintf("tsc: TSC timed at %lu MHz..\n", tsc_mhz);
dprintf("tsc: Boot time is %lus.\n", arch_boot_time);
dprintf("tsc: Initial TSC timestamp was %luus.\n", tsc_basis_time);
}
#define SUBSECONDS_PER_SECOND 1000000

View File

@ -284,18 +284,18 @@ static void mount_ramdisk(uintptr_t addr, size_t len) {
size_t pageCount = (((size_t)decompressedSize + 0xFFF) & ~(0xFFF)) >> 12;
uintptr_t physicalAddress = mmu_allocate_n_frames(pageCount) << 12;
if (physicalAddress == (uintptr_t)-1) {
dprintf("gzip: failed to allocate pages for decompressed payload, skipping\n");
dprintf("gzip: failed to allocate pages\n");
return;
}
gzip_inputPtr = (void*)data;
gzip_outputPtr = mmu_map_from_physical(physicalAddress);
/* Do the deed */
if (gzip_decompress()) {
dprintf("gzip: failed to decompress payload, skipping\n");
dprintf("gzip: failed to decompress payload\n");
return;
}
ramdisk_mount(physicalAddress, decompressedSize);
dprintf("multiboot: Decompressed %lu kB to %u kB, freeing compressed image.\n",
dprintf("multiboot: Decompressed %lu kB to %u kB.\n",
(len) / 1024,
(decompressedSize) / 1024);
/* Free the pages from the original mod */