More paging stuff.

The test userspace process now runs at linear address 0x300000 which is
mapped to a dynamically allocated page from the MemoryManager. Cool!
This commit is contained in:
Andreas Kling 2018-10-18 13:05:00 +02:00
commit f67d695254
Notes: sideshowbarker 2024-07-19 18:46:28 +09:00
10 changed files with 339 additions and 66 deletions

View file

@ -45,34 +45,6 @@ void initialize()
kprintf("syscall: int 0x80 handler installed\n");
}
DWORD invoke(DWORD function)
{
DWORD result;
asm("int $0x80":"=a"(result):"a"(function));
return result;
}
DWORD invoke(DWORD function, DWORD arg1)
{
DWORD result;
asm("int $0x80":"=a"(result):"a"(function),"d"(arg1));
return result;
}
DWORD invoke(DWORD function, DWORD arg1, DWORD arg2)
{
DWORD result;
asm("int $0x80":"=a"(result):"a"(function),"d"(arg1),"c"(arg2));
return result;
}
DWORD invoke(DWORD function, DWORD arg1, DWORD arg2, DWORD arg3)
{
DWORD result;
asm volatile("int $0x80":"=a"(result):"a"(function),"d"(arg1),"c"(arg2),"b"(arg3));
return result;
}
DWORD handle(DWORD function, DWORD arg1, DWORD arg2, DWORD arg3)
{
switch (function) {