summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/pc386/README
blob: 4ed8829719a60e09ddb2f9ddd0d452959f809f2d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#
# This board support package works with a target PC
#

This BSP supports a standard Intel/AMD PC on i386 and up CPUs. If on
a Pentium or above, the TSC register is used for timing calibration
purposes rather than relying entirely on the i8254.

Partial support is implemented for more modern PCs which do not have
a complete complement of legacy peripherals.

Console/Printk Device Selection
===============================
The pc386 console device driver supports a variety of devices
including the VGA/keyboard and a number of serial ports. The
default console is selected based on which devices are present
in the following order of priority:

+ VGA and keyboard
+ COM1 through COM4aaa

+ Any COM devices on the PCI bus including IO and memory mapped.

Beyond the dynamic probing for device presence, a combination of
configure and boot time options are available. By default, all devices
are enabled. The configure time options are:

+ BSP_ENABLE_VGA - value of 1 to enable, 0 to disable
+ BSP_ENABLE_COM1_COM4 - value of 1 to enable, 0 to disable
+ BSP_USE_COM1_AS_CONSOLE - value of 1 forces console to COM1

An example of using these to force the console to COM1 is:

../rtems/configure --target=i386-rtems4.12 \
  USE_COM1_AS_CONSOLE=1 --enable-rtemsbsp=pc386 \
  ... other arguments ...

The --console and --printk options can be used to specify the
device associated with stdin, stdout, and stderr as well as
the device associated with kernel debug IO (e.g. printk()/getk()).
Both take the name of a device without the "/dev/" prefix.

The --console argument is interpreted first and assumed to
specify the console and kernel debug IO device. The --printk
is then interpreted to specify the debug kernel IO device.
For example,

--console=/dev/com1 --printk=/dev/vgacons

specifies that com1 is to be used for stdin, stdout, and stderr
while the VGA console is to be used for kernel debug IO.
Note that the lower case com1 is intentional as this maps to
the RTEMS device /dev/com1.

The device name may be followed by a baud rate. The following
example illustrates this:

--console=/dev/com1,19200 --printk=/dev/vgacons

If the specified device is not present, then a suitable fallback
device is selected. The fallback order is based upon the probe
order listed earlier.

PCI UART devices are /dev/pcicom1 etc as they are probed and found.

GDB
===

GDB can be support using:

 --gdb=/dev/com1,115200  : where the device and baudrate are selectable.
 --gdb-break             : halt at a break point in the BSP and wait for GDB.
 --gdb-remote-debug      : Output the GDB remote protocol data to printk

The GDB stub details and in shared/comm/GDB.HOWTO.