📄 target.nr
字号:
routine also disables interrupts and locks the VMEbus while accessing thesemaphore. It waits up to 10 microseconds to gain bus ownership. But, even ifthe bus is not owned after this period, the routine attempts to clear thesemaphore.If one board uses software TAS, then \f2all\f1 boards on a sharedmemory backplane must use it.When hardware TAS is enabled, special consideration must be given to theoverall system design and board locations in the VME card rack. If all VMEboards on a backplane use the special hardware TAS methods utilized in this BSP,there should be no problems. If boards with differing TAS/RMW capabilities areused together, then either the first (master) board, which hosts the sharedmemory, must use the hardware TAS method utilized in this BSP, or the sharedmemory must reside on a separate VME global memory board.As an example of a hardware TAS system that cannot work, consider using aMotorola MVME162 as the master board and an MVME2400 as a slave. The mv162BSP assumes that support exists for atomic TAS/RMW cycles on to and off ofall boards in the system. Furthermore, the local 68040 CPU can access and alter its memory \f2between\f1 VMEbus cycles. Therefore, this systemconfiguration does not work because there is no way to ensure atomic accessto a semaphore by the MVME2400 board..SS "Interrupts"The system interrupt vector table has 256 entries. Vectors for the variousdevices on the buses are assigned hierarchically as follows:.TS Ccenter;lf3 lf3l lw(2.6i) ..ne 6.sp .5Vector# Assigned to_00 - 0f ISA IRQ numbers 0 - 1510 - 1f All MPIC interrupts20 - 23 Hawk timers24 - 27 Hawk interprocessor dispatch 28 Hawk detected internal errors29 - 55 [User defined]56 - 5f Universe-specific interrupts60 - ff [User defined].TEThe specific ISA vector number assignments are:.TS Ccenter;lf3 lf3l lw(2.6i) ..ne 6.sp .5Vector# Assigned to_ 02 [Cascade interrupt from PIC2] 04 Debug serial port.TEVector numbers not in the table are not used by this BSP.The standard ISA Intel 8259 Programmable Interrupt Controllers (PICs) asserttheir interrupts through the HawkMPIC as an external interrupt. The externalinterrupt vector numbers are:.TS Ccenter;lf3 lf3l lw(2.6i) ..ne 14.sp .5Vector# Assigned to_ 10 ISA PICs 12 PCI Ethernet 15 PCI Universe VME INT 0 16 PCI Universe VME INT 1 17 PCI Universe VME INT 2 18 PCI Universe VME INT 3 19 PCI PMC1/PCIX INTA, PMC2 INTB 1a PCI PMC1/PCIX INTB, PMC2 INTC 1b PCI PMC1/PCIX INTC, PMC2 INTD 1c PCI PMC1/PCIX INTD, PMC2 INTA 1d LM/SIG (mailbox) 0 1e LM/SIG (mailbox) 1.TEVector numbers not in the table are not used by this BSP.The Hawk Multi-Processor Interrupt Controller (MPIC) sets system interruptpriorities and serves as controller of all external interrupts. Eachof its 16 interrupt control registers, designated IRQ0 through IRQ15, can beprogrammed with a relative priority from 15, the highest, to 0, the lowest. Apriority of zero effectively disables the interrupt. All but one of the 16control registers has been hardwired to a particular interrupt source. The IRQnumber and priority assignments are as follows:.TS Eexpand;lf3 lf3 lf3l l lw(2.6i) ..ne 6.sp .5Hawk MPIC IRQ Priority IRQ Source_IRQ0 8 Winbond PIB [all ISA interrupts]IRQ1 N/A [Not Used]IRQ2 14 EthernetIRQ3 N/A [Not Used]IRQ4 N/A [Not Used]IRQ5 10 Universe LINT0 [all Universe/VME interrupts]IRQ6 0 Universe LINT1IRQ7 0 Universe LINT2IRQ8 0 Universe LINT3IRQ9 7 PCI PMC1/PCIX INTA, PMC2 INTBIRQ10 6 PCI PMC1/PICX INTB, PMC2 INTCIRQ11 5 PCI PMC1/PICX INTC, PMC2 INTDIRQ12 4 PCI PMC1/PICX INTD, PMC2 INTAIRQ13 0 LM/SIG Interrupt 0IRQ14 15 LM/SIG Interrupt 1 (mailbox)IRQ15 N/A [Not used].TEFor further details, refer to the appropriate board's reference guide.There are only four PCI bus interrupts: A, B, C, and D. They are shared amongall PCI bus devices and do not have levels. PCI bus interrupts are wireddirectly to the MPIC and, therefore, have pre-assigned system vector numbersand interrupt levels. The user enables one or more PCI interrupts and connectsvectored ISRs to the system by following these steps:.IP "1)"Identify the PCI interrupt letter(s) as required by the application. Based on this, identify the associated system interrupt level from the following tables: Primary PCI Bus ---------------- A = PMC_INT_LVL1 B = PMC_INT_LVL2 C = PMC_INT_LVL3 D = PMC_INT_LVL4 Secondary PCI Bus ----------------- A = PMC_INT_LVL4 B = PMC_INT_LVL3 C = PMC_INT_LVL2 D = PMC_INT_LVL1.IP "2)"Define the vector for each PCI interrupt as follows:INT_VEC_IRQ0 + PMC_INT_LVLx where x is 1, 2, 3, or 4, as determined above..IP "3)"In the application code, perform intConnect() foreach vector and its associated ISR..IP "4)"Perform sysIntEnable() for each identified system interrupt level..IP "5)"When the application has finished, perform sysIntDisable() for each identified level..SS "PCI Auto-Configuration"To simplify the addition of PCI-based add-in cards, the BSP provides a PCIauto-configuration library. When INCLUDE_AUTOCONF is defined, the BSP willautomatically locate and configure installed PCI devices. WhenINCLUDE_AUTOCONF is not defined, add-in PCI devices will not be located orconfigured.If PCI auto-configuration is selected, the auto-cofiguration library will becalled from sysHwInit to discover and configure the installed PCI devices andbridges. Device configuration includes the following PCI information:.IP "Base Address Registers (BARs)"Space in the address map is dynamically allocated to each valid BAR detected.Allocation pools are maintained for the following PCI address spaces:16-Bit PCI I/O.br32-Bit PCI I/O.brPCI Memory I/O (non-prefetchable memory).brPCI Memory (pre-fetchable).IP "Interrupt Routing"The correct interrupt vector number is placed in the intLine register of thedevice's PCI header. To connect to the devices's interrupt, simply callintConnect with the value read from intLine..IP "PCI Header Completion"The PCI auto-configuration library fills in the remainder of the PCI header asfollows:Cache Line Size = _CACHE_ALIGN_SIZE/4.brLatency Timer = PCI_LAT_TIMER.brCommand Register = I/O enabled, Memory enabled and Bus Master enabled..IP "PCI-to-PCI Bridge Configuration"PCI-to-PCI bridges encountered during PCI auto-configuration will be configuredas necessary and devices detected behind the bridge will be configured asdescribed above. Bridge configuration consists of the following:Primary Bus Number, Secondary Bus Number and Subordinate Bus Number arefilled in according to the bridge's position in the system..spI/O Base and Limit registers are configured as required to forward PCItransactions to PCI devices detected and configured beyond the bridge..spMemory Base and Memory Limit registers are configured as required to forwardPCI transactions to PCI devices detected and configured beyond the bridge..spCommand Register = I/O enabled, Memory enabled and Bus Master enabled..spCache Line Size = _CACHE_ALIGN_SIZE/4.brPrimary Latency Timer = PCI_LAT_TIMER.brSecondary Latency Timer = PCI_LAT_TIMER.spNOTE: Due to a descrepancy in the PCI Auto-Configuration code, pre-fetchablememory requests below a PCI-to-PCI bridge are not currently honored. The addressspace requested by a fre-fetachable Base Address Register will be allocated fromthe non-prefetchable pool..SS "Serial Configuration"The single debug port on the MVME24xx board family is implemented in aTLC16550 UART. It is an ISA bus device. The RJ-45 jack is placed on the frontpanel of the board and is configured as a DTE connection.By default, the serial port is configured as asynchronous, 9600 baud, with1 start bit, 8 data bits, 1 stop bit, no parity, and no hardware or softwarehandshake. Hardware handshake using RTS/CTS is a supported option..SS "SCSI Configuration"SCSI is not available on the MVME24xx board family..SS "Network Configuration"All boards have one Ethernet port which is 10baseT and 100baseTX compatible.The MVME24xx boards have an RJ45 jack on their front panel for connectionto this facility.The Ethernet driver automatically senses and configures the port as 10baseT or100baseTX. The Ethernet driver is compatible with both DEC2104x and DEC2114xdevices (for the 24xx family, a DEC21143 chip is used).The Media Access Control (Ethernet) address for each port is obtained from aserial ROM contained in the DEC21143 chip. If the address is not found inserial ROM, the driver attempts to read it from NVRAM..SS "VME Access"VMEbus accesses can be classified as either master or slave. A master accessis one in which the accessing processor has bus mastership (it owns the bus)and is addressing resources on another VME board (the slave board). Themaster addresses the off-board resources through a memory mapping mechanismwhich assigns portions of the local address space to the various VME addressspaces. These local memory regions are windows onto the VMEbus. Eachwindow is individually configured with a set of base addresses -- one for thelocal bus, the other for the VMEbus -- and a window size.A slave access is one in which slave VME processors allow access totheir resources from the various VME address spaces through slave windows.The normal VxWorks default is to enable the slave access windows only onCPU 0, as part of the routine sysProcNumSet(). Otherwise, slave accessesare normally not permitted.The default configuration maps all local memory onto VME A32. There are no A24or A16 slave windows.There is no support for the A64/D64 VME extensions.To disable any VME master or slave window, just set the appropriateVME_Axx_xxx_SIZE macro (in config.h) to 0. Only the macros in config.h areconsidered user options. Macros in mv2400.h should not be changed bythe user.There are two addressing models supported: the default Extended VME A32 and one for the optional pseudo-PReP address model. For more information on the pseudo-PReP model, see .I SPECIAL CONSIDERATIONS.The following lists the window parameters that the user may change in config.hfor both models:.CS #define VME_A32_MSTR_BUS 0x08000000 #define VME_A32_MSTR_SIZE 0x08000000 /* (128MB) */ #define VME_A24_MSTR_BUS 0x00000000 #define VME_A24_MSTR_SIZE 0x01000000 /* (16MB) */ #define VME_A16_MSTR_SIZE 0x00010000 /* (64KB) */ #define VME_A32_SLV_LOCAL LOCAL_MEM_LOCAL_ADRS #define VME_A32_SLV_BUS VME_A32_MSTR_BUS #define VME_A32_SLV_SIZE LOCAL_MEM_SIZE.CEThe Extended VME A32 Memory Model provides extended mapping to VME A32 space.The A32 window size can extend to address more than 3.5GB on the VMEbus..ne 10The master window address mappings are as follows:.TS Eexpand;cf3 s s slf3 lf3 lf3 lf3l l l l ..ne 6.sp .5VME MasterAddress Space VME Base Address Size Local Base Address_A16 0x0000 64KB 0xFBFF0000A24 0x000000 16MB 0xFA000000A32 VME_A32_MSTR_LOCAL 128MB VME_A32_MSTR_LOCALA32 (Mailbox) 0xFB000000 4KB 0xFB000000.TEThe slave window address mappings are as follows:.TS Eexpand;cf3 s s slf3 lf3 lf3 lf3l l l l ..ne 6.sp .5VME Slave Address Space VME Base Address Size Local Base Address_A16 (none)A24 (none)A32 0x00000000 128MB 0x00000000A32 (Mailbox) 0xFB000000 4KB T{0x00001000.br(PCI I/O Space)T}.TEDMA support is implemented as a synchronous "VxWorks driver",that is, the calling task will be blocked until the DMA transfer hasterminated. However, the driver itself is a polled driver, and it willnot relinquish the CPU waiting for an interrupt; instead, it will entera busy loop periodically sampling the DMA transfer status for termination.A major intended use of this driver is to transfer TCP/IP packets(packet size approx. 2K). In light of its' intended use and to keep thisdriver as simple as possible, only direct-mode operations will beimplemented, that is, linked-list mode will not be supported.This driver is strictly non-sharable; however, it contains no guardsto prevent multiple tasks from calling it simultaneously. It assumesthat the application layer will provide atomic access to this driverthrough the use of a semaphore or similar guards.As a precaution,it is recommended by the Tundra User's Manual that the callingtask set up a background timer to prevent an infinite waitcaused by a system problem. Also, tasks transferring largeblocks of data should lower their priority level to allow othertasks to run, and tasks transferring small blocks of datashould use bcopy() instead of calling this driver..SS "PCI Access"The 32-bit PCI bus is fully supported under the .I PCI Local Bus Specification, Revision 2.1. The 64-bit extensions are not supported. All configuration space accesses are made with BDF (bus number, device number, function number) format calls inthe pciConfigLib module. For more information, refer to the reference entries .I mv24xx_pciXxx.The PCI address mappings are affected by the VME address model selected. See .I SPECIAL CONSIDERATIONS.The Extended VME A32 address model produces the following PCI address mapping:.TS Eexpand;cf3 s slf3 lf3 lf3l l l ..ne 6PCI I/O Space Access.sp .5Start Size Access to_0x00000000 16KB ISA Legacy I/O space0x00001000 4KB (fixed) T{On-board VME mailbox (inside ISA Legacy space)T}0x00004000 48KB 16-bit PCI I/O0x00010000 8MB 32-bit PCI I/O space.TE.TS Eexpand;cf3 s slf3 lf3 lf3l l l ..ne 6PCI MEM Space Access.sp .5Start Size Access to_0x00000000 LOCAL_MEM_SIZE DRAM space (32MB - 512MB)VME_A32_MSTR_LOCAL ~3.7GB (max) VME A32 master space 128MB (std)0xFA000000 16MB (max) VME A24 master space [1]0xFB000000 64KB (fixed) VME mailbox (A32) space0xFBFF0000 64KB (max) VME A16 master space0xFC000000 256KB (fixed) MPIC REGS0xFD000000 8MB PCI MEM I/O
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -