coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smn.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <amdblocks/smn.h>
4 #include <device/pci_ops.h>
5 #include <soc/pci_devs.h>
6 #include <types.h>
7 
8 /* SMN registers accessed indirectly using an index/data pair in D0F00 config space */
9 #define SMN_INDEX_ADDR 0xb8 /* 32 bit */
10 #define SMN_DATA_ADDR 0xbc /* 32 bit */
11 
13 {
16 }
17 
19 {
22 }
static __always_inline void pci_write_config32(const struct device *dev, u16 reg, u32 val)
Definition: pci_ops.h:76
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
Definition: pci_ops.h:58
#define SMN_DATA_ADDR
Definition: smn.c:10
uint32_t smn_read32(uint32_t reg)
Definition: smn.c:12
void smn_write32(uint32_t reg, uint32_t val)
Definition: smn.c:18
#define SMN_INDEX_ADDR
Definition: smn.c:9
#define SOC_GNB_DEV
Definition: pci_devs.h:13
unsigned int uint32_t
Definition: stdint.h:14
u8 val
Definition: sys.c:300