Move debugging messages to appropriate functions.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 8 Jun 2008 23:18:33 +0000 (19:18 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 8 Jun 2008 23:18:33 +0000 (19:18 -0400)
Move dprintf calls from post() to the function calls that perform the work.

src/ata.c
src/clock.c
src/floppy.c
src/kbd.c
src/post.c
src/serial.c

index ab22cc1bd0ada2d5479d54a4a58c01f4d9009683..62f55d1f0fac9faa84e8f039f191ca1d914bd631 100644 (file)
--- a/src/ata.c
+++ b/src/ata.c
@@ -930,6 +930,7 @@ hard_drive_setup()
     if (!CONFIG_ATA)
         return;
 
+    dprintf(3, "init hard drives\n");
     ata_init();
     ata_detect();
 
index 037d42215624fa3dcef5af35ad03ca55ee2d4e40..aef1be83755e8ed1162f46fb4fa4efd49fbba110 100644 (file)
@@ -44,6 +44,7 @@ bcd2bin(u8 val)
 void
 timer_setup()
 {
+    dprintf(3, "init timer\n");
     pit_setup();
 
     u32 seconds = bcd2bin(inb_cmos(CMOS_RTC_SECONDS));
index 9eb77371825c3fa43969fedfe46004b329fff405..1f1c2c5c68e342c6649780c03f47f22d4e3fc9d8 100644 (file)
@@ -43,6 +43,7 @@ struct floppy_ext_dbt_s diskette_param_table2 VISIBLE16 = {
 void
 floppy_drive_setup()
 {
+    dprintf(3, "init floppy drives\n");
     u8 type = inb_cmos(CMOS_FLOPPY_DRIVE_TYPE);
     u8 out = 0;
     u8 num_floppies = 0;
index 1f4ea30ad1f41e8425ffe4aae04a5b2c02867187..fda58478c1c845869a6a7e79343143dd1aeb8ebf 100644 (file)
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -149,6 +149,7 @@ keyboard_init()
 void
 kbd_setup()
 {
+    dprintf(3, "init keyboard\n");
     u16 x = offsetof(struct bios_data_area_s, kbd_buf) - 0x400;
     SET_BDA(kbd_mode, 0x10);
     SET_BDA(kbd_buf_head, x);
index 9b5495332f74022d07cc5056d72cec2a9f844a83..718cc2a22470a78074785ab4d901078891557f0d 100644 (file)
@@ -21,6 +21,7 @@
 static void
 init_bda()
 {
+    dprintf(3, "init bda\n");
     memset(bda, 0, sizeof(*bda));
 
     int i;
@@ -80,6 +81,7 @@ init_ebda()
 static void
 ram_probe(void)
 {
+    dprintf(3, "Find memory size\n");
     u32 rs;
     if (CONFIG_COREBOOT) {
         // XXX - just hardcode for now.
@@ -103,6 +105,7 @@ ram_probe(void)
 static void
 pic_setup()
 {
+    dprintf(3, "init pic\n");
     outb(0x11, PORT_PIC1);
     outb(0x11, PORT_PIC2);
     outb(0x08, PORT_PIC1_DATA);
@@ -121,6 +124,8 @@ pic_setup()
 static void
 init_boot_vectors()
 {
+    dprintf(3, "init boot device ordering\n");
+
     // Floppy drive
     struct ipl_entry_s *ip = &ebda->ipl.table[0];
     ip->type = IPL_TYPE_FLOPPY;
@@ -217,22 +222,15 @@ rom_scan(u32 start, u32 end)
 static void
 post()
 {
-    dprintf(3, "init bda\n");
     init_bda();
     init_ebda();
 
-    dprintf(3, "init timer\n");
     timer_setup();
-    dprintf(3, "init keyboard\n");
     kbd_setup();
-    dprintf(3, "init lpt\n");
     lpt_setup();
-    dprintf(3, "init serial\n");
     serial_setup();
-    dprintf(3, "init pic\n");
     pic_setup();
 
-    dprintf(3, "Find memory size\n");
     ram_probe();
 
     dprintf(1, "Scan for VGA option rom\n");
@@ -240,15 +238,11 @@ post()
 
     printf("BIOS - begin\n\n");
 
-    dprintf(3, "rombios32 init\n");
     rombios32_init();
 
-    dprintf(3, "init floppy drives\n");
     floppy_drive_setup();
-    dprintf(3, "init hard drives\n");
     hard_drive_setup();
 
-    dprintf(3, "init boot device ordering\n");
     init_boot_vectors();
 
     dprintf(1, "Scan for option roms\n");
index f9988a3e0d65f6b6b8a4e87a557692767b435ba5..5f5afce4654b7a131d2727f9070f9c22ff4363f6 100644 (file)
@@ -30,6 +30,7 @@ detect_serial(u16 port, u8 timeout, u8 count)
 void
 serial_setup()
 {
+    dprintf(3, "init serial\n");
     u16 count = 0;
     count += detect_serial(0x3f8, 0x0a, count);
     count += detect_serial(0x2f8, 0x0a, count);
@@ -184,6 +185,7 @@ detect_parport(u16 port, u8 timeout, u8 count)
 void
 lpt_setup()
 {
+    dprintf(3, "init lpt\n");
     u16 count = 0;
     count += detect_parport(0x378, 0x14, count);
     count += detect_parport(0x278, 0x14, count);