iPXE
Enumerations | Functions
mlx_pci.h File Reference
#include "mlx_utils.h"

Go to the source code of this file.

Enumerations

enum  mlx_pci_width { MlxPciWidthUint8 = 0, MlxPciWidthUint16, MlxPciWidthUint32, MlxPciWidthUint64 }

Functions

 FILE_LICENCE (GPL2_OR_LATER)
mlx_status mlx_pci_init (IN mlx_utils *utils)
mlx_status mlx_pci_teardown (IN mlx_utils *utils)
mlx_status mlx_pci_read (IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint32 offset, IN mlx_uintn count, OUT mlx_void *buffer)
mlx_status mlx_pci_write (IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint32 offset, IN mlx_uintn count, IN mlx_void *buffer)
mlx_status mlx_pci_mem_read (IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint8 bar_index, IN mlx_uint64 offset, IN mlx_uintn count, OUT mlx_void *buffer)
mlx_status mlx_pci_mem_write (IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint8 bar_index, IN mlx_uint64 offset, IN mlx_uintn count, IN mlx_void *buffer)

Enumeration Type Documentation

Enumerator:
MlxPciWidthUint8 
MlxPciWidthUint16 
MlxPciWidthUint32 
MlxPciWidthUint64 

Definition at line 27 of file mlx_pci.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER  )

Definition at line 28 of file mlx_pci.c.

References MLX_INVALID_PARAMETER, mlx_pci_init_priv(), MLX_SUCCESS, NULL, and status.

Referenced by mlx_utils_init().

{
        mlx_status status = MLX_SUCCESS;
        if( utils == NULL){
                status = MLX_INVALID_PARAMETER;
                goto bail;
        }
        status = mlx_pci_init_priv(utils);
bail:
        return status;
}

Definition at line 43 of file mlx_pci.c.

References MLX_INVALID_PARAMETER, mlx_pci_teardown_priv(), MLX_SUCCESS, NULL, and status.

Referenced by mlx_utils_teardown().

{
        mlx_status status = MLX_SUCCESS;
        if( utils == NULL){
                status = MLX_INVALID_PARAMETER;
                goto bail;
        }
        status = mlx_pci_teardown_priv(utils);
bail:
        return status;
}
mlx_status mlx_pci_read ( IN mlx_utils utils,
IN mlx_pci_width  width,
IN mlx_uint32  offset,
IN mlx_uintn  count,
OUT mlx_void buffer 
)
mlx_status mlx_pci_write ( IN mlx_utils utils,
IN mlx_pci_width  width,
IN mlx_uint32  offset,
IN mlx_uintn  count,
IN mlx_void buffer 
)

Definition at line 77 of file mlx_pci.c.

References MLX_INVALID_PARAMETER, mlx_pci_write_priv(), MLX_SUCCESS, NULL, and status.

Referenced by mlx_pci_gw_free_ownership(), mlx_pci_gw_get_ownership(), mlx_pci_gw_read(), mlx_pci_gw_set_space(), and mlx_pci_gw_write().

{
        mlx_status status = MLX_SUCCESS;
        if( utils == NULL || count == 0){
                status = MLX_INVALID_PARAMETER;
                goto bail;
        }
        status = mlx_pci_write_priv(utils, width, offset, count, buffer);
bail:
        return status;
}
mlx_status mlx_pci_mem_read ( IN mlx_utils utils,
IN mlx_pci_width  width,
IN mlx_uint8  bar_index,
IN mlx_uint64  offset,
IN mlx_uintn  count,
OUT mlx_void buffer 
)

Definition at line 96 of file mlx_pci.c.

References MLX_INVALID_PARAMETER, mlx_pci_mem_read_priv(), MLX_SUCCESS, NULL, and status.

Referenced by nodnic_device_clear_int().

{
        mlx_status status = MLX_SUCCESS;
        if( utils == NULL || count == 0){
                status = MLX_INVALID_PARAMETER;
                goto bail;
        }
        status = mlx_pci_mem_read_priv(utils, width,bar_index, offset, count, buffer);
bail:
        return status;
}
mlx_status mlx_pci_mem_write ( IN mlx_utils utils,
IN mlx_pci_width  width,
IN mlx_uint8  bar_index,
IN mlx_uint64  offset,
IN mlx_uintn  count,
IN mlx_void buffer 
)

Definition at line 116 of file mlx_pci.c.

References MLX_INVALID_PARAMETER, mlx_pci_mem_write_priv(), MLX_SUCCESS, NULL, and status.

Referenced by flexboot_nodnic_arm_cq(), and nodnic_device_clear_int().

{
        mlx_status status = MLX_SUCCESS;
        if( utils == NULL || count == 0){
                status = MLX_INVALID_PARAMETER;
                goto bail;
        }
        status = mlx_pci_mem_write_priv(utils, width, bar_index, offset, count, buffer);
bail:
        return status;
}