git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed i386 build to x86
[tpg/acess2.git]
/
Kernel
/
arch
/
x86_64
/
include
/
arch.h
diff --git
a/Kernel/arch/x86_64/include/arch.h
b/Kernel/arch/x86_64/include/arch.h
index
038b638
..
bde7abd
100644
(file)
--- a/
Kernel/arch/x86_64/include/arch.h
+++ b/
Kernel/arch/x86_64/include/arch.h
@@
-6,12
+6,13
@@
#define _ARCH_H_
//#include <stdint.h>
#define _ARCH_H_
//#include <stdint.h>
-
//#define KERNEL_BASE 0xFFFF8000##00000
000
+
#define USER_MAX 0x00007FFF##FFFFF
000
#define KERNEL_BASE 0xFFFFFFFF##80000000
#define BITS 64
#define KERNEL_BASE 0xFFFFFFFF##80000000
#define BITS 64
+#define PAGE_SIZE 0x1000
-#define STACKED_LOCKS
0
-#define LOCK_DISABLE_INTS
1
+#define STACKED_LOCKS
2 // 0: No, 1: Per-CPU, 2: Per-Thread
+#define LOCK_DISABLE_INTS
0
#define INVLPTR ((void*)0x0FFFFFFFFFFFFFFFULL)
#define INVLPTR ((void*)0x0FFFFFFFFFFFFFFFULL)
@@
-61,20
+62,17
@@
typedef struct sSyscallRegs
Uint Num;
Uint Return;
}; // RAX
Uint Num;
Uint Return;
}; // RAX
- Uint Arg4; // RCX
- Uint Arg3; // RDX
Uint Error; // RBX
Uint Error; // RBX
- Uint Resvd1[2]; // Kernel RSP, RBP
- Uint Arg2; // RSI
Uint Arg1; // RDI
Uint Arg1; // RDI
+ Uint Arg2; // RSI
+ Uint Arg3; // RDX
+ Uint Arg4; // RCX
Uint Arg5; // R8
Uint Arg6; // R9
Uint Arg5; // R8
Uint Arg6; // R9
- Uint Resvd2[6]; // R10 - R15
- Uint Resvd3[5]; // IntNum, ErrCode, RIP, CS, RFLAGS
-
- Uint Resvd4[5]; // Int, Err, rip, CS, ...
+ Uint _Flags;
+ Uint _IP;
Uint StackPointer; // RSP
Uint StackPointer; // RSP
- Uint Resvd5[1]; // SS
+
} tSyscallRegs;
/**
} tSyscallRegs;
/**
@@
-101,5
+99,11
@@
extern int CPU_HAS_LOCK(struct sShortSpinlock *Lock);
extern void SHORTLOCK(struct sShortSpinlock *Lock);
extern void SHORTREL(struct sShortSpinlock *Lock);
extern void SHORTLOCK(struct sShortSpinlock *Lock);
extern void SHORTREL(struct sShortSpinlock *Lock);
+extern void Debug_PutCharDebug(char ch);
+extern void Debug_PutStringDebug(const char *Str);
+
+// TODO: Move this to acess.h
+extern tPAddr MM_AllocateZero(tVAddr VAddr);
+
#endif
#endif
UCC
git Repository :: git.ucc.asn.au