Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I know it's not legal and too dangerous, but just to know : what about the modification of the EFI firmware directly ? I'm wondering because I found this http://www.groths.org/?p=339

I have already tested and implemented that for MBP6,2 in a separate branch. My app is recompiled as an EFI Driver and added to the EFI Flash Filesystem. It gets automatically loaded and executed at bootup for any OS, EFI or not. I don't know if I should include it as a feature in the final release as it's a serious risk.
 
I have already tested and implemented that for MBP6,2 in a separate branch. My app is recompiled as an EFI Driver and added to the EFI Flash Filesystem. It gets automatically loaded and executed at bootup for any OS, EFI or not. I don't know if I should include it as a feature in the final release as it's a serious risk.

Just include a disclaimer !!! I don't think people whose need this utility are beginners.
 
I know it's not legal and too dangerous, but just to know : what about the modification of the EFI firmware directly ? I'm wondering because I found this http://www.groths.org/?p=339

I do not know what his present solution is like and if he has improved his skill level / changed his approach.

I personally would be very, very carefull with above programmer. He was advocating some TRIM enabler that initially was not a good solution (Grant Parnell pointed that out) and I did not like the way he was responding to having it pointed out. A programmer with an attitude like that would have been fired on the spot if I had employed him. (at one stage I had over 400 staff)
 
Well I've had a lot of luck today. I got Windows 7 64-bit SP1 running in EFI.

One quirk is that the Intel graphics card showed up after my first boot, then some how got selected as default, and Windows 7 didn't have video.

I've gone back to running Windows the using the mm 001f0290 60 -PCI command, then loading bootx64.efi, and it loads fine, so I just have to remember to disable the Intel graphics card if it gets selected.

The boot animation doesn't work for Windows, but that is the only thing that I doesn't work up to this point.

2rong9g.png


doq3ie.png
 
Last edited:
Out of curiosity, do you know of any way to make the integrated card work and disable the discrete GPU? I'd love to see more power savings in Windows, even if it's something that can only be selected at startup.

@d3vi1 (or anyone else who knows):
Would you mind telling how to use your tool? I'd love to test this out if anyone can explain it to me.
 
Out of curiosity, do you know of any way to make the integrated card work and disable the discrete GPU? I'd love to see more power savings in Windows, even if it's something that can only be selected at startup.
It already works in the application. You don't need to disable the discrete one, you just need to set the VGA regs on the integrated one and set the gMux to the integrated one too. This is my favorite usage scenario too because of two reasons:
1) NVidia Optimus can be made to work if the Intel board is the default one
2) Cuda, OpenCL and other similar ones can still be used on the discrete board even if you use the integrated one.
I didn't yet write the setup application for EFISetVGARegs, so you can't do that yet unless you write the binary device path manually in the DefaultVGACard NVRam variable, but the application obeys the variable.
@d3vi1 (or anyone else who knows):
Would you mind telling how to use your tool? I'd love to test this out if anyone can explain it to me.
I'll leave this to the public since I'm anyway a bit overcommitted right now. What I can promise you is that the final version (getting closer each day) will be easy to use with a nice setup application.
 
I know it's not legal and too dangerous, but just to know : what about the modification of the EFI firmware directly ? I'm wondering because I found this http://www.groths.org/?p=339

Now that it's morning, I can go into more detail with this:
1) It's legal as long as the user (the owner of the device) is responsible for the modification.
2) It's hard to explain to the users that they are buying an application that modifies the flash and that they take all responsibility over bricking their device (and voiding the warranty in the process). They are paying hard money to brick their device.
3) If the user updates his firmware, he would need to reinstall the application in the firmware.
The process would be the following:
a) I generate a EFI Firmware Volume containing the Boot DXE (Posts the OptionROM and sets the VGA regs and switches the gMux to the correct video card) and the Runtime DXE (provides the RS->QueryVariableInfo service) and possibly other goodies (say some not yet written filesystem drivers like NTFS, ExFAT, EXT4, ZFS, etc.).
b) The user runs the setup application that sets the correct NVRAM variables and adds the Firmware Volume as an EFI FFS File in main Firmware Volume.
c) When the machine reboots, the DXE dispatcher automatically loads the Boot DXE and the Runtime from the Firmware Volume and runs them DXE _BEFORE_ loading the BootPicker. As a result, you can run Windows Vista SP1+, 7 and 8 straight from the original DVD.

