Skip to content
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

OcTimerLib inclusion adds noticeable delay during startup #526

Closed
vit9696 opened this issue Oct 22, 2019 · 1 comment
Closed

OcTimerLib inclusion adds noticeable delay during startup #526

vit9696 opened this issue Oct 22, 2019 · 1 comment

Comments

@vit9696
Copy link
Contributor

vit9696 commented Oct 22, 2019

On some platforms like Intel before Skylake, Intel Xeon W/Scalable, and AMD we use ACPI PM timer to determine CPU frequency. This is done by OcTimerLib in its constructor to provide timer interface in our code.

As a result currently any binary referencing OcTimerLib directly or indirectly (e.g. via OcBootManagementLib) may get a ~100 ms delay during startup.

  • I fixed the problem in BOOTx64.efi (acidanthera/OpenCorePkg@b47ab16) and FwRuntimeServices.efi (acidanthera/AppleSupportPkg@e88bead) by simply removing the dependency, which is not required.
  • ApfsJumpStart will be integrated into OpenCore when ready, so it should be out of scope (Support FusionDrive in ApfsDriverLoader #385).
  • OpenCore itself needs OcTimerLib and the calculation, but we may not want to calculate the ACPI PM frequency in RELEASE builds on platforms that do not need it (desktop and server Skylake+), this is still an issue.
  • Other software like third-party GUI will need to reference OcBootManagementLib, and for that we want to make OcTimerLib do its job only once by installing a protocol or a volatile UEFI variable.
@mhaeuser
Copy link
Member

The contents of OC_CPU_INFO are implicitly related (i.e. now it may store several frequency, i.e. CPUFrequency based on ART and ACPU PM). Should it just be stripped to the minimum used by dependencies such as the SMBIOS code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants