summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-08 16:50:17 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-08 16:50:17 +0000
commita0cd353dd2c9db074dfa90cb8df90f52c61f832f (patch)
treeaf076fa5c4648d062b82e20ad9a88c46dcce75e3 /ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
parent8a30d785c3c4dbb37cea8f96fad2bb951e9f4cd2 (diff)
downloadedk2-platforms-a0cd353dd2c9db074dfa90cb8df90f52c61f832f.tar.xz
ShellPkg: allow for mm command to properly write PCIe in non-interactive mode.
Submitted-by: jcarsey Reviewed-by: jljusten Reviewed-by: marothma git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12299 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c')
-rw-r--r--ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
index 5d9915cec8..6a21ea4268 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c
+++ b/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;
+ }
//