iPXE
mlx_pci.c File Reference

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 }
38bail:
39 return status;
40}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
uint8_t status
Status.
Definition ena.h:5
mlx_status mlx_pci_init_priv(IN mlx_utils *utils)
#define MLX_INVALID_PARAMETER
#define MLX_SUCCESS
int mlx_status

References IN, 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 }
53bail:
54 return status;
55}
mlx_status mlx_pci_teardown_priv(IN mlx_utils *utils)

References IN, 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);
72bail:
73 return status;
74}
uint16_t offset
Offset to command line.
Definition bzimage.h:3
static unsigned int count
Number of entries.
Definition dwmac.h:220
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition netvsc.h:5
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)

References buffer, count, IN, MLX_INVALID_PARAMETER, mlx_pci_read_priv(), MLX_SUCCESS, NULL, offset, OUT, 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);
91bail:
92 return status;
93}
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)

References buffer, count, IN, 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);
111bail:
112 return status;
113}
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)

References buffer, count, IN, MLX_INVALID_PARAMETER, mlx_pci_mem_read_priv(), MLX_SUCCESS, NULL, offset, OUT, 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);
131bail:
132 return status;
133}
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)

References buffer, count, IN, 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().