mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +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:
parent
89851a9ded
commit
f67d695254
10 changed files with 339 additions and 66 deletions
|
@ -19,9 +19,33 @@ enum Function {
|
|||
};
|
||||
|
||||
void initialize();
|
||||
DWORD invoke(DWORD function);
|
||||
DWORD invoke(DWORD function, DWORD arg1);
|
||||
DWORD invoke(DWORD function, DWORD arg1, DWORD arg2);
|
||||
DWORD invoke(DWORD function, DWORD arg1, DWORD arg2, DWORD arg3);
|
||||
|
||||
inline DWORD invoke(DWORD function)
|
||||
{
|
||||
DWORD result;
|
||||
asm("int $0x80":"=a"(result):"a"(function));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline DWORD invoke(DWORD function, DWORD arg1)
|
||||
{
|
||||
DWORD result;
|
||||
asm("int $0x80":"=a"(result):"a"(function),"d"(arg1));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline DWORD invoke(DWORD function, DWORD arg1, DWORD arg2)
|
||||
{
|
||||
DWORD result;
|
||||
asm("int $0x80":"=a"(result):"a"(function),"d"(arg1),"c"(arg2));
|
||||
return result;
|
||||
}
|
||||
|
||||
inline 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue