Update i386 build of loader.efi (but leave it disabled) so that we at
least build it now. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D7801
This commit is contained in:
@@ -48,7 +48,10 @@ static EFI_GUID hcdp_guid = HCDP_TABLE_GUID;
|
|||||||
|
|
||||||
static UINTN mapkey;
|
static UINTN mapkey;
|
||||||
|
|
||||||
uint64_t
|
int ldr_bootinfo(struct bootinfo *, uint64_t *);
|
||||||
|
int ldr_enter(const char *);
|
||||||
|
|
||||||
|
static uint64_t
|
||||||
ldr_alloc(vm_offset_t va)
|
ldr_alloc(vm_offset_t va)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -35,12 +35,16 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <machine/elf.h>
|
#include <machine/elf.h>
|
||||||
#include <stand.h>
|
#include <stand.h>
|
||||||
|
|
||||||
|
#include <efi.h>
|
||||||
|
#include <efilib.h>
|
||||||
|
|
||||||
#include "bootstrap.h"
|
#include "bootstrap.h"
|
||||||
#include "../libi386/libi386.h"
|
#include "../libi386/libi386.h"
|
||||||
#include "../btx/lib/btxv86.h"
|
#include "../btx/lib/btxv86.h"
|
||||||
|
|
||||||
extern void __exec(caddr_t addr, ...);
|
extern void __exec(caddr_t addr, ...);
|
||||||
|
extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp);
|
||||||
|
extern int ldr_enter(const char *kernel);
|
||||||
|
|
||||||
static int elf32_exec(struct preloaded_file *amp);
|
static int elf32_exec(struct preloaded_file *amp);
|
||||||
static int elf32_obj_exec(struct preloaded_file *amp);
|
static int elf32_obj_exec(struct preloaded_file *amp);
|
||||||
@@ -72,14 +76,14 @@ elf32_exec(struct preloaded_file *fp)
|
|||||||
ehdr = (Elf_Ehdr *)&(md->md_data);
|
ehdr = (Elf_Ehdr *)&(md->md_data);
|
||||||
|
|
||||||
efi_time_fini();
|
efi_time_fini();
|
||||||
err = bi_load(fp->f_args, &boothowto, &bootdev, &bootinfop, &modulep, &kernend);
|
err = bi_load(fp->f_args, &modulep, &kernend);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
efi_time_init();
|
efi_time_init();
|
||||||
return(err);
|
return(err);
|
||||||
}
|
}
|
||||||
entry = ehdr->e_entry & 0xffffff;
|
entry = ehdr->e_entry & 0xffffff;
|
||||||
|
|
||||||
printf("Start @ 0x%lx ...\n", entry);
|
printf("Start @ 0x%x ...\n", entry);
|
||||||
|
|
||||||
ldr_enter(fp->f_name);
|
ldr_enter(fp->f_name);
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,12 @@ __FBSDID("$FreeBSD$");
|
|||||||
uint32_t __base;
|
uint32_t __base;
|
||||||
struct __v86 __v86;
|
struct __v86 __v86;
|
||||||
|
|
||||||
|
/* XXX - Needed a definition here to implicitly define exit(); do not remove. */
|
||||||
|
static void
|
||||||
|
exit(int x)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
__v86int()
|
__v86int()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ DIRDEPS.amd64+= \
|
|||||||
|
|
||||||
DIRDEPS.arm= ${_sys_boot_fdt} ${_sys_boot_efi}
|
DIRDEPS.arm= ${_sys_boot_fdt} ${_sys_boot_efi}
|
||||||
DIRDEPS.arm64= ${_sys_boot_fdt} ${_sys_boot_efi}
|
DIRDEPS.arm64= ${_sys_boot_fdt} ${_sys_boot_efi}
|
||||||
DIRDEPS.i386= ${DIRDEPS.x86sys} sys/boot/efi/libefi
|
DIRDEPS.i386= ${DIRDEPS.x86sys} ${_sys_boot_efi}
|
||||||
DIRDEPS.powerpc= ${_sys_boot_fdt} sys/boot/libstand32 sys/boot/ofw sys/boot/uboot
|
DIRDEPS.powerpc= ${_sys_boot_fdt} sys/boot/libstand32 sys/boot/ofw sys/boot/uboot
|
||||||
DIRDEPS.pc98= sys/boot/libstand32
|
DIRDEPS.pc98= sys/boot/libstand32
|
||||||
DIRDEPS.sparc64= sys/boot/ofw ${_sys_boot_zfs}
|
DIRDEPS.sparc64= sys/boot/ofw ${_sys_boot_zfs}
|
||||||
|
|||||||
Reference in New Issue
Block a user