version 1.12, 2003/08/07 16:27:54 |
version 1.13, 2003/08/08 20:14:06 |
Line 238 _C_LABEL(biosextmem): .long REALEXTMEM |
|
Line 238 _C_LABEL(biosextmem): .long REALEXTMEM |
|
tmpstk: |
tmpstk: |
|
|
|
|
#define _RELOC(x) ((x) - KERNBASE) |
#define _RELOC(x) ((x) - KERNBASE_LOCORE) |
#define RELOC(x) _RELOC(_C_LABEL(x)) |
#define RELOC(x) _RELOC(_C_LABEL(x)) |
|
|
.text |
.text |
Line 292 start: movw $0x1234,0x472 # warm boot |
|
Line 292 start: movw $0x1234,0x472 # warm boot |
|
movl 16(%esp),%eax |
movl 16(%esp),%eax |
testl %eax,%eax |
testl %eax,%eax |
jz 1f |
jz 1f |
addl $KERNBASE,%eax |
addl $KERNBASE_LOCORE,%eax |
1: movl %eax,RELOC(esym) |
1: movl %eax,RELOC(esym) |
|
|
movl RELOC(biosextmem),%eax |
movl RELOC(biosextmem),%eax |
Line 512 try586: /* Use the `cpuid' instruction. |
|
Line 512 try586: /* Use the `cpuid' instruction. |
|
movl RELOC(esym),%eax |
movl RELOC(esym),%eax |
testl %eax,%eax |
testl %eax,%eax |
jz 1f |
jz 1f |
subl $KERNBASE,%eax |
subl $KERNBASE_LOCORE,%eax |
movl %eax,%edi |
movl %eax,%edi |
1: |
1: |
#endif |
#endif |
Line 628 try586: /* Use the `cpuid' instruction. |
|
Line 628 try586: /* Use the `cpuid' instruction. |
|
ret |
ret |
|
|
begin: |
begin: |
/* Now running relocated at KERNBASE. Remove double mapping. */ |
/* Now running relocated at KERNBASE_LOCORE. Remove double mapping. */ |
movl _C_LABEL(nkpde),%ecx # for this many pde s, |
movl _C_LABEL(nkpde),%ecx # for this many pde s, |
leal (PROC0PDIR+0*4)(%esi),%ebx # which is where temp maps! |
leal (PROC0PDIR+0*4)(%esi),%ebx # which is where temp maps! |
addl $(KERNBASE), %ebx # now use relocated address |
addl $(KERNBASE_LOCORE), %ebx # now use relocated address |
1: movl $0,(%ebx) |
1: movl $0,(%ebx) |
addl $4,%ebx # next pde |
addl $4,%ebx # next pde |
loop 1b |
loop 1b |
|
|
/* Relocate atdevbase. */ |
/* Relocate atdevbase. */ |
movl _C_LABEL(nkpde),%edx |
movl _C_LABEL(nkpde),%edx |
shll $PGSHIFT,%edx |
shll $PGSHIFT,%edx |
addl $(TABLESIZE+KERNBASE),%edx |
addl $(TABLESIZE+KERNBASE_LOCORE),%edx |
addl %esi,%edx |
addl %esi,%edx |
movl %edx,_C_LABEL(atdevbase) |
movl %edx,_C_LABEL(atdevbase) |
|
|
/* Set up bootstrap stack. */ |
/* Set up bootstrap stack. */ |
leal (PROC0STACK+KERNBASE)(%esi),%eax |
leal (PROC0STACK+KERNBASE_LOCORE)(%esi),%eax |
movl %eax,_C_LABEL(proc0paddr) |
movl %eax,_C_LABEL(proc0paddr) |
leal (USPACE-FRAMESIZE)(%eax),%esp |
leal (USPACE-FRAMESIZE)(%eax),%esp |
movl %esi,PCB_CR3(%eax) # pcb->pcb_cr3 |
movl %esi,PCB_CR3(%eax) # pcb->pcb_cr3 |