Rev 4369 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4369 | Rev 4663 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | */ |
33 | */ |
34 | 34 | ||
35 | #ifndef KERN_sparc64_sun4v_CPU_H_ |
35 | #ifndef KERN_sparc64_sun4v_CPU_H_ |
36 | #define KERN_sparc64_sun4v_CPU_H_ |
36 | #define KERN_sparc64_sun4v_CPU_H_ |
37 | 37 | ||
38 | /* Maximum number of virtual processors. */ |
38 | /** Maximum number of virtual processors. */ |
39 | #define MAX_NUM_STRANDS 64 |
39 | #define MAX_NUM_STRANDS 64 |
40 | 40 | ||
41 | /* |
- | |
42 | * Size of pair of pointers (one pointer to kernel stack, |
41 | /** Maximum number of logical processors in a processor core */ |
43 | * one to uspace window buffer). |
- | |
44 | */ |
- | |
45 | #define KSTACK_WBUF_PTR_SIZE (2 * 8) |
42 | #define MAX_CORE_STRANDS 8 |
46 | 43 | ||
47 | #ifndef __ASM__ |
44 | #ifndef __ASM__ |
48 | 45 | ||
49 | /** |
- | |
50 | * Pair of two pointers, the first one points to the kernel stack of |
- | |
51 | * a userspace thread, the second one points to the userspace window |
- | |
52 | * buffer of the userspace thread. For each CPU there exists exactly |
- | |
53 | * one isntance of this structure. |
- | |
54 | */ |
- | |
55 | typedef struct { |
- | |
56 | uintptr_t kstack; |
- | |
57 | uintptr_t wbuf; |
- | |
58 | } __attribute__ ((packed)) kstack_wbuf_ptr ; |
- | |
59 | - | ||
60 | typedef struct { |
46 | typedef struct { |
61 | uint64_t id; /**< virtual processor ID */ |
47 | uint64_t id; /**< virtual processor ID */ |
62 | uint32_t mid; // TODO: left here only to keep the code compilable!!! |
- | |
63 | uint32_t clock_frequency; /**< Processor frequency in Hz. */ |
48 | uint32_t clock_frequency; /**< Processor frequency in Hz. */ |
64 | uint64_t next_tick_cmpr; /**< Next clock interrupt should be |
49 | uint64_t next_tick_cmpr; /**< Next clock interrupt should be |
65 | generated when the TICK register |
50 | generated when the TICK register |
66 | matches this value. */ |
51 | matches this value. */ |
67 | } cpu_arch_t; |
52 | } cpu_arch_t; |
68 | 53 | ||
- | 54 | typedef struct { |
|
- | 55 | uint64_t exec_unit_id; |
|
- | 56 | uint8_t strand_count; |
|
- | 57 | uint64_t cpuids[MAX_CORE_STRANDS]; |
|
- | 58 | } exec_unit_t; |
|
- | 59 | ||
69 | #endif |
60 | #endif |
70 | 61 | ||
71 | #ifdef __ASM__ |
62 | #ifdef __ASM__ |
72 | 63 | ||
73 | #endif |
64 | #endif |