aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/amd64
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2014-04-04 13:35:36 +0000
committerEd Maste <emaste@FreeBSD.org>2014-04-04 13:35:36 +0000
commit7de278582748d32120a353645111bf81f1932e31 (patch)
treefd45e00589720187ca4d8ca6e0982dc0a3fe8a90 /sys/boot/amd64
parent5055c92801a30a01d104d0dea5d52d54b3cdd834 (diff)
downloadsrc-7de278582748d32120a353645111bf81f1932e31.tar.gz
src-7de278582748d32120a353645111bf81f1932e31.zip
Notes
Diffstat (limited to 'sys/boot/amd64')
-rw-r--r--sys/boot/amd64/efi/copy.c4
-rw-r--r--sys/boot/amd64/efi/elf64_freebsd.c5
-rw-r--r--sys/boot/amd64/efi/main.c5
3 files changed, 8 insertions, 6 deletions
diff --git a/sys/boot/amd64/efi/copy.c b/sys/boot/amd64/efi/copy.c
index bebe42ed5ec2..c6cc3490817a 100644
--- a/sys/boot/amd64/efi/copy.c
+++ b/sys/boot/amd64/efi/copy.c
@@ -51,8 +51,8 @@ x86_efi_copy_init(void)
status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData,
STAGE_PAGES, &staging);
if (EFI_ERROR(status)) {
- printf("failed to allocate staging area: %d\n",
- status & EFI_ERROR_MASK);
+ printf("failed to allocate staging area: %lu\n",
+ (unsigned long)(status & EFI_ERROR_MASK));
return (status);
}
diff --git a/sys/boot/amd64/efi/elf64_freebsd.c b/sys/boot/amd64/efi/elf64_freebsd.c
index af5b10853f4f..0fb82b062bb9 100644
--- a/sys/boot/amd64/efi/elf64_freebsd.c
+++ b/sys/boot/amd64/efi/elf64_freebsd.c
@@ -101,7 +101,7 @@ elf64_exec(struct preloaded_file *fp)
rsdp = efi_get_table(&acpi_guid);
}
if (rsdp != NULL) {
- sprintf(buf, "0x%016llx", rsdp);
+ sprintf(buf, "0x%016llx", (unsigned long long)rsdp);
setenv("hint.acpi.0.rsdp", buf, 1);
revision = rsdp->Revision;
if (revision == 0)
@@ -115,7 +115,8 @@ elf64_exec(struct preloaded_file *fp)
setenv("hint.acpi.0.rsdt", buf, 1);
if (revision >= 2) {
/* XXX extended checksum? */
- sprintf(buf, "0x%016llx", rsdp->XsdtPhysicalAddress);
+ sprintf(buf, "0x%016llx",
+ (unsigned long long)rsdp->XsdtPhysicalAddress);
setenv("hint.acpi.0.xsdt", buf, 1);
sprintf(buf, "%d", rsdp->Length);
setenv("hint.acpi.0.xsdt_length", buf, 1);
diff --git a/sys/boot/amd64/efi/main.c b/sys/boot/amd64/efi/main.c
index 0a0fa77d8526..d1ea9c3f00be 100644
--- a/sys/boot/amd64/efi/main.c
+++ b/sys/boot/amd64/efi/main.c
@@ -304,7 +304,7 @@ command_mode(int argc, char *argv[])
printf("couldn't set mode %d\n", mode);
return (CMD_ERROR);
}
- sprintf(rowenv, "%d", rows);
+ sprintf(rowenv, "%u", (unsigned)rows);
setenv("LINES", rowenv, 1);
return (CMD_OK);
@@ -314,7 +314,8 @@ command_mode(int argc, char *argv[])
status = conout->QueryMode(conout, i, &cols, &rows);
if (EFI_ERROR(status))
break;
- printf("Mode %d: %d columns, %d rows\n", i, cols, rows);
+ printf("Mode %d: %u columns, %u rows\n", i, (unsigned)cols,
+ (unsigned)rows);
}
if (i != 0)