* Copyright (C) 2000 Karsten Keil <kkeil@suse.de>
* Copyright (C) 2001,2002 Andi Kleen <ak@suse.de>
*
- * $Id: head.S,v 1.49 2002/03/19 17:39:25 ak Exp $
- *
* Jun Nakajima <jun.nakajima@intel.com>
* Modified for Xen
*/
#include <linux/linkage.h>
#include <linux/threads.h>
#include <linux/init.h>
+#include <linux/elfnote.h>
#include <asm/desc.h>
#include <asm/segment.h>
#include <asm/page.h>
#include <asm/msr.h>
#include <asm/cache.h>
+#include <xen/interface/elfnote.h>
+
.text
.section .bootstrap.text
.code64
/* The TLS descriptors are currently at a different place compared to i386.
Hopefully nobody expects them at a fixed place (Wine?) */
-
+
ENTRY(cpu_gdt_table)
.quad 0x0000000000000000 /* NULL descriptor */
.quad 0x0 /* unused */
.quad 0x00af9a000000ffff /* __KERNEL_CS */
.quad 0x00cf92000000ffff /* __KERNEL_DS */
.quad 0x00cffa000000ffff /* __USER32_CS */
- .quad 0x00cff2000000ffff /* __USER_DS, __USER32_DS */
+ .quad 0x00cff2000000ffff /* __USER_DS, __USER32_DS */
.quad 0x00affa000000ffff /* __USER_CS */
.quad 0x00cf9a000000ffff /* __KERNEL32_CS */
.quad 0,0 /* TSS */
.quad 0,0 /* LDT */
- .quad 0,0,0 /* three TLS descriptors */
- .quad 0 /* unused */
-gdt_end:
- /* asm/segment.h:GDT_ENTRIES must match this */
+ .quad 0,0,0 /* three TLS descriptors */
+ .quad 0x0000f40000000000 /* node/CPU stored in limit */
+gdt_end:
+ /* asm/segment.h:GDT_ENTRIES must match this */
/* This should be a multiple of the cache line size */
/* GDTs of other CPUs are now dynamically allocated */
ENTRY(empty_zero_page)
.skip PAGE_SIZE
+#ifdef CONFIG_XEN_COMPAT_030002
/*
* __xen_guest information
*/
.ascii ",XEN_VER=xen-3.0"
.ascii ",VIRT_BASE=0x"
utoh __START_KERNEL_map
-#ifdef CONFIG_XEN_COMPAT_030002
.ascii ",ELF_PADDR_OFFSET=0x"
utoh __START_KERNEL_map
-#else
- .ascii ",ELF_PADDR_OFFSET=0x0"
-#endif /* !CONFIG_XEN_COMPAT_030002 */
.ascii ",VIRT_ENTRY=0x"
utoh (__START_KERNEL_map + __PHYSICAL_START + VIRT_ENTRY_OFFSET)
.ascii ",HYPERCALL_PAGE=0x"
.ascii "|supervisor_mode_kernel"
.ascii ",LOADER=generic"
.byte 0
+#endif /* CONFIG_XEN_COMPAT_030002 */
+
+ ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz, "linux")
+ ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz, "2.6")
+ ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz, "xen-3.0")
+ ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .quad, __START_KERNEL_map)
+#ifdef CONFIG_XEN_COMPAT_030002
+ ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, .quad, __START_KERNEL_map)
+#else
+ ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, .quad, 0)
+#endif /* !CONFIG_XEN_COMPAT_030002 */
+ ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .quad, startup_64)
+ ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .quad, hypercall_page)
+ ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz, "writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel")
+ ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz, "generic")