35,31 → 35,16 |
#ifndef KERN_sparc64_sun4v_CPU_H_ |
#define KERN_sparc64_sun4v_CPU_H_ |
|
/* Maximum number of virtual processors. */ |
/** Maximum number of virtual processors. */ |
#define MAX_NUM_STRANDS 64 |
|
/* |
* Size of pair of pointers (one pointer to kernel stack, |
* one to uspace window buffer). |
*/ |
#define KSTACK_WBUF_PTR_SIZE (2 * 8) |
/** Maximum number of logical processors in a processor core */ |
#define MAX_CORE_STRANDS 8 |
|
#ifndef __ASM__ |
|
/** |
* Pair of two pointers, the first one points to the kernel stack of |
* a userspace thread, the second one points to the userspace window |
* buffer of the userspace thread. For each CPU there exists exactly |
* one isntance of this structure. |
*/ |
typedef struct { |
uintptr_t kstack; |
uintptr_t wbuf; |
} __attribute__ ((packed)) kstack_wbuf_ptr ; |
|
typedef struct { |
uint64_t id; /**< virtual processor ID */ |
uint32_t mid; // TODO: left here only to keep the code compilable!!! |
uint32_t clock_frequency; /**< Processor frequency in Hz. */ |
uint64_t next_tick_cmpr; /**< Next clock interrupt should be |
generated when the TICK register |
66,6 → 51,12 |
matches this value. */ |
} cpu_arch_t; |
|
typedef struct { |
uint64_t exec_unit_id; |
uint8_t strand_count; |
uint64_t cpuids[MAX_CORE_STRANDS]; |
} exec_unit_t; |
|
#endif |
|
#ifdef __ASM__ |