Win7 x64 booting natively via EFI (no BIOS emulation)

Discussion in 'Windows, Linux & Others on the Mac' started by VirtualRain, May 4, 2009.

  1. mark1234 macrumors member

    Joined:
    Sep 2, 2011
    Location:
    Amsterdam, the Netherlands
    #501
    I have a Mac Mini Model 2011 with built-in Intel Graphics.

    I have found the VGA controller on Bus-Dev-Func = 00 02 00.

    Furthermore, I have noticed that the PCI Command register of the VGA controller has already the value 7, so I do not need to set it again.

    However, I am having trouble finding the corresponding Parent PCI bridge.
    I have found 12 PCI Bridge Devices with the following 'values':

    Code:
    (Bus Numbers)
    Primary(18)      Secondary(19)    Subordinate(1A)
    00               01               01
    00               06               9C
    00               02               02
    00               03               03
    00               04               05
    04               05               05
    06               07               6C
    07               08               08
    07               09               09
    07               0A               3A
    07               3B               6B
    07               6C               6C
    Which one is the correct Parent PCI bridge device?

    Or is there some other way to find the correct Parent PCI bridge device?
     
  2. DaGr8Gatzby macrumors member

    Joined:
    Dec 24, 2011
    #502
    If you can teach me how to get text output like you, I can show you how to get the proper PCI bridge.
     
  3. mark1234 macrumors member

    Joined:
    Sep 2, 2011
    Location:
    Amsterdam, the Netherlands
    #503
    In order to get the column alignment, I used the code tag (#).
    The values shown have been typed by me after executing 12 times
    the pci -i xx xx xx -b command.
     
  4. duffman9000 macrumors 68000

    duffman9000

    Joined:
    Sep 7, 2003
    Location:
    Deep in the Depths of CA
    #504
    I think I finally found something conclusive explaining why my Win8 installation is (semi) screwed up. I think it's an ACPI issue where Windows 8 is not being identified correctly.

    Scope (\_SB.PCI0)
    {
    Method (_INI, 0, NotSerialized)
    {
    Store (0x07D0, OSYS)
    If (CondRefOf (\_OSI, Local0))
    {
    If (_OSI ("Darwin"))
    {
    Store (0x2710, OSYS)
    }

    If (\_OSI ("Linux"))
    {
    Store (0x03E8, OSYS)
    }

    If (\_OSI ("Windows 2001"))
    {
    Store (0x07D1, OSYS)
    }

    If (\_OSI ("Windows 2001 SP1"))
    {
    Store (0x07D1, OSYS)
    }

    If (\_OSI ("Windows 2001 SP2"))
    {
    Store (0x07D2, OSYS)
    }

    If (\_OSI ("Windows 2006"))
    {
    Store (0x07D6, OSYS)
    }

    If (\_OSI ("Windows 2007"))
    {
    Store (0x07D7, OSYS)
    }

    If (\_OSI ("Windows 2008"))
    {
    Store (0x07D8, OSYS)
    }

    If (\_OSI ("Windows 2009"))
    {
    Store (0x07D9, OSYS)
    }
    }
    }


    From a Microsoft document:


    Table 1. _OSI Strings for Windows Operating Systems
    Windows operating system version _OSI string
    Windows 7 “Windows 2009”
    Windows Server 2008 R2 “Windows 2009”
    Windows Vista “Windows 2006”
    Windows Vista SP1 “Windows 2006 SP1”
    Windows Server 2008 “Windows 2006.1”
    Windows XP “Windows 2001”
    Windows XP SP2 “Windows 2001 SP2”
    Windows Server 2003 “Windows 2001.1”
    Windows Server 2003 SP1 “Windows 2001.1 SP1”

    My DSDT dump doesn't show an entry for Windows 8 and it will probably be different than the Windows7/2008 version.
     
  5. mark1234 macrumors member

    Joined:
    Sep 2, 2011
    Location:
    Amsterdam, the Netherlands
    #505
    Alright, so I tried to install Windows 8 Consumer Preview. Installation went well untill I finally got a black screen. After rebooting, I see the "Fish" again, after which the screen turns black, then after 10 seconds, the screen will become uniform green for about 200 milliseconds and then the screen becomes black again. So I guess something goes wrong with the video part (i.e. accelerated drivers).

    I see many of you solve this problem by setting the PCI Command register of the videocard to 7 and by setting the VGAE register of the corresponding parent PCI bridge to 8.

    For my Mac Mini Model 2011 with integrated Intel HD3000 graphic card this does not work. First of all, the PCI command register of the videocard has already the value 7, so I do not need to set it again.

    Secondly, the Video Card operates directly on PCI bus 0. So there is no PCI bridge in between the video card and bus 0.

    So I am out of options on what I can do right now in order to solve it.
     
  6. d3vi1 macrumors member

    Joined:
    May 18, 2011
    Location:
    Frankfurt am Main, Germany
    #506
    Interesting, 00:02.00 is the address of your Intel HD3000?

    In that case, you don't need to set the VGAE register on the parent PCI bridge, you just need to make sure that no other bridge has that value. That is, make sure that the VGAE bit is disabled in the bridge config register (3Eh) on all other bridges.

    Furthermore, it would also be interesting to know which video card is connected to the outputs of the Mac Mini by default. On Macs, the EFI environment usually has drivers for both video cards (except in MBP6,2) and only activates the Graphics Output Protocol on the one with EDID Discovered and EDID Active. UGA is available on all graphics cards though (on systems that offer also UGA).

    You can see that by doing a devtree in the EFI Shell.

    If on your system the VGA settings are correct by default but the EFI system uses the discrete adapter it means that although Windows runs correctly, you will never see anything as the gMux is connected to the wrong card.

    Post a devtree if you can't figure out which is which.
     
  7. 3ll0s macrumors newbie

    Joined:
    Dec 5, 2011
    #507
    Hey d3vi1

    How are things coming along, Any progress?

    If your stuck I would like to give it a shot, or maybe you could make it a github repository!
    Then we could all help figuring this out.
    I think we would all still like to run W7 natively and on our IGP.
    At least I certainly would ;)
     
  8. d3vi1 macrumors member

    Joined:
    May 18, 2011
    Location:
    Frankfurt am Main, Germany
    #508
    Send me your SSH key and you'll receive access to the GIT repo in 48 hrs.
     
  9. duffman9000 macrumors 68000

    duffman9000

    Joined:
    Sep 7, 2003
    Location:
    Deep in the Depths of CA
    #509
    d3vi1,

    Do you know how to change the default EFI display output from the discrete to Intel GPU?
     
  10. d3vi1 macrumors member

    Joined:
    May 18, 2011
    Location:
    Frankfurt am Main, Germany
    #510
    Partially. The gMux is documented quite well. The only thing that I haven't looked up is querying for the gMux by browsing the ACPI tree and finding the IO port range from ACPI (I used 0x700 as an offset, and it's not always the case).
    Right now, the process for moving from one video card to the other one is done without looking for the presence of a gMux or where it's present.
     
  11. mark1234 macrumors member

    Joined:
    Sep 2, 2011
    Location:
    Amsterdam, the Netherlands
    #511
  12. d3vi1 macrumors member

    Joined:
    May 18, 2011
    Location:
    Frankfurt am Main, Germany
    #512
  13. duffman9000 macrumors 68000

    duffman9000

    Joined:
    Sep 7, 2003
    Location:
    Deep in the Depths of CA
    #513
    I didn't look through the entire thread, but I've looked at dmpstore before. There was only variable called PchInit stored.

    ----------

    I suspect I need to do other steps first. I noticed that both GPUs report EdidDiscovered but only the discrete reports EdidActive. Switching using the above results in a black screen. The system is still up though.
     
  14. duffman9000 macrumors 68000

    duffman9000

    Joined:
    Sep 7, 2003
    Location:
    Deep in the Depths of CA
    #514
    fs0:
    (or another location)
    Then just redirect the output to a file. Example:
    pci -i 01 00 00 > discrete_gpu.txt
     
  15. d3vi1 macrumors member

    Joined:
    May 18, 2011
    Location:
    Frankfurt am Main, Germany
    #515
    There are others. It would be interesting in anyone converted the Platform Setup Browser driver from Tiano Core to an EFI Application. You would be able to make a lot of changes. All the Chipset EFI Drivers used by Macs export a Platform Setup.

    In EFI, there is no real way to rescan for monitors. What you can try is to reconnect the Video drivers using the EFI Shell reconnect command. That will reinstall the EdidActive protocol, but I never got that to work. One way to work around that would be to use a serial port adapter that the Mac firmware knows about and (temporarily) redirect the console to the serial port. That would show us what's going on when we reconnect the video drivers and where the failure is.
     
  16. 624636 Suspended

    Joined:
    Oct 10, 2011
    #516
    Hi everyone,

    I still searching to easier the great solution gave by DaGr8Gatzby.

    So I looking for the development of rEFInd which is now in ver.3.0. I find this page http://www.rodsbooks.com/refind/drivers.html where I saw that we "can load a video card driver to set an appropriate video mode or to support a plug-in card that lacks EFI support in ts own firmware".

    So I'm wondering : is there a way to grab the Mac EFI driver ? is there a way to modify it in a way that it could load Windows EFI properly ? ... and reload it before launching windows ?
     
  17. 624636 Suspended

    Joined:
    Oct 10, 2011
    #517
    I make all the steps of DaGr8Gatzby's guide on other iMac I have and everything went fine BUT when I launched WINPE 4.0 in EFI (... it easy to know on an iMac because of the screen resolution ; it is very low in BIOS mode) the win7 installer said it's impossible because the disk is in GPT.

    EDIT : actually there is 2 differences : I use rEFInd and it was not installed on the ESP first partition but on the MacOSX third partition. Is it the problem ?
     
  18. DaGr8Gatzby macrumors member

    Joined:
    Dec 24, 2011
    #518
    Did you slipstream the Windows install? I recently got a new job, so I haven't been keeping up with this. I still want to be able to install natively without slipstreaming an installer. I think someone is going to just have to write an EFI app that makes all the proper changes.
     
  19. 624636 Suspended

    Joined:
    Oct 10, 2011
    #519
    Sorry to disturb ... I mix the install.wim ! It works now !

    I'm pretty sure I read that we can setup our MagicMouse or Apple Trackpad with registry keys but I didn't found it.

    Thanks a lot for your work.
     
  20. 624636, Apr 25, 2012
    Last edited: Apr 25, 2012

    624636 Suspended

    Joined:
    Oct 10, 2011
    #520
    So here my final step :

    After Finding my Register and Install Win7, I launched EFI shell and type the following command

    cd fs0:\ --- here my ESP Partition
    ls --- list only one directory "EFI"
    cd EFI --- doesn't work because it's not mapped ? why ? how to navigate between directories?

    I think it's a newbies questions but I really have to know in order to launch my "startup.nsh" then "bootx64.efi"

    EDIT : So I found that there is several shell.efi and so I waste my time with a bad one.
     
  21. 624636, Apr 25, 2012
    Last edited: Apr 25, 2012

    624636 Suspended

    Joined:
    Oct 10, 2011
    #521
    What was the answers and the methodology ?

    d3vi1 does you alpha/beta program could just help us in determining the right "mm commands" to do. It could be a very good start ?
     
  22. mark1234 macrumors member

    Joined:
    Sep 2, 2011
    Location:
    Amsterdam, the Netherlands
    #522
    For my Mac Mini Model 2011 with built-in Intel HD3000 Graphics, the VGA controller is on bus 0. This means the VGA controller is directly connected to bus 0 without a PCI bridge. Hence I do not have to set the VGAE register of the PCI bridge. Furthermore, the PCI command register is already 7 so I do not have to set it as well. However, I am not able to boot EFI with Windows 8 Consumer Preview. I will end up with a black screen. So there must be some other setting to be set which nobody has found yet. Also the d3v1l program will end up in a black screen.
     
  23. 624636, Apr 25, 2012
    Last edited: Apr 26, 2012

    624636 Suspended

    Joined:
    Oct 10, 2011
    #523
    Here is the result of (pci -i 01 00 00 > Graphic.txt) for my VGA Controller.
    and the result of (pci -i 00 03 00 > Bridge.txt) for the PCI Bridge I suppose it related.

    The PCI command register is already 7 for my graphic card I think. So I just try the command (mm 0003003E 8 -pci) and launch Windows 8 ... the screen is black but the computer seems to work

    Without this (mm 0003003E 8 -pci) windows 8 launch but there is not enough resources for the graphic card.

    iMac27 have a MiniDisplayPort input/output. Is it possible that a register could setup this plug ? ... "Windows 7 non-SP1 Setup (Bios mode) had a known bug on all iMac late 2K9 because the "Windows Default AMD Driver" redirect the video output on this external plug and nothing on the main screen ... the solution was to delete this driver after the second boot during the installation in order to Windows to install the "VGA Default Driver" then install AMD Catalist driver after installation complete. Maybe this problem could apply to other mac system.

    Any other ideas ?

    D3vi1, does your program could help in this case ?
     

    Attached Files:

  24. mark1234 macrumors member

    Joined:
    Sep 2, 2011
    Location:
    Amsterdam, the Netherlands
    #524
    By the way,

    When I installed Windows 8 Developer Preview, I ended up with a black screen and a register dump. Now with Windows 8 Consumer Preview, I only get a black screen. So at least, Microsoft is making some progress as well on the EFI environment.
     
  25. 624636, Apr 26, 2012
    Last edited: Apr 26, 2012

    624636 Suspended

    Joined:
    Oct 10, 2011
    #525
    That's it !

    1) I boot without "mm 0003003E 8 -pci" so there is not enough memory for my graphic card.

    2) Go to Device manager and switch my AMD Default drivers (the one that Win8CP provide) for Generic Graphic Card

    3) Reboot and see there still is not enough memory for my graphic card

    4) Reboot and start Efi Shell

    4) Execute "mm 0003003E 8 -pci" then "efi/boot/bootx64.efi"

    5) … tadaaa my graphic card has no problem !!!

    6) … BUT launch Windows Update and ask for update with the new AMD Default Drivers and … splash black screen !

    We need an appropriate Win 8 drivers for Radeon Mobility and there is no official drivers for the "Under" 5000 series.

    I try with the new Catalist 12.4 Win7 x64 drivers but same thing : during install screen become black but the computer continues working.

    I try Catalist Control Center for Win7 and Win8 but it doesn't work when the accelerated part of the graphic card is desactivated

    I try the external video output but it doesn't works also.

    The only solutions I could see are : there is another EFI command register AND there is another drivers (new Win8 drivers, I will test several others win7 drivers ... maybe ?)
     

Share This Page