Changeset bee2d4c in mainline


Ignore:
Timestamp:
2010-07-08T21:09:53Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
144185b, 5f83634, bd48f4c
Parents:
62b20f1 (diff), b808660 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/upa

Location:
kernel/arch/ia32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/include/asm.h

    r62b20f1 rbee2d4c  
    425425
    426426extern void paging_on(void);
    427 extern void interrupt_handlers(void);
    428427extern void enable_l_apic_in_msr(void);
    429428
     
    431430extern void asm_fake_loop(uint32_t);
    432431
     432extern uintptr_t int_0;
     433extern uintptr_t int_1;
     434extern uintptr_t int_2;
     435extern uintptr_t int_3;
     436extern uintptr_t int_4;
     437extern uintptr_t int_5;
     438extern uintptr_t int_6;
     439extern uintptr_t int_7;
     440extern uintptr_t int_8;
     441extern uintptr_t int_9;
     442extern uintptr_t int_10;
     443extern uintptr_t int_11;
     444extern uintptr_t int_12;
     445extern uintptr_t int_13;
     446extern uintptr_t int_14;
     447extern uintptr_t int_15;
     448extern uintptr_t int_16;
     449extern uintptr_t int_17;
     450extern uintptr_t int_18;
     451extern uintptr_t int_19;
     452extern uintptr_t int_20;
     453extern uintptr_t int_21;
     454extern uintptr_t int_22;
     455extern uintptr_t int_23;
     456extern uintptr_t int_24;
     457extern uintptr_t int_25;
     458extern uintptr_t int_26;
     459extern uintptr_t int_27;
     460extern uintptr_t int_28;
     461extern uintptr_t int_29;
     462extern uintptr_t int_30;
     463extern uintptr_t int_31;
     464extern uintptr_t int_32;
     465extern uintptr_t int_33;
     466extern uintptr_t int_34;
     467extern uintptr_t int_35;
     468extern uintptr_t int_36;
     469extern uintptr_t int_37;
     470extern uintptr_t int_38;
     471extern uintptr_t int_39;
     472extern uintptr_t int_40;
     473extern uintptr_t int_41;
     474extern uintptr_t int_42;
     475extern uintptr_t int_43;
     476extern uintptr_t int_44;
     477extern uintptr_t int_45;
     478extern uintptr_t int_46;
     479extern uintptr_t int_47;
     480extern uintptr_t int_48;
     481extern uintptr_t int_49;
     482extern uintptr_t int_50;
     483extern uintptr_t int_51;
     484extern uintptr_t int_52;
     485extern uintptr_t int_53;
     486extern uintptr_t int_54;
     487extern uintptr_t int_55;
     488extern uintptr_t int_56;
     489extern uintptr_t int_57;
     490extern uintptr_t int_58;
     491extern uintptr_t int_59;
     492extern uintptr_t int_60;
     493extern uintptr_t int_61;
     494extern uintptr_t int_62;
     495extern uintptr_t int_63;
     496
    433497#endif
    434498
  • kernel/arch/ia32/include/interrupt.h

    r62b20f1 rbee2d4c  
    7575         * The strange order of the GPRs is given by the requirement to use the
    7676         * istate structure for both regular interrupts and exceptions as well
    77          * as for syscall handler which use this order as an optimization.
     77         * as for syscall handlers which use this order as an optimization.
    7878         */
    7979        uint32_t edx;
  • kernel/arch/ia32/src/asm.S

    r62b20f1 rbee2d4c  
    4444.global paging_on
    4545.global enable_l_apic_in_msr
    46 .global interrupt_handlers
    4746.global memsetb
    4847.global memsetw
     
    272271 * vectors starting at vector i.
    273272 *
    274  * The handlers setup data segment registers
    275  * and call exc_dispatch().
    276  *
    277  */
    278 #define INTERRUPT_ALIGN  256
    279 
    280 .macro handler i n
     273 */
     274
     275.macro handler i
     276.global int_\i
     277int_\i:
    281278        .ifeq \i - 0x30
    282279                /* Syscall handler */
     
    475472               
    476473        .endif
    477        
    478         .align INTERRUPT_ALIGN
    479         .if (\n - \i) - 1
    480                 handler "(\i + 1)", \n
    481         .endif
    482474.endm
    483475
    484 /* Keep in sync with pm.h! */
    485 #define IDT_ITEMS  64
    486 
    487 .align INTERRUPT_ALIGN
     476#define LIST_0_63 \
     477        0, 1, 2, 3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,\
     478        28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,\
     479        53,54,55,56,57,58,59,60,61,62,63
     480
    488481interrupt_handlers:
    489         h_start:
    490                 handler 0 IDT_ITEMS
    491         h_end:
     482.irp cnt, LIST_0_63
     483        handler \cnt
     484.endr
    492485
    493486/** Print Unicode character to EGA display.
     
    638631        ret
    639632
    640 .data
    641 .global interrupt_handler_size
    642 
    643 interrupt_handler_size: .long (h_end - h_start) / IDT_ITEMS
  • kernel/arch/ia32/src/pm.c

    r62b20f1 rbee2d4c  
    139139                        d->access |= DPL_USER;
    140140                }
    141                
    142                 idt_setoffset(d, ((uintptr_t) interrupt_handlers) +
    143                     i * interrupt_handler_size);
    144141        }
    145 }
    146 
     142
     143        d = &idt[0];
     144        idt_setoffset(d++, (uintptr_t) &int_0);
     145        idt_setoffset(d++, (uintptr_t) &int_1);
     146        idt_setoffset(d++, (uintptr_t) &int_2);
     147        idt_setoffset(d++, (uintptr_t) &int_3);
     148        idt_setoffset(d++, (uintptr_t) &int_4);
     149        idt_setoffset(d++, (uintptr_t) &int_5);
     150        idt_setoffset(d++, (uintptr_t) &int_6);
     151        idt_setoffset(d++, (uintptr_t) &int_7);
     152        idt_setoffset(d++, (uintptr_t) &int_8);
     153        idt_setoffset(d++, (uintptr_t) &int_9);
     154        idt_setoffset(d++, (uintptr_t) &int_10);
     155        idt_setoffset(d++, (uintptr_t) &int_11);
     156        idt_setoffset(d++, (uintptr_t) &int_12);
     157        idt_setoffset(d++, (uintptr_t) &int_13);
     158        idt_setoffset(d++, (uintptr_t) &int_14);
     159        idt_setoffset(d++, (uintptr_t) &int_15);
     160        idt_setoffset(d++, (uintptr_t) &int_16);
     161        idt_setoffset(d++, (uintptr_t) &int_17);
     162        idt_setoffset(d++, (uintptr_t) &int_18);
     163        idt_setoffset(d++, (uintptr_t) &int_19);
     164        idt_setoffset(d++, (uintptr_t) &int_20);
     165        idt_setoffset(d++, (uintptr_t) &int_21);
     166        idt_setoffset(d++, (uintptr_t) &int_22);
     167        idt_setoffset(d++, (uintptr_t) &int_23);
     168        idt_setoffset(d++, (uintptr_t) &int_24);
     169        idt_setoffset(d++, (uintptr_t) &int_25);
     170        idt_setoffset(d++, (uintptr_t) &int_26);
     171        idt_setoffset(d++, (uintptr_t) &int_27);
     172        idt_setoffset(d++, (uintptr_t) &int_28);
     173        idt_setoffset(d++, (uintptr_t) &int_29);
     174        idt_setoffset(d++, (uintptr_t) &int_30);
     175        idt_setoffset(d++, (uintptr_t) &int_31);
     176        idt_setoffset(d++, (uintptr_t) &int_32);
     177        idt_setoffset(d++, (uintptr_t) &int_33);
     178        idt_setoffset(d++, (uintptr_t) &int_34);
     179        idt_setoffset(d++, (uintptr_t) &int_35);
     180        idt_setoffset(d++, (uintptr_t) &int_36);
     181        idt_setoffset(d++, (uintptr_t) &int_37);
     182        idt_setoffset(d++, (uintptr_t) &int_38);
     183        idt_setoffset(d++, (uintptr_t) &int_39);
     184        idt_setoffset(d++, (uintptr_t) &int_40);
     185        idt_setoffset(d++, (uintptr_t) &int_41);
     186        idt_setoffset(d++, (uintptr_t) &int_42);
     187        idt_setoffset(d++, (uintptr_t) &int_43);
     188        idt_setoffset(d++, (uintptr_t) &int_44);
     189        idt_setoffset(d++, (uintptr_t) &int_45);
     190        idt_setoffset(d++, (uintptr_t) &int_46);
     191        idt_setoffset(d++, (uintptr_t) &int_47);
     192        idt_setoffset(d++, (uintptr_t) &int_48);
     193        idt_setoffset(d++, (uintptr_t) &int_49);
     194        idt_setoffset(d++, (uintptr_t) &int_50);
     195        idt_setoffset(d++, (uintptr_t) &int_51);
     196        idt_setoffset(d++, (uintptr_t) &int_52);
     197        idt_setoffset(d++, (uintptr_t) &int_53);
     198        idt_setoffset(d++, (uintptr_t) &int_54);
     199        idt_setoffset(d++, (uintptr_t) &int_55);
     200        idt_setoffset(d++, (uintptr_t) &int_56);
     201        idt_setoffset(d++, (uintptr_t) &int_57);
     202        idt_setoffset(d++, (uintptr_t) &int_58);
     203        idt_setoffset(d++, (uintptr_t) &int_59);
     204        idt_setoffset(d++, (uintptr_t) &int_60);
     205        idt_setoffset(d++, (uintptr_t) &int_61);
     206        idt_setoffset(d++, (uintptr_t) &int_62);
     207        idt_setoffset(d++, (uintptr_t) &int_63);
     208}
    147209
    148210/* Clean IOPL(12,13) and NT(14) flags in EFLAGS register */
Note: See TracChangeset for help on using the changeset viewer.