diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2018-10-12 10:54:30 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-10-18 12:51:26 +0000 |
commit | 400ce55566caa541304b2483e61bcc2df941998c (patch) | |
tree | 4e0cbf4aef7fb00a9c40327075ffa9737e56b104 /src/northbridge/amd/pi | |
parent | e64a585374de88ea896ed517445a34986aa321b9 (diff) |
cpu/amd: Use common AMD's MSR
Phase 1. Due to the size of the effort, this CL is broken into several
phases.
Change-Id: I0236e0960cd1e79558ea50c814e1de2830aa0550
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/29065
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Diffstat (limited to 'src/northbridge/amd/pi')
-rw-r--r-- | src/northbridge/amd/pi/00630F01/northbridge.c | 16 | ||||
-rw-r--r-- | src/northbridge/amd/pi/00660F01/northbridge.c | 13 | ||||
-rw-r--r-- | src/northbridge/amd/pi/00730F01/northbridge.c | 13 |
3 files changed, 20 insertions, 22 deletions
diff --git a/src/northbridge/amd/pi/00630F01/northbridge.c b/src/northbridge/amd/pi/00630F01/northbridge.c index 8be2ac70fb..f6cb28565b 100644 --- a/src/northbridge/amd/pi/00630F01/northbridge.c +++ b/src/northbridge/amd/pi/00630F01/northbridge.c @@ -26,23 +26,23 @@ #include <lib.h> #include <cpu/cpu.h> #include <cbmem.h> - #include <Porting.h> #include <AGESA.h> #include <FieldAccessors.h> #include <Topology.h> +#include <cpu/x86/lapic.h> +#include <cpu/amd/msr.h> +#include <cpu/amd/mtrr.h> +#include <arch/acpi.h> +#include <arch/acpigen.h> +#include <assert.h> #include <northbridge/amd/agesa/agesa_helper.h> #if IS_ENABLED(CONFIG_BINARYPI_LEGACY_WRAPPER) #include <northbridge/amd/pi/agesawrapper.h> #include <northbridge/amd/pi/agesawrapper_call.h> #endif -#include "northbridge.h" -#include <cpu/x86/lapic.h> -#include <cpu/amd/mtrr.h> -#include <arch/acpi.h> -#include <arch/acpigen.h> -#include <assert.h> +#include "northbridge.h" #define MAX_NODE_NUMS MAX_NODES @@ -315,7 +315,7 @@ static void read_resources(struct device *dev) * It is not honored by the coreboot resource allocator if it is in * the CPU_CLUSTER. */ - mmconf_resource(dev, 0xc0010058); + mmconf_resource(dev, MMIO_CONF_BASE); } static void set_resource(struct device *dev, struct resource *resource, u32 nodeid) diff --git a/src/northbridge/amd/pi/00660F01/northbridge.c b/src/northbridge/amd/pi/00660F01/northbridge.c index c073e7ad11..fb3610d1b9 100644 --- a/src/northbridge/amd/pi/00660F01/northbridge.c +++ b/src/northbridge/amd/pi/00660F01/northbridge.c @@ -26,11 +26,15 @@ #include <lib.h> #include <cpu/cpu.h> #include <cbmem.h> - #include <Porting.h> #include <AGESA.h> #include <FieldAccessors.h> #include <Topology.h> +#include <cpu/x86/lapic.h> +#include <cpu/amd/msr.h> +#include <cpu/amd/mtrr.h> +#include <arch/acpi.h> +#include <arch/acpigen.h> #include <northbridge/amd/agesa/agesa_helper.h> #if IS_ENABLED(CONFIG_BINARYPI_LEGACY_WRAPPER) #include <northbridge/amd/pi/agesawrapper.h> @@ -38,11 +42,6 @@ #endif #include "northbridge.h" -#include <cpu/x86/lapic.h> -#include <cpu/amd/mtrr.h> -#include <arch/acpi.h> -#include <arch/acpigen.h> - #define MAX_NODE_NUMS MAX_NODES #if IS_ENABLED(CONFIG_EXT_CONF_SUPPORT) @@ -302,7 +301,7 @@ static void read_resources(struct device *dev) * It is not honored by the coreboot resource allocator if it is in * the CPU_CLUSTER. */ - mmconf_resource(dev, 0xc0010058); + mmconf_resource(dev, MMIO_CONF_BASE); } static void set_resource(struct device *dev, struct resource *resource, u32 nodeid) diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c index f4c39d6be1..7125e1e090 100644 --- a/src/northbridge/amd/pi/00730F01/northbridge.c +++ b/src/northbridge/amd/pi/00730F01/northbridge.c @@ -28,11 +28,15 @@ #include <lib.h> #include <cpu/cpu.h> #include <cbmem.h> - #include <Porting.h> #include <AGESA.h> #include <FieldAccessors.h> #include <Topology.h> +#include <cpu/x86/lapic.h> +#include <cpu/amd/msr.h> +#include <cpu/amd/mtrr.h> +#include <arch/acpi.h> +#include <arch/acpigen.h> #include <northbridge/amd/agesa/agesa_helper.h> #if IS_ENABLED(CONFIG_BINARYPI_LEGACY_WRAPPER) #include <northbridge/amd/pi/agesawrapper.h> @@ -40,11 +44,6 @@ #endif #include "northbridge.h" -#include <cpu/x86/lapic.h> -#include <cpu/amd/mtrr.h> -#include <arch/acpi.h> -#include <arch/acpigen.h> - #define MAX_NODE_NUMS MAX_NODES typedef struct dram_base_mask { @@ -312,7 +311,7 @@ static void read_resources(struct device *dev) * It is not honored by the coreboot resource allocator if it is in * the CPU_CLUSTER. */ - mmconf_resource(dev, 0xc0010058); + mmconf_resource(dev, MMIO_CONF_BASE); } static void set_resource(struct device *dev, struct resource *resource, u32 nodeid) |