Changeset e3b9572 in mainline


Ignore:
Timestamp:
2005-09-01T09:42:10Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1dde3b61
Parents:
c842f04
Message:

Interrupts for amd64.

Location:
arch
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/Makefile.inc

    rc842f04 re3b9572  
    3131        arch/mm/frame.c \
    3232        arch/mm/page.c \
    33         arch/mm/tlb.c
     33        arch/mm/tlb.c \
     34        arch/asm_utils.S
  • arch/amd64/include/asm.h

    rc842f04 re3b9572  
    3737void asm_fake_loop(__u32 t);
    3838
    39 
    4039/* TODO: implement the real stuff */
    4140static inline __address get_stack_base(void)
     
    4544
    4645static inline void cpu_sleep(void) { __asm__("hlt"); };
     46static inline void cpu_halt(void) { __asm__("hlt"); };
    4747
    4848
     
    138138 * @return Value read.
    139139 */
    140 static inline __u32 read_cr2(void) { __u64 v; __asm__ volatile ("movq %%cr2,%0" : "=r" (v)); return v; }
     140static inline __u64 read_cr2(void) { __u64 v; __asm__ volatile ("movq %%cr2,%0" : "=r" (v)); return v; }
    141141
    142142/** Write CR3
     
    154154 * @return Value read.
    155155 */
    156 static inline __u32 read_cr3(void) { __u64 v; __asm__ volatile ("movq %%cr3,%0" : "=r" (v)); return v; }
    157 
    158 /** Set priority level low
    159  *
    160  * Enable interrupts and return previous
    161  * value of EFLAGS.
    162  */
    163 
     156static inline __u64 read_cr3(void) { __u64 v; __asm__ volatile ("movq %%cr3,%0" : "=r" (v)); return v; }
    164157
    165158
  • arch/amd64/include/pm.h

    rc842f04 re3b9572  
    8787        unsigned base_16_23: 8;
    8888        unsigned type: 4;
    89         unsigned reserve1 : 1;
     89        unsigned : 1;
    9090        unsigned dpl : 2;
    9191        unsigned present : 1;
    9292        unsigned limit_16_19: 4;
    9393        unsigned available: 1;
    94         unsigned reserve2: 2;
     94        unsigned : 2;
    9595        unsigned granularity : 1;
    9696        unsigned base_24_31: 8;
    9797        unsigned base_32_63 : 32;
    98         unsigned reserve3 : 32;
     98        unsigned : 32;
    9999} __attribute__ ((packed));
    100100
     
    108108        unsigned present : 1;
    109109        unsigned offset_16_31: 16;
    110         unsigned offset_32_63: 16;
    111         unsigned reserved : 32;
     110        unsigned offset_32_63: 32;
     111        unsigned : 32;
    112112} __attribute__ ((packed));
    113113
  • arch/amd64/src/boot/memmap.S

    rc842f04 re3b9572  
    117117        #memory size in 1 kb chunks
    118118e801memorysize:
    119         .long   0
     119        .long 0x0
    120120
    121121e820counter:
  • arch/amd64/src/dummy.s

    rc842f04 re3b9572  
    3131.global userspace
    3232.global before_thread_runs_arch
    33 .global panic_printf
    3433.global cpu_identify
    3534.global cpu_arch_init
     
    3837.global arch_late_init
    3938.global calibrate_delay_loop
    40 .global cpu_halt
    4139.global dummy
    4240.global rdtsc
     
    4442.global fpu_init
    4543       
    46 .global interrupt_handler_size
    47 .global interrupt_handlers
    4844.global memory_print_map
    4945.global get_memory_size
     
    5349        ret
    5450
    55 interrupt_handler_size:
    56 interrupt_handlers:     
    5751rdtsc:
    5852before_thread_runs_arch:
    5953userspace:
    6054calibrate_delay_loop:
    61 panic_printf:
    6255cpu_identify:
    6356cpu_arch_init:
     
    6659arch_late_init:
    6760calibrate_delay_loop:
    68 cpu_halt:
    6961reset_TS_flag:
    7062fpu_init:
  • arch/amd64/src/pm.c

    rc842f04 re3b9572  
    181181        trap_register(13, gp_fault);
    182182        trap_register( 7, nm_fault);
    183         trap_register(12, ss_fault);
     183        trap_register(12, ss_fault);   
    184184}
    185185
  • arch/ia32/src/interrupt.c

    rc842f04 re3b9572  
    8484        printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]);
    8585        panic("general protection fault\n");
    86         stack[1]++;
    8786}
    8887
Note: See TracChangeset for help on using the changeset viewer.