changeset 1967:79f47da882db

* cdl/hal_i386_pcmb.cdl (CYGPKG_HAL_I386_PCMB_MEMSIZE): Moved this PC specific option to the pc package. * src/pcmb_misc.c (hal_i386_mem_real_region_top): Moved this PC specific function to the pc package. (hal_pcmb_init): Moved the bits related to hal_i386_mem_real_region_top to the pc package.
author asl
date Wed, 27 Apr 2005 18:57:51 +0000
parents dd83e9152bc8
children 7ddd5ba45ee5
files packages/hal/i386/pcmb/current/ChangeLog packages/hal/i386/pcmb/current/cdl/hal_i386_pcmb.cdl packages/hal/i386/pcmb/current/src/pcmb_misc.c
diffstat 3 files changed, 10 insertions(+), 68 deletions(-) [+]
line wrap: on
line diff
--- a/packages/hal/i386/pcmb/current/ChangeLog
+++ b/packages/hal/i386/pcmb/current/ChangeLog
@@ -1,3 +1,13 @@
+2005-04-27  David Vrabel <dvrabel@arcom.com>
+
+	* cdl/hal_i386_pcmb.cdl (CYGPKG_HAL_I386_PCMB_MEMSIZE): Moved this
+	PC specific option to the pc package.
+
+	* src/pcmb_misc.c (hal_i386_mem_real_region_top): Moved this PC
+	specific function to the pc package.
+	(hal_pcmb_init): Moved the bits related to
+	hal_i386_mem_real_region_top to the pc package.
+
 2005-04-22  Ian Campbell <icampbell@arcom.com>
 
 	* src/pcmb_serial.c: Enable FIFO.
--- a/packages/hal/i386/pcmb/current/cdl/hal_i386_pcmb.cdl
+++ b/packages/hal/i386/pcmb/current/cdl/hal_i386_pcmb.cdl
@@ -97,31 +97,6 @@ cdl_package CYGPKG_HAL_I386_PCMB {
         }
     }
 
-    cdl_component CYGPKG_HAL_I386_PCMB_MEMSIZE {
-        display       "How to discover the size of available RAM."
-        flavor        data
-        legal_values  {"BIOS" "HARDCODE"}
-        default_value {"BIOS"}
-        description   "It is possible for the HAL to discover the 
-                       size of RAM In several ways. Currently this
-                        can be done by querying the BIOS or by 
-                        hardcoding the values into the executable."
- 
-        cdl_option CYGNUM_HAL_I386_PCMB_MEMSIZE_BASE {
-            display       "Amount of Base RAM available."
-            flavor        data
-            default_value 0x000F0000
-            active_if     { CYGPKG_HAL_I386_PCMB_MEMSIZE == "HARDCODE" }
-        }
- 
-        cdl_option CYGNUM_HAL_I386_PCMB_MEMSIZE_EXTENDED {
-            display       "Amount of Extended RAM available."
-            flavor        data
-            default_value 0x00100000
-            active_if     { CYGPKG_HAL_I386_PCMB_MEMSIZE == "HARDCODE" }
-        }
-    }
-
     cdl_option CYGSEM_HAL_I386_PC_LARGE_PCI_SPACE {
 	display           "Search entire PCI space"
 	flavor            bool
--- a/packages/hal/i386/pcmb/current/src/pcmb_misc.c
+++ b/packages/hal/i386/pcmb/current/src/pcmb_misc.c
@@ -75,41 +75,11 @@ volatile CYG_BYTE hal_interrupt_level[CY
 /*------------------------------------------------------------------------*/
 // Static variables
 
-CYG_ADDRWORD cyg_hal_pcmb_memsize_base;
-CYG_ADDRWORD cyg_hal_pcmb_memsize_extended;
-
 /*------------------------------------------------------------------------*/
 // Initializer
 
 void hal_pcmb_init(void)
 {
-#ifdef CYGPKG_HAL_I386_PCMB_MEMSIZE_HARDCODE
-    cyg_hal_pcmb_memsize_base = CYGNUM_HAL_I386_PCMB_MEMSIZE_BASE;
-    cyg_hal_pcmb_memsize_extended = CYGNUM_HAL_I386_PCMB_MEMSIZE_EXTENDED;
-#endif
-
-#ifdef CYGPKG_HAL_I386_PCMB_MEMSIZE_BIOS
-    cyg_uint8 lo,hi;
-    
-    HAL_READ_CMOS( 0x15, lo );
-    HAL_READ_CMOS( 0x16, hi );
-
-    cyg_hal_pcmb_memsize_base = ((hi<<8)+lo)*1024;
-
-#ifndef CYG_HAL_STARTUP_ROM
-    // If we started up under a BIOS, then it will have put
-    // the discovered extended memory size in CMOS bytes 30/31.
-    HAL_READ_CMOS( 0x30, lo );
-    HAL_READ_CMOS( 0x31, hi );
-#else
-    // 
-    HAL_READ_CMOS( 0x17, lo );
-    HAL_READ_CMOS( 0x18, hi );
-#endif
-
-    cyg_hal_pcmb_memsize_extended = ((hi<<8)+lo)*1024;
-#endif
-
     // Disable NMI - this can be reenabled later, once a proper handler
     // is registered and ready to handle events
     HAL_WRITE_UINT8(0x70, 0x80);
@@ -117,19 +87,6 @@ void hal_pcmb_init(void)
 
 /*------------------------------------------------------------------------*/
 
-cyg_uint8 *hal_i386_mem_real_region_top( cyg_uint8 *regionend )
-{
-    CYG_ASSERT( cyg_hal_pcmb_memsize_base > 0 , "No base RAM size set!");
-    CYG_ASSERT( cyg_hal_pcmb_memsize_extended > 0 , "No extended RAM size set!");
-
-    if( (CYG_ADDRESS)regionend <= 0x000A0000 )
-        regionend = (cyg_uint8 *)cyg_hal_pcmb_memsize_base;
-    else if( (CYG_ADDRESS)regionend >= 0x00100000 )
-        regionend = (cyg_uint8 *)cyg_hal_pcmb_memsize_extended+0x00100000;
-
-    return regionend;
-}
-
 /*------------------------------------------------------------------------*/
 // Clock initialization and access