Intel IXP400 Frozen Dessert Maker User Manual


 
Intel
®
IXP400 Software
Operating System Abstraction Layer (OSAL)
April 2005 IXP400 Software Version 2.0 Programmer’s Guide
322 Document Number: 252539, Revision: 007
24.6.2 Buffer Management Module
This module defines a memory buffer structure and functions for creating and managing buffer
pools.
Table 63 provides an overview of the buffer management module.
24.6.3 I/O Memory and Endianness Support Module
The OSAL I/O Memory Management and Endianness Support Module implements:
I/O memory management
Big and little endian support
I/O memory management defines a set of macros allowing the user to gain and release access to
memory-mapped I/O in an operating-system-independent fashion. Depending on the target
platform and OS, gaining access can vary between statically mapped I/O to dynamically mapped
I/O through OS-specific functions (for example, ioremap() in Linux).
Using a global memory map, which defines the specifics of each memory map cell (for example,
UART registers), the access of I/O memory can be abstracted independent of operating systems,
dynamic mapping, or endianness-dependent virtual memory locations. This functionality makes
the code far more portable across different operating systems and platforms.
Wind River* VxWorks OS maintains a 1:1 virtual to physical mapping. However, this is not the
case in other OS such as Linux . The OSAL layer provides a portable approach that involves
mapping the memory when the software is initialized to access the desired memory and unmapping
the memory when the software unloads. Depending upon the build for a particular OS (and if the
memory is not statically mapped), the OSAL can create MMU entries to map the specified physical
address in the usable memory range.
Additionally, the mapping automatically considers the endianness type in systems that can use
mixed endian modes (such as the IXP4XX product line and IXC1100 control plane processors).
This behavior is controlled by two defines which have to be supplied by the software using these
methods: IX__OSAL_COMPONENT_MAPPING and IX_OSAL_MEM_MAP_TYPE.
Table 63. OSAL Buffer Management Interface
IX_OSAL_MBUF memory buffer
Types
IX_OSAL_MBUF_POOL memory buffer pool
ixOsalPoolInit initializes pool with memory allocation
ixOsalNoAllocPoolInit initializes pool without memory allocation
ixOsalMbufAlloc allocates a buffer from a pool
ixOsalMbufFree frees a buffer into its pool
ixOsalMbufChainFree frees a buffer chain into its pool
ixOsalMbufDataPtrReset resets the buffer data pointer
Functions
ixOsalPoolShow displays pool statistics