OpenCore
1.0.4
OpenCore Bootloader
|
#include <IndustryStandard/AppleSmBios.h>
#include <Library/BaseOverflowLib.h>
#include <Library/OcSmbiosLib.h>
Go to the source code of this file.
Data Structures | |
struct | OC_SMBIOS_MAPPING_ |
Macros | |
#define | SMBIOS_STRUCTURE_TERMINATOR_SIZE 2 |
#define | OC_SMBIOS_MAX_MAPPING 512 |
Typedefs | |
typedef struct OC_SMBIOS_MAPPING_ | OC_SMBIOS_MAPPING |
Functions | |
STATIC_ASSERT (OcSmbiosAutomaticHandle > OcSmbiosLastReservedHandle, "Inconsistent handle IDs") | |
EFI_STATUS | SmbiosExtendTable (IN OUT OC_SMBIOS_TABLE *Table, IN UINT32 Size) |
UINT8 | SmbiosOverrideString (IN OUT OC_SMBIOS_TABLE *Table, IN CONST CHAR8 *Override OPTIONAL, IN OUT UINT8 *Index) |
EFI_STATUS | SmbiosInitialiseStruct (IN OUT OC_SMBIOS_TABLE *Table, IN SMBIOS_TYPE Type, IN UINT8 MinLength, IN UINT16 Index) |
VOID | SmbiosFinaliseStruct (IN OUT OC_SMBIOS_TABLE *Table) |
CHAR8 * | SmbiosGetString (IN APPLE_SMBIOS_STRUCTURE_POINTER SmbiosTable, IN SMBIOS_TABLE_STRING StringIndex) |
UINT8 | SmbiosSetString (IN OUT CHAR8 **Buffer, IN CONST CHAR8 *String, IN UINT32 Length, IN OUT UINT8 *Index) |
UINT32 | SmbiosGetStructureLength (IN APPLE_SMBIOS_STRUCTURE_POINTER SmbiosTable, IN UINT32 SmbiosTableSize) |
APPLE_SMBIOS_STRUCTURE_POINTER | SmbiosGetStructureOfType (IN APPLE_SMBIOS_STRUCTURE_POINTER SmbiosTable, IN UINT32 SmbiosTableSize, IN SMBIOS_TYPE Type, IN UINT16 Index) |
UINT16 | SmbiosGetStructureCount (IN APPLE_SMBIOS_STRUCTURE_POINTER SmbiosTable, IN UINT32 SmbiosTableSize, IN SMBIOS_TYPE Type) |
Copyright (C) 2016 - 2017, The HermitCrabs Lab. All rights reserved.
All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file SmbiosInternal.h.
#define OC_SMBIOS_MAX_MAPPING 512 |
Definition at line 30 of file SmbiosInternal.h.
#define SMBIOS_STRUCTURE_TERMINATOR_SIZE 2 |
Definition at line 25 of file SmbiosInternal.h.
typedef struct OC_SMBIOS_MAPPING_ OC_SMBIOS_MAPPING |
anonymous enum |
Definition at line 39 of file SmbiosInternal.h.
EFI_STATUS SmbiosExtendTable | ( | IN OUT OC_SMBIOS_TABLE * | Table, |
IN UINT32 | Size ) |
Allocate bytes in SMBIOS table if necessary
[in,out] | Table | Current table buffer. |
[in] | Size | Amount of free bytes needed. |
EFI_SUCCESS | on success |
Definition at line 34 of file SmbiosInternal.c.
VOID SmbiosFinaliseStruct | ( | IN OUT OC_SMBIOS_TABLE * | Table | ) |
Finalise SMBIOS structure
[in] | Table | Pointer to location containing the current address within the buffer. |
Definition at line 332 of file SmbiosInternal.c.
CHAR8 * SmbiosGetString | ( | IN APPLE_SMBIOS_STRUCTURE_POINTER | SmbiosTable, |
IN SMBIOS_TABLE_STRING | StringIndex ) |
Obtain string from previously validated structure.
[in] | SmbiosTable | |
[in] | StringIndex | String Index to retrieve |
Definition at line 362 of file SmbiosInternal.c.
UINT16 SmbiosGetStructureCount | ( | IN APPLE_SMBIOS_STRUCTURE_POINTER | SmbiosTable, |
IN UINT32 | SmbiosTableSize, | ||
IN SMBIOS_TYPE | Type ) |
Obtain structure count of specified type.
[in] | SmbiosTable | Pointer to SMBIOS table. |
[in] | SmbiosTableSize | SMBIOS table size |
structure | count or 0 |
Definition at line 501 of file SmbiosInternal.c.
UINT32 SmbiosGetStructureLength | ( | IN APPLE_SMBIOS_STRUCTURE_POINTER | SmbiosTable, |
IN UINT32 | SmbiosTableSize ) |
Obtain and validate structure length.
[in] | SmbiosTable | |
[in] | SmbiosTableSize | SMBIOS table size |
table | length or 0 for invalid |
Definition at line 415 of file SmbiosInternal.c.
APPLE_SMBIOS_STRUCTURE_POINTER SmbiosGetStructureOfType | ( | IN APPLE_SMBIOS_STRUCTURE_POINTER | SmbiosTable, |
IN UINT32 | SmbiosTableSize, | ||
IN SMBIOS_TYPE | Type, | ||
IN UINT16 | Index ) |
Obtain and validate Nth structure of specified type.
[in] | SmbiosTable | Pointer to SMBIOS table. |
[in] | SmbiosTableSize | SMBIOS table size |
[in] | Type | SMBIOS table type |
[in] | Index | SMBIOS table index starting from 1 |
found | table or NULL |
Definition at line 444 of file SmbiosInternal.c.
EFI_STATUS SmbiosInitialiseStruct | ( | IN OUT OC_SMBIOS_TABLE * | Table, |
IN SMBIOS_TYPE | Type, | ||
IN UINT8 | MinLength, | ||
IN UINT16 | Index ) |
Initialise SMBIOS structure
[in] | Table | Pointer to location containing the current address within the buffer. |
[in] | Type | Table type. |
[in] | MinLength | Initial length of the table. |
[in] | Index | Table index, normally 1. |
Definition at line 304 of file SmbiosInternal.c.
UINT8 SmbiosOverrideString | ( | IN OUT OC_SMBIOS_TABLE * | Table, |
IN CONST CHAR8 *Override | OPTIONAL, | ||
IN OUT UINT8 * | Index ) |
Write override string to SMBIOS table
[in,out] | Table | Current table buffer. |
[in] | Override | String data override. |
[in,out] | Index | Pointer to current string index, incremented on success. |
assigned | string index or 0 |
UINT8 SmbiosSetString | ( | IN OUT CHAR8 ** | Buffer, |
IN CONST CHAR8 * | String, | ||
IN UINT32 | Length, | ||
IN OUT UINT8 * | Index ) |
Write string to SMBIOS structure
[in,out] | Buffer | Pointer to location containing the current address within the buffer. |
[in] | String | Buffer containing the null terminated ascii string. |
[in] | Length | String length to write. |
[in,out] | Index | Pointer to current string index, incremented on success. |
assigned | string index or 0 |
Definition at line 395 of file SmbiosInternal.c.
STATIC_ASSERT | ( | OcSmbiosAutomaticHandle | , |
OcSmbiosLastReservedHandle | , | ||
"Inconsistent handle IDs" | ) |