Fixed struct tss; there is no ss3/sp3.

Moved ptentry/pdentry to arch_vm_translation_map.c and renamed them to
page_table_entry and page_directory_entry.
Fixed a race condition that happened when memory was remapped (which
can currently happen because lock_memory() does not work correctly, and
there might be other conditions as well, like certain vm_store fault
handlers). Now, page table and directory entries are updated atomically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12229 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-04-04 14:07:24 +00:00
parent 311049d751
commit edb5566393
2 changed files with 110 additions and 88 deletions
@@ -24,8 +24,6 @@ struct tss {
uint32 ss1;
uint32 sp2;
uint32 ss2;
uint32 sp3;
uint32 ss3;
uint32 cr3;
uint32 eip, eflags, eax, ecx, edx, ebx, esp, ebp, esi, edi;
uint32 es, cs, ss, ds, fs, gs;
@@ -36,34 +34,6 @@ struct tss {
/**************************************************************************/
typedef struct ptentry { // page table entry
unsigned int present:1;
unsigned int rw:1;
unsigned int user:1;
unsigned int write_through:1;
unsigned int cache_disabled:1;
unsigned int accessed:1;
unsigned int dirty:1;
unsigned int reserved:1;
unsigned int global:1;
unsigned int avail:3;
unsigned int addr:20;
} ptentry;
typedef struct pdentry { // page directory entry
unsigned int present:1;
unsigned int rw:1;
unsigned int user:1;
unsigned int write_through:1;
unsigned int cache_disabled:1;
unsigned int accessed:1;
unsigned int reserved:1;
unsigned int page_size:1;
unsigned int global:1;
unsigned int avail:3;
unsigned int addr:20;
} pdentry;
struct iframe {
unsigned int gs;
unsigned int fs;