Mercurial > flash_v2
changeset 128:0c2b7be0d798 ecos-sw-2000-10-12
Merge from eCos master repository on 2000-10-12-08:46:24-BST
line wrap: on
line diff
--- a/packages/compat/posix/current/ChangeLog +++ b/packages/compat/posix/current/ChangeLog @@ -1,3 +1,30 @@ +2000-10-11 Nick Garnett <nickg@cygnus.co.uk> + + * src/pthread.cxx: Fixed cyg_posix_pthread_release_thread() to + work for _DETACHED threads as well as for _RUNNING ones. Also + fixed a bug in test to decrement counter in this routine. + + * src/pprivate.h: Added note about retaining numerical order of + PTHREAD_STATE_* defines. + + * tests/timer1.c: Fixed some bugs of the how-did-it-ever-work + variety. + +2000-10-05 Nick Garnett <nickg@cygnus.co.uk> + + * src/misc.cxx: + Added a set of compatibility functions to aid portability and + improve standards compliance. + Added cyg_posix_function_[start|finish] to set up and terminate + POSIX API functionality wrt signal and cancellation behaviour. + (Lots more to do here). + + * include/export.h: + Added this file to contain definitions that can be exported from + the POSIX package to others. + + * src/pprivate.h: Added include of export.h + 2000-09-11 Jonathan Larmour <jlarmour@redhat.com> * include/limits.h (OPEN_MAX): Don't define here - let FS infra do
new file mode 100644 --- /dev/null +++ b/packages/compat/posix/current/include/export.h @@ -0,0 +1,84 @@ +#ifndef CYGONCE_POSIX_EXPORT_H +#define CYGONCE_POSIX_EXPORT_H +//============================================================================= +// +// export.h +// +// POSIX export header +// +//============================================================================= +//####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 Red Hat, Inc. +// All Rights Reserved. +// ------------------------------------------- +// +//####COPYRIGHTEND#### +//============================================================================= +//#####DESCRIPTIONBEGIN#### +// +// Author(s): nickg +// Contributors: nickg +// Date: 2000-09-18 +// Purpose: POSIX export header +// Description: This header contains definitions that the POSIX package exports +// to other packages. These are generally interfaces that are not +// provided by the public API. +// +// +// Usage: +// #ifdef CYGPKG_POSIX +// #include <export.h> +// #endif +// ... +// +// +//####DESCRIPTIONEND#### +// +//============================================================================= + +#include <pkgconf/hal.h> +#include <pkgconf/kernel.h> +#include <pkgconf/posix.h> + +#include <cyg/infra/cyg_type.h> + +#include <stddef.h> // NULL, size_t + +#include <limits.h> + +#include <sys/types.h> + +#include <sched.h> // SCHED_* + +//============================================================================= +// POSIX API function management. +// These macros should be inserted near the start and all returns of +// any function that is part of the POSIX API. + +__externC void cyg_posix_function_start(); +__externC void cyg_posix_function_finish(); + +#define CYG_POSIX_FUNCTION_START() cyg_posix_function_start() + +#define CYG_POSIX_FUNCTION_FINISH() cyg_posix_function_finish() + +//----------------------------------------------------------------------------- +#endif // ifndef CYGONCE_POSIX_EXPORT_H +// End of export.h
--- a/packages/compat/posix/current/src/misc.cxx +++ b/packages/compat/posix/current/src/misc.cxx @@ -61,6 +61,10 @@ #include <limits.h> #include <time.h> +#include <cyg/kernel/sched.hxx> + +#include <cyg/kernel/sched.inl> + // ------------------------------------------------------------------------- // Supply some suitable values for constants that may not be present // in all configurations. @@ -78,7 +82,7 @@ #define __xstring(_x) __string(_x) // ------------------------------------------------------------------------- -// utsname() +// uname() __externC int uname( struct utsname *name ) { @@ -316,5 +320,54 @@ } } +//========================================================================== +// Some trivial compatibility functions. +// These are merely present to permit existing code to be ported a little +// more easily, and to provide adequate standards compatibility. + +__externC pid_t getpid ( void ) { return 42; } +__externC pid_t getppid ( void ) { return 41; } +__externC uid_t getuid ( void ) { return 666; } +__externC uid_t geteuid ( void ) { return 666; } +__externC gid_t getgid ( void ) { return 88; } +__externC gid_t getegid ( void ) { return 88; } +__externC int setuid ( uid_t uid ) { errno = EPERM; return -1; } +__externC int setgid ( uid_t gid ) { errno = EPERM; return -1; } +__externC int getgroups ( int gidsetsize, gid_t grouplist[] ) { return 0; }; +__externC pid_t getpgrp ( void ) { return 42; } +__externC pid_t setsid ( void ) { errno = EPERM; return -1; } +__externC int setpgid ( pid_t pid, pid_t pgid ) { errno = ENOSYS; return -1; } + +//========================================================================== +// Exports to other packages + +// ------------------------------------------------------------------------- +// POSIX API function entry + +__externC void cyg_posix_function_start() +{ + Cyg_Thread *self = Cyg_Scheduler::get_current_thread(); + + // Inhibit ASR delivery in this function until it returns. + + self->set_asr_inhibit(); +} + +// ------------------------------------------------------------------------- + +__externC void cyg_posix_function_finish() +{ + Cyg_Thread *self = Cyg_Scheduler::get_current_thread(); + + // Re-allow ASR delivery. + + self->clear_asr_inhibit(); + + // After clearing the inhibit flag, blip the scheduler lock + // to get any pending ASRs delivered. + Cyg_Scheduler::lock(); + Cyg_Scheduler::unlock(); +} + // ------------------------------------------------------------------------- // EOF misc.cxx
--- a/packages/compat/posix/current/src/pprivate.h +++ b/packages/compat/posix/current/src/pprivate.h @@ -60,6 +60,8 @@ #include <signal.h> // sigset_t #include <limits.h> // PTHREAD_KEYS_MAX +#include <cyg/posix/export.h> // POSIX exports header + #include <cyg/kernel/thread.hxx> // thread definitions #include <cyg/kernel/mutex.hxx> // mutex definitions @@ -121,6 +123,7 @@ typedef struct // Values for the state field. These are solely concerned with the // states visible to POSIX. The thread's run state is stored in the // eCos thread object. +// Note: numerical order here is important, do not rearrange. #define PTHREAD_STATE_FREE 0 // This structure is free for reuse #define PTHREAD_STATE_DETACHED 1 // The thread is running but detached
--- a/packages/compat/posix/current/src/pthread.cxx +++ b/packages/compat/posix/current/src/pthread.cxx @@ -310,7 +310,7 @@ static void pthread_reap() // Loop over the thread table looking for exited threads. The // pthreads_exited counter springs us out of this once we have - // found then all (and keeps us out if there are none to do). + // found them all (and keeps us out if there are none to do). for( i = 0; pthreads_exited && i < CYGNUM_POSIX_PTHREAD_THREADS_MAX ; i++ ) { @@ -418,7 +418,7 @@ externC void cyg_posix_pthread_release_t pthread_info *thread = thread_table[i]; if( (thread != NULL) && - (thread->state == PTHREAD_STATE_RUNNING) && + (thread->state <= PTHREAD_STATE_RUNNING) && ((*mask & ~thread->sigmask) != 0) ) { // This thread can service at least one of the signals in @@ -429,7 +429,8 @@ externC void cyg_posix_pthread_release_t break; } - if( thread->state != PTHREAD_STATE_FREE ) + // Decrement count for each valid thread we find. + if( thread != NULL && thread->state != PTHREAD_STATE_FREE ) count--; } }
--- a/packages/compat/posix/current/tests/timer1.c +++ b/packages/compat/posix/current/tests/timer1.c @@ -235,11 +235,11 @@ int main(int argc, char **argv) value.it_interval.tv_sec = 0; value.it_interval.tv_nsec = 250000000; - ret = timer_create( CLOCK_REALTIME, &sev, &timer1 ); + ret = timer_create( CLOCK_REALTIME, &sev, &timer2 ); CYG_TEST_CHECK( ret == 0 , "timer_create returned error"); - ret = timer_settime( timer1, 0, &value, NULL ); + ret = timer_settime( timer2, 0, &value, NULL ); CYG_TEST_CHECK( ret == 0 , "timer_settime returned error"); }
--- a/packages/devs/eth/arm/ebsa285/current/ChangeLog +++ b/packages/devs/eth/arm/ebsa285/current/ChangeLog @@ -1,3 +1,19 @@ +2000-10-05 Hugo Tyson <hmt@redhat.com> + + * src/if_ebsa285.c: Deal with device interrupts in a nested + fashion - disable/restore is the semantics now, rather than + unconditionally unmasking. Also go directly to the 21285 PIC's + interrupt control registers to gain atomicity for these. Poll for + ready received packets when acknowledging an interrupt in the + tranmitting world; a race here could lose an Rx interrupt. Which + doesn't matter on a busy system, but in quieter times... there + will always be such a race because of the vague way the i82559's + status bits reflect how it's yanking the interrupt line; you have + to poll until the interrupt is gone before returning else spurious + interrupt failures occur. The issue is to close the window as + tightly as possible, which this change achieves at a minor cost in + performance - because of the time spent polling when not required. + 2000-09-11 Hugo Tyson <hmt@cygnus.co.uk> * src/if_ebsa285.c (i82559_poll): Only diddle the interface we
--- a/packages/devs/eth/arm/ebsa285/current/src/if_ebsa285.c +++ b/packages/devs/eth/arm/ebsa285/current/src/if_ebsa285.c @@ -59,6 +59,7 @@ #include <cyg/infra/cyg_type.h> #include <cyg/infra/cyg_ass.h> #include <cyg/hal/hal_arch.h> +#include <cyg/hal/hal_intr.h> #include <cyg/infra/diag.h> #include <cyg/hal/drv_api.h> #include <netdev.h> @@ -413,7 +414,8 @@ ETH_DRV_SC(ebsa285_sc0, i82559_recv, i82559_deliver, i82559_poll, - i82559_int_vector); + i82559_int_vector + ); NETDEVTAB_ENTRY(ebsa285_netdev0, "ebsa285-0", @@ -435,7 +437,8 @@ ETH_DRV_SC(ebsa285_sc1, i82559_recv, i82559_deliver, i82559_poll, - i82559_int_vector); + i82559_int_vector + ); NETDEVTAB_ENTRY(ebsa285_netdev1, "ebsa285-1", @@ -513,16 +516,38 @@ void wait_for_cmd_done(long scb_ioaddr) CYG_ASSERT( wait > 0, "wait_for_cmd_done" ); } -static inline void Mask82559Interrupt(struct i82559* p_i82559) +// Short circuit the drv_interrupt_XXX API once we are started: + +static inline int Mask82559Interrupt(struct i82559* p_i82559) { - cyg_drv_interrupt_mask(p_i82559->vector); - cyg_drv_interrupt_mask(CYGNUM_HAL_INTERRUPT_PCI_IRQ); + int cpu_intr; + int old; + int mybits = + (1 << (p_i82559->vector)) | + (1 << CYGNUM_HAL_INTERRUPT_PCI_IRQ); + + HAL_DISABLE_INTERRUPTS( cpu_intr ); + old = *SA110_IRQCONT_IRQENABLE; + *SA110_IRQCONT_IRQENABLECLEAR = mybits; // clear mybits + HAL_RESTORE_INTERRUPTS( cpu_intr ); + + /* it may prove necessary to do something like this + if ( mybits != (mybits & old) ) + /# then at least one of them was disabled, so + # omit both from any restoration: #/ + old = 0; + */ + + return old; } -static inline void UnMask82559Interrupt(struct i82559* p_i82559) +static inline void UnMask82559Interrupt(struct i82559* p_i82559, int old) { - cyg_drv_interrupt_unmask(p_i82559->vector); - cyg_drv_interrupt_unmask(CYGNUM_HAL_INTERRUPT_PCI_IRQ); + // We must only unmask (enable) those which were unmasked before, + // according to the bits in old. + *SA110_IRQCONT_IRQENABLESET = old & + ((1 << (p_i82559->vector)) | + (1 << CYGNUM_HAL_INTERRUPT_PCI_IRQ)); } #ifdef CYGDBG_USE_ASSERTS // an indication of a debug build @@ -536,6 +561,11 @@ static void Acknowledge82559Interrupt(st cyg_uint16 status; int loops = 64; + // EBSA does nothing in interrupt_acknowledge, so we can comment these + // all out. So this routine really boils down to + // "wait for the device to stop interrupting before we unmask" + // The calls are all left in place, for documentary purposes. + cyg_drv_interrupt_acknowledge(p_i82559->vector); cyg_drv_interrupt_acknowledge(CYGNUM_HAL_INTERRUPT_PCI_IRQ); @@ -788,7 +818,7 @@ ebsa285_i82559_init(struct cyg_netdevtab cyg_uint32 ioaddr; cyg_uint16 checksum; int count; - int i; + int i, ints; int addr_length; cyg_uint8 mac_address[6]; struct i82559 *p_i82559; @@ -829,7 +859,7 @@ ebsa285_i82559_init(struct cyg_netdevtab p_i82559->index, (int)ndp); #endif - Mask82559Interrupt(p_i82559); + ints = Mask82559Interrupt(p_i82559); wait_for_cmd_done(ioaddr); // make sure no command operating @@ -848,7 +878,7 @@ ebsa285_i82559_init(struct cyg_netdevtab } while ( (p_selftest[1] == -1) && (--count >= 0) ); Acknowledge82559Interrupt(p_i82559); - UnMask82559Interrupt(p_i82559); + UnMask82559Interrupt(p_i82559, ints ); if (count < 0) { // Test timed out. @@ -1146,7 +1176,7 @@ static void PacketRxReady(struct i82559* { RFD *p_rfd; int next_descriptor; - int length; + int length, ints; struct cyg_netdevtab_entry *ndp; struct eth_drv_sc *sc; cyg_uint32 ioaddr; @@ -1212,7 +1242,7 @@ static void PacketRxReady(struct i82559* // See if the RU has gone idle (usually because of out of resource // condition) and restart it if needs be. - Mask82559Interrupt(p_i82559); + ints = Mask82559Interrupt(p_i82559); status = INW(ioaddr + SCBStatus); if ( RU_STATUS_READY != (status & RU_STATUS_MASK) ) { // Acknowledge the RX INT sources @@ -1234,7 +1264,7 @@ static void PacketRxReady(struct i82559* OUTW(RUC_START, ioaddr + SCBCmd); Acknowledge82559Interrupt(p_i82559); } - UnMask82559Interrupt(p_i82559); + UnMask82559Interrupt(p_i82559, ints); p_i82559->next_rx_descriptor = next_descriptor; } @@ -1486,9 +1516,8 @@ static void TxDone(struct i82559* p_i825 static int i82559_can_send(struct eth_drv_sc *sc) { -// return 1; - struct i82559 *p_i82559; + int ints; p_i82559 = (struct i82559 *)sc->driver_private; @@ -1500,10 +1529,11 @@ i82559_can_send(struct eth_drv_sc *sc) } // Advance TxMachine atomically - Mask82559Interrupt(p_i82559); + ints = Mask82559Interrupt(p_i82559); TxMachine(p_i82559); - Acknowledge82559Interrupt(p_i82559); - UnMask82559Interrupt(p_i82559); + Acknowledge82559Interrupt(p_i82559); // This can eat an Rx interrupt, so + PacketRxReady(p_i82559); + UnMask82559Interrupt(p_i82559,ints); return ! p_i82559->tx_queue_full; } @@ -1520,7 +1550,7 @@ i82559_send(struct eth_drv_sc *sc, unsigned long key) { struct i82559 *p_i82559; - int tx_descriptor_add; + int tx_descriptor_add, ints; TxCB *p_txcb; cyg_uint32 ioaddr; @@ -1622,7 +1652,7 @@ i82559_send(struct eth_drv_sc *sc, // Try advancing the Tx Machine regardless // no more interrupts until started - Mask82559Interrupt(p_i82559); + ints = Mask82559Interrupt(p_i82559); // Check that either: // tx is already active, there is other stuff queued, @@ -1641,8 +1671,9 @@ i82559_send(struct eth_drv_sc *sc, // Advance TxMachine atomically TxMachine(p_i82559); - Acknowledge82559Interrupt(p_i82559); - UnMask82559Interrupt(p_i82559); + Acknowledge82559Interrupt(p_i82559); // This can eat an Rx interrupt, so + PacketRxReady(p_i82559); + UnMask82559Interrupt(p_i82559, ints); } // ------------------------------------------------------------------------ @@ -1795,6 +1826,7 @@ void i82559_deliver(struct eth_drv_sc *s void i82559_poll(struct eth_drv_sc *sc) { struct i82559 *p_i82559; + int ints; p_i82559 = (struct i82559 *)sc->driver_private; IF_BAD_82559( p_i82559 ) { @@ -1804,10 +1836,17 @@ void i82559_poll(struct eth_drv_sc *sc) return; } + // Do these atomically + ints = Mask82559Interrupt(p_i82559); + // As it happens, this driver always requests the DSR to be called: (void)eth_isr( CYGNUM_HAL_INTERRUPT_PCI_IRQ, (cyg_addrword_t)p_i82559 ); + // (no harm in calling this ints-off also, when polled) uni_deliver( p_i82559 ); + + Acknowledge82559Interrupt(p_i82559); + UnMask82559Interrupt(p_i82559, ints); } // ------------------------------------------------------------------------ @@ -1821,6 +1860,24 @@ i82559_int_vector(struct eth_drv_sc *sc) return (p_i82559->vector); } +#if 0 +int +i82559_int_op( struct eth_drv_sc *sc, int mask) +{ + struct i82559 *p_i82559; + p_i82559 = (struct i82559 *)sc->driver_private; + + if ( 1 == mask ) + return Mask82559Interrupt( p_i82559 ); + + if ( 0 == mask ) + UnMask82559Interrupt( p_i82559, 0x0fffffff ); // enable all + + return 0; +} +#endif + + // ------------------------------------------------------------------------ // // Function : pci_init_find_82559s @@ -2555,9 +2612,9 @@ void update_statistics(struct i82559* p_ I82559_COUNTERS *p_statistics; cyg_uint32 *p_counter; cyg_uint32 *p_register; - int reg_count; + int reg_count, ints; - Mask82559Interrupt(p_i82559); + ints = Mask82559Interrupt(p_i82559); // This points to the sthared memory stats area/command block p_statistics = (I82559_COUNTERS *)(p_i82559->p_statistics); @@ -2578,8 +2635,10 @@ void update_statistics(struct i82559* p_ // start register dump OUTW(CU_DUMPSTATS, p_i82559->io_address + SCBCmd); } - Acknowledge82559Interrupt(p_i82559); - UnMask82559Interrupt(p_i82559); + Acknowledge82559Interrupt(p_i82559); // This can eat an Rx interrupt, so + PacketRxReady(p_i82559); + + UnMask82559Interrupt(p_i82559, ints); } #endif #endif // KEEP_STATISTICS
--- a/packages/devs/serial/sh/cq7708/current/ChangeLog +++ b/packages/devs/serial/sh/cq7708/current/ChangeLog @@ -1,3 +1,10 @@ +2000-10-03 Jesper Skov <jskov@redhat.co.uk> + + * cdl/ser_sh_cq7708.cdl: Added testing parameters. + + * include/sh_sh3_cq7708_sci.inl: Use named elements in structure + initializer. + 2000-09-05 Jesper Skov <jskov@redhat.com> * src/sh_sci_serial.c: Moved to SCI package.
--- a/packages/devs/serial/sh/cq7708/current/cdl/ser_sh_cq7708.cdl +++ b/packages/devs/serial/sh/cq7708/current/cdl/ser_sh_cq7708.cdl @@ -106,6 +106,19 @@ cdl_package CYGPKG_IO_SERIAL_SH_CQ7708 { used for the SCI port." } } -} + + cdl_component CYGPKG_IO_SERIAL_SH_CQ7708_TESTING { + display "Testing parameters" + flavor bool + calculated 1 + no_define + active_if CYGPKG_IO_SERIAL_SH_CQ7708_SERIAL1 + define_proc { + puts $::cdl_header "#define CYGPRI_SER_TEST_CRASH_ID \"sh-cq7708\"" + puts $::cdl_header "#define CYGPRI_SER_TEST_SER_DEV CYGDAT_IO_SERIAL_SH_CQ7708_SERIAL1_NAME" + puts $::cdl_header "#define CYGPRI_SER_TEST_TTY_DEV \"/dev/tty1\"" + } + } +} # EOF ser_sh_cq7708.cdl
--- a/packages/devs/serial/sh/cq7708/current/include/sh_sh3_cq7708_sci.inl +++ b/packages/devs/serial/sh/cq7708/current/include/sh_sh3_cq7708_sci.inl @@ -46,11 +46,14 @@ #include <pkgconf/io_serial_sh_cq7708.h> -static sh_sci_info sh_serial_info = {CYGARC_REG_SCSPTR, - CYGNUM_HAL_INTERRUPT_SCI_ERI, - CYGNUM_HAL_INTERRUPT_SCI_RXI, - CYGNUM_HAL_INTERRUPT_SCI_TXI, - SH_SERIAL_SCI_BASE}; +static sh_sci_info sh_serial_info = +{ + data : CYGARC_REG_SCSPTR, + er_int_num : CYGNUM_HAL_INTERRUPT_SCI_ERI, + rx_int_num : CYGNUM_HAL_INTERRUPT_SCI_RXI, + tx_int_num : CYGNUM_HAL_INTERRUPT_SCI_TXI, + ctrl_base : SH_SERIAL_SCI_BASE +}; #if CYGNUM_IO_SERIAL_SH_CQ7708_SERIAL1_BUFSIZE > 0 static unsigned char sh_serial_out_buf[CYGNUM_IO_SERIAL_SH_CQ7708_SERIAL1_BUFSIZE];
--- a/packages/devs/serial/sh/edk7708/current/ChangeLog +++ b/packages/devs/serial/sh/edk7708/current/ChangeLog @@ -1,3 +1,10 @@ +2000-10-03 Jesper Skov <jskov@redhat.co.uk> + + * cdl/ser_sh_edk7708.cdl: Added testing parameters. + + * include/sh_sh3_edk7708_sci.inl: Use named elements in structure + initializer. + 2000-09-05 Jesper Skov <jskov@redhat.com> * src/sh_sci_serial.c: Moved to SCI package.
--- a/packages/devs/serial/sh/edk7708/current/cdl/ser_sh_edk7708.cdl +++ b/packages/devs/serial/sh/edk7708/current/cdl/ser_sh_edk7708.cdl @@ -106,5 +106,19 @@ cdl_package CYGPKG_IO_SERIAL_SH_EDK7708 used for the SCI port." } } + + cdl_component CYGPKG_IO_SERIAL_SH_EDK7708_TESTING { + display "Testing parameters" + flavor bool + calculated 1 + no_define + active_if CYGPKG_IO_SERIAL_SH_EDK7708_SERIAL1 + + define_proc { + puts $::cdl_header "#define CYGPRI_SER_TEST_CRASH_ID \"sh-edk7708\"" + puts $::cdl_header "#define CYGPRI_SER_TEST_SER_DEV CYGDAT_IO_SERIAL_SH_EDK7708_SERIAL1_NAME" + puts $::cdl_header "#define CYGPRI_SER_TEST_TTY_DEV \"/dev/tty1\"" + } + } } # EOF ser_sh_edk7708.cdl
--- a/packages/devs/serial/sh/edk7708/current/include/sh_sh3_edk7708_sci.inl +++ b/packages/devs/serial/sh/edk7708/current/include/sh_sh3_edk7708_sci.inl @@ -46,11 +46,14 @@ #include <pkgconf/io_serial_sh_edk7708.h> -static sh_sci_info sh_serial_info = {CYGARC_REG_SCSPTR, - CYGNUM_HAL_INTERRUPT_SCI_ERI, - CYGNUM_HAL_INTERRUPT_SCI_RXI, - CYGNUM_HAL_INTERRUPT_SCI_TXI, - SH_SERIAL_SCI_BASE}; +static sh_sci_info sh_serial_info = +{ + data : CYGARC_REG_SCSPTR, + er_int_num : CYGNUM_HAL_INTERRUPT_SCI_ERI, + rx_int_num : CYGNUM_HAL_INTERRUPT_SCI_RXI, + tx_int_num : CYGNUM_HAL_INTERRUPT_SCI_TXI, + ctrl_base : SH_SERIAL_SCI_BASE +}; #if CYGNUM_IO_SERIAL_SH_EDK7708_SERIAL1_BUFSIZE > 0 static unsigned char sh_serial_out_buf[CYGNUM_IO_SERIAL_SH_EDK7708_SERIAL1_BUFSIZE];
--- a/packages/devs/serial/sh/sci/current/ChangeLog +++ b/packages/devs/serial/sh/sci/current/ChangeLog @@ -1,3 +1,9 @@ +2000-09-26 Jesper Skov <jskov@redhat.com> + + * cdl/ser_sh_sci.cdl: Minor hack to allow both SCI and SCIF + packages to be used at the same time. + * src/sh_sci_serial.c: Same. + 2000-09-05 Jesper Skov <jskov@redhat.com> * src/sh_sci_serial.c: Moved to generic SH SCI package.
--- a/packages/devs/serial/sh/sci/current/cdl/ser_sh_sci.cdl +++ b/packages/devs/serial/sh/sci/current/cdl/ser_sh_sci.cdl @@ -61,7 +61,9 @@ cdl_package CYGPKG_IO_SERIAL_SH_SCI { define_proc { puts $::cdl_system_header "/***** serial driver proc output start *****/" + puts $::cdl_system_header "#ifndef CYGDAT_IO_SERIAL_DEVICE_HEADER" puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_DEVICE_HEADER <pkgconf/io_serial_sh_sci.h>" + puts $::cdl_system_header "#endif" puts $::cdl_system_header "/***** serial driver proc output end *****/" puts $::cdl_header "#include <pkgconf/system.h>";
--- a/packages/devs/serial/sh/sci/current/src/sh_sci_serial.c +++ b/packages/devs/serial/sh/sci/current/src/sh_sci_serial.c @@ -51,6 +51,11 @@ #include <pkgconf/io_serial.h> #include <pkgconf/io.h> +// FIXME: This is necessary since the SCIF driver may be overriding +// CYGDAT_IO_SERIAL_DEVICE_HEADER. Need a better way to include two +// different drivers. +#include <pkgconf/io_serial_sh_sci.h> + #include <cyg/io/io.h> #include <cyg/hal/hal_intr.h> #include <cyg/io/devtab.h>
--- a/packages/devs/serial/sh/scif/current/ChangeLog +++ b/packages/devs/serial/sh/scif/current/ChangeLog @@ -1,3 +1,29 @@ +2000-10-12 Jonathan Larmour <jlarmour@redhat.com> + + * src/sh_scif_serial.c: return -EINVAL when unsupported flow control + mode requested. + +2000-10-06 Jesper Skov <jskov@redhat.com> + + * src/sh_scif_serial.c: Change to new block call syntax. + Clean up start_xmit code. Do block transfers in serial DSRs. + +2000-10-03 Jesper Skov <jskov@redhat.co.uk> + + * src/sh_scif_serial.c: Fixed receive FIFO problem. Added Line + Status handling. Don't enable TX interrupts in initialization. + +2000-09-26 Jesper Skov <jskov@redhat.com> + + * cdl/ser_sh_scif.cdl: Minor hack to allow both SCI and SCIF + packages to be used at the same time. + * src/sh_scif_serial.c: Same. + +2000-09-25 Jesper Skov <jskov@redhat.com> + + * src/sh_scif_serial.c: Use the SCI macros for baud rate + calculation. + 2000-09-05 Jesper Skov <jskov@redhat.com> * src/sh_scif_serial.c: Moved to separate SCIF package.
--- a/packages/devs/serial/sh/scif/current/cdl/ser_sh_scif.cdl +++ b/packages/devs/serial/sh/scif/current/cdl/ser_sh_scif.cdl @@ -61,7 +61,9 @@ cdl_package CYGPKG_IO_SERIAL_SH_SCIF { define_proc { puts $::cdl_system_header "/***** serial driver proc output start *****/" + puts $::cdl_system_header "#ifndef CYGDAT_IO_SERIAL_DEVICE_HEADER" puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_DEVICE_HEADER <pkgconf/io_serial_sh_scif.h>" + puts $::cdl_system_header "#endif" puts $::cdl_system_header "/***** serial driver proc output end *****/" puts $::cdl_header "#include <pkgconf/system.h>";
--- a/packages/devs/serial/sh/scif/current/src/sh_scif_serial.c +++ b/packages/devs/serial/sh/scif/current/src/sh_scif_serial.c @@ -43,6 +43,11 @@ #include <pkgconf/io_serial.h> #include <pkgconf/io.h> +// FIXME: This is necessary since the SCI driver may be overriding +// CYGDAT_IO_SERIAL_DEVICE_HEADER. Need a better way to include two +// different drivers. +#include <pkgconf/io_serial_sh_scif.h> + #include <cyg/io/io.h> #include <cyg/hal/hal_intr.h> #include <cyg/io/devtab.h> @@ -50,6 +55,7 @@ #include <cyg/io/serial.h> #include <cyg/hal/sh_regs.h> +#include <cyg/hal/hal_cache.h> // Only compile driver if an inline file with driver details was selected. #ifdef CYGDAT_IO_SERIAL_SH_SCIF_INL @@ -89,48 +95,44 @@ static short select_parity[] = { static unsigned short select_baud[] = { 0, // Unused - CYGARC_SCBRR2_CKSx(50)<<8 | CYGARC_SCBRR2_N(50), - CYGARC_SCBRR2_CKSx(75)<<8 | CYGARC_SCBRR2_N(75), - CYGARC_SCBRR2_CKSx(110)<<8 | CYGARC_SCBRR2_N(110), - CYGARC_SCBRR2_CKSx(134)<<8 | CYGARC_SCBRR2_N(134), - CYGARC_SCBRR2_CKSx(150)<<8 | CYGARC_SCBRR2_N(150), - CYGARC_SCBRR2_CKSx(200)<<8 | CYGARC_SCBRR2_N(200), - CYGARC_SCBRR2_CKSx(300)<<8 | CYGARC_SCBRR2_N(300), - CYGARC_SCBRR2_CKSx(600)<<8 | CYGARC_SCBRR2_N(600), - CYGARC_SCBRR2_CKSx(1200)<<8 | CYGARC_SCBRR2_N(1200), - CYGARC_SCBRR2_CKSx(1800)<<8 | CYGARC_SCBRR2_N(1800), - CYGARC_SCBRR2_CKSx(2400)<<8 | CYGARC_SCBRR2_N(2400), - CYGARC_SCBRR2_CKSx(3600)<<8 | CYGARC_SCBRR2_N(3600), - CYGARC_SCBRR2_CKSx(4800)<<8 | CYGARC_SCBRR2_N(4800), - CYGARC_SCBRR2_CKSx(7200)<<8 | CYGARC_SCBRR2_N(7200), - CYGARC_SCBRR2_CKSx(9600)<<8 | CYGARC_SCBRR2_N(9600), - CYGARC_SCBRR2_CKSx(14400)<<8 | CYGARC_SCBRR2_N(14400), - CYGARC_SCBRR2_CKSx(19200)<<8 | CYGARC_SCBRR2_N(19200), - CYGARC_SCBRR2_CKSx(38400)<<8 | CYGARC_SCBRR2_N(38400), - CYGARC_SCBRR2_CKSx(57600)<<8 | CYGARC_SCBRR2_N(57600), - CYGARC_SCBRR2_CKSx(115200)<<8 | CYGARC_SCBRR2_N(115200), - CYGARC_SCBRR2_CKSx(230400)<<8 | CYGARC_SCBRR2_N(230400) + CYGARC_SCBRR_CKSx(50)<<8 | CYGARC_SCBRR_N(50), + CYGARC_SCBRR_CKSx(75)<<8 | CYGARC_SCBRR_N(75), + CYGARC_SCBRR_CKSx(110)<<8 | CYGARC_SCBRR_N(110), + CYGARC_SCBRR_CKSx(134)<<8 | CYGARC_SCBRR_N(134), + CYGARC_SCBRR_CKSx(150)<<8 | CYGARC_SCBRR_N(150), + CYGARC_SCBRR_CKSx(200)<<8 | CYGARC_SCBRR_N(200), + CYGARC_SCBRR_CKSx(300)<<8 | CYGARC_SCBRR_N(300), + CYGARC_SCBRR_CKSx(600)<<8 | CYGARC_SCBRR_N(600), + CYGARC_SCBRR_CKSx(1200)<<8 | CYGARC_SCBRR_N(1200), + CYGARC_SCBRR_CKSx(1800)<<8 | CYGARC_SCBRR_N(1800), + CYGARC_SCBRR_CKSx(2400)<<8 | CYGARC_SCBRR_N(2400), + CYGARC_SCBRR_CKSx(3600)<<8 | CYGARC_SCBRR_N(3600), + CYGARC_SCBRR_CKSx(4800)<<8 | CYGARC_SCBRR_N(4800), + CYGARC_SCBRR_CKSx(7200)<<8 | CYGARC_SCBRR_N(7200), + CYGARC_SCBRR_CKSx(9600)<<8 | CYGARC_SCBRR_N(9600), + CYGARC_SCBRR_CKSx(14400)<<8 | CYGARC_SCBRR_N(14400), + CYGARC_SCBRR_CKSx(19200)<<8 | CYGARC_SCBRR_N(19200), + CYGARC_SCBRR_CKSx(38400)<<8 | CYGARC_SCBRR_N(38400), + CYGARC_SCBRR_CKSx(57600)<<8 | CYGARC_SCBRR_N(57600), + CYGARC_SCBRR_CKSx(115200)<<8 | CYGARC_SCBRR_N(115200), + CYGARC_SCBRR_CKSx(230400)<<8 | CYGARC_SCBRR_N(230400) }; typedef struct sh3_scif_info { - CYG_WORD er_int_num, // Error interrupt number - rx_int_num, // Receive interrupt number - tx_int_num; // Transmit interrupt number + CYG_WORD er_int_num, // Error interrupt number + rx_int_num, // Receive interrupt number + tx_int_num; // Transmit interrupt number - CYG_ADDRWORD ctrl_base; // Base address of SCI controller + CYG_ADDRWORD ctrl_base; // Base address of SCI controller - cyg_interrupt serial_er_interrupt, - serial_rx_interrupt, - serial_tx_interrupt; - cyg_handle_t serial_er_interrupt_handle, - serial_rx_interrupt_handle, - serial_tx_interrupt_handle; + cyg_interrupt serial_er_interrupt, + serial_rx_interrupt, + serial_tx_interrupt; + cyg_handle_t serial_er_interrupt_handle, + serial_rx_interrupt_handle, + serial_tx_interrupt_handle; - bool tx_enabled; - - int error_orer; - int error_fer; - int error_per; + volatile bool tx_enabled; // expect tx _serial_ interrupts } sh3_scif_info; @@ -214,18 +216,13 @@ sh3_scif_config_port(serial_channel *cha HAL_WRITE_UINT16(base+SCIF_SCSSR, 0); // Bring FIFO out of reset and set FIFO trigger marks - // FIXME: Can't get input FIFO work. Never generates any interrupts - // as far as I can tell. HAL_WRITE_UINT8(base+SCIF_SCFCR, - CYGARC_REG_SCFCR2_RTRG_1|CYGARC_REG_SCFCR2_TTRG_4); + CYGARC_REG_SCFCR2_RTRG_14|CYGARC_REG_SCFCR2_TTRG_8); if (init) { // Always enable transmitter and receiver. _scr = CYGARC_REG_SCSCR2_TE | CYGARC_REG_SCSCR2_RE; - if (chan->out_cbuf.len != 0) - _scr |= CYGARC_REG_SCSCR2_TIE; // enable tx interrupts - if (chan->in_cbuf.len != 0) _scr |= CYGARC_REG_SCSCR2_RIE; // enable rx interrupts } @@ -365,31 +362,71 @@ sh3_scif_set_config(serial_channel *chan return -EINVAL; } break; +#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW + case CYG_IO_SET_CONFIG_SERIAL_HW_RX_FLOW_THROTTLE: + { + cyg_uint8 _scfcr; + sh3_scif_info *ser_chan = (sh3_scif_info *)chan->dev_priv; + cyg_addrword_t base = ser_chan->ctrl_base; + cyg_uint8 *f = (cyg_uint8 *)xbuf; + unsigned char mask=0; + if ( *len < *f ) + return -EINVAL; + + if ( chan->config.flags & CYGNUM_SERIAL_FLOW_RTSCTS_RX ) + mask |= CYGARC_REG_SCFCR1_MCE; + HAL_READ_UINT8(base+SCIF_SCFCR, _scfcr); + if (*f) // we should throttle + _scfcr &= ~mask; + else // we should no longer throttle + _scfcr |= mask; + HAL_WRITE_UINT8(base+SCIF_SCFCR, _scfcr); + } + break; + case CYG_IO_SET_CONFIG_SERIAL_HW_FLOW_CONFIG: + { + // Clear DSR/DTR flag as it's not supported. + if (chan->config.flags & + (CYGNUM_SERIAL_FLOW_DSRDTR_RX|CYGNUM_SERIAL_FLOW_DSRDTR_TX)) { + chan->config.flags &= ~(CYGNUM_SERIAL_FLOW_DSRDTR_RX| + CYGNUM_SERIAL_FLOW_DSRDTR_TX); + return -EINVAL; + } + } + break; +#endif default: return -EINVAL; } return ENOERR; } + + // Enable the transmitter on the device static void sh3_scif_start_xmit(serial_channel *chan) { cyg_uint8 _scr; sh3_scif_info *sh_chan = (sh3_scif_info *)chan->dev_priv; + xmt_req_reply_t _block_status = CYG_XMT_DISABLED; - // Mask the interrupts (all sources of the unit) while changing - // the CR since a rx interrupt in the middle of this would result - // in a bad CR state. - cyg_drv_interrupt_mask(sh_chan->rx_int_num); + if (sh_chan->tx_enabled) + return; - sh_chan->tx_enabled = true; - - HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); - _scr |= CYGARC_REG_SCSCR2_TIE; // Enable xmit interrupt - HAL_WRITE_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); - - cyg_drv_interrupt_unmask(sh_chan->rx_int_num); + if (CYG_XMT_DISABLED == _block_status) { + // Mask interrupts while changing the CR since a rx + // interrupt or another thread doing the same in the + // middle of this would result in a bad CR state. + cyg_drv_isr_lock(); + { + HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); + _scr |= CYGARC_REG_SCSCR2_TIE; // Enable xmit interrupt + HAL_WRITE_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); + sh_chan->tx_enabled = true; + } + cyg_drv_isr_unlock(); + } } // Disable the transmitter on the device @@ -399,18 +436,18 @@ sh3_scif_stop_xmit(serial_channel *chan) cyg_uint8 _scr; sh3_scif_info *sh_chan = (sh3_scif_info *)chan->dev_priv; - // Mask the interrupts (all sources of the unit) while changing - // the CR since a rx interrupt in the middle of this would result - // in a bad CR state. - cyg_drv_interrupt_mask(sh_chan->rx_int_num); + // Mask interrupts while changing the CR since a rx interrupt or + // another thread doing the same in the middle of this would + // result in a bad CR state. + cyg_drv_isr_lock(); + { + HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); + _scr &= ~CYGARC_REG_SCSCR2_TIE; // Disable xmit interrupt + HAL_WRITE_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); + } + cyg_drv_isr_unlock(); - HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); - _scr &= ~CYGARC_REG_SCSCR2_TIE; // Disable xmit interrupt - HAL_WRITE_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); - - sh_chan->tx_enabled = false; - - cyg_drv_interrupt_unmask(sh_chan->rx_int_num); + sh_chan->tx_enabled = false; } // Serial I/O - low level tx interrupt handler (ISR) @@ -434,12 +471,51 @@ sh3_scif_tx_DSR(cyg_vector_t vector, cyg { serial_channel *chan = (serial_channel *)data; sh3_scif_info *sh_chan = (sh3_scif_info *)chan->dev_priv; + xmt_req_reply_t _block_status = CYG_XMT_DISABLED; + cyg_uint16 _fdr, _sr; + int _space, _chars_avail; + unsigned char* _chars; + CYG_ADDRWORD _base = sh_chan->ctrl_base; - (chan->callbacks->xmt_char)(chan); + // Always check if we're supposed to be enabled; the driver runs + // with DSRs disabled, and a DSR may have been posted (but not + // executed) before the interrupt was masked. + if (!sh_chan->tx_enabled) + return; + + // How many chars can we stuff into the FIFO? + HAL_READ_UINT16(_base+SCIF_SCFDR, _fdr); + _space = 16 - ((_fdr & CYGARC_REG_SCFDR2_TCOUNT_MASK) >> CYGARC_REG_SCFDR2_TCOUNT_shift); + + // Try to do the transfer most efficiently + _block_status = (chan->callbacks->data_xmt_req)(chan, _space, + &_chars_avail, &_chars); + if (CYG_XMT_OK == _block_status) { + // Transfer the data in block(s). + do { + int i = _chars_avail; + while (i--) { + HAL_WRITE_UINT8(sh_chan->ctrl_base+SCIF_SCFTDR, *_chars++); + _space--; + } + (chan->callbacks->data_xmt_done)(chan, _chars_avail); + } while (_space > 0 && + (CYG_XMT_OK == (chan->callbacks->data_xmt_req)(chan, _space, + &_chars_avail, + &_chars))); + } else if (CYG_XMT_DISABLED == _block_status) { + // Transfer char-by-char + while (_space--) + (chan->callbacks->xmt_char)(chan); + } + + // Clear FIFO-empty/transmit end flags (read back sr first) + HAL_READ_UINT16(sh_chan->ctrl_base+SCIF_SCSSR, _sr); + HAL_WRITE_UINT16(sh_chan->ctrl_base+SCIF_SCSSR, + CYGARC_REG_SCSSR2_CLEARMASK & ~CYGARC_REG_SCSSR2_TDFE); if (sh_chan->tx_enabled) { cyg_uint8 _scr; - HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); _scr |= CYGARC_REG_SCSCR2_TIE; // unmask tx interrupts HAL_WRITE_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); @@ -455,9 +531,9 @@ sh3_scif_rx_ISR(cyg_vector_t vector, cyg cyg_uint8 _scr; HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); - _scr &= ~CYGARC_REG_SCSCR2_RIE; // mask rx interrupts + _scr &= ~CYGARC_REG_SCSCR2_RIE; // mask rx interrupts HAL_WRITE_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); - return CYG_ISR_CALL_DSR; // Cause DSR to be run + return CYG_ISR_CALL_DSR; // Cause DSR to be run } // Serial I/O - high level rx interrupt handler (DSR) @@ -468,20 +544,48 @@ sh3_scif_rx_DSR(cyg_vector_t vector, cyg sh3_scif_info *sh_chan = (sh3_scif_info *)chan->dev_priv; cyg_uint8 _scr; cyg_uint16 _fdr, _sr; + int _avail, _space_avail; + unsigned char* _space; + rcv_req_reply_t _block_status; - // Read char HAL_READ_UINT16(sh_chan->ctrl_base+SCIF_SCFDR, _fdr); - if ((_fdr & CYGARC_REG_SCFDR2_RCOUNT_MASK) != 0) { - cyg_uint8 _c; - HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCFRDR, _c); - (chan->callbacks->rcv_char)(chan, _c); + HAL_READ_UINT16(sh_chan->ctrl_base+SCIF_SCSSR, _sr); + + _avail = _fdr & CYGARC_REG_SCFDR2_RCOUNT_MASK; + CYG_ASSERT(_avail > 0, "No data to be read in RX DSR"); + _block_status = (chan->callbacks->data_rcv_req)(chan, _avail, + &_space_avail, &_space); + if (CYG_RCV_OK == _block_status) { + // Transfer the data in block(s). + do { + int i = _space_avail; + while(i--) { + cyg_uint8 _c; + HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCFRDR, _c); + *_space++ = _c; + _avail--; + } + (chan->callbacks->data_rcv_done)(chan, _space_avail); + } while (_avail > 0 && + (CYG_RCV_OK == (chan->callbacks->data_rcv_req)(chan, _avail, + &_space_avail, + &_space))); + } else { + // Transfer the data char-by-char both for CYG_RCV_FULL and + // CYG_RCV_DISABLED, leaving all policy decisions with the IO + // driver. + while(_avail--) { + cyg_uint8 _c; + HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCFRDR, _c); + (chan->callbacks->rcv_char)(chan, _c); + } } // Clear buffer full flag (read back first) HAL_READ_UINT16(sh_chan->ctrl_base+SCIF_SCSSR, _sr); HAL_WRITE_UINT16(sh_chan->ctrl_base+SCIF_SCSSR, - CYGARC_REG_SCSSR2_CLEARMASK & ~CYGARC_REG_SCSSR2_RDF); + CYGARC_REG_SCSSR2_CLEARMASK & ~(CYGARC_REG_SCSSR2_RDF|CYGARC_REG_SCSSR2_DR)); HAL_READ_UINT8(sh_chan->ctrl_base+SCIF_SCSCR, _scr); _scr |= CYGARC_REG_SCSCR2_RIE; // unmask rx interrupts @@ -509,17 +613,34 @@ sh3_scif_er_DSR(cyg_vector_t vector, cyg serial_channel *chan = (serial_channel *)data; sh3_scif_info *sh_chan = (sh3_scif_info *)chan->dev_priv; cyg_uint16 _ssr, _ssr2; +#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS + cyg_serial_line_status_t stat; +#endif HAL_READ_UINT16(sh_chan->ctrl_base+SCIF_SCSSR, _ssr); _ssr2 = CYGARC_REG_SCSSR_CLEARMASK; if (_ssr & CYGARC_REG_SCSSR2_FER) { _ssr2 &= ~CYGARC_REG_SCSSR2_FER; - sh_chan->error_fer++; +#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS + stat.which = CYGNUM_SERIAL_STATUS_FRAMEERR; + (chan->callbacks->indicate_status)(chan, &stat ); +#endif } if (_ssr & CYGARC_REG_SCSSR2_PER) { _ssr2 &= ~CYGARC_REG_SCSSR2_PER; - sh_chan->error_per++; +#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS + stat.which = CYGNUM_SERIAL_STATUS_PARITYERR; + (chan->callbacks->indicate_status)(chan, &stat ); +#endif + } + if (_ssr & CYGARC_REG_SCSSR2_BRK) { + // don't bother clearing - it will be set immediately anyway + // _ssr2 &= ~CYGARC_REG_SCSSR2_BRK; +#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS + stat.which = CYGNUM_SERIAL_STATUS_BREAK; + (chan->callbacks->indicate_status)(chan, &stat ); +#endif } HAL_WRITE_UINT16(sh_chan->ctrl_base+SCIF_SCSSR, _ssr2); }
--- a/packages/devs/serial/v85x/v850/current/ChangeLog +++ b/packages/devs/serial/v85x/v850/current/ChangeLog @@ -1,3 +1,11 @@ +2000-10-09 Gary Thomas <gthomas@redhat.com> + + * src/v85x_v850_serial.c (v850_serial_config_port): Fix baud clock setup. + +2000-10-04 Gary Thomas <gthomas@redhat.com> + + * src/v85x_v850_serial.c (v850_serial_tx_timeout): Correct arguments. + 2000-09-06 Gary Thomas <gthomas@redhat.com> * src/v85x_v850_serial.h:
--- a/packages/devs/serial/v85x/v850/current/src/v85x_v850_serial.c +++ b/packages/devs/serial/v85x/v850/current/src/v85x_v850_serial.c @@ -157,7 +157,7 @@ v850_serial_config_port(serial_channel * count = select_baud[new_config->baud].count; while (count > 0xFF) { count >>= 1; - mode <<= 1; + mode++; } port->brgc = count; #if CYGINT_HAL_V85X_VARIANT_SB1 @@ -189,7 +189,7 @@ v850_serial_config_port(serial_channel * // sufficiently long so as to not interfere with normal interrupt handling. // static void -v850_serial_tx_timeout(cyg_addrword_t p) +v850_serial_tx_timeout(cyg_handle_t alarm, cyg_addrword_t p) { v850_serial_info *v850_chan = (v850_serial_info *)p; v850_chan->tx_busy = false;
--- a/packages/devs/serial/v85x/v850/current/src/v85x_v850_serial.h +++ b/packages/devs/serial/v85x/v850/current/src/v85x_v850_serial.h @@ -127,7 +127,7 @@ static struct v850_baud { } select_baud[] = { #if CYGINT_HAL_V85X_VARIANT_SB1 // Baud rate values, using defined system clock -#define BAUD_COUNT (CYGHWR_HAL_V85X_V850_BOARD_FREQUENCY)/19200 +#define BAUD_COUNT (CYGHWR_HAL_V85X_V850_BOARD_FREQUENCY/2)/19200 {0, 0}, // Unused {0, 0}, // 50 {0, 0}, // 75
--- a/packages/fs/ram/current/ChangeLog +++ b/packages/fs/ram/current/ChangeLog @@ -1,3 +1,8 @@ +2000-10-05 Nick Garnett <nickg@cygnus.co.uk> + + * tests/fileio1.c: + Extended to check getcwd() and chdir() functionality more fully. + 2000-08-18 Nick Garnett <nickg@cygnus.co.uk> * cdl/ramfs.cdl:
--- a/packages/fs/ram/current/tests/fileio1.c +++ b/packages/fs/ram/current/tests/fileio1.c @@ -374,6 +374,23 @@ static void comparefiles( char *name2, c } //========================================================================== + +void checkcwd( const char *cwd ) +{ + static char cwdbuf[PATH_MAX]; + char *ret; + + ret = getcwd( cwdbuf, sizeof(cwdbuf)); + if( ret == NULL ) SHOW_RESULT( getcwd, ret ); + + if( strcmp( cwdbuf, cwd ) != 0 ) + { + diag_printf( "cwdbuf %s cwd %s\n",cwdbuf, cwd ); + CYG_TEST_FAIL( "Current directory mismatch"); + } +} + +//========================================================================== // main int main( int argc, char **argv ) @@ -389,6 +406,8 @@ int main( int argc, char **argv ) err = chdir( "/" ); if( err < 0 ) SHOW_RESULT( chdir, err ); + + checkcwd( "/" ); // -------------------------------------------------------------- @@ -411,6 +430,8 @@ int main( int argc, char **argv ) err = chdir( "bar" ); if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/bar" ); + diag_printf("<INFO>: rename /foo bundy\n"); err = rename( "/foo", "bundy" ); if( err < 0 ) SHOW_RESULT( rename, err ); @@ -456,6 +477,8 @@ int main( int argc, char **argv ) err = chdir( "/" ); if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/" ); + diag_printf("<INFO>: rmdir /bar\n"); err = rmdir( "/bar" ); if( err < 0 ) SHOW_RESULT( rmdir, err ); @@ -478,6 +501,8 @@ int main( int argc, char **argv ) err = chdir( "/ram" ); if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/ram" ); + diag_printf("<INFO>: mkdir noonoo\n"); err = mkdir( "noonoo", 0 ); if( err < 0 ) SHOW_RESULT( mkdir, err ); @@ -488,6 +513,7 @@ int main( int argc, char **argv ) err = chdir( "noonoo" ); if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/ram/noonoo" ); createfile( "tinky", 678 ); checkfile( "tinky" ); @@ -519,11 +545,69 @@ int main( int argc, char **argv ) diag_printf("<INFO>: cd ..\n"); err = chdir( ".." ); if( err < 0 ) SHOW_RESULT( chdir, err ); - + checkcwd( "/ram" ); + diag_printf("<INFO>: rmdir noonoo\n"); err = rmdir( "noonoo" ); if( err < 0 ) SHOW_RESULT( rmdir, err ); + // -------------------------------------------------------------- + + err = mkdir( "x", 0 ); + if( err < 0 ) SHOW_RESULT( mkdir, err ); + + err = mkdir( "x/y", 0 ); + if( err < 0 ) SHOW_RESULT( mkdir, err ); + + err = mkdir( "x/y/z", 0 ); + if( err < 0 ) SHOW_RESULT( mkdir, err ); + + err = mkdir( "x/y/z/w", 0 ); + if( err < 0 ) SHOW_RESULT( mkdir, err ); + + diag_printf("<INFO>: cd /ram/x/y/z/w\n"); + err = chdir( "/ram/x/y/z/w" ); + if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/ram/x/y/z/w" ); + + diag_printf("<INFO>: cd ..\n"); + err = chdir( ".." ); + if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/ram/x/y/z" ); + + diag_printf("<INFO>: cd .\n"); + err = chdir( "." ); + if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/ram/x/y/z" ); + + diag_printf("<INFO>: cd ../../y\n"); + err = chdir( "../../y" ); + if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/ram/x/y" ); + + diag_printf("<INFO>: cd ../..\n"); + err = chdir( "../.." ); + if( err < 0 ) SHOW_RESULT( chdir, err ); + checkcwd( "/ram" ); + + diag_printf("<INFO>: rmdir x/y/z/w\n"); + err = rmdir( "x/y/z/w" ); + if( err < 0 ) SHOW_RESULT( rmdir, err ); + + diag_printf("<INFO>: rmdir x/y/z\n"); + err = rmdir( "x/y/z" ); + if( err < 0 ) SHOW_RESULT( rmdir, err ); + + diag_printf("<INFO>: rmdir x/y\n"); + err = rmdir( "x/y" ); + if( err < 0 ) SHOW_RESULT( rmdir, err ); + + diag_printf("<INFO>: rmdir x\n"); + err = rmdir( "x" ); + if( err < 0 ) SHOW_RESULT( rmdir, err ); + + // -------------------------------------------------------------- + diag_printf("<INFO>: unlink tinky\n"); err = unlink( "tinky" ); if( err < 0 ) SHOW_RESULT( unlink, err ); @@ -535,7 +619,8 @@ int main( int argc, char **argv ) diag_printf("<INFO>: cd /\n"); err = chdir( "/" ); if( err < 0 ) SHOW_RESULT( chdir, err ); - + checkcwd( "/" ); + diag_printf("<INFO>: umount /ram\n"); err = umount( "/ram" ); if( err < 0 ) SHOW_RESULT( umount, err );
--- a/packages/hal/arm/sa11x0/assabet/current/ChangeLog +++ b/packages/hal/arm/sa11x0/assabet/current/ChangeLog @@ -1,3 +1,7 @@ +2000-10-09 Gary Thomas <gthomas@redhat.com> + + * src/lcd_support.c: Fix compile error if no kernel present. + 2000-09-17 Gary Thomas <gthomas@redhat.com> * misc/lcd_test.c: Add simple "glass tty" driver for LCD.
--- a/packages/hal/arm/sa11x0/assabet/current/cdl/hal_arm_sa11x0_assabet.cdl +++ b/packages/hal/arm/sa11x0/assabet/current/cdl/hal_arm_sa11x0_assabet.cdl @@ -50,7 +50,7 @@ cdl_package CYGPKG_HAL_ARM_SA11X0_ASSABE support for the Intel StrongARM SA1110 based evalation board, known as 'assabet'." - compile assabet_misc.c + compile assabet_misc.c lcd_support.c implements CYGINT_HAL_DEBUG_GDB_STUBS implements CYGINT_HAL_DEBUG_GDB_STUBS_BREAK @@ -320,16 +320,6 @@ cdl_package CYGPKG_HAL_ARM_SA11X0_ASSABE This option lists the target's requirements for a valid Redboot configuration." - cdl_option CYGDAT_REDBOOT_CONSOLE_DEV { - display "Serial port for default console" - flavor data - default_value { "\"/dev/ser1\"" } - description " - This option selects the physical device to use as the default - console device for Redboot." - - } - cdl_option CYGBLD_BUILD_REDBOOT_BIN { display "Build Redboot ROM binary image" active_if CYGBLD_BUILD_REDBOOT
new file mode 100644 --- /dev/null +++ b/packages/hal/arm/sa11x0/assabet/current/misc/eCos2.xpm @@ -0,0 +1,260 @@ +/* XPM */ +static char * eCos2_xpm[] = { +"320 240 17 1", +" c None", +". c #020204", +"+ c #909091", +"@ c #D2D2D2", +"# c #535352", +"$ c #EC9199", +"% c #E84F4D", +"& c #F4B2B4", +"* c #ED6B65", +"= c #FEFEFC", +"- c #EA1A05", +"; c #323232", +"> c #B1B1B1", +", c #747474", +"' c #F4D1DA", +") c #E7362D", +"! c #171717", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".======================@@@@@@>@>@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>@@================''&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'&'&'&''''==================.", +".===================='=@>>>+++,,,+,########################################################################################################+@================'$************************************************************************************************************************************$*$*$$$&&&''================.", +".=====================@>>,,###;#;;;!.......................................................................................................#>================&*----------------------------------------------------------------------------------------------------------------------------------))))))%%%*$$''================.", +".================@@>>++,,##;;;;;;;!........................................................................................................#>================&*------------------------------------------------------------------------------------------------------------------------------------)))))))%**$$&&'''===========.", +".=============='@>+,,##;;;;!!!!.!!!........................................................................................................#>================&*------------------------------------------------------------------------------------------------------------------------------------)---)-)))%%***$$&'==========.", +".===============>+,;!......................................................................................................................#>================&%-------------------------------------------------------------------------------------------------------------------------------------------------)%*$'==========.", +".==========@@@>>,,;;!......................................................................................................................#>================&*-------------------------------------------------------------------------------------------------------------------------------------------------))%*$$&''======.", +".==========@>+,##;!!.......................................................................................................................#>================&%--------------------------------------------------------------------------------------------------------------------------------------------------))%%*$$&''====.", +".=========@>>,#!!..........................................................................................................................#>================&*-------------------------------------------------------------------------------------------------------------------------------------------------------)*$&'====.", +".=======@@>+##;.!..........................................................................................................................#>================&%-------------------------------------------------------------------------------------------------------------------------------------------------------)%*$&''==.", +".======@>+,#;;!............................................................................................................................#>================&*--------------------------------------------------------------------------------------------------------------------------------------------------------))%$$&'=.", +".======@+,;!...............................................................................................................................#>================&%----------------------------------------------------------------------------------------------------------------------------------------------------------)%*&'=.", +".====@@+,;;!...............................................................................................................................#>================&*-----------------------------------------------------------------------------------------------------------------------------------------------------------)%*&'.", +".===@>+,#!!!...............................................................................................................................#>================&%-----------------------------------------------------------------------------------------------------------------------------------------------------------))%*$.", +".===@+#;;..................................................................................................................................#>================&*-------------------------------------------------------------------------------------------------------------------------------------------------------------)%*.", +".='@>+;;!..........................................!.!!!!!!!!..............................................................................#>================&%-------------------------------------------------------------------------------------------------------------------------------------------------------------))%.", +".=@>+#!!..........................................!!!!;!;!!!!!.............................................................................#>================&*----------------------------------------------))))))----------------------------------------------------------------------------------------------------------)).", +".@>+,;............................................!;;;;;;#;;;!!............................................................................#>================&%---------------------------------------------))))))))-----------------------------------------------------------------------------------------------------------.", +".@>,#!...................................!!;;;;####,,,++,+,,,,####;;;;!!.........................................................!!!;!;!;!;,>================&*------------------------------------)))%%%*****$*$$*$*%*%%%)))-----------------------------------------------))))%%%%*%*%%%%))))))------------------------------.", +".>,;;!..................................!;;##,,+>>>>>>@>>@>@>>>>+++,##;!!!......................................................!!;;#######,@================&%----------------------------------))%**$$&&&&&&'&&&&&&&&&&$$*%%)-------------------------------------------)%%%$*$$$&&&&&&$$$$**%%))----------------------------.", +".+#!!...................................!;,,++>@@================@@>+,#;!!.....................................................!!;##,,,,,,,+@================&*----------------------------------)%*$$&''================'&$*%%)-----------------------------------------))%*$$&&''=====''&&$&$**%)----------------------------.", +".,#!................................!;;;,,++>>@@==================@@>>+,##;;!!...........................................!!;;;##,,,+>++++>+@@================&%------------------------------))%%*$$&'''=================''&&$**%%))----------------------------------))%%$$$&'''''======'@'@&&&$$$**%%))----------------------.", +".#;!..............................!!;;,++>@@@'===================='@@@@>>+,#;!.........................................!.!;#,,>>>>@>@@@@@@@@=================&*----------------------------)%%*$&&&'''===================='''''&$$*%)---------------------------------%*$$&'''''=========='''=''''&&&$$*%-)--------------------.", +".#!...............................!;;,+@@================================@>+#;.........................................!!;#,+@@==============================&%----------------------------)%$&'===============================''&$*))-------------------------------)%$&''========================='@&$*))--------------------.", +".;!.............................!;;,,>>=@=============================='=@@>+#;;!...................................!!;##,+>>@===============================&*--------------------------)%*$$&'================================''&$$*))---------------------------)%*$&@'===========================''$*%)--------------------.", +".!.............................!;#,+>@@==================================='@>+,#;!!.................................;;#+>>>@'@===============================&%-------------------------)%$$'''===================================''&$*))-------------------------)%$&''===============================&$%)--------------------.", +"...............................;;,>@=========================================>>,#!.................................!;#+>=====================================&*-------------------------%$&''========================================'$%))------------------------)*&==================================&$%%)-------------------.", +"............................!!;#,+@@=========================================@>>,#;;.............................!;;,,>@=====================================&%----------------------))%*&''========================================='&$*%)---------------------)%*$&==================================&*))--------------------.", +"............................!;#+>@@===========================================@@>+,;!...........................!;;,+@@@=====================================&*----------------------)*$&''===========================================''$$%%)-------------------)*$&@================================'@&*)---------------------.", +"............................;#+>@===============================================@@+#!!..........................!##+@========================================&%----------------------)$&'==============================================='&*%)-------------------%$&''================================''$%----------------------.", +"..........................!!#+>@@===============================================@@>,#;!.......................!!;,+>@========================================&*--------------------)%*&'@===============================================''&*%-------------------*$@'================================''$*%----------------------.", +".........................!;;,>@'==================================================@>,#;......................!;;,+@@=========================================&%-------------------)*$&&='================================================''&*))---------------))*&'================================='$*%)----------------------.", +".........................!##+@====================================================@@>,;......................!;#+@===========================================&*-------------------%$&''===================================================='$%)---------------)%$'=================================='$))-----------------------.", +".........................;,+>@=================@@>@>>>>>>>>>>>>@@'@==============='@@+#!!....................;#,>@====================='='''''''''''''=======&%------------------)*$@'===================='''''''''''''===================='$$*)-------------)%%$'=============='=''&&&$&&&&&''''='=$*))-----------------------.", +".......................!!#,@@================@@@+++,,#########,+>>@@===============@@>,;;!.................!!#,>@======================''&&$&$$$&&&&''''=====&*----------------))%$&===================='''&$$$$$&$&&&''===================='&$%-------------)%*$'==============''&$*********$$'''''$*-------------------------.", +"........................!#>@==================@+,#;;!........!;#,+@@'================@>##!..................!,>'======================''&$$*******$$$'''=====&%----------------)%*$&===================''&$$********$$&'======================&%-------------)**&'==============@&$%-------))%*$&@&&$%-------------------------.", +"......................!;#,>=============='=@>++,#;;!!!.......!!;#,,+>@@==============@>+#;................!;;,>====================''&&$$*%%%%%%%%***$$&&''==&*----------------)*$''================'''&$$**%%%%%%%%***$&&''==================&*)------------)*$&'============='&$*%--------))%*$$$$%)-------------------------.", +"......................!#,>>==============@@>+##;!;!!..........!!!;##,+>@=============@@>,;................;#,+@==================='&$**%%%))))))))))%%%*$$''=&%----------------%$''================='&***%%)))))))))))%%**$&''================'$%%-----------%*&''============='&*%)---------))))%%%))-------------------------.", +"......................;#+@@==============@@+#!!!...................;##+@===============@+#................;,+@@==================='$*%)----------------)%*$'=&*----------------*&===================&*%)-----------------%*$&'================'&**)----------%$&@==============&$%))---------------)---------------------------.", +"......................#+>@@=============@>+,;!.....................!;#,>@@============'=>#!!..............;+>@@================''&$*%%-----------------))%*&&$%----------------*&================'@&$*-)-----------------)%*$&''=============='&&*)----------%$&''============='$*%)-------------------------------------------.", +"......................;+'=============@=>+#;;.......................!!#,>@'=============>,;!!...........!!#+@=================='$**%))------------------))%*$*)--------------)%*&================'$*%)--------------------))%$$&'==============''$%----------%$&@=============='&**)-------------------------------------------.", +"......................#>===============@+#!!..........................;#+>@=============>+#;!...........!!,>===================&*)------------------------)%%%--------------)%%$'================&*)))----------------------)%*&'================&%----------%$&''============='@$*)-------------------------------------------.", +"....................!!,>=============@@>+#;!!!!!!!!!!!!!!!!!!!!!!!!!!!;#,>@=============@+,#!..........!!;,>=================''$*)-------------------------)))--------------)%*$'=============''&$%--------------------------)%$&'===============&*----------)$&'===============''$*%%))---------------------------------------.", +"...................!!;,>=============@>+,#;;;!;!;!;!;!;!;!;!;!;!;!;!;;;#,+@=============@>,#;...........;;+>================''$*%---------------------------)---------------)*$&'============='&$*%-------------------------)-)*&''==============&*)---------%$@''============='=''&$**%%)-------------------------------------.", +"...................!;#+>=============@>,##;;#;;;#;;;#;;;#;;;#;;;#;;#;;###,@=============@@+,;..........!;#+@================'$*%)-------------------------------------------)*$@'============='$%%)----------------------------%$&''============='*%)--------%*&'==================''&$*%))------------------------------------.", +"...................;;,+@=============@>>+++,,++,,++,,++,,++,,++,,+,,+,,,+>@============='@>,;..........!##+@================'$%))-------------------------------------------%$&'==============&*))-----------------------------)*$''============='$%%--------%*&''=================='@&$$$**%%%))------------------------------.", +"...................;#,>@==============@@@>@>@>>@>>@>@>>@>>>@>>>@>@>@>@>@@@===============@@+#..........;#,>@================&*))--------------------------------------------%&'='===========''&*)------------------------------)%*$'============='$*%)-------)*$&'=================='''''&&&$$**%))----------------------------.", +"...................;#+>@===================================================================+#..........;#+>@================&*----------------------------------------------*&=============='@$%-------------------------------))%$'============='&*%)-------)**&'========================='@&$$*%-----------------------------.", +"...................;,+>@===================================================================+#..........;,+>@==============='&%----------------------------------------------*&=============''&$%--------------------------------))*&============='&**)-------)%%$'=========================='@'&$$**))-------------------------.", +"...................;,>@@===================================================================>#..........;,>@'==============''$%----------------------------------------------*&============='&$*)---------------------------------)*&============='&*%)--------)%$&============================''''&&$%)------------------------.", +"...................;+>@====================================================================>#..........;+>@=============='''$%----------------------------------------------%&============='&$%)----------------------------------*&============='&**)----------*&==================================&*%)-----------------------.", +"...................;+>@@===================================================================>#..........;,@@@==============@&*%----------------------------------------------*&============='&*%)----------------------------------*&=============@&$*)----------%$''================================@&**)----------------------.", +"...................;+>@====================================================================>#..........#,>@==============''@$%---------------------------------------------)*&============='$**)----------------------------------*&=============''$*%----------%*$&'==============================='''$*)---------------------.", +"...................;,@@@===================================================================>#..........#,@@'=============''&$)---------------------------------------------)*&============='$*%)----------------------------------*&==============@&$)----------))%$'==================================&$))--------------------.", +"...................#,>@================@=@='=@=@=@=@='=@='=@=@=@='=@='=@='=@='=@='=@=@=@=@'+#..........;,@@==============='&$%--------------------------------------------)-*'============='$*%)----------------------------------*&=============''&$%-----------)%*$&'''=============================='$$%)-------------------.", +"...................;+>@@==============@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#..........#,>@@============='@&$)----------------------------------------------*&============='$*%-----------------------------------*&==============&&*)-------------%%*$$&''============================''&$%-------------------.", +"...................;+>@==============@@@>>@>>@>@>>@>>@>@>>@>>@>@>@>@>@>@>@>@>@>@>@>>@>>@>@>,;..........;+>@==============='&$%----------------------------------------------*&============='$*%)----------------------------------%&============='&&*%--------------))%*$&'===============================$*-------------------.", +"...................;,>@@=============@>+++,+,,,,+,+,+,,,+,+,+,,,,,+,,,+,,,+,,,+,,,+,,+,+,,+#;..........#,>@@============='@&$)----------------------------------------------*&============='&$*)----------------------------------*&=============@&$*)----------------)%*$$&&&'''''=======================&*-------------------.", +"...................;,+>@=============@+###;;#;#;#;;#;#;#;;;#;#;##;;#;#;#;#;#;#;#;#;#;;#;#;;;!..........;,>@===============''$%----------------------------------------------*&============='@$*%---------------------------------)*&============='&$%)---------------)-))%%**$$&&'''======================&*)------------------.", +"...................;#+>@=============>,;!!.............................................................;,>@@==============@'$%----------------------------------------------*&============='@&$)---------------------------------)*&============='&**)----------------------))%*$$''======================&$))-----------------.", +"...................;#+>@=============@+#;!................................................!............;,+>@==============''&%----------------------------------------------%&'=============''$%-------------------------------))%$'============='$*%)-----------------------))%**$$&&'''================='$%))----------------.", +"...................;#,>@=============@>,#;...............................................!!!...........;#+>@================&*)---------------------------------------------%$''==============&*-------------------------------)%*$'============='$*%-------------------------))))%%**$&''================&$%%-----------------.", +"...................!#,>@=============@>+,;...............................................!!!!..........;#,>@================&$))--------------------------------------------%$&''=============&*-------------------------------)*$&'============='$%%)-------------------------------)%*&'================'$*%)----------------.", +"...................!;#+@==============@>,#!...........................!.!!!!!!!!!!!!!!!!!;;!!..........!;#+@================'$*%)-------------------------------------------%*&''============='$%%----------------------------)%$&''=============&$))--------------------------------)%%$&''=============='&*%)----------------.", +"...................!;;,>==============@=+,;!!.......................!.!!;!;!;!;!;!;!;!;;;;;!!..........!;;,>================''$*%-------------------------------------------)*$&'============='&$*)---------------------------)*$'===============&*)----------------------------------))*$&''============='$*%)----------------.", +"....................!;,>================>,;;!.......................!!;;;#;;;#;;;#;;#;;;;;;;!...........!;,>=================@'$%---------------------------)---------------)%$&'============='@&$)--------------------------))$'================&*-------------------------------------)*$&'============='&$%)----------------.", +"....................!!#>@===============@>,#;!.....................;;##,,+,+,,++,,+,,+++,#;!!...........!!#>=================''&*%)-----------------------)%*%)-------------)%%$'==============''$*%)-----------------------%**$'==============''&%--------------))))%))----------------)*$&'============='&*%)----------------.", +".....................!#+@@=============='@>+#;!!..................!;,+>>>>@>@>>@>@>@>>>>+#;!!.............#+@@================='$$*)---------------------)%*$*)--------------))$&================'$*%)--------------------))%$&'==============='&$%--------------%%**$*)----------------)*$&'============='&$%)----------------.", +"......................;+>@@================>,;;!.................!!#+@@=================>,;!..............;,>@@=================@&*%---------------------)*$'$%---------------)*&================'&&*)--------------------))$&================''$*)-------------)%$$&&$%)---------------%*$&'============='$**)----------------.", +"......................;#+@@=============='=@>+##;;!!!!!.....!!;;;##+>'@================@+#!!..............;,+@@================='@&$%%)))-----------)))%**$''$%----------------%&''===============''$$%%))------------)))%*$$@================'&**)-------------%*&&&@&$*%%)))--------))%$&''============='$*%-----------------.", +"......................;##+@================@@>>+,##;;!!!..!!;;##,+>>@================@@>,#................!##+@=================='''&$*%%))-------))%%*$$&''=&*----------------%$&''=============='''&&$*%%))------)))%%*$$&'================='$%)--------------*$'''=''&$*%%))-------)%$&'==============='$%%-----------------.", +"......................!;;+>===================@@>+,##;;!!.!;;#,+>@===================@>+#;................!;;+>======================'$$*%))------)%**$&'====&%----------------)*$&'===================@$*%%))-----))%**$&'===================&*)-------------)-*&=======@$$*%))-----)%*$'================'*))-----------------.", +"......................!!;#>@===================@@>++,,,,###,,++>@@===================>+,;;................!!;#>@@====================''$$$$***%****$$&&@=====&*----------------)%*&'==================='&&$$$*******$*$&&@'=================''$%--------------)%$'=======''$$$$*******$$''================&*))-----------------.", +".......................!!#+>@@================'=@@@@@@>>>>>>@@@@@@================='=>,;;!.................!!;,+@@===================='''&'&&&&&&'&&''''=====&%-----------------))$&===================='''&'&&&&&&&&'''''=================''&*%-------------)%*$'========'''''&&&&&&&'''=================&*-------------------.", +".........................;#+@@=====================================================@@>#!!....................;#,>@===========================================&*-----------------)-*&======================================================='&**)-------------)*$&'========================================&*-------------------.", +".........................!#,+>====================================================@>>,;!.....................!;#,>@'=========================================&%-------------------%*&''==================================================='&$*))-------------%$&''=====================================''@$%-------------------.", +".........................!!;,>@@==================================================@+,#;.......................!!#+@@@========================================&*-------------------)%*&'==================================================''&*))--------------%$'=======================================''$*%-------------------.", +"............................;+@@================================================@=>,;!!.........................;,+@@========================================&%--------------------))*&==================================================@&*%---------------)*&========================================'&$%)-------------------.", +"............................;#+>@@=============================================@@>,#!!..........................!##+>@=======================================&*---------------------)%$''==============================================''&$*)--------------))$&======================================''&$%))-------------------.", +"............................;;#+>@@============================================@>,#;.!..........................!;;#+>@@=====================================&%----------------------)**&'============================================''$*%)--------------))%$'======================================'&$*))--------------------.", +".............................!!#+@@===========================================@>,;;!...............................;#+>@=====================================&*----------------------))%$&===========================================''@$%----------------)%*$'====================================='&$%)----------------------.", +".!............................!;,+>>@@=====================================@@>>+#;!................................!;#,>>@@'=================================&%-----------------------))**&'''=====================================''&$**)----------------))%*$&'''===============================''&$*%)----------------------.", +".!!............................!;;,+>@@===================================@@>+,#;!!................................!;;##++>@@================================&*------------------------))**$&''===================================''&$*%))-----------------))%*$$&''=============================''&**))-----------------------.", +".;!...............................;#+>@===================================@>+#!!......................................!;;,+@@'===============================&%---------------------------)%$@''=================================='&**)-----------------------)%*$@''============================'$$%)-------------------------.", +".#;...............................!;,,+>@@@===========================@@>>++#;!!......................................!!;##,+>>@@@@@=@=@='===================&*---------------------------)%**&&'''==========================''''&$**))------------------------)%*$$&&'''''='============='''''&&$**))-------------------------.", +".,;...............................!!;##,++>@@=======================@@@>+,#;;!!.........................................!!;###,,+>>>@@@@@@@@=================&%----------------------------))%**$&&''=======================''&$$**%))--------------------------))%%***$&&''''''========='''&$$**%%))--------------------------.", +".+#...................................!!#,+@@=======================@@+,#;!.................................................!!;##,++>>>>>>@@@================&*-------------------------------))%*$&@'======================'&$*%------------------------------------))**$&&@'''=======''@'$$*%)-------------------------------.", +".>#;!.................................!!;#,,+>>>>@@@@@@@@@@@@@@@@>>>++,#;;!..................................................!!;;###,,,++,,>@================&%--------------------------------)%**$$&&'&'''''''''''''''&&&&$$*%)-------------------------------------)%%***$$$$&&&&&&&&&$$**%))-------------------------------.", +".>+#;!.................................!!!;;##,,++>>>>>>>>>>>>+++,,###;!!!...................................................!.!!;;;;;#;;#;+>================&*---------------------------------)))%%***$$$$&&&&&&&&&$$$$***%))))--------------------------------------))%%%%%%*%******%%%%%)))--------------------------------.", +".@+,#;........................................!;##,++++++++++,,##;;!.......................................................................#>================&%----------------------------------------)%%***********$**%))----------------------------------------------------------------------------------------------------.", +".@@+,;!!......................................!;;##############;;!!!.......................................................................#>================&*----------------------------------------)))%%**%**%**%%%)))----------------------------------------------------------------------------------------------------).", +".=@@+,;!!......................................!!!;;;;;;;;;;;;!;!!!........................................................................#>================&%------------------------------------------))))))))))))))))----------------------------------------------------------------------------------------------------)).", +".===@+#;!..................................................................................................................................#>================&*-------------------------------------------------------------------------------------------------------------------------------------------------------------)%%.", +".===@>,,;!.................................................................................................................................#>================&%-------------------------------------------------------------------------------------------------------------------------------------------------------------%*$.", +".==='@>+#;!!...............................................................................................................................#>================&*-----------------------------------------------------------------------------------------------------------------------------------------------------------)%*$'.", +".======>,;;!...............................................................................................................................#>================&%----------------------------------------------------------------------------------------------------------------------------------------------------------)%%$'=.", +".======@>,#;;!.............................................................................................................................#>================&*---------------------------------------------------------------------------------------------------------------------------------------------------------)%*$&'=.", +".======@@@+,#;!............................................................................................................................#>================&%-------------------------------------------------------------------------------------------------------------------------------------------------------))%*$''==.", +".=========@>,#!............................................................................................................................#>================&*-------------------------------------------------------------------------------------------------------------------------------------------------------)%*&'====.", +".=========@>++##;!!........................................................................................................................#>================&%----------------------------------------------------------------------------------------------------------------------------------------------------))%*$$&'====.", +".==========@@>>+,#;!!......................................................................................................................#>================&*--------------------------------------------------------------------------------------------------------------------------------------------------))%$$$&''=====.", +".=============@@+,;;!......................................................................................................................#>================&%-------------------------------------------------------------------------------------------------------------------------------------------------))%*&''========.", +".=============@@>>,,##;;;!!!!.!............................................................................................................#>================&*--------------------------------------------------------------------------------------------------------------------------------------------)))%%**$$''=========.", +".===============@@>>+++,##;!;!!!...........................................................................................................#>================&%-----------------------------------------------------------------------------------------------------------------------------------------)))%%**$$&''''=========.", +".====================@@++,#;;;!!!..........................................................................................................#>================&*---------------------------------------------------------------------------------------------------------------------------------------))))%*$$&@'==============.", +".===================@=@@>>++,,,,###########################################################################################################+@================'$*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%*%******$$$&&'='==============.", +".=====================@@@@@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>@================''&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&'''''================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================.", +".==============================================================================================================================================================================================================================================================================================================================."};
--- a/packages/hal/arm/sa11x0/assabet/current/misc/lcd_test.c +++ b/packages/hal/arm/sa11x0/assabet/current/misc/lcd_test.c @@ -50,9 +50,12 @@ #include <cyg/hal/hal_cache.h> #include "eCos.xpm" +#include "eCos2.xpm" #include "redhat.xpm" +#include "redhat2.xpm" #include "redboot.xpm" #include "escw.xpm" +#include "logo.xpm" #ifndef FALSE #define FALSE 0 @@ -64,18 +67,6 @@ static char stack[STACK_SIZE]; static cyg_thread thread_data; static cyg_handle_t thread_handle; -static struct lcd_frame { - unsigned short palette[16]; - unsigned short pixels[240][320]; - unsigned char pad[256]; -} lcd_frame_buffer; - -#define RGB_RED(x) (((x)&0x1F)<<11) -#define RGB_GREEN(x) (((x)&0x3F)<<5) -#define RGB_BLUE(x) ((x)&0x1F) - -static volatile struct lcd_frame *fp; - // FUNCTIONS static void @@ -84,522 +75,6 @@ cyg_test_exit(void) while (TRUE) ; } -static int -_hexdigit(char c) -{ - if ((c >= '0') && (c <= '9')) { - return c - '0'; - } else - if ((c >= 'A') && (c <= 'F')) { - return (c - 'A') + 0x0A; - } else - if ((c >= 'a') && (c <= 'f')) { - return (c - 'a') + 0x0a; - } -} - -static int -_hex(char *cp) -{ - return (_hexdigit(*cp)<<4) | _hexdigit(*(cp+1)); -} - -static unsigned short -parse_color(char *cp) -{ - int red, green, blue; - - if (*cp == '#') { - red = _hex(cp+1); - green = _hex(cp+3); - blue = _hex(cp+5); - return RGB_RED(red>>3) | RGB_GREEN(green>>2) | RGB_BLUE(blue>>3); - } else { - // Should be "None" - return 0xFFFF; - } -} - -static void -show_xpm(char *xpm[]) -{ - int i, row, col; - char *cp; - int nrows, ncols, nclrs; - unsigned short colors[256]; // Mapped by character index - - cp = xpm[0]; - if (sscanf(cp, "%d %d %d", &ncols, &nrows, &nclrs) != 3) { - diag_printf("Can't parse XPM data, sorry\n"); - return; - } - diag_printf("%d rows, %d cols, %d colors\n", nrows, ncols, nclrs); - - for (i = 0; i < 256; i++) { - colors[i] = 0x0000; - } - for (i = 0; i < nclrs; i++) { - cp = xpm[i+1]; - colors[(unsigned int)*cp] = parse_color(&cp[4]); -// printf("Color[%c] = %x\n", *cp, colors[(unsigned int)*cp]); - } - - for (row = 0; row < nrows; row++) { - cp = xpm[nclrs+1+row]; - for (col = 0; col < ncols; col++) { - fp->pixels[row][col] = colors[(unsigned int)*cp++]; - } - } - cyg_thread_delay(100); -} - - -// 8x8 Font - from Helios - -#define FIRST_CHAR 0x20 -#define LAST_CHAR 0x7E -#define FONT_HEIGHT 8 -#define FONT_WIDTH 8 -#define CURSOR_ON 0x5F -#define CURSOR_OFF 0x20 -static char font_table[LAST_CHAR-FIRST_CHAR+1][8] = -{ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* */ - { 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00 }, /* ! */ - { 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* " */ - { 0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00 }, /* # */ - { 0x30, 0xFC, 0x16, 0x7C, 0xD0, 0x7E, 0x18, 0x00 }, /* $ */ - { 0x06, 0x66, 0x30, 0x18, 0x0C, 0x66, 0x60, 0x00 }, /* % */ - { 0x1C, 0x36, 0x36, 0x1C, 0xB6, 0x66, 0xDC, 0x00 }, /* & */ - { 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ' */ - { 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00 }, /* ( */ - { 0x0C, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0C, 0x00 }, /* ) */ - { 0x00, 0x18, 0x7E, 0x3C, 0x7E, 0x18, 0x00, 0x00 }, /* * */ - { 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00 }, /* + */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x0C }, /* , */ - { 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00 }, /* - */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00 }, /* . */ - { 0x00, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x00, 0x00 }, /* / */ - { 0x3C, 0x66, 0x76, 0x7E, 0x6E, 0x66, 0x3C, 0x00 }, /* 0 */ - { 0x18, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00 }, /* 1 */ - { 0x3C, 0x66, 0x60, 0x30, 0x18, 0x0C, 0x7E, 0x00 }, /* 2 */ - { 0x3C, 0x66, 0x60, 0x38, 0x60, 0x66, 0x3C, 0x00 }, /* 3 */ - { 0x30, 0x38, 0x3C, 0x36, 0x7E, 0x30, 0x30, 0x00 }, /* 4 */ - { 0x7E, 0x06, 0x3E, 0x60, 0x60, 0x66, 0x3C, 0x00 }, /* 5 */ - { 0x38, 0x0C, 0x06, 0x3E, 0x66, 0x66, 0x3C, 0x00 }, /* 6 */ - { 0x7E, 0x60, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x00 }, /* 7 */ - { 0x3C, 0x66, 0x66, 0x3C, 0x66, 0x66, 0x3C, 0x00 }, /* 8 */ - { 0x3C, 0x66, 0x66, 0x7C, 0x60, 0x30, 0x1C, 0x00 }, /* 9 */ - { 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00 }, /* : */ - { 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x0C }, /* ; */ - { 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00 }, /* < */ - { 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00 }, /* = */ - { 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00 }, /* > */ - { 0x3C, 0x66, 0x30, 0x18, 0x18, 0x00, 0x18, 0x00 }, /* ? */ - { 0x3C, 0x66, 0x76, 0x56, 0x76, 0x06, 0x3C, 0x00 }, /* @ */ - { 0x3C, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00 }, /* A */ - { 0x3E, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3E, 0x00 }, /* B */ - { 0x3C, 0x66, 0x06, 0x06, 0x06, 0x66, 0x3C, 0x00 }, /* C */ - { 0x1E, 0x36, 0x66, 0x66, 0x66, 0x36, 0x1E, 0x00 }, /* D */ - { 0x7E, 0x06, 0x06, 0x3E, 0x06, 0x06, 0x7E, 0x00 }, /* E */ - { 0x7E, 0x06, 0x06, 0x3E, 0x06, 0x06, 0x06, 0x00 }, /* F */ - { 0x3C, 0x66, 0x06, 0x76, 0x66, 0x66, 0x3C, 0x00 }, /* G */ - { 0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00 }, /* H */ - { 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00 }, /* I */ - { 0x7C, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1C, 0x00 }, /* J */ - { 0x66, 0x36, 0x1E, 0x0E, 0x1E, 0x36, 0x66, 0x00 }, /* K */ - { 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x7E, 0x00 }, /* L */ - { 0xC6, 0xEE, 0xFE, 0xD6, 0xD6, 0xC6, 0xC6, 0x00 }, /* M */ - { 0x66, 0x66, 0x6E, 0x7E, 0x76, 0x66, 0x66, 0x00 }, /* N */ - { 0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00 }, /* O */ - { 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x06, 0x00 }, /* P */ - { 0x3C, 0x66, 0x66, 0x66, 0x56, 0x36, 0x6C, 0x00 }, /* Q */ - { 0x3E, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x66, 0x00 }, /* R */ - { 0x3C, 0x66, 0x06, 0x3C, 0x60, 0x66, 0x3C, 0x00 }, /* S */ - { 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00 }, /* T */ - { 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00 }, /* U */ - { 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00 }, /* V */ - { 0xC6, 0xC6, 0xD6, 0xD6, 0xFE, 0xEE, 0xC6, 0x00 }, /* W */ - { 0x66, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x66, 0x00 }, /* X */ - { 0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x00 }, /* Y */ - { 0x7E, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x7E, 0x00 }, /* Z */ - { 0x3E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x3E, 0x00 }, /* [ */ - { 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00, 0x00 }, /* \ */ - { 0x7C, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7C, 0x00 }, /* ] */ - { 0x3C, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ^ */ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF }, /* _ */ - { 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ` */ - { 0x00, 0x00, 0x3C, 0x60, 0x7C, 0x66, 0x7C, 0x00 }, /* a */ - { 0x06, 0x06, 0x3E, 0x66, 0x66, 0x66, 0x3E, 0x00 }, /* b */ - { 0x00, 0x00, 0x3C, 0x66, 0x06, 0x66, 0x3C, 0x00 }, /* c */ - { 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x7C, 0x00 }, /* d */ - { 0x00, 0x00, 0x3C, 0x66, 0x7E, 0x06, 0x3C, 0x00 }, /* e */ - { 0x38, 0x0C, 0x0C, 0x3E, 0x0C, 0x0C, 0x0C, 0x00 }, /* f */ - { 0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x3C }, /* g */ - { 0x06, 0x06, 0x3E, 0x66, 0x66, 0x66, 0x66, 0x00 }, /* h */ - { 0x18, 0x00, 0x1C, 0x18, 0x18, 0x18, 0x3C, 0x00 }, /* i */ - { 0x18, 0x00, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x0E }, /* j */ - { 0x06, 0x06, 0x66, 0x36, 0x1E, 0x36, 0x66, 0x00 }, /* k */ - { 0x1C, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00 }, /* l */ - { 0x00, 0x00, 0x6C, 0xFE, 0xD6, 0xD6, 0xC6, 0x00 }, /* m */ - { 0x00, 0x00, 0x3E, 0x66, 0x66, 0x66, 0x66, 0x00 }, /* n */ - { 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00 }, /* o */ - { 0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x06 }, /* p */ - { 0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0xE0 }, /* q */ - { 0x00, 0x00, 0x36, 0x6E, 0x06, 0x06, 0x06, 0x00 }, /* r */ - { 0x00, 0x00, 0x7C, 0x06, 0x3C, 0x60, 0x3E, 0x00 }, /* s */ - { 0x0C, 0x0C, 0x3E, 0x0C, 0x0C, 0x0C, 0x38, 0x00 }, /* t */ - { 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x00 }, /* u */ - { 0x00, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00 }, /* v */ - { 0x00, 0x00, 0xC6, 0xD6, 0xD6, 0xFE, 0x6C, 0x00 }, /* w */ - { 0x00, 0x00, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x00 }, /* x */ - { 0x00, 0x00, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x3C }, /* y */ - { 0x00, 0x00, 0x7E, 0x30, 0x18, 0x0C, 0x7E, 0x00 }, /* z */ - { 0x30, 0x18, 0x18, 0x0E, 0x18, 0x18, 0x30, 0x00 }, /* { */ - { 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00 }, /* | */ - { 0x0C, 0x18, 0x18, 0x70, 0x18, 0x18, 0x0C, 0x00 }, /* } */ - { 0x8C, 0xD6, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00 } /* ~ */ -}; - -#define LCD_WIDTH 320 -#define LCD_HEIGHT 240 -#define LCD_DEPTH 16 - -// This can be 1 or 2 -#define SCREEN_SCALE 2 -#define NIBBLES_PER_PIXEL (1*SCREEN_SCALE) -#define PIXELS_PER_BYTE (2/NIBBLES_PER_PIXEL) -#define PIXEL_MASK ((1<<PIXELS_PER_BYTE)-1) - -// Physical screen info -static int lcd_depth = LCD_DEPTH; // Should be 1, 2, or 4 -static int lcd_width = LCD_WIDTH; -static int lcd_height = LCD_HEIGHT; - -// Virtual screen info -static int curX = 0; // Last used position -static int curY = 0; -static int width = LCD_WIDTH / (FONT_WIDTH*NIBBLES_PER_PIXEL); -static int height = LCD_HEIGHT / (FONT_HEIGHT*SCREEN_SCALE); -static int fg = RGB_RED(0) | RGB_GREEN(0) | RGB_BLUE(0); -static int bg = RGB_RED(31) | RGB_GREEN(63) | RGB_BLUE(31); -#define SCREEN_WIDTH (LCD_WIDTH/FONT_WIDTH) -#define SCREEN_HEIGHT (LCD_HEIGHT/FONT_HEIGHT) -static char screen[SCREEN_HEIGHT][SCREEN_WIDTH]; - -// Functions -static void lcd_drawc(cyg_int8 c, int x, int y); - -void -lcd_init(int depth) -{ - // Currently only color/16bpp supported - - unsigned long _fp; - - // Frame buffer must be aligned on a 16 byte boundary - _fp = (((unsigned long)&lcd_frame_buffer) + 15) & ~15; - fp = (struct lcd_frame *)(_fp + SA11X0_RAM_BANK0_BASE); - // Enable LCD in 320x240 16bpp - *SA1110_DBAR1 = (unsigned long)&(fp->palette); - *SA1110_LCCR1 = 0x1D1D0930; - *SA1110_LCCR2 = 0xEF; - *SA1110_LCCR3 = 0x0c; - fp->palette[0] = 0x2000; // Tell controller 16 bits -// *SA1110_LCCR0 = 0xBB; // B&W - *SA1110_LCCR0 = 0xB9; // Color -// assabet_BCR(SA1110_BCR_LCD_BPP, SA1110_BCR_LCD_12BPP); - assabet_BCR(SA1110_BCR_LCD_BPP, SA1110_BCR_LCD_16BPP); - assabet_BCR(SA1110_BCR_LCD, SA1110_BCR_LCD_ON); - assabet_BCR(SA1110_BCR_BACKLIGHT, SA1110_BCR_BACKLIGHT); -} - -// Clear screen -void -lcd_clear(void) -{ - int row, col; - for (row = 0; row < lcd_height; row++) { - for (col = 0; col < lcd_width; col++) { - fp->pixels[row][col] = bg; - } - } - for (row = 0; row < SCREEN_HEIGHT; row++) { - for (col = 0; col < SCREEN_WIDTH; col++) { - screen[row][col] = ' '; - } - } - // Note: Row 0 seems to wrap incorrectly - curX = 0; curY = 1; - lcd_drawc(CURSOR_ON, curX, curY); -} - -// Position cursor -void -lcd_moveto(int X, int Y) -{ - lcd_drawc(CURSOR_OFF, curX, curY); - if (X < 0) X = 0; - if (X >= SCREEN_WIDTH) X = SCREEN_WIDTH-1; - curX = X; -// if (Y < 0) Y = 0; - if (Y < 1) Y = 1; - if (Y >= SCREEN_HEIGHT) Y = SCREEN_HEIGHT-1; - curY = Y; - lcd_drawc(CURSOR_ON, curX, curY); -} - -// Render a character at position (X,Y) with current background/foreground -static void -lcd_drawc(cyg_int8 c, int x, int y) -{ - // Currently hard-coded for 16bpp - cyg_uint8 bits; - cyg_uint16 *pixels; - int l, p, w; - - screen[curY][curX] = c; - for (l = 0; l < FONT_HEIGHT; l++) { - bits = font_table[c-FIRST_CHAR][l]; - pixels = &fp->pixels[curY*FONT_HEIGHT+l][curX*FONT_WIDTH]; - for (p = 0; p < 8; p++) { - if (bits & 0x01) { - *pixels++ = fg; - } else { - *pixels++ = bg; - } - bits >>= 1; - } - } -} - -static void -lcd_scroll(void) -{ - int row, col; - cyg_uint8 *c1, *c2; - cyg_uint16 *p1, *p2; - - // First scroll up the virtual screen - for (row = 1; row < SCREEN_HEIGHT; row++) { - c1 = &screen[row-1][0]; - c2 = &screen[row][0]; - for (col = 0; col < SCREEN_WIDTH; col++) { - *c1++ = *c2++; - } - } - c1 = &screen[SCREEN_HEIGHT-1][0]; - for (col = 0; col < SCREEN_WIDTH; col++) { - *c1++ = 0x20; - } - // Now the physical screen - for (row = FONT_HEIGHT*2; row < LCD_HEIGHT; row++) { - p1 = &fp->pixels[row-FONT_HEIGHT][0]; - p2 = &fp->pixels[row][0]; - for (col = 0; col < LCD_WIDTH; col++) { - *p1++ = *p2++; - } - } - for (row = LCD_HEIGHT-FONT_HEIGHT; row < LCD_HEIGHT; row++) { - p1 = &fp->pixels[row][0]; - for (col = 0; col < LCD_WIDTH; col++) { - *p1++ = bg; - } - } -} - -// Draw one character at the current position -void -lcd_putc(cyg_int8 c) -{ - lcd_drawc(CURSOR_OFF, curX, curY); - switch (c) { - case '\r': - curX = 0; - break; - case '\n': - curY++; - if (curY == SCREEN_HEIGHT) { - lcd_scroll(); - curY--; - } - break; - case '\b': - curX--; - if (curX < 0) { - curY--; - if (curY < 0) curY = 0; - curX = SCREEN_WIDTH-1; - } - break; - default: - lcd_drawc(c, curX, curY); - curX++; - if (curX == SCREEN_WIDTH) { - curY++; - curX = 0; - } - } - lcd_drawc(CURSOR_ON, curX, curY); -} - -// Basic LCD 'printf()' support - -#ifndef FALSE -#define FALSE 0 -#define TRUE 1 -#endif - -#include <stdarg.h> - -#define is_digit(c) ((c >= '0') && (c <= '9')) - -static int -_cvt(unsigned long val, char *buf, long radix, char *digits) -{ - char temp[80]; - char *cp = temp; - int length = 0; - if (val == 0) { - /* Special case */ - *cp++ = '0'; - } else { - while (val) { - *cp++ = digits[val % radix]; - val /= radix; - } - } - while (cp != temp) { - *buf++ = *--cp; - length++; - } - *buf = '\0'; - return (length); -} - -int -lcd_vprintf(void (*putc)(cyg_int8), const char *fmt0, va_list ap) -{ - char c, sign, *cp; - int left_prec, right_prec, zero_fill, length, pad, pad_on_right; - char buf[32]; - long val; - while ((c = *fmt0++)) { - cp = buf; - length = 0; - if (c == '%') { - c = *fmt0++; - left_prec = right_prec = pad_on_right = 0; - if (c == '-') { - c = *fmt0++; - pad_on_right++; - } - if (c == '0') { - zero_fill = TRUE; - c = *fmt0++; - } else { - zero_fill = FALSE; - } - while (is_digit(c)) { - left_prec = (left_prec * 10) + (c - '0'); - c = *fmt0++; - } - if (c == '.') { - c = *fmt0++; - zero_fill++; - while (is_digit(c)) { - right_prec = (right_prec * 10) + (c - '0'); - c = *fmt0++; - } - } else { - right_prec = left_prec; - } - sign = '\0'; - switch (c) { - case 'd': - case 'x': - case 'X': - val = va_arg(ap, long); - switch (c) { - case 'd': - if (val < 0) { - sign = '-'; - val = -val; - } - length = _cvt(val, buf, 10, "0123456789"); - break; - case 'x': - length = _cvt(val, buf, 16, "0123456789abcdef"); - break; - case 'X': - length = _cvt(val, buf, 16, "0123456789ABCDEF"); - break; - } - break; - case 's': - cp = va_arg(ap, char *); - length = strlen(cp); - break; - case 'c': - c = va_arg(ap, long /*char*/); - (*putc)(c); - continue; - default: - (*putc)('?'); - } - pad = left_prec - length; - if (sign != '\0') { - pad--; - } - if (zero_fill) { - c = '0'; - if (sign != '\0') { - (*putc)(sign); - sign = '\0'; - } - } else { - c = ' '; - } - if (!pad_on_right) { - while (pad-- > 0) { - (*putc)(c); - } - } - if (sign != '\0') { - (*putc)(sign); - } - while (length-- > 0) { - (*putc)(c = *cp++); - if (c == '\n') { - (*putc)('\r'); - } - } - if (pad_on_right) { - while (pad-- > 0) { - (*putc)(' '); - } - } - } else { - (*putc)(c); - if (c == '\n') { - (*putc)('\r'); - } - } - } -} - -int -lcd_printf(char const *fmt, ...) -{ - int ret; - va_list ap; - - va_start(ap, fmt); - ret = lcd_vprintf(lcd_putc, fmt, ap); - va_end(ap); - return (ret); -} - static void lcd_test(cyg_addrword_t p) { @@ -778,11 +253,34 @@ lcd_test(cyg_addrword_t p) } #endif + while (true) { for (i = 0; i < 1; i++) { + show_xpm(redboot_xpm); + cyg_thread_delay(15); show_xpm(eCos_xpm); + cyg_thread_delay(25); + show_xpm(redboot_xpm); + cyg_thread_delay(15); show_xpm(redhat_xpm); + cyg_thread_delay(25); show_xpm(redboot_xpm); + cyg_thread_delay(25); + show_xpm(redboot_xpm); + cyg_thread_delay(15); show_xpm(escw_xpm); + cyg_thread_delay(25); + show_xpm(redboot_xpm); + cyg_thread_delay(15); + show_xpm(eCos2_xpm); + cyg_thread_delay(25); + show_xpm(redboot_xpm); + cyg_thread_delay(15); + show_xpm(redhat2_xpm); + cyg_thread_delay(25); + show_xpm(logo_xpm); + cyg_thread_delay(25); + show_xpm(redboot_xpm); + cyg_thread_delay(50); } #if 0 @@ -792,19 +290,27 @@ lcd_test(cyg_addrword_t p) assabet_BCR(SA1110_BCR_MOTOR, SA1110_BCR_MOTOR_OFF); #endif + show_xpm(redboot_xpm); + cyg_thread_delay(15); lcd_clear(); lcd_printf("\n\n**** Hello world!\n"); - cyg_thread_delay(200); - for (i = 0; i < 132; i++) { + cyg_thread_delay(5); + for (i = 0; i < 64; i++) { lcd_printf("... testing line #%d\n", i); } - cyg_thread_delay(200); - bg = RGB_RED(0) | RGB_GREEN(0) | RGB_BLUE(0); - fg = RGB_RED(31) | RGB_GREEN(63) | RGB_BLUE(0); - for (i = 0; i < 132; i++) { + cyg_thread_delay(50); + + show_xpm(redboot_xpm); + cyg_thread_delay(15); + set_bg(0,0,0); + set_fg(31,63,0); + lcd_clear(); + for (i = 0; i < 32; i++) { lcd_printf("... testing line #%d\n", i); } - cyg_thread_delay(200); + cyg_thread_delay(50); + } // while + lcd_clear(); lcd_printf("*****"); cyg_thread_delay(200);
new file mode 100644 --- /dev/null +++ b/packages/hal/arm/sa11x0/assabet/current/misc/logo.xpm @@ -0,0 +1,260 @@ +/* XPM */ +static char * logo_xpm[] = { +"320 240 17 1", +" c None", +". c #030305", +"+ c #949394", +"@ c #D3D0D3", +"# c #525051", +"$ c #B7B6B8", +"% c #E2515E", +"& c #FEFEFC", +"* c #820204", +"= c #737073", +"- c #E33533", +"; c #343232", +"> c #E895AE", +", c #E51604", +"' c #E67284", +") c #EABAD4", +"! c #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&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"................................................................................................................................................................................................................................................................................................................................", +".................................*..............................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"..................................!...................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"..................................!...................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +".....................!=+@&&&&&&$+=!...................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"...................#$&&$+=#;##=+@&&$#.................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +".................;$&$=!..........!#@&$;...............................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"...............!+&$#................#$&+..............................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+=;#...................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-%%>&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"..............;@&=....................=&@!............................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&#........................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'&&&&&&&&&&&&&&&&&&&&&&&&&&", +".............;&$;.....****!!*****!.....;$@;..................................................................!!!!!!...................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+!.........................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>&&&&&&&&&&&&&&&&&&&&&&&&", +"............;@@!.....*,,,*,*,*...**.....!@@!.................................................................#@@=#!...................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&=...........................................&&&&&&,,,-,,-,,-,,-,,-,,-,,-,,-,,-,,-,,-,,-,,-,,-,,,,,,,,,'&&&&&&&&&&&&&&&&&&&&&&&", +"...........!@@!.....*,,*,,,,,**..*,......!@@.................................................................#&&&&+!.!!!!.............................................&&&&&&&&&&&&&&&&&&&&&&&&&&&#............................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-,,,,,,,'&&&&&&&&&&&&&&&&&&&&&&", +"...........$&;......***,,,*,,,****,*......;&+...............................................................!#&&&&@..!$+!.............................................&&&&&&&&&&&&&&&&&&&&&&&&&&+...............;;;;..........................&&&&&&-,,,,,,,,,,,,,,--%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>&&&&&&&&&&&&&&&&&&&&&", +"..........#&;.......,*.....*,*,,,,,*.......=&;...............................................................#&&&&$!..&&=!.............................!!!............&&&&&&&&&&&&&&&&&&&&&&&&&@!............#+&&&&&&@=!..................;===&&&&&&,,,,-,,,-,,,')&&&&&&>%,,,-,,,-,,,-,,'>@&&))'-,,,-,,,,,,&&&&&&&&&&&&&&&&&&&&&", +"..........@$........,*...!**,,*,*,,,*.......$$..............................................................!#&&&&@..!@&=.............................!#$=............&&&&&&&&&&&&&&&&&&&&&&&&&=...........;@&&&&&&&&&&&+..............!=&&&&&&&&&&&,,,,,,,,,-'&&&&&&&&&&&)%,,,,,,,,,,-)&&&&&&&&&)%,,,,,,,,'&&&&&&&&&&&&&&&&&&&&", +".........=&;.......!*,**,*,,*,,,,,*,,.......;&#..........................!...!..........!....................#&&&&$!..&&=!...!..............!!!........@&+!!..........&&&&&&&&&&&&&&&&&&&&&&&&&...........=&&&&&&&&&&&&&&$!...........#&&&&&&&&&&&&&,,-,,,,,,)&&&&&&&&&&&&&&%,,,,,-,,-&&&&&&&&&&&&%,,,,,,,,,&&&&&&&&&&&&&&&&&&&&", +".........@+....!***!,*,,,*,,,,,*,,,*,!.......$$......................!!!!!!!!!!!...!.!!!!!!............!!!!!!#&&&&@..!@&=!!!!!!!.......!.!!!.!!!!...!!!@&+!!!!........&&&&&&&&&&&&&&&&&&&&&&&&+..........+&&&&&&&&&&&&&&&&@!.........#&&&&&&&&&&&&&&,,,,-,,,)&&&&&&&&&&&&&&&&'-,,,,,,)&&&&&&&&&&&@,,,,-,,,,,>&&&&&&&&&&&&&&&&&&&", +"........;&#..*,*,,,..*,*,,,*,*,,,*,,,*.......#&;.....................#===;!!+$$#!..!!#+$$$+#!........!#+$$$=!#&&&&$!..&&=!!;=+=#!!.....!!!#=++=;.!.!!#!&&+;;;;!.......&&&&&&&&&&&&&&&&&&&&&&&&=.........#&&&&&&&&&&&&&&&&&&$........#&&&&&&&&&&&&&&&,,,,,,,)&&&&&&&&&&&&&&&&&&%,,,,,%&&&&&&&&&&&&-,-,,,,,,,,'&&&&&&&&&&&&&&&&&&&", +"........=&...,,,,*,*...**,,,,,*,,,,*,*........&=....................!@&&&=;@&&&+.!!#@&&&&&&&$;.....!!$&&&&&&@=@&&&@..!@&=!$&&&&&$#!...!!+@&&&&&@=!.!$&@&&&@&&@........&&&&&&&&&&&&&&&&&&&&&&&&;........!&&&&&&&=;...#$&&&&&&#......!&&&&&&&&@'''>@&&,,,,,,'&&&&&&&)'''>&&&&&&&&,,,,,'&&&&&)-,,%)),,,,,,,,-,,-&&&&&&&&&&&&&&&&&&&", +"........$$...,*,,,,*!......*,,,*,*,,,****.....$$.....................@&&&+@&&&&=!!#&&&&&&&&&&@!....;@&&&&&&&&&&&&&$!..&&#@&&@$@&&@#!...=&&@@$$&&&=!.$&@&&&@&&@........&&&&&&&&&&&&&&&&&&&&&&&&;........+&&&&&@!.......#&&&&&@......+&&&&&&&',,,,,,'&,,,,-,&&&&&&&-,,,,,,>&&&&&&',-,,)&&&&&%,,,,,-,,,,,-,,,,,%&&&&&&&&&&&&&&&&&&&", +"........&=...**,*,,,,*......*,,,,,,*,*,*,,....+@.....................@&&&@&&&&&+!;&&&&&@@&&&&&@....@&&&&&&&&&&&&&&@...&&@&$!...#&&@....#@=....!$&@..!;.@&+.;!;........&&&&&&&&&&&&&&&&&&&&&&&&.........&&&&&@!.........+&&&&&#....!&&&&&&&-,,,,,,,,',,,,,%&&&&&&-,,,,,,,,'&&&&&&,,,,)&&&&&>,,,,,,,,,,,,,,,,,-&&&&&&&&&&&&&&&&&&&", +".......;&#....*,,,*,*,,**....*,*,*,,,*,,,*,...#&.....................@&&&&&&&@&=!@&&&&=!.;@&&&&#!.+&&&&&@==$@&&&&&$!..@&&+......#&&=!...........&&+....&&+!...........&&&&&&&&&&&&&&&&&&&&&&&&........#&&&&&=;;;;#;;;#;#&&&&&+....#&&&&&&',,,,,,,,,,,,,,,>&&&&&%,,,,,,,,,,)&&&&&-,,,)&&&&&&@'-,,,,-,,,,,,,,,%&&&&&&&&&&&&&&&&&&&", +".......;&#.....*,,,,*,,*,,**!*,,,,*,,,*,,,,*..;&;....................@&&&&&@=;;.#&&&&=!....&&&&$.!@&&&&$....#&&&&&@..!&&@........@&$.........!.!$&$....@&+............&&&&&&&&&&&&&&&&&&&&&&&&........+&&&&&&&&&&&&&&&&&&&&&&&....+&&&&&&,,,,,,,,,,,-,,,,&&&&&@,,,,,,,,,,,%&&&&&>,,,'&&&&&&&&&)',,,,,,,,-,,,-&&&&&&&&&&&&&&&&&&&", +".......#&;......**,,,,*,,*,,,*,,*,,,*,,,*,**..#&;....................@&&&&@.....@&&&@!!!!!!$&&&@!#&&&&@;.....+&&&&$!..@&+!.......+&@!.....!!!!!!+&@....&&+!...........&&&&&&&&&&&&&&&&&&&&&&&&........$&&&&&&&&&&&&&&&&&&&&&&&....$&&&&&),,,,-,,,,,,,,,-,&&&&&',,,,,,,,,,,,&&&&&',,-,&&&&&&&&&&&&-,-,,-,,,,,%&&&&&&&&&&&&&&&&&&&", +".......;&;........**,,,,,,*,,*,,,*,,,*,,,,,...#&#....................@&&&&=.....@&&&@++$+$+@&&&&!+&&&&$.....!#&&&&@..!&&=........+&@....!!!;=+$$@&@....@&+............&&&&&&&&&&&&&&&&&&&&&&&&........$&&&&&&&&&&&&&&&&&&&&&&&....$&&&&&),,,,,,-,,,,,,,,-&&&&&'-,,-,,-,,,,,&&&&&),,,,%&&&&&&&&&&&&-,,,,,,,,,-&&&&&&&&&&&&&&&&&&&", +".......#&;.........*,*,*,,,,,,,*,,,*,,,*,**...;&;....................@&&&&;!...;&&&&&&&&&&&&&&&&!$&&&&=!.....#&&&&$!..@&=!.......=&&....!=@&&&&&&&@....&&+!...........&&&&&&&&&&&&&&&&&&&&&&&&........$&&&&&$$@$$$@$$$@$$$$$$$....$&&&&&),-,,,,,,,,,-,,,,&&&&&',,,,,,,,,,,,&&&&&>,,,,,->&&&&&&&&&&&,,,,,,-,,-&&&&&&&&&&&&&&&&&&&", +".......;&#.......;@@!**,*,*,*,,,*,,,*,,,,*....#&.....................@&&&&;....#&&&&&&&&&&&&&&&&!$&&&&#......#&&&&@..!&&=........=&@...!+&&&@$++$&@....@&+............&&&&&&&&&&&&&&&&&&&&&&&&........+&&&&&;.....................$&&&&&@,,,,,,,-,,,,,,,,&&&&&),,,,,,,,-,,-&&&&&'-,,,,,,,%>&&&&&&&&%,,,,,,,,-&&&&&&&&&&&&&&&&&&&", +"........&=.......+&&$...*,,,,,*,,,*,,,*,*.....=&.....................@&&&&!!...;&&&&&@&@&&@&&@&@;$&&&&=......#&&&&$!..@&=!.......=&&.!.$&&+!....+&@....@&+!...........&&&&&&&&&&&&&&&&&&&&&&&&........=&&&&&+................!....=&&&&&&-,,,-,,,,,,,,,,,)&&&&&-,,,,-,,,,,>&&&&&%,,,-,,,,,,,'&&&&&&',,-,,,,,%&&&&&&&&&&&&&&&&&&&", +"........@+.......;&&&@&;...**,,*,,,*,**.......+$.....................@&&&&;.....&&&&$.!;#######;!+&&&&$.....!#&&&&@..!&&=.......!=&@.!#&&=.....!+&@....@&+............&&&&&&&&&&&&&&&&&&&&&&&&........;&&&&&&;........!;;#;;#;....;&&&&&&@,,,,,,,,,-,,,,,'&&&&&)-,,,,,,,,-&&&&&&,,,,,,,,,,,,,>&&&&&',,,,,,,,-&&&&&&&&&&&&&&&&&&&", +"........+@.#=++$;.;&&&&@;.......!.!...........@=.....................@&&&&;!....@&&&&............=&&&&@..!..!+&&&&$!..@&=!.......=&&.!$&@.......+&@....&&+!...........&&&&&&&&&&&&&&&&&&&&&&&&;........$&&&&&&;......!@&&&&&&;.....$&&&&&&),,,,,,--@,,-,,-&&&&&&>,,,,,,,%&&&&&&>,,,,,>)-,,,,,>&&&&&',,,,-,,,%&&&&&&&&&&&&&&&&&&&", +"........#&#+&&&&&;.;&&&&&+;#;+=#==#=;........;&;.....................$&&&&;.....+&&&&).!!!!!!!...!&&&&&+.!!!#@&&&&@..!&&=.......!=&@.!@&$.....!!$&@....@&+............&&&&&&&&&&&&&&&&&&&&&&&&;........#&&&&&&&$#;.;+&&&&&&&+......#&&&&&&&&'%,,%>&&,,,,,,>&&&&&&&'%,-%>&&&&&&&-,-,,,&&&'%,,'&&&&&&%,,,,,,,,-&&&&&&&&&&&&&&&&&&&", +".........@&&&&&&&&$@&&&&&&&&&&&&&&&&.........+@......................@&&&@;!....!&&&&&@+=##=+@+...$&&&&&@+=$&&&&&&$...@&=!.......=&&..@&@!..!.!;&&@....@&+!...........&&&&&&&&&&&&&&&&&&&&&&&&#.........+&&&&&&&&&&&&&&&&&&@!.......=&&&&&&&&&&&&&&&,,,,,,-&&&&&&&&&&&&&&&&&&&',,,,,>&&&&&&&&&&&&&&,,,-,,,,,'&&&&&&&&&&&&&&&&&&&", +".........+&&&&&&&&&&&&&&&&&&&+$+@&&$........;&=......................@&&&&;......=&&&&&&&&&&&&@...;&&&&&&&&&&&&&&&@...&&=........=&@..+&&#!!!!!@&&@....$&@!!!.........&&&&&&&&&&&&&&&&&&&&&&&&+..........@&&&&&&&&&&&&&&&&&;.........+&&&&&&&&&&&&&&,,,,,,,-&&&&&&&&&&&&&&&&&),,,,,-&&&&&&&&&&&&&&',,,,,-,,,>&&&&&&&&&&&&&&&&&&&", +".........!&&&&&&&&&&&&&&&&&&@;..$&&+........+@.......................@&&&&;.......+&&&&&&&&&&&&....=&&&&&&&&&@@&&&@...&&=........+&&...@&&===$&&$&@....=&&$=+=........&&&&&&&&&&&&&&&&&&&&&&&&&..........!@&&&&&&&&&&&&&&&;...........+&&&&&&&&&&&&&,,-,,,,,%&&&&&&&&&&&&&&&),,,,,,'&&&&&&&&&&&&&>,,,,,,,,,,&&&&&&&&&&&&&&&&&&&&", +"..........=&&&&&&&&&&&&&&&&&&&@@&&&;..#+=+==&#.......................@&&&&;........=@&&&&&&&&&@!....=@&&&&&&@!$&&&@...@&=........=&@...#@&&&&&&+.&&.....$&&&&@........&&&&&&&&&&&&&&&&&&&&&&&&&#...........+&&&&&&&&&&&&$!.............#$&&&&&&&&&&&,,,,,,,,,-)&&&&&&&&&&&&>,,,-,,,,-)&&&&&&&&&&',,,,,,,,,,%&&&&&&&&&&&&&&&&&&&&", +"...........$&&&&&&&&&&&&&&&&&&&&&&=..#&&&&&&$........................=+++=!..........=+$@$$$+#........=$@@$=..#+++=...=+;........;+=....;+@@@+#..+=.....!+$@@+........&&&&&&&&&&&&&&&&&&&&&&&&&@............!+&&&&&&&&@#.................;=$$$&&&&&&,,,,,,,,,,,%)&&&&&&&&>,,,,,,,,,,,,-')@&&&)',,,-,,,,,-,,&&&&&&&&&&&&&&&&&&&&&", +"...........;&&&&&&&&&&&&&&&&&&&&&$.;$&&&&&&&!.........................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&=..............#++++#;........................&&&&&&,,,,,,,,,,,,,-%''''%,,,,,,,,,,,,,,,,,,,,,,,,,,,,-,,,,,'&&&&&&&&&&&&&&&&&&&&&", +"............;&&&&&&&&&&&&&&&&&&&&;!&&&&&&&&;..........................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&#............................................&&&&&&,,-,,,,,,,,,,,,,-,,,,,,,-,,,-,,,,,,,,,,,,,,,,,,,,,,,,'&&&&&&&&&&&&&&&&&&&&&&", +".............=&&&&&&&&&&&&&&&&&&$+&&&&&&&@;...........................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&;...........................................&&&&&&,,,,-,,,-,,,,,,,,,,,,,,,,,,,,-,,-,,,,,,,,,,,-,,,,,,,%&&&&&&&&&&&&&&&&&&&&&&&", +"..............;&&&&&&&&&&&&&&&&&&&&&&&&&&;............................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&=..........................................&&&&&&,,,,,,,,,,,,,-,,,,,,-,,,,,,,,,,,,,,-,,,-,,,,,,,-,,-'&&&&&&&&&&&&&&&&&&&&&&&&", +"...............;@&&&&&&&&&&&&&&&&&&&&&&$!.............................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&@;........................................&&&&&&,,,,,,,,,-,,,,,,-,,,,,,,-,,,,,,,,,,,,,,,,-,,,,,,,%)&&&&&&&&&&&&&&&&&&&&&&&&&", +".................=&&&&&&&&&&&&&&&&&&&&#...............................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&@+;;....................................&&&&&&,,,,-,,,,,,,,,,,,,,,,-,,,,,,,-,,,,,,-,,,,,,,-,%'@&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"..................!+@&&&&&&&&&&&&&&@=!................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +".....................#+@&&&&&&&&@+;...................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +".........................;#;##;.......................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"......................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&..........................................................................................................................................................", +"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"&&&&&&&&&&&&&&&&&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&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"};
new file mode 100644 --- /dev/null +++ b/packages/hal/arm/sa11x0/assabet/current/misc/redhat2.xpm @@ -0,0 +1,260 @@ +/* XPM */ +static char * redhat2_xpm[] = { +"320 240 17 1", +" c None", +". c #020204", +"+ c #939192", +"@ c #4A4849", +"# c #810404", +"$ c #2A272A", +"% c #726F72", +"& c #D1D0D1", +"* c #4D0304", +"= c #B2B0B1", +"- c #8E3A34", +"; c #FAF9F8", +"> c #C90204", +", c #8C797D", +"' c #3C383B", +") c #1A1919", +"! c #5B585B", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................$$@@!%%,,,,,,,,,,,%!!@'').......................................................................................................................................................................................................................................................................", +"..............................))'%,+=&&;;;;;;;;;;;&==+,%')).....................................................................................................................................................................................................................................................................", +"..........................))'!%++======&==+==+===&=======,%!'$..................................................................................................................................................................................................................................................................", +"..........................$@,&&;;;&==+,%!@@'@@'@!,+==&;;;;&=,@$.................................................................................................................................................................................................................................................................", +"......................))'!,======+%%!!@'$$)$$)$$'@@@!!%++=&&=+,!')..............................................................................................................................................................................................................................................................", +"......................)@,&&;&&+%'))...................)$'%+&;;;=%$).............................................................................................................................................................................................................................................................", +"....................$!%=====%!@$$.......................$'@!++===+%@$...........................................................................................................................................................................................................................................................", +"..................))!+&;&=,@$...............................$@,&&;&=@...........................................................................................................................................................................................................................................................", +".................)@%+&==+%'$)...............................))@!+==&+%'.........................................................................................................................................................................................................................................................", +"................)$,&&;=%'.......................................'%=;&&%)).......................................................................................................................................................................................................................................................", +"...............)!+=&=+!')........*******..)..*********..........)'!+=&+%@)......................................................................................................................................)..)..)..)......................................................................................................", +"..............)$+;&&,').........*#######*)))*#########*)).........)$%&&&,$)...................................................................................................................................))))))))))))).....................................................................................................", +".............)!+=&=%@)........**##>#>#>######>##**********.........)@%+&=,@...................................................................................................................................)'!%%%!@'')).*....................................................................................................", +"............)$+;&&%)..........#>>>>>>>>>>>>>>>>#*.....*###*.........))%&&&,))...............................................................................................................................))'@+&&&++!@'))......*..*...........................................................................................", +"............@,=&=%@).........*#>>>>>>>>>>>>>>>>##*....*##>*...........@%=&=%'.................................................................................................................................$@+&&;&==+,!$).....).).)..........................................................................................", +"..........))%&&&%)..........*#>>>>>>>>>>>>>>>>>>##*...*##>*...........))%&&&%.................................................................................................................................'!=;;;;;;;&+!)).*.*)))))).........................................................................................", +"..........'%+&=,@)..........*##>#>>>>>>>>>>>>>>>>#****##>>#*............@%=&+@$...............................................................................................................................'!=;;;;;;;&=!..*.)'!!!')*.........................................................................................", +"..........!&&;+$)...........*#####>>>>>>>>>>>>>>>#####>>>>>#*...........)$+;&+@.............................................................................................................................))$@+;;;;;;;&&%...))!===!).*........................................................................................", +"........)),&=+!)............*>##***#####*##>>>>>>#>#>#>>>>>#*............)!==&%$)............................................................................................................................)$!=;;;;;;;&&!)...)%&&&,@$).............................................................*).........................", +"........)@=;=@$.............*>>#*....)....*#>>>>>>>>>>>>>>>>#.............$%=;='$.............................................................................................................................$@=;;;;;;;&&%))...%;;;=%')).........................................................*.))))).......................", +"........@+=&,)).............*>##*....).).**##>>>>>>>>>>>>>>>#*............)'+&=,'............................................................................................................................)$!+;;;;;;;&&!....*,;;;=%'*.........................................................))$@!!'$*......................", +"........%&&&!...............#>>#*.....))*###>>>>>>>>>>>>>>>>>#*.............!=&=!...........................................................................................................................))'@=;;;;;;;&&%...)),&;;=%'*.........................................................)'!,=+%'.......................", +"......)'+;=%'...............#>>##*****###>#>>>>>>>>>>>>>>>>>>#*.............'%=&+))..........................................................................................................................)$!=;;;;;;;&&!)...),;;;=%'.........................................)................)@+=&=,@)......................", +"......'!=;+$).............))*>>>####>>>>>>>>>>>>>>>>>>>>>>>>>>#.............)'+;+@$................................................*.*..*.*..*.*..*.*............*.*..*.*..............................*..*..*$@=;;;;;;;&&%))...,&;;=%@))*.*.*..*.*....................*..*.*.))))).*........*.*.*%&;;&=!)$)).*.................", +"......@+=&%)........******))#>>>>#>#>>>>>>>>>>>>>>>>>>>>>>>>>>*..............),&=,'.............................................)*.).).).).)).).)).)...........*).).)).).)..........................)..).).)).'!+;;;;;;;&&!....),;;;=%@)).).).)).).)...................).).).)))))).)........).).)%&;;&+!)))).).................", +"......%&=+!.......))*#####*)#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#)).............%=&=!..........................................*)))))))))))))))))))))))*......*.))))))))))))).*...................*.))))))))))))'@=;;;;;;;&&%..*.)+&;;=%@)))))))))))))).*.............*.*)))))))))))))))).....)))))),&;;&+!))))))))...............", +".....),;=%'....***#*##>#>##)**#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#*..............',=&,)..........................................)'@@@@@@$$))))'@!%!%@$)......).)$'@!!%%%%!!!'$$..................))$'!!%%%%!!@$)'!+;;;;;;;&&!)...),;;;=%'))))$'@@!@@@')).)...........).)))$''@@!@!@'$$)))*...*.)$$$),;;;&+!))$$$$$)...............", +"....)'+;+@$...*#>>>>>>>>>>#)).*#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#*.............$@=;+')........................................*$!%%%%%%@$)))$!,====,@')).*.*)))'!,+===&=&=+,!')).*.............*)$@%+======+,@)'!=;;;;;;;&&%))...,&;;=%@)))$'!,,+,,%!'))))........*.)))))'!%,,++,,!@$)))))..*)$$@$),&;;&=!)$'''''$)).............", +"....$!=;+))...*#>>>>>>>>>>#*...***#>>#>>>>>>>>>>>>>>>>>>>>>>>>>#*.............))+;+!$.........................................!+======,!'$@,+&&&&&=!'*.).))'@%+==&&&&;&&&&==,%').*..........))'!,+=&&&;&&&&=+,%!=;;;;;;;&&!....),;;;=%@)'%,+==&&=&=+,%@'*........)))'@%%+===&=&===+,!@$)*.).'%,++,=;;;&&+,++++++@...............", +"....@,=;%.....#>>>>>>>>>>>>#*.....*###>>>>>>>>>>>>>>>>>>>>>>>>##*...............%;=%'........................................*%&;;;;;;=,@$,&;;;;;;&,@.))))'@,&&;;;;;;;;;;;;;&=%$).........))))%=&;;;;;;;;;;;;&=%=;;;;;;;&&%....),&;;=%@)!=&;;;;;;;;;&&,!$.*......)))!+=&&;;;;;;;;;;&=%'..*))%=&;;;;;;;;;;;&;;;;&%...............", +"....@+=&%.....*>>>>>>>>>>>>#*......****####>>>>>>>>>>>>>>>>>>>>#******..........%&=+@.........................................%&;;;;;;&+,,=;;;;;;;=+@*))$'%+&&;;;;;;;;;;;;;;;&=,@..........$@,=&&;;;;;;;;;;;;;&=&;;;;;;;&&!)...),;;;=%%%=&&;&;&;&;;;;&=+%$)*......$@,&&;;;&;&&;&;;;;&=,'$).)!=&;&&;;;;;;&;;&;&;&,...............", +"....%=&=!.....#>>>>>>>>>>>>>#))...........*#>>>>>>>>>>>>>>>>>>########*.........!===!.........................................%&;;;;;;&+=&&;;;;;;;=,@)))@!=;;;;;;;;;;;;;;;;;;;;&,)).......)',&;;;;;;;;;;;;;;;;;;;;;;;;;;&&%)....,&;;=!+&;;;;&&&&&&&;;;;;+@$))*....'%=;;;;&&&&=&&&&;;;;=%@).*!=&;;;;;;;;;&;&;;;;&%...............", +"....%&&+!.....*>>>>>>>>>>>>>>***...........*##>>>>>>>>>>>>>>>>>##>#>#>#**.......!==&%.........................................,&;;;;;;&=&;;;;;;;;;&,!))$%=&;;;;;;;;;;;;;;;;;;;;;=%'*......@,=;;;;;;;;;;;;;;;;;;;;;;;;;;;&&%.....,;;;&=&;&&=+,%!!%%+=&;;;=+@)......$!=&&=+,%!!!!%,,=&;;&=!)..'%%,,%=;;;&&=%,,,+,+'...............", +"....,;&,@.....*#>>>>>>>>>>>>>>>#*...........*#>>>>>>>>>>>>>>>>>##>>>>>>>*.......'+=&%.........................................%&;;;;;;;;;;;;;;;;;;=+@)$@+&;;;;;;;;;;&&;;;;;;;;;;&&!.....*.%&&;;;;;;;;;;;;;;;;;;;;;;;;;;;&&!...)),;&;;&;;&=%)).....'!=&;;;&%......*$@,&+%'.......)),&&;;;%*...)$$).,&;;&+!.)$$$$$)...............", +"...)+;=!'......*##>>>>>>>>>>>>>###****.......*#>>>>>>>>>>>>>>>>#>>>>>>>>##*.....'!=;%.........................................%&;;;;;;;;;;;;;;;;;;=,@)@+&;;;;;;;&=+,%%%+=;;;;;;;;&,')).*$@+;;;;;;;;;;;&&=&&&;;;;;;;;;;;;&&%....)%;;;;;&&+!')......)$%=&;;&+'$.....)$@!!')........)'%=;;;+'$..).)..,&;;&+!*).))).................", +"..)'+;='$.......*#>>>>>>>>>>>>>>>>####*.......#>>>>>>>>>>>>>>>>>>>>>>>>>>>*.....$'=;,.........................................%&;;;;;;;;;;;;;;;;&;=%@)%&;;;;;;;;&,@)).)',&;;;;;;;;=!')).@,&;;;;;;;;;&&=,,%,==;;;;;;;;;;;&&%))...,&;;;;&+!...........$!=;;;=%@)).....................,&;;&,'*......,&;;&+!)......................", +"..)'+;='$........*#>>>>>>>>>>>>>>>>>#>#*****..*>>>>>>>>>>>>>>>>>>>>>>>>>>>#*....$@+;+)........................................%&&;;;;;;;;;;;&=++++%'''+&;;;;;;&=,'$...))@%=;;;;;;;&,@.*)%=&;;;;;;;;&=%!@''@!,+&;;;;;;;;;;=%....),;;;;;+!$...........)',;;;&,@......................*%&;;&+!.......%;;;&+!.......................", +"..$@=;+@$.........*#>>>>>>>>>>>>>>>>>>>>>###*)*#>>>>>>>>>>>>>>>>>>>>>>>>>>>#*...)@=;+$).......................................%&;;;;;;;;;;&&+!@$''$.'%=;;;;;;;=,@..*..*..),;;;;;;;&=!..),;;;;;;;;;&=!.......'!+;;;;;;;;;&&!...)),&;;;&%...............%&&;&=!.............*.*.*.*.))%&&;&=!.......%&;;&+@.......................", +"..)@+;+')..........**>>>>>>>>>>>>>>>>>>>>#>>####>>>>>>>>>>>>>>>>>>>>>>>>>>>#*...$'=;+@).......................................%&&;;;;;;;;;=%!'$)))).@+&;;;;;;;+@$)).)).)))%&;;;;;;;&%)$'+;;;;;;;;;=%'.......)$,=;;;;;;;;&&%....),;;;&=!...............!=;;;=%)...........).).).).)))!=&;;&%.......%;;;&+!)......................", +"..$@=;+$)...........*#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>##*...$'=;+@$.......................................%&;;;;;;;;;&%.........!&&;;;;;;&,)))))))))))!=&;;;;;;;,)'@=;;;;;;;;;,)).........@+&;;;;;;;&&%))...,&;;&+!)).............!+&;;&%)..........*)))))))))))!+&;&&%.......%&;;&+!)......................", +"..)@+;+')............**##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#*....$@+;=').......................................%&&;;;;;;;&=@.........%&;;;;;;;&=!!!!!!!!!!!+=;;;;;;;&,)@%=;;;;;;;;&%..........)'%=;;;;;;;&&!)...),;;;=,@...............@+&;;&%)........)))))$'@@!!!!%+=&;;&%.......%;;;&+!.......................", +"..$@=;+$)...............*#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#.....)@=;=@$.......................................%&;;;;;;;;=%'........*%;;;;;;;;&==+===========;;;;;;;;+)!+&;;;;;;;&=!..........)'!=;;;;;;;&&!..*.)+&;;=%'..............*@,=;;;%........)))))$'!%,+==+==&;;;&%.......%&;;&+@.......................", +"..)@+;=')................*##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#*.....$'+;+').......................................%&;;;;;;;;=@$).......),;;;;;;;;;&&&&&&&&&&&&&;;;;;;;;;,)!=&;;;;;;;&+!..........)'!=;;;;;;;;=%)...),;;;=%'...............'+=;;&%.......))$'!%,+===&&&&&&;;;&&%.......%&;;&+!.......................", +"..$@=;+@$.................*#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#*.....$@=;+$).......................................!&;;;;;;;;+'$)......)$,;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+)%=&;;;;;;;&,!)).........$@=;;;;;;;&&%))...%&;;=%@)).............',=;;;,......*.)'%+&&;;;;;;;;;;;;;;&%.......,&;;&+!)).....................", +"..)'+;=')..............)@%,,-##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>**......$'=;+)........................................%&&;;;;;;;+'$)......)'+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,)%=;;;;;;;;=%'...........'!+;;;;;;;&&!....),;;;=%'...............@,&;;&,......)'%,=&&;;&;&&&&&&&&;;&&%.......%;;;&+!.......................", +"..)'+;=@$.............)',;&&%)*###>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>##*.......)@+;,.........................................%&;;;;;;;;+')......*$@=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+)%&&;;;;;;;=!$.........))'@=;;;;;;;&&%..*))+&;;=%'...............',=;;;%.....))!=&;;;;;&&&===++=&&;;&%.......%&;;&+@.......................", +"...)+;=!$.............$!=;;&=%'*****#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>#*........'%=;,.........................................%&;;;;;;;;+').......$@+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;%)%=;;;;;;;;=!'...........'@=;;;;;;;&&!)....,;;;=%@...............@,=;;&,....*$%+&;;&&=+,%%!!@@@%=&;;&!.......%&;;&+!.......................", +"....,;=%'.............@,=;;;&=!.....*#>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>##*.........',=;%.........................................!&;;;;;;;;+'$)).....)@+;;;;;;;;;;;&;&;;;;;;;;;;;;;;;;&,)%&&;;;;;;;=,'...........$!+;;;;;;;&&%))...,&;;=%@)).............'+=;;&,.*.*.!=&;;;&+!)).......@+&;&&%.......,&;;&+!)).....................", +"....%;=,@.............$!=;;;;&=!%%@))**####>>>>>>>>>>>>>>>>>>>>>>>##**..........@+=&%.........................................%&&;;;;;;;,').......))+;;;;;;;;&=%,,++++++++++++++++++!)!=&;;;;;;;&+@...........'!=;;;;;;;&&!....),;;;=%'...............',=;;;%..))',&;;&=+@')........!+&;;&%.......%;;;&+!.......................", +"....!&=+@.............)$+;;;;;;&&;+$).....*###>>>>>>>>>>>>>>>>####*.............!+==!.........................................%&;;;;;;;;+').........%;;;;;;;&=!.))$'@@!!@!@@@!@!!@@'$)!=&;;;;;;;&=!.........))'!=;;;;;;;&&%..*))+&;;=%'...............@,&;&;%*))'!=;;;=%'.........))@+&;;&%.......%&;;&+@.......................", +"....!==&!.))''@'@@!!')))!+&;;;;&;;=+@).....*****############*#****..............!&=+@.........................................%&;;;;;;;;+'$.........%;;;;;;;;&,..))))$$$$$$$$$$$$$))).!+&;;;;;;;&&%..........)@,=;;;;;;;&&!)....,;;;=%'...............@%=;;&,..)@+&;;&+@)..........)@+&;&&%.......%;;;&+!.......................", +"....!+&&%.)@!+,,++==%$).$@+;;;;;;;;;+').............))))))......................%&=%'.........................................!&;;;;;;;;+$$)).......%&;;;;;;;;,.*.......*.*.*.........',=;;;;;;;;&%*.*..*.*.)$!+&;;;;;;;&&%))...,&;;=%@)).............',&;;;%*.*!=&;;&%.............@+&;;&%.......%&;;&+!)).....................", +"....'%=;,$@%+&=&&&&&&+@))$!+&;;;;;;;=+%'')$)$)''@'')'@@@@'''$).................),;+!$.........................................%&&;;;;;;;+').........!&&;;;;;;;=!'..)..).).).).).......$@=;;;;;;;;;=@$.*.).).$',&&;;;;;;;&&!...).,;;;=%'...............@,=;;&,..)%&&;&&%*..........))!=&;;&!.......%;;;&+!.......................", +"....$'=;=@%+&;;;;;;;;;+$).$@=;;;;;;;;;=,!@@@@@!,+,!@!%%+!'!%@$)...............)'+;+$).........................................%&;;;;;;;;+').........@=&;;;;;;;&&!*)))))))))))))))......),;;;;;;;;;&=!.))))))$!+;;;;;;;;;;=%...))+&;;=%'...............',=;;;%*.)%&;;&=!........*))))%=&;&&%.......%&;;&+!.......................", +"....))+;===&;;;;;;;;;;&+%!%,&;;;;;;;;;&&=+=+=+=&=&=====&====%)................$%=&+)..........................................%&&;;;;;;;+'$.........$!=;;;;;;;;&=%!!@''''''@@!!,!@$....)%&;;;;;;;;;&+%!@@@!!,=&;;;;;;;;;&&!.....,;;;=%@...............@,=;;&%..)!&&;;=%).........))$,&;;;&%.......,&;;&+!*......................", +"......%&;;;;;;;;;;;;;;;;&&=&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;,.................@+=&!...........................................%&;;;;;;;;+$$)).......)),;;;;;;;;;;&=+,%!!!!!%,+=&=+!.....!&&;;;;;;;;;&&=,,%+=&&;;;;;;;;;;&&%.....,&;;=%@)).............'+=;;;%*..!&;;&&%).*.*.*.*)))'+;;;;&%.......%&;;&+!)).*...................", +"......!=&;;;;;;;;;;;;;;;;&;&;;;;;;;;;;;;;;;;;;&&&&&&&;;;;;;&%................)%&=+!...........................................%&;;;;;;;;+')..........)!=&;;;;;;;;;&&===+=====&&;&=!.....'%=;;;;;;;;;;&&&==&&&;;;;;;;;;;;;&!.....,;;;=%'...............',=;;&%...!=&;;&+')).).).).)!,=;;;&&%.......%&&;&=%)).)...................", +"......@,&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=,======;;;;;=!...............)'+;=!'...........................................%&;;;;;;;;+')...........@,&;;;;;;;;;;;;;;;;;;;;;;;;&%.....$'+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&&%.....,&;;=%'...............'+=;;;%..*!+&;;;+@'))))))))),&;;;;;&%.......!=;;&&%)))))).................", +"......$@=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&=!!!!@+&&;;;&=!...............'!=;+')...........................................,&;;;;;;;;+$)...........)@,&&;;;;;;;;;;;;;;;;;;;;;;&,.....))!=&;;;;;;;;;;;;;;;;;;;;&;;;;;;;&%.....,;;;=%'...............@,=;;&,...$!=;;;&+,@@''@@%%+=;&;;;;&%.......@+&;;&=!@@@@@'$...............", +".......),;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&,')...!&&;;;&+@...............@==&%.............................................%&;;;;;;;;+').............!+&;;;;;;;;;;;;;;;;;;;;;;;,.......'%=;;;;;;;;;;;;;;;;;;&&&;;;;;;;&%*....%;;;=,'...............'+=;;;%*....%&;;;;=+,!!%++&;;;&&&;;;%.......'%=;;;&=+%,,,,'...............", +".......)!=&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&+,%%%=&;;;;=%'...)'''@'@'@''',&=+@.............................................%&;;;;;;;;+').............$@,=&;;;;;;;;;;;;;;;;;;;;&,)......)'%=&;;;;;;;;;;;;;;;=+==&;;;;;&&%.....%;;;=%'...............',=;;&%.....!+&;;;&&====&&&;&&+!=;;&%.......)'+&;;&&&==&==!...............", +"........'%=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&&&;;;;;;+$)...$%%,,+,,,+%%=;=@$.............................................%&;;;;;;;;+$)...............'%+&;;;;;;;;;;;;;;;;;;;&%$).......'%=&;;;;;;;;;;;;;&,$%=&;;;;;;&%.....%&;;=%'...............',=;;;%.....$!+&;;;;;;;;;;;;&=!.%;;;%.........!&&;;;;;;;;&%...............", +"........)'+&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&=%)..)$!==&=&=&=&=&&&,)).............................................!+=&&&&===%$)...............)'@%+=&&&;&;&;&;&&&&=+,%')........)'@%+&&&;;;&;&&=+%')@,=&&&&&=+!.....!===+@$...............$!+&==@.....)$!+=&&;&;;&;&==%@$.!===!.........'%+&&;&;;&&&!...............", +"..........!&&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=!'...)@+;;;;;;;;;;;;=!...............................................'%,+++++++@)....................'!+===&&&&&=&=++%!$...............@++&=&&&&=+,'...$@%++++++%'.....@,++!$)...............)'!+,,'.......)'!==&&&&&==%@$...@+,,@..........)!+=&&&&&=+@...............", +"..........'%=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&+'$)'%,=&;;;;;;;;;;;=%'...............................................)'@@@@@!@'$)....................)''!!%!%!%!%!!!@'$)...............$'!!%%%!%!!')...)$'@@'@@@').....)''@')................))'@@')........)'@!%%%%%!!@$)...)@@'$..........)$@!%%%%%!@$...............", +"..........)'+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=!.)$,&&;;;;;;;;;;;;;,)..................................................................................................................................................................................................................................................", +"...........)!+&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=%@.@+=;;;;;;;;;;;;;=+@)..................................................................................................................................................................................................................................................", +"............)$+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+'$),;;;;;;;;;;;;;;;+$)...................................................................................................................................................................................................................................................", +".............)%=&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&+!%+=;;;;;;;;;;;;;&+@)....................................................................................................................................................................................................................................................", +"..............'%=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&==+&;;;;;;;;;;;;;;;+$).....................................................................................................................................................................................................................................................", +"..............)'%+&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&&&&;;;;;;;;;;;;;=+@)......................................................................................................................................................................................................................................................", +"................)$+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+$).......................................................................................................................................................................................................................................................", +".................)@+=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&=,@)).......................................................................................................................................................................................................................................................", +"..................)'%&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&=%)..........................................................................................................................................................................................................................................................", +"...................)'!+=&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&=+%')..........................................................................................................................................................................................................................................................", +"......................'%=;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=%$.............................................................................................................................................................................................................................................................", +"......................)'!,=&&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&==,!').............................................................................................................................................................................................................................................................", +"........................))@,=&;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&=%@)................................................................................................................................................................................................................................................................", +"..........................$@!%+==&&;;;;;;;;;;;;;;;;;;;&&=+,%@'))................................................................................................................................................................................................................................................................", +"..............................)@%+=&;;;;;;;;;;;;;;;;&&=+%').....................................................................................................................................................................................................................................................................", +"..............................)$'@!!%,++===+====+++,,%!!$)......................................................................................................................................................................................................................................................................", +"......................................)$''@@'''@'').............................................................................................................................................................................................................................................................................", +".......................................))$)$$$$$))..............................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................", +"................................................................................................................................................................................................................................................................................................................................"};
new file mode 100644 --- /dev/null +++ b/packages/hal/arm/sa11x0/assabet/current/src/banner.xpm @@ -0,0 +1,74 @@ +/* XPM */ +static char * banner_xpm[] = { +"320 54 17 1", +" c None", +". c #030305", +"+ c #949394", +"@ c #CFC9CD", +"# c #525052", +"$ c #B7B6B8", +"% c #E2515E", +"& c #FDFDFB", +"* c #737073", +"= c #820204", +"- c #E33533", +"; c #343232", +"> c #E895AE", +", c #E51604", +"' c #E67284", +") c #EABAD4", +"! c #D8D7D9", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"..............*+@&&&&&&$+*..................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&+#;;...................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--%>&&&&&&&&&&&&&&&&&&&&&&&&", +"...........#$&&@+*##;#++@&&$#...............................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&#........................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'&&&&&&&&&&&&&&&&&&&&&&", +".........#$&$*...........;#!&$;.............................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&+..........................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>&&&&&&&&&&&&&&&&&&&&", +"........+&$#................#$&+............................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&#...........................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'&&&&&&&&&&&&&&&&&&&", +"......;!&*....................*&@...........................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&#............................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'&&&&&&&&&&&&&&&&&&", +".....;!@;.....====;.=====......;!@;....................................................................;.;..................................................................&&&&&&&&&&&&&&&&&&&&&&&&+...............;;;;..........................&&&&&&,,,,,,,,,,,,,,,---,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>&&&&&&&&&&&&&&&&&", +"....;&@......,,=,,=,,=...==......!!.................................................................;#!$*#..................................................................&&&&&&&&&&&&&&&&&&&&&&&!.............#+&&&&&&@*...................;***&&&&&&,,,,,,,,,,,,')&&&&&&>-,,,,,,,,,,,,,,%>!&&)>'-,,,,,,,,,,&&&&&&&&&&&&&&&&&", +"....@@;.....=,,,,,,=,,=..=,.......!!.................................................................#&&&&+;...;............................................................&&&&&&&&&&&&&&&&&&&&&&&#...........;@&&&&&&&&&&&+...............*&&&&&&&&&&&,,,,,,,,,,'&&&&&&&&&&&)-,,,,,,,,,,-)&&&&&&&&&)-,,,,,,,,'&&&&&&&&&&&&&&&&", +"...$&;......====,=,,,====,==......;!+................................................................#&&&&@..;>+;...........................................................&&&&&&&&&&&&&&&&&&&&&&&...........*&&&&&&&&&&&&&&$............#&&&&&&&&&&&&&,,,,,,,,,)&&&&&&&&&&&&&&%,,,,,,,,-&&&&&&&&&&&&%,,,,,,,,,&&&&&&&&&&&&&&&&", +"..#&;.......,=.....=,,,,,,,,.......*&#...............................................................#&&&&@...&&*...............................;...........................&&&&&&&&&&&&&&&&&&&&&&+..........+&&&&&&&&&&&&&&&&@..........#&&&&&&&&&&&&&&,,,,,,,,)&&&&&&&&&&&&&&&&',,,,,,,)&&&&&&&&&&&!,,,,,,,,,,>&&&&&&&&&&&&&&&", +"..!$........,=...;==,=,=,=,==.......$$..............................................................;#&&&&@...&&*..............................#$*..........................&&&&&&&&&&&&&&&&&&&&&&#.........#&&&&&&&&&&&&&&&&&&$........#&&&&&&&&&&&&&&&,,,,,,,)&&&&&&&&&&&&&&&&&&%,,,,,%&&&&&&&&&&&&-,,,,,,,,,,'&&&&&&&&&&&&&&&", +".*&;........,,===,,=,,,,,,,,,.......;&#..............................................................#&&&&$;..!&*;...................;.........!&+;.........................&&&&&&&&&&&&&&&&&&&&&&;.........&&&&&&&*;...#$&&&&&&#.......&&&&&&&&!'''>!&&,,,,,,'&&&&&&&)'''>&&&&&&&&,,,,,'&&&&&)-,,%)),,,,,,,,,,,-&&&&&&&&&&&&&&&", +".@+.....===.,=,,,,=,,=,=,=,,=........$$.......................;.;.;.;.;......;.;.;..............;.;.;#&&&&@..;!&*.;.;.;..........;.;.;.;....;.;!&+.;.;......................&&&&&&&&&&&&&&&&&&&&&&;........+&&&&&@........#&&&&&!......+&&&&&&&',,,,,,'&,,,,,,&&&&&&&-,,,,,,>&&&&&&',,,,)&&&&&%,,,,,-,,,,,,,,,,,-&&&&&&&&&&&&&&&", +";&#..=,,,,,..=,=,,,,,,,,,=,,,=.......#&;.....................#***;.;+$$#;..;.#+$$@+*..........#+$$$*.#&&&&@...!&*.;;*++#;.......;.#*++*;.;..;;;!&+;;;;......................&&&&&&&&&&&&&&&&&&&&&&.........&&&&&!..........+&&&&&#.....&&&&&&&-,,,,,,,,%,,,,,%&&&&&&-,,,,,,,,'&&&&&&,,,,)&&&&&>,,,,,,,,,,,,,,,,,-&&&&&&&&&&&&&&&", +"*&...,=,=,,=...===,=,=,,,,,=,=........!*.....................!&&&*;@&&&*..;#@&&&&&&&$;.....;.$&&&&&&!*&&&&@..;&&*.$!&&&&$#....;.+!&&&&&!*..;$!&&&&!&&!......................&&&&&&&&&&&&&&&&&&&&&&........#&&&&&*;;;;;;;;;;#&&&&&+....#&&&&&&',,,,,,,,,,,,,,,>&&&&&%,,,,,,,,,,)&&&&&-,,,)&&&&&&!'-,,,,,,,,,,,,,,-&&&&&&&&&&&&&&&", +"$$...,,,,=,,.......=,,=,=,,,,====.....@$.....................!&&&+!&&&&+;.*!&&&&&&&&&!.....;!&&&&&&&&!&&&&@...!&*!&&!$!&&&;;...*&&!@$@!&&*..$&!&&!&!&!......................&&&&&&&&&&&&&&&&&&&&&&........+&&&&&&&&&&&&&&&&&&&&&&&....+&&&&&&,,,,,,,,,,,,,,,,&&&&&!,,,,,,,,,,,%&&&&&',,,'&&&&&&&&&)',,,,,,,,,,,,-&&&&&&&&&&&&&&&", +"&+...==,,,,=,=......=,,,,=,=,=,,=,....*!.....................!&&&!&&&&&*.#&&&&&!!&&&&&@....!&&&&&&&&&&&&&&@..;!&!&$;...#!&!....#@*....;@&&...;.!&+.;;;......................&&&&&&&&&&&&&&&&&&&&&&........$&&&&&&&&&&&&&&&&&&&&&&&....$&&&&&),,,,,,,,,,,,,,,,&&&&&',,,,,,,,,,,,&&&&&',,,-&&&&&&&&&&&&-,,,,,,,,,,-&&&&&&&&&&&&&&&", +"&#....==,=,,,,,==....,=,,,,,=,=,,,,...#&.....................!&&&&&&&!&*.@&&&&*;.;@&&&&#;.+&&&&&@+*+&&&&&&@...&&&+......*&&*............!&+....!&+..........................&&&&&&&&&&&&&&&&&&&&&&........$&&&&&&&&&&&&&&&&&&&&&&&....$&&&&&),,,,,,,,,,,,,,,-&&&&&',,,,,,,,,,,,&&&&&),,,,%&&&&&&&&&&&&-,,,,,,,,,-&&&&&&&&&&&&&&&", +"&;.....=,,,=,=,,,===.=,,=,,,,,,,=,==..#&;....................@&&&&&@*;;.*&&&&*.....&&&&$..&&&&&$....#&&&&&@...&&!........@&$...........;)&$....&&+..........................&&&&&&&&&&&&&&&&&&&&&&........$&&&&&$$$$$$$$$$$$$$$$$$....$&&&&&),,,,,,,,,,,,,,,,&&&&&',,,,,,,,,,,,&&&&&>,,,,,->&&&&&&&&&&&,,,,,,,,,-&&&&&&&&&&&&&&&", +"&;......=,,,,,=,,,,,,,=,,,=,=,=,,,,=..;&#....................!&&&&!.....@&&&!;.;.;.$&&&&.#&&&&!;.....+&&&&$;..!&+........+&@;......;.;..+&!....!&+;.........................&&&&&&&&&&&&&&&&&&&&&&........+&&&&&;.....................$&&&&&!,,,,,,,,,,,,,,,,&&&&&),,,,,,,,,,,-&&&&&',,,,,,,,%>&&&&&&&&-,,,,,,,,-&&&&&&&&&&&&&&&", +"&;........==,,,,=,=,=,,,=,,,,,,,=,,...#&;....................!&&&&*.....!&&&!+$+$$+@&&&&.+&&&&$......#&&&&@..;&&*........+&!.....;.;*+$$@&@....!&+..........................&&&&&&&&&&&&&&&&&&&&&&........*&&&&&+................;....*&&&&&&-,,,,,,,,,,,,,,,)&&&&&-,,,,,,,,,,>&&&&&%,,,,,,,,,,,'&&&&&&',,,,,,,,-&&&&&&&&&&&&&&&", +"&#.........==,=,,,,,,=,,,=,=,=,,=,=...#&;....................@&&&&#....;&&&&&&&&&&&&&&&&;$&&&&+......#&&&&@...!&*........*&&....;*@&&&&&&&!....!&+..........................&&&&&&&&&&&&&&&&&&&&&&........;&&&&&&;.........;;;;;;;....;&&&&&&!,,,,,,,,,-,,,,,'&&&&&),,,,,,,,,-&&&&&&,,,,,,,,,,,,,>&&&&&',,,,,,,,-&&&&&&&&&&&&&&&", +"&;.......;&@.==,=,,=,,,=,,,,,,,,,=....#&.....................!&&&!;....#&&&&&&&&&&&&&&&&.@&&&&#.....;#&&&&@..;!&*........*&!....$&&!!$++@&@....&&+..........................&&&&&&&&&&&&&&&&&&&&&&;........$&&&&&&;.......@&&&&&&;.....$&&&&&&),,,,,,,-!,,,,,-&&&&&&>,,,,,,,-&&&&&&>,,,,,')-,,,,,>&&&&&',,,,,,,,-&&&&&&&&&&&&&&&", +"&*.......*&&$...=,,,=,,,,=,=,=,==.....*&.....................@&&&&;....;&&&&&!&!&&!&&!&!;$&&&&*......#&&&&@...&&*........*&!...$&&+;....+&!....!&$..........................&&&&&&&&&&&&&&&&&&&&&&;........;&&&&&&&$#;.;+&&&&&&&+......;&&&&&&&&'-,,%>&&,,,,,,>&&&&&&&'-,-%>&&&&&&&-,,,,-&&&'-,,'&&&&&&-,,,,,,,,-&&&&&&&&&&&&&&&", +"@+.......;&&&@&;...==,=,,,,,,==.......+$.....................!&&&&;.....&&&&$..########;.$&&&&$......*&&&&@..;!&*........+&!.;#&&*......+&!....!&+..........................&&&&&&&&&&&&&&&&&&&&&&#.........+&&&&&&&&&&&&&&&&&&!........*&&&&&&&&&&&&&&&,,,,,,-&&&&&&&&&&&&&&&&&&&',,,,,>&&&&&&&&&&&&&&,,,,,,,,,'&&&&&&&&&&&&&&&", +"+!.#*++$;.;&&&&&;.....................!*.....................@&&&&;;....!&&&&............*&&&&!......+&&&&@...&&*........*&!..$&!.......+&!....!&+..........................&&&&&&&&&&&&&&&&&&&&&&+..........@&&&&&&&&&&&&&&&&&;.........+&&&&&&&&&&&&&&,,,,,,,-&&&&&&&&&&&&&&&&&),,,,,-&&&&&&&&&&&&&&',,,,,,,,,>&&&&&&&&&&&&&&&", +"#&#+&&&&&;.;&&&&!+;##*+#*+#*;........;&;.....................!&&&&;.....+&&&&)..;.;.;.....&&&&&$.;.;#&&&&&@...&&*........+&!.;)&$.....;.@&@....&&+..........................&&&&&&&&&&&&&&&&&&&&&&&...........@&&&&&&&&&&&&&&&;...........+&&&&&&&&&&&&&,,,,,,,,%&&&&&&&&&&&&&&&),,,,,,'&&&&&&&&&&&&&>,,,,,,,,,,&&&&&&&&&&&&&&&&", +".!&&&&&&&&$@&&&&&&&&&&&&&&&&.........+@......................@&&&&;......&&&&&!+*##*+!+...$&&&&&)+*$!&&&&&@...!&*........*&!..@&);.....;&&!....!&+;.........................&&&&&&&&&&&&&&&&&&&&&&&#...........+&&&&&&&&&&&&$;.............;$&&&&&&&&&&&,,,,,,,,,-)&&&&&&&&&&&&',,,,,,,,-)&&&&&&&&&&',,,,,,,,,,%&&&&&&&&&&&&&&&&", +".+&&&&&&&&&&&&&&&&&&&*$+@&&$........;&*......................!&&&&;......*&&&&&&&&&&&&!...;&&&&&&&&&&&&&&&@...&&*........*&!..+&&;;.;.;!&&!....@&@.;........................&&&&&&&&&&&&&&&&&&&&&&&!............;+&&&&&&&&@#.................;*$$$&&&&&&,,,,,,,,,,,%)&&&&&&&&>-,,,,,,,,,,,-')!&&&)',,,,,,,,,,,,&&&&&&&&&&&&&&&&&", +"..&&&&&&&&&&&&&&&&&&!;..$&&+........+!.......................!&&&&;.......+&&&&&&&&&&&&....*&&&&&&&&&!@&&&!...&&*........+&&...!&&+#*+&&$&!....*&&+*+*......................&&&&&&&&&&&&&&&&&&&&&&&&*..............#++++#;........................&&&&&&,,,,,,,,,,,,,-%''''%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'&&&&&&&&&&&&&&&&&", +"..*&&&&&&&&&&&&&&&&&&&!!&&&;..**+*+*&#.......................!&&&!;........*!&&&&&&&&&@;....*!&&&&&&!;$&&&@...!&*........*&!...#!&&&&&&+.&!.....$&&&&!......................&&&&&&&&&&&&&&&&&&&&&&&&&#............................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%&&&&&&&&&&&&&&&&&&", +"...$&&&&&&&&&&&&&&&&&&&&&&*..;&&&&&&$........................*++++...........*+$@@$$+#........*$@@$*..#+++*...*+;........;+*....;+@!@$#..++......+@!!+......................&&&&&&&&&&&&&&&&&&&&&&&&&&;...........................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%&&&&&&&&&&&&&&&&&&&", +"...;&&&&&&&&&&&&&&&&&&&&&$.;@&&&&&&&........................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&*..........................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'&&&&&&&&&&&&&&&&&&&&", +"....;&&&&&&&&&&&&&&&&&&&&;.&&&&&&&&;........................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&@;........................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%!&&&&&&&&&&&&&&&&&&&&&", +".....*&&&&&&&&&&&&&&&&&&$+&&&&&&&&;.........................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&!+;;....................................&&&&&&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,--'!&&&&&&&&&&&&&&&&&&&&&&&", +"......;&&&&&&&&&&&&&&&&&&&&&&&&&!;..........................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +".......;@&&&&&&&&&&&&&&&&&&&&&&$;...........................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +".........*&&&&&&&&&&&&&&&&&&&&*.............................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"...........+!&&&&&&&&&&&&&&!*...............................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +".............#+@&&&&&&&&!+;.................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +".................;####;.....................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"............................................................................................................................................................................&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&", +"................................................................................................................................................................................................................................................................................................................................"};
new file mode 100644 --- /dev/null +++ b/packages/hal/arm/sa11x0/assabet/current/src/lcd_support.c @@ -0,0 +1,591 @@ +//========================================================================== +// +// lcd_support.c +// +// SA1110/Assabet - LCD support routines +// +//========================================================================== +//####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 Red Hat, Inc. +// All Rights Reserved. +// ------------------------------------------- +// +//####COPYRIGHTEND#### +//========================================================================== +//#####DESCRIPTIONBEGIN#### +// +// Author(s): gthomas +// Contributors: gthomas +// Date: 2000-06-05 +// Description: Tool used to test LCD stuff +//####DESCRIPTIONEND#### + +#include <pkgconf/system.h> + +#include <cyg/infra/diag.h> +#include <cyg/hal/hal_io.h> // IO macros +#include <cyg/hal/hal_arch.h> // Register state info +#include <cyg/hal/hal_intr.h> // HAL interrupt macros + +#include <cyg/hal/hal_sa11x0.h> // Board definitions +#include <cyg/hal/assabet.h> +#include <cyg/hal/hal_cache.h> + +#include "banner.xpm" + +#ifndef FALSE +#define FALSE 0 +#define TRUE 1 +#endif + +static struct lcd_frame { + unsigned short palette[16]; + unsigned short pixels[240][320]; + unsigned char pad[256]; +} lcd_frame_buffer; + +#define RGB_RED(x) (((x)&0x1F)<<11) +#define RGB_GREEN(x) (((x)&0x3F)<<5) +#define RGB_BLUE(x) ((x)&0x1F) + +static volatile struct lcd_frame *fp; + +static int +_hexdigit(char c) +{ + if ((c >= '0') && (c <= '9')) { + return c - '0'; + } else + if ((c >= 'A') && (c <= 'F')) { + return (c - 'A') + 0x0A; + } else + if ((c >= 'a') && (c <= 'f')) { + return (c - 'a') + 0x0a; + } +} + +static int +_hex(char *cp) +{ + return (_hexdigit(*cp)<<4) | _hexdigit(*(cp+1)); +} + +static unsigned short +parse_color(char *cp) +{ + int red, green, blue; + + if (*cp == '#') { + red = _hex(cp+1); + green = _hex(cp+3); + blue = _hex(cp+5); + return RGB_RED(red>>3) | RGB_GREEN(green>>2) | RGB_BLUE(blue>>3); + } else { + // Should be "None" + return 0xFFFF; + } +} + +void +show_xpm(char *xpm[]) +{ + int i, row, col; + char *cp; + int nrows, ncols, nclrs; + unsigned short colors[256]; // Mapped by character index + + cp = xpm[0]; + if (sscanf(cp, "%d %d %d", &ncols, &nrows, &nclrs) != 3) { + diag_printf("Can't parse XPM data, sorry\n"); + return; + } + // diag_printf("%d rows, %d cols, %d colors\n", nrows, ncols, nclrs); + + for (i = 0; i < 256; i++) { + colors[i] = 0x0000; + } + for (i = 0; i < nclrs; i++) { + cp = xpm[i+1]; + colors[(unsigned int)*cp] = parse_color(&cp[4]); +// printf("Color[%c] = %x\n", *cp, colors[(unsigned int)*cp]); + } + + for (row = 0; row < nrows; row++) { + cp = xpm[nclrs+1+row]; + for (col = 0; col < ncols; col++) { + fp->pixels[row][col] = colors[(unsigned int)*cp++]; + } + } + // cyg_thread_delay(100); +} + +// 8x8 Font - from Helios + +#define FIRST_CHAR 0x20 +#define LAST_CHAR 0x7E +#define FONT_HEIGHT 8 +#define FONT_WIDTH 8 +#define CURSOR_ON 0x5F +#define CURSOR_OFF 0x20 +static char font_table[LAST_CHAR-FIRST_CHAR+1][8] = +{ + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* */ + { 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x00 }, /* ! */ + { 0x36, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* " */ + { 0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00 }, /* # */ + { 0x30, 0xFC, 0x16, 0x7C, 0xD0, 0x7E, 0x18, 0x00 }, /* $ */ + { 0x06, 0x66, 0x30, 0x18, 0x0C, 0x66, 0x60, 0x00 }, /* % */ + { 0x1C, 0x36, 0x36, 0x1C, 0xB6, 0x66, 0xDC, 0x00 }, /* & */ + { 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ' */ + { 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x18, 0x30, 0x00 }, /* ( */ + { 0x0C, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0C, 0x00 }, /* ) */ + { 0x00, 0x18, 0x7E, 0x3C, 0x7E, 0x18, 0x00, 0x00 }, /* * */ + { 0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00 }, /* + */ + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x0C }, /* , */ + { 0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00 }, /* - */ + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00 }, /* . */ + { 0x00, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x00, 0x00 }, /* / */ + { 0x3C, 0x66, 0x76, 0x7E, 0x6E, 0x66, 0x3C, 0x00 }, /* 0 */ + { 0x18, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00 }, /* 1 */ + { 0x3C, 0x66, 0x60, 0x30, 0x18, 0x0C, 0x7E, 0x00 }, /* 2 */ + { 0x3C, 0x66, 0x60, 0x38, 0x60, 0x66, 0x3C, 0x00 }, /* 3 */ + { 0x30, 0x38, 0x3C, 0x36, 0x7E, 0x30, 0x30, 0x00 }, /* 4 */ + { 0x7E, 0x06, 0x3E, 0x60, 0x60, 0x66, 0x3C, 0x00 }, /* 5 */ + { 0x38, 0x0C, 0x06, 0x3E, 0x66, 0x66, 0x3C, 0x00 }, /* 6 */ + { 0x7E, 0x60, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x00 }, /* 7 */ + { 0x3C, 0x66, 0x66, 0x3C, 0x66, 0x66, 0x3C, 0x00 }, /* 8 */ + { 0x3C, 0x66, 0x66, 0x7C, 0x60, 0x30, 0x1C, 0x00 }, /* 9 */ + { 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x00 }, /* : */ + { 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x0C }, /* ; */ + { 0x30, 0x18, 0x0C, 0x06, 0x0C, 0x18, 0x30, 0x00 }, /* < */ + { 0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00 }, /* = */ + { 0x0C, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0C, 0x00 }, /* > */ + { 0x3C, 0x66, 0x30, 0x18, 0x18, 0x00, 0x18, 0x00 }, /* ? */ + { 0x3C, 0x66, 0x76, 0x56, 0x76, 0x06, 0x3C, 0x00 }, /* @ */ + { 0x3C, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00 }, /* A */ + { 0x3E, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3E, 0x00 }, /* B */ + { 0x3C, 0x66, 0x06, 0x06, 0x06, 0x66, 0x3C, 0x00 }, /* C */ + { 0x1E, 0x36, 0x66, 0x66, 0x66, 0x36, 0x1E, 0x00 }, /* D */ + { 0x7E, 0x06, 0x06, 0x3E, 0x06, 0x06, 0x7E, 0x00 }, /* E */ + { 0x7E, 0x06, 0x06, 0x3E, 0x06, 0x06, 0x06, 0x00 }, /* F */ + { 0x3C, 0x66, 0x06, 0x76, 0x66, 0x66, 0x3C, 0x00 }, /* G */ + { 0x66, 0x66, 0x66, 0x7E, 0x66, 0x66, 0x66, 0x00 }, /* H */ + { 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7E, 0x00 }, /* I */ + { 0x7C, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1C, 0x00 }, /* J */ + { 0x66, 0x36, 0x1E, 0x0E, 0x1E, 0x36, 0x66, 0x00 }, /* K */ + { 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x7E, 0x00 }, /* L */ + { 0xC6, 0xEE, 0xFE, 0xD6, 0xD6, 0xC6, 0xC6, 0x00 }, /* M */ + { 0x66, 0x66, 0x6E, 0x7E, 0x76, 0x66, 0x66, 0x00 }, /* N */ + { 0x3C, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00 }, /* O */ + { 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x06, 0x00 }, /* P */ + { 0x3C, 0x66, 0x66, 0x66, 0x56, 0x36, 0x6C, 0x00 }, /* Q */ + { 0x3E, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x66, 0x00 }, /* R */ + { 0x3C, 0x66, 0x06, 0x3C, 0x60, 0x66, 0x3C, 0x00 }, /* S */ + { 0x7E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00 }, /* T */ + { 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00 }, /* U */ + { 0x66, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00 }, /* V */ + { 0xC6, 0xC6, 0xD6, 0xD6, 0xFE, 0xEE, 0xC6, 0x00 }, /* W */ + { 0x66, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x66, 0x00 }, /* X */ + { 0x66, 0x66, 0x66, 0x3C, 0x18, 0x18, 0x18, 0x00 }, /* Y */ + { 0x7E, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x7E, 0x00 }, /* Z */ + { 0x3E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x3E, 0x00 }, /* [ */ + { 0x00, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00, 0x00 }, /* \ */ + { 0x7C, 0x60, 0x60, 0x60, 0x60, 0x60, 0x7C, 0x00 }, /* ] */ + { 0x3C, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ^ */ + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF }, /* _ */ + { 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* ` */ + { 0x00, 0x00, 0x3C, 0x60, 0x7C, 0x66, 0x7C, 0x00 }, /* a */ + { 0x06, 0x06, 0x3E, 0x66, 0x66, 0x66, 0x3E, 0x00 }, /* b */ + { 0x00, 0x00, 0x3C, 0x66, 0x06, 0x66, 0x3C, 0x00 }, /* c */ + { 0x60, 0x60, 0x7C, 0x66, 0x66, 0x66, 0x7C, 0x00 }, /* d */ + { 0x00, 0x00, 0x3C, 0x66, 0x7E, 0x06, 0x3C, 0x00 }, /* e */ + { 0x38, 0x0C, 0x0C, 0x3E, 0x0C, 0x0C, 0x0C, 0x00 }, /* f */ + { 0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x3C }, /* g */ + { 0x06, 0x06, 0x3E, 0x66, 0x66, 0x66, 0x66, 0x00 }, /* h */ + { 0x18, 0x00, 0x1C, 0x18, 0x18, 0x18, 0x3C, 0x00 }, /* i */ + { 0x18, 0x00, 0x1C, 0x18, 0x18, 0x18, 0x18, 0x0E }, /* j */ + { 0x06, 0x06, 0x66, 0x36, 0x1E, 0x36, 0x66, 0x00 }, /* k */ + { 0x1C, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00 }, /* l */ + { 0x00, 0x00, 0x6C, 0xFE, 0xD6, 0xD6, 0xC6, 0x00 }, /* m */ + { 0x00, 0x00, 0x3E, 0x66, 0x66, 0x66, 0x66, 0x00 }, /* n */ + { 0x00, 0x00, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00 }, /* o */ + { 0x00, 0x00, 0x3E, 0x66, 0x66, 0x3E, 0x06, 0x06 }, /* p */ + { 0x00, 0x00, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0xE0 }, /* q */ + { 0x00, 0x00, 0x36, 0x6E, 0x06, 0x06, 0x06, 0x00 }, /* r */ + { 0x00, 0x00, 0x7C, 0x06, 0x3C, 0x60, 0x3E, 0x00 }, /* s */ + { 0x0C, 0x0C, 0x3E, 0x0C, 0x0C, 0x0C, 0x38, 0x00 }, /* t */ + { 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x7C, 0x00 }, /* u */ + { 0x00, 0x00, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x00 }, /* v */ + { 0x00, 0x00, 0xC6, 0xD6, 0xD6, 0xFE, 0x6C, 0x00 }, /* w */ + { 0x00, 0x00, 0x66, 0x3C, 0x18, 0x3C, 0x66, 0x00 }, /* x */ + { 0x00, 0x00, 0x66, 0x66, 0x66, 0x7C, 0x60, 0x3C }, /* y */ + { 0x00, 0x00, 0x7E, 0x30, 0x18, 0x0C, 0x7E, 0x00 }, /* z */ + { 0x30, 0x18, 0x18, 0x0E, 0x18, 0x18, 0x30, 0x00 }, /* { */ + { 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00 }, /* | */ + { 0x0C, 0x18, 0x18, 0x70, 0x18, 0x18, 0x0C, 0x00 }, /* } */ + { 0x8C, 0xD6, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00 } /* ~ */ +}; + +#define LCD_WIDTH 320 +#define LCD_HEIGHT 240 +#define LCD_DEPTH 16 + +// This can be 1 or 2 +#define SCREEN_SCALE 2 +#define NIBBLES_PER_PIXEL (1*SCREEN_SCALE) +#define PIXELS_PER_BYTE (2/NIBBLES_PER_PIXEL) +#define PIXEL_MASK ((1<<PIXELS_PER_BYTE)-1) + +// Physical screen info +static int lcd_depth = LCD_DEPTH; // Should be 1, 2, or 4 +static int lcd_width = LCD_WIDTH; +static int lcd_height = LCD_HEIGHT; + +// Virtual screen info +static int curX = 0; // Last used position +static int curY = 0; +static int width = LCD_WIDTH / (FONT_WIDTH*NIBBLES_PER_PIXEL); +static int height = LCD_HEIGHT / (FONT_HEIGHT*SCREEN_SCALE); +static int fg = RGB_RED(0) | RGB_GREEN(0) | RGB_BLUE(0); +static int bg = RGB_RED(31) | RGB_GREEN(63) | RGB_BLUE(31); +#define SCREEN_WIDTH (LCD_WIDTH/FONT_WIDTH) +#define SCREEN_HEIGHT (LCD_HEIGHT/FONT_HEIGHT) +static char screen[SCREEN_HEIGHT][SCREEN_WIDTH]; +#define SCREEN_START 7 + +// Functions +static void lcd_drawc(cyg_int8 c, int x, int y); + +void +lcd_init(int depth) +{ + // Currently only color/16bpp supported + + unsigned long _fp; + + // Frame buffer must be aligned on a 16 byte boundary + _fp = (((unsigned long)&lcd_frame_buffer) + 15) & ~15; + fp = (struct lcd_frame *)(_fp + SA11X0_RAM_BANK0_BASE); + // Enable LCD in 320x240 16bpp + *SA1110_DBAR1 = (unsigned long)&(fp->palette); + *SA1110_LCCR1 = 0x1D1D0930; + *SA1110_LCCR2 = 0xEF; + *SA1110_LCCR3 = 0x0c; + fp->palette[0] = 0x2000; // Tell controller 16 bits +// *SA1110_LCCR0 = 0xBB; // B&W + *SA1110_LCCR0 = 0xB9; // Color +// assabet_BCR(SA1110_BCR_LCD_BPP, SA1110_BCR_LCD_12BPP); + assabet_BCR(SA1110_BCR_LCD_BPP, SA1110_BCR_LCD_16BPP); + assabet_BCR(SA1110_BCR_LCD, SA1110_BCR_LCD_ON); + assabet_BCR(SA1110_BCR_BACKLIGHT, SA1110_BCR_BACKLIGHT); +} + +// Clear screen +void +lcd_clear(void) +{ + int row, col; + for (row = 0; row < lcd_height; row++) { + for (col = 0; col < lcd_width; col++) { + fp->pixels[row][col] = bg; + } + } + for (row = 0; row < SCREEN_HEIGHT; row++) { + for (col = 0; col < SCREEN_WIDTH; col++) { + screen[row][col] = ' '; + } + } + // Note: Row 0 seems to wrap incorrectly + curX = 0; curY = SCREEN_START; + lcd_drawc(CURSOR_ON, curX, curY); + show_xpm(banner_xpm); +} + +// Position cursor +void +lcd_moveto(int X, int Y) +{ + lcd_drawc(CURSOR_OFF, curX, curY); + if (X < 0) X = 0; + if (X >= SCREEN_WIDTH) X = SCREEN_WIDTH-1; + curX = X; + if (Y < SCREEN_START) Y = SCREEN_START; + if (Y >= SCREEN_HEIGHT) Y = SCREEN_HEIGHT-1; + curY = Y; + lcd_drawc(CURSOR_ON, curX, curY); +} + +// Render a character at position (X,Y) with current background/foreground +static void +lcd_drawc(cyg_int8 c, int x, int y) +{ + // Currently hard-coded for 16bpp + cyg_uint8 bits; + cyg_uint16 *pixels; + int l, p, w; + + screen[curY][curX] = c; + for (l = 0; l < FONT_HEIGHT; l++) { + bits = font_table[c-FIRST_CHAR][l]; + pixels = &fp->pixels[curY*FONT_HEIGHT+l][curX*FONT_WIDTH]; + for (p = 0; p < 8; p++) { + if (bits & 0x01) { + *pixels++ = fg; + } else { + *pixels++ = bg; + } + bits >>= 1; + } + } +} + +static void +lcd_scroll(void) +{ + int row, col; + cyg_uint8 *c1, *c2; + cyg_uint16 *p1, *p2; + + // First scroll up the virtual screen + for (row = SCREEN_START; row < SCREEN_HEIGHT; row++) { + c1 = &screen[row-1][0]; + c2 = &screen[row][0]; + for (col = 0; col < SCREEN_WIDTH; col++) { + *c1++ = *c2++; + } + } + c1 = &screen[SCREEN_HEIGHT-1][0]; + for (col = 0; col < SCREEN_WIDTH; col++) { + *c1++ = 0x20; + } + // Now the physical screen + for (row = FONT_HEIGHT*(SCREEN_START+1); row < LCD_HEIGHT; row++) { + p1 = &fp->pixels[row-FONT_HEIGHT][0]; + p2 = &fp->pixels[row][0]; + for (col = 0; col < LCD_WIDTH; col++) { + *p1++ = *p2++; + } + } + for (row = LCD_HEIGHT-FONT_HEIGHT; row < LCD_HEIGHT; row++) { + p1 = &fp->pixels[row][0]; + for (col = 0; col < LCD_WIDTH; col++) { + *p1++ = bg; + } + } +} + +// Draw one character at the current position +void +lcd_putc(cyg_int8 c) +{ + lcd_drawc(CURSOR_OFF, curX, curY); + switch (c) { + case '\r': + curX = 0; + break; + case '\n': + curY++; + if (curY == SCREEN_HEIGHT) { + lcd_scroll(); + curY--; + } + break; + case '\b': + curX--; + if (curX < 0) { + curY--; + if (curY < 0) curY = 0; + curX = SCREEN_WIDTH-1; + } + break; + default: + lcd_drawc(c, curX, curY); + curX++; + if (curX == SCREEN_WIDTH) { + curY++; + curX = 0; + } + } + lcd_drawc(CURSOR_ON, curX, curY); +} + +// Basic LCD 'printf()' support + +#include <stdarg.h> + +#define is_digit(c) ((c >= '0') && (c <= '9')) + +static int +_cvt(unsigned long val, char *buf, long radix, char *digits) +{ + char temp[80]; + char *cp = temp; + int length = 0; + if (val == 0) { + /* Special case */ + *cp++ = '0'; + } else { + while (val) { + *cp++ = digits[val % radix]; + val /= radix; + } + } + while (cp != temp) { + *buf++ = *--cp; + length++; + } + *buf = '\0'; + return (length); +} + +int +lcd_vprintf(void (*putc)(cyg_int8), const char *fmt0, va_list ap) +{ + char c, sign, *cp; + int left_prec, right_prec, zero_fill, length, pad, pad_on_right; + char buf[32]; + long val; + while ((c = *fmt0++)) { + cp = buf; + length = 0; + if (c == '%') { + c = *fmt0++; + left_prec = right_prec = pad_on_right = 0; + if (c == '-') { + c = *fmt0++; + pad_on_right++; + } + if (c == '0') { + zero_fill = TRUE; + c = *fmt0++; + } else { + zero_fill = FALSE; + } + while (is_digit(c)) { + left_prec = (left_prec * 10) + (c - '0'); + c = *fmt0++; + } + if (c == '.') { + c = *fmt0++; + zero_fill++; + while (is_digit(c)) { + right_prec = (right_prec * 10) + (c - '0'); + c = *fmt0++; + } + } else { + right_prec = left_prec; + } + sign = '\0'; + switch (c) { + case 'd': + case 'x': + case 'X': + val = va_arg(ap, long); + switch (c) { + case 'd': + if (val < 0) { + sign = '-'; + val = -val; + } + length = _cvt(val, buf, 10, "0123456789"); + break; + case 'x': + length = _cvt(val, buf, 16, "0123456789abcdef"); + break; + case 'X': + length = _cvt(val, buf, 16, "0123456789ABCDEF"); + break; + } + break; + case 's': + cp = va_arg(ap, char *); + length = strlen(cp); + break; + case 'c': + c = va_arg(ap, long /*char*/); + (*putc)(c); + continue; + default: + (*putc)('?'); + } + pad = left_prec - length; + if (sign != '\0') { + pad--; + } + if (zero_fill) { + c = '0'; + if (sign != '\0') { + (*putc)(sign); + sign = '\0'; + } + } else { + c = ' '; + } + if (!pad_on_right) { + while (pad-- > 0) { + (*putc)(c); + } + } + if (sign != '\0') { + (*putc)(sign); + } + while (length-- > 0) { + (*putc)(c = *cp++); + if (c == '\n') { + (*putc)('\r'); + } + } + if (pad_on_right) { + while (pad-- > 0) { + (*putc)(' '); + } + } + } else { + (*putc)(c); + if (c == '\n') { + (*putc)('\r'); + } + } + } +} + +int +lcd_printf(char const *fmt, ...) +{ + int ret; + va_list ap; + + va_start(ap, fmt); + ret = lcd_vprintf(lcd_putc, fmt, ap); + va_end(ap); + return (ret); +} + +void +set_bg(int red, int green, int blue) +{ + bg = RGB_RED(red) | RGB_GREEN(green) | RGB_BLUE(blue); +} + +void +set_fg(int red, int green, int blue) +{ + fg = RGB_RED(red) | RGB_GREEN(green) | RGB_BLUE(blue); +}
--- a/packages/hal/arm/sa11x0/assabet/current/src/redboot_cmds.c +++ b/packages/hal/arm/sa11x0/assabet/current/src/redboot_cmds.c @@ -100,7 +100,7 @@ do_exec(int argc, char *argv[]) HAL_DCACHE_INVALIDATE_ALL(); ip = (unsigned long *)_prg; // Not call this code - fun = (code_fun *)(entry + SA11X0_RAM_BANK0_BASE); // Absolute address + fun = (code_fun *)((entry & 0x0FFFFFFF) + SA11X0_RAM_BANK0_BASE); // Absolute address prg = (code_fun *)((unsigned long)ip + SA11X0_RAM_BANK0_BASE); // Absolute address asm volatile ("mov r5,%0" : : "r"(fun) : "r5"); asm volatile ("mov r1,%0; mov pc,r1" : : "r"(prg));
--- a/packages/hal/sh/arch/current/ChangeLog +++ b/packages/hal/sh/arch/current/ChangeLog @@ -1,3 +1,79 @@ +2000-10-11 Jesper Skov <jskov@redhat.com> + + * src/vectors.S (__reset_platform): Clear watchdog control flags. + Added missing NOP in bra delay slot. + + * src/hal_misc.c (hal_delay_us): Updated to use the correct config + constants. + + * cdl/hal_sh.cdl: Fix typo. + + * include/sh_regs.h: Added macros to compute CYGARC_RTCSR init + values for SDRAM refresh. Needs to be backed up by generic CDL + configury for memory controller. + +2000-10-10 Jesper Skov <jskov@redhat.com> + + * include/sh_regs.h: Compute CPG init value for all versions. + + * include/mod_7707a.h: Added CPG version. + * include/mod_7708.h: Same. + * include/mod_7709a.h: Same. + * include/mod_7729.h: Same. + + * cdl/hal_sh.cdl: Support various CPG versions. + +2000-10-05 Jesper Skov <jskov@redhat.co.uk> + + * src/sh_stub.c: Handle UBC versions in CPUs currently supported + by HAL. + * include/sh_regs.h: Added UBC version differences. + * include/mod_7707a.h: Specify UBC version. + * include/mod_7708.h: Ditto. + * include/mod_7709a.h: Ditto. + * include/mod_7729.h: Ditto. + + * src/hal_misc.c: Skip IRQ0-3 handling in IRQIRL mode. + * include/sh_regs.h: Define interrupt controler init value. + * src/vectors.S: Use interrupt controller init value. + * cdl/hal_sh.cdl: Put CPU type/endian mode in a component. Added + interrupt control options. + +2000-10-03 Jesper Skov <jskov@redhat.co.uk> + + * src/vectors.S: Added flush function. Changes to cache_write_mode + function. + + * src/hal_mk_defs.c: Added cache definitions. + + * src/hal_misc.c (cyg_hal_enable_caches): Let config control cache + init. + * include/hal_cache.h: Added flush macro. Changes to allow + mode function to handle different settings for the two + controllable areas. + + * cdl/hal_sh.cdl: Added cache controls. + +2000-09-26 Jesper Skov <jskov@redhat.com> + + * include/sh_regs.h: Added computation of initial FRQCR + value. Made watchdog timeout time depend on the proper clock + setting. + + * include/hal_intr.h (HAL_CLOCK_INITIALIZE): Allow timer + prescaling to be controlled. Fix typo. + + * cdl/hal_sh.cdl: Added options to properly compute/control the + various clock signals. + +2000-09-25 Jesper Skov <jskov@redhat.com> + + * src/sh3_scif.c (cyg_hal_plf_scif_init_channel): Use _SCBRR_ + macros. + + * include/sh_regs.h (CYGARC_SCBRR_CKSx, CYGARC_SCBRR_N): Removed + duplicates of the macros. Compute _CKSx properly. + 2000-09-06 Gary Thomas <gthomas@redhat.com> * include/mod_7729.h: Includes PFC (programmable I/O) module.
--- a/packages/hal/sh/arch/current/cdl/hal_sh.cdl +++ b/packages/hal/sh/arch/current/cdl/hal_sh.cdl @@ -91,90 +91,351 @@ cdl_package CYGPKG_HAL_SH { @rm target.tmp } - cdl_option CYGPKG_HAL_SH_7707A { - display "SH 7707A microprocessor" - implements CYGINT_HAL_SH_VARIANT - default_value 0 + + cdl_component CYGPKG_HAL_SH_CPU { + display "CPU type and endian mode controls" + flavor none no_define - define -file=system.h CYGPKG_HAL_SH_7707A - description " - The SH3 7707A microprocessor. This is an embedded part that in - addition to the SH3 processor core has built in peripherals - such as memory controllers, serial ports, LCD controller and - timers/counters." - define_proc { - puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H <cyg/hal/mod_7707a.h>" + description " + CPU type and endian mode can be selected using these option." + + cdl_option CYGPKG_HAL_SH_7707A { + display "SH 7707A microprocessor" + implements CYGINT_HAL_SH_VARIANT + implements CYGINT_HAL_SH_CPG_V2 + default_value 0 + no_define + define -file=system.h CYGPKG_HAL_SH_7707A + description " + The SH3 7707A microprocessor. This is an embedded part that in + addition to the SH3 processor core has built in peripherals + such as memory controllers, serial ports, LCD controller and + timers/counters." + define_proc { + puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H <cyg/hal/mod_7707a.h>" + } + } + + cdl_option CYGPKG_HAL_SH_7708 { + display "SH 7708 microprocessor" + implements CYGINT_HAL_SH_VARIANT + implements CYGINT_HAL_SH_CPG_V1 + default_value 0 + no_define + define -file=system.h CYGPKG_HAL_SH_7708 + description " + The SH3 7708 microprocessor. This is an embedded part that in + addition to the SH3 processor core has built in peripherals + such as memory controllers, serial ports and + timers/counters." + define_proc { + puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H <cyg/hal/mod_7708.h>" + } + } + + cdl_option CYGPKG_HAL_SH_7709A { + display "SH 7709A microprocessor" + implements CYGINT_HAL_SH_VARIANT + implements CYGINT_HAL_SH_CPG_V3 + default_value 0 + no_define + define -file=system.h CYGPKG_HAL_SH_7709A + description " + The SH3 7709A microprocessor. This is an embedded part that in + addition to the SH3 processor core has built in peripherals + such as memory controllers, DMA controllers, A/D and D/A + converters, serial ports and timers/counters." + define_proc { + puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H <cyg/hal/mod_7709a.h>" + } + } + + cdl_option CYGPKG_HAL_SH_7729 { + display "SH 7729 microprocessor" + implements CYGINT_HAL_SH_VARIANT + implements CYGINT_HAL_SH_CPG_V3 + default_value 0 + no_define + define -file=system.h CYGPKG_HAL_SH_7729 + description " + The SH3 7729 microprocessor. This is an embedded part that in + addition to the SH3 processor core has built in peripherals + such as memory controllers, serial ports, and timers/counters, + and a DSP engine." + define_proc { + puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H <cyg/hal/mod_7729.h>" + } + } + + cdl_option CYGHWR_HAL_SH_BIGENDIAN { + display "Use big-endian mode" + default_value 1 + description " + Use the CPU in big-endian mode." } } - - cdl_option CYGPKG_HAL_SH_7708 { - display "SH 7708 microprocessor" - implements CYGINT_HAL_SH_VARIANT - default_value 0 + + cdl_component CYGPKG_HAL_SH_INTERRUPT { + display "Interrupt controls" + flavor none no_define - define -file=system.h CYGPKG_HAL_SH_7708 - description " - The SH3 7708 microprocessor. This is an embedded part that in - addition to the SH3 processor core has built in peripherals - such as memory controllers, serial ports and - timers/counters." - define_proc { - puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H <cyg/hal/mod_7708.h>" + description " + Initial interrupt settings can be specified using these option." + + cdl_option CYGHWR_HAL_SH_IRQ_HANDLE_SPURIOUS_INTERRUPTS { + display "Handle spurious interrupts" + default_value 0 + description " + The SH3 may generate spurious interrupts with INTEVT = 0 + when changing the BL bit of the status register. Enabling + this option will cause such interrupts to be identified + very early in the interrupt handler and be ignored. Given + that the SH HAL uses the I-mask to control interrupts, + these spurious interrupts should not occur, and so there + should be no reason to include the special handling code." + } + + cdl_option CYGHWR_HAL_SH_IRQ_USE_IRQLVL { + display "Use IRQ0-3 pins as IRL input" + default_value 0 + description " + It is possible for the IRQ0-3 pins to be used as IRL + inputs by enabling this option." + } + + cdl_option CYGHWR_HAL_SH_IRQ_ENABLE_IRLS_INTERRUPTS { + display "Enable IRLS interrupt pins" + default_value 0 + active_if CYGHWR_HAL_SH_IRQ_USE_IRQLVL + description " + IRLS interrupt pins must be specifically + activated. When they are, they will cause the same + type of interrupt as those caused by the IRL pins. If + IRL and IRLS pins signal an interrupt at the same + time, the highest level interrupt will be generated. + Only available on some cores, and probably share pins + with other interrupt sources (PINT) which cannot be + used in this configuration." } } - cdl_option CYGPKG_HAL_SH_7709A { - display "SH 7709A microprocessor" - implements CYGINT_HAL_SH_VARIANT - default_value 0 + cdl_component CYGPKG_HAL_SH_CACHE { + display "Cache controls" + flavor none no_define - define -file=system.h CYGPKG_HAL_SH_7709A - description " - The SH3 7709A microprocessor. This is an embedded part that in - addition to the SH3 processor core has built in peripherals - such as memory controllers, DMA controllers, A/D and D/A - converters, serial ports and timers/counters." - define_proc { - puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H <cyg/hal/mod_7709a.h>" + description " + Initial cache settings can be specified using these options." + + cdl_option CYGHWR_HAL_SH_CACHE_ENABLE { + display "Enable cache on startup" + default_value 1 + description " + Controls whether caches should be enabled on startup." + } + + cdl_option CYGHWR_HAL_SH_CACHE_MODE_P0 { + display "Select cache mode set for P0/U0/P3 at startup" + default_value { "WRITE_BACK" } + legal_values { "WRITE_BACK" "WRITE_THROUGH" } + flavor data + description " + Controls what cache mode the cache should be put in at + startup for areas P0, U0 and P3. Write-back mode improves + performance by letting dirty data to be kept in the + cache for a period of time, allowing mutiple writes to + the same cache line to be written back to memory in + one memory transaction. In Write-through mode, each + individual write will cause a memory transaction." + } + + cdl_option CYGHWR_HAL_SH_CACHE_MODE_P1 { + display "Select cache mode set for P1 at startup" + default_value { "WRITE_BACK" } + legal_values { "WRITE_BACK" "WRITE_THROUGH" } + flavor data + description " + Controls what cache mode the cache should be put in at + startup for area P1. Write-back mode improves + performance by letting dirty data to be kept in the + cache for a period of time, allowing mutiple writes to + the same cache line to be written back to memory in + one memory transaction. In Write-through mode, each + individual write will cause a memory transaction." } } - cdl_option CYGPKG_HAL_SH_7729 { - display "SH 7729 microprocessor" - implements CYGINT_HAL_SH_VARIANT - default_value 0 + + cdl_component CYGHWR_HAL_SH_CLOCK_SETTINGS { + display "SH on-chip generic clock controls" + description " + The various clocks used by the system are controlled by + these options, some of which are derived from platform + settings." + flavor none no_define - define -file=system.h CYGPKG_HAL_SH_7729 - description " - The SH3 7729 microprocessor. This is an embedded part that in - addition to the SH3 processor core has built in peripherals - such as memory controllers, serial ports, and timers/counters, - and a DSP engine." - define_proc { - puts $cdl_system_header "#define CYGBLD_HAL_CPU_MODULES_H <cyg/hal/mod_7729.h>" + + cdl_interface CYGINT_HAL_SH_CPG_V1 { + display "Clock pulse generator type 1" + } + + cdl_interface CYGINT_HAL_SH_CPG_V2 { + display "Clock pulse generator type 2" + } + + cdl_interface CYGINT_HAL_SH_CPG_V3 { + display "Clock pulse generator type 3" + } + + + cdl_option CYGHWR_HAL_SH_TMU_PRESCALE_0 { + display "TMU counter 0 prescaling" + description " + The peripheral clock is driving the counter used for + the real-time clock, prescaled by this factor." + flavor data + legal_values { 4 16 64 256 } + default_value 4 + } + + + cdl_option CYGHWR_HAL_SH_CLOCK_CKIO { + display "CKIO clock" + no_define + flavor data + # CKIO is either XTAL or PLL2 output + calculated { CYGINT_HAL_SH_CPG_V1 ? ( + (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 7) + ? (CYGHWR_HAL_SH_OOC_XTAL) + : CYGHWR_HAL_SH_PLL2_OUTPUT + ) + : CYGINT_HAL_SH_CPG_V2 ? ( + (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 2) + ? (CYGHWR_HAL_SH_OOC_XTAL) + : CYGHWR_HAL_SH_PLL2_OUTPUT + ) + : CYGINT_HAL_SH_CPG_V3 ? ( + (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 7) + ? (CYGHWR_HAL_SH_OOC_XTAL) + : CYGHWR_HAL_SH_PLL2_OUTPUT + ) + : 0 } + } + + cdl_option CYGHWR_HAL_SH_PLL1_OUTPUT { + display "The clock output from PLL1" + no_define + flavor data + calculated { CYGHWR_HAL_SH_CLOCK_CKIO * CYGHWR_HAL_SH_OOC_PLL_1 } + } + + cdl_option CYGHWR_HAL_SH_PLL2_OUTPUT { + display "The clock output from PLL2" + no_define + flavor data + calculated { CYGINT_HAL_SH_CPG_V1 ? ( + (CYGHWR_HAL_SH_OOC_XTAL * CYGHWR_HAL_SH_OOC_PLL_2) + ) + : CYGINT_HAL_SH_CPG_V2 ? ( + (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 5) + ? (CYGHWR_HAL_SH_OOC_XTAL / 2) + : (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 6) + ? (14745600) + : (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 7) + ? (11075600) + : (CYGHWR_HAL_SH_OOC_XTAL * CYGHWR_HAL_SH_OOC_PLL_2) + ) + : CYGINT_HAL_SH_CPG_V3 ? ( + (CYGHWR_HAL_SH_OOC_XTAL * CYGHWR_HAL_SH_OOC_PLL_2) + ) + : 0 } + } + + + cdl_option CYGHWR_HAL_SH_DIVIDER1_INPUT { + display "The clock input to divider 1" + no_define + flavor data + # DIV1 input is either PLL2 output or PLL1 output + calculated { (CYGHWR_HAL_SH_OOC_PLL_1 == 0) + ? CYGHWR_HAL_SH_PLL2_OUTPUT + : CYGHWR_HAL_SH_PLL1_OUTPUT } + } + + cdl_option CYGHWR_HAL_SH_DIVIDER2_INPUT { + display "The clock input to divider 2" + no_define + flavor data + # DIV2 input is either PLL2 output or PLL1 output + calculated { CYGINT_HAL_SH_CPG_V1 ? ( + (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 3 || CYGHWR_HAL_SH_OOC_CLOCK_MODE == 4) + ? CYGHWR_HAL_SH_PLL2_OUTPUT + : CYGHWR_HAL_SH_PLL1_OUTPUT + ) + : CYGINT_HAL_SH_CPG_V2 ? ( + (CYGHWR_HAL_SH_OOC_CLOCK_MODE <= 2) + ? CYGHWR_HAL_SH_PLL1_OUTPUT + : CYGHWR_HAL_SH_PLL2_OUTPUT + ) + : CYGINT_HAL_SH_CPG_V3 ? ( + (CYGHWR_HAL_SH_OOC_CLOCK_MODE == 3 || CYGHWR_HAL_SH_OOC_CLOCK_MODE == 4) + ? CYGHWR_HAL_SH_PLL2_OUTPUT + : CYGHWR_HAL_SH_PLL1_OUTPUT + ) + : 0 } + } + + cdl_option CYGHWR_HAL_SH_PROCESSOR_SPEED { + display "Processor clock speed (MHz)" + flavor data + calculated { CYGHWR_HAL_SH_DIVIDER1_INPUT / CYGHWR_HAL_SH_OOC_DIVIDER_1 } + description " + The core (CPU, cache and MMU) speed is computed from + the input clock speed and the divider 1 setting." + } + + cdl_option CYGHWR_HAL_SH_BOARD_SPEED { + display "Platform bus clock speed (MHz)" + flavor data + calculated { CYGHWR_HAL_SH_CLOCK_CKIO } + description " + The platform bus speed is CKIO." + } + + cdl_option CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED { + display "Processor on-chip peripheral clock speed (MHz)" + flavor data + calculated { CYGHWR_HAL_SH_DIVIDER2_INPUT / CYGHWR_HAL_SH_OOC_DIVIDER_2 } + description " + The peripheral speed is computed from the input clock + speed and the divider 2 settings." } } - cdl_option CYGHWR_HAL_SH_BIGENDIAN { - display "Use big-endian mode" - default_value 1 - description " - Use the CPU in big-endian mode." + # Real-time clock/counter specifics + cdl_component CYGNUM_HAL_RTC_CONSTANTS { + display "Real-time clock constants." + description " + The HAL uses TMU counter 0 for driving the real-time + clock." + flavor none + + cdl_option CYGNUM_HAL_RTC_NUMERATOR { + display "Real-time clock numerator" + flavor data + calculated 1000000000 + } + cdl_option CYGNUM_HAL_RTC_DENOMINATOR { + display "Real-time clock denominator" + flavor data + calculated 100 + } + cdl_option CYGNUM_HAL_RTC_PERIOD { + display "Real-time clock period" + flavor data + calculated { CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED/CYGNUM_HAL_RTC_DENOMINATOR / CYGHWR_HAL_SH_TMU_PRESCALE_0 } + } } - cdl_option CYGHWR_HAL_SH_HANDLE_SPURIOUS_INTERRUPTS { - display "Handle spurious interrupts" - default_value 0 - description " - The SH3 may generate spurious interrupts with INTEVT = 0 - when changing the BL bit of the status register. Enabling - this option will cause such interrupts to be identified - very early in the interrupt handler and be ignored. Given - that the SH HAL uses the I-mask to control interrupts, - these spurious interrupts should not occur, and so there - should be no reason to include the special handling code." - } - cdl_option CYGBLD_LINKER_SCRIPT { display "Linker script" flavor data
--- a/packages/hal/sh/arch/current/include/hal_cache.h +++ b/packages/hal/sh/arch/current/include/hal_cache.h @@ -88,6 +88,8 @@ externC void cyg_hal_cache_enable(void); externC void cyg_hal_cache_disable(void); externC void cyg_hal_cache_invalidate_all(void); externC void cyg_hal_cache_sync(void); +externC void cyg_hal_cache_sync_region(cyg_haladdress base, + cyg_haladdrword len); externC void cyg_hal_cache_write_mode(int mode); // Enable the cache @@ -113,11 +115,23 @@ externC void cyg_hal_cache_write_mode(in //#define HAL_UCACHE_BURST_SIZE(_size_) // Set the cache write mode -#define HAL_UCACHE_WRITE_MODE( _mode_ ) cyg_hal_cache_write_mode(_mode_) +#define HAL_UCACHE_WRITE_MODE( _mode_ ) \ + CYG_MACRO_START \ + cyg_uint32 _m_; \ + if (HAL_UCACHE_WRITETHRU_MODE == _mode_) \ + _m_ = CYGARC_REG_CCR_WT; \ + else \ + _m_ = CYGARC_REG_CCR_CB; \ + cyg_hal_cache_write_mode(_m_); \ + CYG_MACRO_END #define HAL_UCACHE_WRITETHRU_MODE 0 #define HAL_UCACHE_WRITEBACK_MODE 1 +// This macro allows the client to specify separate modes for the two +// regions. +#define HAL_UCACHE_WRITE_MODE_SH( _mode_ ) cyg_hal_cache_write_mode(_mode_) + // Load the contents of the given address range into the cache // and then lock the cache so that it stays there. //#define HAL_UCACHE_LOCK(_base_, _size_) @@ -137,7 +151,8 @@ externC void cyg_hal_cache_write_mode(in // Write dirty cache lines to memory and invalidate the cache entries // for the given address range. -//#define HAL_UCACHE_FLUSH( _base_ , _size_ ) +#define HAL_UCACHE_FLUSH( _base_ , _size_ ) \ + cyg_hal_cache_sync_region(_base_, _size_) // Invalidate cache lines in the given range without writing to memory. //#define HAL_UCACHE_INVALIDATE( _base_ , _size_ ) @@ -145,6 +160,7 @@ externC void cyg_hal_cache_write_mode(in // Write dirty cache lines to memory for the given address range. //#define HAL_UCACHE_STORE( _base_ , _size_ ) + // Preread the given range into the cache with the intention of reading // from it later. //#define HAL_UCACHE_READ_HINT( _base_ , _size_ ) @@ -211,7 +227,7 @@ externC void cyg_hal_cache_write_mode(in // Write dirty cache lines to memory and invalidate the cache entries // for the given address range. -//#define HAL_DCACHE_FLUSH( _base_ , _size_ ) +#define HAL_DCACHE_FLUSH( _base_ , _size_ ) HAL_UCACHE_FLUSH( _base_, _size_ ) // Invalidate cache lines in the given range without writing to memory. //#define HAL_DCACHE_INVALIDATE( _base_ , _size_ )
--- a/packages/hal/sh/arch/current/include/hal_intr.h +++ b/packages/hal/sh/arch/current/include/hal_intr.h @@ -161,7 +161,7 @@ #define CYGNUM_HAL_INTERRUPT_IRDA_BRI1 56 #define CYGNUM_HAL_INTERRUPT_IRDA_TXI1 57 #define CYGNUM_HAL_INTERRUPT_SCIF_ERI2 58 -#define CYGNUM_HAL_INTERRUPT_SCIF_RXI2 69 +#define CYGNUM_HAL_INTERRUPT_SCIF_RXI2 59 #define CYGNUM_HAL_INTERRUPT_SCIF_BRI2 60 #define CYGNUM_HAL_INTERRUPT_SCIF_TXI2 61 #define CYGNUM_HAL_INTERRUPT_ADC_ADI 62 @@ -440,32 +440,35 @@ externC void hal_interrupt_configure(int hal_interrupt_configure(_vector_, _level_, _up_); //-------------------------------------------------------------------------- -// Clock control +// Clock control, using TMU counter 0. -// Using TMU counter 0, clocked at p/4, with peripheral clock -// sourced directly from the 15MHz crystal (which is the default setup -// on the EDK). This means 150000/4 oscillations in 1/100 second. -#define HAL_CLOCK_INITIALIZE( _period_ ) \ - CYG_MACRO_START \ - register cyg_uint8 _tstr_; \ - \ - /* Disable timer while programming it. */ \ - HAL_READ_UINT8(CYGARC_REG_TSTR, _tstr_); \ - _tstr_ &= ~CYGARC_REG_TSTR_STR0; \ - HAL_WRITE_UINT8(CYGARC_REG_TSTR, _tstr_); \ - \ - /* Set counter registers. */ \ - HAL_WRITE_UINT32(CYGARC_REG_TCOR0, (_period_)); \ - HAL_WRITE_UINT32(CYGARC_REG_TCNT0, (_period_)); \ - \ - /* Set interrupt on underflow, decrement frequency at 1/4 of */ \ - /* peripheral clock. */ \ - HAL_WRITE_UINT16(CYGARC_REG_TCR0, CYGARC_REG_TCR_UNIE); \ - \ - /* Enable timer. */ \ - _tstr_ |= CYGARC_REG_TSTR_STR0; \ - HAL_WRITE_UINT8(CYGARC_REG_TSTR, _tstr_); \ - \ +#define HAL_CLOCK_INITIALIZE( _period_ ) \ + CYG_MACRO_START \ + register cyg_uint8 _tstr_; \ + \ + /* Disable timer while programming it. */ \ + HAL_READ_UINT8(CYGARC_REG_TSTR, _tstr_); \ + _tstr_ &= ~CYGARC_REG_TSTR_STR0; \ + HAL_WRITE_UINT8(CYGARC_REG_TSTR, _tstr_); \ + \ + /* Set counter registers. */ \ + HAL_WRITE_UINT32(CYGARC_REG_TCOR0, (_period_)); \ + HAL_WRITE_UINT32(CYGARC_REG_TCNT0, (_period_)); \ + \ + /* Set interrupt on underflow and decrement frequency */ \ + HAL_WRITE_UINT16(CYGARC_REG_TCR0, CYGARC_REG_TCR_UNIE | \ + ((4==CYGHWR_HAL_SH_TMU_PRESCALE_0) ? \ + CYGARC_REG_TCR_TPSC_4 : \ + (16==CYGHWR_HAL_SH_TMU_PRESCALE_0) ? \ + CYGARC_REG_TCR_TPSC_16: \ + (64==CYGHWR_HAL_SH_TMU_PRESCALE_0) ? \ + CYGARC_REG_TCR_TPSC_64:CYGARC_REG_TCR_TPSC_256)); \ + \ + \ + /* Enable timer. */ \ + _tstr_ |= CYGARC_REG_TSTR_STR0; \ + HAL_WRITE_UINT8(CYGARC_REG_TSTR, _tstr_); \ + \ CYG_MACRO_END #define HAL_CLOCK_RESET( _vector_, _period_ ) \
--- a/packages/hal/sh/arch/current/include/mod_7707a.h +++ b/packages/hal/sh/arch/current/include/mod_7707a.h @@ -54,7 +54,8 @@ #define CYGARC_SH_MOD_IRDA #define CYGARC_SH_MOD_SCIF #define CYGARC_SH_MOD_PFC -#define CYGARC_SH_MOD_UBC +#define CYGARC_SH_MOD_UBC_V1 +#define CYGARC_SH_MOD_CPG_V2 //----------------------------------------------------------------------------- // Extra details for Cache Module (CAC)
--- a/packages/hal/sh/arch/current/include/mod_7708.h +++ b/packages/hal/sh/arch/current/include/mod_7708.h @@ -49,7 +49,8 @@ // Modules provided by the CPU #define CYGARC_SH_MOD_SCI_V2 -#define CYGARC_SH_MOD_UBC +#define CYGARC_SH_MOD_UBC_V1 +#define CYGARC_SH_MOD_CPG_V1 //-----------------------------------------------------------------------------
--- a/packages/hal/sh/arch/current/include/mod_7709a.h +++ b/packages/hal/sh/arch/current/include/mod_7709a.h @@ -53,7 +53,9 @@ #define CYGARC_SH_MOD_IRDA #define CYGARC_SH_MOD_SCIF #define CYGARC_SH_MOD_PFC -#define CYGARC_SH_MOD_UBC +#define CYGARC_SH_MOD_UBC_V2 +#define CYGARC_SH_MOD_DMAC +#define CYGARC_SH_MOD_CPG_V3 //----------------------------------------------------------------------------- // Extra details for Cache Module (CAC)
--- a/packages/hal/sh/arch/current/include/mod_7729.h +++ b/packages/hal/sh/arch/current/include/mod_7729.h @@ -54,7 +54,8 @@ #define CYGARC_SH_MOD_PFC #define CYGARC_SH_MOD_IRDA #define CYGARC_SH_MOD_SCIF -#define CYGARC_SH_MOD_UBC +#define CYGARC_SH_MOD_UBC_V3 +#define CYGARC_SH_MOD_CPG_V3 //----------------------------------------------------------------------------- // Extra details for Cache Module (CAC)
--- a/packages/hal/sh/arch/current/include/sh_regs.h +++ b/packages/hal/sh/arch/current/include/sh_regs.h @@ -116,6 +116,17 @@ #define CYGARC_REG_CCR_CE 0x00000001 +//-------------------------------------------------------------------------- +// Address array access +// Address part (base/top/step specified in mod file) +#define CYGARC_REG_CACHE_ADDRESS_ADDRESS 0x00000008 // compare address + +// Data part +#define CYGARC_REG_CACHE_ADDRESS_TAG_Mask 0x1ffffc00 +#define CYGARC_REG_CACHE_ADDRESS_U 0x00000002 // updated (contains dirty data) +#define CYGARC_REG_CACHE_ADDRESS_V 0x00000001 // valid + + //++++++ Module BSC ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ //-------------------------------------------------------------------------- @@ -225,6 +236,32 @@ #define CYGARC_REG_WCR2_10WS 7 +//----------------------------------------------------------------------------- +// Calculate constants needed to drive the proper SDRAM refresh rate. Argument +// is delay between required refresh events in microseconds (us). Should be +// available off the SDRAM spec sheet. +// These should be a part of a fully CDLicized memory controller setup. +#define CYGARC_RTCSR_PRESCALE(_r_) \ +(((CYGHWR_HAL_SH_BOARD_SPEED*(_r_)/(4*1000000))<256) ? 4 : \ + ((CYGHWR_HAL_SH_BOARD_SPEED*(_r_)/(16*1000000))<256) ? 16 : \ + ((CYGHWR_HAL_SH_BOARD_SPEED*(_r_)/(64*1000000))<256) ? 64 : \ + ((CYGHWR_HAL_SH_BOARD_SPEED*(_r_)/(256*1000000))<256) ? 256 : \ + ((CYGHWR_HAL_SH_BOARD_SPEED*(_r_)/(1024*1000000))<256) ? 1024 : \ + ((CYGHWR_HAL_SH_BOARD_SPEED*(_r_)/(2048*1000000))<256) ? 2048 : 4096) + +// These two macros provide the static values we need to stuff into the +// registers. +#define CYGARC_RTCSR_CKSx(_r_) \ + (( 4 == CYGARC_RTCSR_PRESCALE(_r_)) ? 0x08 : \ + ( 16 == CYGARC_RTCSR_PRESCALE(_r_)) ? 0x10 : \ + ( 64 == CYGARC_RTCSR_PRESCALE(_r_)) ? 0x18 : \ + ( 256 == CYGARC_RTCSR_PRESCALE(_r_)) ? 0x20 : \ + (1024 == CYGARC_RTCSR_PRESCALE(_r_)) ? 0x28 : \ + (2048 == CYGARC_RTCSR_PRESCALE(_r_)) ? 0x30 : 0x38 ) + +#define CYGARC_RTCSR_N(_r_) \ + (CYGHWR_HAL_SH_BOARD_SPEED*(_r_)/(CYGARC_RTCSR_PRESCALE(_r_)*1000000)) + //++++++ Module UBC ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -233,17 +270,22 @@ #define CYGARC_REG_BRCR 0xffffff98 // 16 bit #define CYGARC_REG_BARA 0xffffffb0 // 32 bit -#define CYGARC_REG_BAMRA 0xffffffb4 // 8 bit +#define CYGARC_REG_BAMRA 0xffffffb4 // 8 bit (v1) / 32 bit #define CYGARC_REG_BBRA 0xffffffb8 // 16 bit #define CYGARC_REG_BASRA 0xffffffe4 // 8 bit #define CYGARC_REG_BARB 0xffffffa0 // 32 bit -#define CYGARC_REG_BAMRB 0xffffffa4 // 8 bit +#define CYGARC_REG_BAMRB 0xffffffa4 // 8 bit (v1) / 32 bit #define CYGARC_REG_BASRB 0xffffffe8 // 8 bit #define CYGARC_REG_BBRB 0xffffffa8 // 16 bit #define CYGARC_REG_BDRB 0xffffff90 // 32 bit #define CYGARC_REG_BDMRB 0xffffff94 // 32 bit +#ifdef CYGARC_SH_MOD_UBC_V3 +#define CYGARC_REG_BETR 0xffffff9c // 16 bit +#define CYGARC_REG_BRSR 0xffffffac // 32 bit +#define CYGARC_REG_BRDR 0xffffffbc // 32 bit +#endif #define CYGARC_REG_BRCR_CMFA 0x8000 // condition match flag A #define CYGARC_REG_BRCR_CMFB 0x4000 // condition match flag B @@ -252,12 +294,20 @@ #define CYGARC_REG_BRCR_PCBB 0x0040 // post execute channel B #define CYGARC_REG_BRCR_SEQ 0x0008 // sequence condition select +#ifdef CYGARC_SH_MOD_UBC_V1 #define CYGARC_REG_BAMRA_BASMA 0x04 // BASRA masked #define CYGARC_REG_BAMRA_BARA_UNMASKED 0x00 // BARA not masked #define CYGARC_REG_BAMRA_BARA_10BIT 0x01 // Lowest 10 bit masked #define CYGARC_REG_BAMRA_BARA_12BIT 0x02 // Lowest 12 bit masked #define CYGARC_REG_BAMRA_BARA_MASKED 0x03 // All bits masked +#else +// mask is fully configurable in other versions of the UBC +#endif +#ifdef CYGARC_SH_MOD_UBC_V3 +#define CYGARC_REG_BBRA_DMA 0x0080 // Break on DMAC cycle +#define CYGARC_REG_BBRA_CPU 0x0040 // Break on CPU cycle +#endif #define CYGARC_REG_BBRA_DFETCH 0x0020 // Break on DFETCH #define CYGARC_REG_BBRA_IFETCH 0x0010 // Break on IFETCH #define CYGARC_REG_BBRA_WRITE 0x0008 // Break on WRITE @@ -289,10 +339,159 @@ #define CYGARC_REG_WTCSR_CKS0 0x01 // clock select 0 #define CYGARC_REG_WTCSR_CKSx_MASK 0x07 // clock select mask // This is the period (in us) between watchdog reset and overflow. -// (used by the watchdog driver - board specific) -// Based on a 15MHz clock with max delay: 15Mhz/(4096 * 256) +// Note: We use max timeout delay for now. #define CYGARC_REG_WTCSR_CKSx_SETTING 0x07 // max delay -#define CYGARC_REG_WTCSR_PERIOD 69905067 // ~69.9 ms + +#define CYGARC_REG_WTCSR_PERIOD ((1000000000/(CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED/4096))*256) + +// Translate various CDL clock configurations to register equivalents +// for the various CPG versions +#if defined(CYGARC_SH_MOD_CPG_V1) // ---------------------------- V1 + +// PLL1 +#if (CYGHWR_HAL_SH_OOC_PLL_1 == 0) || (CYGHWR_HAL_SH_OOC_PLL_1 == 1) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0000 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 2) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0010 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 4) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0020 +#else +# error "Unsupported PLL1 setting" +#endif + +// Divider1 +#if (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 1) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0000 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 2) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0004 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 4) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0008 +#else +# error "Unsupported Divider1 setting" +#endif + +// Divider2 +#if (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 1) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0000 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 2) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0001 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 4) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0002 +#else +# error "Unsupported Divider1 setting" +#endif + +// CKOEN - set in all modes but 7 +#if (CYGHWR_HAL_SH_OOC_CLOCK_MODE != 7) +# define CYGARC_REG_FRQCR_INIT_CKOEN 0x0100 +#else +# define CYGARC_REG_FRQCR_INIT_CKOEN 0x0000 +#endif + +#elif defined(CYGARC_SH_MOD_CPG_V2) // ---------------------------- V2 + +// PLL1 +#if (CYGHWR_HAL_SH_OOC_PLL_1 == 0) || (CYGHWR_HAL_SH_OOC_PLL_1 == 1) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0000 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 2) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0010 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 4) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0020 +#else +# error "Unsupported PLL1 setting" +#endif + +// Divider1 +#if (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 1) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0000 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 2) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0004 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 4) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0008 +#else +# error "Unsupported Divider1 setting" +#endif + +// Divider2 +#if (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 1) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0000 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 2) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0001 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 4) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0002 +#else +# error "Unsupported Divider1 setting" +#endif + +// CKOEN - set in all modes but 2 +#if (CYGHWR_HAL_SH_OOC_CLOCK_MODE != 2) +# define CYGARC_REG_FRQCR_INIT_CKOEN 0x0100 +#else +# define CYGARC_REG_FRQCR_INIT_CKOEN 0x0000 +#endif + +#elif defined(CYGARC_SH_MOD_CPG_V3) // ---------------------------- V3 + +// PLL1 +#if (CYGHWR_HAL_SH_OOC_PLL_1 == 0) || (CYGHWR_HAL_SH_OOC_PLL_1 == 1) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0000 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 2) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0010 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 3) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x8000 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 4) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0020 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 6) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x8010 +#elif (CYGHWR_HAL_SH_OOC_PLL_1 == 8) +# define CYGARC_REG_FRQCR_INIT_PLL1 0x0030 +#else +# error "Unsupported PLL1 setting" +#endif + +// Divider1 +#if (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 1) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0000 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 2) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0004 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 3) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x4000 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_1 == 4) +# define CYGARC_REG_FRQCR_INIT_DIVIDER1 0x0008 +#else +# error "Unsupported Divider1 setting" +#endif + +// Divider2 +#if (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 1) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0000 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 2) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0001 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 3) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x2000 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 4) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x0002 +#elif (CYGHWR_HAL_SH_OOC_DIVIDER_2 == 6) +# define CYGARC_REG_FRQCR_INIT_DIVIDER2 0x2002 +#else +# error "Unsupported Divider2 setting" +#endif + +// CKOEN - set in modes 0-2 +#if (CYGHWR_HAL_SH_OOC_CLOCK_MODE <= 2) +# define CYGARC_REG_FRQCR_INIT_CKOEN 0x0100 +#else +# define CYGARC_REG_FRQCR_INIT_CKOEN 0x0000 +#endif + +#else + +# error "Unsupported CPG version" + +#endif + +// Init value +#define CYGARC_REG_FRQCR_INIT (CYGARC_REG_FRQCR_INIT_PLL1|CYGARC_REG_FRQCR_INIT_DIVIDER1|CYGARC_REG_FRQCR_INIT_DIVIDER2|CYGARC_REG_FRQCR_INIT_CKOEN) //++++++ Module TMU ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -325,6 +524,11 @@ #define CYGARC_REG_TCR_UNIE 0x0020 #define CYGARC_REG_TCR_UNF 0x0100 +#define CYGARC_REG_TCR_TPSC_4 (0) +#define CYGARC_REG_TCR_TPSC_16 (CYGARC_REG_TCR_TPSC0) +#define CYGARC_REG_TCR_TPSC_64 (CYGARC_REG_TCR_TPSC1) +#define CYGARC_REG_TCR_TPSC_256 (CYGARC_REG_TCR_TPSC0|CYGARC_REG_TCR_TPSC1) + // TCR2 additional bits #define CYGARC_REG_TCR_ICPE0 0x0040 #define CYGARC_REG_TCR_ICPE1 0x0080 @@ -419,6 +623,17 @@ #define CYGARC_REG_ICR1_SENSE_LEVEL 0x2 #define CYGARC_REG_ICR1_SENSE_UP 0x1 +// The (initial) IRQ mode is controlled by configuration. +#ifdef CYGHWR_HAL_SH_IRQ_USE_IRQLVL +# ifdef CYGHWR_HAL_SH_IRQ_ENABLE_IRLS_INTERRUPTS +# define CYGARC_REG_ICR1_INIT (CYGARC_REG_ICR1_IRLSEN|CYGARC_REG_ICR1_IRQLVL) +# else +# define CYGARC_REG_ICR1_INIT (CYGARC_REG_ICR1_IRQLVL) +# endif +#else +# define CYGARC_REG_ICR1_INIT 0x0000 +#endif + #define CYGARC_REG_IRR0_PINT07 0x80 #define CYGARC_REG_IRR0_PINT8F 0x40 #define CYGARC_REG_IRR0_IRQ5 0x20 @@ -530,17 +745,33 @@ // to prevent other bits than the one of interest to be cleared. #define CYGARC_REG_SCSSR_CLEARMASK 0xf8 -// Baud rate values calculated for peripheral clock = 15MHz (Pf = 15). +// Baud rate values calculation, depending on peripheral clock (Pf) // n is CKS setting (0-3) -// N = (Pf/(64*2^(2n-1)*B))*10^6-1 -// E(%) = ((Pf*10^6/((N+1)*B*(64^(n-1)))-1)*100 -// So this macro is only valid when serial is configured for n=0: -// N = (Pf/(32*B))*10^6-1 +// N = (Pf/(64*2^(2n-1)*B))-1 +// With CYGARC_SCBRR_CKSx providing the values 1, 4, 16, 64 we get +// N = (Pf/(32*_CKS*B))-1 +// +// The CYGARC_SCBRR_OPTIMAL_CKS macro should compute the minimal CKS +// setting for the given baud rate and peripheral clock. +// +// The error of the CKS+count value can be computed by: +// E(%) = ((Pf/((N+1)*B*(64^(n-1)))-1)*100 +// +#define CYGARC_SCBRR_PRESCALE(_b_) \ +((((CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED/32/1/(_b_))-1)<256) ? 1 : \ + (((CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED/32/4/(_b_))-1)<256) ? 4 : \ + (((CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED/32/16/(_b_))-1)<256) ? 16 : 64) + +// These two macros provide the static values we need to stuff into the +// registers. +#define CYGARC_SCBRR_CKSx(_b_) \ + ((1 == CYGARC_SCBRR_PRESCALE(_b_)) ? 0 : \ + (4 == CYGARC_SCBRR_PRESCALE(_b_)) ? 1 : \ + (16 == CYGARC_SCBRR_PRESCALE(_b_)) ? 2 : 3) #define CYGARC_SCBRR_N(_b_) \ (((_b_) < 4800) ? 0 : \ ((_b_) > 115200) ? 0 : \ - (CYGHWR_HAL_SH_BOARD_SPEED*1000000/(32*(_b_))-1)) -#define CYGARC_SCBRR_CKSx(_b_) 0 + ((CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED/32/CYGARC_SCBRR_PRESCALE(_b_)/(_b_))-1)) //++++++ Module IRDA +++++++++++++++++++++++++++++++++++++++++++++++++++++++ #ifdef CYGARC_SH_MOD_IRDA @@ -617,18 +848,6 @@ #define CYGARC_REG_SCFDR1_TCOUNT_MASK 0x1f00 // number of chars in t fifo #define CYGARC_REG_SCFDR1_TCOUNT_shift 8 -// Baud rate values calculated for peripheral clock = 15MHz (Pf = 15). -// n is CKS setting (0-3) -// N = (Pf/(64*2^(2n-1)*B))*10^6-1 -// E(%) = ((Pf*10^6/((N+1)*B*(64^(n-1)))-1)*100 -// So this macro is only valid when serial is configured for n=0: -// N = (Pf/(32*B))*10^6-1 -#define CYGARC_SCBRR1_N(_b_) \ - (((_b_) < 4800) ? 0 : \ - ((_b_) > 115200) ? 0 : \ - (CYGHWR_HAL_SH_BOARD_SPEED*1000000/(32*(_b_))-1)) -#define CYGARC_SCBRR1_CKSx(_b_) 0 - #endif // CYGARC_SH_MOD_IRDA //++++++ Module SCIF +++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -707,19 +926,6 @@ #define CYGARC_REG_SCFDR2_TCOUNT_MASK 0x1f00 // number of chars in t fifo #define CYGARC_REG_SCFDR2_TCOUNT_shift 8 -// Baud rate values calculated for peripheral clock = 15MHz (Pf = 15). -// n is CKS setting (0-3) -// N = (Pf/(64*2^(2n-1)*B))*10^6-1 -// E(%) = ((Pf*10^6/((N+1)*B*(64^(n-1)))-1)*100 -// So this macro is only valid when serial is configured for n=0: -// N = (Pf/(32*B))*10^6-1 -#define CYGARC_SCBRR2_N(_b_) \ - (((_b_) < 4800) ? 0 : \ - ((_b_) > 115200) ? 0 : \ - (CYGHWR_HAL_SH_BOARD_SPEED*1000000/(32*(_b_))-1)) -#define CYGARC_SCBRR2_CKSx(_b_) 0 - - #endif // CYGARC_SH_MOD_SCIF //++++++ Module DMAC +++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -746,79 +952,48 @@ #define CYGARC_REG_CHCR3 0xa400005c #define CYGARC_REG_DMAOR 0xa4000060 -// DMA Channel Control Register 0 -#define CYGARC_REG_CHCR0_RL 0x00040000 // request check level -#define CYGARC_REG_CHCR0_AM 0x00020000 // acknowledge mode -#define CYGARC_REG_CHCR0_AL 0x00010000 // acknowledge level -#define CYGARC_REG_CHCR0_DM1 0x00008000 // destination address mode -#define CYGARC_REG_CHCR0_DM0 0x00004000 -#define CYGARC_REG_CHCR0_SM1 0x00002000 // source address mode -#define CYGARC_REG_CHCR0_SM2 0x00001000 -#define CYGARC_REG_CHCR0_RS3 0x00000800 // resource select -#define CYGARC_REG_CHCR0_RS2 0x00000400 -#define CYGARC_REG_CHCR0_RS1 0x00000200 -#define CYGARC_REG_CHCR0_RS0 0x00000100 -#define CYGARC_REG_CHCR0_DS 0x00000040 // DREQ select -#define CYGARC_REG_CHCR0_TM 0x00000020 // transmit mode -#define CYGARC_REG_CHCR0_TS1 0x00000010 // transmit size -#define CYGARC_REG_CHCR0_TS0 0x00000008 -#define CYGARC_REG_CHCR0_IE 0x00000004 // interrupt enable -#define CYGARC_REG_CHCR0_TE 0x00000002 // transfer end -#define CYGARC_REG_CHCR0_DE 0x00000001 // DMAC enable +// Offsets from base register +#define CYGARC_REG_SAR 0x00 +#define CYGARC_REG_DAR 0x04 +#define CYGARC_REG_DMATCR 0x08 +#define CYGARC_REG_CHCR 0x0c + -// DMA Channel Control Register 1 -#define CYGARC_REG_CHCR1_RL 0x00040000 // request check level -#define CYGARC_REG_CHCR1_AM 0x00020000 // acknowledge mode -#define CYGARC_REG_CHCR1_AL 0x00010000 // acknowledge level -#define CYGARC_REG_CHCR1_DM1 0x00008000 // destination address mode -#define CYGARC_REG_CHCR1_DM0 0x00004000 -#define CYGARC_REG_CHCR1_SM1 0x00002000 // source address mode -#define CYGARC_REG_CHCR1_SM2 0x00001000 -#define CYGARC_REG_CHCR1_RS3 0x00000800 // resource select -#define CYGARC_REG_CHCR1_RS2 0x00000400 -#define CYGARC_REG_CHCR1_RS1 0x00000200 -#define CYGARC_REG_CHCR1_RS0 0x00000100 -#define CYGARC_REG_CHCR1_DS 0x00000040 // DREQ select -#define CYGARC_REG_CHCR1_TM 0x00000020 // transmit mode -#define CYGARC_REG_CHCR1_TS1 0x00000010 // transmit size -#define CYGARC_REG_CHCR1_TS0 0x00000008 -#define CYGARC_REG_CHCR1_IE 0x00000004 // interrupt enable -#define CYGARC_REG_CHCR1_TE 0x00000002 // transfer end -#define CYGARC_REG_CHCR1_DE 0x00000001 // DMAC enable - -// DMA Channel Control Register 2 +// DMA Channel Control Register. If there's a digit suffix to CHCR the flag +// is only valid in the listed channels. +#define CYGARC_REG_CHCR3_DI 0x00100000 // direct/indirect selection #define CYGARC_REG_CHCR2_RO 0x00080000 // source address reload -#define CYGARC_REG_CHCR2_DM1 0x00008000 // destination address mode -#define CYGARC_REG_CHCR2_DM0 0x00004000 -#define CYGARC_REG_CHCR2_SM1 0x00002000 // source address mode -#define CYGARC_REG_CHCR2_SM2 0x00001000 -#define CYGARC_REG_CHCR2_RS3 0x00000800 // resource select -#define CYGARC_REG_CHCR2_RS2 0x00000400 -#define CYGARC_REG_CHCR2_RS1 0x00000200 -#define CYGARC_REG_CHCR2_RS0 0x00000100 -#define CYGARC_REG_CHCR2_TM 0x00000020 // transmit mode -#define CYGARC_REG_CHCR2_TS1 0x00000010 // transmit size -#define CYGARC_REG_CHCR2_TS0 0x00000008 -#define CYGARC_REG_CHCR2_IE 0x00000004 // interrupt enable -#define CYGARC_REG_CHCR2_TE 0x00000002 // transfer end -#define CYGARC_REG_CHCR2_DE 0x00000001 // DMAC enable +#define CYGARC_REG_CHCR01_RL 0x00040000 // request check level +#define CYGARC_REG_CHCR01_AM 0x00020000 // acknowledge mode +#define CYGARC_REG_CHCR01_AL 0x00010000 // acknowledge level +#define CYGARC_REG_CHCR_DM1 0x00008000 // destination address mode +#define CYGARC_REG_CHCR_DM0 0x00004000 +#define CYGARC_REG_CHCR_SM1 0x00002000 // source address mode +#define CYGARC_REG_CHCR_SM0 0x00001000 +#define CYGARC_REG_CHCR_RS3 0x00000800 // resource select +#define CYGARC_REG_CHCR_RS2 0x00000400 +#define CYGARC_REG_CHCR_RS1 0x00000200 +#define CYGARC_REG_CHCR_RS0 0x00000100 +#define CYGARC_REG_CHCR01_DS 0x00000040 // DREQ select +#define CYGARC_REG_CHCR_TM 0x00000020 // transmit mode +#define CYGARC_REG_CHCR_TS1 0x00000010 // transmit size +#define CYGARC_REG_CHCR_TS0 0x00000008 +#define CYGARC_REG_CHCR_IE 0x00000004 // interrupt enable +#define CYGARC_REG_CHCR_TE 0x00000002 // transfer end +#define CYGARC_REG_CHCR_DE 0x00000001 // DMAC enable -// DMA Channel Control Register 3 -#define CYGARC_REG_CHCR3_DI 0x00100000 // direct/indirect selection -#define CYGARC_REG_CHCR3_DM1 0x00008000 // destination address mode -#define CYGARC_REG_CHCR3_DM0 0x00004000 -#define CYGARC_REG_CHCR3_SM1 0x00002000 // source address mode -#define CYGARC_REG_CHCR3_SM2 0x00001000 -#define CYGARC_REG_CHCR3_RS3 0x00000800 // resource select -#define CYGARC_REG_CHCR3_RS2 0x00000400 -#define CYGARC_REG_CHCR3_RS1 0x00000200 -#define CYGARC_REG_CHCR3_RS0 0x00000100 -#define CYGARC_REG_CHCR3_TM 0x00000020 // transmit mode -#define CYGARC_REG_CHCR3_TS1 0x00000010 // transmit size -#define CYGARC_REG_CHCR3_TS0 0x00000008 -#define CYGARC_REG_CHCR3_IE 0x00000004 // interrupt enable -#define CYGARC_REG_CHCR3_TE 0x00000002 // transfer end -#define CYGARC_REG_CHCR3_DE 0x00000001 // DMAC enable +// Resource select options +#define CYGARC_REG_CHCR_RS_EXT_DUAL 0x00000000 +#define CYGARC_REG_CHCR_RS_EXT_EX_DAC 0x00000100 +#define CYGARC_REG_CHCR_RS_EXT_DAC_EX 0x00000300 +#define CYGARC_REG_CHCR_RS_AUTO 0x00000400 +#define CYGARC_REG_CHCR_RS_IRDA_TX 0x00000a00 +#define CYGARC_REG_CHCR_RS_IRDA_RX 0x00000b00 +#define CYGARC_REG_CHCR_RS_SCIF_TX 0x00000c00 +#define CYGARC_REG_CHCR_RS_SCIF_RX 0x00000d00 +#define CYGARC_REG_CHCR_RS_AD 0x00000e00 +#define CYGARC_REG_CHCR_RS_CMT 0x00000f00 + // DMA Operation Register #define CYGARC_REG_DMAOR_PR1 0x0200 // priority level
--- a/packages/hal/sh/arch/current/src/hal_misc.c +++ b/packages/hal/sh/arch/current/src/hal_misc.c @@ -197,17 +197,32 @@ hal_idle_thread_action( cyg_uint32 count //--------------------------------------------------------------------------- // Initial cache enabling + +#ifdef CYGHWR_HAL_SH_CACHE_MODE_P0_WRITE_BACK +# define CACHE_MODE_P0 0 +#else +# define CACHE_MODE_P0 CYGARC_REG_CCR_WT +#endif + +#ifdef CYGHWR_HAL_SH_CACHE_MODE_P1_WRITE_BACK +# define CACHE_MODE_P1 CYGARC_REG_CCR_CB +#else +# define CACHE_MODE_P1 0 +#endif + externC void cyg_hal_enable_caches(void) { // Initialize cache. HAL_UCACHE_INVALIDATE_ALL(); - // Enable writeback. - HAL_UCACHE_WRITE_MODE(HAL_UCACHE_WRITEBACK_MODE); + // Set cache modes + HAL_UCACHE_WRITE_MODE_SH(CACHE_MODE_P0|CACHE_MODE_P1); +#ifdef CYGHWR_HAL_SH_CACHE_ENABLE // Enable cache. HAL_UCACHE_ENABLE(); +#endif } //--------------------------------------------------------------------------- @@ -227,7 +242,7 @@ hal_delay_us(int usecs) volatile unsigned char *tstr = (volatile unsigned char *)CYGARC_REG_TSTR; volatile unsigned long *tcnt = (volatile unsigned long *)CYGARC_REG_TCNT1; volatile unsigned long *tcor = (volatile unsigned long *)CYGARC_REG_TCOR1; - unsigned long clocks_per_us = (CYGHWR_HAL_SH_BOARD_SPEED+(4-1))/4; // Rounded up + unsigned long clocks_per_us = (CYGHWR_HAL_SH_ONCHIP_PERIPHERAL_SPEED+(CYGHWR_HAL_SH_TMU_PRESCALE_0-1))/CYGHWR_HAL_SH_TMU_PRESCALE_0; // Rounded up int diff, diff2; cyg_uint32 val1, val2; @@ -330,6 +345,7 @@ hal_interrupt_set_level(int vector, int HAL_WRITE_UINT16(CYGARC_REG_IPRB, iprX); break; +#ifndef CYGHWR_HAL_SH_IRQ_USE_IRQLVL /* IPRC */ case CYGNUM_HAL_INTERRUPT_IRQ_IRQ0: HAL_READ_UINT16(CYGARC_REG_IPRC, iprX); @@ -355,7 +371,7 @@ hal_interrupt_set_level(int vector, int iprX |= (level)*CYGARC_REG_IPRC_IRQ3_PRI1; HAL_WRITE_UINT16(CYGARC_REG_IPRC, iprX); break; - +#endif /* IPRD */ case CYGNUM_HAL_INTERRUPT_PINT_PINT07: HAL_READ_UINT16(CYGARC_REG_IPRD, iprX); @@ -441,6 +457,10 @@ hal_interrupt_set_level(int vector, int case CYGNUM_HAL_INTERRUPT_RESERVED_3E0: /* Do nothing for these reserved vectors. */ break; + + default: + CYG_FAIL("Unknown interrupt vector"); + break; } } @@ -498,6 +518,7 @@ hal_interrupt_acknowledge(int vector) HAL_READ_UINT8(CYGARC_REG_IRR0, irr0); switch ( vector ) { +#ifndef CYGHWR_HAL_SH_IRQ_USE_IRQLVL case CYGNUM_HAL_INTERRUPT_IRQ_IRQ0: irr0 &= ~CYGARC_REG_IRR0_IRQ0; break; @@ -510,12 +531,15 @@ hal_interrupt_acknowledge(int vector) case CYGNUM_HAL_INTERRUPT_IRQ_IRQ3: irr0 &= ~CYGARC_REG_IRR0_IRQ3; break; +#endif case CYGNUM_HAL_INTERRUPT_IRQ_IRQ4: irr0 &= ~CYGARC_REG_IRR0_IRQ4; break; case CYGNUM_HAL_INTERRUPT_IRQ_IRQ5: irr0 &= ~CYGARC_REG_IRR0_IRQ5; break; + default: + CYG_FAIL("Unhandled interrupt vector"); } HAL_WRITE_UINT8(CYGARC_REG_IRR0, irr0); } @@ -546,6 +570,7 @@ hal_interrupt_configure(int vector, int ss <<= CYGARC_REG_ICR1_SENSE_IRQ4_shift; mask <<= CYGARC_REG_ICR1_SENSE_IRQ4_shift; break; +#ifndef CYGHWR_HAL_SH_IRQ_USE_IRQLVL case CYGNUM_HAL_INTERRUPT_IRQ_IRQ3: ss <<= CYGARC_REG_ICR1_SENSE_IRQ3_shift; mask <<= CYGARC_REG_ICR1_SENSE_IRQ3_shift; @@ -562,7 +587,10 @@ hal_interrupt_configure(int vector, int ss <<= CYGARC_REG_ICR1_SENSE_IRQ0_shift; mask <<= CYGARC_REG_ICR1_SENSE_IRQ0_shift; break; - } +#endif + default: + CYG_FAIL("Unhandled interrupt vector"); + } HAL_READ_UINT16(CYGARC_REG_ICR1, icr1); icr1 &= ~mask;
--- a/packages/hal/sh/arch/current/src/hal_mk_defs.c +++ b/packages/hal/sh/arch/current/src/hal_mk_defs.c @@ -109,6 +109,10 @@ main(void) DEFINE(CYGARC_REG_CACHE_ADDRESS_BASE,CYGARC_REG_CACHE_ADDRESS_BASE); DEFINE(CYGARC_REG_CACHE_ADDRESS_TOP,CYGARC_REG_CACHE_ADDRESS_TOP); DEFINE(CYGARC_REG_CACHE_ADDRESS_STEP,CYGARC_REG_CACHE_ADDRESS_STEP); + DEFINE(HAL_UCACHE_SIZE, HAL_UCACHE_SIZE); + DEFINE(HAL_UCACHE_WAYS, HAL_UCACHE_WAYS); + DEFINE(HAL_UCACHE_LINE_SIZE, HAL_UCACHE_LINE_SIZE); + // Variant definitions - want these to be included instead. }
--- a/packages/hal/sh/arch/current/src/sh3_scif.c +++ b/packages/hal/sh/arch/current/src/sh3_scif.c @@ -84,9 +84,9 @@ cyg_hal_plf_scif_init_channel(const chan // Set speed to 38400 HAL_READ_UINT8(base+_REG_SCSMR, tmp); tmp &= ~CYGARC_REG_SCSMR2_CKSx_MASK; - tmp |= CYGARC_SCBRR2_CKSx(38400); + tmp |= CYGARC_SCBRR_CKSx(38400); HAL_WRITE_UINT8(base+_REG_SCSMR, tmp); - HAL_WRITE_UINT8(base+_REG_SCBRR, CYGARC_SCBRR2_N(38400)); + HAL_WRITE_UINT8(base+_REG_SCBRR, CYGARC_SCBRR_N(38400)); // Let things settle: Here we should should wait the equivalent of // one bit interval, i.e. 1/38400 second, but until we have @@ -108,22 +108,23 @@ cyg_hal_plf_scif_init_channel(const chan CYGARC_REG_SCSCR2_TE|CYGARC_REG_SCSCR2_RE); } -static cyg_bool +//static +cyg_bool cyg_hal_plf_scif_getc_nonblock(void* __ch_data, cyg_uint8* ch) { cyg_uint8* base = ((channel_data_t*)__ch_data)->base; cyg_uint16 fdr, sr; HAL_READ_UINT16(base+_REG_SCFDR, fdr); - if ((fdr & CYGARC_REG_SCFDR2_RCOUNT_MASK) == 0) + if (0 == (fdr & CYGARC_REG_SCFDR2_RCOUNT_MASK)) return false; HAL_READ_UINT8(base+_REG_SCFRDR, *ch); - // Clear FIFO full flag (read before clearing) + // Clear DR/RDF flags HAL_READ_UINT16(base+_REG_SCSSR, sr); HAL_WRITE_UINT16(base+_REG_SCSSR, - CYGARC_REG_SCSSR2_CLEARMASK & ~CYGARC_REG_SCSSR2_RDF); + CYGARC_REG_SCSSR2_CLEARMASK & ~(CYGARC_REG_SCSSR2_RDF | CYGARC_REG_SCSSR2_DR)); return true; }
--- a/packages/hal/sh/arch/current/src/sh_stub.c +++ b/packages/hal/sh/arch/current/src/sh_stub.c @@ -131,11 +131,18 @@ void __single_step (void) // The address of the instruction to execute. HAL_WRITE_UINT32(CYGARC_REG_BARA, get_register(PC)); // Match entire address. +#ifdef CYGARC_SH_MOD_UBC_V1 HAL_WRITE_UINT8(CYGARC_REG_BAMRA, CYGARC_REG_BAMRA_BARA_UNMASKED); +#else + HAL_WRITE_UINT32(CYGARC_REG_BAMRA, 0xffffffff); +#endif // Stop after instruction at matching address has executed. HAL_WRITE_UINT16(CYGARC_REG_BRCR, CYGARC_REG_BRCR_PCBA); // Stop on IFETCH/READ HAL_WRITE_UINT16(CYGARC_REG_BBRA, +#ifdef CYGARC_SH_MOD_UBC_V3 + CYGARC_REG_BBRA_CPU| // Match on CPU cycle +#endif CYGARC_REG_BBRA_IFETCH|CYGARC_REG_BBRA_READ); }
--- a/packages/hal/sh/arch/current/src/vectors.S +++ b/packages/hal/sh/arch/current/src/vectors.S @@ -276,7 +276,7 @@ .org 0x600 __interrupt: -#ifdef CYGHWR_HAL_SH_HANDLE_SPURIOUS_INTERRUPTS +#ifdef CYGHWR_HAL_SH_IRQ_HANDLE_SPURIOUS_INTERRUPTS # A spurious interrupt with INTEVT=0 may be caused by # clearing of BL. Those interrupts need to be ignored. mov #CYGARC_REG_INTEVT,r0 @@ -706,9 +706,13 @@ restore_state: mov.l $CYGARC_REG_IPRF,r1 mov.w r0,@r1 #endif + mov.w $nCYG_ICR1_INIT,r0 mov.l $CYGARC_REG_ICR1,r1 ! Set interrupt controller to IRQ mode mov.w r0,@r1 #endif + mov.w $nCYG_WTCSR,r0 ! Clear watchdog + mov #CYGARC_REG_WTCSR,r1 + mov.w r0,@r1 # Initialize VBR if necessary #if !defined(CYG_HAL_STARTUP_RAM) || \ @@ -810,10 +814,14 @@ 1: mov.l @r0+,r3 # Jump to remaining setup code. Relative branch is OK since VMA=LMA. bra _complete_setup + nop #endif - .align 2 +$nCYG_WTCSR: + .word 0xa500 ! clear all CSR bits + + .align 2 $nCYG_SR: .long CYG_SR @@ -836,8 +844,10 @@ 1: mov.l @r0+,r3 #ifdef CYGARC_SH_MOD_INTC_V2 $CYGARC_REG_IPRF: .long CYGARC_REG_IPRF +$nCYG_ICR1_INIT: + .word CYGARC_REG_ICR1_INIT + .align 2 #endif - $__reset: .long __reset @@ -1024,31 +1034,61 @@ 2: nop rts nop + ! r4 = base + ! r5 = size + .globl _cyg_hal_cache_sync_region +_cyg_hal_cache_sync_region: + GOTO_NONCACHED_SHADOW + mov.l 10f,r0 + and r4,r0 ! array index + mov.l 11f,r1 + add r0,r1 ! base (aligned, A set) + + ! make sure top is aligned to start of _next_ cache line + mov r1,r0 + add r5,r0 ! top (non-aligned) + add #2*HAL_UCACHE_LINE_SIZE-1,r0 + mov.l 13f,r2 + and r0,r2 + + mov.l $CYGARC_REG_CACHE_ADDRESS_STEP,r3 + mov.l 12f,r5 +1: cmp/hi r1,r2 + bf 3f + mov r4,r0 ! create address tag + and r5,r0 + mov.l r0,@r1 ! store tag in array, causing (sync+)invalidate + ! if the tag matches any of the lines + add r3,r4 ! inc address tag + bra 1b + add r3,r1 ! inc array index, delay slot! +3: nop + rts + nop + + .align 2 +10: .long ((HAL_UCACHE_SIZE/HAL_UCACHE_WAYS)-1)&~0xf ! mask +11: .long CYGARC_REG_CACHE_ADDRESS_BASE|CYGARC_REG_CACHE_ADDRESS_ADDRESS +12: .long CYGARC_REG_CACHE_ADDRESS_TAG_Mask +13: .long ~(HAL_UCACHE_LINE_SIZE-1) + .globl _cyg_hal_cache_write_mode _cyg_hal_cache_write_mode: GOTO_NONCACHED_SHADOW - # Mode argument in r4. Compute the WT and CB states from this - mov r4,r0 - and #1,r0 - shll r0 ! shift to WT position - mov r0,r1 ! duplicate at CB position - shll r1 - or r1,r0 - xor #CYGARC_REG_CCR_WT,r0 ! WT must be 0 for write-back + # Mode argument in r4. # Read current state and mask out the two caching mode bits mov #CYGARC_REG_CCR,r1 mov.l @r1,r3 mov #CYGARC_REG_CCR_CB|CYGARC_REG_CCR_WT,r2 + and r2,r4 not r2,r2 and r2,r3 # Or in the new settings and restore to CCR - or r0,r3 + or r4,r3 mov.l r3,@r1 nop rts nop - - .align 2 $CYGARC_REG_CACHE_ADDRESS_FLUSH:
--- a/packages/hal/sh/cq7708/current/ChangeLog +++ b/packages/hal/sh/cq7708/current/ChangeLog @@ -1,3 +1,14 @@ +2000-10-10 Jesper Skov <jskov@redhat.com> + + * cdl/hal_sh_sh7708_cq7708.cdl: Fix legal OCC ranges. + +2000-09-26 Jesper Skov <jskov@redhat.com> + + * include/platform.inc (BSC_settings_table): Use the calculated + FRQCR init value. + + * cdl/hal_sh_sh7708_cq7708.cdl: Updated clock options. + 2000-07-07 Jesper Skov <jskov@redhat.com> * cdl/hal_sh_sh7708_cq7708.cdl: Require sub-variant package.
--- a/packages/hal/sh/cq7708/current/cdl/hal_sh_sh7708_cq7708.cdl +++ b/packages/hal/sh/cq7708/current/cdl/hal_sh_sh7708_cq7708.cdl @@ -110,38 +110,75 @@ cdl_package CYGPKG_HAL_SH_SH7708_CQ7708 chooses which port will be used for diagnostic output." } - cdl_option CYGHWR_HAL_SH_BOARD_SPEED { - display "Development board clock speed (MHz)" - flavor data - calculated 15 + cdl_component CYGHWR_HAL_SH_PLF_CLOCK_SETTINGS { + display "SH on-chip platform clock controls" description " - The CQ/7708 board uses a 15MHz crystal." - } + The various clocks used by the system are derived from + these options." + flavor none + no_define + + cdl_option CYGHWR_HAL_SH_OOC_XTAL { + display "SH clock crystal" + flavor data + legal_values 8000000 to 50000000 + default_value 15000000 + no_define + description " + This option specifies the frequency of the crystal all + other clocks are derived from." + } + + cdl_option CYGHWR_HAL_SH_OOC_PLL_1 { + display "SH clock PLL circuit 1" + flavor data + default_value 1 + legal_values { 0 1 2 3 4 } + description " + This selects the multiplication factor provided by + PLL1. If PLL1 is disabled via CAP1, this option should + be set to zero." + } - # Real-time clock/counter specifics - cdl_component CYGNUM_HAL_RTC_CONSTANTS { - display "Real-time clock constants." - description " - Using TMU counter 0, clocked at p/4, with peripheral clock - sourced directly from the 15MHz crystal (which is the - default setup on the CQ). This means 150000/4 - oscillations in 1/100 second." - flavor none - - cdl_option CYGNUM_HAL_RTC_NUMERATOR { - display "Real-time clock numerator" - flavor data - calculated 1000000000 + cdl_option CYGHWR_HAL_SH_OOC_PLL_2 { + display "SH clock PLL circuit 2" + flavor data + default_value 4 + legal_values { 0 1 4 } + no_define + description " + This selects the multiplication factor provided by + PLL2. If PLL2 is disabled via CAP2, this option should + be set to zero." + } + + cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_1 { + display "SH clock divider 1" + flavor data + default_value 1 + legal_values { 1 2 3 4 } + description " + This divider option affects the CPU core clock." } - cdl_option CYGNUM_HAL_RTC_DENOMINATOR { - display "Real-time clock denominator" - flavor data - calculated 100 + + cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_2 { + display "SH clock divider 2" + flavor data + default_value 4 + legal_values { 1 2 3 4 } + description " + This divider option affects the peripheral clock." } - cdl_option CYGNUM_HAL_RTC_PERIOD { - display "Real-time clock period" - flavor data - calculated { CYGHWR_HAL_SH_BOARD_SPEED*1000000/CYGNUM_HAL_RTC_DENOMINATOR/4 } + + cdl_option CYGHWR_HAL_SH_OOC_CLOCK_MODE { + display "SH clock mode" + flavor data + default_value 2 + legal_values { 0 1 2 3 4 7 } + description " + This option must mirror the clock mode hardwired on + the MD0-MD2 pins of the CPU in order to correctly + initialize the FRQCR register." } } @@ -149,6 +186,7 @@ cdl_package CYGPKG_HAL_SH_SH7708_CQ7708 display "Global build options" flavor none parent CYGPKG_NONE + no_define description " Global build options including control over compiler flags, linker flags and choice of toolchain."
--- a/packages/hal/sh/cq7708/current/include/platform.inc +++ b/packages/hal/sh/cq7708/current/include/platform.inc @@ -72,6 +72,9 @@ 1: mov.w @r3+,r0 BSC_settings_table: # These are the settings set by the ROM Monitor. + .word CYGARC_REG_FRQCR + .word CYGARC_REG_FRQCR_INIT + # BCR1: Areas 3 are SDRAM .word CYGARC_REG_BCR1 .word 0x0010
--- a/packages/hal/sh/edk/current/ChangeLog +++ b/packages/hal/sh/edk/current/ChangeLog @@ -1,3 +1,13 @@ +2000-10-10 Jesper Skov <jskov@redhat.com> + + * cdl/hal_sh_edk7708.cdl: Fix legal OCC ranges. + +2000-09-26 Jesper Skov <jskov@redhat.com> + + * include/platform.inc: Use calculated FRQCR init value. + + * cdl/hal_sh_edk7708.cdl: Updated clock options. + 2000-07-07 Jesper Skov <jskov@redhat.com> * cdl/hal_sh_edk7708.cdl: Require sub-variant package.
--- a/packages/hal/sh/edk/current/cdl/hal_sh_edk7708.cdl +++ b/packages/hal/sh/edk/current/cdl/hal_sh_edk7708.cdl @@ -113,38 +113,75 @@ cdl_package CYGPKG_HAL_SH_EDK7708 { chooses which port will be used for diagnostic output." } - cdl_option CYGHWR_HAL_SH_BOARD_SPEED { - display "Development board clock speed (MHz)" - flavor data - calculated 15 + cdl_component CYGHWR_HAL_SH_PLF_CLOCK_SETTINGS { + display "SH on-chip platform clock controls" description " - The EDK/7708 board uses a 15MHz crystal." - } + The various clocks used by the system are derived from + these options." + flavor none + no_define + + cdl_option CYGHWR_HAL_SH_OOC_XTAL { + display "SH clock crystal" + flavor data + legal_values 8000000 to 50000000 + default_value 15000000 + no_define + description " + This option specifies the frequency of the crystal all + other clocks are derived from." + } + + cdl_option CYGHWR_HAL_SH_OOC_PLL_1 { + display "SH clock PLL circuit 1" + flavor data + default_value 1 + legal_values { 0 1 2 4 } + description " + This selects the multiplication factor provided by + PLL1. If PLL1 is disabled via CAP1, this option should + be set to zero." + } - # Real-time clock/counter specifics - cdl_component CYGNUM_HAL_RTC_CONSTANTS { - display "Real-time clock constants." - description " - Using TMU counter 0, clocked at p/4, with peripheral clock - sourced directly from the 15MHz crystal (which is the - default setup on the EDK). This means 150000/4 - oscillations in 1/100 second." - flavor none - - cdl_option CYGNUM_HAL_RTC_NUMERATOR { - display "Real-time clock numerator" - flavor data - calculated 1000000000 + cdl_option CYGHWR_HAL_SH_OOC_PLL_2 { + display "SH clock PLL circuit 2" + flavor data + default_value 4 + legal_values { 0 1 4 } + no_define + description " + This selects the multiplication factor provided by + PLL2. If PLL2 is disabled via CAP2, this option should + be set to zero." + } + + cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_1 { + display "SH clock divider 1" + flavor data + default_value 1 + legal_values { 1 2 3 4 } + description " + This divider option affects the CPU core clock." } - cdl_option CYGNUM_HAL_RTC_DENOMINATOR { - display "Real-time clock denominator" - flavor data - calculated 100 + + cdl_option CYGHWR_HAL_SH_OOC_DIVIDER_2 { + display "SH clock divider 2" + flavor data + default_value 4 + legal_values { 1 2 3 4 } + description " + This divider option affects the peripheral clock." } - cdl_option CYGNUM_HAL_RTC_PERIOD { - display "Real-time clock period" - flavor data - calculated { CYGHWR_HAL_SH_BOARD_SPEED*1000000/CYGNUM_HAL_RTC_DENOMINATOR/4 } + + cdl_option CYGHWR_HAL_SH_OOC_CLOCK_MODE { + display "SH clock mode" + flavor data + default_value 2 + legal_values { 0 1 2 3 4 7 } + description " + This option must mirror the clock mode hardwired on + the MD0-MD2 pins of the CPU in order to correctly + initialize the FRQCR register." } } @@ -152,6 +189,7 @@ cdl_package CYGPKG_HAL_SH_EDK7708 { display "Global build options" flavor none parent CYGPKG_NONE + no_define description " Global build options including control over compiler flags, linker flags and choice of toolchain."
--- a/packages/hal/sh/edk/current/include/platform.inc +++ b/packages/hal/sh/edk/current/include/platform.inc @@ -71,6 +71,9 @@ 1: mov.w @r3+,r0 BSC_settings_table: # These are the settings set by the Hitachi ROM Monitor. + .word CYGARC_REG_FRQCR + .word CYGARC_REG_FRQCR_INIT + # BCR2: Bus size of areas 1-6 to 32 bits .word CYGARC_REG_BCR2 .word 0x3ffc
--- a/packages/hal/v85x/arch/current/ChangeLog +++ b/packages/hal/v85x/arch/current/ChangeLog @@ -1,3 +1,7 @@ +2000-10-09 Gary Thomas <gthomas@redhat.com> + + * src/vectors.S (start): Need to handle ^C for all applications. + 2000-09-13 Jonathan Larmour <jlarmour@redhat.com> * src/vectors.S: When calling C functions, ensure there is 16 bytes
--- a/packages/hal/v85x/arch/current/src/vectors.S +++ b/packages/hal/v85x/arch/current/src/vectors.S @@ -172,6 +172,13 @@ 10: st.w r8,0[r6] bne 10b #endif jarl _initialize_stub,r31 +#else // CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS +// All programs need to provide for NMI handlers + lea _hal_vsr_table+4,r6 + lea do_exception,r8 + st.w r8,0[r6] +#endif // CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS + #ifdef CYGSEM_HAL_VIRTUAL_VECTOR_SUPPORT // this _check_ should go away #if defined(CYGDBG_HAL_DEBUG_GDB_CTRLC_SUPPORT) \ || defined(CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT) @@ -179,13 +186,6 @@ 10: st.w r8,0[r6] jarl _hal_ctrlc_isr_init,r31 #endif #endif -#else // CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS -// All programs need to provide for NMI handlers - lea _hal_vsr_table+4,r6 - lea do_exception,r8 - st.w r8,0[r6] -#endif // CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS - // Run through static constructors jarl _cyg_hal_invoke_constructors,r31
--- a/packages/io/eth/current/ChangeLog +++ b/packages/io/eth/current/ChangeLog @@ -1,3 +1,9 @@ +2000-09-28 Hugo Tyson <hmt@redhat.com> + + * src/net/eth_drv.c (eth_drv_run_deliveries): Remove race + condition; a chance to deliver could be delayed until "next time" + if the DSR snuck in just right. + 2000-09-14 Hugo Tyson <hmt@redhat.com> * cdl/eth_drivers.cdl: Add configury to control new features. All
--- a/packages/io/eth/current/src/net/eth_drv.c +++ b/packages/io/eth/current/src/net/eth_drv.c @@ -730,9 +730,8 @@ void eth_drv_run_deliveries( void ) cyg_netdevtab_entry_t *t; for (t = &__NETDEVTAB__[0]; t != &__NETDEVTAB_END__; t++) { struct eth_drv_sc *sc = (struct eth_drv_sc *)t->device_instance; - int state = sc->state; - sc->state &=~ETH_DRV_NEEDS_DELIVERY; - if ( ETH_DRV_NEEDS_DELIVERY & state ) { + if ( ETH_DRV_NEEDS_DELIVERY & sc->state ) { + sc->state &=~ETH_DRV_NEEDS_DELIVERY; (*sc->funs->deliver)(sc); } }
--- a/packages/io/fileio/current/ChangeLog +++ b/packages/io/fileio/current/ChangeLog @@ -1,3 +1,35 @@ +2000-10-05 Nick Garnett <nickg@cygnus.co.uk> + + * src/file.cxx: Added support for getcwd(). There are three + mechanisms provided here. The first is to use the FS_INFO_GETCWD + key on the filesystem to use any support it has for this. If that + fails it falls back on one of the two other mechanisms. If + CYGPKG_IO_FILEIO_TRACK_CWD is set then the current directory is + tracked textually in chdir() and the result of that is reported in + getcwd(). Otherwise an attempt is made to traverse the directory + tree to its root using ".." entries. This last option is + complicated and expensive, so the other two mechanisms are to be + preferred if possible. + + * include/fileio.h: Added FS_INFO_GETCWD gtinfo option and a + matching struct cyg_getcwd_info. These are used to access getcwd() + support in a filesystem. + + * src/fio.h: Added initial support for POSIX API function entry + and return. + + * cdl/fileio.cdl: Added CYGPKG_IO_FILEIO_TRACK_CWD option to + enable current directory tracking. + +2000-09-28 Nick Garnett <nickg@cygnus.co.uk> + + * src/select.cxx (cyg_selwakeup): + Removed test for whether the waiting thread is actually waiting + for this event. This lead to a race condition when the thread is + still polling other objects but has already checked this + event. Now all waiting selectors are woken up by each selectable + event. + 2000-09-18 Jonathan Larmour <jlarmour@redhat.com> * src/select.cxx: Apply constructor prioritization to mutexes and
--- a/packages/io/fileio/current/cdl/fileio.cdl +++ b/packages/io/fileio/current/cdl/fileio.cdl @@ -129,6 +129,21 @@ cdl_package CYGPKG_IO_FILEIO { network stacks that can be handled by the fileio system." } + cdl_option CYGPKG_IO_FILEIO_TRACK_CWD { + display "Enable current directory tracking" + flavor bool + default_value 1 + description "This option enables tracking of the name of the current + directory in the FILEIO package, to support the getcwd() + function. When this option is enabled the FILEIO package + will attempt to maintain a string that names the current + directory. It does this textually, dealing with \".\" and + \"..\" entries by textual manipulation. While this should + always provide a path for the current directory, it may not + be the best, if symbolic links are present. This tracked CWD + is only used if a filesystem does not support the + FS_INFO_GETCWD key. " + } # ---------------------------------------------------------------- # Tests
--- a/packages/io/fileio/current/include/fileio.h +++ b/packages/io/fileio/current/include/fileio.h @@ -145,6 +145,7 @@ struct cyg_fstab_entry #define FS_INFO_CONF 1 /* pathconf() */ #define FS_INFO_ACCESS 2 /* access() */ +#define FS_INFO_GETCWD 3 /* getcwd() */ //----------------------------------------------------------------------------- // Types for link() @@ -153,6 +154,15 @@ struct cyg_fstab_entry #define CYG_FSLINK_SOFT 2 /* form a soft link */ //----------------------------------------------------------------------------- +// getinfo() and setinfo() buffers structures. + +struct cyg_getcwd_info +{ + char *buf; /* buffer for cwd string */ + size_t size; /* size of buffer */ +}; + +//----------------------------------------------------------------------------- // Macro to define an initialized fstab entry #define FSTAB_ENTRY( _l, _name, _data, _syncmode, _mount, _umount, \
--- a/packages/io/fileio/current/src/file.cxx +++ b/packages/io/fileio/current/src/file.cxx @@ -52,6 +52,9 @@ #include <cyg/infra/cyg_trac.h> // tracing macros #include <cyg/infra/cyg_ass.h> // assertion macros +#include <string.h> // string functions +#include <dirent.h> + #include "fio.h" // Private header #include <cyg/kernel/mutex.hxx> // mutex definitions @@ -64,6 +67,101 @@ #define UNLOCK_FS( _mte_ ) cyg_fs_unlock( _mte_, (_mte_)->fs->syncmode) //========================================================================== +// A local strcpy clone that returns a pointer to the end of the copied +// string, not the beginning. + +static char *my_strcpy( char *s1, const char *s2 ) +{ + while( (*s1++ = *s2++) != 0); + return s1-1; +} + +//========================================================================== +// Compare a pathname fragment with an element in a pathname. This +// deals with zero or separator termination and avoids substring +// matches. + +static int pathcmp( const char *path, const char *name ) +{ + while( *path == *name && *path != '\0' ) + path++, name++; + if( *name != '\0' ) return false; + if( *path == '/' || *path == '\0' ) return true; + return false; +} + +//========================================================================== +// CWD support + +#ifdef CYGPKG_IO_FILEIO_TRACK_CWD + +// buffer for storing CWD path +static char cwd[PATH_MAX]; +static size_t cwd_size = 0; + + +static void update_cwd( cyg_mtab_entry *mte, cyg_dir dir, const char *path ) +{ + char *p = cwd; + + if( mte != cdir_mtab_entry || dir != cdir_dir ) + { + // Here, the path is relative to the root of the filesystem, + // or in a totally new filesystem, initialize the cwd with the + // mount point name of the filesystem. + + p = my_strcpy( p, mte->name ); + } + else p = cwd+cwd_size; + + // We must now copy the path into the cwd buffer while dealing + // with any "." and ".." components textually. + + while( *path != '\0' ) + { + // skip any stray directory separators. + if( *path == '/' ) path++; + + // Look for a "." entry and just ignore it. + if( pathcmp( path, "." ) ) + { + path++; + continue; + } + + // Look for a ".." entry. If found, chew off the last cwd + // entry. + if( pathcmp( path, ".." ) ) + { + while( *(--p) != '/' ); // back up to last '/' + path += 2; // skip "..". + continue; + } + + // Otherwise just copy the name fragment over to the cwd. + + if( *(p-1) != '/' ) + *p++ = '/'; // add a directory separator + while( *path != '/' && *path != '\0' ) + *p++ = *path++; + + } + + // Zero terminate the cwd. + *p = '\0'; + + // update size + cwd_size = p-cwd; +} + +#else + +static Cyg_Mutex getcwd_lock CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_IO); + +#endif + + +//========================================================================== // Open a file __externC int open( const char *path, int oflag, ... ) @@ -297,6 +395,7 @@ int ret = 0; cyg_mtab_entry *mte = cdir_mtab_entry; cyg_dir dir = cdir_dir; + cyg_dir newdir; const char *name = path; ret = cyg_mtab_lookup( &dir, &name, &mte ); @@ -306,13 +405,17 @@ LOCK_FS(mte); - ret = mte->fs->chdir( mte, dir, name, &dir ); + ret = mte->fs->chdir( mte, dir, name, &newdir ); UNLOCK_FS(mte); if( 0 != ret ) FILEIO_RETURN(ret); +#ifdef CYGPKG_IO_FILEIO_TRACK_CWD + update_cwd( mte, dir, name ); +#endif + if( cdir_mtab_entry != NULL ) { // Now detach from current cdir. We call the current directory's @@ -330,7 +433,7 @@ } cdir_mtab_entry = mte; - cdir_dir = dir; + cdir_dir = newdir; FILEIO_RETURN(ENOERR); } @@ -424,5 +527,210 @@ extern int access(const char *path, int FILEIO_RETURN(ENOERR); } +//========================================================================== +// getcwd() + +__externC char *getcwd( char *buf, size_t size ) +{ + FILEIO_ENTRY(); + + int err = ENOERR; + cyg_mtab_entry *mte = cdir_mtab_entry; + cyg_dir dir = cdir_dir; + cyg_getcwd_info info; + + if( size == 0 ) + { + errno = EINVAL; + FILEIO_RETURN_VALUE(NULL); + } + + info.buf = buf; + info.size = size; + + LOCK_FS( mte ); + + err = mte->fs->getinfo( mte, dir, "", + FS_INFO_GETCWD, (char *)&info, sizeof(info) ); + + UNLOCK_FS( mte ); + + if( err == ENOERR ) + FILEIO_RETURN_VALUE(buf); + + // Attempting to use filesystem support for getcwd() has + // failed. + +#ifdef CYGPKG_IO_FILEIO_TRACK_CWD + + // If this option is set, the current directory path has been + // tracked in chdir(). Just report that value here. + + if( size < cwd_size+1 ) + { + errno = ERANGE; + FILEIO_RETURN_VALUE(NULL); + } + + char *p = my_strcpy( buf, cwd ); + *p = '\0'; + +#else + + // As a fallback we try to use ".." entries in the directory tree + // to climb back up to the root. Because we cannot assume that + // any filesystem can handle more than one directory pointer we + // have to do the climbing textually, by manufacturing a path name + // consisting of ".."s. At each level we then scan the parent + // directory looking for the entry for the lower level directory + // by matching st_ino values. This is not guaranteed to work at + // all since there is no requirement on filesystems to support "." + // and "..", or for them to report distinct inode values in + // stat(). + + static char ddbuf[PATH_MAX]; + char *p = buf+size-1; + int ddbufpos; + + // Claim lock to serialize use of ddbuf. + getcwd_lock.lock(); + + // Initialize ddbuf with ".". + ddbuf[0] = '.'; + ddbuf[1] = '\0'; + ddbufpos = 1; + + // Start result buffer with a zero terminator. We accumulate the + // path name in the top end of the result buffer. + *p = '\0'; + + for(;;) + { + struct stat sdbuf; + struct stat sddbuf; + + // Get status for "." and "..". If the filesystem does not + // support these, then this whole function will fail here. + + err = stat( ddbuf, &sdbuf ); + if( err < 0 ) break; + + ddbuf[ddbufpos++] = '/'; + ddbuf[ddbufpos++] = '.'; + ddbuf[ddbufpos++] = '.'; + ddbuf[ddbufpos] = '\0'; + + err = stat( ddbuf, &sddbuf ); + if( err < 0 ) break; + + // See whether we are at the root. This will be true when + // the inode numbers of "." and ".." are the same. + if( sdbuf.st_ino == sddbuf.st_ino ) + break; + + // We now need to find an entry in the ".." directory that + // matches the inode number of ".". + + struct dirent de; + DIR *d = opendir( ddbuf ); + if( d == NULL ) + { + err = -1; + break; + } + + for(;;) + { + struct dirent *res; + struct stat objstat; + int i; + + err = readdir_r( d, &de, &res ); + if( err < 0 || res == NULL ) break; + + // Skip "." and ".." entries. + if( pathcmp( de.d_name, "." ) || pathcmp( de.d_name, ".." ) ) + continue; + + // Tack the name of the directory entry on to the ddbuf + // and stat the object. + + ddbuf[ddbufpos] = '/'; + for( i = 0; de.d_name[i] != '\0'; i++ ) + ddbuf[ddbufpos+i+1] = de.d_name[i]; + ddbuf[ddbufpos+i+1] = '\0'; + + // Take a look at it + err = stat( ddbuf, &objstat ); + if( err < 0 ) break; + + // Cast out directories + if( !S_ISDIR(objstat.st_mode) ) + continue; + + // We have a directory. Compare its inode with that of "." + // and if they are the same, we have found our entry. + + if( sdbuf.st_ino == objstat.st_ino ) + break; + } + + ddbuf[ddbufpos] = '\0'; // reterminate ddbuf + + closedir( d ); + + // Halt on any errors. + if( err < 0 ) + break; + + // Here de contains the name of the directory entry in ".." + // that has the same inode as ".". Add the name to the path we + // are accumulating in the buffer. + + char *q = de.d_name; + while( *q != '\0' ) q++; // skip to end of name + + do + { + *--p = *--q; + } while( q != de.d_name ); + + *--p = '/'; // add a separator + } + + // We have finished using ddbuf now. + getcwd_lock.unlock(); + + if( err < 0 ) + FILEIO_RETURN_VALUE(NULL); + + // We have the directory path in the top end of the buffer. Add + // the mount point name at the beginning and copy the rest of the + // name down. + + char *bp = buf; + + bp = my_strcpy( bp, mte->name ); + + // Sort out the separators between the mount name and the + // pathname. This is a bit messy since we have to deal with mount + // names of both "/" and "/foo" and pathnames that start with '/' + // or are empty. + if( *(bp-1) != '/' && *p != '\0' ) *bp++ = '/'; + if( *p == '/' ) p++; + + // Now copy the path over. + while( *p ) + *bp++ = *p++; + + *bp = '\0'; // Terminate the string + + // All done! + +#endif + + FILEIO_RETURN_VALUE(buf); +} + // ------------------------------------------------------------------------- // EOF file.cxx
--- a/packages/io/fileio/current/src/fio.h +++ b/packages/io/fileio/current/src/fio.h @@ -67,12 +67,35 @@ #include <cyg/kernel/mutex.hxx> // mutex definitions + +//============================================================================= +// POSIX API support + +#ifdef CYGPKG_POSIX + +#include <cyg/posix/export.h> + +#define CYG_FILEIO_FUNCTION_START() CYG_POSIX_FUNCTION_START() + +#define CYG_FILEIO_FUNCTION_FINISH() CYG_POSIX_FUNCTION_FINISH() + +#else + +#define CYG_FILEIO_FUNCTION_START() CYG_EMPTY_STATEMENT + +#define CYG_FILEIO_FUNCTION_FINISH() CYG_EMPTY_STATEMENT + +#endif + //============================================================================= // Fileio function entry and return macros. - // Handle entry to a fileio package function. -#define FILEIO_ENTRY() CYG_REPORT_FUNCTYPE( "returning %d" ); +#define FILEIO_ENTRY() \ +CYG_MACRO_START \ + CYG_REPORT_FUNCTYPE( "returning %d" ); \ + CYG_FILEIO_FUNCTION_START(); \ +CYG_MACRO_END // Do a fileio package defined return. This requires the error code // to be placed in errno, and if it is non-zero, -1 returned as the @@ -82,6 +105,7 @@ #define FILEIO_RETURN(err) \ CYG_MACRO_START \ int __retval = 0; \ + CYG_FILEIO_FUNCTION_FINISH(); \ if( err != 0 ) __retval = -1, errno = err; \ CYG_REPORT_RETVAL( __retval ); \ return __retval; \ @@ -89,12 +113,14 @@ CYG_MACRO_END #define FILEIO_RETURN_VALUE(val) \ CYG_MACRO_START \ - CYG_REPORT_RETVAL( val ); \ - return val; \ + CYG_FILEIO_FUNCTION_FINISH(); \ + CYG_REPORT_RETVAL( val ); \ + return val; \ CYG_MACRO_END #define FILEIO_RETURN_VOID() \ CYG_MACRO_START \ + CYG_FILEIO_FUNCTION_FINISH(); \ CYG_REPORT_RETURN(); \ return; \ CYG_MACRO_END
--- a/packages/io/fileio/current/src/select.cxx +++ b/packages/io/fileio/current/src/select.cxx @@ -285,31 +285,15 @@ void cyg_selwakeup( struct CYG_SELINFO_T if( sip->si_thread != 0 ) { // If the thread pointer is still present, this selection has - // not been fired before. Test whether the thread is still - // waiting on the selwait condvar and if so, wake all waiters - // on it. + // not been fired before. We just wake up all threads waiting, + // regardless of whether they are waiting for this event or + // not. This avoids any race conditions, and is consistent + // with the behaviour of the BSD kernel. - // Note that this code has to be a bit careful with accessing - // the thread. Since there is no select cancel mechanism, the - // information in si_thread may be old, and the thread may - // have been deleted in the meantime. However, we do know that - // any address in si_thread was for a thread object at some - // time in the past, so will not be an illegal address, and - // the get_current_queue() member is a simple memory - // access. Hence the worse that this code could do is give a - // false positive and wake up some selectors when it - // shouldn't. However, care should be taken in making any - // changes to this code to avoid adding assumptions that the - // thread pointer is always valid. - - Cyg_Thread *thread = (Cyg_Thread *)sip->si_thread; - - if( thread->get_current_queue() == selwait.get_queue() ) - { - sip->si_thread = 0; - selwait.broadcast(); - selwake_count++; - } + sip->si_thread = 0; + selwait.broadcast(); + selwake_count++; + } Cyg_Scheduler::unlock();
--- a/packages/io/serial/current/ChangeLog +++ b/packages/io/serial/current/ChangeLog @@ -1,3 +1,29 @@ +2000-10-06 Jesper Skov <jskov@redhat.com> + + * src/common/serial.c (serial_rcv_char): Register overruns. + + * src/common/serial.c: Made block request functions return cause + of failure. Necessary for the device driver to be able to + fall-back to other transfer method efficiently. + * include/serial.h: Added enum with failure types. + +2000-10-03 Jesper Skov <jskov@redhat.co.uk> + + * tests/ser_test_protocol.inl: Moved testing parameters to device + driver CDL for SH targets. + +2000-09-29 Jesper Skov <jskov@redhat.com> + + * include/serialio.h: Fix compiler warning and errors due to + non-default flow control config. + +2000-09-27 Jesper Skov <jskov@redhat.com> + + * src/common/serial.c (serial_data_rcv_done, + serial_data_xmt_done): Buffer pointers updated in _done instead of + in _req to avoid race in xmt. Same change in rcv for consistency. + * include/serial.h: Changed prototype accordingly. + 2000-09-18 Jesper Skov <jskov@redhat.com> * cdl/io_serial.cdl: Added interfaces to allow test tweaking.
--- a/packages/io/serial/current/include/serial.h +++ b/packages/io/serial/current/include/serial.h @@ -60,6 +60,20 @@ typedef struct serial_channel serial_channel; typedef struct serial_funs serial_funs; +// The block transfer request functions may fail for one of two +// reasons. It's important for the caller to know which. +typedef enum { + CYG_RCV_OK, + CYG_RCV_FULL, + CYG_RCV_DISABLED +} rcv_req_reply_t; + +typedef enum { + CYG_XMT_OK, + CYG_XMT_EMPTY, + CYG_XMT_DISABLED +} xmt_req_reply_t; + // Pointers into upper-level driver which interrupt handlers need typedef struct { // Initialize the channel @@ -70,15 +84,15 @@ typedef struct { void (*rcv_char)(serial_channel *chan, unsigned char c); #if CYGINT_IO_SERIAL_BLOCK_TRANSFER // Request space for input characters - bool (*data_rcv_req)(serial_channel *chan, int avail, - int* space_avail, unsigned char** space); + rcv_req_reply_t (*data_rcv_req)(serial_channel *chan, int avail, + int* space_avail, unsigned char** space); // Receive operation completed - void (*data_rcv_done)(serial_channel *chan); + void (*data_rcv_done)(serial_channel *chan, int chars_rcvd); // Request characters for transmission - bool (*data_xmt_req)(serial_channel *chan, int space, - int* chars_avail, unsigned char** chars); + xmt_req_reply_t (*data_xmt_req)(serial_channel *chan, int space, + int* chars_avail, unsigned char** chars); // Transmit operation completed - void (*data_xmt_done)(serial_channel *chan); + void (*data_xmt_done)(serial_channel *chan, int chars_sent); #endif #if defined(CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS) void (*indicate_status)(serial_channel *chan, cyg_serial_line_status_t *s ); @@ -136,7 +150,7 @@ typedef struct { volatile int put; volatile int get; int len; - int nb; // count of bytes currently in buffer + volatile int nb; // count of bytes currently in buffer int low_water; // For tx: min space in buffer before restart // For rx: max buffer used before flow unthrottled #ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL @@ -154,6 +168,12 @@ typedef struct { #ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT struct CYG_SELINFO_TAG selinfo; // select info #endif + +#ifdef CYGDBG_USE_ASSERTS +#ifdef CYGINT_IO_SERIAL_BLOCK_TRANSFER + bool block_mode_xfer_running; +#endif // CYGINT_IO_SERIAL_BLOCK_TRANSFER +#endif // CYGDBG_USE_ASSERTS } cbuf_t; #define CBUF_INIT(_data, _len) \
--- a/packages/io/serial/current/include/serialio.h +++ b/packages/io/serial/current/include/serialio.h @@ -182,14 +182,13 @@ typedef struct { #define CYG_SERIAL_STOP_DEFAULT CYGNUM_SERIAL_STOP_1 #define CYG_SERIAL_PARITY_DEFAULT CYGNUM_SERIAL_PARITY_NONE #define CYG_SERIAL_WORD_LENGTH_DEFAULT CYGNUM_SERIAL_WORD_LENGTH_8 -#define CYG_SERIAL_FLAGS_DEFAULT 0 #ifdef CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT_XONXOFF -# define CYG_SERIAL_FLAGS_DEFAULT CYG_SERIAL_FLOW_XONXOFF +# define CYG_SERIAL_FLAGS_DEFAULT (CYGNUM_SERIAL_FLOW_XONXOFF_RX|CYGNUM_SERIAL_FLOW_XONXOFF_TX) #elif defined(CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT_RTSCTS) -# define CYG_SERIAL_FLAGS_DEFAULT CYG_SERIAL_FLOW_RTSCTS +# define CYG_SERIAL_FLAGS_DEFAULT (CYGNUM_SERIAL_FLOW_RTSCTS_RX|CYGNUM_SERIAL_FLOW_RTSCTS_TX) #elif defined(CYGDAT_IO_SERIAL_FLOW_CONTROL_DEFAULT_DSRDTR) -# define CYG_SERIAL_FLAGS_DEFAULT CYG_SERIAL_FLOW_DSRDTR +# define CYG_SERIAL_FLAGS_DEFAULT (CYGNUM_SERIAL_FLOW_DSRDTR_RX|CYGNUM_SERIAL_FLOW_DSRDTR_TX) #else # define CYG_SERIAL_FLAGS_DEFAULT 0 #endif
--- a/packages/io/serial/current/src/common/serial.c +++ b/packages/io/serial/current/src/common/serial.c @@ -71,12 +71,14 @@ static void serial_indicate_status(seria cyg_serial_line_status_t *s); #endif #if CYGINT_IO_SERIAL_BLOCK_TRANSFER -static bool serial_data_rcv_req(serial_channel *chan, int avail, - int* space_avail, unsigned char** space); -static void serial_data_rcv_done(serial_channel *chan); -static bool serial_data_xmt_req(serial_channel *chan, int space, - int* chars_avail, unsigned char** chars); -static void serial_data_xmt_done(serial_channel *chan); +static rcv_req_reply_t serial_data_rcv_req(serial_channel *chan, int avail, + int* space_avail, + unsigned char** space); +static void serial_data_rcv_done(serial_channel *chan, int chars_rcvd); +static xmt_req_reply_t serial_data_xmt_req(serial_channel *chan, int space, + int* chars_avail, + unsigned char** chars); +static void serial_data_xmt_done(serial_channel *chan, int chars_sent); # ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_HW SERIAL_CALLBACKS(cyg_io_serial_callbacks, serial_init, @@ -269,6 +271,12 @@ serial_init(serial_channel *chan) chan->status_callback = NULL; #endif +#ifdef CYGDBG_USE_ASSERTS +#ifdef CYGINT_IO_SERIAL_BLOCK_TRANSFER + chan->in_cbuf.block_mode_xfer_running = false; + chan->out_cbuf.block_mode_xfer_running = false; +#endif // CYGINT_IO_SERIAL_BLOCK_TRANSFER +#endif // CYGDBG_USE_ASSERTS chan->init = true; } @@ -299,7 +307,8 @@ serial_write(cyg_io_handle_t handle, con ((funs->putc)(chan, *buf) == false) ) ; // Ignore full, keep trying #else - while ((funs->putc)(chan, *buf) == false) ; // Ignore full, keep trying + while ((funs->putc)(chan, *buf) == false) + ; // Ignore full, keep trying #endif buf++; } @@ -316,7 +325,8 @@ serial_write(cyg_io_handle_t handle, con #endif (funs->start_xmit)(chan); // Make sure xmit is running - // Check flag: 'start_xmit' may have obviated the need to wait :-) + // Check flag: 'start_xmit' may have obviated the need + // to wait :-) if (cbuf->waiting) { #ifdef CYGOPT_IO_SERIAL_SUPPORT_NONBLOCKING // Optionally return if configured for non-blocking mode. @@ -527,7 +537,8 @@ serial_select(cyg_io_handle_t handle, cy // --------------------------------------------------------------------------- static Cyg_ErrNo -serial_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *xbuf, cyg_uint32 *len) +serial_get_config(cyg_io_handle_t handle, cyg_uint32 key, void *xbuf, + cyg_uint32 *len) { cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle; serial_channel *chan = (serial_channel *)t->priv; @@ -656,7 +667,8 @@ serial_get_config(cyg_io_handle_t handle // --------------------------------------------------------------------------- static Cyg_ErrNo -serial_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *xbuf, cyg_uint32 *len) +serial_set_config(cyg_io_handle_t handle, cyg_uint32 key, const void *xbuf, + cyg_uint32 *len) { Cyg_ErrNo res = ENOERR; cyg_devtab_entry_t *t = (cyg_devtab_entry_t *)handle; @@ -795,8 +807,13 @@ serial_xmt_char(serial_channel *chan) unsigned char c; int space; +#if CYGINT_IO_SERIAL_BLOCK_TRANSFER + CYG_ASSERT(false == cbuf->block_mode_xfer_running, + "Attempting char xmt while block transfer is running"); +#endif #ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE - // if we are required to send an XON/XOFF char, send it before anything else + // if we are required to send an XON/XOFF char, send it before + // anything else // FIXME: what if XON gets corrupted in transit to the other end? // Should we resend XON even though the other end may not be wanting // to send us stuff at this point? @@ -859,6 +876,10 @@ serial_rcv_char(serial_channel *chan, un { cbuf_t *cbuf = &chan->in_cbuf; +#if CYGINT_IO_SERIAL_BLOCK_TRANSFER + CYG_ASSERT(false == cbuf->block_mode_xfer_running, + "Attempting char rcv while block transfer is running"); +#endif #ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE // for software flow control, if the driver returns one of the characters // we act on it and then drop it (the app must not see it) @@ -888,12 +909,20 @@ serial_rcv_char(serial_channel *chan, un // If the flow control is not enabled/sufficient and the buffer is // already full, just throw new characters away. - if( cbuf->nb < cbuf->len ) - { + if ( cbuf->nb < cbuf->len ) { cbuf->data[cbuf->put++] = c; if (cbuf->put == cbuf->len) cbuf->put = 0; cbuf->nb++; + } // note trailing else +#ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS + else { + // Overrun. Report the error. + cyg_serial_line_status_t stat; + stat.which = CYGNUM_SERIAL_STATUS_OVERRUNERR; + serial_indicate_status(chan, &stat); } +#endif + if (cbuf->waiting) { #ifdef XX_CYGDBG_DIAG_BUF extern int enable_diag_uart; @@ -932,20 +961,47 @@ serial_indicate_status(serial_channel *c #endif // ifdef CYGOPT_IO_SERIAL_SUPPORT_LINE_STATUS //---------------------------------------------------------------------------- -// Block transfer functions. Not all drivers require these. +// Block transfer functions. Not all drivers require these. Those that +// do must follow the required semantics: +// +// Attempt to transfer as much via the block transfer function as +// possible, _but_ if that fails, do the remaining bytes via the +// single-char function. That ensures that all policy decisions can be +// made in this driver, and not in the device driver. +// +// Note: if the driver uses DMA for transmission, an initial failing +// call to the xmt_req function must cause the start_xmit function to +// fall-back to regular CPU-interrupt based single-character +// transmission. + #if CYGINT_IO_SERIAL_BLOCK_TRANSFER -static bool +static rcv_req_reply_t serial_data_rcv_req(serial_channel *chan, int avail, int* space_avail, unsigned char** space) { cbuf_t *cbuf = &chan->in_cbuf; int gap; +#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE + // When there is software flow-control, force the serial device + // driver to use the single-char xmt/rcv functions, since these + // have to make policy decision based on the data. Rcv function + // may also have to transmit data to throttle the xmitter. + if (chan->config.flags & (CYGNUM_SERIAL_FLOW_XONXOFF_TX|CYGNUM_SERIAL_FLOW_XONXOFF_RX)) + return CYG_RCV_DISABLED; +#endif + + CYG_ASSERT(false == cbuf->block_mode_xfer_running, + "Attempting new block transfer while another is running"); // Check for space gap = cbuf->nb; if (gap == cbuf->len) - return false; // full + return CYG_RCV_FULL; + +#ifdef CYGDBG_USE_ASSERTS + cbuf->block_mode_xfer_running = true; +#endif if (0 == gap) { // Buffer is empty. Reset put/get indexes to get max transfer in @@ -970,42 +1026,80 @@ serial_data_rcv_req(serial_channel *chan *space_avail = gap; *space = &cbuf->data[cbuf->put]; - cbuf->put += gap; - cbuf->nb += gap; + + CYG_ASSERT((gap+cbuf->nb) <= cbuf->len, "Buffer will overflow"); + CYG_ASSERT(cbuf->put < cbuf->len, "Invalid put ptr"); + CYG_ASSERT(cbuf->get < cbuf->len, "Invalid get ptr"); + + return CYG_RCV_OK; +} + +static void +serial_data_rcv_done(serial_channel *chan, int chars_rcvd) +{ + cbuf_t *cbuf = &chan->in_cbuf; + + cbuf->put += chars_rcvd; + cbuf->nb += chars_rcvd; if (cbuf->put == cbuf->len) cbuf->put = 0; - return true; -} + CYG_ASSERT(cbuf->nb <= cbuf->len, "Buffer overflow"); + CYG_ASSERT(cbuf->put < cbuf->len, "Invalid put ptr"); + CYG_ASSERT(cbuf->get < cbuf->len, "Invalid get ptr"); -static void -serial_data_rcv_done(serial_channel *chan) -{ - cbuf_t *cbuf = &chan->in_cbuf; if (cbuf->waiting) { cbuf->waiting = false; cyg_drv_cond_signal(&cbuf->wait); } +#ifdef CYGPKG_IO_SERIAL_FLOW_CONTROL + // If we've hit the high water mark, tell the other side to stop + if ( cbuf->nb >= cbuf->high_water ) { + throttle_rx( chan, false ); + } +#endif #ifdef CYGPKG_IO_SERIAL_SELECT_SUPPORT // Wake up any pending selectors if we have // put some data into a previously empty buffer. - cyg_selwakeup( &cbuf->selinfo ); + if (chars_rcvd == cbuf->nb) + cyg_selwakeup( &cbuf->selinfo ); +#endif + +#ifdef CYGDBG_USE_ASSERTS + cbuf->block_mode_xfer_running = false; #endif } -static bool +static xmt_req_reply_t serial_data_xmt_req(serial_channel *chan, int space, int* chars_avail, unsigned char** chars) { cbuf_t *cbuf = &chan->out_cbuf; int avail; +#ifdef CYGOPT_IO_SERIAL_FLOW_CONTROL_SOFTWARE + // When there is software flow-control, force the serial device + // driver to use the single-char xmt/rcv functions, since these + // have to make policy decision based on the data. Rcv function + // may also have to transmit data to throttle the xmitter. + if (chan->config.flags & (CYGNUM_SERIAL_FLOW_XONXOFF_TX|CYGNUM_SERIAL_FLOW_XONXOFF_RX)) + return CYG_XMT_DISABLED; +#endif + + CYG_ASSERT(false == cbuf->block_mode_xfer_running, + "Attempting new block transfer while another is running"); + // Available data (G = get, P = put, x = data, . = empty) // 0: no data // negative: xxxxP.....Gxxx [offer last chunk only] // positive: ..GxxxxxP..... if (0 == cbuf->nb) - return false; + return CYG_XMT_EMPTY; + +#ifdef CYGDBG_USE_ASSERTS + cbuf->block_mode_xfer_running = true; +#endif + if (cbuf->get >= cbuf->put) { avail = cbuf->len - cbuf->get; } else { @@ -1016,22 +1110,36 @@ serial_data_xmt_req(serial_channel *chan *chars_avail = avail; *chars = &cbuf->data[cbuf->get]; - cbuf->get += avail; - cbuf->nb -= avail; - if (cbuf->get == cbuf->len) cbuf->get = 0; + CYG_ASSERT(avail <= cbuf->len, "Avail overflow"); + CYG_ASSERT(cbuf->nb <= cbuf->len, "Buffer overflow"); + CYG_ASSERT(cbuf->put < cbuf->len, "Invalid put ptr"); + CYG_ASSERT(cbuf->get < cbuf->len, "Invalid get ptr"); - return true; + return CYG_XMT_OK; } static void -serial_data_xmt_done(serial_channel *chan) +serial_data_xmt_done(serial_channel *chan, int chars_sent) { cbuf_t *cbuf = &chan->out_cbuf; serial_funs *funs = chan->funs; int space; - (funs->stop_xmit)(chan); // Done with transmit + cbuf->get += chars_sent; + cbuf->nb -= chars_sent; + + if (cbuf->get == cbuf->len) cbuf->get = 0; + + CYG_ASSERT(cbuf->nb <= cbuf->len, "Buffer overflow"); + CYG_ASSERT(cbuf->nb >= 0, "Buffer underflow"); + CYG_ASSERT(cbuf->put < cbuf->len, "Invalid put ptr"); + CYG_ASSERT(cbuf->get < cbuf->len, "Invalid get ptr"); + + if (0 == cbuf->nb) { + (funs->stop_xmit)(chan); // Done with transmit + cbuf->get = cbuf->put = 0; // reset ptrs if empty + } // See if there is now enough room to restart writer space = cbuf->len - cbuf->nb; @@ -1044,6 +1152,10 @@ serial_data_xmt_done(serial_channel *cha cyg_selwakeup( &cbuf->selinfo ); #endif } + +#ifdef CYGDBG_USE_ASSERTS + cbuf->block_mode_xfer_running = false; +#endif } #endif // CYGINT_IO_SERIAL_BLOCK_TRANSFER
--- a/packages/io/serial/current/tests/ser_test_protocol.inl +++ b/packages/io/serial/current/tests/ser_test_protocol.inl @@ -196,24 +196,6 @@ # endif # endif #endif -#if defined(CYGPKG_HAL_SH) \ - && defined(CYGPKG_IO_SERIAL_SH_EDK7708) \ - && defined(CYGPKG_IO_SERIAL_SH_EDK7708_SERIAL1) -# define TEST_CRASH_ID "sh7708" -# define TEST_SER_DEV CYGDAT_IO_SERIAL_SH_EDK7708_SERIAL1_NAME -# if defined(CYGPKG_IO_SERIAL_TTY_TTY2) -# define TEST_TTY_DEV CYGDAT_IO_SERIAL_TTY_TTY1_DEV -# endif -#endif -#if defined(CYGPKG_HAL_SH) \ - && defined(CYGPKG_IO_SERIAL_SH_CQ7708) \ - && defined(CYGPKG_IO_SERIAL_SH_CQ7708_SERIAL1) -# define TEST_CRASH_ID "cq7708" -# define TEST_SER_DEV CYGDAT_IO_SERIAL_SH_CQ7708_SERIAL1_NAME -# if defined(CYGPKG_IO_SERIAL_TTY_TTY2) -# define TEST_TTY_DEV CYGDAT_IO_SERIAL_TTY_TTY1_DEV -# endif -#endif #if defined(CYGPKG_HAL_I386_PC) \ && defined(CYGPKG_IO_SERIAL_I386_PC) \ && defined(CYGPKG_IO_SERIAL_I386_PC_SERIAL0)
--- a/packages/isoinfra/current/ChangeLog +++ b/packages/isoinfra/current/ChangeLog @@ -1,3 +1,11 @@ +2000-10-05 Nick Garnett <nickg@cygnus.co.uk> + + * include/sys/types.h: Changed type of pid_t to plain int. It + needs to be signed. + + * include/unistd.h: Fixed prototypes of several functions to match + POSIX standard. + 2000-09-11 Jonathan Larmour <jlarmour@redhat.com> * cdl/isoinfra.cdl: Add CYGBLD_ISO_{OPEN,LINK,NAME,PATH}_MAX_HEADER
--- a/packages/isoinfra/current/include/sys/types.h +++ b/packages/isoinfra/current/include/sys/types.h @@ -80,7 +80,7 @@ typedef unsigned long off_t; #else typedef unsigned short gid_t; typedef unsigned short uid_t; -typedef unsigned int pid_t; +typedef int pid_t; #endif #if CYGINT_ISO_PTHREADTYPES
--- a/packages/isoinfra/current/include/unistd.h +++ b/packages/isoinfra/current/include/unistd.h @@ -181,10 +181,10 @@ extern int fsync( int fd ); extern int ftruncate(int fd, unsigned long length); extern int chdir(const char *path); -extern char *getcwd(char *buf, int size); +extern char *getcwd(char *buf, size_t size); -extern int getpid(void); -extern int getppid(void); +extern pid_t getpid(void); +extern pid_t getppid(void); extern uid_t getuid(void); extern uid_t geteuid(void); extern uid_t getgid(void);
--- a/packages/kernel/current/ChangeLog +++ b/packages/kernel/current/ChangeLog @@ -1,3 +1,30 @@ +2000-10-05 Jesper Skov <jskov@redhat.co.uk> + + * src/intr/intr.cxx: Made dsr_table_tail volatile as well. + * include/intr.hxx: Ditto. + +2000-10-05 Nick Garnett <nickg@cygnus.co.uk> + + * src/sched/sched.cxx: + * include/sched.hxx: Converted asr_inhibit from a bool to a + counter. This is necessary to permit nesting of ASR inhibiting + functions. + +2000-10-04 Jesper Skov <jskov@redhat.co.uk> + + * include/intr.hxx: Made dsr_list volatile. + * src/intr/intr.cxx: Same. Also fix compiler warning. + +2000-09-25 Nick Garnett <nickg@cygnus.co.uk> + + * src/sched/mlqueue.cxx: + Added test for current thread not runnable in + Cyg_Scheduler_Implementation::timeslice(). This is possible if a + prior DSR has caused the current thread to be descheduled. Added + an assert to Cyg_ThreadQueue_Implementation::rotate() for + additional paranoia. (This problem was originally identified and + fixed (differently) by Andrew Lunn <andrew.lunn@ascom.ch>.) + 2000-09-13 Jesper Skov <jskov@redhat.com> * tests/kexcept1.c (cause_exception): Use separate cause_fpe function.
--- a/packages/kernel/current/include/intr.hxx +++ b/packages/kernel/current/include/intr.hxx @@ -158,16 +158,16 @@ class Cyg_Interrupt static cyg_ucount32 dsr_table_head; - static cyg_ucount32 dsr_table_tail; + static volatile cyg_ucount32 dsr_table_tail; #endif #ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST - cyg_ucount32 dsr_count; // Number of DSR posts made + cyg_ucount32 dsr_count; // Number of DSR posts made - Cyg_Interrupt *next_dsr; // next DSR in list + volatile Cyg_Interrupt *next_dsr; // next DSR in list - static Cyg_Interrupt *dsr_list; // static list of pending DSRs + static volatile Cyg_Interrupt *dsr_list; // static list of pending DSRs #endif
--- a/packages/kernel/current/include/sched.hxx +++ b/packages/kernel/current/include/sched.hxx @@ -192,9 +192,9 @@ public: private: - volatile cyg_bool asr_inhibit; // If true, blocks calls to ASRs + volatile cyg_ucount32 asr_inhibit; // If > 0, blocks calls to ASRs - volatile cyg_bool asr_pending; // If true, this thread's ASR should be called. + volatile cyg_bool asr_pending; // If true, this thread's ASR should be called. #ifdef CYGSEM_KERNEL_SCHED_ASR_GLOBAL static @@ -213,9 +213,9 @@ public: // Public interface to ASR mechanism // Set, clear and get inhibit flag. - inline void set_asr_inhibit() { asr_inhibit = true; } - inline void clear_asr_inhibit() { asr_inhibit = false; } - inline cyg_bool get_asr_inhibit() { return asr_inhibit; } + inline void set_asr_inhibit() { asr_inhibit++; } + inline void clear_asr_inhibit() { asr_inhibit--; } + inline cyg_ucount32 get_asr_inhibit() { return asr_inhibit; } // Set and get pending flag. The flag is only cleared when the // ASR is called.
--- a/packages/kernel/current/src/intr/intr.cxx +++ b/packages/kernel/current/src/intr/intr.cxx @@ -119,13 +119,13 @@ Cyg_Interrupt::dsr_table[CYGNUM_KERNEL_I cyg_ucount32 Cyg_Interrupt::dsr_table_head = 0; -cyg_ucount32 Cyg_Interrupt::dsr_table_tail = 0; +volatile cyg_ucount32 Cyg_Interrupt::dsr_table_tail = 0; #endif #ifdef CYGIMP_KERNEL_INTERRUPTS_DSRS_LIST -Cyg_Interrupt *Cyg_Interrupt::dsr_list = NULL; +volatile Cyg_Interrupt *Cyg_Interrupt::dsr_list = NULL; #endif @@ -160,7 +160,7 @@ Cyg_Interrupt::call_pending_DSRs_inner(v while( dsr_list != NULL ) { - Cyg_Interrupt *intr; + volatile Cyg_Interrupt *intr; cyg_uint32 old_intr; cyg_count32 count; @@ -358,7 +358,7 @@ Cyg_Interrupt::chain_isr(cyg_vector vect // report the spurious interrupt, or do some other HAL level processing // such as GDB interrupt detection etc. - HAL_DEFAULT_ISR( vector, NULL ); + HAL_DEFAULT_ISR( vector, 0 ); } #endif return 0;
--- a/packages/kernel/current/src/sched/mlqueue.cxx +++ b/packages/kernel/current/src/sched/mlqueue.cxx @@ -276,20 +276,26 @@ Cyg_Scheduler_Implementation::timeslice( CYG_ASSERT( sched_lock > 0 , "Timeslice called with zero sched_lock"); Cyg_Thread *thread = current_thread; - Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler; - CYG_ASSERTCLASS( thread, "Bad current thread"); - CYG_ASSERTCLASS( sched, "Bad scheduler"); + // Only try to rotate the run queue if the current thread is running. + // Otherwise we are going to reschedule anyway. + if( thread->get_state() == Cyg_Thread::RUNNING ) + { + Cyg_Scheduler *sched = &Cyg_Scheduler::scheduler; + + CYG_ASSERTCLASS( thread, "Bad current thread"); + CYG_ASSERTCLASS( sched, "Bad scheduler"); - cyg_priority pri = thread->priority; - Cyg_SchedulerThreadQueue_Implementation *queue = &sched->run_queue[pri]; + cyg_priority pri = thread->priority; + Cyg_SchedulerThreadQueue_Implementation *queue = &sched->run_queue[pri]; - queue->rotate(); + queue->rotate(); - if( queue->highpri() != thread ) - sched->need_reschedule = true; + if( queue->highpri() != thread ) + sched->need_reschedule = true; - timeslice_count = CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS; + timeslice_count = CYGNUM_KERNEL_SCHED_TIMESLICE_TICKS; + } } @@ -656,7 +662,9 @@ void Cyg_ThreadQueue_Implementation::rotate(void) { CYG_REPORT_FUNCTION(); - + + CYG_ASSERT(queue != 0, "Rotating an empty queue"); + queue = queue->next; CYG_REPORT_RETURN();
--- a/packages/kernel/current/src/sched/sched.cxx +++ b/packages/kernel/current/src/sched/sched.cxx @@ -207,7 +207,7 @@ void Cyg_Scheduler::unlock_inner( cyg_uc cyg_bool call_asr = false; - if( !current->asr_inhibit && current->asr_pending ) + if( (current->asr_inhibit == 0) && current->asr_pending ) { call_asr = true; current->asr_pending = false; @@ -373,7 +373,7 @@ Cyg_SchedThread::Cyg_SchedThread(Cyg_Thr #ifdef CYGSEM_KERNEL_SCHED_ASR_SUPPORT - asr_inhibit = false; + asr_inhibit = 0; asr_pending = false; #ifndef CYGSEM_KERNEL_SCHED_ASR_GLOBAL
--- a/packages/language/c/libc/startup/current/ChangeLog +++ b/packages/language/c/libc/startup/current/ChangeLog @@ -1,3 +1,9 @@ +2000-10-12 Jonathan Larmour <jlarmour@redhat.com> + + * cdl/startup.cdl (CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS): + Special case for POSIX package startup since we know it calls + cyg_libc_invoke_main() rather than main directly. + 2000-08-07 Jonathan Larmour <jlarmour@redhat.co.uk> * src/invokemain.cxx: Declare cyg_hal_stop_constructors
--- a/packages/language/c/libc/startup/current/cdl/startup.cdl +++ b/packages/language/c/libc/startup/current/cdl/startup.cdl @@ -260,7 +260,8 @@ cdl_package CYGPKG_LIBC_STARTUP { cdl_option CYGSEM_LIBC_INVOKE_DEFAULT_STATIC_CONSTRUCTORS { display "Invoke default static constructors" requires CYGSEM_HAL_STOP_CONSTRUCTORS_ON_FLAG - requires CYGSEM_LIBC_STARTUP_MAIN_THREAD + requires { CYGSEM_LIBC_STARTUP_MAIN_THREAD || \ + (CYGSEM_LIBC_STARTUP_MAIN_OTHER && CYGPKG_POSIX_PTHREAD) } default_value 0 description " This option causes the C library to call
--- a/packages/net/tcpip/current/ChangeLog +++ b/packages/net/tcpip/current/ChangeLog @@ -1,3 +1,77 @@ +2000-10-10 Hugo Tyson <hmt@redhat.com> + + * src/lib/tftp_server.c (tftpd_server): Modify the server to + support multiple sessions - ie. starting N servers at once. + Mainly this means closing the initial socket whilst servicing a + request, so that another server can then bind to it; tell another + server to retry that bind via a semaphore, that it waited on when + the bind failed initially, rather than just returning. + + * src/lib/tftp_dummy_file.c (dummy_open): Trivial bugfix: scan the + list of files as well as incrementing the counter. + +2000-10-05 Andrew Lunn <andrew.lunn@ascom.ch> + + * src/ecos/support.c (cyg_ktime_func,cyg_ktime_init,cyg_net_init): + Make 'ktime' value valid. + +2000-10-05 Hugo Tyson <hmt@redhat.com> + + * src/lib/tftp_server.c (tftpd_write_file): Restructure this + function to match the loop layout of the tftpd_read_file; so that + it retries sensibly, and so that a delayed/duplicated packet does + not cause a doubling of all traffic with a less smart host. + +2000-10-05 Hugo Tyson <hmt@redhat.com> + + * include/tftp_support.h (TFTP_TIMEOUT_MAX): Change this to 50; it + refers to total timeouts for a whole session, so it should be + greater than the retry count for each packet. + +2000-10-05 Hugo Tyson <hmt@redhat.com> + + * src/lib/tftp_dummy_file.c: Make the fake file slots be a Mb + instead of 10k so that you can do meaningful timing tests with it. + (dummy_open): Allow re-write of an existing file so that you can + do repeated put tests without running out of slots. + +2000-10-05 Hugo Tyson <hmt@redhat.com> + + * src/lib/select.c (_cyg_select): Unlock the scheduler in a couple + of other places I missed. Doh. + +2000-09-28 Hugo Tyson <hmt@redhat.com> + + * src/lib/select.c (_cyg_select): Elect to wait for the flags + atomically wrt sockets possibly becoming ready - this was a race + condition that would apparently delay a packet until another + arrived, eg. a tftp retry. Then two came along all at once. + +2000-09-28 Hugo Tyson <hmt@redhat.com> + + * src/lib/tftp_server.c: Add lots of instrumentation for + debugging. It's switched off, and doesn't have a real config opt, + though it easily could have. + +2000-09-26 Hugo Tyson <hmt@redhat.com> + + * src/lib/tftp_server.c (tftpd_read_file): Doh! TFTP_TIMEOUT is an + internal API thing, not an error we can send in an ERROR packet. + + * include/tftp_support.h: Comment to this effect. + +2000-09-26 Hugo Tyson <hmt@redhat.com> +2000-09-25 Andrew Lunn <Andrew.Lunn@ascom.ch> + + * src/lib/tftp_server.c: Send an ERROR packet when giving up after + too many timeouts. This should cause the client to give up as + well. Also moved all the replicated code to send an ERROR packet + into one function. + + [Huge] I collected another point where we can use the common + function also, and used ETIMEOUT instead of EBADOP for the new + error packet returns. Thanks Andrew! + 2000-09-14 Hugo Tyson <hmt@redhat.com> * cdl/net.cdl (CYGOPT_NET_DHCP_DHCP_THREAD_PARAM): Set default to
--- a/packages/net/tcpip/current/include/tftp_support.h +++ b/packages/net/tcpip/current/include/tftp_support.h @@ -64,6 +64,8 @@ /* * Errors */ + +// These initial 7 are passed across the net in "ERROR" packets. #define TFTP_ENOTFOUND 1 /* file not found */ #define TFTP_EACCESS 2 /* access violation */ #define TFTP_ENOSPACE 3 /* disk full or allocation exceeded */ @@ -71,6 +73,7 @@ #define TFTP_EBADID 5 /* unknown transfer ID */ #define TFTP_EEXISTS 6 /* file already exists */ #define TFTP_ENOUSER 7 /* no such user */ +// These extensions are return codes in our API, *never* passed on the net. #define TFTP_TIMEOUT 8 /* operation timed out */ #define TFTP_NETERR 9 /* some sort of network error */ #define TFTP_INVALID 10 /* invalid parameter */ @@ -104,8 +107,8 @@ extern int tftpd_stop(int); extern int tftp_get(char *, struct sockaddr_in *, char *, int, int, int *); extern int tftp_put(char *, struct sockaddr_in *, char *, int, int, int *); -#define TFTP_TIMEOUT_PERIOD 5 -#define TFTP_TIMEOUT_MAX 5 -#define TFTP_RETRIES_MAX 5 +#define TFTP_TIMEOUT_PERIOD 5 // Seconds between retries +#define TFTP_TIMEOUT_MAX 50 // Max timeouts over all blocks +#define TFTP_RETRIES_MAX 5 // retries per block before giving up #endif // _TFTP_SUPPORT_H_
--- a/packages/net/tcpip/current/src/ecos/support.c +++ b/packages/net/tcpip/current/src/ecos/support.c @@ -478,6 +478,36 @@ setsoftnet(void) // schednetisr(NETISR_SOFTNET); } + +/* Update the kernel globel ktime. */ +static void +cyg_ktime_func(cyg_handle_t alarm,cyg_addrword_t data) +{ + cyg_tick_count_t now = cyg_current_time(); + + ktime.tv_usec = (now % hz) * tick; + ktime.tv_sec = now / hz; +} + +static void +cyg_ktime_init(void) +{ + static cyg_handle_t ktime_alarm_handle; + static cyg_alarm ktime_alarm; + cyg_handle_t counter; + + cyg_clock_to_counter(cyg_real_time_clock(),&counter); + cyg_alarm_create(counter, + cyg_ktime_func, + 0, + &ktime_alarm_handle, + &ktime_alarm); + + /* We want one alarm every 10ms. */ + cyg_alarm_initialize(ktime_alarm_handle,cyg_current_time()+1,1); + cyg_alarm_enable(ktime_alarm_handle); +} + // // Network initialization // This function is called during system initialization to setup the whole @@ -510,6 +540,7 @@ cyg_net_init(void) // Initialize network memory system cyg_kmem_init(); mbinit(); + cyg_ktime_init(); // Create network background thread cyg_thread_create(CYGPKG_NET_THREAD_PRIORITY, // Priority
--- a/packages/net/tcpip/current/src/lib/select.c +++ b/packages/net/tcpip/current/src/lib/select.c @@ -103,11 +103,15 @@ static int // Scan sets for possible I/O until something found, timeout or error. while (true) { num = 0; // Total file descriptors "ready" + + cyg_scheduler_lock(); // Scan the list atomically wrt electing to sleep + for (mode = 0; mode < 3; mode++) { if (selection[mode]) { for (fd = 0; fd < nfd; fd++) { if (FD_ISSET(fd, selection[mode])) { if (getfp(fd, &fp)) { + cyg_scheduler_unlock(); // return. errno = EBADF; return -1; } @@ -120,6 +124,9 @@ static int } } if (num) { + + cyg_scheduler_unlock(); // Happy, about to return. + // Found something, update user's sets if (in) { memcpy(in, &in_res, sizeof(in_res)); @@ -136,6 +143,7 @@ static int if (tv) { if (ticks == 0) { // Special case of "poll" + cyg_scheduler_unlock(); // About to return. return 0; } flag = cyg_flag_timed_wait(&select_flag, wait_flag, @@ -146,6 +154,9 @@ static int flag = cyg_flag_wait(&select_flag, wait_flag, CYG_FLAG_WAITMODE_OR); } + + cyg_scheduler_unlock(); // waited atomically + if (flag & SELECT_ABORT) { errno = EINTR; return -1; @@ -175,12 +186,12 @@ selrecord(void *selector, struct selinfo void selwakeup(struct selinfo *info) { - cyg_scheduler_lock(); // Need this test to be indivisible - if (cyg_flag_waiting(&select_flag)) { - // Signal any threads doing a 'select()' that I/O may be possible - cyg_flag_setbits(&select_flag, SELECT_WAKE); - cyg_flag_maskbits(&select_flag, 0 ); // clear all - } + // Need these ops to be atomic to make sure the clear occurs - + // otherwise a higher prio thread could hog the CPU when its fds are + // not ready, but the flag is (already) set, or set for someone else. + cyg_scheduler_lock(); + cyg_flag_setbits(&select_flag, SELECT_WAKE); + cyg_flag_maskbits(&select_flag, 0 ); // clear all cyg_scheduler_unlock(); } @@ -213,12 +224,10 @@ cyg_select_with_abort(int nfd, fd_set *i void cyg_select_abort(void) { - cyg_scheduler_lock(); // Need this test to be indivisible - if (cyg_flag_waiting(&select_flag)) { - // Signal any threads doing a 'select()' that I/O may be possible - cyg_flag_setbits(&select_flag, SELECT_ABORT); - cyg_flag_maskbits(&select_flag, 0 ); // clear all - } + // See comments in selwakeup()... + cyg_scheduler_lock(); + cyg_flag_setbits(&select_flag, SELECT_ABORT); + cyg_flag_maskbits(&select_flag, 0 ); cyg_scheduler_unlock(); }
--- a/packages/net/tcpip/current/src/lib/tftp_dummy_file.c +++ b/packages/net/tcpip/current/src/lib/tftp_dummy_file.c @@ -101,9 +101,9 @@ 5555555555555555555555555555555555 6666666666666666666666666666666666 "; -static char _f0_data[10*1024]; -static char _f1_data[10*1024]; -static char _f2_data[10*1024]; +static char _f0_data[1024*1024]; +static char _f1_data[1024*1024]; +static char _f2_data[1024*1024]; static char _name0[256] = "", _name1[256] = "", _name2[256] = ""; @@ -115,7 +115,7 @@ static struct _file_info file_list[] = { { 0, 0, 0} // End of list }; -static struct _file * +static inline struct _file * dummy_fp(int fd) { struct _file *fp; @@ -134,7 +134,7 @@ dummy_open(const char *fn, int flags) struct _file_info *fi; fp = files; - for (fd = 0; fd < NUM_FILES; fd++) { + for (fd = 0; fd < NUM_FILES; fd++, fp++) { if (!(fp->flags & FILE_OPEN)) break; } if (fd == NUM_FILES) { @@ -158,9 +158,10 @@ dummy_open(const char *fn, int flags) // Search for a non-existant file fi = file_list; while (fi->name) { - if (fi->name[0] == '\0') { - // Empty slot found - strcpy(fi->name, fn); + if (fi->name[0] == '\0' || strcmp(fi->name, fn) == 0) { + if ( !fi->name[0] ) + // Empty slot found + strcpy(fi->name, fn); fp->pos = fi->data; fp->eof = fi->data + fi->size; fp->file = fi; // So we can update file info later @@ -215,3 +216,6 @@ dummy_read(int fd, void *buf, int len) fp->pos += res; return res; } + + +// EOF tftp_dummy_file.c
--- a/packages/net/tcpip/current/src/lib/tftp_server.c +++ b/packages/net/tcpip/current/src/lib/tftp_server.c @@ -60,6 +60,32 @@ #include <cyg/kernel/kapi.h> #include <stdlib.h> // For malloc +#define nCYGOPT_NET_TFTP_SERVER_INSTRUMENT +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + +struct subinfo { + int rx; + int rx_repeat; + int rx_skip; + int send; + int resend; +}; + +struct info { + struct subinfo ack, data; + int err_send; + int total_transactions; +}; + + +static struct info tftp_server_instrument = { + { 0,0,0,0,0 }, + { 0,0,0,0,0 }, + 0, 0, +}; + +#endif // CYGOPT_NET_TFTP_SERVER_INSTRUMENT + #define STACK_SIZE (CYGNUM_HAL_STACK_SIZE_TYPICAL+(3*(SEGSIZE+sizeof(struct tftphdr)))) static char *TFTP_tag = "TFTPD"; struct tftp_server { @@ -72,16 +98,32 @@ struct tftp_server { }; static char * errmsg[] = { - "Undefined error code", - "File not found", - "Access violation", - "Disk full or allocation exceeded", - "Illegal TFTP operation", - "Unknown transfer ID", - "File already exists", - "No such user" + "Undefined error code", // 0 nothing defined + "File not found", // 1 TFTP_ENOTFOUND + "Access violation", // 2 TFTP_EACCESS + "Disk full or allocation exceeded", // 3 TFTP_ENOSPACE + "Illegal TFTP operation", // 4 TFTP_EBADOP + "Unknown transfer ID", // 5 TFTP_EBADID + "File already exists", // 6 TFTP_EEXISTS + "No such user", // 7 TFTP_ENOUSER }; +/* Send an error packet to the client */ +static void +tftpd_send_error(int s, struct tftphdr * reply, int err, + struct sockaddr_in *from_addr, int from_len) +{ + CYG_ASSERT( 0 <= err, "err underflow" ); + CYG_ASSERT( sizeof(errmsg)/sizeof(errmsg[0]) > err, "err overflow" ); + + reply->th_opcode = htons(ERROR); + reply->th_code = htons(err); + if ( (0 > err) || (sizeof(errmsg)/sizeof(errmsg[0]) <= err) ) + err = 0; // Do not copy a random string from hyperspace + strcpy(reply->th_msg, errmsg[err]); + sendto(s, reply, 4+strlen(reply->th_msg)+1, 0, + (struct sockaddr *)from_addr, from_len); +} // // Receive a file from the client @@ -95,7 +137,7 @@ tftpd_write_file(struct tftp_server *ser char data_in[SEGSIZE+sizeof(struct tftphdr)]; struct tftphdr *reply = (struct tftphdr *)data_out; struct tftphdr *response = (struct tftphdr *)data_in; - int fd, block, len, ok, closed, data_len, s; + int fd, block, len, ok, tries, closed, data_len, s; struct timeval timeout; fd_set fds; int total_timeouts = 0; @@ -118,93 +160,113 @@ tftpd_write_file(struct tftp_server *ser return; } if ((fd = (server->ops->open)(hdr->th_stuff, O_WRONLY)) < 0) { - reply->th_opcode = htons(ERROR); - reply->th_code = htons(TFTP_ENOTFOUND); - strcpy(reply->th_msg, errmsg[TFTP_ENOTFOUND]); - sendto(s, reply, 4+strlen(reply->th_msg)+1, 0, - (struct sockaddr *)from_addr, from_len); + tftpd_send_error(s,reply,TFTP_ENOTFOUND,from_addr, from_len); close(s); return; } - // Send ACK telling client he can send data - reply->th_opcode = htons(ACK); - reply->th_block = 0; - sendto(s, reply, 4, 0, (struct sockaddr *)from_addr, from_len); - block = 1; ok = true; closed = false; + block = 0; while (ok) { - timeout.tv_sec = TFTP_TIMEOUT_PERIOD; - timeout.tv_usec = 0; - FD_ZERO(&fds); - FD_SET(s, &fds); - if (select(s+1, &fds, 0, 0, &timeout) <= 0) { - if (++total_timeouts > TFTP_TIMEOUT_MAX) { - ok = false; - break; + // Send ACK telling client he can send data + reply->th_opcode = htons(ACK); + reply->th_block = htons(block++); // postincrement + for (tries = 0; tries < TFTP_RETRIES_MAX; tries++) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.ack.send++; +#endif + sendto(s, reply, 4, 0, (struct sockaddr *)from_addr, from_len); + repeat_select: + timeout.tv_sec = TFTP_TIMEOUT_PERIOD; + timeout.tv_usec = 0; + FD_ZERO(&fds); + FD_SET(s, &fds); + if (select(s+1, &fds, 0, 0, &timeout) <= 0) { + if (++total_timeouts > TFTP_TIMEOUT_MAX) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.err_send++; +#endif + tftpd_send_error(s,reply,TFTP_EBADOP,from_addr, from_len); + ok = false; + break; + } +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.ack.resend++; +#endif + continue; // retry the send, using up one retry. } - // Try resending last ACK - sendto(s, reply, 4, 0, (struct sockaddr *)from_addr, from_len); - } else { // Some data has arrived data_len = sizeof(data_in); client_len = sizeof(client_addr); if ((data_len = recvfrom(s, data_in, data_len, 0, - (struct sockaddr *)&client_addr, &client_len)) < 0) { - // What happened? - diag_printf("Can't read client data!\n"); - ok = false; + (struct sockaddr *)&client_addr, &client_len)) < 0) { + // What happened? No data here! +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.ack.resend++; +#endif + continue; // retry the send, using up one retry. + } + if (ntohs(response->th_opcode) == DATA && + ntohs(response->th_block) < block) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.data.rx_repeat++; +#endif + // Then it is repeat DATA with an old block; listen again, + // but do not repeat sending the current ack, and do not + // use up a retry count. (we do re-send the ack if + // subsequently we time out) + goto repeat_select; + } + if (ntohs(response->th_opcode) == DATA && + ntohs(response->th_block) == block) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.data.rx++; +#endif + // Good data - write to file + len = (server->ops->write)(fd, response->th_data, data_len-4); + if (len < (data_len-4)) { + // File is "full" + tftpd_send_error(s,reply,TFTP_ENOSPACE, + from_addr, from_len); + ok = false; // Give up + break; // out of the retries loop + } + if (data_len < (SEGSIZE+4)) { + // End of file + closed = true; + ok = false; + if ((server->ops->close)(fd) == -1) { + tftpd_send_error(s,reply,TFTP_EACCESS, + from_addr, from_len); + break; // out of the retries loop + } + // Exception to the loop structure: we must ACK the last + // packet, the one that implied EOF: +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.ack.send++; +#endif + reply->th_opcode = htons(ACK); + reply->th_block = htons(block++); // postincrement + sendto(s, reply, 4, 0, (struct sockaddr *)from_addr, from_len); + break; // out of the retries loop + } + // Happy! Break out of the retries loop. break; } - if (ntohs(response->th_opcode) == DATA) { - if (ntohs(response->th_block) == block) { - // Good data - write to file - len = (server->ops->write)(fd, response->th_data, data_len-4); - if (len < (data_len-4)) { - // File is "full" - reply->th_opcode = htons(ERROR); - reply->th_code = htons(TFTP_ENOSPACE); - strcpy(reply->th_msg, errmsg[TFTP_ENOSPACE]); - sendto(s, reply, 4+strlen(reply->th_msg)+1, 0, - (struct sockaddr *)from_addr, from_len); - ok = false; // Give up - } else { - if (data_len < (SEGSIZE+4)) { - // End of file - closed = true; - ok = false; - if ((server->ops->close)(fd) == -1) { - reply->th_opcode = htons(ERROR); - reply->th_code = htons(TFTP_EACCESS); - strcpy(reply->th_msg, errmsg[TFTP_EACCESS]); - sendto(s, reply, 4+strlen(reply->th_msg)+1, 0, - (struct sockaddr *)from_addr, from_len); - } else { - reply->th_opcode = htons(ACK); - reply->th_block = htons(block++); - sendto(s, reply, 4, 0, - (struct sockaddr *)from_addr, from_len); - } - } else { - reply->th_opcode = htons(ACK); - reply->th_block = htons(block++); - sendto(s, reply, 4, 0, - (struct sockaddr *)from_addr, from_len); - } - } - } else { - // Something is wrong - tell client last good block - sendto(s, reply, 4, 0, (struct sockaddr *)from_addr, from_len); - } - } else { - // Client has sent something bogus - bag out! - reply->th_opcode = htons(ERROR); - reply->th_code = htons(TFTP_EBADOP); - strcpy(reply->th_msg, errmsg[TFTP_EBADOP]); - sendto(s, reply, 4+strlen(reply->th_msg)+1, 0, - (struct sockaddr *)from_addr, from_len); - ok = false; - } + // Otherwise, we got something we do not understand! So repeat + // sending the current ACK, and use up a retry count. +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + if ( (ntohs(response->th_opcode) == DATA) ) + tftp_server_instrument.data.rx_skip++; + tftp_server_instrument.ack.resend++; +#endif + } // End of the retries loop. + if (TFTP_RETRIES_MAX <= tries) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.err_send++; +#endif + tftpd_send_error(s,reply,TFTP_EBADOP,from_addr, from_len); + ok = false; } } close(s); @@ -248,11 +310,7 @@ tftpd_read_file(struct tftp_server *serv return; } if ((fd = (server->ops->open)(hdr->th_stuff, O_RDONLY)) < 0) { - reply->th_opcode = htons(ERROR); - reply->th_code = htons(TFTP_ENOTFOUND); - strcpy(reply->th_msg, errmsg[TFTP_ENOTFOUND]); - sendto(s, reply, 4+strlen(reply->th_msg)+1, 0, - (struct sockaddr *)from_addr, from_len); + tftpd_send_error(s,reply,TFTP_ENOTFOUND,from_addr, from_len); close(s); return; } @@ -261,10 +319,14 @@ tftpd_read_file(struct tftp_server *serv while (ok) { // Read next chunk of file len = (server->ops->read)(fd, reply->th_data, SEGSIZE); - reply->th_block = htons(++block); + reply->th_block = htons(++block); // preincrement reply->th_opcode = htons(DATA); for (tries = 0; tries < TFTP_RETRIES_MAX; tries++) { - if (sendto(s, reply, 4+len, 0, (struct sockaddr *)from_addr, from_len) < 0) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.data.send++; +#endif + if (sendto(s, reply, 4+len, 0, + (struct sockaddr *)from_addr, from_len) < 0) { // Something went wrong with the network! ok = false; break; @@ -276,9 +338,16 @@ tftpd_read_file(struct tftp_server *serv FD_SET(s, &fds); if (select(s+1, &fds, 0, 0, &timeout) <= 0) { if (++total_timeouts > TFTP_TIMEOUT_MAX) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.err_send++; +#endif + tftpd_send_error(s,reply,TFTP_EBADOP,from_addr, from_len); ok = false; break; } +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.data.resend++; +#endif continue; // retry the send, using up one retry. } data_len = sizeof(data_in); @@ -287,23 +356,47 @@ tftpd_read_file(struct tftp_server *serv (struct sockaddr *)&client_addr, &client_len)) < 0) { // What happened? Maybe someone lied to us... +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.data.resend++; +#endif continue; // retry the send, using up one retry. } if ((ntohs(response->th_opcode) == ACK) && (ntohs(response->th_block) < block)) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.ack.rx_repeat++; +#endif // Then it is a repeat ACK for an old block; listen again, // but do not repeat sending the current block, and do not - // use up a retry count. + // use up a retry count. (we do re-send the data if + // subsequently we time out) goto repeat_select; } if ((ntohs(response->th_opcode) == ACK) && (ntohs(response->th_block) == block)) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.ack.rx++; +#endif // Happy! Break out of the retries loop. break; } + // Otherwise, we got something we do not understand! So repeat + // sending the current block, and use up a retry count. +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + if ( (ntohs(response->th_opcode) == ACK) ) + tftp_server_instrument.ack.rx_skip++; + tftp_server_instrument.data.resend++; +#endif + } // End of the retries loop. + if (TFTP_RETRIES_MAX <= tries) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.err_send++; +#endif + tftpd_send_error(s,reply,TFTP_EBADOP,from_addr, from_len); + ok = false; } if (len < SEGSIZE) { - break; + break; // That's end of file then. } } close(s); @@ -313,6 +406,11 @@ tftpd_read_file(struct tftp_server *serv // // Actual TFTP server // +#define CYGSEM_TFTP_SERVER_MULTITHREADED +#ifdef CYGSEM_TFTP_SERVER_MULTITHREADED +static cyg_sem_t tftp_server_sem; +#endif + static void tftpd_server(cyg_addrword_t p) { @@ -326,7 +424,7 @@ tftpd_server(cyg_addrword_t p) #ifndef CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS // Otherwise routine printfs fail the test - interrupts disabled too long. - diag_printf("TFTPD: %x, port: %d\n", p, server->port); + diag_printf("TFTPD [%x]: port %d\n", p, server->port); #endif // Set up port @@ -339,33 +437,53 @@ tftpd_server(cyg_addrword_t p) server->port = server_info->s_port; } - // Create socket - s = socket(AF_INET, SOCK_DGRAM, 0); - if (s < 0) { - diag_printf("TFTPD: can't open socket\n"); - return; - } - memset((char *)&local_addr, 0, sizeof(local_addr)); - local_addr.sin_family = AF_INET; - local_addr.sin_addr.s_addr = htonl(INADDR_ANY); - local_addr.sin_port = htons(server->port); - if (bind(s, (struct sockaddr *)&local_addr, sizeof(local_addr)) < 0) { - // Problem setting up my end - diag_printf("TFTPD: can't bind to service port\n"); - close(s); - return; - } + while (true) { +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + struct info o = tftp_server_instrument; +#endif + // Create socket + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) { + diag_printf("TFTPD [%x]: can't open socket\n", p); + return; + } + memset((char *)&local_addr, 0, sizeof(local_addr)); + local_addr.sin_family = AF_INET; + local_addr.sin_addr.s_addr = htonl(INADDR_ANY); + local_addr.sin_port = htons(server->port); + if (bind(s, (struct sockaddr *)&local_addr, sizeof(local_addr)) < 0) { + // Problem setting up my end + close(s); +#ifdef CYGSEM_TFTP_SERVER_MULTITHREADED +#ifndef CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS + diag_printf("TFTPD [%x]: waiting to bind to service port\n", p); +#endif + // Wait until the socket is free... + cyg_semaphore_wait( &tftp_server_sem ); + continue; // try re-opening and rebinding the socket. +#else + diag_printf("TFTPD [%x]: can't bind to service port\n", p); + return; +#endif + } - while (true) { recv_len = sizeof(data); from_len = sizeof(from_addr); - if ((data_len = recvfrom(s, hdr, recv_len, 0, - (struct sockaddr *)&from_addr, &from_len)) < 0) { - diag_printf("TFTPD: can't read request\n"); + data_len = recvfrom(s, hdr, recv_len, 0, + (struct sockaddr *)&from_addr, &from_len); + close(s); // so that other servers can bind to the TFTP socket +#ifdef CYGSEM_TFTP_SERVER_MULTITHREADED + // The socket is free... + cyg_semaphore_post( &tftp_server_sem ); +#endif + + if ( data_len < 0) { + diag_printf("TFTPD [%x]: can't read request\n", p); } else { #ifndef CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS - diag_printf("TFTPD: received %x from %s:%d\n", - ntohs(hdr->th_opcode), inet_ntoa(from_addr.sin_addr), from_addr.sin_port); + diag_printf("TFTPD [%x]: received %x from %s:%d\n", p, + ntohs(hdr->th_opcode), inet_ntoa(from_addr.sin_addr), + from_addr.sin_port); #endif switch (ntohs(hdr->th_opcode)) { case WRQ: @@ -380,15 +498,46 @@ tftpd_server(cyg_addrword_t p) // Ignore break; default: - diag_printf("TFTPD: bogus request %x from %s:%d\n", - ntohs(hdr->th_opcode), inet_ntoa(from_addr.sin_addr), from_addr.sin_port); - hdr->th_opcode = htons(ERROR); - hdr->th_code = htons(TFTP_EBADOP); - strcpy(hdr->th_msg, errmsg[TFTP_EBADOP]);; - sendto(s, hdr, 4+strlen(hdr->th_msg)+1, 0, - (struct sockaddr *)&from_addr, from_len); + diag_printf("TFTPD [%x]: bogus request %x from %s:%d\n", p, + ntohs(hdr->th_opcode), + inet_ntoa(from_addr.sin_addr), + from_addr.sin_port ); + tftpd_send_error(s,hdr,TFTP_EBADOP,&from_addr,from_len); } } +#ifdef CYGOPT_NET_TFTP_SERVER_INSTRUMENT + tftp_server_instrument.total_transactions++; + + o.data.rx -= tftp_server_instrument.data.rx ; + o.data.rx_repeat -= tftp_server_instrument.data.rx_repeat; + o.data.rx_skip -= tftp_server_instrument.data.rx_skip ; + o.data.send -= tftp_server_instrument.data.send ; + o.data.resend -= tftp_server_instrument.data.resend ; + + o.ack.rx -= tftp_server_instrument.ack.rx ; + o.ack.rx_repeat -= tftp_server_instrument.ack.rx_repeat ; + o.ack.rx_skip -= tftp_server_instrument.ack.rx_skip ; + o.ack.send -= tftp_server_instrument.ack.send ; + o.ack.resend -= tftp_server_instrument.ack.resend ; + + o.err_send -= tftp_server_instrument.err_send ; + +#ifndef CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS + if ( o.data.rx ) diag_printf( "data rx %4d\n", -o.data.rx ); + if ( o.data.rx_repeat ) diag_printf( "data rx_repeat%4d\n", -o.data.rx_repeat ); + if ( o.data.rx_skip ) diag_printf( "data rx_skip %4d\n", -o.data.rx_skip ); + if ( o.data.send ) diag_printf( "data send %4d\n", -o.data.send ); + if ( o.data.resend ) diag_printf( "data resend %4d\n", -o.data.resend ); + + if ( o.ack.rx ) diag_printf( " ack rx %4d\n", -o.ack.rx ); + if ( o.ack.rx_repeat ) diag_printf( " ack rx_repeat%4d\n", -o.ack.rx_repeat ); + if ( o.ack.rx_skip ) diag_printf( " ack rx_skip %4d\n", -o.ack.rx_skip ); + if ( o.ack.send ) diag_printf( " ack send %4d\n", -o.ack.send ); + if ( o.ack.resend ) diag_printf( " ack resend %4d\n", -o.ack.resend ); + + if ( o.err_send ) diag_printf( "*error sends %4d\n", -o.err_send ); +#endif // CYGPKG_NET_TESTS_USE_RT_TEST_HARNESS +#endif // CYGOPT_NET_TFTP_SERVER_INSTRUMENT } } @@ -405,6 +554,14 @@ int tftpd_start(int port, struct tftpd_fileops *ops) { struct tftp_server *server; +#ifdef CYGSEM_TFTP_SERVER_MULTITHREADED + static char init = 0; + if ( 0 == init ) { + init++; + cyg_semaphore_init( &tftp_server_sem, 0 ); + } +#endif + if ((server = malloc(sizeof(struct tftp_server)))) { server->tag = TFTP_tag; server->port = port;
--- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,13 @@ +2000-10-05 Gary Thomas <gthomas@redhat.com> + + * src/net/net_io.c (net_io_revert_console): + (net_io_assume_console): + * src/main.c (cyg_start): + * src/io.c (gets): + * include/redboot.h: Add notion of "console_echo" so that telnet + connections don't echo doubly. Note: there is no telnet negotiation + at this time, so some things are still not perfect. + 2000-09-17 Gary Thomas <gthomas@redhat.com> * src/main.c: Display platform/cpu identification strings if available.
--- a/packages/redboot/current/include/redboot.h +++ b/packages/redboot/current/include/redboot.h @@ -76,6 +76,7 @@ EXTERN bool config_ok; #ifdef CYGPKG_REDBOOT_ANY_CONSOLE EXTERN bool console_selected; #endif +EXTERN bool console_echo; #ifdef CYGPKG_REDBOOT_NETWORKING EXTERN bool have_net, use_bootp;
--- a/packages/redboot/current/src/io.c +++ b/packages/redboot/current/src/io.c @@ -210,19 +210,24 @@ gets(char *buf, int buflen, int timeout) // If previous character was the "other" end-of-line, ignore this one if (((c == '\n') && (last_ch == '\r')) || ((c == '\r') && (last_ch == '\n'))) { + c = '\0'; break; } // End of line - mon_write_char('\r'); - mon_write_char('\n'); + if (console_echo) { + mon_write_char('\r'); + mon_write_char('\n'); + } last_ch = c; return 1; case '\b': case 0x7F: // DEL if (ptr != buf) { - mon_write_char('\b'); - mon_write_char(' '); - mon_write_char('\b'); + if (console_echo) { + mon_write_char('\b'); + mon_write_char(' '); + mon_write_char('\b'); + } ptr--; } break; @@ -235,7 +240,9 @@ gets(char *buf, int buflen, int timeout) } // Fall through - accept '$' at other than start of line default: - mon_write_char(c); + if (console_echo) { + mon_write_char(c); + } *ptr++ = c; } last_ch = c;
--- a/packages/redboot/current/src/main.c +++ b/packages/redboot/current/src/main.c @@ -106,6 +106,7 @@ cyg_start(void) #ifdef CYGPKG_REDBOOT_ANY_CONSOLE console_selected = false; #endif + console_echo = true; CYGACC_CALL_IF_DELAY_US(2*100000); ram_start = (unsigned char *)CYGMEM_REGION_ram;
--- a/packages/redboot/current/src/net/net_io.c +++ b/packages/redboot/current/src/net/net_io.c @@ -370,6 +370,7 @@ net_io_revert_console(void) #endif CYGACC_CALL_IF_SET_CONSOLE_COMM(orig_console); CYGACC_CALL_IF_SET_DEBUG_COMM(orig_debug); + console_echo = true; } static void @@ -378,6 +379,7 @@ net_io_assume_console(void) #ifdef CYGPKG_REDBOOT_ANY_CONSOLE console_selected = true; #endif + console_echo = false; orig_console = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT); CYGACC_CALL_IF_SET_CONSOLE_COMM(TCP_CHANNEL); orig_debug = CYGACC_CALL_IF_SET_DEBUG_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
