sysLib - kontron_kt690 system-dependent library
sysNvRamGet( ) - get the contents of non-volatile RAM
sysNvRamSet( ) - write to non-volatile RAM
sysLocalToBusAdrs( ) - convert a local address to a bus address
sysBusToLocalAdrs( ) - convert a bus address to a local address
sysBusIntAck( ) - acknowledge a bus interrupt
sysBusIntGen( ) - generate a bus interrupt
sysMailboxConnect( ) - connect a routine to the mailbox interrupt
sysMailboxEnable( ) - enable the mailbox interrupt
sysBusTas( ) - test and set a location across the bus
i8259Init( ) - initialize the PIC
i8259IntBoiEem( ) - issue EOI before the IRQ0 interrupt handler
i8259IntBoiSmm( ) - enable Special Mask Mode before the IRQ0 interrupt handler
i8259IntBoi( ) - detect whether it is spurious interrupt or not
i8259IntEoiSmm( ) - disable Special Mask Mode with EOI signal to the master PIC
i8259IntEoiMaster( ) - send EOI(end of interrupt) signal to the master PIC.
i8259IntEoiSlave( ) - send EOI(end of interrupt) signal to the slave PIC.
i8259IntEoiSlaveNfnm( ) - send EOI(end of interrupt) signal to the slave PIC.
i8259IntEoiSlaveSfnm( ) - send EOI(end of interrupt) signal to the slave PIC.
sysPciIvecToIrq( ) - get an IRQ(PIC or IOAPIC) number from vector address
sysModel( ) - return the model name of the CPU board
sysBspRev( ) - return the BSP version and revision number
sysHwInit( ) - initialize the system hardware
sysHwInit2( ) - additional system configuration and initialization
sysPhysMemTop( ) - get the address of the top of physical memory
sysMemTop( ) - get the address of the top of VxWorks memory
sysToMonitor( ) - transfer control to the ROM monitor
sysIntInitPIC( ) - initialize the interrupt controller
sysIntLock( ) - lock out all interrupts
sysIntUnlock( ) - unlock the PIC interrupts
sysIntDisablePIC( ) - disable a bus interrupt level
sysIntEnablePIC( ) - enable a bus interrupt level
sysIntEoiGet( ) - get EOI/BOI function and its parameter
sysIntLevel( ) - get an IRQ(PIC) or INTIN(APIC) number in service
sysProcNumGet( ) - get the processor number
sysProcNumSet( ) - set the processor number
sysDelay( ) - allow recovery time for port accesses
sysUsDelay( ) - delay specified number of microseconds
sysMsDelay( ) - delay specified number of miliseconds
sysStrayInt( ) - Do nothing for stray interrupts.
sysMmuMapAdd( ) - insert a new MMU mapping
This library provides board-specific routines. The device configuration modules and device drivers included are:
i8253Timer.c - Intel 8253 timer driver
i8259Intr.c - Intel 8259 Programmable Interrupt Controller (PIC) library
ioApicIntr.c - Intel IO APIC/xAPIC driver
ioApicIntrShow.c - Intel IO APIC/xAPIC driver show routines
iPiix4Pci.c - low level initalization code for PCI ISA/IDE Xcelerator
loApicIntr.c - Intel Pentium[234] Local APIC/xAPIC driver
loApicIntrShow.c - Intel Local APIC/xAPIC driver show routines
loApicTimer.c - Intel Pentium2/3/4 Local APIC timer library
sysNvRam.c - block device NVRAM library
pccardLib.c - PC CARD enabler library
pccardShow.c - PC CARD show library
pciCfgStub.c - customizes pciConfigLib for the BSP
pciCfgIntStub.c - customizes pciIntLib for the BSP
pciConfigLib.c - PCI configuration space access support for PCI drivers
pciIntLib.c - PCI shared interrupt support
pciConfigShow.c - Show routines for PCI configuration library
sysWindML.c - WindML BSP support routines
sysLib.h
VxWorks Programmer's Guide: Configuration
sysNvRamGet( ) - get the contents of non-volatile RAM
STATUS sysNvRamGet
(
char *string, /* where to copy non-volatile RAM */
int strLen, /* maximum number of bytes to copy */
int offset /* byte offset into non-volatile RAM */
)
This routine copies the contents of non-volatile memory into a specified string. The string is terminated with an EOS.
This routine has no effect, since there is no non-volatile RAM.
ERROR, always.
Not Available
sysNvRamSet( ) - write to non-volatile RAM
STATUS sysNvRamSet
(
char *string, /* string to be copied into non-volatile RAM */
int strLen, /* maximum number of bytes to copy */
int offset /* byte offset into non-volatile RAM */
)
This routine copies a specified string into non-volatile RAM.
This routine has no effect, since there is no non-volatile RAM.
ERROR, always.
Not Available
sysLocalToBusAdrs( ) - convert a local address to a bus address
STATUS sysLocalToBusAdrs
(
int adrsSpace, /* bus address space in which busAdrs resides, */
/* use address modifier codes defined in vme.h, */
/* such as VME_AM_STD_SUP_DATA */
char *localAdrs, /* local address to convert */
char **pBusAdrs /* where to return bus address */
)
This routine gets the VMEbus address that accesses a specified local memory address.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysBusToLocalAdrs( ) - convert a bus address to a local address
STATUS sysBusToLocalAdrs
(
int adrsSpace, /* bus address space in which busAdrs resides, */
/* use address modifier codes defined in vme.h, */
/* such as VME_AM_STD_SUP_DATA */
char *busAdrs, /* bus address to convert */
char **pLocalAdrs /* where to return local address */
)
This routine gets the local address that accesses a specified VMEbus address.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysBusIntAck( ) - acknowledge a bus interrupt
int sysBusIntAck
(
int intLevel /* interrupt level to acknowledge */
)
This routine acknowledges a specified VMEbus interrupt level.
This routine has no effect, since there is no VMEbus.
NULL.
sysBusIntGen( ) - generate a bus interrupt
STATUS sysBusIntGen
(
int level, /* bus interrupt level to generate */
int vector /* interrupt vector to return (0-255) */
)
This routine generates a VMEbus interrupt for a specified level with a specified vector.
This routine has no effect, since there is no VMEbus.
ERROR, always.
sysMailboxConnect( ) - connect a routine to the mailbox interrupt
STATUS sysMailboxConnect
(
FUNCPTR routine, /* routine called at each mailbox interrupt */
int arg /* argument with which to call routine */
)
This routine specifies the interrupt service routine to be called at each mailbox interrupt.
This routine has no effect, since the hardware does not support mailbox interrupts.
ERROR, always.
sysMailboxEnable( ) - enable the mailbox interrupt
STATUS sysMailboxEnable
(
char *mailboxAdrs /* mailbox address */
)
This routine enables the mailbox interrupt.
This routine has no effect, since the hardware does not support mailbox interrupts.
ERROR, always.
sysBusTas( ) - test and set a location across the bus
BOOL sysBusTas
(
char *addr /* address to be tested and set */
)
This routine performs a test-and-set (TAS) instruction across the backplane.
This routine is equivalent to vxTas( ), since there is no VMEbus.
TRUE if the value had not been set but is now, or FALSE if the value was set already.
sysLib, vxTas( )
i8259Init( ) - initialize the PIC
VOID i8259Init (void)
This routine initializes the PIC.
N/A
i8259IntBoiEem( ) - issue EOI before the IRQ0 interrupt handler
VOID i8259IntBoiEem
(
int irqNo /* IRQ number of the interrupt */
)
This routine is called before the IRQ0 interrupt handler that is PIT(8253) channel 0 system clock interrupt handler in the Early EOI Mode.
N/A
i8259IntBoiSmm( ) - enable Special Mask Mode before the IRQ0 interrupt handler
VOID i8259IntBoiSmm
(
int irqNo /* IRQ number of the interrupt */
)
This routine is called before the IRQ0 interrupt handler that is PIT(8253) channel 0 system clock interrupt handler, in the Special Mask Mode.
N/A
i8259IntBoi( ) - detect whether it is spurious interrupt or not
VOID i8259IntBoi
(
INT32 irqNo /* IRQ number of the interrupt */
)
This routine is called before the user's interrupt handler to detect the spurious interrupt.
N/A
i8259IntEoiSmm( ) - disable Special Mask Mode with EOI signal to the master PIC
VOID i8259IntEoiSmm
(
int irqNo /* IRQ number to send EOI */
)
This routine is called at the end of the IRQ0 interrupt handler that is PIT(8253) channel 0 system clock interrupt handler in the Special Mask Mode.
N/A
i8259IntEoiMaster( ) - send EOI(end of interrupt) signal to the master PIC.
VOID i8259IntEoiMaster
(
INT32 irqNo /* IRQ number to send EOI */
)
This routine is called at the end of the interrupt handler.
N/A
i8259IntEoiSlave( ) - send EOI(end of interrupt) signal to the slave PIC.
VOID i8259IntEoiSlave
(
INT32 irqNo /* IRQ number to send EOI */
)
This routine is called at the end of the interrupt handler in the Normal Fully Nested Mode. This is kept for the backward compatibility.
N/A
i8259IntEoiSlaveNfnm( ) - send EOI(end of interrupt) signal to the slave PIC.
VOID i8259IntEoiSlaveNfnm
(
INT32 irqNo /* IRQ number to send EOI */
)
This routine is called at the end of the interrupt handler in the Normal Fully Nested Mode.
N/A
i8259IntEoiSlaveSfnm( ) - send EOI(end of interrupt) signal to the slave PIC.
VOID i8259IntEoiSlaveSfnm
(
int irqNo /* IRQ number to send EOI */
)
This routine is called at the end of the interrupt handler in the Special Fully Nested Mode.
N/A
sysPciIvecToIrq( ) - get an IRQ(PIC or IOAPIC) number from vector address
int sysPciIvecToIrq
(
int vector /* vector address */
)
This routine gets an IRQ(PIC or IOAPIC) number from vector address. Assumptions are following:
- IRQ number is 0 - 15 in PIC or VIRTUAL_WIRE mode
- IRQ number is 0 - 23 in SYMMETRIC_IO mode
IRQ 0 - 15/23, or -1 if we failed to get it.
Not Available
sysModel( ) - return the model name of the CPU board
char *sysModel (void)
This routine returns the model name of the CPU board.
A pointer to the string "PC 386, 486, PENTIUM or PENTIUM[234]".
Not Available
sysBspRev( ) - return the BSP version and revision number
char * sysBspRev (void)
This routine returns a pointer to a BSP version and revision number, for example, 1.1/0. BSP_REV is concatenated to BSP_VERSION and returned.
A pointer to the BSP version/revision string.
Not Available
sysHwInit( ) - initialize the system hardware
void sysHwInit (void)
This routine initializes various features of the i386/i486 board. It is called from usrInit( ) in usrConfig.c.
This routine should not be called directly by the user application.
N/A
Not Available
sysHwInit2( ) - additional system configuration and initialization
void sysHwInit2 (void)
This routine connects system interrupts and does any additional configuration necessary.
N/A
Not Available
sysPhysMemTop( ) - get the address of the top of physical memory
char * sysPhysMemTop (void)
This routine returns the address of the first missing byte of memory, which indicates the top of physical memory.
The address of the top of physical memory.
Not Available
sysMemTop( ) - get the address of the top of VxWorks memory
char * sysMemTop (void)
This routine returns a pointer to the first byte of memory not controlled or used by VxWorks.
The user can reserve memory space by defining the macro USER_RESERVED_MEM in config.h. This routine returns the address of the reserved memory area. The value of USER_RESERVED_MEM is in bytes.
The address of the top of VxWorks memory.
Not Available
sysToMonitor( ) - transfer control to the ROM monitor
STATUS sysToMonitor
(
int startType /* passed to ROM to tell it how to boot */
)
This routine transfers control to the ROM monitor. It is usually called only by reboot( ) -- which services ^X -- and by bus errors at interrupt level. However, in some circumstances, the user may wish to introduce a new startType to enable special boot ROM facilities.
Does not return.
Not Available
sysIntInitPIC( ) - initialize the interrupt controller
void sysIntInitPIC (void)
This routine initializes the interrupt controller. Maps APIC and HPET Memory space.
N/A
Not Available
sysIntLock( ) - lock out all interrupts
VOID sysIntLock (void)
This routine saves the mask and locks out all interrupts.
Not Available
Not Available
sysIntUnlock( ) - unlock the PIC interrupts
VOID sysIntUnlock (void)
This routine restores the mask and unlocks the PIC interrupts
Not Available
Not Available
sysIntDisablePIC( ) - disable a bus interrupt level
STATUS sysIntDisablePIC
(
int irqNo /* IRQ(PIC) or INTIN(APIC) number to disable */
)
This routine disables a specified bus interrupt level.
OK, or ERROR if failed.
Not Available
sysIntEnablePIC( ) - enable a bus interrupt level
STATUS sysIntEnablePIC
(
int irqNo /* IRQ(PIC) or INTIN(APIC) number to enable */
)
This routine enables a specified bus interrupt level.
OK, or ERROR if failed.
Not Available
sysIntEoiGet( ) - get EOI/BOI function and its parameter
void sysIntEoiGet
(
VOIDFUNCPTR * vector, /* interrupt vector to attach to */
VOIDFUNCPTR * routineBoi, /* BOI function */
int * parameterBoi, /* a parameter of the BOI function */
VOIDFUNCPTR * routineEoi, /* EOI function */
int * parameterEoi /* a parameter of the EOI function */
)
This routine gets EOI function and its parameter for the interrupt controller. If returned EOI/BOI function is NULL, intHandlerCreateX86( ) replaces "call _routineBoi/Eoi" in intConnectCode[] with NOP instruction.
N/A
Not Available
sysIntLevel( ) - get an IRQ(PIC) or INTIN(APIC) number in service
int sysIntLevel
(
int arg /* parameter to get the stack pointer */
)
This routine gets an IRQ(PIC) or INTIN(APIC) number in service. We assume the following:
- this function is called in intEnt( )
- IRQ number of the interrupt is at intConnectCode [29]
0 - (sysInumTblNumEnt - 1), or sysInumTblNumEnt if we failed to get it.
Not Available
sysProcNumGet( ) - get the processor number
int sysProcNumGet (void)
This routine returns the processor number for the CPU board, which is set with sysProcNumSet( ).
The processor number for the CPU board.
Not Available
sysProcNumSet( ) - set the processor number
void sysProcNumSet
(
int procNum /* processor number */
)
Set the processor number for the CPU board. Processor numbers should be unique on a single backplane.
By convention, only Processor 0 should dual-port its memory.
N/A
Not Available
sysDelay( ) - allow recovery time for port accesses
void sysDelay (void)
This routine provides a brief delay used between accesses to the same serial port chip.
N/A
Not Available
sysUsDelay( ) - delay specified number of microseconds
void sysUsDelay
(
int uSec
)
This routine provides a brief delay used between accesses to the same serial port chip.
N/A
Not Available
sysMsDelay( ) - delay specified number of miliseconds
void sysMsDelay
(
int mSec
)
This routine provides a brief delay used between accesses to the same serial port chip.
N/A
Not Available
sysStrayInt( ) - Do nothing for stray interrupts.
void sysStrayInt (void)
Do nothing for stray interrupts.
Not Available
Not Available
sysMmuMapAdd( ) - insert a new MMU mapping
STATUS sysMmuMapAdd
(
void * address, /* memory region base address */
UINT length, /* memory region length in bytes*/
UINT initialStateMask, /* PHYS_MEM_DESC state mask */
UINT initialState /* PHYS_MEM_DESC state */
)
This routine will create a new sysPhysMemDesc table entry for a memory region of specified length in bytes and with a specified base address. The initialStateMask and initialState parameters specify a PHYS_MEM_DESC type state mask and state for the memory region.
This routine must be used before the sysPhysMemDesc table is referenced for the purpose of initializing the MMU or processor address space (us. in usrMmuInit( )).
The length in bytes will be rounded up to a multiple of VM_PAGE_SIZE bytes if necessary.
The current implementation assumes a one-to-one mapping of physical to virtual addresses.
OK or ERROR depending on availability of free mappings.
Not Available
sysLib, vmLib