File: dmi_cache.h

package info (click to toggle)
syslinux 2%3A4.02%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 23,804 kB
  • ctags: 71,027
  • sloc: ansic: 270,621; pascal: 9,631; asm: 9,089; perl: 3,492; makefile: 1,588; sh: 511; python: 266; xml: 39
file content (47 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* ----------------------------------------------------------------------- *
 *
 *   Copyright 2009 Pierre-Alexandre Meyer - All Rights Reserved
 *
 *   Some part borrowed from DMI Decode:
 *
 *   (C) 2000-2002 Alan Cox <alan@redhat.com>
 *   (C) 2002-2007 Jean Delvare <khali@linux-fr.org>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
 *   Boston MA 02111-1307, USA; either version 2 of the License, or
 *   (at your option) any later version; incorporated herein by reference.
 *
 * ----------------------------------------------------------------------- */

#ifndef DMI_CACHE_H
#define DMI_CACHE_H

#include <stdint.h>

#include "stdbool.h"

typedef struct {
    char socket_designation[32];
    char configuration[32];
    char mode[32];
    char location[8];
    uint16_t installed_size;
    uint16_t max_size;
    char supported_sram_types[32];
    char installed_sram_types[32];
    uint16_t speed;
    char error_correction_type[32];
    char system_type[16];
    char associativity[32];
} __attribute__ ((__packed__)) s_cache;

const char *dmi_cache_mode(uint8_t code);
const char *dmi_cache_location(uint8_t code);
uint16_t dmi_cache_size(uint16_t code);
void dmi_cache_types(uint16_t code, const char *sep, char *array);
const char *dmi_cache_ec_type(uint8_t code);
const char *dmi_cache_type(uint8_t code);
const char *dmi_cache_associativity(uint8_t code);
#endif /* DMI_CACHE_H */