summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2016-10-14 16:23:12 +0000
committerWarner Losh <imp@FreeBSD.org>2016-10-14 16:23:12 +0000
commita2cb5fddcd604853b8fa3668ae9dab0df5dcacb4 (patch)
tree1b0ae94018d5efd82956e286063a5972b89bbff5
parentf36f940494ec8e3df5a51d5789bf777f45bf651b (diff)
Notes
-rw-r--r--sys/boot/common/bootstrap.h2
-rw-r--r--sys/boot/common/pnp.c47
-rw-r--r--sys/boot/efi/loader/Makefile1
-rw-r--r--sys/boot/efi/loader/arch/amd64/ldscript.amd645
-rw-r--r--sys/boot/efi/loader/arch/arm/ldscript.arm5
-rw-r--r--sys/boot/efi/loader/arch/arm64/ldscript.arm645
-rw-r--r--sys/boot/efi/loader/arch/i386/ldscript.i3865
-rw-r--r--sys/boot/ficl/ficl.h7
-rw-r--r--sys/boot/ficl/i386/sysdep.c18
-rw-r--r--sys/boot/ficl/loader.c195
-rw-r--r--sys/boot/i386/libi386/Makefile3
-rw-r--r--sys/boot/i386/libi386/biospci.c158
-rw-r--r--sys/boot/i386/libi386/libi386.h8
-rw-r--r--sys/boot/mips/beri/loader/loader.ldscript4
-rw-r--r--sys/boot/pc98/libpc98/Makefile3
15 files changed, 262 insertions, 204 deletions
diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h
index 1ce70bf4df65..6bc6e5b33400 100644
--- a/sys/boot/common/bootstrap.h
+++ b/sys/boot/common/bootstrap.h
@@ -142,8 +142,6 @@ struct pnpinfo
STAILQ_HEAD(pnpinfo_stql, pnpinfo);
-extern struct pnpinfo_stql pnp_devices;
-
extern struct pnphandler *pnphandlers[]; /* provided by MD code */
void pnp_addident(struct pnpinfo *pi, char *ident);
diff --git a/sys/boot/common/pnp.c b/sys/boot/common/pnp.c
index 80485f04dfef..f7e1c23e5dfc 100644
--- a/sys/boot/common/pnp.c
+++ b/sys/boot/common/pnp.c
@@ -17,8 +17,9 @@ __FBSDID("$FreeBSD$");
#include <stand.h>
#include <string.h>
#include <bootstrap.h>
+#include "ficl.h"
-struct pnpinfo_stql pnp_devices;
+static struct pnpinfo_stql pnp_devices;
static int pnp_devices_initted = 0;
static void pnp_discard(void);
@@ -185,3 +186,47 @@ pnp_eisaformat(u_int8_t *data)
return(idbuf);
}
+void
+ficlPnpdevices(FICL_VM *pVM)
+{
+ static int pnp_devices_initted = 0;
+#if FICL_ROBUST > 1
+ vmCheckStack(pVM, 0, 1);
+#endif
+
+ if(!pnp_devices_initted) {
+ STAILQ_INIT(&pnp_devices);
+ pnp_devices_initted = 1;
+ }
+
+ stackPushPtr(pVM->pStack, &pnp_devices);
+
+ return;
+}
+
+void
+ficlPnphandlers(FICL_VM *pVM)
+{
+#if FICL_ROBUST > 1
+ vmCheckStack(pVM, 0, 1);
+#endif
+
+ stackPushPtr(pVM->pStack, pnphandlers);
+
+ return;
+}
+
+/*
+ * Glue function to add the appropriate forth words to access pnp BIOS
+ * functionality.
+ */
+static void ficlCompilePnp(FICL_SYSTEM *pSys)
+{
+ FICL_DICT *dp = pSys->dp;
+ assert (dp);
+
+ dictAppendWord(dp, "pnpdevices",ficlPnpdevices, FW_DEFAULT);
+ dictAppendWord(dp, "pnphandlers",ficlPnphandlers, FW_DEFAULT);
+}
+
+FICL_COMPILE_SET(ficlCompilePnp);
diff --git a/sys/boot/efi/loader/Makefile b/sys/boot/efi/loader/Makefile
index 597c53ca9048..d9d3532014fd 100644
--- a/sys/boot/efi/loader/Makefile
+++ b/sys/boot/efi/loader/Makefile
@@ -145,6 +145,7 @@ loader.efi: ${PROG}
${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel.dyn \
-j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
+ -j set_Xficl_compile_set \
--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
LIBEFI= ${.OBJDIR}/../libefi/libefi.a
diff --git a/sys/boot/efi/loader/arch/amd64/ldscript.amd64 b/sys/boot/efi/loader/arch/amd64/ldscript.amd64
index 53d9d760e0d0..874df9b08f9e 100644
--- a/sys/boot/efi/loader/arch/amd64/ldscript.amd64
+++ b/sys/boot/efi/loader/arch/amd64/ldscript.amd64
@@ -40,6 +40,11 @@ SECTIONS
*(set_Xcommand_set)
__stop_set_Xcommand_set = .;
}
+ set_Xficl_compile_set : {
+ __start_set_Xficl_compile_set = .;
+ *(set_Xficl_compile_set)
+ __stop_set_Xficl_compile_set = .;
+ }
. = ALIGN(4096);
__gp = .;
.sdata : {
diff --git a/sys/boot/efi/loader/arch/arm/ldscript.arm b/sys/boot/efi/loader/arch/arm/ldscript.arm
index 8b4a6dc64b36..7ff4cc6a4cb2 100644
--- a/sys/boot/efi/loader/arch/arm/ldscript.arm
+++ b/sys/boot/efi/loader/arch/arm/ldscript.arm
@@ -47,6 +47,11 @@ SECTIONS
*(set_Xcommand_set)
__stop_set_Xcommand_set = .;
}
+ set_Xficl_compile_set : {
+ __start_set_Xficl_compile_set = .;
+ *(set_Xficl_compile_set)
+ __stop_set_Xficl_compile_set = .;
+ }
__gp = .;
.plt : { *(.plt) }
.dynamic : { *(.dynamic) }
diff --git a/sys/boot/efi/loader/arch/arm64/ldscript.arm64 b/sys/boot/efi/loader/arch/arm64/ldscript.arm64
index 29b807b25078..685c0967840d 100644
--- a/sys/boot/efi/loader/arch/arm64/ldscript.arm64
+++ b/sys/boot/efi/loader/arch/arm64/ldscript.arm64
@@ -43,6 +43,11 @@ SECTIONS
*(set_Xcommand_set)
__stop_set_Xcommand_set = .;
}
+ set_Xficl_compile_set : {
+ __start_set_Xficl_compile_set = .;
+ *(set_Xficl_compile_set)
+ __stop_set_Xficl_compile_set = .;
+ }
. = ALIGN(16);
__gp = .;
.sdata : {
diff --git a/sys/boot/efi/loader/arch/i386/ldscript.i386 b/sys/boot/efi/loader/arch/i386/ldscript.i386
index 4b28c104a3fe..e17212a1bddd 100644
--- a/sys/boot/efi/loader/arch/i386/ldscript.i386
+++ b/sys/boot/efi/loader/arch/i386/ldscript.i386
@@ -35,6 +35,11 @@ SECTIONS
*(set_Xcommand_set)
__stop_set_Xcommand_set = .;
}
+ set_Xficl_compile_set : {
+ __start_set_Xficl_compile_set = .;
+ *(set_Xficl_compile_set)
+ __stop_set_Xficl_compile_set = .;
+ }
. = ALIGN(4096);
__gp = .;
.sdata : {
diff --git a/sys/boot/ficl/ficl.h b/sys/boot/ficl/ficl.h
index 6fe9e10aba20..8829ccea9668 100644
--- a/sys/boot/ficl/ficl.h
+++ b/sys/boot/ficl/ficl.h
@@ -1150,6 +1150,13 @@ typedef struct ficlFILE
} ficlFILE;
#endif
+#include <sys/linker_set.h>
+
+typedef void ficlCompileFcn(FICL_SYSTEM *);
+#define FICL_COMPILE_SET(func) \
+ DATA_SET(Xficl_compile_set, func)
+SET_DECLARE(Xficl_compile_set, ficlCompileFcn);
+
#ifdef __cplusplus
}
#endif
diff --git a/sys/boot/ficl/i386/sysdep.c b/sys/boot/ficl/i386/sysdep.c
index df0891ddd5d0..ea594e63808f 100644
--- a/sys/boot/ficl/i386/sysdep.c
+++ b/sys/boot/ficl/i386/sysdep.c
@@ -81,7 +81,6 @@ void ficlFree (void *p)
}
#ifndef TESTMAIN
-#ifdef __i386__
/*
* outb ( port# c -- )
* Store a byte to I/O port number port#
@@ -111,7 +110,22 @@ ficlInb(FICL_VM *pVM)
c=inb(port);
stackPushINT(pVM->pStack,c);
}
-#endif
+
+/*
+ * Glue function to add the appropriate forth words to access x86 special cpu
+ * functionality.
+ */
+static void ficlCompileCpufunc(FICL_SYSTEM *pSys)
+{
+ FICL_DICT *dp = pSys->dp;
+ assert (dp);
+
+ dictAppendWord(dp, "outb", ficlOutb, FW_DEFAULT);
+ dictAppendWord(dp, "inb", ficlInb, FW_DEFAULT);
+}
+
+FICL_COMPILE_SET(ficlCompileCpufunc);
+
#endif
/*
diff --git a/sys/boot/ficl/loader.c b/sys/boot/ficl/loader.c
index 04e555c32803..197f15bf38c3 100644
--- a/sys/boot/ficl/loader.c
+++ b/sys/boot/ficl/loader.c
@@ -287,43 +287,6 @@ ficlFindfile(FICL_VM *pVM)
return;
}
-#ifndef TESTMAIN
-#ifdef HAVE_PNP
-
-void
-ficlPnpdevices(FICL_VM *pVM)
-{
- static int pnp_devices_initted = 0;
-#if FICL_ROBUST > 1
- vmCheckStack(pVM, 0, 1);
-#endif
-
- if(!pnp_devices_initted) {
- STAILQ_INIT(&pnp_devices);
- pnp_devices_initted = 1;
- }
-
- stackPushPtr(pVM->pStack, &pnp_devices);
-
- return;
-}
-
-void
-ficlPnphandlers(FICL_VM *pVM)
-{
-#if FICL_ROBUST > 1
- vmCheckStack(pVM, 0, 1);
-#endif
-
- stackPushPtr(pVM->pStack, pnphandlers);
-
- return;
-}
-
-#endif
-
-#endif /* ndef TESTMAIN */
-
void
ficlCcall(FICL_VM *pVM)
{
@@ -800,141 +763,6 @@ static void fkey(FICL_VM *pVM)
}
-#ifdef __i386__
-/*
- * pcibios-device-count (devid -- count)
- *
- * Returns the PCI BIOS' count of how many devices matching devid are in the system.
- * devid is the 32-bit vendor + device.
- */
-static void
-ficlPciBiosCountDevices(FICL_VM *pVM)
-{
- uint32_t devid;
- int i;
-
- devid = stackPopINT(pVM->pStack);
-
- i = biospci_count_device_type(devid);
-
- stackPushINT(pVM->pStack, i);
-}
-
-/*
- * pcibios-write-config (locator offset width value -- )
- *
- * Writes the specified config register.
- * Locator is bus << 8 | device << 3 | fuction
- * offset is the pci config register
- * width is 0 for byte, 1 for word, 2 for dword
- * value is the value to write
- */
-static void
-ficlPciBiosWriteConfig(FICL_VM *pVM)
-{
- uint32_t value, width, offset, locator;
-
- value = stackPopINT(pVM->pStack);
- width = stackPopINT(pVM->pStack);
- offset = stackPopINT(pVM->pStack);
- locator = stackPopINT(pVM->pStack);
-
- biospci_write_config(locator, offset, width, value);
-}
-
-/*
- * pcibios-read-config (locator offset width -- value)
- *
- * Reads the specified config register.
- * Locator is bus << 8 | device << 3 | fuction
- * offset is the pci config register
- * width is 0 for byte, 1 for word, 2 for dword
- * value is the value to read from the register
- */
-static void
-ficlPciBiosReadConfig(FICL_VM *pVM)
-{
- uint32_t value, width, offset, locator;
-
- width = stackPopINT(pVM->pStack);
- offset = stackPopINT(pVM->pStack);
- locator = stackPopINT(pVM->pStack);
-
- biospci_read_config(locator, offset, width, &value);
-
- stackPushINT(pVM->pStack, value);
-}
-
-/*
- * pcibios-find-devclass (class index -- locator)
- *
- * Finds the index'th instance of class in the pci tree.
- * must be an exact match.
- * class is the class to search for.
- * index 0..N (set to 0, increment until error)
- *
- * Locator is bus << 8 | device << 3 | fuction (or -1 on error)
- */
-static void
-ficlPciBiosFindDevclass(FICL_VM *pVM)
-{
- uint32_t index, class, locator;
-
- index = stackPopINT(pVM->pStack);
- class = stackPopINT(pVM->pStack);
-
- if (biospci_find_devclass(class, index, &locator))
- locator = 0xffffffff;
-
- stackPushINT(pVM->pStack, locator);
-}
-
-/*
- * pcibios-find-device(devid index -- locator)
- *
- * Finds the index'th instance of devid in the pci tree.
- * must be an exact match.
- * class is the class to search for.
- * index 0..N (set to 0, increment until error)
- *
- * Locator is bus << 8 | device << 3 | fuction (or -1 on error)
- */
-static void
-ficlPciBiosFindDevice(FICL_VM *pVM)
-{
- uint32_t index, devid, locator;
-
- index = stackPopINT(pVM->pStack);
- devid = stackPopINT(pVM->pStack);
-
- if (biospci_find_device(devid, index, &locator))
- locator = 0xffffffff;
-
- stackPushINT(pVM->pStack, locator);
-}
-
-/*
- * pcibios-find-device(bus device function -- locator)
- *
- * converts bus, device, function to locator.
- *
- * Locator is bus << 8 | device << 3 | fuction
- */
-static void
-ficlPciBiosLocator(FICL_VM *pVM)
-{
- uint32_t bus, device, function, locator;
-
- function = stackPopINT(pVM->pStack);
- device = stackPopINT(pVM->pStack);
- bus = stackPopINT(pVM->pStack);
-
- locator = biospci_locator(bus, device, function);
-
- stackPushINT(pVM->pStack, locator);
-}
-#endif
-
/*
** Retrieves free space remaining on the dictionary
*/
@@ -963,6 +791,7 @@ static void ficlDictIncrease(FICL_VM *pVM)
**************************************************************************/
void ficlCompilePlatform(FICL_SYSTEM *pSys)
{
+ ficlCompileFcn **fnpp;
FICL_DICT *dp = pSys->dp;
assert (dp);
@@ -994,24 +823,10 @@ void ficlCompilePlatform(FICL_SYSTEM *pSys)
dictAppendWord(dp, "ccall", ficlCcall, FW_DEFAULT);
dictAppendWord(dp, "uuid-from-string", ficlUuidFromString, FW_DEFAULT);
dictAppendWord(dp, "uuid-to-string", ficlUuidToString, FW_DEFAULT);
-#ifndef TESTMAIN
-#ifdef __i386__
- dictAppendWord(dp, "outb", ficlOutb, FW_DEFAULT);
- dictAppendWord(dp, "inb", ficlInb, FW_DEFAULT);
-#endif
-#ifdef HAVE_PNP
- dictAppendWord(dp, "pnpdevices",ficlPnpdevices, FW_DEFAULT);
- dictAppendWord(dp, "pnphandlers",ficlPnphandlers, FW_DEFAULT);
-#endif
-#endif
-#ifdef __i386__
- dictAppendWord(dp, "pcibios-device-count", ficlPciBiosCountDevices, FW_DEFAULT);
- dictAppendWord(dp, "pcibios-read-config", ficlPciBiosReadConfig, FW_DEFAULT);
- dictAppendWord(dp, "pcibios-write-config", ficlPciBiosWriteConfig, FW_DEFAULT);
- dictAppendWord(dp, "pcibios-find-devclass", ficlPciBiosFindDevclass, FW_DEFAULT);
- dictAppendWord(dp, "pcibios-find-device", ficlPciBiosFindDevice, FW_DEFAULT);
- dictAppendWord(dp, "pcibios-locator", ficlPciBiosLocator, FW_DEFAULT);
-#endif
+
+ SET_FOREACH(fnpp, Xficl_compile_set) {
+ (*fnpp)(pSys);
+ }
#if defined(PC98)
ficlSetEnv(pSys, "arch-pc98", FICL_TRUE);
diff --git a/sys/boot/i386/libi386/Makefile b/sys/boot/i386/libi386/Makefile
index f1c55f19beae..88c1c07ab486 100644
--- a/sys/boot/i386/libi386/Makefile
+++ b/sys/boot/i386/libi386/Makefile
@@ -54,7 +54,8 @@ CFLAGS+= -DTERM_EMU
# XXX: make alloca() useable
CFLAGS+= -Dalloca=__builtin_alloca
-CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../common \
+CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 \
+ -I${.CURDIR}/../../common -I${.CURDIR}/../common \
-I${.CURDIR}/../btx/lib \
-I${.CURDIR}/../../../contrib/dev/acpica/include \
-I${.CURDIR}/../../.. -I.
diff --git a/sys/boot/i386/libi386/biospci.c b/sys/boot/i386/libi386/biospci.c
index 196590e1bf97..c6e553800248 100644
--- a/sys/boot/i386/libi386/biospci.c
+++ b/sys/boot/i386/libi386/biospci.c
@@ -1,5 +1,6 @@
/*-
* Copyright (c) 1998 Michael Smith <msmith@freebsd.org>
+ * Copyright (c) 2016 Netflix, Inc
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -37,6 +38,7 @@ __FBSDID("$FreeBSD$");
#include <isapnp.h>
#include <btxv86.h>
#include "libi386.h"
+#include "ficl.h"
/*
* Stupid PCI BIOS interface doesn't let you simply enumerate everything
@@ -338,7 +340,7 @@ biospci_find_devclass(uint32_t class, int index, uint32_t *locator)
return (0);
}
-int
+static int
biospci_find_device(uint32_t devid, int index, uint32_t *locator)
{
v86.ctl = V86_FLAGS;
@@ -407,7 +409,7 @@ biospci_locator(int8_t bus, uint8_t device, uint8_t function)
* Counts the number of instances of devid we have in the system, as least as
* far as the PCI BIOS is able to tell.
*/
-int
+static int
biospci_count_device_type(uint32_t devid)
{
int i;
@@ -426,3 +428,155 @@ biospci_count_device_type(uint32_t devid)
}
return i;
}
+
+/*
+ * pcibios-device-count (devid -- count)
+ *
+ * Returns the PCI BIOS' count of how many devices matching devid are in the system.
+ * devid is the 32-bit vendor + device.
+ */
+static void
+ficlPciBiosCountDevices(FICL_VM *pVM)
+{
+ uint32_t devid;
+ int i;
+
+ devid = stackPopINT(pVM->pStack);
+
+ i = biospci_count_device_type(devid);
+
+ stackPushINT(pVM->pStack, i);
+}
+
+/*
+ * pcibios-write-config (locator offset width value -- )
+ *
+ * Writes the specified config register.
+ * Locator is bus << 8 | device << 3 | fuction
+ * offset is the pci config register
+ * width is 0 for byte, 1 for word, 2 for dword
+ * value is the value to write
+ */
+static void
+ficlPciBiosWriteConfig(FICL_VM *pVM)
+{
+ uint32_t value, width, offset, locator;
+
+ value = stackPopINT(pVM->pStack);
+ width = stackPopINT(pVM->pStack);
+ offset = stackPopINT(pVM->pStack);
+ locator = stackPopINT(pVM->pStack);
+
+ biospci_write_config(locator, offset, width, value);
+}
+
+/*
+ * pcibios-read-config (locator offset width -- value)
+ *
+ * Reads the specified config register.
+ * Locator is bus << 8 | device << 3 | fuction
+ * offset is the pci config register
+ * width is 0 for byte, 1 for word, 2 for dword
+ * value is the value to read from the register
+ */
+static void
+ficlPciBiosReadConfig(FICL_VM *pVM)
+{
+ uint32_t value, width, offset, locator;
+
+ width = stackPopINT(pVM->pStack);
+ offset = stackPopINT(pVM->pStack);
+ locator = stackPopINT(pVM->pStack);
+
+ biospci_read_config(locator, offset, width, &value);
+
+ stackPushINT(pVM->pStack, value);
+}
+
+/*
+ * pcibios-find-devclass (class index -- locator)
+ *
+ * Finds the index'th instance of class in the pci tree.
+ * must be an exact match.
+ * class is the class to search for.
+ * index 0..N (set to 0, increment until error)
+ *
+ * Locator is bus << 8 | device << 3 | fuction (or -1 on error)
+ */
+static void
+ficlPciBiosFindDevclass(FICL_VM *pVM)
+{
+ uint32_t index, class, locator;
+
+ index = stackPopINT(pVM->pStack);
+ class = stackPopINT(pVM->pStack);
+
+ if (biospci_find_devclass(class, index, &locator))
+ locator = 0xffffffff;
+
+ stackPushINT(pVM->pStack, locator);
+}
+
+/*
+ * pcibios-find-device(devid index -- locator)
+ *
+ * Finds the index'th instance of devid in the pci tree.
+ * must be an exact match.
+ * class is the class to search for.
+ * index 0..N (set to 0, increment until error)
+ *
+ * Locator is bus << 8 | device << 3 | fuction (or -1 on error)
+ */
+static void
+ficlPciBiosFindDevice(FICL_VM *pVM)
+{
+ uint32_t index, devid, locator;
+
+ index = stackPopINT(pVM->pStack);
+ devid = stackPopINT(pVM->pStack);
+
+ if (biospci_find_device(devid, index, &locator))
+ locator = 0xffffffff;
+
+ stackPushINT(pVM->pStack, locator);
+}
+
+/*
+ * pcibios-find-device(bus device function -- locator)
+ *
+ * converts bus, device, function to locator.
+ *
+ * Locator is bus << 8 | device << 3 | fuction
+ */
+static void
+ficlPciBiosLocator(FICL_VM *pVM)
+{
+ uint32_t bus, device, function, locator;
+
+ function = stackPopINT(pVM->pStack);
+ device = stackPopINT(pVM->pStack);
+ bus = stackPopINT(pVM->pStack);
+
+ locator = biospci_locator(bus, device, function);
+
+ stackPushINT(pVM->pStack, locator);
+}
+
+/*
+ * Glue function to add the appropriate forth words to access pci bios
+ * functionality.
+ */
+static void ficlCompilePciBios(FICL_SYSTEM *pSys)
+{
+ FICL_DICT *dp = pSys->dp;
+ assert (dp);
+
+ dictAppendWord(dp, "pcibios-device-count", ficlPciBiosCountDevices, FW_DEFAULT);
+ dictAppendWord(dp, "pcibios-read-config", ficlPciBiosReadConfig, FW_DEFAULT);
+ dictAppendWord(dp, "pcibios-write-config", ficlPciBiosWriteConfig, FW_DEFAULT);
+ dictAppendWord(dp, "pcibios-find-devclass", ficlPciBiosFindDevclass, FW_DEFAULT);
+ dictAppendWord(dp, "pcibios-find-device", ficlPciBiosFindDevice, FW_DEFAULT);
+ dictAppendWord(dp, "pcibios-locator", ficlPciBiosLocator, FW_DEFAULT);
+}
+
+FICL_COMPILE_SET(ficlCompilePciBios);
diff --git a/sys/boot/i386/libi386/libi386.h b/sys/boot/i386/libi386/libi386.h
index 839745d67abd..76f02718ccdb 100644
--- a/sys/boot/i386/libi386/libi386.h
+++ b/sys/boot/i386/libi386/libi386.h
@@ -104,12 +104,10 @@ extern uint32_t high_heap_size; /* extended memory region available */
extern vm_offset_t high_heap_base; /* for use as the heap */
void biospci_detect(void);
-int biospci_count_device_type(uint32_t devid);
-int biospci_find_devclass(uint32_t class, int index, uint32_t *locator);
-int biospci_find_device(uint32_t devid, int index, uint32_t *locator);
-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);
+int biospci_find_devclass(uint32_t class, int index, uint32_t *locator);
+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);
+int biospci_write_config(uint32_t locator, int offset, int width, uint32_t val);
void biosacpi_detect(void);
diff --git a/sys/boot/mips/beri/loader/loader.ldscript b/sys/boot/mips/beri/loader/loader.ldscript
index b4e804738dc3..f3d286ae61e4 100644
--- a/sys/boot/mips/beri/loader/loader.ldscript
+++ b/sys/boot/mips/beri/loader/loader.ldscript
@@ -65,6 +65,10 @@ SECTIONS
__start_set_Xcommand_set = .;
KEEP(*(set_Xcommand_set))
__stop_set_Xcommand_set = .;
+
+ __start_set_Xficl_compile_set = .;
+ KEEP(*(set_Xficl_compile_set))
+ __stop_set_Xficl_compile_set = .;
}
.data ALIGN(0x10): { *(.data*)}
.bss ALIGN(0x10): { *(.bss*) }
diff --git a/sys/boot/pc98/libpc98/Makefile b/sys/boot/pc98/libpc98/Makefile
index 6b11de9f6999..f3e27a4c679d 100644
--- a/sys/boot/pc98/libpc98/Makefile
+++ b/sys/boot/pc98/libpc98/Makefile
@@ -37,7 +37,8 @@ CFLAGS+= -DTERM_EMU
# XXX: make alloca() useable
CFLAGS+= -Dalloca=__builtin_alloca
-CFLAGS+= -I${.CURDIR}/../../common \
+CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 \
+ -I${.CURDIR}/../../common \
-I${.CURDIR}/../btx/lib \
-I${.CURDIR}/../../i386/libi386 \
-I${.CURDIR}/../../.. -I.