While the process is clear, I'm not sure on the risks and I think that we should test on all possible logic boards and have a white list in the Setup Application of the logic boards that have been tested successfully and are confirmed working, otherwise I will not attempt this. The problem is that testing this requires testing the app on ALL post 2008 Mac logic boards and firmware versions and a few months ago when I counted them it was more than 50 logic boards, each with 2 or more firmware versions.

I believe you can understand why I'm hesitating.

The good news is that the Flash on most Macs is half empty, so there's enough room for this.

Furthermore, this method could be used to replace the bootpicker on each mac with a "Lion Recovery" aware one and to add AirPort card booting to all Macs (basically add the Broadcom wireless DXE to them). There are a lot of things that could be improved by editing the flash. You could take down the start-up time on a lot of Macs, clean the flash of duplicate files (some Macs have two copies of the discrete Option ROM), improve the bootpicker with Lion Recovery and Airport support, etc.
 
That's why I ask : I felt that editing the firmware would be VERY useful !

For me 50 logicboards would not be so hard. But it would be necessary all devices have the latest firmware available. Maybe we should find some similarities between Mac's firmware. And after all, what's the problem if some Mac don't have the mod firmware (better than no-one) ?
 
That's why I ask : I felt that editing the firmware would be VERY useful !

For me 50 logicboards would not be so hard. But it would be necessary all devices have the latest firmware available. Maybe we should find some similarities between Mac's firmware. And after all, what's the problem if some Mac don't have the mod firmware (better than no-one) ?

Let's reopen the subject after 1.0. 50 Logicboards is hard because it implies either owning 50 Macs (€40.000-60.000 from EBay) or coordinating 50 testers willing to put their hardware to risk (very difficult to find for some configurations). For the each build the chances of bricking the Mac at the first try are 80%! If we could find a Mac logic board that has a relatively easily swap-able EEPROM chip, probably a modified Mac Mini, I would be much more willing to use it for testing. It would require to get a unibody Mac Mini, locate the EEPROM chip, replace it with a socket (beyond my skills) and have a chip with the original firmware and one for testing firmwares.
I believe you can understand why I'm hesitant to go into this for the initial version.
However the endless possibilities that are brought forward by this make it an attractive candidate for post-1.0. My personal dream would be to strip out the Intel, NVidia and AMD chipset and GPU drivers from an Apple firmware and put them in a Tiano Core 2.3 build with the added Apple bootpicker instead of the standard Tiano BDS. There's a lot of engineering in such a project, but I see it as a viable option for the mid future.

From what I can tell, Apple has a few things developed in-house that can be ported to another UEFI build, but most of the Firmware is the binary components from Intel/NVidia for the chipset, the CSM from Insyde and the rest from a late 2006 edition of Tiano Core (EFI 1.1).

If you want to look into this, you could attempt to modify a VirtualBox or QEMU UEFI firmware to include the Apple bootpicker and Apple components for CSM and others.
 
I too was able to get my Macbook 5,3 booted into efi - after following the correct autounattend.xml and integrating the Nvidia drivers (with imagex and dism). Also needed to set the PCI registers (using the shell.efi from refit - doesn't seem to correctly execute the startup.nsh, not sure what's going on there).

Only quirk is the brightness controls don't seem to work. I seem to remember this issue when I tried EFI booting in linux too.
 
If you want to look into this, you could attempt to modify a VirtualBox or QEMU UEFI firmware to include the Apple bootpicker and Apple components for CSM and others.

I didn't think it would be so difficult and dangerous ; so forget my post !
 
I had to re-install my iMac and just wondering if my re-install sheme is good :

1 - launch Windows installation

---> diskpart /clean

2 - reboot to MacOsX Inst.

--->APPLE EFI ( automatic and hided)
--->HFS+ (for install MacOsX later)

3 - reboot to Windows Inst.

---> create EFI (is this useful ?)
---> create MSR
---> create NTFS (for install Windows later)

... Do you have to create EFI / MSR manually OR just create NTFS and leave EFI / MSR in automatic ?)

4 - Use "mm pci command" (how to find mine ?)

5 - Install MacOSX Lion (?)

6 - Install Windows 7 SP1x64 (?)


Thanks for your help
 
The error comes from no detectable OS instances in the startup disk tab. The Control Panel doesn't know how to react to GPT-only partition tables.

The control panel doesn't work also when you use AHCI-hack with hybrid gpt-mbr disk. I think the hack write something in the very beginning of the "mbr table" to permit windows before it boot to launch ahci-drivers.

