mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-06 19:30:46 +00:00
dm: pass vrpmb key via cmos interface
CMOS offset from 0x20 to 0x9F is used to store rpmb key information. vsbl loader will init vrpmb key in CMOS when boot/reboot. vsbl loader will not init vrpmb key during S3 resume. vsbl will read vrpmb key via CMOS interface. After reading, the key value is cleared in CMOS. So the key can only be read once until next boot. Signed-off-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
@@ -45,6 +45,8 @@
|
||||
#define ALIGN_UP(x, align) (((x) + ((align)-1)) & ~((align)-1))
|
||||
#define ALIGN_DOWN(x, align) ((x) & ~((align)-1))
|
||||
|
||||
#define CMOS_BUF_SIZE 256
|
||||
|
||||
struct vmctx {
|
||||
int fd;
|
||||
int vmid;
|
||||
@@ -61,6 +63,10 @@ struct vmctx {
|
||||
void *atkbdc_base;
|
||||
void *vrtc;
|
||||
void *ioc_dev;
|
||||
/* cmos buffer used to store write/read contents,
|
||||
* and it should not be cleared when reboot
|
||||
*/
|
||||
uint8_t cmos_buffer[CMOS_BUF_SIZE];
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user