summaryrefslogtreecommitdiffstats
path: root/sys/boot/ofw/libofw/libofw.h
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-11-10 19:17:36 +0000
committerjake <jake@FreeBSD.org>2002-11-10 19:17:36 +0000
commit73d398d702d8489985977353b7f67aaabb9d840c (patch)
treeafef4c9c5cb095c3438e4a1874a05286c64fec0e /sys/boot/ofw/libofw/libofw.h
parent1ff96af1eab5b5285540c2bb95862f1687e10252 (diff)
downloadFreeBSD-src-73d398d702d8489985977353b7f67aaabb9d840c.zip
FreeBSD-src-73d398d702d8489985977353b7f67aaabb9d840c.tar.gz
Change the device path representation in libofw to use the full firmware
path, instead of an internal i386 specific one. Don't try to interpret a disklabel in ofw_disk.c, open the partition's device node directly and let the firmware do it. This fixes booting from a partition other than 'a' on sparc64, which is needed to support more installation methods. No objection: ppc
Diffstat (limited to 'sys/boot/ofw/libofw/libofw.h')
-rw-r--r--sys/boot/ofw/libofw/libofw.h43
1 files changed, 4 insertions, 39 deletions
diff --git a/sys/boot/ofw/libofw/libofw.h b/sys/boot/ofw/libofw/libofw.h
index c65c84a..a7d73e6 100644
--- a/sys/boot/ofw/libofw/libofw.h
+++ b/sys/boot/ofw/libofw/libofw.h
@@ -31,57 +31,22 @@
struct ofw_devdesc {
struct devsw *d_dev;
int d_type;
- union {
- struct {
- phandle_t handle; /* OFW handle */
- unsigned long partoff; /* sector offset */
- int unit; /* disk number */
- char path[64]; /* OFW path */
- int slice; /* slice# */
- int partition; /* partition in slice */
- int bsize; /* block size */
- } ofwdisk;
- struct {
- int unit;
- char path[64];
- void *dmabuf;
- } netif;
- } d_kind;
-/*
- * Keeping this around so I know what came from the NetBSD stuff.
- * I've made a wild guess as to what goes where, but I have no idea if it's
- * right.
- *
- * void *dmabuf;
- */
+ phandle_t d_handle;
+ char d_path[256];
};
-#define MAXDEV 31 /* Maximum number of devices. */
-
-/* Known types. Use the same as alpha for consistancy. */
-#define DEVT_NONE 0
-#define DEVT_DISK 1
-#define DEVT_NET 2
-
extern int ofw_getdev(void **vdev, const char *devspec, const char **path);
-extern char *ofw_fmtdev(void *vdev);
-extern int ofw_parseofwdev(struct ofw_devdesc *, const char *devspec);
extern int ofw_setcurrdev(struct env_var *ev, int flags, void *value);
extern struct devsw ofwdisk;
extern struct netif_driver ofwnet;
-void ofwd_enter_dev(const char *);
int ofwn_getunit(const char *);
ssize_t ofw_copyin(const void *src, vm_offset_t dest, const size_t len);
ssize_t ofw_copyout(const vm_offset_t src, void *dest, const size_t len);
ssize_t ofw_readin(const int fd, vm_offset_t dest, const size_t len);
-void ofw_devsearch_init(void);
-int ofw_devsearch(const char *, char *);
-int ofw_devicetype(char *);
-
extern int ofw_boot(void);
extern int ofw_autoload(void);
@@ -99,10 +64,10 @@ extern struct file_format ofw_elf;
extern void reboot(void);
-extern int main(int (*openfirm)(void *));
-
struct ofw_reg
{
cell_t base;
cell_t size;
};
+
+extern int (*openfirmware)(void *);
OpenPOWER on IntegriCloud