The resulting problem is the same as the EFI boot which launch directly the ahci-drivers ... with a control panel which doesn't work (even with a bootable CD in windows 8 and pure gpt disk).
 
Last edited:
Here's my progress of the day:

17" MacBook Pro (MBP 6,1, 256GB Crucial C300 SSD, 8GB RAM)
Using d3vi1's application of build date 11/4/11.

Goal: Get OSX Lion & Windows 7 64-bit SP1 running with EFI

So basically I started all over again...

1) I used Disk Utility on the OSX Lion USB drive I made to make 1 partition, GUID, and just Free Space.

2) Fired up the terminal, ran "diskutil zeroDisk disk0" to start with a truly clean slate (No need for TRIM here :D )

3) Quit Terminal, fired up Disk Utility again.

4) Partitioned into 2 equal partitions. 1st is HFS+ for OSX, 2nd was just Free Space, and again using GUID.

5) I installed OSX Lion, updated. It's working fine.

6) I then proceeded to install Windows 7 64-bit SP1 under EFI using d3vi1's instructions. Got it installed. I'm still having issues booting properly, noted below.

As part of the beta requirements, d3vi1 wants us to send us a dump of what his EFI application spits out when you run it. Well, I can't get it to work.

When I run his EFI Application, the USB drive flashes for a few seconds, indicating some activity, but then goes into standby where it pulsates (Sandisk). The command line just remains with a "_" meaning that it's busy. Capslock no longer works, so the computer is frozen.

When I put his application into fs0:EFI\Boot\ as bootx64.efi, Windows will boot fine, but the graphics does not show up properly. I've blindly navigated Windows, to shutdown. I can change the volume, and the volume "Blip" plays as it's changing. So it's running.

This time around, I smartly enabled remote desktop so I can see more of what is going on. When using his application, the Intel HD graphics card shows it's ugly head. From what I understand, d3vi1s application is supposed to block the Intel HD card from Windows for now, and configure the gMux, or the graphics card selector to switch to the nVidia card. It's not doing that in the 11/4/11 build.

Even if I disable the Intel HD card from the device manager, it will not work. The only way to get Windows to boot properly is to manually start it up using the "mm 001f0290 60 -PCI" command, and to manually launch the original fs0:\boot\bootx64.efi. In this case, the Windows boot animation shows up, and Windows 7 works as you would expect it to on a Bootcamped Mac. Screen brightness works.

To note though, when using d3vi1's application, Windows does boot; however, the boot animation is gone and is replaced by the gray boot screen, along with some black blocks, where I assume his application wrote something to the screen. Screen brightness controls do not work when using his application, but do work when manually booting Windows 7.
 
Well I've had a lot of luck today. I got Windows 7 64-bit SP1 running in EFI.

One quirk is that the Intel graphics card showed up after my first boot, then some how got selected as default, and Windows 7 didn't have video.

I've gone back to running Windows the using the mm 001f0290 60 -PCI command, then loading bootx64.efi, and it loads fine, so I just have to remember to disable the Intel graphics card if it gets selected.

The boot animation doesn't work for Windows, but that is the only thing that I doesn't work up to this point.

Image

Image

Congratulation on your success.

By the way, I cant see the glowing boot logo just like you since Windows 7 cant support VGA output. That is why people cant see windows 7 installation screen.
You cant use safe mode either, so just pray that you dont have to go into safe mode in future LOL.

By the way, I have couple questions regarding your success.

1. Have you integrated Geforce driver to your windows 7 installation?
If so,
2. Which version of driver have you used? and which tool to integrate driver?

3. Does your brightness control button (F1, F2) works after installing boot camp driver?

Cause mine(Macbook5,2) doesnt work what so ever.

I assume this is because I integrated geforce driver to windows and bootcamp control is not functioning properly due to this reason.

So, I thought about installing Bootcamp driver by SetupComplete.cmd but somehow it fails at the middle of installation and causes infinite reboot loop.
 
Congratulation on your success.

By the way, I cant see the glowing boot logo just like you since Windows 7 cant support VGA output. That is why people cant see windows 7 installation screen.
You cant use safe mode either, so just pray that you dont have to go into safe mode in future LOL.

By the way, I have couple questions regarding your success.

1. Have you integrated Geforce driver to your windows 7 installation?
If so,
2. Which version of driver have you used? and which tool to integrate driver?

3. Does your brightness control button (F1, F2) works after installing boot camp driver?

