]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/Library/BhyveFwCtlLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / OvmfPkg / Include / Library / BhyveFwCtlLib.h
1 /** @file
2 bhyve firmware configuration access
3
4 Copyright (c) 2020, Rebecca Cran <rebecca@bsdio.com>
5 Copyright (c) 2015 Nahanni Systems
6
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #ifndef _BHYVE_FW_CTL_LIB_
12 #define _BHYVE_FW_CTL_LIB_
13
14 /**
15 Sysctl-like interface to read host information via a dot-separated
16 ASCII OID.
17
18 The information is copied into the buffer specified by Item. The
19 size of the buffer is given by the location specified by Size
20 before the call, and that location gives the amount of data copied
21 after a successfull call, and after a call that returns a truncated
22 value with an error return of RETURN_BUFFER_TOO_SMALL.
23
24 The size of the available data can be determined by passing a NULL
25 argument for Item. The size will be returned in the location pointed
26 to by Size.
27
28 @param[] Name - ASCII OID name
29 @param[] Data - return buffer pointer
30 @param[] Size - pointer to length
31
32 @return RETURN_SUCCESS Valid data/len returned.
33 RETURN_UNSUPPORTED f/w interface not present.
34 RETURN_NOT_FOUND OID not found.
35 RETURN_BUFFER_TOO_SMALL Return message truncated.
36 RETURN_INVALID_PARAMETER Buffer too large.
37 RETURN_PROTOCOL_ERROR Unknown error from host.
38 **/
39 RETURN_STATUS
40 EFIAPI
41 BhyveFwCtlGet (
42 IN CONST CHAR8 *Name,
43 OUT VOID *Item,
44 IN OUT UINTN *Size
45 );
46
47 #endif /* _BHYVE_FW_CTL_LIB_ */