Modify generic watchdog base address type to 64 bit PCD to allow platforms to map generic watchdog in 64bit address space and replace FixedPcdGet32 with FixedPcdGet64.
Signed-off-by: Jayanthi A jayanthi.annadurai@broadcom.com --- ArmPkg/ArmPkg.dec | 4 ++-- ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h | 8 ++++---- ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index 7ca80a1..b5cdd49 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -238,8 +238,8 @@ # ARM Generic Watchdog #
- gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0x2A440000|UINT32|0x00000007 - gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x2A450000|UINT32|0x00000008 + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0x2A440000|UINT64|0x00000007 + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x2A450000|UINT64|0x00000008 gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum|93|UINT32|0x00000009
# diff --git a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h index 578fd1e..6641b9e 100644 --- a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h +++ b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h @@ -15,12 +15,12 @@ #define __GENERIC_WATCHDOG_H__
// Refresh Frame: -#define GENERIC_WDOG_REFRESH_REG ((UINT32)FixedPcdGet32 (PcdGenericWatchdogRefreshBase) + 0x000) +#define GENERIC_WDOG_REFRESH_REG ((UINT64)FixedPcdGet64 (PcdGenericWatchdogRefreshBase) + 0x000)
// Control Frame: -#define GENERIC_WDOG_CONTROL_STATUS_REG ((UINT32)FixedPcdGet32 (PcdGenericWatchdogControlBase) + 0x000) -#define GENERIC_WDOG_OFFSET_REG ((UINT32)FixedPcdGet32 (PcdGenericWatchdogControlBase) + 0x008) -#define GENERIC_WDOG_COMPARE_VALUE_REG ((UINT32)FixedPcdGet32 (PcdGenericWatchdogControlBase) + 0x010) +#define GENERIC_WDOG_CONTROL_STATUS_REG ((UINT64)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x000) +#define GENERIC_WDOG_OFFSET_REG ((UINT64)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x008) +#define GENERIC_WDOG_COMPARE_VALUE_REG ((UINT64)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x010)
// Values of bit 0 of the Control/Status Register #define GENERIC_WDOG_ENABLED 1 diff --git a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc index 49d6e8e..441f4fa 100644 --- a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc +++ b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc @@ -89,9 +89,9 @@ }, { EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( - FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 93, 0), + FixedPcdGet64 (PcdGenericWatchdogRefreshBase), FixedPcdGet64 (PcdGenericWatchdogControlBase), 93, 0), EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( - FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 94, EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER) + FixedPcdGet64 (PcdGenericWatchdogRefreshBase), FixedPcdGet64 (PcdGenericWatchdogControlBase), 94, EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER) } }; #endif
On 19 May 2015 at 00:27, Jayanthi A jayanthi.annadurai@broadcom.com wrote:
Modify generic watchdog base address type to 64 bit PCD to allow platforms to map generic watchdog in 64bit address space and replace FixedPcdGet32 with FixedPcdGet64.
Signed-off-by: Jayanthi A jayanthi.annadurai@broadcom.com
Yes, this looks fine now
Please send it to the edk2-devel mailing list with olivier.martin@arm.com and leif.lindholm@linaro.org on cc
ArmPkg/ArmPkg.dec | 4 ++-- ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h | 8 ++++---- ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec index 7ca80a1..b5cdd49 100644 --- a/ArmPkg/ArmPkg.dec +++ b/ArmPkg/ArmPkg.dec @@ -238,8 +238,8 @@ # ARM Generic Watchdog #
- gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0x2A440000|UINT32|0x00000007
- gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x2A450000|UINT32|0x00000008
gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0x2A440000|UINT64|0x00000007
gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x2A450000|UINT64|0x00000008 gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum|93|UINT32|0x00000009
#
diff --git a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h index 578fd1e..6641b9e 100644 --- a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h +++ b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h @@ -15,12 +15,12 @@ #define __GENERIC_WATCHDOG_H__
// Refresh Frame: -#define GENERIC_WDOG_REFRESH_REG ((UINT32)FixedPcdGet32 (PcdGenericWatchdogRefreshBase) + 0x000) +#define GENERIC_WDOG_REFRESH_REG ((UINT64)FixedPcdGet64 (PcdGenericWatchdogRefreshBase) + 0x000)
// Control Frame: -#define GENERIC_WDOG_CONTROL_STATUS_REG ((UINT32)FixedPcdGet32 (PcdGenericWatchdogControlBase) + 0x000) -#define GENERIC_WDOG_OFFSET_REG ((UINT32)FixedPcdGet32 (PcdGenericWatchdogControlBase) + 0x008) -#define GENERIC_WDOG_COMPARE_VALUE_REG ((UINT32)FixedPcdGet32 (PcdGenericWatchdogControlBase) + 0x010) +#define GENERIC_WDOG_CONTROL_STATUS_REG ((UINT64)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x000) +#define GENERIC_WDOG_OFFSET_REG ((UINT64)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x008) +#define GENERIC_WDOG_COMPARE_VALUE_REG ((UINT64)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x010)
// Values of bit 0 of the Control/Status Register #define GENERIC_WDOG_ENABLED 1 diff --git a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc index 49d6e8e..441f4fa 100644 --- a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc +++ b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/Gtdt.aslc @@ -89,9 +89,9 @@ }, { EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(
FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 93, 0),
FixedPcdGet64 (PcdGenericWatchdogRefreshBase), FixedPcdGet64 (PcdGenericWatchdogControlBase), 93, 0), EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(
FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 94, EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER)
} };FixedPcdGet64 (PcdGenericWatchdogRefreshBase), FixedPcdGet64 (PcdGenericWatchdogControlBase), 94, EFI_ACPI_5_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER)
#endif
2.1.0
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi