Intel® IXP400 Software

Operating System Abstraction Layer (OSAL)

Table 64. OSAL I/O Memory and Endianness Interface (Sheet 2 of 2)

Mixed endian systems I/O Read/Write

IX_OSAL_SWAP_LONG

32-bit word byte swap

IX_OSAL_SWAP_SHORT

16-bit short byte swap

IX_OSAL_SWAP_SHORT_ADDR

16-bit short address swap

IX_OSAL_SWAP_BYTE_ADDR

byte address swap

IX_OSAL_READ_BYTE

I/O byte read

IX_OSAL_WRITE_BYTE

I/O byte write

IX_OSAL_READ_SHORT

I/O 16-bit short read

IX_OSAL_WRITE_SHORT

I/O 16-bit short write

IX_OSAL_READ_LONG

I/O 32-bit word read

IX_OSAL_WRITE_LONG

I/O 32-bit word write

IX_OSAL_WRITE_BE_SHARED_BYTE

big endian byte write

IX_OSAL_WRITE_BE_SHARED_SHOR

big endian 16-bit short write

T

 

IX_OSAL_WRITE_BE_SHARED_LONG

big endian 32-bit word write

IX_OSAL_READ_BE_SHARED_BYTE

big endian byte read

IX_OSAL_READ_BE_SHARED_SHORT

big endian 16-bit short read

IX_OSAL_READ_BE_SHARED_LONG

big endian 32-bit word read

IX_OSAL_SWAP_BE_SHARED_SHORT

big endian 16-bit short swap

IX_OSAL_SWAP_BE_SHARED_LONG

big endian 32-bit word swap

IX_OSAL_COPY_BE_SHARED_LONG_

big endian 32-bit word array copy

ARRAY

 

24.7Supporting a New OS

Support for a new operating system can be added separately by creating a new OS-specific folder under the “os” directory, with necessary modification to the core module and the build system to expand the supported OS list. It is not required that a new OS be supported for all the OSAL modules. Similarly, it is not required that supporting a new OS extends to the entire API within a module. For example, the new OS might not support locking via mutexes or semaphores.

To preserve the modularity, it is recommended that any API implementation that can be reused for another OS, and that exists in an OS-specific directory, be moved into the shared directory for the other operating system.

Each software component using the OSAL I/O memory mapping and endianness support module must define the following symbols:

IX_OSAL_MEM_MAP_TYPE

This selects dynamic (IX_OSAL_DYNAMIC_MEM_MAP) or static

(IX_OSAL_STATIC_MEM_MAP) memory mapping (required for the IX_OSAL_READ/WRITE macros) used by the software component.

April 2005

IXP400 Software Version 2.0

Programmer’s Guide

324

Document Number: 252539, Revision: 007

 

Page 324
Image 324
Intel IXP400 manual Supporting a New OS, Osal I/O Memory and Endianness Interface Sheet 2