Originally Posted by
Salem
So aside from "__attribute__((aligned(PAGESIZE)))", do you know what it says?
Because if you don't, I don't see how you're ready for where this is going.
I didn't quite get your question,,, but I think you are asking the structure of the pagetable.
It should be something like:
- the first entry is the page directory entry which you can get from a virtual address by
Code:
#define L1PAGEINDEX( (uintptr_t) va >> 22)
- I use the l1 page index to index the pagetable and get the pagetable entry.
Code:
/* for instance to check the access rights */
#define PTE_U ((x86_pageentry_t) 4)
kernel_pagetable[L1PAGEINDEX(va)] & PTE_U;
Well, I guess this should be done by 'anding' the bits from the 'page directory' entry and those from the 'page table entry'.
And of course I am missing a lot of other stuff.
I have no idea I am not rambling.