From ac1e123e56a2757cb3332e464fff6b23c36fdec1 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Tue, 16 Mar 2021 16:47:15 +1100 Subject: machdev,rump,pci: Rework bootstrap * libmachdev/trivfs_server.c (bootstrapped): Rename to bootstrapping. (trivfs_S_fsys_startup): Call fsys_startup on the bootstrap port. (essential_task): New function. (trivfs_S_fsys_init): Call fsys_init on the bootstrap port. Configure proc. Mark us as essential when bootstrapping even without a devnode. (arrange_shutdown_notification): Do not configure proc. (machdev_trivfs_init): Always get the bootstrap port from the kernel, leave it MACH_PORT_NULL if unavailable. Call fsys_getpriv on it if it is. * pci-arbiter/Makefile (SRCS): Remove startup.c. * pci-arbiter/startup.c: Delete file. * pci-arbiter/startup.h: Delete file. * pci-arbiter/main.c: Do not include "startup.h" (pci_device_shutdown): Do not try to lokup the dosync_handle. (pcifs_startup): Always create the pci_control_port right on the control port. (main): Call machdev_device_init after machdev_trivfs_init. Do not call arrange_shutdown_notification. * rumpdisk/main.c (netfs_server_name): Don't pretend to be the arbiter anymore (main): Call machdev_device_init after machdev_trivfs_init. Message-Id: <20210316054715.788725-1-damien@zamaudio.com> --- rumpdisk/main.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'rumpdisk/main.c') diff --git a/rumpdisk/main.c b/rumpdisk/main.c index a26e17cb..87bc5573 100644 --- a/rumpdisk/main.c +++ b/rumpdisk/main.c @@ -31,11 +31,6 @@ #include #include -/* TODO: Add api to pciaccess to allow selecting backend. - * For now we pretend to be the arbiter and claim x86 method. - */ -char *netfs_server_name = "pci-arbiter"; - mach_port_t bootstrap_resume_task = MACH_PORT_NULL; static const struct argp_option options[] = { @@ -117,8 +112,8 @@ main (int argc, char **argv) } rump_register_block (); - machdev_device_init (); machdev_trivfs_init (bootstrap_resume_task, "rumpdisk", "/dev/rumpdisk", &bootstrap); + machdev_device_init (); err = pthread_create (&t, NULL, machdev_server, NULL); if (err) return err; -- cgit v1.2.3