iPXE
Functions
mlx_pci.c File Reference
#include <stddef.h>
#include "../../include/private/mlx_pci_priv.h"
#include "../../include/public/mlx_pci.h"

Go to the source code of this file.

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)
 

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER  )

◆ mlx_pci_init()

mlx_status mlx_pci_init ( IN mlx_utils utils)

Definition at line 28 of file mlx_pci.c.

31 {
33  if( utils == NULL){
35  goto bail;
36  }
37  status = mlx_pci_init_priv(utils);
38 bail:
39  return status;
40 }
#define MLX_INVALID_PARAMETER
uint8_t status
Status.
Definition: ena.h:16
mlx_status mlx_pci_init_priv(IN mlx_utils *utils)
Definition: mlx_pci_priv.c:111
#define MLX_SUCCESS
int mlx_status
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

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

Referenced by mlx_utils_init().

◆ mlx_pci_teardown()

mlx_status mlx_pci_teardown ( IN mlx_utils utils)

Definition at line 43 of file mlx_pci.c.

46 {
48  if( utils == NULL){
50  goto bail;
51  }
53 bail:
54  return status;
55 }
#define MLX_INVALID_PARAMETER
mlx_status mlx_pci_teardown_priv(IN mlx_utils *utils)
Definition: mlx_pci_priv.c:125
uint8_t status
Status.
Definition: ena.h:16
#define MLX_SUCCESS
int mlx_status
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

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

Referenced by mlx_utils_teardown().

◆ mlx_pci_read()

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 
)

Definition at line 58 of file mlx_pci.c.

65 {
67  if( utils == NULL || count == 0){
69  goto bail;
70  }
71  status = mlx_pci_read_priv(utils, width, offset, count, buffer);
72 bail:
73  return status;
74 }
mlx_status mlx_pci_read_priv(IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint32 offset, IN mlx_uintn count, OUT mlx_void *buffer)
Definition: mlx_pci_priv.c:137
#define MLX_INVALID_PARAMETER
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
uint8_t status
Status.
Definition: ena.h:16
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
#define MLX_SUCCESS
uint16_t count
Number of entries.
Definition: ena.h:22
int mlx_status
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References buffer, count, MLX_INVALID_PARAMETER, mlx_pci_read_priv(), MLX_SUCCESS, NULL, offset, and status.

Referenced by mlx_pci_gw_check_capability_id(), mlx_pci_gw_get_ownership(), mlx_pci_gw_read(), mlx_pci_gw_search_capability(), mlx_pci_gw_set_space(), and mlx_pci_gw_wait_for_flag_value().

◆ mlx_pci_write()

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.

84 {
86  if( utils == NULL || count == 0){
88  goto bail;
89  }
90  status = mlx_pci_write_priv(utils, width, offset, count, buffer);
91 bail:
92  return status;
93 }
#define MLX_INVALID_PARAMETER
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
uint8_t status
Status.
Definition: ena.h:16
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
#define MLX_SUCCESS
mlx_status mlx_pci_write_priv(IN mlx_utils *utils, IN mlx_pci_width width, IN mlx_uint32 offset, IN mlx_uintn count, IN mlx_void *buffer)
Definition: mlx_pci_priv.c:151
uint16_t count
Number of entries.
Definition: ena.h:22
int mlx_status
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References buffer, count, MLX_INVALID_PARAMETER, mlx_pci_write_priv(), MLX_SUCCESS, NULL, offset, 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_pci_mem_read()

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.

104 {
106  if( utils == NULL || count == 0){
108  goto bail;
109  }
110  status = mlx_pci_mem_read_priv(utils, width,bar_index, offset, count, buffer);
111 bail:
112  return status;
113 }
#define MLX_INVALID_PARAMETER
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
uint8_t status
Status.
Definition: ena.h:16
mlx_status mlx_pci_mem_read_priv(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: mlx_pci_priv.c:165
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
#define MLX_SUCCESS
uint16_t count
Number of entries.
Definition: ena.h:22
int mlx_status
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References buffer, count, MLX_INVALID_PARAMETER, mlx_pci_mem_read_priv(), MLX_SUCCESS, NULL, offset, and status.

Referenced by nodnic_device_clear_int().

◆ mlx_pci_mem_write()

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.

124 {
126  if( utils == NULL || count == 0){
128  goto bail;
129  }
130  status = mlx_pci_mem_write_priv(utils, width, bar_index, offset, count, buffer);
131 bail:
132  return status;
133 }
#define MLX_INVALID_PARAMETER
mlx_status mlx_pci_mem_write_priv(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: mlx_pci_priv.c:181
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
uint8_t status
Status.
Definition: ena.h:16
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
#define MLX_SUCCESS
uint16_t count
Number of entries.
Definition: ena.h:22
int mlx_status
#define NULL
NULL pointer (VOID *)
Definition: Base.h:362

References buffer, count, MLX_INVALID_PARAMETER, mlx_pci_mem_write_priv(), MLX_SUCCESS, NULL, offset, and status.

Referenced by flexboot_nodnic_arm_cq(), and nodnic_device_clear_int().