From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HwLoW-0006dx-J2 for mharc-grub-devel@gnu.org; Thu, 07 Jun 2007 13:30:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HwLoU-0006cy-J5 for grub-devel@gnu.org; Thu, 07 Jun 2007 13:30:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HwLoT-0006cl-GW for grub-devel@gnu.org; Thu, 07 Jun 2007 13:30:22 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HwLoT-0006ci-DG for grub-devel@gnu.org; Thu, 07 Jun 2007 13:30:21 -0400 Received: from smtp.freemail.gr ([81.171.104.107]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HwLoT-000559-0a for grub-devel@gnu.org; Thu, 07 Jun 2007 13:30:21 -0400 Received: from [192.168.1.35] (unknown [87.203.155.207]) by smtp.freemail.gr (Postfix) with ESMTP id D272CA082A4 for ; Thu, 7 Jun 2007 20:30:19 +0300 (EEST) Message-ID: <46683FFF.9020500@freemail.gr> Date: Thu, 07 Jun 2007 20:27:27 +0300 From: Constantine Kousoulos User-Agent: Icedove 1.5.0.10 (X11/20070329) MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) Subject: boot on amd64 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2007 17:30:22 -0000 Hello all, I 'm building a (non linux) kernel natively on i386 and on amd64. My linker script defines the first section to be one called 'boot'. This is where i put multiboot headers so that they are within the first 8 bytes of the kernel image. Grub2 succesfully retrieves the headers from the i386 build but not from the amd64 build. On amd64, i use the additional gcc flags '-mcmodel=kernel -mno-red-zone'. Grub2 complaints that 'no multiboot headers found'. This is very interesting because they are found when booting an i386 image. What can possibly confuse grub2 on amd64?? Thanks, Constantine This is the beginning of my boot.S: .section .boot, "ax" ENTRY(start) jmp realstart /* * Multiboot header. */ .align 4 .long MULTIBOOT_MAGIC_OS /* 0x2badb002 */ .long MULTIBOOT_FLAGS /* 0x0 */ .long -(MULTIBOOT_FLAGS + MULTIBOOT_MAGIC_OS) realstart: ... Here's my linker script for amd64. The same linker script is used on i386 with a different kernel_offset. start_offset = 0x100000; kernel_offset = 0xffffffff80000000; real_start = start - kernel_offset; boot_stack_size = 4096; ENTRY(real_start) SECTIONS { . = (start_offset + kernel_offset); .boot ALIGN(4096) : AT(ADDR(.boot) - kernel_offset) { _boot = .; *(.boot) _eboot = .; } .bootdata ALIGN(4) : AT(ADDR(.bootdata) - kernel_offset) { _bootdata = .; *(.bootdata) _ebootdata = .; } .bootstack ALIGN(4096) : AT(ADDR(.bootstack) - kernel_offset) { _bootstack = .; . += boot_stack_size; _ebootstack = .; } .text ALIGN(4096) : AT(ADDR(.text) - kernel_offset) { _text = .; *(.text) _etext = .; } .rodata ALIGN(4) : AT(ADDR(.rodata) - kernel_offset) { _rodata = .; *(.rodata) _erodata = .; } .data ALIGN(4096) : AT(ADDR(.data) - kernel_offset) { _data = .; *(.data) _edata = .; } .bss ALIGN(4) : AT(ADDR(.bss) - kernel_offset) { _bss = .; *(.bss) _ebss = .; } _end = .; }