Discontigmem for ep93xx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi all,

I'm using the TS-7200 board. The support for that board is built-in in
the kernel. I'm using even a kernel version provided by the
manufacturer. There's a big difference about the memory management. In
the official kernel there's no declaration of discontigmem and the
asm-arm/mach-ep93xx/memory.h is very simple. Instead, the version of
embeddedARM has got a memory.h more complex because there's the
declaration of some variable like:

#ifndef CONFIG_DISCONTIGMEM

/*
 * Single 32Meg block of physical memory physically located at 0 .
 */
#define SDRAM_START                         0x00000000
#define SDRAM_NUMBER_OF_BLOCKS              1
#define SDRAM_BLOCK_SIZE                    0x02000000
#define SDRAM_BLOCK_START_BOUNDARY          0x00000000

#else /* CONFIG_DISCONTIGMEM */

#ifdef CONFIG_ARCH_EP9301

/*
 * The 9301 memory map doesn't have regular gaps because two
 * address pins aren't connected - see asm-arm/mach-ep93xx/arch.c to
 * see how it is.
 */
#define SDRAM_START                         0x00000000
#define SDRAM_NUMBER_OF_BLOCKS              4
#define SDRAM_BLOCK_SIZE                    0x00800000
#define SDRAM_BLOCK_START_BOUNDARY          0x01000000

#else /* CONFIG_ARCH_EP9312 or CONFIG_ARCH_EP9315 */

/*
 * 2 32Meg blocks that are located physically at 0 and 64Meg.
 */
#define SDRAM_START                         0x00000000
#define SDRAM_NUMBER_OF_BLOCKS              2
#define SDRAM_BLOCK_SIZE                    0x02000000
#define SDRAM_BLOCK_START_BOUNDARY          0x04000000

#endif

/*
 * Here we are assuming EP93xx is configured to have two 32MB SDRAM
 * areas with 32MB of empty space between them.  So use 24 for the node
 * max shift to get 64MB node sizes.
 */
#define NODE_MAX_MEM_SHIFT	26
#define NODE_MAX_MEM_SIZE	(1<<NODE_MAX_MEM_SHIFT)

#endif /* CONFIG_DISCONTIGMEM */


/*
 * MEM_SIZE and PHYS_OFFSET are used to set size of SDRAM for
 * initial page table in arch/arm/kernel/setup.c
 * For ep93xx, PHYS_OFFSET is set to be SDRAM_START.
 */
#define MEM_SIZE                            (SDRAM_BLOCK_SIZE)

/*
 * Task size: 2GB (from 0 to base of IO in virtual space)
 */
#define TASK_SIZE		UL(0x80000000)
/*  HASH define TASK_SIZE_26	(0x04000000UL) */

/*
 * This decides where the kernel will search for a free chunk of vm
 * space during mmap's.
 */
#define TASK_UNMAPPED_BASE (TASK_SIZE / 3)

/*
 * Page offset: 3GB (start of kernel memory in virtual space)
 * Phys offset: 0   (start of kernel memory in physical space)
 */
#define PAGE_OFFSET		UL(0xC0000000)
#define PHYS_OFFSET		(SDRAM_START)


These settings seem to be reasonables. The question is: why the official
kernel doesn't use the discontigmem if it claims that there's the
support of ts-7200 (with ep9302 and discontiguos memory)?

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter