From 9bfdfa522da10ebd58168f6c0c5fa37d5fa9fa7f Mon Sep 17 00:00:00 2001 From: mdkinney Date: Sun, 7 Dec 2008 22:55:55 +0000 Subject: [PATCH] Move NEXT_MEMORY_DESCRIPTOR() from UefiSpec.h to UEFI Library git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6902 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Include/Library/UefiLib.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/MdePkg/Include/Library/UefiLib.h b/MdePkg/Include/Library/UefiLib.h index 0ce4759692..1d8a8e1166 100644 --- a/MdePkg/Include/Library/UefiLib.h +++ b/MdePkg/Include/Library/UefiLib.h @@ -58,7 +58,6 @@ typedef struct { EFI_LOCK_STATE Lock; } EFI_LOCK; - /** Macro that returns the number of 100 ns units for a specified number of microseconds. Useful for managing EFI timer events. @@ -71,7 +70,6 @@ typedef struct { **/ #define EFI_TIMER_PERIOD_MICROSECONDS(Microseconds) MultU64x32((UINT64)(Microseconds), 10) - /** Macro that returns the number of 100 ns units for a specified number of milliseoconds. Useful for managing EFI timer events. @@ -84,7 +82,6 @@ typedef struct { **/ #define EFI_TIMER_PERIOD_MILLISECONDS(Milliseconds) MultU64x32((UINT64)(Milliseconds), 10000) - /** Macro that returns the number of 100 ns units for a specified number of seoconds. Useful for managing EFI timer events. @@ -97,6 +94,19 @@ typedef struct { **/ #define EFI_TIMER_PERIOD_SECONDS(Seconds) MultU64x32((UINT64)(Seconds), 10000000) +/** + Macro that returns the a pointer to the next EFI_MEMORY_DESCRIPTOR in an array + returned from GetMemoryMap(). + + @param MemoryDescriptor Pointer tot he current EFI_MEMORY_DESCRIPTOR. + + @param Size The size, in bytes, of the current EFI_MEMORY_DESCRIPTOR. + + @return A pointer to the next EFI_MEMORY_DESCRIPTOR. + +**/ +#define NEXT_MEMORY_DESCRIPTOR(MemoryDescriptor, Size) \ + ((EFI_MEMORY_DESCRIPTOR *)((UINT8 *)(MemoryDescriptor) + (Size))) /** Retrieves a pointer to the system configuration table from the EFI System Table