Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
Cleanup debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed May 27, 2021
1 parent d34245f commit ccbd8fd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
11 changes: 4 additions & 7 deletions kernel/arch/x86_64/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void ap_main(void) {
uint32_t ebx;
asm volatile ("cpuid" : "=b"(ebx) : "a"(0x1) : "ecx", "edx", "memory");
if (this_core->lapic_id != (int)(ebx >> 24)) {
printf("alert: lapic id does not match\n");
printf("acpi: lapic id does not match\n");
}

/* Load the IDT */
Expand Down Expand Up @@ -148,7 +148,7 @@ void acpi_initialize(void) {
}

if (!good) {
printf("No RSD PTR found\n");
printf("acpi: No RSD PTR found\n");
return;
}

Expand All @@ -159,7 +159,7 @@ void acpi_initialize(void) {
check += *tmp;
}
if (check != 0) {
printf("Bad checksum on RSDP\n");
printf("acpi: Bad checksum on RSDP\n");
return; /* bad checksum */
}

Expand All @@ -177,12 +177,11 @@ void acpi_initialize(void) {
switch (entry[0]) {
case 0:
if (entry[4] & 0x01) {
printf("cpu%d = %d\n", cores, entry[3]);
processor_local_data[cores].cpu_id = cores;
processor_local_data[cores].lapic_id = entry[3];
cores++;
if (cores == 33) {
printf("too many cores\n");
printf("acpi: too many cores\n");
arch_fatal();
}
}
Expand All @@ -194,15 +193,13 @@ void acpi_initialize(void) {
}

if (!lapic_base || cores <= 1) {
printf("Not setting up SMP\n");
return;
}

/* Allocate a virtual address with which we can poke the lapic */
lapic_final = (uintptr_t)mmu_map_mmio_region(lapic_base, 0x1000);

/* Map the bootstrap code */
printf("Installing trampoline...\n");
memcpy(mmu_map_from_physical(0x1000), &_ap_bootstrap_start, (uintptr_t)&_ap_bootstrap_end - (uintptr_t)&_ap_bootstrap_start);

for (int i = 1; i < cores; ++i) {
Expand Down
1 change: 0 additions & 1 deletion kernel/arch/x86_64/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ int kmain(struct multiboot * mboot, uint32_t mboot_mag, void* esp) {

/* Allow SMP to disabled with an arg */
if (!args_present("nosmp")) {
printf("Setting up APs...\n");
acpi_initialize();
}

Expand Down
2 changes: 0 additions & 2 deletions kernel/arch/x86_64/ps2hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,5 @@ void ps2hid_install(void) {
irq_install_handler(KEYBOARD_IRQ, keyboard_handler, "ps2hid");
irq_install_handler(MOUSE_IRQ, mouse_handler, "ps2hid");
}

printf("Done with PS/2\n");
}

2 changes: 0 additions & 2 deletions kernel/net/e1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,6 @@ static void find_e1000(uint32_t device, uint16_t vendorid, uint16_t deviceid, vo
(int)pci_extract_bus(device),
(int)pci_extract_slot(device));

printf("e1000: registering %s\n", nic->if_name);

char worker_name[34];
snprintf(worker_name, 33, "[%s]", nic->if_name);
spawn_worker_thread(e1000_init, worker_name, nic);
Expand Down

0 comments on commit ccbd8fd

Please sign in to comment.