github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/fuchsia/system.txt (about)

     1  # Copyright 2022 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  # See https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/vdso/system.fidl
     5  
     6  include <zircon/syscalls.h>
     7  include <zircon/types.h>
     8  
     9  zx_system_get_dcache_line_size(size ptr[out, int32])
    10  zx_system_get_num_cpus(count ptr[out, int32])
    11  zx_system_get_version_string(version ptr[out, zx_system_string_view])
    12  zx_system_get_page_size(size ptr[out, int32])
    13  zx_system_get_physmem(physmem ptr[out, int64])
    14  zx_system_get_features(kind flags[system_feature_opt], features ptr[out, int32])
    15  zx_system_get_event(root_job zx_job, kind flags[system_event_opt], event ptr[out, zx_handle])
    16  zx_system_set_performance_info(res zx_resource, topic flags[system_performance_opt], info ptr[in, array[int8]], count int64)
    17  zx_system_get_performance_info(res zx_resource, topic flags[system_performance_opt], count int64, info ptr[out, array[int8]], output_count ptr[out, int64])
    18  # Soft-reboots the system with a new kernel and bootimage; does not return (disabled for now, probably never viable?)
    19  zx_system_mexec(res zx_resource, kernel_vmo zx_vmo, bootimage_vmo zx_vmo) (disabled)
    20  zx_system_mexec_payload_get(res zx_resource, buffer ptr[out, array[int8, 0:16384]])
    21  # TODO: add variants with specific flags and their corresponding valid args
    22  zx_system_powerctl(res zx_resource, cmd flags[system_powerctl_opt], arg ptr[in, zx_system_powerctl_arg])
    23  
    24  # System version string is a 40-char git hash with "git-" prefix and possible <=20-char suffix.
    25  zx_system_string_view {
    26  	c_str	ptr[out, array[int8, 44:64]]
    27  	length	len[c_str, int8]
    28  }
    29  
    30  zx_system_acpi_transition_s_state {
    31  	target_s_state	int8
    32  	sleep_type_a	int8
    33  	sleep_type_b	int8
    34  }
    35  
    36  zx_system_acpi_transition_s_state_wrapper {
    37  	acpi	zx_system_acpi_transition_s_state
    38  	padding	array[int8, 9]
    39  }
    40  
    41  zx_system_x86_power_limit {
    42  	power_limit	int32
    43  	time_window	int32
    44  	clamp		int8
    45  	enable		int8
    46  }
    47  
    48  zx_system_powerctl_arg [
    49  	acpi	zx_system_acpi_transition_s_state_wrapper
    50  	x86	zx_system_x86_power_limit
    51  ]
    52  
    53  system_feature_opt = ZX_FEATURE_KIND_CPU, ZX_FEATURE_KIND_HW_BREAKPOINT_COUNT, ZX_FEATURE_KIND_HW_WATCHPOINT_COUNT, ZX_FEATURE_KIND_ADDRESS_TAGGING, ZX_FEATURE_KIND_VM
    54  system_event_opt = ZX_SYSTEM_EVENT_OUT_OF_MEMORY, ZX_SYSTEM_EVENT_MEMORY_PRESSURE_CRITICAL, ZX_SYSTEM_EVENT_MEMORY_PRESSURE_WARNING, ZX_SYSTEM_EVENT_MEMORY_PRESSURE_NORMAL, ZX_SYSTEM_EVENT_IMMINENT_OUT_OF_MEMORY
    55  system_performance_opt = ZX_CPU_PERF_SCALE, ZX_CPU_DEFAULT_PERF_SCALE
    56  system_powerctl_opt = ZX_SYSTEM_POWERCTL_ENABLE_ALL_CPUS, ZX_SYSTEM_POWERCTL_DISABLE_ALL_CPUS_BUT_PRIMARY, ZX_SYSTEM_POWERCTL_ACPI_TRANSITION_S_STATE, ZX_SYSTEM_POWERCTL_X86_SET_PKG_PL1, ZX_SYSTEM_POWERCTL_REBOOT, ZX_SYSTEM_POWERCTL_REBOOT_BOOTLOADER, ZX_SYSTEM_POWERCTL_REBOOT_RECOVERY, ZX_SYSTEM_POWERCTL_SHUTDOWN, ZX_SYSTEM_POWERCTL_ACK_KERNEL_INITIATED_REBOOT