Mercurial > ecos
changeset 194:feb0fcf83327
Merge from eCos master repository on 2001-10-26-06:43:03-BST
line wrap: on
line diff
--- a/host/tools/configtool/ChangeLog +++ b/host/tools/configtool/ChangeLog @@ -1,3 +1,8 @@ +2001-10-25 Julian Smart <julians@redhat.com> + + * common/common/build.cxx: now generates /ecos-x names under Windows + both compiling with Cygwin and VC++. + 2001-09-13 Jonathan Larmour <jlarmour@redhat.com> * common/common/build.cxx: Test for active properly in below change.
--- a/host/tools/configtool/common/common/build.cxx +++ b/host/tools/configtool/common/common/build.cxx @@ -158,7 +158,9 @@ std::string cygpath (const std::string i std::string output; // convert the DOS filepath to Cygwin notation - using Cygwin if available -#ifdef __CYGWIN__ + // 2001-10-15: should now do the same thing under Cygwin as under VC++, namely + // use the /ecos-x form. +#if 0 // def __CYGWIN__ char buffer [MAX_PATH + 1]; cygwin_conv_to_posix_path (path.c_str (), buffer); output = buffer;
--- a/host/tools/configtool/standalone/common/ChangeLog +++ b/host/tools/configtool/standalone/common/ChangeLog @@ -1,3 +1,9 @@ +2001-10-25 Julian Smart <julians@redhat.com> + + * cdl_exec.cxx: added calls to mount -f /ecos-x under Cygwin, + in tree command. This, along with use of /ecos-x paths in the + makefiles, ensures that compilation is done in text mode. + 2001-06-20 Bart Veer <bartv@redhat.com> * cdl_exec.cxx (set_verbose_mode):
--- a/host/tools/configtool/standalone/common/cdl_exec.cxx +++ b/host/tools/configtool/standalone/common/cdl_exec.cxx @@ -408,6 +408,37 @@ cdl_exec::cmd_tree () #endif config->generate_config_headers (install_prefix.empty () ? "install/include/pkgconf" : install_prefix + "/include/pkgconf"); status = true; +#ifdef __CYGWIN__ + char buf[100]; + strcpy(buf, "mount.exe -f x: /ecos-x"); + //printf("Cwd_win32: %s\n", cwd_win32); + + if ( cwd_win32[1] == ':' ) + { + buf[13] = cwd_win32[0]; + buf[22] = cwd_win32[0]; + system(buf); + } + + //printf("Repository: %s\n", repository.c_str()); + + if ( repository[1] == ':' ) + { + buf[13] = repository[0]; + buf[22] = repository[0]; + system(buf); + } + if ( !install_prefix.empty() ) + { + //printf("Install prefix: %s\n", install_prefix.c_str()); + if ( install_prefix[1] == ':' ) + { + buf[13] = install_prefix[0]; + buf[22] = install_prefix[0]; + system(buf); + } + } +#endif } else { printf("\nUnable to generate build tree, this configuration still contains conflicts.\n"); printf("Either resolve the conflicts or use --ignore-errors\n");
--- a/host/tools/configtool/standalone/wxwin/setup/innotop.txt +++ b/host/tools/configtool/standalone/wxwin/setup/innotop.txt @@ -29,7 +29,7 @@ AlwaysCreateUninstallIcon=1 Uninstallable=1 DefaultDirName=c:\Program Files\Red Hat\eCos Configuration Tool - DefaultGroupName=eCos Configuration Tool + DefaultGroupName=Red Hat eCos Configuration Tool LicenseFile=v:\deliver\configtool\license.txt InfoBeforeFile=v:\deliver\configtool\readme.txt MessagesFile=compiler:default.isl
--- a/packages/compat/posix/current/ChangeLog +++ b/packages/compat/posix/current/ChangeLog @@ -1,3 +1,8 @@ +2001-10-25 I-Jui Sung <ijsung@csie.nctu.edu.tw> + + * src/mqueue.cxx (do_mq_unlink): Nullify table entries' mq as this + is used by mq_open to see if the entry is used. + 2001-10-11 Jesper Skov <jskov@redhat.com> * tests/mutex3.c: Fixed warning.
--- a/packages/compat/posix/current/src/mqueue.cxx +++ b/packages/compat/posix/current/src/mqueue.cxx @@ -141,7 +141,8 @@ do_mq_unlink( struct mqtabent *tabent ) tabent->name[0] = '\0'; // won't match anything the user sends now tabent->mq->~Cyg_Mqueue(); free( tabent->mq ); - + tabent->mq=NULL; + CYG_REPORT_RETURN(); }
--- a/packages/devs/flash/intel/strata/current/ChangeLog +++ b/packages/devs/flash/intel/strata/current/ChangeLog @@ -1,3 +1,10 @@ +2001-10-23 Hugo Tyson <hmt@redhat.com> + + * cdl/flash_strata.cdl: Provide an option so that RedBoot .ecm + files can turn off the functionality of copying flash driver code + to separate RAM for execution; it's not needed for RAM and ROMRAM + startup, and for some platforms it is required to *not* copy thus. + 2001-08-25 Gary Thomas <gthomas@redhat.com> * src/flash_program_buf.c (flash_program_buf): Allow configuration @@ -13,7 +20,6 @@ 2001-07-17 Jeroen Dobbelaere <jeroen.do * src/flash_program_buf.c (flash_program_buf): Fix of conversion of write buffer length (in bytes) to the length in 'flash_t' words. - 2001-06-22 Hugo Tyson <hmt@redhat.com>
--- a/packages/devs/flash/intel/strata/current/cdl/flash_strata.cdl +++ b/packages/devs/flash/intel/strata/current/cdl/flash_strata.cdl @@ -47,7 +47,22 @@ cdl_package CYGPKG_DEVS_FLASH_STRATA { active_if CYGPKG_IO_FLASH implements CYGHWR_IO_FLASH_DEVICE - implements CYGHWR_IO_FLASH_DEVICE_NOT_IN_RAM + +# implements CYGHWR_IO_FLASH_DEVICE_NOT_IN_RAM + cdl_option CYGOPT_DEVS_FLASH_STRATA_NOT_IN_RAM { + display "Control Flash driver code copy to RAM" + flavor bool + no_define + default_value 1 + implements CYGHWR_IO_FLASH_DEVICE_NOT_IN_RAM + description " + Rarely, it is useful to disable the request that flash driver code + be copied to separate RAM for execution. This option lets you do that. + It should only be controlled by redboot_XXX.ecm config files, for + building different varieties of RedBoot. + NEVER disable this option for ROM startup code, which executes in place + from Flash: the build will not work." + } active_if CYGINT_DEVS_FLASH_STRATA_REQUIRED
--- a/packages/hal/arm/arch/current/ChangeLog +++ b/packages/hal/arm/arch/current/ChangeLog @@ -1,3 +1,12 @@ +2001-10-24 Gary Thomas <gthomas@redhat.com> + + * src/hal_misc.c (hal_msbindex): Fix calculation. + +2001-10-23 Hugo Tyson <hmt@redhat.com> + + * include/hal_mmu.h (MMU_Control_Z,F,RR): Some extra defines for + newer ARM architectures. + 2001-10-11 Fabrice Gautier <Fabrice_Gautier@sdesigns.com> * include/hal_io.h: Add _STRING variants of I/O macros to allow
--- a/packages/hal/arm/arch/current/include/hal_mmu.h +++ b/packages/hal/arm/arch/current/include/hal_mmu.h @@ -101,6 +101,11 @@ #define MMU_Control_X 0x2000 // Set interrupt vectors at 0xFFFF0000 #define MMU_Control_Init (MMU_Control_P|MMU_Control_D|MMU_Control_L) +// Extras for some newer versions eg. ARM920 with architecture version 4. +#define MMU_Control_F 0x400 // IMPLEMENTATION DEFINED +#define MMU_Control_Z 0x800 // Enable branch predicion +#define MMU_Control_RR 0x4000 // Select non-random cache replacement + //----------------------------------------------------------------------------- #endif // CYGONCE_HAL_MMU_H
--- a/packages/hal/arm/arch/current/src/hal_misc.c +++ b/packages/hal/arm/arch/current/src/hal_misc.c @@ -252,7 +252,7 @@ int hal_msbindex(int mask) { int i; - for (i = 32; i >= 0; i++) { + for (i = 31; i >= 0; i--) { if (mask & (1<<i)) return (i); } return (-1);
--- a/packages/hal/arm/sa11x0/assabet/current/ChangeLog +++ b/packages/hal/arm/sa11x0/assabet/current/ChangeLog @@ -1,3 +1,7 @@ +2001-10-20 Nicolar Pitre <nico@cam.org> + + * include/hal_platform_setup.h: Wake up from deep sleep mode. + 2001-07-28 Stefan Eletzhofer <schuehle@t-online.de> * include/hal_platform_setup.h:
--- a/packages/hal/arm/sa11x0/assabet/current/include/hal_platform_setup.h +++ b/packages/hal/arm/sa11x0/assabet/current/include/hal_platform_setup.h @@ -215,6 +215,17 @@ dram_table: .word 0, 0 19: + // Wakeup from deep sleep mode + ldr r1,=SA11X0_RESET_STATUS + ldr r2,[r1] + cmp r2,#SA11X0_SLEEP_MODE_RESET + bne 45f + ldr r1,=SA11X0_PWR_MGR_SCRATCHPAD + ldr r1,[r1] + mov pc,r1 + nop +45: nop + // Release peripheral hold (set by RESET) ldr r1,=SA11X0_PWR_MGR_SLEEP_STATUS ldr r2,=SA11X0_PERIPHERAL_CONTROL_HOLD
--- a/packages/hal/common/current/ChangeLog +++ b/packages/hal/common/current/ChangeLog @@ -1,3 +1,15 @@ +2001-10-25 Gary Thomas <gthomas@redhat.com> + + * cdl/hal.cdl: + * cdl/debugging.cdl: Reorg CDL a little so that GDB stub routines + are only compiled when needed (instead of being compiled "empty"). + +2001-10-24 Gary Thomas <gthomas@redhat.com> + + * cdl/hal.cdl: Add 'basic' test. + + * tests/basic.c: New test of some minimal HAL functionality. + 2001-10-18 Gary Thomas <gthomas@redhat.com> * src/hal_if.c (cyg_hal_diag_mangler_gdb_putc):
--- a/packages/hal/common/current/cdl/debugging.cdl +++ b/packages/hal/common/current/cdl/debugging.cdl @@ -62,6 +62,8 @@ cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_ the necessary support has to go into the target library itself. When GDB stubs are include in a configuration, HAL serial drivers must also be included." + + compile generic-stub.c thread-packets.c hal_stub.c drv_api.c bplist-dynamic.c } cdl_interface CYGINT_HAL_DEBUG_GDB_STUBS_BREAK {
--- a/packages/hal/common/current/cdl/hal.cdl +++ b/packages/hal/common/current/cdl/hal.cdl @@ -54,7 +54,7 @@ cdl_package CYGPKG_HAL { options that are common to all HAL packages." doc redirect/the-ecos-hardware-abstraction-layer-hal.html - compile generic-stub.c thread-packets.c hal_stub.c drv_api.c bplist-dynamic.c + compile drv_api.c compile -library=libextras.a dummy.c make -priority 250 { @@ -427,8 +427,9 @@ cdl_package CYGPKG_HAL { display "Common HAL tests" flavor data no_define - calculated { (!CYGPKG_HAL_BUILD_COMPILER_TESTS) ? "tests/cache tests/context tests/intr" : - "tests/cache tests/context tests/intr tests/cpp1 tests/vaargs" } + calculated { (!CYGPKG_HAL_BUILD_COMPILER_TESTS) ? + "tests/cache tests/context tests/intr tests/basic" : + "tests/cache tests/context tests/intr tests/basic tests/cpp1 tests/vaargs" } description " This option specifies the set of tests for the common HAL." }
new file mode 100644 --- /dev/null +++ b/packages/hal/common/current/tests/basic.c @@ -0,0 +1,101 @@ +//================================================================= +// +// basic.c +// +// HAL basic functions test +// +//========================================================================== +//####COPYRIGHTBEGIN#### +// +// ------------------------------------------- +// The contents of this file are subject to the Red Hat eCos Public License +// Version 1.1 (the "License"); you may not use this file except in +// compliance with the License. You may obtain a copy of the License at +// http://www.redhat.com/ +// +// Software distributed under the License is distributed on an "AS IS" +// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +// License for the specific language governing rights and limitations under +// the License. +// +// The Original Code is eCos - Embedded Configurable Operating System, +// released September 30, 1998. +// +// The Initial Developer of the Original Code is Red Hat. +// Portions created by Red Hat are +// Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc. +// All Rights Reserved. +// ------------------------------------------- +// +//####COPYRIGHTEND#### +//========================================================================== +//#####DESCRIPTIONBEGIN#### +// +// Author(s): gthomas +// Contributors: gthomas +// Date: 2001-10-24 +//####DESCRIPTIONEND#### +//========================================================================== + +#include <cyg/infra/testcase.h> // test case macros +#include <cyg/infra/diag.h> // diag_printf +#include <cyg/infra/cyg_ass.h> // assertions + +#include <cyg/hal/hal_arch.h> // context macros + +// ------------------------------------------------------------------------- + +#define BITS(t) (sizeof(t)*8) + +void +entry(void) +{ + int res; + int i, mask, ndx; + hal_jmp_buf jmpbuf; + + res = 1; + + // Check HAL_MSBIT_NDEX() functions + mask = 1; // One bits set + for (i = 0; i < BITS(int); i++) { + HAL_MSBIT_INDEX(ndx, mask); + res &= (ndx == i); + HAL_LSBIT_INDEX(ndx, mask); + res &= (ndx == i); + mask <<= 1; + } + + mask = 3; // Two bits set + for (i = 0; i < BITS(int)-1; i++) { + HAL_MSBIT_INDEX(ndx, mask); + res &= (ndx == (i+1)); + HAL_LSBIT_INDEX(ndx, mask); + res &= (ndx == i); + mask <<= 1; + } + CYG_TEST_PASS_FAIL(res, "HAL_xSBIT_INDEX() basic functions"); + + res = 0; + if (hal_setjmp(jmpbuf)) { + res = 1; + } else { + hal_longjmp(jmpbuf, 1); + } + CYG_TEST_PASS_FAIL(res, "hal_setjmp()/hal_longjmp() basic functions"); + + CYG_TEST_FINISH("HAL basic functions test"); +} + +// ------------------------------------------------------------------------- + +externC void +cyg_start( void ) +{ + CYG_TEST_INIT(); + + entry(); +} + +// ------------------------------------------------------------------------- +// EOF basic.c
--- a/packages/hal/i386/arch/current/ChangeLog +++ b/packages/hal/i386/arch/current/ChangeLog @@ -1,3 +1,8 @@ +2001-10-19 Ian Campbell <icampbell@arcom.co.uk> + + * include/hal_cache.h: Provide HAL_DCACHE_IS_ENABLED and + HAL_ICACHE_IS_ENABLED macros. + 2001-10-15 Mark Salter <msalter@redhat.com> * src/i386_stub.c (hal_get_gdb_registers): Save idt/gdt in GDB regs.
--- a/packages/hal/i386/arch/current/include/hal_cache.h +++ b/packages/hal/i386/arch/current/include/hal_cache.h @@ -75,6 +75,12 @@ // Disable the data cache #define HAL_DCACHE_DISABLE() +// Query the state of the data cache +#define HAL_DCACHE_IS_ENABLED(_state_) \ +CYG_MACRO_START \ +_state_ = 1; \ +CYG_MACRO_END + // Invalidate the entire cache #define HAL_DCACHE_INVALIDATE_ALL() @@ -137,6 +143,12 @@ // Disable the instruction cache #define HAL_ICACHE_DISABLE() +// Query the state of the instruction cache +#define HAL_ICACHE_IS_ENABLED(_state_) \ +CYG_MACRO_START \ +_state_ = 1; \ +CYG_MACRO_END + // Invalidate the entire cache #define HAL_ICACHE_INVALIDATE_ALL()
--- a/packages/hal/i386/pcmb/current/ChangeLog +++ b/packages/hal/i386/pcmb/current/ChangeLog @@ -1,3 +1,12 @@ +2001-10-19 Ian Campbell <icampbell@arcom.co.uk> + + * cdl/hal_i386_pcmb.cdl: Add cdl_options for + CYGPKG_HAL_I386_PCMB_MEMSIZE to allow configuration of how memory + is detected. Change CYGNUM_HAL_RTC_PERIOD to use default_value + rather than calculated (so it can be overridden in the platform). + * src/pcmb_misc.c: Implement CYGPKG_HAL_I386_PCMB_MEMSIZE + configuration options. + 2001-10-16 Mark Salter <msalter@redhat.com> * src/pcmb_serial.c (cyg_hal_plf_serial_init): Use CDL to determine
--- a/packages/hal/i386/pcmb/current/cdl/hal_i386_pcmb.cdl +++ b/packages/hal/i386/pcmb/current/cdl/hal_i386_pcmb.cdl @@ -87,6 +87,31 @@ 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_interface CYGINT_HAL_I386_PCMB_SCREEN_SUPPORT { display "Enable PC screen support"
--- a/packages/hal/i386/pcmb/current/src/pcmb_misc.c +++ b/packages/hal/i386/pcmb/current/src/pcmb_misc.c @@ -70,6 +70,12 @@ CYG_ADDRWORD cyg_hal_pcmb_memsize_extend 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_HAL_MEMSIZE_BIOS cyg_uint8 lo,hi; HAL_READ_CMOS( 0x15, lo ); @@ -89,7 +95,7 @@ void hal_pcmb_init(void) #endif cyg_hal_pcmb_memsize_extended = ((hi<<8)+lo)*1024; - +#endif } /*------------------------------------------------------------------------*/
--- a/packages/hal/mips/arch/current/ChangeLog +++ b/packages/hal/mips/arch/current/ChangeLog @@ -1,3 +1,16 @@ +2001-10-24 Nick Garnett <nickg@redhat.com> + + * src/vectors.S: + Change behaviour of __default_exception_vsr to only switch to + interrupt stack if we are not already on it. This is now similar + to the way the interrupt VSR operates. This is necessary since it + is possible to take exceptions (such as TLB miss or address error) + while running in the GDB stubs. + + * src/hal_misc.c (cyg_hal_exception_handler): Ensure that PC + planted when catching stub exceptions gets sign extended where + necessary in 64 bit platforms. + 2001-10-05 Jesper Skov <jskov@redhat.com> * include/hal_arch.h: Provide CYGARC_CACHED_ADDRESS() and friends
--- a/packages/hal/mips/arch/current/src/hal_misc.c +++ b/packages/hal/mips/arch/current/src/hal_misc.c @@ -137,7 +137,7 @@ externC cyg_uint32 cyg_hal_exception_han // If we caught an exception inside the stubs, see if we were expecting it // and if so jump to the saved address if (__mem_fault_handler) { - regs->pc = (CYG_ADDRWORD)__mem_fault_handler; + regs->pc = (CYG_HAL_MIPS_REG)(signed long)__mem_fault_handler; return 0; // Caught an exception inside stubs }
--- a/packages/hal/mips/arch/current/src/vectors.S +++ b/packages/hal/mips/arch/current/src/vectors.S @@ -167,7 +167,7 @@ FUNC_START(_start) hal_intc_init hal_cache_init hal_timer_init - + #ifdef CYGARC_START_FUNC_UNCACHED # switch to cached execution address if necessary # assumption is that hal_cache_init makes this safe @@ -324,11 +324,6 @@ FUNC_START(__default_exception_vsr) move k1,sp # K1 = original SP -#ifdef CYGSEM_HAL_ROM_MONITOR - # Switch to interrupt stack to handle exception - la sp,__interrupt_stack -#endif - addi sp,sp,-mips_exception_decrement # space for registers + safety margin @@ -406,21 +401,51 @@ FUNC_START(__default_exception_vsr) move s0,sp # save pointer to saved state +#if defined(CYGSEM_HAL_ROM_MONITOR) && \ + defined(CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK) + + la a0,__interrupt_stack # a0 = stack top + la a1,__interrupt_stack_base # a1 = stack base + sub a3,sp,a1 # a3 = sp - base + bltz a3,1f # not on istack if < 0 + nop # delay slot + sub t0,a0,sp # t0 = top - sp + bgtz t0,8f # already on istack if > 0 + nop # delay slot +1: + move sp,a0 # switch to istack +8: + addi sp,sp,-8 # space for old SP + # (8 to keep dword alignment!) + sw s0,0(sp) # save old SP on stack + +#endif addi sp,sp,-mips_stack_frame_size # make a null frame # Need to set up back pointers etc. ??? - la ra,restore_state # load return address + hal_cpu_except_enable # reenable exceptions - hal_cpu_except_enable # reenable exceptions - .extern cyg_hal_exception_handler - j cyg_hal_exception_handler # call C code + jal cyg_hal_exception_handler # call C code move a0,s0 # arg0 = register dump (delay slot) + +#if defined(CYGSEM_HAL_ROM_MONITOR) && \ + defined(CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK) - # When the exception handler returns, it will - # go back to restore_state, below. - + # If we are returning from the last nested exception, move back + # to the thread stack. + # Since we have arranged for the top of stack location to + # contain the sp we need to go back to here, just pop it off + # and put it in SP. + + lw sp,mips_stack_frame_size(sp) # sp = *sp + subu sp,sp,mips_stack_frame_size # make a null frame +#endif + + j restore_state + nop + FUNC_END(__default_exception_vsr) ##------------------------------------------------------------------------------ @@ -647,7 +672,7 @@ restore_state: hal_diag_restore hal_fpu_load sp - + lw t0,mipsreg_cachectrl(sp) lhi t1,sp llo t2,sp @@ -891,7 +916,7 @@ cyg_interrupt_stack: __interrupt_stack: .long 0,0,0,0,0,0,0,0 - + ##----------------------------------------------------------------------------- ## VSR table. ## The main interrupt code indirects through here to find the VSR
--- a/packages/hal/mips/vrc437x/current/ChangeLog +++ b/packages/hal/mips/vrc437x/current/ChangeLog @@ -1,3 +1,13 @@ +2001-10-24 Nick Garnett <nickg@redhat.com> + + * include/hal_diag.h: Fixed problem with support for virtual + vector diagnostics. + + * include/platform.inc: + Modify the ROM and ROMRAM version of hal_mon_copy_trampoline to + copy the utlb trampoline to 0xa0000080 as well as 0xa0000000. This + is necessary on 64 bit machines to catch 64 bit TLB exceptions. + 2001-09-17 Nick Garnett <nickg@redhat.com> * src/plf_misc.c:
--- a/packages/hal/mips/vrc437x/current/include/hal_diag.h +++ b/packages/hal/mips/vrc437x/current/include/hal_diag.h @@ -49,6 +49,16 @@ #include <cyg/infra/cyg_type.h> +#if defined(CYGSEM_HAL_VIRTUAL_VECTOR_DIAG) + +#include <cyg/hal/hal_if.h> + +#define HAL_DIAG_INIT() hal_if_diag_init() +#define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_) +#define HAL_DIAG_READ_CHAR(_c_) hal_if_diag_read_char(&_c_) + +#else // everything by steam + /*---------------------------------------------------------------------------*/ /* functions implemented in hal_diag.c */ @@ -66,6 +76,8 @@ externC void hal_diag_read_char(char *c) #define HAL_DIAG_READ_CHAR(_c_) hal_diag_read_char(&_c_) +#endif + /*---------------------------------------------------------------------------*/ /* end of hal_diag.h */ #endif /* CYGONCE_HAL_HAL_DIAG_H */
--- a/packages/hal/mips/vrc437x/current/include/platform.inc +++ b/packages/hal/mips/vrc437x/current/include/platform.inc @@ -341,6 +341,7 @@ 1: 1: lw v0,0(a0) sw v0,0(t0) + sw v0,0x80(t0) addiu a0,a0,4 bne a0,a1,1b addiu t0,t0,4
--- a/packages/hal/v85x/ceb_v850/current/ChangeLog +++ b/packages/hal/v85x/ceb_v850/current/ChangeLog @@ -1,3 +1,8 @@ +2001-10-25 Jonathan Larmour <jlarmour@redhat.com> + + * cdl/hal_v85x_ceb_v850.cdl (CYGBLD_GLOBAL_CFLAGS): Always use + -mv850 just in case we're using tools that don't do that by default. + 2001-06-18 Jonathan Larmour <jlarmour@redhat.com> * cdl/hal_v85x_ceb_v850.cdl (CYGHWR_MEMORY_LAYOUT_H): Fix name for
--- a/packages/hal/v85x/ceb_v850/current/cdl/hal_v85x_ceb_v850.cdl +++ b/packages/hal/v85x/ceb_v850/current/cdl/hal_v85x_ceb_v850.cdl @@ -236,7 +236,7 @@ cdl_package CYGPKG_HAL_V85X_V850_CEB { display "Global compiler flags" flavor data no_define - default_value { "-Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" } + default_value { "-mv850 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority" } description " This option controls the global compiler flags which are used to compile all packages by
--- a/packages/io/flash/current/ChangeLog +++ b/packages/io/flash/current/ChangeLog @@ -1,3 +1,8 @@ +2001-10-25 Jonathan Larmour <jlarmour@redhat.com> + + * include/flash_dev.h: Fix test of 4x16-bit flash parts. + Spotted by Jose Pascual <josepascual@almudi.com> + 2001-10-16 Jesper Skov <jskov@redhat.com> * src/flash.c: Include string.h
--- a/packages/io/flash/current/include/flash_dev.h +++ b/packages/io/flash/current/include/flash_dev.h @@ -34,7 +34,7 @@ //#####DESCRIPTIONBEGIN#### // // Author(s): hmt -// Contributors: hmt, jskov +// Contributors: hmt, jskov, Jose Pascual <josepascual@almudi.com> // Date: 2001-02-22 // Purpose: Define common flash device driver definitions // Description: The flash_data_t type is used for accessing @@ -114,7 +114,7 @@ typedef cyg_uint16 flash_data_t; // 2 devices to make 32-bit # define FLASHWORD( k ) ((k)+((k)<<16)) typedef cyg_uint32 flash_data_t; -# elif 2 == CYGNUM_FLASH_INTERLEAVE +# elif 4 == CYGNUM_FLASH_INTERLEAVE // 4 devices to make 64-bit - intermediate requires explicit widening # define FLASHWORD32( k ) ((flash_data_t)((k)+((k)<<16))) # define FLASHWORD( k ) (FLASHWORD32( k ) + (FLASHWORD32( k ) << 32));
--- a/packages/net/tcpip/current/ChangeLog +++ b/packages/net/tcpip/current/ChangeLog @@ -1,3 +1,11 @@ +2001-10-25 Hugo Tyson <hmt@redhat.com> + + * src/sys/net/if_bridge.c (bridge_broadcast): Count if_obytes in + destination interfaces as well as the bridge interface; normally + this is done in if_ethersubr.c but here we talk directly to the + interface, bypassing that layer. Thanks to Andrew Lunn for + noticing that. + 2001-10-18 Jonathan Larmour <jlarmour@redhat.com> * src/sys/netinet/in.c (in_lifaddr_ioctl): Silence warnings about
--- a/packages/net/tcpip/current/src/sys/net/if_bridge.c +++ b/packages/net/tcpip/current/src/sys/net/if_bridge.c @@ -894,6 +894,9 @@ bridge_output(ifp, m, sa, rt) sc->sc_if.if_opackets++; sc->sc_if.if_obytes += m->m_pkthdr.len; + // Also count the bytes in the outgoing interface; normally + // done in if_ethersubr.c but here we bypass that route. + p->ifp->if_obytes += m->m_pkthdr.len; IF_ENQUEUE(&p->ifp->if_snd, mc); if ((p->ifp->if_flags & IFF_OACTIVE) == 0) (*p->ifp->if_start)(p->ifp); @@ -918,6 +921,9 @@ sendunicast: } sc->sc_if.if_opackets++; sc->sc_if.if_obytes += m->m_pkthdr.len; + // Also count the bytes in the outgoing interface; normally + // done in if_ethersubr.c but here we bypass that route. + dst_if->if_obytes += m->m_pkthdr.len; IF_ENQUEUE(&dst_if->if_snd, m); if ((dst_if->if_flags & IFF_OACTIVE) == 0) (*dst_if->if_start)(dst_if); @@ -1114,6 +1120,9 @@ bridgeintr_frame(sc, m) } sc->sc_if.if_opackets++; sc->sc_if.if_obytes += m->m_pkthdr.len; + // Also count the bytes in the outgoing interface; normally + // done in if_ethersubr.c but here we bypass that route. + dst_if->if_obytes += m->m_pkthdr.len; IF_ENQUEUE(&dst_if->if_snd, m); if ((dst_if->if_flags & IFF_OACTIVE) == 0) (*dst_if->if_start)(dst_if); @@ -1273,7 +1282,9 @@ bridge_broadcast(sc, ifp, eh, m) sc->sc_if.if_obytes += mc->m_pkthdr.len; if (ifp && ((eh->ether_shost[0] & 1) == 0) ) ifp->if_omcasts++; - + // Also count the bytes in the outgoing interface; normally + // done in if_ethersubr.c but here we bypass that route. + p->ifp->if_obytes += m->m_pkthdr.len; IF_ENQUEUE(&p->ifp->if_snd, mc); if ((p->ifp->if_flags & IFF_OACTIVE) == 0) (*p->ifp->if_start)(p->ifp);
--- a/packages/pkgconf/fixhtml.tcl +++ b/packages/pkgconf/fixhtml.tcl @@ -98,6 +98,7 @@ foreach file $files { # Take care of some character entities that Netscape does not understand regsub -all "&mgr;" $data "\\BC;" data regsub -all "—" $data "\\—" data + regsub -all "–" $data "\\–" data regsub -all "…" $data "\\…" data regsub -all "“" $data "\\“" data regsub -all "”" $data "\\”" data @@ -112,6 +113,8 @@ foreach file $files { regsub -all "_" $data "\\_" data regsub -all "/" $data "\\/" data regsub -all "=" $data "\\=" data + regsub -all "#" $data "\\#" data + regsub -all "+" $data "\\+" data # Now write the data back to the file. Do not bother to # keep an old version lying around, the html files can be
--- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,19 @@ +2001-10-26 Gary Thomas <gthomas@redhat.com> + + * src/io.c (_rb_gets): Fix ^A editing - was timing out, thus erasing + buffer [silently]. + +2001-10-25 Gary Thomas <gthomas@redhat.com> + + * src/io.c: + * cdl/redboot.cdl: Add command line history and edit functions. + Controlled by CYGNUM_REDBOOT_CMD_LINE_EDITING option which defines + the depth of the history buffer. + +2001-10-22 Jonathan Larmour <jlarmour@redhat.com> + + * include/redboot.h: Declare net_debug here. + 2001-10-18 Jonathan Larmour <jlarmour@redhat.com> * src/net/net_io.c (net_init): Set cyg_io_eth_net_debug from net_debug.
--- a/packages/redboot/current/cdl/redboot.cdl +++ b/packages/redboot/current/cdl/redboot.cdl @@ -104,6 +104,16 @@ cdl_package CYGPKG_REDBOOT { information about the RedBoot configuration." } + cdl_option CYGNUM_REDBOOT_CMD_LINE_EDITING { + display "Enable command line editing" + flavor data + default_value 16 + description " + If this option is non-zero, RedBoot will remember the last N command + lines. These lines may be reused. Enabling this history will also + enable rudimentary editting of the lines themselves." + } + no_define description "This option enables the building of the Redboot ELF image. The image may require further relocation or symbol @@ -168,7 +178,6 @@ cdl_package CYGPKG_REDBOOT { } } - cdl_option CYGNUM_REDBOOT_NETWORKING_TCP_PORT { display "TCP port to listen for incoming connections" flavor data
--- a/packages/redboot/current/src/io.c +++ b/packages/redboot/current/src/io.c @@ -285,10 +285,28 @@ getc_script(char *cp) int _rb_gets(char *buf, int buflen, int timeout) { - char *ptr = buf; + char *ip = buf; // Insertion point + char *eol = buf; // End of line char c; bool res = false; static char last_ch = '\0'; +#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0 +// +// Command line history support +// ^P - Select previous line from history +// ^N - Select next line from history +// ^A - Move insertion [cursor] to start of line +// ^E - Move cursor to end of line +// ^B - Move cursor back [previous character] +// ^F - Move cursor forward [next character] +// +#define _CL_NUM_LINES CYGNUM_REDBOOT_CMD_LINE_EDITING // Number of lines to keep + static char _cl_lines[_CL_NUM_LINES][CYGPKG_REDBOOT_MAX_CMD_LINE]; + static int _cl_index = -1; // Last known command line + static int _cl_max_index = -1; // Last command in buffers + int _index = _cl_index; // Last saved line + char *xp; +#endif while (true) { #ifdef CYGFUN_REDBOOT_BOOT_SCRIPT @@ -296,7 +314,7 @@ int do_idle(false); else #endif - if ((timeout > 0) && (ptr == buf)) { + if ((timeout > 0) && (eol == buf)) { #define MIN_TIMEOUT 50 mon_set_read_char_timeout(timeout > MIN_TIMEOUT ? MIN_TIMEOUT : timeout); while (timeout > 0) { @@ -315,14 +333,103 @@ int } else { mon_read_char(&c); } - *ptr = '\0'; + *eol = '\0'; switch (c) { - case 0x03: // ^C - if (ptr == buf) { +#define CTRL(c) ((c)&0x1F) +#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0 + case CTRL('P'): + // Fetch the previous line into the buffer + if (_index >= 0) { + // Erase the previous line [crude] + while (ip != buf) { + mon_write_char('\b'); + mon_write_char(' '); + mon_write_char('\b'); + ip--; + } + strcpy(buf, _cl_lines[_index]); + while (*ip) { + mon_write_char(*ip++); + } + eol = ip; + // Move to previous line + _index--; + if (_index < 0) { + _index = _cl_max_index; + } + } else { + mon_write_char(0x07); // Audible bell on most devices + } + break; + case CTRL('N'): + // Fetch the next line into the buffer + if (_index >= 0) { + if (++_index > _cl_max_index) _index = 0; + // Erase the previous line [crude] + while (ip != buf) { + mon_write_char('\b'); + mon_write_char(' '); + mon_write_char('\b'); + ip--; + } + strcpy(buf, _cl_lines[_index]); + while (*ip) { + mon_write_char(*ip++); + } + eol = ip; + } else { + mon_write_char(0x07); // Audible bell on most devices + } + break; + case CTRL('B'): + // Move insertion point backwards + if (ip != buf) { + mon_write_char('\b'); + ip--; + } + break; + case CTRL('F'): + // Move insertion point forwards + if (ip != eol) { + mon_write_char(*ip++); + } + break; + case CTRL('E'): + // Move insertion point to end of line + while (ip != eol) { + mon_write_char(*ip++); + } + break; + case CTRL('A'): + // Move insertion point to beginning of line + if (ip != buf) { + xp = eol; + while (xp-- != buf) { + mon_write_char('\b'); + } + } + ip = buf; + break; + case CTRL('K'): + // Kill to the end of line + if (ip != eol) { + xp = ip; + while (xp++ != eol) { + mon_write_char(' '); + } + while (--xp != ip) { + mon_write_char('\b'); + } + eol = ip; + } + break; +#endif // CYGNUM_REDBOOT_CMD_LINE_EDITING + case CTRL('C'): // ^C + if (ip == buf) { diag_printf("^C\n"); return _GETS_CTRLC; } - *ptr++ = c; + *ip++ = c; break; case '\n': case '\r': @@ -338,40 +445,111 @@ int mon_write_char('\n'); } last_ch = c; +#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0 + // Save current line + if (++_cl_index == _CL_NUM_LINES) _cl_index = 0; + if (_cl_index > _cl_max_index) _cl_max_index = _cl_index; + strcpy(_cl_lines[_cl_index], buf); +#endif return _GETS_OK; case '\b': case 0x7F: // DEL - if (ptr != buf) { + if (ip != buf) { +#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0 + if (ip != eol) { + ip--; + mon_write_char('\b'); + xp = ip; + while (xp != (eol-1)) { + *xp = *(xp+1); + mon_write_char(*xp++); + } + mon_write_char(' '); // Erases last character + mon_write_char('\b'); + while (xp-- != ip) { + mon_write_char('\b'); + } + } else { + if (console_echo) { + mon_write_char('\b'); + mon_write_char(' '); + mon_write_char('\b'); + } + ip--; + } + eol--; +#else if (console_echo) { mon_write_char('\b'); mon_write_char(' '); mon_write_char('\b'); } - ptr--; + ip--; + eol--; +#endif } break; #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS case '+': // fall through case '$': - if (ptr == buf || last_ch != '\\') + if (ip == buf || last_ch != '\\') { // Give up and try GDB protocol ungetDebugChar(c); // Push back character so stubs will see it return _GETS_GDB; } if (last_ch == '\\') { - ptr--; // Save \$ as $ +#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0 + if (ip == eol) { + // Just save \$ as $ + eol = --ip; + } else { + mon_write_char('\b'); + *--ip = c; + mon_write_char(c); + break; + } +#else + ip--; // Save \$ as $ +#endif } // else fall through #endif default: +#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0 + // If the insertion point is not at the end of line, make space for it + if (ip != eol) { + xp = eol; + *++eol = '\0'; + while (xp != ip) { + *xp = *(xp-1); + xp--; + } + } +#endif if (console_echo) { mon_write_char(c); } - *ptr++ = c; + if (ip == eol) { + // Advance both pointers + *ip++ = c; + eol = ip; +#if CYGNUM_REDBOOT_CMD_LINE_EDITING != 0 + } else { + // Just insert the character + *ip++ = c; + xp = ip; + while (xp != eol) { + mon_write_char(*xp++); + } + while (xp-- != ip) { + mon_write_char('\b'); + } +#endif + } } last_ch = c; - if (ptr == buf + buflen) // Buffer full + if (ip == buf + buflen) // Buffer full return buflen; } }
