1315806cbSRalf Baechle /* 249bffbdcSSteven J. Hill * This file is subject to the terms and conditions of the GNU General Public 349bffbdcSSteven J. Hill * License. See the file "COPYING" in the main directory of this archive 4315806cbSRalf Baechle * for more details. 5315806cbSRalf Baechle * 6315806cbSRalf Baechle * PROM library functions for acquiring/using memory descriptors given to 7315806cbSRalf Baechle * us from the YAMON. 849bffbdcSSteven J. Hill * 949bffbdcSSteven J. Hill * Copyright (C) 1999,2000,2012 MIPS Technologies, Inc. 1049bffbdcSSteven J. Hill * All rights reserved. 1149bffbdcSSteven J. Hill * Authors: Carsten Langgaard <carstenl@mips.com> 1249bffbdcSSteven J. Hill * Steven J. Hill <sjhill@mips.com> 13315806cbSRalf Baechle */ 14315806cbSRalf Baechle #include <linux/init.h> 15*57c8a661SMike Rapoport #include <linux/memblock.h> 16315806cbSRalf Baechle #include <linux/string.h> 17315806cbSRalf Baechle 18315806cbSRalf Baechle #include <asm/bootinfo.h> 19296b7c68SJames Hogan #include <asm/cdmm.h> 203a551e25SPaul Burton #include <asm/maar.h> 21315806cbSRalf Baechle #include <asm/sections.h> 22b431f09dSSteven J. Hill #include <asm/fw/fw.h> 23315806cbSRalf Baechle 24315806cbSRalf Baechle /* determined physical memory size, not overridden by command line args */ 25315806cbSRalf Baechle unsigned long physical_memsize = 0L; 26315806cbSRalf Baechle free_init_pages_eva_malta(void * begin,void * end)27ea050714SPaul Burtonstatic void free_init_pages_eva_malta(void *begin, void *end) 28ea050714SPaul Burton { 29ea050714SPaul Burton free_init_pages("unused kernel", __pa_symbol((unsigned long *)begin), 30ea050714SPaul Burton __pa_symbol((unsigned long *)end)); 31ea050714SPaul Burton } 32ea050714SPaul Burton fw_meminit(void)33ea050714SPaul Burtonvoid __init fw_meminit(void) 34315806cbSRalf Baechle { 3597f2645fSMasahiro Yamada bool eva = IS_ENABLED(CONFIG_EVA); 36315806cbSRalf Baechle 37ea050714SPaul Burton free_init_pages_eva = eva ? free_init_pages_eva_malta : NULL; 38315806cbSRalf Baechle } 39315806cbSRalf Baechle mips_cdmm_phys_base(void)40296b7c68SJames Hoganphys_addr_t mips_cdmm_phys_base(void) 41296b7c68SJames Hogan { 42296b7c68SJames Hogan /* This address is "typically unused" */ 43296b7c68SJames Hogan return 0x1fc10000; 44296b7c68SJames Hogan } 45