This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

High Mem for i386 PC w/ GRUB


This patch allows you to use the High Memory Option (2MB) for i386 PC Targets that use the GRUB startup option. This allows you to launch eCos apps from other Multiboot-compatible loaders that use the lower memory.

In particular, this works with the "eXtender" protected-mode DOS extender (http://oslib.sourceforge.net/x.html), which allows you to launch eCos apps from DOS. This is helpful for some debug setups or maybe launching from a DiskOnChip or similar.

Frank

diff -urN ecos-2005-06-15/packages/hal/i386/pc/current/cdl/hal_i386_pc.cdl ecos/packages/hal/i386/pc/current/cdl/hal_i386_pc.cdl
--- ecos-2005-06-15/packages/hal/i386/pc/current/cdl/hal_i386_pc.cdl	2005-04-27 14:57:27.000000000 -0400
+++ ecos/packages/hal/i386/pc/current/cdl/hal_i386_pc.cdl	2005-06-15 17:44:05.000000000 -0400
@@ -295,7 +295,8 @@
 	 display       "Load into higher memory (2MB)"
 	 flavor        bool
 	 default_value 0
-         requires { CYG_HAL_STARTUP == "RAM" }
+         requires { CYG_HAL_STARTUP == "RAM" || CYG_HAL_STARTUP == "GRUB" }
+
 	 no_define
 	 description "This option enables building RAM applications
 	              which have a start address outside of the area
@@ -311,7 +312,10 @@
 			                         "i386_pc_ram_hi" : \
 						 "i386_pc_ram") : \
 		     CYG_HAL_STARTUP == "ROM"  ? "i386_pc_rom" : \
-		     CYG_HAL_STARTUP == "GRUB" ? "i386_pc_grub" : \
+		     CYG_HAL_STARTUP == "GRUB" ? \
+		         (CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
+			                         "i386_pc_grub_hi" : \
+						 "i386_pc_grub") : \
 	                                         "i386_pc_floppy" }
 
         cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
@@ -324,7 +328,10 @@
 			                             "<pkgconf/mlt_i386_pc_ram_hi.ldi>" : \
 						     "<pkgconf/mlt_i386_pc_ram.ldi>") : \
 		         CYG_HAL_STARTUP == "ROM"  ? "<pkgconf/mlt_i386_pc_rom.ldi>" : \
-		         CYG_HAL_STARTUP == "GRUB" ? "<pkgconf/mlt_i386_pc_grub.ldi>" : \
+		         CYG_HAL_STARTUP == "GRUB" ? \
+		             (CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
+			                             "<pkgconf/mlt_i386_pc_grub_hi.ldi>" : \
+						     "<pkgconf/mlt_i386_pc_grub.ldi>") : \
                                                      "<pkgconf/mlt_i386_pc_floppy.ldi>" }
         }
 
@@ -338,7 +345,10 @@
 			                             "<pkgconf/mlt_i386_pc_ram_hi.h>" : \
 						     "<pkgconf/mlt_i386_pc_ram.h>") : \
 		         CYG_HAL_STARTUP == "ROM"  ? "<pkgconf/mlt_i386_pc_rom.h>" : \
-		         CYG_HAL_STARTUP == "GRUB" ? "<pkgconf/mlt_i386_pc_grub.h>" : \
+		         CYG_HAL_STARTUP == "GRUB" ? \
+		             (CYGHWR_HAL_I386_PC_LOAD_HIGH ? \
+			                             "<pkgconf/mlt_i386_pc_grub_hi.h>" : \
+						     "<pkgconf/mlt_i386_pc_grub.h>") : \
                                                        "<pkgconf/mlt_i386_pc_floppy.h>" }
         }
     }
diff -urN ecos-2005-06-15/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.h ecos/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.h
--- ecos-2005-06-15/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.h	1969-12-31 19:00:00.000000000 -0500
+++ ecos/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.h	2004-08-18 05:57:49.000000000 -0400
@@ -0,0 +1,22 @@
+// eCos memory layout - Fri Oct 20 08:15:20 2000
+
+// This is a generated file - do not edit
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h>
+
+#endif
+#define CYGMEM_REGION_ram (0x00200000)
+#define CYGMEM_REGION_ram_SIZE (0x01000000)
+#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__heap1) [];
+#endif
+#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x01000000 - (size_t) CYG_LABEL_NAME (__heap1))
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__pci_window) [];
+#endif
+#define CYGMEM_SECTION_pci_window (CYG_LABEL_NAME (__pci_window))
+#define CYGMEM_SECTION_pci_window_SIZE (0x64000)
diff -urN ecos-2005-06-15/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.ldi ecos/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.ldi
--- ecos-2005-06-15/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.ldi	1969-12-31 19:00:00.000000000 -0500
+++ ecos/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.ldi	2004-08-18 05:57:49.000000000 -0400
@@ -0,0 +1,29 @@
+// eCos memory layout - Fri Oct 20 08:15:20 2000
+
+// This is a generated file - do not edit
+
+#include <cyg/infra/cyg_type.inc>
+
+MEMORY
+{
+    ram : ORIGIN = 0x0, LENGTH = 0x1000000
+}
+
+SECTIONS
+{
+    SECTIONS_BEGIN
+    SECTION_vectors (ram, 0x208000, LMA_EQ_VMA)
+    SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA)
+    SECTION_rel__got (ram, ALIGN (0x1), LMA_EQ_VMA)
+    SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
+    CYG_LABEL_DEFN(__pci_window) = ALIGN(0x10); . = CYG_LABEL_DEFN(__pci_window) + 0x64000;
+    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
+    SECTIONS_END
+}
diff -urN ecos-2005-06-15/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.mlt ecos/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.mlt
--- ecos-2005-06-15/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.mlt	1969-12-31 19:00:00.000000000 -0500
+++ ecos/packages/hal/i386/pc/current/include/pkgconf/mlt_i386_pc_grub_hi.mlt	2004-08-18 05:57:49.000000000 -0400
@@ -0,0 +1,15 @@
+version 0
+region ram 0 1000000 0 !
+section vectors 0 1 0 1 1 1 1 1 208000 10000 text text !
+section text 0 4 0 1 0 1 0 1 fini fini !
+section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
+section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
+section rodata 0 8 0 1 0 1 0 1 fixup fixup !
+section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table !
+section gcc_except_table 0 1 0 1 0 1 0 1 rel.got rel.got !
+section rel.got 0 1 0 1 0 1 0 1 data data !
+section data 0 8 0 1 0 1 0 1 sbss sbss !
+section sbss 0 4 0 1 0 1 0 1 bss bss !
+section bss 0 10 0 1 0 1 0 1 pci_window pci_window !
+section pci_window 64000 10 0 0 0 1 0 1 heap1 heap1 !
+section heap1 0 8 0 0 0 0 0 0 !

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]