arch/x86: factor out and commonize HPET_BASE_ADDRESS definition
All x86 chipsets and SoCs have the HPET MMIO base address at 0xfed00000, so define this once in arch/x86 and include this wherever needed. The old AMD AGESA code in vendorcode that has its own definition is left unchanged, but sb/amd/cimx/sb800/cfg.c is changed to use the new common definition. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ifc624051cc6c0f125fa154e826cfbeaf41b4de83 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62304 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
parent
46a3a044ad
commit
4b2464fc90
|
@ -0,0 +1,8 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#ifndef ARCH_X86_HPET_H
|
||||||
|
#define ARCH_X86_HPET_H
|
||||||
|
|
||||||
|
#define HPET_BASE_ADDRESS 0xfed00000
|
||||||
|
|
||||||
|
#endif /* ARCH_X86_HPET_H */
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <acpi/acpi_device.h>
|
#include <acpi/acpi_device.h>
|
||||||
#include <amdblocks/data_fabric.h>
|
#include <amdblocks/data_fabric.h>
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <cpu/x86/lapic_def.h>
|
#include <cpu/x86/lapic_def.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#define GNB_IO_APIC_ADDR 0xfec01000
|
#define GNB_IO_APIC_ADDR 0xfec01000
|
||||||
#define SPI_BASE_ADDRESS 0xfec10000
|
#define SPI_BASE_ADDRESS 0xfec10000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
#include <arch/hpet.h> /* This will be removed in a follow-up patch */
|
||||||
#if CONFIG_HPET_ADDRESS != HPET_BASE_ADDRESS
|
#if CONFIG_HPET_ADDRESS != HPET_BASE_ADDRESS
|
||||||
#error HPET address must be 0xfed00000
|
#error HPET address must be 0xfed00000
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <acpi/acpi_device.h>
|
#include <acpi/acpi_device.h>
|
||||||
#include <amdblocks/data_fabric.h>
|
#include <amdblocks/data_fabric.h>
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <cpu/x86/lapic_def.h>
|
#include <cpu/x86/lapic_def.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#define GNB_IO_APIC_ADDR 0xfec01000
|
#define GNB_IO_APIC_ADDR 0xfec01000
|
||||||
#define SPI_BASE_ADDRESS 0xfec10000
|
#define SPI_BASE_ADDRESS 0xfec10000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
#include <arch/hpet.h> /* This will be removed in a follow-up patch */
|
||||||
#if CONFIG_HPET_ADDRESS != HPET_BASE_ADDRESS
|
#if CONFIG_HPET_ADDRESS != HPET_BASE_ADDRESS
|
||||||
#error HPET address must be 0xfed00000
|
#error HPET address must be 0xfed00000
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include <acpi/acpi_device.h>
|
#include <acpi/acpi_device.h>
|
||||||
#include <amdblocks/data_fabric.h>
|
#include <amdblocks/data_fabric.h>
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <cpu/x86/lapic_def.h>
|
#include <cpu/x86/lapic_def.h>
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
#define GNB_IO_APIC_ADDR 0xfec01000
|
#define GNB_IO_APIC_ADDR 0xfec01000
|
||||||
#define SPI_BASE_ADDRESS 0xfec10000
|
#define SPI_BASE_ADDRESS 0xfec10000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
#include <arch/hpet.h> /* This will be removed in a follow-up patch */
|
||||||
#if CONFIG_HPET_ADDRESS != HPET_BASE_ADDRESS
|
#if CONFIG_HPET_ADDRESS != HPET_BASE_ADDRESS
|
||||||
#error HPET address must be 0xfed00000
|
#error HPET address must be 0xfed00000
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#define APU_I2C2_BASE 0xfedc4000
|
#define APU_I2C2_BASE 0xfedc4000
|
||||||
#define APU_I2C3_BASE 0xfedc5000
|
#define APU_I2C3_BASE 0xfedc5000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
#include <arch/hpet.h> /* This will be removed in a follow-up patch */
|
||||||
#if CONFIG_HPET_ADDRESS != HPET_BASE_ADDRESS
|
#if CONFIG_HPET_ADDRESS != HPET_BASE_ADDRESS
|
||||||
#error HPET address must be 0xfed00000
|
#error HPET address must be 0xfed00000
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
#include <amdblocks/biosram.h>
|
#include <amdblocks/biosram.h>
|
||||||
#include <amdblocks/hda.h>
|
#include <amdblocks/hda.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <arch/ioapic.h>
|
#include <arch/ioapic.h>
|
||||||
#include <acpi/acpi.h>
|
#include <acpi/acpi.h>
|
||||||
#include <acpi/acpigen.h>
|
#include <acpi/acpigen.h>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <device/pci_def.h>
|
#include <device/pci_def.h>
|
||||||
#include <soc/pci_devs.h>
|
#include <soc/pci_devs.h>
|
||||||
|
|
|
@ -59,8 +59,6 @@
|
||||||
#define REG_BASE_ADDRESS 0xfb000000
|
#define REG_BASE_ADDRESS 0xfb000000
|
||||||
#define REG_BASE_SIZE 0x1000
|
#define REG_BASE_SIZE 0x1000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
||||||
#define PCH_PWRM_BASE_SIZE 0x10000
|
#define PCH_PWRM_BASE_SIZE 0x10000
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
#define MCH_BASE_ADDRESS 0xfed10000
|
#define MCH_BASE_ADDRESS 0xfed10000
|
||||||
#define MCH_BASE_SIZE (32 * KiB)
|
#define MCH_BASE_SIZE (32 * KiB)
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define ACPI_BASE_ADDRESS 0x400
|
#define ACPI_BASE_ADDRESS 0x400
|
||||||
#define ACPI_BASE_SIZE 0x100
|
#define ACPI_BASE_SIZE 0x100
|
||||||
#define R_ACPI_PM1_TMR 0x8
|
#define R_ACPI_PM1_TMR 0x8
|
||||||
|
|
|
@ -42,9 +42,6 @@
|
||||||
#define RCBA_BASE_ADDRESS 0xfed1c000
|
#define RCBA_BASE_ADDRESS 0xfed1c000
|
||||||
#define RCBA_BASE_SIZE 0x400
|
#define RCBA_BASE_SIZE 0x400
|
||||||
|
|
||||||
/* High Performance Event Timer */
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
/* Temporary Base Address */
|
/* Temporary Base Address */
|
||||||
#define TEMP_BASE_ADDRESS 0xfd000000
|
#define TEMP_BASE_ADDRESS 0xfd000000
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,6 @@
|
||||||
#define RCBA_BASE_ADDRESS 0xfed1c000
|
#define RCBA_BASE_ADDRESS 0xfed1c000
|
||||||
#define RCBA_BASE_SIZE 0x400
|
#define RCBA_BASE_SIZE 0x400
|
||||||
|
|
||||||
/* High Performance Event Timer */
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
/* Temporary Base Address */
|
/* Temporary Base Address */
|
||||||
#define TEMP_BASE_ADDRESS 0xfd000000
|
#define TEMP_BASE_ADDRESS 0xfd000000
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@
|
||||||
|
|
||||||
#include <northbridge/intel/haswell/memmap.h>
|
#include <northbridge/intel/haswell/memmap.h>
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define ACPI_BASE_ADDRESS 0x1000
|
#define ACPI_BASE_ADDRESS 0x1000
|
||||||
#define ACPI_BASE_SIZE 0x100
|
#define ACPI_BASE_SIZE 0x100
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
#include <arch/bootblock.h>
|
#include <arch/bootblock.h>
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <soc/iomap.h>
|
#include <soc/iomap.h>
|
||||||
#include <soc/lpc.h>
|
#include <soc/lpc.h>
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
#define REG_BASE_ADDRESS 0xfc000000
|
#define REG_BASE_ADDRESS 0xfc000000
|
||||||
#define REG_BASE_SIZE 0x1000
|
#define REG_BASE_SIZE 0x1000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
||||||
#define PCH_PWRM_BASE_SIZE 0x10000
|
#define PCH_PWRM_BASE_SIZE 0x10000
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
/* Intel LPC/eSPI Bus Device - 0:1f.0 */
|
/* Intel LPC/eSPI Bus Device - 0:1f.0 */
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <soc/iomap.h>
|
#include <soc/iomap.h>
|
||||||
|
|
||||||
Device (LPCB)
|
Device (LPCB)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <soc/iomap.h>
|
#include <soc/iomap.h>
|
||||||
|
|
||||||
Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID
|
Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#define ACPI_BASE_ADDRESS DEFAULT_PMBASE
|
#define ACPI_BASE_ADDRESS DEFAULT_PMBASE
|
||||||
#define DEFAULT_TCO_BASE 0x400
|
#define DEFAULT_TCO_BASE 0x400
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
/* Southbridge internal device MEM BARs (Set to match FSP settings) */
|
/* Southbridge internal device MEM BARs (Set to match FSP settings) */
|
||||||
#define DEFAULT_PCR_BASE 0xfd000000
|
#define DEFAULT_PCR_BASE 0xfd000000
|
||||||
#define DEFAULT_PWRM_BASE 0xfe000000
|
#define DEFAULT_PWRM_BASE 0xfe000000
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
#define REG_BASE_ADDRESS 0xfb000000
|
#define REG_BASE_ADDRESS 0xfb000000
|
||||||
#define REG_BASE_SIZE 0x1000
|
#define REG_BASE_SIZE 0x1000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
||||||
#define PCH_PWRM_BASE_SIZE 0x10000
|
#define PCH_PWRM_BASE_SIZE 0x10000
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
#define REG_BASE_ADDRESS 0xfc000000
|
#define REG_BASE_ADDRESS 0xfc000000
|
||||||
#define REG_BASE_SIZE 0x1000
|
#define REG_BASE_SIZE 0x1000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
||||||
#define PCH_PWRM_BASE_SIZE 0x10000
|
#define PCH_PWRM_BASE_SIZE 0x10000
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
#define REG_BASE_ADDRESS 0xfb000000
|
#define REG_BASE_ADDRESS 0xfb000000
|
||||||
#define REG_BASE_SIZE 0x1000
|
#define REG_BASE_SIZE 0x1000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
||||||
#define PCH_PWRM_BASE_SIZE 0x10000
|
#define PCH_PWRM_BASE_SIZE 0x10000
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <soc/iomap.h>
|
#include <soc/iomap.h>
|
||||||
|
|
||||||
Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID
|
Name (_HID, EisaId ("PNP0A08") /* PCI Express Bus */) // _HID: Hardware ID
|
||||||
|
|
|
@ -35,8 +35,6 @@
|
||||||
#define VTVC0_BASE_ADDRESS 0xfed91000
|
#define VTVC0_BASE_ADDRESS 0xfed91000
|
||||||
#define VTVC0_BASE_SIZE 0x1000
|
#define VTVC0_BASE_SIZE 0x1000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
||||||
#define PCH_PWRM_BASE_SIZE 0x10000
|
#define PCH_PWRM_BASE_SIZE 0x10000
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,6 @@
|
||||||
#define REG_BASE_ADDRESS 0xfb000000
|
#define REG_BASE_ADDRESS 0xfb000000
|
||||||
#define REG_BASE_SIZE 0x4000
|
#define REG_BASE_SIZE 0x4000
|
||||||
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
#define PCH_PWRM_BASE_ADDRESS 0xfe000000
|
||||||
#define PCH_PWRM_BASE_SIZE 0x10000
|
#define PCH_PWRM_BASE_SIZE 0x10000
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,6 @@
|
||||||
#define VGA_BASE_ADDRESS 0xa0000
|
#define VGA_BASE_ADDRESS 0xa0000
|
||||||
#define VGA_BASE_SIZE 0x20000
|
#define VGA_BASE_SIZE 0x20000
|
||||||
|
|
||||||
/* High Performance Event Timer */
|
|
||||||
#define HPET_BASE_ADDRESS 0xfed00000
|
|
||||||
|
|
||||||
#define HECI1_BASE_ADDRESS 0xfed1a000
|
#define HECI1_BASE_ADDRESS 0xfed1a000
|
||||||
|
|
||||||
#define PCH_PWRM_BASE_ADDRESS CONFIG_INTEL_PCH_PWRM_BASE_ADDRESS
|
#define PCH_PWRM_BASE_ADDRESS CONFIG_INTEL_PCH_PWRM_BASE_ADDRESS
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
#include <acpi/acpigen.h>
|
#include <acpi/acpigen.h>
|
||||||
|
#include <arch/hpet.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <cbmem.h>
|
#include <cbmem.h>
|
||||||
#include <device/mmio.h>
|
#include <device/mmio.h>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
|
#include <arch/hpet.h> /* Include this before OEM.h to have HPET_BASE_ADDRESS from arch/x86 */
|
||||||
#include "SBPLATFORM.h"
|
#include "SBPLATFORM.h"
|
||||||
#include "cfg.h"
|
#include "cfg.h"
|
||||||
#include <OEM.h>
|
#include <OEM.h>
|
||||||
|
|
Loading…
Reference in New Issue