coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pattrs.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#ifndef _SOC_PATTRS_H_
4
#define _SOC_PATTRS_H_
5
6
#include <
stdint.h
>
7
#include <
cpu/x86/msr.h
>
8
9
enum
{
10
IACORE_MIN
,
11
IACORE_LFM
,
12
IACORE_MAX
,
13
IACORE_TURBO
,
14
IACORE_END
15
};
16
17
/*
18
* The pattrs structure is a common place to stash pertinent information
19
* about the processor or platform. Instead of going to the source (msrs, cpuid)
20
* every time an attribute is needed use the pattrs structure.
21
*/
22
struct
pattrs
{
23
msr_t
platform_id
;
24
msr_t
platform_info
;
25
int
iacore_ratios
[
IACORE_END
];
26
int
iacore_vids
[
IACORE_END
];
27
uint32_t
cpuid
;
28
int
revid
;
29
int
stepping
;
30
const
void
*
microcode_patch
;
31
int
address_bits
;
32
unsigned
int
num_cpus
;
33
unsigned
int
bclk_khz
;
34
};
35
36
/*
37
* This is just to hide the abstraction w/o relying on how the underlying
38
* storage is allocated.
39
*/
40
extern
struct
pattrs
__global_pattrs
;
41
static
inline
const
struct
pattrs
*
pattrs_get
(
void
)
42
{
43
return
&
__global_pattrs
;
44
}
45
46
#endif
/* _SOC_PATTRS_H_ */
__global_pattrs
struct pattrs __global_pattrs
Definition:
ramstage.c:28
IACORE_TURBO
@ IACORE_TURBO
Definition:
pattrs.h:13
IACORE_MAX
@ IACORE_MAX
Definition:
pattrs.h:12
IACORE_MIN
@ IACORE_MIN
Definition:
pattrs.h:10
IACORE_END
@ IACORE_END
Definition:
pattrs.h:14
IACORE_LFM
@ IACORE_LFM
Definition:
pattrs.h:11
pattrs_get
static const struct pattrs * pattrs_get(void)
Definition:
pattrs.h:41
msr.h
stdint.h
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
msr_struct
Definition:
msr.h:110
pattrs
Definition:
pattrs.h:22
pattrs::num_cpus
unsigned int num_cpus
Definition:
pattrs.h:32
pattrs::platform_id
msr_t platform_id
Definition:
pattrs.h:23
pattrs::iacore_vids
int iacore_vids[IACORE_END]
Definition:
pattrs.h:26
pattrs::address_bits
int address_bits
Definition:
pattrs.h:31
pattrs::platform_info
msr_t platform_info
Definition:
pattrs.h:24
pattrs::bclk_khz
unsigned int bclk_khz
Definition:
pattrs.h:33
pattrs::stepping
int stepping
Definition:
pattrs.h:29
pattrs::revid
int revid
Definition:
pattrs.h:28
pattrs::cpuid
uint32_t cpuid
Definition:
pattrs.h:27
pattrs::iacore_ratios
int iacore_ratios[IACORE_END]
Definition:
pattrs.h:25
pattrs::microcode_patch
const void * microcode_patch
Definition:
pattrs.h:30
src
soc
intel
braswell
include
soc
pattrs.h
Generated by
1.9.1