From owner-freebsd-ia64 Tue Jun 18 21:20:12 2002 Delivered-To: freebsd-ia64@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EE38437B40C for ; Tue, 18 Jun 2002 21:20:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g5J4K4U83572; Tue, 18 Jun 2002 21:20:04 -0700 (PDT) (envelope-from gnats) Date: Tue, 18 Jun 2002 21:20:04 -0700 (PDT) Message-Id: <200206190420.g5J4K4U83572@freefall.freebsd.org> To: freebsd-ia64@FreeBSD.org Cc: From: Marcel Moolenaar Subject: Re: ia64/39415: Bootloader assuming 8KB buffer when only 4KB is allocated Reply-To: Marcel Moolenaar Sender: owner-freebsd-ia64@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ia64/39415; it has been noted by GNATS. From: Marcel Moolenaar To: Espen Skoglund Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: ia64/39415: Bootloader assuming 8KB buffer when only 4KB is allocated Date: Tue, 18 Jun 2002 21:10:23 -0700 On Fri, Jun 14, 2002 at 10:32:58PM +0200, Espen Skoglund wrote: > > >Description: > > The AllocatePages() call in sys/boot/efi/libefi/elf_freebsd.c only > allocate one 4KB page. The bi_load() in sys/boot/efi/libefi/bootinfo.c, > however, assumes that 8KB has been allocated when stashing the EFI memory > map behind the bootinfo. This could lead to "interesting" behaviour > in certain (albeit probably unlikely) scenarios. Espen, It looks to me that rounding to a multiple of the EFI page size is more natural for an EFI application. I would probably fix bootinfo.c instead of elf_freebsd.c. A second reason for fixing bootinfo.c is that elf_freebsd.c works with arbitrary large bootinfo blocks, while bootinfo.c only works if the bootinfo block is smaller than 8KB. A second order fix would be to allocate enough; not just for the bootinfo blocks, but also for the memory map... Thoughts? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ia64" in the body of the message