--- /dev/null
+/** @file\r
+ This file makes the BaseTypes.h backward compatible with the ones used in the \r
+ past for EFI and Tiano development. It's mostly just prepending an EFI_ on the \r
+ definitions.\r
+\r
+ Copyright (c) 2006, Intel Corporation \r
+ All rights reserved. This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+ Module Name: UefiBaseTypes.h\r
+\r
+**/\r
+\r
+#ifndef __UEFI_BASE_TYPES_H__\r
+#define __UEFI_BASE_TYPES_H__\r
+\r
+#include <Common/BaseTypes.h>\r
+\r
+typedef UINT64 EFI_LBA;\r
+\r
+#define EFIERR(_a) ENCODE_ERROR(_a)\r
+\r
+#define EFI_MAX_BIT MAX_BIT\r
+#define EFI_MAX_ADDRESS MAX_ADDRESS\r
+#define EFI_BREAKPOINT() CpuBreakpoint ()\r
+#define EFI_DEADLOOP() CpuDeadLoop ()\r
+#define EFI_ERROR(A) RETURN_ERROR(A)\r
+\r
+typedef GUID EFI_GUID;\r
+typedef RETURN_STATUS EFI_STATUS;\r
+\r
+#define EFI_SUCCESS RETURN_SUCCESS \r
+#define EFI_LOAD_ERROR RETURN_LOAD_ERROR \r
+#define EFI_INVALID_PARAMETER RETURN_INVALID_PARAMETER \r
+#define EFI_UNSUPPORTED RETURN_UNSUPPORTED \r
+#define EFI_BAD_BUFFER_SIZE RETURN_BAD_BUFFER_SIZE \r
+#define EFI_BUFFER_TOO_SMALL RETURN_BUFFER_TOO_SMALL \r
+#define EFI_NOT_READY RETURN_NOT_READY \r
+#define EFI_DEVICE_ERROR RETURN_DEVICE_ERROR \r
+#define EFI_WRITE_PROTECTED RETURN_WRITE_PROTECTED \r
+#define EFI_OUT_OF_RESOURCES RETURN_OUT_OF_RESOURCES \r
+#define EFI_VOLUME_CORRUPTED RETURN_VOLUME_CORRUPTED \r
+#define EFI_VOLUME_FULL RETURN_VOLUME_FULL \r
+#define EFI_NO_MEDIA RETURN_NO_MEDIA \r
+#define EFI_MEDIA_CHANGED RETURN_MEDIA_CHANGED \r
+#define EFI_NOT_FOUND RETURN_NOT_FOUND \r
+#define EFI_ACCESS_DENIED RETURN_ACCESS_DENIED \r
+#define EFI_NO_RESPONSE RETURN_NO_RESPONSE \r
+#define EFI_NO_MAPPING RETURN_NO_MAPPING \r
+#define EFI_TIMEOUT RETURN_TIMEOUT \r
+#define EFI_NOT_STARTED RETURN_NOT_STARTED \r
+#define EFI_ALREADY_STARTED RETURN_ALREADY_STARTED \r
+#define EFI_ABORTED RETURN_ABORTED \r
+#define EFI_ICMP_ERROR RETURN_ICMP_ERROR \r
+#define EFI_TFTP_ERROR RETURN_TFTP_ERROR \r
+#define EFI_PROTOCOL_ERROR RETURN_PROTOCOL_ERROR \r
+#define EFI_INCOMPATIBLE_VERSION RETURN_INCOMPATIBLE_VERSION \r
+#define EFI_SECURITY_VIOLATION RETURN_SECURITY_VIOLATION \r
+#define EFI_CRC_ERROR RETURN_CRC_ERROR \r
+#define EFI_END_OF_MEDIA RETURN_END_OF_MEDIA\r
+#define EFI_END_OF_FILE RETURN_END_OF_FILE\r
+\r
+#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH \r
+#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE \r
+#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE \r
+#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL\r
+\r
+//\r
+// The EFI memory allocation functions work in units of EFI_PAGEs that are\r
+// 4K. This should in no way be confused with the page size of the processor.\r
+// An EFI_PAGE is just the quanta of memory in EFI.\r
+//\r
+#define EFI_PAGE_MASK 0xFFF\r
+#define EFI_PAGE_SHIFT 12\r
+\r
+#define EFI_SIZE_TO_PAGES(a) (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))\r
+\r
+#define EFI_PAGES_TO_SIZE(a) ( (a) << EFI_PAGE_SHIFT)\r
+\r
+#endif\r