diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h
index c41fa78..133656a 100644
--- a/MdePkg/Include/Library/BaseLib.h
+++ b/MdePkg/Include/Library/BaseLib.h
@@ -2549,7 +2549,7 @@ DivS64x64Remainder (
 UINT16
 EFIAPI
 ReadUnaligned16 (
-  IN CONST UINT16              *Buffer
+  IN CONST VOID                *Buffer
   );
 
 
@@ -2571,7 +2571,7 @@ ReadUnaligned16 (
 UINT16
 EFIAPI
 WriteUnaligned16 (
-  OUT UINT16                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT16                    Value
   );
 
@@ -2592,7 +2592,7 @@ WriteUnaligned16 (
 UINT32
 EFIAPI
 ReadUnaligned24 (
-  IN CONST UINT32              *Buffer
+  IN CONST VOID                *Buffer
   );
 
 
@@ -2614,7 +2614,7 @@ ReadUnaligned24 (
 UINT32
 EFIAPI
 WriteUnaligned24 (
-  OUT UINT32                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT32                    Value
   );
 
@@ -2635,7 +2635,7 @@ WriteUnaligned24 (
 UINT32
 EFIAPI
 ReadUnaligned32 (
-  IN CONST UINT32              *Buffer
+  IN CONST VOID                *Buffer
   );
 
 
@@ -2657,7 +2657,7 @@ ReadUnaligned32 (
 UINT32
 EFIAPI
 WriteUnaligned32 (
-  OUT UINT32                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT32                    Value
   );
 
@@ -2678,7 +2678,7 @@ WriteUnaligned32 (
 UINT64
 EFIAPI
 ReadUnaligned64 (
-  IN CONST UINT64              *Buffer
+  IN CONST VOID                *Buffer
   );
 
 
@@ -2700,7 +2700,7 @@ ReadUnaligned64 (
 UINT64
 EFIAPI
 WriteUnaligned64 (
-  OUT UINT64                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT64                    Value
   );
 
diff --git a/MdePkg/Library/BaseLib/Arm/Unaligned.c b/MdePkg/Library/BaseLib/Arm/Unaligned.c
index 34f1732..ef9efbc 100644
--- a/MdePkg/Library/BaseLib/Arm/Unaligned.c
+++ b/MdePkg/Library/BaseLib/Arm/Unaligned.c
@@ -33,7 +33,7 @@
 UINT16
 EFIAPI
 ReadUnaligned16 (
-  IN CONST UINT16              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
   volatile UINT8 LowerByte;
@@ -65,7 +65,7 @@ ReadUnaligned16 (
 UINT16
 EFIAPI
 WriteUnaligned16 (
-  OUT UINT16                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT16                    Value
   )
 {
@@ -93,7 +93,7 @@ WriteUnaligned16 (
 UINT32
 EFIAPI
 ReadUnaligned24 (
-  IN CONST UINT32              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
   ASSERT (Buffer != NULL);
@@ -122,7 +122,7 @@ ReadUnaligned24 (
 UINT32
 EFIAPI
 WriteUnaligned24 (
-  OUT UINT32                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT32                    Value
   )
 {
@@ -149,7 +149,7 @@ WriteUnaligned24 (
 UINT32
 EFIAPI
 ReadUnaligned32 (
-  IN CONST UINT32              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
   UINT16  LowerBytes;
@@ -181,7 +181,7 @@ ReadUnaligned32 (
 UINT32
 EFIAPI
 WriteUnaligned32 (
-  OUT UINT32                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT32                    Value
   )
 {
@@ -208,7 +208,7 @@ WriteUnaligned32 (
 UINT64
 EFIAPI
 ReadUnaligned64 (
-  IN CONST UINT64              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
   UINT32  LowerBytes;
@@ -240,7 +240,7 @@ ReadUnaligned64 (
 UINT64
 EFIAPI
 WriteUnaligned64 (
-  OUT UINT64                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT64                    Value
   )
 {
diff --git a/MdePkg/Library/BaseLib/Ipf/Unaligned.c b/MdePkg/Library/BaseLib/Ipf/Unaligned.c
index 7d0d8dd..5ba8029 100644
--- a/MdePkg/Library/BaseLib/Ipf/Unaligned.c
+++ b/MdePkg/Library/BaseLib/Ipf/Unaligned.c
@@ -30,7 +30,7 @@
 UINT16
 EFIAPI
 ReadUnaligned16 (
-  IN CONST UINT16              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
   ASSERT (Buffer != NULL);
@@ -56,7 +56,7 @@ ReadUnaligned16 (
 UINT16
 EFIAPI
 WriteUnaligned16 (
-  OUT UINT16                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT16                    Value
   )
 {
@@ -84,7 +84,7 @@ WriteUnaligned16 (
 UINT32
 EFIAPI
 ReadUnaligned24 (
-  IN CONST UINT32              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
   ASSERT (Buffer != NULL);
@@ -113,7 +113,7 @@ ReadUnaligned24 (
 UINT32
 EFIAPI
 WriteUnaligned24 (
-  OUT UINT32                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT32                    Value
   )
 {
@@ -140,7 +140,7 @@ WriteUnaligned24 (
 UINT32
 EFIAPI
 ReadUnaligned32 (
-  IN CONST UINT32              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
   UINT16  LowerBytes;
@@ -172,7 +172,7 @@ ReadUnaligned32 (
 UINT32
 EFIAPI
 WriteUnaligned32 (
-  OUT UINT32                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT32                    Value
   )
 {
@@ -199,7 +199,7 @@ WriteUnaligned32 (
 UINT64
 EFIAPI
 ReadUnaligned64 (
-  IN CONST UINT64              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
   UINT32  LowerBytes;
@@ -231,7 +231,7 @@ ReadUnaligned64 (
 UINT64
 EFIAPI
 WriteUnaligned64 (
-  OUT UINT64                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT64                    Value
   )
 {
diff --git a/MdePkg/Library/BaseLib/Unaligned.c b/MdePkg/Library/BaseLib/Unaligned.c
index 68dafa6..ed58861 100644
--- a/MdePkg/Library/BaseLib/Unaligned.c
+++ b/MdePkg/Library/BaseLib/Unaligned.c
@@ -32,12 +32,14 @@
 UINT16
 EFIAPI
 ReadUnaligned16 (
-  IN CONST UINT16              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
+  CONST UINT16 *Input = Buffer;
+
   ASSERT (Buffer != NULL);
 
-  return *Buffer;
+  return *Input;
 }
 
 /**
@@ -58,13 +60,15 @@ ReadUnaligned16 (
 UINT16
 EFIAPI
 WriteUnaligned16 (
-  OUT UINT16                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT16                    Value
   )
 {
+  UINT16 *Output = Buffer;
+
   ASSERT (Buffer != NULL);
 
-  return *Buffer = Value;
+  return *Output = Value;
 }
 
 /**
@@ -83,12 +87,14 @@ WriteUnaligned16 (
 UINT32
 EFIAPI
 ReadUnaligned24 (
-  IN CONST UINT32              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
+  CONST UINT32 *Input = Buffer;
+
   ASSERT (Buffer != NULL);
 
-  return *Buffer & 0xffffff;
+  return *Input & 0xffffff;
 }
 
 /**
@@ -109,13 +115,15 @@ ReadUnaligned24 (
 UINT32
 EFIAPI
 WriteUnaligned24 (
-  OUT UINT32                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT32                    Value
   )
 {
+  UINT32 *Output = Buffer;
+
   ASSERT (Buffer != NULL);
 
-  *Buffer = BitFieldWrite32 (*Buffer, 0, 23, Value);
+  *Output = BitFieldWrite32 (*Output, 0, 23, Value);
   return Value;
 }
 
@@ -135,12 +143,14 @@ WriteUnaligned24 (
 UINT32
 EFIAPI
 ReadUnaligned32 (
-  IN CONST UINT32              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
+  CONST UINT32 *Input = Buffer;
+
   ASSERT (Buffer != NULL);
 
-  return *Buffer;
+  return *Input;
 }
 
 /**
@@ -161,13 +171,15 @@ ReadUnaligned32 (
 UINT32
 EFIAPI
 WriteUnaligned32 (
-  OUT UINT32                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT32                    Value
   )
 {
+  UINT32 *Output = Buffer;
+
   ASSERT (Buffer != NULL);
 
-  return *Buffer = Value;
+  return *Output = Value;
 }
 
 /**
@@ -186,12 +198,14 @@ WriteUnaligned32 (
 UINT64
 EFIAPI
 ReadUnaligned64 (
-  IN CONST UINT64              *Buffer
+  IN CONST VOID                *Buffer
   )
 {
+  CONST UINT64 *Input = Buffer;
+
   ASSERT (Buffer != NULL);
 
-  return *Buffer;
+  return *Input;
 }
 
 /**
@@ -212,11 +226,13 @@ ReadUnaligned64 (
 UINT64
 EFIAPI
 WriteUnaligned64 (
-  OUT UINT64                    *Buffer,
+  OUT VOID                      *Buffer,
   IN  UINT64                    Value
   )
 {
+  UINT64 *Output = Buffer;
+
   ASSERT (Buffer != NULL);
 
-  return *Buffer = Value;
+  return *Output = Value;
 }
