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