API Reference: Libraries

 Top

kontron_pitx-sp

NAME

kontron_pitx-sp - Kontron pITX-SP board

INTRODUCTION

This document provides board-specific information necessary to run VxWorks on the Kontron pITX-SP board. Before using the board with VxWorks, verify that the board runs in the factory configuration by using vendor-supplied ROMs and jumper settings

Jumpers & Switches

Please refer to the board vendor's documentation.

BIOS settings

To run VxWorks on the pITX-SP board the following setting must be enabled : Advanced -> Onboard Device Configuration -> Chipset Configuration -> Linux Reboot Fix

Also, in case of PXE booting, make sure that the following setting is disabled : Advanced -> CPU Configuration -> Fast Gate A20

Boot process

When the board is powered on, the system BIOS code loads and executes the bootstrap loader. The bootstrap loader is written in 8088 16-bit assembly language. The BIOS obtains the bootstrap loader from the boot sector, which may be in one of several locations: an USB 2.0 key, a hard disk, or some other alternatives. When the BIOS finds the bootstrap loader, it transfers execution to it.

The bootstrap loader finds a vxWorks boot loader, loads it into memory, and transfers execution to romInit.

For the pITX-SP, it is recomended to use GRUB4DOS as a bootsrap loader.

1. Make a bootable USB key

    1.a) Install grub4dos (Windows)

       Download the grub4dos from 

       http://sourceforge.net/projects/grub4dos/

       Download an installer for Windows from 

       http://download.gna.org/grubutil/grubinst-1.1-bin-w32-2008-01-01.zip

       Insert a USB key to the host PC and format it to the FAT file system

       Unzip the grubinstaller package and execute the following command:

       grubinst (hdN)

       where (hdN) represents the USB key (N is a number of the disk: 0,1,2,...). 
       For example, if a system has only one HDD ("C"), the USB key will be a 2nd storage device 
       in the system (say, "D"), and the correct command will be : 

       grubinst (hd1)

      Unzip the grub4dos package and copy the "grldr" and "menu.lst" files to the USB key.

     1.b) Install grub4dos (Linux)

       Download the grub4dos from 

       http://sourceforge.net/projects/grub4dos/

       Insert a USB key to the host PC and format it to the FAT file system

       Unzip the grub4dos package and install grub to the MBR by invoking:

       bootlace.com /dev/sdX 

       where /dev/sdX is the USB storage device, e.g. /dev/sdb 

       Mount the USB device and copy the "grldr" and "menu.lst" files to it.

    2) Create a bootrom image

       Create a bootrom image ("bootrom.bin") and copy it to the USB key. For example :

        copy bootrom.bin e:

   3) Configure grub4dos

     Modify the "menu.lst" file as follows :

        timeout 30
        default /default
        title vxWorks Bootloader
        root (hd0,0)
        chainloader --force --load-segment=0x0800 --load-offset=0 --boot-cs=0x0800 --boot-ip=0 /bootrom.bin
        boot

    Insert the USB key to the board and reset. Change the BIOS setting to
    boot from the USB. On starting the grub4dos will display a menu with one option:

       vxWorks Bootloader 

    Press enter to boot the vxWorks boot loader :

                            VxWorks System Boot


        Copyright 1984-2008  Wind River Systems, Inc.





        CPU:  Kontron pITX-SP
        Version: VxWorks 6.8
        BSP version: R00.00
        Creation date: Mar 09 2011, 10:12:59

        Press any key to stop auto-boot...

        [VxWorks Boot]:

    In case of booting a vxWorks image from a USB key, enable INCLUDE_USB
    in config.h (default is enable), re-make the bootrom, and copy the vxWorks 
    image to the USB key.
    Enter the following command in the VxWorks Boot Shell,

        [VxWorks Boot]: devs

    A list of devices will be displayed as follows:

    drv name                
        0 /null
        2 /pcConsole/0
        2 /pcConsole/1
        7 host:
        8 /usbKb/0
        4 /bd0
        [VxWorks Boot]: ?

    The ? command will display the boot device information:

       Device Formats:
         boot device: usb                  file name: /bdx/vxWorks

       Boot Flags:
         0x02 -   load local system symbols
         0x04 -   don't autoboot
         0x08 -   quick autoboot (no countdown)
         0x80 -   use tftp to get boot image

       Available Boot Devices:
         Filesystem Devices:  /bd0  bd0
         Enhanced Network Devices: gei0
       [VxWorks Boot]:

    "/bd0" shows that the vxWorks bootrom has found the USB key. Enter c command 
    in the boot shell to change a boot device to "usb", and a file name to "/bd0/vxWorks".
    Finally, enter @ command to boot the vxWorks image.

