Added SIMD option in kernel arguments

This commit is contained in:
Alex 2023-03-13 23:59:55 +02:00
parent 3738e9b018
commit c6e8efa22e
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
3 changed files with 18 additions and 0 deletions

View File

@ -218,6 +218,9 @@ namespace CPU
SSESupport = true; SSESupport = true;
} }
if (!Config.SIMD)
SSESupport = false;
if (PGESupport) if (PGESupport)
{ {
debug("Enabling global pages support..."); debug("Enabling global pages support...");

View File

@ -72,6 +72,12 @@ static struct cag_option ConfigOptions[] = {
.value_name = "BOOL", .value_name = "BOOL",
.description = "Enable Interrupts On Crash. If enabled, the navigation keys will be enabled on crash"}, .description = "Enable Interrupts On Crash. If enabled, the navigation keys will be enabled on crash"},
{.identifier = 's',
.access_letters = NULL,
.access_name = "simd",
.value_name = "BOOL",
.description = "Enable SIMD instructions"},
{.identifier = 'h', {.identifier = 'h',
.access_letters = "h", .access_letters = "h",
.access_name = "help", .access_name = "help",
@ -90,6 +96,7 @@ KernelConfig ParseConfig(char *Config)
true, true,
0, 0,
0, 0,
false,
false}; false};
if (Config == NULL) if (Config == NULL)
@ -382,6 +389,13 @@ ParseSuccess:
KPrint("\eAAFFAAUnlocking the deadlock after 10 retries"); KPrint("\eAAFFAAUnlocking the deadlock after 10 retries");
break; break;
} }
case 's':
{
value = cag_option_get_value(&context);
strcmp(value, "true") ? config.SIMD = false : config.SIMD = true;
KPrint("\eAAFFAASingle Instruction, Multiple Data (SIMD): %s", value);
break;
}
case 'h': case 'h':
{ {
KPrint("\n---------------------------------------------------------------------------\nUsage: kernel.fsys [OPTION]...\nKernel configuration."); KPrint("\n---------------------------------------------------------------------------\nUsage: kernel.fsys [OPTION]...\nKernel configuration.");

View File

@ -14,6 +14,7 @@ struct KernelConfig
int Cores; int Cores;
int IOAPICInterruptCore; int IOAPICInterruptCore;
bool UnlockDeadLock; bool UnlockDeadLock;
bool SIMD;
}; };
KernelConfig ParseConfig(char *Config); KernelConfig ParseConfig(char *Config);