Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/modules/SMBiosPatcher/smbios_patcher.h

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#include "fake_efi.h"
14
15#define kSMBIOSdefaults"SMBIOSdefaults"/* smbios_patcher.c */
16
17extern uint64_t smbios_p;
18
19struct smbios_table_header
20{
21uint8_ttype;
22uint8_tlength;
23uint16_thandle;
24} __attribute__ ((packed));
25
26struct smbios_property
27{
28const char*name;
29uint8_ttable_type;
30enum {SMSTRING, SMWORD, SMBYTE, SMOWORD} value_type;
31intoffset;
32int(*auto_int) (const char *name, int table_num);
33const char*(*auto_str) (const char *name, int table_num);
34const char*(*auto_oword) (const char *name, int table_num);
35};
36
37struct smbios_table_description
38{
39uint8_ttype;
40intlen;
41int(*numfunc)(int tablen);
42};
43
44extern void scan_memory(PlatformInfo_t *);
45extern const char* sm_get_defstr(const char * key, int table_num);
46extern struct SMBEntryPoint*getSmbiosPatched(struct SMBEntryPoint *orig);
47extern char* getSmbiosProductName();
48extern struct DMIHeader* FindFirstDmiTableOfType(int type, int minlength);
49extern struct DMIHeader* FindNextDmiTableOfType(int type, int minlen);
50extern const char * smbiosStringAtIndex(DMIHeader*, int index, int *length );
51extern void getSmbiosTableStructure(struct SMBEntryPoint *smbios);
52#endif /* !__LIBSAIO_SMBIOS_PATCHER_H */
53

Archive Download this file

Revision: 789