diff -uNr linux-clean/Documentation/Configure.help linux-ram/Documentation/Configure.help --- linux-clean/Documentation/Configure.help Tue Sep 14 07:09:04 1999 +++ linux-ram/Documentation/Configure.help Wed Jan 5 18:02:15 2000 @@ -1027,6 +1027,14 @@ as well to take advantage of the unique features of the device. Online documentation is available at http://www.rt-control.com +Build for the Rt-Control, Inc uC68EZ328 uCsimm to run in RAM +CONFIG_UCSIMM_RAM + Adding this option will in addition to the CONFIG_UCSIMM_RAM will allow + the kernel to run out of ram using the goram boot monitor command + you need to also change your romdisk /etc/inittab so that the + ttyS0 baud rate is set to 115200 instead of 9600. + For further help mail sehughes@zentropix.com + Build for the PalmIII and predecessors CONFIG_PILOT The PalmIII (and its previous versions, the Pilot 1000, Pilot 5000, diff -uNr linux-clean/Makefile linux-ram/Makefile --- linux-clean/Makefile Tue Sep 14 07:09:04 1999 +++ linux-ram/Makefile Thu Jan 6 11:22:08 2000 @@ -5,7 +5,7 @@ ARCH = m68knommu PLATFORM = 68EZ328 -BOARD = ucsimm +BOARD = ucsimm_ram # # For SMP kernels, set this. We don't want to have this in the config file diff -uNr linux-clean/arch/m68knommu/config.in linux-ram/arch/m68knommu/config.in --- linux-clean/arch/m68knommu/config.in Tue Sep 14 07:09:04 1999 +++ linux-ram/arch/m68knommu/config.in Tue Jan 4 10:42:57 2000 @@ -48,6 +48,9 @@ fi bool 'ALMA Electronics Answering Machine support' CONFIG_ALMA_ANS bool 'uCsimm module support' CONFIG_UCSIMM + if [ "$CONFIG_UCSIMM" = "y" ]; then + bool 'Compile the kernel to be loaded in DRAM instead of FLASH' CONFIG_UCSIMM_RAM + fi fi if [ "$CONFIG_M68332" = "y" ]; then diff -uNr linux-clean/arch/m68knommu/kernel/setup.c linux-ram/arch/m68knommu/kernel/setup.c --- linux-clean/arch/m68knommu/kernel/setup.c Tue Sep 14 07:09:05 1999 +++ linux-ram/arch/m68knommu/kernel/setup.c Tue Jan 4 14:16:35 2000 @@ -84,7 +84,7 @@ void setup_arch(char **cmdline_p, unsigned long * memory_start_p, unsigned long * memory_end_p) { - extern int _etext, _edata, _end, _ramend, _romvec, _flashend; + extern int _etext, _edata, _end, _ramend, _romvec, _flashstart, _flashend; config_BSP(); printk("Flat model support (C) 1998,1999 Kenneth Albanowski, D. Jeff Dionne\n"); @@ -118,7 +118,7 @@ #endif *memory_start_p = memory_start; *memory_end_p = memory_end = (unsigned long)&_ramend - 0x10000; - rom_length = (unsigned long)&_flashend - (unsigned long)&_romvec; + rom_length = (unsigned long)&_flashend - (unsigned long)&_flashstart; #ifdef CONFIG_CONSOLE #ifdef CONFIG_FRAMEBUFFER diff -uNr linux-clean/arch/m68knommu/platform/68EZ328/Makefile linux-ram/arch/m68knommu/platform/68EZ328/Makefile --- linux-clean/arch/m68knommu/platform/68EZ328/Makefile Tue Sep 14 07:09:05 1999 +++ linux-ram/arch/m68knommu/platform/68EZ328/Makefile Tue Jan 4 16:15:47 2000 @@ -23,6 +23,8 @@ rm penguin.h penguin.h: - ln -s $(BOARD)-penguin.h penguin.h + -ln -s ucsimm-penguin.h ucsimm_ram-penguin.h + -ln -s $(BOARD)-penguin.h penguin.h + include $(TOPDIR)/Rules.make diff -uNr linux-clean/arch/m68knommu/platform/68EZ328/Rules.make linux-ram/arch/m68knommu/platform/68EZ328/Rules.make --- linux-clean/arch/m68knommu/platform/68EZ328/Rules.make Tue Sep 14 07:09:05 1999 +++ linux-ram/arch/m68knommu/platform/68EZ328/Rules.make Wed Jan 5 15:12:23 2000 @@ -41,8 +41,13 @@ $(CROSS_COMPILE)objcopy -v -R .text -R .data -R .bss --add-section=.fs=romfs.img --adjust-section-vma=.fs=0xa0000 arch/$(ARCH)/empty.o romfs.s19 $(CROSS_COMPILE)objcopy -O srec romfs.s19 +ifdef CONFIG_UCSIMM_RAM +linux.data: linux + $(CROSS_COMPILE)objcopy -O binary --remove-section=.romvec --remove-section=.text --remove-section=.ramvec --remove-section=.eram linux linux.data +else linux.data: linux $(CROSS_COMPILE)objcopy -O binary --remove-section=.romvec --remove-section=.text --remove-section=.ramvec --remove-section=.bss --remove-section=.eram linux linux.data +endif linux.text: linux $(CROSS_COMPILE)objcopy -O binary --remove-section=.ramvec --remove-section=.bss --remove-section=.data --remove-section=.eram --set-section-flags=.romvec=CONTENTS,ALLOC,LOAD,READONLY,CODE linux linux.text diff -uNr linux-clean/arch/m68knommu/platform/68EZ328/ucsimm.ld linux-ram/arch/m68knommu/platform/68EZ328/ucsimm.ld --- linux-clean/arch/m68knommu/platform/68EZ328/ucsimm.ld Tue Sep 14 07:09:05 1999 +++ linux-ram/arch/m68knommu/platform/68EZ328/ucsimm.ld Tue Jan 4 13:44:47 2000 @@ -13,6 +13,7 @@ .romvec : { _romvec = . ; + _flashstart = . ; } > romvec .text : { diff -uNr linux-clean/arch/m68knommu/platform/68EZ328/ucsimm_ram-head.S linux-ram/arch/m68knommu/platform/68EZ328/ucsimm_ram-head.S --- linux-clean/arch/m68knommu/platform/68EZ328/ucsimm_ram-head.S Thu Jan 1 01:00:00 1970 +++ linux-ram/arch/m68knommu/platform/68EZ328/ucsimm_ram-head.S Tue Jan 4 13:40:06 2000 @@ -0,0 +1,102 @@ + .global _stext + .global _start + .global __bss_start + .global _ramend + .global splash_bits + +#define IMR 0xFFFFF304 +#undef INIT_LCD + + .data +splash_bits: +#include "penguin.rh" + .text +_start: +_stext: + + /* + * We do not need to program the basic registers here, since + * this is an image which is loaded directly into DRAM. It + * is the xxx-init.b file that will take care of that. + */ + + nop + moveal #_ramend - 0x10, %sp /* stack setup */ + movew #0x2700, %sr + + moveq #13, %d7 /* '\r' */ + jsr putc + + moveq #10, %d7 /* '\n' */ + jsr putc + + moveq #65, %d7 /* 'A' */ + jsr putc + + movew #16384, %d0 /* PLL settle wait loop */ +L0: + subw #1, %d0 + bne L0 + + moveq #66, %d7 + jsr putc + +#if 1 + /* Copy data segment from ROM to RAM */ + moveal #__data_rom_start, %a0 + moveal #__data_start, %a1 + moveal #__data_end, %a2 + moveq #67, %d7 + jsr putc + + /* Copy %a0 to %a1 until %a1 == %a2 */ +LD1: + movel %a0@+, %d0 + movel %d0, %a1@+ + cmpal %a1, %a2 + bhi LD1 +#endif + + moveq #68, %d7 + jsr putc + + moveal #__bss_start, %a0 + moveal #end, %a1 + + /* Copy 0 to %a0 until %a0 == %a1 */ +L1: + movel #0, %a0@+ + cmpal %a0, %a1 + bhi L1 + + moveq #69, %d7 + jsr putc + + pea 0 + pea env + pea %sp@(4) + pea 0 + + moveq #70, %d7 + jsr putc + +lp: + jsr start_kernel + jmp lp +_exit: + + jmp _exit + + +putc: + moveb %d7,0xfffff907 +pclp: + movew 0xfffff906, %d7 + andw #0x2000, %d7 + beq pclp + rts + + .data +env: + .long 0 + .text diff -uNr linux-clean/arch/m68knommu/platform/68EZ328/ucsimm_ram.ld linux-ram/arch/m68knommu/platform/68EZ328/ucsimm_ram.ld --- linux-clean/arch/m68knommu/platform/68EZ328/ucsimm_ram.ld Thu Jan 1 01:00:00 1970 +++ linux-ram/arch/m68knommu/platform/68EZ328/ucsimm_ram.ld Wed Jan 5 15:55:12 2000 @@ -0,0 +1,66 @@ +MEMORY + { + romvec : ORIGIN = 0x10c10000, LENGTH = 0x00400 + flash : ORIGIN = 0x10c10400, LENGTH = 0xfec00 + eflash : ORIGIN = 0x10d00000, LENGTH = 1 + ramvec : ORIGIN = 0x00020000, LENGTH = 1024 + ram : ORIGIN = 0x00020400, LENGTH = 0x00800000 - 0x20400 + eram : ORIGIN = 0x00800000, LENGTH = 1 + } + +SECTIONS +{ + .romvec : + { + _romvec = . ; + } > ramvec + .text : + { + text_start = . ; + *(.text) + _etext = . ; + __data_rom_start = ALIGN ( 4 ) ; + } > ram + .eflash : + { + _flashend = . ; + } > eflash + .ramvec : + { + _ramvec = . ; + } > ramvec + .data : + { + __data_start = . ; + *(.data) + _edata = . ; + edata = ALIGN( 0x10 ) ; + } > ram + .fs : + { + _ramfs = . ; + . = . + 500000; + } > ram + .bss : + { + __bss_start = ALIGN( 0x10 ) ; + __data_end = ALIGN( 0x10 ) ; + *(.bss) + *(COMMON) + end = ALIGN( 0x10 ) ; + _end = ALIGN( 0x10 ) ; + } > ram + .eram : + { + _ramend = . ; + } > eram + .flash : + { + _flashstart = . ; + } > flash + .eflash : + { + _flashend = . ; + } > eflash +} + diff -uNr linux-clean/config_uc linux-ram/config_uc --- linux-clean/config_uc Thu Jan 1 01:00:00 1970 +++ linux-ram/config_uc Tue Jan 4 09:56:26 2000 @@ -0,0 +1,138 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_UCLINUX=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# Platform dependant setup +# +# CONFIG_M68000 is not set +# CONFIG_M68328 is not set +CONFIG_M68EZ328=y +# CONFIG_M68332 is not set +# CONFIG_M68360 is not set + +# +# Platform +# +# CONFIG_M68EZ328ADS is not set +# CONFIG_ALMA_ANS is not set +CONFIG_UCSIMM=y + +# +# General setup +# +CONFIG_NET=y +CONFIG_SYSVIPC=y +CONFIG_REDUCED_MEMORY=y +CONFIG_BINFMT_FLAT=y +# CONFIG_CONSOLE is not set + +# +# Floppy, IDE, and other block devices +# +CONFIG_BLK_DEV_BLKMEM=y + +# +# Additional Block Devices +# +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_MD is not set +CONFIG_BLK_DEV_RAM=y +# CONFIG_RD_RELEASE_BLOCKS is not set + +# +# Networking options +# +# CONFIG_FIREWALL is not set +# CONFIG_NET_ALIAS is not set +CONFIG_INET=y +# CONFIG_IP_FORWARD is not set +# CONFIG_IP_MULTICAST is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_IP_ACCT is not set +# CONFIG_IP_ROUTER is not set +# CONFIG_NET_IPIP is not set + +# +# (it is safe to leave these untouched) +# +# CONFIG_INET_PCTCP is not set +# CONFIG_INET_RARP is not set +# CONFIG_NO_PATH_MTU_DISCOVERY is not set +CONFIG_IP_NOSR=y +# CONFIG_SKB_LARGE is not set + +# +# +# +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_AX25 is not set +# CONFIG_BRIDGE is not set +# CONFIG_NETLINK is not set + +# +# SCSI support +# +# CONFIG_SCSI is not set + +# +# Network device support +# +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +CONFIG_SLIP=y +CONFIG_SLIP_COMPRESSED=y +# CONFIG_SLIP_SMART is not set +# CONFIG_SLIP_MODE_SLIP6 is not set +CONFIG_PPP=y + +# +# CCP compressors for PPP are only built as modules. +# +# CONFIG_EQUALIZER is not set +CONFIG_UCCS8900=y + +# +# Filesystems +# +# CONFIG_QUOTA is not set +# CONFIG_MINIX_FS is not set +# CONFIG_EXT_FS is not set +CONFIG_EXT2_FS=y +# CONFIG_XIA_FS is not set +# CONFIG_NLS is not set +CONFIG_PROC_FS=y +CONFIG_NFS_FS=y +# CONFIG_ROOT_NFS is not set +# CONFIG_SMB_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AFFS_FS is not set +CONFIG_ROMFS_FS=y +# CONFIG_UFS_FS is not set + +# +# Character devices +# +# CONFIG_UMISC is not set +CONFIG_68328_SERIAL=y +# CONFIG_USERIAL is not set +# CONFIG_WATCHDOG is not set + +# +# Kernel hacking +# +# CONFIG_PROFILE is not set diff -uNr linux-clean/drivers/block/blkmem.c linux-ram/drivers/block/blkmem.c --- linux-clean/drivers/block/blkmem.c Tue Sep 14 07:09:06 1999 +++ linux-ram/drivers/block/blkmem.c Wed Jan 5 15:53:26 2000 @@ -60,6 +60,9 @@ extern char __data_rom_start[]; extern char _edata[]; extern char __data_start[]; +#ifdef CONFIG_UCSIMM_RAM +extern char _ramfs[]; +#endif #endif #ifdef FIXED_ROMARRAY @@ -113,12 +116,16 @@ #ifdef CAT_ROMARRAY {0, 0, -1}, +#ifdef CONFIG_UCSIMM_RAM +#define FIXUP_ARENAS arena[0].address = (unsigned long)_ramfs; +#else #define FIXUP_ARENAS \ arena[0].address = (unsigned long)__data_rom_start + (unsigned long)_edata - (unsigned long)__data_start; #endif +#endif #ifdef FIXED_ROMARRAY - {romarray, -1} + {0, FIXED_ROMARRAY, -1}, #endif #ifdef CONFIG_SHGLCORE