Get super basic ring3 task switching working

* It looks like UEFI enables SSE, so we need to tell clang -mno-sse for
  now to not use XMM* until we're ready to save them.
* SYSCALL is working from ring3 tasks, calling console printf!
This commit is contained in:
Justin C. Miller
2018-05-21 01:00:34 -07:00
parent e6f819ed90
commit 2597e2002b
4 changed files with 19 additions and 57 deletions

View File

@@ -18,11 +18,7 @@ char taskBstack3[stack_size];
uint64_t taskAcount = 0;
extern "C" void taskA();
void taskB()
{
while (1);
}
extern "C" void taskB();
scheduler::scheduler(lapic *apic) :
@@ -68,6 +64,8 @@ create_process(uint16_t pid, void *stack0, void *stack3, void (*rip)())
void
scheduler::start()
{
log::info(logs::task, "Starting scheduler.");
m_apic->enable_timer(isr::isrTimer, 128, quantum, false);
m_processes.append({0, 0}); // The kernel idle task