diff -Naur ecos-clean/ecos/demo/demo.c ecos-ml403/ecos/demo/demo.c
--- ecos-clean/ecos/demo/demo.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/demo/demo.c	2006-05-03 17:35:07.000000000 +0200
@@ -0,0 +1,217 @@
+/* 
+ * Mind eCos demo
+ * 
+ * Copyright (c) 2005 Mind NV
+ * 
+ * Author : Jan Olbrechts (jano@mind.be)
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <cyg/io/io.h>
+#include <cyg/hal/led_manager.h>
+#include <stdlib.h>
+#include <network.h>
+#include <cyg/hal/char_lcd_support.h>
+#include <cyg/hal/hal_if.h>
+#include "startThread.h"
+
+
+cyg_io_handle_t demo_serial_handle;
+
+void demo_init_serial()
+{
+  if (cyg_io_lookup( "/dev/ser0", &demo_serial_handle )) {
+    diag_printf("No /dev/ser0\n");
+    for (;;);
+  }
+}
+
+void demo_print_serial(char* string)
+{
+  cyg_uint32 len = strlen(string);
+  cyg_io_write( demo_serial_handle, string, &len );
+  len = 2;
+  cyg_io_write( demo_serial_handle, "\r\n", &len );
+}
+
+void demo_leds_test(void* dummy)
+{
+  for (;;) {
+    turn_on_led(1 << 0);
+    sleep(1);
+    turn_on_led(1 << 1);
+    sleep(1);
+    turn_on_led(1 << 2);
+    sleep(1);
+    turn_on_led(1 << 3);
+    sleep(1);
+    turn_off_led(1 << 0);
+    sleep(1);
+    turn_off_led(1 << 1);
+    sleep(1);
+    turn_off_led(1 << 2);
+    sleep(1);
+    turn_off_led(1 << 3);
+    sleep(1);
+  }
+}
+
+void demo_a()
+{
+  printf("This is function a\n");
+}
+
+static void demo_server_test(void* dummy, int readNotWrite)
+{
+    int s, client, client_len;
+    struct sockaddr_in client_addr, local;
+    char buf[1024];
+    int one = 1;
+    fd_set in_fds;
+    int num, len;
+    struct timeval tv;
+
+    bzero(buf, sizeof(buf));
+
+    init_all_network_interfaces();
+    printf("Network initialized!\n");
+
+    s = socket(AF_INET, SOCK_STREAM, 0);
+    if (s < 0) {
+        perror("stream socket");
+    }
+    if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) {
+        perror("setsockopt SO_REUSEADDR");
+    }
+    if (setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one))) {
+        perror("setsockopt SO_REUSEPORT");
+    }
+    memset(&local, 0, sizeof(local));
+    local.sin_family = AF_INET;
+    local.sin_len = sizeof(local);
+    if (readNotWrite)
+      local.sin_port = htons(1234);
+    else
+      local.sin_port = htons(1235);
+    local.sin_addr.s_addr = INADDR_ANY;
+    if(bind(s, (struct sockaddr *) &local, sizeof(local)) < 0) {
+        perror("bind error");
+    }
+    listen(s, SOMAXCONN);
+    while (true) {
+        client_len = sizeof(client_addr);
+        if ((client = accept(s, (struct sockaddr *)&client_addr, &client_len)) < 0) {
+            perror("accept");
+        }
+        client_len = sizeof(client_addr);
+        getpeername(client, (struct sockaddr *)&client_addr, &client_len);
+        diag_printf("connection from %s:%d\n", inet_ntoa(client_addr.sin_addr), ntohs(client_addr.sin_port));
+
+        while (true) {
+          if (readNotWrite) {
+            len = read(client, buf, sizeof(buf));
+            if (len <= 0)
+              break;
+          } else {
+            len = write(client, buf, sizeof(buf));
+            if (len <= 0)
+              break;
+          }
+        }
+        close(client);
+    }
+    close(s);
+}
+
+static void demo_server_test_read(void* dummy)
+{
+  demo_server_test(dummy, 1);
+}
+
+static void demo_server_test_write(void* dummy)
+{
+  demo_server_test(dummy, 0);
+}
+
+void demo_loop_test(void* dummy)
+{
+  int i, j;
+  volatile char a;
+  char* buf;
+
+  // Test the data cache
+  buf = (char*) malloc(50);
+
+  for (;;) {
+    for (i = 0; i < (1000000); i++) {
+      for (j = 0; j < 50; j++) {
+        a = buf[j];
+      }
+    }
+    //breakpoint();
+  }
+}
+
+void demo_lcd_test(void* dummy)
+{
+  write_char_lcd("test ", 5);
+  write_char_lcd("LCD ", 4);
+  write_char_lcd("1234", 4);
+}
+
+void demo_serial_test(void* dummy)
+{
+  demo_print_serial("Serial port test");
+  for (;;) {
+    sleep(1);
+    demo_print_serial("tick");
+    sleep(1);
+    demo_print_serial("tack");
+  }
+}
+
+void demo_console_test(void* dummy)
+{
+  char word[1024];
+
+  for (;;) {
+    scanf("%s", word);
+    printf("You typed: %s\n", word);
+  }
+}
+
+void cyg_start()
+{
+  printf("main started!\n");
+
+  demo_init_serial();
+
+  // Init everything
+  init_led_manager();
+  printf("Leds initialized!\n");
+  init_char_lcd();
+  printf("Lcd initialized!\n");
+  demo_init_serial();
+  printf("Serial initialized!\n");
+
+  // Start threads
+  // Loop thread disabled to measure TCP performance
+  // startThread("Loop test", demo_loop_test, 10);
+  // printf("Loop thread started!\n");
+  startThread("Tcp read test", demo_server_test_read, 10);
+  startThread("Tcp write test", demo_server_test_write, 10);
+  printf("Tcp echo thread started!\n");
+  startThread("Lcd test", demo_lcd_test, 10);
+  printf("Lcd thread started!\n");
+  startThread("Serial test", demo_serial_test, 10);
+  printf("Serial thread started!\n");
+  startThread("Leds test", demo_leds_test, 10);
+  printf("Leds thread started!\n");
+  // keyboard driver not ready yet
+  //startThread("Console test", demo_console_test, 10);
+  //printf("Console thread started!\n");
+
+  cyg_scheduler_start();
+}
+
diff -Naur ecos-clean/ecos/demo/startThread.c ecos-ml403/ecos/demo/startThread.c
--- ecos-clean/ecos/demo/startThread.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/demo/startThread.c	2006-05-03 17:35:07.000000000 +0200
@@ -0,0 +1,38 @@
+/* 
+ * Mind eCos demo
+ * 
+ * Copyright (c) 2005 Mind NV
+ * 
+ * Author : Jan Olbrechts (jano@mind.be)
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <cyg/io/io.h>
+#include <cyg/hal/led_manager.h>
+#include <stdlib.h>
+#include <network.h>
+
+#define STACK_SIZE (CYGNUM_HAL_STACK_SIZE_TYPICAL + 0x1000)
+
+void startThread(char* name, void (*fn)(cyg_addrword_t), int priority)
+{
+  char *stack;
+  cyg_thread* thread_data;
+  cyg_handle_t* thread_handle;
+
+  stack = (char*)malloc(STACK_SIZE);
+  thread_data = (cyg_thread*)malloc(sizeof(cyg_thread));
+  thread_handle = (cyg_handle_t*)malloc(sizeof(cyg_handle_t));
+
+  cyg_thread_create(priority,
+                    fn,
+                    0, // parameter for fn
+                    name,
+                    stack,
+                    STACK_SIZE,
+                    thread_handle,
+                    thread_data);
+  cyg_thread_resume(*thread_handle);
+}
+
diff -Naur ecos-clean/ecos/demo/startThread.h ecos-ml403/ecos/demo/startThread.h
--- ecos-clean/ecos/demo/startThread.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/demo/startThread.h	2006-05-03 17:35:07.000000000 +0200
@@ -0,0 +1,14 @@
+/* 
+ * Mind eCos demo
+ * 
+ * Copyright (c) 2005 Mind NV
+ * 
+ * Author : Jan Olbrechts (jano@mind.be)
+ */
+#ifndef __STARTTHREAD_H
+#define __STARTTHREAD_H
+
+void startThread(const char* name, void (*fn)(void*), int priority);
+
+#endif
+
diff -Naur ecos-clean/ecos/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl ecos-ml403/ecos/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl
--- ecos-clean/ecos/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl	2006-04-07 17:38:32.000000000 +0200
+++ ecos-ml403/ecos/packages/devs/eth/phy/current/cdl/phy_eth_drivers.cdl	2006-05-03 17:33:49.000000000 +0200
@@ -87,6 +87,15 @@
           Include support for National Semiconductor DP83847 DsPHYTER II"
     }
 
