Go Back   MacRumors Forums > Apple Systems and Services > Windows, Linux & Others on the Mac

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 2, 2009, 04:03 PM   #26
Infrared
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by xraydoc View Post
I seem to be unable to install Win 7 x64 or x86 at all on my Mac Pro (1,1). I get a "CD Type 1 or 2. Please select" message, or something to that extent, on screen which then becomes unresponsive.
Hmm, how curious. Not everyone seems to see that message.
I wonder if it is a difference in the machines or different ISO
images.
Infrared is offline   0 Reply With Quote
Old Jun 3, 2009, 08:06 PM   #27
msekeris
macrumors newbie
 
Join Date: Jun 2009
.

Last edited by msekeris; Sep 7, 2009 at 10:08 PM.
msekeris is offline   0 Reply With Quote
Old Jun 3, 2009, 11:40 PM   #28
VirtualRain
Thread Starter
macrumors 603
 
Join Date: Aug 2008
Location: Vancouver, BC
Quote:
Originally Posted by msekeris View Post
so did anyone actually got it working to boot a native EFI win7?
As someone pointed out above, Apple uses EFI 1.1 while Microsoft supports UEFI 2.1... it ain't gonna work without BIOS emulation.
__________________
tools: nMP for photography, rMBP for working, iPad for surfing, iPhone for communicating, Mac Mini for entertaining
Canon tools: 5D Mark III 24-105L/70-300L/35L/50L/85L for capturing
VirtualRain is offline   0 Reply With Quote
Old Jun 5, 2009, 01:08 PM   #29
areusche
macrumors regular
 
Join Date: Jun 2008
I think I am the odd duckling in this case. I installed Windows 7 using the EFI boot option.


I had to uninstall refit. Once I did that I held down the option key and it gave me three options to boot

Macintosh HD, Windows DVD, EFI BOOT (something to that affect)

I hit EFI and the installer proceeded to run without any problems. I'm using the 7 RC installer.
areusche is offline   0 Reply With Quote
Old Jun 5, 2009, 01:30 PM   #30
Infrared
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by areusche View Post
I think I am the odd duckling in this case. I installed Windows 7 using the EFI boot option.


I had to uninstall refit. Once I did that I held down the option key and it gave me three options to boot

Macintosh HD, Windows DVD, EFI BOOT (something to that affect)

I hit EFI and the installer proceeded to run without any problems. I'm using the 7 RC installer.
Sounds interesting, although I'm not convinced yet. I've heard similar
reports in the past, but the result in every case was not a native EFI
installation.

So, to be sure, can you check the partitioning scheme for the disk
you installed Windows on, please? Would be terribly nice if you could!

Instructions: right click on your system volume in Windows Explorer
(e.g. C:\ ), choose properties, choose the hardware tab, select the
correct disk and then choose properties again (phew!).


You should see something like this:

Click image for larger version

Name:	dsk.png
Views:	114
Size:	15.5 KB
ID:	174227

You might have click "Populate" to get the full details.

Thanks very much.

Last edited by Infrared; Jun 5, 2009 at 01:38 PM.
Infrared is offline   0 Reply With Quote
Old Jun 5, 2009, 04:07 PM   #31
areusche
macrumors regular
 
Join Date: Jun 2008
Infrared,

I couldn't populate the results in a normal boot environment for some reason. It might be something related to mac drive. I restarted in safe mode and i was able to get the info.

Here it is
\

hope that helps!
areusche is offline   0 Reply With Quote
Old Jun 5, 2009, 04:15 PM   #32
VirtualRain
Thread Starter
macrumors 603
 
Join Date: Aug 2008
Location: Vancouver, BC
Quote:
Originally Posted by areusche View Post
Infrared,

I couldn't populate the results in a normal boot environment for some reason. It might be something related to mac drive. I restarted in safe mode and i was able to get the info.

Here it is
\

hope that helps!
I believe that confirms you are using BIOS emulation as EFI would have created a GPT partitioned volume... This is MBR which is only supported by BIOS.

EDIT:

According to the Microsoft documentation the pre-requisites for EFI native boot would be...
- A GPT partitioned disk
- An install image of Vista SP1 x64 or Windows 7 x64 that's bootable with EFI
- UEFI firmware v2.1

The last one is the killer as it appears that Apple uses an older EFI firmware version (1.1)
__________________
tools: nMP for photography, rMBP for working, iPad for surfing, iPhone for communicating, Mac Mini for entertaining
Canon tools: 5D Mark III 24-105L/70-300L/35L/50L/85L for capturing
VirtualRain is offline   0 Reply With Quote
Old Jun 5, 2009, 04:16 PM   #33
Infrared
macrumors 65816
 
