Changeset f701b236 in mainline for arch/ia32/include/smp/apic.h
- Timestamp:
- 2005-11-24T00:46:43Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9149135
- Parents:
- 8418c7d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/ia32/include/smp/apic.h
r8418c7d rf701b236 71 71 #define POLARITY_HIGH 0x0 72 72 #define POLARITY_LOW 0x1 73 74 /** Divide Values. (Bit 2 is always 0) */ 75 #define DIVIDE_2 0x0 76 #define DIVIDE_4 0x1 77 #define DIVIDE_8 0x2 78 #define DIVIDE_16 0x3 79 #define DIVIDE_32 0x8 80 #define DIVIDE_64 0x9 81 #define DIVIDE_128 0xa 82 #define DIVIDE_1 0xb 83 84 /** Timer Modes. */ 85 #define TIMER_ONESHOT 0x0 86 #define TIMER_PERIODIC 0x1 73 87 74 88 #define SEND_PENDING (1<<12) … … 106 120 #define EOI (0x0b0/sizeof(__u32)) 107 121 108 /* Error Status Register*/122 /** Error Status Register. */ 109 123 #define ESR (0x280/sizeof(__u32)) 110 #define ESRClear ((0xffffff<<8)|(1<<4)) 124 union esr { 125 __u32 value; 126 __u8 err_bitmap; 127 struct { 128 unsigned send_checksum_error : 1; 129 unsigned receive_checksum_error : 1; 130 unsigned send_accept_error : 1; 131 unsigned receive_accept_error : 1; 132 unsigned : 1; 133 unsigned send_illegal_vector : 1; 134 unsigned received_illegal_vector : 1; 135 unsigned illegal_register_address : 1; 136 unsigned : 24; 137 } __attribute__ ((packed)); 138 }; 139 typedef union esr esr_t; 111 140 112 141 /* Task Priority Register */ … … 127 156 typedef union svr svr_t; 128 157 129 /* Time Divide Configuration Register*/158 /** Time Divide Configuration Register. */ 130 159 #define TDCR (0x3e0/sizeof(__u32)) 131 #define TDCRClear (~0xb) 160 union tdcr { 161 __u32 value; 162 struct { 163 unsigned div_value : 4; /**< Divide Value, bit 2 is always 0. */ 164 unsigned : 28; /**< Reserved. */ 165 } __attribute__ ((packed)); 166 }; 167 typedef union tdcr tdcr_t; 132 168 133 169 /* Initial Count Register for Timer */ … … 136 172 /* Current Count Register for Timer */ 137 173 #define CCRT (0x390/sizeof(__u32)) 138 139 /** Timer Modes. */140 #define TIMER_ONESHOT 0x0141 #define TIMER_PERIODIC 0x1142 174 143 175 /** LVT Timer register. */ … … 191 223 typedef union lvt_error lvt_error_t; 192 224 193 194 #define LVT_PCINT (0x340/sizeof(__u32)) 195 196 /* Local APIC ID Register */ 225 /** Local APIC ID Register. */ 197 226 #define L_APIC_ID (0x020/sizeof(__u32)) 198 #define L_APIC_IDClear (~(0xf<<24)) 199 #define L_APIC_IDShift 24 200 #define L_APIC_IDMask 0xf 227 union lapic_id { 228 __u32 value; 229 struct { 230 unsigned : 24; /**< Reserved. */ 231 __u8 apic_id; /**< Local APIC ID. */ 232 } __attribute__ ((packed)); 233 }; 234 typedef union lapic_id lapic_id_t; 201 235 202 236 /* Local APIC Version Register */ … … 215 249 #define IOAPICARB 0x02 216 250 #define IOREDTBL 0x10 251 252 /** I/O Register Select Register. */ 253 union io_regsel { 254 __u32 value; 255 struct { 256 __u8 reg_addr; /**< APIC Register Address. */ 257 unsigned : 24; /**< Reserved. */ 258 } __attribute__ ((packed)); 259 }; 260 typedef union io_regsel io_regsel_t; 217 261 218 262 /** I/O Redirection Register. */ … … 262 306 extern __u32 io_apic_read(__u8 address); 263 307 extern void io_apic_write(__u8 address , __u32 x); 264 extern void io_apic_change_ioredtbl(int signal, int dest, __u8 v, int flags);308 extern void io_apic_change_ioredtbl(int pin, int dest, __u8 v, int flags); 265 309 extern void io_apic_disable_irqs(__u16 irqmask); 266 310 extern void io_apic_enable_irqs(__u16 irqmask);
Note:
See TracChangeset
for help on using the changeset viewer.