diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-06-15 16:03:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-15 16:03:38 +0200 |
| commit | eb9df5eea339812513c25a8d3b2eeb03c633e7ac (patch) | |
| tree | efcdaaa25d08daadcd27e0597a0fb20defc49a23 /dev/kernel/KernelKit | |
| parent | 6511afbf405c31513bc88ab06bca58218610a994 (diff) | |
| parent | f7e5542dc13519cc78c204b4062acb0b71296a58 (diff) | |
Merge pull request #41 from nekernel-org/dev
NeKernel v0.0.3e1
Diffstat (limited to 'dev/kernel/KernelKit')
| -rw-r--r-- | dev/kernel/KernelKit/PCI/IO.h | 4 | ||||
| -rw-r--r-- | dev/kernel/KernelKit/PE.h | 3 | ||||
| -rw-r--r-- | dev/kernel/KernelKit/ThreadLocalStorage.h | 4 | ||||
| -rw-r--r-- | dev/kernel/KernelKit/UserMgr.h | 3 | ||||
| -rw-r--r-- | dev/kernel/KernelKit/UserProcessScheduler.h | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/dev/kernel/KernelKit/PCI/IO.h b/dev/kernel/KernelKit/PCI/IO.h index a7abc163..8ddba334 100644 --- a/dev/kernel/KernelKit/PCI/IO.h +++ b/dev/kernel/KernelKit/PCI/IO.h @@ -56,8 +56,8 @@ inline Array<UShort, Sz> make_ports(UShort base) { } } // namespace Kernel -#ifdef __x86_64__ +#ifdef __NE_AMD64__ #include <KernelKit/PCI/IOArray+AMD64.inl> #else #error Please provide platform specific code for the I/O -#endif // ifdef __x86_64__ +#endif // ifdef __NE_AMD64__ diff --git a/dev/kernel/KernelKit/PE.h b/dev/kernel/KernelKit/PE.h index df5047a3..3aa8fbf2 100644 --- a/dev/kernel/KernelKit/PE.h +++ b/dev/kernel/KernelKit/PE.h @@ -44,8 +44,7 @@ typedef struct LDR_OPTIONAL_HEADER final { Kernel::UInt32 SizeOfUninitializedData; Kernel::UInt32 AddressOfEntryPoint; Kernel::UInt32 BaseOfCode; - Kernel::UInt32 BaseOfData; - Kernel::UInt32 ImageBase; + Kernel::UInt64 ImageBase; Kernel::UInt32 SectionAlignment; Kernel::UInt32 FileAlignment; Kernel::UInt16 MajorOperatingSystemVersion; diff --git a/dev/kernel/KernelKit/ThreadLocalStorage.h b/dev/kernel/KernelKit/ThreadLocalStorage.h index 6c764221..1b8e4821 100644 --- a/dev/kernel/KernelKit/ThreadLocalStorage.h +++ b/dev/kernel/KernelKit/ThreadLocalStorage.h @@ -27,8 +27,8 @@ struct THREAD_INFORMATION_BLOCK; /// @brief Thread Information Block. /// Located in GS on AMD64, other architectures have their own stuff. (64x0, 32x0, ARM64) struct PACKED THREAD_INFORMATION_BLOCK final { - Kernel::Char Cookie[kTLSCookieLen]{0}; //! Thread magic number. - Kernel::VoidPtr Record{nullptr}; //! Thread information record. + Kernel::Char Cookie[kTLSCookieLen]{0}; //! Thread Magic Number. + Kernel::VoidPtr UserData{nullptr}; //! Thread Information Record (User defined canary structure) }; ///! @brief Cookie Sanity check. diff --git a/dev/kernel/KernelKit/UserMgr.h b/dev/kernel/KernelKit/UserMgr.h index ef1cc659..6fa8ba14 100644 --- a/dev/kernel/KernelKit/UserMgr.h +++ b/dev/kernel/KernelKit/UserMgr.h @@ -87,6 +87,9 @@ class User final { Char mUserName[kMaxUserNameLen] = {0}; UInt64 mUserFNV{0UL}; }; + +inline User* kCurrentUser = nullptr; +inline User* kRootUser = nullptr; } // namespace Kernel #endif /* ifndef INC_USER_H */ diff --git a/dev/kernel/KernelKit/UserProcessScheduler.h b/dev/kernel/KernelKit/UserProcessScheduler.h index 7c994726..5bc5b8d2 100644 --- a/dev/kernel/KernelKit/UserProcessScheduler.h +++ b/dev/kernel/KernelKit/UserProcessScheduler.h @@ -228,8 +228,6 @@ class UserProcessHelper final { STATIC ErrorOr<PID> TheCurrentPID(); STATIC SizeT StartScheduling(); }; - -const UInt32& sched_get_exit_code(void) noexcept; } // namespace Kernel #include <KernelKit/ThreadLocalStorage.h> |
