Fix the loader for sparc64.

The commit from r279799 missed the adaptation of md_load in
sparc64/loader/main.c. This resulted in Memory Address Align issues at the
early boot stage.

Tested on a netbooted Fire 120.
This commit is contained in:
andreast 2015-05-01 20:35:09 +00:00
parent 9d15eb12b6
commit 5b8c32b5c4

View File

@ -101,7 +101,7 @@ static inline u_long itlb_get_data_sun4u(u_int, u_int);
static int itlb_enter_sun4u(u_int, u_long data, vm_offset_t);
static vm_offset_t itlb_va_to_pa_sun4u(vm_offset_t);
static void itlb_relocate_locked0_sun4u(void);
extern vm_offset_t md_load(char *, vm_offset_t *);
extern vm_offset_t md_load(char *, vm_offset_t *, vm_offset_t *);
static int sparc64_autoload(void);
static ssize_t sparc64_readin(const int, vm_offset_t, const size_t);
static ssize_t sparc64_copyin(const void *, vm_offset_t, size_t);
@ -340,7 +340,7 @@ static int
__elfN(exec)(struct preloaded_file *fp)
{
struct file_metadata *fmp;
vm_offset_t mdp;
vm_offset_t mdp, dtbp;
Elf_Addr entry;
Elf_Ehdr *e;
int error;
@ -349,7 +349,7 @@ __elfN(exec)(struct preloaded_file *fp)
return (EFTYPE);
e = (Elf_Ehdr *)&fmp->md_data;
if ((error = md_load(fp->f_args, &mdp)) != 0)
if ((error = md_load(fp->f_args, &mdp, &dtbp)) != 0)
return (error);
printf("jumping to kernel entry at %#lx.\n", e->e_entry);