Cause mine(Macbook5,2) doesnt work what so ever.

I assume this is because I integrated geforce driver to windows and bootcamp control is not functioning properly due to this reason.

So, I thought about installing Bootcamp driver by SetupComplete.cmd but somehow it fails at the middle of installation and causes infinite reboot loop.


I'm also up and running with EFI on MacbookPro5,3, and am having the same brightness control issue. I integrated with the nvidia bootcamp 4.0 drivers (used imagex to mount the install.wim, and dism.exe to integrate the nvidia driver after doing an expand on the nvidia folder). I had no problem installing the boot camp drivers, though - of course I can't get into the control panel, but other keys work without issue.
 
I founded that my ATI Radeon HD 4850 has "EFI Manager Version = 01.00.383" and "Revision Rom = 113-B9110C-425" but what dos it mean ? Is it possible to update from ATI ?

I remember also that when I had my iMac 27' there was a specific "Graphics Firmware" to upgrade. Maybe it woud be useful to look into that to know how apple operate the communication between graphic card and screen and find something for this thread ?
 
Just curious, what's the latest build for d3vi1's application? The latest one I have is 11-04-2011.

As an update:
I tried Windows 7 64-bit SP1 on EFI Mode for a few days, but I ran into some really bad problems with it.

1) Blue Screen
I would occasionally get a Blue Screen. Unfortunately, auto-reset was on, and I was unable to catch the error code.

2) Random Freeze
This was the biggest problem. I could force the machine to freeze by trying to rate the computer using the WEI tool. It would freeze when doing the Media Decoding part.

Or... it would just freeze after a while for no apparent reason.

3) Bootcamp Manager was useless. No brightness controls. I also have been using Trackpad++ from powerplan7.com (I really love the features that both pieces of software bring to our Macs). With the Bootcamp Manager all fudged up, PowerPlan7 and Trackpad++ would not work.

Since I'm a bored college student right now, I've been playing with Windows 8. I tried Windows 8 in BIOS mode, and it seems to be working pretty well. I'm trying to get it working in EFI mode now. Since I have a dual-GPU MacBook Pro, I have to disable the other graphics card. I'm doing this on a clean SSD drive, so now I'm NOT getting the BCD error, but I am running into an error after the initial setup is complete (loading software onto SSD). I run into the problem when it's "Getting Devices Ready" at around 60% complete.

This has to be from the GPU... that's all I have.
 
I am very interested in the outcome of this thread. I have a Mac Pro 3,1 ready to test with. I would love to get a GPT install, as I have been searching for a way to do this type of intall for a long time. I boot multiple OSs and would love to have an EFI-only boot setup.
 
Well guys, I'm almost positive that the 5,1 is gonna have to wait for the app. I've spent most of the last 24 hours trying every single approach I could come up with, ended up with about 10 pages of notes. I'm sure I burned up half my flash drive's lifespan, but I now know that I can navigate the UEFI shell damn near blindly.

Long story short, I've got one more W7 Install that I put together left, but I couldn't even get a vanilla windows 8 install going in EFI mode, and that seems to be the one thing we're having the most success with. I went through pretty much every reasonable combination of PCI reg, crafty software, and shouting I could think of :)

If anyone else has had more success with a 5,1 - let me know. Otherwise it looks like we've got some catching up to do.
 
a christmas beta gift release ?

None... I don't travel for holidays with my development machine.

----------

I am very interested in the outcome of this thread. I have a Mac Pro 3,1 ready to test with. I would love to get a GPT install, as I have been searching for a way to do this type of intall for a long time. I boot multiple OSs and would love to have an EFI-only boot setup.

You might be out of luck if your firmware is not 64-bit enabled. I haven't yet tested on MacBook Pros. I am quite confident that IMac 9,1+, MBP5,1+, MBA1,1+, MM4,1+, MB5,1+ work and I suspect that MBP4,1 might work also, but for the Mac Pros, I have no clue. I think I could download a firmware and look it up but I don't have my system with me (where I have all the tools). A good start (though not necessarily enough) might be if your Mac has EFI64, which you can check with ioreg.
 
Well guys,blah blah blaha 5,1 - let me know. Otherwise it looks like we've got some catching up to do.


Just came back from my nap, and it looks like my final attempt worked. I spent almost 6 hours straight taking an untouched OEM iso of PROx64, packing in drivers and run-once's etc.

This time, it went from rEFIt all the way to desktop, but it was locked up. Back to the grind...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.