Re: [PATCH] bug fix for x86_64 efi

2009-02-27 Thread Drew Rosen
I'd be happy to document errors and such if someone can recommend what  
the best path of target is.


Maya rendering doesn't actually touch the video cards (some of our  
linux systems don't even have video cards), and general usage servers  
don't care much so drivers for the systems aren't a huge concern as  
long as the systems don't crash.


i'll try to setup a dev system this weekend and get some feedback  
posted. are there any critical steps and/or locations for submitting  
data for this project that i should know? or just post on a web wiki  
and send an email?


thanks!!!



On Feb 21, 2009, at 8:54 PM, Peter Cros wrote:


Hi,

True we don't have any grub.efi Apple intel Xserve hardware tests so  
far, at the apple intel ubuntu forum, but the grub-efi test packages  
there could be used to test.
Seems you will need to get some current grub.efi test result to  
point to problems specific to the Xserve, sufficient to attract help  
at developer level.


There are also some graphics limitations (use of framebuffer driver)  
after EFI linux booting for other intel macs, might be important for  
your application.



On Sun, Feb 22, 2009 at 2:16 PM, Drew Rosen drew...@mac.com wrote:
Thanks for your interest in helping Peter. At first look, the ubuntu  
forum looks like we're seeing xserver info, but no one using  
MacIntel Xserve hardware to test grub. If you know anyone who could  
help us push thru what is causing the Xserve to not work like the  
MacIntel Mac Pro Desktops, I'M LOOKING FOR THAT PERSON...


Cheers.


On Feb 20, 2009, at 9:32 PM, Peter Cros wrote:


I am just  a  grub.efi user/tester/enthusiast.

I don't know the Xserve but some previous reports in this list of  
people getting grub.efi to boot on Xserve, and if so it will boot  
hd/usb linux on other Apple intel Macs with varying results .


There are some  grub.efi 64/32 bit test packages on ubuntuforums   
that you might try (include the patch) . Xserve results would be  
interesting.


grub2 EFI boot loader internal/external booting


On Sat, Feb 21, 2009 at 3:16 AM, Drew Rosen drew...@mac.com wrote:
Hi Peter / phcoder / all other grub gurus,

I've joined the grub-devel mail list while attempting to get  
MacIntel Xserves to boot linux. I work with a 3d Movie Effects  
company that has 25 MacIntel Xserves that are becoming close to as  
useful as paperweights because they can't run Maya at 64bit for  
rendering. (and we can't repurpose them as linux servers).


Any chance we can help test this patch in an xserve environment,  
and/or do you have any ideas that would help us?


Here's the most discouraging info I've received in my research to  
date:


The Xserve does not have BIOS compatibility, and so you'll need to  
boot through EFI. The Apple EFI implementation will not boot  
directly off ISO9660 media, so you'll need to find a way to get to  
the EFI console. You'll need a kernel configured with EFI support.  
There's no especially sensible way to get a working framebuffer on  
this hardware, so you'll need to work out what arguments need to be  
passed to your distribution's installer in order to get it to run  
over the serial port. elilo or grub-efi should be able to boot the  
kernel and initramfs.


I've been catologing my research at:
http://drewsta.com/xserve.html

Thanks!

Drew



On Feb 20, 2009, at 6:28 AM, Peter Cros wrote:

Tested the patch applied to rev 1996 for grub.efi 64 bit and 32  
bit, on Imac81 (4GB ram), MacBookPro41 (4GB and 2GB ram)   
MacBook21 (i386)

with Macosx 10.4 10.5, ubuntu810.
All good.

64bit Macs have other ongoing EFI problems with linux kernel  
initializtion and keyboard.



On Fri, Feb 20, 2009 at 2:12 AM, Bean bean12...@gmail.com wrote:
Hi,

This patch contains several important update for x86_64 efi:

1, Support memory larger than 2G.
2, Fix a bug in efi_call_6 that could cause chainloadering osx to  
fail.

3, Improve the method to detect frame buffer address and line length
in linux loader.

2009-02-19  Bean  bean12...@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  

Re: [PATCH] bug fix for x86_64 efi

2009-02-24 Thread Bean
Committed.

-- 
Bean


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] bug fix for x86_64 efi

2009-02-21 Thread Drew Rosen
Thanks for your interest in helping Peter. At first look, the ubuntu  
forum looks like we're seeing xserver info, but no one using MacIntel  
Xserve hardware to test grub. If you know anyone who could help us  
push thru what is causing the Xserve to not work like the MacIntel Mac  
Pro Desktops, I'M LOOKING FOR THAT PERSON...


Cheers.


On Feb 20, 2009, at 9:32 PM, Peter Cros wrote:


I am just  a  grub.efi user/tester/enthusiast.

I don't know the Xserve but some previous reports in this list of  
people getting grub.efi to boot on Xserve, and if so it will boot hd/ 
usb linux on other Apple intel Macs with varying results .


There are some  grub.efi 64/32 bit test packages on ubuntuforums   
that you might try (include the patch) . Xserve results would be  
interesting.


