From: Vladimir 'phcoder' Serbinenko Date: Thu, 29 Apr 2010 11:36:53 +0000 (+0200) Subject: switch off manually on linux x86_64 X-Git-Tag: 1.99~629^2~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6406a79dffb55949deb854ef449d5e70c7f632c5;p=thirdparty%2Fgrub.git switch off manually on linux x86_64 --- diff --git a/tests/boot/linux.init-x86_64.S b/tests/boot/linux.init-x86_64.S index 17ba8040c..63dca5e20 100644 --- a/tests/boot/linux.init-x86_64.S +++ b/tests/boot/linux.init-x86_64.S @@ -18,6 +18,7 @@ #define SYSCALL_WRITE 1 #define SYSCALL_RESET 169 +#define SYSCALL_IOPL 172 #define SYSCALL_EXIT 60 #define STDOUT 1 @@ -25,6 +26,8 @@ #define SHUTDOWN_MAGIC2 0x28121969 #define SHUTDOWN_MAGIC3 0x4321fedc +#define SHUTDOWN_PORT 0x8900 + .text .global start, _start _start: @@ -36,6 +39,28 @@ start: movq $(messageend-message), %rdx syscall + movq $SYSCALL_IOPL, %rax + movq $3, %rdi + syscall + + movw $SHUTDOWN_PORT, %dx + movb $'S', %al + outb %al, %dx + movb $'h', %al + outb %al, %dx + movb $'u', %al + outb %al, %dx + movb $'t', %al + outb %al, %dx + movb $'d', %al + outb %al, %dx + movb $'o', %al + outb %al, %dx + movb $'w', %al + outb %al, %dx + movb $'n', %al + outb %al, %dx + /* shutdown. */ movq $SYSCALL_RESET, %rax movq $SHUTDOWN_MAGIC1, %rdi