Add note file to elf executable to tell firmware what mode to boot in.
authorrahnds <rahnds@openbsd.org>
Tue, 18 Feb 1997 22:33:17 +0000 (22:33 +0000)
committerrahnds <rahnds@openbsd.org>
Tue, 18 Feb 1997 22:33:17 +0000 (22:33 +0000)
Is this correct to have real-mode 0? It boots...

sys/arch/powerpc/stand/boot/note.s [new file with mode: 0644]

diff --git a/sys/arch/powerpc/stand/boot/note.s b/sys/arch/powerpc/stand/boot/note.s
new file mode 100644 (file)
index 0000000..9d48367
--- /dev/null
@@ -0,0 +1,35 @@
+.section ".note"
+
+       ## Note header - these are in target order
+
+       # length of ns.name, including NULL = 8 = strlen("PowerPC") + 1
+       # but not including padding
+       .long 8
+       
+       # Note descriptor size
+       .long 20
+       
+       # Note type
+       .long 0x1275
+
+       # The name of the owner
+       .asciz "PowerPC"
+       .balign 4
+
+
+       ## Note descriptor - these are in BE order
+
+       # Real-mode # 0 or -1 (true)
+       .long 0
+       
+       # real-base
+       .byte 0xff ; .byte 0xff ; .byte 0xff ; .byte 0xff
+       # real-size
+       .byte 0x00 ; .byte 0x00 ; .byte 0x00 ; .byte 0x00
+
+       # virt-base
+       .byte 0xff ; .byte 0xff ; .byte 0xff ; .byte 0xff
+       # virt-size
+       .byte 0x00 ; .byte 0x00 ; .byte 0x00 ; .byte 0x00
+       
+.previous