1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:47: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:
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

@ -11,6 +11,7 @@
//#define TASK_SANITY_CHECKS
class FileHandle;
class Zone;
class Task : public InlineLinkedListNode<Task> {
friend class InlineLinkedListNode<Task>;
@ -97,6 +98,9 @@ public:
static void taskDidCrash(Task*);
private:
friend class MemoryManager;
bool mapZone(LinearAddress, RetainPtr<Zone>&&);
FileHandle* openFile(String&&);
void allocateLDT();
@ -120,6 +124,13 @@ private:
Vector<OwnPtr<FileHandle>> m_fileHandles;
RingLevel m_ring { Ring0 };
int m_error { 0 };
struct MappedZone {
LinearAddress linearAddress;
RetainPtr<Zone> zone;
};
Vector<MappedZone> m_mappedZones;
};
extern void task_init();