Changeset efdfebc in mainline for kernel/arch


Ignore:
Timestamp:
2012-11-06T21:03:44Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge mainline changes.

Location:
kernel/arch
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/asm.S

    rde73242 refdfebc  
    362362         */
    363363        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
    365373        cli
    366374       
     
    388396        sysretq
    389397
     398bad_rip:
     399        movq %rsp, %rdi
     400        movabs $bad_rip_msg, %rsi
     401        xorb %al, %al
     402        callq fault_from_uspace
     403        /* not reached */
     404       
     405bad_rip_msg:
     406        .asciz "Invalid instruction pointer."
     407
    390408/** Print Unicode character to EGA display.
    391409 *
  • kernel/arch/amd64/src/boot/multiboot.S

    rde73242 refdfebc  
    7676
    7777multiboot_image_start:
     78        cli
    7879        cld
    7980       
     
    8182        movl $START_STACK, %esp
    8283       
    83         /* Initialize Global Descriptor Table register */
     84        /*
     85         * Initialize Global Descriptor Table and
     86         * Interrupt Descriptor Table registers
     87         */
    8488        lgdtl bootstrap_gdtr
     89        lidtl bootstrap_idtr
    8590       
    8691        /* Kernel data + stack */
     
    645650.section K_DATA_START, "aw", @progbits
    646651
     652.global bootstrap_idtr
     653bootstrap_idtr:
     654        .word 0
     655        .long 0
     656
    647657.global bootstrap_gdtr
    648658bootstrap_gdtr:
  • kernel/arch/amd64/src/boot/multiboot2.S

    rde73242 refdfebc  
    116116
    117117multiboot2_image_start:
     118        cli
    118119        cld
    119120       
     
    121122        movl $START_STACK, %esp
    122123       
    123         /* Initialize Global Descriptor Table register */
     124        /*
     125         * Initialize Global Descriptor Table and
     126         * Interrupt Descriptor Table registers
     127         */
    124128        lgdtl bootstrap_gdtr
     129        lidtl bootstrap_idtr
    125130       
    126131        /* Kernel data + stack */
  • kernel/arch/amd64/src/boot/vesa_ret.inc

    rde73242 refdfebc  
    11.code32
    22vesa_init_protected:
     3        cli
    34        cld
    45       
  • kernel/arch/arm32/Makefile.inc

    rde73242 refdfebc  
    3333ATSIGN = %
    3434
    35 GCC_CFLAGS += -march=armv4
     35GCC_CFLAGS += -march=armv4 -fno-omit-frame-pointer -mapcs-frame
    3636
    3737BITS = 32
  • kernel/arch/arm32/include/istate.h

    rde73242 refdfebc  
    4949/** Struct representing CPU state saved when an exception occurs. */
    5050typedef struct istate {
     51        uint32_t dummy;
    5152        uint32_t spsr;
    5253        uint32_t sp;
  • kernel/arch/arm32/src/exc_handler.S

    rde73242 refdfebc  
    130130        stmfd r13!, {r2}
    1311312:
     132        sub sp, sp, #4
    132133.endm
    133134
    134135.macro LOAD_REGS_FROM_STACK
     136        add sp, sp, #4
    135137        ldmfd r13!, {r0}
    136138        msr spsr, r0
  • kernel/arch/arm32/src/exception.c

    rde73242 refdfebc  
    123123       
    124124        asm volatile (
    125                 "mrc p15, 0, %[control_reg], c1, c1"
     125                "mrc p15, 0, %[control_reg], c1, c0"
    126126                : [control_reg] "=r" (control_reg)
    127127        );
     
    131131       
    132132        asm volatile (
    133                 "mcr p15, 0, %[control_reg], c1, c1"
     133                "mcr p15, 0, %[control_reg], c1, c0"
    134134                :: [control_reg] "r" (control_reg)
    135135        );
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    rde73242 refdfebc  
    3838#include <console/chardev.h>
    3939#include <genarch/drivers/pl050/pl050.h>
     40#include <genarch/drivers/arm926_uart/arm926_uart.h>
    4041#include <genarch/kbrd/kbrd.h>
     42#include <genarch/srln/srln.h>
    4143#include <console/console.h>
    4244#include <sysinfo/sysinfo.h>
     
    5355#include <print.h>
    5456
     57
    5558#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
     60static struct {
     61        icp_hw_map_t hw_map;
     62        irq_t timer_irq;
     63        arm926_uart_t uart;
     64} icp;
     65
     66
     67
    5868struct arm_machine_ops icp_machine_ops = {
    5969        icp_init,
     
    7080
    7181static bool hw_map_init_called = false;
    72 static bool vga_init = false;
    7382uint32_t sdram[8] = {
    7483        16777216,       /* 16mb */
     
    8998void icp_vga_init(void)
    9099{
    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;
    99108       
    100109}
     
    103112static inline uint32_t icp_irqc_get_sources(void)
    104113{
    105         return *((uint32_t *) icp_hw_map.irqc);
     114        return *((uint32_t *) icp.hw_map.irqc);
    106115}
    107116
     
    113122static inline void icp_irqc_mask(uint32_t irq)
    114123{
    115         *((uint32_t *) icp_hw_map.irqc_mask) = (1 << irq);
     124        *((uint32_t *) icp.hw_map.irqc_mask) = (1 << irq);
    116125}
    117126
     
    123132static inline void icp_irqc_unmask(uint32_t irq)
    124133{
    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. */
    129138void icp_init(void)
    130139{
    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,
    154163            PAGE_WRITE | PAGE_NOT_CACHEABLE);
    155164
     
    164173{
    165174        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;
    169178        icp_irqc_unmask(ICP_TIMER_IRQ);
    170179}
     
    172181static irq_ownership_t icp_timer_claim(irq_t *irq)
    173182{
    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;
    176185                return IRQ_ACCEPT;
    177186        } else
     
    200209static void icp_timer_irq_init(void)
    201210{
    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);
    209218}
    210219
     
    231240
    232241        if (hw_map_init_called) {
    233                 *size = (sdram[((*(uint32_t *)icp_hw_map.sdramcr &
     242                *size = (sdram[((*(uint32_t *)icp.hw_map.sdramcr &
    234243                    ICP_SDRAM_MASK) >> 2)]);
    235244        } else {
     
    286295{
    287296#ifdef CONFIG_FB
     297        static bool vga_init = false;
    288298        if (!vga_init) {
    289299                icp_vga_init();
     
    304314                stdout_wire(fbdev);
    305315#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
    306321}
    307322
     
    310325
    311326        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;
    315330               
    316331        pl050_instance_t *pl050_instance = pl050_init(pl050, ICP_KBD_IRQ);
     
    335350            ICP_KBD);
    336351
     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
    337361}
    338362
  • kernel/arch/arm32/src/mm/page_fault.c

    rde73242 refdfebc  
    7777}
    7878
    79 /** Decides whether the instruction is load/store or not.
    80  *
    81  * @param instr Instruction
    82  *
    83  * @return true when instruction is load/store, false otherwise
    84  *
    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 Instruction
    110  *
    111  * @return true when instruction is swap, false otherwise
    112  */
    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 
    12479/** Decides whether read or write into memory is requested.
    12580 *
     
    12883 *
    12984 * @return Type of access into memory, PF_ACCESS_EXEC if no memory access is
    130  *         requested.
     85 *         requested.
    13186 */
    13287static pf_access_t get_memory_access_type(uint32_t instr_addr,
     
    146101        }
    147102
    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;
    154131                }
    155         }
    156 
    157         /* swap, swpb instruction */
    158         if (is_swap_instruction(instr)) {
    159                 return PF_ACCESS_WRITE;
    160132        }
    161133
    162134        panic("page_fault - instruction doesn't access memory "
    163135            "(instr_code: %#0" PRIx32 ", badvaddr:%p).",
    164             instr_union.pc, (void *) badvaddr);
    165 
    166         return PF_ACCESS_EXEC;
     136            inst, (void *) badvaddr);
    167137}
    168138
  • kernel/arch/ia32/src/boot/multiboot.S

    rde73242 refdfebc  
    7373
    7474multiboot_image_start:
     75        cli
    7576        cld
    7677       
     
    7879        movl $START_STACK, %esp
    7980       
    80         /* Initialize Global Descriptor Table register */
     81        /*
     82         * Initialize Global Descriptor Table and
     83         * Interrupt Descriptor Table registers
     84         */
    8185        lgdtl bootstrap_gdtr
     86        lidtl bootstrap_idtr
    8287       
    8388        /* Kernel data + stack */
     
    701706page_directory:
    702707        .space 4096, 0
     708
     709.global bootstrap_idtr
     710bootstrap_idtr:
     711        .word 0
     712        .long 0
    703713
    704714.global bootstrap_gdtr
  • kernel/arch/ia32/src/boot/multiboot2.S

    rde73242 refdfebc  
    114114
    115115multiboot2_image_start:
     116        cli
    116117        cld
    117118       
     
    119120        movl $START_STACK, %esp
    120121       
    121         /* Initialize Global Descriptor Table register */
     122        /*
     123         * Initialize Global Descriptor Table and
     124         * Interrupt Descriptor Table registers
     125         */
    122126        lgdtl bootstrap_gdtr
     127        lidtl bootstrap_idtr
    123128       
    124129        /* Kernel data + stack */
  • kernel/arch/ia32/src/boot/vesa_prot.inc

    rde73242 refdfebc  
    8888                /* Returned back to protected mode */
    8989               
     90                /*
     91                 * Initialize Global Descriptor Table and
     92                 * Interrupt Descriptor Table registers
     93                 */
     94                lgdtl bootstrap_gdtr
     95                lidtl bootstrap_idtr
     96               
    9097                movzx %ax, %ecx
    9198                mov %ecx, KA2PA(bfb_scanline)
  • kernel/arch/ia32/src/boot/vesa_real.inc

    rde73242 refdfebc  
    3030.code32
    3131vesa_init:
     32        lidtl vesa_idtr
    3233        jmp $GDT_SELECTOR(VESA_INIT_DES), $vesa_init_real - vesa_init
     34
     35vesa_idtr:
     36        .word 0x3ff
     37        .long 0
    3338
    3439.code16
  • kernel/arch/ia32/src/boot/vesa_ret.inc

    rde73242 refdfebc  
    11.code32
    22vesa_init_protected:
     3        cli
    34        cld
    45       
  • kernel/arch/ia32/src/smp/apic.c

    rde73242 refdfebc  
    259259}
    260260
     261#define DELIVS_PENDING_SILENT_RETRIES   4       
     262
     263static 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
    261281/** Send all CPUs excluding CPU IPI vector.
    262282 *
     
    279299       
    280300        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();
    288303       
    289304        return apic_poll_errors();
     
    327342                return 0;
    328343       
     344        l_apic_wait_for_delivery();
     345
    329346        icr.lo = l_apic[ICRlo];
    330         if (icr.delivs == DELIVS_PENDING) {
    331 #ifdef CONFIG_DEBUG
    332                 printf("IPI is pending.\n");
    333 #endif
    334         }
    335        
    336347        icr.delmod = DELMOD_INIT;
    337348        icr.destmod = DESTMOD_PHYS;
  • kernel/arch/ia64/Makefile.inc

    rde73242 refdfebc  
    3030BFD_ARCH = ia64-elf64
    3131
    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
     42CMN1 = -mconstant-gp -fno-unwind-tables -mfixed-range=f32-f127 -fno-selective-scheduling -fno-selective-scheduling2
    3343GCC_CFLAGS += $(CMN1)
    3444ICC_CFLAGS += $(CMN1)
  • kernel/arch/mips32/Makefile.inc

    rde73242 refdfebc  
    2929BFD_ARCH = mips
    3030BFD = binary
    31 GCC_CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=32
     31GCC_CFLAGS += -msoft-float -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=32
    3232
    3333BITS = 32
     
    4848        BFD_NAME = elf32-tradlittlemips
    4949        ENDIANESS = LE
    50         GCC_CFLAGS += -mhard-float
    5150endif
    5251
  • kernel/arch/mips64/Makefile.inc

    rde73242 refdfebc  
    2929BFD_ARCH = mips:4000
    3030BFD = binary
    31 GCC_CFLAGS += -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=64
     31GCC_CFLAGS += -msoft-float -mno-abicalls -G 0 -fno-zero-initialized-in-bss -mips3 -mabi=64
    3232AFLAGS = -64
    3333
     
    4040        BFD_NAME = elf64-tradlittlemips
    4141        ENDIANESS = LE
    42         GCC_CFLAGS += -mhard-float
    4342endif
    4443
  • kernel/arch/sparc64/src/smp/sun4u/ipi.c

    rde73242 refdfebc  
    124124                        (void) interrupts_disable();
    125125                }
    126         } while (done);
     126        } while (!done);
    127127       
    128128        preemption_enable();
Note: See TracChangeset for help on using the changeset viewer.