coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
romstage.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <amdblocks/acpimmio.h>
4 #include <console/console.h>
7 #include <stdint.h>
8 
9 void board_BeforeAgesa(struct sysinfo *cb)
10 {
11  u8 byte;
12 
13  post_code(0x30);
14 
15  /* turn on secondary smbus at b20 */
16  pm_write8(0x28, pm_read8(0x28) | 1);
17 
18  /* set DDR3 voltage */
19  byte = CONFIG_BOARD_ASUS_F2A85_M_DDR3_VOLT_VAL;
20 
21  /* default is byte = 0x0, so no need to set it in this case */
22  if (byte)
23  do_smbus_write_byte(0xb20, 0x15, 0x3, byte);
24 }
static uint8_t pm_read8(uint8_t reg)
Definition: acpimmio.h:166
static void pm_write8(uint8_t reg, uint8_t value)
Definition: acpimmio.h:181
void __weak board_BeforeAgesa(struct sysinfo *cb)
Definition: romstage.c:19
#define post_code(value)
Definition: post_code.h:12
int do_smbus_write_byte(uintptr_t base, u8 device, u8 address, u8 data)
Definition: smbus.c:149
uint8_t u8
Definition: stdint.h:45