cpu/amd: Update files for 00670F00
Add StoneyRidge specific IDs, code, whitespace, and fix Makefles and Kconfig files. Original-Signed-off-by: Marc Jones <marcj303@gmail.com> Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Original-Tested-by: Marshall Dawson <marshalldawson3rd@gmail.com> (cherry picked from commit 0bd1dc834792453d8e66216fa9a70afe2f7537d7) Change-Id: Id79f316a89b3baeae95e221fb872dc8a86e7b0f1 Signed-off-by: Marc Jones <marcj303@gmail.com> Reviewed-on: https://review.coreboot.org/17140 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of the coreboot project.
|
# This file is part of the coreboot project.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2015 Advanced Micro Devices, Inc.
|
# Copyright (C) 2015-2016 Advanced Micro Devices, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -13,12 +13,12 @@
|
|||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
|
|
||||||
config CPU_AMD_PI_00660F01
|
config CPU_AMD_PI_00670F00
|
||||||
bool
|
bool
|
||||||
select PCI_IO_CFG_EXT
|
select PCI_IO_CFG_EXT
|
||||||
select X86_AMD_FIXED_MTRRS
|
select X86_AMD_FIXED_MTRRS
|
||||||
|
|
||||||
if CPU_AMD_PI_00660F01
|
if CPU_AMD_PI_00670F00
|
||||||
|
|
||||||
config CPU_ADDR_BITS
|
config CPU_ADDR_BITS
|
||||||
int
|
int
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the coreboot project.
|
* This file is part of the coreboot project.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Advanced Micro Devices, Inc.
|
* Copyright (C) 2015-2016 Advanced Micro Devices, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,6 +15,6 @@
|
|||||||
|
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
|
||||||
struct chip_operations cpu_amd_pi_00660F01_ops = {
|
struct chip_operations cpu_amd_pi_00670F00_ops = {
|
||||||
CHIP_NAME("AMD CPU Family 15h")
|
CHIP_NAME("AMD CPU Family 15h")
|
||||||
};
|
};
|
||||||
|
@@ -29,16 +29,18 @@ void amd_initcpuio(void)
|
|||||||
PciData = 1;
|
PciData = 1;
|
||||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||||
|
|
||||||
/* The platform BIOS needs to ensure the memory ranges of SB800 legacy
|
/* The platform BIOS needs to ensure the memory ranges of SB800
|
||||||
* devices (TPM, HPET, BIOS RAM, Watchdog Timer, I/O APIC and ACPI) are
|
* legacy devices (TPM, HPET, BIOS RAM, Watchdog Timer, I/O APIC and
|
||||||
* set to non-posted regions.
|
* ACPI) are set to non-posted regions.
|
||||||
*/
|
*/
|
||||||
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x84);
|
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x84);
|
||||||
PciData = 0x00FEDF00; /* last address before processor local APIC at FEE00000 */
|
/* last address before processor local APIC at FEE00000 */
|
||||||
|
PciData = 0x00FEDF00;
|
||||||
PciData |= 1 << 7; /* set NP (non-posted) bit */
|
PciData |= 1 << 7; /* set NP (non-posted) bit */
|
||||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||||
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
|
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
|
||||||
PciData = (0xFED00000 >> 8) | 3; /* lowest NP address is HPET at FED00000 */
|
/* lowest NP address is HPET at FED00000 */
|
||||||
|
PciData = (0xFED00000 >> 8) | 3;
|
||||||
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
|
||||||
|
|
||||||
/* Map the remaining PCI hole as posted MMIO */
|
/* Map the remaining PCI hole as posted MMIO */
|
||||||
@@ -68,14 +70,15 @@ void amd_initmmio(void)
|
|||||||
AMD_CONFIG_PARAMS StdHeader;
|
AMD_CONFIG_PARAMS StdHeader;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Set the MMIO Configuration Base Address and Bus Range onto MMIO configuration base
|
Set the MMIO Configuration Base Address and Bus Range onto MMIO
|
||||||
Address MSR register.
|
configuration base Address MSR register.
|
||||||
*/
|
*/
|
||||||
MsrReg = CONFIG_MMCONF_BASE_ADDRESS | (LibAmdBitScanReverse (CONFIG_MMCONF_BUS_NUMBER) << 2) | 1;
|
MsrReg = CONFIG_MMCONF_BASE_ADDRESS | \
|
||||||
|
(LibAmdBitScanReverse (CONFIG_MMCONF_BUS_NUMBER) << 2) | 1;
|
||||||
LibAmdMsrWrite(0xC0010058, &MsrReg, &StdHeader);
|
LibAmdMsrWrite(0xC0010058, &MsrReg, &StdHeader);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Set the NB_CFG MSR register. Enable CF8 extended configuration cycles.
|
Set the NB_CFG MSR register. Enable CF8 extended config cycles.
|
||||||
*/
|
*/
|
||||||
LibAmdMsrRead(0xC001001F, &MsrReg, &StdHeader);
|
LibAmdMsrRead(0xC001001F, &MsrReg, &StdHeader);
|
||||||
MsrReg = MsrReg | 0x0000400000000000;
|
MsrReg = MsrReg | 0x0000400000000000;
|
||||||
@@ -89,6 +92,7 @@ void amd_initmmio(void)
|
|||||||
/* Set ROM cache onto WP to decrease post time */
|
/* Set ROM cache onto WP to decrease post time */
|
||||||
MsrReg = (0x0100000000ull - CACHE_ROM_SIZE) | 5ull;
|
MsrReg = (0x0100000000ull - CACHE_ROM_SIZE) | 5ull;
|
||||||
LibAmdMsrWrite(0x20C, &MsrReg, &StdHeader);
|
LibAmdMsrWrite(0x20C, &MsrReg, &StdHeader);
|
||||||
MsrReg = ((1ULL << CONFIG_CPU_ADDR_BITS) - CACHE_ROM_SIZE) | 0x800ull;
|
MsrReg = ((1ULL << CONFIG_CPU_ADDR_BITS) - CACHE_ROM_SIZE) | \
|
||||||
|
0x800ull;
|
||||||
LibAmdMsrWrite(0x20D, &MsrReg, &StdHeader);
|
LibAmdMsrWrite(0x20D, &MsrReg, &StdHeader);
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the coreboot project.
|
* This file is part of the coreboot project.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 Advanced Micro Devices, Inc.
|
* Copyright (C) 2015-2016 Advanced Micro Devices, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -89,9 +89,8 @@ static void model_15_init(device_t dev)
|
|||||||
/* zero the machine check error status registers */
|
/* zero the machine check error status registers */
|
||||||
msr.lo = 0;
|
msr.lo = 0;
|
||||||
msr.hi = 0;
|
msr.hi = 0;
|
||||||
for (i = 0; i < 6; i++) {
|
for (i = 0; i < 6; i++)
|
||||||
wrmsr(MCI_STATUS + (i * 4), msr);
|
wrmsr(MCI_STATUS + (i * 4), msr);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Enable the local CPU APICs */
|
/* Enable the local CPU APICs */
|
||||||
@@ -130,8 +129,7 @@ static struct device_operations cpu_dev_ops = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct cpu_device_id cpu_table[] = {
|
static struct cpu_device_id cpu_table[] = {
|
||||||
{ X86_VENDOR_AMD, 0x660f00 },
|
{ X86_VENDOR_AMD, 0x670f00 },
|
||||||
{ X86_VENDOR_AMD, 0x660f01 },
|
|
||||||
{ 0, 0 },
|
{ 0, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of the coreboot project.
|
# This file is part of the coreboot project.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
|
# Copyright (C) 2011 - 2016 Advanced Micro Devices, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -17,6 +17,7 @@ config CPU_AMD_PI
|
|||||||
bool
|
bool
|
||||||
default y if CPU_AMD_PI_00630F01
|
default y if CPU_AMD_PI_00630F01
|
||||||
default y if CPU_AMD_PI_00730F01
|
default y if CPU_AMD_PI_00730F01
|
||||||
|
default y if CPU_AMD_PI_00670F00
|
||||||
default y if CPU_AMD_PI_00660F01
|
default y if CPU_AMD_PI_00660F01
|
||||||
default n
|
default n
|
||||||
select ARCH_BOOTBLOCK_X86_32
|
select ARCH_BOOTBLOCK_X86_32
|
||||||
@@ -69,4 +70,5 @@ endif # CPU_AMD_PI
|
|||||||
|
|
||||||
source src/cpu/amd/pi/00630F01/Kconfig
|
source src/cpu/amd/pi/00630F01/Kconfig
|
||||||
source src/cpu/amd/pi/00730F01/Kconfig
|
source src/cpu/amd/pi/00730F01/Kconfig
|
||||||
|
source src/cpu/amd/pi/00670F00/Kconfig
|
||||||
source src/cpu/amd/pi/00660F01/Kconfig
|
source src/cpu/amd/pi/00660F01/Kconfig
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# This file is part of the coreboot project.
|
# This file is part of the coreboot project.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
|
# Copyright (C) 2011 - 2016 Advanced Micro Devices, Inc.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
subdirs-$(CONFIG_CPU_AMD_PI_00630F01) += 00630F01
|
subdirs-$(CONFIG_CPU_AMD_PI_00630F01) += 00630F01
|
||||||
subdirs-$(CONFIG_CPU_AMD_PI_00730F01) += 00730F01
|
subdirs-$(CONFIG_CPU_AMD_PI_00730F01) += 00730F01
|
||||||
|
subdirs-$(CONFIG_CPU_AMD_PI_00670F00) += 00670F00
|
||||||
subdirs-$(CONFIG_CPU_AMD_PI_00660F01) += 00660F01
|
subdirs-$(CONFIG_CPU_AMD_PI_00660F01) += 00660F01
|
||||||
|
|
||||||
romstage-y += s3_resume.c
|
romstage-y += s3_resume.c
|
||||||
|
Reference in New Issue
Block a user