[PATCH 23/26] uefi: csm: use uint32_t for BIOS address ranges
Keng-Yu Lin
kengyu at canonical.com
Wed Oct 17 07:56:52 UTC 2012
On Mon, Oct 15, 2012 at 4:32 AM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Rather than using plain ints, we should be using uint32_t
> for traditional 32 bit BIOS address ranges.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/uefi/csm/csm.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/uefi/csm/csm.c b/src/uefi/csm/csm.c
> index 4f755ba..b054049 100644
> --- a/src/uefi/csm/csm.c
> +++ b/src/uefi/csm/csm.c
> @@ -40,7 +40,7 @@ static int csm_test1(fwts_framework *fw)
> uint8_t *optROM;
> uint32_t *intVec;
> uint32_t int10hVec;
> - int i;
> + uint32_t i;
> int flag = 0;
>
> fwts_log_info(fw, "Checking for UEFI Compatibility Support Module (CSM)");
> @@ -63,9 +63,9 @@ static int csm_test1(fwts_framework *fw)
>
> for (i=0; i<BIOS_ROM_REGION_SIZE; i+= 512) {
> if ((*(optROM+i) == 0x55) && (*(optROM+i+1) == 0xaa)) {
> - int length = *(optROM+i+2) << 9;
> - int ROMstart = BIOS_ROM_REGION_START+i;
> - int ROMend = BIOS_ROM_REGION_START+i+length;
> + uint32_t length = *(optROM+i+2) << 9;
> + uint32_t ROMstart = BIOS_ROM_REGION_START+i;
> + uint32_t ROMend = BIOS_ROM_REGION_START+i+length;
>
> if ((ROMstart <= int10hVec) && (int10hVec <= ROMend)) {
> fwts_log_info(fw, "Int 10h jumps to 0x%" PRIx32 " in option ROM at: "
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>
More information about the fwts-devel
mailing list