github.com/jlmucb/cloudproxy@v0.0.0-20170830161738-b5aa0b619bc4/cpvmm/vmm/bootstrap/bootstrap_ap_procs_init.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 _AP_PROCS_INIT_H_
    16  #define _AP_PROCS_INIT_H_
    17  
    18  #include "bootstrap_types.h"
    19  #include "vmm_defs.h"
    20  #include "vmm_startup.h"
    21  
    22  
    23  // typedefs
    24  typedef void *  (*FUNC_4K_PAGE_ALLOC)( uint32_t page_count );
    25  
    26  
    27  // this is a callback that should be used to continue AP bootstrap
    28  // this function MUST not return or return in the protected 32 mode.
    29  // If it returns APs enter wait state once more.
    30  // parameters:
    31  //   Local Apic ID of the current processor (processor ID)
    32  //   Any data to be passed to the function
    33  typedef void  (*FUNC_CONTINUE_AP_BOOT)(uint32_t local_apic_id,
    34                                         void*  any_data);
    35  
    36  struct _INIT32_STRUCT           *p_init32_data; 
    37  struct VMM_STARTUP_STRUCT       *p_startup;
    38  uint32_t ap_procs_startup(struct _INIT32_STRUCT *p_init32_data, 
    39                          VMM_STARTUP_STRUCT  *p_startup);
    40  
    41  
    42  // Run user specified function on all APs.
    43  // If user function returns it should return in the protected 32bit mode.
    44  //  continue_ap_boot_func - user given function to continue AP boot
    45  //  any_data - data to be passed to the function
    46  void ap_procs_run(FUNC_CONTINUE_AP_BOOT continue_ap_boot_func,
    47                    void* any_data);
    48  #endif // _AP_PROCS_INIT_H_
    49