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
@@ -98,7 +98,6 @@ static KSTATUS FatCacheRead(FAT_VOL* v, uint64_t lba, uint8_t** out) {
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Implements the fat Cache Mark Dirty operation.
|
||||
static void FatCacheMarkDirty(FAT_VOL* v, uint64_t lba) {
|
||||
uint32_t slot = (uint32_t)(lba % FAT_CACHE_SLOTS);
|
||||
if (gFatCache[slot].valid && gFatCache[slot].vol == v && gFatCache[slot].lba == lba)
|
||||
@@ -231,7 +230,6 @@ bool FatDirectoryNextSegment(FAT_VOL* v, uint32_t dirCluster,
|
||||
return true;
|
||||
}
|
||||
|
||||
// Implements the cluster To Lba operation.
|
||||
uint64_t FatClusterToLba(FAT_VOL* v, uint32_t cluster) {
|
||||
return v->DataStart + (uint64_t)(cluster - 2) * v->SectorsPerCluster;
|
||||
}
|
||||
@@ -390,12 +388,10 @@ void FatFreeClusterChain(FAT_VOL* v, uint32_t start) {
|
||||
|
||||
// FAT timestamp and DIRENT metadata helpers.
|
||||
|
||||
// Implements the fat Is Leap Year operation.
|
||||
static bool FatIsLeapYear(uint32_t year) {
|
||||
return ((year % 4u) == 0u && (year % 100u) != 0u) || ((year % 400u) == 0u);
|
||||
}
|
||||
|
||||
// Implements the fat Days In Month operation.
|
||||
static uint32_t FatDaysInMonth(uint32_t year, uint32_t month) {
|
||||
static const uint8_t days[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
|
||||
if (month < 1u || month > 12u) return 31u;
|
||||
@@ -414,13 +410,11 @@ static uint64_t FatCalendarToEpochSeconds(uint32_t year, uint32_t month, uint32_
|
||||
return (((days * 24u) + hour) * 60u + minute) * 60u + second;
|
||||
}
|
||||
|
||||
// Implements the fat Day Of Week operation.
|
||||
static uint8_t FatDayOfWeek(uint32_t year, uint32_t month, uint32_t day) {
|
||||
uint64_t epoch = FatCalendarToEpochSeconds(year, month, day, 0, 0, 0);
|
||||
return (uint8_t)(((epoch / 86400u) + 4u) % 7u);
|
||||
}
|
||||
|
||||
// Implements the fat Encode Date operation.
|
||||
static uint16_t FatEncodeDate(const SYS_SYSTEM_TIME* t) {
|
||||
uint32_t year = t && t->Year ? t->Year : 1980u;
|
||||
uint32_t month = t && t->Month ? t->Month : 1u;
|
||||
@@ -435,7 +429,6 @@ static uint16_t FatEncodeDate(const SYS_SYSTEM_TIME* t) {
|
||||
return (uint16_t)(((year - 1980u) << 9) | (month << 5) | day);
|
||||
}
|
||||
|
||||
// Implements the fat Encode Time operation.
|
||||
static uint16_t FatEncodeTime(const SYS_SYSTEM_TIME* t) {
|
||||
uint32_t hour = t ? t->Hour : 0u;
|
||||
uint32_t minute = t ? t->Minute : 0u;
|
||||
@@ -446,7 +439,6 @@ static uint16_t FatEncodeTime(const SYS_SYSTEM_TIME* t) {
|
||||
return (uint16_t)((hour << 11) | (minute << 5) | (second / 2u));
|
||||
}
|
||||
|
||||
// Implements the fat Encode Create Time Tenth operation.
|
||||
static uint8_t FatEncodeCreateTimeTenth(const SYS_SYSTEM_TIME* t) {
|
||||
uint32_t second = t ? t->Second : 0u;
|
||||
uint32_t ms = t ? t->Millisecond : 0u;
|
||||
@@ -457,7 +449,6 @@ static uint8_t FatEncodeCreateTimeTenth(const SYS_SYSTEM_TIME* t) {
|
||||
return (uint8_t)v;
|
||||
}
|
||||
|
||||
// Implements the fat Query Encoded Time operation.
|
||||
void FatQueryEncodedTime(FAT_ENCODED_TIME* out) {
|
||||
SYS_SYSTEM_TIME now;
|
||||
memset(&now, 0, sizeof(now));
|
||||
@@ -502,7 +493,6 @@ void FatDecodeDateTime(uint16_t date, uint16_t time, uint8_t createTenth,
|
||||
out->EpochSeconds = FatCalendarToEpochSeconds(year, month, day, hour, minute, second);
|
||||
}
|
||||
|
||||
// Implements the fat Decode Access Date operation.
|
||||
void FatDecodeAccessDate(uint16_t date, SYS_SYSTEM_TIME* out) {
|
||||
FatDecodeDateTime(date, 0, 0, out);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user