From f2f7f03aff2df2471fce08f48bb0a6583263158e Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Fri, 4 Apr 2014 15:05:28 +0300 Subject: console: Add console for GDB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Connection of UARTs to GDB stub got lost in the console transition process, bring it back. In theory, GDB stub should work also over usbdebug, but that solution is not really tested at all yet. Change-Id: I90e05e8132889e788b92e055ee191f35add43bbc Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/5343 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/console/console.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/console') diff --git a/src/console/console.c b/src/console/console.c index 9b1c25542a..bd03144a32 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -17,6 +17,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include #include @@ -53,3 +54,26 @@ void console_tx_flush(void) __ne2k_tx_flush(); __usb_tx_flush(); } + + +#if CONFIG_GDB_STUB && (ENV_ROMSTAGE || ENV_RAMSTAGE) +void gdb_hw_init(void) +{ + __gdb_hw_init(); +} + +void gdb_tx_byte(unsigned char byte) +{ + __gdb_tx_byte(byte); +} + +void gdb_tx_flush(void) +{ + __gdb_tx_flush(); +} + +unsigned char gdb_rx_byte(void) +{ + return __gdb_rx_byte(); +} +#endif -- cgit v1.2.3