summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/startup
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-04-08 18:39:38 +1000
committerChris Johns <chrisj@rtems.org>2016-05-11 11:45:01 +1000
commit014292a164b8bb5286b6c7dae7c37a469ef6f0cc (patch)
treec7343485ef520fc71f36e5cf8271e08a2c1de789 /c/src/lib/libbsp/i386/pc386/startup
parentbsp/qoriq: Add portal clear functions (diff)
downloadrtems-014292a164b8bb5286b6c7dae7c37a469ef6f0cc.tar.bz2
i386/pc386: Add support for the gdb stub to use available console drivers.
Move the gdb stub from the i386 UART code to use the libchip drivers. Use any ports discovered during the probes. Add gdb control to the boot command line. Change the device naming to the full device path, not a partial path. For example /dev/com1.
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/startup')
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/bspstart.c29
-rw-r--r--c/src/lib/libbsp/i386/pc386/startup/ldsegs.S2
2 files changed, 23 insertions, 8 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
index 41f858b5d0..0559fbe065 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
+++ b/c/src/lib/libbsp/i386/pc386/startup/bspstart.c
@@ -10,6 +10,9 @@
* It was subsequently adapted as part of the pc386 BSP by developers from
* the NavIST Group in 1997.
*
+ * Copyright (c) 2016.
+ * Chris Johns <chrisj@rtems.org>
+ *
* COPYRIGHT (c) 1989-2008, 2016.
* On-Line Applications Research Corporation (OAR).
*
@@ -107,16 +110,29 @@ static void bsp_start_default( void )
bsp_pci_initialize_helper();
/*
- * Probe for UARTs on PCI. One of these may end up as the console.
+ * Probe for legacy UARTs.
+ */
+ legacy_uart_probe();
+
+ /*
+ * Probe for UARTs on PCI.
*/
pci_uart_probe();
/*
- * Figure out where printk() and console IO is to be directed.
- * Do this after the PCI bus is initialized so we have a chance
- * for those devices to be added to the set in the console driver.
- * In general, Do it as early as possible so printk() has a chance
- * to work early on devices found via PCI probe.
+ * Parse the GDB arguments and flag a serial port as not valid. This stops
+ * the console from claming the port.
+ */
+#if BSP_GDB_STUB
+ pc386_parse_gdb_arguments();
+#endif
+
+ /*
+ * Figure out where printk() and console IO is to be directed. Do this after
+ * the legacy and PCI bus probes so we have a chance for those devices to be
+ * added to the set in the console driver. In general, do it as early as
+ * possible so printk() has a chance to work early on devices found via PCI
+ * probe.
*/
pc386_parse_console_arguments();
@@ -127,7 +143,6 @@ static void bsp_start_default( void )
#if BSP_ENABLE_IDE
bsp_ide_cmdline_init();
#endif
-
} /* bsp_start_default */
/*
diff --git a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
index 82ff982331..ea41874a1b 100644
--- a/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
+++ b/c/src/lib/libbsp/i386/pc386/startup/ldsegs.S
@@ -110,7 +110,6 @@ next_step:
movw ax, fs
movw ax, gs
-#if (BSP_IS_EDISON == 0)
/*---------------------------------------------------------------------+
| Now we have to reprogram the interrupts :-(. We put them right after
| the intel-reserved hardware interrupts, at int 0x20-0x2F. There they
@@ -121,6 +120,7 @@ next_step:
| it isn't fun.
+---------------------------------------------------------------------*/
+#if (BSP_IS_EDISON == 0)
movb $0x11, al /* initialization sequence */
outb al, $0x20 /* send it to 8259A-1 */
call SYM(pc386_delay)