summaryrefslogtreecommitdiffstats
path: root/libstb/cvc.h
Commit message (Collapse)AuthorAgeFilesLines
* libstb/cvc: update memory-region to point to /reserved-memoryClaudio Carvalho2017-12-181-0/+1
| | | | | | | | | | | | The linux documentation, reserved-memory.txt, says that memory-region is a phandle that pairs to a children of /reserved-memory. This updates /ibm,secureboot/ibm,cvc/memory-region to point to /reserved-memory/secure-crypt-algo-code instead of /ibm,hostboot/reserved-memory/secure-crypt-algo-code. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* libstb/trustedboot.c: import tb_measure() from stb.cClaudio Carvalho2017-12-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | This imports tb_measure() from stb.c, but now it calls the CVC sha512 wrapper to calculate the sha512 hash of the firmware image provided. In trustedboot.c, the tb_measure() is renamed to trustedboot_measure(). The new function, trustedboot_measure(), no longer checks if the container payload hash calculated at boot time matches with the hash found in the container header. A few reasons: - If the system admin wants the container header to be checked/validated, the secure boot jumper must be set. Otherwise, the container header information may not be reliable. - The container layout is expected to change over time. Skiboot would need to maintain a parser for each container layout change. - Skiboot could be checking the hash against a container version that is not supported by the Container-Verification-Code (CVC). The tb_measure() calls are updated to trustedboot_measure() in a subsequent patch. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* libstb/secureboot.c: import sb_verify() from stb.cClaudio Carvalho2017-12-181-0/+20
| | | | | | | | | | | | | This imports the sb_verify() function from stb.c, but now it calls the CVC verify wrapper in order to verify signed firmware images. The hw-key-hash and hw-key-hash-size initialized in secureboot.c are passed to the CVC verify function wrapper. In secureboot.c, the sb_verify() is renamed to secureboot_verify(). The sb_verify() calls are updated in a subsequent patch. Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* libstb: import stb_init() breaking it into multiple filesClaudio Carvalho2017-12-181-0/+27
This imports stb_init() from stb.c, but breaking it into multiple files in order to make the code easier to read and to maintain. New files created: secureboot.c, trustedboot.c and cvc.c. The secureboot_init() in secureboot.c also initializes the hardware key hash and the hardware key hash size, which are used to call the CVC verify wrapper. These variables were initialized in the romcode_probe() function, libstb/drivers/romcode.c. The cvc_init() in cvc.c is slightly modified from what exists in stb_init(). Now it calls cvc_register() and cvc_service_register(). Signed-off-by: Claudio Carvalho <cclaudio@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud