replace nob with ms' build, move disk creation to build.bat, major comment cleanup, remove old and stupid tests, overhaul interrupt management with per-CPU vector allocation, affinity migration and safe teardown, add proper IOAPIC routing and PCI MSI/MSI-X/INTx support, migrate drivers to the new interrupt API, integrate ACPICA with a proper OS services layer, move ACPI firmware events, power button handling and S5 shutdown into acpi.sys, add parallel driver startup and atomic publication, replace PnP arrays with dynamic lists, redesign service startup again to be asynchronous, add delayed startup mode for services, allow omitting keys in services.ini, fix acpi ec deferred work handling, fix kernel threads having garbage exit code.
This commit is contained in:
1 parent
d36f19509c
commit
36eef8f58d
696 files changed
+147281
-7530
No files matched your search
@@ -16,37 +16,30 @@ static const IO_DRIVER_ID_TABLE gAtaIdTable = {
|
||||
sizeof(gAtaIds) / sizeof(gAtaIds[0]),
|
||||
};
|
||||
|
||||
// Implements the in8 operation.
|
||||
static uint8_t AtaIn8(ATA_CHANNEL* ch, uint8_t reg) {
|
||||
return __inbyte((unsigned short)(ch->CommandBase + reg));
|
||||
}
|
||||
|
||||
// Implements the in16 operation.
|
||||
static uint16_t AtaIn16(ATA_CHANNEL* ch, uint8_t reg) {
|
||||
return __inword((unsigned short)(ch->CommandBase + reg));
|
||||
}
|
||||
|
||||
// Implements the out8 operation.
|
||||
static void AtaOut8(ATA_CHANNEL* ch, uint8_t reg, uint8_t value) {
|
||||
__outbyte((unsigned short)(ch->CommandBase + reg), value);
|
||||
}
|
||||
|
||||
// Implements the out16 operation.
|
||||
static void AtaOut16(ATA_CHANNEL* ch, uint8_t reg, uint16_t value) {
|
||||
__outword((unsigned short)(ch->CommandBase + reg), value);
|
||||
}
|
||||
|
||||
// Implements the alt Status operation.
|
||||
static uint8_t AtaAltStatus(ATA_CHANNEL* ch) {
|
||||
return __inbyte((unsigned short)(ch->ControlBase + ATA_REG_ALT_STATUS));
|
||||
}
|
||||
|
||||
// Implements the device Control operation.
|
||||
static void AtaDeviceControl(ATA_CHANNEL* ch, uint8_t value) {
|
||||
__outbyte((unsigned short)(ch->ControlBase + ATA_REG_DEVICE_CONTROL), value);
|
||||
}
|
||||
|
||||
// Implements the delay400ns operation.
|
||||
static void AtaDelay400ns(ATA_CHANNEL* ch) {
|
||||
(void)AtaAltStatus(ch);
|
||||
(void)AtaAltStatus(ch);
|
||||
@@ -142,7 +135,6 @@ static KSTATUS AtaResetChannel(ATA_CHANNEL* ch) {
|
||||
return status;
|
||||
}
|
||||
|
||||
// Implements the select Drive operation.
|
||||
static void AtaSelectDrive(ATA_DEVICE* dev) {
|
||||
ATA_CHANNEL* ch = dev->Channel;
|
||||
AtaOut8(ch, ATA_REG_DRIVE_HEAD, (uint8_t)(0xA0u | (dev->Drive ? 0x10u : 0u)));
|
||||
@@ -241,7 +233,6 @@ static KSTATUS AtaIdentify(ATA_DEVICE* dev) {
|
||||
return dev->SectorCount ? NTLSTATUS_SUCCESS : NTLSTATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
// Implements the program Lba operation.
|
||||
static KSTATUS AtaProgramLba(ATA_DEVICE* dev, uint64_t lba, uint16_t count, bool write) {
|
||||
ATA_CHANNEL* ch = dev->Channel;
|
||||
|
||||
@@ -407,7 +398,6 @@ static KSTATUS AtaGetIrpReadWrite(IRP* irp, bool* outWrite, uint64_t* outLba,
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Implements the worker operation.
|
||||
static void AtaWorker(uintptr_t arg) {
|
||||
ATA_DEVICE* dev = (ATA_DEVICE*)arg;
|
||||
if (!dev)
|
||||
@@ -572,7 +562,6 @@ static uint8_t AtaFindFreeDiskIndex(void) {
|
||||
return 0xFFu;
|
||||
}
|
||||
|
||||
// Implements the bar Io Base operation.
|
||||
static uint16_t AtaBarIoBase(ATA_CONTROLLER* ctl, uint8_t barIndex, uint16_t fallback) {
|
||||
PCI_BAR bar;
|
||||
KSTATUS st = PciGetBar(ctl->Pdo, barIndex, &bar);
|
||||
@@ -709,7 +698,6 @@ static KSTATUS AtaProbeDrive(ATA_CONTROLLER* ctl, ATA_CHANNEL* ch, uint8_t drive
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Registers controller.
|
||||
static KSTATUS AtaRegisterController(ATA_CONTROLLER* ctl) {
|
||||
if (!ctl) return NTLSTATUS_INVALID_PARAMETER;
|
||||
for (uint32_t i = 0; i < gAtaControllerCount; i++) {
|
||||
@@ -895,7 +883,6 @@ KSTATUS AtaDispatchPnp(DEVICE_OBJECT* device, IRP* irp) {
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
// Implements the add Device operation.
|
||||
KSTATUS AtaAddDevice(DRIVER_OBJECT* driver, DEVICE_OBJECT* physicalDeviceObject) {
|
||||
if (!driver || !physicalDeviceObject || physicalDeviceObject->Type != DeviceObjectPhysical)
|
||||
return NTLSTATUS_INVALID_PARAMETER;
|
||||
|
||||
Reference in new issue
Block a user