diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-21 13:39:23 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-21 13:39:55 +0100 |
| commit | 051e2cfb8df4f2fc1ef711ca7351e7018b4c6e1c (patch) | |
| tree | bd220c371991418bdb8c0a7de2fc9547c3009708 /Public | |
| parent | 333fed96b7ccd3ee4f5f097445408dde34d330db (diff) | |
unstable: secret: Start work on AHCI driver, getting it to initialize
first.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public')
| -rw-r--r-- | Public/Kits/System.Core/AMD64/HCoreAssemblyRoutines.s | 4 | ||||
| -rw-r--r-- | Public/Kits/System.Core/Defs.hxx | 10 | ||||
| -rw-r--r-- | Public/Kits/System.Core/Heap.hxx | 2 | ||||
| -rw-r--r-- | Public/Kits/System.Core/InitRuntime.cxx | 6 |
4 files changed, 14 insertions, 8 deletions
diff --git a/Public/Kits/System.Core/AMD64/HCoreAssemblyRoutines.s b/Public/Kits/System.Core/AMD64/HCoreAssemblyRoutines.s index 71984042..a61d6d1f 100644 --- a/Public/Kits/System.Core/AMD64/HCoreAssemblyRoutines.s +++ b/Public/Kits/System.Core/AMD64/HCoreAssemblyRoutines.s @@ -4,12 +4,12 @@ .section .text -.globl HcGetProcessObject +.globl HcGetInstanceObject .globl __assert_chk_fail /* @brief Process object getter */ /* @throws: ApptError: appartement error. */ -HcGetProcessObject: +HcGetInstanceObject: mov $0x10, %rcx /* sysGetProcessObject */ int $0x21 diff --git a/Public/Kits/System.Core/Defs.hxx b/Public/Kits/System.Core/Defs.hxx index e99abcc4..6d0fb99a 100644 --- a/Public/Kits/System.Core/Defs.hxx +++ b/Public/Kits/System.Core/Defs.hxx @@ -66,10 +66,10 @@ typedef CHAR BOOL; #define TRUE 1 #define FALSE 0 -#define PTR * +#define CA_PTR * -#define FAR __far -#define NEAR __near +#define CA_FAR __far +#define CA_NEAR __near #define CA_UNREFERENCED_PARAMETER(e) ((VOID)e) @@ -89,6 +89,10 @@ typedef CHAR BOOL; # define _M_64000 5 #endif +#ifdef __riscv__ +# define _M_RISCV 6 +#endif + #define CA_STATIC static #define CA_INLINE inline #define CA_CONST const diff --git a/Public/Kits/System.Core/Heap.hxx b/Public/Kits/System.Core/Heap.hxx index 6bad93e0..ff0fc75a 100644 --- a/Public/Kits/System.Core/Heap.hxx +++ b/Public/Kits/System.Core/Heap.hxx @@ -16,7 +16,7 @@ CA_EXTERN_C PVOID HcAllocateProcessHeap(ObjectPtr refObj, QWORD sz, CA_EXTERN_C BOOL HcProcessHeapExists(ObjectPtr refObj, PVOID ptr); CA_EXTERN_C QWORD HcProcessHeapSize(ObjectPtr refObj, PVOID ptr); CA_EXTERN_C VOID HcFreeProcessHeap(ObjectPtr refObj, PVOID ptr); -CA_EXTERN_C ObjectPtr HcGetProcessObject(void); +CA_EXTERN_C ObjectPtr HcGetInstanceObject(void); enum HcAllocationKind { kStandardAllocation = 0xC, diff --git a/Public/Kits/System.Core/InitRuntime.cxx b/Public/Kits/System.Core/InitRuntime.cxx index 01eb2c1f..8d5596ca 100644 --- a/Public/Kits/System.Core/InitRuntime.cxx +++ b/Public/Kits/System.Core/InitRuntime.cxx @@ -4,9 +4,11 @@ #include <System.Core/Heap.hxx> -/// @brief Inits the C runtime +/// @brief Inits the process runtime /// @return if it was succesful or not. DWORD HcInitRuntime(VOID) { - kInstanceObject = HcGetProcessObject(); + kInstanceObject = HcGetInstanceObject(); + CA_MUST_PASS(kInstanceObject); + return 0; }
\ No newline at end of file |
