]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Move NEXT_MEMORY_DESCRIPTOR() from UefiSpec.h to UEFI Library
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 7 Dec 2008 22:55:55 +0000 (22:55 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 7 Dec 2008 22:55:55 +0000 (22:55 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6902 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/UefiLib.h

index 0ce4759692fffb86ca1721c8f1b615ffd8d23e97..1d8a8e1166a5edc15f9df65b95395e235d13a422 100644 (file)
@@ -58,7 +58,6 @@ typedef struct {
   EFI_LOCK_STATE  Lock;\r
 } EFI_LOCK;\r
 \r
-\r
 /**\r
   Macro that returns the number of 100 ns units for a specified number of microseconds.\r
   Useful for managing EFI timer events.\r
@@ -71,7 +70,6 @@ typedef struct {
 **/\r
 #define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10)\r
 \r
-\r
 /**\r
   Macro that returns the number of 100 ns units for a specified number of milliseoconds.\r
   Useful for managing EFI timer events.\r
@@ -84,7 +82,6 @@ typedef struct {
 **/\r
 #define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000)\r
 \r
-\r
 /**\r
   Macro that returns the number of 100 ns units for a specified number of seoconds.\r
   Useful for managing EFI timer events.\r
@@ -97,6 +94,19 @@ typedef struct {
 **/\r
 #define EFI_TIMER_PERIOD_SECONDS(Seconds)           MultU64x32((UINT64)(Seconds), 10000000)\r
 \r
+/**\r
+  Macro that returns the a pointer to the next EFI_MEMORY_DESCRIPTOR in an array \r
+  returned from GetMemoryMap().  \r
+\r
+  @param  MemoryDescriptor  Pointer tot he current EFI_MEMORY_DESCRIPTOR.\r
+\r
+  @param  Size              The size, in bytes, of the current EFI_MEMORY_DESCRIPTOR.\r
+\r
+  @return A pointer to the next EFI_MEMORY_DESCRIPTOR.\r
+\r
+**/\r
+#define NEXT_MEMORY_DESCRIPTOR(MemoryDescriptor, Size) \\r
+  ((EFI_MEMORY_DESCRIPTOR *)((UINT8 *)(MemoryDescriptor) + (Size)))\r
 \r
 /**\r
   Retrieves a pointer to the system configuration table from the EFI System Table\r