startup-x86, startup-x86-32

Startup for x86 systems (QNX Neutrino)

Syntax:

startup-x86 [-ABbCTx] [-D channel[.channel_opts]] [-F [~]value]
    [-f [cpu_freq][,[cycles_freq][,timer_freq]]] 
    [-I flag] [-i ifs2_size[,flags][,paddr_src][,paddr_dst]]
    [-j addr] [-K channel[.channel_opts]]
    [-N hostname] [-P max_cpus] [-p str]
    [-R size[,align[,name[,use_low_memory]]]] [-r addr,size[,flag]]
    [-S [~]section] [-s size] [-v[v]...] [-z[z]]

startup-x86-32 [-ABbCTx] [-D channel[.channel_opts]] [-F [~]value]
    [-f [cpu_freq][,[cycles_freq][,timer_freq]]] 
    [-I flag] [-i ifs2_size[,flags][,paddr_src][,paddr_dst]]
    [-j addr] [-K channel[.channel_opts]]
    [-N hostname] [-P max_cpus] [-p str]
    [-R size[,align[,name[,use_low_memory]]]] [-r addr,size[,flag]]
    [-S [~]section] [-s size] [-v[v]...] [-z[z]]

Runs on:

QNX Neutrino

Targets:

x86 and x86_64

Options:

In addition to the generic startup-* and x86-specific options, startup-x86 and startup-x86-32 support the following options:

-b
Don't reserve the bottom 4 KB of memory for virtual 8086 mode. This provides an extra 4 KB of memory for system use.
-p str
Add a device to the known PCI device table. The format of str is Bx:Dy:Fz, where x, y, and z are the bus, device and functions numbers. You can specify multiple -p options in order to add more devices.
-s size
Copy the given amount of video card ROM into RAM, and set the x86 page tables to refer to the RAM copy rather than the ROM. The size is in bytes, unless followed by one of K (kilobytes), M (megabytes), or G (gigabytes). Specifying the -s option causes the following call:
x86_pcbios_shadow_rom( 0xc0000, size );

For more information, see the Startup Library chapter of Building Embedded Systems.

Debug channels

The debug channel specified with the -D and -K options can be:

8250[.port[^shift[.baud[.clock[.divisor]]]]]
Use a generic 8250-compatible serial chip, specifying the I/O port base address for the 8250, in hexadecimal. The default is 0x3f8.
8250_pci_io[.bus:device:function:bar[^shift[.baud[.clock[.divisor]]]]]
Use a generic 8250-compatible serial chip, specifying the PCI bus, device ID, function, and BAR. The default is 0:24:2:0.
console
Use the PC console.

The common arguments for the 8250 and 8250_pci_io channel definitions are as follows:

Argument Description Default (8250) Default (PCI)
shift The spacing between the I/O registers, in 2shift bytes 0 2
baud The baud rate for the debug channel 57600 115200
clock The clock rate (in Hz) input to the chip 1843200 1843200
divisor The divisor used on the clock rate by the chip 16 16

You can skip options by leaving out the data associated with that part. For example, if you want to send the debugging output to an 8250 chip using 9600 baud, use:

-D 8250..9600

The default -D and -K settings are:

-D console
-K 8250.3f8^0.57600.1843200.16

Description:

The startup-x86 and startup-x86-32 programs are the startup for x86 boards. They're similar, except that startup-x86 uses 64-bit physical addresses, and startup-x86-32 uses 32-bit ones.

Note:
  • In order to prevent the sharing of the HPET0 interrupt with PCI devices, it's configured in legacy interrupt mode and so uses IRQ 2. This configuration also configures HPET1 in legacy interrupt mode on IRQ8, which eliminates the use of the RTC interrupts. The QNX Neutrino RTOS doesn't use RTC interrupts; if you need to use them, use the -z option to startup-x86 or startup-x86-32 to revert to the 8254 as system clock. Other HPET timers (if the system supports them) aren't affected by the legacy interrupt routing of HPET0 and HPET1.
  • The Execute Disable Bit prevents data segments from being executed as if they were code. For legacy reasons, the BIOS might let you disable this bit, but doing so can cause security problems. If you're using the x86_64 kernel, this bit must be enabled.

Examples:

Direct debug output to the console:

startup-x86 -Nnode120 -vvvv -Dconsole

Direct debug output to the first serial port (making sure the baud rate was set to 115200 on the receiving side):

startup-x86 -Nnode120 -vvvv -D8250..115200

Direct debug output to the serial port at 0x2f8:

startup-x86 -Nnode120 -vvvv -D8250.2f8.115200