/branches/tracing/kernel/arch/amd64/include/byteorder.h |
---|
File deleted |
/branches/tracing/kernel/arch/amd64/include/types.h |
---|
46,8 → 46,6 |
typedef unsigned long long uint64_t; |
typedef uint64_t size_t; |
typedef uint64_t count_t; |
typedef uint64_t index_t; |
typedef uint64_t uintptr_t; |
typedef uint64_t pfn_t; |
60,11 → 58,9 |
typedef struct { |
} fncptr_t; |
/**< Formats for uintptr_t, size_t, count_t and index_t */ |
/**< Formats for uintptr_t, size_t */ |
#define PRIp "llx" |
#define PRIs "llu" |
#define PRIc "llu" |
#define PRIi "llu" |
/**< Formats for (u)int8_t, (u)int16_t, (u)int32_t, (u)int64_t and (u)native_t */ |
#define PRId8 "d" |
/branches/tracing/kernel/arch/amd64/include/atomic.h |
---|
115,9 → 115,7 |
preemption_disable(); |
asm volatile ( |
"0:\n" |
#ifdef CONFIG_HT |
"pause\n" |
#endif |
"mov %[count], %[tmp]\n" |
"testq %[tmp], %[tmp]\n" |
"jnz 0b\n" /* lightweight looping on locked spinlock */ |
/branches/tracing/kernel/arch/amd64/include/proc/task.h |
---|
40,7 → 40,7 |
typedef struct { |
/** I/O Permission bitmap Generation counter. */ |
count_t iomapver; |
size_t iomapver; |
/** I/O Permission bitmap. */ |
bitmap_t iomap; |
} task_arch_t; |
/branches/tracing/kernel/arch/amd64/include/mm/page.h |
---|
112,33 → 112,33 |
#define SET_PTL0_ADDRESS_ARCH(ptl0) \ |
(write_cr3((uintptr_t) (ptl0))) |
#define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \ |
set_pt_addr((pte_t *) (ptl0), (index_t) (i), a) |
set_pt_addr((pte_t *) (ptl0), (size_t) (i), a) |
#define SET_PTL2_ADDRESS_ARCH(ptl1, i, a) \ |
set_pt_addr((pte_t *) (ptl1), (index_t) (i), a) |
set_pt_addr((pte_t *) (ptl1), (size_t) (i), a) |
#define SET_PTL3_ADDRESS_ARCH(ptl2, i, a) \ |
set_pt_addr((pte_t *) (ptl2), (index_t) (i), a) |
set_pt_addr((pte_t *) (ptl2), (size_t) (i), a) |
#define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \ |
set_pt_addr((pte_t *) (ptl3), (index_t) (i), a) |
set_pt_addr((pte_t *) (ptl3), (size_t) (i), a) |
/* Get PTE flags accessors for each level. */ |
#define GET_PTL1_FLAGS_ARCH(ptl0, i) \ |
get_pt_flags((pte_t *) (ptl0), (index_t) (i)) |
get_pt_flags((pte_t *) (ptl0), (size_t) (i)) |
#define GET_PTL2_FLAGS_ARCH(ptl1, i) \ |
get_pt_flags((pte_t *) (ptl1), (index_t) (i)) |
get_pt_flags((pte_t *) (ptl1), (size_t) (i)) |
#define GET_PTL3_FLAGS_ARCH(ptl2, i) \ |
get_pt_flags((pte_t *) (ptl2), (index_t) (i)) |
get_pt_flags((pte_t *) (ptl2), (size_t) (i)) |
#define GET_FRAME_FLAGS_ARCH(ptl3, i) \ |
get_pt_flags((pte_t *) (ptl3), (index_t) (i)) |
get_pt_flags((pte_t *) (ptl3), (size_t) (i)) |
/* Set PTE flags accessors for each level. */ |
#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \ |
set_pt_flags((pte_t *) (ptl0), (index_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x)) |
#define SET_PTL2_FLAGS_ARCH(ptl1, i, x) \ |
set_pt_flags((pte_t *) (ptl1), (index_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl1), (size_t) (i), (x)) |
#define SET_PTL3_FLAGS_ARCH(ptl2, i, x) \ |
set_pt_flags((pte_t *) (ptl2), (index_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl2), (size_t) (i), (x)) |
#define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \ |
set_pt_flags((pte_t *) (ptl3), (index_t) (i), (x)) |
set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x)) |
/* Macros for querying the last-level PTE entries. */ |
#define PTE_VALID_ARCH(p) \ |
176,7 → 176,7 |
*/ |
#define PFERR_CODE_ID (1 << 4) |
static inline int get_pt_flags(pte_t *pt, index_t i) |
static inline int get_pt_flags(pte_t *pt, size_t i) |
{ |
pte_t *p = &pt[i]; |
189,7 → 189,7 |
p->global << PAGE_GLOBAL_SHIFT); |
} |
static inline void set_pt_addr(pte_t *pt, index_t i, uintptr_t a) |
static inline void set_pt_addr(pte_t *pt, size_t i, uintptr_t a) |
{ |
pte_t *p = &pt[i]; |
197,7 → 197,7 |
p->addr_32_51 = a >> 32; |
} |
static inline void set_pt_flags(pte_t *pt, index_t i, int flags) |
static inline void set_pt_flags(pte_t *pt, size_t i, int flags) |
{ |
pte_t *p = &pt[i]; |
/branches/tracing/kernel/arch/amd64/include/cpu.h |
---|
64,7 → 64,7 |
int stepping; |
tss_t *tss; |
count_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ |
size_t iomapver_copy; /** Copy of TASK's I/O Permission bitmap generation count. */ |
} cpu_arch_t; |
struct star_msr { |
/branches/tracing/kernel/arch/amd64/Makefile.inc |
---|
41,7 → 41,8 |
ICC_CFLAGS += $(CMN1) |
SUNCC_CFLAGS += -m64 -xmodel=kernel |
DEFS += -D__64_BITS__ |
BITS = 64 |
ENDIANESS = LE |
## Accepted CPUs |
# |
/branches/tracing/kernel/arch/amd64/src/ddi/ddi.c |
---|
56,7 → 56,7 |
*/ |
int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size) |
{ |
count_t bits; |
size_t bits; |
bits = ioaddr + size; |
if (bits > IO_PORTS) |
98,7 → 98,7 |
/* |
* Enable the range and we are done. |
*/ |
bitmap_clear_range(&task->arch.iomap, (index_t) ioaddr, (count_t) size); |
bitmap_clear_range(&task->arch.iomap, (size_t) ioaddr, (size_t) size); |
/* |
* Increment I/O Permission bitmap generation counter. |
117,11 → 117,11 |
*/ |
void io_perm_bitmap_install(void) |
{ |
count_t bits; |
size_t bits; |
ptr_16_64_t cpugdtr; |
descriptor_t *gdt_p; |
tss_descriptor_t *tss_desc; |
count_t ver; |
size_t ver; |
/* First, copy the I/O Permission Bitmap. */ |
spinlock_lock(&TASK->lock); |
/branches/tracing/kernel/arch/amd64/src/interrupt.c |
---|
101,7 → 101,7 |
static void gp_fault(int n, istate_t *istate) |
{ |
if (TASK) { |
count_t ver; |
size_t ver; |
spinlock_lock(&TASK->lock); |
ver = TASK->arch.iomapver; |