OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Protocol/PciRootBridgeIo.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcCpuLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcSmbiosLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include "SmbiosInternal.h"
#include "DebugSmbios.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | SmbiosExtendTable (IN OUT OC_SMBIOS_TABLE *Table, IN UINT32 Size) |
UINT8 | SmbiosOverrideString (IN OC_SMBIOS_TABLE *Table, IN CONST CHAR8 *Override OPTIONAL, IN UINT8 *Index) |
STATIC EFI_STATUS | SmbiosAssignStructHandle (IN OUT OC_SMBIOS_TABLE *Table, IN UINT32 Type, IN UINT16 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 String) |
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.c.
STATIC EFI_STATUS SmbiosAssignStructHandle | ( | IN OUT OC_SMBIOS_TABLE * | Table, |
IN UINT32 | Type, | ||
IN UINT16 | Index ) |
Definition at line 136 of file SmbiosInternal.c.
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 OC_SMBIOS_TABLE * | Table, |
IN CONST CHAR8 *Override | OPTIONAL, | ||
IN UINT8 * | Index ) |
Definition at line 93 of file SmbiosInternal.c.
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.