Chameleon

Chameleon Svn Source Tree

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

Source at commit 1166 created 13 years 10 days ago.
By meklort, Fixed recent Makefile changes. Please do not use /Users/evan/SourceCode/tmp/chameleon/trunk or VPATH. the *only* time you should use /Users/evan/SourceCode/tmp/chameleon/trunk is when setting the SRCROOT variable. Also note that very soon make pkg is going to be removed. The pkg build script in trunk is very out of date. Instead please use the package maker at http://forge.voodooprojects.org/p/chameleonApplications/. Once this is ready for trunk it will be merged.
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
14extern uint64_t smbios_p;
15
16
17/* From Foundation/Efi/Guid/Smbios/SmBios.h */
18/* Modified to wrap Data4 array init with {} */
19#define EFI_SMBIOS_TABLE_GUID {0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d}}
20
21#define SMBIOS_RANGE_START 0x000F0000
22#define SMBIOS_RANGE_END 0x000FFFFF
23
24#define SMBIOS_ORIGINAL0
25#define SMBIOS_PATCHED1
26
27struct smbios_table_header
28{
29uint8_ttype;
30uint8_tlength;
31uint16_thandle;
32} __attribute__ ((packed));
33
34struct smbios_property
35{
36const char*name;
37uint8_ttable_type;
38enum {SMSTRING, SMWORD, SMBYTE, SMOWORD} value_type;
39intoffset;
40int(*auto_int) (const char *name, int table_num);
41const char*(*auto_str) (const char *name, int table_num);
42const char*(*auto_oword) (const char *name, int table_num);
43};
44
45struct smbios_table_description
46{
47uint8_ttype;
48intlen;
49int(*numfunc)(int tablen);
50};
51
52/** call with flag SMBIOS_ORIGINAL to get orig. entrypoint
53 or call with flag SMBIOS_PATCHED to get patched smbios entrypoint
54*/
55extern struct SMBEntryPoint*getSmbios(int);
56extern struct DMIHeader* FindNextDmiTableOfType(int type, int minlen);
57extern struct DMIHeader* FindFirstDmiTableOfType(int type, int minlen);
58const char * smbiosStringAtIndex(DMIHeader*, int index, int *length );
59char* getSmbiosProductName();
60
61#endif /* !__LIBSAIO_SMBIOS_PATCHER_H */
62

Archive Download this file

Revision: 1166