grub2 EFI boot loader internal/external booting


On Sat, Feb 21, 2009 at 3:16 AM, Drew Rosen drew...@mac.com wrote:
Hi Peter / phcoder / all other grub gurus,

I've joined the grub-devel mail list while attempting to get  
MacIntel Xserves to boot linux. I work with a 3d Movie Effects  
company that has 25 MacIntel Xserves that are becoming close to as  
useful as paperweights because they can't run Maya at 64bit for  
rendering. (and we can't repurpose them as linux servers).


Any chance we can help test this patch in an xserve environment, and/ 
or do you have any ideas that would help us?


Here's the most discouraging info I've received in my research to  
date:


The Xserve does not have BIOS compatibility, and so you'll need to  
boot through EFI. The Apple EFI implementation will not boot  
directly off ISO9660 media, so you'll need to find a way to get to  
the EFI console. You'll need a kernel configured with EFI support.  
There's no especially sensible way to get a working framebuffer on  
this hardware, so you'll need to work out what arguments need to be  
passed to your distribution's installer in order to get it to run  
over the serial port. elilo or grub-efi should be able to boot the  
kernel and initramfs.


I've been catologing my research at:
http://drewsta.com/xserve.html

Thanks!

Drew



On Feb 20, 2009, at 6:28 AM, Peter Cros wrote:

Tested the patch applied to rev 1996 for grub.efi 64 bit and 32  
bit, on Imac81 (4GB ram), MacBookPro41 (4GB and 2GB ram)  MacBook21  
(i386)

with Macosx 10.4 10.5, ubuntu810.
All good.

64bit Macs have other ongoing EFI problems with linux kernel  
initializtion and keyboard.



On Fri, Feb 20, 2009 at 2:12 AM, Bean bean12...@gmail.com wrote:
Hi,

This patch contains several important update for x86_64 efi:

1, Support memory larger than 2G.
2, Fix a bug in efi_call_6 that could cause chainloadering osx to  
fail.

3, Improve the method to detect frame buffer address and line length
in linux loader.

2009-02-19  Bean  bean12...@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.

--
Bean

___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel




--
Cros (pxw)


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel




--
Cros 

Re: [PATCH] bug fix for x86_64 efi

2009-02-21 Thread Peter Cros
Hi,

True we don't have any grub.efi Apple intel Xserve hardware tests so far, at
the apple intel ubuntu forum, but the grub-efi test packages there could be
used to test.
Seems you will need to get some current grub.efi test result to point to
problems specific to the Xserve, sufficient to attract help at developer
level.

There are also some graphics limitations (use of framebuffer driver) after
EFI linux booting for other intel macs, might be important for your
application.


On Sun, Feb 22, 2009 at 2:16 PM, Drew Rosen drew...@mac.com wrote:

 Thanks for your interest in helping Peter. At first look, the ubuntu forum
 looks like we're seeing xserver info, but no one using MacIntel Xserve
 hardware to test grub. If you know anyone who could help us push thru what
 is causing the Xserve to not work like the MacIntel Mac Pro Desktops, I'M
 LOOKING FOR THAT PERSON...
 Cheers.


 On Feb 20, 2009, at 9:32 PM, Peter Cros wrote:

 I am just  a  grub.efi user/tester/enthusiast.

 I don't know the Xserve but some previous reports in this list of people
 getting grub.efi to boot on Xserve, and if so it will boot hd/usb linux on
 other Apple intel Macs with varying results .

 There are some  grub.efi 64/32 bit test packages on ubuntuforums  that you
 might try (include the patch) . Xserve results would be interesting.

 grub2 EFI boot loader internal/external 
 bootinghttp://ubuntuforums.org/showthread.php?t=995704


 On Sat, Feb 21, 2009 at 3:16 AM, Drew Rosen drew...@mac.com wrote:

 Hi Peter / phcoder / all other grub gurus,
 I've joined the grub-devel mail list while attempting to get MacIntel
 Xserves to boot linux. I work with a 3d Movie Effects company that has 25
 MacIntel Xserves that are becoming close to as useful as paperweights
 because they can't run Maya at 64bit for rendering. (and we can't repurpose
 them as linux servers).

 Any chance we can help test this patch in an xserve environment, and/or do
 you have any ideas that would help us?

 Here's the most discouraging info I've received in my research to date:

 The Xserve does not have BIOS compatibility, and so you'll need to boot
 through EFI. The Apple EFI implementation will not boot directly off ISO9660
 media, so you'll need to find a way to get to the EFI console. You'll need a
 kernel configured with EFI support. There's no especially sensible way to
 get a working framebuffer on this hardware, so you'll need to work out what
 arguments need to be passed to your distribution's installer in order to get
 it to run over the serial port. elilo or grub-efi should be able to boot the
 kernel and initramfs.

 I've been catologing my research at:
 http://drewsta.com/xserve.html

 Thanks!

 Drew



 On Feb 20, 2009, at 6:28 AM, Peter Cros wrote:

 Tested the patch applied to rev 1996 for grub.efi 64 bit and 32 bit, on
 Imac81 (4GB ram), MacBookPro41 (4GB and 2GB ram)  MacBook21 (i386)
 with Macosx 10.4 10.5, ubuntu810.
 All good.

 64bit Macs have other ongoing EFI problems with linux kernel initializtion
 and keyboard.


 On Fri, Feb 20, 2009 at 2:12 AM, Bean bean12...@gmail.com wrote:

 Hi,

 This patch contains several important update for x86_64 efi:

 1, Support memory larger than 2G.
 2, Fix a bug in efi_call_6 that could cause chainloadering osx to fail.
 3, Improve the method to detect frame buffer address and line length
 in linux loader.

 2009-02-19  Bean  bean12...@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 