+    cdl_option CYGHWR_DEVS_ETH_PHY_VIRTEX4 {
+        display       "Xilinx VIRTEX4"
+        flavor        bool
+        default_value 0
+        compile       -library=libextras.a VIRTEX4.c
+        description "
+          Include support for PHY on Xilinx VIRTEX4"
+    }
+
     cdl_option CYGHWR_DEVS_ETH_PHY_AM79C874 {
         display       "AMD 79C874"
         flavor        bool
diff -Naur ecos-clean/ecos/packages/devs/eth/phy/current/src/VIRTEX4.c ecos-ml403/ecos/packages/devs/eth/phy/current/src/VIRTEX4.c
--- ecos-clean/ecos/packages/devs/eth/phy/current/src/VIRTEX4.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/eth/phy/current/src/VIRTEX4.c	2006-05-03 17:33:49.000000000 +0200
@@ -0,0 +1,107 @@
+//==========================================================================
+//
+//      dev/ML300.c
+//
+//      Ethernet transceiver (PHY) support 
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    gthomas
+// Contributors: 
+// Date:         2003-08-01
+// Purpose:      
+// Description:  Support for Xilinx ML300 PHY
+//              
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/system.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/hal/hal_tables.h>
+
+#include <cyg/io/eth_phy.h>
+#include <cyg/io/eth_phy_dev.h>
+
+#define NUMBER_OF_TRIES	1000
+	
+static bool virtex4_stat(eth_phy_access_t *f, int *state)
+{
+    unsigned short phy_state;
+    int tries = 0, result = 0;
+
+    // Read negotiated state
+    while( tries  < NUMBER_OF_TRIES )
+    {
+        tries++;
+        result = _eth_phy_read(f, 0x1, f->phy_addr, &phy_state);
+	if( phy_state & 0x0024 )
+	    break;
+        else
+	    result = 0;
+    }
+    if (result) 
+    {
+        *state = 0;
+        if ((phy_state & 0x0004) != 0)
+            *state |= ETH_PHY_STAT_LINK;
+        if ((phy_state & 0x20) != 0) {
+            if (_eth_phy_read(f, 0x5, f->phy_addr, &phy_state)) {
+                if ((phy_state & 0x4000) != 0) {
+                    *state |= ETH_PHY_STAT_LINK;
+                    // Partner negotiated parameters
+                    if ((phy_state & 0x0100) != 0)
+                        *state |= ETH_PHY_STAT_100MB | ETH_PHY_STAT_FDX;
+                    if ((phy_state & 0x0080) != 0)
+                        *state |= ETH_PHY_STAT_100MB;
+                    if ((phy_state & 0x0040) != 0)
+                        *state |= ETH_PHY_STAT_FDX;
+                }
+            }
+        }
+        return true;  // Accessed PHY successfully
+    } 
+    return false;  // Failed to access PHY
+}
+
+_eth_phy_dev("Xilinx VIRTEX4", 0x01410CC1, virtex4_stat)
diff -Naur ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/cdl/virtex4_eth_drivers.cdl ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/cdl/virtex4_eth_drivers.cdl
--- ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/cdl/virtex4_eth_drivers.cdl	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/cdl/virtex4_eth_drivers.cdl	2006-05-03 17:33:50.000000000 +0200
@@ -0,0 +1,143 @@
+#====================================================================
+#
+#      virtex4_eth_drivers.cdl
+#
+#      Hardware specifics for Xilinx VIRTEX4 ethernet
+#      Taken from Xilinx ML300 Board
+#
+#====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2003, 2004, 2005 Mind n.v.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s):      gthomas, cduclos
+# Original data:  
+# Contributors:   
+# Date:           2003-09-23
+#                 2005-04-21
+#
+#####DESCRIPTIONEND####
+#
+#====================================================================
+
+cdl_package CYGPKG_DEVS_ETH_POWERPC_VIRTEX4 {
+    display       "Xilinx VIRTEX4 (PPC405) ethernet support"
+    description   "Ethernet driver for Xilinx VIRTEX4 develoment board."
+
+    parent        CYGPKG_IO_ETH_DRIVERS
+    active_if	  CYGPKG_IO_ETH_DRIVERS
+    active_if	  CYGPKG_HAL_POWERPC 
+    requires      CYGPKG_HAL_POWERPC_VIRTEX4
+    requires      CYGHWR_DEVS_ETH_PHY_VIRTEX4
+    active_if     MNDHWR_VIRTEX4_EMAC
+
+    include_dir   .
+    include_files ; # none _exported_ whatsoever
+
+    implements    CYGHWR_NET_DRIVERS
+    implements    CYGHWR_NET_DRIVER_ETH0
+
+    compile       -library=libextras.a if_virtex4.c
+
+    # Debug I/O during network stack initialization is not reliable
+    requires { !CYGPKG_NET || CYGPKG_NET_FORCE_SERIAL_CONSOLE == 1 }
+
+    cdl_option CYGNUM_DEVS_ETH_POWERPC_VIRTEX4_BUFSIZE {
+        display       "Buffer size"
+        flavor        data
+        default_value 1536
+        description   "
+            This option specifies the size of the internal buffers used
+            for the PowerPC VIRTEX4/ethernet device."
+    }
+
+    cdl_option CYGNUM_DEVS_ETH_POWERPC_VIRTEX4_TxNUM {
+        display       "Number of output buffers"
+        flavor        data
+        legal_values  2 to 64
+        default_value 8
+        description   "
+            This option specifies the number of output buffer packets
+            to be used for the PowerPC VIRTEX4/ethernet device."
+    }
+
+    cdl_option CYGNUM_DEVS_ETH_POWERPC_VIRTEX4_RxNUM {
+        display       "Number of input buffers"
+        flavor        data
+        legal_values  2 to 64
+        default_value 8
+        description   "
+            This option specifies the number of input buffer packets
+            to be used for the PowerPC VIRTEX4/ethernet device."
+    }
+
+    cdl_component CYGSEM_DEVS_ETH_POWERPC_VIRTEX4_RESET_PHY {
+        display       "Reset and reconfigure PHY"
+        flavor        bool
+        default_value { CYG_HAL_STARTUP != "RAM" }
+        active_if     CYGPKG_DEVS_ETH_PHY
+        description "
+            This option allows control over the physical transceiver"
+
+        cdl_option CYGNUM_DEVS_ETH_POWERPC_VIRTEX4_LINK_MODE {
+            display       "Initial link mode"
+            flavor        data
+            legal_values  { "10Mb" "100Mb" "1000Mb" "Auto" }
+            default_value { "Auto" }
+            description   "
+                This option specifies initial mode for the physical
+                link.  The PHY will be reset and then set to this mode."
+        }
+    }
+
+    cdl_component CYGPKG_DEVS_ETH_POWERPC_VIRTEX4_OPTIONS {
+        display "MPC8xxx VIRTEX4 ethernet driver build options"
+        flavor  none
+	no_define
+
+        cdl_option CYGPKG_DEVS_ETH_POWERPC_VIRTEX4_CFLAGS_ADD {
+            display "Additional compiler flags"
+            flavor  data
+            no_define
+            default_value { "-D_KERNEL -D__ECOS" }
+            description   "
+                This option modifies the set of compiler flags for
+                building the MPC8xxx VIRTEX4 ethernet driver package. 
+		These flags are used in addition to the set of global 
+		flags."
+        }
+    }
+}
+
diff -Naur ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/cdl/virtex4_eth_sgdmatemac.cdl ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/cdl/virtex4_eth_sgdmatemac.cdl
--- ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/cdl/virtex4_eth_sgdmatemac.cdl	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/cdl/virtex4_eth_sgdmatemac.cdl	2006-05-03 17:33:50.000000000 +0200
@@ -0,0 +1,90 @@
+#====================================================================
+#
+#      virtex4_eth_drivers.cdl
+#
+#====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2003, 2004, 2005 Mind n.v.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s):      Jan Olbrechts
+# Original data:  
+# Contributors:   
+# Date:           2005-11-08
+#
+#####DESCRIPTIONEND####
+#
+#====================================================================
+
+cdl_package MNDPKG_DEVS_ETH_POWERPC_VIRTEX4_SGDMATEMAC {
+    display       "Xilinx VIRTEX4 (PPC405) gigabit ethernet support"
+    description   "Efficient ethernet driver for Xilinx VIRTEX4."
+
+    parent        CYGPKG_IO_ETH_DRIVERS
+    active_if	  CYGPKG_IO_ETH_DRIVERS
+    active_if	  CYGPKG_HAL_POWERPC 
+    requires      CYGPKG_HAL_POWERPC_VIRTEX4
+    requires      CYGHWR_DEVS_ETH_PHY_VIRTEX4
+    active_if     MNDHWR_VIRTEX4_SGDMATEMAC
+
+    include_dir   .
+    include_files ; # none _exported_ whatsoever
+
+    implements    CYGHWR_NET_DRIVERS
+    implements    CYGHWR_NET_DRIVER_ETH0
+
+    compile       -library=libextras.a if_virtex4_temac_sgdma.c
+
+    # Debug I/O during network stack initialization is not reliable
+    requires { !CYGPKG_NET || CYGPKG_NET_FORCE_SERIAL_CONSOLE == 1 }
+    cdl_component MNDPKG_DEVS_ETH_POWERPC_VIRTEX4_SGDMATEMAC_OPTIONS {
+        display "MPC8xxx VIRTEX4 ethernet driver build options"
+        flavor  none
+	no_define
+
+        cdl_option MNDPKG_DEVS_ETH_POWERPC_VIRTEX4_SGDMATEMAC_CFLAGS_ADD {
+            display "Additional compiler flags"
+            flavor  data
+            no_define
+            default_value { "-D_KERNEL -D__ECOS" }
+            description   "
+                This option modifies the set of compiler flags for
+                building the MPC8xxx VIRTEX4 ethernet driver package. 
+		These flags are used in addition to the set of global 
+		flags."
+        }
+    }
+}
+
diff -Naur ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/ChangeLog ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/ChangeLog
--- ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/ChangeLog	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/ChangeLog	2006-05-03 17:33:50.000000000 +0200
@@ -0,0 +1,44 @@
+2003-10-06  Gary Thomas  <gary@mind.be>
+
+	* src/ml300.h: 
+	* src/if_ml300.c: 
+	* cdl/ml300_eth_drivers.cdl:  New package - ethernet driver
+	for Xilinx ML300 (PowerPC 405) development board.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
+	
+	
+
diff -Naur ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/src/if_virtex4.c ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/src/if_virtex4.c
--- ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/src/if_virtex4.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/src/if_virtex4.c	2006-05-03 17:33:50.000000000 +0200
@@ -0,0 +1,526 @@
+//==========================================================================
+//
+//      dev/if_virtex4.c
+//
+//      Ehernet device driver for Xilinx VIRTEX4 development board
+//      Taken from the driver for the Xilinx ML300 development board
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    gthomas
+// Contributors: cduclos
+// Date:         2003-09-23
+//               2005-04-21
+// Purpose:      
+// Description:  eCos hardware driver for Xilinx ML300
+//              
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/devs_eth_powerpc_virtex4.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/diag.h>
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_if.h>
+
+#include <cyg/io/eth/netdev.h>
+#include <cyg/io/eth/eth_drv.h>
+#include <cyg/io/eth_phy.h>
+
+#ifdef CYGPKG_NET
+#include <pkgconf/net.h>
+#endif
+
+#include "virtex4.h"
+
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <redboot.h>
+#include <flash_config.h>
+#endif
+#endif
+
+#define ALIGN_TO_CACHE_LINES(x)  ( (long)((x) + 31) & 0xffffffe0 )
+
+#define os_printf diag_printf
+
+// CONFIG_ESA and CONFIG_BOOL are defined in redboot/include/flash_config.h
+#ifndef CONFIG_ESA
+#define CONFIG_ESA 6      // ethernet address length ...
+#endif
+
+#ifndef CONFIG_BOOL
+#define CONFIG_BOOL 1
+#endif
+
+static int deferred = 0; // FIXME
+
+//
+// PHY access functions
+//
+static void virtex4_eth_phy_init(void);
+static void virtex4_eth_phy_reset(void);
+static void virtex4_eth_phy_put_reg(int reg, int phy, unsigned short data);
+static bool virtex4_eth_phy_get_reg(int reg, int phy, unsigned short *val);
+//#define PHY_DEBUG
+
+ETH_PHY_REG_LEVEL_ACCESS_FUNS(eth0_phy, 
+                              virtex4_eth_phy_init,
+                              virtex4_eth_phy_reset,
+                              virtex4_eth_phy_put_reg,
+                              virtex4_eth_phy_get_reg);
+
+// Align buffers on a cache boundary
+static unsigned char virtex4_eth_rxbufs[CYGNUM_DEVS_ETH_POWERPC_VIRTEX4_BUFSIZE] __attribute__((aligned(HAL_DCACHE_LINE_SIZE)));
+static unsigned char virtex4_eth_txbufs[CYGNUM_DEVS_ETH_POWERPC_VIRTEX4_BUFSIZE] __attribute__((aligned(HAL_DCACHE_LINE_SIZE)));
+
+static struct virtex4_eth_info virtex4_eth0_info = {
+    CYGNUM_HAL_INTERRUPT_EMAC,             // Interrupt vector
+    "eth0_esa",
+    { 0x08, 0x00, 0x3C, 0x28, 0x7A, 0xBA}, // Default ESA
+    virtex4_eth_rxbufs,                      // Rx buffer space
+    virtex4_eth_txbufs,                      // Tx buffer space
+    &eth0_phy,                             // PHY access routines
+};
+
+ETH_DRV_SC(virtex4_eth0_sc,
+           &virtex4_eth0_info,  // Driver specific data
+           "eth0",             // Name for this interface
+           virtex4_eth_start,
+           virtex4_eth_stop,
+           virtex4_eth_control,
+           virtex4_eth_can_send,
+           virtex4_eth_send,
+           virtex4_eth_recv,
+           virtex4_eth_deliver,
+           virtex4_eth_int,
+           virtex4_eth_int_vector);
+
+NETDEVTAB_ENTRY(virtex4_netdev, 
+                "virtex4_eth", 
+                virtex4_eth_init, 
+                &virtex4_eth0_sc);
+
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#ifdef CYGSEM_REDBOOT_FLASH_CONFIG
+#include <redboot.h>
+#include <flash_config.h>
+RedBoot_config_option("Network hardware address [MAC]",
+                      eth0_esa,
+                      ALWAYS_ENABLED, true,
+                      CONFIG_ESA, &virtex4_eth0_info.enaddr
+    );
+#endif // CYGSEM_REDBOOT_FLASH_CONFIG
+#endif // CYGPKG_REDBOOT
+
+
+static void virtex4_eth_int(struct eth_drv_sc *data);
+static void virtex4_eth_RxEvent(void *sc);
+static void virtex4_eth_TxEvent(void *sc);
+static void virtex4_eth_ErrEvent(void *sc, XStatus code);
+
+// This ISR is called when the ethernet interrupt occurs
+#ifdef CYGPKG_NET
+static int
+virtex4_eth_isr(cyg_vector_t vector, cyg_addrword_t data, HAL_SavedRegisters *regs)
+{
+    struct eth_drv_sc *sc = (struct eth_drv_sc *)data;
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+
+    cyg_drv_interrupt_mask(qi->int_vector);
+    return (CYG_ISR_HANDLED|CYG_ISR_CALL_DSR);  // Run the DSR
+}
+#endif
+
+// Deliver function (ex-DSR) handles the ethernet [logical] processing
+static void
+virtex4_eth_deliver(struct eth_drv_sc * sc)
+{
+#ifdef CYGPKG_NET
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    cyg_drv_interrupt_acknowledge(qi->int_vector);
+#endif
+    virtex4_eth_int(sc);
+#ifdef CYGPKG_NET
+    cyg_drv_interrupt_unmask(qi->int_vector);
+#endif
+
+}
+
+//
+// PHY unit access
+//
+static XEmac *_virtex4_dev;  // Hack - since PHY routines don't provide this
+
+static void 
+virtex4_eth_phy_init(void)
+{
+    // Set up MII hardware - nothing to do on this platform
+}
+
+static void
+virtex4_eth_phy_reset(void)
+{
+    diag_printf( "Resetting PHY! \n" );
+    XEmac_mPhyReset(_virtex4_dev->BaseAddress);
+}
+
+static void 
+virtex4_eth_phy_put_reg(int reg, int phy, unsigned short data)
+{
+#ifdef PHY_DEBUG
+    os_printf("PHY PUT - reg: %d, phy: %d, val: %04x\n", reg, phy, data);
+#endif
+    XEmac_PhyWrite(_virtex4_dev, phy, reg, data);
+}
+
+static bool 
+virtex4_eth_phy_get_reg(int reg, int phy, unsigned short *val)
+{
+    if (XEmac_PhyRead(_virtex4_dev, phy, reg, val) == XST_SUCCESS) {
+#ifdef PHY_DEBUG
+        os_printf("PHY GET - reg: %d, phy: %d = %x\n", reg, phy, *val);
+#endif
+        return true;
+    } else {
+        return false;  // Failed for some reason
+    }
+}
+
+// Initialize the interface - performed at system startup
+// This function must set up the interface, including arranging to
+// handle interrupts, etc, so that it may be "started" cheaply later.
+static bool 
+virtex4_eth_init(struct cyg_netdevtab_entry *dtp)
+{
+    struct eth_drv_sc *sc = (struct eth_drv_sc *)dtp->device_instance;
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    Xuint32 opt;
+    unsigned char _enaddr[6];
+    bool esa_ok;
+
+    // Try to read the ethernet address of the transciever ...
+#if defined(CYGPKG_REDBOOT) && defined(CYGSEM_REDBOOT_FLASH_CONFIG)
+    esa_ok = flash_get_config(qi->esa_key, _enaddr, CONFIG_ESA);
+#else
+    esa_ok = CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET, 
+                                         qi->esa_key, _enaddr, CONFIG_ESA);
+#endif
+    if (esa_ok) {
+        memcpy(qi->enaddr, _enaddr, sizeof(qi->enaddr));
+    } else {
+        // No 'flash config' data available - use default
+        diag_printf("VIRTEX4_ETH - Warning! Using default ESA for '%s'\n", dtp->name);
+    }
+
+    // Initialize Xilinx driver
+    if (XEmac_Initialize(&qi->dev, XPAR_ETHERNET_0_DEVICE_ID) != XST_SUCCESS) {
+        diag_printf("VIRTEX4_ETH - can't initialize\n");
+        return false;
+    }
+    if (XEmac_mIsSgDma(&qi->dev)) {
+        diag_printf("VIRTEX4_ETH - DMA support?\n");
+        return false;
+    }
+    if (XEmac_SelfTest(&qi->dev) != XST_SUCCESS) {
+        diag_printf("VIRTEX4_ETH - self test failed\n");
+        return false;
+    }
+    XEmac_ClearStats(&qi->dev);
+
+    // Configure device operating mode
+    opt = XEM_UNICAST_OPTION | 
+        XEM_BROADCAST_OPTION |
+        XEM_INSERT_PAD_OPTION |
+        XEM_INSERT_FCS_OPTION |
+        XEM_STRIP_PAD_FCS_OPTION;
+    if (XEmac_SetOptions(&qi->dev, opt) != XST_SUCCESS) {
+        diag_printf("VIRTEX4_ETH - can't configure mode\n");
+        return false;
+    }
+    if (XEmac_SetMacAddress(&qi->dev, qi->enaddr) != XST_SUCCESS) {
+        diag_printf("VIRTEX4_ETH - can't set ESA\n");
+        return false;
+    }
+
+    // Set up FIFO handling routines - these are callbacks from the
+    // Xilinx driver code which happen at interrupt time
+    XEmac_SetFifoSendHandler(&qi->dev, sc, virtex4_eth_TxEvent);
+    XEmac_SetFifoRecvHandler(&qi->dev, sc, virtex4_eth_RxEvent);
+    XEmac_SetErrorHandler(&qi->dev, sc, virtex4_eth_ErrEvent);
+
+#ifdef CYGPKG_NET
+    // Set up to handle interrupts
+    cyg_drv_interrupt_create(qi->int_vector,
+                             0,  // Highest //CYGARC_SIU_PRIORITY_HIGH,
+                             (cyg_addrword_t)sc, //  Data passed to ISR
+                             (cyg_ISR_t *)virtex4_eth_isr,
+                             (cyg_DSR_t *)eth_drv_dsr,
+                             &qi->virtex4_eth_interrupt_handle,
+                             &qi->virtex4_eth_interrupt);
+    cyg_drv_interrupt_attach(qi->virtex4_eth_interrupt_handle);
+    cyg_drv_interrupt_acknowledge(qi->int_vector);
+    cyg_drv_interrupt_unmask(qi->int_vector);
+#endif
+
+    // Operating mode
+    _virtex4_dev = &qi->dev;
+    if (!_eth_phy_init(qi->phy)) {
+        return false;
+    }
+#ifdef CYGSEM_DEVS_ETH_POWERPC_VIRTEX4_RESET_PHY
+    _eth_phy_reset(qi->phy);
+#endif
+
+    // Initialize upper level driver for ecos
+    (sc->funs->eth_drv->init)(sc, (unsigned char *)&qi->enaddr);
+
+    return true;
+}
+ 
+//
+// This function is called to "start up" the interface.  It may be called
+// multiple times, even when the hardware is already running.  It will be
+// called whenever something "hardware oriented" changes and should leave
+// the hardware ready to send/receive packets.
+//
+static void
+virtex4_eth_start(struct eth_drv_sc *sc, unsigned char *enaddr, int flags)
+{
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    unsigned short phy_state = 0;
+    
+    // Enable the device
+    XEmac_Start(&qi->dev);
+    phy_state = _eth_phy_state(qi->phy);
+    diag_printf("VIRTEX4 ETH: ");
+    if ((phy_state & ETH_PHY_STAT_LINK) != 0) {
+        diag_printf( "Link detected - " );
+        if ((phy_state & ETH_PHY_STAT_100MB) != 0) {
+            // Link can handle 100Mb
+            diag_printf("100Mb");
+            if ((phy_state & ETH_PHY_STAT_FDX) != 0) {
+                diag_printf("/Full Duplex");
+            }
+        } else {
+            // Assume 10Mb, half duplex
+            diag_printf("10Mb");
+        }
+    } else 
+        diag_printf("VIRTEX4 ETH: Waiting for link to come up\n" ); 
+    diag_printf("\n");
+}
+
+//
+// This function is called to shut down the interface.
+//
+static void
+virtex4_eth_stop(struct eth_drv_sc *sc)
+{
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    
+    // Disable the device : 
+    if (XEmac_Stop(&qi->dev) != XST_SUCCESS) {
+        diag_printf("VIRTEX4_ETH - can't stop device!\n");
+    }
+}
+
+
+//
+// This function is called for low level "control" operations
+//
+static int
+virtex4_eth_control(struct eth_drv_sc *sc, unsigned long key,
+                void *data, int length)
+{
+  switch (key) {
+  case ETH_DRV_SET_MAC_ADDRESS:
+    return 0;
+    break;
+  default:
+    return 1;
+    break;
+  }
+}
+
+
+//
+// This function is called to see if another packet can be sent.
+// It should return the number of packets which can be handled.
+// Zero should be returned if the interface is busy and can not send any more.
+//
+static int
+virtex4_eth_can_send(struct eth_drv_sc *sc)
+{
+  return !deferred;
+}
+
+//
+// This routine is called to send data to the hardware.
+static void 
+virtex4_eth_send(struct eth_drv_sc *sc, struct eth_drv_sg *sg_list, int sg_len, 
+             int total_len, unsigned long key)
+{
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    volatile char *bp;
+    int i;
+
+#ifdef CYGPKG_NET
+    cyg_uint32 int_state;
+    HAL_DISABLE_INTERRUPTS(int_state);
+    // FIXME: closer to Send
+#endif
+
+    // Set up buffer
+    qi->txlength = total_len;
+    bp = qi->txbuf;
+    for (i = 0;  i < sg_len;  i++) {
+        memcpy((void *)bp, (void *)sg_list[i].buf, sg_list[i].len);
+        bp += sg_list[i].len;
+    }
+
+    if (XEmac_FifoSend(&qi->dev, qi->txbuf, qi->txlength) != XST_SUCCESS) {
+      deferred = 1;
+    }
+
+    // sg_list can be freed! (maybe deferred)
+    (sc->funs->eth_drv->tx_done)(sc, key, 0);
+#ifdef CYGPKG_NET
+    HAL_RESTORE_INTERRUPTS(int_state);
+#endif
+}
+
+//
+// This function is called when a frame has been sent
+//
+static void
+virtex4_eth_TxEvent(void *_cb)
+{
+    struct eth_drv_sc *sc = (struct eth_drv_sc *)_cb;
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+
+    if (deferred) {
+      if (XEmac_FifoSend(&qi->dev, qi->txbuf, qi->txlength) == XST_SUCCESS)
+        deferred = 0;
+    }
+
+}
+
+//
+// This function is called when a packet has been received.  It's job is
+// to prepare to unload the packet from the hardware.  Once the length of
+// the packet is known, the upper layer of the driver can be told.  When
+// the upper layer is ready to unload the packet, the internal function
+// 'virtex4_eth_recv' will be called to actually fetch it from the hardware.
+//
+static void
+virtex4_eth_RxEvent(void *_cb)
+{
+    struct eth_drv_sc *sc = (struct eth_drv_sc *)_cb;
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    Xint32 len;
+
+    len = CYGNUM_DEVS_ETH_POWERPC_VIRTEX4_BUFSIZE;
+    while (XEmac_FifoRecv(&qi->dev, qi->rxbuf, &len) == XST_SUCCESS) {
+        qi->rxlength = len;
+        (sc->funs->eth_drv->recv)(sc, qi->rxlength);
+    }
+
+}
+
+//
+// This function is called as a result of the "eth_drv_recv()" call above.
+// It's job is to actually fetch data for a packet from the hardware once
+// memory buffers have been allocated for the packet.  Note that the buffers
+// may come in pieces, using a scatter-gather list.  This allows for more
+// efficient processing in the upper layers of the stack.
+//
+static void
+virtex4_eth_recv(struct eth_drv_sc *sc, struct eth_drv_sg *sg_list, int sg_len)
+{
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    unsigned char *bp;
+    int i;
+  
+    bp = (unsigned char *)qi->rxbuf;
+
+    for (i = 0;  i < sg_len;  i++) {
+        if (sg_list[i].buf != 0) {
+            memcpy((void *)sg_list[i].buf, bp, sg_list[i].len);
+            bp += sg_list[i].len;
+        }
+    }
+}
+
+//
+// This function is called when there is some sort of error
+//
+static void
+virtex4_eth_ErrEvent(void *sc, XStatus code)
+{
+    diag_printf("%s.%d\n", __FUNCTION__, __LINE__);
+}
+
+//
+// Interrupt processing
+//
+static void          
+virtex4_eth_int(struct eth_drv_sc *sc)
+{
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    XEmac_IntrHandlerFifo(&qi->dev);
+}
+
+//
+// Interrupt vector
+//
+static int          
+virtex4_eth_int_vector(struct eth_drv_sc *sc)
+{
+    struct virtex4_eth_info *qi = (struct virtex4_eth_info *)sc->driver_private;
+    return (qi->int_vector);
+}
+
diff -Naur ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/src/if_virtex4_temac_sgdma.c ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/src/if_virtex4_temac_sgdma.c
--- ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/src/if_virtex4_temac_sgdma.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/src/if_virtex4_temac_sgdma.c	2006-05-03 17:33:50.000000000 +0200
@@ -0,0 +1,49 @@
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    Jan Olbrechts
+// Date:         2005-10-26
+// Purpose:      
+// Description:  eCos hardware driver for Xilinx Virtex4 temac with sgdma
+//              
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include "if_virtex4_temac_sgdma.inc"
+
diff -Naur ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/src/virtex4.h ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/src/virtex4.h
--- ecos-clean/ecos/packages/devs/eth/powerpc/virtex4/current/src/virtex4.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/eth/powerpc/virtex4/current/src/virtex4.h	2006-05-03 17:33:50.000000000 +0200
@@ -0,0 +1,116 @@
+//==========================================================================
+//
+//      virtex4.h
+//
+//      Xilinx VIRTEX4 ethernet driver support
+//      Taken from the Xilinx ML300 ethernet driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    gthomas
+// Contributors: cduclos
+// Date:         2003-09-23
+//               2005-04-21
+// Purpose:      
+// Description:  
+//              
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <xemac.h>
+#include <xemac_l.h>
+#include <xparameters.h>
+#include <xstatus.h>
+
+//
+// Buffer descriptors - internal use with FIFO driver
+//
+#define VIRTEX4_BD_Rx_Empty      0x8000  // Buffer is empty, VIRTEX4 can fill
+#define VIRTEX4_BD_Rx_Wrap       0x2000  // Wrap: Last buffer in ring
+#define VIRTEX4_BD_Rx_Int        0x1000  // Interrupt
+#define VIRTEX4_BD_Rx_Last       0x0800  // Last buffer in frame
+#define VIRTEX4_BD_Rx_Miss       0x0100  // Miss: promiscious mode
+#define VIRTEX4_BD_Rx_BC         0x0080  // Broadcast address
+#define VIRTEX4_BD_Rx_MC         0x0040  // Multicast address
+#define VIRTEX4_BD_Rx_LG         0x0020  // Frame length violation
+#define VIRTEX4_BD_Rx_NO         0x0010  // Non-octet aligned frame
+#define VIRTEX4_BD_Rx_SH         0x0008  // Short frame
+#define VIRTEX4_BD_Rx_CR         0x0004  // CRC error
+#define VIRTEX4_BD_Rx_OV         0x0002  // Overrun
+#define VIRTEX4_BD_Rx_TR         0x0001  // Frame truncated. late collision
+
+#define VIRTEX4_BD_Tx_Ready      0x8000  // Frame ready
+#define VIRTEX4_BD_Tx_Pad        0x4000  // Pad short frames
+#define VIRTEX4_BD_Tx_Wrap       0x2000  // Wrap: Last buffer in ring
+#define VIRTEX4_BD_Tx_Int        0x1000  // Interrupt
+#define VIRTEX4_BD_Tx_Last       0x0800  // Last buffer in frame
+#define VIRTEX4_BD_Tx_TC         0x0400  // Send CRC after data
+#define VIRTEX4_BD_Tx_DEF        0x0200  // Defer indication
+#define VIRTEX4_BD_Tx_HB         0x0100  // Heartbeat
+#define VIRTEX4_BD_Tx_LC         0x0080  // Late collision
+#define VIRTEX4_BD_Tx_RL         0x0040  // Retransmission limit
+#define VIRTEX4_BD_Tx_RC         0x003C  // Retry count 
+#define VIRTEX4_BD_Tx_UN         0x0002  // Underrun
+#define VIRTEX4_BD_Tx_CSL        0x0001  // Carrier sense lost
+#define VIRTEX4_BD_Tx_ERRORS     (FCC_BD_Tx_LC|FCC_BD_Tx_RL|FCC_BD_Tx_RC|FCC_BD_Tx_UN|FCC_BD_Tx_CSL)
+
+
+//
+// Info kept about interface
+//
+struct virtex4_eth_info { 
+    // These fields should be defined by the implementation
+    int                       int_vector;
+    char                     *esa_key;        // RedBoot 'key' for device ESA
+    unsigned char             enaddr[6];
+    unsigned char            *rxbuf;          // Rx buffer space
+    unsigned char            *txbuf;          // Tx buffer space
+#ifdef CYGPKG_DEVS_ETH_PHY
+    eth_phy_access_t         *phy;            // Routines to access PHY
+#endif
+    // The rest of the structure is set up at runtime
+    XEmac                     dev;
+    unsigned short            rxlength;       // Rx buffer length
+    unsigned short            txlength;       // Tx buffer length
+#ifdef CYGPKG_NET
+    cyg_interrupt             virtex4_eth_interrupt;
+    cyg_handle_t              virtex4_eth_interrupt_handle;
+#endif
+};
diff -Naur ecos-clean/ecos/packages/devs/kbd/powerpc/virtex4/current/cdl/kbd_virtex4.cdl ecos-ml403/ecos/packages/devs/kbd/powerpc/virtex4/current/cdl/kbd_virtex4.cdl
--- ecos-clean/ecos/packages/devs/kbd/powerpc/virtex4/current/cdl/kbd_virtex4.cdl	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/kbd/powerpc/virtex4/current/cdl/kbd_virtex4.cdl	2006-05-03 17:33:58.000000000 +0200
@@ -0,0 +1,110 @@
+#==========================================================================
+# 
+#       kbd_virtex4.cdl
+# 
+#       eCos configuration data for a keyboard on the Xilinx VIRTEX4 (PS/2)
+#       Taken from the ML300 board
+# 
+#==========================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#==========================================================================
+######DESCRIPTIONBEGIN####
+# 
+# Author(s):    gthomas
+# Contributors: gthomas, cduclos
+# Date:         2003-10-01
+#               2005-04-19
+# Purpose:      
+# Description:  Keyboard driver for Xilinx VIRTEX4 (PS/2)
+# 
+#####DESCRIPTIONEND####
+# 
+#==========================================================================
+
+cdl_package CYGPKG_DEVS_KBD_VIRTEX4 {
+    display     "PS/2 Keyboard driver for VIRTEX4"
+    include_dir cyg/io
+
+# Originally all of these were required, I'm building a simple layer to avoid using this
+    active_if   CYGPKG_IO_FILEIO
+    requires    CYGPKG_IO
+    requires    CYGFUN_KERNEL_API_C
+    requires    CYGPKG_HAL_POWERPC_VIRTEX4
+    active_if   !CYGSEM_VIRTEX4_LCD_COMM
+
+    compile       -library=libextras.a virtex4_kbd.c
+
+    description "PS/2 keyboard driver for the VIRTEX4 (Complete version)"
+
+    cdl_component CYGPKG_DEVS_KBD_VIRTEX4_OPTIONS {
+        display "options"
+        flavor  none
+        no_define
+
+        cdl_option CYGPKG_DEVS_KBD_VIRTEX4_CFLAGS {
+            display       "Additional compiler flags"
+            flavor        data
+            no_define
+            default_value { "" }
+            description "
+               This option modifies the set of compiler flags for
+               building the keypad driver package. These flags
+               are used in addition to the set of global flags."
+        }
+
+        cdl_option CYGDAT_DEVS_KBD_VIRTEX4_NAME {
+            display "Device name for the keyboard driver"
+            flavor data
+            default_value {"\"/dev/kbd\""}
+            description " This option specifies the name of the keypad device"
+        }
+
+        cdl_option CYGNUM_DEVS_KBD_VIRTEX4_EVENT_BUFFER_SIZE {
+            display "Number of events the driver can buffer"
+            flavor data
+            default_value { 32 }
+            description "
+                This option defines the size of the keypad device internal
+            buffer. The cyg_io_read() function will return as many of these
+            as there is space for in the buffer passed."
+        }
+        cdl_option CYGDAT_DEVS_KBD_VIRTEX4_CHARMAP {
+            display "Language of the character map"
+            flavor data
+            default_value { "EN" }
+            description "
+                This option chooses the default language for the used character map"
+        }
+    }
+}
diff -Naur ecos-clean/ecos/packages/devs/kbd/powerpc/virtex4/current/ChangeLog ecos-ml403/ecos/packages/devs/kbd/powerpc/virtex4/current/ChangeLog
--- ecos-clean/ecos/packages/devs/kbd/powerpc/virtex4/current/ChangeLog	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/kbd/powerpc/virtex4/current/ChangeLog	2006-05-03 17:33:58.000000000 +0200
@@ -0,0 +1,42 @@
+2005-04-19  Carlos Duclos <carlos@mind.be>
+        * Basically I just changed the names to reflect that the new board is virtex4
+
+2002-03-10  Gary Thomas  <gthomas@redhat.com>
+
+	* src/aaed2000_kbd.c: 
+	* cdl/kbd_aaed2000.cdl: New file(s).  Keyboard driver for AAED2000.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff -Naur ecos-clean/ecos/packages/devs/kbd/powerpc/virtex4/current/src/virtex4_kbd.c ecos-ml403/ecos/packages/devs/kbd/powerpc/virtex4/current/src/virtex4_kbd.c
--- ecos-clean/ecos/packages/devs/kbd/powerpc/virtex4/current/src/virtex4_kbd.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/kbd/powerpc/virtex4/current/src/virtex4_kbd.c	2006-05-03 17:33:58.000000000 +0200
@@ -0,0 +1,251 @@
+//=============================================================================
+//
+//      virtex4_kbd.c
+//
+//      Keyboard driver
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   Carlos Duclos 
+// Contributors:
+// Date:        2005-05-26
+// Purpose:     Complete keyboard driver
+// Description: PS/2 keyboard driver
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <pkgconf/hal.h>
+#include <pkgconf/devs_kbd_virtex4.h>
+#include <cyg/infra/cyg_type.h>         // base types
+#include <cyg/infra/cyg_trac.h>         // tracing macros
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+#include <cyg/kernel/kapi.h>
+#include <cyg/hal/hal_io.h>
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/infra/cyg_type.h>
+#include <cyg/infra/cyg_ass.h>
+#include <cyg/fileio/fileio.h>
+#include <cyg/io/devtab.h>
+#include <cyg/hal/charmap.h>
+
+#include "xbasic_types.h"
+#include "xparameters.h"
+#include <xparameters_translation.h>
+#include "xps2.h"
+#include "xstatus.h"
+
+#include <xps2_l.h>
+
+#define WAITING_KEYCODE 0
+#define WAITING_KEYUP 1
+#define WAITING_ECHO_SCANCODE 2
+#define LED_OFF 0
+#define LED_ON 1
+#define BUFFER_SIZE 64
+
+typedef struct {
+    cyg_uint8 pool[ BUFFER_SIZE ];
+    cyg_uint8 * pointer;
+    cyg_uint32 total;
+} keyboard_buffer;
+
+typedef struct {
+    keyboard_buffer incoming_characters;
+    bool initialized;
+    bool started;
+    cyg_int32 irq;
+    cyg_int32 state;
+    XPs2 device;
+    cyg_interrupt interrupt;
+    cyg_handle_t interrupt_handle;
+} keyboard_device;
+
+static keyboard_device keyboard;
+
+enum special_keys_states { NO_SPECIAL_KEY = 0, SHIFT_PRESSED, CTRL_PRESSED, ALT_PRESSED, CAPS_LOCK_PRESSED, NUM_LOCK_PRESSED };
+enum special_keys_desc { ALT = 17, SHIFT = 18, CTRL = 20, CAPS_LOCK = 88, NUM_LOCK = 119, SCROLL_LOCK = 126 };
+enum keyboard_commands { LEDS = 0xED, KBD_ACK = 0xFA };
+
+// Functions implemented
+static Cyg_ErrNo keyboard_write( cyg_io_handle_t handle, void * buffer, cyg_uint32 * length );
+static Cyg_ErrNo keyboard_read( cyg_io_handle_t handle, void * buffer, cyg_uint32 * length );
+static bool      keyboard_init( struct cyg_devtab_entry * table );
+static Cyg_ErrNo keyboard_lookup( struct cyg_devtab_entry ** table, struct cyg_devtab_entry * start, const char * name );
+
+CHAR_DEVIO_TABLE(keyboard_handlers, keyboard_write, keyboard_read, NULL, NULL, NULL ); 
+CHAR_DEVTAB_ENTRY(keyboard_entry, CYGDAT_DEVS_KBD_VIRTEX4_NAME, NULL, &keyboard_handlers, keyboard_init, keyboard_lookup, &keyboard );
+
+static int keyboard_isr( cyg_vector_t vector, cyg_addrword_t data )
+{
+    keyboard_device * k = (keyboard_device *)data;
+
+    cyg_drv_interrupt_mask( k->irq );
+
+    return (CYG_ISR_HANDLED|CYG_ISR_CALL_DSR);
+}
+
+static void keyboard_dsr( cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data )
+{
+    keyboard_device * k = (keyboard_device *)data;
+    cyg_ucount32 pending_characters = 0;
+    cyg_int32 i = 0;
+    cyg_uint8 received = 0;
+    
+    // Get characters!
+    for( i = k->incoming_characters.total; (pending_characters < count) && (i < BUFFER_SIZE); pending_characters++, i++ )
+    {
+        received = XPs2_RecvByte( k->device.BaseAddress );
+        k->incoming_characters.pool[ i ] = received;
+    }
+        
+    // Return to normal life
+    cyg_drv_interrupt_acknowledge( k->irq );
+    cyg_drv_interrupt_unmask( k->irq );
+}
+
+static bool keyboard_init( struct cyg_devtab_entry * table )
+{
+    XStatus stat = XST_FAILURE;
+    keyboard_device * k = (keyboard_device *)table->priv;
+    
+    stat = XPs2_Initialize(&k->device, XPAR_PS2_DUAL_REF_0_DEVICE_ID_1 );
+    if( stat != XST_SUCCESS )
+    {
+        diag_printf( "Cannot initialize ps2 keyboard! \n" );
+        k->initialized = false;
+        k->started = false;
+        return false;  // What else can be done?
+    }
+    k->incoming_characters.total = 0;
+    k->incoming_characters.pointer = k->incoming_characters.pool;
+    k->initialized = true;
+    k->started = false;
+    k->state = WAITING_KEYCODE;
+
+    return true;
+}
+
+static Cyg_ErrNo keyboard_read( cyg_io_handle_t handle, void * buffer, cyg_uint32 * length )
+{
+    cyg_devtab_entry_t * p    = (cyg_devtab_entry_t *) handle;
+    keyboard_device * k = (keyboard_device *)p->priv;
+    cyg_uint8 s = 0, t = 0;
+    cyg_uint32 i = 0;
+
+    if( k->started == false )
+        return ENODEV;
+
+    cyg_scheduler_lock();    
+    if( k->incoming_characters.total == 0 )
+    {
+        *buffer = '\0';
+        *length = 0;
+        cyg_scheduler_unlock();
+        return ENOERR;
+    }
+    for( i = 0; i < *length; i++ )
+    {
+        s = *k->incoming_characters.pointer++;
+        if( k->state == WAITING_KEYCODE )
+        {
+            // Convert this from code to key
+            t = charmap[ s ];
+            if( t == ALT )
+            {
+                k->incoming_characters.total--;
+                continue;
+            } else if( t == SHIFT )
+            {
+                k->incoming_characters.total--;
+                continue;
+            } else if( t == CTRL )
+            {
+                k->incoming_characters.total--;
+                continue;
+            } 
+            k->state = WAITING_KEYUP;
+            buffer[ i ] = t;
+            k->incoming_characters.total--;
+        } else if( k->state == WAITING_KEYUP )
+        {
+            k->incoming_characters.total--;
+            k->state = WAITING_ECHO_SCANCODE;
+            continue;
+        } else if( k->state == WAITING_ECHO_SCANCODE )
+        {
+            k->incoming_characters.total--;
+            k->state = WAITING_KEYCODE;
+            continue;
+        }
+    }
+    cyg_scheduler_unlock();
+    
+    return ENOERR;
+}
+
+static Cyg_ErrNo keyboard_write( cyg_io_handle_t handle, void * buffer, cyg_uint32 * length );
+{
+    return ENOERR;
+}
+
+/*
+ * Make keyboard "Online"
+ */
+
+static Cyg_ErrNo keyboard_lookup( struct cyg_devtab_entry ** table, struct cyg_devtab_entry * start, const char * name )
+{
+    keyboad_device * k = (keyboard_device *)(*table)->priv;
+    
+    // Set up to handle interrupts
+    if( k->started )
+        return ENOERR;
+
+    cyg_drv_interrupt_create( k->irq, 0, (cyg_addrword_t)k, (cyg_ISR_t *)keyboard_isr, (cyg_DSR_t *)keyboard_dsr, &k->interrupt_handle, &k->interrupt );
+    cyg_drv_interrupt_attach( k->interrupt_handle );
+    cyg_drv_interrupt_acknowledge( k->irq );
+    cyg_drv_interrupt_unmask( k->irq );
+    XPs2_EnableInterrupt( k->device );
+    k->started = true;
+
+    return ENOERR;
+}
diff -Naur ecos-clean/ecos/packages/devs/mouse/powerpc/virtex4/current/cdl/mouse_virtex4.cdl ecos-ml403/ecos/packages/devs/mouse/powerpc/virtex4/current/cdl/mouse_virtex4.cdl
--- ecos-clean/ecos/packages/devs/mouse/powerpc/virtex4/current/cdl/mouse_virtex4.cdl	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/mouse/powerpc/virtex4/current/cdl/mouse_virtex4.cdl	2006-05-03 17:33:47.000000000 +0200
@@ -0,0 +1,103 @@
+#==========================================================================
+# 
+#       mouse_virtex4.cdl
+# 
+#       eCos configuration data for the Xilinx VIRTEX4 mouse
+#       Taken from the Xilinx ML300 mouse
+# 
+#==========================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+#==========================================================================
+######DESCRIPTIONBEGIN####
+# 
+# Author(s):    gthomas
+# Contributors: gthomas, cduclos
+# Date:         2002-03-03
+#               2005-04-19                
+# Purpose:      
+# Description:  Mouse drivers for Xilinx VIRTEX4
+# 
+#####DESCRIPTIONEND####
+# 
+#==========================================================================
+
+cdl_package CYGPKG_DEVS_MOUSE_VIRTEX4 {
+    display     "Mouse driver for virtex4"
+    include_dir cyg/io
+
+#    active_if   CYGPKG_IO_FILEIO
+#    requires    CYGPKG_IO
+#    requires    CYGFUN_KERNEL_API_C
+#    requires    CYGPKG_HAL_POWERPC_VIRTEX4
+# CMDV: Originally this was !CYGSEM_VIRTEX4_LCD_COMM
+    active_if   CYGSEM_VIRTEX4_LCD_COMM
+
+    compile       -library=libextras.a virtex4_mouse.c
+
+    description "Mouse driver for the Xilinx VIRTEX4"
+
+    cdl_component CYGPKG_DEVS_MOUSE_VIRTEX4_OPTIONS {
+        display "options"
+        flavor  none
+        no_define
+
+        cdl_option CYGPKG_DEVS_MOUSE_VIRTEX4_CFLAGS {
+            display       "Additional compiler flags"
+            flavor        data
+            no_define
+            default_value { "" }
+            description "
+               This option modifies the set of compiler flags for
+               building the mousescreen driver package. These flags
+               are used in addition to the set of global flags."
+        }
+
+        cdl_option CYGDAT_DEVS_MOUSE_VIRTEX4_NAME {
+            display "Device name for the mouse driver"
+            flavor data
+            default_value {"\"/dev/mouse\""}
+            description " This option specifies the name of the mouse device"
+        }
+
+        cdl_option CYGNUM_DEVS_MOUSE_VIRTEX4_BUFFER_SIZE {
+            display "Number of bytes the driver can buffer"
+            flavor data
+            default_value { 128 }
+            description "
+                This option defines the size of the mouse device internal
+            buffer. The cyg_io_read() function will return as many of these
+            as there is space for in the buffer passed."
+        }
+    }
+}
diff -Naur ecos-clean/ecos/packages/devs/mouse/powerpc/virtex4/current/ChangeLog ecos-ml403/ecos/packages/devs/mouse/powerpc/virtex4/current/ChangeLog
--- ecos-clean/ecos/packages/devs/mouse/powerpc/virtex4/current/ChangeLog	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/mouse/powerpc/virtex4/current/ChangeLog	2006-05-03 17:33:47.000000000 +0200
@@ -0,0 +1,43 @@
+2002-03-10  Gary Thomas  <gthomas@redhat.com>
+
+	* src/aaed2000_ts.c: Update scan frequency to 20Hz.
+
+2002-03-09  Gary Thomas  <gthomas@redhat.com>
+
+	* src/aaed2000_ts.c: 
+	* touch_aaed2000.cdl: New files(s). Touch screen driver for AAED2000.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff -Naur ecos-clean/ecos/packages/devs/mouse/powerpc/virtex4/current/src/virtex4_mouse.c ecos-ml403/ecos/packages/devs/mouse/powerpc/virtex4/current/src/virtex4_mouse.c
--- ecos-clean/ecos/packages/devs/mouse/powerpc/virtex4/current/src/virtex4_mouse.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/mouse/powerpc/virtex4/current/src/virtex4_mouse.c	2006-05-03 17:33:47.000000000 +0200
@@ -0,0 +1,57 @@
+//==========================================================================
+//
+//      virtex4_mouse.c
+//
+//      Mouse driver for the Xilinx VIRTEX4
+//      Taken from the Xilinx ML300 Mouse driver
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    gthomas
+// Contributors: gthomas, cduclos
+// Date:         200-10-01
+//               2005-04-19
+// Purpose:      
+// Description:  Mouse driver for Xilinx VIRTEX4
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+
+#include <pkgconf/devs_mouse_virtex4.h>
+
diff -Naur ecos-clean/ecos/packages/devs/serial/powerpc/virtex4/current/cdl/ser_powerpc_virtex4.cdl ecos-ml403/ecos/packages/devs/serial/powerpc/virtex4/current/cdl/ser_powerpc_virtex4.cdl
--- ecos-clean/ecos/packages/devs/serial/powerpc/virtex4/current/cdl/ser_powerpc_virtex4.cdl	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/serial/powerpc/virtex4/current/cdl/ser_powerpc_virtex4.cdl	2006-05-03 17:34:00.000000000 +0200
@@ -0,0 +1,152 @@
+# ====================================================================
+#
+#      ser_powerpc_virtex4.cdl
+#
+#      eCos serial driver configuration data for Xilinx VIRTEX4
+#      Taken from ML300 serial driver
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s):      msalter
+# Original data:  msalter, gthomas
+# Contributors:   cduclos
+# Date:           2000-10-10
+#                 2005-04-19
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+
+cdl_package CYGPKG_IO_SERIAL_POWERPC_VIRTEX4 {
+    display       "Xilinx VIRTEX4 serial device drivers"
+
+    parent        CYGPKG_IO_SERIAL_DEVICES
+    active_if     CYGPKG_IO_SERIAL
+    active_if     CYGPKG_HAL_POWERPC_VIRTEX4
+    requires      MNDHWR_VIRTEX4_UART
+
+    requires      CYGPKG_ERROR
+    include_dir   cyg/io
+
+    description   "
+           This option enables the serial device drivers for the
+           Xilinx VIRTEX4 development board."
+
+    # FIXME: This really belongs in the GENERIC_16X5X package
+    cdl_interface CYGINT_IO_SERIAL_GENERIC_16X5X_REQUIRED {
+        display   "Generic 16x5x serial driver required"
+    }
+
+    define_proc {
+        puts $::cdl_system_header "/***** serial driver proc output start *****/"
+        puts $::cdl_header "#define CYGPRI_IO_SERIAL_GENERIC_16X5X_STEP 4"
+        puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_GENERIC_16X5X_INL <cyg/io/powerpc_virtex4_ser.inl>"
+        puts $::cdl_system_header "#define CYGDAT_IO_SERIAL_GENERIC_16X5X_CFG <pkgconf/io_serial_powerpc_virtex4.h>"
+        puts $::cdl_system_header "/*****  serial driver proc output end  *****/"
+    }
+
+    cdl_component CYGPKG_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0 {
+        display       "Xilinx VIRTEX4 serial port 0 driver"
+        flavor        bool
+        default_value 1
+
+        implements CYGINT_IO_SERIAL_GENERIC_16X5X_REQUIRED
+        implements    CYGINT_IO_SERIAL_FLOW_CONTROL_HW
+        implements    CYGINT_IO_SERIAL_LINE_STATUS_HW
+
+        description   "
+            This option includes the serial device driver for the 
+	    Xilinx VIRTEX4 port 0."
+
+        cdl_option CYGDAT_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_NAME {
+            display       "Device name for VIRTEX4 serial port 0 driver"
+            flavor        data
+            default_value {"\"/dev/ser0\""}
+            description   "
+                This option specifies the name of the serial device
+                for the Xilinx VIRTEX4 port 0."
+        }
+
+        cdl_option CYGNUM_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_BAUD {
+            display       "Baud rate for the Xilinx VIRTEX4 serial port 0 driver"
+            flavor        data
+            legal_values  { 50 75 110 "134_5" 150 200 300 600 1200 1800 2400
+                            3600 4800 7200 9600 14400 19200 38400
+                            57600 115200 }
+            default_value 9600
+            description   "
+                This option specifies the default baud rate (speed)
+                for the Xilinx VIRTEX4 port 0."
+        }
+
+        cdl_option CYGNUM_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_BUFSIZE {
+            display       "Buffer size for the Xilinx VIRTEX4 serial port 0 driver"
+            flavor        data
+            legal_values  0 to 8192
+            default_value 128
+            description   "
+                This option specifies the size of the internal buffers
+                used for the Xilinx VIRTEX4 port 0."
+        }
+    }
+
+    cdl_component CYGPKG_IO_SERIAL_POWERPC_VIRTEX4_TESTING {
+        display    "Testing parameters"
+        flavor     bool
+        calculated 1
+        active_if  CYGPKG_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0
+
+        implements CYGINT_IO_SERIAL_TEST_SKIP_9600
+        implements CYGINT_IO_SERIAL_TEST_SKIP_115200
+        implements CYGINT_IO_SERIAL_TEST_SKIP_PARITY_EVEN
+        
+        cdl_option CYGPRI_SER_TEST_SER_DEV {
+            display       "Serial device used for testing"
+            flavor        data
+            default_value { CYGDAT_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_NAME }
+        }
+
+        define_proc {
+            puts $::cdl_header "#define CYGPRI_SER_TEST_CRASH_ID \"virtex4\""
+            puts $::cdl_header "#define CYGPRI_SER_TEST_TTY_DEV  \"/dev/tty0\""
+        }
+    }
+}
+
+# EOF ser_powerpc_virtex4.cdl
diff -Naur ecos-clean/ecos/packages/devs/serial/powerpc/virtex4/current/ChangeLog ecos-ml403/ecos/packages/devs/serial/powerpc/virtex4/current/ChangeLog
--- ecos-clean/ecos/packages/devs/serial/powerpc/virtex4/current/ChangeLog	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/serial/powerpc/virtex4/current/ChangeLog	2006-05-03 17:34:00.000000000 +0200
@@ -0,0 +1,39 @@
+2003-10-06  Gary Thomas  <gary@mind.be>
+
+	* include/powerpc_ml300_ser.inl: 
+	* cdl/ser_powerpc_ml300.cdl: New package - serial device driver.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff -Naur ecos-clean/ecos/packages/devs/serial/powerpc/virtex4/current/include/powerpc_virtex4_ser.inl ecos-ml403/ecos/packages/devs/serial/powerpc/virtex4/current/include/powerpc_virtex4_ser.inl
--- ecos-clean/ecos/packages/devs/serial/powerpc/virtex4/current/include/powerpc_virtex4_ser.inl	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/devs/serial/powerpc/virtex4/current/include/powerpc_virtex4_ser.inl	2006-05-03 17:34:00.000000000 +0200
@@ -0,0 +1,133 @@
+//==========================================================================
+//
+//      io/serial/powerpc/powerpc_virtex4_ser.inl
+//
+//      Xilinx VIRTEX4 Serial I/O definitions
+//      Based on ML300 Serial I/O definitions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    msalter
+// Contributors: msalter, cduclos
+// Date:         2000-04-19
+// Purpose:      Xilinx VIRTEX4 Serial I/O module (interrupt driven version)
+// Description: 
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/hal/hal_intr.h>
+#include <xparameters.h>
+#include <xparameters_translation.h>
+#include <xuartns550_l.h>
+
+//-----------------------------------------------------------------------------
+// Baud rate specification
+
+#define BAUD_RATE(n) (XPAR_XUARTNS550_CLOCK_HZ/(n*16))
+
+static unsigned short select_baud[] = {
+    0,                   // Unused
+    0,                   // 50
+    0,                   // 75
+    BAUD_RATE(110),      // 110
+    0,                   // 134.5
+    BAUD_RATE(150),      // 150
+    0,                   // 200
+    BAUD_RATE(300),      // 300
+    BAUD_RATE(600),      // 600
+    BAUD_RATE(1200),     // 1200
+    BAUD_RATE(1800),     // 1800
+    BAUD_RATE(2400),     // 2400
+    BAUD_RATE(3600),     // 3600
+    BAUD_RATE(4800),     // 4800
+    BAUD_RATE(7200),     // 7200
+    BAUD_RATE(9600),     // 9600
+    BAUD_RATE(14400),    // 14400
+    BAUD_RATE(19200),    // 19200
+    BAUD_RATE(38400),    // 38400
+    BAUD_RATE(57600),    // 57600
+    BAUD_RATE(115200),   // 115200
+};
+
+// Note: the +3 offset here is because the generic driver accesses the registers
+// as bytes and the bytes are aligned on the 0x03 offset with 32 bit words.
+#define BYTELANE_OFFSET 3
+
+#ifdef CYGPKG_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0
+static pc_serial_info virtex4_serial_info0 = {XPAR_UART16550_0_BASEADDR+XUN_REG_OFFSET+BYTELANE_OFFSET,
+                                            CYGNUM_HAL_INTERRUPT_UART0};
+#if CYGNUM_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_BUFSIZE > 0
+static unsigned char virtex4_serial_out_buf0[CYGNUM_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_BUFSIZE];
+static unsigned char virtex4_serial_in_buf0[CYGNUM_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_BUFSIZE];
+
+static SERIAL_CHANNEL_USING_INTERRUPTS(virtex4_serial_channel0,
+                                       pc_serial_funs, 
+                                       virtex4_serial_info0,
+                                       CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_BAUD),
+                                       CYG_SERIAL_STOP_DEFAULT,
+                                       CYG_SERIAL_PARITY_DEFAULT,
+                                       CYG_SERIAL_WORD_LENGTH_DEFAULT,
+                                       CYG_SERIAL_FLAGS_DEFAULT,
+                                       &virtex4_serial_out_buf0[0], sizeof(virtex4_serial_out_buf0),
+                                       &virtex4_serial_in_buf0[0], sizeof(virtex4_serial_in_buf0)
+    );
+#else
+static SERIAL_CHANNEL(virtex4_serial_channel0,
+                      pc_serial_funs, 
+                      virtex4_serial_info0,
+                      CYG_SERIAL_BAUD_RATE(CYGNUM_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_BAUD),
+                      CYG_SERIAL_STOP_DEFAULT,
+                      CYG_SERIAL_PARITY_DEFAULT,
+                      CYG_SERIAL_WORD_LENGTH_DEFAULT,
+                      CYG_SERIAL_FLAGS_DEFAULT
+    );
+#endif
+
+DEVTAB_ENTRY(virtex4_serial_io0, 
+             CYGDAT_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0_NAME,
+             0,                     // Does not depend on a lower level interface
+             &cyg_io_serial_devio, 
+             pc_serial_init, 
+             pc_serial_lookup,     // Serial driver may need initializing
+             &virtex4_serial_channel0
+    );
+#endif //  CYGPKG_IO_SERIAL_POWERPC_VIRTEX4_SERIAL0
+
+// EOF powerpc_virtex4_ser.inl
diff -Naur ecos-clean/ecos/packages/ecos.db ecos-ml403/ecos/packages/ecos.db
--- ecos-clean/ecos/packages/ecos.db	2006-02-25 15:04:22.000000000 +0100
+++ ecos-ml403/ecos/packages/ecos.db	2006-05-03 17:33:47.000000000 +0200
@@ -5884,6 +5884,82 @@
 }
 ##-------------------------------------------------------------------------------------------
 
