Rev 3743 | Rev 3835 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3743 | Rev 3770 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | 29 | ||
30 | #include <arch/arch.h> |
30 | #include <arch/arch.h> |
31 | #include <arch/stack.h> |
31 | #include <arch/stack.h> |
32 | #include <arch/sun4v/regdef.h> |
32 | #include <arch/sun4v/regdef.h> |
33 | #include <arch/sun4v/hypercall.h> |
33 | #include <arch/sun4v/hypercall.h> |
- | 34 | #include <arch/mm/pagesize.h> |
|
34 | #include <arch/mm/sun4v/tte.h> |
35 | #include <arch/mm/sun4v/tte.h> |
35 | #include <arch/mm/sun4v/mmu.h> |
36 | #include <arch/mm/sun4v/mmu.h> |
36 | #include <arch/mm/tlb.h> |
37 | #include <arch/mm/sun4v/tlb.h> |
37 | 38 | ||
38 | .register %g2, #scratch |
39 | .register %g2, #scratch |
39 | .register %g3, #scratch |
40 | .register %g3, #scratch |
40 | 41 | ||
41 | .section K_TEXT_START, "ax" |
42 | .section K_TEXT_START, "ax" |
42 | 43 | ||
43 | #define BSP_FLAG 1 |
44 | #define BSP_FLAG 1 |
44 | #define PHYSMEM_ADDR_SIZE 56 |
45 | #define PHYSMEM_ADDR_SIZE 56 |
45 | 46 | ||
46 | /* |
47 | /* |
47 | * SILO for an unknown reason loads the image to MAPPING_OFFSET + 0x4000 bytes |
- | |
48 | * from the start of the physical memory. We pretend that the physical memory |
- | |
49 | * starts MAPPING_OFFSET bytes further than it actually does. |
- | |
50 | */ |
- | |
51 | #define MAPPING_OFFSET 0x400000 |
- | |
52 | - | ||
53 | /* |
- | |
54 | * Flags set in the TTE data entry mapping the kernel. |
48 | * Flags set in the TTE data entry mapping the kernel. |
55 | */ |
49 | */ |
56 | #ifdef CONFIG_VIRT_IDX_DCACHE |
50 | #ifdef CONFIG_VIRT_IDX_DCACHE |
57 | #define TTE_FLAGS \ |
51 | #define TTE_FLAGS \ |
58 | (1 << TTE_V_SHIFT) \ |
52 | (1 << TTE_V_SHIFT) \ |
Line 117... | Line 111... | ||
117 | 111 | ||
118 | ! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13] |
112 | ! l5 <= physmem_base[(PHYSMEM_ADDR_SIZE - 1):13] |
119 | sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5 |
113 | sllx %l5, 13 + (63 - (PHYSMEM_ADDR_SIZE - 1)), %l5 |
120 | srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 |
114 | srlx %l5, 63 - (PHYSMEM_ADDR_SIZE - 1), %l5 |
121 | 115 | ||
122 | ! pretend the physical memory starts further |
- | |
123 | set MAPPING_OFFSET, %g2 |
- | |
124 | add %l5, %g2, %l5 |
- | |
125 | - | ||
126 | /* |
116 | /* |
127 | * Setup basic runtime environment. |
117 | * Setup basic runtime environment. |
128 | */ |
118 | */ |
129 | wrpr %g0, NWINDOWS - 2, %cansave ! set maximum saveable windows |
119 | wrpr %g0, NWINDOWS - 2, %cansave ! set maximum saveable windows |
130 | wrpr %g0, 0, %canrestore ! get rid of windows we will |
120 | wrpr %g0, 0, %canrestore ! get rid of windows we will |