1 | /* ----------------------------------------------------------------------- * |
---|
2 | * |
---|
3 | * Copyright 2009 Pierre-Alexandre Meyer - All Rights Reserved |
---|
4 | * |
---|
5 | * Some part borrowed from DMI Decode: |
---|
6 | * |
---|
7 | * (C) 2000-2002 Alan Cox <alan@redhat.com> |
---|
8 | * (C) 2002-2007 Jean Delvare <khali@linux-fr.org> |
---|
9 | * |
---|
10 | * This program is free software; you can redistribute it and/or modify |
---|
11 | * it under the terms of the GNU General Public License as published by |
---|
12 | * the Free Software Foundation, Inc., 53 Temple Place Ste 330, |
---|
13 | * Boston MA 02111-1307, USA; either version 2 of the License, or |
---|
14 | * (at your option) any later version; incorporated herein by reference. |
---|
15 | * |
---|
16 | * ----------------------------------------------------------------------- */ |
---|
17 | |
---|
18 | #ifndef DMI_CACHE_H |
---|
19 | #define DMI_CACHE_H |
---|
20 | |
---|
21 | #include <stdint.h> |
---|
22 | |
---|
23 | #include "stdbool.h" |
---|
24 | |
---|
25 | #define CACHE_SOCKET_DESIGNATION_SIZE 65 |
---|
26 | |
---|
27 | typedef struct { |
---|
28 | char socket_designation[CACHE_SOCKET_DESIGNATION_SIZE]; |
---|
29 | char configuration[32]; |
---|
30 | char mode[32]; |
---|
31 | char location[8]; |
---|
32 | uint16_t installed_size; |
---|
33 | uint16_t max_size; |
---|
34 | char supported_sram_types[32]; |
---|
35 | char installed_sram_types[32]; |
---|
36 | uint16_t speed; |
---|
37 | char error_correction_type[32]; |
---|
38 | char system_type[16]; |
---|
39 | char associativity[32]; |
---|
40 | } __attribute__ ((__packed__)) s_cache; |
---|
41 | |
---|
42 | const char *dmi_cache_mode(uint8_t code); |
---|
43 | const char *dmi_cache_location(uint8_t code); |
---|
44 | uint16_t dmi_cache_size(uint16_t code); |
---|
45 | void dmi_cache_types(uint16_t code, const char *sep, char *array); |
---|
46 | const char *dmi_cache_ec_type(uint8_t code); |
---|
47 | const char *dmi_cache_type(uint8_t code); |
---|
48 | const char *dmi_cache_associativity(uint8_t code); |
---|
49 | #endif /* DMI_CACHE_H */ |
---|