2009-02-24 Bean <bean123ch@gmail.com>
* configure.ac: Check for -mcmodel=large in x86_64 target. * include/grub/efi/api.h (efi_call_10): New macro. (efi_wrap_10): New function. * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro. (GRUB_PE32_REL_BASED_HIGH): Likewise. (GRUB_PE32_REL_BASED_LOW): Likewise. (GRUB_PE32_REL_BASED_HIGHLOW): Likewise. (GRUB_PE32_REL_BASED_HIGHADJ): Likewise. (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise. (GRUB_PE32_REL_BASED_SECTION): Likewise. (GRUB_PE32_REL_BASED_REL): Likewise. (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise. (GRUB_PE32_REL_BASED_DIR64): Likewise. (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise. * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation issue. * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix. (efi_wrap_10): New function. * kern/x86_64/efi/startup.S (codestart): Use relative addressing. * loader/efi/appleloader.c (devpath_5): Add support for late 2008 MB/MBP model (NV chipset). (devdata_devs): Add devpath_5 to the list. * load/i386/efi/linux.c (video_base): Remove variable. (RGB_MASK): New macro. (RGB_MAGIC): Likewise. (LINE_MIN): Likewise. (LINE_MAX): Likewise. (FBTEST_STEP): Likewise. (FBTEST_COUNT): Likewise. (fb_list): New variable. (grub_find_video_card): Remove function. (find_framebuf): New function. (grub_linux_setup_video): Use find_framebuf to get frame buffer and line length. * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation problem for x86_64.
This commit is contained in:
parent
74b21bee5c
commit
6e09b8b72e
11 changed files with 242 additions and 72 deletions
|
@ -1104,16 +1104,31 @@ typedef struct grub_efi_block_io grub_efi_block_io_t;
|
|||
#define efi_call_4(func, a, b, c, d) func(a, b, c, d)
|
||||
#define efi_call_5(func, a, b, c, d, e) func(a, b, c, d, e)
|
||||
#define efi_call_6(func, a, b, c, d, e, f) func(a, b, c, d, e, f)
|
||||
#define efi_call_10(func, a, b, c, d, e, f, g, h, i, j) func(a, b, c, d, e, f, g, h, i, j)
|
||||
|
||||
#else
|
||||
|
||||
#define efi_call_0(func) efi_wrap_0(func)
|
||||
#define efi_call_1(func, a) efi_wrap_1(func, (grub_uint64_t) a)
|
||||
#define efi_call_2(func, a, b) efi_wrap_2(func, (grub_uint64_t) a, (grub_uint64_t) b)
|
||||
#define efi_call_3(func, a, b, c) efi_wrap_3(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c)
|
||||
#define efi_call_4(func, a, b, c, d) efi_wrap_4(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, (grub_uint64_t) d)
|
||||
#define efi_call_5(func, a, b, c, d, e) efi_wrap_5(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, (grub_uint64_t) d, (grub_uint64_t) e)
|
||||
#define efi_call_6(func, a, b, c, d, e, f) efi_wrap_6(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, (grub_uint64_t) d, (grub_uint64_t) e, (grub_uint64_t) f)
|
||||
#define efi_call_0(func) \
|
||||
efi_wrap_0(func)
|
||||
#define efi_call_1(func, a) \
|
||||
efi_wrap_1(func, (grub_uint64_t) a)
|
||||
#define efi_call_2(func, a, b) \
|
||||
efi_wrap_2(func, (grub_uint64_t) a, (grub_uint64_t) b)
|
||||
#define efi_call_3(func, a, b, c) \
|
||||
efi_wrap_3(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c)
|
||||
#define efi_call_4(func, a, b, c, d) \
|
||||
efi_wrap_4(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, \
|
||||
(grub_uint64_t) d)
|
||||
#define efi_call_5(func, a, b, c, d, e) \
|
||||
efi_wrap_5(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, \
|
||||
(grub_uint64_t) d, (grub_uint64_t) e)
|
||||
#define efi_call_6(func, a, b, c, d, e, f) \
|
||||
efi_wrap_6(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, \
|
||||
(grub_uint64_t) d, (grub_uint64_t) e, (grub_uint64_t) f)
|
||||
#define efi_call_10(func, a, b, c, d, e, f, g, h, i, j) \
|
||||
efi_wrap_10(func, (grub_uint64_t) a, (grub_uint64_t) b, (grub_uint64_t) c, \
|
||||
(grub_uint64_t) d, (grub_uint64_t) e, (grub_uint64_t) f, (grub_uint64_t) g, \
|
||||
(grub_uint64_t) h, (grub_uint64_t) i, (grub_uint64_t) j)
|
||||
|
||||
grub_uint64_t EXPORT_FUNC(efi_wrap_0) (void *func);
|
||||
grub_uint64_t EXPORT_FUNC(efi_wrap_1) (void *func, grub_uint64_t arg1);
|
||||
|
@ -1131,6 +1146,12 @@ grub_uint64_t EXPORT_FUNC(efi_wrap_6) (void *func, grub_uint64_t arg1,
|
|||
grub_uint64_t arg2, grub_uint64_t arg3,
|
||||
grub_uint64_t arg4, grub_uint64_t arg5,
|
||||
grub_uint64_t arg6);
|
||||
grub_uint64_t EXPORT_FUNC(efi_wrap_10) (void *func, grub_uint64_t arg1,
|
||||
grub_uint64_t arg2, grub_uint64_t arg3,
|
||||
grub_uint64_t arg4, grub_uint64_t arg5,
|
||||
grub_uint64_t arg6, grub_uint64_t arg7,
|
||||
grub_uint64_t arg8, grub_uint64_t arg9,
|
||||
grub_uint64_t arg10);
|
||||
#endif
|
||||
|
||||
#endif /* ! GRUB_EFI_API_HEADER */
|
||||
|
|
|
@ -231,7 +231,16 @@ struct grub_pe32_fixup_block
|
|||
#define GRUB_PE32_FIXUP_ENTRY(type, offset) (((type) << 12) | (offset))
|
||||
|
||||
#define GRUB_PE32_REL_BASED_ABSOLUTE 0
|
||||
#define GRUB_PE32_REL_BASED_HIGH 1
|
||||
#define GRUB_PE32_REL_BASED_LOW 2
|
||||
#define GRUB_PE32_REL_BASED_HIGHLOW 3
|
||||
#define GRUB_PE32_REL_BASED_HIGHADJ 4
|
||||
#define GRUB_PE32_REL_BASED_MIPS_JMPADDR 5
|
||||
#define GRUB_PE32_REL_BASED_SECTION 6
|
||||
#define GRUB_PE32_REL_BASED_REL 7
|
||||
#define GRUB_PE32_REL_BASED_IA64_IMM64 9
|
||||
#define GRUB_PE32_REL_BASED_DIR64 10
|
||||
#define GRUB_PE32_REL_BASED_HIGH3ADJ 11
|
||||
|
||||
struct grub_pe32_symbol
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue