1 Changes to the default BSP
1.1 sysLib.c extensions
1.2 Setting TOD clock
1.3 Problems with serial port
2 Keyboard problems
3 Network devices
4 Floating point
5 Timestamp driver
6 Video control
Index
I do not have a PC-target, so I cannot verify or fix any problems related to this HW. If you have made any changes to the BSP and want to share them with the other VxWorks developers, please send them to me (Johan Borkhuis), so they can be put here.
nvRamToAta.c, nvRamToFloppy.c and nvRamToTffs.c are a couple of neats hack for the x86
BSP to allow you to change and save the boot config stuff.
01FAE.cdf adds a few missing bits (END interface
selection and SYS_WARM_TYPE) to the project facility.
Toss them into your copy of the pcPentium BSP and change the following
line of sysLib.c [427]:
/* includes (source file) */ #include "mem/nullNvRam.c" #include "vme/nullVme.c" #include "sysSerial.c"
to:
/* includes (source file) */ #if TRUE #include "nvRamToFloppy.c" #else #include "mem/nullNvRam.c" #endif #include "vme/nullVme.c" #include "sysSerial.c"
The following files implement reading the hardware time-of-day clock,
setting the VxWorks date, and provide the date() command available from
the shell. Be careful, the day of the week register is not usually
initialzed. Call date ("YYMMDDHHMMSS") first to set it.
ds12887Rtc.c
usrTime.c
Q: When I startup my PC-target nothing happens on my serial port, but the normal keyboard and display are used.
A: Disable the use of the PC-console and enable the use of the serial
console.
(From: pwhicker@home.com, Paul Whicker)
Q: When I want to use the keyboard on my PC-target nothing happens. How can I make this keyboard work?
A: I assume you are not able to input anything from keyboard. Actually, you do not need to do anything to connect to stdin, it is by default. However, if you are using some older machines which has XT type keyboard controller, you may need to change the PC_KBD_TYPE to PC_XT_83_KBD (default is PC_PS2_101_KBD) in config.h.
#define PC_KBD_TYPE PC_XT_83_KBD #if FALSE #define PC_KBD_TYPE PC_PS2_101_KBD #endif /* FALSE */
(From: Yusuf Motiwala, motiwala@lucent.com)
Q: I am using T2/x86 (PentiumPro BSP) and trying to get 3C905B-TXNM PCI NIC working. The NIC itself seems to be fine, 3COM's DOS-based test tool identifies it correctly. I haven't changed anything in the NIC's configuration.
A: The 3c509B NIC is a long-time FAQ - the "B" version has added Plug
& Pray support, which is nowhere inthe WRS driver, so what you need
to do is to use the 3Com SETUP dirkette under DOS to modify the NIC to
disable P&P, and make darn sure the IRQs are set properly, and in
synch with your pc486/config.h definition, and you should be just fine.
(From: Leonid Rosenboim, leonid@bitband.com)
Q: How do I get 2 79C973 NIC's working?
A: After a long struggle, I have finally figured out how to set up the AMD x86 BSP drivers to work with 2 79C973 NIC's. I am posting this in response to several other messages I have seen on the subject. I am skipping the steps that are obvious (setting INCLUDE_LN_97X_END in config.h, etc):
In file configNet.h change from:
#define LN_97X_LOAD_STR_0 endLoadStr[0]
To:
#define LN_97X_LOAD_STR_0 endLoadStr[0] #define LN_97X_LOAD_STR_1 endLoadStr[1]
In file configNet.h change from:
#ifdef INCLUDE_LN_97X_END {0, LN_97X_LOAD_FUNC, LN_97X_LOAD_STR_0, TRUE, NULL, FALSE}, #endif /* INCLUDE_LN_97X_END */
To:
#ifdef INCLUDE_LN_97X_END {0, LN_97X_LOAD_FUNC, LN_97X_LOAD_STR_0, TRUE, NULL, FALSE}, {1, LN_97X_LOAD_FUNC, LN_97X_LOAD_STR_1, TRUE, NULL, FALSE}, #endif /* INCLUDE_LN_97X_END */
In file sysEnd.c, function sysLan97xInitStrCook change from:
for (pDevTbl = endDevTbl, ix = 0; pDevTbl->endLoadFunc != END_TBL_END; pDevTbl++, ix++) { if ((ix + endDevNum) > entryIxMax) break; if ((UINT32)pDevTbl->endLoadFunc == (UINT32)LN_97X_LOAD_FUNC) { pDevTbl->unit = endDevNum;
To:
for (pDevTbl = endDevTbl, ix = 0; pDevTbl->endLoadFunc != END_TBL_END; pDevTbl++, ix++) { if ((ix + endDevNum) > entryIxMax) break; if ((UINT32)pDevTbl->endLoadFunc == (UINT32)LN_97X_LOAD_FUNC) { /* pDevTbl->unit = endDevNum; */ pDevTbl->unit = ix;
(From: dhall3859@my-deja.com)
Q: My target is crashing when I initialize the Intel 82559ER with a cable attached.
A: Modify the BIOS setting "PNP OS Installed" from YES to NO. After this
the Intel 82559er MUX driver (using END) worked OK. See also question
3 A.
(From: Michiel Meekes, meekes@nlr.nl)
Q: How do I creae a bootrom that uses PXE
The purpose of this is to boot a standard x86 Mainboard diskless from
tftp, using INTEL/3COMs PXE bootrom chip:
There are at least two common cards with PXE, the INTEL 82559 (Intel
Pro/100+) and the 3Com905 Cards
Step 1:
Configure a DHCP Server (e.g. on linux, like this):
group { next-server 10.0.1.1; # option dhcp-class-identifier "PXEClient:Arch:00000:UNDI:002001"; # i have not yet figured this option out host target { filename "bootrom.pxe"; hardware ethernet 00:02:b3:5b:f0:65; fixed-address 10.0.1.55; }Purpose of this is to provide the PXE with the boot information via bootp/dhcp. According to this, it will try to download bootrom.pxe from 10.0.1.1 using TFTP, it will take the address 10.0.1.55 for it's own interface. hardware address is the MAC address of the interface (PXE will usually display it when it starts up)
Step 2:
Setup the TFTP server (one comes with Tornado)
Step 3:
Create the according bootimage for PXE:
The vxWorks bootloader is compiled to run from 0x8000 per default. However, PXE loads at 0x1c00. Therefore, one way would be prepending the bootloader binary with 1024 bytes of code.
There are 2 caveats:
- the bootrom requires a far/intersegment jump entry (to setup cs accordingly)
- .code16 prefix is required to create protected mode code
Here is how to generate the bootrom:
// compile the file as386 test.s // strip a.out header of the file, create binary vxcopy a.out test.bin // limit size to 1024 bytes (equals 0x8000-0x1c00) dd bs=1 count=1024 if=test.bin of=test.1024 // strip a.out header from bootrom vxcopy bootrom bootrom.bin // prepend bootrom with new source cat test.1024 bootrom.bin > bootrom.pxe or copy /b test.1024 + bootrom.bin bootrom.pxe
The content of test.s:
.text .code16 start: nop /* display alr so we see something on the screen if executing bootrom fails */ movb $'a',%al movb $0x0e,%ah movw $0x07,%bx int $0x10 movb $'l',%al movb $0x0e,%ah movw $0x07,%bx int $0x10 movb $'r',%al movb $0x0e,%ah movw $0x07,%bx int $0x10 ljmp $0x0800,$0x0000 .space 1024,0x90
Q: I am using an SC400 processor (AMD 486 compatible) with floating point emulation in SW. But when I do some floating point emulation I get an exception. It looks like the floating point library is not installed correctly.
A: This is a know problem. It is registered by WindRiver under number SPR28624. The desription and work-around are:
"Tornado 2.0, Intel 80486SX: NaN produced on printf() from shell"
The published workaround is:
"Consider WIND_BASE/target/config/comps/vxWorks/00vxWorks.cdf,
specifically around line 1883:
InitGroup usrIosCoreInit { INIT_RTN usrIosCoreInit (); SYNOPSIS core I/O system INIT_ORDER INCLUDE_HW_FP \ INCLUDE_SW_FP \ INCLUDE_BOOT_LINE_INIT \ INCLUDE_IO_SYSTEM \ INCLUDE_TTY_DEV \ INCLUDE_TYCODRV_5_2 \ INCLUDE_SIO \ INCLUDE_PC_CONSOLE }
It is noted, in reference to 00vxWorks.cdf, that this problem no longer exists with the initialization sequence:
INIT_ORDER INCLUDE_SW_FP \ INCLUDE_HW_FP \
In other words, edit WIND_BASE/target/config/comps/vxWorks/00vxWorks.cdf
such that the software floating point support is intialized prior to
hardware floating point support.
(From: Gerald van Kampen, kam@oce.nl)
Q. How do I get the Pentium TSC register to free-run as Intel intended? How can I get a more reliable timestamp value and more accurate results from WindView?
A. Use this modified timer/timestamp driver.
The 64-bit Pentium TSC register is the hardware timer used for the
timestamp driver. It increments at the processor clock rate and is
guaranteed never to overflow in 10 years continuous running. The
timestamp driver is an interface to a hardware counter that allows
WindView to instrument how long kernel calls and interrupts take. The
timestamp driver depends on a counter with a rate of at least 100kHz to
1MHz, so the TSC is ideal.
For those interested, Appendix G of the WindView User's Guide describes
the timestamp driver interface and how to map it to hardware counters
with varying constraints. The 64-bit TSC register never overflows, but
the timestamp driver only handles 32-bit values so the 32-bit overflow of
the TSC must be handled.
If a hardware counter interrupts when it overflows 32-bits or reaches
zero, the timestamp driver uses this interrupt to indicate the overflow.
If the counter does *not* interrupt on overflow, like the TSC, then the
timestamp driver must produce a timestamp value that increases only
within a system tick and it must use the system tick interrupt to reset
the timestamp value.
Unfortunately the system tick interrupt is subject to interrupt latency
and jitters around an average point in time. Worse still, the timestamp
interrupt routine in the original WindRiver driver is called
after the system tick interrupt routine. The system tick
calls tickAnnounce(), which takes a varying time servicing delays in
VxWorks' tasks, semaphore takes, etc, and makes the timestamp value
jitter even more. This jitter means that the timestamp value can exceed
its period value or be reset before it reaches its period value, and it
makes WindView results inaccurate and unreliable - showing a system tick
interrupt routine, for example, lasting for a whole tick. The original
timestamp driver also resets the TSC every system tick and spoils its use
as a high-resolution application timer for very short delays.
This modified driver:
The modified driver also includes a print routine which you can use to see how it performs in your system. Enter 'period 1,sysTimestampPrint' at the target shell and every second it prints out the timestamp driver value and the rollover adjustment value. You will see the current value change, especially with high network activity from bus-mastering LAN controllers, but it should return to a stable value.
Feedback please to james_marshall@agilent.com with subject 'VxWorks timestamp driver'.
Q: How can I change the video mode on a PC to 320x200?
A: The processor is in Real mode during the boot phase. You can patch
romInit.s to make your BIOS calls after the 'cli
' in
_romInit and before the 'jmp cold
' as follows:
addr16 /* address size: 16 bit address operand for call */ /* instruction. This is 0x66 opcode in a dump */ data16 /* operand size: 16 bit data operand for call */ /* instruction. This is 0x67 opcode in a hex dump */ call _bios80x43 /* call (real mode) _romBIOS routine */ /* or call _vesa40x25 */ /* or call _bios40x25 */
..and then for example:
.align 4,0x90 _bios80x43: /* ugly, but it works for me... */ movb $0x0f,%ah sti int $0x10 cli push %ax mov $0x1201,%ax movb $0x30,%bl sti int $0x10 cli pop %ax movb $0x00,%ah sti int $0x10 cli mov $0x1112,%ax movb $0x00,%bh sti int $0x10 cli ret .align 4,0x90 _vesa40x25: /* VESA mode */ movb $0x4f,%ah /* mov VESA function into AH reg. */ movb $0x02,%al /* mov "SET MODE" function into AL reg. */ movb $0x00,%bh /* mov "40x25 COLOR" mode into BX reg. */ movb $0x01,%bl /* mov "40x25 COLOR" mode into BX reg. */ sti /* set the int flag,eg unlock interrupts. */ int $0x10 /* Call BIOS Int 0x10 (Function in AH reg) */ cli /* clear the int flag,aka disable interrupts.*/ ret .align 4,0x90 _bios40x25: /* VGA BIOS mode */ movb $0x00,%ah /* movb "SET MODE" BIOS function into AH reg. */ movb $0x01,%al /* movb "40x25 COLOR" mode into AL reg. */ sti /* set the int flag,eg unlock interrupts. */ int $0x10 /* Call BIOS Int 0x10 (Function in AH reg) */ cli /* clear the int flag,aka disable interrupts.*/ ret
1.1 | A | Changes to syslib.c |
1.2 | A | Setting TOD clock |
1.3 | A | When I startup my PC-target nothing happens on my serial port, but the normal keyboard and display are used. |
2 | A | When I want to use the keyboard on my PC-target nothing happens. How can I make this keyboard work? |
3 | A | I am using T2/x86 (PentiumPro BSP) and trying to get 3C905B-TXNM PCI NIC working. The NIC itself seems to be fine, 3COM's DOS-based test tool identifies it correctly. I haven't changed anything in the NIC's configuration. |
B | How do I get 2 79C973 NIC's working? | |
C | My target is crashing when I initialize the Intel 82559ER with a cable attached. | |
D | How do I creae a bootrom that uses PXE | |
4 | A | I am using an SC400 processor (AMD 486 compatible) with floating point emulation in SW. But when I do some floating point emulation I get an exception. |
5 | A | How do I get the Pentium TSC register to free-run as Intel intended? |
6 | A | How can I change the video mode on a PC to 320x200? |
![]() |
|
![]() |