rmm-el3-comms-spec.rst 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. RMM-EL3 Communication interface
  2. *******************************
  3. This document defines the communication interface between RMM and EL3.
  4. There are two parts in this interface: the boot interface and the runtime
  5. interface.
  6. The Boot Interface defines the ABI between EL3 and RMM when the CPU enters
  7. R-EL2 for the first time after boot. The cold boot interface defines the ABI
  8. for the cold boot path and the warm boot interface defines the same for the
  9. warm path.
  10. The RMM-EL3 runtime interface defines the ABI for EL3 services which can be
  11. invoked by RMM as well as the register save-restore convention when handling an
  12. SMC call from NS.
  13. The below sections discuss these interfaces more in detail.
  14. .. _rmm_el3_ifc_versioning:
  15. RMM-EL3 Interface versioning
  16. ____________________________
  17. The RMM Boot and Runtime Interface uses a version number to check
  18. compatibility with the register arguments passed as part of Boot Interface and
  19. RMM-EL3 runtime interface.
  20. The Boot Manifest, discussed later in section :ref:`rmm_el3_boot_manifest`,
  21. uses a separate version number but with the same scheme.
  22. The version number is a 32-bit type with the following fields:
  23. .. csv-table::
  24. :header: "Bits", "Value"
  25. [0:15],``VERSION_MINOR``
  26. [16:30],``VERSION_MAJOR``
  27. [31],RES0
  28. The version numbers are sequentially increased and the rules for updating them
  29. are explained below:
  30. - ``VERSION_MAJOR``: This value is increased when changes break
  31. compatibility with previous versions. If the changes
  32. on the ABI are compatible with the previous one, ``VERSION_MAJOR``
  33. remains unchanged.
  34. - ``VERSION_MINOR``: This value is increased on any change that is backwards
  35. compatible with the previous version. When ``VERSION_MAJOR`` is increased,
  36. ``VERSION_MINOR`` must be set to 0.
  37. - ``RES0``: Bit 31 of the version number is reserved 0 as to maintain
  38. consistency with the versioning schemes used in other parts of RMM.
  39. This document specifies the 0.2 version of Boot Interface ABI and RMM-EL3
  40. services specification and the 0.2 version of the Boot Manifest.
  41. .. _rmm_el3_boot_interface:
  42. RMM Boot Interface
  43. __________________
  44. This section deals with the Boot Interface part of the specification.
  45. One of the goals of the Boot Interface is to allow EL3 firmware to pass
  46. down into RMM certain platform specific information dynamically. This allows
  47. RMM to be less platform dependent and be more generic across platform
  48. variations. It also allows RMM to be decoupled from the other boot loader
  49. images in the boot sequence and remain agnostic of any particular format used
  50. for configuration files.
  51. The Boot Interface ABI defines a set of register conventions and
  52. also a memory based manifest file to pass information from EL3 to RMM. The
  53. Boot Manifest and the associated platform data in it can be dynamically created
  54. by EL3 and there is no restriction on how the data can be obtained (e.g by DTB,
  55. hoblist or other).
  56. The register convention and the manifest are versioned separately to manage
  57. future enhancements and compatibility.
  58. RMM completes the boot by issuing the ``RMM_BOOT_COMPLETE`` SMC (0xC40001CF)
  59. back to EL3. After the RMM has finished the boot process, it can only be
  60. entered from EL3 as part of RMI handling.
  61. If RMM returns an error during boot (in any CPU), then RMM must not be entered
  62. from any CPU.
  63. .. _rmm_cold_boot_interface:
  64. Cold Boot Interface
  65. ~~~~~~~~~~~~~~~~~~~
  66. During cold boot RMM expects the following register values:
  67. .. csv-table::
  68. :header: "Register", "Value"
  69. :widths: 1, 5
  70. x0,Linear index of this PE. This index starts from 0 and must be less than the maximum number of CPUs to be supported at runtime (see x2).
  71. x1,Version for this Boot Interface as defined in :ref:`rmm_el3_ifc_versioning`.
  72. x2,Maximum number of CPUs to be supported at runtime. RMM should ensure that it can support this maximum number.
  73. x3,Base address for the shared buffer used for communication between EL3 firmware and RMM. This buffer must be of 4KB size (1 page). The Boot Manifest must be present at the base of this shared buffer during cold boot.
  74. During cold boot, EL3 firmware needs to allocate a 4KB page that will be
  75. passed to RMM in x3. This memory will be used as shared buffer for communication
  76. between EL3 and RMM. It must be assigned to Realm world and must be mapped with
  77. Normal memory attributes (IWB-OWB-ISH) at EL3. At boot, this memory will be
  78. used to populate the Boot Manifest. Since the Boot Manifest can be accessed by
  79. RMM prior to enabling its MMU, EL3 must ensure that proper cache maintenance
  80. operations are performed after the Boot Manifest is populated.
  81. EL3 should also ensure that this shared buffer is always available for use by RMM
  82. during the lifetime of the system and that it can be used for runtime
  83. communication between RMM and EL3. For example, when RMM invokes attestation
  84. service commands in EL3, this buffer can be used to exchange data between RMM
  85. and EL3. It is also allowed for RMM to invoke runtime services provided by EL3
  86. utilizing this buffer during the boot phase, prior to return back to EL3 via
  87. RMM_BOOT_COMPLETE SMC.
  88. RMM should map this memory page into its Stage 1 page-tables using Normal
  89. memory attributes.
  90. During runtime, it is the RMM which initiates any communication with EL3. If that
  91. communication requires the use of the shared area, it is expected that RMM needs
  92. to do the necessary concurrency protection to prevent the use of the same buffer
  93. by other PEs.
  94. The following sequence diagram shows how a generic EL3 Firmware would boot RMM.
  95. .. image:: ../resources/diagrams/rmm_cold_boot_generic.png
  96. Warm Boot Interface
  97. ~~~~~~~~~~~~~~~~~~~
  98. At warm boot, RMM is already initialized and only some per-CPU initialization
  99. is still pending. The only argument that is required by RMM at this stage is
  100. the CPU Id, which will be passed through register x0 whilst x1 to x3 are RES0.
  101. This is summarized in the following table:
  102. .. csv-table::
  103. :header: "Register", "Value"
  104. :widths: 1, 5
  105. x0,Linear index of this PE. This index starts from 0 and must be less than the maximum number of CPUs to be supported at runtime (see x2).
  106. x1 - x3,RES0
  107. Boot error handling and return values
  108. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  109. After boot up and initialization, RMM returns control back to EL3 through a
  110. ``RMM_BOOT_COMPLETE`` SMC call. The only argument of this SMC call will
  111. be returned in x1 and it will encode a signed integer with the error reason
  112. as per the following table:
  113. .. csv-table::
  114. :header: "Error code", "Description", "ID"
  115. :widths: 2 4 1
  116. ``E_RMM_BOOT_SUCCESS``,Boot successful,0
  117. ``E_RMM_BOOT_ERR_UNKNOWN``,Unknown error,-1
  118. ``E_RMM_BOOT_VERSION_NOT_VALID``,Boot Interface version reported by EL3 is not supported by RMM,-2
  119. ``E_RMM_BOOT_CPUS_OUT_OF_RAGE``,Number of CPUs reported by EL3 larger than maximum supported by RMM,-3
  120. ``E_RMM_BOOT_CPU_ID_OUT_OF_RAGE``,Current CPU Id is higher or equal than the number of CPUs supported by RMM,-4
  121. ``E_RMM_BOOT_INVALID_SHARED_BUFFER``,Invalid pointer to shared memory area,-5
  122. ``E_RMM_BOOT_MANIFEST_VERSION_NOT_SUPPORTED``,Version reported by the Boot Manifest not supported by RMM,-6
  123. ``E_RMM_BOOT_MANIFEST_DATA_ERROR``,Error parsing core Boot Manifest,-7
  124. For any error detected in RMM during cold or warm boot, RMM will return back to
  125. EL3 using ``RMM_BOOT_COMPLETE`` SMC with an appropriate error code. It is
  126. expected that EL3 will take necessary action to disable Realm world for further
  127. entry from NS Host on receiving an error. This will be done across all the PEs
  128. in the system so as to present a symmetric view to the NS Host. Any further
  129. warm boot by any PE should not enter RMM using the warm boot interface.
  130. .. _rmm_el3_boot_manifest:
  131. Boot Manifest
  132. ~~~~~~~~~~~~~
  133. During cold boot, EL3 Firmware passes a memory Boot Manifest to RMM containing
  134. platform information.
  135. This Boot Manifest is versioned independently of the Boot Interface, to help
  136. evolve the former independent of the latter.
  137. The current version for the Boot Manifest is ``v0.2`` and the rules explained
  138. in :ref:`rmm_el3_ifc_versioning` apply on this version as well.
  139. The Boot Manifest v0.2 has the following fields:
  140. - version : Version of the Manifest (v0.2)
  141. - plat_data : Pointer to the platform specific data and not specified by this
  142. document. These data are optional and can be NULL.
  143. - plat_dram : Structure encoding the NS DRAM information on the platform. This
  144. field is also optional and platform can choose to zero out this structure if
  145. RMM does not need EL3 to send this information during the boot.
  146. For the current version of the Boot Manifest, the core manifest contains a pointer
  147. to the platform data. EL3 must ensure that the whole Boot Manifest, including
  148. the platform data, if available, fits inside the RMM EL3 shared buffer.
  149. For the data structure specification of Boot Manifest, refer to
  150. :ref:`rmm_el3_manifest_struct`
  151. .. _runtime_services_and_interface:
  152. RMM-EL3 Runtime Interface
  153. __________________________
  154. This section defines the RMM-EL3 runtime interface which specifies the ABI for
  155. EL3 services expected by RMM at runtime as well as the register save and
  156. restore convention between EL3 and RMM as part of RMI call handling. It is
  157. important to note that RMM is allowed to invoke EL3-RMM runtime interface
  158. services during the boot phase as well. The EL3 runtime service handling must
  159. not result in a world switch to another world unless specified. Both the RMM
  160. and EL3 are allowed to make suitable optimizations based on this assumption.
  161. If the interface requires the use of memory, then the memory references should
  162. be within the shared buffer communicated as part of the boot interface. See
  163. :ref:`rmm_cold_boot_interface` for properties of this shared buffer which both
  164. EL3 and RMM must adhere to.
  165. RMM-EL3 runtime service return codes
  166. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  167. The return codes from EL3 to RMM is a 32 bit signed integer which encapsulates
  168. error condition as described in the following table:
  169. .. csv-table::
  170. :header: "Error code", "Description", "ID"
  171. :widths: 2 4 1
  172. ``E_RMM_OK``,No errors detected,0
  173. ``E_RMM_UNK``,Unknown/Generic error,-1
  174. ``E_RMM_BAD_ADDR``,The value of an address used as argument was invalid,-2
  175. ``E_RMM_BAD_PAS``,Incorrect PAS,-3
  176. ``E_RMM_NOMEM``,Not enough memory to perform an operation,-4
  177. ``E_RMM_INVAL``,The value of an argument was invalid,-5
  178. If multiple failure conditions are detected in an RMM to EL3 command, then EL3
  179. is allowed to return an error code corresponding to any of the failure
  180. conditions.
  181. RMM-EL3 runtime services
  182. ~~~~~~~~~~~~~~~~~~~~~~~~
  183. The following table summarizes the RMM runtime services that need to be
  184. implemented by EL3 Firmware.
  185. .. csv-table::
  186. :header: "FID", "Command"
  187. :widths: 2 5
  188. 0xC400018F,``RMM_RMI_REQ_COMPLETE``
  189. 0xC40001B0,``RMM_GTSI_DELEGATE``
  190. 0xC40001B1,``RMM_GTSI_UNDELEGATE``
  191. 0xC40001B2,``RMM_ATTEST_GET_REALM_KEY``
  192. 0xC40001B3,``RMM_ATTEST_GET_PLAT_TOKEN``
  193. RMM_RMI_REQ_COMPLETE command
  194. ============================
  195. Notifies the completion of an RMI call to the Non-Secure world.
  196. This call is the only function currently in RMM-EL3 runtime interface which
  197. results in a world switch to NS. This call is the reply to the original RMI
  198. call and it is forwarded by EL3 to the NS world.
  199. FID
  200. ---
  201. ``0xC400018F``
  202. Input values
  203. ------------
  204. .. csv-table::
  205. :header: "Name", "Register", "Field", "Type", "Description"
  206. :widths: 1 1 1 1 5
  207. fid,x0,[63:0],UInt64,Command FID
  208. err_code,x1,[63:0],RmiCommandReturnCode,Error code returned by the RMI service invoked by NS World. See Realm Management Monitor specification for more info
  209. Output values
  210. -------------
  211. This call does not return.
  212. Failure conditions
  213. ------------------
  214. Since this call does not return to RMM, there is no failure condition which
  215. can be notified back to RMM.
  216. RMM_GTSI_DELEGATE command
  217. =========================
  218. Delegate a memory granule by changing its PAS from Non-Secure to Realm.
  219. FID
  220. ---
  221. ``0xC40001B0``
  222. Input values
  223. ------------
  224. .. csv-table::
  225. :header: "Name", "Register", "Field", "Type", "Description"
  226. :widths: 1 1 1 1 5
  227. fid,x0,[63:0],UInt64,Command FID
  228. base_pa,x1,[63:0],Address,PA of the start of the granule to be delegated
  229. Output values
  230. -------------
  231. .. csv-table::
  232. :header: "Name", "Register", "Field", "Type", "Description"
  233. :widths: 1 1 1 2 4
  234. Result,x0,[63:0],Error Code,Command return status
  235. Failure conditions
  236. ------------------
  237. The table below shows all the possible error codes returned in ``Result`` upon
  238. a failure. The errors are ordered by condition check.
  239. .. csv-table::
  240. :header: "ID", "Condition"
  241. :widths: 1 5
  242. ``E_RMM_BAD_ADDR``,``PA`` does not correspond to a valid granule address
  243. ``E_RMM_BAD_PAS``,The granule pointed by ``PA`` does not belong to Non-Secure PAS
  244. ``E_RMM_OK``,No errors detected
  245. RMM_GTSI_UNDELEGATE command
  246. ===========================
  247. Undelegate a memory granule by changing its PAS from Realm to Non-Secure.
  248. FID
  249. ---
  250. ``0xC40001B1``
  251. Input values
  252. ------------
  253. .. csv-table::
  254. :header: "Name", "Register", "Field", "Type", "Description"
  255. :widths: 1 1 1 1 5
  256. fid,x0,[63:0],UInt64,Command FID
  257. base_pa,x1,[63:0],Address,PA of the start of the granule to be undelegated
  258. Output values
  259. -------------
  260. .. csv-table::
  261. :header: "Name", "Register", "Field", "Type", "Description"
  262. :widths: 1 1 1 2 4
  263. Result,x0,[63:0],Error Code,Command return status
  264. Failure conditions
  265. ------------------
  266. The table below shows all the possible error codes returned in ``Result`` upon
  267. a failure. The errors are ordered by condition check.
  268. .. csv-table::
  269. :header: "ID", "Condition"
  270. :widths: 1 5
  271. ``E_RMM_BAD_ADDR``,``PA`` does not correspond to a valid granule address
  272. ``E_RMM_BAD_PAS``,The granule pointed by ``PA`` does not belong to Realm PAS
  273. ``E_RMM_OK``,No errors detected
  274. RMM_ATTEST_GET_REALM_KEY command
  275. ================================
  276. Retrieve the Realm Attestation Token Signing key from EL3.
  277. FID
  278. ---
  279. ``0xC40001B2``
  280. Input values
  281. ------------
  282. .. csv-table::
  283. :header: "Name", "Register", "Field", "Type", "Description"
  284. :widths: 1 1 1 1 5
  285. fid,x0,[63:0],UInt64,Command FID
  286. buf_pa,x1,[63:0],Address,PA where the Realm Attestation Key must be stored by EL3. The PA must belong to the shared buffer
  287. buf_size,x2,[63:0],Size,Size in bytes of the Realm Attestation Key buffer. ``bufPa + bufSize`` must lie within the shared buffer
  288. ecc_curve,x3,[63:0],Enum,Type of the elliptic curve to which the requested attestation key belongs to. See :ref:`ecc_curves`
  289. Output values
  290. -------------
  291. .. csv-table::
  292. :header: "Name", "Register", "Field", "Type", "Description"
  293. :widths: 1 1 1 1 5
  294. Result,x0,[63:0],Error Code,Command return status
  295. keySize,x1,[63:0],Size,Size of the Realm Attestation Key
  296. Failure conditions
  297. ------------------
  298. The table below shows all the possible error codes returned in ``Result`` upon
  299. a failure. The errors are ordered by condition check.
  300. .. csv-table::
  301. :header: "ID", "Condition"
  302. :widths: 1 5
  303. ``E_RMM_BAD_ADDR``,``PA`` is outside the shared buffer
  304. ``E_RMM_INVAL``,``PA + BSize`` is outside the shared buffer
  305. ``E_RMM_INVAL``,``Curve`` is not one of the listed in :ref:`ecc_curves`
  306. ``E_RMM_UNK``,An unknown error occurred whilst processing the command
  307. ``E_RMM_OK``,No errors detected
  308. .. _ecc_curves:
  309. Supported ECC Curves
  310. --------------------
  311. .. csv-table::
  312. :header: "ID", "Curve"
  313. :widths: 1 5
  314. 0,ECC SECP384R1
  315. RMM_ATTEST_GET_PLAT_TOKEN command
  316. =================================
  317. Retrieve the Platform Token from EL3.
  318. FID
  319. ---
  320. ``0xC40001B3``
  321. Input values
  322. ------------
  323. .. csv-table::
  324. :header: "Name", "Register", "Field", "Type", "Description"
  325. :widths: 1 1 1 1 5
  326. fid,x0,[63:0],UInt64,Command FID
  327. buf_pa,x1,[63:0],Address,PA of the platform attestation token. The challenge object is passed in this buffer. The PA must belong to the shared buffer
  328. buf_size,x2,[63:0],Size,Size in bytes of the platform attestation token buffer. ``bufPa + bufSize`` must lie within the shared buffer
  329. c_size,x3,[63:0],Size,Size in bytes of the challenge object. It corresponds to the size of one of the defined SHA algorithms
  330. Output values
  331. -------------
  332. .. csv-table::
  333. :header: "Name", "Register", "Field", "Type", "Description"
  334. :widths: 1 1 1 1 5
  335. Result,x0,[63:0],Error Code,Command return status
  336. tokenSize,x1,[63:0],Size,Size of the platform token
  337. Failure conditions
  338. ------------------
  339. The table below shows all the possible error codes returned in ``Result`` upon
  340. a failure. The errors are ordered by condition check.
  341. .. csv-table::
  342. :header: "ID", "Condition"
  343. :widths: 1 5
  344. ``E_RMM_BAD_ADDR``,``PA`` is outside the shared buffer
  345. ``E_RMM_INVAL``,``PA + BSize`` is outside the shared buffer
  346. ``E_RMM_INVAL``,``CSize`` does not represent the size of a supported SHA algorithm
  347. ``E_RMM_UNK``,An unknown error occurred whilst processing the command
  348. ``E_RMM_OK``,No errors detected
  349. RMM-EL3 world switch register save restore convention
  350. _____________________________________________________
  351. As part of NS world switch, EL3 is expected to maintain a register context
  352. specific to each world and will save and restore the registers
  353. appropriately. This section captures the contract between EL3 and RMM on the
  354. register set to be saved and restored.
  355. EL3 must maintain a separate register context for the following:
  356. #. General purpose registers (x0-x30) and ``sp_el0``, ``sp_el2`` stack pointers
  357. #. EL2 system register context for all enabled features by EL3. These include system registers with the ``_EL2`` prefix. The EL2 physical and virtual timer registers must not be included in this.
  358. As part of SMC forwarding between the NS world and Realm world, EL3 allows x0-x7 to be passed
  359. as arguments to Realm and x0-x4 to be used for return arguments back to Non Secure.
  360. As per SMCCCv1.2, x4 must be preserved if not being used as return argument by the SMC function
  361. and it is the responsibility of RMM to preserve this or use this as a return argument.
  362. EL3 will always copy x0-x4 from Realm context to NS Context.
  363. EL3 must save and restore the following as part of world switch:
  364. #. EL2 system registers with the exception of ``zcr_el2`` register.
  365. #. PAuth key registers (APIA, APIB, APDA, APDB, APGA).
  366. EL3 will not save some registers as mentioned in the below list. It is the
  367. responsibility of RMM to ensure that these are appropriately saved if the
  368. Realm World makes use of them:
  369. #. FP/SIMD registers
  370. #. SVE registers
  371. #. SME registers
  372. #. EL1/0 registers with the exception of PAuth key registers as mentioned above.
  373. #. zcr_el2 register.
  374. It is essential that EL3 honors this contract to maintain the Confidentiality and integrity
  375. of the Realm world.
  376. SMCCC v1.3 allows NS world to specify whether SVE context is in use. In this
  377. case, RMM could choose to not save the incoming SVE context but must ensure
  378. to clear SVE registers if they have been used in Realm World. The same applies
  379. to SME registers.
  380. Types
  381. _____
  382. .. _rmm_el3_manifest_struct:
  383. RMM-EL3 Boot Manifest structure
  384. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  385. The RMM-EL3 Boot Manifest v0.2 structure contains platform boot information passed
  386. from EL3 to RMM. The size of the Boot Manifest is 40 bytes.
  387. The members of the RMM-EL3 Boot Manifest structure are shown in the following
  388. table:
  389. +-----------+--------+----------------+----------------------------------------+
  390. | Name | Offset | Type | Description |
  391. +===========+========+================+========================================+
  392. | version | 0 | uint32_t | Boot Manifest version |
  393. +-----------+--------+----------------+----------------------------------------+
  394. | padding | 4 | uint32_t | Reserved, set to 0 |
  395. +-----------+--------+----------------+----------------------------------------+
  396. | plat_data | 8 | uintptr_t | Pointer to Platform Data section |
  397. +-----------+--------+----------------+----------------------------------------+
  398. | plat_dram | 16 | ns_dram_info | NS DRAM Layout Info structure |
  399. +-----------+--------+----------------+----------------------------------------+
  400. .. _ns_dram_info_struct:
  401. NS DRAM Layout Info structure
  402. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  403. NS DRAM Layout Info structure contains information about platform Non-secure
  404. DRAM layout. The members of this structure are shown in the table below:
  405. +-----------+--------+----------------+----------------------------------------+
  406. | Name | Offset | Type | Description |
  407. +===========+========+================+========================================+
  408. | num_banks | 0 | uint64_t | Number of NS DRAM banks |
  409. +-----------+--------+----------------+----------------------------------------+
  410. | banks | 8 | ns_dram_bank * | Pointer to 'ns_dram_bank'[] array |
  411. +-----------+--------+----------------+----------------------------------------+
  412. | checksum | 16 | uint64_t | Checksum |
  413. +-----------+--------+----------------+----------------------------------------+
  414. Checksum is calculated as two's complement sum of 'num_banks', 'banks' pointer
  415. and DRAM banks data array pointed by it.
  416. .. _ns_dram_bank_struct:
  417. NS DRAM Bank structure
  418. ~~~~~~~~~~~~~~~~~~~~~~
  419. NS DRAM Bank structure contains information about each Non-secure DRAM bank:
  420. +-----------+--------+----------------+----------------------------------------+
  421. | Name | Offset | Type | Description |
  422. +===========+========+================+========================================+
  423. | base | 0 | uintptr_t | Base address |
  424. +-----------+--------+----------------+----------------------------------------+
  425. | size | 8 | uint64_t | Size of bank in bytes |
  426. +-----------+--------+----------------+----------------------------------------+