From c5a3ba64c758bb76423532a4aeabf0b9c87d5dd7 Mon Sep 17 00:00:00 2001 From: Ariel Abreu Date: Tue, 1 Sep 2020 10:04:09 -0400 Subject: [PATCH] Update stubs for updated IOKit --- src/IORegistryEntry.mm | 2 +- src/ServiceRegistry.mm | 2 +- src/stubs-powermanagement.c | 21 +++++++++++++++++-- src/stubs.c | 40 +++++++++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 4 deletions(-) diff --git a/src/IORegistryEntry.mm b/src/IORegistryEntry.mm index 6a525fb..50c10fe 100644 --- a/src/IORegistryEntry.mm +++ b/src/IORegistryEntry.mm @@ -1,6 +1,6 @@ #include "IORegistryEntry.h" #include -#include +#include #include #include #include diff --git a/src/ServiceRegistry.mm b/src/ServiceRegistry.mm index b4d0327..aaed046 100644 --- a/src/ServiceRegistry.mm +++ b/src/ServiceRegistry.mm @@ -19,7 +19,7 @@ #include "iokitd.h" #include "ServiceRegistry.h" -#include +#include #include #include #include diff --git a/src/stubs-powermanagement.c b/src/stubs-powermanagement.c index 5a44d9c..a568ecc 100644 --- a/src/stubs-powermanagement.c +++ b/src/stubs-powermanagement.c @@ -142,6 +142,7 @@ kern_return_t _io_pm_assertion_set_properties mach_msg_type_number_t propsCnt, int *disableAppSleep, int *enableAppSleep, + int *enTrIntensity, int *return_code ) { @@ -244,7 +245,7 @@ kern_return_t _io_pm_get_uuid kern_return_t _io_pm_connection_create ( mach_port_t server, - mach_port_t task_in, + audit_token_t token, string_t name, int interests, uint32_t *connection_id, @@ -261,6 +262,7 @@ kern_return_t _io_pm_connection_create kern_return_t _io_pm_connection_schedule_notification ( mach_port_t server, + audit_token_t token, uint32_t connection_id, mach_port_t notify_port, int disable, @@ -291,6 +293,7 @@ kern_return_t _io_pm_connection_release kern_return_t _io_pm_connection_acknowledge_event ( mach_port_t server, + audit_token_t token, uint32_t connection_id, int messageToken, vm_offset_t options, @@ -370,6 +373,7 @@ kern_return_t _io_ps_release_pspowersource kern_return_t _io_ps_copy_powersources_info ( mach_port_t server, + audit_token_t token, int pstype, vm_offset_t *powersources, mach_msg_type_number_t *powersourcesCnt, @@ -468,7 +472,6 @@ kern_return_t _io_pm_set_dw_linger_interval mach_port_t server, audit_token_t token, uint32_t newInterval, - uint32_t *oldInterval, int *return_val ) { @@ -588,3 +591,17 @@ kern_return_t _io_pm_assertion_activity_aggregate return KERN_NOT_SUPPORTED; } +/* Routine io_pm_set_exception_limits */ + +kern_return_t _io_pm_set_exception_limits +( + mach_port_t server, + audit_token_t token, + vm_offset_t props, + mach_msg_type_number_t propsCnt, + int *return_code +) +{ + STUB(); + return KERN_NOT_SUPPORTED; +} diff --git a/src/stubs.c b/src/stubs.c index 33375bb..91d11a1 100644 --- a/src/stubs.c +++ b/src/stubs.c @@ -724,3 +724,43 @@ kern_return_t is_io_registry_entry_get_path_ool STUB(); return KERN_NOT_SUPPORTED; } + +kern_return_t is_io_device_tree_entry_exists_with_name +( + mach_port_t master_port, + io_name_t name, + boolean_t *exists +) +{ + STUB(); + return KERN_NOT_SUPPORTED; +} + +kern_return_t is_io_registry_entry_get_properties_bin_buf +( + mach_port_t registry_entry, + mach_vm_address_t buf, + mach_vm_size_t *bufsize, + io_buf_ptr_t *properties, + mach_msg_type_number_t *propertiesCnt +) +{ + STUB(); + return KERN_NOT_SUPPORTED; +} + +kern_return_t is_io_registry_entry_get_property_bin_buf +( + mach_port_t registry_entry, + io_name_t plane, + io_name_t property_name, + uint32_t options, + mach_vm_address_t buf, + mach_vm_size_t *bufsize, + io_buf_ptr_t *properties, + mach_msg_type_number_t *propertiesCnt +) +{ + STUB(); + return KERN_NOT_SUPPORTED; +}