2. Make a bootable hard disk

    1) Connect a hard disk to host PC, create a partition less than 2GB and format it 
       to the FAT file system

    2) Follow the instructions for making a bootable USB key.

       In case of booting a vxWorks image from a SATA HDD, #define DRV_STORAGE_JMICRON_AHCI
       in config.h, re-make the bootrom, and copy vxWorks to the hard disk.
       When the vxWorks bootrom boots up, enter '?'command in the VxWorks Boot Shell.
       The following information will be displayed :

       Device Formats:
         boot device: ahci[=ctrl,drive]    file name: /ahci00:1/vxWorks
         boot device: usb                  file name: /bdx/vxWorks

       Boot Flags:
         0x02 -   load local system symbols
         0x04 -   don't autoboot
         0x08 -   quick autoboot (no countdown)
         0x80 -   use tftp to get boot image

       Available Boot Devices:
         Filesystem Devices:  /ahci00:1 /bd0
         Enhanced Network Devices:
       [VxWorks Boot]:

       Use c command to change a boot device to "ahci00:1", and a file name to "/ahci00:1/vxWorks".
       Enter @ command to load the vxWorks image.

FEATURES

This section describes all features of the board, supported or not. It documents all configurations of the board and the interaction between features and configuration items.

List of Hardware Features

Hardware Interface Controller Driver/Component Status

1GB-ETHERNET:0 PCIe gei825xxVxbEnd.c SUPPORTED
SATA on-chip vxbIntelAhciStorageK.c SUPPORTED
PATA on-chip ataDrvK.c SUPPORTED
GRAPHICS on-chip vxbM6845Vga.c SUPPORTED
TIMER on-chip vxbI8253Timer.c SUPPORTED
RTC on-chip vxbMc146818RtcK.c SUPPORTED
Temperature sensors on-chip vxbW83L771.c SUPPORTED
GPIO on-chip pitx-sp_gpio.c SUPPORTED
Watchdog Timer on-chip pitx-sp_wd.c SUPPORTED
Fan Control on-chip pitx-sp_fan.c SUPPORTED
USB2-HOST on-chip USB EHCI driver SUPPORTED
USB2-DEVICE on-chip n/a UNSUPPORTED
USB1-HOST on-chip USB UHCI driver SUPPORTED
SD/MMC-CARD on-chip n/a UNSUPPORTED
VIDEO-DECODE on-chip n/a UNSUPPORTED
AUDIO on-chip n/a UNSUPPORTED
LPC on-chip n/a UNSUPPORTED

Feature Interactions

Refer to the board vendor's documentation.

HARDWARE DETAILS

This section documents the details of the hardware elements.

Memory Maps

The following table describes the Atom default memory map.

Start Size End Access to

