summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi/include
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2002-05-19 03:17:22 +0000
committermarcel <marcel@FreeBSD.org>2002-05-19 03:17:22 +0000
commitdc5fc6400292e035f713ab40d28460f1e582ebc3 (patch)
treea8f3db9952b16aae9ffd2fcdeea5f325af92c4e4 /sys/boot/efi/include
parent18037eb7abbc88a96356f5301de4264b7e15e365 (diff)
downloadFreeBSD-src-dc5fc6400292e035f713ab40d28460f1e582ebc3.zip
FreeBSD-src-dc5fc6400292e035f713ab40d28460f1e582ebc3.tar.gz
An almost mechanical sweep to replace C++ style comments with C
style comments. This is not an attempt to conform to style(9). Such has lower priority.
Diffstat (limited to 'sys/boot/efi/include')
-rw-r--r--sys/boot/efi/include/efi.h13
-rw-r--r--sys/boot/efi/include/efi_nii.h59
-rw-r--r--sys/boot/efi/include/efiapi.h160
-rw-r--r--sys/boot/efi/include/eficon.h55
-rw-r--r--sys/boot/efi/include/efidebug.h59
-rw-r--r--sys/boot/efi/include/efidef.h105
-rw-r--r--sys/boot/efi/include/efidevp.h23
-rw-r--r--sys/boot/efi/include/efifpswa.h6
-rw-r--r--sys/boot/efi/include/efifs.h42
-rw-r--r--sys/boot/efi/include/efinet.h130
-rw-r--r--sys/boot/efi/include/efipart.h6
-rw-r--r--sys/boot/efi/include/efiprot.h99
-rw-r--r--sys/boot/efi/include/efipxebc.h95
-rw-r--r--sys/boot/efi/include/efiser.h38
-rw-r--r--sys/boot/efi/include/i386/efibind.h101
-rw-r--r--sys/boot/efi/include/ia64/efibind.h108
16 files changed, 485 insertions, 614 deletions
diff --git a/sys/boot/efi/include/efi.h b/sys/boot/efi/include/efi.h
index c2e2906..f476a25 100644
--- a/sys/boot/efi/include/efi.h
+++ b/sys/boot/efi/include/efi.h
@@ -17,13 +17,12 @@ Revision History
--*/
-//
-// Build flags on input
-// EFI32
-// EFI_DEBUG - Enable debugging code
-// EFI_NT_EMULATOR - Building for running under NT
-//
-
+/*
+ * Build flags on input
+ * EFI32
+ * EFI_DEBUG - Enable debugging code
+ * EFI_NT_EMULATOR - Building for running under NT
+ */
#ifndef _EFI_INCLUDE_
#define _EFI_INCLUDE_
diff --git a/sys/boot/efi/include/efi_nii.h b/sys/boot/efi/include/efi_nii.h
index d3cd2b7..6a9c05d 100644
--- a/sys/boot/efi/include/efi_nii.h
+++ b/sys/boot/efi/include/efi_nii.h
@@ -29,47 +29,54 @@ typedef enum {
typedef struct {
+ /* Revision of the network interface identifier protocol interface. */
UINT64 Revision;
- // Revision of the network interface identifier protocol interface.
+ /*
+ * Address of the first byte of the identifying structure for this
+ * network interface. This is set to zero if there is no structure.
+ * For PXE/UNDI this is the first byte of the !PXE structure.
+ */
UINT64 ID;
- // Address of the first byte of the identifying structure for this
- // network interface. This is set to zero if there is no structure.
- //
- // For PXE/UNDI this is the first byte of the !PXE structure.
+ /*
+ * Address of the UNrelocated driver/ROM image. This is set
+ * to zero if there is no driver/ROM image.
+ * For 16-bit UNDI, this is the first byte of the option ROM in
+ * upper memory.
+ * For 32/64-bit S/W UNDI, this is the first byte of the EFI ROM
+ * image.
+ * For H/W UNDI, this is set to zero.
+ */
UINT64 ImageAddr;
- // Address of the UNrelocated driver/ROM image. This is set
- // to zero if there is no driver/ROM image.
- //
- // For 16-bit UNDI, this is the first byte of the option ROM in
- // upper memory.
- //
- // For 32/64-bit S/W UNDI, this is the first byte of the EFI ROM
- // image.
- //
- // For H/W UNDI, this is set to zero.
+ /*
+ * Size of the UNrelocated driver/ROM image of this network interface.
+ * This is set to zero if there is no driver/ROM image.
+ */
UINT32 ImageSize;
- // Size of the UNrelocated driver/ROM image of this network interface.
- // This is set to zero if there is no driver/ROM image.
+ /*
+ * 4 char ASCII string to go in class identifier (option 60) in DHCP
+ * and Boot Server discover packets.
+ * For EfiNetworkInterfaceUndi this field is "UNDI".
+ * For EfiNetworkInterfaceSnp this field is "SNPN".
+ */
CHAR8 StringId[4];
- // 4 char ASCII string to go in class identifier (option 60) in DHCP
- // and Boot Server discover packets.
- // For EfiNetworkInterfaceUndi this field is "UNDI".
- // For EfiNetworkInterfaceSnp this field is "SNPN".
+ /*
+ * Information to be placed into the PXE DHCP and Discover packets.
+ * This is the network interface type and version number that will
+ * be placed into DHCP option 94 (client network interface identifier).
+ */
UINT8 Type;
UINT8 MajorVer;
UINT8 MinorVer;
- // Information to be placed into the PXE DHCP and Discover packets.
- // This is the network interface type and version number that will
- // be placed into DHCP option 94 (client network interface identifier).
+
BOOLEAN Ipv6Supported;
- UINT8 IfNum; // interface number to be used with pxeid structure
+ UINT8 IfNum; /* interface number to be used with pxeid structure */
} EFI_NETWORK_INTERFACE_IDENTIFIER_INTERFACE;
extern EFI_GUID NetworkInterfaceIdentifierProtocol;
-#endif // _EFI_NII_H
+#endif /* _EFI_NII_H */
diff --git a/sys/boot/efi/include/efiapi.h b/sys/boot/efi/include/efiapi.h
index e9065fa..2fda578 100644
--- a/sys/boot/efi/include/efiapi.h
+++ b/sys/boot/efi/include/efiapi.h
@@ -21,22 +21,22 @@ Revision History
--*/
-//
-// EFI Specification Revision
-//
+/*
+ * EFI Specification Revision
+ */
#define EFI_SPECIFICATION_MAJOR_REVISION 1
#define EFI_SPECIFICATION_MINOR_REVISION 02
-//
-// Declare forward referenced data structures
-//
+/*
+ * Declare forward referenced data structures
+ */
INTERFACE_DECL(_EFI_SYSTEM_TABLE);
-//
-// EFI Memory
-//
+/*
+ * EFI Memory
+ */
typedef
EFI_STATUS
@@ -92,8 +92,8 @@ EFI_STATUS
#define EFI_OPTIONAL_PTR 0x00000001
-#define EFI_INTERNAL_FNC 0x00000002 // Pointer to internal runtime fnc
-#define EFI_INTERNAL_PTR 0x00000004 // Pointer to internal runtime data
+#define EFI_INTERNAL_FNC 0x00000002 /* Pointer to internal runtime fnc */
+#define EFI_INTERNAL_PTR 0x00000004 /* Pointer to internal runtime data */
typedef
@@ -104,9 +104,9 @@ EFI_STATUS
);
-//
-// EFI Events
-//
+/*
+ * EFI Events
+ */
@@ -181,9 +181,9 @@ EFI_STATUS
IN EFI_EVENT Event
);
-//
-// Task priority level
-//
+/*
+ * Task priority level
+ */
#define TPL_APPLICATION 4
#define TPL_CALLBACK 8
@@ -203,19 +203,19 @@ VOID
);
-//
-// EFI platform varibles
-//
+/*
+ * EFI platform varibles
+ */
#define EFI_GLOBAL_VARIABLE \
{ 0x8BE4DF61, 0x93CA, 0x11d2, 0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C }
-// Variable attributes
+/* Variable attributes */
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
-// Variable size limitation
+/* Variable size limitation */
#define EFI_MAXIMUM_VARIABLE_SIZE 1024
typedef
@@ -248,14 +248,14 @@ EFI_STATUS
);
-//
-// EFI Time
-//
+/*
+ * EFI Time
+ */
typedef struct {
- UINT32 Resolution; // 1e-6 parts per million
- UINT32 Accuracy; // hertz
- BOOLEAN SetsToZero; // Set clears sub-second time
+ UINT32 Resolution; /* 1e-6 parts per million */
+ UINT32 Accuracy; /* hertz */
+ BOOLEAN SetsToZero; /* Set clears sub-second time */
} EFI_TIME_CAPABILITIES;
@@ -288,12 +288,12 @@ EFI_STATUS
);
-//
-// Image functions
-//
+/*
+ * Image functions
+ */
-// PE32+ Subsystem type for EFI images
+/* PE32+ Subsystem type for EFI images */
#if !defined(IMAGE_SUBSYSTEM_EFI_APPLICATION)
#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
@@ -301,7 +301,7 @@ EFI_STATUS
#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
#endif
-// PE32+ Machine type for EFI images
+/* PE32+ Machine type for EFI images */
#if !defined(EFI_IMAGE_MACHINE_IA32)
#define EFI_IMAGE_MACHINE_IA32 0x014c
@@ -311,7 +311,7 @@ EFI_STATUS
#define EFI_IMAGE_MACHINE_IA64 0x0200
#endif
-// Image Entry prototype
+/* Image Entry prototype */
typedef
EFI_STATUS
@@ -355,7 +355,7 @@ EFI_STATUS
);
-// Image handle
+/* Image handle */
#define LOADED_IMAGE_PROTOCOL \
{ 0x5B1B31A1, 0x9562, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }
@@ -365,22 +365,22 @@ typedef struct {
EFI_HANDLE ParentHandle;
struct _EFI_SYSTEM_TABLE *SystemTable;
- // Source location of image
+ /* Source location of image */
EFI_HANDLE DeviceHandle;
EFI_DEVICE_PATH *FilePath;
VOID *Reserved;
- // Images load options
+ /* Images load options */
UINT32 LoadOptionsSize;
VOID *LoadOptions;
- // Location of where image was loaded
+ /* Location of where image was loaded */
VOID *ImageBase;
UINT64 ImageSize;
EFI_MEMORY_TYPE ImageCodeType;
EFI_MEMORY_TYPE ImageDataType;
- // If the driver image supports a dynamic unload request
+ /* If the driver image supports a dynamic unload request */
EFI_IMAGE_UNLOAD Unload;
} EFI_LOADED_IMAGE;
@@ -393,9 +393,9 @@ EFI_STATUS
IN UINTN MapKey
);
-//
-// Misc
-//
+/*
+ * Misc
+ */
typedef
@@ -440,9 +440,9 @@ EFI_STATUS
OUT UINT32 *HighCount
);
-//
-// Protocol handler functions
-//
+/*
+ * Protocol handler functions
+ */
typedef enum {
EFI_NATIVE_INTERFACE,
@@ -528,9 +528,9 @@ EFI_STATUS
VOID
);
-//
-// Standard EFI table header
-//
+/*
+ * Standard EFI table header
+ */
typedef struct _EFI_TABLE_HEARDER {
UINT64 Signature;
@@ -541,9 +541,9 @@ typedef struct _EFI_TABLE_HEARDER {
} EFI_TABLE_HEADER;
-//
-// EFI Runtime Serivces Table
-//
+/*
+ * EFI Runtime Serivces Table
+ */
#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552
#define EFI_RUNTIME_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
@@ -551,33 +551,25 @@ typedef struct _EFI_TABLE_HEARDER {
typedef struct {
EFI_TABLE_HEADER Hdr;
- //
- // Time services
- //
+ /* Time services */
EFI_GET_TIME GetTime;
EFI_SET_TIME SetTime;
EFI_GET_WAKEUP_TIME GetWakeupTime;
EFI_SET_WAKEUP_TIME SetWakeupTime;
- //
- // Virtual memory services
- //
+ /* Virtual memory services */
EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
EFI_CONVERT_POINTER ConvertPointer;
- //
- // Variable serviers
- //
+ /* Variable serviers */
EFI_GET_VARIABLE GetVariable;
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
EFI_SET_VARIABLE SetVariable;
- //
- // Misc
- //
+ /* Misc */
EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
EFI_RESET_SYSTEM ResetSystem;
@@ -585,9 +577,9 @@ typedef struct {
} EFI_RUNTIME_SERVICES;
-//
-// EFI Boot Services Table
-//
+/*
+ * EFI Boot Services Table
+ */
#define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
#define EFI_BOOT_SERVICES_REVISION (EFI_SPECIFICATION_MAJOR_REVISION<<16) | (EFI_SPECIFICATION_MINOR_REVISION)
@@ -596,16 +588,12 @@ typedef struct _EFI_BOOT_SERVICES {
EFI_TABLE_HEADER Hdr;
- //
- // Task priority functions
- //
+ /* Task priority functions */
EFI_RAISE_TPL RaiseTPL;
EFI_RESTORE_TPL RestoreTPL;
- //
- // Memory functions
- //
+ /* Memory functions */
EFI_ALLOCATE_PAGES AllocatePages;
EFI_FREE_PAGES FreePages;
@@ -613,9 +601,7 @@ typedef struct _EFI_BOOT_SERVICES {
EFI_ALLOCATE_POOL AllocatePool;
EFI_FREE_POOL FreePool;
- //
- // Event & timer functions
- //
+ /* Event & timer functions */
EFI_CREATE_EVENT CreateEvent;
EFI_SET_TIMER SetTimer;
@@ -624,9 +610,7 @@ typedef struct _EFI_BOOT_SERVICES {
EFI_CLOSE_EVENT CloseEvent;
EFI_CHECK_EVENT CheckEvent;
- //
- // Protocol handler functions
- //
+ /* Protocol handler functions */
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
@@ -638,9 +622,7 @@ typedef struct _EFI_BOOT_SERVICES {
EFI_LOCATE_DEVICE_PATH LocateDevicePath;
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
- //
- // Image functions
- //
+ /* Image functions */
EFI_IMAGE_LOAD LoadImage;
EFI_IMAGE_START StartImage;
@@ -648,9 +630,7 @@ typedef struct _EFI_BOOT_SERVICES {
EFI_IMAGE_UNLOAD UnloadImage;
EFI_EXIT_BOOT_SERVICES ExitBootServices;
- //
- // Misc functions
- //
+ /* Misc functions */
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
EFI_STALL Stall;
@@ -659,9 +639,9 @@ typedef struct _EFI_BOOT_SERVICES {
} EFI_BOOT_SERVICES;
-//
-// EFI Configuration Table and GUID definitions
-//
+/*
+ * EFI Configuration Table and GUID definitions
+ */
#define MPS_TABLE_GUID \
{ 0xeb9d2d2f, 0x2d88, 0x11d3, { 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } }
@@ -685,9 +665,9 @@ typedef struct _EFI_CONFIGURATION_TABLE {
} EFI_CONFIGURATION_TABLE;
-//
-// EFI System Table
-//
+/*
+ * EFI System Table
+ */
diff --git a/sys/boot/efi/include/eficon.h b/sys/boot/efi/include/eficon.h
index b264db5..a288571 100644
--- a/sys/boot/efi/include/eficon.h
+++ b/sys/boot/efi/include/eficon.h
@@ -20,9 +20,9 @@ Revision History
--*/
-//
-// Text output protocol
-//
+/*
+ * Text output protocol
+ */
#define SIMPLE_TEXT_OUTPUT_PROTOCOL \
{ 0x387477c2, 0x69c7, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
@@ -126,7 +126,7 @@ EFI_STATUS
typedef struct {
INT32 MaxMode;
- // current settings
+ /* current settings */
INT32 Mode;
INT32 Attribute;
INT32 CursorColumn;
@@ -148,13 +148,13 @@ typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition;
EFI_TEXT_ENABLE_CURSOR EnableCursor;
- // Current mode
+ /* Current mode */
SIMPLE_TEXT_OUTPUT_MODE *Mode;
} SIMPLE_TEXT_OUTPUT_INTERFACE;
-//
-// Define's for required EFI Unicode Box Draw character
-//
+/*
+ * Define's for required EFI Unicode Box Draw character
+ */
#define BOXDRAW_HORIZONTAL 0x2500
#define BOXDRAW_VERTICAL 0x2502
@@ -206,31 +206,29 @@ typedef struct _SIMPLE_TEXT_OUTPUT_INTERFACE {
#define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL 0x256b
#define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL 0x256c
-//
-// EFI Required Block Elements Code Chart
-//
-
+/*
+ * EFI Required Block Elements Code Chart
+ */
#define BLOCKELEMENT_FULL_BLOCK 0x2588
#define BLOCKELEMENT_LIGHT_SHADE 0x2591
-//
-// EFI Required Geometric Shapes Code Chart
-//
+/*
+ * EFI Required Geometric Shapes Code Chart
+ */
#define GEOMETRICSHAPE_UP_TRIANGLE 0x25b2
#define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
#define GEOMETRICSHAPE_DOWN_TRIANGLE 0x25bc
#define GEOMETRICSHAPE_LEFT_TRIANGLE 0x25c4
-//
-// EFI Required Arrow shapes
-//
-
+/*
+ * EFI Required Arrow shapes
+ */
#define ARROW_UP 0x2191
#define ARROW_DOWN 0x2193
-//
-// Text input protocol
-//
+/*
+ * Text input protocol
+ */
#define SIMPLE_TEXT_INPUT_PROTOCOL \
{ 0x387477c1, 0x69c7, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
@@ -242,9 +240,9 @@ typedef struct {
CHAR16 UnicodeChar;
} EFI_INPUT_KEY;
-//
-// Baseline unicode control chars
-//
+/*
+ * Baseline unicode control chars
+ */
#define CHAR_NULL 0x0000
#define CHAR_BACKSPACE 0x0008
@@ -252,10 +250,9 @@ typedef struct {
#define CHAR_LINEFEED 0x000A
#define CHAR_CARRIAGE_RETURN 0x000D
-//
-// Scan codes for base line keys
-//
-
+/*
+ * Scan codes for base line keys
+ */
#define SCAN_NULL 0x0000
#define SCAN_UP 0x0001
#define SCAN_DOWN 0x0002
diff --git a/sys/boot/efi/include/efidebug.h b/sys/boot/efi/include/efidebug.h
index d853e79..5214737 100644
--- a/sys/boot/efi/include/efidebug.h
+++ b/sys/boot/efi/include/efidebug.h
@@ -44,37 +44,32 @@ extern UINTN EFIDebug;
#endif
-#define D_INIT 0x00000001 // Initialization style messages
-#define D_WARN 0x00000002 // Warnings
-#define D_LOAD 0x00000004 // Load events
-#define D_FS 0x00000008 // EFI File system
-#define D_POOL 0x00000010 // Alloc & Free's
-#define D_PAGE 0x00000020 // Alloc & Free's
-#define D_INFO 0x00000040 // Verbose
-#define D_VAR 0x00000100 // Variable
-#define D_PARSE 0x00000200 // Command parsing
-#define D_BM 0x00000400 // Boot manager
-#define D_BLKIO 0x00001000 // BlkIo Driver
-#define D_BLKIO_ULTRA 0x00002000 // BlkIo Driver
-#define D_NET 0x00004000 // SNI Driver
-#define D_NET_ULTRA 0x00008000 // SNI Driver
-#define D_TXTIN 0x00010000 // Simple Input Driver
-#define D_TXTOUT 0x00020000 // Simple Text Output Driver
-#define D_ERROR_ATA 0x00040000 // ATA error messages
-#define D_ERROR 0x80000000 // Error
-
-#define D_RESERVED 0x7fffC880 // Bits not reserved above
-
-//
-// Current Debug level of the system, value of EFIDebug
-//
-//#define EFI_DBUG_MASK (D_ERROR | D_WARN | D_LOAD | D_BLKIO | D_INIT)
+#define D_INIT 0x00000001 /* Initialization style messages */
+#define D_WARN 0x00000002 /* Warnings */
+#define D_LOAD 0x00000004 /* Load events */
+#define D_FS 0x00000008 /* EFI File system */
+#define D_POOL 0x00000010 /* Alloc & Free's */
+#define D_PAGE 0x00000020 /* Alloc & Free's */
+#define D_INFO 0x00000040 /* Verbose */
+#define D_VAR 0x00000100 /* Variable */
+#define D_PARSE 0x00000200 /* Command parsing */
+#define D_BM 0x00000400 /* Boot manager */
+#define D_BLKIO 0x00001000 /* BlkIo Driver */
+#define D_BLKIO_ULTRA 0x00002000 /* BlkIo Driver */
+#define D_NET 0x00004000 /* SNI Driver */
+#define D_NET_ULTRA 0x00008000 /* SNI Driver */
+#define D_TXTIN 0x00010000 /* Simple Input Driver */
+#define D_TXTOUT 0x00020000 /* Simple Text Output Driver */
+#define D_ERROR_ATA 0x00040000 /* ATA error messages */
+#define D_ERROR 0x80000000 /* Error */
+
+#define D_RESERVED 0x7fffC880 /* Bits not reserved above */
+
+/*
+ * Current Debug level of the system, value of EFIDebug
+ */
#define EFI_DBUG_MASK (D_ERROR)
-//
-//
-//
-
#if EFI_DEBUG
#define ASSERT(a) if(!(a)) DBGASSERT(a)
@@ -89,9 +84,9 @@ extern UINTN EFIDebug;
#endif
-//
-// Prototypes
-//
+/*
+ * Prototypes
+ */
INTN
DbgAssert (
diff --git a/sys/boot/efi/include/efidef.h b/sys/boot/efi/include/efidef.h
index 9f3690e..2bd7f9b 100644
--- a/sys/boot/efi/include/efidef.h
+++ b/sys/boot/efi/include/efidef.h
@@ -41,14 +41,14 @@ typedef VOID *EFI_HANDLE;
typedef VOID *EFI_EVENT;
-//
-// Prototype argument decoration for EFI parameters to indicate
-// their direction
-//
-// IN - argument is passed into the function
-// OUT - argument (pointer) is returned from the function
-// OPTIONAL - argument is optional
-//
+/*
+ * Prototype argument decoration for EFI parameters to indicate
+ * their direction
+ *
+ * IN - argument is passed into the function
+ * OUT - argument (pointer) is returned from the function
+ * OPTIONAL - argument is optional
+ */
#ifndef IN
#define IN
@@ -57,9 +57,9 @@ typedef VOID *EFI_EVENT;
#endif
-//
-// A GUID
-//
+/*
+ * A GUID
+ */
typedef struct {
UINT32 Data1;
@@ -69,36 +69,36 @@ typedef struct {
} EFI_GUID;
-//
-// Time
-//
+/*
+ * Time
+ */
typedef struct {
- UINT16 Year; // 1998 - 20XX
- UINT8 Month; // 1 - 12
- UINT8 Day; // 1 - 31
- UINT8 Hour; // 0 - 23
- UINT8 Minute; // 0 - 59
- UINT8 Second; // 0 - 59
- UINT8 Pad1;
- UINT32 Nanosecond; // 0 - 999,999,999
- INT16 TimeZone; // -1440 to 1440 or 2047
- UINT8 Daylight;
- UINT8 Pad2;
+ UINT16 Year; /* 1998 - 20XX */
+ UINT8 Month; /* 1 - 12 */
+ UINT8 Day; /* 1 - 31 */
+ UINT8 Hour; /* 0 - 23 */
+ UINT8 Minute; /* 0 - 59 */
+ UINT8 Second; /* 0 - 59 */
+ UINT8 Pad1;
+ UINT32 Nanosecond; /* 0 - 999,999,999 */
+ INT16 TimeZone; /* -1440 to 1440 or 2047 */
+ UINT8 Daylight;
+ UINT8 Pad2;
} EFI_TIME;
-// Bit definitions for EFI_TIME.Daylight
+/* Bit definitions for EFI_TIME.Daylight */
#define EFI_TIME_ADJUST_DAYLIGHT 0x01
#define EFI_TIME_IN_DAYLIGHT 0x02
-// Value definition for EFI_TIME.TimeZone
+/* Value definition for EFI_TIME.TimeZone */
#define EFI_UNSPECIFIED_TIMEZONE 0x07FF
-//
-// Networking
-//
+/*
+ * Networking
+ */
typedef struct {
UINT8 Addr[4];
@@ -112,9 +112,9 @@ typedef struct {
UINT8 Addr[32];
} EFI_MAC_ADDRESS;
-//
-// Memory
-//
+/*
+ * Memory
+ */
typedef UINT64 EFI_PHYSICAL_ADDRESS;
typedef UINT64 EFI_VIRTUAL_ADDRESS;
@@ -126,12 +126,13 @@ typedef enum {
MaxAllocateType
} EFI_ALLOCATE_TYPE;
-//Preseve the attr on any range supplied.
-//ConventialMemory must have WB,SR,SW when supplied.
-//When allocating from ConventialMemory always make it WB,SR,SW
-//When returning to ConventialMemory always make it WB,SR,SW
-//When getting the memory map, or on RT for runtime types
-
+/*
+ * Preseve the attr on any range supplied.
+ * ConventialMemory must have WB,SR,SW when supplied.
+ * When allocating from ConventialMemory always make it WB,SR,SW
+ * When returning to ConventialMemory always make it WB,SR,SW
+ * When getting the memory map, or on RT for runtime types
+ */
typedef enum {
EfiReservedMemoryType,
@@ -151,41 +152,37 @@ typedef enum {
EfiMaxMemoryType
} EFI_MEMORY_TYPE;
-// possible caching types for the memory range
+/* possible caching types for the memory range */
#define EFI_MEMORY_UC 0x0000000000000001
#define EFI_MEMORY_WC 0x0000000000000002
#define EFI_MEMORY_WT 0x0000000000000004
#define EFI_MEMORY_WB 0x0000000000000008
#define EFI_MEMORY_UCE 0x0000000000000010
-// physical memory protection on range
+/* physical memory protection on range */
#define EFI_MEMORY_WP 0x0000000000001000
#define EFI_MEMORY_RP 0x0000000000002000
#define EFI_MEMORY_XP 0x0000000000004000
-// range requires a runtime mapping
+/* range requires a runtime mapping */
#define EFI_MEMORY_RUNTIME 0x8000000000000000
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
typedef struct {
- UINT32 Type; // Field size is 32 bits followed by 32 bit pad
- EFI_PHYSICAL_ADDRESS PhysicalStart; // Field size is 64 bits
- EFI_VIRTUAL_ADDRESS VirtualStart; // Field size is 64 bits
- UINT64 NumberOfPages; // Field size is 64 bits
- UINT64 Attribute; // Field size is 64 bits
+ UINT32 Type; /* 32 bit padding */
+ EFI_PHYSICAL_ADDRESS PhysicalStart;
+ EFI_VIRTUAL_ADDRESS VirtualStart;
+ UINT64 NumberOfPages;
+ UINT64 Attribute;
} EFI_MEMORY_DESCRIPTOR;
-//
-// International Language
-//
+/*
+ * International Language
+ */
typedef UINT8 ISO_639_2;
#define ISO_639_2_ENTRY_SIZE 3
-//
-//
-//
-
#define EFI_PAGE_SIZE 4096
#define EFI_PAGE_MASK 0xFFF
#define EFI_PAGE_SHIFT 12
diff --git a/sys/boot/efi/include/efidevp.h b/sys/boot/efi/include/efidevp.h
index 16ef3e0..ebd6b3b 100644
--- a/sys/boot/efi/include/efidevp.h
+++ b/sys/boot/efi/include/efidevp.h
@@ -20,9 +20,9 @@ Revision History
--*/
-//
-// Device Path structures - Section C
-//
+/*
+ * Device Path structures - Section C
+ */
typedef struct _EFI_DEVICE_PATH {
UINT8 Type;
@@ -33,9 +33,7 @@ typedef struct _EFI_DEVICE_PATH {
#define EFI_DP_TYPE_MASK 0x7F
#define EFI_DP_TYPE_UNPACKED 0x80
-//#define END_DEVICE_PATH_TYPE 0xff
#define END_DEVICE_PATH_TYPE 0x7f
-//#define END_DEVICE_PATH_TYPE_UNPACKED 0x7f
#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
@@ -49,7 +47,6 @@ typedef struct _EFI_DEVICE_PATH {
#define DevicePathSubType(a) ( (a)->SubType )
#define DevicePathNodeLength(a) ( ((a)->Length[0]) | ((a)->Length[1] << 8) )
#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
-//#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE_UNPACKED )
#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE )
#define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
#define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
@@ -128,13 +125,13 @@ typedef struct _ACPI_HID_DEVICE_PATH {
UINT32 UID;
} ACPI_HID_DEVICE_PATH;
-//
-// EISA ID Macro
-// EISA ID Definition 32-bits
-// bits[15:0] - three character compressed ASCII EISA ID.
-// bits[31:16] - binary number
-// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
-//
+/*
+ * EISA ID Macro
+ * EISA ID Definition 32-bits
+ * bits[15:0] - three character compressed ASCII EISA ID.
+ * bits[31:16] - binary number
+ * Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
+ */
#define PNP_EISA_ID_CONST 0x41d0
#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
diff --git a/sys/boot/efi/include/efifpswa.h b/sys/boot/efi/include/efifpswa.h
index 5de9bb6..3e039ef 100644
--- a/sys/boot/efi/include/efifpswa.h
+++ b/sys/boot/efi/include/efifpswa.h
@@ -2,9 +2,9 @@
#ifndef _EFI_FPSWA_H
#define _EFI_FPSWA_H
-//
-// EFI FP SWA Driver (Floating Point Software Assist)
-//
+/*
+ * EFI FP SWA Driver (Floating Point Software Assist)
+ */
#define EFI_INTEL_FPSWA \
{ 0xc41b6531, 0x97b9, 0x11d3, 0x9a, 0x29, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
diff --git a/sys/boot/efi/include/efifs.h b/sys/boot/efi/include/efifs.h
index 8a2e587..8ef3615 100644
--- a/sys/boot/efi/include/efifs.h
+++ b/sys/boot/efi/include/efifs.h
@@ -21,9 +21,9 @@ Revision History
--*/
-//
-// EFI Partition header (normaly starts in LBA 1)
-//
+/*
+ * EFI Partition header (normaly starts in LBA 1)
+ */
#define EFI_PARTITION_SIGNATURE 0x5053595320494249
#define EFI_PARTITION_REVISION 0x00010001
@@ -43,9 +43,9 @@ typedef struct _EFI_PARTITION_HEADER {
} EFI_PARTITION_HEADER;
-//
-// File header
-//
+/*
+ * File header
+ */
#define EFI_FILE_HEADER_SIGNATURE 0x454c494620494249
#define EFI_FILE_HEADER_REVISION 0x00010000
@@ -65,10 +65,10 @@ typedef struct _EFI_FILE_HEADER {
} EFI_FILE_HEADER;
-//
-// Return the file's first LBAL which is in the same
-// logical block as the file header
-//
+/*
+ * Return the file's first LBAL which is in the same
+ * logical block as the file header
+ */
#define EFI_FILE_LBAL(a) ((EFI_LBAL *) (((CHAR8 *) (a)) + (a)->LBALOffset))
@@ -77,10 +77,10 @@ typedef struct _EFI_FILE_HEADER {
#define EFI_FILE_CLASS_NORMAL 3
-//
-// Logical Block Address List - the fundemental block
-// description structure
-//
+/*
+ * Logical Block Address List - the fundemental block
+ * description structure
+ */
#define EFI_LBAL_SIGNATURE 0x4c41424c20494249
#define EFI_LBAL_REVISION 0x00010000
@@ -94,22 +94,22 @@ typedef struct _EFI_LBAL {
UINT32 ArrayCount;
} EFI_LBAL;
-// Array size
+/* Array size */
#define EFI_LBAL_ARRAY_SIZE(lbal,offs,blks) \
(((blks) - (offs) - (lbal)->Hdr.HeaderSize) / sizeof(EFI_RL))
-//
-// Logical Block run-length
-//
+/*
+ * Logical Block run-length
+ */
typedef struct {
EFI_LBA Start;
UINT64 Length;
} EFI_RL;
-//
-// Return the run-length structure from an LBAL header
-//
+/*
+ * Return the run-length structure from an LBAL header
+ */
#define EFI_LBAL_RL(a) ((EFI_RL*) (((CHAR8 *) (a)) + (a)->Hdr.HeaderSize))
diff --git a/sys/boot/efi/include/efinet.h b/sys/boot/efi/include/efinet.h
index a492595..c137ef8 100644
--- a/sys/boot/efi/include/efinet.h
+++ b/sys/boot/efi/include/efinet.h
@@ -16,78 +16,55 @@ Revision History
--*/
-///////////////////////////////////////////////////////////////////////////////
-//
-// Simple Network Protocol
-//
-
#define EFI_SIMPLE_NETWORK_PROTOCOL \
{ 0xA19832B9, 0xAC25, 0x11D3, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }
-
INTERFACE_DECL(_EFI_SIMPLE_NETWORK);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef struct {
- //
- // Total number of frames received. Includes frames with errors and
- // dropped frames.
- //
+ /*
+ * Total number of frames received. Includes frames with errors and
+ * dropped frames.
+ */
UINT64 RxTotalFrames;
- //
- // Number of valid frames received and copied into receive buffers.
- //
+ /* Number of valid frames received and copied into receive buffers. */
UINT64 RxGoodFrames;
- //
- // Number of frames below the minimum length for the media.
- // This would be <64 for ethernet.
- //
+ /*
+ * Number of frames below the minimum length for the media.
+ * This would be <64 for ethernet.
+ */
UINT64 RxUndersizeFrames;
- //
- // Number of frames longer than the maxminum length for the
- // media. This would be >1500 for ethernet.
- //
+ /*
+ * Number of frames longer than the maxminum length for the
+ * media. This would be >1500 for ethernet.
+ */
UINT64 RxOversizeFrames;
- //
- // Valid frames that were dropped because receive buffers were full.
- //
+ /* Valid frames that were dropped because receive buffers were full. */
UINT64 RxDroppedFrames;
- //
- // Number of valid unicast frames received and not dropped.
- //
+ /* Number of valid unicast frames received and not dropped. */
UINT64 RxUnicastFrames;
- //
- // Number of valid broadcast frames received and not dropped.
- //
+ /* Number of valid broadcast frames received and not dropped. */
UINT64 RxBroadcastFrames;
- //
- // Number of valid mutlicast frames received and not dropped.
- //
+ /* Number of valid mutlicast frames received and not dropped. */
UINT64 RxMulticastFrames;
- //
- // Number of frames w/ CRC or alignment errors.
- //
+ /* Number of frames w/ CRC or alignment errors. */
UINT64 RxCrcErrorFrames;
- //
- // Total number of bytes received. Includes frames with errors
- // and dropped frames.
- //
+ /*
+ * Total number of bytes received. Includes frames with errors
+ * and dropped frames.
+ */
UINT64 RxTotalBytes;
- //
- // Transmit statistics.
- //
+ /* Transmit statistics. */
UINT64 TxTotalFrames;
UINT64 TxGoodFrames;
UINT64 TxUndersizeFrames;
@@ -99,21 +76,14 @@ typedef struct {
UINT64 TxCrcErrorFrames;
UINT64 TxTotalBytes;
- //
- // Number of collisions detection on this subnet.
- //
+ /* Number of collisions detection on this subnet. */
UINT64 Collisions;
- //
- // Number of frames destined for unsupported protocol.
- //
+ /* Number of frames destined for unsupported protocol. */
UINT64 UnsupportedProtocol;
} EFI_NETWORK_STATISTICS;
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef enum {
EfiSimpleNetworkStopped,
EfiSimpleNetworkStarted,
@@ -121,25 +91,17 @@ typedef enum {
EfiSimpleNetworkMaxState
} EFI_SIMPLE_NETWORK_STATE;
-///////////////////////////////////////////////////////////////////////////////
-//
-
#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
-///////////////////////////////////////////////////////////////////////////////
-//
-
#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
-///////////////////////////////////////////////////////////////////////////////
-//
#define MAX_MCAST_FILTER_CNT 16
typedef struct {
UINT32 State;
@@ -163,27 +125,18 @@ typedef struct {
BOOLEAN MediaPresent;
} EFI_SIMPLE_NETWORK_MODE;
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_START) (
IN struct _EFI_SIMPLE_NETWORK *This
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
IN struct _EFI_SIMPLE_NETWORK *This
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
@@ -192,9 +145,6 @@ EFI_STATUS
IN UINTN ExtraTxBufferSize OPTIONAL
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
@@ -202,18 +152,12 @@ EFI_STATUS
IN BOOLEAN ExtendedVerification
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
IN struct _EFI_SIMPLE_NETWORK *This
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
@@ -225,9 +169,6 @@ EFI_STATUS
IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
@@ -236,9 +177,6 @@ EFI_STATUS
IN EFI_MAC_ADDRESS *New OPTIONAL
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
@@ -248,9 +186,6 @@ EFI_STATUS
OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
@@ -260,9 +195,6 @@ EFI_STATUS
OUT EFI_MAC_ADDRESS *MAC
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
@@ -273,9 +205,6 @@ EFI_STATUS
IN OUT VOID *Buffer
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
@@ -284,9 +213,6 @@ EFI_STATUS
OUT VOID **TxBuf OPTIONAL
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
@@ -299,9 +225,6 @@ EFI_STATUS
IN UINT16 *Protocol OPTIONAL
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
@@ -314,9 +237,6 @@ EFI_STATUS
OUT UINT16 *Protocol OPTIONAL
);
-///////////////////////////////////////////////////////////////////////////////
-//
-
#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION 0x00010000
typedef struct _EFI_SIMPLE_NETWORK {
diff --git a/sys/boot/efi/include/efipart.h b/sys/boot/efi/include/efipart.h
index 290e195..b504bd9 100644
--- a/sys/boot/efi/include/efipart.h
+++ b/sys/boot/efi/include/efipart.h
@@ -20,10 +20,6 @@ Revision History
--*/
-//
-//
-//
-
#define EFI_PARTITION 0xef
#define MBR_SIZE 512
@@ -46,7 +42,7 @@ typedef struct {
#define MBR_SIGNATURE 0xaa55
#define MIN_MBR_DEVICE_SIZE 0x80000
-#define MBR_ERRATA_PAD 0x40000 // 128 MB
+#define MBR_ERRATA_PAD 0x40000 /* 128 MB */
#define MAX_MBR_PARTITIONS 4
typedef struct {
diff --git a/sys/boot/efi/include/efiprot.h b/sys/boot/efi/include/efiprot.h
index ddbcefd..d81d605 100644
--- a/sys/boot/efi/include/efiprot.h
+++ b/sys/boot/efi/include/efiprot.h
@@ -20,17 +20,17 @@ Revision History
--*/
-//
-// Device Path protocol
-//
+/*
+ * Device Path protocol
+ */
#define DEVICE_PATH_PROTOCOL \
{ 0x9576e91, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
-//
-// Block IO protocol
-//
+/*
+ * Block IO protocol
+ */
#define BLOCK_IO_PROTOCOL \
{ 0x964e5b21, 0x6459, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
@@ -104,9 +104,9 @@ typedef struct _EFI_BLOCK_IO {
-//
-// Disk Block IO protocol
-//
+/*
+ * Disk Block IO protocol
+ */
#define DISK_IO_PROTOCOL \
{ 0xce345171, 0xba0b, 0x11d2, 0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
@@ -143,9 +143,9 @@ typedef struct _EFI_DISK_IO {
} EFI_DISK_IO;
-//
-// Simple filesystem protocol
-//
+/*
+ * Simple filesystem protocol
+ */
#define SIMPLE_FILE_SYSTEM_PROTOCOL \
{ 0x964e5b22, 0x6459, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
@@ -167,10 +167,6 @@ typedef struct _EFI_FILE_IO_INTERFACE {
EFI_VOLUME_OPEN OpenVolume;
} EFI_FILE_IO_INTERFACE;
-//
-//
-//
-
typedef
EFI_STATUS
(EFIAPI *EFI_FILE_OPEN) (
@@ -181,12 +177,12 @@ EFI_STATUS
IN UINT64 Attributes
);
-// Open modes
+/* Open modes */
#define EFI_FILE_MODE_READ 0x0000000000000001
#define EFI_FILE_MODE_WRITE 0x0000000000000002
#define EFI_FILE_MODE_CREATE 0x8000000000000000
-// File attributes
+/* File attributes */
#define EFI_FILE_READ_ONLY 0x0000000000000001
#define EFI_FILE_HIDDEN 0x0000000000000002
#define EFI_FILE_SYSTEM 0x0000000000000004
@@ -279,9 +275,9 @@ typedef struct _EFI_FILE_HANDLE {
} EFI_FILE, *EFI_FILE_HANDLE;
-//
-// File information types
-//
+/*
+ * File information types
+ */
#define EFI_FILE_INFO_ID \
{ 0x9576e92, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
@@ -297,13 +293,14 @@ typedef struct {
CHAR16 FileName[1];
} EFI_FILE_INFO;
-//
-// The FileName field of the EFI_FILE_INFO data structure is variable length.
-// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
-// be the size of the data structure without the FileName field. The following macro
-// computes this size correctly no matter how big the FileName array is declared.
-// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
-//
+/*
+ * The FileName field of the EFI_FILE_INFO data structure is variable length.
+ * Whenever code needs to know the size of the EFI_FILE_INFO data structure,
+ * it needs to be the size of the data structure without the FileName field.
+ * The following macro computes this size correctly no matter how big the
+ * FileName array is declared. This is required to make the EFI_FILE_INFO
+ * data structure ANSI compliant.
+ */
#define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET(EFI_FILE_INFO,FileName)
@@ -319,13 +316,15 @@ typedef struct {
CHAR16 VolumeLabel[1];
} EFI_FILE_SYSTEM_INFO;
-//
-// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
-// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
-// to be the size of the data structure without the VolumeLable field. The following macro
-// computes this size correctly no matter how big the VolumeLable array is declared.
-// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
-//
+/*
+ * The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is
+ * variable length. Whenever code needs to know the size of the
+ * EFI_FILE_SYSTEM_INFO data structure, it needs to be the size of the data
+ * structure without the VolumeLable field. The following macro computes
+ * this size correctly no matter how big the VolumeLable array is declared.
+ * This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI
+ * compilant.
+ */
#define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
@@ -338,10 +337,9 @@ typedef struct {
#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
-//
-// Load file protocol
-//
-
+/*
+ * Load file protocol
+ */
#define LOAD_FILE_PROTOCOL \
{ 0x56EC3091, 0x954C, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }
@@ -363,9 +361,9 @@ typedef struct _EFI_LOAD_FILE_INTERFACE {
} EFI_LOAD_FILE_INTERFACE;
-//
-// Device IO protocol
-//
+/*
+ * Device IO protocol
+ */
#define DEVICE_IO_PROTOCOL \
{ 0xaf6ac311, 0x84c3, 0x11d2, 0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
@@ -377,9 +375,10 @@ typedef enum {
IO_UINT16,
IO_UINT32,
IO_UINT64,
-//
-// Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to MMIO
-//
+/*
+ * Specification Change: Copy from MMIO to MMIO vs. MMIO to buffer, buffer to
+ * MMIO
+ */
MMIO_COPY_UINT8,
MMIO_COPY_UINT16,
MMIO_COPY_UINT32,
@@ -474,9 +473,9 @@ typedef struct _EFI_DEVICE_IO_INTERFACE {
} EFI_DEVICE_IO_INTERFACE;
-//
-// Unicode Collation protocol
-//
+/*
+ * Unicode Collation protocol
+ */
#define UNICODE_COLLATION_PROTOCOL \
{ 0x1d85cd7f, 0xf43d, 0x11d2, 0x9a, 0xc, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
@@ -536,13 +535,13 @@ BOOLEAN
typedef struct _EFI_UNICODE_COLLATION_INTERFACE {
- // general
+ /* general */
EFI_UNICODE_STRICOLL StriColl;
EFI_UNICODE_METAIMATCH MetaiMatch;
EFI_UNICODE_STRLWR StrLwr;
EFI_UNICODE_STRUPR StrUpr;
- // for supporting fat volumes
+ /* for supporting fat volumes */
EFI_UNICODE_FATTOSTR FatToStr;
EFI_UNICODE_STRTOFAT StrToFat;
diff --git a/sys/boot/efi/include/efipxebc.h b/sys/boot/efi/include/efipxebc.h
index e222ce9..7a6df76 100644
--- a/sys/boot/efi/include/efipxebc.h
+++ b/sys/boot/efi/include/efipxebc.h
@@ -20,9 +20,9 @@ Revision History
--*/
-//
-// PXE Base Code protocol
-//
+/*
+ * PXE Base Code protocol
+ */
#define EFI_PXE_BASE_CODE_PROTOCOL \
{ 0x03c4e603, 0xac28, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
@@ -31,9 +31,10 @@ INTERFACE_DECL(_EFI_PXE_BASE_CODE);
#define DEFAULT_TTL 4
#define DEFAULT_ToS 0
-//
-// Address definitions
-//
+
+/*
+ * Address definitions
+ */
typedef union {
UINT32 Addr[4];
@@ -43,9 +44,9 @@ typedef union {
typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT;
-//
-// Packet definitions
-//
+/*
+ * Packet definitions
+ */
typedef struct {
UINT8 BootpOpcode;
@@ -66,15 +67,9 @@ typedef struct {
UINT8 DhcpOptions[56];
} EFI_PXE_BASE_CODE_DHCPV4_PACKET;
-// TBD in EFI v1.1
-//typedef struct {
-// UINT8 reserved;
-//} EFI_PXE_BASE_CODE_DHCPV6_PACKET;
-
typedef union {
UINT8 Raw[1472];
EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;
-// EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
} EFI_PXE_BASE_CODE_PACKET;
typedef struct {
@@ -98,9 +93,9 @@ typedef struct {
CHAR8 ErrorString[127];
} EFI_PXE_BASE_CODE_TFTP_ERROR;
-//
-// IP Receive Filter definitions
-//
+/*
+ * IP Receive Filter definitions
+ */
#define EFI_PXE_BASE_CODE_MAX_IPCNT 8
typedef struct {
UINT8 Filters;
@@ -114,9 +109,9 @@ typedef struct {
#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS 0x0004
#define EFI_PXE_BASE_CODE_IP_FILTER_PROMISCUOUS_MULTICAST 0x0008
-//
-// ARP Cache definitions
-//
+/*
+ * ARP Cache definitions
+ */
typedef struct {
EFI_IP_ADDRESS IpAddr;
@@ -129,9 +124,9 @@ typedef struct {
EFI_IP_ADDRESS GwAddr;
} EFI_PXE_BASE_CODE_ROUTE_ENTRY;
-//
-// UDP definitions
-//
+/*
+ * UDP definitions
+ */
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_IP 0x0001
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_ANY_SRC_PORT 0x0002
@@ -140,9 +135,9 @@ typedef struct {
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_USE_FILTER 0x0010
#define EFI_PXE_BASE_CODE_UDP_OPFLAGS_MAY_FRAGMENT 0x0020
-//
-// Discover() definitions
-//
+/*
+ * Discover() definitions
+ */
#define EFI_PXE_BASE_CODE_BOOT_TYPE_BOOTSTRAP 0
#define EFI_PXE_BASE_CODE_BOOT_TYPE_MS_WINNT_RIS 1
@@ -161,11 +156,11 @@ typedef struct {
#define EFI_PXE_BASE_CODE_BOOT_TYPE_REDHAT_BOOT 14
#define EFI_PXE_BASE_CODE_BOOT_TYPE_REMBO 15
#define EFI_PXE_BASE_CODE_BOOT_TYPE_BEOBOOT 16
-//
-// 17 through 32767 are reserved
-// 32768 through 65279 are for vendor use
-// 65280 through 65534 are reserved
-//
+/*
+ * 17 through 32767 are reserved
+ * 32768 through 65279 are for vendor use
+ * 65280 through 65534 are reserved
+ */
#define EFI_PXE_BASE_CODE_BOOT_TYPE_PXETEST 65535
#define EFI_PXE_BASE_CODE_BOOT_LAYER_MASK 0x7FFF
@@ -189,9 +184,9 @@ typedef struct {
EFI_PXE_BASE_CODE_SRVLIST SrvList[1];
} EFI_PXE_BASE_CODE_DISCOVER_INFO;
-//
-// Mtftp() definitions
-//
+/*
+ * Mtftp() definitions
+ */
typedef enum {
EFI_PXE_BASE_CODE_TFTP_FIRST,
@@ -213,9 +208,9 @@ typedef struct {
UINT16 TransmitTimeout;
} EFI_PXE_BASE_CODE_MTFTP_INFO;
-//
-// PXE Base Code Mode structure
-//
+/*
+ * PXE Base Code Mode structure
+ */
#define EFI_PXE_BASE_CODE_MAX_ARP_ENTRIES 8
#define EFI_PXE_BASE_CODE_MAX_ROUTE_ENTRIES 8
@@ -257,9 +252,9 @@ typedef struct {
EFI_PXE_BASE_CODE_TFTP_ERROR TftpError;
} EFI_PXE_BASE_CODE_MODE;
-//
-// PXE Base Code Interface Function definitions
-//
+/*
+ * PXE Base Code Interface Function definitions
+ */
typedef
EFI_STATUS
@@ -389,9 +384,9 @@ EFI_STATUS
IN EFI_PXE_BASE_CODE_PACKET *NewPxeBisReply OPTIONAL
);
-//
-// PXE Base Code Protocol structure
-//
+/*
+ * PXE Base Code Protocol structure
+ */
#define EFI_PXE_BASE_CODE_INTERFACE_REVISION 0x00010000
@@ -412,16 +407,16 @@ typedef struct _EFI_PXE_BASE_CODE {
EFI_PXE_BASE_CODE_MODE *Mode;
} EFI_PXE_BASE_CODE;
-//
-// Call Back Definitions
-//
+/*
+ * Call Back Definitions
+ */
#define EFI_PXE_BASE_CODE_CALLBACK_PROTOCOL \
{ 0x245dca21, 0xfb7b, 0x11d3, 0x8f, 0x01, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b }
-//
-// Revision Number
-//
+/*
+ * Revision Number
+ */
#define EFI_PXE_BASE_CODE_CALLBACK_INTERFACE_REVISION 0x00010000
diff --git a/sys/boot/efi/include/efiser.h b/sys/boot/efi/include/efiser.h
index 1ff7f32..e2d63bd 100644
--- a/sys/boot/efi/include/efiser.h
+++ b/sys/boot/efi/include/efiser.h
@@ -18,9 +18,9 @@ Revision History
--*/
-//
-// Serial protocol
-//
+/*
+ * Serial protocol
+ */
#define SERIAL_IO_PROTOCOL \
{ 0xBB25CF6F, 0xF1D4, 0x11D2, 0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD }
@@ -37,23 +37,23 @@ typedef enum {
} EFI_PARITY_TYPE;
typedef enum {
- DefaultStopBits,
- OneStopBit, // 1 stop bit
- OneFiveStopBits, // 1.5 stop bits
- TwoStopBits // 2 stop bits
+ DefaultStopBits,
+ OneStopBit,
+ OneFiveStopBits,
+ TwoStopBits
} EFI_STOP_BITS_TYPE;
-#define EFI_SERIAL_CLEAR_TO_SEND 0x0010 // RO
-#define EFI_SERIAL_DATA_SET_READY 0x0020 // RO
-#define EFI_SERIAL_RING_INDICATE 0x0040 // RO
-#define EFI_SERIAL_CARRIER_DETECT 0x0080 // RO
-#define EFI_SERIAL_REQUEST_TO_SEND 0x0002 // WO
-#define EFI_SERIAL_DATA_TERMINAL_READY 0x0001 // WO
-#define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x0100 // RO
-#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x0200 // RO
-#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x1000 // RW
-#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x2000 // RW
-#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x4000 // RW
+#define EFI_SERIAL_CLEAR_TO_SEND 0x0010
+#define EFI_SERIAL_DATA_SET_READY 0x0020
+#define EFI_SERIAL_RING_INDICATE 0x0040
+#define EFI_SERIAL_CARRIER_DETECT 0x0080
+#define EFI_SERIAL_REQUEST_TO_SEND 0x0002
+#define EFI_SERIAL_DATA_TERMINAL_READY 0x0001
+#define EFI_SERIAL_INPUT_BUFFER_EMPTY 0x0100
+#define EFI_SERIAL_OUTPUT_BUFFER_EMPTY 0x0200
+#define EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE 0x1000
+#define EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE 0x2000
+#define EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE 0x4000
typedef
EFI_STATUS
@@ -106,7 +106,7 @@ EFI_STATUS
typedef struct {
UINT32 ControlMask;
- // current Attributes
+ /* current Attributes. */
UINT32 Timeout;
UINT64 BaudRate;
UINT32 ReceiveFifoDepth;
diff --git a/sys/boot/efi/include/i386/efibind.h b/sys/boot/efi/include/i386/efibind.h
index 0e40398..5c19495 100644
--- a/sys/boot/efi/include/i386/efibind.h
+++ b/sys/boot/efi/include/i386/efibind.h
@@ -21,17 +21,17 @@ Revision History
#pragma pack()
-//
-// Basic int types of various widths
-//
+/*
+ * Basic int types of various widths
+ */
#if (__STDC_VERSION__ < 199901L )
- // No ANSI C 1999/2000 stdint.h integer width declarations
+/* No ANSI C 1999/2000 stdint.h integer width declarations */
#if _MSC_EXTENSIONS
- // Use Microsoft C compiler integer width declarations
+/* Use Microsoft C compiler integer width declarations */
typedef unsigned __int64 uint64_t;
typedef __int64 int64_t;
@@ -44,7 +44,7 @@ Revision History
#else
#ifdef UNIX_LP64
- // Use LP64 programming model from C_FLAGS for integer width declarations
+/* Use LP64 programming model from C_FLAGS for integer width declarations */
typedef unsigned long uint64_t;
typedef long int64_t;
@@ -56,7 +56,7 @@ Revision History
typedef char int8_t;
#else
- // Assume P64 programming model from C_FLAGS for integer width declarations
+/* Assume P64 programming model from C_FLAGS for integer width declarations */
typedef unsigned long long uint64_t;
typedef long long int64_t;
@@ -70,9 +70,9 @@ Revision History
#endif
#endif
-//
-// Basic EFI types of various widths
-//
+/*
+ * Basic EFI types of various widths
+ */
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -116,12 +116,12 @@ typedef uint32_t UINTN;
#ifdef EFI_NT_EMULATOR
#define BREAKPOINT() __asm { int 3 }
#else
- #define BREAKPOINT() while (TRUE); // Make it hang on Bios[Dbg]32
+ #define BREAKPOINT() while (TRUE);
#endif
-//
-// Pointers must be aligned to these address to function
-//
+/*
+ * Pointers must be aligned to these address to function
+ */
#define MIN_ALIGNMENT_SIZE 4
@@ -132,16 +132,17 @@ typedef uint32_t UINTN;
Value = (UINTN)Value + (UINTN)Adjustment
-//
-// Define macros to build data structure signatures from characters.
-//
+/*
+ * Define macros to build data structure signatures from characters.
+ */
#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8))
#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16))
#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32))
-//
-// To export & import functions in the EFI emulator environment
-//
+
+/*
+ * To export & import functions in the EFI emulator environment
+ */
#if EFI_NT_EMULATOR
#define EXPORTAPI __declspec( dllexport )
@@ -150,25 +151,25 @@ typedef uint32_t UINTN;
#endif
-//
-// EFIAPI - prototype calling convention for EFI function pointers
-// BOOTSERVICE - prototype for implementation of a boot service interface
-// RUNTIMESERVICE - prototype for implementation of a runtime service interface
-// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
-// RUNTIME_CODE - pragma macro for declaring runtime code
-//
+/*
+ * EFIAPI - prototype calling convention for EFI function pointers
+ * BOOTSERVICE - prototype for implementation of a boot service interface
+ * RUNTIMESERVICE - prototype for implementation of a runtime service interface
+ * RUNTIMEFUNCTION - prototype for implementation of a runtime function that
+ * is not a service
+ * RUNTIME_CODE - pragma macro for declaring runtime code
+ */
-#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
+/* Forces EFI calling conventions reguardless of compiler options */
+#ifndef EFIAPI
#if _MSC_EXTENSIONS
- #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
+ #define EFIAPI __cdecl
#else
- #define EFIAPI // Substitute expresion to force C calling convention
+ #define EFIAPI
#endif
#endif
#define BOOTSERVICE
-//#define RUNTIMESERVICE(proto,a) alloc_text("rtcode",a); proto a
-//#define RUNTIMEFUNCTION(proto,a) alloc_text("rtcode",a); proto a
#define RUNTIMESERVICE
#define RUNTIMEFUNCTION
@@ -183,11 +184,11 @@ typedef uint32_t UINTN;
#ifdef EFI_NT_EMULATOR
-//
-// To help ensure proper coding of integrated drivers, they are
-// compiled as DLLs. In NT they require a dll init entry pointer.
-// The macro puts a stub entry point into the DLL so it will load.
-//
+/*
+ * To help ensure proper coding of integrated drivers, they are
+ * compiled as DLLs. In NT they require a dll init entry pointer.
+ * The macro puts a stub entry point into the DLL so it will load.
+ */
#define EFI_DRIVER_ENTRY_POINT(InitFunction) \
UINTN \
@@ -216,26 +217,26 @@ typedef uint32_t UINTN;
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
(_if)->LoadInternal(type, name, NULL)
-#else // EFI_NT_EMULATOR
+#else /* EFI_NT_EMULATOR */
-//
-// When build similiar to FW, then link everything together as
-// one big module.
-//
+/*
+ * When build similiar to FW, then link everything together as
+ * one big module.
+ */
#define EFI_DRIVER_ENTRY_POINT(InitFunction)
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
(_if)->LoadInternal(type, name, entry)
-#endif // EFI_FW_NT
+#endif /* EFI_FW_NT */
-//
-// Some compilers don't support the forward reference construct:
-// typedef struct XXXXX
-//
-// The following macro provide a workaround for such cases.
-//
+/*
+ * Some compilers don't support the forward reference construct:
+ * typedef struct XXXXX
+ *
+ * The following macro provide a workaround for such cases.
+ */
#ifdef NO_INTERFACE_DECL
#define INTERFACE_DECL(x)
#else
@@ -243,6 +244,6 @@ typedef uint32_t UINTN;
#endif
#if _MSC_EXTENSIONS
-#pragma warning ( disable : 4731 ) // Suppress warnings about modification of EBP
+#pragma warning ( disable : 4731 )
#endif
diff --git a/sys/boot/efi/include/ia64/efibind.h b/sys/boot/efi/include/ia64/efibind.h
index 348a80f..73f3469 100644
--- a/sys/boot/efi/include/ia64/efibind.h
+++ b/sys/boot/efi/include/ia64/efibind.h
@@ -20,17 +20,9 @@ Revision History
#pragma pack()
-
-//
-// Basic int types of various widths
-//
-
#include <sys/stdint.h>
-//
-// Basic EFI types of various widths
-//
-
+/* Basic EFI types of various widths. */
typedef uint64_t UINT64;
typedef int64_t INT64;
@@ -49,22 +41,17 @@ typedef int8_t INT8;
typedef int64_t INTN;
typedef uint64_t UINTN;
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// BugBug: Code to debug
-//
+/*
+ *XXX BugBug: Code to debug
+ */
#define BIT63 0x8000000000000000
-#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63)
+#define PLATFORM_IOBASE_ADDRESS (0xffffc000000 | BIT63)
#define PORT_TO_MEMD(_Port) (PLATFORM_IOBASE_ADDRESS | ( ( ( (_Port) & 0xfffc) << 10 ) | ( (_Port) & 0x0fff) ) )
-
-//
-// Macro's with casts make this much easier to use and read.
-//
+
+/* Macro's with casts make this much easier to use and read. */
#define PORT_TO_MEM8D(_Port) (*(UINT8 *)(PORT_TO_MEMD(_Port)))
#define POST_CODE(_Data) (PORT_TO_MEM8D(0x80) = (_Data))
-//
-// BugBug: End Debug Code!!!
-//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#define EFIERR(a) (0x8000000000000000 | a)
#define EFI_ERROR_MASK 0x8000000000000000
@@ -75,10 +62,10 @@ typedef uint64_t UINTN;
#define BREAKPOINT() while (TRUE)
-//
-// Pointers must be aligned to these address to function
-// you will get an alignment fault if this value is less than 8
-//
+/*
+ * Pointers must be aligned to these address to function
+ * you will get an alignment fault if this value is less than 8
+ */
#define MIN_ALIGNMENT_SIZE 8
#define ALIGN_VARIABLE(Value , Adjustment) \
@@ -87,33 +74,34 @@ typedef uint64_t UINTN;
(UINTN)Adjustment = MIN_ALIGNMENT_SIZE - ((UINTN)Value % MIN_ALIGNMENT_SIZE); \
Value = (UINTN)Value + (UINTN)Adjustment
-//
-// Define macros to create data structure signatures.
-//
+/*
+ * Define macros to create data structure signatures.
+ */
#define EFI_SIGNATURE_16(A,B) ((A) | (B<<8))
#define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16))
#define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32))
-//
-// To export & import functions in the EFI emulator environment
-//
-
- #define EXPORTAPI
-
-//
-// EFIAPI - prototype calling convention for EFI function pointers
-// BOOTSERVICE - prototype for implementation of a boot service interface
-// RUNTIMESERVICE - prototype for implementation of a runtime service interface
-// RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
-// RUNTIME_CODE - pragma macro for declaring runtime code
-//
-
-#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
- #if _MSC_EXTENSIONS
- #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
- #else
- #define EFIAPI // Substitute expresion to force C calling convention
- #endif
+
+/*
+ * To export & import functions in the EFI emulator environment
+ */
+
+#define EXPORTAPI
+
+/*
+ * EFIAPI - prototype calling convention for EFI function pointers
+ * BOOTSERVICE - prototype for implementation of a boot service interface
+ * RUNTIMESERVICE - prototype for implementation of a runtime service interface
+ * RUNTIMEFUNCTION - prototype for implementation of a runtime function that is not a service
+ * RUNTIME_CODE - pragma macro for declaring runtime code
+ */
+
+#ifndef EFIAPI /* Forces EFI calling conventions reguardless of compiler options */
+#if _MSC_EXTENSIONS
+#define EFIAPI __cdecl
+#else
+#define EFIAPI
+#endif
#endif
#define BOOTSERVICE
@@ -126,31 +114,31 @@ typedef uint64_t UINTN;
#define VOLATILE volatile
-//
-// BugBug: Need to find out if this is portable accross compliers.
-//
+/*
+ * XXX Need to find out if this is portable accross compliers.
+ */
void __mf (void);
#ifndef __GNUC__
#pragma intrinsic (__mf)
#endif
#define MEMORY_FENCE() __mf()
-//
-// When build similiar to FW, then link everything together as
-// one big module.
-//
+/*
+ * When build similiar to FW, then link everything together as
+ * one big module.
+ */
#define EFI_DRIVER_ENTRY_POINT(InitFunction)
#define LOAD_INTERNAL_DRIVER(_if, type, name, entry) \
(_if)->LoadInternal(type, name, entry)
-//
-// Some compilers don't support the forward reference construct:
-// typedef struct XXXXX
-//
-// The following macro provide a workaround for such cases.
-//
+/*
+ * Some compilers don't support the forward reference construct:
+ * typedef struct XXXXX
+ *
+ * The following macro provide a workaround for such cases.
+ */
#ifdef NO_INTERFACE_DECL
#define INTERFACE_DECL(x)
#else
OpenPOWER on IntegriCloud