summary refs log tree commit diff stats
path: root/include/hw/misc/bcm2835_property.h
diff options
context:
space:
mode:
authorRayhan Faizel <rayhan.faizel@gmail.com>2024-05-19 15:11:06 +0530
committerPeter Maydell <peter.maydell@linaro.org>2024-07-01 12:48:55 +0100
commit5d5f1b60916aa6bbebe192d74acb762414377430 (patch)
treec09cacc1d41c94ab658f4efb92a1b5a9883e6e50 /include/hw/misc/bcm2835_property.h
parent6bf7993921827817eb313f44509bf4ba7ebf88bb (diff)
downloadfocaccia-qemu-5d5f1b60916aa6bbebe192d74acb762414377430.tar.gz
focaccia-qemu-5d5f1b60916aa6bbebe192d74acb762414377430.zip
hw/misc: Implement mailbox properties for customer OTP and device specific private keys
Four mailbox properties are implemented as follows:
1. Customer OTP: GET_CUSTOMER_OTP and SET_CUSTOMER_OTP
2. Device-specific private key: GET_PRIVATE_KEY and
SET_PRIVATE_KEY.

The customer OTP is located in the rows 36-43. The device-specific private key
is located in the rows 56-63.

The customer OTP can be locked with the magic numbers 0xffffffff 0xaffe0000
when running the SET_CUSTOMER_OTP mailbox command. Bit 6 of row 32 indicates
this lock, which is undocumented. The lock also applies to the device-specific
private key.

Signed-off-by: Rayhan Faizel <rayhan.faizel@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/misc/bcm2835_property.h')
-rw-r--r--include/hw/misc/bcm2835_property.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/misc/bcm2835_property.h b/include/hw/misc/bcm2835_property.h
index ba8896610c..2f93fd0c75 100644
--- a/include/hw/misc/bcm2835_property.h
+++ b/include/hw/misc/bcm2835_property.h
@@ -11,6 +11,7 @@
 #include "hw/sysbus.h"
 #include "net/net.h"
 #include "hw/display/bcm2835_fb.h"
+#include "hw/nvram/bcm2835_otp.h"
 #include "qom/object.h"
 
 #define TYPE_BCM2835_PROPERTY "bcm2835-property"
@@ -26,6 +27,7 @@ struct BCM2835PropertyState {
     MemoryRegion iomem;
     qemu_irq mbox_irq;
     BCM2835FBState *fbdev;
+    BCM2835OTPState *otp;
 
     MACAddr macaddr;
     uint32_t board_rev;