Infrared's Avatar
 
Join Date: Mar 2007
Quote:
Originally Posted by VirtualRain View Post
I believe that confirms you are using BIOS emulation as EFI would have created a GPT partitioned volume [...]
Indeed. Native EFI is GPT only, not MBR. Better luck next time
Infrared is offline   0 Reply With Quote
Old Jun 5, 2009, 05:06 PM   #34
areusche
macrumors regular
 
Join Date: Jun 2008
Quote:
Originally Posted by Infrared View Post
Indeed. Native EFI is GPT only, not MBR. Better luck next time
Well that stinks.

What are the benefits of an EFI native boot over BIOS again?

EDIT:After a quick look around it appears that EFI's support for GPT style partitions is it allows 2TB+ partitions. Neato!

Last edited by areusche; Jun 5, 2009 at 05:12 PM.
areusche is offline   0 Reply With Quote
Old Jun 5, 2009, 07:52 PM   #35
msekeris
macrumors newbie
 
Join Date: Jun 2009
.

Last edited by msekeris; Sep 7, 2009 at 10:11 PM.
msekeris is offline   0 Reply With Quote
Old Aug 11, 2011, 07:28 AM   #36
d3vi1
macrumors member
 
Join Date: May 2011
Location: Frankfurt am Main, Germany
It actually works for most recent Macs

I've recently managed to make Windows x64 boot in UEFI on MacBook Pro 6,2 and am working on making it work also on MacBook Pro 5,3. To check if your machine supports booting Windows in UEFI mode, boot the Windows installer and even if there's nothing (or junk) on the screen the caps lock key should still work. If it works it means that your machine supports it, booted successfully
but can't use the video card. It just needs a small EFI application to run before the Windows loader that makes the discrete video card usable . If anyone is interested, I am currently writing such an application and am looking for testers.

Is anyone interested in booting Windows in 17 seconds instead of 30 and having support for GPT partitions? If so, let me know via a private message. Please include the model of your Mac. I will select 3 testers for each 64bit EFI Mac model. I will ask for technical information about their Macs and expect feedback.
The prerequisites for testing are 30 minutes of work on your Mac and a bit of technical inclination.

The EFI version itself is ignored by Windows. The Windows boot loader doesn't really care if your EFI declares version 1.10 or 2.10. If you still want to change it, you can and it can be changed upon boot to any arbitrary number with the application below (to 2.1 in this case), but it is not the problem that makes Windows unusable:

#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>

EFI_STATUS EFIAPI UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
SystemTable->Hdr.Revision=((2 << 16 ) | 10);
return EFI_SUCCESS;
}
d3vi1 is offline   0 Reply With Quote
Old Aug 11, 2011, 09:02 AM   #37
MJL
Banned
 
Join Date: Jun 2011
I tried to install using a GPT partitioned disk using diskpart to prepare the disk and the partitions. Windows will not have a bar of it on my mid 2010 Mac mini, it redoes the partitioning in MBR and then carries on. No matter what I tried more than that. Even did a backup and then tried to restore on a GPT prepared hdd but no sir, won't do.

On my T61p (core 2 duo T7400 with 800 Mhz fsb) I get diskmark 2.2 figures that on average are less than on the mid 2010 Mac mini, there was a larger difference for the sequential reads . (This on the Intel SSD.)

Booting windows from the moment that I press the button on the back of the mini until I have all loaded takes ~ 34 - 35 seconds. (and this mini first checks the DVD) (big picture is the T61p, the small one mac mini) PS this is with Windows 7 64 bit (T61p has also 4 Gb RAM, same as the mini)
Attached Thumbnails
Click image for larger version

Name:	mac mini ssd.png
Views:	66
Size:	83.4 KB
ID:	298577   Click image for larger version

Name:	SSD fresh install.png
Views:	52
Size:	74.5 KB
ID:	298578  

Last edited by MJL; Aug 11, 2011 at 09:13 AM.
MJL is offline   0 Reply With Quote
Old Aug 11, 2011, 04:22 PM   #38
d3vi1
macrumors member
 
Join Date: May 2011
Location: Frankfurt am Main, Germany
Cool

