Index: c/src/lib/libbsp/m68k/efi332/console/console.c
===================================================================
--- c/src/lib/libbsp/m68k/efi332/console/console.c	(revision 8548fe0ae29eafea856090e742c1fd205ed4b0fb)
+++ c/src/lib/libbsp/m68k/efi332/console/console.c	(revision a902441a2532b4c56bf636cc38d979a13c07c056)
@@ -329,5 +329,5 @@
   char *buffer;
   int maximum;
-  int count = 0;
+  int count;
  
   rw_args = (rtems_libio_rw_args_t *) arg;
Index: c/src/lib/libbsp/m68k/efi332/include/efi332.h
===================================================================
--- c/src/lib/libbsp/m68k/efi332/include/efi332.h	(revision 8548fe0ae29eafea856090e742c1fd205ed4b0fb)
+++ c/src/lib/libbsp/m68k/efi332/include/efi332.h	(revision a902441a2532b4c56bf636cc38d979a13c07c056)
@@ -44,11 +44,9 @@
 /*
  *  This prototype really should have the noreturn attribute but
- *  that causes a warning since it appears that the routine does
- *  return.
- *
- *   void reboot(void) __attribute__ ((noreturn));
+ *  that causes a warning. Not sure how to fix that. 
  */
-
-void reboot(void);
+/*   static void reboot(void) __attribute__ ((noreturn)); */
+static void reboot(void);
+__inline__ static void reboot() {asm("trap #15");}
 
 #endif /* _EFI332_H_ */
Index: c/src/lib/libbsp/m68k/efi332/start/start.c
===================================================================
--- c/src/lib/libbsp/m68k/efi332/start/start.c	(revision 8548fe0ae29eafea856090e742c1fd205ed4b0fb)
+++ c/src/lib/libbsp/m68k/efi332/start/start.c	(revision a902441a2532b4c56bf636cc38d979a13c07c056)
@@ -11,17 +11,15 @@
 m68k_isr_entry vectors[256];
 char * const __argv[]= {"main", ""};
-char * const __env[]= {""};
+
+void  boot_card(int argc, char * const argv[]);
 
 /*
  *  This prototype really should have the noreturn attribute but
- *  that causes a warning since it appears that the routine does
- *  return.
- *
- *   void dumby_start ()  __attribute__ ((noreturn));
+ *  that causes a warning. Not sure how to fix that.
  */
-
+/* void dumby_start ()  __attribute__ ((noreturn)); */
 void dumby_start ();
+
 void  dumby_start() {
-void  boot_card();
 
   /* We need to by-pass the link instruction since the RAM chip-
@@ -37,5 +35,5 @@
                   addl   " STACK_SIZE ",%d0;
                   movel  %d0,%sp;
-                  link %a6, #0"
+                  movel  %d0,%a6"
 		  );
 
@@ -92,14 +90,32 @@
     (((0x080000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0x80000 */
   *CSBAR2 = (unsigned short int)
-    (((0x080000 >> 8)&0xfff8) | BS_256K ); /* 256 bytes located at 0x80000 */
+    (((0x080000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0x80000 */
   *CSBAR3 = (unsigned short int)         
+    (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0xC0000 */
+  *CSBAR4 = (unsigned short int)
+    (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256 bytes located at 0xC0000 */
+  *CSBAR5 = (unsigned short int)         
     (0xfff8 | BS_64K);	       	         /* AVEC interrupts */
+#ifdef EFI332_v040b
+  *CSBAR6 = (unsigned short int)
+    (((0x000000 >> 8)&0xfff8) | BS_512K ); /* 512k bytes located at 0x0000 */
+  *CSBAR8 = (unsigned short int) /* PCMCIA IOCS */
+    (((0x0c0000 >> 8)&0xfff8) | BS_64K ); /* 64k bytes located at 0xc0000 */
+  *CSBAR9 = (unsigned short int) /* PCMCIA MEMCS */
+    (((0x0D0000 >> 8)&0xfff8) | BS_64K ); /* 64k bytes located at 0xd0000 */
+#else /* EFI332_v040b */
   *CSBAR10 = (unsigned short int)
     (((0x000000 >> 8)&0xfff8) | BS_512K ); /* 512k bytes located at 0x0000 */
+#endif /* EFI332_v040b */
 
   /* Chip-Select Options Registers */
   /*    see section 7 of the SIM Reference Manual */
+#ifdef FLASHWRITE
   *CSORBT = (unsigned short int)
-    ( BothBytes | ReadWrite | SyncAS | WaitStates_13 | UserSupSpace );
+    ( BothBytes | ReadWrite | SyncAS | WaitStates_2 | UserSupSpace );
+#else /* FLASHWRITE */
+  *CSORBT = (unsigned short int)
+    ( BothBytes | ReadOnly | SyncAS | WaitStates_2 | UserSupSpace );
+#endif /* FLASHWRITE */
   *CSOR0 = (unsigned short int)
     ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace );
@@ -109,24 +125,46 @@
     ( UpperByte | ReadWrite | SyncAS | FastTerm | UserSupSpace );
   *CSOR3 = (unsigned short int)
+    ( LowerByte | ReadWrite | SyncAS | FastTerm | UserSupSpace );
+  *CSOR4 = (unsigned short int)
+    ( UpperByte | ReadWrite | SyncAS | FastTerm | UserSupSpace );
+  *CSOR5 = (unsigned short int)
     ( BothBytes | ReadWrite | SyncAS | CPUSpace | IPLevel_any | AVEC );
+#ifdef EFI332_v040b
+  *CSOR6 = (unsigned short int)
+    ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace );
+  *CSOR8 = (unsigned short int)
+    ( BothBytes | ReadWrite | SyncAS | External | UserSupSpace );
+  *CSOR9 = (unsigned short int)
+    ( BothBytes | ReadWrite | SyncAS | External | UserSupSpace );
+#else /* EFI332_v040b */
   *CSOR10 = (unsigned short int)
     ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace );
+#endif /* EFI332_v040b */
 
   /* Chip Select Pin Assignment Register 0 */
   /*    see section 7 of the SIM Reference Manual */
   *CSPAR0 = (unsigned short int)( 
-     SAM(DisOut,CS_5,0x3000) |	/* PC2 */
-     SAM(DisOut,CS_4,0x0c00) |	/* PC1 */
-     SAM(DisOut,CS_3,0x0300) |	/* AVEC (internally) */
-     SAM(CS16bit,CS_2,0x00c0)|	/* RAM UDS */
-     SAM(CS16bit,CS_1,0x0030)|	/* RAM LDS */
+     SAM(DisOut,CS_5,0x3000) |	/* AVEC (internally) */
+     SAM(CS16bit,CS_4,0x0c00) |	/* RAM UDS, bank2 */
+     SAM(CS16bit,CS_3,0x0300) |	/* RAM LDS, bank2 */
+     SAM(CS16bit,CS_2,0x00c0)|	/* RAM UDS, bank1 */
+     SAM(CS16bit,CS_1,0x0030)|	/* RAM LDS, bank1 */
      SAM(CS16bit,CS_0,0x000c)|	/* W/!R */
-     SAM(CS16bit,CSBOOT,0x0003)	/* ROM DS */
+     SAM(CS16bit,CSBOOT,0x0003)	/* ROM CS */
      );
 
   /* Chip Select Pin Assignment Register 1 */
   /*    see section 7 of the SIM Reference Manual */
+#ifdef EFI332_v040b
   *CSPAR1 = (unsigned short int)( 
-     SAM(CS16bit,CS_10,0x300)|	/* ECLK */
+     SAM(DisOut,CS_10,0x300)|	/* ECLK */
+     SAM(CS16bit,CS_9,0x0c0) |	/* PCMCIA MEMCS */
+     SAM(CS16bit,CS_8,0x030) |	/* PCMCIA IOCS */
+     SAM(DisOut,CS_7,0x00c) |	/* PC4 */
+     SAM(CS16bit,CS_6,0x003)	/* ROM !OE */
+     );
+#else /* EFI332_v040b */
+  *CSPAR1 = (unsigned short int)( 
+     SAM(CS16bit,CS_10,0x300)|	/* ROM !OE */
      SAM(DisOut,CS_9,0x0c0) |	/* PC6 */
      SAM(DisOut,CS_8,0x030) |	/* PC5 */
@@ -134,4 +172,5 @@
      SAM(DisOut,CS_6,0x003)	/* PC3 */
      );
+#endif /* EFI332_v040b */
 
   /* Port E and F Data Register */
@@ -180,13 +219,9 @@
 
   /*
-   * Execute main with arguments argv and environment env
-   */
-  /* main(1, __argv, __env); */
-
-  boot_card();
-
+   * Execute main with arguments argc and agrv.
+   */
+  boot_card(1,__argv);
   reboot();
+
 }
 
-void reboot() {asm("trap #15");}
-
Index: c/src/lib/libbsp/m68k/efi332/start332/start332.c
===================================================================
--- c/src/lib/libbsp/m68k/efi332/start332/start332.c	(revision 8548fe0ae29eafea856090e742c1fd205ed4b0fb)
+++ c/src/lib/libbsp/m68k/efi332/start332/start332.c	(revision a902441a2532b4c56bf636cc38d979a13c07c056)
@@ -11,17 +11,15 @@
 m68k_isr_entry vectors[256];
 char * const __argv[]= {"main", ""};
-char * const __env[]= {""};
+
+void  boot_card(int argc, char * const argv[]);
 
 /*
  *  This prototype really should have the noreturn attribute but
- *  that causes a warning since it appears that the routine does
- *  return.
- *
- *   void dumby_start ()  __attribute__ ((noreturn));
+ *  that causes a warning. Not sure how to fix that.
  */
-
+/* void dumby_start ()  __attribute__ ((noreturn)); */
 void dumby_start ();
+
 void  dumby_start() {
-void  boot_card();
 
   /* We need to by-pass the link instruction since the RAM chip-
@@ -37,5 +35,5 @@
                   addl   " STACK_SIZE ",%d0;
                   movel  %d0,%sp;
-                  link %a6, #0"
+                  movel  %d0,%a6"
 		  );
 
@@ -92,14 +90,32 @@
     (((0x080000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0x80000 */
   *CSBAR2 = (unsigned short int)
-    (((0x080000 >> 8)&0xfff8) | BS_256K ); /* 256 bytes located at 0x80000 */
+    (((0x080000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0x80000 */
   *CSBAR3 = (unsigned short int)         
+    (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0xC0000 */
+  *CSBAR4 = (unsigned short int)
+    (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256 bytes located at 0xC0000 */
+  *CSBAR5 = (unsigned short int)         
     (0xfff8 | BS_64K);	       	         /* AVEC interrupts */
+#ifdef EFI332_v040b
+  *CSBAR6 = (unsigned short int)
+    (((0x000000 >> 8)&0xfff8) | BS_512K ); /* 512k bytes located at 0x0000 */
+  *CSBAR8 = (unsigned short int) /* PCMCIA IOCS */
+    (((0x0c0000 >> 8)&0xfff8) | BS_64K ); /* 64k bytes located at 0xc0000 */
+  *CSBAR9 = (unsigned short int) /* PCMCIA MEMCS */
+    (((0x0D0000 >> 8)&0xfff8) | BS_64K ); /* 64k bytes located at 0xd0000 */
+#else /* EFI332_v040b */
   *CSBAR10 = (unsigned short int)
     (((0x000000 >> 8)&0xfff8) | BS_512K ); /* 512k bytes located at 0x0000 */
+#endif /* EFI332_v040b */
 
   /* Chip-Select Options Registers */
   /*    see section 7 of the SIM Reference Manual */
+#ifdef FLASHWRITE
   *CSORBT = (unsigned short int)
-    ( BothBytes | ReadWrite | SyncAS | WaitStates_13 | UserSupSpace );
+    ( BothBytes | ReadWrite | SyncAS | WaitStates_2 | UserSupSpace );
+#else /* FLASHWRITE */
+  *CSORBT = (unsigned short int)
+    ( BothBytes | ReadOnly | SyncAS | WaitStates_2 | UserSupSpace );
+#endif /* FLASHWRITE */
   *CSOR0 = (unsigned short int)
     ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace );
@@ -109,24 +125,46 @@
     ( UpperByte | ReadWrite | SyncAS | FastTerm | UserSupSpace );
   *CSOR3 = (unsigned short int)
+    ( LowerByte | ReadWrite | SyncAS | FastTerm | UserSupSpace );
+  *CSOR4 = (unsigned short int)
+    ( UpperByte | ReadWrite | SyncAS | FastTerm | UserSupSpace );
+  *CSOR5 = (unsigned short int)
     ( BothBytes | ReadWrite | SyncAS | CPUSpace | IPLevel_any | AVEC );
+#ifdef EFI332_v040b
+  *CSOR6 = (unsigned short int)
+    ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace );
+  *CSOR8 = (unsigned short int)
+    ( BothBytes | ReadWrite | SyncAS | External | UserSupSpace );
+  *CSOR9 = (unsigned short int)
+    ( BothBytes | ReadWrite | SyncAS | External | UserSupSpace );
+#else /* EFI332_v040b */
   *CSOR10 = (unsigned short int)
     ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace );
+#endif /* EFI332_v040b */
 
   /* Chip Select Pin Assignment Register 0 */
   /*    see section 7 of the SIM Reference Manual */
   *CSPAR0 = (unsigned short int)( 
-     SAM(DisOut,CS_5,0x3000) |	/* PC2 */
-     SAM(DisOut,CS_4,0x0c00) |	/* PC1 */
-     SAM(DisOut,CS_3,0x0300) |	/* AVEC (internally) */
-     SAM(CS16bit,CS_2,0x00c0)|	/* RAM UDS */
-     SAM(CS16bit,CS_1,0x0030)|	/* RAM LDS */
+     SAM(DisOut,CS_5,0x3000) |	/* AVEC (internally) */
+     SAM(CS16bit,CS_4,0x0c00) |	/* RAM UDS, bank2 */
+     SAM(CS16bit,CS_3,0x0300) |	/* RAM LDS, bank2 */
+     SAM(CS16bit,CS_2,0x00c0)|	/* RAM UDS, bank1 */
+     SAM(CS16bit,CS_1,0x0030)|	/* RAM LDS, bank1 */
      SAM(CS16bit,CS_0,0x000c)|	/* W/!R */
-     SAM(CS16bit,CSBOOT,0x0003)	/* ROM DS */
+     SAM(CS16bit,CSBOOT,0x0003)	/* ROM CS */
      );
 
   /* Chip Select Pin Assignment Register 1 */
   /*    see section 7 of the SIM Reference Manual */
+#ifdef EFI332_v040b
   *CSPAR1 = (unsigned short int)( 
-     SAM(CS16bit,CS_10,0x300)|	/* ECLK */
+     SAM(DisOut,CS_10,0x300)|	/* ECLK */
+     SAM(CS16bit,CS_9,0x0c0) |	/* PCMCIA MEMCS */
+     SAM(CS16bit,CS_8,0x030) |	/* PCMCIA IOCS */
+     SAM(DisOut,CS_7,0x00c) |	/* PC4 */
+     SAM(CS16bit,CS_6,0x003)	/* ROM !OE */
+     );
+#else /* EFI332_v040b */
+  *CSPAR1 = (unsigned short int)( 
+     SAM(CS16bit,CS_10,0x300)|	/* ROM !OE */
      SAM(DisOut,CS_9,0x0c0) |	/* PC6 */
      SAM(DisOut,CS_8,0x030) |	/* PC5 */
@@ -134,4 +172,5 @@
      SAM(DisOut,CS_6,0x003)	/* PC3 */
      );
+#endif /* EFI332_v040b */
 
   /* Port E and F Data Register */
@@ -180,13 +219,9 @@
 
   /*
-   * Execute main with arguments argv and environment env
-   */
-  /* main(1, __argv, __env); */
-
-  boot_card();
-
+   * Execute main with arguments argc and agrv.
+   */
+  boot_card(1,__argv);
   reboot();
+
 }
 
-void reboot() {asm("trap #15");}
-
Index: c/src/lib/libbsp/m68k/efi332/startup/Makefile.in
===================================================================
--- c/src/lib/libbsp/m68k/efi332/startup/Makefile.in	(revision 8548fe0ae29eafea856090e742c1fd205ed4b0fb)
+++ c/src/lib/libbsp/m68k/efi332/startup/Makefile.in	(revision a902441a2532b4c56bf636cc38d979a13c07c056)
@@ -20,6 +20,11 @@
 H_FILES=
 
-SRCS=$(C_FILES) $(H_FILES)
-OBJS=$(C_O_FILES)
+# Assembly source names, if any, go here -- minus the .S
+S_PIECES= except_vect_332_ROM
+S_FILES=$(S_PIECES:%=%.S)
+S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o)
+
+SRCS=$(C_FILES) $(H_FILES) $(S_FILES)
+OBJS=$(C_O_FILES) $(S_O_FILES)
 
 include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
@@ -53,4 +58,6 @@
 all:	${ARCH} $(SRCS) $(PGM)
 	$(INSTALL_CHANGE) $(srcdir)/linkcmds ${PROJECT_RELEASE}/lib
+	$(INSTALL_CHANGE) $(srcdir)/linkcmds_ROM ${PROJECT_RELEASE}/lib
+	$(INSTALL_CHANGE) ${ARCH}/except_vect_332_ROM.o ${PROJECT_RELEASE}/lib
 
 # the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
Index: c/src/lib/libbsp/m68k/efi332/startup/linkcmds
===================================================================
--- c/src/lib/libbsp/m68k/efi332/startup/linkcmds	(revision 8548fe0ae29eafea856090e742c1fd205ed4b0fb)
+++ c/src/lib/libbsp/m68k/efi332/startup/linkcmds	(revision a902441a2532b4c56bf636cc38d979a13c07c056)
@@ -33,8 +33,8 @@
 MEMORY
 {
-  ram     : ORIGIN = 0x80000, LENGTH = 256K
+  ram     : ORIGIN = 0x80000, LENGTH = 512K
 }
 
-__end_of_ram = 0xc0000;
+__end_of_ram = 0x100000;
 _copy_data_from_rom = 0;
 
@@ -49,6 +49,8 @@
     text_start = .;
     _text_start = .;
+
     *(.text)
     . = ALIGN (16);
+
     *(.eh_fram)
     . = ALIGN (16);
@@ -69,4 +71,8 @@
     *(.shdata)
     _endtext = .;
+  } > ram
+  .gcc_exc :
+  {
+    *(.gcc_exc)
   } > ram
   .data :
Index: c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM
===================================================================
--- c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM	(revision 8548fe0ae29eafea856090e742c1fd205ed4b0fb)
+++ c/src/lib/libbsp/m68k/efi332/startup/linkcmds_ROM	(revision a902441a2532b4c56bf636cc38d979a13c07c056)
@@ -41,8 +41,8 @@
 {
   rom     : ORIGIN = 0x00000, LENGTH = 256K
-  ram     : ORIGIN = 0x80000, LENGTH = 256K
+  ram     : ORIGIN = 0x80000, LENGTH = 512K
 }
 
-__end_of_ram = 0xc0000;
+__end_of_ram = 0x100000;
 _copy_data_from_rom = 1;
 
@@ -58,4 +58,9 @@
     _text_start = .;
     *(.text)
+    . = ALIGN (16);
+
+    *(.eh_fram)
+    . = ALIGN (16);
+
     etext = ALIGN(0x10);
     _etext = .;
@@ -74,6 +79,10 @@
     _endtext = .;
   } > rom
+  .gcc_exc :
+  AT ( ADDR(.text) + SIZEOF( .text ) )
+  {
+    *(.gcc_exc)
+  } > ram
   .data :
-  AT ( ADDR(.text) + SIZEOF( .text ) )
   {
     data_start = .;
