blob: 71140de0f273f8d34e49721c45b0b0bd482b3866 [file] [log] [blame]
Cheng C Yang3e3269a2019-12-02 15:11:30 +08001/*
2// Copyright (c) 2019 Intel Corporation
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15*/
16
17#pragma once
18
19#include <array>
20
21static constexpr uint16_t smbiosAgentId = 0x0101;
22static constexpr int smbiosDirIndex = 0;
23static constexpr int firstAgentIndex = 1;
24static constexpr uint8_t maxDirEntries = 4;
25static constexpr uint32_t pageMask = 0xf000;
26static constexpr uint8_t smbiosAgentVersion = 1;
27static constexpr uint32_t defaultTimeout = 20000;
28static constexpr uint32_t smbiosTableVersion = 15;
29static constexpr uint32_t smbiosSMMemoryOffset = 0;
30static constexpr uint32_t smbiosSMMemorySize = 1024 * 1024;
31static constexpr uint32_t smbiosTableTimestamp = 0x45464748;
32static constexpr uint32_t smbiosTableStorageSize = 64 * 1024;
33static constexpr const char* smbiosPath = "/var/lib/smbios";
Cheng C Yangeecaf822019-12-19 00:34:23 +080034static constexpr uint16_t mdrSMBIOSSize = 32 * 1024;
Cheng C Yang3e3269a2019-12-02 15:11:30 +080035
36enum class DirDataRequestEnum
37{
38 dirDataNotRequested = 0x00,
39 dirDataRequested = 0x01
40};
41
42enum class FlagStatus
43{
44 flagIsInvalid = 0,
45 flagIsValid = 1,
46 flagIsLocked = 2
47};
48
49typedef enum
50{
51 biosType = 0,
52 systemType = 1,
53 baseboardType = 2,
54 chassisType = 3,
55 processorsType = 4,
56 memoryControllerType = 5,
57 memoryModuleInformationType = 6,
58 cacheType = 7,
59 portConnectorType = 8,
60 systemSlots = 9,
61 onBoardDevicesType = 10,
62 oemStringsType = 11,
63 systemCconfigurationOptionsType = 12,
64 biosLanguageType = 13,
65 groupAssociatonsType = 14,
66 systemEventLogType = 15,
67 physicalMemoryArrayType = 16,
68 memoryDeviceType = 17,
69} SmbiosType;