Changeset f701b236 in mainline for arch/ia32/include/smp/apic.h


Ignore:
Timestamp:
2005-11-24T00:46:43Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9149135
Parents:
8418c7d
Message:

More SMP cleanup.
Suddenly, keyboard started to work on SMP under Simics.
Still not functional on Bochs (will consult Bochs people).
Doxygen style comments for apic.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/include/smp/apic.h

    r8418c7d rf701b236  
    7171#define POLARITY_HIGH   0x0
    7272#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
    7387
    7488#define SEND_PENDING    (1<<12)
     
    106120#define EOI             (0x0b0/sizeof(__u32))
    107121
    108 /* Error Status Register */
     122/** Error Status Register. */
    109123#define ESR             (0x280/sizeof(__u32))
    110 #define ESRClear        ((0xffffff<<8)|(1<<4))
     124union 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};
     139typedef union esr esr_t;
    111140
    112141/* Task Priority Register */
     
    127156typedef union svr svr_t;
    128157
    129 /* Time Divide Configuration Register */
     158/** Time Divide Configuration Register. */
    130159#define TDCR            (0x3e0/sizeof(__u32))
    131 #define TDCRClear       (~0xb)
     160union 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};
     167typedef union tdcr tdcr_t;
    132168
    133169/* Initial Count Register for Timer */
     
    136172/* Current Count Register for Timer */
    137173#define CCRT            (0x390/sizeof(__u32))
    138 
    139 /** Timer Modes. */
    140 #define TIMER_ONESHOT   0x0
    141 #define TIMER_PERIODIC  0x1
    142174
    143175/** LVT Timer register. */
     
    191223typedef union lvt_error lvt_error_t;
    192224
    193 
    194 #define LVT_PCINT       (0x340/sizeof(__u32))
    195 
    196 /* Local APIC ID Register */
     225/** Local APIC ID Register. */
    197226#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
     227union lapic_id {
     228        __u32 value;
     229        struct {
     230                unsigned : 24;          /**< Reserved. */
     231                __u8 apic_id;           /**< Local APIC ID. */
     232        } __attribute__ ((packed));
     233};
     234typedef union lapic_id lapic_id_t;
    201235
    202236/* Local APIC Version Register */
     
    215249#define IOAPICARB       0x02
    216250#define IOREDTBL        0x10
     251
     252/** I/O Register Select Register. */
     253union io_regsel {
     254        __u32 value;
     255        struct {
     256                __u8 reg_addr;          /**< APIC Register Address. */
     257                unsigned : 24;          /**< Reserved. */
     258        } __attribute__ ((packed));
     259};
     260typedef union io_regsel io_regsel_t;
    217261
    218262/** I/O Redirection Register. */
     
    262306extern __u32 io_apic_read(__u8 address);
    263307extern void io_apic_write(__u8 address , __u32 x);
    264 extern void io_apic_change_ioredtbl(int signal, int dest, __u8 v, int flags);
     308extern void io_apic_change_ioredtbl(int pin, int dest, __u8 v, int flags);
    265309extern void io_apic_disable_irqs(__u16 irqmask);
    266310extern void io_apic_enable_irqs(__u16 irqmask);
Note: See TracChangeset for help on using the changeset viewer.