Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * PROM library functions for acquiring/using memory descriptors given to
0007  * us from the YAMON.
0008  *
0009  * Copyright (C) 1999,2000,2012  MIPS Technologies, Inc.
0010  * All rights reserved.
0011  * Authors: Carsten Langgaard <carstenl@mips.com>
0012  *          Steven J. Hill <sjhill@mips.com>
0013  */
0014 #include <linux/init.h>
0015 #include <linux/memblock.h>
0016 #include <linux/string.h>
0017 
0018 #include <asm/bootinfo.h>
0019 #include <asm/cdmm.h>
0020 #include <asm/maar.h>
0021 #include <asm/sections.h>
0022 #include <asm/fw/fw.h>
0023 
0024 /* determined physical memory size, not overridden by command line args  */
0025 unsigned long physical_memsize = 0L;
0026 
0027 static void free_init_pages_eva_malta(void *begin, void *end)
0028 {
0029     free_init_pages("unused kernel", __pa_symbol((unsigned long *)begin),
0030             __pa_symbol((unsigned long *)end));
0031 }
0032 
0033 void __init fw_meminit(void)
0034 {
0035     bool eva = IS_ENABLED(CONFIG_EVA);
0036 
0037     free_init_pages_eva = eva ? free_init_pages_eva_malta : NULL;
0038 }
0039 
0040 phys_addr_t mips_cdmm_phys_base(void)
0041 {
0042     /* This address is "typically unused" */
0043     return 0x1fc10000;
0044 }