mirror of
				https://git.proxmox.com/git/mirror_edk2
				synced 2025-11-04 09:12:31 +00:00 
			
		
		
		
	https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/** @file
 | 
						|
  Functions to make Xen hypercalls.
 | 
						|
 | 
						|
  Copyright (C) 2014, Citrix Ltd.
 | 
						|
 | 
						|
  SPDX-License-Identifier: BSD-2-Clause-Patent
 | 
						|
 | 
						|
**/
 | 
						|
 | 
						|
#include <PiDxe.h>
 | 
						|
 | 
						|
#include <IndustryStandard/Xen/hvm/params.h>
 | 
						|
#include <IndustryStandard/Xen/memory.h>
 | 
						|
 | 
						|
#include <Library/DebugLib.h>
 | 
						|
#include <Library/XenHypercallLib.h>
 | 
						|
 | 
						|
UINT64
 | 
						|
EFIAPI
 | 
						|
XenHypercallHvmGetParam (
 | 
						|
  IN UINT32        Index
 | 
						|
  )
 | 
						|
{
 | 
						|
  xen_hvm_param_t     Parameter;
 | 
						|
  INTN                Error;
 | 
						|
 | 
						|
  Parameter.domid = DOMID_SELF;
 | 
						|
  Parameter.index = Index;
 | 
						|
  Error = XenHypercall2 (__HYPERVISOR_hvm_op,
 | 
						|
                         HVMOP_get_param, (INTN) &Parameter);
 | 
						|
  if (Error != 0) {
 | 
						|
    DEBUG ((EFI_D_ERROR,
 | 
						|
            "XenHypercall: Error %Ld trying to get HVM parameter %d\n",
 | 
						|
            (INT64)Error, Index));
 | 
						|
    return 0;
 | 
						|
  }
 | 
						|
  return Parameter.value;
 | 
						|
}
 | 
						|
 | 
						|
INTN
 | 
						|
EFIAPI
 | 
						|
XenHypercallMemoryOp (
 | 
						|
  IN     UINTN Operation,
 | 
						|
  IN OUT VOID *Arguments
 | 
						|
  )
 | 
						|
{
 | 
						|
  return XenHypercall2 (__HYPERVISOR_memory_op,
 | 
						|
                        Operation, (INTN) Arguments);
 | 
						|
}
 | 
						|
 | 
						|
INTN
 | 
						|
EFIAPI
 | 
						|
XenHypercallEventChannelOp (
 | 
						|
  IN     INTN Operation,
 | 
						|
  IN OUT VOID *Arguments
 | 
						|
  )
 | 
						|
{
 | 
						|
  return XenHypercall2 (__HYPERVISOR_event_channel_op,
 | 
						|
                        Operation, (INTN) Arguments);
 | 
						|
}
 |