Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170831728
D7801.id20110.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D7801.id20110.diff
View Options
Index: sys/boot/efi/Makefile
===================================================================
--- sys/boot/efi/Makefile
+++ sys/boot/efi/Makefile
@@ -14,7 +14,8 @@
.if ${MACHINE_CPUARCH} == "aarch64" || \
${MACHINE_CPUARCH} == "amd64" || \
- ${MACHINE_CPUARCH} == "arm"
+ ${MACHINE_CPUARCH} == "arm" || \
+ ${MACHINE_CPUARCH} == "i386"
SUBDIR+= libefi loader boot1
.endif
Index: sys/boot/efi/loader/arch/i386/efimd.c
===================================================================
--- sys/boot/efi/loader/arch/i386/efimd.c
+++ sys/boot/efi/loader/arch/i386/efimd.c
@@ -48,7 +48,10 @@
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)
{
Index: sys/boot/efi/loader/arch/i386/elf32_freebsd.c
===================================================================
--- sys/boot/efi/loader/arch/i386/elf32_freebsd.c
+++ sys/boot/efi/loader/arch/i386/elf32_freebsd.c
@@ -35,12 +35,16 @@
#include <machine/elf.h>
#include <stand.h>
+#include <efi.h>
+#include <efilib.h>
+
#include "bootstrap.h"
#include "../libi386/libi386.h"
#include "../btx/lib/btxv86.h"
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_obj_exec(struct preloaded_file *amp);
@@ -72,14 +76,14 @@
ehdr = (Elf_Ehdr *)&(md->md_data);
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) {
efi_time_init();
return(err);
}
entry = ehdr->e_entry & 0xffffff;
- printf("Start @ 0x%lx ...\n", entry);
+ printf("Start @ 0x%x ...\n", entry);
ldr_enter(fp->f_name);
Index: sys/boot/efi/loader/arch/i386/exec.c
===================================================================
--- sys/boot/efi/loader/arch/i386/exec.c
+++ sys/boot/efi/loader/arch/i386/exec.c
@@ -36,6 +36,12 @@
uint32_t __base;
struct __v86 __v86;
+/* XXX - Needed for btxld to link the binary; do not remove. */
+static void
+exit(int x)
+{
+}
+
void
__v86int()
{
Index: sys/boot/efi/loader/copy.c
===================================================================
--- sys/boot/efi/loader/copy.c
+++ sys/boot/efi/loader/copy.c
@@ -40,8 +40,12 @@
#include "loader_efi.h"
#ifndef EFI_STAGING_SIZE
+#ifdef __i386__
+#define EFI_STAGING_SIZE 48
+#else
#define EFI_STAGING_SIZE 64
#endif
+#endif
#define STAGE_PAGES EFI_SIZE_TO_PAGES((EFI_STAGING_SIZE) * 1024 * 1024)
Index: sys/boot/ficl/loader.c
===================================================================
--- sys/boot/ficl/loader.c
+++ sys/boot/ficl/loader.c
@@ -800,7 +800,7 @@
}
-#ifdef __i386__
+#if 0
/*
* pcibios-device-count (devid -- count)
*
@@ -1004,7 +1004,7 @@
dictAppendWord(dp, "pnphandlers",ficlPnphandlers, FW_DEFAULT);
#endif
#endif
-#ifdef __i386__
+#if 0
dictAppendWord(dp, "pcibios-device-count", ficlPciBiosCountDevices, FW_DEFAULT);
dictAppendWord(dp, "pcibios-read-config", ficlPciBiosReadConfig, FW_DEFAULT);
dictAppendWord(dp, "pcibios-write-config", ficlPciBiosWriteConfig, FW_DEFAULT);
Index: sys/boot/i386/libi386/libi386.h
===================================================================
--- sys/boot/i386/libi386/libi386.h
+++ sys/boot/i386/libi386/libi386.h
@@ -103,6 +103,7 @@
extern uint32_t high_heap_size; /* extended memory region available */
extern vm_offset_t high_heap_base; /* for use as the heap */
+#if 0
void biospci_detect(void);
int biospci_count_device_type(uint32_t devid);
int biospci_find_devclass(uint32_t class, int index, uint32_t *locator);
@@ -110,6 +111,7 @@
int biospci_write_config(uint32_t locator, int offset, int width, uint32_t val);
int biospci_read_config(uint32_t locator, int offset, int width, uint32_t *val);
uint32_t biospci_locator(int8_t bus, uint8_t device, uint8_t function);
+#endif
void biosacpi_detect(void);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 7, 10:01 PM (14 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38431729
Default Alt Text
D7801.id20110.diff (4 KB)
Attached To
Mode
D7801: Start of EFI32 boot loader support
Attached
Detach File
Event Timeline
Log In to Comment