From owner-freebsd-xen@FreeBSD.ORG Mon Mar 30 17:20:21 2015 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 148EBC5E; Mon, 30 Mar 2015 17:20:21 +0000 (UTC) Received: from SMTP.CITRIX.COM (smtp.citrix.com [66.165.176.89]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "mail.citrix.com", Issuer "Cybertrust Public SureServer SV CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 98F91303; Mon, 30 Mar 2015 17:20:20 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.11,494,1422921600"; d="scan'208";a="247897785" Message-ID: <551985BB.6050706@citrix.com> Date: Mon, 30 Mar 2015 19:19:55 +0200 From: =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Subject: Re: Unable to load multiboot kernel. References: <55196D2F.8040203@citrix.com> In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Cc: freebsd-xen@freebsd.org X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2015 17:20:21 -0000 Hello, El 30/03/15 a les 18.45, Marcelo Araujo ha escrit: > Hello Roger, > > Thanks for the prompt reply and for the patch. > > I made a test and now we have a bit more of information. Seems the problem > is because the kernel is too large. > > OK load /boot/kernel/kernel > /boot/kernel/kernel Trying to load a RAW file at 0x80001000 Error reading > /boot/kernel/kernel: file too large > Unable to load /boot/kernel/kernel as a multiboot payload kernel > can't load file '/boot/kernel/kernel': invalid argument. > > Here is the size of my kernel: > root@e550:/usr/src/sys/boot # du /boot/kernel/kernel > 12885 /boot/kernel/kernel Mmmm, that's smaller than mine and should load without problems: # du /boot/kernel/kernel 21537 /boot/kernel/kernel I think the problem might be that your BIOS is not correctly reporting the extended memory size, or that the loader is not fetching it properly. Can you try the following patch to see which values you get? On one of my boxes that is able to load FreeBSD/Xen I get: bios_extmem: 0xd75d8000 memtop_copyin: 0xd76d8000 memtop: 0xd76d8000 You can apply the patch on top of the previous one, or standalone, as you wish. Roger. --- diff --git a/sys/boot/i386/libi386/i386_copy.c b/sys/boot/i386/libi386/i386_copy.c index 3c05241..4d62282 100644 --- a/sys/boot/i386/libi386/i386_copy.c +++ b/sys/boot/i386/libi386/i386_copy.c @@ -67,6 +67,8 @@ i386_readin(const int fd, vm_offset_t dest, const size_t len) { if (dest + len >= memtop_copyin) { + printf("bios_extmem: 0x%x memtop_copyin: 0x%x memtop: 0x%x\n", + bios_extmem, memtop_copyin, memtop); errno = EFBIG; return(-1); }