diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:29:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:29:51 +0000 |
commit | 6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e (patch) | |
tree | 32451fa3cdd9321fb2591fada9891b2cb70a9cd1 /grub-core/tests/boot/kernel-8086.S | |
parent | Initial commit. (diff) | |
download | grub2-6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e.tar.xz grub2-6e7a315eb67cb6c113cf37e1d66c4f11a51a2b3e.zip |
Adding upstream version 2.06.upstream/2.06upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'grub-core/tests/boot/kernel-8086.S')
-rw-r--r-- | grub-core/tests/boot/kernel-8086.S | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/grub-core/tests/boot/kernel-8086.S b/grub-core/tests/boot/kernel-8086.S new file mode 100644 index 0000000..5ec5368 --- /dev/null +++ b/grub-core/tests/boot/kernel-8086.S @@ -0,0 +1,50 @@ + + .text + .globl _start +_start: +base: + .code16 + jmp cont + +serialmsg: +1: + movb 0(%si), %bl + testb %bl, %bl + jz 1f + movw $0x3fd, %dx +2: + inb %dx, %al + testb $0x20, %al + jz 2b + + movw $0x3f8, %dx + movb %bl, %al + outb %al, %dx + incw %si + jmp 1b +1: + ret + +cont: +#ifdef TARGET_NTLDR + movw $0x2000, %ax +#elif defined (TARGET_CHAINLOADER) + xorw %ax, %ax +#else +#error unsupported target +#endif + movw %ax, %ds + lea message, %si + call serialmsg +#include "qemu-shutdown-x86.S" + +1: + hlt + jmp 1b + +message: + .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n" + .byte 0 + + .org 510 + .short 0xaa55 |