Quote:
Originally Posted by MJL View Post
I tried to install using a GPT partitioned disk using diskpart to prepare the disk and the partitions. Windows will not have a bar of it on my mid 2010 Mac mini, it redoes the partitioning in MBR and then carries on. No matter what I tried more than that. Even did a backup and then tried to restore on a GPT prepared hdd but no sir, won't do.
That's because you booted in BIOS mode. For some unknown reason, Windows doesn't understand GPT in BIOS mode and only sees the MBR part (in case of a hybrid GPT partition table).
If booted in EFI mode, Windows will see the GPT only if it's not a Hybrid GPT. That is, only if the EFI Protective Partition of the MBR spans the whole disk! If it's a hybrid GPT partition layout, Windows will see it as an MBR disk and will refuse to install. Technically, there is no reason for Windows not to work on an MBR disk in EFI mode, but they chose not to allow it.

Quote:
Originally Posted by MJL View Post
On my T61p (core 2 duo T7400 with 800 Mhz fsb) I get diskmark 2.2 figures that on average are less than on the mid 2010 Mac mini, there was a larger difference for the sequential reads . (This on the Intel SSD.)
See my numbers in UEFI mode below. No IDE emulation, just plain SATA, that allows Windows to use SSD TRIM!

Quote:
Originally Posted by MJL View Post
Booting windows from the moment that I press the button on the back of the mini until I have all loaded takes ~ 34 - 35 seconds. (and this mini first checks the DVD) (big picture is the T61p, the small one mac mini) PS this is with Windows 7 64 bit (T61p has also 4 Gb RAM, same as the mini)
My SSD 2010 MBP boots a clean Windows 7 x64 in BIOS mode in 30-35 seconds and an UEFI installation in 17-20 seconds. The main difference comes from not loading the CSM (BIOS emulation).

Some screenshots:
1) System Information + Disk Properties (showing GPT partitioning) + SSD Controller drivers (showing native AHCI)
2) Disk Manager showing 5 GPT partitions (MBR can have only 4).
3) Crystal Disk Mark and Info showing SSD Trim and Apple SSD performance in UEFI mode.
Attached Thumbnails
Click image for larger version

Name:	Capture.jpg
Views:	358
Size:	322.5 KB
ID:	298636   Click image for larger version

Name:	Capture_partitions.jpg
Views:	277
Size:	195.7 KB
ID:	298637   Click image for larger version

Name:	SSDCaptureSATA.jpg
Views:	167
Size:	225.5 KB
ID:	298638  

d3vi1 is offline   0 Reply With Quote
Old Aug 20, 2011, 08:11 AM   #39
Sincci
macrumors regular
 
Join Date: Aug 2011
Location: Finland
I would love to test this one on my Macbook Pro 5,5. I currently have a 120GB Vertex 2 SSD + 500GB Hitachi HD on my Mac (only Win7 x64 in the SSD, OSX in the HD), but if it's needed, I can format/repartition my disks and reinstall both operating systems in order to have Windows booting in pure EFI and GPT mode.
Sincci is offline   0 Reply With Quote
Old Aug 21, 2011, 05:45 PM   #40
gggeek
macrumors newbie
 
Join Date: Aug 2011
@d3vi1: I would love to get to a gpt-only situation, as I currently have an osx+win7 combo on mbr/gpt and I am struggling to get linux onboard too (considering I use 2 partitions for windows, one for os and one for data).

Material: macbook pro beginning 2011, win 7 64bit sp1

My questions before embarking as tester are:
1. is there any chance to not have to reinstall everything (esp. the windows applications)?
2. now that my disk is gtp/mbr, are there tools to make it gpt-only?
3: did you try to get linux installed in pure gpt mode? do you know if it works?
4. will the 3 os recognize 5 partitions in pure gpt mode?

Bye
Gaetano
gggeek is offline   0 Reply With Quote
Old Aug 24, 2011, 04:37 AM   #41
matthewchng
macrumors newbie
 
Join Date: Aug 2011
EFI boot Win7 x64 on MBP6,2

Quote:
Originally Posted by d3vi1 View Post
...
If anyone is interested, I am currently writing such an application and am looking for testers.
...
This may be the answer to the long awaited enabling of the integrated GPU when using Win7 for a much better battery life on my MBP6,2. Some people suspects that the reason the integrated GPU is not visible to the OS is because of the BIOS emulation which does not expose it. Do you think so?
Fingers crossed. Available to perform testing if you need.

Subscribed to this thread.
matthewchng is offline   0 Reply With Quote
Old Aug 24, 2011, 08:50 PM   #42
nemomeansnobody
macrumors newbie
 
