1 /** @file 2 Head file for BDS Platform specific code 3 4 Copyright (C) 2015-2016, Red Hat, Inc. 5 Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR> 6 7 This program and the accompanying materials are licensed and made available 8 under the terms and conditions of the BSD License which accompanies this 9 distribution. The full text of the license may be found at 10 http://opensource.org/licenses/bsd-license.php 11 12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT 13 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 14 15 **/ 16 17 #ifndef _PLATFORM_BM_H_ 18 #define _PLATFORM_BM_H_ 19 20 #include <Library/BaseLib.h> 21 #include <Library/BaseMemoryLib.h> 22 #include <Library/DebugLib.h> 23 #include <Library/DevicePathLib.h> 24 #include <Library/MemoryAllocationLib.h> 25 #include <Library/UefiBootServicesTableLib.h> 26 #include <Library/UefiLib.h> 27 #include <Library/UefiRuntimeServicesTableLib.h> 28 29 /** 30 Download the kernel, the initial ramdisk, and the kernel command line from 31 QEMU's fw_cfg. Construct a minimal SimpleFileSystem that contains the two 32 image files, and load and start the kernel from it. 33 34 The kernel will be instructed via its command line to load the initrd from 35 the same Simple FileSystem. 36 37 @retval EFI_NOT_FOUND Kernel image was not found. 38 @retval EFI_OUT_OF_RESOURCES Memory allocation failed. 39 @retval EFI_PROTOCOL_ERROR Unterminated kernel command line. 40 41 @return Error codes from any of the underlying 42 functions. On success, the function doesn't 43 return. 44 **/ 45 EFI_STATUS 46 EFIAPI 47 TryRunningQemuKernel ( 48 VOID 49 ); 50 51 #endif // _PLATFORM_BM_H_ 52