Skip to content

OpenDuet pending issues #2397

@mikebeaton

Description

@mikebeaton

For reasons which are unclear, OpenDuet will not start in qemu unless it is built with -Os -flto (in some circumstances, further research needed, I was able to lower this to -O2 but no further).

Current (acidanthera/OpenCorePkg#532) 'NOOPT' build of OpenDuet is therefore not NOOPT, in terms of optimisations. (Fixed, see below.)

However, compared to the previous version (prior to the above commit), it does feature the advantages of:

  • Starting (see above)
  • All debug macros enabled: MDEPKG_NDEBUG not defined in this build (as before) and Debug Pcds set (new)
  • Full serial output from all libraries (similar to -DDEBUG_ON_SERIAL_PORT in OvmfPkg) (new)

Additionally, with the DxeCore ImageContext HOB fix acidanthera/OpenCorePkg#533 and the -flto debug fix acidanthera/audk#64, this version (though equally DEBUG and RELEASE) now (again?) allows symbolic degugging.

All the above are considerable advantages, compared to none of the above for the previous NOOPT version.

Note that I have removed DEBUG_ASSERT_ENABLED from the Pcd value added in the updated NOOPT version, which would ideally be enabled (now enabled, see below) - however OpenDuet currently features multiple (unknown number) ASSERTs, of which the first was the missing HOB and the second was incorrect APRIORI DXE settings acidanthera/OpenCorePkg@7a849ea. I am currently continuing through these. Hence the advantage of all rather than none of the above features, to actually be able to debug these (and another known issue, of failing to start 10.6 on 32 bit).


This leaves various issues pending:

  • Fix all remaining ASSERTs which can now (but could not before) be found by running NOOPT (EDIT: now also DEBUG, as below) build of OpenDuet
    • GCD remap assert: normal situation, should not have been an assert
    • Missing Hii protocols assert: intended situation in OpenDuet, should not have been an assert
    • APRIORI DXE dependencies
    • Missing DxeCore ImageContext HOB
  • When done:
    • Re-enable DEBUG_ASSERT_ENABLED in NOOPT build
    • Add same debug settings as (revised) NOOPT to DEBUG build
    • Revert NOOPT build to -O0
    • Figure out why OpenDuet will not start in qemu with -O0, and fix it so it does (so that the NOOPT build, rather than just being a 'very useful for debugging' build - as it now is, again - also becomes literally a no optimisation build again)
  • Fix failure to start 10.6 on 32 bit
    • EDIT: Fixed. This was a more general problem of failure to runtime-remap non-firmware runtime drivers in Duet, after upgrade to new image loader

Undecided:

  • Possibly revert the LTO debug change in tools - although it might actually be useful to leave this kicking around when needed
    • We are using this ongoing for DEBUG (but not NOOPT) build, so we are leaving it

Future/nice to have:

  • Add CI run of DEBUG OpenDuet (once all ASSERTs are fixed, and DEBUG_ASSERT_ENABLED is reenabled) to confirm that OpenDuet starts and runs in qemu (up to OpenCore? up to one or more OSes?) without ASSERTs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions