2 This code supports the implementation of the Smbios protocol
4 Copyright (c) 2009, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _SMBIOS_DXE_H_
16 #define _SMBIOS_DXE_H_
21 #include <Protocol/Smbios.h>
22 #include <IndustryStandard/SmBios.h>
23 #include <Guid/EventGroup.h>
24 #include <Guid/SmBios.h>
25 #include <Library/DebugLib.h>
26 #include <Library/UefiDriverEntryPoint.h>
27 #include <Library/UefiLib.h>
28 #include <Library/BaseLib.h>
29 #include <Library/BaseMemoryLib.h>
30 #include <Library/MemoryAllocationLib.h>
31 #include <Library/UefiBootServicesTableLib.h>
33 #define SMBIOS_MAJOR_VERSION 2
34 #define SMBIOS_MINOR_VERSION 4
37 #define SMBIOS_INSTANCE_SIGNATURE SIGNATURE_32 ('S', 'B', 'i', 's')
44 EFI_SMBIOS_PROTOCOL Smbios
;
46 // Updates to record list must be locked.
50 // List of EFI_SMBIOS_ENTRY structures.
52 LIST_ENTRY DataListHead
;
54 // List of allocated SMBIOS handle.
56 LIST_ENTRY AllocatedHandleListHead
;
59 #define SMBIOS_INSTANCE_FROM_THIS(this) CR (this, SMBIOS_INSTANCE, Smbios, SMBIOS_INSTANCE_SIGNATURE)
62 // SMBIOS record Header
64 // An SMBIOS internal Record is an EFI_SMBIOS_RECORD_HEADER followed by (RecordSize - HeaderSize) bytes of
65 // data. The format of the data is defined by the SMBIOS spec.
68 #define EFI_SMBIOS_RECORD_HEADER_VERSION 0x0100
73 EFI_HANDLE ProducerHandle
;
74 UINTN NumberOfStrings
;
75 } EFI_SMBIOS_RECORD_HEADER
;
79 // Private data structure to contain the SMBIOS record. One record per
80 // structure. SmbiosRecord is a copy of the data passed in and follows RecordHeader .
82 #define EFI_SMBIOS_ENTRY_SIGNATURE SIGNATURE_32 ('S', 'r', 'e', 'c')
86 EFI_SMBIOS_RECORD_HEADER
*RecordHeader
;
90 #define SMBIOS_ENTRY_FROM_LINK(link) CR (link, EFI_SMBIOS_ENTRY, Link, EFI_SMBIOS_ENTRY_SIGNATURE)
93 // Private data to contain the Smbios handle that already allocated.
95 #define SMBIOS_HANDLE_ENTRY_SIGNATURE SIGNATURE_32 ('S', 'h', 'r', 'd')
101 // Filter driver will register what record guid filter should be used.
103 EFI_SMBIOS_HANDLE SmbiosHandle
;
105 } SMBIOS_HANDLE_ENTRY
;
107 #define SMBIOS_HANDLE_ENTRY_FROM_LINK(link) CR (link, SMBIOS_HANDLE_ENTRY, Link, SMBIOS_HANDLE_ENTRY_SIGNATURE)
110 EFI_SMBIOS_TABLE_HEADER Header
;
112 } EFI_SMBIOS_TABLE_END_STRUCTURE
;