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

Archive Download this file

Revision: 1654