Subversion Repositories HelenOS

Rev

Rev 3588 | Rev 4338 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3588 Rev 3674
Line 85... Line 85...
85
    int myid,myeid;
85
    int myid,myeid;
86
   
86
   
87
    myid=ia64_get_cpu_id();
87
    myid=ia64_get_cpu_id();
88
    myeid=ia64_get_cpu_eid();
88
    myeid=ia64_get_cpu_eid();
89
 
89
 
90
    printf("Not sending to ID:%d,EID:%d",myid,myeid);
-
 
91
   
90
   
92
    for(id=0;id<256;id++)
91
    for(id=0;id<256;id++)
93
        for(eid=0;eid<256;eid++)
92
        for(eid=0;eid<256;eid++)
94
            if((id!=myid) || (eid!=myeid))
93
            if((id!=myid) || (eid!=myeid))
95
                ipi_send_ipi(id,eid,ipi);
94
                ipi_send_ipi(id,eid,ipi);
96
}
95
}
97
 
96
 
98
void ipi_broadcast_arch(int ipi )
97
void ipi_broadcast_arch(int ipi )
99
{
98
{
-
 
99
    int id,eid;
-
 
100
    int myid,myeid;
-
 
101
   
-
 
102
    myid=ia64_get_cpu_id();
-
 
103
    myeid=ia64_get_cpu_eid();
-
 
104
 
-
 
105
    //printf("Sending ipi %d on %d\n",ipi,CPU->id);
-
 
106
    for(id=0;id<256;id++)
-
 
107
        for(eid=0;eid<256;eid++)
-
 
108
            if((id!=myid) || (eid!=myeid))
-
 
109
                if(cpu_by_id_eid_list[id][eid])
100
    ipi_broadcast_arch_all(ipi);
110
                    ipi_send_ipi(id,eid,ipi);
-
 
111
 
101
}
112
}
102
 
113
 
103
 
114
 
104
void smp_init(void)
115
void smp_init(void)
105
{
116
{
-
 
117
    if(!bootinfo->hello_configured) return;
-
 
118
    //If we have not system prepared by hello, we are not able to start AP's
-
 
119
    //this means we are running on simulator
-
 
120
   
106
    sapic_init();
121
    sapic_init();
107
    ipi_broadcast_arch_all(bootinfo->wakeup_intno);
122
    ipi_broadcast_arch_all(bootinfo->wakeup_intno);
108
    volatile long long brk;
123
    volatile long long brk;
109
        for(brk=0;brk<100LL*1024LL*1024LL;brk++); //wait a while before CPUs starts
124
        for(brk=0;brk<100LL*1024LL*1024LL;brk++); //wait a while before CPUs starts
110
 
125
 
Line 113... Line 128...
113
   
128
   
114
    for(id=0;id<256;id++)
129
    for(id=0;id<256;id++)
115
        for(eid=0;eid<256;eid++)
130
        for(eid=0;eid<256;eid++)
116
                if(cpu_by_id_eid_list[id][eid]==1){
131
                if(cpu_by_id_eid_list[id][eid]==1){
117
                    config.cpu_count++;
132
                    config.cpu_count++;
118
                    printf("Found CPU ID:%d EDI:%d\n",id,eid);
-
 
119
                    cpu_by_id_eid_list[id][eid]=2;
133
                    cpu_by_id_eid_list[id][eid]=2;
120
 
134
 
121
            }
135
            }
122
}
136
}
123
 
137