From: Peter Dinda Date: Fri, 6 Jun 2008 23:13:03 +0000 (+0000) Subject: Working odin - x86 only - do 0 and then F5 to avoid startup files X-Git-Tag: boot386puppy-26-to-ide~26 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=645c766b13d15fd70cd360e577eac1f62e07149f Working odin - x86 only - do 0 and then F5 to avoid startup files --- diff --git a/palacios/src/devices/keyboard.c b/palacios/src/devices/keyboard.c index 65e4d77..74d2096 100644 --- a/palacios/src/devices/keyboard.c +++ b/palacios/src/devices/keyboard.c @@ -3,9 +3,9 @@ #include #include -#define KEYBOARD_DEBUG 1 +#define KEYBOARD_DEBUG 0 -#define KEYBOARD_DEBUG_80H 1 +#define KEYBOARD_DEBUG_80H 0 #if KEYBOARD_DEBUG #define KEYBOARD_DEBUG_PRINT(first, rest...) PrintDebug(first, ##rest) diff --git a/palacios/src/devices/nvram.c b/palacios/src/devices/nvram.c index bf450ae..5002134 100644 --- a/palacios/src/devices/nvram.c +++ b/palacios/src/devices/nvram.c @@ -80,7 +80,11 @@ static int set_nvram_defaults(struct vm_device *dev) // // 2 1.44 MB floppy drives // +#if 1 nvram_state->mem_state[NVRAM_REG_FLOPPY_TYPE]= 0x44; +#else + nvram_state->mem_state[NVRAM_REG_FLOPPY_TYPE] = 0x00; +#endif // // For old boot sequence style, do floppy first diff --git a/palacios/src/geekos/keyboard.c b/palacios/src/geekos/keyboard.c index 554f42f..21987b9 100644 --- a/palacios/src/geekos/keyboard.c +++ b/palacios/src/geekos/keyboard.c @@ -1,7 +1,7 @@ /* * Keyboard driver * Copyright (c) 2001,2004 David H. Hovemeyer - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". @@ -36,7 +36,7 @@ #include -static enum {TARGET_GEEKOS,TARGET_VMM} target=TARGET_GEEKOS; +static enum {TARGET_GEEKOS,TARGET_VMM} target=TARGET_VMM; extern void deliver_key_to_vmm(uchar_t status, uchar_t scancode); @@ -174,7 +174,7 @@ static void Keyboard_Interrupt_Handler(struct Interrupt_State* state) Begin_IRQ(state); - Print("Keyboard\n"); + //Print("Keyboard\n"); status = In_Byte(KB_CMD); @@ -186,7 +186,7 @@ static void Keyboard_Interrupt_Handler(struct Interrupt_State* state) /* There is a byte available */ scanCode = In_Byte(KB_DATA); raw_scancode=scanCode; - Print("Keyboard: status=0x%x, scancode=0x%x\n", raw_status, raw_scancode); + //Print("Keyboard: status=0x%x, scancode=0x%x\n", raw_status, raw_scancode); IO_Delay(); /* * Print("code=%x%s\n", scanCode, (scanCode&0x80) ? " [release]" : ""); diff --git a/palacios/src/geekos/lowlevel.asm b/palacios/src/geekos/lowlevel.asm index fe3b61b..1758b8f 100644 --- a/palacios/src/geekos/lowlevel.asm +++ b/palacios/src/geekos/lowlevel.asm @@ -2,7 +2,7 @@ ; Low level interrupt/thread handling code for GeekOS. ; Copyright (c) 2001,2003,2004 David H. Hovemeyer ; Copyright (c) 2003, Jeffrey K. Hollingsworth -; $Revision: 1.5 $ +; $Revision: 1.6 $ ; This is free software. You are permitted to use, ; redistribute, and modify it as specified in the file "COPYING". @@ -126,6 +126,9 @@ IMPORT Make_Runnable ; Function to activate a new user context (if needed). IMPORT Switch_To_User_Context +IMPORT SerialPrintHex +IMPORT SerialPutChar + ; Sizes of interrupt handler entry points for interrupts with ; and without error codes. The code in idt.c uses this ; information to infer the layout of the table of interrupt @@ -457,6 +460,43 @@ Handle_Interrupt: mov [g_needReschedule], dword 0 .restore: + +; push ebp +; mov ebp, esp +; pusha +; +; mov eax, 0xa +; push eax +; call SerialPutChar +; pop eax +; mov eax, 0xa +; push eax +; call SerialPutChar +; pop eax +; +; mov ecx, 4 +; mov edx, 24 +; +;.loop: +; mov eax, [ebp + ecx] +; +; push eax +; call SerialPrintHex +; pop eax +; +; mov eax, 0xa +; push eax +; call SerialPutChar +; pop eax +; +; add ecx, 4 +; dec edx +; jnz .loop +; +; +; popa +; pop ebp + ; Activate the user context, if necessary. Activate_User_Context diff --git a/palacios/src/geekos/timer.c b/palacios/src/geekos/timer.c index e0311a4..34f752b 100644 --- a/palacios/src/geekos/timer.c +++ b/palacios/src/geekos/timer.c @@ -2,7 +2,7 @@ * GeekOS timer interrupt support * Copyright (c) 2001,2003 David H. Hovemeyer * Copyright (c) 2003, Jeffrey K. Hollingsworth - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This is free software. You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". @@ -202,7 +202,7 @@ int g_Quantum = DEFAULT_MAX_TICKS; static void Timer_Interrupt_Handler(struct Interrupt_State* state) { - struct Kernel_Thread* current = g_currentThread; + struct Kernel_Thread* current = g_currentThread; Begin_IRQ(state); @@ -219,7 +219,7 @@ static void Timer_Interrupt_Handler(struct Interrupt_State* state) * to choose a new thread. */ if (current->numTicks >= g_Quantum) { - g_needReschedule = true; + g_needReschedule = true; }