From b7a4d931e64714d1611cb5e685ccca8fb5f07c7b Mon Sep 17 00:00:00 2001 From: Karel Gardas Date: Sat, 19 Sep 2020 20:12:45 +0000 Subject: pc386 BSP: add runtime options for debugging and move few lines around for better context. --- user/bsps/bsps-i386.rst | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/user/bsps/bsps-i386.rst b/user/bsps/bsps-i386.rst index 91908f1..42f3ebf 100644 --- a/user/bsps/bsps-i386.rst +++ b/user/bsps/bsps-i386.rst @@ -140,6 +140,9 @@ inside the Qemu emulator. specifies target device for printk/getk calls. E.g. ``--printk=/dev/vgacons`` +If the specified console device is not present then suitable fallback +device is selected based on the device order specified in `Console Drivers`. + .. option:: --video= specifies required video mode. The options applies only to @@ -157,12 +160,27 @@ inside the Qemu emulator. disables usage of COM1 thorough COM4. -If the specified console device is not present then suitable fallback -device is selected based on the device order specified in `Console Drivers`. +.. option:: --gdb= -PCI-based UART devices are named ``/dev/pcicom`` as they are -probed and found. The numbers sequence starts with 1. E.g. first PCI -UART device found is accessible with ``/dev/pcicom1`` name. + specifies UART device for communication between BSP's + GDB stub and GDB running on a host system. Option accepts device + and baud rate like the ``--console`` option above. + E.g. ``--gdb=/dev/com2,115200`` instructs BSP to use COM2 device + for GDB stub/host communication with the speed of 115200 bauds. + + .. note:: default GDB stub/host communication speed and other + communication properties are same like for console over + UART. E.g. 9600 baud rate, 8 data bits, no parity + and 1 stop bit. + +.. option:: --gdb-break + + halts BSP execution at a break point in the BSP initialization code + and waits for GDB connection. + +.. option:: --gdb-remote-debug + + outputs the GDB remote protocol data to printk. Testing with Qemu ----------------- @@ -321,6 +339,10 @@ following order of priority: - COM1 thorough COM4 - Any COM devices on the PCI bus including IO and memory mapped +PCI-based UART devices are named ``/dev/pcicom`` as they are +probed and found. The numbers sequence starts with 1. E.g. first PCI +UART device found is accessible with ``/dev/pcicom1`` name. + Besides supporting generic devices above, the BSP also support specific UART chips. The drivers for those are not initialized automatically, but requires initialization from the application code: -- cgit v1.2.3