VxWorks6.0BSP DEVELOPER’S GUIDEedition 2 ®VxWorks BSP Developer's Guide
VxWorksBSP Developer’s Guide, 6.0 2BSP, there are template files available for use in lieu of the reference BSP. However, a template BSP is generally
VxWorksBSP Developer’s Guide, 6.0 92/************************************************************ * sysPciAutocinfigInclude - Specify devices to conf
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP933struct PciIntIrq { UINT8 bus; UINT8 device; UINT8 intPin; UINT8 irq; }; static struct Pc
VxWorksBSP Developer’s Guide, 6.0 94* the interrupt assignment correctly. The design of this* routine should handle any board design. * * RETURNS: N
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP953#ifdef INCLUDE_PCI sysPciAutoConfig (); /* prepare BSP support for callouts from support
VxWorksBSP Developer’s Guide, 6.0 96bar0 in 32-bit mem space @ 0x80002000 [0,18,0] type=P2P BRIDGE to [1,0,0] base/limit: mem= 0x80100000/0x800ffff
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP973All values are numeric—pciHeaderShow( ) does not make any attempt to interpret register
VxWorksBSP Developer’s Guide, 6.0 98VME_A24_MSTR_SIZE, VME_A16_MSTR_LOCAL, and VME_A16_MSTR_SIZE must be defined. However, this requirement can vary
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP993Wind River Workbench User’s Guide (or, for Tornado users, the Tornado User’s Guide) for
VxWorksBSP Developer’s Guide, 6.0 100parameter to the devEndLoad( ) routine is a character pointer. In order for each Ethernet device to be controlle
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1013Media Access Controller (MAC) Address for Ethernet Devices Most modern Ethernet devices
1 Introduction1.3 BSP Development Process31Wind River provides processor-dependent software as part of each reference BSP. That is, the portions of
VxWorksBSP Developer’s Guide, 6.0 102For more information about adding support for devices, refer to the VxWorks Device Driver Developer’s Guide. Gen
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1033Multi-Mode Serial (SIO) Drivers The generic multi-mode serial drivers reside in the dir
VxWorksBSP Developer’s Guide, 6.0 104int (*callbackInstall) ( SIO_CHAN * pSioChan, int callbackType, STATUS (*callback)(), void * callbackArg ); int
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1053SIO_OPEN Opens a channel. SIO_HUP Closes a channel.txStartup( ) This routine provides a
VxWorksBSP Developer’s Guide, 6.0 106Serial Drivers The old style of serial drivers, those used before VxWorks 5.3, reside in the target/src/drv/seri
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1073AUX_CLK_RATE_MIN Defines the minimum rate at which the auxiliary clock can run. To supp
VxWorksBSP Developer’s Guide, 6.0 108sysOneShotInit( ) This routine is called during board initialization. It configures the one-shot timer and sets
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1093match value is advanced. To implement the one-shot timer, a match count value is comput
VxWorksBSP Developer’s Guide, 6.0 110Thus, the offset parameter is biased so that an offset of 0 points to the first byte of the VxWorks boot line. T
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1113In addition to modifications to sysMemTop( ), you must also modify the sysPhysMemDesc[
VxWorksBSP Developer’s Guide, 6.0 4developer. However, a typical development process is more likely to take several months. Once the minimal kernel i
VxWorksBSP Developer’s Guide, 6.0 112With separate drivers for different functional areas, users can scale out support for functional areas that are
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP1133Data Address in Virtual Memory Environments If the CPU board has a memory management un
VxWorksBSP Developer’s Guide, 6.0 114
115 4Debugging Your BSP4.1 Introduction 1154.2 Basic Debugging Techniques 1164.3 Advanced Debugging Techniques 1264.1 Introduction This chapter pre
VxWorksBSP Developer’s Guide, 6.0 116Board Bringup During board bringup, the target hardware is still under development. Because of this, some compon
4 Debugging Your BSP4.2 Basic Debugging Techniques1174information on debugging using an OCD, see 4.3 Advanced Debugging Techniques, p.126. 4.2.1 Us
VxWorksBSP Developer’s Guide, 6.0 118Finding Code Block Addresses You can use objdumparch when you need to find the code that resides at a particular
4 Debugging Your BSP4.2 Basic Debugging Techniques1194S21400002057696E64205269766572205379737465D9 ... ... S2140366400000000E000000010000000F0000000
VxWorksBSP Developer’s Guide, 6.0 120In this example, you have 0x036670 - 0x000000 = 0x036670. Notice that edata - romInit (that is, 0x36670 - 0x0000
4 Debugging Your BSP4.2 Basic Debugging Techniques1214Looking at the disassembly of an object file is helpful when, given the address of an exceptio
5 2Overview of a BSP2.1 Introduction 52.2 Boot Sequence 72.3 Components of a BSP 202.4 The Development Environment 432.5 Avoiding Common Problems 50
VxWorksBSP Developer’s Guide, 6.0 122one LED available on your target hardware or a port pin that can be connected to a logic analyzer. One useful bi
4 Debugging Your BSP4.2 Basic Debugging Techniques1234void sysPrintDebug(char *msg) { unsigned long msgIx; int pollStatus; for (msgIx = 0; msgIx <
VxWorksBSP Developer’s Guide, 6.0 124If you are not sure if a particular block of code is included in the final image, you can use the #warning macro
4 Debugging Your BSP4.2 Basic Debugging Techniques1254Another way to see if components are included is to look at the nmarch -n output. For example:
VxWorksBSP Developer’s Guide, 6.0 126image instead of the bootrom image. If bootrom_uncmp is the target image, the image contains the full informatio
4 Debugging Your BSP4.3 Advanced Debugging Techniques1274Software BreakpointsThe type of breakpoints typically used during application development a
VxWorksBSP Developer’s Guide, 6.0 128If you want to debug an image during boot, there are two different conditions to be aware of: code running direc
4 Debugging Your BSP4.3 Advanced Debugging Techniques1294execution. Most other boot loaders provide similar functionality, though the commands may b
VxWorksBSP Developer’s Guide, 6.0 130
131 ACommon Development IssuesA.1 Introduction 131A.2 The Development Environment 132A.3 Cache and MMU 133A.4 Reusing Unportable Code 135A.5 Volatil
VxWorksBSP Developer’s Guide, 6.0 6Before describing the steps in the boot process, it is worth noting the files you must write or modify during BSP
VxWorksBSP Developer’s Guide, 6.0 132A.2 The Development Environment There are a number of problems that can occur due to your choice of development
A Common Development IssuesA.3 Cache and MMU133AIf your system becomes unresponsive, verify that the RAM addresses the code is actually loaded at ma
VxWorksBSP Developer’s Guide, 6.0 134cache entry points to. In this case, the modification that was made by the device is never visible to the proces
A Common Development IssuesA.4 Reusing Unportable Code135AA.4 Reusing Unportable Code A common problem when creating BSPs is that code for some dev
VxWorksBSP Developer’s Guide, 6.0 136However, there are several reasons why this is not good programming practice. In many modern processors, the phy
137 BDocumentation GuidelinesB.1 Introduction 138B.2 Written Style 138B.3 Sections for Libraries and Subroutines 145B.4 Sections for target.ref 153B
VxWorksBSP Developer’s Guide, 6.0 138B.1 IntroductionReference documentation for Wind River board support packages (BSPs) consists of UNIX-style ref
B Documentation GuidelinesB.2 Written Style139BPunctuation Always use a colon after the phrase or sentence introducing an example, display, itemized
VxWorksBSP Developer’s Guide, 6.0 140boot ROM bootrom, boot rom, bootROMbring up (v.) bringup, bring-upbring-up (n., adj.) bringup, bring upbps BPS,
B Documentation GuidelinesB.2 Written Style141Bfile system filesystemflash (n.) Flash, flash (v. or gerund)for example e.g.FTP ftpHP-UX HP/UX, HPUXh
2 Overview of a BSP2.2 Boot Sequence722.2 Boot SequenceThis section describes the steps in a typical VxWorks boot scenario and identifies which rou
VxWorksBSP Developer’s Guide, 6.0 142MS-DOS MSDOS, MS DOSmotherboard mother-board, mother boardmultiprocessor multi-processormultitasking multi-taski
B Documentation GuidelinesB.2 Written Style143Bscalable scaleable SCSI Scsi, scsiset up (v.) set-upsetup (n., adj.) set-upshell script shellscriptsi
VxWorksBSP Developer’s Guide, 6.0 144AcronymsDefine acronyms at first usage, except for widely recognized acronyms (see Table B-2). At first usage, g
B Documentation GuidelinesB.3 Sections for Libraries and Subroutines145BBoard NamesNames used for target boards should correspond to the names used
VxWorksBSP Developer’s Guide, 6.0 146In the examples that follow, mfr&board means the manufacturer’s name plus the full model name of the board,
B Documentation GuidelinesB.3 Sections for Libraries and Subroutines147B LibrariesDescribe briefly what this collection of routines does. The hyphen
VxWorksBSP Developer’s Guide, 6.0 148Tcl Procedures, Scripts, CommandsFor Tcl procedures, scripts, and other commands, this section is the execution
B Documentation GuidelinesB.3 Sections for Libraries and Subroutines149Bcomment for each parameter, which serves as a useful overview or memory jogg
VxWorksBSP Developer’s Guide, 6.0 150bytesPerBlkThe size of each logical block on the disk. If zero, the default is 512.blksPerTrackThe number of blo
B Documentation GuidelinesB.3 Sections for Libraries and Subroutines151B Mention only true returns in this section, not values copied to a buffer gi
VxWorksBSP Developer’s Guide, 6.0 82.2.1 Sequence OverviewMinimally, initializing a processor consists of providing a portion of code, and possibly
VxWorksBSP Developer’s Guide, 6.0 152Format the list with the item-list tags \is, \i, and \ie (for more information, see Item Lists (Definition Lists
B Documentation GuidelinesB.4 Sections for target.ref153Bbook on a line by itself—this approach is preferable when there are three or more books.B.4
VxWorksBSP Developer’s Guide, 6.0 154INTRODUCTION SectionThis section includes getting-started information, including subsections detailing ROM insta
B Documentation GuidelinesB.5 Format and Style155BUse the \bs and \be tags to display board diagrams. See the template BSP for guidelines on diagram
VxWorksBSP Developer’s Guide, 6.0 156Formatting is controlled by special text markup, summarized in Table B-5. Some markup consists of format command
B Documentation GuidelinesB.5 Format and Style157Binline ‘text’ or ’text’ Bold text, for literal names: filenames, commands, keywords, global varia
VxWorksBSP Developer’s Guide, 6.0 158Punctuation and SpellingQuotation MarksIf quotation marks really are necessary in text, always type a straight d
B Documentation GuidelinesB.5 Format and Style159B A group of all-uppercase words on a line by itself. Underscores and numbers are also permitted. F
VxWorksBSP Developer’s Guide, 6.0 160Example input:When semTake() returns due to timeout, it sets ’errno’ to S_objLib_OBJ_TIMEOUT (defined in objLib.
B Documentation GuidelinesB.5 Format and Style161BPlaceholder TextA placeholder (also known as a text variable) is a word that represents a value th
2 Overview of a BSP2.2 Boot Sequence92Figure 2-1 Boot Sequence Using a VxWorks Image sysInit sysAlib.s RAM-based loadablesysClkConnectusrKernelInitu
VxWorksBSP Developer’s Guide, 6.0 162Cross-References to Other Reference EntriesDo not use the UNIX-style parentheses-plus-number scheme to cross-ref
B Documentation GuidelinesB.5 Format and Style163BLists and TablesShort Word ListsA simple list of words or short phrases can be created simply by p
VxWorksBSP Developer’s Guide, 6.0 164Resulting output:FIODISKFORMATFormats the entire disk with appropriate hardware track and sector marks. No file
B Documentation GuidelinesB.5 Format and Style165BExample input:\tsKey | Name | Meaning----|------------+--------\& | ampersand | bitwise AND\|
VxWorksBSP Developer’s Guide, 6.0 166Because backslashes are not interpreted as an escape in \cs blocks, the backslash itself must not be escaped. Fo
B Documentation GuidelinesB.6 Directives167B If ports are stacked, be sure that your notation includes a description of which port is the relevant o
VxWorksBSP Developer’s Guide, 6.0 168The backslash is a significant deviation from refgen, apigen’s predecessor. Most refgen directives required no b
B Documentation GuidelinesB.6 Directives169BNote that these directives should not be used to suppress the publication of an entire file. The standar
VxWorksBSP Developer’s Guide, 6.0 170new name is used in searching for possible hyperlinks to the output file, but does not affect the name of the ou
B Documentation GuidelinesB.8 Generating Reference Entries171BThis will generate a target.ref file in the current directory.The resulting target.ref
VxWorksBSP Developer’s Guide, 6.0 10Figure 2-2 illustrates the boot sequence used when VxWorks is booted from a boot ROM. Figure 2-2 Boot Sequence Us
VxWorksBSP Developer’s Guide, 6.0 172and model of the board. For example: mv2603 = Motorola MVME2603. The files relevant to documentation are: Makefi
B Documentation GuidelinesB.8 Generating Reference Entries173BToolshost/host/bin/apigenThe apigen tool is a Perl script (refgen is a Tcl script) tha
VxWorksBSP Developer’s Guide, 6.0 174The flow chart in Figure B-1 shows how the make process distributes BSP reference entries in the docs directory.
175IndexSymbols_romInit( ) 8_sysInit( ) 8, 24Aadding other timers 73ambaTimer.c 108apigen tool 173architecture considerations 14avoiding common proble
VxWorks BSP Developer’s Guide, 6.0 176BSP development process 3time required 3BSP directoriesvtsLogs 23BSP filesbootInit.c 27bspname.h 23config.h 23c
Index177Indexdebugging 44advanced techniques 126basic techniques 116breakpoints 126forever loop 129in-circuit emulator (ICE) 46logic analyzer 46on-ch
VxWorks BSP Developer’s Guide, 6.0 178Hheader filesbspname.h 23config.h 23configAll.h 27IICE 46IDE 48image types 28vxWorks 77in-circuit emulator (ICE
Index179IndexsysFlashSet( ) 74Oobjdump 117OCD 45, 126on-chip debugging (OCD)see OCDone-shot timer 107examples 108OS image 11outConsole( ) 63PPCIautoc
VxWorks BSP Developer’s Guide, 6.0 180required macros 39 see also macros, BSP macrosrequired routines 32see also routinesreusing code 135ROM emulator
Index181IndexsysNvRamGet( ) 32, 36, 74, 109sysNvRamSet( ) 32, 36, 74, 109sysOneShotDisable( ) 107sysOneShotEnable( ) 107sysOneShotInit( ) 108sysPciAu
2 Overview of a BSP2.2 Boot Sequence1122.2.2 Boot Sequence Configurations There are several boot sequence configurations that are commonly supporte
Copyright © 2005 Wind River Systems, Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any me
VxWorksBSP Developer’s Guide, 6.0 12An image that continues running from flash and is built from a project is normally called vxWorks_romResident. Su
2 Overview of a BSP2.2 Boot Sequence132over the network. This image requires a large ROM space and a large RAM space. This image can not be run from
VxWorksBSP Developer’s Guide, 6.0 14bootrom_uncmp A VxWorks image with a boot loader application that is programmed into flash. This image copies its
2 Overview of a BSP2.2 Boot Sequence152The MIPS processor uses a ModeIn input pin to set 256 bits of initialization information. This information is
VxWorksBSP Developer’s Guide, 6.0 16The purpose of this routine is to initialize the CPU and some portion of memory. It does the absolute minimum amo
2 Overview of a BSP2.2 Boot Sequence172This routine must duplicate much of the hardware initialization done by romInit( ) in order to set the run-ti
VxWorksBSP Developer’s Guide, 6.0 18 Initializing Interrupt Vectors—The exception vectors must be initialized before enabling interrupts and starting
2 Overview of a BSP2.2 Boot Sequence192allocated to the system memory pool, which is managed by memPartLib. All cached dynamic allocations are deriv
VxWorksBSP Developer’s Guide, 6.0 20responsible for any board initialization not completed in sysHwInit( ), such as the connection of interrupt sourc
2 Overview of a BSP2.3 Components of a BSP212files, a custom usrAppInit.c file, another makefile for use with the project facility, and directories
iiiContents1 Introduction ... 11.1 About This Document ...
VxWorksBSP Developer’s Guide, 6.0 22The following files, located in target/config/all, may be copied to the BSP directory and modified during BSP dev
2 Overview of a BSP2.3 Components of a BSP232vtsLogsStarting with VxWorks 6.0, Wind River recommends, but does not require, that VxWorks validation
VxWorksBSP Developer’s Guide, 6.0 24This file is intended for constant information that is not subject to user configuration. If any macros or values
2 Overview of a BSP2.3 Components of a BSP252romInit.s This assembly file contains the romInit( ) routine, which is the entry point for bootstrappin
VxWorksBSP Developer’s Guide, 6.0 26sysHwInit2( ). These routines are described in 2.3.4 Required Routines, p.32. Also see the source code in your re
2 Overview of a BSP2.3 Components of a BSP272sysSerial.c would identify network interface and serial port drivers, respectively. Some device drivers
VxWorksBSP Developer’s Guide, 6.0 28The routine romStart( ) is essentially a loader. It performs the necessary decompression and relocation for the R
2 Overview of a BSP2.3 Components of a BSP292#include "sysIOPort.c" This means that the BSP contains a source file sysIOPort.c that does n
VxWorksBSP Developer’s Guide, 6.0 30initialized statically during compile time, but it may also be initialized dynamically early in the boot process.
2 Overview of a BSP2.3 Components of a BSP312The following state values are available:VM_STATE_VALIDVM_STATE_WRITABLEVM_STATE_CACHEABLEVM_STATE_MEM_
VxWorksBSP Developer’s Guide, 6.0 ivMakefile ... 23
VxWorksBSP Developer’s Guide, 6.0 32sysFlags int sysFlags ; /* boot flags */The sysFlags variable holds the boot flags, which control factors such as
2 Overview of a BSP2.3 Components of a BSP332development effort. The following pages describe the initial code for each required routine, and the fi
VxWorksBSP Developer’s Guide, 6.0 34sysMemTop( ) The sysMemTop( ) routine returns the address of the top of VxWorks memory. During early BSP developm
2 Overview of a BSP2.3 Components of a BSP352sysPhysMemTop( ) The sysPhysMemTop( ) routine in sysLib.c returns the address of the top of physical me
VxWorksBSP Developer’s Guide, 6.0 36/**************************************************************************** * * sysModel - return the model nam
2 Overview of a BSP2.3 Components of a BSP372supported, this routine returns a pointer to a statically allocated structure. The following is a sampl
VxWorksBSP Developer’s Guide, 6.0 38STATUS sysToMonitor ( int startType /* parameter passed to ROM to tell it how to boot */ ) { /* Warm reboot addre
2 Overview of a BSP2.3 Components of a BSP3922.3.5 Required Macros BSP macros are defined in either Makefile or config.h, with some macros defined
VxWorksBSP Developer’s Guide, 6.0 40ROM_WARM_ADRS (Optional. Defined in both Makefile and config.h, or in either)The boot ROM warm boot entry address
2 Overview of a BSP2.3 Components of a BSP412These macros must be defined before the configAll.h file is included. Note that BSP_VERSION and BSP_REV
ContentsvOn-Chip Debugging (OCD) Devices ... 45Logic Analyzer ...
VxWorksBSP Developer’s Guide, 6.0 42boot record. For architecture-specific information, see the appropriate VxWorks Architecture Supplement and the V
2 Overview of a BSP2.4 The Development Environment432linked with the boot ROM image. For more information, see the memory controller section of the
VxWorksBSP Developer’s Guide, 6.0 44directories; each library file contains object modules for individual components. In VxWorks 6.0, processor varia
2 Overview of a BSP2.4 The Development Environment452Native Debug ROMs In some cases, the board manufacturer provides flash software that can be use
VxWorksBSP Developer’s Guide, 6.0 46During development, the OCD is used like a standard software debugger—that is, it is used to trace and modify pro
2 Overview of a BSP2.4 The Development Environment472An in-circuit emulator provides all the advantages of an on-chip debugging (OCD) device and may
VxWorksBSP Developer’s Guide, 6.0 48selected parts of the OS (such as individual tasks), without affecting the rest of the system. Because the Wind
2 Overview of a BSP2.4 The Development Environment492 It must be able to generate code that works with the debugger, if any, that is to be used for
VxWorksBSP Developer’s Guide, 6.0 50 Use a ROM emulator (such as NetROM from AMC). The drawback of this approach is that it can take time for you to
2 Overview of a BSP2.5 Avoiding Common Problems512For example, the routine sysPhysMemTop( ) indicates the highest addressable memory present on the
VxWorksBSP Developer’s Guide, 6.0 vi3.3.2 Projects ...
VxWorksBSP Developer’s Guide, 6.0 52Modified Drivers Located in the Wrong Directory BSP writers frequently modify Wind River device drivers, as well
2 Overview of a BSP2.5 Avoiding Common Problems532Incorrect example 3:/* WRONG: DO NOT use a magic number in assembly source! */ lis r6, 0 /* load r
VxWorksBSP Developer’s Guide, 6.0 54
55 3Porting a BSP toCustom Hardware3.1 Introduction 553.2 Getting a Minimal Kernel Running 563.3 Finalizing Your BSP 723.1 Introduction This chapte
VxWorksBSP Developer’s Guide, 6.0 565. Complete the BSP. This can include adding support for busses, networking, boot ROMs, SCSI, caches, MMU initial
3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running573in romInit( ). The selection of processor registers that must be set early
VxWorksBSP Developer’s Guide, 6.0 58On a well-designed board, the LEDs are addressable without having too many processor or board registers configure
3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running593* Write to LED. */ BSCR_LED_REGISTER = sysLed; } /*************************
VxWorksBSP Developer’s Guide, 6.0 60/*********************************************************************** * * sysLedControl - Turn selected LED(s)
3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running613are provided in 2.2 Boot Sequence, p.7. This section reviews the steps of t
Contentsvii4.2.3 Verifying RAM ... 121Runtime Execution ...
VxWorksBSP Developer’s Guide, 6.0 62After the copy action, verify that the data segment is properly initialized. For example:int thisVal = 17; /* som
3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running633Console Output Routines In addition to the LED routines described above, it
VxWorksBSP Developer’s Guide, 6.0 64Copying Additional Code From the Reference BSP If you followed the guidelines provided in earlier sections, your
3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running653Initializing All Image Types The remainder of the initialization code is co
VxWorksBSP Developer’s Guide, 6.0 66mistake in BSP development is the failure to ensure that all interrupt sources are quiescent prior to enabling in
3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running673ROM as early as possible and thus save download cycles. In this case, start
VxWorksBSP Developer’s Guide, 6.0 68void (*myHwInit2Hook)(void); /* declare a hook routine */ ... void sysHwInit2 (void) { if (myHwInit2Hook != NULL)
3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running6933.2.6 Building and Downloading VxWorks The VxWorks image you load to the t
VxWorksBSP Developer’s Guide, 6.0 703.2.7 Interrupt Controllers The generic interrupt controller device drivers reside in the directory target/src/d
3 Porting a BSP to Custom Hardware3.2 Getting a Minimal Kernel Running713do is to perform board-specific hardware initialization in sysHwInit( ) and
VxWorksBSP Developer’s Guide, 6.0 viiiPunctuation and Spelling ... 158Headings .
VxWorksBSP Developer’s Guide, 6.0 72compatibility, these drivers are available in target/src/drv/serial. However, no new development should be done w
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP733However, this file should not be used by default. The file may also be commented out in
VxWorksBSP Developer’s Guide, 6.0 743.3.4 NVRAM VxWorks defines an interface for reading and writing to a persistent storage area. This interface is
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP7533.3.5 Cache, MMU, and DMA Devices The next step in the BSP development process is to ge
VxWorksBSP Developer’s Guide, 6.0 76For L2 cache support, the following routines must be supplied and added to sysCache.c:For cache lock support, the
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP773The L2 cache initialization routine sysL2CacheInit( ) should be called from sysHwInit( )
VxWorksBSP Developer’s Guide, 6.0 78sysPciAutoConfig( ) routine (located in sysBusPci.c) that makes a call to pciAutoCfg( ). If PCI autoconfiguration
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP793In addition, PCI support requires routines for low-level reads and writes to the PCI con
VxWorksBSP Developer’s Guide, 6.0 80The modern interface to the PCI autoconfiguration library, starting with VxWorks 5.5, uses an initialization rout
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP813PCI_FBB_ENABLE and PCI_FBB_DISABLE enable and disable the routines that check fast back-
1 1Introduction1.1 About This Document 11.2 The Board Support Package 21.3 BSP Development Process 31.4 Terminology 41.1 About This Document This d
VxWorksBSP Developer’s Guide, 6.0 82The default value of the MAX_LAT routine is NULL. Unless the MAX_LAT routine is changed, MAX_LAT values are set a
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP833Bus Numbering During autoconfiguration, the library maintains a counter with the highest
VxWorksBSP Developer’s Guide, 6.0 84Base Addressing 32-Bit Memory Space Address Register (Prefetchable) PCI_MEM32_LOC_SET This routine sets the base
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP853 PCI_MEMIO32_SIZE_SET This routine sets the maximum size memory chunk allowable for the
VxWorksBSP Developer’s Guide, 6.0 86 PCI_IO16_LOC_SET This routine sets the base address of the PCI 16-bit I/O space. This is an alternative to setti
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP873This routine can use any combination of this input data to ascertain any special initial
VxWorksBSP Developer’s Guide, 6.0 88The default value is NULL, so that no roll call delay is introduced before PCI configuration. Optional PCI Routin
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP893PCI_INT_ASSIGN_FUNC_SET This interrupt assignment routine is specified by assigning a fu
VxWorksBSP Developer’s Guide, 6.0 90Example 3-1 Basic PCI Configuration /* sysBusPci.c - configure PCI bus for hypothetical BSP */ /* forward declara
3 Porting a BSP to Custom Hardware3.3 Finalizing Your BSP913pciAutoCfgCtl(pCookie, PCI_FBB_ENABLE, (void *)NULL); return; } /***********************
Comments to this Manuals