diff options
author | Claudio Carvalho <cclaudio@linux.ibm.com> | 2019-09-26 10:54:53 -0300 |
---|---|---|
committer | Ram Pai <linuxram@us.ibm.com> | 2020-11-03 12:52:37 -0500 |
commit | cdfad0a89731e75a625cf58ddf0c0cd6d49a013d (patch) | |
tree | 9a048a1412a08c408384f062188128ed257ed0e4 | |
parent | 74e6dde117a8048c1339d5e674ef128094cefe1c (diff) | |
download | skiboot-cdfad0a89731e75a625cf58ddf0c0cd6d49a013d.zip skiboot-cdfad0a89731e75a625cf58ddf0c0cd6d49a013d.tar.gz skiboot-cdfad0a89731e75a625cf58ddf0c0cd6d49a013d.tar.bz2 |
Change skiboot to support opalcreate.c
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
[removed the WIP tag]
Signed-off-by: Claudio Carvalho <cclaudio@linux.ibm.com>
-rw-r--r-- | core/init.c | 3 | ||||
-rw-r--r-- | hw/ultravisor.c | 7 | ||||
-rw-r--r-- | include/ultravisor.h | 2 | ||||
-rw-r--r-- | libstb/drivers/tpm_i2c_nuvoton.c | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/core/init.c b/core/init.c index 9b74a77..e737664 100644 --- a/core/init.c +++ b/core/init.c @@ -47,7 +47,6 @@ #include <opal-dump.h> #include <ultravisor.h> #include <libstb/crypto/include/uv-crypto.h> -#include <libstb/tss2/tpm_nv.h> enum proc_gen proc_gen; unsigned int pcie_max_link_speed; @@ -545,7 +544,7 @@ void __noreturn load_and_boot_kernel(bool is_reboot) load_initramfs(); - tpm_nv_init(); + wrapping_key_init(); trustedboot_exit_boot_services(); start_ultravisor(); diff --git a/hw/ultravisor.c b/hw/ultravisor.c index d40ac61..5c1163a 100644 --- a/hw/ultravisor.c +++ b/hw/ultravisor.c @@ -16,6 +16,8 @@ #include <ultravisor-api.h> #include <libfdt/libfdt.h> #include <libstb/container.h> +#include <libstb/cvc.h> +#include <libstb/tss2/tpm_nv.h> bool uv_present = false; static char *uv_image = NULL; @@ -227,6 +229,7 @@ static int create_dtb_uv(void *uv_fdt) fdt_property_string(uv_fdt, "description", "Ultravisor fdt"); fdt_begin_node(uv_fdt, "ibm,uv-fdt"); fdt_property_string(uv_fdt, "compatible", "ibm,uv-fdt"); + fdt_add_wrapping_key(uv_fdt); fdt_end_node(uv_fdt); fdt_end_node(uv_fdt); fdt_finish(uv_fdt); @@ -301,7 +304,9 @@ void init_uv() goto start; } - /* This would be null in case we are on Cronus */ + tpm_nv_init(); + + /* This would be null in case we are on Mambo or Cronus */ if (!uv_xz) { prlog(PR_INFO, "UV: Platform load failed, detecting UV image via device tree\n"); diff --git a/include/ultravisor.h b/include/ultravisor.h index 334cb8e..d28cd4d 100644 --- a/include/ultravisor.h +++ b/include/ultravisor.h @@ -32,6 +32,8 @@ extern void uv_decompress_image(void); extern void init_uv(void); extern int start_ultravisor(void); extern long ucall(unsigned long opcode, unsigned long *retbuf, ...); +int fdt_add_wrapping_key(void *fdt); +int wrapping_key_init(void); static inline bool can_access_xscom(void) { diff --git a/libstb/drivers/tpm_i2c_nuvoton.c b/libstb/drivers/tpm_i2c_nuvoton.c index 1df70d6..fab7745 100644 --- a/libstb/drivers/tpm_i2c_nuvoton.c +++ b/libstb/drivers/tpm_i2c_nuvoton.c @@ -23,7 +23,7 @@ * as defined in the TCG PC Client Platform TPM Profile specification, Revision * 00.43. */ -#define TPM_TIMEOUT_A 750 +#define TPM_TIMEOUT_A 200000000 #define TPM_TIMEOUT_B 2000 #define TPM_TIMEOUT_D 30 |