Gulftown, Westmere, Nehalem microcode update guide

Discussion in 'Mac Pro' started by h9826790, Jun 7, 2018.

  1. h9826790, Jun 7, 2018
    Last edited: Jun 25, 2018

    h9826790 macrumors G4

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #1
    -- ALL credit to LightBulbFun --

    ⚠️Warning!!! Perform the firmware hack in this post may brick your Mac, do NOT do it if you have any doubt[​IMG]

    ⚠️Caution! after microcode update, Windows may shows "Processor not supported" BSOD.

    The rule hasn't figured out yet. May be EFI / legacy related, may be Windows version related, may be BootROM version realted. Or may be all of them are related. In most cast, it seems a flesh installation works. But in some case, only flash the original ROM back in can work.

    Also, it seems the 0087.B00 BootROM with microcode update has the worst compatibility. This combination may not even able to boot the latest version Windows installation disc. With 0085.B00, you should able to perform a flash installation in either legacy or EFI mode with the updated microcode⚠️

    This mod will allow you to insert the most up to date microcode (from Intel) to patch your CPU. It contain quite a few bug fixes, and the most important one, protect you from Spectre.

    If anyone just want to know your current microcode version, you can run "sysctl machdep.cpu" in terminal to get the relevant data.

    Before anyone ask, the answer is NO. I cannot post a pre-patch ROM. The unique serial number of your Mac is stored inside the BootROM. That's why you have to dump it and mod it by yourself. Using others ROM won't brick your Mac, but your Mac will no longer able to access some service (e.g. iMessage). And fix the serial number + UUID may be much harder than you can expect. So, either do this "copy and paste" exercise by yourself (or ask someone to do it for you), but do NOT flash other's ROM.

    -----------------------------------------------------------

    In order to do this, you will need the following

    1. Firmware 0085.B00 (no different on 2009, 2010 and 2012 Mac Pro)
    Screen Shot 2018-06-08 at 02.57.41.png

    2. ROMTool (By dosdude1)
    http://dosdude1.com/apps/ROMTool.zip
    Screen Shot 2018-06-08 at 02.40.49.png

    3. iHex
    https://itunes.apple.com/hk/app/ihex-hex-editor/id909566003?l=en&mt=12
    Screen Shot 2018-06-08 at 02.38.30.jpg

    4. Original (V15) microcode (By LightBulbFun)
    https://mega.nz/#!pNZikBbS!30gv0d8cKqCvU_AwAddZWl3Am7Vw0tMjqaDxsdNbD6g
    Screen Shot 2018-06-08 at 02.47.37.png

    5. Latest (V30 / V28) microcode (By LightBulbFun)
    https://mega.nz/#!UZhxCYbT!nrGMKjv2aDoC4iDFOAj-NR2yPHdSZ7FuruaBsCchhhA
    Screen Shot 2018-06-08 at 02.47.44.png

    6. A Mac EFI GPU (If you don't know what it is, STOP here)

    7. Optional - Mac Pro 5,1 firmware restoration CD (https://support.apple.com/kb/dl1320?locale=en_US)

    -----------------------------------------------------------

    Even though in theory this patch should be applicable to any 4,1 / 5,1 BootROM that has microcode V15. Do NOT apply this patch to any BootROM other than 0085.B00, NO body test other BootROM yet, it may brick your Mac.

    As fail safe, you should have the 5,1 firmware restoration CD ready. Just in case you flash the wrong ROM, you can still restore the Mac straight away.

    Read all steps and screenshots at least 3 times, and make sure you fully understanding what you are going to do before you start this patch.

    -----------------------------------------------------------

    So, after you download everything from the above links, follow these steps (do NOT go beyond step 17 if you have any doubt, before step 17, you can stop at anytime)

    1. Disable SIP

    2. Shutdown

    3. Remove all hard drivers except your boot drive

    4. Boot your Mac to normal MacOS desktop

    5. Unzip and Open ROMTool

    6. Click “Dump system ROM” to dump your own ROM

    7. Name the ROM image 0085.B00.bin and save it

    8. Open 0085.B00.bin with iHex

    9. Unzip and open stock-MP51-microcode-block.bin with iHex

    10. Unzip and open ws30-nh28-MP51-microcode-block.bin with iHex

    11. Follow all 17 steps as per the screenshot to find and replace the microcode (it’s nothing more than normal copy and paste)
    [​IMG]

    12. Save as a new bin file 0085.B00_V30.bin

    13. Go back to ROMTool and click “Flash System ROM”

    14. This will NOT flash the ROM yet, and your system still perfectly safe up to this moment.

    15. The tool will tell you to enter firmware programming mode. Obviously we haven’t done it yet. So, cancel it and then close ROMTool.
    Screen Shot 2018-06-08 at 03.32.33.png

    16. Shutdown

    17. Wait 15 seconds

    18. Press and HOLD power button until LED flash and hear the “Do” sound. This is an indication that your Mac is now entered firmware programming mode

    19. The Mac will continue boot to desktop, this is normal

    20. Now, open ROMTool again.

    21. Click “Flash System ROM”

    22. This time you can continue and select 0085.B00_V30.bin to flash

    23. The flash only take few seconds

    24. After flash, you can close ROMTool

    25. If in doubt, dump the ROM again to make sure its size is correct. Or even use software to compare it with the 0085.B00_V30.bin to make sure they are identical

    26. If you are ready, reboot the Mac

    27. Once boot to desktop, open terminal and use “sysctl machdep.cpu” command to check you have microcode version 30
 (or 28 if running Nehalem) now
    Screen Shot 2018-06-07 at 18.49.24.png

    -----------------------------------------------------------

    Update 1: 0087.B00 BootROM also safe to mod now. Exactly the same step, but with the microcode posted in the following link

    https://forums.macrumors.com/thread...microcode-update-guide.2122246/#post-26137406

    -----------------------------------------------------------

    ⚠️Warning!!! Perform the firmware hack in this post may brick your Mac, do NOT do it if you have any doubt[​IMG]
     
  2. Synchro3, Jun 7, 2018
    Last edited: Jun 7, 2018

    Synchro3 macrumors 68000

    Synchro3

    Joined:
    Jan 12, 2014
  3. bookemdano macrumors 6502a

    Joined:
    Jul 29, 2011
    #4
    Thanks to all who worked hard on making this happen!
     
  4. t8er8 macrumors regular

    t8er8

    Joined:
    Dec 4, 2017
    Location:
    Quebec, Canada
    #5
    Hey! I’m kind of uninformed on what bootrom does and how it works, but I’d love to have someone explain it to me on what this does and possibly how it works, thanks.
     
  5. h9826790 thread starter macrumors G4

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #6
  6. thornslack macrumors 6502

    Joined:
    Nov 16, 2013
    #7
    Have you measured any performance difference following the patch?
     
  7. h9826790 thread starter macrumors G4

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #8
    No time to run benchmarks yet, but can’t feel any difference
     
  8. thornslack macrumors 6502

    Joined:
    Nov 16, 2013
    #9
    From results I've seen on windows machines there should be no real deficiency, just curious. Thanks for this!
     
  9. crjackson2134 macrumors 68040

    crjackson2134

    Joined:
    Mar 6, 2013
    Location:
    Charlotte, NC
    #10
    When you do get a chance please post your findings.

    btw, handheldgames is reporting a substantial decrease in PCIe Disc performance with 10.13.5, are you finding any decrease?
     
  10. Squuiid macrumors 65816

    Squuiid

    Joined:
    Oct 31, 2006
  11. LightBulbFun macrumors 68000

    LightBulbFun

    Joined:
    Nov 17, 2013
    Location:
    London UK
    #12
    I have made some updated microcode blocks for patching/updating the 0087 BootROM :)

    I have successfully tested them using a Mac Pro4,1-5,1 @Surrat kindly provided for testing.
     

    Attached Files:

  12. h9826790 thread starter macrumors G4

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #13
    Wow~ Thanks for that. I was thinking "all microcode removed" may means a large piece pure "FF" or all "00" in the BootROM , that will be hard to correctly locate the code buy "search and paste" without knowing the exact address. But seems I worried too much now :D
     
  13. LightBulbFun macrumors 68000

    LightBulbFun

    Joined:
    Nov 17, 2013
    Location:
    London UK
    #14
    indeed this was the case (its all just FFs) but Luckily the section in the BootROM for where the Microcode is/should be is in a fixed location so I knew roughly where to look. :D

    im also further convinced the missing microcode is a screw up on Apples part rather then an intentional thing, as my previous experimentation with Microcodes show that when I added microcode that never existed before hand (for example MP2,1 has never had Clovertown G0 Microcode despite supporting G0 Clovertown CPUs) the Machine would Halt on CPU error and fail to Boot/Chime (however the way microcodes are implanted did change between the 2006 and 2009 Mac Pros I sadly lack any EFI64 Core 2 Duo hardware to do any testing with in this regard).

    where as despite Nehalem/Westmere microcode never existing in the 0087 BootROM, I can add it "back" with no issues so I suspect the BootROM is still expecting the microcodes to be there hence it continuing to work when I do add them rather then halting like the Mac Pro 2,1 does :)
     
  14. LightBulbFun macrumors 68000

    LightBulbFun

    Joined:
    Nov 17, 2013
    Location:
    London UK
    #15
    I Just wanted to say thanks to @h9826790 for writing this guide, its much better then anything I could throw together thats for sure :)

    if anyone wishes to read up on this Microcode stuff I recommend you check out these threads:

    https://forums.macrumors.com/threads/updating-a-mac-pro-s-cpu-microcode.2114187/ this thread is where I got started with the Microcode stuff

    https://forums.macrumors.com/threads/mp51-0087-b00-10-13-5-bootrom-update-missing-microcode.2121072/ in this thread I was able to patch the Mac Pro 5,1s EFI with new microcode, with @Surrat and then h9826790 kindly using their Mac Pros as a "guinea pig" for testing. :)

    and then of course there is this thread where h9826790 combined it with @dosdude1 nice little ROM flasher to make an Awesome relatively easily to understand guide (as long as your not scared of a Hex editor :) ), so anyone could attempt to update their Mac Pro 5,1s Microcode :)

    and then finally I went off the Firmware deep end :D https://forums.macrumors.com/threads/going-off-the-firmware-deep-end.2121762/

    I have to say its an interesting time to be a MacPro5,1 owner with all the firmware hacking going on with the likes of my microcode stuff and @gilles_polysoft Awesome NVMe/DXE module insertion stuff allowing us to add EFI drivers to the Mac Pros Firmware :)
     
  15. dosdude1 macrumors 68000

    dosdude1

    Joined:
    Feb 16, 2012
    #16
    I am currently in the process of writing an interactive GUI application that will allow you to easily add, replace, and remove Microcodes from your system ROM. It will not only work on the Mac Pro, but also any other Intel-based Mac. It's in a very early state at this point, but parsing is working great so far:

    image.jpeg
     
  16. crjackson2134 macrumors 68040

    crjackson2134

    Joined:
    Mar 6, 2013
    Location:
    Charlotte, NC
  17. reukiodo macrumors regular

    reukiodo

    Joined:
    Nov 22, 2013
    Location:
    Earth
    #18
    Wow! That would be awesome! Would this work on all the intel systems (back to Core Duo), or are you targeting just the Mac Pros? Would this tool also have a reference of all the available microcode versions or would we need to find the microcode ourselves to update?
     
  18. bookemdano macrumors 6502a

    Joined:
    Jul 29, 2011
    #19
    it's right in the post you quoted...

     
  19. flaubert macrumors regular

    Joined:
    Jun 16, 2015
    #20
    h9826790: I see you have a six core 3.46GHz processor. Is it the X5690 (the dual processor Xeon), used in a single processor box? Because I think I saw via a link on Ars Technica to the Intel site that the XC5690 had a microcode update, but the W3690 Westmere processor did not. Or is the microcode that you're using applicable to a range of Xeon processors, including ones that Intel doesn't officially support? Thanks in advance.
     
  20. h9826790 thread starter macrumors G4

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #21
    I am using a W3690.

    And you are correct. From the Intel web page, it shows that the microcode development for W3690 is stopped.

    And my firmware patch test is a prove that the W3690 can be used with the new microcode that written for Westmere.
     
  21. dosdude1 macrumors 68000

    dosdude1

    Joined:
    Feb 16, 2012
    #22
    Parsing is complete! All that's left now is to add the editing functions, and the program will be complete!

    Screen Shot 2018-06-12 at 1.18.46 AM.png
     
  22. HaypurTiryading macrumors newbie

    HaypurTiryading

    Joined:
    May 20, 2018
    Location:
    Turkey
    #23
    Is this program integrated with modtool/inject program or seperated one? Don't you think combine all of your programs to all in one?
     
  23. reukiodo macrumors regular

    reukiodo

    Joined:
    Nov 22, 2013
    Location:
    Earth
    #24
    Ok, yes, one part of my question was, but the second part wasn't. Will the tool automatically find the new microcode updates for the system that the tool currently is running on?

    If I run this on an early Core Duo, will it be injecting the Xon microcode? Likewise, if I run this tool on an Xserve, will it be injecting Core Duo microcode?
     
  24. dosdude1 macrumors 68000

    dosdude1

    Joined:
    Feb 16, 2012
    #25
    Yes, I'll be adding this feature in a later release. For now, it will be up to you to add microcodes for the correct CPUID (which isn't difficult, as you simply find the latest based on the listed CPUIDs.)
     

Share This Page