Second version of the patch (sent to grub-devel in 2008-01-29)
This commit is contained in:
parent
2c40cc7868
commit
c8298743f3
14 changed files with 36 additions and 32 deletions
|
@ -3,7 +3,6 @@
|
||||||
* geninit.sh: Call _init with a null argument.
|
* geninit.sh: Call _init with a null argument.
|
||||||
* configure.ac: Add ia64-efi target.
|
* configure.ac: Add ia64-efi target.
|
||||||
* Makefile.in (STRIP_FLAGS): Declare (overriden on ia64).
|
* Makefile.in (STRIP_FLAGS): Declare (overriden on ia64).
|
||||||
(RMKFILES): Add ia64-efi.rmk
|
|
||||||
* genmk.rb: Use STRIP_FLAGS for strip.
|
* genmk.rb: Use STRIP_FLAGS for strip.
|
||||||
* util/ia64/efi/grub-install.in: New file.
|
* util/ia64/efi/grub-install.in: New file.
|
||||||
* util/ia64/efi/pe32.h: New file.
|
* util/ia64/efi/pe32.h: New file.
|
||||||
|
|
|
@ -83,8 +83,7 @@ enable_grub_emu = @enable_grub_emu@
|
||||||
|
|
||||||
### General variables.
|
### General variables.
|
||||||
|
|
||||||
RMKFILES = $(addprefix conf/,common.rmk i386-pc.rmk powerpc-ieee1275.rmk \
|
RMKFILES = $(wildcard $(srcdir)/conf/*.rmk)
|
||||||
sparc64-ieee1275.rmk i386-efi.rmk ia64-efi.rmk)
|
|
||||||
MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
|
MKFILES = $(patsubst %.rmk,%.mk,$(RMKFILES))
|
||||||
|
|
||||||
PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \
|
PKGLIB = $(pkglib_IMAGES) $(pkglib_MODULES) $(pkglib_PROGRAMS) \
|
||||||
|
@ -98,13 +97,13 @@ MOSTLYCLEANFILES =
|
||||||
DISTCLEANFILES = config.status config.cache config.log config.h \
|
DISTCLEANFILES = config.status config.cache config.log config.h \
|
||||||
Makefile stamp-h include/grub/cpu include/grub/machine \
|
Makefile stamp-h include/grub/cpu include/grub/machine \
|
||||||
gensymlist.sh genkernsyms.sh
|
gensymlist.sh genkernsyms.sh
|
||||||
MAINTAINER_CLEANFILES = $(srcdir)/configure $(addprefix $(srcdir)/,$(MKFILES))
|
MAINTAINER_CLEANFILES = $(srcdir)/configure $(MKFILES)
|
||||||
|
|
||||||
# The default target.
|
# The default target.
|
||||||
all: all-local
|
all: all-local
|
||||||
|
|
||||||
### Include an arch-specific Makefile.
|
### Include an arch-specific Makefile.
|
||||||
$(addprefix $(srcdir)/,$(MKFILES)): %.mk: %.rmk genmk.rb
|
$(MKFILES): %.mk: %.rmk genmk.rb
|
||||||
if test "x$(RUBY)" = x; then \
|
if test "x$(RUBY)" = x; then \
|
||||||
touch $@; \
|
touch $@; \
|
||||||
else \
|
else \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* acpi.c - Display acpi. */
|
/* acpi.c - Display acpi tables. */
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2008 Free Software Foundation, Inc.
|
* Copyright (C) 2008 Free Software Foundation, Inc.
|
||||||
|
@ -23,20 +23,17 @@
|
||||||
|
|
||||||
static grub_uint32_t read16 (grub_uint8_t *p)
|
static grub_uint32_t read16 (grub_uint8_t *p)
|
||||||
{
|
{
|
||||||
return p[0] | (p[1] << 8);
|
return grub_le_to_cpu16 (*(grub_uint16_t *)p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static grub_uint32_t read32 (grub_uint8_t *p)
|
static grub_uint32_t read32 (grub_uint8_t *p)
|
||||||
{
|
{
|
||||||
return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
|
return grub_le_to_cpu32 (*(grub_uint32_t *)p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static grub_uint64_t read64 (grub_uint8_t *p)
|
static grub_uint64_t read64 (grub_uint8_t *p)
|
||||||
{
|
{
|
||||||
grub_uint32_t l, h;
|
return grub_le_to_cpu64 (*(grub_uint64_t *)p);
|
||||||
l = read32(p);
|
|
||||||
h = read32(p + 4);
|
|
||||||
return l | (((grub_uint64_t)h) << 32);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -20,6 +20,7 @@ pkgdata_DATA += kern/ia64/efi/elf_ia64_efi.lds
|
||||||
|
|
||||||
# For grub-elf2pe
|
# For grub-elf2pe
|
||||||
grub_elf2pe_SOURCES = util/ia64/efi/elf2pe.c
|
grub_elf2pe_SOURCES = util/ia64/efi/elf2pe.c
|
||||||
|
grub_elf2pe_CFLAGS = -DELF2PE_IA64
|
||||||
|
|
||||||
# For grub-emu.
|
# For grub-emu.
|
||||||
grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
|
grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
|
||||||
|
@ -27,8 +28,12 @@ grub_emu_SOURCES = commands/boot.c commands/cat.c commands/cmp.c \
|
||||||
commands/terminal.c commands/ls.c commands/test.c \
|
commands/terminal.c commands/ls.c commands/test.c \
|
||||||
commands/search.c commands/blocklist.c \
|
commands/search.c commands/blocklist.c \
|
||||||
disk/loopback.c \
|
disk/loopback.c \
|
||||||
fs/affs.c fs/ext2.c fs/fat.c fs/fshelp.c fs/hfs.c fs/iso9660.c \
|
\
|
||||||
fs/jfs.c fs/minix.c fs/sfs.c fs/ufs.c fs/xfs.c fs/hfsplus.c \
|
fs/affs.c fs/cpio.c fs/ext2.c fs/fat.c fs/hfs.c \
|
||||||
|
fs/hfsplus.c fs/iso9660.c fs/jfs.c fs/minix.c \
|
||||||
|
fs/ntfs.c fs/ntfscomp.c fs/reiserfs.c fs/sfs.c \
|
||||||
|
fs/ufs.c fs/xfs.c \
|
||||||
|
\
|
||||||
io/gzio.c \
|
io/gzio.c \
|
||||||
kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c \
|
kern/device.c kern/disk.c kern/dl.c kern/env.c kern/err.c \
|
||||||
normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
|
normal/execute.c kern/file.c kern/fs.c normal/lexer.c \
|
||||||
|
|
|
@ -88,10 +88,10 @@
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#undef PACKAGE_VERSION
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
/* The size of `long', as computed by sizeof. */
|
/* The size of a `long', as computed by sizeof. */
|
||||||
#undef SIZEOF_LONG
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
/* The size of `void *', as computed by sizeof. */
|
/* The size of a `void *', as computed by sizeof. */
|
||||||
#undef SIZEOF_VOID_P
|
#undef SIZEOF_VOID_P
|
||||||
|
|
||||||
/* Define it to either start or _start */
|
/* Define it to either start or _start */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2002,2003,2007 Free Software Foundation, Inc.
|
* Copyright (C) 2002,2003,2007,2008 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
|
/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
|
||||||
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2000, 2008 Free Software Foundation, Inc.
|
||||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* GRUB -- GRand Unified Bootloader
|
* GRUB -- GRand Unified Bootloader
|
||||||
* Copyright (C) 2007 Free Software Foundation, Inc.
|
* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* GRUB is free software: you can redistribute it and/or modify
|
* GRUB is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -23,15 +23,15 @@
|
||||||
.proc __ia64_trampoline
|
.proc __ia64_trampoline
|
||||||
.global __ia64_trampoline
|
.global __ia64_trampoline
|
||||||
__ia64_trampoline:
|
__ia64_trampoline:
|
||||||
// Read address of the real descriptor
|
/* Read address of the real descriptor. */
|
||||||
ld8 r2=[r1],8
|
ld8 r2=[r1],8
|
||||||
;;
|
;;
|
||||||
// Read chain
|
/* Read chain. */
|
||||||
ld8 r15=[r1]
|
ld8 r15=[r1]
|
||||||
// Read pc
|
/* Read pc. */
|
||||||
ld8 r3=[r2],8
|
ld8 r3=[r2],8
|
||||||
;;
|
;;
|
||||||
// Read gp
|
/* Read gp. */
|
||||||
ld8 r1=[r2]
|
ld8 r1=[r2]
|
||||||
mov b6=r3
|
mov b6=r3
|
||||||
br.many b6
|
br.many b6
|
||||||
|
|
|
@ -39,14 +39,16 @@
|
||||||
|
|
||||||
#define BOOT_PARAM_SIZE 16384
|
#define BOOT_PARAM_SIZE 16384
|
||||||
|
|
||||||
struct ia64_boot_param {
|
struct ia64_boot_param
|
||||||
|
{
|
||||||
grub_uint64_t command_line; /* physical address of command line. */
|
grub_uint64_t command_line; /* physical address of command line. */
|
||||||
grub_uint64_t efi_systab; /* physical address of EFI system table */
|
grub_uint64_t efi_systab; /* physical address of EFI system table */
|
||||||
grub_uint64_t efi_memmap; /* physical address of EFI memory map */
|
grub_uint64_t efi_memmap; /* physical address of EFI memory map */
|
||||||
grub_uint64_t efi_memmap_size; /* size of EFI memory map */
|
grub_uint64_t efi_memmap_size; /* size of EFI memory map */
|
||||||
grub_uint64_t efi_memdesc_size; /* size of an EFI memory map descriptor */
|
grub_uint64_t efi_memdesc_size; /* size of an EFI memory map descriptor */
|
||||||
grub_uint32_t efi_memdesc_version; /* memory descriptor version */
|
grub_uint32_t efi_memdesc_version; /* memory descriptor version */
|
||||||
struct {
|
struct
|
||||||
|
{
|
||||||
grub_uint16_t num_cols; /* number of columns on console output dev */
|
grub_uint16_t num_cols; /* number of columns on console output dev */
|
||||||
grub_uint16_t num_rows; /* number of rows on console output device */
|
grub_uint16_t num_rows; /* number of rows on console output device */
|
||||||
grub_uint16_t orig_x; /* cursor's x position */
|
grub_uint16_t orig_x; /* cursor's x position */
|
||||||
|
@ -61,7 +63,8 @@ struct ia64_boot_param {
|
||||||
grub_uint64_t modules_nbr;
|
grub_uint64_t modules_nbr;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ia64_boot_module {
|
struct ia64_boot_module
|
||||||
|
{
|
||||||
grub_uint64_t mod_start;
|
grub_uint64_t mod_start;
|
||||||
grub_uint64_t mod_end;
|
grub_uint64_t mod_end;
|
||||||
|
|
||||||
|
@ -71,7 +74,8 @@ struct ia64_boot_module {
|
||||||
grub_uint64_t next;
|
grub_uint64_t next;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct
|
||||||
|
{
|
||||||
grub_uint32_t revision;
|
grub_uint32_t revision;
|
||||||
grub_uint32_t reserved;
|
grub_uint32_t reserved;
|
||||||
void *fpswa;
|
void *fpswa;
|
||||||
|
|
|
@ -101,7 +101,7 @@ GRUB_MOD_FINI(linux_normal)
|
||||||
{
|
{
|
||||||
grub_unregister_command ("linux");
|
grub_unregister_command ("linux");
|
||||||
grub_unregister_command ("initrd");
|
grub_unregister_command ("initrd");
|
||||||
grub_unregister_command ("normal");
|
grub_unregister_command ("module");
|
||||||
grub_unregister_command ("relocate");
|
grub_unregister_command ("relocate");
|
||||||
grub_unregister_command ("fpswa");
|
grub_unregister_command ("fpswa");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1999, 2000, 2001, 2002, 2008 Free Software Foundation, Inc.
|
||||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
/* Copyright (C) 1999, 2000, 2001, 2002, 2008 Free Software Foundation, Inc.
|
||||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <elf.h>
|
#include <elf.h>
|
||||||
|
|
||||||
#if defined(i386)
|
#if defined(ELF2PE_I386)
|
||||||
#define USE_ELF32
|
#define USE_ELF32
|
||||||
#define USE_PE32
|
#define USE_PE32
|
||||||
#define ELF_MACHINE EM_386
|
#define ELF_MACHINE EM_386
|
||||||
#define EFI_MACHINE PE32_MACHINE_I386
|
#define EFI_MACHINE PE32_MACHINE_I386
|
||||||
#elif defined(__ia64__)
|
#elif defined(ELF2PE_IA64)
|
||||||
#define USE_ELF64
|
#define USE_ELF64
|
||||||
#define USE_PE32PLUS
|
#define USE_PE32PLUS
|
||||||
#define ELF_MACHINE EM_IA_64
|
#define ELF_MACHINE EM_IA_64
|
||||||
|
|
Loading…
Reference in a new issue