Chameleon Applications

Chameleon Applications Svn Source Tree

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

Source at commit 214 created 13 years 6 months ago.
By ifabio, update to chameleon trunk 630, and now the pakage folder is the same as blackosx branch, also add Icon "building" into buildpkg script, and add mint theme info into the English localizable.strings.
1/*
2 * Copyright 2008 mackerintel
3 */
4/*
5 * AsereBLN: cleanup
6 */
7
8#ifndef __LIBSAIO_SMBIOS_PATCHER_H
9#define __LIBSAIO_SMBIOS_PATCHER_H
10
11#include "libsaio.h"
12#include "SMBIOS.h"
13
14/* From Foundation/Efi/Guid/Smbios/SmBios.h */
15/* Modified to wrap Data4 array init with {} */
16#define EFI_SMBIOS_TABLE_GUID {0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d}}
17
18#define SMBIOS_RANGE_START 0x000F0000
19#define SMBIOS_RANGE_END 0x000FFFFF
20
21#define SMBIOS_ORIGINAL0
22#define SMBIOS_PATCHED1
23
24struct smbios_table_header
25{
26uint8_ttype;
27uint8_tlength;
28uint16_thandle;
29} __attribute__ ((packed));
30
31struct smbios_property
32{
33const char*name;
34uint8_ttable_type;
35enum {SMSTRING, SMWORD, SMBYTE, SMOWORD} value_type;
36intoffset;
37int(*auto_int) (const char *name, int table_num);
38const char*(*auto_str) (const char *name, int table_num);
39const char*(*auto_oword) (const char *name, int table_num);
40};
41
42struct smbios_table_description
43{
44uint8_ttype;
45intlen;
46int(*numfunc)(int tablen);
47};
48
49/** call with flag SMBIOS_ORIGINAL to get orig. entrypoint
50 or call with flag SMBIOS_PATCHED to get patched smbios entrypoint
51*/
52extern struct SMBEntryPoint*getSmbios(int);
53extern struct DMIHeader* FindNextDmiTableOfType(int type, int minlen);
54extern struct DMIHeader* FindFirstDmiTableOfType(int type, int minlen);
55
56#endif /* !__LIBSAIO_SMBIOS_PATCHER_H */
57

Archive Download this file

Revision: 214