1 /* 2 * sysmem-related prototypes. 3 * 4 * This file is subject to the terms and conditions of the GNU General Public 5 * License. See the file "COPYING" in the main directory of this archive 6 * for more details. 7 * 8 * Copyright (C) 2014 Cadence Design Systems Inc. 9 */ 10 11 #ifndef _XTENSA_SYSMEM_H 12 #define _XTENSA_SYSMEM_H 13 14 #define SYSMEM_BANKS_MAX 31 15 16 struct meminfo { 17 unsigned long start; 18 unsigned long end; 19 }; 20 21 /* 22 * Bank array is sorted by .start. 23 * Banks don't overlap and there's at least one page gap 24 * between adjacent bank entries. 25 */ 26 struct sysmem_info { 27 int nr_banks; 28 struct meminfo bank[SYSMEM_BANKS_MAX]; 29 }; 30 31 extern struct sysmem_info sysmem; 32 33 int add_sysmem_bank(unsigned long start, unsigned long end); 34 int mem_reserve(unsigned long, unsigned long, int); 35 void bootmem_init(void); 36 void zones_init(void); 37 38 #endif /* _XTENSA_SYSMEM_H */ 39