Update AHCI.cs

This commit is contained in:
KingLuigi4932 2017-12-28 23:44:05 +03:00 committed by GitHub
parent 9bb48ca0c2
commit cc326d0ce2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,13 +66,12 @@ namespace Cosmos.HAL.BlockDevice
public AHCI(PCIDevice aAHCIDevice)
{
mAHCIDebugger.Send("Something wrong!");
aAHCIDevice.EnableBusMaster(true);
aAHCIDevice.EnableMemory(true);
mABAR = aAHCIDevice.BaseAddressBar[5].BaseAddress;
mGeneric = new GenericRegisters(aAHCIDevice.BaseAddressBar[5].BaseAddress);
mGeneric.GlobalHostControl |= (1U << 31);
mGeneric.GlobalHostControl |= (1U << 31); // Enable AHCI
GetCapabilities();
mPorts.Capacity = (int)NumOfPorts;