blob: b39229d0ae6bab309903dd43b70966fa996d70aa [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";
34
35enum class DirDataRequestEnum
36{
37 dirDataNotRequested = 0x00,
38 dirDataRequested = 0x01
39};
40
41enum class FlagStatus
42{
43 flagIsInvalid = 0,
44 flagIsValid = 1,
45 flagIsLocked = 2
46};
47
48typedef enum
49{
50 biosType = 0,
51 systemType = 1,
52 baseboardType = 2,
53 chassisType = 3,
54 processorsType = 4,
55 memoryControllerType = 5,
56 memoryModuleInformationType = 6,
57 cacheType = 7,
58 portConnectorType = 8,
59 systemSlots = 9,
60 onBoardDevicesType = 10,
61 oemStringsType = 11,
62 systemCconfigurationOptionsType = 12,
63 biosLanguageType = 13,
64 groupAssociatonsType = 14,
65 systemEventLogType = 15,
66 physicalMemoryArrayType = 16,
67 memoryDeviceType = 17,
68} SmbiosType;