1 // SPDX-License-Identifier: GPL-2.0-only
3 * Port on Texas Instruments TMS320C6x architecture
5 * Copyright (C) 2004, 2009, 2010, 2011 Texas Instruments Incorporated
6 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
9 #include <linux/swap.h>
10 #include <linux/module.h>
11 #include <linux/memblock.h>
12 #ifdef CONFIG_BLK_DEV_RAM
13 #include <linux/blkdev.h>
15 #include <linux/initrd.h>
17 #include <asm/sections.h>
18 #include <linux/uaccess.h>
21 * ZERO_PAGE is a special page that is used for zero-initialized
24 unsigned long empty_zero_page
;
25 EXPORT_SYMBOL(empty_zero_page
);
28 * paging_init() continues the virtual memory environment setup which
29 * was begun by the code in arch/head.S.
30 * The parameters are pointers to where to stick the starting and ending
31 * addresses of available kernel virtual memory.
33 void __init
paging_init(void)
35 struct pglist_data
*pgdat
= NODE_DATA(0);
36 unsigned long max_zone_pfn
[MAX_NR_ZONES
] = {0, };
38 empty_zero_page
= (unsigned long) memblock_alloc(PAGE_SIZE
,
41 panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
42 __func__
, PAGE_SIZE
, PAGE_SIZE
);
45 * Set up user data space
52 max_zone_pfn
[ZONE_NORMAL
] = memory_end
>> PAGE_SHIFT
;
54 free_area_init(max_zone_pfn
);
57 void __init
mem_init(void)
59 high_memory
= (void *)(memory_end
& PAGE_MASK
);
61 /* this will put all memory onto the freelists */
64 mem_init_print_info(NULL
);