diff options
Diffstat (limited to 'dev/kernel/HALKit')
4 files changed, 5 insertions, 21 deletions
diff --git a/dev/kernel/HALKit/AMD64/HalKernelMain.cc b/dev/kernel/HALKit/AMD64/HalKernelMain.cc index cc346b5c..cc3c8e93 100644 --- a/dev/kernel/HALKit/AMD64/HalKernelMain.cc +++ b/dev/kernel/HALKit/AMD64/HalKernelMain.cc @@ -22,7 +22,7 @@ STATIC Kernel::Void hal_init_scheduler_team() { for (Kernel::SizeT i = 0U; i < Kernel::UserProcessScheduler::The().CurrentTeam().AsArray().Count(); ++i) { - Kernel::UserProcessScheduler::The().CurrentTeam().AsArray()[i] = Kernel::UserProcess(); + Kernel::UserProcessScheduler::The().CurrentTeam().AsArray()[i] = Kernel::Process(); Kernel::UserProcessScheduler::The().CurrentTeam().AsArray()[i].Status = Kernel::ProcessStatusKind::kKilled; } } diff --git a/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitivesAMD64.cc b/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitivesAMD64.cc index dea3b3d4..ba5710e3 100644 --- a/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitivesAMD64.cc +++ b/dev/kernel/HALKit/AMD64/HalSchedulerCorePrimitivesAMD64.cc @@ -14,7 +14,7 @@ namespace Kernel /// @param /***********************************************************************************/ - EXTERN_C Void __zka_pure_call(UserProcess* process) + EXTERN_C Void __zka_pure_call(Process* process) { if (process) process->Crash(); diff --git a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc index f0893e2d..728b20ed 100644 --- a/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc +++ b/dev/kernel/HALKit/AMD64/Storage/AHCI+Generic.cc @@ -66,22 +66,6 @@ STATIC Int32 drv_find_cmd_slot_ahci(HbaPort* port) noexcept; STATIC Void drv_compute_disk_ahci() noexcept; -namespace AHCI::Detail -{ - template <typename RetType> - STATIC RetType* ahci_align_address(RetType* address, Int32 alignement) - { - if (!address) - return nullptr; - - UIntPtr addr = (UIntPtr)address; - - UIntPtr aligned_addr = (addr + alignement - 1) & (~alignement - 1); - - return (RetType*)aligned_addr; - } -} // namespace AHCI::Detail - STATIC Void drv_compute_disk_ahci() noexcept { kSATASectorCount = 0UL; @@ -90,18 +74,18 @@ STATIC Void drv_compute_disk_ahci() noexcept const UInt16 kSzIdent = 512; /// Push it to the stack - UInt16* identify_data = AHCI::Detail::ahci_align_address<UInt16>(new UInt16[kSzIdent], kib_cast(1)); + UInt16* identify_data = new UInt16[kSzIdent]; /// Send AHCI command for identification. drv_std_input_output_ahci<NO, YES, YES>(0, (UInt8*)identify_data, kAHCISectorSize, kSzIdent); /// Extract 48-bit LBA. - UInt64 lba48_sectors = 0; lba48_sectors |= (UInt64)identify_data[100]; lba48_sectors |= (UInt64)identify_data[101] << 16; lba48_sectors |= (UInt64)identify_data[102] << 32; + /// Now verify if lba48 if (lba48_sectors == 0) kSATASectorCount = (identify_data[61] << 16) | identify_data[60]; else diff --git a/dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitivesARM64.cc b/dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitivesARM64.cc index 2f5c92e5..594ee76e 100644 --- a/dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitivesARM64.cc +++ b/dev/kernel/HALKit/ARM64/HalSchedulerCorePrimitivesARM64.cc @@ -14,7 +14,7 @@ namespace Kernel /// @param void
/***********************************************************************************/
- EXTERN_C Void __zka_pure_call(UserProcess* process)
+ EXTERN_C Void __zka_pure_call(Process* process)
{
if (process)
process->Crash();
|
