]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. add public functions header.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 Apr 2008 03:36:07 +0000 (03:36 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 11 Apr 2008 03:36:07 +0000 (03:36 +0000)
2. apply for doxgen format for file header.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5043 6f19259b-4bc3-4df7-8a09-765794883524

23 files changed:
MdeModulePkg/Include/Library/DpcLib.h
MdeModulePkg/Include/Library/IpIoLib.h
MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg/Include/Library/UdpIoLib.h
MdeModulePkg/Library/DxeDpcLib/DpcLib.c
MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
MdeModulePkg/Library/DxeNetLib/NetBuffer.c
MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.c
MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S
MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.asm
MdeModulePkg/Universal/DebugSupportDxe/ipf/AsmFuncs.s
MdeModulePkg/Universal/DebugSupportDxe/ipf/Ds64Macros.i
MdeModulePkg/Universal/DebugSupportDxe/ipf/common.i
MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.S
MdeModulePkg/Universal/DebugSupportDxe/x64/AsmFuncs.asm
MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr
MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.S
MdeModulePkg/Universal/EbcDxe/Ia32/EbcLowLevel.asm
MdeModulePkg/Universal/EbcDxe/Ipf/EbcLowLevel.s
MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.S
MdeModulePkg/Universal/EbcDxe/x64/EbcLowLevel.asm

index 7771afb680845cffc4bd4ec2f92a295b2f8dbdd7..dce2ec21ef1d3884f4895504ba98b47122741268 100644 (file)
@@ -41,6 +41,7 @@ Abstract:
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 QueueDpc (\r
   IN EFI_TPL            DpcTpl,\r
   IN EFI_DPC_PROCEDURE  DpcProcedure,\r
@@ -58,6 +59,7 @@ QueueDpc (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 DispatchDpc (\r
   VOID\r
   );\r
index 3e9bde9b2c7491862029151fbfec416b12ff5874..acee69f22939996e12a2a761b27de40cb3258012 100644 (file)
@@ -1,6 +1,7 @@
 /** @file
+  This library provides IpIo layer upon EFI IP4 Protocol.\r
 
-Copyright (c) 2005 - 2007, Intel Corporation
+Copyright (c) 2005 - 2008, Intel Corporation
 All rights reserved. This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
 which accompanies this distribution.  The full text of the license may be found at
@@ -9,13 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
-Module Name:
-
-  IpIo.h
-
-Abstract:
-
-
 **/
 
 #ifndef _IP_IO_H_
@@ -176,29 +170,90 @@ typedef struct _IP_IO_IP_INFO {
   INTN                      RefCnt;
 } IP_IO_IP_INFO;
 
+/**\r
+  Create a new IP_IO instance.\r
+\r
+  @param  Image                 The image handle of an IP_IO consumer protocol.\r
+  @param  Controller            The controller handle of an IP_IO consumer protocol\r
+                                installed on.\r
+\r
+  @return Pointer to a newly created IP_IO instance.\r
+\r
+**/
 IP_IO *
+EFIAPI
 IpIoCreate (
   IN EFI_HANDLE Image,
   IN EFI_HANDLE Controller
   );
 
+/**\r
+  Destroy an IP_IO instance.\r
+\r
+  @param  IpIo                  Pointer to the IP_IO instance that needs to\r
+                                destroy.\r
+\r
+  @retval EFI_SUCCESS           The IP_IO instance destroyed successfully.\r
+  @retval other                 Error condition occurred.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 IpIoDestroy (
   IN IP_IO *IpIo
   );
 
+/**\r
+  Stop an IP_IO instance.\r
+\r
+  @param  IpIo                  Pointer to the IP_IO instance that needs to stop.\r
+\r
+  @retval EFI_SUCCESS           The IP_IO instance stopped successfully.\r
+  @retval other                 Error condition occurred.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 IpIoStop (
   IN IP_IO *IpIo
   );
 
+/**\r
+  Open an IP_IO instance for use.\r
+\r
+  @param  IpIo                  Pointer to an IP_IO instance that needs to open.\r
+  @param  OpenData              The configuration data for the IP_IO instance.\r
+\r
+  @retval EFI_SUCCESS           The IP_IO instance opened with OpenData\r
+                                successfully.\r
+  @retval other                 Error condition occurred.\r
+\r
+**/
 EFI_STATUS
 IpIoOpen (
   IN IP_IO           *IpIo,
   IN IP_IO_OPEN_DATA *OpenData
   );
 
+/**\r
+  Send out an IP packet.\r
+\r
+  @param  IpIo                  Pointer to an IP_IO instance used for sending IP\r
+                                packet.\r
+  @param  Pkt                   Pointer to the IP packet to be sent.\r
+  @param  Sender                The IP protocol instance used for sending.\r
+  @param  NotifyData\r
+  @param  Dest                  The destination IP address to send this packet to.\r
+  @param  OverrideData          The data to override some configuration of the IP\r
+                                instance used for sending.\r
+\r
+  @retval EFI_SUCCESS           The operation is completed successfully.\r
+  @retval EFI_NOT_STARTED       The IpIo is not configured.\r
+  @retval EFI_OUT_OF_RESOURCES  Failed due to resource limit.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 IpIoSend (
   IN IP_IO           *IpIo,
   IN NET_BUF         *Pkt,
@@ -209,36 +264,109 @@ IpIoSend (
   IN IP_IO_OVERRIDE  *OverrideData
   );
 
+/**\r
+  Add a new IP instance for sending data.\r
+\r
+  @param  IpIo                  Pointer to a IP_IO instance to add a new IP\r
+                                instance for sending purpose.\r
+\r
+  @return Pointer to the created IP_IO_IP_INFO structure, NULL is failed.\r
+\r
+**/
 VOID
+EFIAPI
 IpIoCancelTxToken (
   IN IP_IO  *IpIo,
   IN VOID   *Packet
   );
 
+/**\r
+  Add a new IP instance for sending data.\r
+\r
+  @param  IpIo                  Pointer to a IP_IO instance to add a new IP\r
+                                instance for sending purpose.\r
+\r
+  @return Pointer to the created IP_IO_IP_INFO structure, NULL is failed.\r
+\r
+**/
 IP_IO_IP_INFO *
+EFIAPI
 IpIoAddIp (
   IN IP_IO  *IpIo
   );
 
+/**\r
+  Configure the IP instance of this IpInfo and start the receiving if Ip4ConfigData\r
+  is not NULL.\r
+\r
+  @param  IpInfo                Pointer to the IP_IO_IP_INFO instance.\r
+  @param  Ip4ConfigData         The IP4 configure data used to configure the ip\r
+                                instance, if NULL the ip instance is reseted. If\r
+                                UseDefaultAddress is set to TRUE, and the configure\r
+                                operation succeeds, the default address information\r
+                                is written back in this Ip4ConfigData.\r
+\r
+  @retval EFI_STATUS            The status returned by IP4->Configure or\r
+                                IP4->Receive.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 IpIoConfigIp (
   IN     IP_IO_IP_INFO        *IpInfo,
   IN OUT EFI_IP4_CONFIG_DATA  *Ip4ConfigData OPTIONAL
   );
 
+/**\r
+  Destroy an IP instance maintained in IpIo->IpList for\r
+  sending purpose.\r
+\r
+  @param  IpIo                  Pointer to the IP_IO instance.\r
+  @param  IpInfo                Pointer to the IpInfo to be removed.\r
+\r
+  @return None.\r
+\r
+**/
 VOID
+EFIAPI
 IpIoRemoveIp (
   IN IP_IO            *IpIo,
   IN IP_IO_IP_INFO    *IpInfo
   );
 
+/**\r
+  Find the first IP protocol maintained in IpIo whose local\r
+  address is the same with Src.\r
+\r
+  @param  IpIo                  Pointer to the pointer of the IP_IO instance.\r
+  @param  Src                   The local IP address.\r
+\r
+  @return Pointer to the IP protocol can be used for sending purpose and its local\r
+  @return address is the same with Src.\r
+\r
+**/
 IP_IO_IP_INFO *
+EFIAPI
 IpIoFindSender (
   IN OUT IP_IO     **IpIo,
   IN     IP4_ADDR  Src
   );
 
+/**\r
+  Get the ICMP error map information, the ErrorStatus will be returned.\r
+  The IsHard and Notify are optional. If they are not NULL, this rouine will\r
+  fill them.\r
+  We move IcmpErrMap[] to local variable to enable EBC build.\r
+\r
+  @param  IcmpError             IcmpError Type\r
+  @param  IsHard                Whether it is a hard error\r
+  @param  Notify                Whether it need to notify SockError\r
+\r
+  @return ICMP Error Status\r
+\r
+**/\r
 EFI_STATUS
+EFIAPI
 IpIoGetIcmpErrStatus (
   IN  ICMP_ERROR  IcmpError,
   OUT BOOLEAN     *IsHard, OPTIONAL
index 4578d875e2b35bb0d3ce8be5f2bbf813603c85b2..cb7b65c84145b5774e80adf0734842375a9ffac6 100644 (file)
@@ -1,6 +1,7 @@
 /** @file
+  This library provides basic functiosn for UEFI network stack.
 
-Copyright (c) 2005 - 2007, Intel Corporation
+Copyright (c) 2005 - 2008, Intel Corporation
 All rights reserved. This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
 which accompanies this distribution.  The full text of the license may be found at
@@ -9,15 +10,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
-Module Name:
-
-  NetLib.h
-
-Abstract:
-
-  Library for the UEFI network stack.
-
-
 **/
 
 #ifndef _NET_LIB_H_
@@ -174,16 +166,49 @@ typedef struct {
 #define EFI_NTOHL(EfiIp)         (NTOHL (EFI_IP4 ((EfiIp))))
 #define EFI_IP4_EQUAL(Ip1, Ip2)  (CompareMem ((Ip1), (Ip2), sizeof (EFI_IPv4_ADDRESS)) == 0)
 
+/**\r
+  Return the length of the mask. If the mask is invalid,\r
+  return the invalid length 33, which is IP4_MASK_NUM.\r
+  NetMask is in the host byte order.\r
+\r
+  @param  NetMask               The netmask to get the length from\r
+\r
+  @return The length of the netmask, IP4_MASK_NUM if the mask isn't\r
+  @return supported.\r
+\r
+**/
 INTN
+EFIAPI
 NetGetMaskLength (
   IN IP4_ADDR               Mask
   );
 
+/**\r
+  Return the class of the address, such as class a, b, c.\r
+  Addr is in host byte order.\r
+\r
+  @param  Addr                  The address to get the class from\r
+\r
+  @return IP address class, such as IP4_ADDR_CLASSA\r
+\r
+**/
 INTN
+EFIAPI
 NetGetIpClass (
   IN IP4_ADDR               Addr
   );
 
+/**\r
+  Check whether the IP is a valid unicast address according to\r
+  the netmask. If NetMask is zero, use the IP address's class to\r
+  get the default mask.\r
+\r
+  @param  Ip                    The IP to check againist\r
+  @param  NetMask               The mask of the IP\r
+\r
+  @return TRUE if IP is a valid unicast address on the network, otherwise FALSE\r
+\r
+**/
 BOOLEAN
 Ip4IsUnicast (
   IN IP4_ADDR               Ip,
@@ -205,19 +230,48 @@ extern EFI_IPv4_ADDRESS  mZeroIp4Addr;
 
 #define NET_RANDOM(Seed)        ((UINT32) ((UINT32) (Seed) * 1103515245UL + 12345) % 4294967295UL)
 
-
+/**\r
+  Extract a UINT32 from a byte stream, then convert it to host\r
+  byte order. Use this function to avoid alignment error.\r
+\r
+  @param  Buf                   The buffer to extract the UINT32.\r
+\r
+  @return The UINT32 extracted.\r
+\r
+**/
 UINT32
+EFIAPI
 NetGetUint32 (
   IN UINT8                  *Buf
   );
 
+/**\r
+  Put a UINT32 to the byte stream. Convert it from host byte order\r
+  to network byte order before putting.\r
+\r
+  @param  Buf                   The buffer to put the UINT32\r
+  @param  Data                  The data to put\r
+\r
+  @return None\r
+\r
+**/
 VOID
+EFIAPI
 NetPutUint32 (
   IN UINT8                  *Buf,
   IN UINT32                 Data
   );
 
+/**\r
+  Initialize a random seed using current time.\r
+\r
+  None\r
+\r
+  @return The random seed initialized with current time.\r
+\r
+**/
 UINT32
+EFIAPI
 NetRandomInitSeed (
   VOID
   );
@@ -257,23 +311,61 @@ NetRandomInitSeed (
           NET_LIST_USER_STRUCT((ListHead)->BackLink, Type, Field)
 
 
+/**\r
+  Remove the first entry on the list\r
+\r
+  @param  Head                  The list header\r
+\r
+  @return The entry that is removed from the list, NULL if the list is empty.\r
+\r
+**/
 LIST_ENTRY *
+EFIAPI
 NetListRemoveHead (
   LIST_ENTRY            *Head
   );
 
+/**\r
+  Remove the last entry on the list\r
+\r
+  @param  Head                  The list head\r
+\r
+  @return The entry that is removed from the list, NULL if the list is empty.\r
+\r
+**/
 LIST_ENTRY *
+EFIAPI
 NetListRemoveTail (
   LIST_ENTRY            *Head
   );
 
+/**\r
+  Insert the NewEntry after the PrevEntry\r
+\r
+  @param  PrevEntry             The previous entry to insert after\r
+  @param  NewEntry              The new entry to insert\r
+\r
+  @return None\r
+\r
+**/
 VOID
+EFIAPI
 NetListInsertAfter (
   IN LIST_ENTRY         *PrevEntry,
   IN LIST_ENTRY         *NewEntry
   );
 
+/**\r
+  Insert the NewEntry before the PostEntry\r
+\r
+  @param  PostEntry             The entry to insert before\r
+  @param  NewEntry              The new entry to insert\r
+\r
+  @return None\r
+\r
+**/
 VOID
+EFIAPI
 NetListInsertBefore (
   IN LIST_ENTRY         *PostEntry,
   IN LIST_ENTRY         *NewEntry
@@ -298,60 +390,161 @@ typedef struct {
 
 #define NET_MAP_INCREAMENT  64
 
+/**\r
+  Initialize the netmap. Netmap is a reposity to keep the <Key, Value> pairs.\r
+\r
+  @param  Map                   The netmap to initialize\r
+\r
+  @return None\r
+\r
+**/
 VOID
+EFIAPI
 NetMapInit (
   IN NET_MAP                *Map
   );
 
+/**\r
+  To clean up the netmap, that is, release allocated memories.\r
+\r
+  @param  Map                   The netmap to clean up.\r
+\r
+  @return None\r
+\r
+**/
 VOID
+EFIAPI
 NetMapClean (
   IN NET_MAP                *Map
   );
 
+/**\r
+  Test whether the netmap is empty\r
+\r
+  @param  Map                   The net map to test\r
+\r
+  @return TRUE if the netmap is empty, otherwise FALSE.\r
+\r
+**/
 BOOLEAN
+EFIAPI
 NetMapIsEmpty (
   IN NET_MAP                *Map
   );
 
+/**\r
+  Return the number of the <Key, Value> pairs in the netmap.\r
+\r
+  @param  Map                   The netmap to get the entry number\r
+\r
+  @return The entry number in the netmap.\r
+\r
+**/
 UINTN
+EFIAPI
 NetMapGetCount (
   IN NET_MAP                *Map
   );
 
+/**\r
+  Allocate an item to save the <Key, Value> pair to the head of the netmap.\r
+\r
+  @param  Map                   The netmap to insert into\r
+  @param  Key                   The user's key\r
+  @param  Value                 The user's value for the key\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to allocate the memory for the item\r
+  @retval EFI_SUCCESS           The item is inserted to the head\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetMapInsertHead (
   IN NET_MAP                *Map,
   IN VOID                   *Key,
   IN VOID                   *Value    OPTIONAL
   );
 
+/**\r
+  Allocate an item to save the <Key, Value> pair to the tail of the netmap.\r
+\r
+  @param  Map                   The netmap to insert into\r
+  @param  Key                   The user's key\r
+  @param  Value                 The user's value for the key\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to allocate the memory for the item\r
+  @retval EFI_SUCCESS           The item is inserted to the tail\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetMapInsertTail (
   IN NET_MAP                *Map,
   IN VOID                   *Key,
   IN VOID                   *Value    OPTIONAL
   );
 
+/**\r
+  Find the key in the netmap\r
+\r
+  @param  Map                   The netmap to search within\r
+  @param  Key                   The key to search\r
+\r
+  @return The point to the item contains the Key, or NULL if Key isn't in the map.\r
+\r
+**/
 NET_MAP_ITEM  *
+EFIAPI
 NetMapFindKey (
   IN  NET_MAP               *Map,
   IN  VOID                  *Key
   );
 
+/**\r
+  Remove the item from the netmap\r
+\r
+  @param  Map                   The netmap to remove the item from\r
+  @param  Item                  The item to remove\r
+  @param  Value                 The variable to receive the value if not NULL\r
+\r
+  @return The key of the removed item.\r
+\r
+**/
 VOID *
+EFIAPI
 NetMapRemoveItem (
   IN  NET_MAP               *Map,
   IN  NET_MAP_ITEM          *Item,
   OUT VOID                  **Value   OPTIONAL
   );
 
+/**\r
+  Remove the first entry on the netmap\r
+\r
+  @param  Map                   The netmap to remove the head from\r
+  @param  Value                 The variable to receive the value if not NULL\r
+\r
+  @return The key of the item removed\r
+\r
+**/
 VOID *
+EFIAPI
 NetMapRemoveHead (
   IN  NET_MAP               *Map,
   OUT VOID                  **Value   OPTIONAL
   );
 
+/**\r
+  Remove the last entry on the netmap\r
+\r
+  @param  Map                   The netmap to remove the tail from\r
+  @param  Value                 The variable to receive the value if not NULL\r
+\r
+  @return The key of the item removed\r
+\r
+**/
 VOID *
+EFIAPI
 NetMapRemoveTail (
   IN  NET_MAP               *Map,
   OUT VOID                  **Value OPTIONAL
@@ -365,7 +558,21 @@ EFI_STATUS
   IN VOID                   *Arg
   );
 
+/**\r
+  Iterate through the netmap and call CallBack for each item. It will\r
+  contiue the traverse if CallBack returns EFI_SUCCESS, otherwise, break\r
+  from the loop. It returns the CallBack's last return value. This\r
+  function is delete safe for the current item.\r
+\r
+  @param  Map                   The Map to iterate through\r
+  @param  CallBack              The callback function to call for each item.\r
+  @param  Arg                   The opaque parameter to the callback\r
+\r
+  @return It returns the CallBack's last return value.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetMapIterate (
   IN NET_MAP                *Map,
   IN NET_MAP_CALLBACK       CallBack,
@@ -376,7 +583,20 @@ NetMapIterate (
 //
 // Helper functions to implement driver binding and service binding protocols.
 //
+/**\r
+  Create a child of the service that is identified by ServiceBindingGuid.\r
+\r
+  @param  Controller            The controller which has the service installed.\r
+  @param  Image                 The image handle used to open service.\r
+  @param  ServiceBindingGuid    The service's Guid.\r
+  @param  ChildHandle           The handle to receive the create child\r
+\r
+  @retval EFI_SUCCESS           The child is successfully created.\r
+  @retval Others                Failed to create the child.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetLibCreateServiceChild (
   IN  EFI_HANDLE            ControllerHandle,
   IN  EFI_HANDLE            ImageHandle,
@@ -384,7 +604,20 @@ NetLibCreateServiceChild (
   OUT EFI_HANDLE            *ChildHandle
   );
 
+/**\r
+  Destory a child of the service that is identified by ServiceBindingGuid.\r
+\r
+  @param  Controller            The controller which has the service installed.\r
+  @param  Image                 The image handle used to open service.\r
+  @param  ServiceBindingGuid    The service's Guid.\r
+  @param  ChildHandle           The child to destory\r
+\r
+  @retval EFI_SUCCESS           The child is successfully destoried.\r
+  @retval Others                Failed to destory the child.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetLibDestroyServiceChild (
   IN  EFI_HANDLE            ControllerHandle,
   IN  EFI_HANDLE            ImageHandle,
@@ -392,14 +625,46 @@ NetLibDestroyServiceChild (
   IN  EFI_HANDLE            ChildHandle
   );
 
+/**\r
+  Convert the mac address of the simple network protocol installed on\r
+  SnpHandle to a unicode string. Callers are responsible for freeing the\r
+  string storage.\r
+\r
+  @param  SnpHandle             The handle where the simple network protocol is\r
+                                installed on.\r
+  @param  ImageHandle           The image handle used to act as the agent handle to\r
+                                get the simple network protocol.\r
+  @param  MacString             The pointer to store the address of the string\r
+                                representation of  the mac address.\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  There are not enough memory resource.\r
+  @retval other                 Failed to open the simple network protocol.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetLibGetMacString (
   IN           EFI_HANDLE  SnpHandle,
   IN           EFI_HANDLE  ImageHandle,
   IN OUT       CHAR16      **MacString
   );
 
+/**\r
+  Create an IPv4 device path node.\r
+\r
+  @param  Node                  Pointer to the IPv4 device path node.\r
+  @param  Controller            The handle where the NIC IP4 config protocol resides.\r
+  @param  LocalIp               The local IPv4 address.\r
+  @param  LocalPort             The local port.\r
+  @param  RemoteIp              The remote IPv4 address.\r
+  @param  RemotePort            The remote port.\r
+  @param  Protocol              The protocol type in the IP header.\r
+  @param  UseDefaultAddress     Whether this instance is using default address or not.\r
+\r
+  @retval None\r
+**/
 VOID
+EFIAPI
 NetLibCreateIPv4DPathNode (
   IN OUT IPv4_DEVICE_PATH  *Node,
   IN EFI_HANDLE            Controller,
@@ -411,24 +676,77 @@ NetLibCreateIPv4DPathNode (
   IN BOOLEAN               UseDefaultAddress
   );
 
+/**\r
+  Find the UNDI/SNP handle from controller and protocol GUID.\r
+  For example, IP will open a MNP child to transmit/receive\r
+  packets, when MNP is stopped, IP should also be stopped. IP\r
+  needs to find its own private data which is related the IP's\r
+  service binding instance that is install on UNDI/SNP handle.\r
+  Now, the controller is either a MNP or ARP child handle. But\r
+  IP opens these handle BY_DRIVER, use that info, we can get the\r
+  UNDI/SNP handle.\r
+\r
+  @param  Controller            Then protocol handle to check\r
+  @param  ProtocolGuid          The protocol that is related with the handle.\r
+\r
+  @return The UNDI/SNP handle or NULL.\r
+\r
+**/
 EFI_HANDLE
+EFIAPI
 NetLibGetNicHandle (
   IN EFI_HANDLE             Controller,
   IN EFI_GUID               *ProtocolGuid
   );
 
+/**\r
+  Add a Deferred Procedure Call to the end of the DPC queue.\r
+\r
+  @DpcTpl           The EFI_TPL that the DPC should be invoked.\r
+  @DpcProcedure     Pointer to the DPC's function.\r
+  @DpcContext       Pointer to the DPC's context.  Passed to DpcProcedure\r
+                    when DpcProcedure is invoked.\r
+\r
+  @retval  EFI_SUCCESS              The DPC was queued.\r
+  @retval  EFI_INVALID_PARAMETER    DpcTpl is not a valid EFI_TPL.\r
+                                    DpcProcedure is NULL.\r
+  @retval  EFI_OUT_OF_RESOURCES     There are not enough resources available to\r
+                                    add the DPC to the queue.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetLibQueueDpc (
   IN EFI_TPL            DpcTpl,
   IN EFI_DPC_PROCEDURE  DpcProcedure,
   IN VOID               *DpcContext    OPTIONAL
   );
 
+/**\r
+  Add a Deferred Procedure Call to the end of the DPC queue.\r
+\r
+  @retval  EFI_SUCCESS              One or more DPCs were invoked.\r
+  @retval  EFI_NOT_FOUND            No DPCs were invoked.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetLibDispatchDpc (
   VOID
   );
 
+/**\r
+  The constructor function caches the pointer to DPC protocol.\r
+\r
+  The constructor function locates DPC protocol from protocol database.\r
+  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.\r
+\r
+  @param  ImageHandle   The firmware allocated handle for the EFI image.\r
+  @param  SystemTable   A pointer to the EFI System Table.\r
+\r
+  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.\r
+\r
+**/
 EFI_STATUS
 EFIAPI
 NetLibDefaultUnload (
@@ -580,37 +898,110 @@ typedef struct {
 #define NET_TAILSPACE(BlockOp)  \
   (UINTN)((BlockOp)->BlockTail - (BlockOp)->Tail)
 
+/**\r
+  Allocate a single block NET_BUF. Upon allocation, all the\r
+  free space is in the tail room.\r
+\r
+  @param  Len                   The length of the block.\r
+\r
+  @retval *                     Pointer to the allocated NET_BUF. If NULL  the\r
+                                allocation failed due to resource limit.\r
+\r
+**/
 NET_BUF  *
+EFIAPI
 NetbufAlloc (
   IN UINT32                 Len
   );
 
+/**\r
+  Free the buffer and its associated NET_VECTOR.\r
+\r
+  @param  Nbuf                  Pointer to the NET_BUF to be freed.\r
+\r
+  @return None.\r
+\r
+**/
 VOID
+EFIAPI
 NetbufFree (
   IN NET_BUF                *Nbuf
   );
 
-
+/**\r
+  Get the position of some byte in the net buffer. This can be used\r
+  to, for example, retrieve the IP header in the packet. It also\r
+  returns the fragment that contains the byte which is used mainly by\r
+  the buffer implementation itself.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer.\r
+  @param  Offset                The index or offset of the byte\r
+  @param  Index                 Index of the fragment that contains the block\r
+\r
+  @retval *                     Pointer to the nth byte of data in the net buffer.\r
+                                If NULL, there is no such data in the net buffer.\r
+\r
+**/
 UINT8  *
+EFIAPI
 NetbufGetByte (
   IN  NET_BUF               *Nbuf,
   IN  UINT32                Offset,
   OUT UINT32                *Index      OPTIONAL
   );
 
+/**\r
+  Create a copy of NET_BUF that share the associated NET_DATA.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer to be cloned.\r
+\r
+  @retval *                     Pointer to the cloned net buffer.\r
+\r
+**/
 NET_BUF  *
+EFIAPI
 NetbufClone (
   IN NET_BUF                *Nbuf
   );
 
+/**\r
+  Create a duplicated copy of Nbuf, data is copied. Also leave some\r
+  head space before the data.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer to be cloned.\r
+  @param  Duplicate             Pointer to the net buffer to duplicate to, if NULL\r
+                                a new net  buffer is allocated.\r
+  @param  HeadSpace             Length of the head space to reserve\r
+\r
+  @retval *                     Pointer to the duplicated net buffer.\r
+\r
+**/
 NET_BUF  *
+EFIAPI
 NetbufDuplicate (
   IN NET_BUF                *Nbuf,
   IN NET_BUF                *Duplicate    OPTIONAL,
   IN UINT32                 HeadSpace
   );
 
+/**\r
+  Create a NET_BUF structure which contains Len byte data of\r
+  Nbuf starting from Offset. A new NET_BUF structure will be\r
+  created but the associated data in NET_VECTOR is shared.\r
+  This function exists to do IP packet fragmentation.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer to be cloned.\r
+  @param  Offset                Starting point of the data to be included in new\r
+                                buffer.\r
+  @param  Len                   How many data to include in new data\r
+  @param  HeadSpace             How many bytes of head space to reserve for\r
+                                protocol header\r
+\r
+  @retval *                     Pointer to the cloned net buffer.\r
+\r
+**/
 NET_BUF  *
+EFIAPI
 NetbufGetFragment (
   IN NET_BUF                *Nbuf,
   IN UINT32                 Offset,
@@ -618,27 +1009,80 @@ NetbufGetFragment (
   IN UINT32                 HeadSpace
   );
 
+/**\r
+  Reserve some space in the header room of the buffer.\r
+  Upon allocation, all the space are in the tail room\r
+  of the buffer. Call this function to move some space\r
+  to the header room. This function is quite limited in\r
+  that it can only reserver space from the first block\r
+  of an empty NET_BUF not built from the external. But\r
+  it should be enough for the network stack.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer.\r
+  @param  Len                   The length of buffer to be reserverd.\r
+\r
+  @return None.\r
+\r
+**/
 VOID
+EFIAPI
 NetbufReserve (
   IN NET_BUF                *Nbuf,
   IN UINT32                 Len
   );
 
+/**\r
+  Allocate some space from the header or tail of the buffer.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer.\r
+  @param  Len                   The length of the buffer to be allocated.\r
+  @param  FromHead              The flag to indicate whether reserve the data from\r
+                                head or tail. TRUE for from head, and FALSE for\r
+                                from tail.\r
+\r
+  @retval *                     Pointer to the first byte of the allocated buffer.\r
+\r
+**/
 UINT8  *
+EFIAPI
 NetbufAllocSpace (
   IN NET_BUF                *Nbuf,
   IN UINT32                 Len,
   IN BOOLEAN                FromHead
   );
 
+/**\r
+  Trim some data from the header or tail of the buffer.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer.\r
+  @param  Len                   The length of the data to be trimmed.\r
+  @param  FromHead              The flag to indicate whether trim data from head or\r
+                                tail. TRUE for from head, and FALSE for from tail.\r
+\r
+  @retval UINTN                 Length of the actually trimmed data.\r
+\r
+**/
 UINT32
+EFIAPI
 NetbufTrim (
   IN NET_BUF                *Nbuf,
   IN UINT32                 Len,
   IN BOOLEAN                FromHead
   );
 
+/**\r
+  Copy the data from the specific offset to the destination.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer.\r
+  @param  Offset                The sequence number of the first byte to copy.\r
+  @param  Len                   Length of the data to copy.\r
+  @param  Dest                  The destination of the data to copy to.\r
+\r
+  @retval UINTN                 The length of the copied data.\r
+\r
+**/
 UINT32
+EFIAPI
 NetbufCopy (
   IN NET_BUF                *Nbuf,
   IN UINT32                 Offset,
@@ -646,7 +1090,24 @@ NetbufCopy (
   IN UINT8                  *Dest
   );
 
+/**\r
+  Build a NET_BUF from external blocks.\r
+\r
+  @param  ExtFragment           Pointer to the data block.\r
+  @param  ExtNum                The number of the data block.\r
+  @param  HeadSpace             The head space to be reserved.\r
+  @param  HeadLen               The length of the protocol header, This function\r
+                                will pull that number of data into a linear block.\r
+  @param  ExtFree               Pointer to the caller provided free function.\r
+  @param  Arg                   The argument passed to ExtFree when ExtFree is\r
+                                called.\r
+\r
+  @retval *                     Pointer to the net buffer built from the data\r
+                                blocks.\r
+\r
+**/
 NET_BUF  *
+EFIAPI
 NetbufFromExt (
   IN NET_FRAGMENT           *ExtFragment,
   IN UINT32                 ExtNum,
@@ -656,14 +1117,43 @@ NetbufFromExt (
   IN VOID                   *Arg          OPTIONAL
   );
 
+/**\r
+  Build a fragment table to contain the fragments in the\r
+  buffer. This is the opposite of the NetbufFromExt.\r
+\r
+  @param  Nbuf                  Point to the net buffer\r
+  @param  ExtFragment           Pointer to the data block.\r
+  @param  ExtNum                The number of the data block.\r
+\r
+  @retval EFI_BUFFER_TOO_SMALL  The number of non-empty block is bigger than ExtNum\r
+  @retval EFI_SUCCESS           Fragment table built.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 NetbufBuildExt (
   IN NET_BUF                *Nbuf,
   IN NET_FRAGMENT           *ExtFragment,
   IN UINT32                 *ExtNum
   );
 
+/**\r
+  Build a NET_BUF from a list of NET_BUF.\r
+\r
+  @param  BufList               A List of NET_BUF.\r
+  @param  HeadSpace             The head space to be reserved.\r
+  @param  HeaderLen             The length of the protocol header, This function\r
+                                will pull that number of data into a linear block.\r
+  @param  ExtFree               Pointer to the caller provided free function.\r
+  @param  Arg                   The argument passed to ExtFree when ExtFree is\r
+                                called.\r
+\r
+  @retval *                     Pointer to the net buffer built from the data\r
+                                blocks.\r
+\r
+**/
 NET_BUF  *
+EFIAPI
 NetbufFromBufList (
   IN LIST_ENTRY             *BufList,
   IN UINT32                 HeadSpace,
@@ -672,74 +1162,207 @@ NetbufFromBufList (
   IN VOID                   *Arg                OPTIONAL
   );
 
+/**\r
+  Free a list of net buffers.\r
+\r
+  @param  Head                  Pointer to the head of linked net buffers.\r
+\r
+  @return None.\r
+\r
+**/
 VOID
+EFIAPI
 NetbufFreeList (
   IN LIST_ENTRY             *Head
   );
 
+/**\r
+  Initiate the net buffer queue.\r
+\r
+  @param  NbufQue               Pointer to the net buffer queue to be initiated.\r
+\r
+  @return None.\r
+\r
+**/
 VOID
+EFIAPI
 NetbufQueInit (
   IN NET_BUF_QUEUE          *NbufQue
   );
 
+/**\r
+  Allocate an initialized net buffer queue.\r
+\r
+  None.\r
+\r
+  @retval *                     Pointer to the allocated net buffer queue.\r
+\r
+**/
 NET_BUF_QUEUE  *
+EFIAPI
 NetbufQueAlloc (
   VOID
   );
 
+/**\r
+  Free a net buffer queue.\r
+\r
+  @param  NbufQue               Poitner to the net buffer queue to be freed.\r
+\r
+  @return None.\r
+\r
+**/
 VOID
+EFIAPI
 NetbufQueFree (
   IN NET_BUF_QUEUE          *NbufQue
   );
 
+/**\r
+  Remove a net buffer from head in the specific queue.\r
+\r
+  @param  NbufQue               Pointer to the net buffer queue.\r
+\r
+  @retval *                     Pointer to the net buffer removed from the specific\r
+                                queue.\r
+\r
+**/
 NET_BUF  *
+EFIAPI
 NetbufQueRemove (
   IN NET_BUF_QUEUE          *NbufQue
   );
 
+/**\r
+  Append a buffer to the end of the queue.\r
+\r
+  @param  NbufQue               Pointer to the net buffer queue.\r
+  @param  Nbuf                  Pointer to the net buffer to be appended.\r
+\r
+  @return None.\r
+\r
+**/
 VOID
+EFIAPI
 NetbufQueAppend (
   IN NET_BUF_QUEUE          *NbufQue,
   IN NET_BUF                *Nbuf
   );
-
+\r
+/**\r
+  Copy some data from the buffer queue to the destination.\r
+\r
+  @param  NbufQue               Pointer to the net buffer queue.\r
+  @param  Offset                The sequence number of the first byte to copy.\r
+  @param  Len                   Length of the data to copy.\r
+  @param  Dest                  The destination of the data to copy to.\r
+\r
+  @retval UINTN                 The length of the copied data.\r
+\r
+**/
 UINT32
+EFIAPI
 NetbufQueCopy (
   IN NET_BUF_QUEUE          *NbufQue,
   IN UINT32                 Offset,
   IN UINT32                 Len,
   IN UINT8                  *Dest
   );
-
+\r
+/**\r
+  Copy some data from the buffer queue to the destination.\r
+\r
+  @param  NbufQue               Pointer to the net buffer queue.\r
+  @param  Offset                The sequence number of the first byte to copy.\r
+  @param  Len                   Length of the data to copy.\r
+  @param  Dest                  The destination of the data to copy to.\r
+\r
+  @retval UINTN                 The length of the copied data.\r
+\r
+**/
 UINT32
+EFIAPI
 NetbufQueTrim (
   IN NET_BUF_QUEUE          *NbufQue,
   IN UINT32                 Len
   );
 
+\r
+/**\r
+  Flush the net buffer queue.\r
+\r
+  @param  NbufQue               Pointer to the queue to be flushed.\r
+\r
+  @return None.\r
+\r
+**/
 VOID
+EFIAPI
 NetbufQueFlush (
   IN NET_BUF_QUEUE          *NbufQue
   );
-
+\r
+/**\r
+  Compute checksum for a bulk of data.\r
+\r
+  @param  Bulk                  Pointer to the data.\r
+  @param  Len                   Length of the data, in bytes.\r
+\r
+  @retval UINT16                The computed checksum.\r
+\r
+**/
 UINT16
+EFIAPI
 NetblockChecksum (
   IN UINT8                  *Bulk,
   IN UINT32                 Len
   );
 
+/**\r
+  Add two checksums.\r
+\r
+  @param  Checksum1             The first checksum to be added.\r
+  @param  Checksum2             The second checksum to be added.\r
+\r
+  @retval UINT16                The new checksum.\r
+\r
+**/\r
 UINT16
+EFIAPI
 NetAddChecksum (
   IN UINT16                 Checksum1,
   IN UINT16                 Checksum2
   );
 
+/**\r
+  Compute the checksum for a NET_BUF.\r
+\r
+  @param  Nbuf                  Pointer to the net buffer.\r
+\r
+  @retval UINT16                The computed checksum.\r
+\r
+**/
 UINT16
+EFIAPI
 NetbufChecksum (
   IN NET_BUF                *Nbuf
   );
 
+/**\r
+  Compute the checksum for TCP/UDP pseudo header.\r
+  Src, Dst are in network byte order. and Len is\r
+  in host byte order.\r
+\r
+  @param  Src                   The source address of the packet.\r
+  @param  Dst                   The destination address of the packet.\r
+  @param  Proto                 The protocol type of the packet.\r
+  @param  Len                   The length of the packet.\r
+\r
+  @retval UINT16                The computed checksum.\r
+\r
+**/
 UINT16
+EFIAPI
 NetPseudoHeadChecksum (
   IN IP4_ADDR               Src,
   IN IP4_ADDR               Dst,
index 1b4a759345f4dc03bc40ce4ac9b7e951805e51e7..bf9f7de34666e1d25ee3a51de1f0d61a4c5414d8 100644 (file)
@@ -1,6 +1,8 @@
 /** @file
+  The helper routines to access UDP service. It is used by both
+  DHCP and MTFTP.
 
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2008, Intel Corporation
 All rights reserved. This program and the accompanying materials
 are licensed and made available under the terms and conditions of the BSD License
 which accompanies this distribution.  The full text of the license may be found at
@@ -9,17 +11,6 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
-
-Module Name:
-
-  Udp4Io.h
-
-Abstract:
-
-  The helper routines to access UDP service. It is used by both
-  DHCP and MTFTP.
-
-
 **/
 
 #ifndef _UDP4IO_H_
@@ -133,7 +124,21 @@ BOOLEAN
   IN VOID                   *Context
   );
 
+/**\r
+  Create a UDP IO port to access the UDP service. It will\r
+  create and configure a UDP child.\r
+\r
+  @param  Controller            The controller that has the UDP service binding\r
+                                protocol installed.\r
+  @param  Image                 The image handle for the driver.\r
+  @param  Configure             The function to configure the created UDP child\r
+  @param  Context               The opaque parameter for the Configure funtion.\r
+\r
+  @return A point to just created UDP IO port or NULL if failed.\r
+\r
+**/
 UDP_IO_PORT *
+EFIAPI
 UdpIoCreatePort (
   IN  EFI_HANDLE            Controller,
   IN  EFI_HANDLE            ImageHandle,
@@ -141,17 +146,55 @@ UdpIoCreatePort (
   IN  VOID                  *Context
   );
 
+/**\r
+  Free the UDP IO port and all its related resources including\r
+  all the transmitted packet.\r
+\r
+  @param  UdpIo                 The UDP IO port to free.\r
+\r
+  @retval EFI_SUCCESS           The UDP IO port is freed.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 UdpIoFreePort (
   IN  UDP_IO_PORT           *UdpIo
   );
 
+/**\r
+  Clean up the UDP IO port. It will release all the transmitted\r
+  datagrams and receive request. It will also configure NULL the\r
+  UDP child.\r
+\r
+  @param  UdpIo                 UDP IO port to clean up.\r
+\r
+  @return None\r
+\r
+**/
 VOID
+EFIAPI
 UdpIoCleanPort (
   IN  UDP_IO_PORT           *UdpIo
   );
 
+/**\r
+  Send a packet through the UDP IO port.\r
+\r
+  @param  UdpIo                 The UDP IO Port to send the packet through\r
+  @param  Packet                The packet to send\r
+  @param  EndPoint              The local and remote access point\r
+  @param  Gateway               The gateway to use\r
+  @param  CallBack              The call back function to call when packet is\r
+                                transmitted or failed.\r
+  @param  Context               The opque parameter to the CallBack\r
+\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to allocate resource for the packet\r
+  @retval EFI_SUCCESS           The packet is successfully delivered to UDP  for\r
+                                transmission.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 UdpIoSendDatagram (
   IN  UDP_IO_PORT           *UdpIo,
   IN  NET_BUF               *Packet,
@@ -161,13 +204,39 @@ UdpIoSendDatagram (
   IN  VOID                  *Context
   );
 
+/**\r
+  The selection function to cancel a single sent datagram.\r
+\r
+  @param  Token                 The UDP TX token to test againist.\r
+  @param  Context               The context\r
+\r
+  @return TRUE if the packet is to be cancelled, otherwise FALSE.\r
+\r
+**/
 VOID
+EFIAPI
 UdpIoCancelSentDatagram (
   IN  UDP_IO_PORT           *UdpIo,
   IN  NET_BUF               *Packet
   );
 
+/**\r
+  Issue a receive request to the UDP IO port.\r
+\r
+  @param  UdpIo                 The UDP IO port to recieve the packet from.\r
+  @param  CallBack              The call back function to execute when receive\r
+                                finished.\r
+  @param  Context               The opque context to the call back\r
+  @param  HeadLen               The lenght of the application's header\r
+\r
+  @retval EFI_ALREADY_STARTED   There is already a pending receive request. Only\r
+                                one receive request is supported.\r
+  @retval EFI_OUT_OF_RESOURCES  Failed to allocate some resource.\r
+  @retval EFI_SUCCESS           The receive request is issued successfully.\r
+\r
+**/
 EFI_STATUS
+EFIAPI
 UdpIoRecvDatagram (
   IN  UDP_IO_PORT           *UdpIo,
   IN  UDP_IO_CALLBACK       CallBack,
index bc834f7a3e981fdf8dfe2ce46850625cfa0583d7..bdbf8dcbb71d6a9e6691b6ef9c6075fd1cb1da8e 100644 (file)
@@ -70,6 +70,7 @@ DpcLibConstructor (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 QueueDpc (\r
   IN EFI_TPL            DpcTpl,\r
   IN EFI_DPC_PROCEDURE  DpcProcedure,\r
@@ -93,6 +94,7 @@ QueueDpc (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 DispatchDpc (\r
   VOID\r
   )\r
index 4674d7d028aa49f8ad9d93ad53dce93ed6fdfded..025bcdb5a7e942ad6a4ef1dd22435bf80c2dc3b7 100644 (file)
@@ -783,6 +783,7 @@ IpIoListenHandler (
 \r
 **/\r
 IP_IO *\r
+EFIAPI\r
 IpIoCreate (\r
   IN EFI_HANDLE Image,\r
   IN EFI_HANDLE Controller\r
@@ -851,6 +852,7 @@ ReleaseIpIo:
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 IpIoOpen (\r
   IN IP_IO           *IpIo,\r
   IN IP_IO_OPEN_DATA *OpenData\r
@@ -984,6 +986,7 @@ IpIoStop (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 IpIoDestroy (\r
   IN IP_IO *IpIo\r
   )\r
@@ -1022,6 +1025,7 @@ IpIoDestroy (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 IpIoSend (\r
   IN IP_IO           *IpIo,\r
   IN NET_BUF         *Pkt,\r
@@ -1072,6 +1076,7 @@ IpIoSend (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 IpIoCancelTxToken (\r
   IN IP_IO  *IpIo,\r
   IN VOID   *Packet\r
@@ -1109,6 +1114,7 @@ IpIoCancelTxToken (
 \r
 **/\r
 IP_IO_IP_INFO *\r
+EFIAPI\r
 IpIoAddIp (\r
   IN IP_IO  *IpIo\r
   )\r
@@ -1199,6 +1205,7 @@ ReleaseIpInfo:
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 IpIoConfigIp (\r
   IN     IP_IO_IP_INFO        *IpInfo,\r
   IN OUT EFI_IP4_CONFIG_DATA  *Ip4ConfigData OPTIONAL\r
@@ -1269,6 +1276,7 @@ OnExit:
 \r
 **/\r
 VOID\r
+EFIAPI\r
 IpIoRemoveIp (\r
   IN IP_IO          *IpIo,\r
   IN IP_IO_IP_INFO  *IpInfo\r
@@ -1307,6 +1315,7 @@ IpIoRemoveIp (
 \r
 **/\r
 IP_IO_IP_INFO *\r
+EFIAPI\r
 IpIoFindSender (\r
   IN OUT IP_IO     **IpIo,\r
   IN     IP4_ADDR  Src\r
@@ -1355,6 +1364,7 @@ IpIoFindSender (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 IpIoGetIcmpErrStatus (\r
   IN  ICMP_ERROR  IcmpError,\r
   OUT BOOLEAN     *IsHard, OPTIONAL\r
index b813db37ccae2fb46d1c88c4abe384b51b691509..a1525ee69f5699356f3472eecc868299b2d34b3f 100644 (file)
@@ -123,6 +123,7 @@ NibbleToHexChar (
 \r
 **/\r
 INTN\r
+EFIAPI\r
 NetGetMaskLength (\r
   IN IP4_ADDR               NetMask\r
   )\r
@@ -150,6 +151,7 @@ NetGetMaskLength (
 \r
 **/\r
 INTN\r
+EFIAPI\r
 NetGetIpClass (\r
   IN IP4_ADDR               Addr\r
   )\r
@@ -189,6 +191,7 @@ NetGetIpClass (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 Ip4IsUnicast (\r
   IN IP4_ADDR               Ip,\r
   IN IP4_ADDR               NetMask\r
@@ -223,6 +226,7 @@ Ip4IsUnicast (
 \r
 **/\r
 UINT32\r
+EFIAPI\r
 NetRandomInitSeed (\r
   VOID\r
   )\r
@@ -249,6 +253,7 @@ NetRandomInitSeed (
 \r
 **/\r
 UINT32\r
+EFIAPI\r
 NetGetUint32 (\r
   IN UINT8                  *Buf\r
   )\r
@@ -271,6 +276,7 @@ NetGetUint32 (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetPutUint32 (\r
   IN UINT8                  *Buf,\r
   IN UINT32                 Data\r
@@ -290,6 +296,7 @@ NetPutUint32 (
 \r
 **/\r
 LIST_ENTRY *\r
+EFIAPI\r
 NetListRemoveHead (\r
   LIST_ENTRY            *Head\r
   )\r
@@ -324,6 +331,7 @@ NetListRemoveHead (
 \r
 **/\r
 LIST_ENTRY *\r
+EFIAPI\r
 NetListRemoveTail (\r
   LIST_ENTRY            *Head\r
   )\r
@@ -359,6 +367,7 @@ NetListRemoveTail (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetListInsertAfter (\r
   IN LIST_ENTRY         *PrevEntry,\r
   IN LIST_ENTRY         *NewEntry\r
@@ -381,6 +390,7 @@ NetListInsertAfter (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetListInsertBefore (\r
   IN LIST_ENTRY     *PostEntry,\r
   IN LIST_ENTRY     *NewEntry\r
@@ -402,6 +412,7 @@ NetListInsertBefore (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetMapInit (\r
   IN NET_MAP                *Map\r
   )\r
@@ -423,6 +434,7 @@ NetMapInit (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetMapClean (\r
   IN NET_MAP                *Map\r
   )\r
@@ -464,6 +476,7 @@ NetMapClean (
 \r
 **/\r
 BOOLEAN\r
+EFIAPI\r
 NetMapIsEmpty (\r
   IN NET_MAP                *Map\r
   )\r
@@ -482,6 +495,7 @@ NetMapIsEmpty (
 \r
 **/\r
 UINTN\r
+EFIAPI\r
 NetMapGetCount (\r
   IN NET_MAP                *Map\r
   )\r
@@ -548,6 +562,7 @@ NetMapAllocItem (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetMapInsertHead (\r
   IN NET_MAP                *Map,\r
   IN VOID                   *Key,\r
@@ -585,6 +600,7 @@ NetMapInsertHead (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetMapInsertTail (\r
   IN NET_MAP                *Map,\r
   IN VOID                   *Key,\r
@@ -649,6 +665,7 @@ NetItemInMap (
 \r
 **/\r
 NET_MAP_ITEM *\r
+EFIAPI\r
 NetMapFindKey (\r
   IN  NET_MAP               *Map,\r
   IN  VOID                  *Key\r
@@ -682,6 +699,7 @@ NetMapFindKey (
 \r
 **/\r
 VOID *\r
+EFIAPI\r
 NetMapRemoveItem (\r
   IN  NET_MAP             *Map,\r
   IN  NET_MAP_ITEM        *Item,\r
@@ -713,6 +731,7 @@ NetMapRemoveItem (
 \r
 **/\r
 VOID *\r
+EFIAPI\r
 NetMapRemoveHead (\r
   IN  NET_MAP               *Map,\r
   OUT VOID                  **Value         OPTIONAL\r
@@ -749,6 +768,7 @@ NetMapRemoveHead (
 \r
 **/\r
 VOID *\r
+EFIAPI\r
 NetMapRemoveTail (\r
   IN  NET_MAP               *Map,\r
   OUT VOID                  **Value       OPTIONAL\r
@@ -789,6 +809,7 @@ NetMapRemoveTail (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetMapIterate (\r
   IN NET_MAP                *Map,\r
   IN NET_MAP_CALLBACK       CallBack,\r
@@ -950,6 +971,7 @@ NetLibDefaultUnload (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibCreateServiceChild (\r
   IN  EFI_HANDLE            Controller,\r
   IN  EFI_HANDLE            Image,\r
@@ -1000,6 +1022,7 @@ NetLibCreateServiceChild (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibDestroyServiceChild (\r
   IN  EFI_HANDLE            Controller,\r
   IN  EFI_HANDLE            Image,\r
@@ -1053,6 +1076,7 @@ NetLibDestroyServiceChild (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibGetMacString (\r
   IN           EFI_HANDLE  SnpHandle,\r
   IN           EFI_HANDLE  ImageHandle,\r
@@ -1181,6 +1205,7 @@ ON_EXIT:
   @retval None\r
 **/\r
 VOID\r
+EFIAPI\r
 NetLibCreateIPv4DPathNode (\r
   IN OUT IPv4_DEVICE_PATH  *Node,\r
   IN EFI_HANDLE            Controller,\r
@@ -1229,6 +1254,7 @@ NetLibCreateIPv4DPathNode (
 \r
 **/\r
 EFI_HANDLE\r
+EFIAPI\r
 NetLibGetNicHandle (\r
   IN EFI_HANDLE             Controller,\r
   IN EFI_GUID               *ProtocolGuid\r
@@ -1280,6 +1306,7 @@ NetLibGetNicHandle (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibQueueDpc (\r
   IN EFI_TPL            DpcTpl,\r
   IN EFI_DPC_PROCEDURE  DpcProcedure,\r
@@ -1297,6 +1324,7 @@ NetLibQueueDpc (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetLibDispatchDpc (\r
   VOID\r
   )\r
index 69e9082f02f60bc289b8bd64db9502eb015a6aa0..427073d66d68a231caa2a545407b65dc51a6ba96 100644 (file)
@@ -100,6 +100,7 @@ FreeNbuf:
 \r
 **/\r
 NET_BUF  *\r
+EFIAPI\r
 NetbufAlloc (\r
   IN UINT32                 Len\r
   )\r
@@ -202,6 +203,7 @@ NetbufFreeVector (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetbufFree (\r
   IN NET_BUF                *Nbuf\r
   )\r
@@ -231,6 +233,7 @@ NetbufFree (
 \r
 **/\r
 NET_BUF  *\r
+EFIAPI\r
 NetbufClone (\r
   IN NET_BUF                *Nbuf\r
   )\r
@@ -278,6 +281,7 @@ NetbufClone (
 \r
 **/\r
 NET_BUF  *\r
+EFIAPI\r
 NetbufDuplicate (\r
   IN NET_BUF                *Nbuf,\r
   IN NET_BUF                *Duplicate        OPTIONAL,\r
@@ -319,6 +323,7 @@ NetbufDuplicate (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetbufFreeList (\r
   IN LIST_ENTRY             *Head\r
   )\r
@@ -356,6 +361,7 @@ NetbufFreeList (
 \r
 **/\r
 UINT8  *\r
+EFIAPI\r
 NetbufGetByte (\r
   IN  NET_BUF               *Nbuf,\r
   IN  UINT32                Offset,\r
@@ -517,6 +523,7 @@ NetbufGetFragmentFree (
 \r
 **/\r
 NET_BUF  *\r
+EFIAPI\r
 NetbufGetFragment (\r
   IN NET_BUF                *Nbuf,\r
   IN UINT32                 Offset,\r
@@ -699,6 +706,7 @@ FreeChild:
 \r
 **/\r
 NET_BUF  *\r
+EFIAPI\r
 NetbufFromExt (\r
   IN NET_FRAGMENT           *ExtFragment,\r
   IN UINT32                 ExtNum,\r
@@ -869,6 +877,7 @@ FreeFirstBlock:
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 NetbufBuildExt (\r
   IN NET_BUF                *Nbuf,\r
   IN NET_FRAGMENT           *ExtFragment,\r
@@ -915,6 +924,7 @@ NetbufBuildExt (
 \r
 **/\r
 NET_BUF  *\r
+EFIAPI\r
 NetbufFromBufList (\r
   IN LIST_ENTRY             *BufList,\r
   IN UINT32                 HeadSpace,\r
@@ -988,6 +998,7 @@ NetbufFromBufList (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetbufReserve (\r
   IN NET_BUF                *Nbuf,\r
   IN UINT32                 Len\r
@@ -1019,6 +1030,7 @@ NetbufReserve (
 \r
 **/\r
 UINT8  *\r
+EFIAPI\r
 NetbufAllocSpace (\r
   IN NET_BUF                *Nbuf,\r
   IN UINT32                 Len,\r
@@ -1140,6 +1152,7 @@ NetblockTrim (
 \r
 **/\r
 UINT32\r
+EFIAPI\r
 NetbufTrim (\r
   IN NET_BUF                *Nbuf,\r
   IN UINT32                 Len,\r
@@ -1204,6 +1217,7 @@ NetbufTrim (
 \r
 **/\r
 UINT32\r
+EFIAPI\r
 NetbufCopy (\r
   IN NET_BUF                *Nbuf,\r
   IN UINT32                 Offset,\r
@@ -1300,6 +1314,7 @@ NetbufCopy (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetbufQueInit (\r
   IN NET_BUF_QUEUE          *NbufQue\r
   )\r
@@ -1323,6 +1338,7 @@ NetbufQueInit (
 \r
 **/\r
 NET_BUF_QUEUE  *\r
+EFIAPI\r
 NetbufQueAlloc (\r
   VOID\r
   )\r
@@ -1349,6 +1365,7 @@ NetbufQueAlloc (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetbufQueFree (\r
   IN NET_BUF_QUEUE          *NbufQue\r
   )\r
@@ -1374,6 +1391,7 @@ NetbufQueFree (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetbufQueAppend (\r
   IN NET_BUF_QUEUE          *NbufQue,\r
   IN NET_BUF                *Nbuf\r
@@ -1399,6 +1417,7 @@ NetbufQueAppend (
 \r
 **/\r
 NET_BUF  *\r
+EFIAPI\r
 NetbufQueRemove (\r
   IN NET_BUF_QUEUE          *NbufQue\r
   )\r
@@ -1528,6 +1547,7 @@ NetbufQueCopy (
 \r
 **/\r
 UINT32\r
+EFIAPI\r
 NetbufQueTrim (\r
   IN NET_BUF_QUEUE          *NbufQue,\r
   IN UINT32                 Len\r
@@ -1586,6 +1606,7 @@ NetbufQueTrim (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 NetbufQueFlush (\r
   IN NET_BUF_QUEUE          *NbufQue\r
   )\r
@@ -1609,6 +1630,7 @@ NetbufQueFlush (
 \r
 **/\r
 UINT16\r
+EFIAPI\r
 NetblockChecksum (\r
   IN UINT8                  *Bulk,\r
   IN UINT32                 Len\r
@@ -1653,6 +1675,7 @@ NetblockChecksum (
 \r
 **/\r
 UINT16\r
+EFIAPI\r
 NetAddChecksum (\r
   IN UINT16                 Checksum1,\r
   IN UINT16                 Checksum2\r
@@ -1683,6 +1706,7 @@ NetAddChecksum (
 \r
 **/\r
 UINT16\r
+EFIAPI\r
 NetbufChecksum (\r
   IN NET_BUF                *Nbuf\r
   )\r
@@ -1736,6 +1760,7 @@ NetbufChecksum (
 \r
 **/\r
 UINT16\r
+EFIAPI\r
 NetPseudoHeadChecksum (\r
   IN IP4_ADDR               Src,\r
   IN IP4_ADDR               Dst,\r
index 864da9b986b22ef779581d2cf1a33988fe2d3405..ff9cb364f7ca9141090db5087b1d045f652a1bf5 100644 (file)
@@ -256,6 +256,7 @@ UdpIoFreeRxToken (
 \r
 **/\r
 UDP_IO_PORT *\r
+EFIAPI\r
 UdpIoCreatePort (\r
   IN  EFI_HANDLE            Controller,\r
   IN  EFI_HANDLE            Image,\r
@@ -387,6 +388,7 @@ UdpIoCancelDgrams (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 UdpIoFreePort (\r
   IN  UDP_IO_PORT           *UdpIo\r
   )\r
@@ -444,6 +446,7 @@ UdpIoFreePort (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 UdpIoCleanPort (\r
   IN  UDP_IO_PORT           *UdpIo\r
   )\r
@@ -532,6 +535,7 @@ UdpIoOnDgramSent (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 UdpIoSendDatagram (\r
   IN  UDP_IO_PORT           *UdpIo,\r
   IN  NET_BUF               *Packet,\r
@@ -604,6 +608,7 @@ UdpIoCancelSingleDgram (
 \r
 **/\r
 VOID\r
+EFIAPI\r
 UdpIoCancelSentDatagram (\r
   IN  UDP_IO_PORT           *UdpIo,\r
   IN  NET_BUF               *Packet\r
@@ -772,6 +777,7 @@ Returns:
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 UdpIoRecvDatagram (\r
   IN  UDP_IO_PORT           *UdpIo,\r
   IN  UDP_IO_CALLBACK       CallBack,\r
index 0dddb3b5500c30bd0ae0c37153292860348759dd..965828cf56799c08b6ef19f7571a1c92b73b4462 100644 (file)
@@ -1,15 +1,16 @@
-#******************************************************************************\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
-#******************************************************************************\r
+#/**@file\r
+# Low leve IA32 specific debug support functions.\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
+#**/\r
 \r
 .globl ASM_PFX(OrigVector)\r
 .globl ASM_PFX(InterruptEntryStub)\r
@@ -29,12 +30,12 @@ ASM_PFX(StubSize):       .long   ASM_PFX(InterruptEntryStubEnd) - ASM_PFX(Interr
 ASM_PFX(FxStorSupport):\r
         push   %ebx\r
         mov    $0x1,%eax\r
-        cpuid  \r
+        cpuid\r
         mov    %edx,%eax\r
         and    $0x1000000,%eax\r
         shr    $0x18,%eax\r
         pop    %ebx\r
-        ret    \r
+        ret\r
 \r
 .globl ASM_PFX(GetIdtr)\r
 ASM_PFX(GetIdtr):\r
@@ -43,25 +44,25 @@ ASM_PFX(GetIdtr):
         add    $0xfffffff8,%esp\r
         sidtl  0xfffffffa(%ebp)\r
         mov    0xfffffffc(%ebp),%eax\r
-        leave  \r
-        ret    \r
+        leave\r
+        ret\r
 \r
 .globl ASM_PFX(WriteInterruptFlag)\r
 ASM_PFX(WriteInterruptFlag):\r
         push   %ebp\r
         mov    %esp,%ebp\r
-        pushf  \r
+        pushf\r
         pop    %eax\r
         and    $0x200,%eax\r
         shr    $0x9,%eax\r
         mov    0x8(%ebp),%ecx\r
         or     %cl,%cl\r
         jne    ASM_PFX(WriteInterruptFlag+0x17)\r
-        cli    \r
+        cli\r
         jmp    ASM_PFX(WriteInterruptFlag+0x18)\r
-        sti    \r
-        leave  \r
-        ret    \r
+        sti\r
+        leave\r
+        ret\r
 \r
 .globl ASM_PFX(Vect2Desc)\r
 ASM_PFX(Vect2Desc):\r
@@ -74,8 +75,8 @@ ASM_PFX(Vect2Desc):
         movw   $0x8e00,0x4(%ecx)\r
         shr    $0x10,%eax\r
         mov    %ax,0x6(%ecx)\r
-        leave  \r
-        ret    \r
+        leave\r
+        ret\r
 \r
 .globl ASM_PFX(InterruptEntryStub)\r
 ASM_PFX(InterruptEntryStub):\r
@@ -88,8 +89,8 @@ ASM_PFX(InterruptEntryStubEnd):
 \r
 .globl ASM_PFX(CommonIdtEntry)\r
 ASM_PFX(CommonIdtEntry):\r
-        pusha  \r
-        pushf  \r
+        pusha\r
+        pushf\r
         pop    %eax\r
         mov    %eax,0x0\r
         cmpl   $0x8,0x0\r
@@ -259,12 +260,12 @@ ASM_PFX(CommonIdtEntry):
         push   %ebx\r
         push   %cs\r
         push   $0x0\r
-        iret   \r
+        iret\r
 \r
 PhonyIretd:\r
-        popa   \r
+        popa\r
         mov    0x0,%esp\r
         jmp    *0x0\r
-        popa   \r
+        popa\r
         mov    0x0,%esp\r
-        iret   \r
+        iret\r
index 28a43cfe637cc950d1689eee8ae7a376252e924c..315120ef9472d6db7f00dab1519115e7fe92b9a9 100644 (file)
@@ -1,15 +1,16 @@
-;******************************************************************************\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
-;******************************************************************************\r
+;/** @file\r
+;  Low leve IA32 specific debug support functions.\r
+;\r
+;  Copyright (c) 2006, Intel Corporation. <BR>\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
+;**/\r
 \r
 .586p\r
 .MODEL          FLAT, C\r
@@ -95,7 +96,7 @@ OrigVector      dd      66666666h ; ?
 align           16\r
 DebugStackEnd   db      "DbgStkEnd >>>>>>"      ;; 16 byte long string - must be 16 bytes to preserve alignment\r
                 dd      1ffdh dup (000000000h)  ;; 32K should be enough stack\r
-                                                ;;   This allocation is coocked to insure \r
+                                                ;;   This allocation is coocked to insure\r
                                                 ;;   that the the buffer for the FXSTORE instruction\r
                                                 ;;   will be 16 byte aligned also.\r
                                                 ;;\r
index 866e5db9a8481336d8935bad8dbccdf22402d775..23a5eb487f8cf29684b478b2b2f3404a0815c433 100644 (file)
@@ -1,24 +1,18 @@
-//++\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:\r
-//\r
-//  AsmFuncs.s\r
-//\r
-// Abstract:\r
-//\r
-//  Low level IPF routines used by the debug support driver\r
-//\r
-// Revision History:\r
-//\r
-//--\r
+/// @file\r
+///  Low level IPF routines used by the debug support driver\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: AsmFuncs.s\r
+///\r
+///\r
 \r
 \r
 #include "common.i"\r
@@ -127,32 +121,32 @@ LoopBack:   // $L143:
 //      our chained handler installed:\r
 //\r
 //\r
-//                                                 \r
-//                                                 \r
-//                           \r
-//      This IVT entry is      Failsafe bundle     \r
-//      reserved by the         \r
-//      Itanium architecture   Original bundle 0   \r
-//      and is used for         \r
-//      for locating our                           \r
-//      handler and the                            \r
-//      original bundle        Patch code...       \r
-//      zero of the ext                            \r
-//      interrupt handler                          \r
-//                              \r
-//      RSVD    (3400)         Unused              \r
-//                           \r
-//                                                 \r
-//                                                 \r
-//                                                 \r
-//                                                 \r
-//                                                 \r
-//                                                 \r
-//                                                 \r
-//                                                 \r
-//                                                 \r
-//                                                 \r
-//                              \r
+//\r
+//\r
+//\r
+//      This IVT entry is      Failsafe bundle\r
+//      reserved by the\r
+//      Itanium architecture   Original bundle 0\r
+//      and is used for\r
+//      for locating our\r
+//      handler and the\r
+//      original bundle        Patch code...\r
+//      zero of the ext\r
+//      interrupt handler\r
+//\r
+//      RSVD    (3400)         Unused\r
+//\r
+//\r
+//\r
+//\r
+//\r
+//\r
+//\r
+//\r
+//\r
+//\r
+//\r
+//\r
 //      EXT_INT (3000)         Bundle 0               Bundle zero - This one is\r
 //                                modified, all other bundles\r
 //                                                       in the EXT_INT entry are\r
@@ -430,7 +424,7 @@ RelocateSlot:
         add         loc3=loc2, in1;;            // loc3 = physical address of branch target\r
 (p14)   sub         loc2=r0,loc2;;              // flip sign in loc2 if offset is negative\r
         sub         loc4=loc3,in2;;             // loc4 = relative offset from new ip to branch target\r
-        cmp.lt      p15, p14 = 0, loc4;;        // get new sign bit \r
+        cmp.lt      p15, p14 = 0, loc4;;        // get new sign bit\r
 (p14)   sub         loc5=r0,loc4                // get absolute value of offset\r
 (p15)   mov         loc5=loc4;;\r
         movl        loc6=0x0FFFFFF;;            // maximum offset in bytes for ip-rel branch\r
@@ -1230,7 +1224,7 @@ HookHandler:
   // the backing store.  The processor, however may not be aware that the\r
   // stacked registers need to be reloaded from the backing store.  Therefore,\r
   // we explicitly cause the RSE to refresh the stacked register's contents\r
-  // from the backing store.  \r
+  // from the backing store.\r
         mov         loc0=ar.rsc                 // get RSC value\r
         mov         loc1=ar.rsc                 // save it so we can restore it\r
         movl        loc3=0xffffffffc000ffff;;   // create mask for clearing RSC.loadrs\r
@@ -1307,7 +1301,7 @@ PatchCode:
         movl      SCRATCH_REG1 = ~( MASK(PSR_DT,1) | MASK(PSR_RT,1));;\r
         and       SCRATCH_REG1 = SCRATCH_REG0, SCRATCH_REG1;;\r
         mov       psr.l = SCRATCH_REG1;;\r
-        srlz.d  \r
+        srlz.d\r
         tbit.z    p14, p15 = SCRATCH_REG6, PSR_IS;;   // Check to see if we were\r
                                                       // interrupted from IA32\r
                                                       // context.  If so, bail out\r
index 6088ce70fd73641472ad842679125b8b872c4b3b..7316e199b576d7ef03678a1f2720cb6a17041d0c 100644 (file)
@@ -1,24 +1,19 @@
-//++\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:\r
-//\r
-//  Ds64Macros.i\r
-//\r
-// Abstract:\r
-//\r
-//  This is set of macros used in calculating offsets in the IVT\r
-//\r
-// Revision History:\r
-//\r
-//--\r
+/// @file\r
+///  This is set of macros used in calculating offsets in the IVT.\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: Ds64Macros.i\r
+///\r
+///\r
+\r
 \r
 #define EXCPT_EXTERNAL_INTERRUPT 12\r
 #define MASK_0_4        0x000000000000001F  // mask bits 0 through 4\r
index a7b571b308db9bf0ff5313808e39a91ddfc2e3a6..77cfed2b570f062ac99e3a6dbef924d90ec5ec70 100644 (file)
@@ -1,24 +1,19 @@
-//++\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:\r
-//\r
-//  Common.i\r
-//\r
-// Abstract:\r
-//\r
-//  This is set of useful macros\r
-//\r
-// Revision History:\r
-//\r
-//--\r
+/// @file\r
+///  This is set of useful macros.\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: common.i\r
+///\r
+///\r
+\r
 \r
 #define NESTED_SETUP(i,l,o,r)               \\r
          alloc loc1=ar##.##pfs,i,l,o,r ;    \\r
index fb08ce0a69a37bd803b8ab36b09253187536e6d1..087e5490bbee592443871204d146f7f162a864c5 100644 (file)
@@ -1,15 +1,16 @@
-#******************************************************************************\r
-#*\r
-#* Copyright (c) 2007, 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
-#******************************************************************************\r
+#/**@file\r
+# Low leve x64 specific debug support functions.\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
+#**/\r
 \r
 .globl _OrigVector\r
 .globl _InterruptEntryStub\r
@@ -27,31 +28,31 @@ _StubSize:       .long   _InterruptEntryStubEnd - _InterruptEntryStub
 \r
 .globl _FxStorSupport\r
 _FxStorSupport:\r
-        ret    \r
+        ret\r
 \r
 .globl _GetIdtr\r
 _GetIdtr:\r
-        ret    \r
+        ret\r
 \r
 .globl _WriteInterruptFlag\r
 _WriteInterruptFlag:\r
-        ret    \r
+        ret\r
 \r
 .globl _Vect2Desc\r
 _Vect2Desc:\r
-        ret    \r
+        ret\r
 \r
 .globl _InterruptEntryStub\r
 _InterruptEntryStub:\r
-        ret    \r
+        ret\r
 \r
 .globl _InterruptEntryStubEnd\r
 _InterruptEntryStubEnd:\r
-        ret    \r
+        ret\r
 \r
 .globl _CommonIdtEntry\r
 _CommonIdtEntry:\r
-        ret    \r
+        ret\r
 \r
 PhonyIretd:\r
-        iret   \r
+        iret\r
index 810de909a8ff47db18f979c72b51ec391228a3c3..5cc3e52bfe7a29535106f0b109f74ed4842c40e2 100644 (file)
@@ -1,15 +1,16 @@
-;******************************************************************************\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
-;******************************************************************************\r
+;/** @file\r
+;  Low level x64 routines used by the debug support driver.\r
+;\r
+;  Copyright (c) 2007 - 2008, Intel Corporation. <BR>\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
+;**/\r
 \r
 EXCPT64_DIVIDE_ERROR     EQU    0\r
 EXCPT64_DEBUG            EQU    1\r
@@ -93,7 +94,7 @@ OrigVector      dq      6666666666666666h ; ?
 align           16\r
 DebugStackEnd   db      "DbgStkEnd >>>>>>"      ;; 16 byte long string - must be 16 bytes to preserve alignment\r
                 dd      1ffch dup (000000000h)  ;; 32K should be enough stack\r
-                                                ;;   This allocation is coocked to insure \r
+                                                ;;   This allocation is coocked to insure\r
                                                 ;;   that the the buffer for the FXSTORE instruction\r
                                                 ;;   will be 16 byte aligned also.\r
                                                 ;;\r
index 79dcf18cbbcfcdd623868c4b37dc9d7c9f614a95..2e9cfa754d5f11d2af59353c30d710837d600dc2 100644 (file)
@@ -1,25 +1,17 @@
-// *++\r
+///** @file\r
 //\r
-// Copyright (c) 2007, 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
+//    Sample Inventory Data\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
+//  Copyright (c) 2004 - 2008, Intel Corporation. <BR>\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
-// Module Name:\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
-//   Inventory.vfr\r
-//\r
-// Abstract:\r
-//\r
-//   Sample Inventory Data.\r
-//\r
-// Revision History:\r
-//\r
-// --*/\r
+//**/\r
 \r
 #define INVENTORY_GUID    { 0xb3f56470, 0x6141, 0x4621, 0x8f, 0x19, 0x70, 0x4e, 0x57, 0x7a, 0xa9, 0xe8 }\r
 \r
index e88d708b2ad56108a356404b752eede6bf5612fc..d63b8b929277709ff88e006ad47e01c36de7ac52 100644 (file)
@@ -1,25 +1,17 @@
-// *++\r
+///** @file\r
 //\r
-// Copyright (c) 2007, 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
+//    Sample Setup formset.\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
+//  Copyright (c) 2004 - 2008, Intel Corporation. <BR>\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
-// Module Name:\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
-//   Vfr.vfr\r
-//\r
-// Abstract:\r
-//\r
-//   Sample Setup formset\r
-//\r
-// Revision History:\r
-//\r
-// --*/\r
+//**/\r
 \r
 \r
 #include "NVDataStruc.h"\r
@@ -328,7 +320,7 @@ formset
               maximum = 243,\r
               step    = 1,\r
               default = 18,\r
-      \r
+\r
       endnumeric;\r
     endif;\r
 \r
index 5e9828dc1151185a451a235996eb37ffdd50dff1..774692a76a523d63edccccdfcabb0f3e223962d3 100644 (file)
@@ -1,15 +1,17 @@
-#****************************************************************************\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
-#****************************************************************************\r
+##/**@file\r
+# Low level IA32 specific EBC support routines.\r
+#\r
+# Copyright (c) 2007 - 2008, 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
+#**/\r
+\r
 .globl ASM_PFX(CopyMem)\r
 \r
 .globl ASM_PFX(EbcLLCALLEXNative)\r
@@ -37,18 +39,18 @@ ASM_PFX(EbcLLCALLEXNative):
          mov    %ebp,%esp\r
          pop    %ebx\r
          pop    %ebp\r
-         ret    \r
+         ret\r
 \r
 .globl ASM_PFX(EbcLLGetEbcEntryPoint)\r
 ASM_PFX(EbcLLGetEbcEntryPoint):\r
-        ret    \r
+        ret\r
 \r
 .globl ASM_PFX(EbcLLGetStackPointer)\r
 ASM_PFX(EbcLLGetStackPointer):\r
         mov    %esp,%eax\r
         add    $0x4,%eax\r
-        ret    \r
+        ret\r
 \r
 .globl ASM_PFX(EbcLLGetReturnValue)\r
 ASM_PFX(EbcLLGetReturnValue):\r
-        ret    \r
+        ret\r
index 4249241e7d7077ed980eef200425ee6642b13186..6b7672a8377b60d5c0d14231a3cc1dcabee3fa15 100644 (file)
@@ -1,31 +1,20 @@
-  page    ,132\r
-  title   VM ASSEMBLY LANGUAGE ROUTINES\r
-;****************************************************************************\r
-;*                                                                         \r
-;*  Copyright (c) 2006 - 2007, 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
-;****************************************************************************\r
-;****************************************************************************\r
-;                                   REV 1.0\r
-;****************************************************************************\r
+;/** @file\r
+;  This code provides low level routines that support the Virtual Machine\r
+;  for option ROMs.\r
 ;\r
-; Rev  Date      Description\r
-; ---  --------  ------------------------------------------------------------\r
-; 1.0  03/14/01  Initial creation of file.\r
+;  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\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
-;****************************************************************************\r
-                             \r
-;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r
-; This code provides low level routines that support the Virtual Machine\r
-; for option ROMs. \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
+;**/\r
+\r
+  page    ,132\r
+  title   VM ASSEMBLY LANGUAGE ROUTINES\r
 \r
 ;---------------------------------------------------------------------------\r
 ; Equate files needed.\r
@@ -40,8 +29,8 @@
 ;---------------------------------------------------------------------------\r
 \r
 .686p\r
-.model  flat        \r
-.code        \r
+.model  flat\r
+.code\r
 ;---------------------------------------------------------------------------\r
 ;;GenericPostSegment      SEGMENT USE16\r
 ;---------------------------------------------------------------------------\r
@@ -51,9 +40,9 @@ CopyMem  PROTO  C Destination:PTR DWORD, Source:PTR DWORD, Count:DWORD
 ; EbcLLCALLEXNative\r
 ;\r
 ; This function is called to execute an EBC CALLEX instruction\r
-; to native code. \r
+; to native code.\r
 ; This instruction requires that we thunk out to external native\r
-; code. For IA32, we simply switch stacks and jump to the \r
+; code. For IA32, we simply switch stacks and jump to the\r
 ; specified function. On return, we restore the stack pointer\r
 ; to its original location.\r
 ;\r
@@ -64,17 +53,17 @@ _EbcLLCALLEXNative        PROC    NEAR    PUBLIC
       push   ebp\r
       push   ebx\r
       mov    ebp, esp              ; standard function prolog\r
-      \r
+\r
       ; Get function address in a register\r
       ; mov ecx, FuncAddr => mov ecx, dword ptr [FuncAddr]\r
       mov    ecx, dword ptr [esp]+0Ch\r
-      \r
+\r
       ; Set stack pointer to new value\r
       ; mov eax, NewStackPointer => mov eax, dword ptr [NewSp]\r
       mov    eax, dword ptr [esp] + 14h\r
       mov    edx, dword ptr [esp] + 10h\r
       sub    eax, edx\r
-      sub    esp, eax      \r
+      sub    esp, eax\r
       mov    ebx, esp\r
       push   ecx\r
       push   eax\r
@@ -88,7 +77,7 @@ _EbcLLCALLEXNative        PROC    NEAR    PUBLIC
 \r
       ; Now call the external routine\r
       call  ecx\r
-      \r
+\r
       ; ebp is preserved by the callee. In this function it\r
       ; equals the original esp, so set them equal\r
       mov    esp, ebp\r
@@ -105,7 +94,7 @@ _EbcLLCALLEXNative    ENDP
 ; Routine Description:\r
 ;   The VM thunk code stuffs an EBC entry point into a processor\r
 ;   register. Since we can't use inline assembly to get it from\r
-;   the interpreter C code, stuff it into the return value \r
+;   the interpreter C code, stuff it into the return value\r
 ;   register and return.\r
 ;\r
 ; Arguments:\r
@@ -121,7 +110,7 @@ _EbcLLGetEbcEntryPoint    ENDP
 ;/*++\r
 ;\r
 ;Routine Description:\r
-;  \r
+;\r
 ;  Return the caller's value of the stack pointer.\r
 ;\r
 ;Arguments:\r
@@ -136,7 +125,7 @@ _EbcLLGetEbcEntryPoint    ENDP
 ;\r
 ;--*/\r
 \r
-; UINTN EbcLLGetStackPointer()            \r
+; UINTN EbcLLGetStackPointer()\r
 _EbcLLGetStackPointer        PROC    NEAR    PUBLIC\r
     mov    eax, esp      ; get current stack pointer\r
     add   eax, 4        ; stack adjusted by this much when we were called\r
index e329b68e66eb8d5942b175adf99fc9b9522fba0b..36ae269575fed85ae2619d016a34389892f1d3b1 100644 (file)
@@ -1,24 +1,19 @@
-//++\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:\r
-//\r
-//   EbcLowLevel.s\r
-//\r
-// Abstract:\r
-//\r
-//   Contains low level routines for the Virtual Machine implementation\r
-//   on an Itanium-based platform.\r
-//\r
-//\r
-//--\r
+/// @file\r
+///  Contains low level routines for the Virtual Machine implementation\r
+///  on an Itanium-based platform.\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: EbcLowLevel.s\r
+///\r
+///\r
 \r
 .file  "EbcLowLevel.s"\r
 \r
@@ -40,7 +35,7 @@ name::
          mov ar##.##pfs=loc1 ;;\\r
          br##.##ret##.##dpnt  b0;;\r
 \r
-.type CopyMem, @function;  \r
+.type CopyMem, @function;\r
 \r
 //-----------------------------------------------------------------------------\r
 //++\r
@@ -51,16 +46,16 @@ name::
 //  calls the native function. On return it restores the original\r
 //  stack pointer and returns to the caller.\r
 //\r
-// Arguments : \r
+// Arguments :\r
 //\r
 // On Entry :\r
 //    in0 = Address of native code to call\r
 //    in1 = New stack pointer\r
 //\r
-// Return Value: \r
-// \r
-// As per static calling conventions. \r
-// \r
+// Return Value:\r
+//\r
+// As per static calling conventions.\r
+//\r
 //--\r
 //---------------------------------------------------------------------------\r
 ;// void EbcAsmLLCALLEX (UINTN FunctionAddr, UINTN EbcStackPointer)\r
@@ -75,7 +70,7 @@ PROCEDURE_ENTRY(EbcAsmLLCALLEX)
   mov r8 = in1;;\r
 \r
   //\r
-  // Copy stack arguments from EBC stack into registers. \r
+  // Copy stack arguments from EBC stack into registers.\r
   // Assume worst case and copy 8.\r
   //\r
   ld8   out0 = [r8], 8;;\r
@@ -98,7 +93,7 @@ PROCEDURE_ENTRY(EbcAsmLLCALLEX)
   or    loc3 = r1, r0\r
 \r
   //\r
-  // Set the new aligned stack pointer. Reserve space for the required \r
+  // Set the new aligned stack pointer. Reserve space for the required\r
   // 16-bytes of scratch area as well.\r
   //\r
   add  r12 = 48, in1\r
@@ -129,13 +124,13 @@ PROCEDURE_EXIT(EbcAsmLLCALLEX)
 \r
 PROCEDURE_ENTRY(EbcLLCALLEXNative)\r
   NESTED_SETUP (3,6,3,0)\r
-  \r
+\r
   mov   loc2 = in2;;\r
   mov   loc3 = in1;;\r
   sub   loc2 = loc2, loc3\r
   mov   loc4 = r12;;\r
   or    loc5 = r1, r0\r
-  \r
+\r
   sub   r12 = r12, loc2\r
   mov   out2 = loc2;;\r
 \r
@@ -145,13 +140,13 @@ PROCEDURE_ENTRY(EbcLLCALLEXNative)
   adds  r12 = -0x8, r12\r
   (p0) br.call.dptk.many b0 = CopyMem;;\r
   adds  r12 = 0x8, r12\r
\r
+\r
   mov   out0 = in0;;\r
   mov   out1 = r12;;\r
   (p0) br.call.dptk.many b0 = EbcAsmLLCALLEX;;\r
   mov   r12 = loc4;;\r
   or    r1 = loc5, r0\r
-  \r
+\r
   NESTED_RETURN\r
 PROCEDURE_EXIT(EbcLLCALLEXNative)\r
 \r
@@ -186,7 +181,7 @@ PROCEDURE_EXIT(EbcLLGetReturnValue)
 PROCEDURE_ENTRY(EbcLLGetStackPointer)\r
     mov    r8 = r12 ;;\r
     br.ret.sptk  b0 ;;\r
-    br.sptk.few b6 \r
+    br.sptk.few b6\r
 PROCEDURE_EXIT(EbcLLGetStackPointer)\r
 \r
 \r
index 538462575bb991248b39ccb68ba10294a3e6c2c0..aa65bf6a5e36664f07549431d886c67fbef3e762 100644 (file)
@@ -1,29 +1,17 @@
-#****************************************************************************\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
-#****************************************************************************\r
-#****************************************************************************\r
-#                                   REV 1.0\r
-#****************************************************************************\r
+##/**@file\r
+# This code provides low level routines that support the Virtual Machine\r
+# for option ROMs.\r
 #\r
-# Rev  Date      Description\r
-# ---  --------  ------------------------------------------------------------\r
-# 1.0  05/09/12  Initial creation of file.\r
+# Copyright (c) 2007 - 2008, 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
-#****************************************************************************\r
-\r
-#* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r
-# This code provides low level routines that support the Virtual Machine\r
-# for option ROMs. \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
+#**/\r
 \r
 #---------------------------------------------------------------------------\r
 # Equate files needed.\r
 #****************************************************************************\r
 # EbcLLCALLEX\r
 #\r
-# This function is called to execute an EBC CALLEX instruction. \r
+# This function is called to execute an EBC CALLEX instruction.\r
 # This instruction requires that we thunk out to external native\r
 # code. For x64, we switch stacks, copy the arguments to the stack\r
-# and jump to the specified function. \r
+# and jump to the specified function.\r
 # On return, we restore the stack pointer to its original location.\r
 #\r
 # Destroys no working registers.\r
@@ -62,7 +50,7 @@ _EbcLLCALLEXNative:
       sub    %rsp, %r8\r
       mov    %rsp, %rcx\r
       sub    %rsp, 0x20\r
-      call   _CopyMem \r
+      call   _CopyMem\r
       add    %rsp, 0x20\r
 \r
       # Considering the worst case, load 4 potiential arguments\r
@@ -86,7 +74,7 @@ _EbcLLCALLEXNative:
 # Routine Description:\r
 #   The VM thunk code stuffs an EBC entry point into a processor\r
 #   register. Since we can't use inline assembly to get it from\r
-#   the interpreter C code, stuff it into the return value \r
+#   the interpreter C code, stuff it into the return value\r
 #   register and return.\r
 #\r
 # Arguments:\r
@@ -102,7 +90,7 @@ _EbcLLGetEbcEntryPoint:
 #/*++\r
 #\r
 #Routine Description:\r
-#  \r
+#\r
 #  Return the caller's value of the stack pointer.\r
 #\r
 #Arguments:\r
@@ -117,7 +105,7 @@ _EbcLLGetEbcEntryPoint:
 #\r
 #--*/\r
 \r
-# UINTN EbcLLGetStackPointer()            \r
+# UINTN EbcLLGetStackPointer()\r
 .global _EbcLLGetStackPointer;\r
 _EbcLLGetStackPointer:\r
     mov    %rsp, %rax\r
index 3262ea93783d2fd7471f45c9f7f2388ef0352028..51e80832b3ff67480124a74badc0f19ebbad9456 100644 (file)
@@ -1,31 +1,21 @@
-  page    ,132\r
-  title   VM ASSEMBLY LANGUAGE ROUTINES\r
-;****************************************************************************\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
-;****************************************************************************\r
-;****************************************************************************\r
-;                                   REV 1.0\r
-;****************************************************************************\r
+;/** @file\r
+;  This code provides low level routines that support the Virtual Machine.\r
+;  for option ROMs.\r
 ;\r
-; Rev  Date      Description\r
-; ---  --------  ------------------------------------------------------------\r
-; 1.0  05/09/12  Initial creation of file.\r
+;  Copyright (c) 2006 - 2008, Intel Corporation. <BR>\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
-;****************************************************************************\r
-                             \r
-;* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r
-; This code provides low level routines that support the Virtual Machine\r
-; for option ROMs. \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
+;**/\r
+\r
+\r
+  page    ,132\r
+  title   VM ASSEMBLY LANGUAGE ROUTINES\r
 \r
 ;---------------------------------------------------------------------------\r
 ; Equate files needed.\r
@@ -40,10 +30,10 @@ text SEGMENT
 ;****************************************************************************\r
 ; EbcLLCALLEX\r
 ;\r
-; This function is called to execute an EBC CALLEX instruction. \r
+; This function is called to execute an EBC CALLEX instruction.\r
 ; This instruction requires that we thunk out to external native\r
 ; code. For x64, we switch stacks, copy the arguments to the stack\r
-; and jump to the specified function. \r
+; and jump to the specified function.\r
 ; On return, we restore the stack pointer to its original location.\r
 ;\r
 ; Destroys no working registers.\r
@@ -58,7 +48,7 @@ EbcLLCALLEXNative        PROC    PUBLIC
       push   rbx\r
       mov    rbp, rsp\r
       ; Function prolog\r
-      \r
+\r
       ; Copy FuncAddr to a preserved register.\r
       mov    rbx, rcx\r
 \r
@@ -67,9 +57,9 @@ EbcLLCALLEXNative        PROC    PUBLIC
       sub    rsp, r8\r
       mov    rcx, rsp\r
       sub    rsp, 20h\r
-      call   CopyMem      \r
+      call   CopyMem\r
       add    rsp, 20h\r
-      \r
+\r
       ; Considering the worst case, load 4 potiential arguments\r
       ; into registers.\r
       mov    rcx, qword ptr [rsp]\r
@@ -79,7 +69,7 @@ EbcLLCALLEXNative        PROC    PUBLIC
 \r
       ; Now call the external routine\r
       call  rbx\r
-      \r
+\r
       ; Function epilog\r
       mov      rsp, rbp\r
       pop      rbx\r
@@ -92,7 +82,7 @@ EbcLLCALLEXNative    ENDP
 ; Routine Description:\r
 ;   The VM thunk code stuffs an EBC entry point into a processor\r
 ;   register. Since we can't use inline assembly to get it from\r
-;   the interpreter C code, stuff it into the return value \r
+;   the interpreter C code, stuff it into the return value\r
 ;   register and return.\r
 ;\r
 ; Arguments:\r
@@ -108,7 +98,7 @@ EbcLLGetEbcEntryPoint    ENDP
 ;/*++\r
 ;\r
 ;Routine Description:\r
-;  \r
+;\r
 ;  Return the caller's value of the stack pointer.\r
 ;\r
 ;Arguments:\r
@@ -123,7 +113,7 @@ EbcLLGetEbcEntryPoint    ENDP
 ;\r
 ;--*/\r
 \r
-; UINTN EbcLLGetStackPointer()            \r
+; UINTN EbcLLGetStackPointer()\r
 EbcLLGetStackPointer        PROC    PUBLIC\r
     mov    rax, rsp      ; get current stack pointer\r
     ; Stack adjusted by this much when we were called,\r