+##-------------------------------------------------------------------------------------------
+## XILINX VIRTEX4 (PowerPC 405) packages
+##
+package CYGPKG_HAL_POWERPC_VIRTEX4 {
+        alias           { "XILINX VIRTEX4 PowerPC 405 board" hal_powerpc_virtex4 }
+        directory       hal/powerpc/virtex4
+        script          hal_powerpc_virtex4.cdl
+        hardware
+        description "
+            The VIRTEX4 HAL package provides the support needed to run
+            eCos on a XILINX VIRTEX4 PowerPC 405 board."
+}
+
+package CYGPKG_DEVS_ETH_POWERPC_VIRTEX4 {
+        alias           { "XILINX PowerPC 405 ethernet support" virtex4_eth_driver }
+        hardware
+        directory       devs/eth/powerpc/virtex4
+        script          virtex4_eth_drivers.cdl
+        description     "Ethernet driver specifics for XILINX VIRTEX4 (PPC405) development board."
+}
+
+package MNDPKG_DEVS_ETH_POWERPC_VIRTEX4_SGDMATEMAC {
+        alias           { "XILINX PowerPC 405 efficient trimode ethernet support" virtex4_eth_driver }
+        hardware
+        directory       devs/eth/powerpc/virtex4
+        script          virtex4_eth_sgdmatemac.cdl
+        description     "Ethernet driver specifics for XILINX VIRTEX4 (PPC405) development board."
+}
+
+package CYGPKG_IO_SERIAL_POWERPC_VIRTEX4 {
+    alias             { "Xilinx VIRTEX4 serial driver" devs_serial_ppc_virtex4 }
+    hardware
+    directory         devs/serial/powerpc/virtex4
+    script            ser_powerpc_virtex4.cdl
+    description       "Xilinx VIRTEX4 serial device drivers"
+}
+
+package CYGPKG_DEVS_MOUSE_VIRTEX4 {
+        alias           { "Mouse support for Xilinx VIRTEX4" mouse_virtex4 }
+        directory       devs/mouse/powerpc/virtex4
+        script          mouse_virtex4.cdl
+        hardware
+        description "
+           This package contains hardware support for the mouse using
+           the PS/2 port on the Xilinx VIRTEX4 development board."
+}
+
+package CYGPKG_DEVS_KBD_VIRTEX4 {
+        alias           { "Keyboard support for Xilinx VIRTEX4" kbd_virtex4 }
+        directory       devs/kbd/powerpc/virtex4
+        script          kbd_virtex4.cdl
+        hardware
+        description "
+           This package contains hardware support for a keyboard
+           using the PS/2 on the Xilinx VIRTEX4 development board."
+}
+
+target virtex4 {
+        alias           { "XILINX VIRTEX4 PowerPC 405" xilinx_virtex4 }
+        packages        { CYGPKG_HAL_POWERPC
+                          CYGPKG_HAL_POWERPC_PPC40x
+                          CYGPKG_HAL_POWERPC_VIRTEX4
+                          CYGPKG_IO_SERIAL_GENERIC_16X5X
+                          CYGPKG_IO_SERIAL_POWERPC_VIRTEX4
+                          CYGPKG_DEVS_ETH_POWERPC_VIRTEX4
+                          MNDPKG_DEVS_ETH_POWERPC_VIRTEX4_SGDMATEMAC
+                          CYGPKG_DEVS_MOUSE_VIRTEX4
+                          CYGPKG_DEVS_ETH_PHY
+        }
+        description "
+            The virtex4 target provides the packages needed to run
+            eCos on the XILINX VIRTEX4 (405) board."
+}
+
+##-------------------------------------------------------------------------------------------
+
 # --------------------------------------------------------------------------
 
 # Realtek 8139 (PCI) Ethernet driver
diff -Naur ecos-clean/ecos/packages/hal/powerpc/arch/current/include/CVS/Entries ecos-ml403/ecos/packages/hal/powerpc/arch/current/include/CVS/Entries
--- ecos-clean/ecos/packages/hal/powerpc/arch/current/include/CVS/Entries	2006-05-03 17:29:34.000000000 +0200
+++ ecos-ml403/ecos/packages/hal/powerpc/arch/current/include/CVS/Entries	2006-05-03 17:34:30.000000000 +0200
@@ -1,4 +1,3 @@
-/arch.inc/1.5/Sat Jul 30 00:36:01 2005//
 /basetype.h/1.7/Thu May 23 23:04:12 2002//
 /hal_arch.h/1.16/Tue Apr 18 22:29:39 2006//
 /hal_cache.h/1.12/Thu May 23 23:04:12 2002//
@@ -8,4 +7,5 @@
 /ppc_regs.h/1.11/Thu May 23 23:04:13 2002//
 /ppc_stub.h/1.8/Mon Nov 24 14:28:15 2003//
 /redboot_linux_exec.h/1.1/Thu Aug 28 15:55:51 2003//
+/arch.inc/1.5/Thu Apr 20 15:04:41 2006//
 D
diff -Naur ecos-clean/ecos/packages/hal/powerpc/arch/current/src/hal_misc.c ecos-ml403/ecos/packages/hal/powerpc/arch/current/src/hal_misc.c
--- ecos-clean/ecos/packages/hal/powerpc/arch/current/src/hal_misc.c	2003-12-08 16:34:57.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/arch/current/src/hal_misc.c	2006-05-03 17:34:30.000000000 +0200
@@ -69,6 +69,12 @@
     defined(CYGPKG_HAL_EXCEPTIONS)
 # include <cyg/hal/hal_intr.h>           // HAL interrupts/exceptions
 #endif
+
+// FIXME
+//#ifdef VIRTEX4
+#include <cyg/hal/hal_intr.h>
+//#endif
+
 #include <cyg/hal/hal_mem.h>            // HAL memory handling
 
 //---------------------------------------------------------------------------
@@ -228,6 +234,7 @@
 externC cyg_uint32
 hal_arch_default_isr(CYG_ADDRWORD vector, CYG_ADDRWORD data)
 {
+    HAL_INTERRUPT_ACKNOWLEDGE( 0xffffffff );
     return 0;
 }
 #endif
diff -Naur ecos-clean/ecos/packages/hal/powerpc/arch/current/src/powerpc.ld ecos-ml403/ecos/packages/hal/powerpc/arch/current/src/powerpc.ld
--- ecos-clean/ecos/packages/hal/powerpc/arch/current/src/powerpc.ld	2003-04-10 20:07:56.000000000 +0200
+++ ecos-ml403/ecos/packages/hal/powerpc/arch/current/src/powerpc.ld	2006-05-03 17:34:30.000000000 +0200
@@ -54,7 +54,11 @@
 INPUT(extras.o)
 #endif
 #if (__GNUC__ >= 3)
-GROUP(libtarget.a libgcc.a libsupc++.a)
+GROUP(
+#ifdef VIRTEX4
+libxil.a
+#endif
+libtarget.a libgcc.a libsupc++.a)
 #else
 GROUP(libtarget.a libgcc.a)
 #endif
diff -Naur ecos-clean/ecos/packages/hal/powerpc/arch/current/src/redboot_linux_exec.c ecos-ml403/ecos/packages/hal/powerpc/arch/current/src/redboot_linux_exec.c
--- ecos-clean/ecos/packages/hal/powerpc/arch/current/src/redboot_linux_exec.c	2005-03-15 14:22:50.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/arch/current/src/redboot_linux_exec.c	2006-05-03 17:34:30.000000000 +0200
@@ -81,6 +81,7 @@
 
 #include <cyg/hal/redboot_linux_exec.h>
 
+
 //=========================================================================
 
 // Exported CLI function(s)
@@ -131,7 +132,6 @@
     if (baud_rate <= 0) {
         baud_rate = CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD;
     }
-
     // Make a little space at the top of the stack, and align to
     // 64-bit boundary.
     sp = (sp-128) & ~7;  // The Linux boot code uses this space for FIFOs
diff -Naur ecos-clean/ecos/packages/hal/powerpc/arch/current/src/vectors.S ecos-ml403/ecos/packages/hal/powerpc/arch/current/src/vectors.S
--- ecos-clean/ecos/packages/hal/powerpc/arch/current/src/vectors.S	2003-12-08 15:26:03.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/arch/current/src/vectors.S	2006-05-03 17:34:30.000000000 +0200
@@ -551,7 +551,7 @@
 ## controller in the system.
 
 #ifndef CYGPKG_HAL_POWERPC_INTC_DEFINED
-
+#error "You're not supposed to be here!"
 ## This is the simple version. No interrupt controller, CYGARC_PPCREG_VECTOR 
 ## is updated with the decoded interrupt vector. Isr tables/chaining
 ## use same interrupt decoder.
diff -Naur ecos-clean/ecos/packages/hal/powerpc/ppc40x/current/cdl/hal_powerpc_ppc40x.cdl ecos-ml403/ecos/packages/hal/powerpc/ppc40x/current/cdl/hal_powerpc_ppc40x.cdl
--- ecos-clean/ecos/packages/hal/powerpc/ppc40x/current/cdl/hal_powerpc_ppc40x.cdl	2005-08-25 15:20:58.000000000 +0200
+++ ecos-ml403/ecos/packages/hal/powerpc/ppc40x/current/cdl/hal_powerpc_ppc40x.cdl	2006-05-03 17:34:30.000000000 +0200
@@ -107,15 +107,15 @@
 
     cdl_component CYGHWR_HAL_POWERPC_PPC405_IO {
         display       "Misc I/O support, including diagnostic serial ports"
-        active_if     { (CYGHWR_HAL_POWERPC_PPC4XX == "405GP" || CYGHWR_HAL_POWERPC_PPC4XX == "405EP") }
-        description   "Variant I/O support - only for 405GP/EP"
+        active_if     { (CYGHWR_HAL_POWERPC_PPC4XX == "405") }
+ 	description   "Variant I/O support - only for 405 (not GP!)"
         default_value 1
         compile       hal_diag.c 
 
        cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS {
            display      "Number of communication channels on the board"
            flavor       data
-           default_value 2+CYGNUM_HAL_PLF_VIRTUAL_VECTOR_COMM_CHANNELS
+           default_value 1+CYGNUM_HAL_PLF_VIRTUAL_VECTOR_COMM_CHANNELS
        }
     
        cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL {
@@ -125,8 +125,10 @@
            legal_values     0 to CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS-1
            default_value    0
            description      "
-               The PPC405GP supports multiple serial ports. Additionally,
-               a platform may define other 'console' devices. This option
+               The PPC405 supports one or two serial ports. By default you will
+	       have only one serial port, if you need more than one serial port
+	       please use CYGNUM_HAL_PLF_VIRTUAL_VECTOR_COMM_CHANNELS.
+	       Additionally, a platform may define other 'console' devices. This option
                chooses which port will be used to connect to a host
                running GDB."
         }
@@ -147,7 +149,7 @@
             legal_values  { 50 75 110 "134_5" 150 200 300 600 1200 1800 2400 3600
                           4800 7200 9600 14400 19200 38400 57600 115200 230400
             }
-            default_value 38400
+            default_value 9600
             description   "
                 This option specifies the default baud rate (speed) for the 
                 HAL diagnostic port."
diff -Naur ecos-clean/ecos/packages/hal/powerpc/ppc40x/current/include/variant.inc ecos-ml403/ecos/packages/hal/powerpc/ppc40x/current/include/variant.inc
--- ecos-clean/ecos/packages/hal/powerpc/ppc40x/current/include/variant.inc	2005-08-25 15:20:59.000000000 +0200
+++ ecos-ml403/ecos/packages/hal/powerpc/ppc40x/current/include/variant.inc	2006-05-03 17:34:30.000000000 +0200
@@ -250,6 +250,8 @@
         # 0x10X0 = timer, X is the timer type
         # r3 used as scratch
         .macro  hal_intc_decode dreg,state
+_debug_point0:
+        b _debug_point0
         lwz     \dreg,CYGARC_PPCREG_VECTOR(\state) # retrieve vector number,
         extrwi. \dreg,\dreg,1,19        # isolate bit 19
         beq     0f                      # timer interrupt = 1
diff -Naur ecos-clean/ecos/packages/hal/powerpc/ppc40x/current/src/var_misc.c ecos-ml403/ecos/packages/hal/powerpc/ppc40x/current/src/var_misc.c
--- ecos-clean/ecos/packages/hal/powerpc/ppc40x/current/src/var_misc.c	2005-08-25 15:20:59.000000000 +0200
+++ ecos-ml403/ecos/packages/hal/powerpc/ppc40x/current/src/var_misc.c	2006-05-03 17:34:30.000000000 +0200
@@ -67,7 +67,11 @@
 #endif
 
 externC void hal_ppc40x_clock_initialize(cyg_uint32 period);
+#ifdef CYGHWR_HAL_POWERPC_PPC4XX_405GP
 static  void hal_ppc405_i2c_init(void);
+#else
+externC void hal_ppc40x_i2c_init(void);
+#endif /* CYGHWR_HAL_POWERPC_PPC4XX_405GP */
 
 //--------------------------------------------------------------------------
 void hal_variant_init(void)
@@ -77,8 +81,12 @@
 
 #if defined(CYGHWR_HAL_POWERPC_PPC4XX_405) || defined(CYGHWR_HAL_POWERPC_PPC4XX_405GP) || defined(CYGHWR_HAL_POWERPC_PPC4XX_405EP)
 
+#ifndef CYGPKG_HAL_POWERPC_VIRTEX4
     // Initialize I2C controller
     hal_ppc405_i2c_init();
+#else
+    hal_ppc40x_i2c_init();
+#endif
 #endif
 
     // Initialize real-time clock (for delays, etc, even if kernel doesn't use it)
@@ -246,6 +254,7 @@
 }
 
 #if defined(CYGHWR_HAL_POWERPC_PPC4XX_405) || defined(CYGHWR_HAL_POWERPC_PPC4XX_405GP) || defined(CYGHWR_HAL_POWERPC_PPC4XX_405EP)
+#ifndef CYGPKG_HAL_POWERPC_VIRTEX4
 //----------------------------------------------------------------------
 // I2C Support
 static void
@@ -355,6 +364,7 @@
     }
     return true;
 }
