This commit is contained in:
rsc 2007-08-27 16:55:10 +00:00
parent da94233784
commit 112873bc65

12
mp.c
View file

@ -114,7 +114,7 @@ mp_detect(void)
void void
mp_init(void) mp_init(void)
{ {
int i, r; int i;
uchar *p, *e; uchar *p, *e;
struct mpctb *mpctb; struct mpctb *mpctb;
struct mppe *proc; struct mppe *proc;
@ -132,10 +132,10 @@ mp_init(void)
// application processors and initialising any I/O APICs. The table // application processors and initialising any I/O APICs. The table
// is guaranteed to be in order such that only one pass is necessary. // is guaranteed to be in order such that only one pass is necessary.
mpctb = (struct mpctb*) mp->physaddr; mpctb = (struct mpctb*)mp->physaddr;
lapicaddr = (uint*) mpctb->lapicaddr; lapic = (uint*)mpctb->lapicaddr;
p = ((uchar*)mpctb)+sizeof(struct mpctb); p = (uchar*)mpctb + sizeof(*mpctb);
e = ((uchar*)mpctb)+mpctb->length; e = (uchar*)mpctb + mpctb->length;
while(p < e) { while(p < e) {
switch(*p){ switch(*p){
@ -219,7 +219,7 @@ mp_startthem(void)
*(uint*)(APBOOTCODE-8) = (uint)mpmain; *(uint*)(APBOOTCODE-8) = (uint)mpmain;
// Go! // Go!
lapic_startap(cpus[c].apicid, (uint) APBOOTCODE); lapic_startap(cpus[c].apicid, (uint)APBOOTCODE);
// Wait for cpu to get through bootstrap. // Wait for cpu to get through bootstrap.
while(cpus[c].booted == 0) while(cpus[c].booted == 0)