coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
mainboard.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <amdblocks/acpimmio.h>
4 #include <device/device.h>
7 
8 static const u8 mainboard_intr_data[] = {
9  [0x00] = 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, /* INTA# - INTH# */
10  [0x08] = 0x00, 0x00, 0x00, 0x00, 0x1F, 0x1F, 0x1F, 0x1F, /* Misc-nil, 0, 1, 2, INT from Serial irq */
11  [0x10] = 0x09, 0x1F, 0x1F, 0x10, 0x1F, 0x12, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
12  0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
13  0x12, 0x11, 0x12, 0x11, 0x12, 0x11, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
14  0x11, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
15  0x10, 0x11, 0x12, 0x13
16 };
17 
18 /* PIRQ Setup */
19 static void pirq_setup(void)
20 {
22 }
23 
24 /**********************************************
25  * Enable the dedicated functions of the board.
26  **********************************************/
27 static void mainboard_enable(struct device *dev)
28 {
29  pirq_setup();
30 
31  /*
32  * Initialize ASF registers to an arbitrary address because someone
33  * long ago set things up this way inside the SPD read code. The
34  * SPD read code has been made generic and moved out of the board
35  * directory, so the ASF init is being done here.
36  */
37  pm_write8(0x29, 0x80);
38  pm_write8(0x28, 0x61);
39 }
40 
43 };
struct chip_operations mainboard_ops
Definition: mainboard.c:19
static void pm_write8(uint8_t reg, uint8_t value)
Definition: acpimmio.h:181
static const u8 mainboard_intr_data[]
Definition: mainboard.c:8
static void mainboard_enable(struct device *dev)
Definition: mainboard.c:27
static void pirq_setup(void)
Definition: mainboard.c:19
const u8 * intr_data_ptr
Definition: amd_pci_util.c:13
uint8_t u8
Definition: stdint.h:45
void(* enable_dev)(struct device *dev)
Definition: device.h:24
Definition: device.h:107