|
30 | 30 | #include <asm/ppc_asm.h> |
31 | 31 | #include <asm/asm-offsets.h> |
32 | 32 | #include <asm/ptrace.h> |
| 33 | +#include <asm/fixmap.h> |
33 | 34 |
|
34 | 35 | /* Macro to make the code more readable. */ |
35 | 36 | #ifdef CONFIG_8xx_CPU6 |
@@ -763,7 +764,7 @@ start_here: |
763 | 764 | * virtual to physical. Also, set the cache mode since that is defined |
764 | 765 | * by TLB entries and perform any additional mapping (like of the IMMR). |
765 | 766 | * If configured to pin some TLBs, we pin the first 8 Mbytes of kernel, |
766 | | - * 24 Mbytes of data, and the 8M IMMR space. Anything not covered by |
| 767 | + * 24 Mbytes of data, and the 512k IMMR space. Anything not covered by |
767 | 768 | * these mappings is mapped by page tables. |
768 | 769 | */ |
769 | 770 | initial_mmu: |
@@ -812,20 +813,20 @@ initial_mmu: |
812 | 813 | ori r8, r8, MD_APG_INIT@l |
813 | 814 | mtspr SPRN_MD_AP, r8 |
814 | 815 |
|
815 | | - /* Map another 8 MByte at the IMMR to get the processor |
| 816 | + /* Map a 512k page for the IMMR to get the processor |
816 | 817 | * internal registers (among other things). |
817 | 818 | */ |
818 | 819 | #ifdef CONFIG_PIN_TLB |
819 | 820 | addi r10, r10, 0x0100 |
820 | 821 | mtspr SPRN_MD_CTR, r10 |
821 | 822 | #endif |
822 | 823 | mfspr r9, 638 /* Get current IMMR */ |
823 | | - andis. r9, r9, 0xff80 /* Get 8Mbyte boundary */ |
| 824 | + andis. r9, r9, 0xfff8 /* Get 512 kbytes boundary */ |
824 | 825 |
|
825 | | - mr r8, r9 /* Create vaddr for TLB */ |
| 826 | + lis r8, VIRT_IMMR_BASE@h /* Create vaddr for TLB */ |
826 | 827 | ori r8, r8, MD_EVALID /* Mark it valid */ |
827 | 828 | mtspr SPRN_MD_EPN, r8 |
828 | | - li r8, MD_PS8MEG /* Set 8M byte page */ |
| 829 | + li r8, MD_PS512K | MD_GUARDED /* Set 512k byte page */ |
829 | 830 | ori r8, r8, MD_SVALID /* Make it valid */ |
830 | 831 | mtspr SPRN_MD_TWC, r8 |
831 | 832 | mr r8, r9 /* Create paddr for TLB */ |
|
0 commit comments