diff -rcN elilo/ia32/Makefile elilo-patch/ia32/Makefile *** elilo/ia32/Makefile 2004-02-17 15:42:40.000000000 -0800 --- elilo-patch/ia32/Makefile 2006-09-14 16:03:41.000000000 -0700 *************** *** 28,34 **** TOPDIR=$(CDIR)/.. ! FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o TARGET=sysdeps.o --- 28,34 ---- TOPDIR=$(CDIR)/.. ! FILES=system.o config.o bzimage.o plain_loader.o gzip_loader.o gzip.o multiboot.o TARGET=sysdeps.o diff -rcN elilo/ia32/mb_header.h elilo-patch/ia32/mb_header.h *** elilo/ia32/mb_header.h 1969-12-31 16:00:00.000000000 -0800 --- elilo-patch/ia32/mb_header.h 2006-09-14 16:03:41.000000000 -0700 *************** *** 0 **** --- 1,90 ---- + /* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2000 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + /* + * MultiBoot Header description + */ + + struct multiboot_header + { + /* Must be MULTIBOOT_MAGIC - see below. */ + unsigned magic; + + /* Feature flags - see below. */ + unsigned flags; + + /* + * Checksum + * + * The above fields plus this one must equal 0 mod 2^32. + */ + unsigned checksum; + + /* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */ + unsigned header_addr; + unsigned load_addr; + unsigned load_end_addr; + unsigned bss_end_addr; + unsigned entry_addr; + + /* These are only valid if MULTIBOOT_VIDEO_MODE is set. */ + unsigned mode_type; + unsigned width; + unsigned height; + unsigned depth; + }; + + /* + * The entire multiboot_header must be contained + * within the first MULTIBOOT_SEARCH bytes of the kernel image. + */ + #define MULTIBOOT_SEARCH 8192 + #define MULTIBOOT_FOUND(addr, len) \ + (! ((addr) & 0x3) \ + && (len) >= 12 \ + && *((int *) (addr)) == MULTIBOOT_MAGIC \ + && ! (*((unsigned *) (addr)) + *((unsigned *) (addr + 4)) \ + + *((unsigned *) (addr + 8))) \ + && (! (MULTIBOOT_AOUT_KLUDGE & *((int *) (addr + 4))) || (len) >= 32) \ + && (! (MULTIBOOT_VIDEO_MODE & *((int *) (addr + 4))) || (len) >= 48)) + + /* Magic value identifying the multiboot_header. */ + #define MULTIBOOT_MAGIC 0x1BADB002 + + /* + * Features flags for 'flags'. + * If a boot loader sees a flag in MULTIBOOT_MUSTKNOW set + * and it doesn't understand it, it must fail. + */ + #define MULTIBOOT_MUSTKNOW 0x0000FFFF + + /* currently unsupported flags... this is a kind of version number. */ + #define MULTIBOOT_UNSUPPORTED 0x0000FFF8 + + /* Align all boot modules on i386 page (4KB) boundaries. */ + #define MULTIBOOT_PAGE_ALIGN 0x00000001 + + /* Must pass memory information to OS. */ + #define MULTIBOOT_MEMORY_INFO 0x00000002 + + /* Must pass video information to OS. */ + #define MULTIBOOT_VIDEO_MODE 0x00000004 + + /* This flag indicates the use of the address fields in the header. */ + #define MULTIBOOT_AOUT_KLUDGE 0x00010000 diff -rcN elilo/ia32/mb_info.h elilo-patch/ia32/mb_info.h *** elilo/ia32/mb_info.h 1969-12-31 16:00:00.000000000 -0800 --- elilo-patch/ia32/mb_info.h 2006-09-14 16:03:41.000000000 -0700 *************** *** 0 **** --- 1,221 ---- + /* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2000,2003 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + + /* + * The structure type "mod_list" is used by the "multiboot_info" structure. + */ + + struct mod_list + { + /* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */ + unsigned long mod_start; + unsigned long mod_end; + + /* Module command line */ + unsigned long cmdline; + + /* padding to take it to 16 bytes (must be zero) */ + unsigned long pad; + }; + + + /* + * INT-15, AX=E820 style "AddressRangeDescriptor" + * ...with a "size" parameter on the front which is the structure size - 4, + * pointing to the next one, up until the full buffer length of the memory + * map has been reached. + */ + + struct AddrRangeDesc + { + unsigned long size; + unsigned long long BaseAddr; + unsigned long long Length; + unsigned long Type; + + /* unspecified optional padding... */ + } __attribute__ ((packed)); + + /* usable memory "Type", all others are reserved. */ + #define MB_ARD_MEMORY 1 + + + /* Drive Info structure. */ + struct drive_info + { + /* The size of this structure. */ + unsigned long size; + + /* The BIOS drive number. */ + unsigned char drive_number; + + /* The access mode (see below). */ + unsigned char drive_mode; + + /* The BIOS geometry. */ + unsigned short drive_cylinders; + unsigned char drive_heads; + unsigned char drive_sectors; + + /* The array of I/O ports used for the drive. */ + unsigned short drive_ports[0]; + }; + + /* Drive Mode. */ + #define MB_DI_CHS_MODE 0 + #define MB_DI_LBA_MODE 1 + + + /* APM BIOS info. */ + struct apm_info + { + unsigned short version; + unsigned short cseg; + unsigned long offset; + unsigned short cseg_16; + unsigned short dseg_16; + unsigned short cseg_len; + unsigned short cseg_16_len; + unsigned short dseg_16_len; + }; + + + /* + * MultiBoot Info description + * + * This is the struct passed to the boot image. This is done by placing + * its address in the EAX register. + */ + + struct multiboot_info + { + /* MultiBoot info version number */ + unsigned long flags; + + /* Available memory from BIOS */ + unsigned long mem_lower; + unsigned long mem_upper; + + /* "root" partition */ + unsigned long boot_device; + + /* Kernel command line */ + unsigned long cmdline; + + /* Boot-Module list */ + unsigned long mods_count; + unsigned long mods_addr; + + union + { + struct + { + /* (a.out) Kernel symbol table info */ + unsigned long tabsize; + unsigned long strsize; + unsigned long addr; + unsigned long pad; + } + a; + + struct + { + /* (ELF) Kernel section header table */ + unsigned long num; + unsigned long size; + unsigned long addr; + unsigned long shndx; + } + e; + } + syms; + + /* Memory Mapping buffer */ + unsigned long mmap_length; + unsigned long mmap_addr; + + /* Drive Info buffer */ + unsigned long drives_length; + unsigned long drives_addr; + + /* ROM configuration table */ + unsigned long config_table; + + /* Boot Loader Name */ + unsigned long boot_loader_name; + + /* APM table */ + unsigned long apm_table; + + /* Video */ + unsigned long vbe_control_info; + unsigned long vbe_mode_info; + unsigned short vbe_mode; + unsigned short vbe_interface_seg; + unsigned short vbe_interface_off; + unsigned short vbe_interface_len; + + /* EFI systab and acpi tab */ + unsigned long efi_systab; + unsigned long acpi_tab; + }; + + /* + * Flags to be set in the 'flags' parameter above + */ + + /* is there basic lower/upper memory information? */ + #define MB_INFO_MEMORY 0x00000001 + /* is there a boot device set? */ + #define MB_INFO_BOOTDEV 0x00000002 + /* is the command-line defined? */ + #define MB_INFO_CMDLINE 0x00000004 + /* are there modules to do something with? */ + #define MB_INFO_MODS 0x00000008 + + /* These next two are mutually exclusive */ + + /* is there a symbol table loaded? */ + #define MB_INFO_AOUT_SYMS 0x00000010 + /* is there an ELF section header table? */ + #define MB_INFO_ELF_SHDR 0x00000020 + + /* is there a full memory map? */ + #define MB_INFO_MEM_MAP 0x00000040 + + /* Is there drive info? */ + #define MB_INFO_DRIVE_INFO 0x00000080 + + /* Is there a config table? */ + #define MB_INFO_CONFIG_TABLE 0x00000100 + + /* Is there a boot loader name? */ + #define MB_INFO_BOOT_LOADER_NAME 0x00000200 + + /* Is there a APM table? */ + #define MB_INFO_APM_TABLE 0x00000400 + + /* Is there video information? */ + #define MB_INFO_VIDEO_INFO 0x00000800 + + /* + * The following value must be present in the EAX register. + */ + + #define MULTIBOOT_VALID 0x2BADB002 diff -rcN elilo/ia32/multiboot.c elilo-patch/ia32/multiboot.c *** elilo/ia32/multiboot.c 1969-12-31 16:00:00.000000000 -0800 --- elilo-patch/ia32/multiboot.c 2006-10-05 21:13:58.000000000 -0700 *************** *** 0 **** --- 1,375 ---- + /* + * This file is part of the ELILO, the EFI Linux boot loader. + * + * ELILO is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * ELILO is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with ELILO; see the file COPYING. If not, write to the Free + * Software Foundation, 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * Please check out the elilo.txt for complete documentation on how + * to use this program. + */ + + #include + #include + + #include "elilo.h" + #include "loader.h" + #include "elf.h" + #include "private.h" + #include "mb_header.h" + #include "mb_info.h" + + #define LD_NAME L"multiboot" + + int mbh_offset = -1; + + void *mbinfo; + struct multiboot_header *mbh; + static struct multiboot_info *mbi; + static struct mod_list mll[4]; + static struct AddrRangeDesc mb_mmap[128]; + + static int + mb_find_hoffset(char *buf, int size) + { + int i; + + for (i = 0; i < size; i += 4) { + if (MULTIBOOT_FOUND((int) (buf + i), size - i)) { + return (i); + } + } + return (-1); + } + + static void + mb_fill_mbheader(kdesc_t *kd) + { + if (mbh == 0) { + Print(L"mb_fill_mbheader: unknown header location\n"); + return; + } + + mbh->load_addr = (int) kd->kstart; + mbh->bss_end_addr = (int) kd->kend; + } + + int + mb_fill_mbinfo(CHAR8 *cmdline, memdesc_t *initrd) + { + UINTN desc_size, i, nentries, mapkey; + UINT32 desc_vers; + EFI_MEMORY_DESCRIPTOR *MemoryMap, *map_entry; + void *tab = NULL; + EFI_GUID acpi_guid = ACPI_TABLE_GUID; + EFI_GUID acpi_20_guid = ACPI_20_TABLE_GUID; + + /* make sure it's a multiboot image */ + if (mbh_offset == -1) + return (-1); + + if (mbi == NULL) + mbinfo = mbi = alloc(sizeof (*mbi), EfiLoaderData); + + /* we only care about cmdline, mmap, and mod_addr */ + mbi->flags = (MB_INFO_CMDLINE | MB_INFO_BOOT_LOADER_NAME | + MB_INFO_MEM_MAP | MB_INFO_MODS); + + mbi->cmdline = (int) cmdline; + mbi->boot_loader_name = (int)"ELILO"; + + /* use initrd as module */ + mbi->mods_count = 1; + mbi->mods_addr = (int) mll; + mll[0].cmdline = (int) "dummy"; + mll[0].mod_start = (int) initrd->start_addr; + mll[0].mod_end = (int) initrd->start_addr + initrd->size - 1; + + /* XXX see if we can use system from kernel */ + mbi->efi_systab = (int) systab; + Print(L"system tab at 0x%x\n", systab); + + /* find ACPI table location */ + if (LibGetSystemConfigurationTable(&acpi_20_guid, &tab) == EFI_SUCCESS) + Print(L"ACPI 2.0 table at 0x%x\n", tab); + else if (LibGetSystemConfigurationTable(&acpi_guid, &tab) + == EFI_SUCCESS) + Print(L"ACPI table at 0x%x\n", tab); + else + Print(L"ACPI table not found\n"); + mbi->acpi_tab = (int) tab; + + /* get memory map and conver to multiboot format */ + MemoryMap = LibMemoryMap(&nentries, &mapkey, &desc_size, &desc_vers); + map_entry = MemoryMap; + if (nentries > 128) { + Print(L"Too many entries %d in map\n", nentries); + nentries = 128; + } + for (i = 0; i < nentries; i++) { + mb_mmap[i].size = 20; /* 8 + 8 + 4 */ + mb_mmap[i].BaseAddr = map_entry->PhysicalStart; + mb_mmap[i].Length = + ((map_entry->NumberOfPages) << EFI_PAGE_SHIFT); + if (map_entry->Type > 1 && map_entry->Type <= 7) + mb_mmap[i].Type = 1; /* RAM */ + else + mb_mmap[i].Type = map_entry->Type; + map_entry = NextMemoryDescriptor(map_entry, desc_size); + } + + mbi->mmap_addr = (int) mb_mmap; + mbi->mmap_length = nentries * 24; + + return (0); + } + + static INTN + mb_probe(CHAR16 *kname) + { + EFI_STATUS status; + INTN ret = -1; + fops_fd_t fd; + char buf[MULTIBOOT_SEARCH]; + UINTN size = MULTIBOOT_SEARCH; + + status = fops_open(kname, &fd); + if (EFI_ERROR(status)) + return -1; + + status = fops_read(fd, buf, &size); + if (EFI_ERROR(status) || size != MULTIBOOT_SEARCH) + goto error; + + mbh_offset = mb_find_hoffset(buf, size); + if (mbh_offset != -1) { + ret = 0; + Print(L"Multiboot image found, header offset at 0x%x\n", + mbh_offset); + } + + error: + fops_close(fd); + return ret; + } + + + static INTN + load_multiboot(fops_fd_t fd, kdesc_t *kd) + { + Elf32_Ehdr ehdr; + Elf32_Phdr *phdrs; + EFI_STATUS status; + INTN ret = ELILO_LOAD_ERROR; + UINTN i, total_size = 0; + UINTN pages, size, bss_sz, osize; + VOID *low_addr = (VOID *)~0; + VOID *max_addr = (VOID *)0; + UINTN paddr, memsz, filesz; + UINT16 phnum; + + size = sizeof(ehdr); + + status = fops_read(fd, &ehdr, &size); + if (EFI_ERROR(status) || size < sizeof(ehdr)) + return ELILO_LOAD_ERROR; + + #if 0 + if (is_valid_header(&ehdr) == -1) { + ERR_PRT((L"%s : not a 32-bit ELF image\n", LD_NAME)); + return ELILO_LOAD_ERROR; + } + #endif + VERB_PRT(3, { + Print(L"ELF Header information: \n"); + Print(L"\tEntry point 0x%x\n", (ehdr.e_entry & PADDR_MASK)); + Print(L"\t%d program headers\n", ehdr.e_phnum); + Print(L"\t%d segment headers\n", ehdr.e_shnum); + }); + + phnum = ehdr.e_phnum; + + if (fops_seek(fd, ehdr.e_phoff) < 0) { + ERR_PRT((L"%s : seek to %d for phdrs failed", LD_NAME, ehdr.e_phoff)); + return ELILO_LOAD_ERROR; + } + size = osize = (phnum * sizeof(Elf32_Phdr)); + + DBG_PRT((L"%s : allocate %d bytes for %d pheaders each of size:%d phentsize=%d\n", + LD_NAME, size, phnum, sizeof(Elf32_Phdr), ehdr.e_phentsize)); + + phdrs = (Elf32_Phdr *)alloc(size, 0); + if (phdrs == NULL) { + ERR_PRT((L"%s : allocate for phdrs failed", LD_NAME)); + return ELILO_LOAD_ERROR; + } + status = fops_read(fd, phdrs, &size); + if (EFI_ERROR(status) || size != osize) { + ERR_PRT((L"%s : phdr load failed", LD_NAME, status)); + goto out; + } + /* + * First pass to figure out total memory footprint + */ + for (i = 0; i < phnum; i++) { + + paddr = (phdrs[i].p_paddr & PADDR_MASK); + memsz = phdrs[i].p_memsz; + + DBG_PRT((L"Phdr %d paddr [0x%x-0x%x] offset 0x%x" + " filesz 0x%x memsz=0x%x bss_sz=0x%x p_type=0x%x\n", + 1+i, paddr, paddr+phdrs[i].p_filesz, phdrs[i].p_offset, + phdrs[i].p_filesz, memsz, + (memsz - phdrs[i].p_filesz), phdrs[i].p_type)); + + if (phdrs[i].p_type != PT_LOAD) + continue; + if (paddr < (UINTN)low_addr) + low_addr = (VOID *)paddr; + if (paddr + memsz > (UINTN)max_addr) + max_addr = (VOID *)paddr + memsz; + + /* check if multiboot header is in this segment */ + if (mbh_offset >= phdrs[i].p_offset && + mbh_offset < phdrs[i].p_offset + phdrs[i].p_filesz) + mbh = (struct multiboot_header *)(phdrs[i].p_vaddr + + phdrs[i].p_offset - mbh_offset); + } + + if ((UINTN)low_addr & (EFI_PAGE_SIZE - 1)) { + ERR_PRT((L"%s : kernel low address 0x%x not page aligned\n", + LD_NAME, low_addr)); + goto out; + } + /* how many bytes are needed to hold the kernel? */ + total_size = (UINTN)max_addr - (UINTN)low_addr; + + /* round up to get required number of pages */ + pages = EFI_SIZE_TO_PAGES(total_size); + + /* keep track of location where kernel starts and ends */ + kd->kstart = low_addr; + kd->kend = (low_addr + (pages << EFI_PAGE_SHIFT)); + kd->kentry = (VOID *)(ehdr.e_entry & PADDR_MASK); + + VERB_PRT(3, { + Print(L"Lowest PhysAddr: 0x%x\nTotalMemSize:%d bytes (%d pages)\n", + low_addr, total_size, pages); + Print(L"Kernel entry @ 0x%x\n", kd->kentry); + }); + + /* now allocate memory for the kernel at the exact requested spot */ + if (alloc_kmem(low_addr, pages) == -1) { + ERR_PRT((L"%s : AllocatePages(%d, 0x%lx) for kernel failed\n", + LD_NAME, pages, low_addr)); + ERR_PRT((L"%s : Could not alloc %d pages for the kernel at 0x%lx " + " and relocation is not not been implemented!\n", + LD_NAME, pages, low_addr)); + goto load_abort; + } + /* Pure paranoia. Clear the memory first. Just in case... */ + Memset(low_addr, 0, (pages << EFI_PAGE_SHIFT)); + + VERB_PRT(1, Print(L"Press any key to interrupt\n")); + + /* + * Walk through the program headers + * and actually load data into physical memory + */ + + for (i = 0; i < phnum; i++) { + + /* Check for pure loadable segment; ignore if not loadable */ + if (phdrs[i].p_type != PT_LOAD) + continue; + + VERB_PRT(3, Print(L"poffs: 0x%x (phdrs[%d].p_offset)\n", + phdrs[i].p_offset, i)); + + filesz = phdrs[i].p_filesz; + low_addr = (VOID *)((UINTN) phdrs[i].p_paddr & PADDR_MASK); + + /* Move to the right position */ + if (fops_seek(fd, phdrs[i].p_offset) < 0) + goto out_kernel; + + /* How many BSS bytes to clear */ + bss_sz = phdrs[i].p_memsz - filesz; + + VERB_PRT(4, { + Print(L"\nHeader #%d\n", i); + Print(L"Offset in file 0x%x\n", phdrs[i].p_offset); + Print(L"Physical addr 0x%x\n", low_addr); + Print(L"BSS size 0x%x bytes\n", bss_sz); + }); + + /* + * Read actual segment into memory + */ + ret = fops_read(fd, low_addr, &filesz); + if (ret == ELILO_LOAD_ABORTED) goto load_abort; + if (ret == ELILO_LOAD_ERROR) goto out; + + /* + * Clear bss section + */ + if (bss_sz) + Memset((VOID *)low_addr+filesz, 0, bss_sz); + } + + free(phdrs); + + mb_fill_mbheader(kd); + + Print(L"..Done\n"); + return ELILO_LOAD_SUCCESS; + + load_abort: + Print(L"..Aborted\n"); + ret = ELILO_LOAD_ABORTED; + out_kernel: + /* free kernel memory */ + free_kmem(); + out: + free(phdrs); + return ret; + } + + static INTN + mb_load_kernel(CHAR16 *kname, kdesc_t *kd) + { + INTN ret; + fops_fd_t fd; + EFI_STATUS status; + + /* + * Moving the open here simplifies the load_multiboot() error handling + */ + status = fops_open(kname, &fd); + if (EFI_ERROR(status)) return ELILO_LOAD_ERROR; + + Print(L"Loading %s...", kname); + + ret = load_multiboot(fd, kd); + + fops_close(fd); + return ret; + } + + loader_ops_t multiboot_loader={ + NULL, + LD_NAME, + mb_probe, + mb_load_kernel + }; diff -rcN elilo/ia32/sysdeps.h elilo-patch/ia32/sysdeps.h *** elilo/ia32/sysdeps.h 2004-02-17 15:42:41.000000000 -0800 --- elilo-patch/ia32/sysdeps.h 2006-09-14 16:03:41.000000000 -0700 *************** *** 333,343 **** --- 333,354 ---- static inline void start_kernel(VOID *kentry, boot_params_t *bp) { + extern int mbh_offset; + extern void *mbinfo; + /* * Disable interrupts. */ asm volatile ( "cli" : : ); + if (mbh_offset) { + asm volatile ( "movl %0, %%ebx" : :"m" (mbinfo)); + asm volatile ( "movl %0, %%ecx" : :"m" (kentry)); + asm volatile ( "movl $0x2BADB002, %%eax" : : ); + asm volatile ( "call *%%ecx" : : ); + /*NOT REACHED*/ + } else { + /* * Relocate initrd, if present. */ *************** *** 395,400 **** --- 406,412 ---- */ asm volatile ( "jmp *%%ecx" : : ); + } } typedef struct sys_img_options { diff -rcN elilo/ia32/system.c elilo-patch/ia32/system.c *** elilo/ia32/system.c 2005-12-01 13:42:59.000000000 -0800 --- elilo-patch/ia32/system.c 2006-09-14 16:03:41.000000000 -0700 *************** *** 35,41 **** #include "loader.h" #include "rmswitch.h" ! extern loader_ops_t bzimage_loader, plain_loader, gzip_loader; /* * Descriptor table base addresses & limits for Linux startup. --- 35,41 ---- #include "loader.h" #include "rmswitch.h" ! extern loader_ops_t bzimage_loader, plain_loader, gzip_loader, multiboot_loader; /* * Descriptor table base addresses & limits for Linux startup. *************** *** 109,119 **** --- 109,121 ---- /* * Register our loader(s)... + * XXX order matters, multiboot is a subset of plain */ loader_register(&bzimage_loader); loader_register(&plain_loader); loader_register(&gzip_loader); + loader_register(&multiboot_loader); return 0; } *************** *** 189,194 **** --- 191,199 ---- return -1; } + if (mb_fill_mbinfo(cmdline, initrd) == 0) + goto cookie; + /* * Copy temporary boot sector and setup data storage to * elilo allocated boot parameter storage. We only need *************** *** 488,493 **** --- 493,499 ---- bp->s.vesa_seg = 0; bp->s.vesa_off = 0; + cookie: /* * Get memory map description and cookie for ExitBootServices() */ diff -rcN elilo/Make.defaults elilo-patch/Make.defaults *** elilo/Make.defaults 2004-03-10 14:04:41.000000000 -0800 --- elilo-patch/Make.defaults 2006-09-14 16:03:41.000000000 -0700 *************** *** 53,62 **** # Indicate where the EFI include and libaries are. # They are installed as part of the GNU-EFI package installation # ! EFIINC = /usr/include/efi ! GNUEFILIB = /usr/lib ! EFILIB = /usr/lib ! EFICRT0 = /usr/lib CDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) TOPDIR = --- 53,63 ---- # Indicate where the EFI include and libaries are. # They are installed as part of the GNU-EFI package installation # ! EFIROOT = /export/home/szhou/EFI/gnu-efi-3.0c ! EFIINC = $(EFIROOT)/inc ! GNUEFILIB = $(EFIROOT)/gnuefi ! EFILIB = $(EFIROOT)/lib ! EFICRT0 = $(EFIROOT)/gnuefi CDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) TOPDIR =