This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RedBoot - export version info via virtual vector table
- From: Gary Thomas <gthomas at ecoscentric dot com>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 03 Dec 2002 12:51:07 -0700
- Subject: RedBoot - export version info via virtual vector table
Index: hal/common/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/common/current/ChangeLog,v
retrieving revision 1.81
diff -u -5 -p -r1.81 ChangeLog
--- hal/common/current/ChangeLog 13 Nov 2002 21:04:54 -0000 1.81
+++ hal/common/current/ChangeLog 3 Dec 2002 19:47:22 -0000
@@ -1,5 +1,12 @@
+2002-12-03 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/hal_if.c (hal_if_init):
+ * include/hal_if.h:
+ * cdl/hal.cdl: Allow monitor (RedBoot) version string to be exported
+ via the virtual vector table.
+
2002-11-13 Gary Thomas <gthomas@ecoscentric.com>
* cdl/hal.cdl: Add CDL control over DATA cache startup mode.
2002-09-11 Mark Salter <msalter@redhat.com>
Index: hal/common/current/cdl/hal.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/common/current/cdl/hal.cdl,v
retrieving revision 1.17
diff -u -5 -p -r1.17 hal.cdl
--- hal/common/current/cdl/hal.cdl 13 Nov 2002 21:04:55 -0000 1.17
+++ hal/common/current/cdl/hal.cdl 3 Dec 2002 19:43:43 -0000
@@ -304,10 +304,19 @@ cdl_package CYGPKG_HAL {
description "
This option will cause the reset and kill_by_reset
virtual vectors to be claimed."
}
+ cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_VERSION {
+ display "Claim version virtual vectors"
+ default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
+ || CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
+ description "
+ This option will cause the version
+ virtual vectors to be claimed."
+ }
+
cdl_option CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DELAY_US {
display "Claim delay_us virtual vector"
default_value { CYGSEM_HAL_VIRTUAL_VECTOR_INIT_WHOLE_TABLE \
|| CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DEFAULT }
description "
Index: hal/common/current/include/hal_if.h
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/common/current/include/hal_if.h,v
retrieving revision 1.17
diff -u -5 -p -r1.17 hal_if.h
--- hal/common/current/include/hal_if.h 11 Sep 2002 12:14:51 -0000 1.17
+++ hal/common/current/include/hal_if.h 3 Dec 2002 19:46:57 -0000
@@ -10,10 +10,11 @@
//=============================================================================
//####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 Gary Thomas
//
// 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.
//
@@ -355,11 +356,11 @@ __call_COMM1(IF_GETC_TIMEOUT, cyg_bool,
#define CYGNUM_CALL_IF_available_9 9
#define CYGNUM_CALL_IF_available_10 10
#define CYGNUM_CALL_IF_available_11 11
#define CYGNUM_CALL_IF_SET_DEBUG_COMM 12
#define CYGNUM_CALL_IF_SET_CONSOLE_COMM 13
-#define CYGNUM_CALL_IF_available_14 14
+#define CYGNUM_CALL_IF_MONITOR_VERSION 14
#define CYGNUM_CALL_IF_DBG_SYSCALL 15
#define CYGNUM_CALL_IF_RESET 16
#define CYGNUM_CALL_IF_CONSOLE_INTERRUPT_FLAG 17
#define CYGNUM_CALL_IF_DELAY_US 18
#define CYGNUM_CALL_IF_DBG_DATA 19
@@ -420,10 +421,11 @@ typedef void (__call_if_reset_t)(void);
typedef int __call_if_console_interrupt_flag_t;
typedef void (__call_if_delay_us_t)(cyg_int32 usecs);
typedef void (__call_if_install_bpt_fn_t)(void *__epc);
typedef cyg_bool (__call_if_flash_cfg_op_fn_t)(int __oper, char *__key,
void *__val, int __type);
+typedef char *__call_if_monitor_version_t;
#ifndef CYGACC_CALL_IF_DEFINED
#define __data_VV(_n_,_tt_) \
static __inline__ _tt_ \
@@ -583,10 +585,16 @@ __call_VV2(CYGNUM_CALL_IF_DBG_SYSCALL, _
__call_voidVV0(CYGNUM_CALL_IF_RESET, __call_if_reset_t, void)
#define CYGACC_CALL_IF_RESET_SET(_x_) \
hal_virtual_vector_table[CYGNUM_CALL_IF_RESET]=(CYG_ADDRWORD)(_x_)
#define CYGACC_CALL_IF_RESET_GET() \
((__call_if_reset_t*)hal_virtual_vector_table[CYGNUM_CALL_IF_RESET])
+
+#define CYGACC_CALL_IF_MONITOR_VERSION() \
+ CYGACC_DATA_VV(__call_if_monitor_version_t, CYGNUM_CALL_IF_MONITOR_VERSION)
+__data_VV(CYGNUM_CALL_IF_MONITOR_VERSION, __call_if_monitor_version_t)
+#define CYGACC_CALL_IF_MONITOR_VERSION_SET(_x_) \
+ hal_virtual_vector_table[CYGNUM_CALL_IF_MONITOR_VERSION]=(CYG_ADDRWORD)(_x_)
#define CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG() \
CYGACC_DATA_VV(__call_if_console_interrupt_flag_t, CYGNUM_CALL_IF_CONSOLE_INTERRUPT_FLAG)
__data_VV(CYGNUM_CALL_IF_CONSOLE_INTERRUPT_FLAG, __call_if_console_interrupt_flag_t)
#define CYGACC_CALL_IF_CONSOLE_INTERRUPT_FLAG_SET(_x_) \
Index: hal/common/current/src/hal_if.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/hal/common/current/src/hal_if.c,v
retrieving revision 1.20
diff -u -5 -p -r1.20 hal_if.c
--- hal/common/current/src/hal_if.c 23 May 2002 23:02:48 -0000 1.20
+++ hal/common/current/src/hal_if.c 3 Dec 2002 19:47:23 -0000
@@ -7,10 +7,11 @@
//=============================================================================
//####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 Gary Thomas
//
// 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.
//
@@ -891,10 +892,14 @@ hal_if_init(void)
#endif
// Data entries not currently supported in eCos
#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_DATA
CYGACC_CALL_IF_DBG_DATA_SET(0);
+#endif
+
+#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_VERSION
+ CYGACC_CALL_IF_MONITOR_VERSION_SET(0);
#endif
// Comm controls
#ifdef CYGSEM_HAL_VIRTUAL_VECTOR_CLAIM_COMMS
{
Index: redboot/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.83
diff -u -5 -p -r1.83 ChangeLog
--- redboot/current/ChangeLog 5 Nov 2002 04:27:05 -0000 1.83
+++ redboot/current/ChangeLog 3 Dec 2002 19:47:46 -0000
@@ -1,5 +1,9 @@
+2002-12-03 Gary Thomas <gthomas@ecoscentric.com>
+
+ * src/main.c: Export version string via virtual vector table.
+
2002-11-05 Jonathan Larmour <jifl@eCosCentric.com>
* src/io.c (_rb_gets_preloaded): Null terminate when buffer full.
2002-10-24 Gary Thomas <gthomas@ecoscentric.com> (inspired by)
Index: redboot/current/src/main.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/main.c,v
retrieving revision 1.36
diff -u -5 -p -r1.36 main.c
--- redboot/current/src/main.c 16 Sep 2002 13:18:41 -0000 1.36
+++ redboot/current/src/main.c 3 Dec 2002 19:42:05 -0000
@@ -126,16 +126,16 @@ extern void HAL_ARCH_PROGRAM_NEW_STACK(v
void
do_version(int argc, char *argv[])
{
- extern char RedBoot_version[];
#ifdef CYGPKG_IO_FLASH
externC void _flash_info(void);
#endif
+ char *version = CYGACC_CALL_IF_MONITOR_VERSION();
- diag_printf(RedBoot_version);
+ diag_printf(version);
#ifdef HAL_PLATFORM_CPU
diag_printf("Platform: %s (%s) %s\n", HAL_PLATFORM_BOARD, HAL_PLATFORM_CPU, HAL_PLATFORM_EXTRA);
#endif
diag_printf("Copyright (C) 2000, 2001, 2002, Red Hat, Inc.\n\n");
diag_printf("RAM: %p-%p, %p-%p available\n",
@@ -178,10 +178,14 @@ cyg_start(void)
static char line[CYGPKG_REDBOOT_MAX_CMD_LINE];
char *command;
struct cmd *cmd;
int cur;
struct init_tab_entry *init_entry;
+ extern char RedBoot_version[];
+
+ // Export version information
+ CYGACC_CALL_IF_MONITOR_VERSION_SET(RedBoot_version);
// Make sure the channels are properly initialized.
diag_init_putc(_mon_write_char);
hal_if_diag_init();
--
------------------------------------------------------------
Gary Thomas |
eCosCentric, Ltd. |
+1 (970) 229-1963 | eCos & RedBoot experts
gthomas@ecoscentric.com |
http://www.ecoscentric.com/ |
------------------------------------------------------------