diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-08 16:50:17 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-09-08 16:50:17 +0000 |
commit | f2b7ce306e5023c64f72a8e92de87e901773a9b8 (patch) | |
tree | 96f6049d3fee915a317b14792fcddd94f19f0319 /edk2/ShellPkg/Library/UefiShellDebug1CommandsLib | |
parent | 4d7482e678c238158270056538671bab11125cdc (diff) |
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@12299 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/ShellPkg/Library/UefiShellDebug1CommandsLib')
-rw-r--r-- | edk2/ShellPkg/Library/UefiShellDebug1CommandsLib/Mm.c | 38 |
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;
+ }
//
|