Root/
Source at commit 1158 created 13 years 15 days ago. By azimutz, Match nvidia.c with the one on my branch (Chazi) adding dev id's from issue 99 and Asus G74SX (0DF4, 1251). | |
---|---|
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 | extern 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_ORIGINAL␉␉0␊ |
25 | #define SMBIOS_PATCHED␉␉1␊ |
26 | ␊ |
27 | struct smbios_table_header ␊ |
28 | {␊ |
29 | ␉uint8_t␉␉type;␊ |
30 | ␉uint8_t␉␉length;␊ |
31 | ␉uint16_t␉handle;␊ |
32 | } __attribute__ ((packed));␊ |
33 | ␊ |
34 | struct smbios_property␊ |
35 | {␊ |
36 | ␉const char␉␉*name;␊ |
37 | ␉uint8_t␉␉table_type;␊ |
38 | ␉enum {SMSTRING, SMWORD, SMBYTE, SMOWORD} value_type;␊ |
39 | ␉int␉␉offset;␊ |
40 | ␉int␉␉(*auto_int) (const char *name, int table_num);␊ |
41 | ␉const char␉*(*auto_str) (const char *name, int table_num);␊ |
42 | ␉const char␉*(*auto_oword) (const char *name, int table_num);␊ |
43 | };␊ |
44 | ␊ |
45 | struct smbios_table_description␊ |
46 | {␊ |
47 | ␉uint8_t␉␉type;␊ |
48 | ␉int␉␉len;␊ |
49 | ␉int␉␉(*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 | */␊ |
55 | extern struct SMBEntryPoint␉*getSmbios(int);␊ |
56 | extern struct DMIHeader* FindNextDmiTableOfType(int type, int minlen);␊ |
57 | extern struct DMIHeader* FindFirstDmiTableOfType(int type, int minlen);␊ |
58 | const char * smbiosStringAtIndex(DMIHeader*, int index, int *length );␊ |
59 | char* getSmbiosProductName();␊ |
60 | ␊ |
61 | #endif /* !__LIBSAIO_SMBIOS_PATCHER_H */␊ |
62 |