]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/LcdGraphicsOutputDxe: Call LcdShutdown() on ExitBootServices() if...
authorOlivier Martin <olivier.martin@arm.com>
Mon, 23 Sep 2013 09:40:27 +0000 (09:40 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Sep 2013 09:40:27 +0000 (09:40 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14702 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmPlatformPkg.dec
ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcd.c
ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/HdLcdGraphicsOutputDxe.inf
ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.c
ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111Lcd.c
ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/PL111LcdGraphicsOutputDxe.inf

index 3358225aee1cd6200ca048084670b004ba69fd23..b459db21b2a231711060db5d699e35027e85fd60 100644 (file)
   gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores|FALSE|BOOLEAN|0x00000004\r
 \r
   gArmPlatformTokenSpaceGuid.PcdNorFlashCheckBlockLocked|FALSE|BOOLEAN|0x0000003C\r
-  \r
+\r
+  # Disable the GOP controller on ExitBootServices(). By default the value is FALSE,\r
+  # we assume the OS will handle the FrameBuffer from the UEFI GOP information.\r
+  gArmPlatformTokenSpaceGuid.PcdGopDisableOnExitBootServices|FALSE|BOOLEAN|0x0000003D\r
+\r
 [PcdsFixedAtBuild.common]\r
   gArmPlatformTokenSpaceGuid.PcdCoreCount|1|UINT32|0x00000039\r
   gArmPlatformTokenSpaceGuid.PcdClusterCount|1|UINT32|0x00000038\r
index c9baa9822449f56ed705efaf3c9fa294066425c7..9186912dfc881ea80dcade792ae84bc20229fb93 100644 (file)
@@ -120,6 +120,6 @@ LcdShutdown (
   VOID\r
   )\r
 {\r
-  // Nothing to do in terms of hardware.\r
-  // We could switch off the monitor display if required\r
+  // Disable the controller\r
+  MmioWrite32 (HDLCD_REG_COMMAND, HDLCD_DISABLE);\r
 }\r
index ac61bf75eb6036645713dbb9b94da792d7b30efd..8de4752b729ca3166cd2976f27b9dfac27fa217b 100644 (file)
@@ -56,5 +56,8 @@
 [FixedPcd]\r
   gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase\r
 \r
+[FeaturePcd]\r
+  gArmPlatformTokenSpaceGuid.PcdGopDisableOnExitBootServices\r
+\r
 [Depex]\r
   gEfiCpuArchProtocolGuid\r
index 34a56b3d8dc6d4a9216d1850a0935b1bded228b6..f4165d00030602164c524ac752b190fc4b2ae221 100644 (file)
@@ -225,7 +225,13 @@ LcdGraphicsExitBootServicesEvent (
   IN VOID       *Context\r
   )\r
 {\r
-       //TODO: Implement me\r
+  // By default, this PCD is FALSE. But if a platform starts a predefined OS that\r
+  // does not use a framebuffer then we might want to disable the display controller\r
+  // to avoid to display corrupted information on the screen.\r
+  if (FeaturePcdGet (PcdGopDisableOnExitBootServices)) {\r
+    // Turn-off the Display controller\r
+    LcdShutdown ();\r
+  }\r
 }\r
 \r
 /***************************************\r
index a955acb4dc5878f918645de4b4161919bae8d79e..ad841cd8dcac89fc5bb4079a9334a95e32102701 100644 (file)
@@ -99,8 +99,6 @@ LcdShutdown (
   VOID\r
   )\r
 {\r
-  // Nothing to do in terms of hardware.\r
-  // We could switch off the monitor display if required\r
-\r
-  //TODO: ImplementMe\r
+  // Disable the controller\r
+  MmioAnd32 (PL111_REG_LCD_CONTROL, ~PL111_CTRL_LCD_EN);\r
 }\r
index 5387e53c4ac3b4b0d50c122342d30d9a0b4a8559..27f00617e45e72885a0dd51e38371907ce28a2b4 100644 (file)
@@ -52,5 +52,8 @@
 [FixedPcd]\r
   gArmPlatformTokenSpaceGuid.PcdPL111LcdBase\r
 \r
+[FeaturePcd]\r
+  gArmPlatformTokenSpaceGuid.PcdGopDisableOnExitBootServices\r
+\r
 [Depex]\r
   gEfiCpuArchProtocolGuid\r