Join Date: Aug 2011
Thumbs up Awes0me!

Quote:
Originally Posted by d3vi1 View Post
I've recently managed to make Windows x64 boot in UEFI on MacBook Pro 6,2 and am working on making it work also on MacBook Pro 5,3.
Earlier models don't have the bits from the UEFI spec that Apple tagged on to their Intel EFI 1.x implementation. (To answer a lot of people's questions, the latest Apple EFI is neither EFI nor UEFI, I am not qualified to specifically outline the differences.) So don't bother checking.

Even earlier models like my first gen MBP don't even have 64bit EFI which is why their RAM is limited to what PAE can address. This was all the uproar when Snow Leopard debuted and people couldn't figure out why their 64bit cpu machines were unable to boot in LP64 mode. I'm surprised you guys don't remember this!

New EFI features were the MAIN reason why I waited until MBP 5,3 to upgrade. (Yes, I would love to test your code, d3vi1, on my machine. Were you thinking of making it into a full fledged EFI app? One could insert your code into the rEFIt source to make a very user-friendly solution.) A UI to toggle the GPU and "biosemulation" bits would be cool too.

d3vi1, was there any other initialization code required to compensate for Apple's EFI implementation or did you just flip the bits and it works OTB?

I love the fact VirtualRain setup this thread trying to do something outside of the box regardless of its support status. This is the kind of computing philosophy I grew up with and its good to see it still exists.

A lot of you guys seem to be really confused about what is going on here and thats totally cool. I suggest reading the OS X man page for bless, the wikipedia page for windows nt startup process, and probably the best resource is to install rEFIt, read the webpage, and finally poke around in the EFI shell. If you are worried about blowing things up, there is a SDK for Windows that lets you compile and run EFI apps in a sandbox.
nemomeansnobody is offline   0 Reply With Quote
Old Aug 24, 2011, 11:32 PM   #43
meian
macrumors newbie
 
Join Date: Aug 2011
Thumbs up

Quote:
Originally Posted by d3vi1 View Post
Is anyone interested in booting Windows in 17 seconds instead of 30 and having support for GPT partitions? If so, let me know via a private message. Please include the model of your Mac. I will select 3 testers for each 64bit EFI Mac model. I will ask for technical information about their Macs and expect feedback.
The prerequisites for testing are 30 minutes of work on your Mac and a bit of technical inclination.
Seems I can't PM you unless you befriend me here on the forum, so I'm going to message you here for the time being

