aboutsummaryrefslogtreecommitdiff
path: root/mach-defpager/setup.c
Commit message (Collapse)AuthorAgeFilesLines
* Only use host_get_kernel_version and default_pager_paging_storage_new in x86_64.Flavio Cruz2023-05-111-4/+6
| | | | | | | | | | Also fixed the implementation of default_pager_paging_storage_new in proxy def pager to call into default_pager_paging_storage_new. We can fast track the simplification of the RPC ABI for x86_64 if we don't have MACH_MSG_TYPE_STRING used in RPCs which forces msgt_size to use more than 8 bits. Message-Id: <ZFsk/W+slpAZyTG1@jupiter.tail36e24.ts.net>
* mach-defpager: Port to x86_64Sergey Bugaev2023-05-101-2/+2
| | | | Message-Id: <20230508213136.608575-32-bugaevc@gmail.com>
* Use c_string for default_pager_filename_t to define a new ↵Flavio Cruz2023-04-251-0/+10
| | | | | | | | | | default_pager_paging_storage RPC. This brings us a bit closer to having all types' msgt_size representable with a single byte. We will be able to avoid mach_msg_type_long_t entirely for x86_64 since mach_msg_type_t can represent long types using a separate field. Message-Id: <ZEdO0Grm2AUw4Tfe@jupiter.tail36e24.ts.net>
* Remove default_pager_paging_file RPC from default pagerFlavio Cruz2023-04-151-50/+0
| | | | | | | | | The default_pager_paging_storage RPC has already it more than 20 years ago. Given that we want to change the type of default_pager_filename_t to use c_string, we can just remove the unused RPC. Tested that swapon/swapoff still work with the new binaries. Message-Id: <ZDoyNOE0XB77d5xj@mars.tail36e24.ts.net>
* Modernize code by removing use of old style definitions.Flavio Cruz2023-04-031-4/+3
| | | | | Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
* Fix const warningsSamuel Thibault2022-01-171-3/+3
| | | | | Now that the RPCs have const, this forces us cleaning our const-meant functions.
* Make RPC input array parameters constSamuel Thibault2022-01-161-2/+2
| | | | | This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server side")
* mach-defpager: Drop kalloc/kfreeSamuel Thibault2021-08-161-5/+5
| | | | | | | | | | | | glibc is removing its malloc hooks, but gnumach now has support for mlockall, which we can just use instead of kalloc/kfree. * mach-defpager/main.c (main): Call mlockall. * mach-defpager/kalloc.c: Remove. * mach-defpager/kalloc.h: Remove. * mach-defpager/default_pager.c: Use malloc/free instead of kalloc/kfree. * mach-defpager/setup.c: Likewise.
* Use our own variant of 'assert' and 'assert_perror'.Justus Winter2017-08-051-8/+8
| | | | | Our variants print stack traces on failures. This will make locating errors much easier.
* mach-defpager: fix local includesJustus Winter2014-03-251-2/+2
| | | | | | * mach-defpager/default_pager.c: Fix local includes. * mach-defpager/main.c: Likewise. * mach-defpager/setup.c: Likewise.
* mach-defpager: fix type of size argumentsJustus Winter2014-03-121-3/+3
| | | | | | | | * mach-defpager/default_pager.c (new_partition): Fix type of bsize. * mach-defpager/file_io.h (page_read_file_direct): Fix type of size argument. (page_write_file_direct): Likewise. * mach-defpager/setup.c (page_read_file_direct): Likewise. (page_write_file_direct): Likewise.
* Remove warnings during compilation.Maksym Planeta2012-03-261-5/+7
| | | | | | | | | | | | | | * mach-defpager/kalloc.c: Added missing prototypes, headers, types. * mach-defpager/wiring.c: Likewise. * mach-defpager/default_pager.c: Likewise. * mach-defpager/main.c: Likewise. * mach-defpager/setup.c: Likewise. (S_default_pager_paging_storage): Fix wrong calling of kfree. * mach-defpager/kalloc.h: New file with prototypes from kalloc.c. * mach-defpager/default_pager.h: New file with prototypes from default_pager.c. * mach-defpager/Makefile (LCLHDRS): Add new header files.
* Remove `serverboot'; fix "make dist" in `mach-defpager'.Ludovic Courtès2011-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * serverboot/default_pager.c, serverboot/kalloc.c, serverboot/queue.h, serverboot/wiring.c, serverboot/wiring.h: Move to `mach-defpager/'. * serverboot/Makefile, serverboot/assert.h, serverboot/bootstrap.c, serverboot/bunzip2.c, serverboot/def_pager_setup.c, serverboot/defs.h, serverboot/dir.h, serverboot/disk_inode.h, serverboot/disk_inode_ffs.h, serverboot/elf-load.c, serverboot/exec.c, serverboot/ext2_file_io.c, serverboot/ffs_compat.c, serverboot/ffs_compat.h, serverboot/ffs_file_io.c, serverboot/file_io.c, serverboot/file_io.h, serverboot/fs.h, serverboot/gets.c, serverboot/gunzip.c, serverboot/load.c, serverboot/mach-exec.h, serverboot/minix_ffs_compat.c, serverboot/minix_ffs_compat.h, serverboot/minix_file_io.c, serverboot/minix_fs.h, serverboot/minix_super.h, serverboot/panic.c, serverboot/strfcns.c: Remove. * mach-defpager/Makefile (LCLHDRS): New variable. (vpath): Remove. (CPPFLAGS): Remove `-I$(srcdir)/../serverboot'. * mach-defpager/setup.c (page_aligned): Make public.
* Fix swap on large devicesJeremie Koenig2010-08-011-9/+9
| | | | | | | | DEV_GET_SIZE values overflow with large devices, rather use DEV_GET_RECORDS. * mach-defpager/setup.c (S_default_pager_paging_storage): Use DEV_GET_RECORDS instead of DEV_GET_SIZE.
* 2007-06-06 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2007-06-061-6/+7
| | | | | | * Makefile: Remove a comment. * setup.c (default_pager_paging_storage): Rename to `S_default_pager_paging_storage'.
* 2002-06-15 Roland McGrath <roland@frob.com>Roland McGrath2002-06-161-3/+7
| | | | | * setup.c (page_write_file_direct): Use proper type for result param of device_write.
* 2002-03-23 Roland McGrath <roland@frob.com>Roland McGrath2002-03-241-1/+6
| | | | | * setup.c (default_pager_paging_storage): Fail if receiver port is not default_pager_default_port.
* * setup.c (page_read_file_direct): Fix logic to find the run thatMark Kettenis2001-06-051-14/+15
| | | | | | | | | contains the data to be read. Use size in bytes instead of blocks when calling device_read. (page_write_file_direct): Fix logic to find the run that contains the data to be written. Pass SIZE_WRITTEN to device_write call instead of &WROTE when writing a whole page. Correctly calculate SEGSIZE.
* 2000-12-28 Roland McGrath <roland@frob.com>Roland McGrath2001-02-281-0/+294
Override the shared code from serverboot for device access with a new, simpler implementation with no filesystem format support. The new code implements the new default_pager_paging_storage RPC to set up paging areas that can be subsets of whole Mach devices, with no Linux signature checking. The compatibility setup entry point works as before on whole devices. * setup.c, file_io.h: New files. * Makefile (SRCS): Remove def_pager_setup.c, file_io.c, strfcns.c, ext2_file_io.c, ffs_file_io.c, ffs_compat.c, minix_file_io.c, minix_ffs_compat.c; add setup.c to replace them all.