Jump to content

AptioMemoryFix


vit9696
595 posts in this topic

Recommended Posts

On 3/22/2019 at 7:00 PM, Modmike said:

 

Sorry if I wasn't clear.  I believe I read that AptioMemoryFix could emulate NVRAM but had a bug.  Is this correct?  I would love to eliminate EmuVariableDxe.efi for no other reason than to have fewer kexts.

 

Thank you

 

 

No, AptioMemoryFix is not going to emulate NVRAM. There is separate driver to do this.

AptioMemoryFix is just correcting some UEFI BIOS bugs that causes NVRAM is not working. And now not always.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hi, I'm having a problem with my X99 build with the 10.14.5 update, which I think is related to AptioMemoryFix: https://www.insanelymac.com/forum/topic/338777-x99-classifed-update-from-10144-to-10145-stuck-on-end-randomseed/

It doesn't attempt to load the OS after it gets to "End RandomSeed." I suspect using one of the earlier AptioFix drivers would work but I would much prefer to use the newer driver. I'm not sure if there is something I need to change with my configuration or if something with the driver needs to be updated. Thank you!

 

EDIT: Disregard, problem was related to the xcpm_bootstrap patch.

Edited by jamiethemorris
Link to comment
Share on other sites

  • 3 weeks later...

Why is it that macOS nvram support sometimes breaks with new UEFI versions but Windows and Linux keep working? There are just two possible ways how this can play out:

 

1. Linux somehow adapts to new UEFI versions and applies patches in time. There are enough patches applied to the drivers/firmware/efi subtree that this might me the case. Maybe you could look into the commit log and find just the fix we need:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/drivers/firmware/efi

 

2. UEFI developers trial and error until their code somehow works on Windows and Linux not adhering to the spec in the process.

 

Does someone knows more on this?

 

Link to comment
Share on other sites

@r!ppz It is not that easy. The first two "waves" of NVRAM issues were due to macOS physically relocating memory, which is a concept not covered by the UEFI specification and can very well be seen as a specification breach (UEFI PI) in a way. However, that should not be a factor anymore with the current AptioMemoryFix implementation.

 

The current problem is that a core gets stuck in an UEFI deadloop and thus shutting down kernel panics and obviously changed NVRAM values to not physically apply.

  • Like 4
Link to comment
Share on other sites

14 hours ago, Download-Fritz said:

which is a concept not covered by the UEFI specification and can very well be seen as a specification breach (UEFI PI) in a way

 

Thanks for the clarification. I just assumed that Apple just was more strict about the Spec like they are with the ACPI tables.

 

14 hours ago, Download-Fritz said:

The current problem is that a core gets stuck in an UEFI deadloop and thus shutting down kernel panics and obviously changed NVRAM values to not physically apply.

 

The reason is still unknown right? But also it is more than that: It also corrupts the UEFI settings in the process (at least for my Asrock Z390). If I would to investigate the problem where would I start?

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I have a little problem with AptioMemoryFix when I am using Hybrid UEFI boot (aka CSM enabled) on my ProBook 4540s: I get error allocating memory

 

BUT it works osxaptiofix without a problem.

 

AptioMemoryFix works when I disable CSM but I get scrambled Apple logo and other artifacts..

 

So, what logs do I need to get ?

 

Thanks a lot guys !

Link to comment
Share on other sites

  • 2 weeks later...
On 6/5/2019 at 12:12 PM, vit9696 said:

Check the previous pages of this topic, I outlined what I knew about Z390 and the possible strategies for issue research around 3-5 pages ago. Good luck!

Hi! Please help with some strange bug. First of all, I was using aptio-free2000 since I upgraded to Z390, but... today I've add one more stick of RAM (now 3 of 4 slots are used), and even aptio-free2000 stuck after ++++. How I can help you to figure out an issues with any version of aptio (but with lowmemoryfix most of all) and how to avoid stuck on +++ (windows start ok without any issues). XMP is enabled and disabled, it doesn't mean how to use XMP. Memory is ok 100%. Dual RAM combination works OK, single slot works ok, but 3 slots of 4 stuck on +++. 

Link to comment
Share on other sites

On 7/2/2019 at 2:15 PM, winlog said:

... today I've add one more stick of RAM (now 3 of 4 slots are used)... 

Not an answer to your question, but using 3 slots of RAM is a very bad idea anyway. Z390 is a dual channel platform, you should only be using ram in pairs and matched pairs at that. Your performance can drop substantially.

