From b9e70255a72fa73361381882269065baf02b2561 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Tue, 2 Feb 2010 07:31:39 +0100 Subject: Remove entry_serial_out. --- kernel/entry.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'kernel/entry.c') diff --git a/kernel/entry.c b/kernel/entry.c index 2ec5089..0b22ee7 100644 --- a/kernel/entry.c +++ b/kernel/entry.c @@ -12,35 +12,15 @@ asm( "call entry_main\n" ); -void entry_serial_out(char* str); -void entry_serial_out_hex(uint32_t x); void entry_copy_multiboot(multiboot_info_t* mb_info); void entry_main(uint32_t mb_magic, multiboot_info_t* mb_info) { - entry_serial_out("entry_main()\n"); if(mb_magic != 0x2badb002) { - entry_serial_out("Multiboot magic word is wrong!\n"); goto stop; } - entry_serial_out("Multiboot ok\n"); entry_copy_multiboot(mb_info); - /* - entry_serial_out("Flags: "); - entry_serial_out_hex(mb_info->flags); - - if(mb_info->flags & (1 << 2)) { - entry_serial_out(mb_info->cmdline); - entry_serial_out("\n"); - } else { - entry_serial_out("No cmdline.\n"); - } - - entry_serial_out("Module addr: "); - entry_serial_out_hex(mb_info->mods_addr->mod_start); - */ - // Create initial page tables. for(unsigned int i = 0; i < 1024; i++) { // Clear page directory. @@ -85,7 +65,6 @@ void entry_main(uint32_t mb_magic, multiboot_info_t* mb_info) { main(); stop: - entry_serial_out("Halting.\n"); asm volatile( "cli\n" "hlt\n" @@ -136,23 +115,3 @@ void entry_copy_multiboot(multiboot_info_t* mb_info) { high_p += s; } } - -#define outb(port, value) asm volatile("out %b0,%w1" : : "a" (value), "d" (port)) - -void entry_serial_out(char* str) { - while(*str) { - if(*str == '\n') { - outb(0x3f8, '\r'); - } - outb(0x3f8, *str++); - } -} - -void entry_serial_out_hex(uint32_t x) { - char str[] = "00000000\n"; - for(int i = 0; i < 8; i++) { - int z = (x >> (28 - i * 4)) & 0xf; - str[i] = z < 10 ? '0' + z : 'a' - 10 + z; - } - entry_serial_out(str); -} -- cgit v1.2.3