diff options
author | Luca Dariz <luca@orpolo.org> | 2022-04-03 16:59:55 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-27 22:19:18 +0200 |
commit | 3e1702a65fb3caf50c8d09a1b383b0056a5efc82 (patch) | |
tree | a4f687afd3a455bd664daeddf947492fabd16745 /include/mach | |
parent | e2f1d502a5a5ab6a8885cc518ed254c79f7ab27c (diff) | |
download | gnumach-3e1702a65fb3caf50c8d09a1b383b0056a5efc82.tar.gz gnumach-3e1702a65fb3caf50c8d09a1b383b0056a5efc82.tar.bz2 gnumach-3e1702a65fb3caf50c8d09a1b383b0056a5efc82.zip |
add rpc_versions for vm types
* vm_types.h: add new types and conversion functions
* mach_types.defs: adapt vm types depending on kernel user/server
* vm_info.h: adapt rpc structure to have uniformly-sized members also
on 64-bit
* x86_64/configfrag.c: add new option to select the user-space variant.
Note that with this change the user-space interface is somehow fixed,
i.e. it can't support 32-bit and 64-bit tasks at the same time.
If this would be needed at some point, this change needs to be reworked.
Signed-off-by: Luca Dariz <luca@orpolo.org>
Message-Id: <20220403145955.120742-3-luca@orpolo.org>
Diffstat (limited to 'include/mach')
-rw-r--r-- | include/mach/mach_types.defs | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/include/mach/mach_types.defs b/include/mach/mach_types.defs index a0e9241c..a271d597 100644 --- a/include/mach/mach_types.defs +++ b/include/mach/mach_types.defs @@ -110,9 +110,34 @@ type ipc_space_t = mach_port_t #endif /* KERNEL_SERVER */ ; -type vm_address_t = natural_t; -type vm_offset_t = natural_t; -type vm_size_t = natural_t; +#if defined(KERNEL_SERVER) && defined(USER32) +type rpc_vm_size_t = uint32_t; +#else /* KERNEL_SERVER and USER32 */ +#if defined(__x86_64__) +type rpc_vm_size_t = uint64_t; +#else /* __x86_64__ */ +type rpc_vm_size_t = uint32_t; +#endif /* __x86_64__ */ +#endif /* KERNEL_SERVER and USER32 */ + +type vm_address_t = rpc_vm_size_t +#if defined(KERNEL_SERVER) || defined(KERNEL_USER) + intran: vm_address_t convert_vm_from_user(rpc_vm_address_t) + outtran: rpc_vm_address_t convert_vm_to_user(vm_address_t) +#endif + ; +type vm_offset_t = rpc_vm_size_t +#if defined(KERNEL_SERVER) || defined(KERNEL_USER) + intran: vm_offset_t convert_vm_from_user(rpc_vm_offset_t) + outtran: rpc_vm_offset_t convert_vm_to_user(vm_offset_t) +#endif + ; +type vm_size_t = rpc_vm_size_t +#if defined(KERNEL_SERVER) || defined(KERNEL_USER) + intran: vm_size_t convert_vm_from_user(rpc_vm_size_t) + outtran: rpc_vm_size_t convert_vm_to_user(vm_size_t) +#endif +; type vm_prot_t = int; type vm_inherit_t = int; type vm_statistics_data_t = struct[13] of integer_t; |