From: Jack Lange Date: Fri, 19 Dec 2008 07:27:01 +0000 (-0600) Subject: changed loops to use halt instead of while(1); X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=efa8dd51a542d75cbe3f897f19f11eed13536e07;hp=4e78dc8d5ae0bcf146eb425c8a53178a1fb758e8 changed loops to use halt instead of while(1); --- diff --git a/geekos/src/geekos/lowlevel.asm b/geekos/src/geekos/lowlevel.asm index 2c64e8a..c8d0b8d 100644 --- a/geekos/src/geekos/lowlevel.asm +++ b/geekos/src/geekos/lowlevel.asm @@ -160,6 +160,9 @@ EXPORT Get_ESP ; EBP EXPORT Get_EBP +; Halt machine +EXPORT Halt + ; Virtual memory support. EXPORT Enable_Paging EXPORT Set_PDBR @@ -381,6 +384,11 @@ Get_MSR: align 8 +Halt: + hlt + + +align 8 Get_CR2: mov eax, cr2 ret diff --git a/geekos/src/geekos/main.c b/geekos/src/geekos/main.c index 5d71341..1fbd1c9 100644 --- a/geekos/src/geekos/main.c +++ b/geekos/src/geekos/main.c @@ -47,11 +47,12 @@ +extern void Halt(); void Spin() { // hack - competing thread - while (1) {}; + while (1) {Halt();}; } @@ -276,7 +277,7 @@ void Main(struct Boot_Info* bootInfo) SerialPrint("RunVMM returned, spinning\n"); - while (1) {} + while (1) {Halt();} TODO("Write a Virtual Machine Monitor");