+#endif /* CYGPKG_HAL_POWERPC_VIRTEX4 */
 #endif // 405
 
 //--------------------------------------------------------------------------
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/cdl/hal_powerpc_virtex4.cdl ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/cdl/hal_powerpc_virtex4.cdl
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/cdl/hal_powerpc_virtex4.cdl	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/cdl/hal_powerpc_virtex4.cdl	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,478 @@
+# ====================================================================
+#
+#      hal_powerpc_virtex4.cdl
+#
+#      PowerPC/VIRTEX4 board HAL package configuration data
+#      Taken from ML300
+#
+# ====================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+# ====================================================================
+######DESCRIPTIONBEGIN####
+#
+# Author(s):      jskov
+# Original data:  hmt
+# Contributors:   gthomas, cduclos
+# Date:           1999-11-02
+#                 2005-04-19
+#
+#####DESCRIPTIONEND####
+#
+# ====================================================================
+
+cdl_package CYGPKG_HAL_POWERPC_VIRTEX4 {
+    display       "XILINX VIRTEX4 (PowerPC 405) board"
+    parent        CYGPKG_HAL_POWERPC
+    requires      CYGPKG_HAL_POWERPC_PPC40x
+    define_header hal_powerpc_virtex4.h
+    include_dir   cyg/hal
+    description   "
+        The VIRTEX4 HAL package provides the support needed to run
+        eCos on a XILINX PowerPC 405 board."
+
+    compile       hal_aux.c virtex4.S hal_diag.c
+
+    implements    CYGINT_HAL_DEBUG_GDB_STUBS
+    implements    CYGINT_HAL_DEBUG_GDB_STUBS_BREAK
+    implements    CYGINT_HAL_VIRTUAL_VECTOR_SUPPORT
+#    requires      CYGSEM_HAL_POWERPC_RESET_USES_JUMP
+    requires      { CYGHWR_HAL_POWERPC_PPC4XX == "405" }
+# work around DCACHE problems - see errata for details, but
+# basically, writethru mode is the only safe way to run this
+#    requires      { CYGSEM_HAL_DCACHE_STARTUP_MODE == "WRITETHRU" }
+# having the MMU enabled just seems to cause no end of problems
+    requires      { !CYGHWR_HAL_POWERPC_ENABLE_MMU }
+# work around 2nd serial port
+#    requires      { CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS == 1 }
+
+    define_proc {
+        puts $::cdl_system_header "#define CYGBLD_HAL_TARGET_H   <pkgconf/hal_powerpc_ppc40x.h>"
+        puts $::cdl_system_header "#define CYGBLD_HAL_PLATFORM_H <pkgconf/hal_powerpc_virtex4.h>"
+        puts $::cdl_system_header "#define CYGBLD_HAL_PLF_IO_H   <cyg/hal/plf_io.h>"
+
+	puts $::cdl_header "#define HAL_PLATFORM_CPU    \"PowerPC 405\""
+        puts $::cdl_header "#define HAL_PLATFORM_BOARD  \"XILINX VIRTEX4\""
+        puts $::cdl_header "#define HAL_PLATFORM_EXTRA  \"\""
+    }
+
+    cdl_component CYG_HAL_STARTUP {
+        display       "Startup type"
+        flavor        data
+        legal_values  {"RAM" "ROMRAM"}
+        default_value {"ROMRAM"}
+	no_define
+	define -file system.h CYG_HAL_STARTUP
+        description   "
+           This option is used to control where the application program will
+           run, either from RAM or ROM (flash) memory.  ROM based applications
+           must be self contained, while RAM applications will typically assume
+           the existence of a debug environment, such as GDB stubs."
+    }
+
+    cdl_option CYGHWR_HAL_POWERPC_CPU_SPEED {
+        display          "Development board clock speed (MHz)"
+        flavor           data
+        legal_values     300
+        default_value    300
+        description      "
+           VIRTEX4 Development Boards have various system clock speeds
+           depending on the processor and oscillator fitted.  Select 
+           the clock speed appropriate for your board so that the system 
+           can set the serial baud rate correctly, amongst other things."
+   }
+
+   cdl_option CYGHWR_HAL_POWERPC_MEM_SPEED {
+        display          "Development board memory bus speed (MHz)"
+        flavor           data
+        legal_values     100
+        default_value    100
+        description      "
+           VIRTEX4 Development Boards have various system clock speeds
+           depending on the processor and oscillator fitted."
+   }
+
+    cdl_option CYGSEM_VIRTEX4_SYSACE_DISK_SUPPORT {
+        display       "Support SysACE drive via RedBoot"
+        active_if     CYGPKG_REDBOOT_DISK
+        default_value 1
+        implements    CYGINT_REDBOOT_DISK_DRIVERS
+        compile -library=libextras.a sysace.c
+    }
+
+    cdl_option MNDHWR_VIRTEX4_AC97 {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_CHARLCD {
+        display       "Should be set in BSP"
+    }
+    cdl_option MNDHWR_VIRTEX4_UART {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_EMAC {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_SGDMATEMAC {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_IIC {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_PS21 {
+        display       "Should be set in BSP"
+        compile simple_keyboard.c
+    }
+
+    cdl_option MNDHWR_VIRTEX4_PS22 {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_SYSACE {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_TFT {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_USB {
+        display       "Should be set in BSP"
+    }
+
+    cdl_option MNDHWR_VIRTEX4_DATACACHE {
+        display       "Should be set in BSP"
+    }
+
+    cdl_component CYGSEM_VIRTEX4_I2C_SUPPORT {
+        display         "Xilinx VIRTEX4 I2C controller support"
+        active_if        CYGPKG_IO_I2C
+        requires        MNDHWR_VIRTEX4_IIC
+        default_value   1
+        compile         i2c_support.c
+        description     "Enabling this will enable the use of the i2c controller
+                        included in the Xilinx VIRTEX4 development board."
+        
+        cdl_option CYGNUM_HAL_EEPROM_SIZE {
+            display       "Size of EEPROM device"
+            requires      CYGSEM_VIRTEX4_I2C_SUPPORT
+            flavor        data
+            legal_values  { 4096 8192 }
+            default_value { 4096 }
+            description   "
+                This option indicates the size of the EEPROM fitted on the board."
+        }
+    }
+
+    cdl_component CYGSEM_VIRTEX4_LCD_SUPPORT {
+        display        "Support VGA Controller"
+        requires        MNDHWR_VIRTEX4_TFT
+        flavor         bool
+        default_value  0
+        description    "
+          Enabling this option will enable the use the LCD as a 
+          simple framebuffer, suitable for use with a windowing
+          package."
+          
+        compile hal_diag2.c 
+        compile lcd_support.c
+
+        cdl_option  CYGSEM_VIRTEX4_LCD_PORTRAIT_MODE {
+            display       "LCD portrait mode"
+            flavor        bool
+            default_value 0
+            description   "
+                Setting this option will orient the data on the LCD screen
+                in portrait (480x640) mode."
+        }
+
+        cdl_component CYGSEM_VIRTEX4_LCD_COMM {
+            display        "Support LCD/keyboard for comminication channel"
+            active_if      CYGSEM_VIRTEX4_LCD_SUPPORT
+            flavor         bool
+            default_value  1
+            description    "
+              Enabling this option will use the LCD and keyboard for a
+              communications channel, suitable for RedBoot, etc."
+
+            cdl_option  CYGNUM_VIRTEX4_LCD_COMM_FONT_SIZE {
+                display       "Choice of font for characters on screen"
+                flavor        data
+                legal_values  { 8 16 }
+                default_value 16
+                description   "
+                    This option chooses the size of the font (characters)
+                    rendered on the screen.  The smaller font will yield
+                    more characters, but scrolling is slower."
+            }
+
+            cdl_option  CYGOPT_VIRTEX4_LCD_COMM_LOGO {
+                display       "RedHat logo location"
+                flavor        booldata
+                legal_values  { "TOP" "BOTTOM" }
+                default_value { "TOP" }
+                description   "
+                    Use this option to control where the RedHat logo is placed
+                    on the LCD screen."
+            }
+        }
+    }
+
+    cdl_component CYGSEM_VIRTEX4_GPIO_SUPPORT {
+        display         "Xilinx VIRTEX4 GPIO support"
+        default_value   1
+        compile gpio_basic.c
+  
+        cdl_option CYGSEM_VIRTEX4_GPIO_CHAR_LCD {
+            display         "Support for 2x16 Character LCD"
+            requires        MNDHWR_VIRTEX4_CHARLCD
+            compile         char_lcd_support.c
+            flavor          bool
+            default_value   1
+            description     "
+                Enabling this options adds support for the
+                included 2x16 character lcd."
+        }
+        cdl_option CYGSEM_VIRTEX4_GPIO_LED_MANAGER {
+            display         "Led manager support"
+            compile         led_manager.c
+            flavor          bool
+            default_value   1
+            description     "
+                Enabling this options adds support to
+                control the leds included in this board."
+        }
+    }
+
+
+    cdl_component CYGBLD_GLOBAL_OPTIONS {
+        display "Global build options"
+        flavor  none
+        description   "
+	    Global build options including control over
+	    compiler flags, linker flags and choice of toolchain."
+
+
+        parent  CYGPKG_NONE
+
+        cdl_option CYGBLD_GLOBAL_COMMAND_PREFIX {
+            display "Global command prefix"
+            flavor  data
+            no_define
+            default_value { "powerpc-eabi" }
+            description "
+                This option specifies the command prefix used when
+                invoking the build tools."
+        }
+
+        cdl_option CYGBLD_GLOBAL_CFLAGS {
+            display "Global compiler flags"
+            flavor  data
+            no_define
+            default_value { "-I$(HW_DESIGN) -I$(HW_DESIGN)/ppc405_0/include -I$(ECOS_EXTRA) -DVIRTEX4 -msoft-float -mcpu=405 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc" }
+            description   "
+                This option controls the global compiler flags which
+                are used to compile all packages by
+                default. Individual packages may define
+                options which override these global flags."
+        }
+
+        cdl_option CYGBLD_GLOBAL_LDFLAGS {
+            display "Global linker flags"
+            flavor  data
+            no_define
+            default_value { "-msoft-float -mcpu=405 -g -nostdlib -Wl,--gc-sections -Wl,-static" }
+            description   "
+                This option controls the global linker flags. Individual
+                packages may define options which override these global flags."
+        }
+
+        cdl_option CYGBLD_BUILD_GDB_STUBS {
+            display "Build GDB stub ROM image"
+            default_value 0
+            requires { CYG_HAL_STARTUP == "ROM" }
+            requires CYGSEM_HAL_ROM_MONITOR
+            requires CYGBLD_BUILD_COMMON_GDB_STUBS
+            requires CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+            requires CYGDBG_HAL_DEBUG_GDB_BREAK_SUPPORT
+            requires CYGDBG_HAL_DEBUG_GDB_THREAD_SUPPORT
+            requires ! CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT
+            requires ! CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM
+            no_define
+            description "
+                This option enables the building of the GDB stubs for the
+                board. The common HAL controls takes care of most of the
+                build process, but the platform CDL takes care of creating
+                an S-Record data file suitable for programming using
+                the board's EPPC-Bug firmware monitor."
+
+            make -priority 320 {
+                <PREFIX>/bin/gdb_module.bin : <PREFIX>/bin/gdb_module.img
+                $(OBJCOPY) -O srec --change-address=0x02000000 $< $(@:.bin=.srec)
+                $(OBJCOPY) -O binary $< $@
+            }
+        }
+    }
+
+    cdl_component CYGPKG_HAL_POWERPC_VIRTEX4_OPTIONS {
+        display "VIRTEX4 build options"
+        flavor  none
+        description   "
+	    Package specific build options including control over
+	    compiler flags used only in building this package,
+	    and details of which tests are built."
+
+
+        cdl_option CYGPKG_HAL_POWERPC_VIRTEX4_CFLAGS_ADD {
+            display "Additional compiler flags"
+            flavor  data
+            no_define
+            default_value { "" }
+            description   "
+                This option modifies the set of compiler flags for
+                building the VIRTEX4 HAL. These flags are used in addition
+                to the set of global flags."
+        }
+
+        cdl_option CYGPKG_HAL_POWERPC_VIRTEX4_CFLAGS_REMOVE {
+            display "Suppressed compiler flags"
+            flavor  data
+            no_define
+            default_value { "" }
+            description   "
+                This option modifies the set of compiler flags for
+                building the VIRTEX4 HAL. These flags are removed from
+                the set of global flags if present."
+        }
+    }
+
+    cdl_component CYGHWR_MEMORY_LAYOUT {
+        display "Memory layout"
+        flavor data
+        no_define
+        calculated { CYG_HAL_STARTUP == "RAM" ? "powerpc_virtex4_ram" : \
+                     CYG_HAL_STARTUP == "ROMRAM" ? "powerpc_virtex4_romram" : \
+                                                "bogus_MLT" }
+
+        cdl_option CYGHWR_MEMORY_LAYOUT_LDI {
+            display "Memory layout linker script fragment"
+            flavor data
+            no_define
+            define -file system.h CYGHWR_MEMORY_LAYOUT_LDI
+            calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_virtex4_ram.ldi>" : \
+                         CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_powerpc_virtex4_romram.ldi>" : \
+                                                    "<pkgconf/bogus_MLT>" }
+        }
+
+        cdl_option CYGHWR_MEMORY_LAYOUT_H {
+            display "Memory layout header file"
+            flavor data
+            no_define
+            define -file system.h CYGHWR_MEMORY_LAYOUT_H
+            calculated { CYG_HAL_STARTUP == "RAM" ? "<pkgconf/mlt_powerpc_virtex4_ram.h>" : \
+                         CYG_HAL_STARTUP == "ROMRAM" ? "<pkgconf/mlt_powerpc_virtex4_romram.h>" : \
+                                                    "<pkgconf/bogus_MLT>" }
+        }
+    }
+
+    cdl_option CYGSEM_HAL_ROM_MONITOR {
+        display       "Behave as a ROM monitor"
+        flavor        bool
+        default_value 0
+        parent        CYGPKG_HAL_ROM_MONITOR
+        requires      { CYG_HAL_STARTUP == "ROMRAM" }
+        description   "
+            Enable this option if this program is to be used as a ROM monitor,
+            i.e. applications will be loaded into RAM on the board, and this
+            ROM monitor may process exceptions or interrupts generated from the
+            application. This enables features such as utilizing a separate
+            interrupt stack when exceptions are generated."
+    }
+
+    cdl_component CYGPKG_REDBOOT_HAL_OPTIONS {
+        display       "Redboot HAL options"
+        flavor        none
+        no_define
+        parent        CYGPKG_REDBOOT
+        active_if     CYGPKG_REDBOOT
+        description   "
+            This option lists the target's requirements for a valid Redboot
+            configuration."
+            
+        cdl_option CYGSEM_REDBOOT_PLF_LINUX_BOOT {
+            active_if      CYGBLD_BUILD_REDBOOT_WITH_EXEC
+            display        "Support booting Linux via RedBoot"
+            flavor         bool
+            default_value  1
+            description    "
+               This option enables RedBoot to support booting of a Linux kernel."
+
+            compile plf_redboot_linux_exec.c
+        }
+
+        cdl_component CYGBLD_BUILD_REDBOOT_OBJS {
+            display       "Build Redboot image(s)"
+            active_if     CYGBLD_BUILD_REDBOOT
+            default_value 1
+            no_define
+            description "This option enables the conversion of the Redboot ELF
+                         image various formats which simplify further manipulatations.
+                         The most basic of these forms is Motorola S-records, which
+                         are simpler and more reliable than binary formats when used
+                         for serial download."
+
+            make -priority 325 {
+                <PREFIX>/bin/redboot.srec : <PREFIX>/bin/redboot.elf
+                $(OBJCOPY) -O srec $< $(@:.bin=.srec)
+            }
+
+            cdl_option CYGBLD_BUILD_REDBOOT_BIN {
+                display       "Build RedBoot ROM/FLASH binary image"
+                default_value 0
+                description "This option enables the conversion of the Redboot ELF
+                             image to a binary image suitable for ROM/FLASH programming."
+                make -priority 324 {
+                    <PREFIX>/bin/redboot.bin : <PREFIX>/bin/redboot.elf
+                    $(OBJCOPY) -O binary $< /tmp/__redboot.bin
+                    make_VIRTEX4_flash /tmp/__redboot.bin $@
+                    rm -f /tmp/__redboot.bin
+                }
+            }
+        }
+    }
+}
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/ChangeLog ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/ChangeLog
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/ChangeLog	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/ChangeLog	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,180 @@
+2003-10-06  Gary Thomas 
+
+	* misc/redboot_ROMRAM.ecm: RedBoot configuration, suitable for 
+	use with System-ACE.
+
+	* src/drivers/common_v1_00_a/src/xbasic_types.c:
+	* src/drivers/common_v1_00_a/src/xutil_memtest.c:
+	* src/drivers/common_v1_00_a/src/xversion.c:
+	* src/drivers/cpu_ppc405_v1_00_a/src/xio.c:
+	* src/drivers/cpu_ppc405_v1_00_a/src/xio_dcr.c:
+	* src/drivers/dma_v1_00_a/src/xbuf_descriptor.c:
+	* src/drivers/dma_v1_00_a/src/xdma_channel.c:
+	* src/drivers/dma_v1_00_a/src/xdma_channel_sg.c:
+	* src/drivers/emac_v1_00_b/src/xemac.c:
+	* src/drivers/emac_v1_00_b/src/xemac_g.c:
+	* src/drivers/emac_v1_00_b/src/xemac_intr.c:
+	* src/drivers/emac_v1_00_b/src/xemac_intr_dma.c:
+	* src/drivers/emac_v1_00_b/src/xemac_intr_fifo.c:
+	* src/drivers/emac_v1_00_b/src/xemac_l.c:
+	* src/drivers/emac_v1_00_b/src/xemac_multicast.c:
+	* src/drivers/emac_v1_00_b/src/xemac_options.c:
+	* src/drivers/emac_v1_00_b/src/xemac_phy.c:
+	* src/drivers/emac_v1_00_b/src/xemac_polled.c:
+	* src/drivers/emac_v1_00_b/src/xemac_selftest.c:
+	* src/drivers/emac_v1_00_b/src/xemac_stats.c:
+	* src/drivers/ipif_v1_23_b/src/xipif_v1_23_b.c:
+	* src/drivers/packet_fifo_v1_00_b/src/xpacket_fifo_v1_00_b.c:
+	* src/drivers/gpio_v1_00_a/src/xgpio.c:
+	* src/drivers/gpio_v1_00_a/src/xgpio_extra.c:
+	* src/drivers/gpio_v1_00_a/src/xgpio_g.c:
+	* src/drivers/gpio_v1_00_a/src/xgpio_selftest.c:
+	* src/drivers/iic_v1_01_b/src/xiic.c:
+	* src/drivers/iic_v1_01_b/src/xiic_g.c:
+	* src/drivers/iic_v1_01_b/src/xiic_intr.c:
+	* src/drivers/iic_v1_01_b/src/xiic_l.c:
+	* src/drivers/iic_v1_01_b/src/xiic_master.c:
+	* src/drivers/iic_v1_01_b/src/xiic_multi_master.c:
+	* src/drivers/iic_v1_01_b/src/xiic_options.c:
+	* src/drivers/iic_v1_01_b/src/xiic_selftest.c:
+	* src/drivers/iic_v1_01_b/src/xiic_slave.c:
+	* src/drivers/iic_v1_01_b/src/xiic_stats.c:
+	* src/drivers/intc_v1_00_b/src/xintc.c:
+	* src/drivers/intc_v1_00_b/src/xintc_g.c:
+	* src/drivers/intc_v1_00_b/src/xintc_intr.c:
+	* src/drivers/intc_v1_00_b/src/xintc_l.c:
+	* src/drivers/intc_v1_00_b/src/xintc_lg.c:
+	* src/drivers/intc_v1_00_b/src/xintc_options.c:
+	* src/drivers/intc_v1_00_b/src/xintc_selftest.c:
+	* src/drivers/ps2_ref_v1_00_a/src/xps2.c:
+	* src/drivers/ps2_ref_v1_00_a/src/xps2_g.c:
+	* src/drivers/ps2_ref_v1_00_a/src/xps2_intr.c:
+	* src/drivers/ps2_ref_v1_00_a/src/xps2_l.c:
+	* src/drivers/ps2_ref_v1_00_a/src/xps2_options.c:
+	* src/drivers/ps2_ref_v1_00_a/src/xps2_stats.c:
+	* src/drivers/sysace_v1_00_a/src/xsysace.c:
+	* src/drivers/sysace_v1_00_a/src/xsysace_compactflash.c:
+	* src/drivers/sysace_v1_00_a/src/xsysace_g.c:
+	* src/drivers/sysace_v1_00_a/src/xsysace_intr.c:
+	* src/drivers/sysace_v1_00_a/src/xsysace_jtagcfg.c:
+	* src/drivers/sysace_v1_00_a/src/xsysace_l.c:
+	* src/drivers/sysace_v1_00_a/src/xsysace_selftest.c:
+	* src/drivers/uartns550_v1_00_b/src/xuartns550.c:
+	* src/drivers/uartns550_v1_00_b/src/xuartns550_format.c:
+	* src/drivers/uartns550_v1_00_b/src/xuartns550_g.c:
+	* src/drivers/uartns550_v1_00_b/src/xuartns550_intr.c:
+	* src/drivers/uartns550_v1_00_b/src/xuartns550_l.c:
+	* src/drivers/uartns550_v1_00_b/src/xuartns550_options.c:
+	* src/drivers/uartns550_v1_00_b/src/xuartns550_selftest.c:
+	* src/drivers/uartns550_v1_00_b/src/xuartns550_stats.c:
+	* src/drivers/tft_ref_v1_00_a/src/xtft.c:
+	* src/drivers/tft_ref_v1_00_a/src/xtft_charcode.c:
+	* src/drivers/tft_ref_v1_00_a/src/xtft_g.c:
+	* src/drivers/tft_ref_v1_00_a/src/xtft_l.c:
+	* src/drivers/touchscreen_ref_v1_00_a/src/xtouchscreen.c:
+	* src/drivers/touchscreen_ref_v1_00_a/src/xtouchscreen_g.c:
+	* src/drivers/touchscreen_ref_v1_00_a/src/xtouchscreen_intr.c:
+	* src/drivers/touchscreen_ref_v1_00_a/src/xtouchscreen_l.c:
+	* include/xilinx/xparameters.h:	
+	* include/xilinx/xparameters_ml300.h:
+	* include/xilinx/xbasic_types.h:
+	* include/xilinx/xenv.h:
+	* include/xilinx/xstatus.h:
+	* include/xilinx/xutil.h:
+	* include/xilinx/xversion.h:
+	* include/xilinx/xio.h:
+	* include/xilinx/xio_dcr.h:
+	* include/xilinx/xbuf_descriptor.h:
+	* include/xilinx/xdma_channel.h:
+	* include/xilinx/xdma_channel_i.h:
+	* include/xilinx/xipif_v1_23_b.h:
+	* include/xilinx/xpacket_fifo_v1_00_b.h:
+	* include/xilinx/xemac.h:
+	* include/xilinx/xemac_i.h:
+	* include/xilinx/xemac_l.h:
+	* include/xilinx/xgpio.h:
+	* include/xilinx/xgpio_i.h:
+	* include/xilinx/xgpio_l.h:
+	* include/xilinx/xiic.h:
+	* include/xilinx/xiic_i.h:
+	* include/xilinx/xiic_l.h:
+	* include/xilinx/xintc.h:
+	* include/xilinx/xintc_i.h:
+	* include/xilinx/xintc_l.h:
+	* include/xilinx/xps2.h:
+	* include/xilinx/xps2_i.h:
+	* include/xilinx/xps2_l.h:
+	* include/xilinx/xsysace.h:
+	* include/xilinx/xsysace_l.h:
+	* include/xilinx/xuartns550.h:
+	* include/xilinx/xuartns550_i.h:
+	* include/xilinx/xuartns550_l.h:
+	* include/xilinx/xtouchscreen.h:
+	* include/xilinx/xtouchscreen_i.h:
+	* include/xilinx/xtouchscreen_l.h:
+	* include/xilinx/xtft.h:
+	* include/xilinx/xtft_charcode.h:
+	* include/xilinx/xtft_i.h:
+	* include/xilinx/xtft_l.h:
+	* include/xilinx/xtouchscreen_l.h: Xilinx ML300 platform development kit.
+	Included by permission of Xilinx, Inc.
+
+	* src/plf_redboot_linux_exec.c: 
+	* src/ml300.S: 
+	* src/lcd_support.c: 
+	* src/hal_diag.c: 
+	* src/hal_aux.c: 
+	* src/font.h: 
+	* src/banner.xpm: 
+	* include/pkgconf/mlt_powerpc_ml300_romram.mlt: 
+	* include/pkgconf/mlt_powerpc_ml300_romram.ldi: 
+	* include/pkgconf/mlt_powerpc_ml300_romram.h: 
+	* include/pkgconf/mlt_powerpc_ml300_ram.mlt: 
+	* include/pkgconf/mlt_powerpc_ml300_ram.ldi: 
+	* include/pkgconf/mlt_powerpc_ml300_ram.h: 
+	* include/plf_stub.h: 
+	* include/plf_regs.h: 
+	* include/plf_io.h: 
+	* include/plf_intr.h: 
+	* include/plf_cache.h: 
+	* include/plf.inc: 
+	* include/lcd_support.h: 
+	* include/hal_diag.h: 
+	* cdl/hal_powerpc_ml300.cdl: New package - platform support for
+	Xilinx ML300 (PowerPC 405) development board.
+
+//===========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//===========================================================================
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/char_lcd_support.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/char_lcd_support.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/char_lcd_support.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/char_lcd_support.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,9 @@
+#ifndef CHAR_LCD_SUPPORT
+#define CHAR_LCD_SUPPORT
+
+void init_char_lcd(void);
+int write_char_lcd( unsigned char * buffer, unsigned int length );
+int get_current_position( unsigned char * row, unsigned char * column );
+int get_current_memory_position( unsigned char * address );
+
+#endif // CHAR_LCD_SUPPORT
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/charmap.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/charmap.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/charmap.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/charmap.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,10 @@
+#ifndef CHARMAP_H
+#define CHARMAP_H
+
+#if CYGDAT_DEVS_KBD_VIRTEX4_CHARMAP=="EN"
+char charmap[] = { ' ', ' ', ' ' };
+#else
+#error "No keyboard map defined"
+#endif // CYGDAT_DEVS_KBD_VIRTEX4_CHARMAP
+
+#endif // CHARMAP_H
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/gpio_basic.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/gpio_basic.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/gpio_basic.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/gpio_basic.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,9 @@
+#ifndef GPIO_BASIC_H
+#define GPIO_BASIC_H
+
+void init_gpio_manager( void );
+int get_status_gpio( cyg_uint32 * status );
+int turn_on_bit( cyg_uint32 bit );
+int turn_off_bit( cyg_uint32 bit );
+
+#endif // GPIO_BASIC_H
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/hal_diag.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/hal_diag.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/hal_diag.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/hal_diag.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,69 @@
+#ifndef CYGONCE_HAL_HAL_DIAG_H
+#define CYGONCE_HAL_HAL_DIAG_H
+
+//=============================================================================
+//
+//      hal_diag.h
+//
+//      HAL Support for Kernel Diagnostic Routines
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   nickg
+// Contributors:nickg, gthomas
+// Date:        1998-03-02
+// Purpose:     HAL Support for Kernel Diagnostic Routines
+// Description: Diagnostic routines for use during kernel development.
+// Usage:       #include <cyg/hal/hal_diag.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_if.h>
+
+#define HAL_DIAG_INIT() hal_if_diag_init()
+#define HAL_DIAG_WRITE_CHAR(_c_) hal_if_diag_write_char(_c_)
+#define HAL_DIAG_READ_CHAR(_c_) hal_if_diag_read_char(&_c_)
+
+//-----------------------------------------------------------------------------
+// end of hal_diag.h
+#endif // CYGONCE_HAL_HAL_DIAG_H
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/hal_kbd.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/hal_kbd.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/hal_kbd.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/hal_kbd.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,200 @@
+#ifndef HAL_KBD_H
+#define HAL_KBD_H
+
+//-----------------------------------------------------------------------------
+// Keyboard definitions
+
+#define	KBDATAPORT	0x40010000		// data I/O port
+#define	KBCMDPORT	0x40010001		// command port (write)
+#define	KBSTATPORT	0x40010001		// status port	(read)
+#define KBINRDY         0x01
+#define KBOUTRDY        0x02
+#define KBTXTO          0x40                    // Transmit timeout - nothing there
+#define KBTEST          0xAB
+
+// Scan codes
+
+#define	LSHIFT		0x2a
+#define	RSHIFT		0x36
+#define	CTRL		0x1d
+#define	ALT		0x38
+#define	CAPS		0x3a
+#define	NUMS		0x45
+
+#define	BREAK		0x80
+
+// Bits for KBFlags
+
+#define	KBNormal	0x0000
+#define	KBShift		0x0001
+#define	KBCtrl		0x0002
+#define KBAlt		0x0004
+#define	KBIndex		0x0007	// mask for the above
+
+#define	KBExtend	0x0010
+#define	KBAck		0x0020
+#define	KBResend	0x0040
+#define	KBShiftL	(0x0080 | KBShift)
+#define	KBShiftR	(0x0100 | KBShift)
+#define	KBCtrlL		(0x0200 | KBCtrl)
+#define	KBCtrlR		(0x0400 | KBCtrl)
+#define	KBAltL		(0x0800 | KBAlt)
+#define	KBAltR		(0x1000 | KBAlt)
+#define	KBCapsLock	0x2000
+#define	KBNumLock	0x4000
+
+#define KBArrowUp       0x48
+#define KBArrowRight    0x4D
+#define KBArrowLeft     0x4B
+#define KBArrowDown     0x50
+
+//-----------------------------------------------------------------------------
+// Keyboard Variables
+
+static	int	KBFlags = 0;
+static	cyg_uint8 KBPending = 0xFF;
+static	cyg_uint8 KBScanTable[128][4] = {
+//	Normal		Shift		Control		Alt
+// 0x00
+    {	0xFF,		0xFF,		0xFF,		0xFF,   },
+    {	0x1b,		0x1b,		0x1b,		0xFF,	},
+    {	'1',		'!',		0xFF,		0xFF,	},
+    {	'2',		'"',		0xFF,		0xFF,	},
+    {	'3',		'#',		0xFF,		0xFF,	},
+    {	'4',		'$',		0xFF,		0xFF,	},
+    {	'5',		'%',		0xFF,		0xFF,	},
+    {	'6',		'^',		0xFF,		0xFF,	},
+    {	'7',		'&',		0xFF,		0xFF,	},
+    {	'8',		'*',		0xFF,		0xFF,	},
+    {	'9',		'(',		0xFF,		0xFF,	},
+    {	'0',		')',		0xFF,		0xFF,	},
+    {	'-',		'_',		0xFF,		0xFF,	},
+    {	'=',		'+',		0xFF,		0xFF,	},
+    {	'\b',		'\b',		0xFF,		0xFF,	},
+    {	'\t',		'\t',		0xFF,		0xFF,	},
+// 0x10
+    {	'q',		'Q',		0x11,		0xFF,	},
+    {	'w',		'W',		0x17,		0xFF,	},
+    {	'e',		'E',		0x05,		0xFF,	},
+    {	'r',		'R',		0x12,		0xFF,	},
+    {	't',		'T',		0x14,		0xFF,	},
+    {	'y',		'Y',		0x19,		0xFF,	},
+    {	'u',		'U',		0x15,		0xFF,	},
+    {	'i',		'I',		0x09,		0xFF,	},
+    {	'o',		'O',		0x0F,		0xFF,	},
+    {	'p',		'P',		0x10,		0xFF,	},
+    {	'[',		'{',		0x1b,		0xFF,	},
+    {	']',		'}',		0x1d,		0xFF,	},
+    {	'\r',		'\r',		'\n',		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	'a',		'A',		0x01,		0xFF,	},
+    {	's',		'S',		0x13,		0xFF,	},
+// 0x20
+    {	'd',		'D',		0x04,		0xFF,	},
+    {	'f',		'F',		0x06,		0xFF,	},
+    {	'g',		'G',		0x07,		0xFF,	},
+    {	'h',		'H',		0x08,		0xFF,	},
+    {	'j',		'J',		0x0a,		0xFF,	},
+    {	'k',		'K',		0x0b,		0xFF,	},
+    {	'l',		'L',		0x0c,		0xFF,	},
+    {	';',		':',		0xFF,		0xFF,	},
+    {	0x27,		'@',		0xFF,		0xFF,	},
+    {	'#',		'~',		0xFF,		0xFF,	},
+    {	'`',		'~',		0xFF,		0xFF,	},
+    {	'\\',		'|',		0x1C,		0xFF,	},
+    {	'z',		'Z',		0x1A,		0xFF,	},
+    {	'x',		'X',		0x18,		0xFF,	},
+    {	'c',		'C',		0x03,		0xFF,	},
+    {	'v',		'V',		0x16,		0xFF,	},
+// 0x30
+    {	'b',		'B',		0x02,		0xFF,	},
+    {	'n',		'N',		0x0E,		0xFF,	},
+    {	'm',		'M',		0x0D,		0xFF,	},
+    {	',',		'<',		0xFF,		0xFF,	},
+    {	'.',		'>',		0xFF,		0xFF,	},
+    {	'/',		'?',		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	' ',		' ',		' ',		' ',	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xF1,		0xE1,		0xFF,		0xFF,	},
+    {	0xF2,		0xE2,		0xFF,		0xFF,	},
+    {	0xF3,		0xE3,		0xFF,		0xFF,	},
+    {	0xF4,		0xE4,		0xFF,		0xFF,	},
+    {	0xF5,		0xE5,		0xFF,		0xFF,	},
+// 0x40
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+
+    {	0x15,		0x15,		0x15,		0x15,	},
+    {	0x10,		0x10,		0x10,		0x10,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+// 0x50
+    {	0x04,		0x04,		0x04,		0x04,	},
+    {	0x0e,		0x0e,		0x0e,		0x0e,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+// 0x60
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+// 0x70
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+    {	0xFF,		0xFF,		0xFF,		0xFF,	},
+};
+
+static int KBIndexTab[8] = { 0, 1, 2, 2, 3, 3, 3, 3 };
+
+#endif
+
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/i2c_support.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/i2c_support.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/i2c_support.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/i2c_support.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,7 @@
+#ifndef _VIRTEX4_I2C_SUPPORT_
+#define _VIRTEX4_I2C_SUPPORT_
+
+void virtex4_i2c_init(void);
+int virtex4_i2c_get_bus_pointer( void ** bus );
+
+#endif /* _VIRTEX4_I2C_SUPPORT_ */
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/lcd_support.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/lcd_support.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/lcd_support.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/lcd_support.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,79 @@
+#ifndef _LCD_SUPPORT_H_
+#define _LCD_SUPPORT_H_
+//==========================================================================
+//
+//        lcd_support.h
+//
+//        Xilinx VIRTEX4 - LCD support routines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):     gthomas
+// Contributors:  gthomas
+// Date:          2001-09-29
+// Description:   Simple LCD support
+//####DESCRIPTIONEND####
+
+struct lcd_info {
+    short height, width;  // Pixels
+    short bpp;            // Depth (bits/pixel)
+    short type;
+    short rlen;           // Length of one raster line in bytes
+    void  *fb;            // Frame buffer
+};
+
+// Frame buffer types - used by MicroWindows
+#define FB_TRUE_COLOR0888 0x03
+#define FB_TRUE_RGB555 0x02  
+
+// Exported functions
+void lcd_init(int depth);
+void lcd_clear(void);
+int  lcd_getinfo(struct lcd_info *info);
+void lcd_on(bool enable);
+#ifdef CYGSEM_VIRTEX4_LCD_COMM 
+void lcd_moveto(int X, int Y);
+void lcd_putc(cyg_int8 c);
+int  lcd_printf(char const *fmt, ...);
+void lcd_setbg(int red, int green, int blue);
+void lcd_setfg(int red, int green, int blue);
+int show_xpm(char **xpm, int screen_pos);
+void lcd_screen_clear(void);
+#endif /* CYGSEM_VIRTEX4_LCD_COMM */
+
+#endif //  _LCD_SUPPORT_H_
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/led_manager.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/led_manager.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/led_manager.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/led_manager.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,11 @@
+#ifndef LED_MANAGER_H
+#define LED_MANAGER_H
+
+enum LEDS { NO_LEDS = 0x0000, GP_LED0 = 0x0001, GP_LED1 = 0x0002, GP_LED2 = 0x0004, GP_LED3 = 0x0008, CD_LED = 0x0010, WD_LED = 0x0020, SD_LED = 0x0040, ED_LED = 0x0080, ND_LED = 0x0100 };
+
+void init_led_manager( void );
+int get_status_led_manager( cyg_uint32 * status );
+int turn_on_led( cyg_uint32 led );
+int turn_off_led( cyg_uint32 led );
+
+#endif // LED_MANAGER_H
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,41 @@
+// eCos memory layout - Thu May 30 10:27:39 2002
+
+// This is a generated file - do not edit
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h>
+
+#endif
+#define CYGMEM_REGION_ram (0)
+#define CYGMEM_REGION_ram_SIZE (0x2000000)
+#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+#define CYGMEM_REGION_bram (0xFFFF0000)
+#define CYGMEM_REGION_bram_SIZE (0x0010000)
+#define CYGMEM_REGION_bram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__reserved_vectors) [];
+#endif
+#define CYGMEM_SECTION_reserved_vectors (CYG_LABEL_NAME (__reserved_vectors))
+#define CYGMEM_SECTION_reserved_vectors_SIZE (0x3000)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__reserved_vsr_table) [];
+#endif
+#define CYGMEM_SECTION_reserved_vsr_table (CYG_LABEL_NAME (__reserved_vsr_table))
+#define CYGMEM_SECTION_reserved_vsr_table_SIZE (0x200)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__reserved_virtual_table) [];
+#endif
+#define CYGMEM_SECTION_reserved_virtual_table (CYG_LABEL_NAME (__reserved_virtual_table))
+#define CYGMEM_SECTION_reserved_virtual_table_SIZE (0x100)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__reserved_for_rom) [];
+#endif
+#define CYGMEM_SECTION_reserved_for_rom (CYG_LABEL_NAME (__reserved_for_rom))
+#define CYGMEM_SECTION_reserved_for_rom_SIZE (0x7cd00)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__heap1) [];
+#endif
+#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x2000000 - (size_t) CYG_LABEL_NAME (__heap1))
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.ldi ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.ldi
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.ldi	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.ldi	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,32 @@
+// eCos memory layout - Thu May 30 10:27:39 2002
+
+// This is a generated file - do not edit
+
+#include <cyg/infra/cyg_type.inc>
+
+MEMORY
+{
+    ram : ORIGIN = 0x00000000, LENGTH = 64m
+    bram : ORIGIN = 0xFFFF0000, LENGTH = 64k
+}
+
+SECTIONS
+{
+    SECTIONS_BEGIN
+    CYG_LABEL_DEFN(__reserved_vectors) = 0; . = CYG_LABEL_DEFN(__reserved_vectors) + 0x3000;
+    CYG_LABEL_DEFN(__reserved_vsr_table) = ALIGN (0x10); . = CYG_LABEL_DEFN(__reserved_vsr_table) + 0x200;
+    CYG_LABEL_DEFN(__reserved_virtual_table) = ALIGN (0x10); . = CYG_LABEL_DEFN(__reserved_virtual_table) + 0x100;
+    CYG_LABEL_DEFN(__reserved_for_rom) = ALIGN (0x10); . = CYG_LABEL_DEFN(__reserved_for_rom) + 0x7cd00;
+    SECTION_vectors (ram, ALIGN (0x10), LMA_EQ_VMA)
+    SECTION_text (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA)
+    SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
+    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
+    SECTIONS_END
+}
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.mlt ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.mlt
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.mlt	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_ram.mlt	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,17 @@
+version 0
+region ram 0 8000000 0 !
+section reserved_vectors 3000 1 0 0 1 1 1 1 0 0 reserved_vsr_table reserved_vsr_table !
+section reserved_vsr_table 200 10 0 0 0 1 0 1 reserved_virtual_table reserved_virtual_table !
+section reserved_virtual_table 100 10 0 0 0 1 0 1 reserved_for_rom reserved_for_rom !
+section reserved_for_rom 3cd00 10 0 0 0 1 0 1 vectors vectors !
+section vectors 0 10 0 1 0 1 0 1 text text !
+section text 0 4 0 1 0 1 0 1 fini fini !
+section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
+section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
+section rodata 0 8 0 1 0 1 0 1 fixup fixup !
+section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table !
+section gcc_except_table 0 1 0 1 0 1 0 1 data data !
+section data 0 8 0 1 0 1 0 1 sbss sbss !
+section sbss 0 4 0 1 0 1 0 1 bss bss !
+section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
+section heap1 0 8 0 0 0 0 0 0 !
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,19 @@
+// eCos memory layout - Thu May 30 10:05:45 2002
+
+// This is a generated file - do not edit
+
+#ifndef __ASSEMBLER__
+#include <cyg/infra/cyg_type.h>
+#include <stddef.h>
+
+#endif
+#define CYGMEM_REGION_ram (0)
+#define CYGMEM_REGION_ram_SIZE (0x4000000)
+#define CYGMEM_REGION_ram_ATTR (CYGMEM_REGION_ATTR_R | CYGMEM_REGION_ATTR_W)
+#define CYGMEM_REGION_rom (0xfff80000)
+#define CYGMEM_REGION_rom_SIZE (0x80000)
+#ifndef __ASSEMBLER__
+extern char CYG_LABEL_NAME (__heap1) [];
+#endif
+#define CYGMEM_SECTION_heap1 (CYG_LABEL_NAME (__heap1))
+#define CYGMEM_SECTION_heap1_SIZE (0x4000000 - (size_t) CYG_LABEL_NAME (__heap1))
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.ldi ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.ldi
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.ldi	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.ldi	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,31 @@
+// eCos memory layout - Thu May 30 10:05:45 2002
+
+// This is a generated file - do not edit
+
+#include <cyg/infra/cyg_type.inc>
+
+MEMORY
+{
+    ram : ORIGIN = 0x00000000, LENGTH = 64m
+  bram  : ORIGIN = 0xffffc000, LENGTH = 16k - 4
+  boot  : ORIGIN = 0xfffffffc, LENGTH = 4
+}
+
+SECTIONS
+{
+    SECTIONS_BEGIN
+    .boot0   : { KEEP(*(.boot0))} > bram
+    .boot    : { KEEP(*(.boot)) } > boot
+    SECTION_vectors (ram, 0, LMA_EQ_VMA)
+    SECTION_text (ram, 0x3400, LMA_EQ_VMA)
+    SECTION_fini (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_rodata1 (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_rodata (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_fixup (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_gcc_except_table (ram, ALIGN (0x1), LMA_EQ_VMA)
+    SECTION_data (ram, ALIGN (0x8), LMA_EQ_VMA)
+    SECTION_sbss (ram, ALIGN (0x4), LMA_EQ_VMA)
+    SECTION_bss (ram, ALIGN (0x10), LMA_EQ_VMA)
+    CYG_LABEL_DEFN(__heap1) = ALIGN (0x8);
+    SECTIONS_END
+}
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.mlt ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.mlt
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.mlt	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/pkgconf/mlt_powerpc_virtex4_romram.mlt	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,13 @@
+version 0
+region ram 0 8000000 0 !
+section vectors 0 1 0 1 1 0 1 0 0 0 !
+section text 0 1 0 1 1 1 1 1 3400 3400 fini fini !
+section fini 0 4 0 1 0 1 0 1 rodata1 rodata1 !
+section rodata1 0 8 0 1 0 1 0 1 rodata rodata !
+section rodata 0 8 0 1 0 1 0 1 fixup fixup !
+section fixup 0 4 0 1 0 1 0 1 gcc_except_table gcc_except_table !
+section gcc_except_table 0 1 0 1 0 1 0 1 data data !
+section data 0 8 0 1 0 1 0 1 sbss sbss !
+section sbss 0 4 0 1 0 1 0 1 bss bss !
+section bss 0 10 0 1 0 1 0 1 heap1 heap1 !
+section heap1 0 8 0 0 0 0 0 0 !
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_cache.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_cache.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_cache.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_cache.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,78 @@
+#ifndef CYGONCE_PLF_CACHE_H
+#define CYGONCE_PLF_CACHE_H
+
+//=============================================================================
+//
+//      plf_cache.h
+//
+//      Platform HAL cache details
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   jskov
+// Contributors:jskov, gthomas
+// Date:        2000-01-26
+// Purpose:     Platform cache control API
+// Description: The macros defined here provide the platform specific
+//              cache control operations / behavior.
+// Usage:       Is included via the architecture cache header:
+//              #include <cyg/hal/hal_cache.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+//---------------------------------------------------------------------------
+// Initial cache enabling - controlled by common CDL
+
+//-----------------------------------------------------------------------------
+// FIXME: This definition forces the IO flash driver to use a
+// known-good procedure for fiddling flash before calling flash device
+// driver functions. The procedure breaks on other platform/driver
+// combinations though so is depricated. Hence this definition.
+//
+// If you work on this target, please try to remove this definition
+// and verify that the flash driver still works (both from RAM and
+// flash). If it does, remove the definition and this comment for good
+// [and the old macro definition if this happens to be the last client
+// of that code].
+#define HAL_FLASH_CACHES_OLD_MACROS
+
+//-----------------------------------------------------------------------------
+#endif // ifndef CYGONCE_PLF_CACHE_H
+// End of plf_cache.h
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf.inc ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf.inc
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf.inc	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf.inc	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,88 @@
+#ifndef CYGONCE_HAL_PLF_INC
+#define CYGONCE_HAL_PLF_INC
+##=============================================================================
+##
+##	plf.inc
+##
+##	PPC40x family assembler header file
+##
+##=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s): 	jskov
+## Contributors:jskov, gthomas, cduclos
+## Date:	2000-08-27
+## Purpose:	PPC40x family definitions.
+## Description:	This file contains various definitions and macros that are
+##              useful for writing assembly code for the PPC40x CPU family.
+##              Changed the names of some things from ML300 to VIRTEX4
+## Usage:
+##		#include <cyg/hal/plf.inc>
+##		...
+##		
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+#define CYGPKG_HAL_POWERPC_INTC_DEFINED
+        # decode the interrupt
+        # the interrupt vector will be 0x500 or 0x10x0
+        # 0x0500 = external, must be decoded via EXISR
+        # 0x10X0 = timer, X is the timer type
+        # r3 used as scratch
+        .macro  hal_intc_decode dreg,state
+        lwz     \dreg,CYGARC_PPCREG_VECTOR(\state) # retrieve vector number,
+        extrwi. \dreg,\dreg,1,19                # isolate bit 19
+        beq     0f                              # timer interrupt = 1
+        lwz     \dreg,CYGARC_PPCREG_VECTOR(\state) # retrieve vector number,
+        extrwi  \dreg,\dreg,2,26                # isolate bits 26-27
+        addi    \dreg,\dreg,CYGNUM_HAL_INTERRUPT_VAR_TIMER # FIXME
+        b       1f
+0:      lwi     r3,_VIRTEX4_INTC
+        lwz     \dreg,_VIRTEX4_INTC_ISR(r3)
+	lwz	r3,_VIRTEX4_INTC_IER(r3)
+	and	r3,\dreg,r3
+	cntlzw	r3,r3
+	li	\dreg,31
+	sub	\dreg,\dreg,r3
+        addi    \dreg,\dreg,CYGNUM_HAL_INTERRUPT_first
+1:      stw     \dreg,CYGARC_PPCREG_VECTOR(\state) # update vector in state frame.
+        slwi    \dreg,\dreg,2                   # convert to byte offset.
+        .endm                              
+
+#endif // CYGONCE_HAL_PLF_INC
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_intr.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_intr.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_intr.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_intr.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,149 @@
+#ifndef CYGONCE_HAL_PLF_INTR_H
+#define CYGONCE_HAL_PLF_INTR_H
+
+//==========================================================================
+//
+//      plf_intr.h
+//
+//      Xilinx VIRTEX4 platform specific interrupt definitions
+//      Taken from ML300 board
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    jskov
+// Contributors: jskov, gthomas
+// Date:         2000-06-13
+// Purpose:      Define platform specific interrupt support
+//              
+// Usage:
+//              #include <cyg/hal/plf_intr.h>
+//              ...
+//              
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <pkgconf/hal.h>
+#include <cyg/infra/cyg_type.h>
+#include <xparameters.h>
+#include <xparameters_translation.h>
+#include <xintc_l.h>
+
+//--------------------------------------------------------------------------
+// Platform defined interrupt layout
+#define CYGHWR_HAL_INTERRUPT_LAYOUT_DEFINED
+// Additional interrupt sources which are supported by the VIRTEX4
+
+#define VIRTEX4_IAR   0xD1000FCC
+#define VIRTEX4_SIE   0xD1000FD0
+#define VIRTEX4_CIE   0xD1000FD4
+
+#define CYGNUM_HAL_INTERRUPT_405_BASE   1
+#define CYGNUM_HAL_INTERRUPT_first      CYGNUM_HAL_INTERRUPT_405_BASE
+#define CYGNUM_HAL_INTERRUPT_EMAC       (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_ETHERNET_0_IP2INTC_IRPT_INTR)
+#define CYGNUM_HAL_INTERRUPT_SGDMATEMAC (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_TEMAC_0_IP2INTC_IRPT_INTR)
+#define CYGNUM_HAL_INTERRUPT_USB        (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_SYSTEM_USB_HPI_INT_INTR)
+#define CYGNUM_HAL_INTERRUPT_PHY        (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_MISC_LOGIC_0_PHY_MII_INT_INTR)
+#define CYGNUM_HAL_INTERRUPT_SYSACE     (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_SYSACE_0_SYSACE_IRQ_INTR)
+#define CYGNUM_HAL_INTERRUPT_AC97REC    (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_INTR)
+#define CYGNUM_HAL_INTERRUPT_AC97PB     (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_INTR)
+#define CYGNUM_HAL_INTERRUPT_I2C        (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_IIC_0_IP2INTC_IRPT_INTR)
+#define CYGNUM_HAL_INTERRUPT_PS22       (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_PS2_DUAL_REF_0_SYS_INTR2_INTR)
+#define CYGNUM_HAL_INTERRUPT_PS21       (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_PS2_DUAL_REF_0_SYS_INTR1_INTR)
+#define CYGNUM_HAL_INTERRUPT_UART0      (CYGNUM_HAL_INTERRUPT_405_BASE+XPAR_INTC_0_UART16550_0_IP2INTC_IRPT_INTR)
+
+// FIXME
+#define CYGNUM_HAL_INTERRUPT_last       20
+
+// Masks for all interrutps
+#define CYGNUM_HAL_INTERRUPT_EMAC_MASK       XPAR_ETHERNET_0_IP2INTC_IRPT_MASK
+#define CYGNUM_HAL_INTERRUPT_SGDMATEMAC_MASK XPAR_TEMAC_0_IP2INTC_IRPT_MASK
+#define CYGNUM_HAL_INTERRUPT_USB_MASK        XPAR_SYSTEM_USB_HPI_INT_MASK
+#define CYGNUM_HAL_INTERRUPT_PHY_MASK        XPAR_MISC_LOGIC_0_PHY_MII_INT_MASK
+#define CYGNUM_HAL_INTERRUPT_SYSACE_MASK     XPAR_SYSACE_0_SYSACE_IRQ_MASK
+#define CYGNUM_HAL_INTERRUPT_AC97REC_MASK    XPAR_AC97_CONTROLLER_REF_0_RECORD_INTERRUPT_MASK
+#define CYGNUM_HAL_INTERRUPT_AC97PB_MASK     XPAR_AC97_CONTROLLER_REF_0_PLAYBACK_INTERRUPT_MASK
+#define CYGNUM_HAL_INTERRUPT_I2C_MASK        XPAR_IIC_0_IP2INTC_IRPT_MASK
+#define CYGNUM_HAL_INTERRUPT_PS22_MASK       XPAR_PS2_DUAL_REF_0_SYS_INTR2_MASK
+#define CYGNUM_HAL_INTERRUPT_PS21_MASK       XPAR_PS2_DUAL_REF_0_SYS_INTR1_MASK
+#define CYGNUM_HAL_INTERRUPT_UART0_MASK      XPAR_UART16550_0_IP2INTC_IRPT_MASK
+
+// Platform defines interrupt controller access
+#define CYGHWR_HAL_INTERRUPT_CONTROLLER_DEFINED
+externC void hal_virtex4_interrupt_init(void);
+externC void hal_virtex4_interrupt_mask(int);
+externC void hal_virtex4_interrupt_unmask(int);
+externC void hal_virtex4_interrupt_acknowledge(int);
+externC void hal_virtex4_interrupt_configure(int, int, int);
+externC void hal_virtex4_interrupt_set_level(int, int);
+
+#define HAL_PLF_INTERRUPT_INIT()                                \
+    hal_virtex4_interrupt_init()                                     
+#define HAL_PLF_INTERRUPT_MASK( _vector_ )                      \
+    hal_virtex4_interrupt_mask( _vector_ )                         
+#define HAL_PLF_INTERRUPT_UNMASK( _vector_ )                    \
+    hal_virtex4_interrupt_unmask( _vector_ )                       
+#define HAL_PLF_INTERRUPT_ACKNOWLEDGE( _vector_ )               \
+    hal_virtex4_interrupt_acknowledge( _vector_ )                  
+#define HAL_PLF_INTERRUPT_CONFIGURE( _vector_, _level_, _up_ )  \
+    hal_virtex4_interrupt_configure( _vector_, _level_, _up_ )     
+#define HAL_PLF_INTERRUPT_SET_LEVEL( _vector_, _level_ )        \
+    hal_virtex4_interrupt_set_level( _vector_, _level_ )
+
+//-----------------------------------------------------------------------------
+// Symbols used by assembly code
+#define CYGARC_PLATFORM_DEFS                                            \
+    DEFINE(_VIRTEX4_INTC, XPAR_INTC_0_BASEADDR);                          \
+    DEFINE(_VIRTEX4_INTC_ISR, XIN_ISR_OFFSET);                            \
+    DEFINE(_VIRTEX4_INTC_IER, XIN_IER_OFFSET);                            \
+    DEFINE(CYGNUM_HAL_INTERRUPT_first, CYGNUM_HAL_INTERRUPT_first);
+
+//--------------------------------------------------------------------------
+// Control-C support.
+
+//----------------------------------------------------------------------------
+// Reset.
+
+externC void _virtex4_reset(void);
+#define HAL_PLATFORM_RESET() _virtex4_reset()
+#define HAL_PLATFORM_RESET_ENTRY 0xFFF80100
+
+//--------------------------------------------------------------------------
+#endif // ifndef CYGONCE_HAL_PLF_INTR_H
+// End of plf_intr.h
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_io.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_io.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_io.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_io.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,60 @@
+#ifndef CYGONCE_PLF_IO_H
+#define CYGONCE_PLF_IO_H
+
+//=============================================================================
+//
+//      plf_io.h
+//
+//      Platform specific IO support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    hmt, jskov 
+// Contributors: hmt, jskov, gthomas
+// Date:         2002-07-23
+// Purpose:      Xilinx ML300 (PowerPC 405) IO support macros
+// Description: 
+// Usage:        #include <cyg/hal/plf_io.h>
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+//-----------------------------------------------------------------------------
+// end of plf_io.h
+#endif // CYGONCE_PLF_IO_H
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_regs.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_regs.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_regs.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_regs.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,60 @@
+#ifndef CYGONCE_HAL_PLF_REGS_H
+#define CYGONCE_HAL_PLF_REGS_H
+
+//==========================================================================
+//
+//      plf_regs.h
+//
+//      Xilinx ML300 (PowerPC 405) development platform CPU definitions
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    Gary Thomas <gary@mlbassoc.com>
+// Contributors: 
+// Date:         2003-09-02
+// Purpose:      
+// Description:  Possibly override any platform assumptions
+//
+// Usage:        Included via the variant+architecture register headers:
+//               ...
+//              
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#endif // CYGONCE_HAL_PLF_REGS_H
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_stub.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_stub.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/plf_stub.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/plf_stub.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,88 @@
+#ifndef CYGONCE_HAL_PLF_STUB_H
+#define CYGONCE_HAL_PLF_STUB_H
+
+//=============================================================================
+//
+//      plf_stub.h
+//
+//      Platform header for GDB stub support.
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   jskov
+// Contributors:jskov, gthomas
+// Date:        1999-02-12
+// Purpose:     Platform HAL stub support for Cogent CSB272 PowerPC/405GP board.
+// Usage:       #include <cyg/hal/plf_stub.h>
+//              
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+
+#include <cyg/infra/cyg_type.h>         // CYG_UNUSED_PARAM
+
+#include <cyg/hal/ppc_stub.h>           // architecture stub support
+
+//----------------------------------------------------------------------------
+// Define some platform specific communication details. This is mostly
+// handled by hal_if now, but we need to make sure the comms tables are
+// properly initialized.
+
+externC void cyg_hal_plf_comms_init(void);
+
+#define HAL_STUB_PLATFORM_INIT_SERIAL()       cyg_hal_plf_comms_init()
+
+#define HAL_STUB_PLATFORM_SET_BAUD_RATE(baud) CYG_UNUSED_PARAM(int, (baud))
+#define HAL_STUB_PLATFORM_INIT_BREAK_IRQ()    CYG_EMPTY_STATEMENT
+#define HAL_STUB_PLATFORM_INTERRUPTIBLE       0
+
+//----------------------------------------------------------------------------
+// Stub initializer.
+#ifdef CYG_HAL_STARTUP_ROM
+# define HAL_STUB_PLATFORM_INIT()
+// to distinguish eCos stub ROM ready state from either RedBoot or app.
+#endif
+
+#endif // ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+//-----------------------------------------------------------------------------
+#endif // CYGONCE_HAL_PLF_STUB_H
+// End of plf_stub.h
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/simple_keyboard.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/simple_keyboard.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/include/simple_keyboard.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/include/simple_keyboard.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,7 @@
+#ifndef SIMPLE_KEYBOARD_H
+#define SIMPLE_KEYBOARD_H
+
+void init_simple_keyboard( void );
+int read_simple_keyboard( cyg_uint8 * character );
+
+#endif // SIMPLE_KEYBOARD_H
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/misc/httpd_monitor.ecm ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/misc/httpd_monitor.ecm
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/misc/httpd_monitor.ecm	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/misc/httpd_monitor.ecm	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,272 @@
+cdl_savefile_version 1;
+cdl_savefile_command cdl_savefile_version {};
+cdl_savefile_command cdl_savefile_command {};
+cdl_savefile_command cdl_configuration { description hardware template package };
+cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value };
+
+cdl_configuration eCos {
+    description "" ;
+    hardware    virtex4 ;
+    template    net ;
+    package -hardware CYGPKG_HAL_POWERPC current ;
+    package -hardware CYGPKG_HAL_POWERPC_PPC40x current ;
+    package -hardware CYGPKG_HAL_POWERPC_VIRTEX4 current ;
+    package -hardware CYGPKG_IO_SERIAL_GENERIC_16X5X current ;
+    package -hardware CYGPKG_IO_SERIAL_POWERPC_VIRTEX4 current ;
+    package -hardware CYGPKG_DEVS_KBD_VIRTEX4 current ;
+    package -hardware CYGPKG_DEVS_MOUSE_VIRTEX4 current ;
+    package -template CYGPKG_HAL current ;
+    package -template CYGPKG_IO current ;
+    package -template CYGPKG_IO_SERIAL current ;
+    package -template CYGPKG_INFRA current ;
+    package -template CYGPKG_ISOINFRA current ;
+    package -template CYGPKG_KERNEL current ;
+    package -template CYGPKG_MEMALLOC current ;
+    package -template CYGPKG_LIBC current ;
+    package -template CYGPKG_LIBC_TIME current ;
+    package -template CYGPKG_LIBC_STDLIB current ;
+    package -template CYGPKG_LIBC_STRING current ;
+    package -template CYGPKG_LIBC_I18N current ;
+    package -template CYGPKG_LIBC_SETJMP current ;
+    package -template CYGPKG_LIBC_STARTUP current ;
+    package -template CYGPKG_LIBC_STDIO current ;
+    package -template CYGPKG_LIBM current ;
+    package -template CYGPKG_POSIX current ;
+    package -template CYGPKG_IO_WATCHDOG current ;
+    package -template CYGPKG_IO_WALLCLOCK current ;
+    package -template CYGPKG_ERROR current ;
+    package -template CYGPKG_IO_FILEIO current ;
+    package -template CYGPKG_NET current ;
+    package -template CYGPKG_NET_FREEBSD_STACK current ;
+    package -template CYGPKG_NS_DNS current ;
+    package -template CYGPKG_IO_ETH_DRIVERS current ;
+    package -template CYGPKG_NET_SNTP current ;
+    package CYGPKG_DEVS_ETH_PHY current ;
+    package CYGPKG_DEVS_ETH_POWERPC_VIRTEX4 current ;
+    package CYGPKG_HTTPD current ;
+};
+
+cdl_option CYGHWR_HAL_POWERPC_ENABLE_MMU {
+    inferred_value 0
+};
+
+cdl_component CYGHWR_HAL_POWERPC_PPC4XX {
+    inferred_value 405
+};
+
+cdl_component CYG_HAL_STARTUP {
+    user_value RAM
+};
+
+cdl_component CYGSEM_VIRTEX4_LCD_SUPPORT {
+    user_value 1
+};
+
+cdl_option CYGHWR_DEVS_ETH_PHY_VIRTEX4 {
+    inferred_value 1
+};
+
+cdl_option CYGBLD_ISO_CTYPE_HEADER {
+    inferred_value 1 <cyg/libc/i18n/ctype.inl>
+};
+
+cdl_option CYGBLD_ISO_ERRNO_CODES_HEADER {
+    inferred_value 1 <cyg/error/codes.h>
+};
+
+cdl_option CYGBLD_ISO_ERRNO_HEADER {
+    inferred_value 1 <cyg/error/errno.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_FILETYPES_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_STREAMS_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_FILEOPS_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_FILEACCESS_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_FORMATTED_IO_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_CHAR_IO_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_DIRECT_IO_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_FILEPOS_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDIO_ERROR_HEADER {
+    inferred_value 1 <cyg/libc/stdio/stdio.h>
+};
+
+cdl_option CYGBLD_ISO_STDLIB_STRCONV_HEADER {
+    inferred_value 1 <cyg/libc/stdlib/atox.inl>
+};
+
+cdl_option CYGBLD_ISO_STDLIB_ABS_HEADER {
+    inferred_value 1 <cyg/libc/stdlib/abs.inl>
+};
+
+cdl_option CYGBLD_ISO_STDLIB_DIV_HEADER {
+    inferred_value 1 <cyg/libc/stdlib/div.inl>
+};
+
+cdl_option CYGBLD_ISO_STRERROR_HEADER {
+    inferred_value 1 <cyg/error/strerror.h>
+};
+
+cdl_option CYGBLD_ISO_STRTOK_R_HEADER {
+    inferred_value 1 <cyg/libc/string/string.h>
+};
+
+cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER {
+    inferred_value 1 <cyg/libc/string/string.h>
+};
+
+cdl_option CYGBLD_ISO_STRING_BSD_FUNCS_HEADER {
+    inferred_value 1 <cyg/libc/string/bsdstring.h>
+};
+
+cdl_option CYGBLD_ISO_STRING_MEMFUNCS_HEADER {
+    inferred_value 1 <cyg/libc/string/string.h>
+};
+
+cdl_option CYGBLD_ISO_STRING_STRFUNCS_HEADER {
+    inferred_value 1 <cyg/libc/string/string.h>
+};
+
+cdl_option CYGBLD_ISO_POSIX_TIMER_TYPES_HEADER {
+    inferred_value 1 <cyg/posix/time.h>
+};
+
+cdl_option CYGBLD_ISO_POSIX_CLOCK_TYPES_HEADER {
+    inferred_value 1 <cyg/posix/time.h>
+};
+
+cdl_option CYGBLD_ISO_C_TIME_TYPES_HEADER {
+    inferred_value 1 <cyg/libc/time/time.h>
+};
+
+cdl_option CYGBLD_ISO_POSIX_TIMERS_HEADER {
+    inferred_value 1 <cyg/posix/time.h>
+};
+
+cdl_option CYGBLD_ISO_POSIX_CLOCKS_HEADER {
+    inferred_value 1 <cyg/posix/time.h>
+};
+
+cdl_option CYGBLD_ISO_C_CLOCK_FUNCS_HEADER {
+    inferred_value 1 <cyg/libc/time/time.h>
+};
+
+cdl_option CYGBLD_ISO_SIGNAL_NUMBERS_HEADER {
+    inferred_value 1 <cyg/posix/signal.h>
+};
+
+cdl_option CYGBLD_ISO_SIGNAL_IMPL_HEADER {
+    inferred_value 1 <cyg/posix/signal.h>
+};
+
+cdl_option CYGBLD_ISO_SETJMP_HEADER {
+    inferred_value 1 <cyg/libc/setjmp/setjmp.h>
+};
+
+cdl_option CYGBLD_ISO_SIGSETJMP_HEADER {
+    inferred_value 1 <cyg/posix/sigsetjmp.h>
+};
+
+cdl_option CYGBLD_ISO_DIRENT_HEADER {
+    inferred_value 1 <cyg/fileio/dirent.h>
+};
+
+cdl_option CYGBLD_ISO_PTHREADTYPES_HEADER {
+    inferred_value 1 <cyg/posix/types.h>
+};
+
+cdl_option CYGBLD_ISO_PMUTEXTYPES_HEADER {
+    inferred_value 1 <cyg/posix/muttypes.h>
+};
+
+cdl_option CYGBLD_ISO_BSDTYPES_HEADER {
+    inferred_value 1 <sys/bsdtypes.h>
+};
+
+cdl_option CYGBLD_ISO_UTSNAME_HEADER {
+    inferred_value 1 <cyg/posix/utsname.h>
+};
+
+cdl_option CYGBLD_ISO_SEMAPHORES_HEADER {
+    inferred_value 1 <cyg/posix/semaphore.h>
+};
+
+cdl_option CYGBLD_ISO_PTHREAD_IMPL_HEADER {
+    inferred_value 1 <cyg/posix/pthread.h>
+};
+
+cdl_option CYGBLD_ISO_PTHREAD_MUTEX_HEADER {
+    inferred_value 1 <cyg/posix/mutex.h>
+};
+
+cdl_option CYGBLD_ISO_POSIX_LIMITS_HEADER {
+    inferred_value 1 <cyg/posix/limits.h>
+};
+
+cdl_option CYGBLD_ISO_OPEN_MAX_HEADER {
+    inferred_value 1 <cyg/fileio/limits.h>
+};
+
+cdl_option CYGBLD_ISO_NAME_MAX_HEADER {
+    inferred_value 1 <cyg/fileio/limits.h>
+};
+
+cdl_option CYGBLD_ISO_DNS_HEADER {
+    inferred_value 1 <cyg/ns/dns/dns.h>
+};
+
+cdl_option CYGBLD_ISO_NETDB_PROTO_HEADER {
+    inferred_value 1 <net/netdb.h>
+};
+
+cdl_option CYGBLD_ISO_NETDB_SERV_HEADER {
+    inferred_value 1 <net/netdb.h>
+};
+
+cdl_option CYGIMP_KERNEL_SCHED_SORTED_QUEUES {
+    inferred_value 1
+};
+
+cdl_option CYGSEM_KERNEL_SCHED_TIMESLICE_ENABLE {
+    inferred_value 1
+};
+
+cdl_component CYGSEM_KERNEL_SCHED_ASR_SUPPORT {
+    inferred_value 1
+};
+
+cdl_option CYGSEM_KERNEL_SCHED_ASR_GLOBAL {
+    inferred_value 1
+};
+
+cdl_component CYGPKG_KERNEL_THREADS_DESTRUCTORS {
+    inferred_value 1
+};
+
+
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/misc/redboot_ROMRAM.ecm ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/misc/redboot_ROMRAM.ecm
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/misc/redboot_ROMRAM.ecm	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/misc/redboot_ROMRAM.ecm	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,101 @@
+cdl_savefile_version 1;
+cdl_savefile_command cdl_savefile_version {};
+cdl_savefile_command cdl_savefile_command {};
+cdl_savefile_command cdl_configuration { description hardware template package };
+cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value };
+cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value };
+
+cdl_configuration eCos {
+    description "" ;
+    hardware    virtex4 ;
+    template    redboot ;
+    package -hardware CYGPKG_HAL_POWERPC current ;
+    package -hardware CYGPKG_HAL_POWERPC_PPC40x current ;
+    package -hardware CYGPKG_HAL_POWERPC_VIRTEX4 current ;
+    package -hardware CYGPKG_IO_SERIAL_GENERIC_16X5X current ;
+    package -hardware CYGPKG_IO_SERIAL_POWERPC_VIRTEX4 current ;
+    package -hardware CYGPKG_DEVS_KBD_VIRTEX4 current ;
+    package -hardware CYGPKG_DEVS_MOUSE_VIRTEX4 current ;
+    package -hardware CYGPKG_IO_I2C current ;
+    package -template CYGPKG_HAL current ;
+    package -template CYGPKG_INFRA current ;
+    package -template CYGPKG_REDBOOT current ;
+    package -template CYGPKG_ISOINFRA current ;
+    package -template CYGPKG_LIBC_STRING current ;
+    package -template CYGPKG_CRC current ;
+    package CYGPKG_DEVS_ETH_PHY current ;
+    package CYGPKG_IO_ETH_DRIVERS current ;
+    package CYGPKG_DEVS_ETH_POWERPC_VIRTEX4 current ;
+};
+
+cdl_option CYGFUN_LIBC_STRING_BSD_FUNCS {
+    inferred_value 0
+};
+
+cdl_option CYGHWR_DEVS_ETH_PHY_VIRTEX4 {
+    inferred_value 1
+};
+
+cdl_option CYGIMP_HAL_COMMON_INTERRUPTS_USE_INTERRUPT_STACK {
+    inferred_value 0
+};
+
+cdl_option CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE {
+    user_value 4096
+};
+
+cdl_option CYGDBG_HAL_COMMON_INTERRUPTS_SAVE_MINIMUM_CONTEXT {
+    user_value 0
+};
+
+cdl_option CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM {
+    inferred_value 0
+};
+
+cdl_option CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS {
+    inferred_value 1
+};
+
+cdl_option CYGSEM_HAL_ROM_MONITOR {
+    inferred_value 1
+};
+
+cdl_option CYGSEM_HAL_POWERPC_RESET_USES_JUMP {
+    inferred_value 1
+};
+
+cdl_option CYGHWR_HAL_POWERPC_ENABLE_MMU {
+    inferred_value 0
+};
+
+cdl_component CYGHWR_HAL_POWERPC_PPC4XX {
+    inferred_value 405
+};
+
+cdl_component CYGBLD_BUILD_REDBOOT {
+    user_value 1
+};
+
+cdl_option CYGBLD_ISO_STRTOK_R_HEADER {
+    inferred_value 1 <cyg/libc/string/string.h>
+};
+
+cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER {
+    inferred_value 1 <cyg/libc/string/string.h>
+};
+
+cdl_option CYGBLD_ISO_STRING_BSD_FUNCS_HEADER {
+    inferred_value 1 <cyg/libc/string/bsdstring.h>
+};
+
+cdl_option CYGBLD_ISO_STRING_MEMFUNCS_HEADER {
+    inferred_value 1 <cyg/libc/string/string.h>
+};
+
+cdl_option CYGBLD_ISO_STRING_STRFUNCS_HEADER {
+    inferred_value 1 <cyg/libc/string/string.h>
+};
+
+
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/banner.xpm ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/banner.xpm
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/banner.xpm	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/banner.xpm	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,96 @@
+/* XPM */
+static char * banner_xpm[] = {
+"640 64 29 1",
+" 	c None",
+".	c #C2C2C2",
+"+	c #C6C6C6",
+"@	c #C3C3C3",
+"#	c #E21A2A",
+"$	c #99CC66",
+"%	c #99CC99",
+"&	c #CCCC99",
+"*	c #C5C5C5",
+"=	c #66CC33",
+"-	c #99CC33",
+";	c #66CC66",
+">	c #999933",
+",	c #669933",
+"'	c #669966",
+")	c #999966",
+"!	c #6699CC",
+"~	c #336699",
+"{	c #6666CC",
+"]	c #666699",
+"^	c #3333CC",
+"/	c #9999CC",
+"(	c #333399",
+"_	c #3366CC",
+":	c #663399",
+"<	c #669999",
+"[	c #6633CC",
+"}	c #9966CC",
+"|	c #020202",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................@",
+".....................................................................................................................................................................................................................................................................................................#########..................................................................................................................................................................................................................................................................................................................................................",
+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#############++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++$%%&%+*+",
+"..................................................................................................................................................................................................................................................................................................###############.............................................................................................................................................................................................................................................................................................................................&&$==----$;$$$....",
+"................................................................................................................................................................................................................................................................................................#################.......................................................................................................................................................................................................................................................................................................................%$==;;;=---===$$.......@",
+"...............................................................................................................................................................................................................................................................................................########....#######................................................................................................................................................................................................................................................................................................................%$$===-=--$$$--=-.............",
+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++######++++++++#####++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++&$=---;;;->==;;;;;;$++++++++++++*+*+",
+"..............................................................................................................................................................................................................................................................................................######.........#####....................................................................................................................................................................................................................................................................................................$$---;=---,=;$$;==-;===&..................",
+"................................................................................................................................................................................................................................................................................#####........######..........#####.........######.............######............................................................................................................................................................................................................................................................%---$$--->$$>;=--$;;'$$=;$$....................@",
+"..............................................................................................................................................................................................................................................................................#########.....######...........#####.......##########.........##########......................................................................................................................................................................................................................................................$=--====;';==;;'=$>-=;;$-$..........................",
+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#############++++######++++++++++++++++++++++############+++++++############+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++$-=====----$$$$--$$$>;=>$$++++++++++++++++++++++++*+*+*+",
+"...........................................................................................................................................................................................................................................................................#######.#####...######.....................###############.....#####..#######...........................................................................................................................................................................................................................................&$-==;=$--------->-$--)$$-$..................................",
+"..........................................................................................................................................................................................................................................................................######....#####..######....................#######...#######...#####.....#####....................................................................................................................................................................................................................................$=====;;;,-->-;;;===========$$.....................................@",
+".........................................................................................................................................................................................................................................................................######......####..#####....................#######.....######...#####......####................................................................................................................................................................................................................................$==;=-----$$)-$------->$---$&.......................!~~.................",
+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#####+++++++####+######++++++++++++++++++++######++++++######++#######++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++{~~~]=====;;;';;=;;==,===;$++++++++++++++++++++++++++~~~~^+++++++++*+*+*+*+",
+"........................................................................................................................................................................................................................................................................#################.######....................#####.......######...#########................................................................................................................................................................................................................................../~(~~~'======,;;'==,=;$..............................._~~~_.................",
+"........................................................................................................................................................................................................................................................................#################.######...................######.......######...###########................................................................................................................................................................................................................................]~](_~]=========;$$...................................~~_:_................@",
+"........................................................................................................................................................................................................................................................................#################.######............#####..#####........######.....##########...............................................................................................................................................................................................................................]~~~~~<$>---$%........................................_~~~~.................",
+"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#####+++++++++++++######+++++++++++######++#####++++++++#####++++++++#########+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++](~_:=,$&++++++++++++++++++++++++++++++++++++++++++++_(~]~+++++++++*+*+*+*+",
+"........................................................................................................................................................................................................................................................................#####..............######..........#####...#####.......#####............#######...............................................................................................................................................................................................................................~~_&................................................~~^__.................",
+"........................................................................................................................................................................................................................................................................#####..............######.........######...#####.......#####.............######...................................................................................................................................................................................................................................................................................~~~{~................@",
+"........................................................................................................................................................................................................................................................................######......####...#######......#######....######.....######..######......#####..................................................................................................................................................................................................................................................................................._~~~~.................",
+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++######++++#####++++#######+++#########++++#######+++######+++######+++++#####+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/{{{/+++++++++{{{{+++++++++++++++++++++++++++++++++++{{{!+++++++++++++++++++++!{{{/++~~~{^+++++++++*+*+*+*+",
+".........................................................................................................................................................................................................................................................................##############.....##################......##############.....#######..######.......................................................................................................................................................................................~_~~.._~~~~___~{...{~__~~___/........_~{~]~]~......._~~_..{~___~~~~~...............{~~_~~___~^_~~~.................",
+"..........................................................................................................................................................................................................................................................................############.......################.......#############......##############........................................................................................................................................................................................~_(~{~~~(_]___(~~.__(~~({_(__{.......~~(~~^_~.......~~:~/~~~](~]_^__~.............~~~~~({~~^]~~~]~................@",
+"...........................................................................................................................................................................................................................................................................##########.........############...........###########........############.........................................................................................................................................................................................~_~]___]_~~_______~_~~~~~~~](~!......___~~__~.......__~~________~_^{~~........../~__{~(~_~(~^_____.................",
+"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#####+++++++++++++#######+++++++++++++++++######++++++++++++########+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++~_~~__~~_~:_~__~{_~]~____{___(~++++++~~~~]_^~+++++++~~]~_(__]{{_~~~(~_~+++++++++~(_{_(~~_]~({~_^_]+++++++++*+*+*+*+",
+".............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................~(~~~(~..../~(~~~~~~.....____~~......../~~^_~.......~~(~~~~...../~~]~^~........~(~___~......~]~~~_.................",
+".............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................^_~__{....../~~](~~.......~_^~~]........~]__~.......~~____........~~~_({......{_]__{_........__~~_................@",
+"............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................._^]~~........~~(~(/.......]~~{_~........~~_^~.......^~~(~.........~]~_~_......~~~___.........__(~~.................",
+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++~~~~~++++++++~[_^_/+++++++!~~_{~++++++++____~+++++++]^_~~+++++++++{_{(~~++++++~~]__}+++++++++~~~~_+++++++++*+*+*+*+",
+".............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................({_~~........_~(~~/.......!~~__~........____~.......~_{~~........./~~___.....{^_~]~..........~^{~~.................",
+".............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................~~~~_........~]~~~/.......!_~_{~........(~~(~.......]__]~........./~~_^_.....{____(..........~__~(................@",
+".............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................~~~~~........_~~~_/.......{~~^_~........__~~~.......~_^~~........./~~~~~.....~^__{~..........~_{~_.................",
+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++~]~(~++++++++~]~~_/+++++++{_^_{~++++++++~_]~~+++++++]~~(~+++++++++/~~_~~+++++~_^__~++++++++++~__~~+++++++++*+*+*+*+",
+".........................................||.......................||........||..................||......................................|||..||.......................................||.........||....................................................................||....................................................................................................................................................................................................................................................................~~~~~........_~~~(/.......!__^_~........~^~~~.......~~{~~........./(~_(_.....~^_~{~..........~_[~~.................",
+".........................................||.......................||........||..................||......................................||...||.......................................||.........||...............................................................||...||..........................................................||........................................................................................................................................................................................................~~__~........~]~~{/.......!^_{_~........~~]~~.......]~_~~........./~~_~~.....~__~~~..........~__~~................@",
+".........................................||.......................||........||..................||......................................||............................................||.........||...............................................................||...............................................................||........................................................................................................................................................................................................~~__~........____~/.......{_^~_~........__~~~.......~~[~~........./~~_~_.....]~~__~..........~_^~~.................",
+"++++++++++++++++++|||++++||++||++|||+++++||+|||++++++|||++++++|||+||++++|||+||+++++|||++++++|||+||+++++++++||||+++++|||||++++||+||||++|||||++||++++|||+||+++||++++||++||++|+++|||||+++||+||||++++||++++||||++++++++++||||+++++||+|||++++++|||++++||++|+++|||||+++||||++||+++||+|||+++++||||+||+++++++++||||+++|||+++||++++||||++++||||+++||||++++||+|||++|||+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++~~__~++++++++~:~~]/+++++++{~_~~~++++++++~~:~~+++++++~~_(~+++++++++/~~^~~+++++!^~~~_/+++++++++~{_~~+++++++++*+*+*+*+",
+"................|||||||..||||||||||||....|||||||...|||||||...|||||||...|||||||...|||||||...|||||||........||||||...|||||||...|||||||...||||..||...|||||||...||....||..|||||..|||||||..||||||||...||...||||||........|||||||...|||||||...|||||||..|||||..|||||||..||||..||...|||||||...||||||||.......|||||||..|||...||...|||||||..||||..|||||||..||||||||||||................................................................................................................................................................................]~__~........~~~_^/.......!(_~~~........~~~]~......._~^~~........./~]_]_......_~~~_~.........~^_~~.................",
+"................||...||..|||..|||..|||...|||..|||..||...||..|||..|||...||..|||...||...||..|||..|||.......|||..|||..||...|||..|||..|||...||...||...||..|||...||....||..|||||..||...||..|||...||...||..|||..|||......|||...||...|||..|||..||...||..|||||..||...||...||...||...|||..||...||...|||.......||...|||..||..|||..||...|||...||...||..|||..|||..|||..||................................................................................................................................................................................~~^{~........~{___/.......!]_~~~........_~](~.......~~~~~........./(~~(~......~(~]^~~........~{_~:................@",
+"................||...|||.|||..|||...||...||....||..||...|||.||....||..||....||...||...|||.||....||.......||...||..|||....||..||....||...||...||..|||...||...||....||..|||........|||..|||...|||..||..||...|||......||....|||..||....||..||...|||.|||........|||...||...||...||...||...||...|||.......|||.......||..||...|||........||..|||..|||..||...||...||................................................................................................................................................................................](__~........~~(~~/.......{~_~^~........^~~~~.......___(~........./~_~{_....../~~~_~~~{....{~~__~~.................",
+"++++++++++++++++||||||||+||+++|||+++||+++||++++||++||||||||+||++++||++||++++||+++||||||||+||++++||+++++++||+++++++||+++++||++||++++||+++||+++||++||++++||+++||++++||++|||+++++||||||++||+++++||++||++||||||||++++++||+++++||++||++++||++||||||||+|||+++++||||||+++||+++||+++||+++||+++||++++||++++++++|||||++++|||+||++++||||||++++||++||||||||++||+++||+++||++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++~~__~++++++++~]~(~/+++++++{~_~~~++++++++~~]~~+++++++~]~~~+++++++++/~~~~~+++++++__~_(~~_~_~_~~~{_~~+++++++++*****+*+",
+"................||.......||...|||...||...||....||..||.......||....||..||....||...||.......||....||.......||.......||.....||..||....||...||...||..||....||...||....||..||.....||...||..||....|||..||..||............||....|||..||....||..||.......||.....||...||...||...||...||...||...||...|||..........|||||...|||||......|||||...||..|||.......||...||...||................................................................................................................................................................................~~_^~........~~~_~/.......!~~^__........__~(~.......~~~~~........./:__[_........~~^~~~]~(~(]~~__~~.................",
+"................||...||..||...|||...||...||...|||..||...||..||...|||..|||...||...||...||..||...|||.......||...|||.|||...|||..||....||...||...||..|||...||...||...|||..||.....||...||..|||...||...||..||...||.......|||...||...||...|||..||...||..||.....||...||...||...||...||...||...||...|||.......||...|||...||||....||....||...||..|||...||..||...||...||................................................................................................................................................................................~~^_~........~_~_~/.......!(]~~~........~~]~~.......~~^_~........./_~~~~.........]_~]~~~~(___~{_~]................@",
+"................|||||||..||...|||...||...|||||||...|||||||...|||||||...|||||||...|||||||...|||||||........||||||...|||||||...||....||...||...||...|||||||...||||||||..||.....|||||||..||||||||...||...||||||........|||||||...|||||||...|||||||..||.....|||||||...|||..||...||...||...||||||||.......|||..|||...||||....|||..|||...|||..|||||||..||...||...||................................................................................................................................................................................~~_^~........_~~~_/.......{~___~......./~~~~~.......~~_~~........./]~~]_...........{__{~(~~{.~__~~.................",
+"+++++++++++++++++|||||+++||+++|||+++||+++||||||+++++|||||++++||||+||++++|||+||++++|||||++++||||+||++++++++|||||+++++|||||++++||++++||+++||+++||++++||||||++++|||||||++||+++++|||||||++|||||||++++||+++|||||+++++++++||||||++++||||||+++++|||||+++||+++++|||||||+++|||++||+++||+++||++++|||||||++++++++||||||+++++|||+++++||||||++++|||+++||||++++||+++||+++||+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/+++++++++++++++++++*******+",
+".......................................................................................................................................................||.....................................................................||............................................................||...................||.............................................................................................................................................................................................................................................................................................................................................",
+".................................................................................................................................................|||...||.....................................................................||......................................................||...|||..................|||............................................................................................................................................................................................................................................................................................................................................@",
+"..................................................................................................................................................|||||||.....................................................................||......................................................|||||||..................|||.......................................................................................................................................................................................................................................$............................%........................&................................................",
+"+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=++++++++++++$++++$++++++++++$++++++$++++++++++++++++%$+++++++++++++++++++++++++++++$++++++++++*******+",
+".............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................$=$..$=$$=%.-$;...$=...$==..$=;..$=$..%=;$....$==..$=$.$..&..$=%.%$..=;..;$=..$$=$$;...=$..$$=..=;%................",
+"............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................$..$..$.=..;.=..=.;..=.$..$.$&.$.$&.$%.$..$...%$.$.&%.%$.$.;.$..$.%$.=..=.-..;.$..=..$.=..=.=..=.$.................@",
+"............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................=$$-&.$.=..=.-..=.=$-$.=..;.;..$.-$;;%%%..$...=..$.$$$-$.;.$.=;;=.%$.;..=.=..=.;..=..$&=-$$.=..=.$..................",
+"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++;+++++$+=++=+=++=+=++++$++=+$%+$+$%++++$++$+++$$+$+%%+++++,++;++++&$+=++=+=++;+;++=++$+$++++=++=+$&+++++++++*+*+*+*+",
+".............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................;=$..$.;..=.===...;=%..$=$..$=$..$=;..$=$$....$==..$=;...$...-=$..=..$=..===..;..=..$.%==..;..=..==................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................=........................................@",
+"......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................$.........................................",
+"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*+*+*+*+",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................@"};
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/char_lcd_support.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/char_lcd_support.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/char_lcd_support.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/char_lcd_support.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,308 @@
+//=============================================================================
+//
+//      char_lcd_support.c
+//
+//      VIRTEX4 2x16 char lcd support routines
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Limited
+// Copyright (C) 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//####DESCRIPTIONBEGIN####
+//
+// Author(s):   Carlos Duclos 
+// Date:        2005-05-23
+//####DESCRIPTIONEND####
+//=============================================================================
+
+// Never used in Redboot
+#ifndef CYGPKG_REDBOOT
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_mem.h>            // HAL memory definitions
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <cyg/hal/ppc_regs.h>           // Platform registers
+#include <cyg/hal/hal_if.h>             // hal_if_init
+#include <cyg/hal/hal_intr.h>           // interrupt definitions
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+#include <cyg/hal/hal_io.h>             // I/O macros
+#include <cyg/infra/diag.h>
+#include <cyg/hal/char_lcd_support.h>
+
+
+#include "xbasic_types.h"
+#include "xgpio.h"
+#include "xgpio_l.h"
+#include "xparameters.h"
+#include <xparameters_translation.h>
+
+static XGpio char_lcd_device;
+static cyg_uint8 current_row = 0;
+static cyg_uint8 current_column = 0;
+static int char_lcd_lock_until_free();
+
+#define CHAR_LCD_ADDRESS    0x90002000
+#define COLUMN_NUMBER       16
+#define ROW_NUMBER          2
+
+/*
+ * Time definitions
+ */
+ 
+#define FIRST_INIT          4100        /* first init sequence:  4.1 msec */
+#define SECOND_INIT         100        /* second init sequence: 100 usec */
+#define EXEC_TIME           80          /* normal execution time */
+
+enum LCD_BITS { LCD_ENABLE = 0x40, LCD_RS = 0x20, LCD_RW = 0x10 };
+
+/*
+ * Graphic's memory routines
+ */
+
+static int position2address( cyg_uint8 * address )
+{
+    cyg_uint8 temporal_address = 0x00;
+    
+    temporal_address = (current_row * 0x40) + current_column;
+    *address = temporal_address;
+    
+    return 0;
+}
+
+/*
+ * Helper function
+ * (Resolution: 30 ns)
+ * Use it as lcd_delay( XX ) with XX number of us to wait
+ */
+ 
+static void lcd_delay( unsigned int delay )
+{
+    CYGACC_CALL_IF_DELAY_US(delay);
+}
+
+/*
+ * If the row is greater than ROW_NUMBER, it will be converted using modulo-ROW_NUMBER
+ */
+
+static int row_increase()
+{
+    current_row++;
+    current_row = current_row % ROW_NUMBER;
+
+    return 0;
+}
+
+/*
+ * If the column is greater than COLUMN_NUMBER, it will be converted using modulo-COLUMN_NUMBER
+ */
+
+static int column_increase()
+{
+    current_column++;
+    if( current_column == COLUMN_NUMBER )
+        row_increase();
+    current_column = current_column % COLUMN_NUMBER;
+
+    return 0;
+}
+
+/*
+ * Low Level routines: R/W
+ */
+ 
+static int write_nibble( cyg_uint8 nibble )
+{
+    volatile cyg_uint32 * lcd_register = (volatile cyg_uint32 *)CHAR_LCD_ADDRESS;
+    volatile cyg_uint32 temporal;
+    
+    *lcd_register = nibble;
+    lcd_delay( 50 );
+    *lcd_register = nibble | LCD_ENABLE;
+    lcd_delay( 50 );
+    *lcd_register = nibble;
+    lcd_delay( 50 );
+    
+    return 0;
+} 
+
+static int write_byte( cyg_uint8 buffer )
+{
+    write_nibble( ((buffer>>4)&0x0F)|LCD_RS );
+    write_nibble( (buffer&0x0F)|LCD_RS );
+
+    return 0;
+}
+
+static int write_command( cyg_uint8 buffer )
+{
+    write_nibble( (buffer>>4)&0x0F );
+    write_nibble( buffer&0x0F );
+
+    return 0;
+}
+
+static int display_configure()
+{
+    int i;
+    for (i = 0; i < 2; i++) {
+        write_nibble( 0x00 ); 
+        lcd_delay( FIRST_INIT );
+        write_nibble( 0x03 );
+        lcd_delay( FIRST_INIT );
+        write_nibble( 0x03 );
+        lcd_delay( SECOND_INIT );
+        write_nibble( 0x03 );
+        lcd_delay( FIRST_INIT );
+        write_nibble( 0x02 );
+        lcd_delay( SECOND_INIT );
+        write_command( 0x28 );    
+        lcd_delay( EXEC_TIME );
+    }
+
+    return 0;
+}
+
+/*
+ * Simple abstraction to simplify the exported interface
+ */
+ 
+static int sw_init()
+{
+    XStatus status = 0;
+
+    status = XGpio_Initialize( &char_lcd_device, XPAR_GPIO_CHAR_LCD_0_DEVICE_ID );
+    if( status != XST_SUCCESS )
+        return -1;
+
+    return 0;
+}
+
+static int hw_init()
+{
+    XGpio_SetDataDirection( &char_lcd_device, 1, 0xFFFFFF80 );
+    display_configure();
+    
+    return 0;
+}
+
+ 
+/*
+ * Useful functions
+ */
+ 
+static int char_lcd_is_busy()
+{
+    return 0;
+}
+
+static int char_lcd_lock_until_free()
+{
+    int busy = 0;
+    
+    while( 1 )
+    {
+        busy = char_lcd_is_busy();
+        if( !busy )
+            break;
+    }
+    return 0;
+}
+
+/*
+ * Exported interface
+ */
+ 
+void init_char_lcd()
+{
+    int result = 0;
+
+    result = sw_init();
+    if( result < 0 )
+    {
+        diag_printf( "Could not initialze sw char lcd\n" );
+        return;
+    }
+    result = hw_init();
+    if( result < 0 )
+    {
+        diag_printf( "Could not initialze hw char lcd\n" );
+        return;
+    }
+
+    return;
+}
+
+int write_char_lcd( unsigned char * buffer, unsigned int length )
+{
+    volatile cyg_uint8 data = 0;
+    int i = 0, result = 0;
+    
+    if( buffer == NULL )
+        return -1;
+
+    for( i = 0; i < length; i++ )
+    {
+        data = buffer[ i ];
+        result = write_byte( data );
+        if( result < 0 )
+            return -1;
+        else
+            column_increase();
+    }
+        
+    return 0;
+}
+
+int get_current_position( unsigned char * row, unsigned char * column )
+{
+    if( row == NULL )
+        return -1;
+    if( column == NULL )
+        return -1;
+    
+    *row = current_row;
+    *column = current_column;
+
+    return 0;
+}
+
+int get_current_memory_position( unsigned char * address )
+{
+    if( address == NULL )
+        return -1;
+    position2address( address );
+    
+    return 0;
+}
+
+#endif // CYGPKG_REDBOOT
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/font.h ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/font.h
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/font.h	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/font.h	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,433 @@
+//==========================================================================
+//
+//        font.h
+//
+//        LCD/VGA display fonts
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):     gthomas
+// Contributors:  gthomas
+// Date:          2001-02-25
+// Description:   Simple LCD/VGA fonts
+//####DESCRIPTIONEND####
+
+#ifndef _LCD_FONT_H_
+#define _LCD_FONT_H_
+
+#if (CYGNUM_VIRTEX4_LCD_COMM_FONT_SIZE == 8)
+// 8x8 Font - from Helios
+
+#define FIRST_CHAR 0x20
+#define LAST_CHAR  0x7F
+#define FONT_HEIGHT 8
+#define FONT_WIDTH  8
+#define CURSOR_ON  0x7F
+#define CURSOR_OFF 0x20
+#define FONT_SCALE  2
+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 }, /* ~ */
+        {        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }  /* Block cursor */
+};
+#else
+
+// 8x16 Font - from UniFLEX
+
+#define FIRST_CHAR 0x00
+#define LAST_CHAR  0xFF
+#define FONT_HEIGHT 16
+#define FONT_WIDTH  8
+#define FONT_LEFT_TO_RIGHT
+#define CURSOR_ON  0xB1
+#define CURSOR_OFF 0x20
+static char font_table[LAST_CHAR-FIRST_CHAR+1][FONT_HEIGHT] = {
+/* 0x00 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x01 */ {0x00,0x00,0x7E,0x81,0xA5,0x81,0x81,0xBD,0x99,0x81,0x81,0x7E,0x00,0x00,0x00,0x00},
+/* 0x02 */ {0x00,0x00,0x7E,0xFF,0xDB,0xFF,0xFF,0xC3,0xC3,0xE7,0xFF,0x7E,0x00,0x00,0x00,0x00},
+/* 0x03 */ {0x00,0x00,0x00,0x00,0x6C,0xFE,0xFE,0xFE,0xFE,0x7C,0x38,0x10,0x00,0x00,0x00,0x00},
+/* 0x04 */ {0x00,0x00,0x00,0x00,0x10,0x38,0x7C,0xFE,0x7C,0x38,0x10,0x00,0x00,0x00,0x00,0x00},
+/* 0x05 */ {0x00,0x00,0x00,0x18,0x3C,0x3C,0xE7,0xE7,0xE7,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x06 */ {0x00,0x00,0x00,0x18,0x3C,0x7E,0xFF,0xFF,0x7E,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x07 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x08 */ {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0xC3,0xC3,0xE7,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
+/* 0x09 */ {0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00,0x00,0x00,0x00,0x00},
+/* 0x0A */ {0xFF,0xFF,0xFF,0xFF,0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,0xFF,0xFF,0xFF,0xFF,0xFF},
+/* 0x0B */ {0x00,0x00,0x3E,0x0E,0x1A,0x32,0x78,0xCC,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00},
+/* 0x0C */ {0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3C,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x0D */ {0x00,0x00,0x30,0x38,0x3C,0x36,0x33,0x30,0x30,0x70,0xF0,0xE0,0x00,0x00,0x00,0x00},
+/* 0x0E */ {0x00,0x00,0x7F,0x63,0x7F,0x63,0x63,0x63,0x63,0x67,0xE7,0xE6,0xC0,0x00,0x00,0x00},
+/* 0x0F */ {0x00,0x00,0x00,0x18,0x18,0xDB,0x3C,0xE7,0x3C,0xDB,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x10 */ {0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xFE,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00},
+/* 0x11 */ {0x00,0x02,0x06,0x0E,0x1E,0x3E,0xFE,0x3E,0x1E,0x0E,0x06,0x02,0x00,0x00,0x00,0x00},
+/* 0x12 */ {0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,0x00},
+/* 0x13 */ {0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x66,0x00,0x00,0x00,0x00},
+/* 0x14 */ {0x00,0x00,0x7F,0xDB,0xDB,0xDB,0x7B,0x1B,0x1B,0x1B,0x1B,0x1B,0x00,0x00,0x00,0x00},
+/* 0x15 */ {0x00,0x7C,0xC6,0x60,0x38,0x6C,0xC6,0xC6,0x6C,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00},
+/* 0x16 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFE,0xFE,0xFE,0x00,0x00,0x00,0x00},
+/* 0x17 */ {0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x7E,0x3C,0x18,0x7E,0x00,0x00,0x00,0x00},
+/* 0x18 */ {0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x19 */ {0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00},
+/* 0x1A */ {0x00,0x00,0x00,0x00,0x00,0x18,0x0C,0xFE,0x0C,0x18,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x1B */ {0x00,0x00,0x00,0x00,0x00,0x30,0x60,0xFE,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x1C */ {0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xFE,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x1D */ {0x00,0x00,0x00,0x00,0x00,0x28,0x6C,0xFE,0x6C,0x28,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x1E */ {0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7C,0x7C,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00},
+/* 0x1F */ {0x00,0x00,0x00,0x00,0xFE,0xFE,0x7C,0x7C,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00},
+/* 0x20 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x21 */ {0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x22 */ {0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x23 */ {0x00,0x00,0x00,0x6C,0x6C,0xFE,0x6C,0x6C,0x6C,0xFE,0x6C,0x6C,0x00,0x00,0x00,0x00},
+/* 0x24 */ {0x18,0x18,0x7C,0xC6,0xC2,0xC0,0x7C,0x06,0x06,0x86,0xC6,0x7C,0x18,0x18,0x00,0x00},
+/* 0x25 */ {0x00,0x00,0x00,0x00,0xC2,0xC6,0x0C,0x18,0x30,0x60,0xC6,0x86,0x00,0x00,0x00,0x00},
+/* 0x26 */ {0x00,0x00,0x38,0x6C,0x6C,0x38,0x76,0xDC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x27 */ {0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x28 */ {0x00,0x00,0x0C,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00,0x00},
+/* 0x29 */ {0x00,0x00,0x30,0x18,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x18,0x30,0x00,0x00,0x00,0x00},
+/* 0x2A */ {0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x2B */ {0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x2C */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00},
+/* 0x2D */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x2E */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x2F */ {0x00,0x00,0x00,0x00,0x02,0x06,0x0C,0x18,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,0x00},
+/* 0x30 */ {0x00,0x00,0x38,0x6C,0xC6,0xC6,0xD6,0xD6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00},
+/* 0x31 */ {0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x00,0x00,0x00,0x00},
+/* 0x32 */ {0x00,0x00,0x7C,0xC6,0x06,0x0C,0x18,0x30,0x60,0xC0,0xC6,0xFE,0x00,0x00,0x00,0x00},
+/* 0x33 */ {0x00,0x00,0x7C,0xC6,0x06,0x06,0x3C,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x34 */ {0x00,0x00,0x0C,0x1C,0x3C,0x6C,0xCC,0xFE,0x0C,0x0C,0x0C,0x1E,0x00,0x00,0x00,0x00},
+/* 0x35 */ {0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xFC,0x06,0x06,0x06,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x36 */ {0x00,0x00,0x38,0x60,0xC0,0xC0,0xFC,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x37 */ {0x00,0x00,0xFE,0xC6,0x06,0x06,0x0C,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00},
+/* 0x38 */ {0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7C,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x39 */ {0x00,0x00,0x7C,0xC6,0xC6,0xC6,0x7E,0x06,0x06,0x06,0x0C,0x78,0x00,0x00,0x00,0x00},
+/* 0x3A */ {0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00},
+/* 0x3B */ {0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00},
+/* 0x3C */ {0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00},
+/* 0x3D */ {0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x3E */ {0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00},
+/* 0x3F */ {0x00,0x00,0x7C,0xC6,0xC6,0x0C,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x40 */ {0x00,0x00,0x00,0x7C,0xC6,0xC6,0xDE,0xDE,0xDE,0xDC,0xC0,0x7C,0x00,0x00,0x00,0x00},
+/* 0x41 */ {0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0x42 */ {0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0xFC,0x00,0x00,0x00,0x00},
+/* 0x43 */ {0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x00,0x00,0x00,0x00},
+/* 0x44 */ {0x00,0x00,0xF8,0x6C,0x66,0x66,0x66,0x66,0x66,0x66,0x6C,0xF8,0x00,0x00,0x00,0x00},
+/* 0x45 */ {0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00},
+/* 0x46 */ {0x00,0x00,0xFE,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00},
+/* 0x47 */ {0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xDE,0xC6,0xC6,0x66,0x3A,0x00,0x00,0x00,0x00},
+/* 0x48 */ {0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0x49 */ {0x00,0x00,0x3C,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x4A */ {0x00,0x00,0x1E,0x0C,0x0C,0x0C,0x0C,0x0C,0xCC,0xCC,0xCC,0x78,0x00,0x00,0x00,0x00},
+/* 0x4B */ {0x00,0x00,0xE6,0x66,0x66,0x6C,0x78,0x78,0x6C,0x66,0x66,0xE6,0x00,0x00,0x00,0x00},
+/* 0x4C */ {0x00,0x00,0xF0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xFE,0x00,0x00,0x00,0x00},
+/* 0x4D */ {0x00,0x00,0xC6,0xEE,0xFE,0xFE,0xD6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0x4E */ {0x00,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0x4F */ {0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x50 */ {0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00},
+/* 0x51 */ {0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xD6,0xDE,0x7C,0x0C,0x0E,0x00,0x00},
+/* 0x52 */ {0x00,0x00,0xFC,0x66,0x66,0x66,0x7C,0x6C,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00},
+/* 0x53 */ {0x00,0x00,0x7C,0xC6,0xC6,0x60,0x38,0x0C,0x06,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x54 */ {0x00,0x00,0x7E,0x7E,0x5A,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x55 */ {0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x56 */ {0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x6C,0x38,0x10,0x00,0x00,0x00,0x00},
+/* 0x57 */ {0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xD6,0xD6,0xD6,0xFE,0xEE,0x6C,0x00,0x00,0x00,0x00},
+/* 0x58 */ {0x00,0x00,0xC6,0xC6,0x6C,0x7C,0x38,0x38,0x7C,0x6C,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0x59 */ {0x00,0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x5A */ {0x00,0x00,0xFE,0xC6,0x86,0x0C,0x18,0x30,0x60,0xC2,0xC6,0xFE,0x00,0x00,0x00,0x00},
+/* 0x5B */ {0x00,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00,0x00,0x00,0x00},
+/* 0x5C */ {0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x06,0x02,0x00,0x00,0x00,0x00},
+/* 0x5D */ {0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00,0x00,0x00,0x00},
+/* 0x5E */ {0x10,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x5F */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00},
+/* 0x60 */ {0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x61 */ {0x00,0x00,0x00,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x62 */ {0x00,0x00,0xE0,0x60,0x60,0x78,0x6C,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00},
+/* 0x63 */ {0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC0,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x64 */ {0x00,0x00,0x1C,0x0C,0x0C,0x3C,0x6C,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x65 */ {0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xFE,0xC0,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x66 */ {0x00,0x00,0x38,0x6C,0x64,0x60,0xF0,0x60,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00},
+/* 0x67 */ {0x00,0x00,0x00,0x00,0x00,0x3E,0x66,0x66,0x66,0x66,0x66,0x3E,0x06,0x66,0x3C,0x00},
+/* 0x68 */ {0x00,0x00,0xE0,0x60,0x60,0x6C,0x76,0x66,0x66,0x66,0x66,0xE6,0x00,0x00,0x00,0x00},
+/* 0x69 */ {0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x6A */ {0x00,0x00,0x06,0x06,0x00,0x0E,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00},
+/* 0x6B */ {0x00,0x00,0xE0,0x60,0x60,0x66,0x6C,0x78,0x78,0x6C,0x66,0xE6,0x00,0x00,0x00,0x00},
+/* 0x6C */ {0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x6D */ {0x00,0x00,0x00,0x00,0x00,0x6C,0xFE,0xD6,0xD6,0xD6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0x6E */ {0x00,0x00,0x00,0x00,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00},
+/* 0x6F */ {0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x70 */ {0x00,0x00,0x00,0x00,0x00,0xFC,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0x60,0xF0,0x00},
+/* 0x71 */ {0x00,0x00,0x00,0x00,0x00,0x7E,0xCC,0xCC,0xCC,0xCC,0xCC,0x7C,0x0C,0x0C,0x1E,0x00},
+/* 0x72 */ {0x00,0x00,0x00,0x00,0x00,0xDC,0x76,0x66,0x60,0x60,0x60,0xF0,0x00,0x00,0x00,0x00},
+/* 0x73 */ {0x00,0x00,0x00,0x00,0x00,0x7C,0xC6,0x60,0x38,0x0C,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x74 */ {0x00,0x00,0x10,0x30,0x30,0xFC,0x30,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,0x00},
+/* 0x75 */ {0x00,0x00,0x00,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x76 */ {0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00},
+/* 0x77 */ {0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xD6,0xD6,0xD6,0xFE,0x6C,0x00,0x00,0x00,0x00},
+/* 0x78 */ {0x00,0x00,0x00,0x00,0x00,0xC6,0x6C,0x38,0x38,0x38,0x6C,0xC6,0x00,0x00,0x00,0x00},
+/* 0x79 */ {0x00,0x00,0x00,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0xF8,0x00},
+/* 0x7A */ {0x00,0x00,0x00,0x00,0x00,0xFE,0xCC,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00},
+/* 0x7B */ {0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00},
+/* 0x7C */ {0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x7D */ {0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00},
+/* 0x7E */ {0x00,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0x7F */ {0x00,0x00,0x00,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xC6,0xFE,0x00,0x00,0x00,0x00,0x00},
+/* 0x80 */ {0x00,0x00,0x3C,0x66,0xC2,0xC0,0xC0,0xC0,0xC2,0x66,0x3C,0x0C,0x06,0x7C,0x00,0x00},
+/* 0x81 */ {0x00,0x00,0xCC,0x00,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x82 */ {0x00,0x0C,0x18,0x30,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x83 */ {0x00,0x10,0x38,0x6C,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x84 */ {0x00,0x00,0xCC,0x00,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x85 */ {0x00,0x60,0x30,0x18,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x86 */ {0x00,0x38,0x6C,0x38,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x87 */ {0x00,0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x66,0x3C,0x0C,0x06,0x3C,0x00,0x00,0x00},
+/* 0x88 */ {0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x89 */ {0x00,0x00,0xC6,0x00,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x8A */ {0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xC6,0xFE,0xC0,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x8B */ {0x00,0x00,0x66,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x8C */ {0x00,0x18,0x3C,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x8D */ {0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0x8E */ {0x00,0xC6,0x00,0x10,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0x8F */ {0x38,0x6C,0x38,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0x90 */ {0x18,0x30,0x60,0x00,0xFE,0x66,0x60,0x7C,0x60,0x60,0x66,0xFE,0x00,0x00,0x00,0x00},
+/* 0x91 */ {0x00,0x00,0x00,0x00,0x00,0xCC,0x76,0x36,0x7E,0xD8,0xD8,0x6E,0x00,0x00,0x00,0x00},
+/* 0x92 */ {0x00,0x00,0x3E,0x6C,0xCC,0xCC,0xFE,0xCC,0xCC,0xCC,0xCC,0xCE,0x00,0x00,0x00,0x00},
+/* 0x93 */ {0x00,0x10,0x38,0x6C,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x94 */ {0x00,0x00,0xC6,0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x95 */ {0x00,0x60,0x30,0x18,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x96 */ {0x00,0x30,0x78,0xCC,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x97 */ {0x00,0x60,0x30,0x18,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0x98 */ {0x00,0x00,0xC6,0x00,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7E,0x06,0x0C,0x78,0x00},
+/* 0x99 */ {0x00,0xC6,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x9A */ {0x00,0xC6,0x00,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0x9B */ {0x00,0x18,0x18,0x3C,0x66,0x60,0x60,0x60,0x66,0x3C,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x9C */ {0x00,0x38,0x6C,0x64,0x60,0xF8,0x60,0x60,0x60,0x60,0xE6,0xFC,0x00,0x00,0x00,0x00},
+/* 0x9D */ {0x00,0x00,0x66,0x66,0x3C,0x18,0x7E,0x18,0x7E,0x18,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0x9E */ {0x00,0xF8,0xCC,0xCC,0xF8,0xC4,0xCC,0xDE,0xCC,0xCC,0xCC,0xC6,0x00,0x00,0x00,0x00},
+/* 0x9F */ {0x00,0x0E,0x1B,0x18,0x18,0x18,0x7E,0x18,0x18,0x18,0x18,0x18,0xD8,0x70,0x00,0x00},
+/* 0xA0 */ {0x00,0x18,0x30,0x60,0x00,0x78,0x0C,0x7C,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0xA1 */ {0x00,0x0C,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00},
+/* 0xA2 */ {0x00,0x18,0x30,0x60,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0xA3 */ {0x00,0x18,0x30,0x60,0x00,0xCC,0xCC,0xCC,0xCC,0xCC,0xCC,0x76,0x00,0x00,0x00,0x00},
+/* 0xA4 */ {0x00,0x00,0x76,0xDC,0x00,0xDC,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00},
+/* 0xA5 */ {0x76,0xDC,0x00,0xC6,0xE6,0xF6,0xFE,0xDE,0xCE,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0xA6 */ {0x00,0x3C,0x6C,0x6C,0x3E,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xA7 */ {0x00,0x38,0x6C,0x6C,0x38,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xA8 */ {0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xC0,0xC6,0xC6,0x7C,0x00,0x00,0x00,0x00},
+/* 0xA9 */ {0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00},
+/* 0xAA */ {0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00},
+/* 0xAB */ {0x00,0xC0,0xC0,0xC2,0xC6,0xCC,0x18,0x30,0x60,0xDC,0x86,0x0C,0x18,0x3E,0x00,0x00},
+/* 0xAC */ {0x00,0xC0,0xC0,0xC2,0xC6,0xCC,0x18,0x30,0x66,0xCE,0x9E,0x3E,0x06,0x06,0x00,0x00},
+/* 0xAD */ {0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3C,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00},
+/* 0xAE */ {0x00,0x00,0x00,0x00,0x00,0x36,0x6C,0xD8,0x6C,0x36,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xAF */ {0x00,0x00,0x00,0x00,0x00,0xD8,0x6C,0x36,0x6C,0xD8,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xB0 */ {0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44},
+/* 0xB1 */ {0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA},
+/* 0xB2 */ {0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77},
+/* 0xB3 */ {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xB4 */ {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xB5 */ {0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xB6 */ {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xB7 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xB8 */ {0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xB9 */ {0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xBA */ {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xBB */ {0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xBC */ {0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xBD */ {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xBE */ {0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xBF */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xC0 */ {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xC1 */ {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xC2 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xC3 */ {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xC4 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xC5 */ {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xC6 */ {0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xC7 */ {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xC8 */ {0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xC9 */ {0x00,0x00,0x00,0x00,0x00,0x3F,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xCA */ {0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xCB */ {0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xCC */ {0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xCD */ {0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xCE */ {0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xCF */ {0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xD0 */ {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xD1 */ {0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xD2 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xD3 */ {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xD4 */ {0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xD5 */ {0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xD6 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xD7 */ {0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36},
+/* 0xD8 */ {0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xD9 */ {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xDA */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xDB */ {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
+/* 0xDC */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF},
+/* 0xDD */ {0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0},
+/* 0xDE */ {0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F},
+/* 0xDF */ {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xE0 */ {0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0xD8,0xD8,0xD8,0xDC,0x76,0x00,0x00,0x00,0x00},
+/* 0xE1 */ {0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xFC,0xC6,0xC6,0xC6,0xC6,0xDC,0xC0,0xC0,0x00,0x00},
+/* 0xE2 */ {0x00,0x00,0xFE,0xC6,0xC6,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00},
+/* 0xE3 */ {0x00,0x00,0x00,0x00,0x00,0xFE,0x6C,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00},
+/* 0xE4 */ {0x00,0x00,0xFE,0xC6,0x60,0x30,0x18,0x18,0x30,0x60,0xC6,0xFE,0x00,0x00,0x00,0x00},
+/* 0xE5 */ {0x00,0x00,0x00,0x00,0x00,0x7E,0xD8,0xD8,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00},
+/* 0xE6 */ {0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7C,0x60,0xC0,0x00,0x00,0x00},
+/* 0xE7 */ {0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00},
+/* 0xE8 */ {0x00,0x00,0x7E,0x18,0x3C,0x66,0x66,0x66,0x66,0x3C,0x18,0x7E,0x00,0x00,0x00,0x00},
+/* 0xE9 */ {0x00,0x00,0x38,0x6C,0xC6,0xC6,0xFE,0xC6,0xC6,0xC6,0x6C,0x38,0x00,0x00,0x00,0x00},
+/* 0xEA */ {0x00,0x00,0x38,0x6C,0xC6,0xC6,0xC6,0x6C,0x6C,0x6C,0x6C,0xEE,0x00,0x00,0x00,0x00},
+/* 0xEB */ {0x00,0x00,0x1E,0x30,0x18,0x0C,0x3E,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00},
+/* 0xEC */ {0x00,0x00,0x00,0x00,0x00,0x7E,0xDB,0xDB,0xDB,0x7E,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xED */ {0x00,0x00,0x00,0x03,0x06,0x7E,0xDB,0xDB,0xF3,0x7E,0x60,0xC0,0x00,0x00,0x00,0x00},
+/* 0xEE */ {0x00,0x00,0x1C,0x30,0x60,0x60,0x7C,0x60,0x60,0x60,0x30,0x1C,0x00,0x00,0x00,0x00},
+/* 0xEF */ {0x00,0x00,0x7C,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0xC6,0x00,0x00,0x00,0x00},
+/* 0xF0 */ {0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00},
+/* 0xF1 */ {0x00,0x00,0x00,0x00,0x18,0x18,0x7E,0x18,0x18,0x00,0x00,0xFF,0x00,0x00,0x00,0x00},
+/* 0xF2 */ {0x00,0x00,0x00,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00,0x7E,0x00,0x00,0x00,0x00},
+/* 0xF3 */ {0x00,0x00,0x00,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00,0x7E,0x00,0x00,0x00,0x00},
+/* 0xF4 */ {0x00,0x0E,0x1B,0x1B,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18},
+/* 0xF5 */ {0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xD8,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00},
+/* 0xF6 */ {0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x7E,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00},
+/* 0xF7 */ {0x00,0x00,0x00,0x00,0x00,0x76,0xDC,0x00,0x76,0xDC,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xF8 */ {0x00,0x38,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xF9 */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xFA */ {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xFB */ {0x00,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0xEC,0x6C,0x6C,0x3C,0x1C,0x00,0x00,0x00,0x00},
+/* 0xFC */ {0x00,0xD8,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xFD */ {0x00,0x70,0xD8,0x30,0x60,0xC8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+/* 0xFE */ {0x00,0x00,0x00,0x00,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x7C,0x00,0x00,0x00,0x00,0x00},
+/* 0xFF */ {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00}
+};
+#endif
+
+#endif // _LCD_FONT_H_
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/gpio_basic.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/gpio_basic.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/gpio_basic.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/gpio_basic.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,183 @@
+//=============================================================================
+//
+//      gpio_basic.c
+//
+//      VIRTEX4 gpio support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Limited
+// Copyright (C) 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//####DESCRIPTIONBEGIN####
+//
+// Author(s):   Carlos Duclos
+// Date:        2005-05-24
+//####DESCRIPTIONEND####
+//=============================================================================
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_mem.h>            // HAL memory definitions
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <cyg/hal/ppc_regs.h>           // Platform registers
+#include <cyg/hal/hal_if.h>             // hal_if_init
+#include <cyg/hal/hal_intr.h>           // interrupt definitions
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+#include <cyg/hal/hal_io.h>             // I/O macros
+#include <cyg/infra/diag.h>
+
+#include "xbasic_types.h"
+#include "xgpio.h"
+#include "xgpio_l.h"
+#include "xparameters.h"
+#include <xparameters_translation.h>
+
+#include <cyg/hal/gpio_basic.h>
+
+static Xboolean gpio_initialized = XFALSE;
+static XGpio gpio_manager_device;
+#define GPIO_MANAGER_ADDRESS     0x90000000
+
+/*
+ * Low level routines
+ */
+ 
+static int toggle_bit_on( cyg_uint32 bit_number ) 
+{
+    volatile cyg_uint32 * bit_register = (volatile cyg_uint32 *)GPIO_MANAGER_ADDRESS;
+    cyg_uint32 temporal = 0;
+    
+    temporal = *bit_register;
+    temporal = temporal | bit_number;
+    *bit_register = temporal;
+    
+    return 0;
+}
+
+static int toggle_bit_off( cyg_uint32 bit_number )
+{
+    volatile cyg_uint32 * bit_register = (volatile cyg_uint32 *)GPIO_MANAGER_ADDRESS;
+    cyg_uint32 temporal = 0, mask = 0;
+    
+    temporal = *bit_register;
+    mask = ~bit_number;
+    temporal = temporal & mask;
+    *bit_register = temporal;
+    
+    return 0;
+}
+
+static int get_status( cyg_uint32 * status )
+{
+    volatile cyg_uint32 * gpio_register = (volatile cyg_uint32 *)GPIO_MANAGER_ADDRESS;
+    cyg_uint32 temporal = 0;
+
+    temporal = *gpio_register;
+    *status = temporal;
+
+    return 0;
+}
+
+/*
+ * Simple abstraction to simplify the exported interface
+ */
+ 
+static int sw_init()
+{
+    XStatus status = 0;
+
+    status = XGpio_Initialize( &gpio_manager_device, XPAR_GPIO_0_DEVICE_ID );
+    if( status != XST_SUCCESS )
+    {
+        diag_printf( "Could not initialze sw led manager\n" );
+        return -1;
+    }
+
+    return 0;
+}
+
+static int hw_init()
+{
+    XGpio_SetDataDirection( &gpio_manager_device, 1, 0xFFFFFE00 );
+    
+    return 0;
+}
+
+/*
+ * Exported Interface
+ */
+ 
+void init_gpio_manager()
+{
+    int result = 0;
+
+    if( gpio_initialized == XTRUE )
+        return;
+
+    result = sw_init();
+    if( result < 0 )
+        return -1;
+    result = hw_init();
+    if( result < 0 )
+        return -1;
+
+    gpio_initialized = XTRUE;
+
+    return;
+}
+
+int get_status_gpio( cyg_uint32 * status )
+{
+    int result = 0;
+    
+    result = get_status( status );
+    
+    return result;
+}
+
+int turn_on_bit( cyg_uint32 bit )
+{
+    int result = 0;
+    
+    result = toggle_bit_on( bit );
+    
+    return result;
+}
+
+int turn_off_bit( cyg_uint32 bit )
+{
+    int result = 0;
+    
+    result = toggle_bit_off( bit );
+
+    return result;
+}
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/hal_aux.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/hal_aux.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/hal_aux.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/hal_aux.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,266 @@
+//=============================================================================
+//
+//      hal_aux.c
+//
+//      HAL auxiliary objects and code; per platform
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   hmt
+// Contributors:hmt, gthomas
+// Date:        1999-06-08
+// Purpose:     HAL aux objects: startup tables.
+// Description: Tables for per-platform initialization
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_mem.h>            // HAL memory definitions
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <cyg/hal/ppc_regs.h>           // Platform registers
+#include <cyg/hal/hal_if.h>             // hal_if_init
+#include <cyg/hal/hal_intr.h>           // interrupt definitions
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+#include <cyg/hal/hal_io.h>             // I/O macros
+#include <cyg/infra/diag.h>
+#include <cyg/hal/i2c_support.h>        // i2c support routines
+#include CYGHWR_MEMORY_LAYOUT_H
+
+#ifdef CYGPKG_REDBOOT
+#include <redboot.h>
+#endif
+
+//-----------------------------------------------------------------------------
+// Xilinx Interrupt Controller
+// We don't use the HAL completely, only the low-level functions
+#include "xintc_l.h"
+
+#define XINTC_PPC_WRITE(x,y)    *((volatile unsigned int *)x)=y
+#define XINTC_PPC_READ(x,y)     y=*((volatile unsigned int *)x)
+#define XINTC_PPC_ALL       0xFFFFFFFF
+#define XINTC_PPC_ISR       (XPAR_OPB_INTC_0_BASEADDR + XIN_ISR_OFFSET) // Status       
+#define XINTC_PPC_IPR       (XPAR_OPB_INTC_0_BASEADDR + XIN_IPR_OFFSET) // Pending
+#define XINTC_PPC_IER       (XPAR_OPB_INTC_0_BASEADDR + XIN_IER_OFFSET) // Enable
+#define XINTC_PPC_IAR       (XPAR_OPB_INTC_0_BASEADDR + XIN_IAR_OFFSET) // Acknowledge
+#define XINTC_PPC_SIE       (XPAR_OPB_INTC_0_BASEADDR + XIN_SIE_OFFSET) // Set
+#define XINTC_PPC_CIE       (XPAR_OPB_INTC_0_BASEADDR + XIN_CIE_OFFSET) // Clear
+#define XINTC_PPC_IVR       (XPAR_OPB_INTC_0_BASEADDR + XIN_IVR_OFFSET) // Interrupt Vector Register */       
+#define XINTC_PPC_MER       (XPAR_OPB_INTC_0_BASEADDR + XIN_MER_OFFSET) // Master Enable
+//-----------------------------------------------------------------------------
+
+// The memory map is weakly defined, allowing the application to redefine
+// it if necessary. The regions defined below are the minimum requirements.
+CYGARC_MEMDESC_TABLE CYGBLD_ATTRIB_WEAK = {
+    // Mapping for the Xilinx VIRTEX4 development boards
+    CYGARC_MEMDESC_NOCACHE_PA( 0x80000000, 0x00000000, CYGMEM_REGION_ram_SIZE ), // Uncached version of RAM
+    CYGARC_MEMDESC_CACHE(   CYGMEM_REGION_ram, CYGMEM_REGION_ram_SIZE ), // Main memory
+    CYGARC_MEMDESC_TABLE_END
+};
+
+//--------------------------------------------------------------------------
+// Platform init code.
+
+void
+_virtex4_assert(char *file, int line)
+{
+    cyg_uint32 old;
+
+    HAL_DISABLE_INTERRUPTS(old);
+    diag_printf("VIRTEX4 firmware failure - file: %s, line: %d\n",
+                file, line);
+    while (1) ;
+}
+
+void
+hal_platform_init(void)
+{
+    XAssertSetCallback(_virtex4_assert);
+}
+
+//
+// Initialize serial ports - called during hal_if_init()
+// Note: actual serial port support code is supported by the PPC405 variant layer
+//       Having this call here allows for additional platform specific additions
+//
+void
+cyg_hal_plf_comms_init(void)
+{
+    static int initialized = 0;
+
+    if (initialized)
+        return;
+    initialized = 1;
+
+#if defined(CYGSEM_VIRTEX4_LCD_COMM) && defined(MNDHWR_VIRTEX4_TFT)
+    cyg_hal_plf_lcd_init();
+#else
+    cyg_hal_plf_serial_init();
+#endif
+}
+
+//----------------------------------------------------------------------------
+// Reset.
+void
+_virtex4_reset(void)
+{
+    CYGARC_MTSPR(SPR_DBCR0, 0x30000000);  // Asserts system reset
+    while (1) ;
+}
+
+//----------------------------------------------------------------------------
+// Interrupt support
+void
+hal_platform_IRQ_init(void)
+{
+// We need first to have a decent decoding routine!
+    XINTC_PPC_WRITE(XINTC_PPC_CIE,XINTC_PPC_ALL);
+    XINTC_PPC_WRITE(XINTC_PPC_IAR,XINTC_PPC_ALL);
+#ifndef CYGPKG_REDBOOT
+    // This is a write-once bit, so if we are not planning to enable
+    // interrupts at this time, we can safely delay this to a later time
+    XIntc_mMasterEnable(XPAR_INTC_0_BASEADDR);
+#endif
+}
+
+void 
+hal_virtex4_interrupt_init(void)
+{
+}
+
+static inline unsigned long vectorToMask(int vector,
+                                         const char* defaultError,
+                                         unsigned long defaultMask)
+{
+  switch( vector )
+  {
+#ifdef MNDHWR_VIRTEX4_EMAC
+    case CYGNUM_HAL_INTERRUPT_EMAC:
+      return CYGNUM_HAL_INTERRUPT_EMAC_MASK;
+    case CYGNUM_HAL_INTERRUPT_PHY:
+      return CYGNUM_HAL_INTERRUPT_PHY_MASK;
+#endif
+#ifdef MNDHWR_VIRTEX4_SGDMATEMAC
+    case CYGNUM_HAL_INTERRUPT_SGDMATEMAC:
+      return CYGNUM_HAL_INTERRUPT_SGDMATEMAC_MASK;
+#endif
+#ifdef MNDHWR_VIRTEX4_USB
+    case CYGNUM_HAL_INTERRUPT_USB:
+      return CYGNUM_HAL_INTERRUPT_USB_MASK;
+#endif
+#ifdef MNDHWR_VIRTEX4_SYSACE
+    case CYGNUM_HAL_INTERRUPT_SYSACE:
+      return CYGNUM_HAL_INTERRUPT_SYSACE_MASK;
+#endif
+#ifdef MNDHWR_VIRTEX4_AC97
+    case CYGNUM_HAL_INTERRUPT_AC97REC:
+      return CYGNUM_HAL_INTERRUPT_AC97REC_MASK;
+    case CYGNUM_HAL_INTERRUPT_AC97PB:
+      return CYGNUM_HAL_INTERRUPT_AC97PB_MASK;
+#endif
+#ifdef MNDHWR_VIRTEX4_IIC
+    case CYGNUM_HAL_INTERRUPT_I2C:
+      return CYGNUM_HAL_INTERRUPT_I2C_MASK;
+#endif
+#ifdef MNDHWR_VIRTEX4_PS22
+    case CYGNUM_HAL_INTERRUPT_PS22:
+      return CYGNUM_HAL_INTERRUPT_PS22;
+#endif
+#ifdef MNDHWR_VIRTEX4_PS21
+    case CYGNUM_HAL_INTERRUPT_PS21:
+      return CYGNUM_HAL_INTERRUPT_PS21;
+#endif
+#ifdef MNDHWR_VIRTEX4_UART
+    case CYGNUM_HAL_INTERRUPT_UART0:
+      return CYGNUM_HAL_INTERRUPT_UART0_MASK;
+#endif
+    default:
+      diag_printf( defaultError );
+      return defaultMask;
+  }
+}
+
+void 
+hal_virtex4_interrupt_mask(int vector)
+{
+    unsigned long mask = 0;
+    mask = vectorToMask(vector, "hal_virtex4_interrupt_mask: default case", XINTC_PPC_ALL);
+    XINTC_PPC_WRITE(XINTC_PPC_CIE,mask);
+}
+
+void 
+hal_virtex4_interrupt_unmask(int vector)
+{
+    unsigned long mask = 0;
+    mask = vectorToMask(vector, "hal_virtex4_interrupt_unmask: default case", ~XINTC_PPC_SIE);
+    XINTC_PPC_WRITE(XINTC_PPC_SIE,mask);
+}
+
+void 
+hal_virtex4_interrupt_acknowledge(int vector)
+{
+    unsigned long mask = 0;
+    mask = vectorToMask(vector, "hal_virtex4_interrupt_acknowledge: default case", XINTC_PPC_ALL);
+    XINTC_PPC_WRITE(XINTC_PPC_IAR,mask);
+}
+
+void 
+hal_virtex4_interrupt_configure(int vector, int level, int dir)
+{
+}
+
+void 
+hal_virtex4_interrupt_set_level(int vector, int level)
+{
+}
+
+//----------------------------------------------------------------------------------------------------------------------------------
+// I2C Support
+//----------------------------------------------------------------------------------------------------------------------------------
+void
+hal_ppc40x_i2c_init()
+{
+#ifdef CYGSEM_VIRTEX4_I2C_SUPPORT
+    virtex4_i2c_init();
+#endif
+}
+
+// EOF hal_aux.c
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/hal_diag2.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/hal_diag2.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/hal_diag2.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/hal_diag2.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,227 @@
+//=============================================================================
+//
+//      hal_diag.c
+//
+//      HAL diagnostic I/O code
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   hmt
+// Contributors:hmt, gthomas, 
+//              cduclos
+// Date:        2005-05-26
+//              1999-06-08
+// Purpose:     HAL diagnostic output
+// Description: Implementations of HAL diagnostic I/O support.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>         // base types
+#include <cyg/infra/cyg_trac.h>         // tracing macros
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+
+#include <cyg/hal/hal_io.h>             // IO macros
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/hal_intr.h>           // Interrupt macros
+#include <cyg/hal/drv_api.h>
+#include <cyg/hal/lcd_support.h>
+#include <cyg/hal/simple_keyboard.h>
+
+#if defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+#include <cyg/hal/hal_stub.h>           // hal_output_gdb_string
+#endif
+
+#include "xbasic_types.h"
+#include "xparameters.h"
+#include "xtft.h"
+#ifdef MNDHWR_VIRTEX4_PS21
+#include "xps2.h"
+#endif
+#include "xstatus.h"
+
+//=============================================================================
+// Console driver
+//=============================================================================
+
+//-----------------------------------------------------------------------------
+typedef struct {
+    cyg_int32  msec_timeout;
+    bool       dev_ok;
+    int        int_state;
+    int        *ctrlc;
+} channel_data_t;
+
+static channel_data_t channels[] = {
+    { 1000 }
+};
+
+//-----------------------------------------------------------------------------
+static void
+init_lcd_channel(channel_data_t *chan)
+{
+    lcd_init( 0 );
+    init_simple_keyboard();
+    chan->dev_ok = true;
+}
+
+static cyg_bool
+cyg_hal_plf_lcd_getc_nonblock(channel_data_t *chan, cyg_uint8 *ch)
+{
+    int status = 0;
+    
+    status = read_simple_keyboard( ch );
+    if( status < 0 )
+        return false;
+        
+    return true;
+}
+
+cyg_uint8
+cyg_hal_plf_lcd_getc(channel_data_t *chan)
+{
+    cyg_uint8 ch;
+
+    while(!cyg_hal_plf_lcd_getc_nonblock(chan, &ch));
+    return ch;
+}
+
+void
+cyg_hal_plf_lcd_putc(channel_data_t *chan, cyg_uint8 c)
+{
+    if (!chan->dev_ok) 
+        return;
+    lcd_putc(c);
+}
+
+static void
+cyg_hal_plf_lcd_write(channel_data_t *chan, cyg_uint8* buf, 
+                         cyg_uint32 len)
+{
+    while(len-- > 0)
+        cyg_hal_plf_lcd_putc(chan, *buf++);
+}
+
+static void
+cyg_hal_plf_lcd_read(channel_data_t *chan, cyg_uint8* buf, cyg_uint32 len)
+{
+    while(len-- > 0)
+        *buf++ = cyg_hal_plf_lcd_getc(chan);
+}
+
+cyg_bool
+cyg_hal_plf_lcd_getc_timeout(channel_data_t *chan, cyg_uint8* ch)
+{
+    int delay_count;
+    cyg_bool res;
+
+    delay_count = chan->msec_timeout * 10; // delay in .1 ms steps
+    for(;;) {
+        res = cyg_hal_plf_lcd_getc_nonblock(chan, ch);
+        if (res || 0 == delay_count--)
+            break;
+        CYGACC_CALL_IF_DELAY_US(100);
+    }
+    return res;
+}
+
+static int
+cyg_hal_plf_lcd_control(channel_data_t *chan, __comm_control_cmd_t func, ...)
+{
+    Xuint16 opt;
+    int ret = 0;
+
+    if (!chan->dev_ok) return ret;
+
+    switch (func) {
+    case __COMMCTL_IRQ_ENABLE:
+        break;
+    case __COMMCTL_IRQ_DISABLE:
+        break;
+    case __COMMCTL_DBG_ISR_VECTOR:
+        break;
+    case __COMMCTL_SET_TIMEOUT:
+    {
+        va_list ap;
+
+        va_start(ap, func);
+
+        ret = chan->msec_timeout;
+        chan->msec_timeout = va_arg(ap, cyg_uint32);
+
+        va_end(ap);
+    }        
+    default:
+        break;
+    }
+    return ret;
+}
+
+void
+cyg_hal_plf_lcd_init()
+{
+    hal_virtual_comm_table_t* comm;
+    int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+
+    // Disable interrupts.
+    disable_interrupt_simple_keyboard();
+
+    // Init channels
+    init_lcd_channel(&channels[0]);
+
+    // Setup procs in the vector table
+
+    // Set channel 0
+    CYGACC_CALL_IF_SET_CONSOLE_COMM(0);
+    comm = CYGACC_CALL_IF_CONSOLE_PROCS();
+    CYGACC_COMM_IF_CH_DATA_SET(*comm, &channels[0]);
+    CYGACC_COMM_IF_WRITE_SET(*comm, cyg_hal_plf_lcd_write);
+    CYGACC_COMM_IF_READ_SET(*comm, cyg_hal_plf_lcd_read);
+    CYGACC_COMM_IF_PUTC_SET(*comm, cyg_hal_plf_lcd_putc);
+    CYGACC_COMM_IF_GETC_SET(*comm, cyg_hal_plf_lcd_getc);
+    CYGACC_COMM_IF_CONTROL_SET(*comm, cyg_hal_plf_lcd_control);
+    CYGACC_COMM_IF_GETC_TIMEOUT_SET(*comm, cyg_hal_plf_lcd_getc_timeout);
+
+    // Restore original console
+    CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+}
+
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/hal_diag.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/hal_diag.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/hal_diag.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/hal_diag.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,308 @@
+//=============================================================================
+//
+//      hal_diag.c
+//
+//      HAL diagnostic I/O code
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   hmt
+// Contributors:hmt, gthomas
+// Date:        1999-06-08
+// Purpose:     HAL diagnostic output
+// Description: Implementations of HAL diagnostic I/O support.
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>         // base types
+#include <cyg/infra/cyg_trac.h>         // tracing macros
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+
+#include <cyg/hal/hal_io.h>             // IO macros
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/hal_intr.h>           // Interrupt macros
+#include <cyg/hal/drv_api.h>
+
+#if defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+#include <cyg/hal/hal_stub.h>           // hal_output_gdb_string
+#endif
+
+#include "xbasic_types.h"
+#include "xparameters.h"
+#include <xparameters_translation.h>
+#include "xuartns550.h"
+#include "xstatus.h"
+
+//=============================================================================
+// Serial driver
+//=============================================================================
+
+//-----------------------------------------------------------------------------
+typedef struct {
+    cyg_int32  dev_id;
+    cyg_int32  msec_timeout;
+    int        isr_vector;
+    bool       dev_ok;
+    int        int_state;
+    int        *ctrlc;
+    unsigned char inq[16];
+    unsigned char *qp;
+    int            qlen;
+    XUartNs550 dev;
+} channel_data_t;
+
+static channel_data_t channels[] = {
+    { XPAR_UART16550_0_DEVICE_ID, 1000, CYGNUM_HAL_INTERRUPT_UART0},
+};
+
+static void cyg_hal_plf_serial_isr_handler(channel_data_t *chan, int event, int len);
+
+//-----------------------------------------------------------------------------
+static void
+init_serial_channel(channel_data_t *chan)
+{
+    XStatus stat;
+    XUartNs550Format fmt;
+    Xuint16 opt;
+
+    stat = XUartNs550_Initialize(&chan->dev, chan->dev_id);
+    if (stat != XST_SUCCESS) {
+        return;  // What else can be done?
+    }
+    // Configure the port
+    fmt.BaudRate = CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD;
+    fmt.DataBits = XUN_FORMAT_8_BITS;
+    fmt.Parity = XUN_FORMAT_NO_PARITY;
+    fmt.StopBits = XUN_FORMAT_1_STOP_BIT;
+    stat = XUartNs550_SetDataFormat(&chan->dev, &fmt);
+    if (stat != XST_SUCCESS) {
+        return;  // What else can be done?
+    }
+    opt = XUN_OPTION_FIFOS_ENABLE | XUN_OPTION_RESET_TX_FIFO | XUN_OPTION_RESET_RX_FIFO;
+    opt = 0;
+    stat = XUartNs550_SetOptions(&chan->dev, opt);
+    if (stat != XST_SUCCESS) {
+        return;  // What else can be done?
+    }
+    XUartNs550_SetHandler(&chan->dev, cyg_hal_plf_serial_isr_handler, chan);
+    XUartNs550_SetFifoThreshold(&chan->dev, XUN_FIFO_TRIGGER_01);
+    chan->qlen = 0;  // No characters buffered
+    chan->dev_ok = true;
+}
+
+static cyg_bool
+cyg_hal_plf_serial_getc_nonblock(channel_data_t *chan, cyg_uint8 *ch)
+{
+    if (!chan->dev_ok) return false;
+    if (chan->qlen == 0) {
+        // See if any characters are now available
+        chan->qp = chan->inq;
+        chan->qlen = XUartNs550_Recv(&chan->dev, chan->qp, sizeof(chan->inq));
+    }
+    if (chan->qlen) {
+        *ch = *chan->qp++;
+        chan->qlen--;
+        return true;
+    }
+    return false;
+}
+
+cyg_uint8
+cyg_hal_plf_serial_getc(channel_data_t *chan)
+{
+    cyg_uint8 ch;
+
+    while(!cyg_hal_plf_serial_getc_nonblock(chan, &ch));
+    return ch;
+}
+
+
+void
+cyg_hal_plf_serial_putc(channel_data_t *chan, cyg_uint8 c)
+{
+    if (!chan->dev_ok) return;
+    XUartNs550_Send(&chan->dev, &c, 1);
+    // Wait for character to get out
+    while (XUartNs550_IsSending(&chan->dev)) ;
+}
+
+static void
+cyg_hal_plf_serial_write(channel_data_t *chan, cyg_uint8* buf, 
+                         cyg_uint32 len)
+{
+    while(len-- > 0)
+        cyg_hal_plf_serial_putc(chan, *buf++);
+}
+
+static void
+cyg_hal_plf_serial_read(channel_data_t *chan, cyg_uint8* buf, cyg_uint32 len)
+{
+    while(len-- > 0)
+        *buf++ = cyg_hal_plf_serial_getc(chan);
+}
+
+cyg_bool
+cyg_hal_plf_serial_getc_timeout(channel_data_t *chan, cyg_uint8* ch)
+{
+    int delay_count;
+    cyg_bool res;
+
+    delay_count = chan->msec_timeout * 10; // delay in .1 ms steps
+    for(;;) {
+        res = cyg_hal_plf_serial_getc_nonblock(chan, ch);
+        if (res || 0 == delay_count--)
+            break;
+        CYGACC_CALL_IF_DELAY_US(100);
+    }
+    return res;
+}
+
+static int
+cyg_hal_plf_serial_control(channel_data_t *chan, __comm_control_cmd_t func, ...)
+{
+    Xuint16 opt;
+    int ret = 0;
+
+    if (!chan->dev_ok) return ret;
+
+    switch (func) {
+    case __COMMCTL_IRQ_ENABLE:
+        opt = XUartNs550_GetOptions(&chan->dev) | XUN_OPTION_DATA_INTR;
+        XUartNs550_SetOptions(&chan->dev, opt);
+        HAL_INTERRUPT_UNMASK(chan->isr_vector);
+        chan->int_state = 1;
+        break;
+    case __COMMCTL_IRQ_DISABLE:
+        ret = chan->int_state;
+        chan->int_state = 0;
+        opt = XUartNs550_GetOptions(&chan->dev) & ~XUN_OPTION_DATA_INTR;
+        XUartNs550_SetOptions(&chan->dev, opt);
+        HAL_INTERRUPT_MASK(chan->isr_vector);        
+        break;
+    case __COMMCTL_DBG_ISR_VECTOR:
+        ret = chan->isr_vector;
+        break;
+    case __COMMCTL_SET_TIMEOUT:
+    {
+        va_list ap;
+
+        va_start(ap, func);
+
+        ret = chan->msec_timeout;
+        chan->msec_timeout = va_arg(ap, cyg_uint32);
+
+        va_end(ap);
+    }        
+    default:
+        break;
+    }
+    return ret;
+}
+
+static int
+cyg_hal_plf_serial_isr(channel_data_t *chan, int *ctrlc, 
+                       CYG_ADDRWORD vector, CYG_ADDRWORD data)
+{
+    chan->ctrlc = ctrlc;
+    XUartNs550_InterruptHandler(&chan->dev);
+    HAL_INTERRUPT_ACKNOWLEDGE(chan->isr_vector);
+    return CYG_ISR_HANDLED;
+}
+
+static void
+cyg_hal_plf_serial_isr_handler(channel_data_t *chan,
+                               int event, int len)
+{
+    int res;
+    char ch;
+
+    *chan->ctrlc = 0;
+    switch (event) {
+    case XUN_EVENT_RECV_ERROR:
+    case XUN_EVENT_RECV_TIMEOUT:
+    case XUN_EVENT_MODEM:
+        diag_printf("%s.%d - chan: %p, event: %d\n", __FUNCTION__, __LINE__, chan, event);
+        break;
+    case XUN_EVENT_RECV_DATA:
+        res = XUartNs550_Recv(&chan->dev, &ch, 1);
+        if (cyg_hal_is_break(&ch , 1))
+            *chan->ctrlc = 1;
+        break;
+    case XUN_EVENT_SENT_DATA:
+        return;
+    default:
+    	break;
+    }
+}                               
+
+void
+cyg_hal_plf_serial_init(void)
+{
+    hal_virtual_comm_table_t* comm;
+    int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
+
+    // Disable interrupts.
+    HAL_INTERRUPT_MASK(channels[0].isr_vector);
+
+    // Init channels
+    init_serial_channel(&channels[0]);
+
+    // Setup procs in the vector table
+
+    // Set channel 0
+    CYGACC_CALL_IF_SET_CONSOLE_COMM(0);
+    comm = CYGACC_CALL_IF_CONSOLE_PROCS();
+    CYGACC_COMM_IF_CH_DATA_SET(*comm, &channels[0]);
+    CYGACC_COMM_IF_WRITE_SET(*comm, cyg_hal_plf_serial_write);
+    CYGACC_COMM_IF_READ_SET(*comm, cyg_hal_plf_serial_read);
+    CYGACC_COMM_IF_PUTC_SET(*comm, cyg_hal_plf_serial_putc);
+    CYGACC_COMM_IF_GETC_SET(*comm, cyg_hal_plf_serial_getc);
+    CYGACC_COMM_IF_CONTROL_SET(*comm, cyg_hal_plf_serial_control);
+    CYGACC_COMM_IF_DBG_ISR_SET(*comm, cyg_hal_plf_serial_isr);
+    CYGACC_COMM_IF_GETC_TIMEOUT_SET(*comm, cyg_hal_plf_serial_getc_timeout);
+    
+    // Restore original console
+    CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
+}
+
+// EOF hal_diag.c
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/i2c_support.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/i2c_support.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/i2c_support.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/i2c_support.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,271 @@
+//=============================================================================
+//
+//      i2c_support.c
+//
+//      VIRTEX4 i2c support routines
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Limited
+// Copyright (C) 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//####DESCRIPTIONBEGIN####
+//
+// Author(s):   Carlos Duclos 
+// Date:        2005-05-02
+//####DESCRIPTIONEND####
+//=============================================================================
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_mem.h>            // HAL memory definitions
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <cyg/hal/ppc_regs.h>           // Platform registers
+#include <cyg/hal/hal_if.h>             // hal_if_init
+#include <cyg/hal/hal_intr.h>           // interrupt definitions
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+#include <cyg/hal/hal_io.h>             // I/O macros
+#include <cyg/infra/diag.h>
+#include <cyg/io/i2c.h>
+#include <cyg/hal/i2c_support.h>
+
+#include "xbasic_types.h"
+#include "xiic.h"
+#include "xiic_l.h"
+#include "xparameters.h"
+#include <xparameters_translation.h>
+
+static void virtex4_i2c_bus_init(struct cyg_i2c_bus*);
+static cyg_uint32 virtex4_i2c_bus_tx(const cyg_i2c_device*, cyg_bool, const cyg_uint8*, cyg_uint32, cyg_bool);
+static cyg_uint32 virtex4_i2c_bus_rx(const cyg_i2c_device*, cyg_bool, cyg_uint8*, cyg_uint32, cyg_bool, cyg_bool);
+static void virtex4_i2c_bus_stop(const cyg_i2c_device*);
+
+// The i2c bus, even when by default is initialized as a device!!!
+static XIic virtex4_i2c_bus_controller;
+static bool virtex4_i2c_bus_controller_initialized = false;
+static bool virtex4_i2c_bus_controller_started = false;
+static cyg_handle_t interrupt_handler;
+static cyg_interrupt interrupt;
+
+
+// Main bus definition
+CYG_I2C_BUS( virtex4_i2c_bus, virtex4_i2c_bus_init, virtex4_i2c_bus_tx, virtex4_i2c_bus_rx, virtex4_i2c_bus_stop, &virtex4_i2c_bus_controller );
+
+void virtex4_i2c_init()
+{
+}
+
+int virtex4_i2c_get_bus_pointer( void ** bus )
+{
+    *bus = &virtex4_i2c_bus;
+    return 0;
+}
+
+/*
+ * Worker functions
+ */
+
+static void 
+virtex4_i2c_bus_send_handler(void *CallBackRef, int ByteCount)
+{
+    diag_printf( "Calling send_handler!\n" );
+}
+
+static void 
+virtex4_i2c_bus_receive_handler(void *CallBackRef, int ByteCount)
+{
+    diag_printf( "Calling receive_handler!\n" );
+}
+
+static void 
+virtex4_i2c_bus_status_handler(void *CallBackRef, XStatus StatusEvent)
+{
+    diag_printf( "Calling status_handler!\n" );
+}
+
+static void 
+virtex4_i2c_bus_dsr(cyg_vector_t vector, cyg_ucount32 count, cyg_addrword_t data)
+{
+    struct cyg_i2c_bus * bus = (struct cyg_i2c_bus*)data;
+
+    diag_printf( "virtex4_i2c_bus_dsr\n" );
+    XIic_InterruptHandler(bus->i2c_extra);
+    cyg_drv_interrupt_acknowledge(CYGNUM_HAL_INTERRUPT_I2C);
+    cyg_drv_interrupt_unmask(CYGNUM_HAL_INTERRUPT_I2C);
+}
+ 
+static int
+virtex4_i2c_bus_isr(cyg_vector_t vector, cyg_addrword_t data, HAL_SavedRegisters *regs)
+{
+    cyg_drv_interrupt_mask(CYGNUM_HAL_INTERRUPT_I2C);
+    diag_printf( "virtex4_i2c_bus_isr\n" );
+    return CYG_ISR_CALL_DSR;  // Run the DSR
+}
+
+static void virtex4_i2c_bus_init(struct cyg_i2c_bus* bus)
+{
+    XStatus stat = 0;
+    
+    if( virtex4_i2c_bus_controller_initialized )
+        return;
+
+    stat = XIic_Initialize(bus->i2c_extra, XPAR_IIC_0_DEVICE_ID);
+    if( stat != XST_SUCCESS ) {
+        return;  // What else can be done?
+    } else {
+        virtex4_i2c_bus_controller_initialized = true;
+    }
+    // handler routines
+    XIic_SetRecvHandler(bus->i2c_extra, bus->i2c_extra, virtex4_i2c_bus_receive_handler);
+    XIic_SetSendHandler(bus->i2c_extra, bus->i2c_extra, virtex4_i2c_bus_send_handler);
+    XIic_SetStatusHandler(bus->i2c_extra, bus->i2c_extra, virtex4_i2c_bus_status_handler);
+
+    // Interruption handling routines
+    cyg_drv_interrupt_create(CYGNUM_HAL_INTERRUPT_I2C,
+                             0,  // Highest //CYGARC_SIU_PRIORITY_HIGH,
+                             (cyg_addrword_t)bus, //  Data passed to ISR
+                             (cyg_ISR_t *)virtex4_i2c_bus_isr,
+                             (cyg_DSR_t *)virtex4_i2c_bus_dsr,
+                             &interrupt_handler,
+                             &interrupt);
+    cyg_drv_interrupt_attach(interrupt_handler);
+}
+
+static cyg_uint32 virtex4_i2c_bus_tx(const cyg_i2c_device* dev, cyg_bool flag0, const cyg_uint8* buffer, cyg_uint32 count, cyg_bool flag1)
+{
+    XStatus stat;
+    unsigned total;
+    int i = 0;
+    
+    if( !virtex4_i2c_bus_controller_initialized )
+    {
+        diag_printf( "i2c_support.c(virtex4_i2c_bus_tx): bus not initialized! \n" );
+        return 0;
+    }
+    if(( buffer == NULL ) || ( count == 0 ))
+    {
+        diag_printf( "i2c_support.c(virtex4_i2c_bus_tx): Trying to use a NULL buffer as data to send, or count == 0! \n" );
+        return 0;
+    }
+    if( !virtex4_i2c_bus_controller_started )
+    {
+        stat = XIic_Start(dev->i2c_bus->i2c_extra);
+        if( stat != XST_SUCCESS ) // This cannot happen in this version of hardware (the function always return success)!!!!!!!!!
+        {
+            diag_printf( "i2c_support.c(virtex4_i2c_bus_tx): Could not start the bus! \n" );
+            return 0;
+        }
+        virtex4_i2c_bus_controller_started = true;
+    }
+    stat = XIic_SetAddress(dev->i2c_bus->i2c_extra, XII_ADDR_TO_SEND_TYPE, (int)dev->i2c_address);
+    if( stat != XST_SUCCESS )
+    {
+        diag_printf( "i2c_support.c(virtex4_i2c_bus_tx): Could not set %u as slave address! \n", dev->i2c_address );
+        return 0;
+    }
+    stat = XIic_MasterSend(dev->i2c_bus->i2c_extra, buffer, count);
+//    total = XIic_Send(((XIic *)dev->i2c_bus->i2c_extra)->BaseAddress, (Xuint8)dev->i2c_address, buffer, count);
+
+    if( stat != XST_SUCCESS )
+    {
+        diag_printf( "i2c_support.c(virtex4_i2c_bus_tx): Could not send data! \n" );
+        return 0;
+    } //else
+        //for( i = 0; i < total; i++ )
+          //  diag_printf( "Transmitted data: buffer[ %d ] = %u \n", i, buffer[ i ] );
+//    printf( "Transmitted %u bytes of %u requested \n", total, count );
+ 
+    return count;
+}
+
+static cyg_uint32 virtex4_i2c_bus_rx(const cyg_i2c_device* dev, cyg_bool flag0, cyg_uint8* buffer, cyg_uint32 count, cyg_bool flag1, cyg_bool flag2)
+{
+    XStatus stat;
+    unsigned  total;
+    int i = 0;
+
+    if( !virtex4_i2c_bus_controller_initialized )
+    {
+        diag_printf( "i2c_support.c(virtex4_i2c_bus_rx): bus not initialized! \n" );
+        return 0;
+    }
+    if(( buffer == NULL ) || ( count == 0 ))
+    {
+        diag_printf( "i2c_support.c(virtex4_i2c_bus_rx): Trying to use a NULL buffer as data to receive, or count == 0! \n" );
+        return 0;
+    }
+    if( !virtex4_i2c_bus_controller_started )
+    {
+        stat = XIic_Start(dev->i2c_bus->i2c_extra);
+        if( stat != XST_SUCCESS ) // This cannot happen in this version of hardware (the function always return success)!!!!!!!!!
+        {
+            diag_printf( "i2c_support.c(virtex4_i2c_bus_rx): Could not start the bus! \n" );
+            return 0;
+        }
+        virtex4_i2c_bus_controller_started = true;
+    }
+    stat = XIic_SetAddress(dev->i2c_bus->i2c_extra, XII_ADDR_TO_SEND_TYPE, (int)dev->i2c_address);
+    if( stat != XST_SUCCESS )
+    {
+        diag_printf( "i2c_support.c(virtex4_i2c_bus_rx): Could not set %u as slave address! \n", dev->i2c_address );
+        return 0;
+    }
+    stat = XIic_MasterRecv(dev->i2c_bus->i2c_extra, buffer, count);
+//    total = XIic_Recv( ((XIic *)dev->i2c_bus->i2c_extra)->BaseAddress, (Xuint8)dev->i2c_address, buffer, count);
+    if( stat != XST_SUCCESS )
+    {
+        diag_printf( "i2c_support.c(virtex4_i2c_bus_rx): Could not receive data! \n" );
+        return 0;
+    } //else
+        //for( i = 0; i < total; i++ )
+          //  diag_printf( "Received data: buffer[ %d ] = %u \n", i, buffer[ i ] );
+//    printf( "Received %u bytes of %u requested \n", total, count );
+    
+    return count;
+}
+
+static void virtex4_i2c_bus_stop(const cyg_i2c_device* dev)
+{
+    XStatus stat;
+    if( !virtex4_i2c_bus_controller_initialized )
+        return;
+    if( virtex4_i2c_bus_controller_started )
+    {
+        stat = XIic_Stop(dev->i2c_bus->i2c_extra);
+        if( stat != XST_SUCCESS ) // This cannot happen in this version of hardware (the function always return success)!!!!!!!!!
+            return;
+        virtex4_i2c_bus_controller_started = false;
+    }
+
+    return;
+}
+
+ 
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/lcd_support.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/lcd_support.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/lcd_support.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/lcd_support.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,646 @@
+//==========================================================================
+//
+//        Lcd_support.c
+//
+//        Xilinx VIRTEX4 - LCD support routines
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):     gthomas
+// Contributors:  gthomas
+//                Carlos Duclos 
+// Date:          2005-05-26
+// Description:   Simple LCD support
+//####DESCRIPTIONEND####
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/diag.h>
+#include <cyg/hal/hal_io.h>       // IO macros
+#include <cyg/hal/hal_if.h>       // Virtual vector support
+#include <cyg/hal/hal_arch.h>     // Register state info
+#include <cyg/hal/hal_intr.h>     // HAL interrupt macros
+
+#include <cyg/hal/lcd_support.h>
+#include <cyg/hal/hal_cache.h>
+
+#include "xbasic_types.h"
+#include "xtft.h"
+#include "xtft_l.h"
+#include "xps2.h"
+#include "xparameters.h"
+#include <xparameters_translation.h>
+
+#include <string.h>
+
+#ifdef CYGPKG_ISOINFRA
+# include <pkgconf/isoinfra.h>
+# ifdef CYGINT_ISO_STDIO_FORMATTED_IO
+#  include <stdio.h>  // sscanf
+# endif /* CYGINT_ISO_STDIO_FORMATTED_IO */
+#endif /* CYGPKG_ISOINFRA */
+
+#ifndef FALSE
+#define FALSE 0
+#define TRUE  1
+#endif
+
+// Physical dimensions of LCD display
+#define DISPLAY_WIDTH  XTFT_DISPLAY_WIDTH
+#define DISPLAY_HEIGHT XTFT_DISPLAY_HEIGHT
+#define DISPLAY_LINE_WIDTH XTFT_DISPLAY_BUFFER_WIDTH
+
+// Logical layout
+#define LCD_WIDTH  DISPLAY_WIDTH
+#define LCD_HEIGHT DISPLAY_HEIGHT
+#define LCD_DEPTH   16
+
+#define RGB_RED(x)   (((x)&0xFF)<<16)
+#define RGB_GREEN(x) (((x)&0xFF)<<8)
+#define RGB_BLUE(x)  (((x)&0xFF)<<0)
+
+// Physical screen info
+//static int lcd_depth  = LCD_DEPTH;  // Should be 1, 2, or 4
+static int lcd_height = LCD_HEIGHT;
+static cyg_uint32 lcd_framebuffer;
+
+// White on black
+static int bg = RGB_RED(0x00) | RGB_GREEN(0x00) | RGB_BLUE(0x00);
+#ifdef CYGSEM_VIRTEX4_LCD_COMM
+static int fg = RGB_RED(0xFF) | RGB_GREEN(0xFF) | RGB_BLUE(0xFF);
+#endif /* CYGSEM_VIRTEX4_LCD_COMM */
+
+// Screen & keyboard access
+static XTft tft;
+
+// Compute the location for a pixel within the framebuffer
+static cyg_uint32 *
+lcd_fb(int row, int col)
+{
+    return (cyg_uint32 *)(lcd_framebuffer+(((row*DISPLAY_LINE_WIDTH)+col)*4));
+}
+
+// Nothing to do here, but leave the interface
+void
+lcd_on(bool enable)
+{
+}
+
+// Initialize LCD hardware
+void
+lcd_init(int depth)
+{
+    Xuint32 * real_framebuffer;
+    XTft_Initialize(&tft, XPAR_TFT_CNTLR_REF_0_DEVICE_ID);
+    real_framebuffer = (Xuint32 *)tft.BaseAddress;
+    lcd_framebuffer = *real_framebuffer;
+    XTft_SetColor(&tft, 0x00FF0000, 0x00000088);  // Should be BLUE
+    XTft_ClearScreen(&tft);
+    lcd_on(true);
+    lcd_clear();
+}
+
+// Get information about the frame buffer
+int
+lcd_getinfo(struct lcd_info *info)
+{
+    info->width = DISPLAY_WIDTH;
+    info->height = DISPLAY_HEIGHT;
+    info->bpp = 32;
+    info->fb = (void*)lcd_framebuffer;
+    info->rlen = DISPLAY_LINE_WIDTH * 4;
+    info->type = FB_TRUE_COLOR0888;
+    return 1; // Information valid
+}
+
+// Clear screen
+void
+lcd_clear(void)
+{
+    cyg_uint32 *fb_row0, *fb_rown;
+
+    fb_row0 = lcd_fb(0, 0);
+    fb_rown = lcd_fb(lcd_height, 0);
+    while (fb_row0 != fb_rown) {
+        *fb_row0++ = bg;
+    }
+    lcd_screen_clear();
+}
+
+#ifdef CYGSEM_VIRTEX4_LCD_COMM
+
+//
+// Additional support for LCD/Keyboard as 'console' device
+//
+
+#include "banner.xpm"
+#include "font.h"
+
+// 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);
+
+#define SCREEN_PAN            20
+#define SCREEN_WIDTH          80
+#define SCREEN_HEIGHT         (LCD_HEIGHT/FONT_HEIGHT)
+#define VISIBLE_SCREEN_WIDTH  (LCD_WIDTH/FONT_WIDTH)
+#define VISIBLE_SCREEN_HEIGHT (LCD_HEIGHT/FONT_HEIGHT)
+static char screen[SCREEN_HEIGHT][SCREEN_WIDTH];
+static int screen_height = SCREEN_HEIGHT;
+static int screen_width = SCREEN_WIDTH;
+static int screen_pan = 0;
+
+// Usable area on screen [logical pixel rows]
+static int screen_start = 0;                       
+static int screen_end = LCD_HEIGHT/FONT_HEIGHT;
+
+static bool cursor_enable = true;
+
+// Functions
+static void lcd_drawc(cyg_int8 c, int x, int y);
+
+// Note: val is a 16 bit, RGB555 value which must be mapped
+// onto a 12 bit value.
+#define RED(v)   ((v>>12) & 0x0F)
+#define GREEN(v) ((v>>7) & 0x0F)
+#define BLUE(v)  ((v>>1) & 0x0F)
+
+static void
+set_pixel(int row, int col, unsigned long val)
+{
+    unsigned long *pix = (unsigned long *)lcd_fb(row, col);
+    *pix = val;
+}
+
+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;
+    }
+
+    return 0;
+}
+
+static int
+_hex(char *cp)
+{
+    return (_hexdigit(*cp)<<4) | _hexdigit(*(cp+1));
+}
+
+static unsigned long
+parse_color(char *cp)
+{
+    int red, green, blue;
+
+    while (*cp && (*cp != 'c')) cp++;
+    if (cp) {
+        cp += 2;
+        if (*cp == '#') {
+            red = _hex(cp+1);
+            green = _hex(cp+3);
+            blue = _hex(cp+5);
+            return RGB_RED(red) | RGB_GREEN(green) | RGB_BLUE(blue);
+        } else {
+            // Should be "None"
+            return 0xFFFFFFFF;
+        }
+    } else {
+        return 0xFFFFFFFF;
+    }
+}
+
+#ifndef CYGINT_ISO_STDIO_FORMATTED_IO
+static int
+get_int(char **_cp)
+{
+    char *cp = *_cp;
+    char c;
+    int val = 0;
+    
+    while ((c = *cp++) && (c != ' ')) {
+        if ((c >= '0') && (c <= '9')) {
+            val = val * 10 + (c - '0');
+        } else {
+            return -1;
+        }
+    }
+    *_cp = cp;
+    return val;
+}
+#endif /* CYGINT_ISO_STDIO_FORMATTED_IO */
+
+int
+show_xpm(char *xpm[], int screen_pos)
+{
+    int i, row, col, offset;
+    char *cp;
+    int nrows, ncols, nclrs;
+    unsigned long colors[256];  // Mapped by character index
+
+    cp = xpm[0];
+#ifdef CYGINT_ISO_STDIO_FORMATTED_IO
+    if (sscanf(cp, "%d %d %d", &ncols, &nrows, &nclrs) != 3) {
+#else
+    if (((ncols = get_int(&cp)) < 0) ||
+        ((nrows = get_int(&cp)) < 0) ||
+        ((nclrs = get_int(&cp)) < 0)) {
+
+#endif /* CYGINT_ISO_STDIO_FORMATTED_IO */
+        diag_printf("Can't parse XPM data, sorry\n");
+        return 0;
+    }
+    // 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[1]);
+//        diag_printf("Color[%c] = %x\n", *cp, colors[(unsigned int)*cp]);
+    }
+
+    offset = screen_pos;
+    for (row = 0;  row < nrows;  row++) {            
+        cp = xpm[nclrs+1+row];        
+        for (col = 0;  col < ncols;  col++) {
+            set_pixel(row+offset, col, colors[(unsigned int)*cp++]);
+        }
+    }
+    screen_start = (nrows + (FONT_HEIGHT-1))/FONT_HEIGHT;
+    screen_end = LCD_HEIGHT/FONT_HEIGHT;
+    return offset+nrows;
+}
+
+void
+lcd_screen_clear(void)
+{
+
+    int row, col, pos;
+    for (row = 0;  row < screen_height;  row++) {
+        for (col = 0;  col < screen_width;  col++) {
+            screen[row][col] = ' ';
+        }
+    }
+    // Note: Row 0 seems to wrap incorrectly
+    pos = 0;
+    show_xpm(banner_xpm, pos);
+    curX = 0;  curY = screen_start;
+    if (cursor_enable) {
+        lcd_drawc(CURSOR_ON, curX-screen_pan, curY);
+    }
+}
+
+// Position cursor
+void
+lcd_moveto(int X, int Y)
+{
+    if (cursor_enable) {
+        lcd_drawc(screen[curY][curX], curX-screen_pan, 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;
+    if (cursor_enable) {
+        lcd_drawc(CURSOR_ON, curX-screen_pan, curY);
+    }
+}
+
+// Render a character at position (X,Y) with current background/foreground
+static void
+lcd_drawc(cyg_int8 c, int x, int y)
+{
+    cyg_uint8 bits;
+    int l, p;
+    int xoff, yoff;
+    cyg_uint32 *fb;
+
+    if ((x < 0) || (x >= VISIBLE_SCREEN_WIDTH) || 
+        (y < 0) || (y >= screen_height)) return;  
+    for (l = 0;  l < FONT_HEIGHT;  l++) {
+        bits = font_table[c-FIRST_CHAR][l]; 
+        yoff = y*FONT_HEIGHT + l;
+        xoff = x*FONT_WIDTH;
+        fb = lcd_fb(yoff, xoff);
+        for (p = 0;  p < FONT_WIDTH;  p++) {
+#ifdef FONT_LEFT_TO_RIGHT
+            *fb++ = (bits & 0x80) ? fg : bg;
+            bits <<= 1;
+#else
+            *fb++ = (bits & 0x01) ? fg : bg;
+            bits >>= 1;
+#endif /* FONT_LEFT_TO_RIGHT */
+        }
+    }
+}
+
+static void
+lcd_refresh(void)
+{
+    int row, col;
+
+    for (row = screen_start;  row < screen_height;  row++) {
+        for (col = 0;  col < VISIBLE_SCREEN_WIDTH;  col++) {
+            if ((col+screen_pan) < screen_width) {
+                lcd_drawc(screen[row][col+screen_pan], col, row);
+            } else {
+                lcd_drawc(' ', col, row);
+            }
+        }
+    }
+    if (cursor_enable) {
+        lcd_drawc(CURSOR_ON, curX-screen_pan, curY);
+    }
+}
+
+static void
+lcd_scroll(void)
+{
+    int col;
+    cyg_uint8 *c1;
+    cyg_uint32 *lc0, *lc1, *lcn;
+    cyg_uint32 *fb_row0, *fb_row1, *fb_rown;
+
+    // First scroll up the virtual screen
+#if ((SCREEN_WIDTH%4) != 0)
+#error Scroll code optimized for screen with multiple of 4 columns
+#endif /* ((SCREEN_WIDTH%4) != 0) */
+    lc0 = (cyg_uint32 *)&screen[0][0];
+    lc1 = (cyg_uint32 *)&screen[1][0];
+    lcn = (cyg_uint32 *)&screen[screen_height][0];
+    while (lc1 != lcn) {
+        *lc0++ = *lc1++;
+    }
+    c1 = &screen[screen_height-1][0];
+    for (col = 0;  col < screen_width;  col++) {
+        *c1++ = 0x20;
+    }
+    fb_row0 = lcd_fb(screen_start*FONT_HEIGHT, 0);
+    fb_row1 = lcd_fb((screen_start+1)*FONT_HEIGHT, 0);
+    fb_rown = lcd_fb(screen_end*FONT_HEIGHT, 0);
+    while (fb_row1 != fb_rown) {
+        *fb_row0++ = *fb_row1++;
+    }
+    // Erase bottom line
+    for (col = 0;  col < screen_width;  col++) {
+        lcd_drawc(' ', col, screen_end-1);
+    }
+}
+
+// Draw one character at the current position
+void
+lcd_putc(cyg_int8 c)
+{
+    if (cursor_enable) {
+        lcd_drawc(screen[curY][curX], curX-screen_pan, curY);
+    }
+    switch (c) {
+    case '\r':
+        curX = 0;
+        break;
+    case '\n':
+        curY++;
+        break;
+    case '\b':
+        curX--;
+        if (curX < 0) {
+            curY--;
+            if (curY < 0) curY = 0;
+            curX = screen_width-1;
+        }
+        break;
+    default:
+#if ((FIRST_CHAR != 0x00) || (LAST_CHAR != 0xFF))
+        if (((cyg_uint8)c < FIRST_CHAR) || ((cyg_uint8)c > LAST_CHAR)) c = '.';
+#endif /* ((FIRST_CHAR != 0x00) || (LAST_CHAR != 0xFF)) */
+        screen[curY][curX] = c;
+        lcd_drawc(c, curX-screen_pan, curY);
+        curX++;
+        if (curX == screen_width) {
+            curY++;
+            curX = 0;
+        }
+    } 
+    if (curY >= screen_height) {
+        lcd_scroll();
+        curY = (screen_height-1);
+    }
+    if (cursor_enable) {
+        lcd_drawc(CURSOR_ON, curX-screen_pan, 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);
+}
+
+static 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');
+            }
+        }
+    }
+
+    // FIXME
+    return 0;
+}
+
+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
+lcd_setbg(int red, int green, int blue)
+{
+    bg = RGB_RED(red) | RGB_GREEN(green) | RGB_BLUE(blue);
+}
+
+void
+lcd_setfg(int red, int green, int blue)
+{
+    fg = RGB_RED(red) | RGB_GREEN(green) | RGB_BLUE(blue);
+}
+
+#endif /* CYGSEM_VIRTEX4_LCD_COMM */
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/led_manager.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/led_manager.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/led_manager.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/led_manager.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,105 @@
+//=============================================================================
+//
+//      led_manager.c
+//
+//      VIRTEX4 led support
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 2004 eCosCentric Limited
+// Copyright (C) 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//####DESCRIPTIONBEGIN####
+//
+// Author(s):   Carlos Duclos 
+// Date:        2005-05-23
+//####DESCRIPTIONEND####
+//=============================================================================
+
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>
+#include <cyg/hal/hal_mem.h>            // HAL memory definitions
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <cyg/hal/ppc_regs.h>           // Platform registers
+#include <cyg/hal/hal_if.h>             // hal_if_init
+#include <cyg/hal/hal_intr.h>           // interrupt definitions
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+#include <cyg/hal/hal_io.h>             // I/O macros
+#include <cyg/infra/diag.h>
+
+#include "xbasic_types.h"
+#include "xgpio.h"
+#include "xgpio_l.h"
+#include "xparameters.h"
+
+#include <cyg/hal/led_manager.h>
+#include <cyg/hal/gpio_basic.h>
+
+/*
+ * All low level work is done in gpio_manager
+ */
+
+/*
+ * Exported interface
+ */
+ 
+void init_led_manager()
+{
+    init_gpio_manager();
+    return;
+}
+
+int get_status_led_manager( cyg_uint32 * status )
+{
+    int result = 0;
+    
+    result = get_status_gpio( status );
+    
+    return result;
+}
+
+int turn_on_led( cyg_uint32 led )
+{
+    int result = 0;
+    
+    result = turn_on_bit( led );
+    
+    return result;
+}
+
+int turn_off_led( cyg_uint32 led )
+{
+    int result = 0;
+    
+    result = turn_off_bit( led );
+
+    return result;
+}
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/plf_redboot_linux_exec.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/plf_redboot_linux_exec.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/plf_redboot_linux_exec.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/plf_redboot_linux_exec.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,77 @@
+//==========================================================================
+//
+//      plf_redboot_linux_boot.c
+//
+//      Platform support for RedBoot command to boot Linux
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    gthomas
+// Contributors: 
+// Date:         2003-08-28
+// Purpose:      
+// Description:  
+//              
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_if.h>
+#include <cyg/hal/hal_intr.h>
+#include <cyg/hal/hal_cache.h>
+#include <cyg/hal/ppc_regs.h>
+#include <cyg/hal/redboot_linux_exec.h>
+
+//
+// Export system configuration - used when booting a Linux kernel
+// Note: this function is expected to set up the fields which are
+// platform/variant dependent.  It may also override any of the
+// architecture common fields (like memory layout, etc) as appropriate
+//
+externC void 
+plf_redboot_linux_exec(bd_t *board_info)
+{
+    board_info->bi_intfreq	= CYGHWR_HAL_POWERPC_CPU_SPEED*1000000;
+    board_info->bi_busfreq	= CYGHWR_HAL_POWERPC_MEM_SPEED*1000000;
+}
+
+//=========================================================================
+// EOF plf_redboot_linux_exec.c
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/simple_keyboard.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/simple_keyboard.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/simple_keyboard.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/simple_keyboard.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,1123 @@
+//=============================================================================
+//
+//      simple_keyboard.c
+//
+//      Simple keyboard code
+//
+//=============================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+// Copyright (C) 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//=============================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):   Carlos Duclos 
+// Contributors:
+// Date:        2005-05-26
+// Purpose:     Simple keyboard to be used with Redboot
+// Description: Simple keyboard to be used with Redboot. The differences between this driver and 
+//              the complete driver are:
+//              * lack of interrupts
+//              * there is no write() to play with keyboard leds
+//              * no keymaps
+//
+//####DESCRIPTIONEND####
+//
+//=============================================================================
+
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS
+#include <pkgconf/hal.h>
+
+#include <cyg/infra/cyg_type.h>         // base types
+#include <cyg/infra/cyg_trac.h>         // tracing macros
+#include <cyg/infra/cyg_ass.h>          // assertion macros
+
+#include <cyg/hal/hal_io.h>             // IO macros
+#include <cyg/hal/hal_diag.h>
+#include <cyg/hal/drv_api.h>
+
+#if defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS)
+#include <cyg/hal/hal_stub.h>           // hal_output_gdb_string
+#endif
+
+#include "xbasic_types.h"
+#include "xparameters.h"
+#include <xparameters_translation.h>
+#include "xps2.h"
+#include "xstatus.h"
+
+#define WAITING_KEYCODE 0
+#define WAITING_KEYUP 1
+#define WAITING_ECHO_SCANCODE 2
+#define LED_OFF 0
+#define LED_ON 1
+#define BUFFER_SIZE     32
+
+typedef struct {
+    unsigned char pool[ BUFFER_SIZE ];
+    unsigned char * pointer;
+    unsigned int total;
+} keyboard_buffer;
+
+static XPs2 keyboard_device;
+static keyboard_buffer incoming_characters;
+
+enum special_keys_states { NO_SPECIAL_KEY = 0, SHIFT_PRESSED, CTRL_PRESSED, ALT_PRESSED, CAPS_LOCK_PRESSED, NUM_LOCK_PRESSED };
+enum special_keys_desc { ALT = 17, SHIFT = 18, CTRL = 20, CAPS_LOCK = 88, NUM_LOCK = 119, SCROLL_LOCK = 126 };
+enum keyboard_commands { LEDS = 0xED, KBD_ACK = 0xFA };
+
+static cyg_uint8
+k2a( cyg_uint8 scancode )
+{
+    cyg_uint8 ascii = 0xFF;
+    static unsigned char special_key = NO_SPECIAL_KEY;
+
+    switch( scancode ) {
+    case 0:
+        break;
+    case 1:
+            break;
+    case 2:
+            break;
+    case 3:
+            break;
+    case 4:
+            break;
+    case 5:
+            break;
+    case 6:
+            break;
+    case 7:
+            break;
+    case 8:
+            break;
+    case 9:
+            break;
+    case 10:
+            break;
+    case 11:
+            break;
+    case 12:
+            break;
+    case 13:
+            break;
+    case 14:
+            break;
+    case 15:
+            break;
+    case 16:
+            break;
+    case 17:
+            ascii = ALT;
+            special_key = ALT_PRESSED;
+            break;
+    case 18:
+            ascii = SHIFT;
+            special_key = SHIFT_PRESSED;
+            break;
+    case 19:
+            break;
+    case 20:
+            ascii = CTRL;
+            special_key = CTRL_PRESSED;
+            break;
+    case 21:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'q';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'Q';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+    case 22:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '1';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '!';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 23:
+            break;
+        case 24:
+            break;
+        case 25:
+            break;
+        case 26:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'z';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'Z';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 27:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 's';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'S';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 28:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'a';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'A';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 29:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'w';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'W';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 30:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '2';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '@';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 31:
+            break;
+        case 32:
+            break;
+        case 33:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'c';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'C';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 34:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'x';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'X';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 35:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'd';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'D';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 36:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'e';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'E';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 37:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '4';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '$';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 38:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '3';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '#';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 39:
+            break;
+        case 40:
+            break;
+        case 41:
+            ascii = ' ';
+            break;
+        case 42:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'v';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'V';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+    case 43:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'f';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'F';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+    case 44:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 't';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'T';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+    case 45:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'r';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'R';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+    case 46:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '5';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '%';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+    case 47:
+            break;
+    case 48:
+            break;
+    case 49:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'n';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'N';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 50:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'b';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'B';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 51:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'h';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'H';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 52:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'g';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'G';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 53:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'y';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'Y';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 54:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '6';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '^';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 55:
+            break;
+        case 56:
+            break;
+        case 57:
+            break;
+        case 58:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'm';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'M';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 59:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'j';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'J';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 60:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'u';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'U';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 61:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '7';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '&';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 62:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '8';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '*';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 63:
+            break;
+        case 64:
+            break;
+        case 65:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = ',';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '<';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 66:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'k';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'K';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 67:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'i';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'I';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 68:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'o';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'O';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 69:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '0';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = ')';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 70:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '9';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '(';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 71:
+            break;
+        case 72:
+            break;
+        case 73:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '.';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '>';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 74:
+            break;
+        case 75:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'l';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'L';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 76:
+            break;
+        case 77:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = 'p';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = 'P';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 78:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '-';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '_';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 79:
+            break;
+        case 80:
+            break;
+        case 81:
+            break;
+        case 82:
+            break;
+        case 83:
+            break;
+        case 84:
+            break;
+        case 85:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '=';
+                    break;
+                case SHIFT_PRESSED:
+                    ascii = '+';
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+            }
+            break;
+        case 86:
+            break;
+        case 87:
+            break;
+        case 88:
+            ascii = 88;
+            break;
+        case 89:
+            //ascii = SHIFT_PRESSED;
+            //special_key = SHIFT_PRESSED;
+            break;
+        case 90:
+            ascii = '\r';
+            break;
+        case 91:
+            break;
+        case 92:
+            break;
+        case 93:
+            break;
+        case 94:
+            break;
+        case 95:
+            break;
+        case 96:
+            break;
+        case 97:
+            break;
+        case 98:
+            break;
+        case 99:
+            break;
+        case 102:
+            special_key = NO_SPECIAL_KEY;
+            ascii = '\b';
+            break;
+        case 105:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '1';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '1';
+                    break;
+            }
+            break;
+        case 107:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '4';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '4';
+                    break;
+            }
+            break;
+        case 108:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '7';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '7';
+                    break;
+            }
+            break;
+        case 112:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '0';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '0';
+                    break;
+            }
+            break;
+        case 114:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '2';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '2';
+                    break;
+            }
+            break;
+        case 115:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '5';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '5';
+                    break;
+            }
+            break;
+        case 116:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '6';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '6';
+                    break;
+            }
+            break;
+        case 117:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '8';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '8';
+                    break;
+            }
+            break;
+        case 119:
+            //ascii = 119;
+            //special_key = NUM_LOCK;
+            break;
+        case 122:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '3';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '3';
+                    break;
+            }
+            break;
+        case 125:
+            switch( special_key )
+            {
+                case NO_SPECIAL_KEY:
+                    ascii = '9';
+                    break;
+                case SHIFT_PRESSED:
+                    break;
+                case CTRL_PRESSED:
+                    break;
+                case ALT_PRESSED:
+                    break;
+                case NUM_LOCK_PRESSED:
+                    ascii = '9';
+                    break;
+            }
+            break;
+        case 126:
+            //ascii = 126;
+            //special_key = SCROLL_LOCK;
+            break;
+        case 0xF0:
+            if( special_key != NO_SPECIAL_KEY )
+                switch( special_key )
+                {
+                    case SHIFT:
+                    case ALT:
+                    case CTRL:
+                        special_key = NO_SPECIAL_KEY;
+                        break;
+                    default:
+                        break;
+                }
+            break;
+    default:
+        break;
+    }
+
+    return ascii;
+}
+
+// Get characters from keyboard
+static void get_incoming_characters()
+{
+    incoming_characters.pointer = incoming_characters.pool;
+    incoming_characters.total = XPs2_Recv(&keyboard_device, incoming_characters.pointer, sizeof(incoming_characters.pool));
+}
+
+/*
+ * Exported interface
+ */
+ 
+void init_simple_keyboard()
+{
+    XStatus stat;
+    stat = XPs2_Initialize(&keyboard_device, XPAR_PS2_DUAL_REF_0_DEVICE_ID );
+    if (stat != XST_SUCCESS) {
+        diag_printf( "Cannot initialize ps2 keyboard! \n" );
+        return;  // What else can be done?
+    }
+    incoming_characters.total = 0;
+    incoming_characters.pointer = incoming_characters.pool;
+}
+
+int read_simple_keyboard( cyg_uint8 * character )
+{
+    cyg_uint8 s = 0, t = 0;
+    static int state = WAITING_KEYCODE;
+
+    if( incoming_characters.total == 0 )
+        get_incoming_characters();
+    if( incoming_characters.total > 0 )
+    {
+        s = *incoming_characters.pointer++;
+        if( state == WAITING_KEYCODE )
+        {
+            t = k2a( s );
+            //diag_printf( "s = %u, t = %u \n", s, t );
+            if(t == 0xFF) 
+            {
+                incoming_characters.total--;
+                return -1;
+            } else if( t == ALT )
+            {
+                incoming_characters.total--;
+                return -1;
+            } else if( t == SHIFT )
+            {
+                incoming_characters.total--;
+                return -1;
+            } else if( t == CTRL )
+            {
+                incoming_characters.total--;
+                return -1;
+            } 
+            state = WAITING_KEYUP;
+            *character = t;
+            incoming_characters.total--;
+            return 0;
+        } else if( state == WAITING_KEYUP )
+        {
+            incoming_characters.total--;
+            state = WAITING_ECHO_SCANCODE;
+            return -1;
+        } else if( state == WAITING_ECHO_SCANCODE )
+        {
+            incoming_characters.total--;
+            state = WAITING_KEYCODE;
+            return -1;
+        }
+    }
+
+    return -1;
+}
+
+/*
+ * No interrupts, so these functions are provided only for compatibility
+ */
+
+void disable_interrupt_simple_keyboard()
+{
+}
+
+void enable_interrupt_simple_keyboard()
+{
+}
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/sysace.c ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/sysace.c
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/sysace.c	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/sysace.c	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,134 @@
+//==========================================================================
+//
+//      sysace.c
+//
+//      Support for RedBoot disk commands (via SysACE)
+//
+//==========================================================================
+//####ECOSGPLCOPYRIGHTBEGIN####
+// -------------------------------------------
+// This file is part of eCos, the Embedded Configurable Operating System.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
+// Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+//
+// eCos is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation; either version 2 or (at your option) any later version.
+//
+// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+// WARRANTY; without even the implied warranty of MERCHANTABILITY or
+// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+// for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with eCos; if not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+//
+// As a special exception, if other files instantiate templates or use macros
+// or inline functions from this file, or you compile this file and link it
+// with other works to produce a work based on this file, this file does not
+// by itself cause the resulting work to be covered by the GNU General Public
+// License. However the source code for this file must still be made available
+// in accordance with section (3) of the GNU General Public License.
+//
+// This exception does not invalidate any other reasons why a work based on
+// this file might be covered by the GNU General Public License.
+//
+// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+// at http://sources.redhat.com/ecos/ecos-license/
+// -------------------------------------------
+//####ECOSGPLCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    gthomas
+// Contributors: 
+// Date:         2003-08-28
+// Purpose:      
+// Description:  
+//              
+// This code is part of RedBoot (tm).
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#include <redboot.h>
+#include <cyg/hal/hal_io.h>
+#include <fs/disk.h>
+#include <xsysace.h>
+#include <xparameters.h>
+#include <xparameters_translation.h>
+
+static XSysAce ace;
+
+static int sysace_read(struct disk *d,
+                       cyg_uint32 start_sector,
+                       cyg_uint32 *buf,
+                       cyg_uint8  nr_sectors);
+
+static disk_funs_t sysace_funs = { sysace_read };
+
+static int 
+sysace_read(struct disk *d,
+            cyg_uint32 start_sector,
+            cyg_uint32 *buf,
+            cyg_uint8  nr_sectors)
+{
+    if (XSysAce_Lock(&ace, 0) != XST_SUCCESS) {
+        diag_printf("Can't lock SysACE\n");
+        return 0;
+    }
+    if (XSysAce_SectorRead(&ace, start_sector, nr_sectors, (Xuint8 *)buf) != XST_SUCCESS) {
+        diag_printf("SysACE read failed - sec: %d, count: %d\n", start_sector, nr_sectors);
+        XSysAce_Unlock(&ace);
+        return 0;
+    }
+    XSysAce_Unlock(&ace);
+    return 1;
+}
+
+static void
+sysace_init(void)
+{
+    XSysAce_CFParameters drive_info;
+    disk_t disk;
+
+    if (XSysAce_Initialize(&ace, XPAR_SYSACE_0_DEVICE_ID) != XST_SUCCESS) {
+        diag_printf("Can't initialize SysACE?\n");
+        return;
+    }
+    if (XSysAce_Lock(&ace, 0) != XST_SUCCESS) {
+        diag_printf("Can't lock SysACE\n");
+        return;
+    }
+    if (XSysAce_IdentifyCF(&ace, &drive_info) != XST_SUCCESS) {
+        diag_printf("Can't get SysACE info\n");
+        XSysAce_Unlock(&ace);
+        return;
+    }
+    XSysAce_Unlock(&ace);
+#if 0
+    diag_printf("SysACE - sectors: %d (%d/%d/%d) - %d bytes/sector\n", 
+                drive_info.NumSectorsPerCard, 
+                drive_info.NumCylinders,
+                drive_info.NumHeads,
+                drive_info.NumSectorsPerTrack,
+                drive_info.NumBytesPerSector);
+    diag_dump_buf(drive_info.ModelNo, 64);
+#endif
+    memset(&disk, 0, sizeof(disk));
+    disk.funs = &sysace_funs;
+//	    disk.private = priv;
+    disk.kind = DISK_IDE_HD;
+    disk.nr_sectors = (drive_info.NumCylinders * drive_info.NumHeads * drive_info.NumSectorsPerTrack);
+
+    if (!disk_register(&disk)) {
+        return;
+    }
+}
+
+RedBoot_init(sysace_init, RedBoot_INIT_FIRST);
+
+//=========================================================================
+// EOF sysace.c
diff -Naur ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/virtex4.S ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/virtex4.S
--- ecos-clean/ecos/packages/hal/powerpc/virtex4/current/src/virtex4.S	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/virtex4/current/src/virtex4.S	2006-05-03 17:34:30.000000000 +0200
@@ -0,0 +1,111 @@
+##=============================================================================
+##
+##      virtex4.S
+##
+##      VIRTEX4 board hardware setup
+##
+##=============================================================================
+#####ECOSGPLCOPYRIGHTBEGIN####
+## -------------------------------------------
+## This file is part of eCos, the Embedded Configurable Operating System.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+## Copyright (C) 2002, 2003, 2004, 2005 Mind n.v.
+##
+## eCos is free software; you can redistribute it and/or modify it under
+## the terms of the GNU General Public License as published by the Free
+## Software Foundation; either version 2 or (at your option) any later version.
+##
+## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
+## WARRANTY; without even the implied warranty of MERCHANTABILITY or
+## FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+## for more details.
+##
+## You should have received a copy of the GNU General Public License along
+## with eCos; if not, write to the Free Software Foundation, Inc.,
+## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+##
+## As a special exception, if other files instantiate templates or use macros
+## or inline functions from this file, or you compile this file and link it
+## with other works to produce a work based on this file, this file does not
+## by itself cause the resulting work to be covered by the GNU General Public
+## License. However the source code for this file must still be made available
+## in accordance with section (3) of the GNU General Public License.
+##
+## This exception does not invalidate any other reasons why a work based on
+## this file might be covered by the GNU General Public License.
+##
+## Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
+## at http://sources.redhat.com/ecos/ecos-license/
+## -------------------------------------------
+#####ECOSGPLCOPYRIGHTEND####
+##=============================================================================
+#######DESCRIPTIONBEGIN####
+##
+## Author(s):   gthomas
+## Contributors:hmt, Jan Olbrechts
+## Date:        2002-07-22
+## Purpose:     ML300 board hardware setup
+## Description: This file contains any code needed to initialize the
+##              hardware on a TAMS ML300 (PowerPC 405GPr) board.
+##
+######DESCRIPTIONEND####
+##
+##=============================================================================
+
+#include <pkgconf/hal.h>
+#include <cyg/hal/arch.inc>		/* register symbols et al */
+#define CYGARC_HAL_COMMON_EXPORT_CPU_MACROS        
+#include <cyg/hal/ppc_regs.h>		/* on-chip resource layout, special */
+
+#------------------------------------------------------------------------------
+
+// No useable LEDs
+#define LED(x)                          
+	
+#------------------------------------------------------------------------------       
+                
+FUNC_START( hal_hardware_init )
+        li      r3,0x00000000         // Make sure nothing is cacheable
+        mticcr  r3
+        mtdccr  r3
+        // Force data caches to be totally clean
+        lwi     r3,0
+        lwi     r4,0x8000
+10:     dcbf    0,r3
+        dccci   0,r3
+        addi    r3,r3,16
+        cmpw    r3,r4
+        bne     10b
+        lwi     r3,0x80000000         // DRAM cached - instructions only
+        iccci   0,r3
+        mticcr  r3
+#ifdef MNDHWR_VIRTEX4_DATACACHE
+        lwi     r3,0x80000000
+        mtdccr  r3
+#endif
+	blr
+FUNC_END( hal_hardware_init )
+
+        .globl  _hang
+_hang:   nop
+        b       _hang
+        blr
+        
+#ifdef CYG_HAL_STARTUP_ROMRAM
+        .section .boot0,"ax"
+        .global _boot0
+
+_boot0: 
+        lwi     r0,_start
+        mtlr    r0
+        blr
+
+        .section .boot,"ax"
+        .global _boot
+
+_boot:  
+        b       _boot0
+#endif        
+
+#------------------------------------------------------------------------------
+# end of virtex4.S
diff -Naur ecos-clean/ecos/packages/redboot/current/ChangeLog ecos-ml403/ecos/packages/redboot/current/ChangeLog
--- ecos-clean/ecos/packages/redboot/current/ChangeLog	2006-04-08 01:00:00.000000000 +0200
+++ ecos-ml403/ecos/packages/redboot/current/ChangeLog	2006-05-03 17:34:56.000000000 +0200
@@ -969,7 +969,7 @@
 	* cdl/redboot.cdl: Put virtually all options inside
 	CYGBLD_BUILD_REDBOOT. And indent accordingly.
 
-2003-02-04  Gary Thomas  <gary@mind.be>
+2003-02-04  Gary Thomas
 
 	* src/fs/ide.c: Print more info if failed to identify IDE device.
 
@@ -1000,7 +1000,7 @@
 	* src/decompress.c (gzip_close): Don't complain that decompression
 	didn't complete when the stream reaches its end.
 
-2002-12-18  David Mazur  <david@mind.be>
+2002-12-18  David Mazur
 2002-12-18  Mark Salter  <msalter@redhat.com>
 
 	* src/fs/e2fs.c (e2fs_get_gdesc): Fixed handling of group descriptor
diff -Naur ecos-clean/ecos/packages/redboot/current/src/main.c ecos-ml403/ecos/packages/redboot/current/src/main.c
--- ecos-clean/ecos/packages/redboot/current/src/main.c	2006-02-25 15:21:12.000000000 +0100
+++ ecos-ml403/ecos/packages/redboot/current/src/main.c	2006-05-03 17:34:56.000000000 +0200
@@ -275,7 +275,6 @@
 #endif
     console_echo = true;
     CYGACC_CALL_IF_DELAY_US((cyg_int32)2*100000);
-
     ram_start = (unsigned char *)CYGMEM_REGION_ram;
     ram_end = (unsigned char *)(CYGMEM_REGION_ram+CYGMEM_REGION_ram_SIZE);
 #ifdef HAL_MEM_REAL_REGION_TOP
@@ -491,7 +490,6 @@
 #else
     (*fun)();
 #endif
-
     HAL_THREAD_LOAD_CONTEXT(&saved_context);
 }
 
@@ -537,9 +535,7 @@
               (void *)&stop_net, (bool *)0, "go with network driver stopped");
     num_options++;
 #endif
-
     CYG_ASSERT(num_options <= NUM_ELEMS(opts), "Too many options");
-
     if (!scan_opts(argc, argv, 1, opts, num_options, (void *)&entry, OPTION_ARG_TYPE_NUM, "starting address"))
     {
         return;
@@ -567,7 +563,6 @@
             script_timeout_ms -= CYGNUM_REDBOOT_CLI_IDLE_TIMEOUT;
         }
     }
-
     // Mask interrupts on all channels
     cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
     for (i = 0;  i < CYGNUM_HAL_VIRTUAL_VECTOR_NUM_CHANNELS;  i++) {
@@ -576,15 +571,12 @@
 	CYGACC_COMM_IF_CONTROL( *__chan, __COMMCTL_IRQ_DISABLE );
     }
     CYGACC_CALL_IF_SET_CONSOLE_COMM(cur);
-
     __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
     CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_ENABLE_LINE_FLUSH);
-
 #ifdef CYGPKG_IO_ETH_DRIVERS
     if (stop_net)
 	eth_drv_stop();
 #endif
-	
     HAL_DISABLE_INTERRUPTS(oldints);
     HAL_DCACHE_SYNC();
     if (!cache_enabled) {
@@ -605,8 +597,8 @@
 
     // undo the changes we made before switching context
     if (!cache_enabled) {
-	HAL_ICACHE_ENABLE();
-	HAL_DCACHE_ENABLE();
+        HAL_ICACHE_ENABLE();
+        HAL_DCACHE_ENABLE();
     }
 
     CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_DISABLE_LINE_FLUSH);
diff -Naur ecos-clean/ecos/TODO ecos-ml403/ecos/TODO
--- ecos-clean/ecos/TODO	1970-01-01 01:00:00.000000000 +0100
+++ ecos-ml403/ecos/TODO	2006-05-03 17:33:46.000000000 +0200
@@ -0,0 +1,4 @@
+ - GDB stubs
+ - fix interrupt-driven keyboard driver
+ - better char lcd API
+
diff -Naur ecos-clean/ecos/packages/hal/common/current/src/hal_if.c ecos-ml403/ecos/packages/hal/common/current/src/hal_if.c
--- ecos-clean/ecos/packages/hal/common/current/src/hal_if.c	2005-04-27 21:08:35.000000000 +0200
+++ ecos-ml403/ecos/packages/hal/common/current/src/hal_if.c	2006-05-03 17:34:20.000000000 +0200
@@ -1016,10 +1016,12 @@
         // necessary. If no stubs are included it does not hurt and is
         // likely to be required by the hal_if_diag_init code anyway
         // as it may rely on it if using a mangler.
+#ifdef CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL
         set_debug_comm(CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL);
         // Set console channel to a safe default. hal_if_diag_init
         // will override with console channel or mangler if necessary.
         set_console_comm(CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL);
+#endif /* CYGNUM_HAL_VIRTUAL_VECTOR_DEBUG_CHANNEL */
     }
 
     // Reset console interrupt flag.
diff -Naur ecos-clean/ecos/packages/hal/powerpc/arch/current/include/hal_intr.h ecos-ml403/ecos/packages/hal/powerpc/arch/current/include/hal_intr.h
--- ecos-clean/ecos/packages/hal/powerpc/arch/current/include/hal_intr.h	2003-12-11 16:17:04.000000000 +0100
+++ ecos-ml403/ecos/packages/hal/powerpc/arch/current/include/hal_intr.h	2006-05-03 17:34:30.000000000 +0200
@@ -368,7 +369,7 @@
 
 
 #ifndef CYGHWR_HAL_INTERRUPT_CONTROLLER_ACCESS_DEFINED
-
+#error "You are not using and interrupt controller! dummy functions will be used"
 #define HAL_INTERRUPT_MASK( _vector_ )
 
 #define HAL_INTERRUPT_UNMASK( _vector_ )