Re: [PATCH] bug fix for x86_64 efi

2009-02-20 Thread Peter Cros
Tested the patch applied to rev 1996 for grub.efi 64 bit and 32 bit, on
Imac81 (4GB ram), MacBookPro41 (4GB and 2GB ram)  MacBook21 (i386)
with Macosx 10.4 10.5, ubuntu810.
All good.

64bit Macs have other ongoing EFI problems with linux kernel initializtion
and keyboard.


On Fri, Feb 20, 2009 at 2:12 AM, Bean bean12...@gmail.com wrote:

 Hi,

 This patch contains several important update for x86_64 efi:

 1, Support memory larger than 2G.
 2, Fix a bug in efi_call_6 that could cause chainloadering osx to fail.
 3, Improve the method to detect frame buffer address and line length
 in linux loader.

 2009-02-19  Bean  bean12...@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.

 --
 Bean

 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 http://lists.gnu.org/mailman/listinfo/grub-devel




-- 
Cros (pxw)
___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] bug fix for x86_64 efi

2009-02-20 Thread Drew Rosen

Hi Peter / phcoder / all other grub gurus,

I've joined the grub-devel mail list while attempting to get MacIntel  
Xserves to boot linux. I work with a 3d Movie Effects company that has  
25 MacIntel Xserves that are becoming close to as useful as  
paperweights because they can't run Maya at 64bit for rendering. (and  
we can't repurpose them as linux servers).


Any chance we can help test this patch in an xserve environment, and/ 
or do you have any ideas that would help us?


Here's the most discouraging info I've received in my research to date:

The Xserve does not have BIOS compatibility, and so you'll need to  
boot through EFI. The Apple EFI implementation will not boot directly  
off ISO9660 media, so you'll need to find a way to get to the EFI  
console. You'll need a kernel configured with EFI support. There's no  
especially sensible way to get a working framebuffer on this hardware,  
so you'll need to work out what arguments need to be passed to your  
distribution's installer in order to get it to run over the serial  
port. elilo or grub-efi should be able to boot the kernel and initramfs.


I've been catologing my research at:
http://drewsta.com/xserve.html

Thanks!

Drew



On Feb 20, 2009, at 6:28 AM, Peter Cros wrote:

Tested the patch applied to rev 1996 for grub.efi 64 bit and 32 bit,  
on Imac81 (4GB ram), MacBookPro41 (4GB and 2GB ram)  MacBook21 (i386)

with Macosx 10.4 10.5, ubuntu810.
All good.

64bit Macs have other ongoing EFI problems with linux kernel  
initializtion and keyboard.



On Fri, Feb 20, 2009 at 2:12 AM, Bean bean12...@gmail.com wrote:
Hi,

This patch contains several important update for x86_64 efi:

1, Support memory larger than 2G.
2, Fix a bug in efi_call_6 that could cause chainloadering osx to  
fail.

3, Improve the method to detect frame buffer address and line length
in linux loader.

2009-02-19  Bean  bean12...@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.

--
Bean

___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel




--
Cros (pxw)


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] bug fix for x86_64 efi

2009-02-19 Thread Bean
Hi,

This patch contains several important update for x86_64 efi:

1, Support memory larger than 2G.
2, Fix a bug in efi_call_6 that could cause chainloadering osx to fail.
3, Improve the method to detect frame buffer address and line length
in linux loader.

2009-02-19  Bean  bean12...@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.

-- 
Bean
diff --git a/configure.ac b/configure.ac
index 7658c7a..fd89d30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -299,7 +299,16 @@ fi
 
 if test x$target_m64 = x1; then
   # Force 64-bit mode.
-  TARGET_CFLAGS=$TARGET_CFLAGS -m64
+  AC_CACHE_CHECK([whether option -mcmodel=large works], grub_cv_cc_mcmodel, [
+CFLAGS=-m64 -mcmodel=large
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+		  [grub_cv_cc_mcmodel=yes],
+		  [grub_cv_cc_mcmodel=no])
+  ])
+  if test x$grub_cv_cc_mcmodel = xno; then
+AC_MSG_ERROR([-mcmodel=large not supported, upgrade your gcc])
+  fi
+  TARGET_CFLAGS=$TARGET_CFLAGS -m64 -mcmodel=large
   TARGET_LDFLAGS=$TARGET_LDFLAGS -m64
 fi
 
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index 44b7d27..8c38fc9 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -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,