Changeset bee2d4c in mainline for kernel/arch/ia32/src


Ignore:
Timestamp:
2010-07-08T21:09:53Z (16 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/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.