From 3e607e871b1b20e14527845a511ae2a6739fcaac Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 9 Mar 2024 08:37:29 +0100 Subject: See below. - HCoreKrnl: - Improve interrupt handler for AMD64 targets. - Wrapped AHCI and PE types into a namespace. - Replace L0 with the label MainLoop. - Reworked C++Kit and NetBoot modules. - Put INewFSIterator constructor as explicit. Signed-off-by: Amlal El Mahrouss --- Private/NewBoot/CxxRuntime/UnwindCxxKit.cxx | 29 +++++++++++++++++++++++++++++ Private/NewBoot/CxxRuntime/unwind.cxx | 8 -------- Private/NewBoot/NetBoot/EfiModule.cxx | 3 ++- 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 Private/NewBoot/CxxRuntime/UnwindCxxKit.cxx delete mode 100644 Private/NewBoot/CxxRuntime/unwind.cxx (limited to 'Private/NewBoot') diff --git a/Private/NewBoot/CxxRuntime/UnwindCxxKit.cxx b/Private/NewBoot/CxxRuntime/UnwindCxxKit.cxx new file mode 100644 index 00000000..551cb599 --- /dev/null +++ b/Private/NewBoot/CxxRuntime/UnwindCxxKit.cxx @@ -0,0 +1,29 @@ +/* + * ======================================================== + * + * CxxKit + * Copyright Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +#include + +namespace cxxkit +{ +///! @brief C++ ABI unwinding +///! Fini array (r1) +///! Numbers of Fini (r2) +EXTERN_C void __unwind(void (**finis)(void), int cnt) +{ + for (int i = 0; i < cnt; ++i) + (finis[i])(); +} +} // namespace cxxkit + +EXTERN_C Int32 EfiMain(EfiHandlePtr handle, EfiSystemTable* SystemTable) +{ + SystemTable->ConOut->OutputString(SystemTable->ConOut, L"HCoreLdr: C++ Runtime Add-in\r\n"); + + return kEfiOk; +} \ No newline at end of file diff --git a/Private/NewBoot/CxxRuntime/unwind.cxx b/Private/NewBoot/CxxRuntime/unwind.cxx deleted file mode 100644 index 4f8807cd..00000000 --- a/Private/NewBoot/CxxRuntime/unwind.cxx +++ /dev/null @@ -1,8 +0,0 @@ -namespace cxxkit { -///! @brief C++ ABI unwinding -///! Fini array (r1) -///! Numbers of Fini (r2) -extern "C" void __unwind(void (**finis)(void), int cnt) { - for (int i = 0; i < cnt; ++i) (finis[i])(); -} -} // namespace cxxkit diff --git a/Private/NewBoot/NetBoot/EfiModule.cxx b/Private/NewBoot/NetBoot/EfiModule.cxx index 36a7288c..42415dc7 100644 --- a/Private/NewBoot/NetBoot/EfiModule.cxx +++ b/Private/NewBoot/NetBoot/EfiModule.cxx @@ -9,6 +9,7 @@ #include -extern "C" Int32 EfiMain(EfiHandlePtr handle, EfiSystemTable* SystemTable) { +EXTERN_C Int32 EfiMain(EfiHandlePtr handle, EfiSystemTable* SystemTable) +{ return kEfiOk; } -- cgit v1.2.3