Changeset b3f8fb7 in mainline for kernel/arch/amd64/include
- Timestamp:
- 2007-01-28T13:25:49Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8e8c1a5
- Parents:
- 1ba41c5
- Location:
- kernel/arch/amd64/include
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/asm.h
r1ba41c5 rb3f8fb7 36 36 #define KERN_amd64_ASM_H_ 37 37 38 #include <arch/pm.h>39 #include <arch/types.h>40 38 #include <config.h> 41 39 -
kernel/arch/amd64/include/atomic.h
r1ba41c5 rb3f8fb7 39 39 #include <arch/barrier.h> 40 40 #include <preemption.h> 41 #include <typedefs.h>42 41 43 42 static inline void atomic_inc(atomic_t *val) { -
kernel/arch/amd64/include/cpu.h
r1ba41c5 rb3f8fb7 55 55 #ifndef __ASM__ 56 56 57 #include <typedefs.h>58 57 #include <arch/pm.h> 59 58 -
kernel/arch/amd64/include/interrupt.h
r1ba41c5 rb3f8fb7 70 70 71 71 /** This is passed to interrupt handlers */ 72 struct istate{72 typedef struct { 73 73 uint64_t rax; 74 74 uint64_t rbx; … … 91 91 uint64_t rflags; 92 92 uint64_t stack[]; /* Additional data on stack */ 93 } ;93 } istate_t; 94 94 95 95 /** Return true if exception happened while in userspace */ -
kernel/arch/amd64/include/mm/as.h
r1ba41c5 rb3f8fb7 45 45 #define USTACK_ADDRESS_ARCH (USER_ADDRESS_SPACE_END_ARCH-(PAGE_SIZE-1)) 46 46 47 typedef struct {48 } as_arch_t;49 50 47 #define as_constructor_arch(as, flags) (as != as) 51 48 #define as_destructor_arch(as) (as != as) … … 55 52 #define as_invalidate_translation_cache(as, page, cnt) 56 53 54 typedef struct { 55 } as_arch_t; 56 57 #include <genarch/mm/as_pt.h> 58 57 59 extern void as_arch_init(void); 58 60 -
kernel/arch/amd64/include/mm/page.h
r1ba41c5 rb3f8fb7 58 58 59 59 #ifndef __ASM__ 60 # include <mm/page.h>61 # 62 # endif60 # include <mm/mm.h> 61 # include <arch/types.h> 62 # include <arch/interrupt.h> 63 63 64 #ifndef __ASM__65 64 static inline uintptr_t ka2pa(uintptr_t x) 66 65 { … … 70 69 return x - 0xffff800000000000; 71 70 } 72 # define KA2PA(x) ka2pa((uintptr_t)x) 73 # define PA2KA_CODE(x) (((uintptr_t) (x)) + 0xffffffff80000000) 74 # define PA2KA(x) (((uintptr_t) (x)) + 0xffff800000000000) 71 72 # define KA2PA(x) ka2pa((uintptr_t)x) 73 # define PA2KA_CODE(x) (((uintptr_t) (x)) + 0xffffffff80000000) 74 # define PA2KA(x) (((uintptr_t) (x)) + 0xffff800000000000) 75 75 #else 76 # 77 # 76 # define KA2PA(x) ((x) - 0xffffffff80000000) 77 # define PA2KA(x) ((x) + 0xffffffff80000000) 78 78 #endif 79 79 … … 134 134 #define PFERR_CODE_ID (1<<4) 135 135 136 /** Page Table Entry. */137 struct page_specifier {138 unsigned present : 1;139 unsigned writeable : 1;140 unsigned uaccessible : 1;141 unsigned page_write_through : 1;142 unsigned page_cache_disable : 1;143 unsigned accessed : 1;144 unsigned dirty : 1;145 unsigned unused: 1;146 unsigned global : 1;147 unsigned soft_valid : 1; /**< Valid content even if present bit is cleared. */148 unsigned avl : 2;149 unsigned addr_12_31 : 30;150 unsigned addr_32_51 : 21;151 unsigned no_execute : 1;152 } __attribute__ ((packed));153 154 136 static inline int get_pt_flags(pte_t *pt, index_t i) 155 137 { -
kernel/arch/amd64/include/pm.h
r1ba41c5 rb3f8fb7 37 37 38 38 #ifndef __ASM__ 39 # include <arch/types.h> 40 # include <typedefs.h> 41 # include <arch/context.h> 39 # include <arch/types.h> 40 # include <arch/context.h> 42 41 #endif 43 42 -
kernel/arch/amd64/include/proc/task.h
r1ba41c5 rb3f8fb7 36 36 #define KERN_amd64_TASK_H_ 37 37 38 #include <typedefs.h>39 38 #include <arch/types.h> 40 39 #include <adt/bitmap.h> -
kernel/arch/amd64/include/proc/thread.h
r1ba41c5 rb3f8fb7 36 36 #define KERN_amd64_THREAD_H_ 37 37 38 #include <arch/types.h>39 40 38 typedef struct { 41 39 unative_t tls; -
kernel/arch/amd64/include/types.h
r1ba41c5 rb3f8fb7 37 37 38 38 #define NULL 0 39 #define false 0 40 #define true 1 39 41 40 42 typedef signed char int8_t; … … 48 50 typedef unsigned long long uint64_t; 49 51 52 typedef uint64_t size_t; 53 typedef uint64_t count_t; 54 typedef uint64_t index_t; 55 50 56 typedef uint64_t uintptr_t; 51 57 typedef uint64_t pfn_t; 52 58 53 /* Flags of processor (return value of interrupts_disable()) */54 59 typedef uint64_t ipl_t; 55 60 … … 57 62 typedef int64_t native_t; 58 63 59 typedef struct page_specifier pte_t; 64 typedef uint8_t bool; 65 typedef uint64_t task_id_t; 66 typedef uint32_t context_id_t; 67 68 typedef int32_t inr_t; 69 typedef int32_t devno_t; 70 71 /** Page Table Entry. */ 72 typedef struct { 73 unsigned present : 1; 74 unsigned writeable : 1; 75 unsigned uaccessible : 1; 76 unsigned page_write_through : 1; 77 unsigned page_cache_disable : 1; 78 unsigned accessed : 1; 79 unsigned dirty : 1; 80 unsigned unused: 1; 81 unsigned global : 1; 82 unsigned soft_valid : 1; /**< Valid content even if present bit is cleared. */ 83 unsigned avl : 2; 84 unsigned addr_12_31 : 30; 85 unsigned addr_32_51 : 21; 86 unsigned no_execute : 1; 87 } __attribute__ ((packed)) pte_t; 60 88 61 89 #endif
Note:
See TracChangeset
for help on using the changeset viewer.