mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Added new kernel param
This commit is contained in:
parent
ac88a1edb7
commit
546efd37d0
@ -74,7 +74,7 @@ namespace Interrupts
|
|||||||
{
|
{
|
||||||
// TODO: This function is called by SMP too. Do not initialize timers that doesn't support multiple cores.
|
// TODO: This function is called by SMP too. Do not initialize timers that doesn't support multiple cores.
|
||||||
apic[Core] = new APIC::APIC(Core);
|
apic[Core] = new APIC::APIC(Core);
|
||||||
if (Core == 0) // Redirect IRQs to the BSP
|
if (Core == Config.IOAPICInterruptCore) // Redirect IRQs to the specified core.
|
||||||
((APIC::APIC *)apic[Core])->RedirectIRQs(Core);
|
((APIC::APIC *)apic[Core])->RedirectIRQs(Core);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
18
KConfig.cpp
18
KConfig.cpp
@ -36,6 +36,12 @@ static struct cag_option ConfigOptions[] = {
|
|||||||
.value_name = "VALUE",
|
.value_name = "VALUE",
|
||||||
.description = "Number of cores to use (0 = all; 1 is the first code, not 0)"},
|
.description = "Number of cores to use (0 = all; 1 is the first code, not 0)"},
|
||||||
|
|
||||||
|
{.identifier = 'p',
|
||||||
|
.access_letters = "pP",
|
||||||
|
.access_name = "ioapicirq",
|
||||||
|
.value_name = "VALUE",
|
||||||
|
.description = "Which core will be used for I/O APIC interrupts"},
|
||||||
|
|
||||||
{.identifier = 't',
|
{.identifier = 't',
|
||||||
.access_letters = "tT",
|
.access_letters = "tT",
|
||||||
.access_name = "tasking",
|
.access_name = "tasking",
|
||||||
@ -77,11 +83,12 @@ KernelConfig ParseConfig(char *Config)
|
|||||||
int argc = 0;
|
int argc = 0;
|
||||||
char **argv = nullptr;
|
char **argv = nullptr;
|
||||||
|
|
||||||
struct KernelConfig config = {Memory::MemoryAllocatorType::Pages,
|
struct KernelConfig config = {Memory::MemoryAllocatorType::XallocV1,
|
||||||
0,
|
0,
|
||||||
{'/', 's', 'y', 's', 't', 'e', 'm', '/', 'd', 'r', 'i', 'v', 'e', 'r', 's', '\0'},
|
{'/', 's', 'y', 's', 't', 'e', 'm', '/', 'd', 'r', 'i', 'v', 'e', 'r', 's', '\0'},
|
||||||
{'/', 's', 'y', 's', 't', 'e', 'm', '/', 'i', 'n', 'i', 't', '\0'},
|
{'/', 's', 'y', 's', 't', 'e', 'm', '/', 'i', 'n', 'i', 't', '\0'},
|
||||||
false,
|
true,
|
||||||
|
0,
|
||||||
0,
|
0,
|
||||||
false};
|
false};
|
||||||
|
|
||||||
@ -320,6 +327,13 @@ ParseSuccess:
|
|||||||
config.Cores = atoi(value);
|
config.Cores = atoi(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'p':
|
||||||
|
{
|
||||||
|
value = cag_option_get_value(&context);
|
||||||
|
KPrint("\eAAFFAARedirecting I/O APIC interrupts to %s%s", atoi(value) ? "core " : "", atoi(value) ? value : "BSP");
|
||||||
|
config.IOAPICInterruptCore = atoi(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 't':
|
case 't':
|
||||||
{
|
{
|
||||||
value = cag_option_get_value(&context);
|
value = cag_option_get_value(&context);
|
||||||
|
@ -12,6 +12,7 @@ struct KernelConfig
|
|||||||
char InitPath[256];
|
char InitPath[256];
|
||||||
bool InterruptsOnCrash;
|
bool InterruptsOnCrash;
|
||||||
int Cores;
|
int Cores;
|
||||||
|
int IOAPICInterruptCore;
|
||||||
bool UnlockDeadLock;
|
bool UnlockDeadLock;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user