I have a MacBookPro6,2 just like you (I hope that doesn't make me an uninteresting candidate for a tester!), and you can definitely consider me a technically inclined person I'm a computer scientist. I'd love to get Windows to cooperate with the handful of OSs I have installed on my MBP.


Cheers!
meian is offline   0 Reply With Quote
Old Aug 27, 2011, 06:23 AM   #44
TheMaxx32000
macrumors newbie
 
Join Date: Jun 2008
Quote:
Originally Posted by d3vi1 View Post
I've recently managed to make Windows x64 boot in UEFI on MacBook Pro 6,2 and am working on making it work also on MacBook Pro 5,3. To check if your machine supports booting Windows in UEFI mode, boot the Windows installer and even if there's nothing (or junk) on the screen the caps lock key should still work. If it works it means that your machine supports it, booted successfully
but can't use the video card. It just needs a small EFI application to run before the Windows loader that makes the discrete video card usable . If anyone is interested, I am currently writing such an application and am looking for testers.

Is anyone interested in booting Windows in 17 seconds instead of 30 and having support for GPT partitions? If so, let me know via a private message. Please include the model of your Mac. I will select 3 testers for each 64bit EFI Mac model. I will ask for technical information about their Macs and expect feedback.
The prerequisites for testing are 30 minutes of work on your Mac and a bit of technical inclination.

The EFI version itself is ignored by Windows. The Windows boot loader doesn't really care if your EFI declares version 1.10 or 2.10. If you still want to change it, you can and it can be changed upon boot to any arbitrary number with the application below (to 2.1 in this case), but it is not the problem that makes Windows unusable:

#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>

EFI_STATUS EFIAPI UefiMain (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
SystemTable->Hdr.Revision=((2 << 16 ) | 10);
return EFI_SUCCESS;
}
Hi d3vi1,

I used to do some coding back in the days, when we used to use injectors to enable graphics-drivers in os x for res-changing / qe /ci.

Also, these injectors helped people, using non EFI-ROM equipped graphics-cards in their Mac Pro systems.

The issue was, that Apples UGA-EFI-driver would not work without the correct Firmware on the card and therefore not provide the required settings to IORegistry (which would then be used by the OS's drivers to match and load).

Back to topic:

Using an EFI-Shell such as rEFIt, I already figured out, that the Win 7 setup will boot to a black screen just after it is switching from text- to graphics-mode, i.e. switching from 'loading files' to showing the windows animated-boot-logo.

Some details can be found in this PDF:

http://www.feishare.com/attachments/...quirements.pdf -> Boot Time Requirements -> Display at Boot Time.

I guess, what you are talking about is, to set some, injector-like, settings to get the windows drivers load and work correctly.

The biggest advantage for me, using a pure EFI environment, would be to have the SATA controller working in AHCI mode (whereas it is working in IDE / compatibility mode when using the BIOS emulation [CSM]), as well as some improved power-management functionality..

Count me in, if you're still working on this one (Using MBA 13" mid 2011 atm, also have a MBP 13" early 2011, so both use the Intel HD 3000..)

Cheers,
Max

PS: The reason Windows doesn't 'understand' GPT in BIOS-mode is because:

'Each GPT partition has a unique identification GUID and a partition content type, so no coordination is necessary to prevent partition identifier collision. Each GPT partition has a 36-character Unicode name. This means that any software can present a human-readable name for the partition without any additional understanding of the partition.'

And no BIOS out there, including the one provided by Apples CSM, has an implementation to read / handle / boot of these GUID-partitions in the GPT - therefore, windows just disables this ability.

EDIT: I read your article in http://blogs.technet.com/b/askcore/a...-computer.aspx. I really do like the idea of chainloading bootmgfw.efi after loading the correct option rom and mapping. On the downside, we need to dump the option rom for every single graphics-card and need to find correct mapping addresses for every model..

Last edited by TheMaxx32000; Aug 27, 2011 at 01:53 PM.
TheMaxx32000 is offline   0 Reply With Quote
Old Aug 27, 2011, 02:15 PM   #45
nemomeansnobody
macrumors newbie
 
Join Date: Aug 2011
Talking ty

Quote:
Originally Posted by TheMaxx32000 View Post
I used to do some coding back in the days, when we used to use injectors to enable graphics-drivers in os x for res-changing / qe /ci.

Using an EFI-Shell such as rEFIt, I already figured out, that the Win 7 setup will boot to a black screen just after it is switching from text- to graphics-mode, i.e. switching from 'loading files' to showing the windows animated-boot-logo.

Some details can be found in this PDF:

http://www.feishare.com/attachments/...quirements.pdf -> Boot Time Requirements -> Display at Boot Time.

I guess, what you are talking about is, to set some, injector-like, settings to get the windows drivers load and work correctly.

The biggest advantage for me, using a pure EFI environment, would be to have the SATA controller working in AHCI mode (whereas it is working in IDE / compatibility mode when using the BIOS emulation [CSM]
Totally awesome to have AHCI working in Windows.

Also, thank you Max for answering most of my questions with your pdf link. It is my understanding that Vista and 7 both support UGA and text-mode (for English language). That 7 also supports and prefers GOP in addition to UGA/text, and that Windows 8 will require GOP exclusively for EFI booting.

This is all just for the pre-NT kernel environment as the EFI equivalent of VESA. I don't know about with the Intel graphics but my EFI nVidia chip already has native driver support built into Windows by default, so I don't think this has anything to do with driver injection.

My first guess was that the Apple EFI simply wasn't correctly performing the EFI equivalent of the BIOS exporting tables. Then I read the link you posted and finally figured it out. It says that to EFI boot without GOP (UGA/text) a CSM is REQUIRED! Not a full BIOS emulation CSM necessarily from what I can tell, but emulation of INTERRUPT 10H is required or there will be no video before NT kernel loads native drivers, a latter stage one is unlikely to reach without first dealing with the former.
nemomeansnobody is offline   0 Reply With Quote
Old Aug 27, 2011, 02:36 PM   #46
TheMaxx32000
macrumors newbie
 
Join Date: Jun 2008
As d3vi1 wrote on

http://blogs.technet.com/b/askcore/a...-computer.aspx

we have two options:

-wait for MS to fix Win 7 to look for video devices by searching ACPI device-tree

-load a vga option rom suitable for your specific card, map the memory and afterwards start windows.

This makes it basically one option. As d3vi1 wrote in that article, the easiest way would be, to write a small EFI 'app', that loads PCI option ROM, maps memory and finally chainloads bootmgfw.efi to load windows
TheMaxx32000 is offline   0 Reply With Quote
Old Aug 27, 2011, 03:14 PM   #47
d3vi1
macrumors member
 
Join Date: May 2011
Location: Frankfurt am Main, Germany
Cool

Quote:
Originally Posted by nemomeansnobody View Post
Totally awesome to have AHCI working in Windows.

Also, thank you Max for answering most of my questions with your pdf link. It is my understanding that Vista and 7 both support UGA and text-mode (for English language). That 7 also supports and prefers GOP in addition to UGA/text, and that Windows 8 will require GOP exclusively for EFI booting.

This is all just for the pre-NT kernel environment as the EFI equivalent of VESA. I don't know about with the Intel graphics but my EFI nVidia chip already has native driver support built into Windows by default, so I don't think this has anything to do with driver injection.

My first guess was that the Apple EFI simply wasn't correctly performing the EFI equivalent of the BIOS exporting tables. Then I read the link you posted and finally figured it out. It says that to EFI boot without GOP (UGA/text) a CSM is REQUIRED! Not a full BIOS emulation CSM necessarily from what I can tell, but emulation of INTERRUPT 10H is required or there will be no video before NT kernel loads native drivers, a latter stage one is unlikely to reach without first dealing with the former.
Sorry for the long and late reply, I'm on a weekend on the seaside so I might not answer until Monday. This reply is highly technical. For the non-technical audience: the app is 50% done and you should expect it for testing by mid-september. For the ones that have touched PreOS programming, see below.

Actually it's Windows that's at fault not Apple. There are three parts of Windows that need to work:

1) PreOS Windows: bootmgfw.efi and winload.efi. Those require GOP, UGA or VGA (in this order) for localized versions or simple EFI text-output protocol for plain english (export LANG=C equivalent). They both mostly work. The text stuff is actually an emulated console over the graphics EFI. No fixes are required here since it just works.
2) GOP with precisely 1024x768 or 800x600 for the wavy flag logo. Here Windows kernel is absolutely idiotic since you should never make assumptions about the resolution. Apple offers only one GOP resolution, the LCD panel native resolution. On the other hand, we can live without the wavy flag if the rest works. A possible fix is the EFI Edid Override Protocol to force the GOP implementation to use 1024x768 by faking an LCD panel of that resolution.
This is easy to fix but not high on my priority list.
3) The windows GUI which requires drivers. This is a special chapter since this is the ultimate failure of EFI Windows. I understand (but haven't tested) that Windows.Next has this part solved.

The Windows GUI time drivers chapter (aka ultimate redmond failure):

a) In the installer, Windows will try to use any of the bundled drivers. That basically means for modern hardware (for which it has no bundled driver) only VGA. Since VGA is by design a BIOS-only protocol you can't have it in EFI unless you hack around it. Assuming VGA presence on a non-BIOS firmware (regardless of the architecture) is completely idiotic, yet it's what Microsoft expects. VGA implies int10h and VGA BIOS. VGA BIOS implies real mode (aka pre i386) execution of the Option ROM. You don't have Real Mode on a true 64bit firmware. Real mode can't even address over 4Gb.
b) Assuming that to work around that you do the install in unattended mode and bundle the video driver, it still won't work due to another assumption: the VGAE register (0x3E) on the parent pci-bridge. Even if you have the NVidia drivers, you won't see anything on the video card (remote desktop still works if you configured it) unless you get the video card in bus mastering, IO access (PCI Reg 0x04=7) and the parent PCI bridge with VGAE (PCI Reg 0x3E=8). If you go into device manager, the driver work correctly but there are no monitor instances connected to it. I've tried forcing a monitor, but no success. Windows should do those things for the ACTIVE video card (it has DevicePath protocol in EFI to determine it as well as ACPI). We can work around that by setting them in a pre bootloader app that chain loads the Windows boot loader.
c) If you do set those PCI registers (specific to your mac model), and afterwards load bootmgfw.efi it will work like a charm.

