diff options
| -rw-r--r-- | Private/CFKit/GUIDWrapper.hpp | 67 | ||||
| -rw-r--r-- | Private/CRT/__cxxkit_cookie.asm | 23 | ||||
| -rw-r--r-- | Private/CRT/__cxxkit_defines.h | 10 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/Processor.cpp | 5 | ||||
| -rw-r--r-- | Private/Linker/16x0.json | 6 | ||||
| -rw-r--r-- | Private/Linker/32x0.json | 6 | ||||
| -rw-r--r-- | Private/Linker/64x0.json | 6 | ||||
| -rw-r--r-- | Private/NewBoot/BootKit/Protocol.hxx | 8 |
8 files changed, 58 insertions, 73 deletions
diff --git a/Private/CFKit/GUIDWrapper.hpp b/Private/CFKit/GUIDWrapper.hpp index f332e119..15e59d1c 100644 --- a/Private/CFKit/GUIDWrapper.hpp +++ b/Private/CFKit/GUIDWrapper.hpp @@ -20,40 +20,43 @@ // eXtensible Resource Information namespace hCore::XRN { - union GUIDSequence +union GUIDSequence { + alignas(8) UShort u8[16]; + alignas(8) UShort u16[8]; + alignas(8) UInt u32[4]; + alignas(8) ULong u64[2]; + + struct { - alignas(8) UShort u8[16]; - alignas(8) UShort u16[8]; - alignas(8) UInt u32[4]; - alignas(8) ULong u64[2]; - - struct - { - alignas(8) UInt m_Ms1; - UShort m_Ms2; - UShort m_Ms3; - UChar m_Ms4[8]; - }; + alignas(8) UInt m_Ms1; + UShort m_Ms2; + UShort m_Ms3; + UChar m_Ms4[8]; }; +}; + +class GUID final +{ + public: + explicit GUID() = default; + ~GUID() = default; + + public: + GUID &operator=(const GUID &) = default; + GUID(const GUID &) = default; - class GUID final + public: + GUIDSequence &operator->() noexcept { - public: - explicit GUID() = default; - ~GUID() = default; - - public: - GUID &operator=(const GUID &) = default; - GUID(const GUID &) = default; - - public: - GUIDSequence &operator->() - { - return m_UUID; - } - - private: - GUIDSequence m_UUID; - - }; + return m_UUID; + } + + GUIDSequence &Leak() noexcept + { + return m_UUID; + } + + private: + GUIDSequence m_UUID; +}; } // namespace hCore::XRN diff --git a/Private/CRT/__cxxkit_cookie.asm b/Private/CRT/__cxxkit_cookie.asm deleted file mode 100644 index 9e2292fa..00000000 --- a/Private/CRT/__cxxkit_cookie.asm +++ /dev/null @@ -1,23 +0,0 @@ -[bits 64] -[global runtime_cookie_check] - -%define LIBALLOC_COOKIE 0x77ccdd - -runtime_cookie_check: - ret - -runtime_cookie_install: - push LIBALLOC_COOKIE ;; the cookie - jmp rdi - cmp rsp, LIBALLOC_COOKIE - jne _runtime_cookie_fail - ret - -_runtime_cookie_fail: - mov rsi, 1 - mov rdi, 33 - syscall - -;; we shouldn't get here if the host has exit (rsi = 1) implemented. -L0: - jmp $
\ No newline at end of file diff --git a/Private/CRT/__cxxkit_defines.h b/Private/CRT/__cxxkit_defines.h index 9726bf18..b36e9ba0 100644 --- a/Private/CRT/__cxxkit_defines.h +++ b/Private/CRT/__cxxkit_defines.h @@ -7,8 +7,8 @@ * ======================================================== */ -#ifndef __CXKIT_DEF_H -#define __CXKIT_DEF_H +#ifndef __CXKIT_DEF__ +#define __CXKIT_DEF__ typedef __SIZE_TYPE__ size_t; @@ -66,7 +66,7 @@ typedef char *caddr_t; typedef long long off_t; typedef unsigned long long uoff_t; -typedef union { +typedef union float_cast { struct { unsigned int mantissa : 23; @@ -77,7 +77,7 @@ typedef union { float f; } __attribute__((packed)) float_cast_t; -typedef union { +typedef union double_cast { struct { unsigned long long int mantissa : 52; @@ -88,4 +88,4 @@ typedef union { double f; } __attribute__((packed)) double_cast_t; -#endif /* __CXKIT_DEF_H */ +#endif /* __CXKIT_DEF__ */ diff --git a/Private/HALKit/AMD64/Processor.cpp b/Private/HALKit/AMD64/Processor.cpp index c70c7959..4e1216e6 100644 --- a/Private/HALKit/AMD64/Processor.cpp +++ b/Private/HALKit/AMD64/Processor.cpp @@ -9,6 +9,11 @@ #include <HALKit/AMD64/Processor.hpp> +/** + * @file Processor.cpp + * @brief This file is about processor specific functions (in/out...) + */ + namespace hCore::HAL { void out8(UInt16 port, UInt8 value) diff --git a/Private/Linker/16x0.json b/Private/Linker/16x0.json index f81ba5c6..93088842 100644 --- a/Private/Linker/16x0.json +++ b/Private/Linker/16x0.json @@ -1,6 +1,6 @@ { "executable_type": "kernel", - "output_name": "hKernel.out", - "start_proc": "KMain", + "output_name": "hKernel.efi", + "start_proc": "Main", "format": "PEF" -}
\ No newline at end of file +} diff --git a/Private/Linker/32x0.json b/Private/Linker/32x0.json index f81ba5c6..93088842 100644 --- a/Private/Linker/32x0.json +++ b/Private/Linker/32x0.json @@ -1,6 +1,6 @@ { "executable_type": "kernel", - "output_name": "hKernel.out", - "start_proc": "KMain", + "output_name": "hKernel.efi", + "start_proc": "Main", "format": "PEF" -}
\ No newline at end of file +} diff --git a/Private/Linker/64x0.json b/Private/Linker/64x0.json index f81ba5c6..93088842 100644 --- a/Private/Linker/64x0.json +++ b/Private/Linker/64x0.json @@ -1,6 +1,6 @@ { "executable_type": "kernel", - "output_name": "hKernel.out", - "start_proc": "KMain", + "output_name": "hKernel.efi", + "start_proc": "Main", "format": "PEF" -}
\ No newline at end of file +} diff --git a/Private/NewBoot/BootKit/Protocol.hxx b/Private/NewBoot/BootKit/Protocol.hxx index 7e292c7d..b33ab32e 100644 --- a/Private/NewBoot/BootKit/Protocol.hxx +++ b/Private/NewBoot/BootKit/Protocol.hxx @@ -17,10 +17,10 @@ using namespace hCore; struct HandoverHeader final { - Int32 magic; - Int32 type; - Int32 arch; - // WIP + Int32 targetMagic; + Int32 targetType; + Int32 targetArch; + UIntPtr protocolHeaderTable; }; } // namespace HEL |
