docs: add userguide for realm payload testing

Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: Iac306f74d4e3a818bee3609f1f6dfd96661d7343
diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst
index d8ffe8b..a891380 100644
--- a/docs/getting_started/build-options.rst
+++ b/docs/getting_started/build-options.rst
@@ -146,6 +146,14 @@
    (RAM) or 1 (non-volatile memory like flash) as test results storage. Default
    value is 0, as writing to the flash significantly slows tests down.
 
+Realm payload specific Build Options
+------------------------------------
+
+-  ``TFTF_MAX_IMAGE_SIZE``: The option needs to be either set by the user or
+   by the platform makefile to specify the maximum size of TFTF binary. This
+   is needed so that the Realm payload binary can be appended to TFTF binary
+   via ``make pack_realm`` build command.
+
 FWU-specific Build Options
 --------------------------
 
diff --git a/docs/getting_started/build.rst b/docs/getting_started/build.rst
index d0147f9..c8eca67 100644
--- a/docs/getting_started/build.rst
+++ b/docs/getting_started/build.rst
@@ -103,6 +103,26 @@
 
 Please refer to the `TF-A documentation`_ for further details.
 
+Realm payload test image
+````````````````````````
+
+``realm.bin`` is the realm payload test image and is packaged along with
+tftf for Realm Management Extension (RME) testing. This can be built using
+the following command:
+
+::
+
+    make PLAT=<platform> realm
+
+The generated ``realm.bin`` needs to be packaged as part of ``tftf.bin`` to
+be used as a single BL33 image and can be done using the following command:
+
+::
+
+    make PLAT=<platform> pack_realm
+
+Please refer to the `TF-A RME documentation`_ for build and run instructions.
+
 NS_BL1U and NS_BL2U test images
 ```````````````````````````````
 
@@ -311,6 +331,7 @@
 .. _Arm Management Mode Interface: https://developer.arm.com/documentation/den0060/a/
 .. _Arm Firmware Framework for Armv8-A: https://developer.arm.com/docs/den0077/latest
 .. _TF-A documentation: https://trustedfirmware-a.readthedocs.org
+.. _TF-A RME documentation: https://trustedfirmware-a.readthedocs.io/en/latest/components/realm-management-extension.html
 .. _TF-A Secure Partition Manager (FF-A): https://trustedfirmware-a.readthedocs.io/en/latest/components/secure-partition-manager.html
 .. _TF-A Secure Partition Manager (MM): https://trustedfirmware-a.readthedocs.io/en/latest/components/secure-partition-manager-mm.html
 .. _Building TF-A Secure Partition Manager (MM): https://trustedfirmware-a.readthedocs.io/en/latest/components/secure-partition-manager-mm.html#building-tf-a-with-secure-partition-support