----

I wrote an app that does those things manually for my Mac, but I am missing a few things before it comes out. Since I can't expect the end user to use an unattended install with bundled drivers, I need to provide Windows with VGA.

I need to shadow the VGA ROM manually at 0xC0000 and set the correct int10h value (firmware_version/logicboard_model specific hardcoded in the app). On NVidia Chipset Macs it works as the memory address is R/W. On Intel MCH style chipsets (pre Core i7) I also need to unlock the ram address by setting a value of 0x30, 0x33, 0x33, 0x33, 0x33, 0x33 on 90h-96h on the PCI Root Bridge since the address range is RO. On PCH style chipsets (core i5/i7) since the memory controller is in the CPU I need to unlock that RAM range using the fixed range MTRR. I still have a bit of work in order to make that happen.

Furthermore, another part that I'm missing is the source of the VGA BIOS. On some macs the EFI firmware includes the option rom for both discrete and integrated, on others only for the discrete card. On some macs the EFI firmware shadows the option ROM and only a gBS->CopyMem(ShadowAddr, 0xC0000, RomSize) is required once I identify ShadowAddr and RomSize with the PciIo protocol. On other Macs it's not shadowed (for a presumably faster boot) so I need to use the Firmware Volume protocol to scan for RAW files in the EFI Firmware and select the correct one (0xAA 0x55 means it's a ROM, and there is a PCI Description Table in the rom that states for which vendor/device id it's supposed to work). One XServe models there is no Firmware version of the ROM so we need to read it from the disk. I currently only implemented the reading from the boot disk of a vbios.bin file with the ROM.

