X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Kernel%2Fdrv%2Fkb.c;h=07e07f5d624857e2677f6b9a145ad88c49a57e48;hb=02cbaac1233be9c5228973a787431fa5e0aa178e;hp=28feb05b50f870c39c38e16a3763d9b20aaff5e9;hpb=586a47ab9343a85c944a2cf7b27a74cf459a8423;p=tpg%2Facess2.git diff --git a/Kernel/drv/kb.c b/Kernel/drv/kb.c index 28feb05b..07e07f5d 100644 --- a/Kernel/drv/kb.c +++ b/Kernel/drv/kb.c @@ -45,6 +45,8 @@ Uint8 gbaKB_States[3][256]; int giKB_KeyLayer = 0; #if USE_KERNEL_MAGIC int gbKB_MagicState = 0; + int giKB_MagicAddress = 0; + int giKB_MagicAddressPos = 0; #endif //Uint64 giKB_ReadBase = 0; //Uint32 gaKB_Buffer[KB_BUFFER_SIZE]; //!< Keyboard Ring Buffer @@ -54,7 +56,7 @@ Uint8 gbaKB_States[3][256]; // === CODE === /** - * \fn int KB_Install(char **Arguments) + * \brief Install the keyboard driver */ int KB_Install(char **Arguments) { @@ -74,8 +76,8 @@ int KB_Install(char **Arguments) } /** - * \fn void KB_IRQHandler() * \brief Called on a keyboard IRQ + * \param IRQNum IRQ number (unused) */ void KB_IRQHandler(int IRQNum) { @@ -184,14 +186,24 @@ void KB_IRQHandler(int IRQNum) { switch(ch) { - // Kernel Panic (Page Fault) - case 'q': *((int*)1) = 0; return; - // Bochs Magic Breakpoint - case 'd': __asm__ __volatile__ ("xchg %bx, %bx"); return; + case '0': case '1': case '2': case '3': + case '4': case '5': case '6': case '7': + case '8': case '9': case 'a': case 'b': + case 'c': case 'd': case 'e': case 'f': + { + char str[2] = {ch,0}; + if(giKB_MagicAddressPos == BITS/4) break; + giKB_MagicAddress |= atoi(str) << giKB_MagicAddressPos; + giKB_MagicAddressPos ++; + } + break; + // Thread List Dump case 'p': Threads_Dump(); return; // Heap Statistics case 'h': Heap_Stats(); return; + // Dump Structure + case 's': return; } } #endif