g\

Link to comment
Share on other sites

 

9 hours ago, genzai said:

Not an answer to your question, but using 3 slots of RAM is a very bad idea anyway. Z390 is a dual channel platform, you should only be using ram in pairs and matched pairs at that. Your performance can drop substantially.

g\

See, Windows is working ok with 3 or 4 slots of RAM. Idea is not bad, because I had 16 Gb (1 stick) and bought (Aliexpress) 2 sticks with 8 and 8 by very good price. That is the goal. Anyway, if windows works ok, then issue is in aptio I think. And I don't see any drop of performance) 

Link to comment
Share on other sites

1 minute ago, Slice said:

Aptio-Free2000 is not official driver and is not supported here.

Let we see the issue from another point of view. ANY official driver don't allow to start up system. Except free-2000. So, if there no official driver, I'm using free-2000. Before Z390 it was MemoryFix. 

Anyway, I just want to solve issue that's why I'm asking about help, dear Russian developer :P

  • Thanks 1
Link to comment
Share on other sites

Look, I do read these messages. If I do not reply, then it means I either have nothing to say or the issue does not have enough priority. For us in Acidanthera Z390 support is something really distant, as its firmware is beyond borked. We slowly build workarounds here and there and include them in OpenCore and AptioMemoryFix, but with many other important issues to address, specific boards nobody wants to own are obviously not a priority. Best recommendation for now is not to buy it for the time being unless you are a developer with really advanced skills.

 

As a side note, Z390 NVRAM issue is *not* caused by:

- broken NvramSmm/NvramDxe/FlashDriverSmm/FlashDriver. They can be replaced from Z370, and NVRAM will remain working in Windows, yet it will be broken just as usual in macOS.

- CR0 Write Protection bit removal and interrupt disabling code. With XNU mapping UEFI memory as RWX and CR0/IF hacks removed the situation does not change anyhow.

My current best guess is that APTIO guys forgot to run ConvertPointer somewhere or allocated some page table wrongly, but it is quite a bit strange as the core hangs in SMM, and it uses physical addressing. Most worrying of this is that recent Linux kernel creates a separate mapping for UEFI calls with virtual = physical mapping.

If a dev wants to help I would suggest writing an application that will simulate boot.efi: perform EXIT_BOOT_SERVICES, do virtual memory mapping, attempt reading/writing to NVRAM. Should be doable to at least find what exactly breaks it.

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

33 minutes ago, vit9696 said:

Look, I do read these messages. If I do not reply, then it means I either have nothing to say or the issue does not have enough priority. For us in Acidanthera Z390 support is something really distant, as its firmware is beyond borked. We slowly build workarounds here and there and include them in OpenCore and AptioMemoryFix, but with many other important issues to address, specific boards nobody wants to own are obviously not a priority. Best recommendation for now is not to buy it for the time being unless you are a developer with really advanced skills.

 

As a side note, Z390 NVRAM issue is *not* caused by:

- broken NvramSmm/NvramDxe/FlashDriverSmm/FlashDriver. They can be replaced from Z370, and NVRAM will remain working in Windows, yet it will be broken just as usual in macOS.

- CR0 Write Protection bit removal and interrupt disabling code. With XNU mapping UEFI memory as RWX and CR0/IF hacks removed the situation does not change anyhow.

My current best guess is that APTIO guys forgot to run ConvertPointer somewhere or allocated some page table wrongly, but it is quite a bit strange as the core hangs in SMM, and it uses physical addressing. Most worrying of this is that recent Linux kernel creates a separate mapping for UEFI calls with virtual = physical mapping.

If a dev wants to help I would suggest writing an application that will simulate boot.efi: perform EXIT_BOOT_SERVICES, do virtual memory mapping, attempt reading/writing to NVRAM. Should be doable to at least find what exactly breaks it.

Tnx for reply. If you need any help - ping me anytime and I will give any reports, logs, test etc to you and your team. Thanks in advance

Link to comment
Share on other sites

  • 4 weeks later...
2 minutes ago, Slice said:

Nobody can promise you this issue will ever resolved for 390 or 360.

 

Of course, please don't get me wrong, i don't want to hear any promises. I just want to figure out if problems of broken NVRAM are somewhat similar for Z390 and B360, that in case IF there will be a fix for Z390 it also might work for B360. :)

 

Link to comment
Share on other sites

×
×
  • Create New...