init_32.c (b3bbcc5d1da1b654091dad15980b3d58fdae0fc6) init_32.c (dfc3095cec27f402c183da920f4733785e4c873d)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * PowerPC version
4 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
5 *
6 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
7 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
8 * Copyright (C) 1996 Paul Mackerras

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

77 * including both RAM and possibly some I/O regions,
78 * and sets up the page tables and the MMU hardware ready to go.
79 */
80void __init MMU_init(void)
81{
82 if (ppc_md.progress)
83 ppc_md.progress("MMU:enter", 0x111);
84
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * PowerPC version
4 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
5 *
6 * Modifications by Paul Mackerras (PowerMac) (paulus@cs.anu.edu.au)
7 * and Cort Dougan (PReP) (cort@cs.nmt.edu)
8 * Copyright (C) 1996 Paul Mackerras

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

77 * including both RAM and possibly some I/O regions,
78 * and sets up the page tables and the MMU hardware ready to go.
79 */
80void __init MMU_init(void)
81{
82 if (ppc_md.progress)
83 ppc_md.progress("MMU:enter", 0x111);
84
85 /*
86 * Reserve gigantic pages for hugetlb. This MUST occur before
87 * lowmem_end_addr is initialized below.
88 */
89 if (memblock.memory.cnt > 1) {
90#ifndef CONFIG_WII
91 memblock_enforce_memory_limit(memblock.memory.regions[0].size);
92 pr_warn("Only using first contiguous memory region\n");
93#else
94 wii_memory_fixups();
95#endif
96 }
97
98 total_lowmem = total_memory = memblock_end_of_DRAM() - memstart_addr;
99 lowmem_end_addr = memstart_addr + total_lowmem;
100
85 total_lowmem = total_memory = memblock_end_of_DRAM() - memstart_addr;
86 lowmem_end_addr = memstart_addr + total_lowmem;
87
101#ifdef CONFIG_FSL_BOOKE
88#ifdef CONFIG_PPC_85xx
102 /* Freescale Book-E parts expect lowmem to be mapped by fixed TLB
103 * entries, so we need to adjust lowmem to match the amount we can map
104 * in the fixed entries */
105 adjust_total_lowmem();
89 /* Freescale Book-E parts expect lowmem to be mapped by fixed TLB
90 * entries, so we need to adjust lowmem to match the amount we can map
91 * in the fixed entries */
92 adjust_total_lowmem();
106#endif /* CONFIG_FSL_BOOKE */
93#endif /* CONFIG_PPC_85xx */
107
108 if (total_lowmem > __max_low_memory) {
109 total_lowmem = __max_low_memory;
110 lowmem_end_addr = memstart_addr + total_lowmem;
111#ifndef CONFIG_HIGHMEM
112 total_memory = total_lowmem;
113 memblock_enforce_memory_limit(total_lowmem);
114#endif /* CONFIG_HIGHMEM */

--- 30 unchanged lines hidden ---
94
95 if (total_lowmem > __max_low_memory) {
96 total_lowmem = __max_low_memory;
97 lowmem_end_addr = memstart_addr + total_lowmem;
98#ifndef CONFIG_HIGHMEM
99 total_memory = total_lowmem;
100 memblock_enforce_memory_limit(total_lowmem);
101#endif /* CONFIG_HIGHMEM */

--- 30 unchanged lines hidden ---