"x86-64: EFI boot code" breaks 32-bit build
cc1: warnings being treated as errorsmpparse.c: In function 'efi_check_config':
mpparse.c:669: error: format '%08llx' expects type 'long long unsigned int', but argument 2 has type 'long unsigned int'
In xen/include/xen/efi.h:
23616: unsigned long mps; /* MPS table */
In xen/arch/x86/mpparse.c (line 669):
23616: printk(KERN_INFO "SMP MP-table at %08"PRIx64"\n", efi.mps);
Should mps be uint64_t ? What about the other fields in struct efi ?
Ian.
Quoted 6 lines
Quoted 1 line
Quoted 1 line · Ian Jackson
cc1: warnings being treated as errors
mpparse.c: In function 'efi_check_config':
mpparse.c:669: error: format '%08llx' expects type 'long long unsigned int', but argument 2 has type 'long unsigned int'
Quoted 7 lines
In
xen/include/xen/efi.h:
23616: unsigned long mps; /* MPS table */In
xen/arch/x86/mpparse.c(line 669):
23616:printk(KERN_INFO "SMP MP-table at %08"PRIx64"\n", efi.mps);Should mps be
uint64_t? What about the other fields in struct efi ?
On 32-bit all code protected by a check of efi_enabled will simply get compiled out. Hence no point in making the fields uint64_t. Hence the simplest possible fix would be as below.
Jan
*****************************************************
Subject: x86-32: compilation fix after c/s 23616:dffcd8b4c197
xen/arch/x86/mpparse.c +1 -1
@@ -666,7 +666,7 @@ static void __init efi_check_config( mpf_checksum((void *)mpf, 16) && (mpf->mpf_specification == 1 || mpf->mpf_specification == 4)) { smp_found_config =1 ; -printk (KERN_INFO "SMP MP-table at %08" PRIx64"\n" , efi.mps); +printk (KERN_INFO "SMP MP-table at %08lx\n" , efi.mps); mpf_found = mpf; } else