Changeset e3b9572 in mainline
- Timestamp:
- 2005-09-01T09:42:10Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1dde3b61
- Parents:
- c842f04
- Location:
- arch
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/Makefile.inc
rc842f04 re3b9572 31 31 arch/mm/frame.c \ 32 32 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 37 37 void asm_fake_loop(__u32 t); 38 38 39 40 39 /* TODO: implement the real stuff */ 41 40 static inline __address get_stack_base(void) … … 45 44 46 45 static inline void cpu_sleep(void) { __asm__("hlt"); }; 46 static inline void cpu_halt(void) { __asm__("hlt"); }; 47 47 48 48 … … 138 138 * @return Value read. 139 139 */ 140 static inline __u 32read_cr2(void) { __u64 v; __asm__ volatile ("movq %%cr2,%0" : "=r" (v)); return v; }140 static inline __u64 read_cr2(void) { __u64 v; __asm__ volatile ("movq %%cr2,%0" : "=r" (v)); return v; } 141 141 142 142 /** Write CR3 … … 154 154 * @return Value read. 155 155 */ 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 156 static inline __u64 read_cr3(void) { __u64 v; __asm__ volatile ("movq %%cr3,%0" : "=r" (v)); return v; } 164 157 165 158 -
arch/amd64/include/pm.h
rc842f04 re3b9572 87 87 unsigned base_16_23: 8; 88 88 unsigned type: 4; 89 unsigned reserve1: 1;89 unsigned : 1; 90 90 unsigned dpl : 2; 91 91 unsigned present : 1; 92 92 unsigned limit_16_19: 4; 93 93 unsigned available: 1; 94 unsigned reserve2: 2;94 unsigned : 2; 95 95 unsigned granularity : 1; 96 96 unsigned base_24_31: 8; 97 97 unsigned base_32_63 : 32; 98 unsigned reserve3: 32;98 unsigned : 32; 99 99 } __attribute__ ((packed)); 100 100 … … 108 108 unsigned present : 1; 109 109 unsigned offset_16_31: 16; 110 unsigned offset_32_63: 16;111 unsigned reserved: 32;110 unsigned offset_32_63: 32; 111 unsigned : 32; 112 112 } __attribute__ ((packed)); 113 113 -
arch/amd64/src/boot/memmap.S
rc842f04 re3b9572 117 117 #memory size in 1 kb chunks 118 118 e801memorysize: 119 .long 119 .long 0x0 120 120 121 121 e820counter: -
arch/amd64/src/dummy.s
rc842f04 re3b9572 31 31 .global userspace 32 32 .global before_thread_runs_arch 33 .global panic_printf34 33 .global cpu_identify 35 34 .global cpu_arch_init … … 38 37 .global arch_late_init 39 38 .global calibrate_delay_loop 40 .global cpu_halt41 39 .global dummy 42 40 .global rdtsc … … 44 42 .global fpu_init 45 43 46 .global interrupt_handler_size47 .global interrupt_handlers48 44 .global memory_print_map 49 45 .global get_memory_size … … 53 49 ret 54 50 55 interrupt_handler_size:56 interrupt_handlers:57 51 rdtsc: 58 52 before_thread_runs_arch: 59 53 userspace: 60 54 calibrate_delay_loop: 61 panic_printf:62 55 cpu_identify: 63 56 cpu_arch_init: … … 66 59 arch_late_init: 67 60 calibrate_delay_loop: 68 cpu_halt:69 61 reset_TS_flag: 70 62 fpu_init: -
arch/amd64/src/pm.c
rc842f04 re3b9572 181 181 trap_register(13, gp_fault); 182 182 trap_register( 7, nm_fault); 183 trap_register(12, ss_fault); 183 trap_register(12, ss_fault); 184 184 } 185 185 -
arch/ia32/src/interrupt.c
rc842f04 re3b9572 84 84 printf("stack: %X, %X, %X, %X\n", stack[4], stack[5], stack[6], stack[7]); 85 85 panic("general protection fault\n"); 86 stack[1]++;87 86 } 88 87
Note:
See TracChangeset
for help on using the changeset viewer.