New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OC not start on last Surface UEFI Firmwire #9
Comments
Hi, did you disable Did you also tried OC debug version? It seams something block the OC image or the OC |
I give that a try and I will update you |
Secure Boot Has been disabled the whole time |
I also have this issue, it seems that if you have applied the recent Microsoft Surface Firmware Update(on Jan 7th), then the system will block you completely from booting Opencore. I tried different ways but none of them works. |
Thanks @Xiashangning for this information. With this update only OC is corrupted or also other OS? Have you tried to run Linux? It works? |
Linux work |
Yes, like you did, I have tried Ubuntu, Manjaro etc, all of them work except OC. And I have been using SP7 with Big Sur for quite a while until I updated the firmware 4 days ago... After it installed, I cannot get into OC anymore. Sad. |
Since I think is a OC related problem, I opened a issue here |
@Xiashangning @butter1232 For prevent closing the issue opened replay also you to that issue. |
@badstorm so have you tried vit9696's solution? If not, then I will try it now. Hoping that is enough T_T |
My Surface is not udpated with that firmware version, so for now i cannot test. Try and let me know so i can update the configuration in this repo. |
I will let you know |
In addition to the master version please also try acidanthera/bugtracker#1354 (comment). |
@vit9696 , I've tried Softkbd-r6.zip and it does not work. By the way, with secure boot disabled, so far only Opencore could not been loaded by the system, Clover however can enter the booting selection screen (though I don't have a bootable config for SP7 using clover), other OS like ubuntu and manjaro work just as before. I doubt that this might be an Opencore specific issue... Perhaps there is something slightly different between Opencore and Clover? |
@Xiashangning i.e. you upgraded to OpenCore 0.6.6 master, and then replaced BOOTx64.efi, Bootstrap.efi, and OpenCore.efi and it failed? What exactly did happen? I would like to see the screenshots and logs from both master version and Softkbd-r6 (if they are created).
Unlike Clover and other bootloaders OpenCore is a driver and uses two-stage boot model. Both things are valid UEFI spec-wise. |
OK, I will gather the files you need, right now it dinner time so... maybe 2 hours later I will update you what I get. |
@vit9696 Sorry for my first comment, I was performing these trials with the boot chain: grub->OC with secure boot enabled. After I turned off secure boot and boot directly with Opencore, I have done what you asked and indeed the results are different! Here are the screenshots you must take a look at! It seems that this time, with the softkbd-r6, Opencore can read its 'core' file---Opencore.efi, but stops at loading HfsPlus.efi, reporting the same error: Access denied. Meanwhile, I have read through the issue you mentioned above. It reminds me something. When Opencore and macOS boots, in verbose mode, the little keyboard icon shows periodically at the right-down corner, it shows when a line is completely printed, and disappears when printing another line. This 'feature' might indicate that Surface Pro thinks Opencore is a diag utility as HP does. And this firmware update has applied some so-called security limitations, so Opencore failed to load macOS since then. The first photo is what I've got with master version These two is with Softkbd-r6. The last one is just wanting to show you that the icon can be clicked and functions as a screen keyboard. |
So, this confirms that Microsoft broke UEFI driver loading through the bootloader in their firmware (thus the I am not positive there is an immediate workaround for that, and to be honest I am not sure there even is a complicate way to workaround it. Therefore I strongly advise to refrain from upgrading to this firmware and downgrade if possible. From you I would like to see:
|
|
|
Nope, I tried Windows PE, it report a software error with black screen and the cursor is invisible(I can move it around and click the task manager I invoked by pressing the keyboard) and Ubuntu boot into a black screen after I choose 'try ubuntu without installing'. macOS stops at the same place, as before and as those HP laptops do. ([EB|#LOG:EXITBS:START]) |
Sorry I forgot the logs |
Please return the drivers back and try this OpenCore.efi version instead of the one found in SoftKbd-r6. Keep booters and other files as in r6. I will need the logs. oops. |
Sorry, uploaded the wrong file in the previous post. This one is correct. |
This time, the drivers are loaded but Opencore halted at ASSERT [OpenCore] Header.c(59): Context->FileSize != 0 after injecting the kexts. |
My bad, DirectResetCold. |
@vit9696 I trace the code down to AppleMapPrepareMemState |
Right, what are your current booter quirks? |
The one I am using now is AvoidRuntimeDefrag=YES, ProtectUEFIServices=YES, RebuildAppleMemoryMap=YES and SyncRuntimePermissons=YES and the rest NO |
AvoidRuntimeDefrag and SetupVirtualMap are the two settings concerned in AppleMapPrepareMemState and I have tried the 4 possible combinations of them, YES NO; YES YES; NO YES; NO NO. |
Not just these. Actually there are several more relevant ones:
The SetVirtualAddressMap is routed to OpenRuntime, here. If you cannot reach this place, then OpenRuntime is not properly mapped for some reason. Why — could be due to these quirks. |
To be more precise, the code stops at if(SetupVirtualMap)...else... |
Well, check if you can reach OpenRuntime tomorrow… |
It does reach OpenRuntime and stops at mCustomSetVirtualAddressMap, once again, please tell me where is its implementation |
What? So you mean the calling sequence is |
The calling sequence is:
|
Understood, so it actually stops at the original BIOS SetVirtualAddressMap, then is there anything I can do to go further? I am now trying with the quirk SetupVirtualMap=YES and testing where the code stops inside PerformRtMemoryVirtualMapping |
But as your document says, modern firmware with memory protection doesn't support the quirk SetupVirtualMap, so I am wondering if testing SetupVirtualMap=YES won't help, for now I find that it stops inside the for loop of PerformRtMemoryVirtualMapping, still debuging... |
Whether or not SetupVirtualMap quirk is supported — it depends, but indeed it should neither be needed with modern firmware, nor it actually is supported. The explanation is provided in this issue: acidanthera/bugtracker#719. If the code does not proceed after calling the original BIOS SetVirtualAddressMap, i.e. both with this quirk enabled and disabled, then it is very worrying. Basically there could be two possibilities:
|
Suppose that we cannot reboot using DirectResetCold, could you please tell me how to write RTC into memory in code and then how can I obtain it(through OpenShell?) |
You can use https://github.com/acidanthera/OpenCorePkg/blob/0.6.6/Include/Acidanthera/Library/OcRtcLib.h. Please add the library dependency to the .inf file as needed (see LibraryClasses). Write some value at a reasonably high index (e.g. 255, so it does not collide with the firmware) and use RtcRw.efi to read it from Shell. |
I believe we did get things to move, at least on some models. Please check acidanthera/bugtracker#1486 (comment). This may be able to help with Microsoft Surface as well. |
@vit9696 !!! That is exactly what the Surface Pro series need !!! |
@Xiashangning you resolve your issue? What you edited in this configuration to solve the problem? |
@badstorm Use the master version of OpenCore and enable 'DisableSecurityPolicy' quirk in UEFI section |
In that way, we can remove the annoying red unlock icon |
Sure, if you want to help imporving this configuration you are very welcome. Please send a PR with this booting alternative so we can test it. About Besides, I believe the commands for the touchpad are not correct, you should delete all the 'sudo' because with it the commands have no effect. Without 'sudo', the configuration works on my SP7 in my case is the opposite: with sudo works without no. Ok, about the problem in this issue I wait for thre release of OC 0.66 to update the documentation. Thanks |
@badstorm PR sent. |
Fixed in Release 1667 |
Tried a bunch of time over and over and copy efi file not to sure what I’m doing wrong
The text was updated successfully, but these errors were encountered: