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
@@ -15,7 +15,6 @@ static char FatUpperChar(char c);
|
||||
static bool FatIsLowerChar(char c);
|
||||
static bool FatIsValidShortChar(char c);
|
||||
|
||||
// Implements the make83 Name V operation.
|
||||
static void Make83NameV(SYS_STRING_VIEW src, char name8[8], char ext3[3]) {
|
||||
memset(name8, ' ', 8);
|
||||
memset(ext3, ' ', 3);
|
||||
@@ -48,17 +47,14 @@ static void Make83NameV(SYS_STRING_VIEW src, char name8[8], char ext3[3]) {
|
||||
|
||||
// LFN assembly / matching.
|
||||
|
||||
// Implements the fat Upper Char operation.
|
||||
static char FatUpperChar(char c) {
|
||||
return (c >= 'a' && c <= 'z') ? (char)(c - 32) : c;
|
||||
}
|
||||
|
||||
// Implements the fat Is Lower Char operation.
|
||||
static bool FatIsLowerChar(char c) {
|
||||
return c >= 'a' && c <= 'z';
|
||||
}
|
||||
|
||||
// Implements the fat Is Valid Short Char operation.
|
||||
static bool FatIsValidShortChar(char c) {
|
||||
c = FatUpperChar(c);
|
||||
if (c >= 'A' && c <= 'Z') return true;
|
||||
@@ -96,14 +92,12 @@ static bool FatNameIsStructurallyShort83V(SYS_STRING_VIEW name) {
|
||||
return baseLen >= 1 && baseLen <= 8 && extLen <= 3;
|
||||
}
|
||||
|
||||
// Implements the fat Component Has Lower V operation.
|
||||
static bool FatComponentHasLowerV(SYS_STRING_VIEW name, size_t start, size_t end) {
|
||||
for (size_t i = start; i < end; i++)
|
||||
if (FatIsLowerChar(name.Data[i])) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Implements the fat Component Has Upper V operation.
|
||||
static bool FatComponentHasUpperV(SYS_STRING_VIEW name, size_t start, size_t end) {
|
||||
for (size_t i = start; i < end; i++)
|
||||
if (name.Data[i] >= 'A' && name.Data[i] <= 'Z') return true;
|
||||
@@ -144,7 +138,6 @@ static bool FatNameNeedsLfnForCreateV(SYS_STRING_VIEW name) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Implements the fat Short Name Case Flags V operation.
|
||||
static uint8_t FatShortNameCaseFlagsV(SYS_STRING_VIEW name) {
|
||||
if (!FatNameIsStructurallyShort83V(name)) return 0;
|
||||
size_t baseEnd, extStart, extEnd;
|
||||
@@ -160,7 +153,6 @@ static uint8_t FatShortNameCaseFlagsV(SYS_STRING_VIEW name) {
|
||||
return flags;
|
||||
}
|
||||
|
||||
// Implements the lfn Checksum operation.
|
||||
static uint8_t LfnChecksum(const char name8[8], const char ext3[3]) {
|
||||
uint8_t sum = 0;
|
||||
for (int i = 0; i < 11; i++) {
|
||||
@@ -170,7 +162,6 @@ static uint8_t LfnChecksum(const char name8[8], const char ext3[3]) {
|
||||
return sum;
|
||||
}
|
||||
|
||||
// Implements the lfn Set Char operation.
|
||||
static void LfnSetChar(LFN_ENTRY* e, int idx, uint16_t value) {
|
||||
if (idx < 5) e->Name1[idx] = value;
|
||||
else if (idx < 11) e->Name2[idx - 5] = value;
|
||||
@@ -242,7 +233,6 @@ static bool ShortNameExistsRaw(FAT_VOL* v, uint32_t dirCluster,
|
||||
return false;
|
||||
}
|
||||
|
||||
// Implements the fat Alias Append Char operation.
|
||||
static void FatAliasAppendChar(char* dst, int* len, int maxLen, char c) {
|
||||
c = FatUpperChar(c);
|
||||
if (!FatIsValidShortChar(c)) return;
|
||||
@@ -384,7 +374,6 @@ static KSTATUS DeleteLegacyBrokenDotAliasV(FAT_VOL* v, uint32_t dirCluster,
|
||||
return NTLSTATUS_SUCCESS;
|
||||
}
|
||||
|
||||
// Implements the lfn Append operation.
|
||||
void FatLfnAppend(char* lfn, const LFN_ENTRY* e) {
|
||||
int seq = (e->Order & 0x3F) - 1;
|
||||
if (seq < 0 || seq >= (FAT_MAX_LFN / 13)) return;
|
||||
@@ -413,7 +402,6 @@ static bool FatStringViewDataIsPlausible(SYS_STRING_VIEW view) {
|
||||
return data >= 0x10000u;
|
||||
}
|
||||
|
||||
// Implements the name View Is Valid operation.
|
||||
static bool FatNameViewIsValid(SYS_STRING_VIEW name) {
|
||||
if (!FatStringViewDataIsPlausible(name)) return false;
|
||||
if (name.Length == 0 || name.Length >= FAT_MAX_LFN) return false;
|
||||
@@ -424,7 +412,6 @@ static bool FatNameViewIsValid(SYS_STRING_VIEW name) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Implements the lfn Match V operation.
|
||||
static bool LfnMatchV(const char* lfn, SYS_STRING_VIEW want) {
|
||||
if (!lfn || !SysSvIsValid(want)) return false;
|
||||
size_t i = 0;
|
||||
|
||||
Reference in new issue
Block a user