From ff4d6be9f99c34242140e965f1ed82240d67198c Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 12 Sep 2023 14:18:49 +0200 Subject: */include/cpu: use unsigned int for number of address bits The number of physical address bits and reserved address bits shouldn't ever be negative, so change the return type of cpu_phys_address_size, get_reserved_phys_addr_bits, and get_tme_keyid_bits from int to unsigned int. Signed-off-by: Felix Held Change-Id: I9e67db6bf0c38f743b50e7273449cc028de13a8c Reviewed-on: https://review.coreboot.org/c/coreboot/+/78072 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson Reviewed-by: Matt DeVillier Reviewed-by: Varshit Pandya --- src/cpu/intel/common/common_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/intel/common/common_init.c b/src/cpu/intel/common/common_init.c index ff00f0247f..55bc59eb75 100644 --- a/src/cpu/intel/common/common_init.c +++ b/src/cpu/intel/common/common_init.c @@ -248,7 +248,7 @@ bool is_tme_supported(void) * configured in the MSRs according to the capabilities and platform * configuration. For instance, after FSP-M. */ -static int get_tme_keyid_bits(void) +static unsigned int get_tme_keyid_bits(void) { msr_t msr; @@ -256,7 +256,7 @@ static int get_tme_keyid_bits(void) return msr.hi & TME_ACTIVATE_HI_KEYID_BITS_MASK; } -int get_reserved_phys_addr_bits(void) +unsigned int get_reserved_phys_addr_bits(void) { if (!is_tme_supported()) return 0; -- cgit v1.2.3