U540.fdf.inc 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ## @file
  2. # Definitions of Flash definition file on SiFive Freedom U540 HiFive Unleashed RISC-V platform
  3. #
  4. # Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>
  5. #
  6. # SPDX-License-Identifier: BSD-2-Clause-Patent
  7. #
  8. ##
  9. [Defines]
  10. DEFINE BLOCK_SIZE = 0x1000
  11. DEFINE FW_BASE_ADDRESS = 0x80000000
  12. DEFINE FW_SIZE = 0x00800000
  13. DEFINE FW_BLOCKS = 0x800
  14. #
  15. # 0x000000-0x7DFFFF code
  16. # 0x7E0000-0x800000 variables
  17. #
  18. DEFINE CODE_BASE_ADDRESS = 0x80000000
  19. DEFINE CODE_SIZE = 0x007E0000
  20. DEFINE CODE_BLOCKS = 0x7E0
  21. DEFINE VARS_BLOCKS = 0x20
  22. DEFINE SECFV_OFFSET = 0x00000000
  23. DEFINE SECFV_SIZE = 0x00020000
  24. DEFINE PEIFV_OFFSET = 0x00020000
  25. DEFINE PEIFV_SIZE = 0x00080000
  26. DEFINE SCRATCH_OFFSET = 0x000a0000
  27. DEFINE SCRATCH_SIZE = 0x00010000
  28. DEFINE FVMAIN_OFFSET = 0x00100000 # Must be power of 2 for PMP setting
  29. DEFINE FVMAIN_SIZE = 0x0018C000
  30. DEFINE VARS_OFFSET = 0x007E0000
  31. DEFINE VARS_SIZE = 0x00020000
  32. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdVariableFdBaseAddress = $(FW_BASE_ADDRESS) + $(VARS_OFFSET)
  33. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdVariableFdSize = $(VARS_SIZE)
  34. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdVariableFdBlockSize = $(BLOCK_SIZE)
  35. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdFwStartAddress = $(CODE_BASE_ADDRESS)
  36. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdFwEndAddress = $(CODE_BASE_ADDRESS) + $(SECFV_SIZE) + $(PEIFV_SIZE) + $(SCRATCH_SIZE)
  37. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdOpenSbiStackSize = 8192
  38. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdScratchRamBase = $(CODE_BASE_ADDRESS) + $(SCRATCH_OFFSET)
  39. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdScratchRamSize = $(SCRATCH_SIZE)
  40. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdTemporaryRamBase = $(CODE_BASE_ADDRESS) + $(FW_SIZE)
  41. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdTemporaryRamSize = 0x10000
  42. SET gUefiRiscVPkgTokenSpaceGuid.PcdRiscVMachineTimerFrequencyInHerz = 1000000
  43. SET gSiFiveU5SeriesPlatformsPkgTokenSpaceGuid.PcdU5PlatformSystemClock = 1000000000 # 1GHz system clock
  44. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdHartCount = 5 # Total cores on U540 platform
  45. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdBootHartId = 1 # Boot hart ID
  46. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdBootableHartNumber = 4 # The bootable hart core number.
  47. # Which is incorporate with OpenSBI
  48. # platform hart_index2id value.
  49. SET gSiFiveU5SeriesPlatformsPkgTokenSpaceGuid.PcdNumberofU5Cores = 4 # Total U5 cores enabled on U540 platform
  50. SET gSiFiveU5SeriesPlatformsPkgTokenSpaceGuid.PcdE5MCSupported = True # E51 MC exists.
  51. SET gSiFiveU5SeriesPlatformsPkgTokenSpaceGuid.PcdU5UartBase = 0x10010000 # Serial port base address
  52. SET gUefiRiscVPlatformPkgTokenSpaceGuid.PcdPeiCorePrivilegeMode = 1 # Set PeiCore to S-Mode