]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/ArmVExpressPkg: Add Shutdown support
authorRyan Harkin <ryan.harkin@linaro.org>
Fri, 21 Jun 2013 10:09:50 +0000 (10:09 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 21 Jun 2013 10:09:50 +0000 (10:09 +0000)
LibResetSystem was performing a cold reboot for both reboot and
shutdown.

This patch updates LibResetSystem to pass SYS_CFG_SHUTDOWN to the
microcontroller when called wit EfiResetShutdown.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14438 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmVExpressPkg/Library/ResetSystemLib/ResetSystemLib.c

index f858317550835a66a807e5a8ed499ac92b1dc500..b96e7e096f65089d9c114573faa8bdc7eac0250d 100644 (file)
@@ -49,10 +49,15 @@ LibResetSystem (
   case EfiResetWarm:\r
     // Map a warm reset into a cold reset\r
   case EfiResetCold:\r
-  case EfiResetShutdown:\r
     // Send the REBOOT function to the platform microcontroller\r
     ArmPlatformSysConfigSet (SYS_CFG_REBOOT, 0);\r
 \r
+    // We should never be here\r
+    while(1);\r
+  case EfiResetShutdown:\r
+    // Send the SHUTDOWN function to the platform microcontroller\r
+    ArmPlatformSysConfigSet (SYS_CFG_SHUTDOWN, 0);\r
+\r
     // We should never be here\r
     while(1);\r
   }\r