Rev 2927 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2927 | Rev 3588 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #define KERN_ia64_CPU_H_ |
36 | #define KERN_ia64_CPU_H_ |
37 | 37 | ||
38 | #include <arch/types.h> |
38 | #include <arch/types.h> |
39 | #include <arch/register.h> |
39 | #include <arch/register.h> |
40 | #include <arch/asm.h> |
40 | #include <arch/asm.h> |
- | 41 | #include <arch/bootinfo.h> |
|
41 | 42 | ||
42 | #define FAMILY_ITANIUM 0x7 |
43 | #define FAMILY_ITANIUM 0x7 |
43 | #define FAMILY_ITANIUM2 0x1f |
44 | #define FAMILY_ITANIUM2 0x1f |
44 | 45 | ||
45 | typedef struct { |
46 | typedef struct { |
Line 61... | Line 62... | ||
61 | asm volatile ("mov %0 = cpuid[%1]\n" : "=r" (v) : "r" (n)); |
62 | asm volatile ("mov %0 = cpuid[%1]\n" : "=r" (v) : "r" (n)); |
62 | 63 | ||
63 | return v; |
64 | return v; |
64 | } |
65 | } |
65 | 66 | ||
- | 67 | ||
- | 68 | #define CR64_ID_SHIFT 24 |
|
- | 69 | #define CR64_ID_MASK 0xff000000 |
|
- | 70 | #define CR64_EID_SHIFT 16 |
|
- | 71 | #define CR64_EID_MASK 0xff0000 |
|
- | 72 | ||
- | 73 | static inline int ia64_get_cpu_id(void) |
|
- | 74 | { |
|
- | 75 | uint64_t cr64=cr64_read(); |
|
- | 76 | return ((CR64_ID_MASK)&cr64)>>CR64_ID_SHIFT; |
|
- | 77 | } |
|
- | 78 | ||
- | 79 | static inline int ia64_get_cpu_eid(void) |
|
- | 80 | { |
|
- | 81 | uint64_t cr64=cr64_read(); |
|
- | 82 | return ((CR64_EID_MASK)&cr64)>>CR64_EID_SHIFT; |
|
- | 83 | } |
|
- | 84 | ||
- | 85 | ||
- | 86 | ||
- | 87 | static inline void ipi_send_ipi(int id,int eid,int intno) |
|
- | 88 | { |
|
- | 89 | (bootinfo->sapic)[2*(id*256+eid)]=intno; |
|
- | 90 | } |
|
- | 91 | ||
- | 92 | ||
- | 93 | ||
66 | #endif |
94 | #endif |
67 | 95 | ||
68 | /** @} |
96 | /** @} |
69 | */ |
97 | */ |