mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/ArmPlatformGlobalVariableLib: Fixed incorrect type casting
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13121 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
6bc4e19fec
commit
f15f91a22f
|
@ -39,7 +39,7 @@ ArmPlatformGetGlobalVariable (
|
||||||
if (VariableSize == 4) {
|
if (VariableSize == 4) {
|
||||||
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
|
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
|
||||||
} else if (VariableSize == 8) {
|
} else if (VariableSize == 8) {
|
||||||
*(UINT32*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
|
*(UINT64*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
|
||||||
} else {
|
} else {
|
||||||
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
|
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ ArmPlatformGetGlobalVariable (
|
||||||
if (VariableSize == 4) {
|
if (VariableSize == 4) {
|
||||||
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
|
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
|
||||||
} else if (VariableSize == 8) {
|
} else if (VariableSize == 8) {
|
||||||
*(UINT32*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
|
*(UINT64*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
|
||||||
} else {
|
} else {
|
||||||
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
|
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ ArmPlatformGetGlobalVariable (
|
||||||
if (VariableSize == 4) {
|
if (VariableSize == 4) {
|
||||||
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
|
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
|
||||||
} else if (VariableSize == 8) {
|
} else if (VariableSize == 8) {
|
||||||
*(UINT32*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
|
*(UINT64*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
|
||||||
} else {
|
} else {
|
||||||
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
|
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue