summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c b/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
index 5d9915cec..6a21ea426 100644
--- a/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
+++ b/edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
@@ -464,25 +464,25 @@ ShellCommandRunMm (
GetPciEAddressFromInputAddress (Address, &PciEAddress);
}
-// //
-// // Set value
-// //
-// if (ValueStr != NULL) {
-// if (AccessType == EFIMemoryMappedIo) {
-// IoDev->Mem.Write (IoDev, Width, Address, 1, &Value);
-// } else if (AccessType == EfiIo) {
-// IoDev->Io.Write (IoDev, Width, Address, 1, &Value);
-// } else if (AccessType == EfiPciConfig) {
-// IoDev->Pci.Write (IoDev, Width, Address, 1, &Value);
-// } else if (AccessType == EfiPciEConfig) {
-// IoDev->Pci.Write (IoDev, Width, PciEAddress, 1, &Buffer);
-// } else {
-// WriteMem (Width, Address, 1, &Value);
-// }
-//
-// ASSERT(ShellStatus == SHELL_SUCCESS);
-// goto Done;
-// }
+ //
+ // Set value
+ //
+ if (ShellCommandLineGetRawValue(Package, 2) != NULL) {
+ if (AccessType == EFIMemoryMappedIo) {
+ IoDev->Mem.Write (IoDev, Width, Address, 1, &Value);
+ } else if (AccessType == EfiIo) {
+ IoDev->Io.Write (IoDev, Width, Address, 1, &Value);
+ } else if (AccessType == EfiPciConfig) {
+ IoDev->Pci.Write (IoDev, Width, Address, 1, &Value);
+ } else if (AccessType == EfiPciEConfig) {
+ IoDev->Pci.Write (IoDev, Width, PciEAddress, 1, &Value);
+ } else {
+ WriteMem (Width, Address, 1, &Value);
+ }
+
+ ASSERT(ShellStatus == SHELL_SUCCESS);
+ goto Done;
+ }
//