Chameleon

Chameleon Svn Source Tree

Root/branches/rekursor/i386/libsaio/smbios_patcher.h

1/*
2 * Copyright 2008 mackerintel
3 */
4
5#ifndef __LIBSAIO_SMBIOS_PATCHER_H
6#define __LIBSAIO_SMBIOS_PATCHER_H
7
8#include "libsaio.h"
9
10extern EFI_GUID gEfiAcpiTableGuid;
11extern EFI_GUID gEfiAcpi20TableGuid;
12
13/* From Foundation/Efi/Guid/Smbios/SmBios.h */
14/* Modified to wrap Data4 array init with {} */
15#define EFI_SMBIOS_TABLE_GUID \
16{ \
170xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} \
18}
19
20/* From Foundation/Efi/Guid/Smbios/SmBios.c */
21//EFI_GUID const gEfiSmbiosTableGuid = EFI_SMBIOS_TABLE_GUID;
22
23#define SMBIOS_RANGE_START 0x000F0000
24#define SMBIOS_RANGE_END 0x000FFFFF
25
26/* '_SM_' in little endian: */
27#define SMBIOS_ANCHOR_UINT32_LE 0x5f4d535f
28
29struct smbios_table_header
30{
31uint8_t type;
32uint8_t length;
33uint16_t handle;
34} __attribute__ ((packed));
35
36struct smbios_property
37{
38char *name;
39uint8_t table_type;
40enum {SMSTRING, SMWORD, SMBYTE, SMOWORD} value_type;
41int offset;
42//union {
43int (*auto_int) (char *name, int table_num);
44char * (*auto_str) (char *name, int table_num);
45char * (*auto_oword) (char *name, int table_num);
46//};
47};
48
49struct smbios_table_description
50{
51uint8_t type;
52int len;
53int (*numfunc)(int tablen);
54};
55
56struct SMBEntryPoint * getAddressOfSmbiosTable();
57
58#endif /* !__LIBSAIO_SMBIOS_PATCHER_H */
59

Archive Download this file

Revision: 4