-//++\r
-// Copyright (c) 2006, Intel Corporation\r
+// @file\r
+// Contains the macros required by calling procedures in Itanium-based assembly code.\r
+//\r
+// Copyright (c) 2006 - 2009, 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
// 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:\r
-// IpfMacro.i\r
-//\r
-// Abstract:\r
-// Contains the macros needed for calling procedures in Itanium-based assembly code.\r
-//\r
-//\r
-// Revision History:\r
-//\r
-//--\r
\r
#ifndef __IA64PROC_I__\r
#define __IA64PROC_I__\r
\r
-\r
+//\r
+// Delcare the begin of assembly function entry.\r
+//\r
+// @param name Name of function in assembly code.\r
+//\r
#define PROCEDURE_ENTRY(name) .##text; \\r
.##type name, @function; \\r
.##proc name; \\r
name::\r
\r
+//\r
+// End of assembly function.\r
+//\r
+// @param name Name of function in assembly code.\r
+//\r
#define PROCEDURE_EXIT(name) .##endp name\r
\r
-// Note: use of NESTED_SETUP requires number of locals (l) >= 3\r
-\r
+//\r
+// NESTED_SETUP Requires number of locals (l) >= 3\r
+//\r
#define NESTED_SETUP(i,l,o,r) \\r
alloc loc1=ar##.##pfs,i,l,o,r ;\\r
mov loc0=b0\r
\r
+//\r
+// End of Nested\r
+//\r
#define NESTED_RETURN \\r
mov b0=loc0 ;\\r
mov ar##.##pfs=loc1 ;;\\r
br##.##ret##.##dpnt b0;;\r
\r
+//\r
+// Export assembly function as the global function.\r
+//\r
+// @param Function Name of function in assembly code.\r
+//\r
#define GLOBAL_FUNCTION(Function) \\r
.##type Function, @function; \\r
.##globl Function\r
\r
-#define GLOBAL_OBJECT(Object) \\r
- .##type Object, @object; \\r
- .##globl Object\r
-\r
-#define GLOBAL_CONSTANT(Constant) \\r
- .##type Constant, @notype; \\r
- .##globl Constant\r
-\r
-#define INTERRUPT_HANDLER_BEGIN(name) \\r
-PROCEDURE_ENTRY(name##HandlerBegin) \\r
-;; \\r
-PROCEDURE_EXIT(name##HandlerBegin)\r
-\r
-#define INTERRUPT_HANDLER_END(name) \\r
-PROCEDURE_ENTRY(name##HandlerEnd) \\r
-;; \\r
-PROCEDURE_EXIT(name##HandlerEnd)\r
-\r
-\r
-#define INTERRUPT_HANDLER_BLOCK_BEGIN \\r
-INTERRUPT_HANDLER_BEGIN(First)\r
-\r
-#define INTERRUPT_HANDLER_BLOCK_END \\r
-INTERRUPT_HANDLER_END(Last)\r
-\r
-\r
-\r
#endif\r
Allocates and fills in the extended data section of a status code with the \r
Device Path Protocol specified by DevicePath. This function is responsible \r
for allocating a buffer large enough for the standard header and the device \r
- path. The standard header is filled in with a GUID of \r
- gEfiStatusCodeSpecificDataGuid. The status code is reported with a zero \r
- instance and a caller ID of gEfiCallerIdGuid.\r
+ path. The standard header is filled in with an implementation dependent GUID.\r
+ The status code is reported with a zero instance and a caller ID of gEfiCallerIdGuid.\r
\r
ReportStatusCodeWithDevicePath()must actively prevent recursion. If \r
ReportStatusCodeWithDevicePath() is called while processing another any other \r
These data structure do not have the standard header, so this function is \r
responsible for allocating a buffer large enough for the standard header and \r
the extended data passed into this function. The standard header is filled \r
- in with a GUID of gEfiStatusCodeSpecificDataGuid. The status code is reported \r
+ in with an implementation dependent GUID. The status code is reported \r
with a zero instance and a caller ID of gEfiCallerIdGuid.\r
\r
ReportStatusCodeWithExtendedData()must actively prevent recursion. If \r
ID of gEfiCallerIdGuid is used.\r
@param ExtendedDataGuid Pointer to the GUID for the extended data buffer. \r
If this parameter is NULL, then a the status code \r
- standard header is filled in with \r
- gEfiStatusCodeSpecificDataGuid.\r
+ standard header is filled in with an implementation dependent GUID.\r
@param ExtendedData Pointer to the extended data buffer. This is an \r
optional parameter that may be NULL.\r
@param ExtendedDataSize The size, in bytes, of the extended data buffer.\r
VOID\r
);\r
\r
+#ifndef NDEBUG\r
+#if 0\r
+//#if __INTEL_COMPILER \r
+#define REPORT_STATUS_CODE(Type,Value) ReportStatusCode(Type,Value)\r
\r
+#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type,Value,DevicePathParameter) \\r
+ ReportStatusCodeWithDevicePath(Type,Value,DevicePathParameter)\r
+\r
+#define REPORT_STATUS_CODE_WITH_EXTENDED_DATA(Type,Value,ExtendedData,ExtendedDataSize) \\r
+ ReportStatusCodeWithExtendedData(Type,Value,ExtendedData,ExtendedDataSize) \r
+\r
+#define REPORT_STATUS_CODE_EX(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) \\r
+ ReportStatusCodeEx(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize)\r
+\r
+#else\r
/**\r
Reports a status code with minimal parameters if the status code type is enabled.\r
\r
ID of gEfiCallerIdGuid is used.\r
@param ExtendedDataGuid Pointer to the GUID for the extended data buffer. \r
If this parameter is NULL, then a the status code \r
- standard header is filled in with \r
- gEfiStatusCodeSpecificDataGuid.\r
+ standard header is filled in with an implementation dependent GUID.\r
@param ExtendedData Pointer to the extended data buffer. This is an \r
optional parameter that may be NULL.\r
@param ExtendedDataSize The size, in bytes, of the extended data buffer.\r
(ReportDebugCodeEnabled() && ((Type) & EFI_STATUS_CODE_TYPE_MASK) == EFI_DEBUG_CODE) ? \\r
ReportStatusCodeEx(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) : \\r
EFI_UNSUPPORTED\r
+#endif\r
+\r
+#else\r
+#define REPORT_STATUS_CODE(Type,Value) EFI_UNSUPPORTED\r
+#define REPORT_STATUS_CODE_WITH_DEVICE_PATH(Type,Value,DevicePathParameter) EFI_UNSUPPORTED\r
+#define REPORT_STATUS_CODE_WITH_EXTENDED_DATA(Type,Value,ExtendedData,ExtendedDataSize) EFI_UNSUPPORTED\r
+#define REPORT_STATUS_CODE_EX(Type,Value,Instance,CallerId,ExtendedDataGuid,ExtendedData,ExtendedDataSize) EFI_UNSUPPORTED\r
+#endif\r
\r
#endif\r