diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-18 09:04:13 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-18 09:04:13 +0100 |
| commit | ed6d2f6007b572b907e3cb11b4303c13d1572c9c (patch) | |
| tree | 47f177336db980a138a91a2fb109db8f1a65086c /src/boot | |
| parent | 3a5c7473910156051951f8ec98488a6c91a3eabd (diff) | |
chore: specification updates and patches on the DDK, new source `ddk_c++.cc`.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/boot')
| -rw-r--r-- | src/boot/src/BootThread.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/boot/src/BootThread.cc b/src/boot/src/BootThread.cc index 336c5f9e..7d3beba8 100644 --- a/src/boot/src/BootThread.cc +++ b/src/boot/src/BootThread.cc @@ -15,6 +15,7 @@ #include <KernelKit/PEF.h> #include <modules/CoreGfx/TextGfx.h> +// \brief This macro defines the maximum size of a image's stack. #define kBootThreadSz mib_cast(16) /// @brief External boot services symbol. @@ -26,9 +27,8 @@ namespace Boot { EXTERN_C Int32 rt_jump_to_address(VoidPtr code, HEL::BootInfoHeader* handover, UInt8* stack); BootThread::BootThread(VoidPtr blob) : fStartAddress(nullptr), fBlob(blob) { - // detect the format. - const Char* blob_bytes = reinterpret_cast<char*>(fBlob); - + // detect the image format (PEF, PE32, etc.) + const Char* blob_bytes = static_cast<Char*>(fBlob); BootTextWriter writer; if (!blob_bytes) { @@ -151,11 +151,12 @@ BootThread::BootThread(VoidPtr blob) : fStartAddress(nullptr), fBlob(blob) { blob_bytes[2] == kPefMagic[2] && blob_bytes[3] == kPefMagic[3]) { // ========================================= // // PEF executable has been detected. + // This is stricly firmware level, by convention we only accept PE32+ here. // ========================================= // fStartAddress = nullptr; - writer.Write("BootZ: PEF executable detected, won't load it.\r"); + writer.Write("BootZ: PEF executable detected, BootZ won't load it.\r"); writer.Write("BootZ: note: PEF executables aren't supported for now.\r"); } else { writer.Write("BootZ: Invalid Executable.\r"); @@ -215,4 +216,4 @@ Void BootThread::SetName(const Char* name) { bool BootThread::IsValid() { return fStartAddress != nullptr; } -} // namespace Boot
\ No newline at end of file +} // namespace Boot |
