Chameleon

Chameleon Svn Source Tree

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

Source at commit 284 created 13 years 10 months ago.
By blackosx, Amended my mistake by updating the Default theme images in the trunk. Now put them back as they were.. (Sorry)
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: 284