* "last user address" is set even if bootp is used without parameters
(and it uses default address).
+======================================================================
+Modifications since 0.6.4:
+======================================================================
+
+* Modify "initrd_high" feature to allow for specifying a memory limit
+
+* Fixes for (F)ADS configuration
+
======================================================================
Modifications for 0.6.4:
======================================================================
Size of DRAM reserved for malloc() use.
- CFG_BOOTMAPSZ:
- Maximum size of memory mapped by the startup code of
- the Linux kernel; all data that must be processed by
- the Linux kernel (bd_info, boot arguments, initrd
- image) must be put below this limit.
+ Maximum size of memory mapped by the startup code of
+ the Linux kernel; all data that must be processed by
+ the Linux kernel (bd_info, boot arguments, eventually
+ initrd image) must be put below this limit.
- CFG_MAX_FLASH_BANKS:
Max number of Flash memory banks
automatically started (by internally calling
"bootm")
+initrd_high - restrict positioning of initrd images:
+ If this variable is not set, initrd images will be
+ copied to the highest possible address in RAM; this
+ is usually what you want since it allows for
+ maximum initrd size. If for some reason you want to
+ make sure that the initrd image is loaded below the
+ CFG_BOOTMAPSZ limit, you can set this environment
+ variable to a value of "no" or "off" or "0".
+ Alternatively, you can set it to a maximum upper
+ address to use (PPCBoot will still check that it
+ does not overwrite the PCBoot stack and data).
+
+ For instance, when you have a system with 16 MB
+ RAM, and want to resever 4 MB from use by Linux,
+ you can do this by adding "mem=12M" to the value of
+ the "bootargs" variable. However, now you must make
+ sure, that the initrd image is placed in t he first
+ 12 MB as well - this can be done with
+
+ setenv initrd_high 00c00000
+
There are two special Environment Variables:
ulong initrd_start, initrd_end;
ulong cmd_start, cmd_end;
ulong *len_ptr;
- int i, verify, initrd_high;
+ ulong initrd_high;
+ int i, verify;
char *cmdline;
char *name, *s;
bd_t *kbd;
s = getenv ("verify");
verify = (s && (*s == 'n')) ? 0 : 1;
- s = getenv ("initrd_high");
- initrd_high = (s && (*s == 'n')) ? 0 : 1;
+ if ((s = getenv ("initrd_high")) != NULL) {
+ /* a value of "no" or a similar string will act like 0,
+ * truning the "load high" feature off. This is intentional.
+ */
+ initrd_high = simple_strtoul(s, NULL, 16);
+ } else { /* not set, no restrictions to load high */
+ initrd_high = ~0;
+ }
if (argc < 2) {
addr = load_addr;
asm( "mr %0,1": "=r"(nsp) : );
nsp -= 1024; /* just to be sure */
nsp &= ~0xF;
+ if (nsp > initrd_high) /* limit as specified */
+ nsp = initrd_high;
nsp -= hdr->ih_size;
nsp &= ~(4096 - 1); /* align on page */
if (nsp >= sp)
break;
}
- case 16: /* 16 Mbyte uses both CS2 and CS3 */
+ case 16: /* 16 Mbyte uses only CS2 */
{
+#ifdef CONFIG_ADS
memctl->memc_mamr = 0x60b21114;
+#else
+ memctl->memc_mamr = 0x13b01114;
+#endif
memctl->memc_or2 = 0xff000800;
break;
}
long int initdram (int board_type)
{
+#ifdef CONFIG_ADS
+ /* ADS: has no SDRAM, so start DRAM at 0 */
uint base = (unsigned long)0x0;
+#else
+ /* FADS: has 4MB SDRAM, put DRAM above it */
+ uint base = (unsigned long)0x00400000;
+#endif
uint k, m, s;
k = (*((uint *)BCSR2) >> 23) & 0x0f;
/* enable PCMCIA buffers */
*((uint *)BCSR1) &= ~BCSR1_PCCEN;
- /* Check if any PCMCIA card is luged in. */
+ /* Check if any PCMCIA card is plugged in. */
slota = (pcmp->pcmc_pipr & 0x18000000) == 0 ;
slotb = (pcmp->pcmc_pipr & 0x00001800) == 0 ;
#endif
return -1;
}
- else
- printf("Card present (");
+ else
+ printf("Card present (");
v = 0;