diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-15 10:40:40 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-15 10:40:40 +0100 |
| commit | 1a844fe4332313983e86efd1f3e41f8a7f73c465 (patch) | |
| tree | 8b008ff5960dc21cab960103b69334e53eebf228 | |
| parent | b3e76bf866b4223390585589786600475c9fdcae (diff) | |
Kernel: Update README and fix MUST_PASS in hal_try_alloc_new_page.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
| -rw-r--r-- | Private/Drivers/README.TXT | 14 | ||||
| -rw-r--r-- | Private/HALKit/AMD64/HalPageAlloc.cpp | 7 |
2 files changed, 14 insertions, 7 deletions
diff --git a/Private/Drivers/README.TXT b/Private/Drivers/README.TXT index d26f409b..e6af72bc 100644 --- a/Private/Drivers/README.TXT +++ b/Private/Drivers/README.TXT @@ -6,10 +6,16 @@ Basic Device Drivers (BDD) 2 - Place them inside Private/Root 3 - And continue your build. - -==================== +=============== What are these? -==================== +=============== These are HCore device drivers. -Running in Ring-3. To let the driver restart in case of a crash. +Some of them are running in Ring-3, to let the driver restart in case of a crash. + +=========== +Maintainers +=========== + +ACPIManager: Amlal EL Mahrouss +AHCI: Amlal EL Mahrouss
\ No newline at end of file diff --git a/Private/HALKit/AMD64/HalPageAlloc.cpp b/Private/HALKit/AMD64/HalPageAlloc.cpp index a52eb646..599810f3 100644 --- a/Private/HALKit/AMD64/HalPageAlloc.cpp +++ b/Private/HALKit/AMD64/HalPageAlloc.cpp @@ -11,15 +11,15 @@ // this files handles paging. -static HCore::SizeT kPageCnt = 0UL; +STATIC HCore::SizeT kPageCnt = 0UL; -#define kKernelPagingPadding 4096 +#define kKernelPagingPadding (4096) namespace HCore { namespace HAL { static auto hal_try_alloc_new_page(SizeT sz, Boolean rw, Boolean user) -> PageTable64 * { - MUST_PASS(sz != 0); + MUST_PASS(sz > 0); PageTable64 *pte = &reinterpret_cast<PageDirectory64 *>((UIntPtr)kKernelVirtualStart)->Pte[0]; @@ -32,6 +32,7 @@ static auto hal_try_alloc_new_page(SizeT sz, Boolean rw, Boolean user) kKernelVirtualStart = (VoidPtr)((UIntPtr)kKernelVirtualStart + kPageCnt + sz + kKernelPagingPadding); + return pte; } |
