aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/loader/arch/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'stand/efi/loader/arch/amd64')
-rw-r--r--stand/efi/loader/arch/amd64/multiboot2.c6
-rw-r--r--stand/efi/loader/arch/amd64/trap.c9
2 files changed, 6 insertions, 9 deletions
diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c
index eb7362293406..086dba33895a 100644
--- a/stand/efi/loader/arch/amd64/multiboot2.c
+++ b/stand/efi/loader/arch/amd64/multiboot2.c
@@ -79,7 +79,6 @@ loadfile(char *filename, uint64_t dest, struct preloaded_file **result)
void *multiboot = NULL;
ssize_t search_size;
struct multiboot_header *header;
- char *cmdline;
struct mb2hdr hdr;
bool keep_bs = false;
@@ -344,7 +343,7 @@ exec(struct preloaded_file *fp)
EFI_SIZE_TO_PAGES(PAGE_SIZE), &addr);
if (EFI_ERROR(status)) {
printf("Failed to allocate pages for multiboot2 header: %lu\n",
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
error = ENOMEM;
goto error;
}
@@ -352,7 +351,7 @@ exec(struct preloaded_file *fp)
EFI_SIZE_TO_PAGES(128 * 1024), &stack);
if (EFI_ERROR(status)) {
printf("Failed to allocate pages for Xen stack: %lu\n",
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
error = ENOMEM;
goto error;
}
@@ -495,7 +494,6 @@ static int
obj_loadfile(char *filename, uint64_t dest, struct preloaded_file **result)
{
struct preloaded_file *mfp, *kfp, *rfp;
- struct kernel_module *kmp;
int error;
/* See if there's a multiboot kernel loaded */
diff --git a/stand/efi/loader/arch/amd64/trap.c b/stand/efi/loader/arch/amd64/trap.c
index 61feb76e2dca..f79d74bf0322 100644
--- a/stand/efi/loader/arch/amd64/trap.c
+++ b/stand/efi/loader/arch/amd64/trap.c
@@ -87,7 +87,6 @@ report_exc(struct trapframe *tf)
struct frame *fp;
uintptr_t pc, base;
char buf[80];
- int ret;
base = (uintptr_t)boot_img->ImageBase;
/*
@@ -215,7 +214,7 @@ efi_setup_tss(struct region_descriptor *gdt, uint32_t loader_tss_idx,
EFI_SIZE_TO_PAGES(sizeof(struct amd64tss)), &tss_pa);
if (EFI_ERROR(status)) {
printf("efi_setup_tss: AllocatePages tss error %lu\n",
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
return (0);
}
*tss = (struct amd64tss *)tss_pa;
@@ -252,7 +251,7 @@ efi_redirect_exceptions(void)
EFI_SIZE_TO_PAGES(fw_idt.rd_limit), &lidt_pa);
if (EFI_ERROR(status)) {
printf("efi_redirect_exceptions: AllocatePages IDT error %lu\n",
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
lidt_pa = 0;
return (0);
}
@@ -260,7 +259,7 @@ efi_redirect_exceptions(void)
&exc_stack_pa);
if (EFI_ERROR(status)) {
printf("efi_redirect_exceptions: AllocatePages stk error %lu\n",
- EFI_ERROR_CODE(status));
+ DECODE_ERROR(status));
exc_stack_pa = 0;
free_tables();
return (0);
@@ -304,7 +303,7 @@ efi_redirect_exceptions(void)
&loader_gdt_pa);
if (EFI_ERROR(status)) {
printf("efi_setup_tss: AllocatePages gdt error "
- "%lu\n", EFI_ERROR_CODE(status));
+ "%lu\n", DECODE_ERROR(status));
loader_gdt_pa = 0;
free_tables();
return (0);