Enhance documentation, make return values independent from TF-M.
Related changes: https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/502/ https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/490/