// Code generated by cmd/gen. DO NOT EDIT. /* * * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zes_api.h * @version v1.15-r1.15.31 * */ package gozel import ( "unsafe" "github.com/fumiama/gozel/internal/zecall" ) // ZesDeviceEccState (zes_device_ecc_state_t) ECC State type ZesDeviceEccState uintptr const ( ZES_DEVICE_ECC_STATE_UNAVAILABLE ZesDeviceEccState = 0 // ZES_DEVICE_ECC_STATE_UNAVAILABLE None ZES_DEVICE_ECC_STATE_ENABLED ZesDeviceEccState = 1 // ZES_DEVICE_ECC_STATE_ENABLED ECC enabled. ZES_DEVICE_ECC_STATE_DISABLED ZesDeviceEccState = 2 // ZES_DEVICE_ECC_STATE_DISABLED ECC disabled. ZES_DEVICE_ECC_STATE_FORCE_UINT32 ZesDeviceEccState = 0x7fffffff // ZES_DEVICE_ECC_STATE_FORCE_UINT32 Value marking end of ZES_DEVICE_ECC_STATE_* ENUMs ) // ZesDeviceAction (zes_device_action_t) State Change Requirements type ZesDeviceAction uintptr const ( ZES_DEVICE_ACTION_NONE ZesDeviceAction = 0 // ZES_DEVICE_ACTION_NONE No action. ZES_DEVICE_ACTION_WARM_CARD_RESET ZesDeviceAction = 1 // ZES_DEVICE_ACTION_WARM_CARD_RESET Warm reset of the card. ZES_DEVICE_ACTION_COLD_CARD_RESET ZesDeviceAction = 2 // ZES_DEVICE_ACTION_COLD_CARD_RESET Cold reset of the card. ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT ZesDeviceAction = 3 // ZES_DEVICE_ACTION_COLD_SYSTEM_REBOOT Cold reboot of the system. ZES_DEVICE_ACTION_FORCE_UINT32 ZesDeviceAction = 0x7fffffff // ZES_DEVICE_ACTION_FORCE_UINT32 Value marking end of ZES_DEVICE_ACTION_* ENUMs ) // ZesDeviceEccDesc (zes_device_ecc_desc_t) ECC State Descriptor type ZesDeviceEccDesc struct { Stype ZesStructureType // Stype [in] type of this structure Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). State ZesDeviceEccState // State [out] ECC state } // ZesDeviceEccProperties (zes_device_ecc_properties_t) ECC State type ZesDeviceEccProperties struct { Stype ZesStructureType // Stype [in] type of this structure Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). Currentstate ZesDeviceEccState // Currentstate [out] Current ECC state Pendingstate ZesDeviceEccState // Pendingstate [out] Pending ECC state Pendingaction ZesDeviceAction // Pendingaction [out] Pending action } // ZesDeviceEccAvailable Is ECC functionality available - true or false? /// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// /// @returns /// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE /// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE /// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET /// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE /// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pAvailable` func ZesDeviceEccAvailable( hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. pAvailable *ZeBool, // pAvailable [out] ECC functionality is available (true)/unavailable (false). ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEccAvailable", uintptr(hDevice), uintptr(unsafe.Pointer(pAvailable))) } // ZesDeviceEccConfigurable Is ECC support configurable - true or false? /// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// /// @returns /// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE /// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE /// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET /// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE /// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pConfigurable` func ZesDeviceEccConfigurable( hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. pConfigurable *ZeBool, // pConfigurable [out] ECC can be enabled/disabled (true)/enabled/disabled (false). ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceEccConfigurable", uintptr(hDevice), uintptr(unsafe.Pointer(pConfigurable))) } // ZesDeviceGetEccState Get current ECC state, pending state, and pending action /// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// /// @returns /// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE /// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE /// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET /// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE /// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == pState` func ZesDeviceGetEccState( hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. pState *ZesDeviceEccProperties, // pState [out] ECC state, pending state, and pending action for state change. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceGetEccState", uintptr(hDevice), uintptr(unsafe.Pointer(pState))) } // ZesDeviceSetEccState Set new ECC state /// /// @details /// - The application may call this function from simultaneous threads. /// - The implementation of this function should be lock-free. /// - ::zesDeviceGetState should be called to determine pending action /// required to implement state change. /// /// @returns /// - ::ZE_RESULT_SUCCESS /// - ::ZE_RESULT_ERROR_UNINITIALIZED /// - ::ZE_RESULT_ERROR_DEVICE_LOST /// - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY /// - ::ZE_RESULT_ERROR_INVALID_ARGUMENT /// - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE /// - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE /// - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS /// - ::ZE_RESULT_ERROR_NOT_AVAILABLE /// - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET /// - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE /// - ::ZE_RESULT_ERROR_UNKNOWN /// - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE /// + `nullptr == hDevice` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == newState` /// + `nullptr == pState` /// - ::ZE_RESULT_ERROR_INVALID_ENUMERATION /// + `::ZES_DEVICE_ECC_STATE_DISABLED < newState->state` /// - ::ZE_RESULT_ERROR_UNSUPPORTED_ENUMERATION /// - ::ZE_RESULT_WARNING_ACTION_REQUIRED /// + User must look at the pendingAction attribute of pState & perform the action required to complete the ECC state change. func ZesDeviceSetEccState( hDevice ZesDeviceHandle, // hDevice [in] Handle for the component. newState *ZesDeviceEccDesc, // newState [in] Pointer to desired ECC state. pState *ZesDeviceEccProperties, // pState [out] ECC state, pending state, and pending action for state change. ) (ZeResult, error) { return zecall.Call[ZeResult]("zesDeviceSetEccState", uintptr(hDevice), uintptr(unsafe.Pointer(newState)), uintptr(unsafe.Pointer(pState))) }