⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 target.nr

📁 vxworks的bsp开发包(基于POWERPC的PRPMC800)
💻 NR
📖 第 1 页 / 共 5 页
字号:
.SS "Internal Dec2155x Interrupt Sources"At start-up, all Dec2155x interrupt sources are masked and cleared.Before unmasking an interrupt, an application ISR service routine must beattached to the appropriate Dec2155x interrupt vector using intConnect().Multiple ISR service routines can be connected to each vector if requiredby the application. Once the handler is attached, the interrupt can beenabled and disabled by calling sysDec2155xIntEnable() orsysDec2155xIntDisable() as required. Interrupt vector definitions for theDec2155x internal interrupt sources are defined in prpmc800.h.Unique interrupt vectors are provided for each of the 16 bits in theDec2155x Secondary IRQ register. Bit 0 (LSB) corresponds toDEC2155X_DOORBELL0_INT_VEC with the remaining bits mapped in sequence.These doorbell interrupts can be used for host-to-PrPMCBASE orPrPMCBASE-to-PrPMCBASE event notification. The Dec2155x interrupt handlerclears these interrupts which simplifies the application ISR.Individual interrupt vectors are also provided for Dec2155x Hot SwapPower State and I2O in-bound list events. The Dec2155x interrupt handleralso clears these interrupts.The 64 Upstream Memory 2 BAR Page Crossing interrupts are all presentedon a single interrupt vector and the application ISR is responsible forclearing the bits serviced. Calls to sysDec2155xIntEnable() andsysDec2155xIntDisable() enable or disable all 64 interrupts.The Dec2155x interrupt handler provides a default service routine for allunclaimed interrupt vectors, including the Upstream Memory 2 BAR PageCrossing interrupt. The default routine reports the event and clears theinterrupt source..SS "Compact PCI Backpanel Interrupts"The Dec2155x can generate cPCI backpanel interrupts using any of the bitsin the Primary IRQ register if they have been un-masked by the host. Thefollowing code fragment generates a compact PCI backpanel interrupt bysetting bit 15 (MSB) of the Primary IRQ register:.CS    if (sysBusIntGen (DEC2155X_DOORBELL15_INT_LVL,                      DEC2155X_DOORBELL15_INT_VEC) != OK)        return (ERROR);.CENote that the cPCI bus does not provide an interrupt vector to the host.The vector number passed to sysBusIntGen() simply identifies which bit inthe register to set. It is the host's responsibility to locate theinterrupt source and clear the interrupt..SH "BSP CONFIGURATION"Most BSP configuration values are taken from on-board Vital Product Data(VPD) and Serial Presence Detect (SPD) serial EEPROMs. If invalid VPD or SPDinformation is suspected or reported, defining NONFATAL_VPD_ERRORS, BYPASS_VPDand/or BYPASS_SPD in config.h may permit operation using default parameters.These build switches are intended for use during debug only as they hard-codenon-optimized SDRAM timing and other VPD information. Since the SDRAM timing isconfigured by the Bootrom, changing the state of BYPASS_SPD requires rebuildingthe Bootrom image and re-flashing..SS "PCI Dynamic Allocation Spaces"PCI_MSTR_IO_SIZE, PCI_MSTR_MEMIO_SIZE and PCI_MSTR_MEM_SIZE controlthe sizes of the available PCI address spaces.  PCI_MSTR_MEMIO_LOCAL(set to 1-Gigabyte (0x40000000) by default), controls the startinglocal address of the PCI memory space.  The windows defined by theseparameters must be large enough to accommodate all of the PCI memoryand I/O space requests found during PCI autoconfiguration.  If theyare not, some devices will not be autoconfigured.  For all prpmc800son the same PCI bus, the value assigned to PCI_MSTR_MEMIO_LOCAL mustbe greater than or equal to the value of the largest amount of DRAMamong these boards.  PCI_MSTR_MEMIO_LOCAL must also have the samenumeric value for all of the boards which appear on the same PCI bus..TS Ccenter;l l .\f3NOTE:\f1	T{PCI auto-configuration is performed by the bootroms. Any changes toPCI_MSTR_MEMIO_LOCAL, PCI_MSTR_IO_SIZE, PCI_MSTR_MEMIO_SIZE or PCI_MSTR_MEM_SIZE requires the creation of a new bootrom image.T}.TEBy default, the companion MCP750 BSP allocates a 32MB area aligned to a32MB boundary for dynamic PCI configuration. To access peer PrPMC800 DRAMareas, an upstream window must be opened which matches the size of thehost's dynamic PCI configuration area. For translation to work correctly,the host's dynamic PCI configuration area must be aligned to a multipleof the area's size and the corresponding Dec2155x upstream translationregister must contain the area's base cPCI address (not CPU address).Since this BSP supports peer-to-peer access between PrPMC800 DRAM areas,the default dynamic PCI configuration area for the PrPMC800 is 64MB alignedto a 64MB boundary which satisfies these requirements.In addition to the peer access window, sufficient space must also beavailable for mapping the host DRAM upstream window and any spacerequired by PrPMCBASE-resident PCI devices. A margin must also be allowedfor areas that are unusable due to window alignment requirements.If the application does not require peer-to-peer PrPMC800 DRAM access, thelarge 32MB window used to contain the host's dynamic PCI configurationarea can be eliminated with a corresponding decrease in the requiredPrPMC800 dynamic PCI configuration area. If peer-to-peer doorbellinterrupts are still required, the doorbell interrupt registers of peerPrPMCBASE boards may be accessed through an I/O window which has much smallerCPU address space requirements. This would require re-configuring thedefault BSP to access host DRAM through Upstream Memory 1 BAR and usingthe Upstream I/O or Memory 0 BAR to access the peer PrPMCBASE doorbellinterrupt registers..SS "Altering the Default Dec2155x Configuration:Altering the Dec2155x configuration requires the careful consideration ofseveral items:.IPDec2155x window sizes and alignment..IPDec2155x translation values..IPThe size and alignment of the host's dynamic PCI configuration area..IPThe size and alignment of the PrPMC800's dynamic PCI configuration area..LPThe Dec2155x window parameters are controlled by #defines in config.h.There are three defines associated with each window:.TS Ccenter;rw11 lw(4.0i) .\&..._SIZE	T{determines the size of the window in bytes and must be anintegral power of two. The minimum size for a PCI I/Ospace window is 64 bytes. The minimum size for a PCImemory space window is 4KB. To disable a window, set thesize to 0. Note that the Dec2155x will not allow thePrimary CSR and Downstream Memory 0 BAR to bedisabled. If the size of this window is set to zero, theDec2155x will default to a 4KB window.T}\f3NOTE:\f1	T{If a window value is not a power of 2, or is below the minimum size, sysLib.cwill not compile.T}.TE.TS Ccenter;rw11 lw(4.0i) .\&..._TYPE	T{determines the type of the window and any placementrestrictions. For proper operation, the window must beconfigured for placement anywhere in the 32-bit PCIaddress space.T}.TE.TS Ccenter;rw11 lw(4.0i) .\&..._TRANS	T{determines the base address of the window on the targetPCI bus. It is important to remember that this is a localPCI address (downstream window) or a cPCI address(upstream window). The translation value chosen must bean even multiple if the window size.T}\f3NOTE:\f1	T{If the translation value is not a multiple of the windowsize, sysLib.c will not build.T}.TEThe default window sizes can be reduced without altering the sizes of thedynamic PCI configuration area. However, if the required values aresignificantly reduced from the default values, reducing the size of thedynamic PCI configuration area reduces the size of the MMU page tables atthe ratio of 128:1 (a 128KB reduction saves 1KB of MMU table space)..SS "Shared Memory Support"The PrPMC800 BSP supports shared memory backplane communication withthe MCP750 or CPV5000 as the Compact PCI host node.  The Wind Riverdocumentation provides a great deal of information regarding sharedmemory concepts.  The section below provides tutorial style informationregarding the setup of a shared memory system involving the PrPMC800/PrPMCBASEand either a MCP750 or a CPV5000..TS Ccenter;l l .\f3NOTE:\f1	T{Wind River shared memory support is available for Monarch/Slaveconfigurations with the anchor and shared memory pool residing on theMonarch.  Shared memory support is also available forMCP750/Monarch/Slave configurations in which the Monarch and Slave areconfigured together on a single carrier card.  Multiple carrier cardswith Monarch/Slave configurations are possible in the same sharedmemory setup as long as the shared memory pool is configured on thesystem-slot board (MCP750 or CPV5000).T}.TESetting up a working shared memory system involves proper setting ofcertain "config.h" parameters and proper setting of boot parametersvia the "c" command from the boot prompt.  There are three componentsinvolved in shared memory communication which must be configuredproperly to create a working system:.IP "Anchor:"This is an area of memory which must be accessible to all nodesparticipating in shared memory backplane communication.  The anchorpoints to the actual shared memory buffer pool which must be locatedin the same memory space as the anchor itself.  The associated"config.h" parameter is SM_ANCHOR_ADRS.  In certain configurations,nonzero nodes will "poll" for the location of the anchor.  "config.h"#define's which come into play for polling are SM_OFF_BOARD,SYS_SM_SYSTEM_MEM_POLL, and SYS_SM_BUS_NUMBER..IP "Master node:"This node is always designated as node zero.  It is the node whichsets up the anchor and shared memory pool.  Once the anchor and sharedmemory pool is set up, the master node acts as a peer with the othernodes.  The node number (0 in this case) is one of the boot parameterswhich can be set up with the "c" command from the bootline prompt..IP "Sequential addressing:"This is governed by a "config.h" parameter, INCLUDE_SM_SEQ_ADDR and isused when sequential IP addresses are assigned to the participatingnodes.  Node zero is assigned the lowest IP address, followed by nodes1, 2 etc. which are assigned the subsequent and sequential IP addresses.The advantage of sequential addressing is that fewer boot parametersmust be specified to configure the system..LPThe following restrictions apply to shared memory configurations..TS Ccenter;l l .1)	T{Node zero must not boot over the shared memory interface.  Onlynonzero nodes are allowed to boot over the shared memory "sm"interface.T}2)	T{The location of the anchor must be statically determinable by themaster node (node 0).  That is, the location of the anchor musteither be a build-time static parameter or it must be able tobe communicated to the master node via the "sm=xxxxxxxx" bootconfiguration parameter.  The nonzero nodes need not know thelocation of the anchor at build or boot time but can be configuredto poll for the anchor dynamically.T}.TE.TS Ccenter;l l .\f3NOTE:\f1	T{Another piece of shared memory terminology is "host node".The "host node" is the node which configures the compact PCI busduring startup initialization.  In a system consisting of an MCP750and one or more PrPMCBASE boards, the "host node" is the MCP750.  Don'tconfuse "host node" with "master node".  "Master node" is simply asynonym for "node 0".  The "host node" may or may not be the "masternode".  Note also that the "host node" need not necessarily be a VxWorksnode.T}.TEBelow are the crucial "config.h" parameters involved in shared memory:.IP "CPCI_MSTR_MEM_BUS (address):"The parameter is used to identify the address at which thesystem-slot board's DRAM will be configured.  This is dependent on the hostboard used and is defined in "config.h".  The explanation saysto set the value to 0x80000000 for a MCP750 host (default) or0x00000000 for a CPV5000 host..IP "SM_OFF_BOARD (TRUE or FALSE):"The parameter has a configurable value of either TRUE or FALSEand directly determines the value of SM_ANCHOR_ADRS (the anchoraddress).If SM_OFF_BOARD is defined as FALSE, then the anchor is on-boardand SM_ANCHOR_ADRS is defined to beLOCAL_MEM_LOCAL_ADRS + SM_ANCHOR_OFFSET.LOCAL_MEM_LOCAL_ADRS is defined as 0x0 in "config.h" andSM_ANCHOR_OFFSET is defined as 0x4100 in "config.h" to work withan MCP750.  SM_ANCHOR_OFFSET needs to be changed to 0x1100 in"config.h" to work with a CPV5000.If defined as TRUE, then SM_ANCHOR_ADRS is defined as a functioncall: sysSmAnchorAdrs() (defined in "sysLib.c").  This functionwill dynamically poll, at system startup, various locations(explained below) for the exact location of the shared memoryanchor.Note that if "sm=xxxxxxxx" is used as a boot parameter, thenSM_OFF_BOARD has no effect.  The value of "xxxxxxxx" will be usedas the anchor location regardless of the setting of SM_OFF_BOARD.If simply "sm" is used as a boot parameter, then SM_OFF_BOARD isqueried at initialization time to determine if polling is requiredor not..IP "SYS_SM_BUS_NUMBER:"This can be #define'd to be either SYS_LOCAL_PCI_BUS_NUMBER orSYS_BACKPLANE_BUS_NUMBER.  If a system-slot board such as the MCP750 isparticipating in shared memory, then SYS_SM_BUS_NUMBER must be #define'd tobe SYS_BACKPLANE_BUS_NUMBER.  This signifies the fact that the Monarchand/or slave must generate traffic on the compactPCI bus in order forthe shared memory system to function properly.  If only a Monarch andSlave are involved in the shared memory system then all of theactivity for shared memory is restricted to the local PCI bus.  Inthat case SYS_SM_BUS_NUMBER should be #define'd asSYS_LOCAL_PCI_BUS_NUMBER..IP "SYS_SM_SYSTEM_MEM_POLL (#define or #undef):"This define only has an effect if anchor polling is called for(because SM_OFF_BOARD is defined as TRUE and "sm" is used with no"=xxxxxxxx").  In this case, simply defining SYS_SM_SYSTEM_MEM_POLLwill cause the node to poll for the anchor at compact PCI busaddress CPCI_MSTR_MEM_BUS + SM_ANCHOR_OFFSET (0x80004100)."System memory" (which is the host node's DRAM) willbe included as one of the locations where the anchor might reside.Note that other locations may be polled as well (explained later).Not defining SYS_SM_SYSTEM_MEM_POLL will prevent the polling ofsystem  memory for the anchor..IP "SYS_SM_ANCHOR_POLL_LIST (#define or #undef):"This define has an effect only if polling is called for (seeSM_OFF_BOARD explained above).  When defined,SYS_SM_ANCHOR_POLL_LIST allows a list of devices, identified bydevice/vendor ID and subsystem ID/subsystem vendor ID to bespecified as candidates for the anchor location.  Devices whichappear on the bus #define'd by SYS_SM_BUS_NUMBER (describedabove) are found and if theyappear on the list defined by SYS_SM_ANCHOR_POLL_LIST, they arechecked to see if they contain the shared memory anchor.  The memoryaccessed by the BAR at configuration offset "N" (where "N" is also defined in SYS_SM_ANCHOR_POLL_LIST) is queried.  The block of memory viewablethrough this BAR is examined at address offset SM_ANCHOR_OFFSET (definedin "config.h).If SYS_SM_ANCHOR_POLL_LIST is not defined, ALL devices on the specified bus will be considered candidates for the anchor location andwill be polled.  If SYS_SM_ANCHOR_POLL_LIST defined but empty, NOdevices on bus will be considered candidates forthe anchor location.  In that case, the only location polled wouldbe system memory if SYS_SM_SYSTEM_MEM_POLL (see above) was defined..IP "INCLUDE_SM_SEQ_ADDR (#define or #undef)"If "undef'ed", sequential addressing is disabled.  This symbolis defined by default..LPConsider a system consisting of an MCP750 (host node) and two PrPMCBASEboards. The following three configurations are the only ones possible:.TS Ccenter;l l .1)	T{MPC750 (contains anchor) with one or more PrPMC Base cards, each

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -