Changes in / [5387807:d0c82c5] in mainline


Ignore:
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/ia64/Makefile.inc

    r5387807 rd0c82c5  
    3838RD_SRVS_NON_ESSENTIAL +=
    3939
    40 RD_SRVS_ESSENTIAL += \
    41         $(USPACE_PATH)/srv/hw/char/i8042/i8042
     40RD_SRVS_ESSENTIAL +=
    4241
    4342SOURCES = \
  • boot/arch/ia64/src/asm.S

    r5387807 rd0c82c5  
    9797        adds r15 = -1, r15
    9898        add r17 = r14, in1
    99 (p6)    br.cond.dpnt 2b ;;
     99(p6)    br.cond.dpnt 2b ;;
    100100        mov ar.lc = r15
    1011016:
     
    112112
    113113jump_to_kernel:
    114         alloc loc0 = ar.pfs, 1, 1, 0, 0
    115         mov r1 = in0 ;;                 # Pass bootinfo address
    116         movl r8 = KERNEL_ADDRESS;;
    117         mov b1 = r8 ;;
    118         br.call.sptk.many b0 = b1;;
     114    alloc loc0 = ar.pfs, 1, 1, 0, 0
     115    mov r1 = in0;                       # Pass bootinfo address
     116    movl r8 = KERNEL_ADDRESS;;
     117    mov b1 = r8 ;;
     118    br.call.sptk.many b0 = b1;;
  • boot/arch/ia64/src/boot.S

    r5387807 rd0c82c5  
    5151        add r12 = -16, r12
    5252
    53         #
    54         # Disable Floating-point High register set (f32 - f127)
    55         #
    56         ssm (1 << 19) ;;
     53        ssm (1 << 19) ;;        /* disable f32 - f127 */
    5754        srlz.i
    5855        srlz.d ;;
    5956
    60         br.call.sptk.many rp = bootstrap
     57        movl r18 = bootstrap ;;
     58        mov b1 = r18 ;;
     59        br.call.sptk.many b0 = b1
    6160
    6261.bss
  • kernel/arch/ia64/src/drivers/ski.c

    r5387807 rd0c82c5  
    216216                 * self-sufficient.
    217217                 */
    218                 sysinfo_set_item_val("fb.kind", NULL, 6);
     218                sysinfo_set_item_val("fb", NULL, false);
    219219               
    220220                fb_exported = true;
  • kernel/arch/ia64/src/smp/smp.c

    r5387807 rd0c82c5  
    3333 */
    3434
     35#include <arch.h>
     36#include <arch/drivers/ski.h>
     37#include <arch/drivers/it.h>
     38#include <arch/interrupt.h>
     39#include <arch/barrier.h>
     40#include <arch/asm.h>
     41#include <arch/register.h>
     42#include <typedefs.h>
     43#include <arch/context.h>
     44#include <arch/stack.h>
     45#include <arch/mm/page.h>
     46#include <mm/as.h>
     47#include <config.h>
     48#include <userspace.h>
     49#include <console/console.h>
     50#include <proc/uarg.h>
     51#include <syscall/syscall.h>
     52#include <ddi/irq.h>
     53#include <ddi/device.h>
     54#include <arch/bootinfo.h>
    3555#include <smp/smp.h>
    3656#include <smp/ipi.h>
     57#include <arch/atomic.h>
     58#include <panic.h>
     59#include <print.h>
    3760
    3861#ifdef CONFIG_SMP
    3962
    40 void ipi_broadcast_arch(int ipi)
     63extern char cpu_by_id_eid_list[256][256];
     64
     65static void sapic_init(void)
    4166{
     67        bootinfo->sapic = (unative_t *)(PA2KA((unative_t)(bootinfo->sapic)) |
     68            FW_OFFSET);
     69}
     70
     71static void ipi_broadcast_arch_all(int ipi)
     72{
     73        int id, eid;
     74        int myid, myeid;
     75       
     76        myid = ia64_get_cpu_id();
     77        myeid = ia64_get_cpu_eid();
     78       
     79        for (id = 0; id < 256; id++)
     80                for (eid = 0; eid < 256; eid++)
     81                        if ((id != myid) || (eid != myeid))
     82                                ipi_send_ipi(id, eid, ipi);
     83}
     84
     85void ipi_broadcast_arch(int ipi )
     86{
     87        int id, eid;
     88        int myid, myeid;
     89       
     90        myid = ia64_get_cpu_id();
     91        myeid = ia64_get_cpu_eid();
     92
     93        for (id = 0; id < 256; id++)
     94                for (eid = 0; eid < 256; eid++)
     95                        if ((id != myid) || (eid != myeid))
     96                                if (cpu_by_id_eid_list[id][eid])
     97                                        ipi_send_ipi(id, eid, ipi);
    4298}
    4399
    44100void smp_init(void)
    45101{
     102        if (!bootinfo->hello_configured)
     103                return;
     104       
     105        /*
     106         * If we have not got system prepared by hello, we are not able to start
     107         * AP's. This means we are running on a simulator.
     108         */
     109       
     110        sapic_init();
     111        ipi_broadcast_arch_all(bootinfo->wakeup_intno);
     112        volatile long long brk;
     113        for (brk = 0; brk < 100LL * 1024LL * 1024LL; brk++)
     114                ;       /* wait a while before CPUs starts */
     115
     116        config.cpu_count = 0;
     117        int id, eid;
     118       
     119        for (id = 0; id < 256; id++)
     120                for (eid = 0; eid < 256; eid++)
     121                        if (cpu_by_id_eid_list[id][eid] == 1) {
     122                                config.cpu_count++;
     123                                cpu_by_id_eid_list[id][eid] = 2;
     124                        }
    46125}
    47126
    48127void kmp(void *arg __attribute__((unused)))
    49128{
     129        int id, eid;
     130        int myid, myeid;
     131       
     132        myid = ia64_get_cpu_id();
     133        myeid = ia64_get_cpu_eid();
     134
     135        for (id = 0; id < 256; id++)
     136                for (eid = 0; eid < 256; eid++)
     137                        if ((id != myid) || (eid != myeid))
     138                                if (cpu_by_id_eid_list[id][eid] != 0) {
     139                                        if (cpu_by_id_eid_list[id][eid] == 1) {
     140                                                printf("Found Late CPU ID:%d "
     141                                                    "EDI:%d Not added to "
     142                                                    "system!!!\n", id, eid);
     143                                                continue;
     144                                        }
     145                                        cpu_by_id_eid_list[id][eid] = 3;
     146                                        /*
     147                                         * There may be just one AP being
     148                                         * initialized at the time. After
     149                                         * it comes completely up, it is
     150                                         * supposed to wake us up.
     151                                         */
     152                                        if (waitq_sleep_timeout(
     153                                            &ap_completion_wq, 1000000,
     154                                            SYNCH_FLAGS_NONE) ==
     155                                            ESYNCH_TIMEOUT) {
     156                                                printf("%s: waiting for cpu "
     157                                                    "ID:%d EID:%d timed out\n",
     158                                                    __FUNCTION__, id, eid);
     159                                            }
     160                                }
    50161}
    51162
  • kernel/arch/ia64/src/start.S

    r5387807 rd0c82c5  
    5050        .auto
    5151       
     52#ifdef CONFIG_SMP
     53        # Identify self(CPU) in OS structures by ID / EID
     54       
     55        mov r9 = cr64
     56        mov r10 = 1
     57        movl r12 = 0xffffffff
     58        movl r8 = cpu_by_id_eid_list
     59        and r8 = r8, r12
     60        shr r9 = r9, 16
     61        add r8 = r8, r9
     62        st1 [r8] = r10
     63#endif
     64       
    5265        mov psr.l = r0
    5366        srlz.i
     
    151164        bsw.1
    152165       
     166#ifdef CONFIG_SMP
     167        # Am I BSP or AP?
     168        movl r20 = bsp_started ;;
     169        ld8 r20 = [r20] ;;
     170        cmp.eq p3, p2 = r20, r0 ;;
     171#else
     172        cmp.eq p3, p2 = r0, r0 ;;  /* you are BSP */
     173#endif  /* CONFIG_SMP */
     174       
    153175        # Initialize register stack
    154176        mov ar.rsc = r0
     
    169191         * Initialize bootinfo on BSP.
    170192         */
    171         addl r21 = @gprel(bootinfo), gp ;;
    172         st8 [r21] = r20
     193(p3)    addl r21 = @gprel(bootinfo), gp ;;
     194(p3)    st8 [r21] = r20
    173195       
    174196        ssm (1 << 19) ;; /* Disable f32 - f127 */
     
    176198        srlz.d ;;
    177199       
     200#ifdef CONFIG_SMP
     201(p2)    movl r18 = main_ap ;;
     202(p2)    mov b1 = r18 ;;
     203(p2)    br.call.sptk.many b0 = b1
     204       
     205        # Mark that BSP is on
     206       
     207        mov r20 = 1 ;;
     208        movl r21 = bsp_started ;;
     209        st8 [r21] = r20 ;;
     210#endif
     211       
    178212        br.call.sptk.many b0 = arch_pre_main
    179 0:
    180         br.call.sptk.many b0 = main_bsp
     213       
     214        movl r18 = main_bsp ;;
     215        mov b1 = r18 ;;
     216        br.call.sptk.many b0 = b1
     217
    1812180:
    182219        br 0b
     220
     221#ifdef CONFIG_SMP
     222
     223.align 4096
     224kernel_image_ap_start:
     225        .auto
     226       
     227        # Identify self(CPU) in OS structures by ID / EID
     228       
     229        mov r9 = cr64
     230        mov r10 = 1
     231        movl r12 = 0xffffffff
     232        movl r8 = cpu_by_id_eid_list
     233        and r8 = r8, r12
     234        shr r9 = r9, 16
     235        add r8 = r8, r9
     236        st1 [r8] = r10
     237       
     238        # Wait for wakeup synchro signal (#3 in cpu_by_id_eid_list)
     239
     240kernel_image_ap_start_loop:
     241        movl r11 = kernel_image_ap_start_loop
     242        and r11 = r11, r12
     243        mov b1 = r11
     244       
     245        ld1 r20 = [r8]
     246        movl r21 = 3
     247        cmp.eq p2, p3 = r20, r21
     248(p3)    br.call.sptk.many b0 = b1
     249       
     250        movl r11 = kernel_image_start
     251        and r11 = r11, r12
     252        mov b1 = r11
     253        br.call.sptk.many b0 = b1
     254
     255.align 16
     256.global bsp_started
     257bsp_started:
     258        .space 8
     259
     260.align 4096
     261.global cpu_by_id_eid_list
     262cpu_by_id_eid_list:
     263        .space 65536
     264
     265#endif  /* CONFIG_SMP */
  • uspace/srv/hid/fb/main.c

    r5387807 rd0c82c5  
    105105#endif
    106106#ifdef SKI_ENABLED
    107         if ((!initialized) && (fb_kind == 6)) {
     107        if ((!initialized) && (!fb_present)) {
    108108                if (ski_init() == 0)
    109109                        initialized = true;
Note: See TracChangeset for help on using the changeset viewer.