Changeset efdfebc in mainline for kernel/arch
- Timestamp:
- 2012-11-06T21:03:44Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 338810f
- Parents:
- de73242 (diff), 94795812 (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. - Location:
- kernel/arch
- Files:
-
- 20 edited
-
amd64/src/asm.S (modified) (2 diffs)
-
amd64/src/boot/multiboot.S (modified) (3 diffs)
-
amd64/src/boot/multiboot2.S (modified) (2 diffs)
-
amd64/src/boot/vesa_ret.inc (modified) (1 diff)
-
arm32/Makefile.inc (modified) (1 diff)
-
arm32/include/istate.h (modified) (1 diff)
-
arm32/src/exc_handler.S (modified) (1 diff)
-
arm32/src/exception.c (modified) (2 diffs)
-
arm32/src/mach/integratorcp/integratorcp.c (modified) (15 diffs)
-
arm32/src/mm/page_fault.c (modified) (3 diffs)
-
ia32/src/boot/multiboot.S (modified) (3 diffs)
-
ia32/src/boot/multiboot2.S (modified) (2 diffs)
-
ia32/src/boot/vesa_prot.inc (modified) (1 diff)
-
ia32/src/boot/vesa_real.inc (modified) (1 diff)
-
ia32/src/boot/vesa_ret.inc (modified) (1 diff)
-
ia32/src/smp/apic.c (modified) (3 diffs)
-
ia64/Makefile.inc (modified) (1 diff)
-
mips32/Makefile.inc (modified) (2 diffs)
-
mips64/Makefile.inc (modified) (2 diffs)
-
sparc64/src/smp/sun4u/ipi.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/src/asm.S
rde73242 refdfebc 362 362 */ 363 363 call syscall_handler 364 364 365 /* 366 * Test if the saved return address is canonical and not-kernel. 367 * We do this by looking at the 16 most significant bits 368 * of the saved return address (two bytes at offset 6). 369 */ 370 testw $0xffff, ISTATE_OFFSET_RIP+6(%rsp) 371 jnz bad_rip 372 365 373 cli 366 374 … … 388 396 sysretq 389 397 398 bad_rip: 399 movq %rsp, %rdi 400 movabs $bad_rip_msg, %rsi 401 xorb %al, %al 402 callq fault_from_uspace 403 /* not reached */ 404 405 bad_rip_msg: 406 .asciz "Invalid instruction pointer." 407 390 408 /** Print Unicode character to EGA display. 391 409 * -
kernel/arch/amd64/src/boot/multiboot.S
rde73242 refdfebc 76 76 77 77 multiboot_image_start: 78 cli 78 79 cld 79 80 … … 81 82 movl $START_STACK, %esp 82 83 83 /* Initialize Global Descriptor Table register */ 84 /* 85 * Initialize Global Descriptor Table and 86 * Interrupt Descriptor Table registers 87 */ 84 88 lgdtl bootstrap_gdtr 89 lidtl bootstrap_idtr 85 90 86 91 /* Kernel data + stack */ … … 645 650 .section K_DATA_START, "aw", @progbits 646 651 652 .global bootstrap_idtr 653 bootstrap_idtr: 654 .word 0 655 .long 0 656 647 657 .global bootstrap_gdtr 648 658 bootstrap_gdtr: -
kernel/arch/amd64/src/boot/multiboot2.S
rde73242 refdfebc 116 116 117 117 multiboot2_image_start: 118 cli 118 119 cld 119 120 … … 121 122 movl $START_STACK, %esp 122 123 123 /* Initialize Global Descriptor Table register */ 124 /* 125 * Initialize Global Descriptor Table and 126 * Interrupt Descriptor Table registers 127 */ 124 128 lgdtl bootstrap_gdtr 129 lidtl bootstrap_idtr 125 130 126 131 /* Kernel data + stack */ -
kernel/arch/amd64/src/boot/vesa_ret.inc
rde73242 refdfebc 1 1 .code32 2 2 vesa_init_protected: 3 cli 3 4 cld 4 5 -
kernel/arch/arm32/Makefile.inc
rde73242 refdfebc 33 33 ATSIGN = % 34 34 35 GCC_CFLAGS += -march=armv4 35 GCC_CFLAGS += -march=armv4 -fno-omit-frame-pointer -mapcs-frame 36 36 37 37 BITS = 32 -
kernel/arch/arm32/include/istate.h
rde73242 refdfebc 49 49 /** Struct representing CPU state saved when an exception occurs. */ 50 50 typedef struct istate { 51 uint32_t dummy; 51 52 uint32_t spsr; 52 53 uint32_t sp; -
kernel/arch/arm32/src/exc_handler.S
rde73242 refdfebc 130 130 stmfd r13!, {r2} 131 131 2: 132 sub sp, sp, #4 132 133 .endm 133 134 134 135 .macro LOAD_REGS_FROM_STACK 136 add sp, sp, #4 135 137 ldmfd r13!, {r0} 136 138 msr spsr, r0 -
kernel/arch/arm32/src/exception.c
rde73242 refdfebc 123 123 124 124 asm volatile ( 125 "mrc p15, 0, %[control_reg], c1, c 1"125 "mrc p15, 0, %[control_reg], c1, c0" 126 126 : [control_reg] "=r" (control_reg) 127 127 ); … … 131 131 132 132 asm volatile ( 133 "mcr p15, 0, %[control_reg], c1, c 1"133 "mcr p15, 0, %[control_reg], c1, c0" 134 134 :: [control_reg] "r" (control_reg) 135 135 ); -
kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
rde73242 refdfebc 38 38 #include <console/chardev.h> 39 39 #include <genarch/drivers/pl050/pl050.h> 40 #include <genarch/drivers/arm926_uart/arm926_uart.h> 40 41 #include <genarch/kbrd/kbrd.h> 42 #include <genarch/srln/srln.h> 41 43 #include <console/console.h> 42 44 #include <sysinfo/sysinfo.h> … … 53 55 #include <print.h> 54 56 57 55 58 #define SDRAM_SIZE (sdram[((*(uint32_t *)(ICP_CMCR+ICP_SDRAMCR_OFFSET) & ICP_SDRAM_MASK) >> 2)]) 56 static icp_hw_map_t icp_hw_map; 57 static irq_t icp_timer_irq; 59 60 static struct { 61 icp_hw_map_t hw_map; 62 irq_t timer_irq; 63 arm926_uart_t uart; 64 } icp; 65 66 67 58 68 struct arm_machine_ops icp_machine_ops = { 59 69 icp_init, … … 70 80 71 81 static bool hw_map_init_called = false; 72 static bool vga_init = false;73 82 uint32_t sdram[8] = { 74 83 16777216, /* 16mb */ … … 89 98 void icp_vga_init(void) 90 99 { 91 *(uint32_t*)((char *)(icp _hw_map.cmcr)+0x14) = 0xA05F0000;92 *(uint32_t*)((char *)(icp _hw_map.cmcr)+0x1C) = 0x12C11000;93 *(uint32_t*)icp _hw_map.vga = 0x3F1F3F9C;94 *(uint32_t*)((char *)(icp _hw_map.vga) + 0x4) = 0x080B61DF;95 *(uint32_t*)((char *)(icp _hw_map.vga) + 0x8) = 0x067F3800;96 *(uint32_t*)((char *)(icp _hw_map.vga) + 0x10) = ICP_FB;97 *(uint32_t *)((char *)(icp _hw_map.vga) + 0x1C) = 0x182B;98 *(uint32_t*)((char *)(icp _hw_map.cmcr)+0xC) = 0x33805000;100 *(uint32_t*)((char *)(icp.hw_map.cmcr)+0x14) = 0xA05F0000; 101 *(uint32_t*)((char *)(icp.hw_map.cmcr)+0x1C) = 0x12C11000; 102 *(uint32_t*)icp.hw_map.vga = 0x3F1F3F9C; 103 *(uint32_t*)((char *)(icp.hw_map.vga) + 0x4) = 0x080B61DF; 104 *(uint32_t*)((char *)(icp.hw_map.vga) + 0x8) = 0x067F3800; 105 *(uint32_t*)((char *)(icp.hw_map.vga) + 0x10) = ICP_FB; 106 *(uint32_t *)((char *)(icp.hw_map.vga) + 0x1C) = 0x182B; 107 *(uint32_t*)((char *)(icp.hw_map.cmcr)+0xC) = 0x33805000; 99 108 100 109 } … … 103 112 static inline uint32_t icp_irqc_get_sources(void) 104 113 { 105 return *((uint32_t *) icp _hw_map.irqc);114 return *((uint32_t *) icp.hw_map.irqc); 106 115 } 107 116 … … 113 122 static inline void icp_irqc_mask(uint32_t irq) 114 123 { 115 *((uint32_t *) icp _hw_map.irqc_mask) = (1 << irq);124 *((uint32_t *) icp.hw_map.irqc_mask) = (1 << irq); 116 125 } 117 126 … … 123 132 static inline void icp_irqc_unmask(uint32_t irq) 124 133 { 125 *((uint32_t *) icp _hw_map.irqc_unmask) |= (1 << irq);126 } 127 128 /** Initializes icp _hw_map. */134 *((uint32_t *) icp.hw_map.irqc_unmask) |= (1 << irq); 135 } 136 137 /** Initializes icp.hw_map. */ 129 138 void icp_init(void) 130 139 { 131 icp _hw_map.uart = km_map(ICP_UART, PAGE_SIZE,132 PAGE_WRITE | PAGE_NOT_CACHEABLE); 133 icp _hw_map.kbd_ctrl = km_map(ICP_KBD, PAGE_SIZE, PAGE_NOT_CACHEABLE);134 icp _hw_map.kbd_stat = icp_hw_map.kbd_ctrl + ICP_KBD_STAT;135 icp _hw_map.kbd_data = icp_hw_map.kbd_ctrl + ICP_KBD_DATA;136 icp _hw_map.kbd_intstat = icp_hw_map.kbd_ctrl + ICP_KBD_INTR_STAT;137 icp _hw_map.rtc = km_map(ICP_RTC, PAGE_SIZE,138 PAGE_WRITE | PAGE_NOT_CACHEABLE); 139 icp _hw_map.rtc1_load = icp_hw_map.rtc + ICP_RTC1_LOAD_OFFSET;140 icp _hw_map.rtc1_read = icp_hw_map.rtc + ICP_RTC1_READ_OFFSET;141 icp _hw_map.rtc1_ctl = icp_hw_map.rtc + ICP_RTC1_CTL_OFFSET;142 icp _hw_map.rtc1_intrclr = icp_hw_map.rtc + ICP_RTC1_INTRCLR_OFFSET;143 icp _hw_map.rtc1_bgload = icp_hw_map.rtc + ICP_RTC1_BGLOAD_OFFSET;144 icp _hw_map.rtc1_intrstat = icp_hw_map.rtc + ICP_RTC1_INTRSTAT_OFFSET;145 146 icp _hw_map.irqc = km_map(ICP_IRQC, PAGE_SIZE,147 PAGE_WRITE | PAGE_NOT_CACHEABLE); 148 icp _hw_map.irqc_mask = icp_hw_map.irqc + ICP_IRQC_MASK_OFFSET;149 icp _hw_map.irqc_unmask = icp_hw_map.irqc + ICP_IRQC_UNMASK_OFFSET;150 icp _hw_map.cmcr = km_map(ICP_CMCR, PAGE_SIZE,151 PAGE_WRITE | PAGE_NOT_CACHEABLE); 152 icp _hw_map.sdramcr = icp_hw_map.cmcr + ICP_SDRAMCR_OFFSET;153 icp _hw_map.vga = km_map(ICP_VGA, PAGE_SIZE,140 icp.hw_map.uart = km_map(ICP_UART, PAGE_SIZE, 141 PAGE_WRITE | PAGE_NOT_CACHEABLE); 142 icp.hw_map.kbd_ctrl = km_map(ICP_KBD, PAGE_SIZE, PAGE_NOT_CACHEABLE); 143 icp.hw_map.kbd_stat = icp.hw_map.kbd_ctrl + ICP_KBD_STAT; 144 icp.hw_map.kbd_data = icp.hw_map.kbd_ctrl + ICP_KBD_DATA; 145 icp.hw_map.kbd_intstat = icp.hw_map.kbd_ctrl + ICP_KBD_INTR_STAT; 146 icp.hw_map.rtc = km_map(ICP_RTC, PAGE_SIZE, 147 PAGE_WRITE | PAGE_NOT_CACHEABLE); 148 icp.hw_map.rtc1_load = icp.hw_map.rtc + ICP_RTC1_LOAD_OFFSET; 149 icp.hw_map.rtc1_read = icp.hw_map.rtc + ICP_RTC1_READ_OFFSET; 150 icp.hw_map.rtc1_ctl = icp.hw_map.rtc + ICP_RTC1_CTL_OFFSET; 151 icp.hw_map.rtc1_intrclr = icp.hw_map.rtc + ICP_RTC1_INTRCLR_OFFSET; 152 icp.hw_map.rtc1_bgload = icp.hw_map.rtc + ICP_RTC1_BGLOAD_OFFSET; 153 icp.hw_map.rtc1_intrstat = icp.hw_map.rtc + ICP_RTC1_INTRSTAT_OFFSET; 154 155 icp.hw_map.irqc = km_map(ICP_IRQC, PAGE_SIZE, 156 PAGE_WRITE | PAGE_NOT_CACHEABLE); 157 icp.hw_map.irqc_mask = icp.hw_map.irqc + ICP_IRQC_MASK_OFFSET; 158 icp.hw_map.irqc_unmask = icp.hw_map.irqc + ICP_IRQC_UNMASK_OFFSET; 159 icp.hw_map.cmcr = km_map(ICP_CMCR, PAGE_SIZE, 160 PAGE_WRITE | PAGE_NOT_CACHEABLE); 161 icp.hw_map.sdramcr = icp.hw_map.cmcr + ICP_SDRAMCR_OFFSET; 162 icp.hw_map.vga = km_map(ICP_VGA, PAGE_SIZE, 154 163 PAGE_WRITE | PAGE_NOT_CACHEABLE); 155 164 … … 164 173 { 165 174 icp_irqc_mask(ICP_TIMER_IRQ); 166 *((uint32_t*) icp _hw_map.rtc1_load) = frequency;167 *((uint32_t*) icp _hw_map.rtc1_bgload) = frequency;168 *((uint32_t*) icp _hw_map.rtc1_ctl) = ICP_RTC_CTL_VALUE;175 *((uint32_t*) icp.hw_map.rtc1_load) = frequency; 176 *((uint32_t*) icp.hw_map.rtc1_bgload) = frequency; 177 *((uint32_t*) icp.hw_map.rtc1_ctl) = ICP_RTC_CTL_VALUE; 169 178 icp_irqc_unmask(ICP_TIMER_IRQ); 170 179 } … … 172 181 static irq_ownership_t icp_timer_claim(irq_t *irq) 173 182 { 174 if (icp _hw_map.rtc1_intrstat) {175 *((uint32_t*) icp _hw_map.rtc1_intrclr) = 1;183 if (icp.hw_map.rtc1_intrstat) { 184 *((uint32_t*) icp.hw_map.rtc1_intrclr) = 1; 176 185 return IRQ_ACCEPT; 177 186 } else … … 200 209 static void icp_timer_irq_init(void) 201 210 { 202 irq_initialize(&icp _timer_irq);203 icp _timer_irq.devno = device_assign_devno();204 icp _timer_irq.inr = ICP_TIMER_IRQ;205 icp _timer_irq.claim = icp_timer_claim;206 icp _timer_irq.handler = icp_timer_irq_handler;207 208 irq_register(&icp _timer_irq);211 irq_initialize(&icp.timer_irq); 212 icp.timer_irq.devno = device_assign_devno(); 213 icp.timer_irq.inr = ICP_TIMER_IRQ; 214 icp.timer_irq.claim = icp_timer_claim; 215 icp.timer_irq.handler = icp_timer_irq_handler; 216 217 irq_register(&icp.timer_irq); 209 218 } 210 219 … … 231 240 232 241 if (hw_map_init_called) { 233 *size = (sdram[((*(uint32_t *)icp _hw_map.sdramcr &242 *size = (sdram[((*(uint32_t *)icp.hw_map.sdramcr & 234 243 ICP_SDRAM_MASK) >> 2)]); 235 244 } else { … … 286 295 { 287 296 #ifdef CONFIG_FB 297 static bool vga_init = false; 288 298 if (!vga_init) { 289 299 icp_vga_init(); … … 304 314 stdout_wire(fbdev); 305 315 #endif 316 #ifdef CONFIG_ARM926_UART 317 if (arm926_uart_init(&icp.uart, ARM926_UART0_IRQ, 318 ARM926_UART0_BASE_ADDRESS, sizeof(arm926_uart_regs_t))) 319 stdout_wire(&icp.uart.outdev); 320 #endif 306 321 } 307 322 … … 310 325 311 326 pl050_t *pl050 = malloc(sizeof(pl050_t), FRAME_ATOMIC); 312 pl050->status = (ioport8_t *)icp _hw_map.kbd_stat;313 pl050->data = (ioport8_t *)icp _hw_map.kbd_data;314 pl050->ctrl = (ioport8_t *)icp _hw_map.kbd_ctrl;327 pl050->status = (ioport8_t *)icp.hw_map.kbd_stat; 328 pl050->data = (ioport8_t *)icp.hw_map.kbd_data; 329 pl050->ctrl = (ioport8_t *)icp.hw_map.kbd_ctrl; 315 330 316 331 pl050_instance_t *pl050_instance = pl050_init(pl050, ICP_KBD_IRQ); … … 335 350 ICP_KBD); 336 351 352 #ifdef CONFIG_ARM926_UART 353 srln_instance_t *srln_instance = srln_init(); 354 if (srln_instance) { 355 indev_t *sink = stdin_wire(); 356 indev_t *srln = srln_wire(srln_instance, sink); 357 arm926_uart_input_wire(&icp.uart, srln); 358 icp_irqc_unmask(ARM926_UART0_IRQ); 359 } 360 #endif 337 361 } 338 362 -
kernel/arch/arm32/src/mm/page_fault.c
rde73242 refdfebc 77 77 } 78 78 79 /** Decides whether the instruction is load/store or not.80 *81 * @param instr Instruction82 *83 * @return true when instruction is load/store, false otherwise84 *85 */86 static inline bool is_load_store_instruction(instruction_t instr)87 {88 /* load store immediate offset */89 if (instr.type == 0x2)90 return true;91 92 /* load store register offset */93 if ((instr.type == 0x3) && (instr.bit4 == 0))94 return true;95 96 /* load store multiple */97 if (instr.type == 0x4)98 return true;99 100 /* oprocessor load/store */101 if (instr.type == 0x6)102 return true;103 104 return false;105 }106 107 /** Decides whether the instruction is swap or not.108 *109 * @param instr Instruction110 *111 * @return true when instruction is swap, false otherwise112 */113 static inline bool is_swap_instruction(instruction_t instr)114 {115 /* swap, swapb instruction */116 if ((instr.type == 0x0) &&117 ((instr.opcode == 0x8) || (instr.opcode == 0xa)) &&118 (instr.access == 0x0) && (instr.bits567 == 0x4) && (instr.bit4 == 1))119 return true;120 121 return false;122 }123 124 79 /** Decides whether read or write into memory is requested. 125 80 * … … 128 83 * 129 84 * @return Type of access into memory, PF_ACCESS_EXEC if no memory access is 130 * requested.85 * requested. 131 86 */ 132 87 static pf_access_t get_memory_access_type(uint32_t instr_addr, … … 146 101 } 147 102 148 /* load store instructions */ 149 if (is_load_store_instruction(instr)) { 150 if (instr.access == 1) { 151 return PF_ACCESS_READ; 152 } else { 153 return PF_ACCESS_WRITE; 103 /* See ARM Architecture reference manual ARMv7-A and ARMV7-R edition 104 * A5.3 (PDF p. 206) */ 105 static const struct { 106 uint32_t mask; 107 uint32_t value; 108 pf_access_t access; 109 } ls_inst[] = { 110 /* Store word/byte */ 111 { 0x0e100000, 0x04000000, PF_ACCESS_WRITE }, /*STR(B) imm*/ 112 { 0x0e100010, 0x06000000, PF_ACCESS_WRITE }, /*STR(B) reg*/ 113 /* Load word/byte */ 114 { 0x0e100000, 0x04100000, PF_ACCESS_READ }, /*LDR(B) imm*/ 115 { 0x0e100010, 0x06100000, PF_ACCESS_READ }, /*LDR(B) reg*/ 116 /* Store half-word/dual A5.2.8 */ 117 { 0x0e1000b0, 0x000000b0, PF_ACCESS_WRITE }, /*STRH imm reg*/ 118 /* Load half-word/dual A5.2.8 */ 119 { 0x0e0000f0, 0x000000d0, PF_ACCESS_READ }, /*LDRH imm reg*/ 120 { 0x0e1000b0, 0x001000b0, PF_ACCESS_READ }, /*LDRH imm reg*/ 121 /* Block data transfer, Store */ 122 { 0x0e100000, 0x08000000, PF_ACCESS_WRITE }, /* STM variants */ 123 { 0x0e100000, 0x08100000, PF_ACCESS_READ }, /* LDM variants */ 124 /* Swap */ 125 { 0x0fb00000, 0x01000000, PF_ACCESS_WRITE }, 126 }; 127 const uint32_t inst = *(uint32_t*)instr_addr; 128 for (unsigned i = 0; i < sizeof(ls_inst) / sizeof(ls_inst[0]); ++i) { 129 if ((inst & ls_inst[i].mask) == ls_inst[i].value) { 130 return ls_inst[i].access; 154 131 } 155 }156 157 /* swap, swpb instruction */158 if (is_swap_instruction(instr)) {159 return PF_ACCESS_WRITE;160 132 } 161 133 162 134 panic("page_fault - instruction doesn't access memory " 163 135 "(instr_code: %#0" PRIx32 ", badvaddr:%p).", 164 instr_union.pc, (void *) badvaddr); 165 166 return PF_ACCESS_EXEC; 136 inst, (void *) badvaddr); 167 137 } 168 138 -
kernel/arch/ia32/src/boot/multiboot.S
rde73242 refdfebc 73 73 74 74 multiboot_image_start: 75 cli 75 76 cld 76 77 … … 78 79 movl $START_STACK, %esp 79 80 80 /* Initialize Global Descriptor Table register */ 81 /* 82 * Initialize Global Descriptor Table and 83 * Interrupt Descriptor Table registers 84 */ 81 85 lgdtl bootstrap_gdtr 86 lidtl bootstrap_idtr 82 87 83 88 /* Kernel data + stack */ … … 701 706 page_directory: 702 707 .space 4096, 0 708 709 .global bootstrap_idtr 710 bootstrap_idtr: 711 .word 0 712 .long 0 703 713 704 714 .global bootstrap_gdtr -
kernel/arch/ia32/src/boot/multiboot2.S
rde73242 refdfebc 114 114 115 115 multiboot2_image_start: 116 cli 116 117 cld 117 118 … … 119 120 movl $START_STACK, %esp 120 121 121 /* Initialize Global Descriptor Table register */ 122 /* 123 * Initialize Global Descriptor Table and 124 * Interrupt Descriptor Table registers 125 */ 122 126 lgdtl bootstrap_gdtr 127 lidtl bootstrap_idtr 123 128 124 129 /* Kernel data + stack */ -
kernel/arch/ia32/src/boot/vesa_prot.inc
rde73242 refdfebc 88 88 /* Returned back to protected mode */ 89 89 90 /* 91 * Initialize Global Descriptor Table and 92 * Interrupt Descriptor Table registers 93 */ 94 lgdtl bootstrap_gdtr 95 lidtl bootstrap_idtr 96 90 97 movzx %ax, %ecx 91 98 mov %ecx, KA2PA(bfb_scanline) -
kernel/arch/ia32/src/boot/vesa_real.inc
rde73242 refdfebc 30 30 .code32 31 31 vesa_init: 32 lidtl vesa_idtr 32 33 jmp $GDT_SELECTOR(VESA_INIT_DES), $vesa_init_real - vesa_init 34 35 vesa_idtr: 36 .word 0x3ff 37 .long 0 33 38 34 39 .code16 -
kernel/arch/ia32/src/boot/vesa_ret.inc
rde73242 refdfebc 1 1 .code32 2 2 vesa_init_protected: 3 cli 3 4 cld 4 5 -
kernel/arch/ia32/src/smp/apic.c
rde73242 refdfebc 259 259 } 260 260 261 #define DELIVS_PENDING_SILENT_RETRIES 4 262 263 static void l_apic_wait_for_delivery(void) 264 { 265 icr_t icr; 266 unsigned retries = 0; 267 268 do { 269 if (retries++ > DELIVS_PENDING_SILENT_RETRIES) { 270 retries = 0; 271 #ifdef CONFIG_DEBUG 272 printf("IPI is pending.\n"); 273 #endif 274 delay(20); 275 } 276 icr.lo = l_apic[ICRlo]; 277 } while (icr.delivs == DELIVS_PENDING); 278 279 } 280 261 281 /** Send all CPUs excluding CPU IPI vector. 262 282 * … … 279 299 280 300 l_apic[ICRlo] = icr.lo; 281 282 icr.lo = l_apic[ICRlo]; 283 if (icr.delivs == DELIVS_PENDING) { 284 #ifdef CONFIG_DEBUG 285 printf("IPI is pending.\n"); 286 #endif 287 } 301 302 l_apic_wait_for_delivery(); 288 303 289 304 return apic_poll_errors(); … … 327 342 return 0; 328 343 344 l_apic_wait_for_delivery(); 345 329 346 icr.lo = l_apic[ICRlo]; 330 if (icr.delivs == DELIVS_PENDING) {331 #ifdef CONFIG_DEBUG332 printf("IPI is pending.\n");333 #endif334 }335 336 347 icr.delmod = DELMOD_INIT; 337 348 icr.destmod = DESTMOD_PHYS; -
kernel/arch/ia64/Makefile.inc
rde73242 refdfebc 30 30 BFD_ARCH = ia64-elf64 31 31 32 CMN1 = -mconstant-gp -fno-unwind-tables -mfixed-range=f32-f127 32 # 33 # FIXME: 34 # 35 # The -fno-selective-scheduling and -fno-selective-scheduling2 options 36 # should be removed as soon as a bug in GCC concerning unchecked 37 # speculative loads is fixed. 38 # 39 # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53975 for reference. 40 # 41 42 CMN1 = -mconstant-gp -fno-unwind-tables -mfixed-range=f32-f127 -fno-selective-scheduling -fno-selective-scheduling2 33 43 GCC_CFLAGS += $(CMN1) 34 44 ICC_CFLAGS += $(CMN1) -
kernel/arch/mips32/Makefile.inc
rde73242 refdfebc 29 29 BFD_ARCH = mips 30 30 BFD = binary 31 GCC_CFLAGS += -m no-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=3231 GCC_CFLAGS += -msoft-float -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=32 32 32 33 33 BITS = 32 … … 48 48 BFD_NAME = elf32-tradlittlemips 49 49 ENDIANESS = LE 50 GCC_CFLAGS += -mhard-float51 50 endif 52 51 -
kernel/arch/mips64/Makefile.inc
rde73242 refdfebc 29 29 BFD_ARCH = mips:4000 30 30 BFD = binary 31 GCC_CFLAGS += -m no-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=6431 GCC_CFLAGS += -msoft-float -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=64 32 32 AFLAGS = -64 33 33 … … 40 40 BFD_NAME = elf64-tradlittlemips 41 41 ENDIANESS = LE 42 GCC_CFLAGS += -mhard-float43 42 endif 44 43 -
kernel/arch/sparc64/src/smp/sun4u/ipi.c
rde73242 refdfebc 124 124 (void) interrupts_disable(); 125 125 } 126 } while ( done);126 } while (!done); 127 127 128 128 preemption_enable();
Note:
See TracChangeset
for help on using the changeset viewer.
