TianoCore EDK2 master
|
#include "Uefi.h"
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BhyveFwCtlLib.h>
#include <Library/DebugLib.h>
#include <Library/IoLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
Go to the source code of this file.
Data Structures | |
struct | BIO_VEC |
struct | MSG_RX_HDR |
Macros | |
#define | FW_PORT 0x510 |
#define | FW_IPORT 0x511 |
#define | OP_NULL 1 |
#define | OP_ECHO 2 |
#define | OP_GET 3 |
#define | OP_GET_LEN 4 |
#define | OP_SET 5 |
#define | T_ESUCCESS 0 |
#define | T_ENOENT 2 |
#define | T_E2BIG 7 |
#define | T_EMSGSIZE 40 |
#define | ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) |
#define | FMAXSZ 1024 |
Functions | |
STATIC RETURN_STATUS EFIAPI | BhyveFwCtl_CvtErr (IN UINT32 errno) |
STATIC UINT32 EFIAPI | BIov_WLen (IN BIO_VEC b[]) |
STATIC UINT32 | BIov_Send_Rem (IN UINT32 *Data, IN UINT32 Len) |
STATIC VOID | BIov_Send (IN char *Data, IN UINT32 Len) |
STATIC VOID | BIov_SendAll (IN BIO_VEC b[]) |
STATIC VOID EFIAPI | BhyveFwCtl_MsgSend (IN UINT32 OpCode, IN BIO_VEC Data[]) |
STATIC RETURN_STATUS EFIAPI | BhyveFwCtl_MsgRecv (OUT MSG_RX_HDR *Rhdr, OUT BIO_VEC Data[]) |
STATIC RETURN_STATUS EFIAPI | BhyveFwCtl_Msg (IN UINT32 OpCode, IN BIO_VEC Sdata[], OUT BIO_VEC Rdata[]) |
STATIC RETURN_STATUS EFIAPI | BhyveFwCtlGetLen (IN CONST CHAR8 *Name, IN OUT UINT32 *Size) |
STATIC RETURN_STATUS EFIAPI | BhyveFwCtlGetVal (IN CONST CHAR8 *Name, OUT VOID *Item, IN OUT UINT32 *Size) |
RETURN_STATUS EFIAPI | BhyveFwCtlGet (IN CONST CHAR8 *Name, OUT VOID *Item, IN OUT UINTN *Size) |
RETURN_STATUS EFIAPI | BhyveFwCtlInitialize (VOID) |
Variables | |
STATIC CONST CHAR8 | mBhyveSig [4] = { 'B', 'H', 'Y', 'V' } |
STATIC BOOLEAN | mBhyveFwCtlSupported = FALSE |
STATIC INT32 | mBhyveFwCtlTxid = 0xa5 |
struct { | |
UINT64 fSize | |
UINT32 fData [FMAXSZ] | |
} | FwGetvalBuf |
Copyright (c) 2020, Rebecca Cran rebec.nosp@m.ca@b.nosp@m.sdio..nosp@m.com Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.
Copyright (C) 2013, Red Hat, Inc. Copyright (c) 2015, Nahanni Systems.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file BhyveFwCtlLib.c.
#define FMAXSZ 1024 |
Definition at line 332 of file BhyveFwCtlLib.c.
#define FW_IPORT 0x511 |
Definition at line 22 of file BhyveFwCtlLib.c.
#define FW_PORT 0x510 |
Definition at line 21 of file BhyveFwCtlLib.c.
#define OP_ECHO 2 |
Definition at line 26 of file BhyveFwCtlLib.c.
#define OP_GET 3 |
Definition at line 27 of file BhyveFwCtlLib.c.
#define OP_GET_LEN 4 |
Definition at line 28 of file BhyveFwCtlLib.c.
#define OP_NULL 1 |
Definition at line 25 of file BhyveFwCtlLib.c.
#define OP_SET 5 |
Definition at line 29 of file BhyveFwCtlLib.c.
#define ROUNDUP | ( | x, | |
y | |||
) | ((((x)+((y)-1))/(y))*(y)) |
Definition at line 37 of file BhyveFwCtlLib.c.
#define T_E2BIG 7 |
Definition at line 34 of file BhyveFwCtlLib.c.
#define T_EMSGSIZE 40 |
Definition at line 35 of file BhyveFwCtlLib.c.
#define T_ENOENT 2 |
Definition at line 33 of file BhyveFwCtlLib.c.
#define T_ESUCCESS 0 |
Definition at line 32 of file BhyveFwCtlLib.c.
Definition at line 61 of file BhyveFwCtlLib.c.
STATIC RETURN_STATUS EFIAPI BhyveFwCtl_Msg | ( | IN UINT32 | OpCode, |
IN BIO_VEC | Sdata[], | ||
OUT BIO_VEC | Rdata[] | ||
) |
Definition at line 289 of file BhyveFwCtlLib.c.
STATIC RETURN_STATUS EFIAPI BhyveFwCtl_MsgRecv | ( | OUT MSG_RX_HDR * | Rhdr, |
OUT BIO_VEC | Data[] | ||
) |
Read a transport response and optional data from the i/o port.
Definition at line 220 of file BhyveFwCtlLib.c.
Prepend the transport header to a block of data and send.
Definition at line 186 of file BhyveFwCtlLib.c.
Front end to the internal GET_LEN and GET protocols
Definition at line 384 of file BhyveFwCtlLib.c.
Definition at line 311 of file BhyveFwCtlLib.c.
STATIC RETURN_STATUS EFIAPI BhyveFwCtlGetVal | ( | IN CONST CHAR8 * | Name, |
OUT VOID * | Item, | ||
IN OUT UINT32 * | Size | ||
) |
Definition at line 341 of file BhyveFwCtlLib.c.
RETURN_STATUS EFIAPI BhyveFwCtlInitialize | ( | VOID | ) |
Library initialization. Probe the host to see if the f/w ctl interface is supported.
Definition at line 411 of file BhyveFwCtlLib.c.
Send a block of data out the i/o port as 4-byte quantities, appending trailing zeroes on the last if required.
Definition at line 143 of file BhyveFwCtlLib.c.
Utility to send 1-3 bytes of input as a 4-byte value with trailing zeroes.
Definition at line 115 of file BhyveFwCtlLib.c.
Send data described by an array of iovecs out the i/o port.
Definition at line 167 of file BhyveFwCtlLib.c.
Definition at line 91 of file BhyveFwCtlLib.c.
UINT32 fData[FMAXSZ] |
Definition at line 335 of file BhyveFwCtlLib.c.
UINT64 fSize |
Definition at line 334 of file BhyveFwCtlLib.c.
Definition at line 41 of file BhyveFwCtlLib.c.
STATIC INT32 mBhyveFwCtlTxid = 0xa5 |
Definition at line 43 of file BhyveFwCtlLib.c.
Definition at line 39 of file BhyveFwCtlLib.c.