[PATCH 04/10] test: add multiboot headers to startup files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With these headers, multiboot can launch us directly in protected mode.

Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>
---
 kvm/user/test/x86/cstart.S   |    9 +++++++++
 kvm/user/test/x86/cstart64.S |    9 +++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/kvm/user/test/x86/cstart.S b/kvm/user/test/x86/cstart.S
index 69a6262..0471b92 100644
--- a/kvm/user/test/x86/cstart.S
+++ b/kvm/user/test/x86/cstart.S
@@ -3,6 +3,15 @@
 .bss
 
 .section .init
+
+mb_magic = 0x1BADB002
+mb_flags = 0x0
+
+	# multiboot header
+	.long mb_magic, mb_flags, 0 - (mb_magic + mb_flags)
+
+.globl start
+start:
 	call main
 	push %eax
 	call exit
diff --git a/kvm/user/test/x86/cstart64.S b/kvm/user/test/x86/cstart64.S
index 4f116f9..805938b 100644
--- a/kvm/user/test/x86/cstart64.S
+++ b/kvm/user/test/x86/cstart64.S
@@ -69,6 +69,15 @@ tss_end:
 .section .init
 
 .code32
+
+mb_magic = 0x1BADB002
+mb_flags = 0x0
+
+	# multiboot header
+	.long mb_magic, mb_flags, 0 - (mb_magic + mb_flags)
+
+.globl start
+start:
 	mov $stacktop, %esp
 	call prepare_64
 	jmpl $8, $start64
-- 
1.6.1.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux