1 /* ----------------------------------------------------------------------- *
3 * Copyright 2006 Erwan Velu - All Rights Reserved
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
8 * Boston MA 02111-1307, USA; either version 2 of the License, or
9 * (at your option) any later version; incorporated herein by reference.
11 * ----------------------------------------------------------------------- */
16 #define u32 unsigned int
17 #define u16 unsigned short
18 #define u8 unsigned char
19 #define PAGE_SIZE 4096
26 static const char *out_of_spec
= "<OUT OF SPEC>";
27 static const char *bad_index
= "<BAD INDEX>";
29 #define WORD(x) (u16)(*(const u16 *)(x))
30 #define DWORD(x) (u32)(*(const u32 *)(x))
31 #define QWORD(x) (*(const u64 *)(x))
34 #include "dmi_system.h"
35 #include "dmi_base_board.h"
36 #include "dmi_chassis.h"
37 #include "dmi_processor.h"
39 extern char display_line
;
40 #define moreprintf(...) do { display_line++; if (display_line == 24) { char tempbuf[10]; display_line=0; printf("Press enter to continue"); fgets(tempbuf, sizeof tempbuf, stdin);} printf ( __VA_ARGS__); } while (0);
49 static dmi_table dmitable
;
63 s_base_board base_board
;
65 s_processor processor
;
68 void to_dmi_header(struct dmi_header
*h
, u8
*data
);
69 void dmi_bios_runtime_size(u32 code
, s_dmi
*dmi
);
70 const char *dmi_string(struct dmi_header
*dm
, u8 s
);
71 inline int dmi_checksum(u8
*buf
);
72 void parse_dmitable(s_dmi
*dmi
);
73 void dmi_decode(struct dmi_header
*h
, u16 ver
, s_dmi
*dmi
);
77 void display_bios_characteristics(s_dmi
*dmi
);
78 void display_base_board_features(s_dmi
*dmi
);
79 void display_processor_flags(s_dmi
*dmi
);