]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/ArmRealViewEbPkg: Use NorFlashDxe and enable variables services
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 3 Jun 2011 09:39:00 +0000 (09:39 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 3 Jun 2011 09:39:00 +0000 (09:39 +0000)
The ARM RealView EB (hardware and RTSM) supports the same NOR Flash controller
as the ARM Versatile Express.
Add the implementation of the NorFlashPlatformLib for ArmRealViewEb.

Remove the Firmware Volume Block raw data used to enable environment variables on
ARM RealView EB from the FDF file to use the NOR Flash driver.

Replace the variable service emulation by the version using Firmware Volume Block.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11747 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A8.dsc
ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-A9x2.dsc
ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-MPCore.fdf
ArmPlatformPkg/ArmRealViewEbPkg/ArmRealViewEb-RTSM-UniCore.fdf
ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEb.c [new file with mode: 0644]
ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf [new file with mode: 0644]

index 7387bcc03737cf416c122a55df1f0fbcebb0b431..1ab0479dbcd8cadcab761ca9386fde4c4b7aaf56 100644 (file)
@@ -43,6 +43,7 @@
   \r
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
   BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf\r
   \r
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf\r
   BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf\r
+  SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf\r
 \r
   EfiResetSystemLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf\r
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf\r
 \r
   EfiResetSystemLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf\r
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf\r
   PL011UartLib|ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.inf\r
 \r
   BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf\r
   PL011UartLib|ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.inf\r
 \r
   BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf\r
+  \r
+  NorFlashPlatformLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf\r
 \r
 [LibraryClasses.common.SEC]\r
   ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf\r
 \r
 [LibraryClasses.common.SEC]\r
   ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F\r
 \r
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07\r
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F\r
 \r
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07\r
+  \r
+  #\r
+  # NV Storage PCDs. Use base of 0x43F00000 for NOR0\r
+  #\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x43F00000\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x000C0000\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x43FC0000\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00020000\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x43FE0000\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00020000\r
 \r
   gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|""\r
   gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07\r
 \r
   gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|""\r
   gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07\r
   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf\r
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf\r
   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf\r
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf\r
-  MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf\r
+  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf\r
+  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf\r
   EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf  \r
   \r
   EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf\r
   EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf  \r
   \r
   EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf\r
   ArmPlatformPkg/ArmRealViewEbPkg/FvbDxe/FvbDxe.inf\r
   ArmPkg/Drivers/PL390Gic/PL390GicDxe.inf\r
   ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf\r
   ArmPlatformPkg/ArmRealViewEbPkg/FvbDxe/FvbDxe.inf\r
   ArmPkg/Drivers/PL390Gic/PL390GicDxe.inf\r
   ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf\r
+  \r
+  ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf\r
 \r
   #\r
   # Semi-hosting filesystem\r
 \r
   #\r
   # Semi-hosting filesystem\r
index 5f91b3bc7a746d5533092fb3b5b1076782720eda..f1043421f44ef6fc71495c0c209464e3525cdfde 100644 (file)
@@ -44,6 +44,7 @@
   
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
   BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf
   
   BaseLib|MdePkg/Library/BaseLib/BaseLib.inf
   BaseMemoryLib|ArmPkg/Library/BaseMemoryLibStm/BaseMemoryLibStm.inf
+  SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
 
   EfiResetSystemLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
 
   EfiResetSystemLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/ResetSystemLib/ResetSystemLib.inf
   PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf
   PL011UartLib|ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.inf
 
   BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf
   PL011UartLib|ArmPlatformPkg/Drivers/PL011Uart/PL011Uart.inf
 
   BdsLib|ArmPkg/Library/BdsLib/BdsLib.inf
+  
+  NorFlashPlatformLib|ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf
 
 [LibraryClasses.common.SEC]
   ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLibSec.inf
 
 [LibraryClasses.common.SEC]
   ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7MPCoreLibSec.inf
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
 
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
   gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
 
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
+  
+  #
+  # NV Storage PCDs. Use base of 0x43F00000 for NOR0
+  #
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x43F00000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x000C0000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x43FC0000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00020000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x43FE0000
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00020000
 
   gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|""
   gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07
 
   gEmbeddedTokenSpaceGuid.PcdEmbeddedAutomaticBootCommand|""
   gEmbeddedTokenSpaceGuid.PcdEmbeddedDefaultTextColor|0x07
   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
   MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
-  MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
+  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
+  MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
   EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf  
   
   EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
   EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf  
   
   EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
   ArmPlatformPkg/ArmRealViewEbPkg/FvbDxe/FvbDxe.inf
   ArmPkg/Drivers/PL390Gic/PL390GicDxe.inf
   ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf
   ArmPlatformPkg/ArmRealViewEbPkg/FvbDxe/FvbDxe.inf
   ArmPkg/Drivers/PL390Gic/PL390GicDxe.inf
   ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf
+  
+  ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
 
   #
   # Semi-hosting filesystem
 
   #
   # Semi-hosting filesystem
index 01eb8d69f809e71f6f1094359c5831864a9f63a1..c34a4a5363f63906be52f63d06622365e50b9cb6 100644 (file)
@@ -57,40 +57,6 @@ FV = FVMAIN_SEC
 gEmbeddedTokenSpaceGuid.PcdFlashFvMainBase|gEmbeddedTokenSpaceGuid.PcdFlashFvMainSize
 FV = FVMAIN_COMPACT
 
 gEmbeddedTokenSpaceGuid.PcdFlashFvMainBase|gEmbeddedTokenSpaceGuid.PcdFlashFvMainSize
 FV = FVMAIN_COMPACT
 
-0x00150000|0x00010000
-gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize
-#NV_VARIABLE_STORE
-DATA = {
-  ## This is the EFI_FIRMWARE_VOLUME_HEADER
-  # ZeroVector []
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  # FileSystemGuid: gEfiSystemNvDataFvGuid         =
-  #  { 0xFFF12B8D, 0x7696, 0x4C8B, { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }}
-  0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C,
-  0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50,
-  # FvLength: 0x20000
-  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
-  #Signature "_FVH"       #Attributes
-  0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00,
-  #HeaderLength #CheckSum #ExtHeaderOffset #Reserved #Revision
-  0x48, 0x00, 0x36, 0x09, 0x00, 0x00, 0x00, 0x02,
-  #Blockmap[0]: 2 Blocks * 0x10000 Bytes / Block
-  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-  #Blockmap[1]: End
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  ## This is the VARIABLE_STORE_HEADER
-  #Signature: gEfiVariableGuid =
-  #  { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}
-  0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41,
-  0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d,
-  #Size: 0xc000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xBFB8
-  # This can speed up the Variable Dispatch a bit.
-  0xB8, 0xBF, 0x00, 0x00,
-  #FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32
-  0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-}
-
 ################################################################################
 #
 # FV Section
 ################################################################################
 #
 # FV Section
@@ -153,7 +119,8 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
   INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
   INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
   INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
   INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
   INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
-  INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf
+  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
+  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
   INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf
   INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
   INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
   INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf
   INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
   INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
@@ -163,6 +130,8 @@ READ_LOCK_STATUS   = TRUE
   
   INF ArmPkg/Drivers/PL390Gic/PL390GicDxe.inf
   INF ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf
   
   INF ArmPkg/Drivers/PL390Gic/PL390GicDxe.inf
   INF ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf
+  
+  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
 
   #
   # Semi-hosting filesystem
 
   #
   # Semi-hosting filesystem
index 29c8e7e2712ced24f7d3998f9584161addd03c04..c9c108e2e92bdcaf2096fab261d0562ca1d3c536 100644 (file)
@@ -57,40 +57,6 @@ FV = FVMAIN_SEC
 gEmbeddedTokenSpaceGuid.PcdFlashFvMainBase|gEmbeddedTokenSpaceGuid.PcdFlashFvMainSize\r
 FV = FVMAIN_COMPACT\r
 \r
 gEmbeddedTokenSpaceGuid.PcdFlashFvMainBase|gEmbeddedTokenSpaceGuid.PcdFlashFvMainSize\r
 FV = FVMAIN_COMPACT\r
 \r
-0x00150000|0x00010000\r
-gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize\r
-#NV_VARIABLE_STORE\r
-DATA = {\r
-  ## This is the EFI_FIRMWARE_VOLUME_HEADER\r
-  # ZeroVector []\r
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\r
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\r
-  # FileSystemGuid: gEfiSystemNvDataFvGuid         =\r
-  #  { 0xFFF12B8D, 0x7696, 0x4C8B, { 0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50 }}\r
-  0x8D, 0x2B, 0xF1, 0xFF, 0x96, 0x76, 0x8B, 0x4C,\r
-  0xA9, 0x85, 0x27, 0x47, 0x07, 0x5B, 0x4F, 0x50,\r
-  # FvLength: 0x20000\r
-  0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\r
-  #Signature "_FVH"       #Attributes\r
-  0x5f, 0x46, 0x56, 0x48, 0xff, 0xfe, 0x04, 0x00,\r
-  #HeaderLength #CheckSum #ExtHeaderOffset #Reserved #Revision\r
-  0x48, 0x00, 0x36, 0x09, 0x00, 0x00, 0x00, 0x02,\r
-  #Blockmap[0]: 2 Blocks * 0x10000 Bytes / Block\r
-  0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,\r
-  #Blockmap[1]: End\r
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\r
-  ## This is the VARIABLE_STORE_HEADER\r
-  #Signature: gEfiVariableGuid =\r
-  #  { 0xddcf3616, 0x3275, 0x4164, { 0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d }}\r
-  0x16, 0x36, 0xcf, 0xdd, 0x75, 0x32, 0x64, 0x41,\r
-  0x98, 0xb6, 0xfe, 0x85, 0x70, 0x7f, 0xfe, 0x7d,\r
-  #Size: 0xc000 (gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize) - 0x48 (size of EFI_FIRMWARE_VOLUME_HEADER) = 0xBFB8\r
-  # This can speed up the Variable Dispatch a bit.\r
-  0xB8, 0xBF, 0x00, 0x00,\r
-  #FORMATTED: 0x5A #HEALTHY: 0xFE #Reserved: UINT16 #Reserved1: UINT32\r
-  0x5A, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00\r
-}\r
-\r
 ################################################################################\r
 #\r
 # FV Section\r
 ################################################################################\r
 #\r
 # FV Section\r
@@ -153,7 +119,8 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf\r
   INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
   INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf\r
   INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf\r
   INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf\r
   INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf\r
-  INF MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf\r
+  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf\r
+  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf\r
   INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf\r
   INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf\r
   INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf\r
   INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf\r
   INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf\r
   INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf\r
@@ -163,6 +130,8 @@ READ_LOCK_STATUS   = TRUE
   \r
   INF ArmPkg/Drivers/PL390Gic/PL390GicDxe.inf\r
   INF ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf\r
   \r
   INF ArmPkg/Drivers/PL390Gic/PL390GicDxe.inf\r
   INF ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf\r
+  \r
+  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf\r
 \r
   #\r
   # Semi-hosting filesystem\r
 \r
   #\r
   # Semi-hosting filesystem\r
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEb.c b/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEb.c
new file mode 100644 (file)
index 0000000..334dc06
--- /dev/null
@@ -0,0 +1,52 @@
+/** @file\r
+\r
+ Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
+ are licensed and made available under the terms and conditions of the BSD License\r
+ which accompanies this distribution.  The full text of the license may be found at\r
+ http://opensource.org/licenses/bsd-license.php\r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+ **/\r
+\r
+#include <PiDxe.h>\r
+#include <Library/NorFlashPlatformLib.h>\r
+#include <ArmPlatform.h>\r
+\r
+#define NOR_FLASH_DEVICE_COUNT                     1\r
+\r
+// RTSM\r
+NOR_FLASH_DESCRIPTION mNorFlashDevices[NOR_FLASH_DEVICE_COUNT] = {\r
+  { // UEFI\r
+    ARM_EB_SMB_NOR_BASE,\r
+    SIZE_128KB * 512,\r
+    SIZE_128KB,\r
+    {0xE7223039, 0x5836, 0x41E1, 0xB5, 0x42, 0xD7, 0xEC, 0x73, 0x6C, 0x5E, 0x59}\r
+  }\r
+};\r
+\r
+EFI_STATUS\r
+NorFlashPlatformInitialization (\r
+  VOID\r
+  )\r
+{\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+EFI_STATUS\r
+NorFlashPlatformGetDevices (\r
+  OUT NOR_FLASH_DESCRIPTION   **NorFlashDevices,\r
+  OUT UINT32                  *Count\r
+  )\r
+{\r
+  if ((NorFlashDevices == NULL) || (Count == NULL)) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  *NorFlashDevices = mNorFlashDevices;\r
+  *Count = NOR_FLASH_DEVICE_COUNT;\r
+\r
+  return EFI_SUCCESS;\r
+}\r
diff --git a/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf b/ArmPlatformPkg/ArmRealViewEbPkg/Library/NorFlashArmRealViewEbLib/NorFlashArmRealViewEbLib.inf
new file mode 100644 (file)
index 0000000..54866b2
--- /dev/null
@@ -0,0 +1,41 @@
+#/** @file
+#  
+#  Component discription file for ArmVeGraphicsDxe module
+#  
+#  Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>
+#  This program and the accompanying materials
+#  are licensed and made available under the terms and conditions of the BSD License
+#  which accompanies this distribution.  The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php
+#  
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#  
+#**/
+
+[Defines]
+  INF_VERSION                    = 0x00010005
+  BASE_NAME                      = NorFlashArmRealViewEbLib
+  FILE_GUID                      = a3a49a60-7597-11e0-b07c-0002a5d5c51b
+  MODULE_TYPE                    = DXE_DRIVER
+  VERSION_STRING                 = 1.0
+  LIBRARY_CLASS                  = NorFlashPlatformLib
+  
+[Sources.common]
+  NorFlashArmRealViewEb.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  ArmPlatformPkg/ArmPlatformPkg.dec
+
+[LibraryClasses]
+  BaseLib
+  DebugLib
+  IoLib
+
+[Guids]
+
+[Protocols]
+
+[Pcd]
+