aboutsummaryrefslogtreecommitdiff
path: root/libmachdev/trivfs_server.c
Commit message (Collapse)AuthorAgeFilesLines
* libmachdev: Fix non-bootstrap translator startupSamuel Thibault2021-04-041-1/+14
| | | | | * libmachdev/trivfs_server.c (machdev_trivfs_init): Call fsys_getpriv only when bootstrapping.
* machdev: Pass argv through to _hurd_initDamien Zammit2021-04-041-4/+7
| | | | Message-Id: <20210404033750.143411-1-damien@zamaudio.com>
* machdev: Fix parent proc passthrough in fsys_initDamien Zammit2021-03-191-5/+12
| | | | | | | | | | * libmachdev/trivfs_server.c (parent_task): New global variable. (machdev_trivfs_init): Remove parent_task local variable. (trivfs_S_fsys_init): Pass parent's proc port to fsys_init call. Accept EPERM error from proc_mark_important for bootstrap case. Check errors from proc_set_exe call. Message-Id: <20210319021512.823541-1-damien@zamaudio.com>
* machdev,rump,pci: Rework bootstrapDamien Zammit2021-03-161-25/+76
| | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* libmachdev: pass shutdown handle to shutdown methodDamien Zammit2021-03-071-1/+1
| | | | | | | | | | | | * libmachdev/machdev-device_emul.h (struct machdev_device_emulation_ops): Add shutdown method. * libmachdev/ds_routines.c (machdev_device_shutdown): Take dosync_handle handle and pass it to shutdown method. * libmachdev/machdev.h (machdev_device_shutdown): Update prototype. * libmachdev/trivfs_server.c (S_startup_dosync): Pass shutdown handle to machdev_device_shutdown call. * rumpdisk/block-rump.c (rumpdisk_device_shutdown): Take dosync_handle parameter.
* libmachdev: Spawn a thread for server loop so main pathway can continueDamien Zammit2021-03-021-7/+23
| | | | Message-Id: <20210302114137.592230-3-damien@zamaudio.com>
* libmachdev: Fix spurious send referenceSamuel Thibault2020-11-151-1/+1
| | | | | * libmachdev/trivfs_server.c (trivfs_S_fsys_getpriv): Move the just-copied send rights instead of copying them again.
* libmachdev: Make comments more preciseSamuel Thibault2020-11-151-2/+2
|
* libmachdev: Fix warningSamuel Thibault2020-11-151-0/+1
| | | | * libmachdev/trivfs_server.c: Include <mach/i386/mach_i386.h>.
* libmachdev: Avoid conflating translator name and pathSamuel Thibault2020-11-141-3/+4
| | | | | | | | | | | | bootstrap translators may not wish to appear in the FS, and the name of the translator does not have to match the path where it is getting installed. * libmachdev/machdev.h (machdev_trivfs_init): Add path parameter. * libmachdev/trivfs_server.c (machdev_trivfs_init): Add path parameter, set devnode only if it is not NULL. (trivfs_S_fsys_init): Only call install_as_translator when devnode is not NULL. * /rumpdisk/main.c (main): Add path parameter.
* libmachdev: Support installing translator in the FSDamien Zammit2020-11-141-23/+62
| | | | | | | | | | | | | | | | | */libmachdev/trivfs_server.c (machdev_ctl): Rename to control_port. (trivfs_S_fsys_init): Fix accordingly. (control): New variable. (bootstrapped, underlying, devnode): New variables. (install_as_translator): New function. (trivfs_S_fsys_init): When bootstrapping, call install_as_translator. (machdev_trivfs_init): Create one port of the control class. (trivfs_S_fsys_getpriv): Use ports_get_send_right on the control port instead of creating another one. (resume_bootstrap_server): Use ports_get_send_right on the control port instead of creating another one. (machdev_trivfs_init): When bootstrapping, Use our control port as fsys.
* libmachdev: Introduce startup notification for clean rumpdisk shutdownDamien Zammit2020-08-021-3/+115
| | | | Message-Id: <20200801050538.273196-1-damien@zamaudio.com>
* libmachdev: simplify source codeSamuel Thibault2020-07-251-19/+8
| | | | | * libmachdev/trivfs_server.c (machdev_is_master_device): Simplify source code.
* libmachdev: Implement S_i386_io_perm_createDamien Zammit2020-07-251-0/+60
| | | | | | | | Now that machdev redirects the device master port, it has to implement the i386 permission RPCs on it. Message-Id: <20200725011847.186969-2-damien@zamaudio.com> Message-Id: <20200725011847.186969-3-damien@zamaudio.com>
* libmachdev: Add resume for bootstrap serverDamien Zammit2020-07-251-20/+134
| | | | | | | | | | | | machdev users can now pass along a port to the next translator in the bootstrap chain (bootstrap_resume_task), that they'll get from their command line set by the bootloader. machdev will then call task_resume on it as appropriate. It will also have the opportunity to get fsys_getpriv calls, and thus redirect the device master port, thus having the opportunity to expose its devices on the device master port, as if they were handled by the kernel. Message-Id: <20200725011847.186969-1-damien@zamaudio.com>
* libmachdev: Add common machdevZheng Da2020-03-291-0/+192
* libmachdev: New directory.