mmu_decl.h (b3bbcc5d1da1b654091dad15980b3d58fdae0fc6) mmu_decl.h (dfc3095cec27f402c183da920f4733785e4c873d)
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Declarations of procedures and variables shared between files
4 * in arch/ppc/mm/.
5 *
6 * Derived from arch/ppc/mm/init.c:
7 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
8 *

--- 78 unchanged lines hidden (view full) ---

87#endif /* CONFIG_PPC_MMU_NOHASH */
88
89#ifdef CONFIG_PPC32
90
91extern void mapin_ram(void);
92extern void setbat(int index, unsigned long virt, phys_addr_t phys,
93 unsigned int size, pgprot_t prot);
94
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Declarations of procedures and variables shared between files
4 * in arch/ppc/mm/.
5 *
6 * Derived from arch/ppc/mm/init.c:
7 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
8 *

--- 78 unchanged lines hidden (view full) ---

87#endif /* CONFIG_PPC_MMU_NOHASH */
88
89#ifdef CONFIG_PPC32
90
91extern void mapin_ram(void);
92extern void setbat(int index, unsigned long virt, phys_addr_t phys,
93 unsigned int size, pgprot_t prot);
94
95extern unsigned int rtas_data, rtas_size;
96
97struct hash_pte;
98extern u8 early_hash[];
99
100#endif /* CONFIG_PPC32 */
101
102extern unsigned long __max_low_memory;
95extern u8 early_hash[];
96
97#endif /* CONFIG_PPC32 */
98
99extern unsigned long __max_low_memory;
103extern phys_addr_t __initial_memory_limit_addr;
104extern phys_addr_t total_memory;
105extern phys_addr_t total_lowmem;
106extern phys_addr_t memstart_addr;
107extern phys_addr_t lowmem_end_addr;
108
100extern phys_addr_t total_memory;
101extern phys_addr_t total_lowmem;
102extern phys_addr_t memstart_addr;
103extern phys_addr_t lowmem_end_addr;
104
109#ifdef CONFIG_WII
110extern unsigned long wii_hole_start;
111extern unsigned long wii_hole_size;
112
113extern unsigned long wii_mmu_mapin_mem2(unsigned long top);
114extern void wii_memory_fixups(void);
115#endif
116
117/* ...and now those things that may be slightly different between processor
118 * architectures. -- Dan
119 */
120#ifdef CONFIG_PPC32
121extern void MMU_init_hw(void);
122void MMU_init_hw_patch(void);
123unsigned long mmu_mapin_ram(unsigned long base, unsigned long top);
124#endif
125
126#ifdef CONFIG_PPC_FSL_BOOK3E
127extern unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx,
128 bool dryrun, bool init);
105/* ...and now those things that may be slightly different between processor
106 * architectures. -- Dan
107 */
108#ifdef CONFIG_PPC32
109extern void MMU_init_hw(void);
110void MMU_init_hw_patch(void);
111unsigned long mmu_mapin_ram(unsigned long base, unsigned long top);
112#endif
113
114#ifdef CONFIG_PPC_FSL_BOOK3E
115extern unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx,
116 bool dryrun, bool init);
129extern unsigned long calc_cam_sz(unsigned long ram, unsigned long virt,
130 phys_addr_t phys);
131#ifdef CONFIG_PPC32
132extern void adjust_total_lowmem(void);
133extern int switch_to_as1(void);
134extern void restore_to_as0(int esel, int offset, void *dt_ptr, int bootcpu);
135void create_kaslr_tlb_entry(int entry, unsigned long virt, phys_addr_t phys);
136void reloc_kernel_entry(void *fdt, int addr);
137extern int is_second_reloc;
138#endif

--- 16 unchanged lines hidden (view full) ---

155 u32 MAS7;
156};
157
158#define NUM_TLBCAMS 64
159
160extern struct tlbcam TLBCAM[NUM_TLBCAMS];
161#endif
162
117#ifdef CONFIG_PPC32
118extern void adjust_total_lowmem(void);
119extern int switch_to_as1(void);
120extern void restore_to_as0(int esel, int offset, void *dt_ptr, int bootcpu);
121void create_kaslr_tlb_entry(int entry, unsigned long virt, phys_addr_t phys);
122void reloc_kernel_entry(void *fdt, int addr);
123extern int is_second_reloc;
124#endif

--- 16 unchanged lines hidden (view full) ---

141 u32 MAS7;
142};
143
144#define NUM_TLBCAMS 64
145
146extern struct tlbcam TLBCAM[NUM_TLBCAMS];
147#endif
148
163#if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_FSL_BOOKE) || defined(CONFIG_PPC_8xx)
149#if defined(CONFIG_PPC_BOOK3S_32) || defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_8xx)
164/* 6xx have BATS */
150/* 6xx have BATS */
165/* FSL_BOOKE have TLBCAM */
151/* PPC_85xx have TLBCAM */
166/* 8xx have LTLB */
167phys_addr_t v_block_mapped(unsigned long va);
168unsigned long p_block_mapped(phys_addr_t pa);
169#else
170static inline phys_addr_t v_block_mapped(unsigned long va) { return 0; }
171static inline unsigned long p_block_mapped(phys_addr_t pa) { return 0; }
172#endif
173

--- 22 unchanged lines hidden ---
152/* 8xx have LTLB */
153phys_addr_t v_block_mapped(unsigned long va);
154unsigned long p_block_mapped(phys_addr_t pa);
155#else
156static inline phys_addr_t v_block_mapped(unsigned long va) { return 0; }
157static inline unsigned long p_block_mapped(phys_addr_t pa) { return 0; }
158#endif
159

--- 22 unchanged lines hidden ---