Subversion Repositories HelenOS

Rev

Rev 2071 | Rev 2217 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2071 Rev 2101
Line 144... Line 144...
144
 
144
 
145
/** Initialize APIC on BSP. */
145
/** Initialize APIC on BSP. */
146
void apic_init(void)
146
void apic_init(void)
147
{
147
{
148
    io_apic_id_t idreg;
148
    io_apic_id_t idreg;
149
    int i;
149
    unsigned int i;
150
 
150
 
151
    exc_register(VECTOR_APIC_SPUR, "apic_spurious", (iroutine) apic_spurious);
151
    exc_register(VECTOR_APIC_SPUR, "apic_spurious", (iroutine) apic_spurious);
152
 
152
 
153
    enable_irqs_function = io_apic_enable_irqs;
153
    enable_irqs_function = io_apic_enable_irqs;
154
    disable_irqs_function = io_apic_disable_irqs;
154
    disable_irqs_function = io_apic_disable_irqs;
Line 532... Line 532...
532
 * @param irqmask Bitmask of IRQs to be masked (0 = do not mask, 1 = mask).
532
 * @param irqmask Bitmask of IRQs to be masked (0 = do not mask, 1 = mask).
533
 */
533
 */
534
void io_apic_disable_irqs(uint16_t irqmask)
534
void io_apic_disable_irqs(uint16_t irqmask)
535
{
535
{
536
    io_redirection_reg_t reg;
536
    io_redirection_reg_t reg;
-
 
537
    unsigned int i;
537
    int i, pin;
538
    int pin;
538
   
539
   
539
    for (i=0;i<16;i++) {
540
    for (i = 0; i < 16; i++) {
540
        if (irqmask & (1<<i)) {
541
        if (irqmask & (1 << i)) {
541
            /*
542
            /*
542
             * Mask the signal input in IO APIC if there is a
543
             * Mask the signal input in IO APIC if there is a
Line 557... Line 558...
557
 *
558
 *
558
 * @param irqmask Bitmask of IRQs to be unmasked (0 = do not unmask, 1 = unmask).
559
 * @param irqmask Bitmask of IRQs to be unmasked (0 = do not unmask, 1 = unmask).
559
 */
560
 */
560
void io_apic_enable_irqs(uint16_t irqmask)
561
void io_apic_enable_irqs(uint16_t irqmask)
561
{
562
{
-
 
563
    unsigned int i;
562
    int i, pin;
564
    int pin;
563
    io_redirection_reg_t reg;  
565
    io_redirection_reg_t reg;  
564
   
566
   
565
    for (i=0;i<16;i++) {
567
    for (i = 0;i < 16; i++) {
566
        if (irqmask & (1<<i)) {
568
        if (irqmask & (1 << i)) {
567
            /*
569
            /*