coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
me.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#define __SIMPLE_DEVICE__
4
5
#include <
device/pci_ops.h
>
6
#include <types.h>
7
8
#include "
me.h
"
9
10
#define PCH_LPC_DEV PCI_DEV(0, 0x1f, 0)
11
12
#define ETR3 0xac
13
#define ETR3_CWORWRE (1 << 18)
14
#define ETR3_CF9GR (1 << 20)
15
#define ETR3_CF9LOCK (1 << 31)
16
17
void
set_global_reset
(
const
bool
enable)
18
{
19
u32
etr3 =
pci_read_config32
(
PCH_LPC_DEV
,
ETR3
);
20
21
/* Clear CF9 Without Resume Well Reset Enable */
22
etr3 &= ~
ETR3_CWORWRE
;
23
24
/* CF9GR indicates a Global Reset */
25
if
(enable)
26
etr3 |=
ETR3_CF9GR
;
27
else
28
etr3 &= ~
ETR3_CF9GR
;
29
30
pci_write_config32
(
PCH_LPC_DEV
,
ETR3
, etr3);
31
}
pci_ops.h
pci_write_config32
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
Definition:
pci_ops.h:76
pci_read_config32
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
Definition:
pci_ops.h:58
ETR3
#define ETR3
Definition:
me.c:12
ETR3_CF9GR
#define ETR3_CF9GR
Definition:
me.c:14
set_global_reset
void set_global_reset(const bool enable)
Definition:
me.c:17
PCH_LPC_DEV
#define PCH_LPC_DEV
Definition:
me.c:10
ETR3_CWORWRE
#define ETR3_CWORWRE
Definition:
me.c:13
me.h
u32
uint32_t u32
Definition:
stdint.h:51
src
southbridge
intel
common
me.c
Generated by
1.9.1