1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

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
parent 89851a9ded
commit f67d695254
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) {