| version 1.28, 2004/05/13 12:15:01 |
version 1.29, 2004/08/05 15:25:29 |
| Line 524 try586: /* Use the `cpuid' instruction. |
|
| Line 524 try586: /* Use the `cpuid' instruction. |
|
| |
|
| /* |
/* |
| * Calculate the size of the kernel page table directory, and |
* Calculate the size of the kernel page table directory, and |
| * how many entries it will have. |
* how many entries it will have. Adjust nkpde to the actual |
| |
* kernel size automatically. Account for the bootstrap tables, |
| |
* round up, and add an extra 4MB. |
| */ |
*/ |
| |
leal TABLESIZE+NBPD+PDOFSET(%edi),%eax |
| |
shrl $PDSHIFT,%eax |
| movl RELOC(nkpde),%ecx # get nkpde |
movl RELOC(nkpde),%ecx # get nkpde |
| cmpl $NKPTP_MIN,%ecx # larger than min? |
cmpl %ecx,%eax |
| |
jb 1f |
| |
movl %eax,%ecx |
| |
1: cmpl $NKPTP_MIN,%ecx # larger than min? |
| jge 1f |
jge 1f |
| movl $NKPTP_MIN,%ecx # set at min |
movl $NKPTP_MIN,%ecx # set at min |
| jmp 2f |
jmp 2f |
| 1: cmpl $NKPTP_MAX,%ecx # larger than max? |
1: cmpl $NKPTP_MAX,%ecx # larger than max? |
| jle 2f |
jle 2f |
| movl $NKPTP_MAX,%ecx |
movl $NKPTP_MAX,%ecx |
| 2: |
2: movl %ecx,RELOC(nkpde) |
| |
|
| /* Clear memory for bootstrap tables. */ |
/* Clear memory for bootstrap tables. */ |
| shll $PGSHIFT,%ecx |
shll $PGSHIFT,%ecx |