xref: /illumos-gate/usr/src/boot/efi/include/efi.h (revision f334afcf)
1*f334afcfSToomas Soome /*
2*f334afcfSToomas Soome  *
3*f334afcfSToomas Soome  * Copyright (c)  1999 - 2002 Intel Corporation. All rights reserved
4*f334afcfSToomas Soome  * This software and associated documentation (if any) is furnished
5*f334afcfSToomas Soome  * under a license and may only be used or copied in accordance
6*f334afcfSToomas Soome  * with the terms of the license. Except as permitted by such
7*f334afcfSToomas Soome  * license, no part of this software or documentation may be
8*f334afcfSToomas Soome  * reproduced, stored in a retrieval system, or transmitted in any
9*f334afcfSToomas Soome  * form or by any means without the express written consent of
10*f334afcfSToomas Soome  * Intel Corporation.
11*f334afcfSToomas Soome  *
12*f334afcfSToomas Soome  * Module Name:
13*f334afcfSToomas Soome  *
14*f334afcfSToomas Soome  * efi.h
15*f334afcfSToomas Soome  *
16*f334afcfSToomas Soome  * Abstract:
17*f334afcfSToomas Soome  * Public EFI header files
18*f334afcfSToomas Soome  *
19*f334afcfSToomas Soome  * Revision History
20*f334afcfSToomas Soome  */
21199767f8SToomas Soome 
22199767f8SToomas Soome //
23199767f8SToomas Soome // Build flags on input
24199767f8SToomas Soome //  EFI32
25*f334afcfSToomas Soome //  EFI_DEBUG		- Enable debugging code
26*f334afcfSToomas Soome //  EFI_NT_EMULATOR	- Building for running under NT
27199767f8SToomas Soome //
28199767f8SToomas Soome 
29199767f8SToomas Soome 
30199767f8SToomas Soome #ifndef _EFI_INCLUDE_
31*f334afcfSToomas Soome #define	_EFI_INCLUDE_
32*f334afcfSToomas Soome 
33*f334afcfSToomas Soome #include <sys/cdefs.h>		/* Need __dead2. */
34*f334afcfSToomas Soome #include <Uefi.h>
35199767f8SToomas Soome 
36*f334afcfSToomas Soome #define	NextMemoryDescriptor(Ptr, Size) \
37*f334afcfSToomas Soome 	((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) Ptr) + Size))
38*f334afcfSToomas Soome 
39*f334afcfSToomas Soome /* See also ENCODE_ERROR(). */
40*f334afcfSToomas Soome #define	DECODE_ERROR(StatusCode)	\
41*f334afcfSToomas Soome 	(unsigned long)(StatusCode & ~MAX_BIT)
42199767f8SToomas Soome 
43190f051bSToomas Soome #include <stdbool.h>
44190f051bSToomas Soome 
45190f051bSToomas Soome /*
46190f051bSToomas Soome  * Global variables
47190f051bSToomas Soome  */
48190f051bSToomas Soome extern bool has_boot_services;
49199767f8SToomas Soome 
508dff7262SToomas Soome /*
518dff7262SToomas Soome  * illumos UUID
528dff7262SToomas Soome  */
538dff7262SToomas Soome #define	ILLUMOS_BOOT_VAR_GUID \
54*f334afcfSToomas Soome 	{ 0x8B54B311, 0x7163, 0x40d3, \
55*f334afcfSToomas Soome 		{0xA6, 0x7B, 0xE7, 0xB2, 0x95, 0x1B, 0x3D, 0x56} \
56*f334afcfSToomas Soome 	}
57*f334afcfSToomas Soome 
58*f334afcfSToomas Soome extern EFI_GUID gillumosBootVarGuid;
59*f334afcfSToomas Soome 
60*f334afcfSToomas Soome #define	LZMA_COMPRESS_GUID \
61*f334afcfSToomas Soome 	{ 0xee4e5898, 0x3914, 0x4259, \
62*f334afcfSToomas Soome 		{0x9d, 0x6e, 0xdc, 0x7b, 0xd7, 0x94, 0x03, 0xcf} \
63*f334afcfSToomas Soome 	}
64*f334afcfSToomas Soome 
65*f334afcfSToomas Soome #endif /* _EFI_INCLUDE_ */
66