diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-04-04 15:05:28 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2014-05-26 10:52:16 +0200 |
commit | f2f7f03aff2df2471fce08f48bb0a6583263158e (patch) | |
tree | 45aa9e5c906b6184f9699fcc707c42f0995baa44 /src/console | |
parent | c009601f29847aa91ec2f5a89a02f46a2119c5a4 (diff) |
console: Add console for GDB
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 <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5343
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src/console')
-rw-r--r-- | src/console/console.c | 24 |
1 files changed, 24 insertions, 0 deletions
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 <rules.h> #include <console/streams.h> #include <console/cbmem_console.h> #include <console/uart.h> @@ -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 |