RAM 6.0 BUX II Series Guía de usuario Pagina 87

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 189
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 86
3 Porting a BSP to Custom Hardware
3.3 Finalizing Your BSP
79
3
In addition, PCI support requires routines for low-level reads and writes to the PCI
configuration space. These routines are referenced from the PCI configuration files
through macros. The required macros are:
Typically, these macros refer to the following routines:
In addition to the PCI configuration space manipulation, you may also want to
provide routines to access device registers in PCI memory or I/O space, and do
appropriate byte swapping. For example, you may choose to include the following
routines:
The use of such routines makes it easier for variants of the BSP to support both big-
and little-endian configurations.
PCI_IN_BYTE read a byte from PCI I/O space
PCI_IN_WORD read a word from PCI I/O space
PCI_IN_LONG read a longword from PCI I/O space
PCI_OUT_BYTE write a byte from PCI I/O space
PCI_OUT_WORD write a word from PCI I/O space
PCI_OUT_LONG write a longword from PCI I/O space
sysPciInByte( ) reads a byte from PCI configuration space
sysPciInWord( ) reads a word (16-bit) from PCI configuration space
sysPciInLong( ) reads a long (32-bit) from PCI configuration space
sysPciOutByte( ) writes a byte to PCI configuration space
sysPciOutWord( ) writes a word (16-bit) to PCI configuration space
sysPciOutLong( ) writes a long (32-bit) to PCI configuration space
NOTE: Each of these routines returns the data in the same format used by the
processor. Because PCI is defined as little-endian, BSPs for processors that are big
endian must do byte-swapping in these sysPci*() routines.
sysPciRead32( ) read 32-bit PCI (I/O or memory) data
sysPciWrite32( ) write a 32-bit data item to PCI space
sysPciRead16( ) read 16-bit PCI (I/O or memory) data
sysPciWrite16( ) write a 16-bit data item to PCI space
Vista de pagina 86
1 2 ... 82 83 84 85 86 87 88 89 90 91 92 ... 188 189

Comentarios a estos manuales

Sin comentarios