github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/vmm/include/vmx_timer.h (about)

     1  /*
     2   * Copyright (c) 2013 Intel Corporation
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *     http://www.apache.org/licenses/LICENSE-2.0
     8   * Unless required by applicable law or agreed to in writing, software
     9   * distributed under the License is distributed on an "AS IS" BASIS,
    10   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11   * See the License for the specific language governing permissions and
    12   * limitations under the License.
    13   */
    14  
    15  #ifndef _VMX_TIMER_H_
    16  #define _VMX_TIMER_H_
    17  
    18  // Function : vmx_timer_hw_setup
    19  // Purpose  : Checks if VMX timer is supported by hardware and if so,
    20  //          : calculates its rate relative to TSC.
    21  // Arguments: void
    22  // Return   : TRUE id supported
    23  // Note     : Must be call 1st on the given core.
    24  BOOLEAN vmx_timer_hw_setup(void);
    25  BOOLEAN vmx_timer_create(GUEST_CPU_HANDLE gcpu);
    26  BOOLEAN vmx_timer_start(GUEST_CPU_HANDLE gcpu);
    27  BOOLEAN vmx_timer_stop(GUEST_CPU_HANDLE gcpu);
    28  BOOLEAN vmx_timer_set_period(GUEST_CPU_HANDLE gcpu, UINT64 period);
    29  BOOLEAN vmx_timer_launch(GUEST_CPU_HANDLE gcpu, UINT64 time_to_expiration, BOOLEAN periodic);
    30  BOOLEAN vmx_timer_set_mode(GUEST_CPU_HANDLE gcpu, BOOLEAN save_value_mode);
    31  
    32  #endif // _VMX_TIMER_H_
    33