0x0000_0000 640k 0x0009_FFFF lower memory
0x000A_0000 128k 0x000B_FFFF Flat videobuffer
0x000C_0000 128k 0x000D_FFFF Expansion area
0x000E_0000 64k 0x000E_FFFF Extended BIOS (LPC)
0x000F_0000 64k 0x000F_FFFF BIOS (LPC)
0x0010_0000 2G-1M sysPhysMemTop( ) - 0x100000 upper memory
0x8000_0000 2G 0xFFFF_FFFF PCI memory
Check Intel(R) System Controller Hub documentation (doc id # 319537) for more details.

Network Configuration

This BSP provides support for VxBus drivers, including network drivers. The list of VxBus network drivers available for PCIe devices includes the following:

    INCLUDE_FEI8255X_VXB_END
    INCLUDE_GEI825XX_VXB_END
    INCLUDE_RTL8169_VXB_END
    INCLUDE_END

For command line builds and for building bootrom, the config.h file must be modified to define the above macros, corresponding to the desired driver.

PC_CONSOLE

This function will use PC monitor as a VxWorks console. To use these controllers the INCLUDE_PC_CONSOLE directive must be enabled in config.h. Only USB keyboard is supported.

ataDrvK and ataShow

Enable INCLUDE_ATA component to get support for IDE/ATA hard disk controller. To use ATA disk as boot device the INCLUDE_ATA directive must be enabled in config.h. Note that the old INCLUDE_IDE directive is replaced by INCLUDE_ATA.

vxbIntelAhciStorageK

Vxbus Driver for the SATA hard disk controller. This driver is enabled by including DRV_STORAGE_JMICRON_AHCI component. To use this driver for boot device the DRV_STORAGE_JMICRON_AHCI must be enabled in config.h.

vxbI8253Timer

This library contains a board-independent interface for manipulating the timer functions on Intel 8253 and compatible timer chip devices. Timer 0 is used as system clock, According to different applications, timer 1,2 has different usage.

vxbMc146818RtcK

This is the additional driver for the real time clock, it supports Get/Set current date/time functions. To use RTC as a timer, default RTC driver (DRV_TIMER_MC146818) should be applied.

./vxbMC146818RtcK.html - RTC driver additional functions

vxbW83L771

VxBus driver for the Winbond W83L771 controller.

./vxbW83L771.html - Winbond W83L771 driver

pitx-sp_cpld

./pitx-sp_cpld.html - pITX-SP CPLD driver

pitx-sp_gpio

./pitx-sp_gpio.html - pITX-SP CPLD GPIO driver

pitx-sp_fan

./pitx-sp_fan.html - pITX-SP CPLD Fan control driver

pitx-sp_wd

./pitx-sp_wd.html - pITX-SP CPLD Watchdog driver

vxbIntelTimestamp

This is the driver for the timestamp on Intel chipsets to use the timestamp feature, the macro INCLUDE_TIMESTAMP must be defined in config.h.

i8259Intr

Driver for the Intel 8259A Programmable Interrupt Controller (PIC). IRQs 0 - 7 are handled by PIC1 and IRQs 8 - 15 by PIC2. PIC2 interrupts are cascaded into PIC1 at IRQ2 .The Fully Nested Mode is used in the default configuration of this BSP.

USB Host Support

A standard USB EHCI controller is supported in this BSP. Please refer to Wind River's USB documents.

Boot Devices

The supported boot devices are:

gei0 - Primary Ethernet (10baseT, 100baseTX, or 1000baseT)
ata0a - ATA/IDE drive
ahci00:1 - SATA Hard disk
usb - USB disk

Boot Methods

The boot methods are affected by the boot parameters. If no password is specified, RSH (remote shell) protocol is used. If a password is specified, FTP protocol is used, or, if the flag is set to 0x80, TFTP protocol is used.

SPECIAL CONSIDERATIONS

Make Targets

The make targets are listed as the names of object-format files. Other images not listed here may not be tested.

bootrom
bootrom.bin
vxWorks (with vxWorks.sym)
vxWorks.st

BSP Bootloaders and Bootroms

Bootloader/Bootrom Status

BIOS (pre-flashed) SUPPORTED
bootrom SUPPORTED
bootrom_uncmp UNSUPPORTED
vxWorks SUPPORTED
vxWorks_rom UNSUPPORTED
vxWorks_romCompress UNSUPPORTED
vxWorks_romResident UNSUPPORTED

BSP Validated Tools

Tool Connection/Type Status

Workbench Debugger ETHERNET/WDB SUPPORTED
Workbench System Viewer ETHERNET/WDB SUPPORTED
Workbench MemScope ETHERNET/WDB SUPPORTED
Workbench ProfileScope ETHERNET/WDB SUPPORTED
Workbench StethoScope ETHERNET/WDB SUPPORTED
Workbench CoverageScope ETHERNET/WDB SUPPORTED
Workbench Core File Analysis ETHERNET/WDB UNVALIDATED
Workbench Sensor Points ETHERNET/WDB UNVALIDATED
Workbench OCD Debugger JTAG UNSUPPORTED
Workbench OCD Flash JTAG UNSUPPORTED

Special Routines

The following routines are specific to this BSP and are available to the user. They are written in assembly code in sysALib.s. For further details, please refer to following entries:

sysInByte( ) input one byte from I/O space
sysInWord( ) input one word from I/O space
sysInLong( ) input one long-word from I/O space
sysOutByte( ) output one byte to I/O space
sysOutWord( ) output one word to I/O space
sysOutLong( ) output one long-word to I/O space
sysInWordString( ) input word string from I/O space
sysInLongString( ) input long string from I/O space
sysOutWordString( ) output word string to I/O space
sysOutLongString( ) output long string to I/O space

Known Problems

- The standard "bootsect.bin" file doesn't work properly with a USB stick and SATA HDD - OS image fails to load "vxworks.sym" file with explicit defined network mask;

BIBLIOGRAPHY

Intel Architecture Software Developer's Manual, Volume 1: Basic Architecture

Intel Architecture Software Developer's Manual, Volume 2: Instruction Set Reference

Intel Architecture Software Developer's Manual, Volume 3: System Programming Guide

AP-485, Intel Processor Identification and the CPUID Instruction

PCI System Architecture, Fourth Edition, Addison-Wesley, 1999, ISBN 0-201-30974-2

SEE ALSO

VxWorks User's Guide: Getting Started, VxWorks Programmer's Guide: Configuration, VxWorks Programmer's Guide: Architecture Supplement