[FREELDR] Support compiling freeldr as a UEFI loader + Implement UI functions (#5171) First batch of changes to implement a UEFI version of freeldr: - Compile freeldr as EFI binary on top of the existing loader. - Stub out various functions so we can create a UEFI machine-type in freeldr. - Implement all of the video output functions so we can display a pretty freeldr BSoD :)
[FREELDR] Fix missing exports and .edata section after commit 728694f6. CORE-18880
[FREELDR] Move platform-specific build targets into dedicated .cmake files. (#5141) - Keep the common definitions and file lists in CMakeLists.txt - Move PC-AT & compatibles (PC-98, XBOX) definitions in pcat.cmake - Future UEFI-specific definitions will be in an uefi.cmake
[FREELDR] Move common x64 runtime-specific ASM helpers to a misc file. Co-authored-by: Justin Miller <justinmiller100@gmail.com>
[BOOT][SDK:CMLIB] Compile a CMLIB for FreeLdr / NT bootloader with correct definitions. (#4619) This also allows using the CMLIB with any reduced functionality that could be required at boot-time.
[CMAKE] Do not use USE_CLANG_CL variable in CMake scripts
[FREELDR:NTLDR] Use NTOS kernel's CMBOOT functions to enumerate and build the boot-time driver list. They are correct and are more performant. - Rewrite WinLdrAddDriverToList() on the model of CmpAddDriverToList() with support for CmpIsDriverInList(). - Disable RegEnumKey() as it is now unused.
[BOOT][SDK:RTL] Compile a reduced RTL library for FreeLdr / NT bootloader... ... as it should have always been done (and must be done for NTDLL and NTOS kernel as well). This allows using the RTL with the correct definitions and the reduced functionality available at boot-time. + Make the RTL main header compatible. In addition, this will permit re-using existing code that already uses the RTL (mostly string conversions). See commits 427c90af3 (r36761) and b46e8cc18 (r36980) for some background.
[FREELDR:UI] Disable GUI code from compilation as it is currently stubbed. Rename "ShowGui" -> "ShowUi" as this variable was actually unrelated to *graphical* aspects of the UI.
[CMAKE] Replace custom scripts in compilerflags with standard ones - add_target_link_flags changed to target_link_options - add_target_property changed to set_property(... APPEND ...)
[CMAKE:GCC] Produce RosSym data even when building with separate debug symbols
[CMAKE] Get rid of freeldr_pe_dbg target objcopy bug is now solved and I can't remember how this used to work anyway. Use strip instead. If you need to debug freeldr - set SEPARATE_DBG cmake var to TRUE - use qemu GDB stub - In GDB : add-symbol-file <build_dir>/symbols/freeldr_pe.exe
[FREELDR] Force alignment of .text section on disk Fixes boot for clang & GCC-amd64 build Also rename freeldr_i386.lds to freeldr_gcc.lds for better clarity
this seem to be the only combination which works on msbuild-msvc
[FREELDR] Use target_link_options instead of add_target_link_flags CORE-17423
[FREELDR] Use decimal numbers for section & file alignment CORE-17423
[FREELDR] Disable SSE instructions for GCC x64 Even if all x64 CPUs can handle SSE instructions, prevent GCC x64 to generate them, as FreeLoader is not ready to handle them.
[CMAKE] Fix GCC -fstack-protector usage
[FREELDR] Parse NT kernel load options in a consistent manner. - Introduce a set of NtLdrGet(Next)Option(Ex) helpers that allow retrieving respectively, the "next" option in an options string, and retrieving a given named option in such an options string, by correctly parsing that string. Valid syntaxes: /OPTION1 /OPTION2/OPTION3 OPTION4 /OPTION5(=...) ... Options separators are slashes, or whitespace (space, tab), mandatory if no slash is used, and otherwise optional. - Use these functions wherever NT load options are being parsed. - Simplify the parsing of /DEBUGPORT=... using these functions. - When parsing the /HAL=... or /KERNEL=... options, only the first encountered one is taken into account, any other ones are discarded. - When parsing the other load options, only their first occurrences are taken into account, any other repetitions are discarded. * The NOPAE option overrides any previous PAE option. * Any NOEXECUTE(=) option should override any previous NOEXECUTE=ALWAYSOFF (or equivalently, EXECUTE) option.
[CMAKE] Get rid of add_compile_flags Use add_compile_options and the like instead