If anyone wants to test out using Windows in EFI, it's simple: boot using DUET from el-torrito to install it (Windows from USB stick method). Install the BootCamp drivers (while booting through DUET). After that you can boot using the EFI Shell to set the PCI regs (see the 'mm -PCI' command) and afterwards booting the bootmgfw.efi file. I can make a static build of the app that just sets the PCI registers specific to your mac and then loads the bootmgfw.efi file.

What Windows should have done is:
1) Support GOP or UGA for a frame buffer also after the wavy flag. You can't expect VGA in EFI as it's completely as it is being the first 3 letters in 'assumption'.
2) Not assume setting the PCI bus registers by the firmware or not requiring them at all. All the other OSs work without them. All PCI device drivers should set their own bus-mastering rules by themselves and windows should not care about VGAE when using a non-VGA driver.

Watch the thread as it's getting interesting. Technical folks that can get their hands dirty in EDK should give me a PM and we'll cary on over email. Now I'll get back to Jack, Lucky Strike, and naked blondes dancing around the fire. I've been a geek for too long.
d3vi1 is offline   1 Reply With Quote
Old Aug 27, 2011, 06:13 PM   #48
TheMaxx32000
macrumors newbie
 
Join Date: Jun 2008
Hi d3vi1,

thanks for this detailed description of what is going on. I already did a Win 7 unattended install but as you said, even with integrated drivers it won't show any graphical interface, as no monitors are detected.

What I did so far is to dump VGA option ROM from my MacBookAir4,2 (SandyBridge i5 integrated Intel HD 3000)

http://www.2shared.com/file/kre_osAJ/c0000.html

Could you provide me with your app / source-code so I can adjust the hardcoded values to match my system?

Gre aus Hamburg and have fun with the blondes

Max

Last edited by TheMaxx32000; Aug 28, 2011 at 05:37 AM.
TheMaxx32000 is offline   0 Reply With Quote
Old Aug 27, 2011, 10:13 PM   #49
nemomeansnobody
macrumors newbie
 
Join Date: Aug 2011
Lightbulb knowledge is power

Thank you d3vil for answering almost ALL of my questions. (Including ones I didn't even know to ask.) You are doing some excellent work. I had no idea EFI Windows was so horribly broken. I thought the main point of EFI was to kill off CPU specific option roms, dirty int hooks, and 128k limit that were introduced by IBM in 1984. I can tell you are the type of programmer that considers writing a specific bootstrap for every possible hardware configuration more of a hack/workaround than a fix/solution. That being said, I think you are quite possibly the best person for this job. Furthermore, so Windows just HAS to be shown the path to the video then? Thank god other operating systems can parse MCFG tables.. Does EFI change this somehow? I think this is possibly a result of the way Microsoft separates between the NT kernel, the HAL, and the video driver. Specifically Windows' legacy support for non-ACPI compliant systems. The thing is I was under the impression that as of DXGI 1.1
Quote:
IDXGIFactory1::EnumAdapters1 enumerates local adapter(s) without any monitors or outputs attached, as well as adapters(s) with outputs attached. The first adapter returned will be the local adapter on which the Desktop primary is displayed.
In NT 6.1 kernel mode drivers are supposedly bare bones, and enumerating DX9 and higher cards is supposed to happen in user mode, and DWM is supposed to kick in full-screen automagically on the first enumerated card completely independent from the OS and kernel drivers... Almost. To enable DWM Windows first has to write to VRAM. The way this is accomplished, as well as for crippled editions, or if any incompatible application is running Windows seems to fall back to the same old tech that was introduced in NT 4. I realize most of what I just said has nothing to do with this thread except for that I can't see long-term use of the VGA bios/option rom in the presence of alternate code-paths/stacks on a 64-bit system, with ACPI HAL, native drivers, PCI compatible bus, booting off EFI with EFI drivers, with the two exceptions of the "pretty" boot-splash and multi-lingual text console. Oh wait, d3vil already answered that one, it is because MS never wrote a simple GOP frame-buffer driver for NT. Another question I have is, shouldn't either the EFI or native drivers register the adapter as a bus-master, set the latency, and specify the DMA type (packet/common buffer)? Sorry, d3vil answered that one already too, with.. yes. (This is fault of Intel, nVidia, AMD no? Please correct me.)

To get to the point, the most important thing I've learned here today is that this project is NOT about Apple using incompatible non-standard firmware. This IS about Microsoft advertising UEFI support for Windows when it just is not there yet. (At least for general computing outside of the server room.) In fact, there is no way this is limited to Apple hardware. Windows 7 is going to come up short on any "true" UEFI platform.

d3vils VGA enabler app is probably the best solution for Windows 7/Vista SP1. Eventually it could include auto-detection of some kind to handle non-standard hardware configurations (upgraded Mac Pro) but will always require access to a compatible VGA bios for the setup at least, something not necessarily built into EFI adapter cards. Support for copying binary images of bios' into memory is really cool feature, but it requires the end-user to obtain the file which is not always legal to redistribute. It could also contain a method for setting the internal display mux on MacBook Pro models with integrated and discrete GPUs.

Hopefully MS is working on this for Windows 8 (Windows.Next). I may very well wait for that day to come as I only use Windows for gaming. While you guys are hard at work implementing what is essentially a custom CSM tailored to work around Microsofts broken EFI support without the waste and loss of features which plague full bios emulation, I will begin investigating the alternate route of writing the Windows drivers that should already be there and creating a modified Windows 7 install media. These two project ideas compliment each other nicely with minimal overlap in function.

p.s. I really have to wonder what kind of hacks MS has used under the hood for all of their previous multi-platform releases. Unfortunately due to the obscurity of (Alpha, MIPS, PowerPC, ARM, Itanium) editions means I will probably never know. I speculate this is one of the big factors behind Microsoft not selling the upcoming ARM port directly to customers, but only to the SoC builders to be modified and pre-installed on devices.
nemomeansnobody is offline   0 Reply With Quote
Old Aug 28, 2011, 12:34 AM   #50
nemomeansnobody
macrumors newbie
 
Join Date: Aug 2011
Question I just realized...

Most of the issues with the Linux crowd trying to EFI boot their macs seem to be:
  1. On nVidia macs with dual GPUs, the default state after boot is that the internal monitor is connected to the second adapter and not the primary.
  2. X.org drivers for Intel Graphics require a dump of the video bios just like your app.
Have any of your tests been with a single nVidia graphics adapter connected to single monitor? (Like an iMac or standard Mac Book.)

Since Maxx air did the same thing as your MBP (showed adapter but no monitor in device manager) this is probably nothing, but don't want to overlook something simple and make things extra complicated.

Edit: I found that Linux has added GOP/EFI Framebuffer support. Site1 Site2 I am reading the source and laying out the groundwork for a Windows driver in my mind.

Last edited by nemomeansnobody; Aug 28, 2011 at 01:18 AM.
nemomeansnobody is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Windows, Linux & Others on the Mac

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
MacBook Air 2013 is the first Mac that supports EFI booting on Windows natively Livewings MacBook Air 93 Aug 19, 2014 06:32 AM
Anyone booting Windows 7 x64 using EFI monkeybagel Mac Pro 28 Jul 18, 2014 09:45 AM
EFI (Bios Chip) Password/ iCloud PIN Voca MacBook Pro 6 Feb 23, 2014 10:03 AM
Booting Windows 7 on BootCamp with Areca RAID EFI BIOS Spacedust Mac Pro 4 Dec 15, 2012 10:06 AM
New 2012 Air & ML dual boot Win7, now booting directly to Win7 winston-smith Windows, Linux & Others on the Mac 3 Oct 22, 2012 11:09 AM

Forum Jump

All times are GMT -5. The time now is 07:46 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC