Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) #ifndef meminit_h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #define meminit_h
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5)  * This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6)  * License.  See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7)  * for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)  * Entries defined so far:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)  * 	- boot param structure itself
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)  * 	- memory map
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)  * 	- initrd (optional)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)  * 	- command line string
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)  * 	- kernel code & data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)  * 	- crash dumping code reserved region
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19)  * 	- Kernel memory map built from EFI memory map
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)  * 	- ELF core header
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)  * More could be added if necessary
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define IA64_MAX_RSVD_REGIONS 9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) struct rsvd_region {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	u64 start;	/* virtual address of beginning of element */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	u64 end;	/* virtual address of end of element + 1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) extern struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) extern int num_rsvd_regions;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) extern void find_memory (void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) extern void reserve_memory (void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) extern void find_initrd (void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) extern int filter_rsvd_memory (u64 start, u64 end, void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) extern int filter_memory (u64 start, u64 end, void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) extern unsigned long efi_memmap_init(u64 *s, u64 *e);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) extern int find_max_min_low_pfn (u64, u64, void *);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) extern unsigned long vmcore_find_descriptor_size(unsigned long address);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) extern int reserve_elfcorehdr(u64 *start, u64 *end);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46)  * For rounding an address to the next IA64_GRANULE_SIZE or order
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) #define GRANULEROUNDDOWN(n)	((n) & ~(IA64_GRANULE_SIZE-1))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) #define GRANULEROUNDUP(n)	(((n)+IA64_GRANULE_SIZE-1) & ~(IA64_GRANULE_SIZE-1))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #ifdef CONFIG_NUMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52)   extern void call_pernode_memory (unsigned long start, unsigned long len, void *func);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) # define call_pernode_memory(start, len, func)	(*func)(start, len, 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) #define IGNORE_PFN0	1	/* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) extern int register_active_ranges(u64 start, u64 len, int nid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) #ifdef CONFIG_VIRTUAL_MEM_MAP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) # define LARGE_GAP	0x40000000 /* Use virtual mem map if hole is > than this */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63)   extern unsigned long VMALLOC_END;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)   extern struct page *vmem_map;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65)   extern int find_largest_hole(u64 start, u64 end, void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66)   extern int create_mem_map_page_table(u64 start, u64 end, void *arg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)   extern int vmemmap_find_next_valid_pfn(int, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) static inline int vmemmap_find_next_valid_pfn(int node, int i)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) 	return i + 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) #endif /* meminit_h */