aboutsummaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2023-03-13 01:41:57 -0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-03-13 20:26:26 +0100
commit5447f965f1e109f7ac9aeb91c0e3906969a4adb8 (patch)
treeb3571bc9da00758100f7bbe8d1a886948933173c /kern
parentbba59e0f7a3cf1a008325b7919e9eb8a170c7c0a (diff)
downloadgnumach-5447f965f1e109f7ac9aeb91c0e3906969a4adb8.tar.gz
gnumach-5447f965f1e109f7ac9aeb91c0e3906969a4adb8.tar.bz2
gnumach-5447f965f1e109f7ac9aeb91c0e3906969a4adb8.zip
Use c_string to define host_get_kernel_version and host_get_kernel_boot_info.
The existing definitions for kernel_version_t and kernel_boot_info_t use (MACH_MSG_TYPE_STRING, length*8) which result in message types that have a single element of 512 or 4096 bytes (set as msgt_size). This results in MiG generating mach_msg_type_long_t. Using c_string has the benefit of moving this size to be defined as msgt_number which doesn't overflow. This will allow us to simplify the 64 bit RPC ABI since all msgt_size can be defined with just 8 bits (as it should be expected). The resulting implementation is the same but we still need to define new RPCs since server and user expect different mach_msg_type_t. Message-Id: <ZA63pS8j9J6NwuXY@jupiter.tail36e24.ts.net>
Diffstat (limited to 'kern')
-rw-r--r--kern/host.c8
-rw-r--r--kern/machine.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/kern/host.c b/kern/host.c
index 7ce8edff..50f58e9c 100644
--- a/kern/host.c
+++ b/kern/host.c
@@ -219,6 +219,14 @@ kern_return_t host_kernel_version(
return KERN_SUCCESS;
}
+/* Same as above */
+kern_return_t host_get_kernel_version(
+ const host_t host,
+ kernel_version_t out_version)
+{
+ return host_kernel_version(host, out_version);
+}
+
/*
* host_processor_sets:
*
diff --git a/kern/machine.c b/kern/machine.c
index bf9677c9..c9e368a0 100644
--- a/kern/machine.c
+++ b/kern/machine.c
@@ -674,3 +674,11 @@ host_get_boot_info(
(void) strncpy(boot_info, src, KERNEL_BOOT_INFO_MAX);
return KERN_SUCCESS;
}
+
+kern_return_t
+host_get_kernel_boot_info(
+ host_t priv_host,
+ kernel_boot_info_t boot_info)
+{
+ return host_get_boot_info(priv_host, boot_info);
+}