# HG changeset patch # User asl # Date 1114628271 0 # Node ID 79f47da882db11a10d7f084f2318a050ad26ac6e # Parent dd83e9152bc87f0d23b072d03df046a6dda053e6 * 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. diff --git a/packages/hal/i386/pcmb/current/ChangeLog b/packages/hal/i386/pcmb/current/ChangeLog --- a/packages/hal/i386/pcmb/current/ChangeLog +++ b/packages/hal/i386/pcmb/current/ChangeLog @@ -1,3 +1,13 @@ +2005-04-27 David Vrabel + + * 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 * src/pcmb_serial.c: Enable FIFO. diff --git a/packages/hal/i386/pcmb/current/cdl/hal_i386_pcmb.cdl b/packages/hal/i386/pcmb/current/cdl/hal_i386_pcmb.cdl --- 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 diff --git a/packages/hal/i386/pcmb/current/src/pcmb_misc.c b/packages/hal/i386/pcmb/current/src/pcmb_misc.c --- 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