It's been too long since I committed
[tpg/acess2.git] / Kernel / arch / x86_64 / include / arch.h
index 0dc9927..48d19ca 100644 (file)
@@ -6,7 +6,8 @@
 #define _ARCH_H_
 
 #include <stdint.h>
-#define KERNEL_BASE    0xFFFF8000##00000000
+//#define KERNEL_BASE  0xFFFF8000##00000000
+#define KERNEL_BASE    0xFFFFFFFF##80000000
 #define BITS   64
 
 // === Core Types ===
@@ -24,20 +25,20 @@ typedef signed long long int        Sint64;
 typedef unsigned long long int Uint64;
 #endif
 
+typedef Sint64 Sint;
 typedef Uint64 Uint;
 typedef Uint64 tPAddr;
 typedef Uint64 tVAddr;
 
-//typedef unsigned int size_t;
 typedef Uint64 size_t;
 
 typedef volatile int    tSpinlock;
 #define IS_LOCKED(lockptr)      (!!(*(tSpinlock*)lockptr))
 #define LOCK(lockptr)   do {int v=1;\
        while(v)\
-       __asm__ __volatile__("lock xchgl %%eax, (%%rdi)":"=a"(v):"a"(1),"D"(lockptr));\
+       __asm__ __volatile__("lock xchgl %0, (%2)":"=r"(v):"r"(1),"r"(lockptr));\
        }while(0)
-#define RELEASE(lockptr)       __asm__ __volatile__("lock andl $0, (%%rdi)"::"D"(lockptr));
+#define RELEASE(lockptr)       __asm__ __volatile__("lock andl $0, (%0)"::"r"(lockptr));
 #define HALT()  __asm__ __volatile__ ("hlt")
 
 // Systemcall Registers

UCC git Repository :: git.ucc.asn.au