vpnor: mboxd reset: reconstruct TOC
Upon mboxd reset, reconstruct the virtual PNOR partition table, so that
an update in the PNOR can be accounted for.
The use case here is someone loads a new PNOR while the BMC is at
standy, activates it, and boots the system. The TOC corresponding to
this PNOR would need to be reconstructed.
Change-Id: I3247e8cb594adc8ced7c5dd706ae1bda7b0a01b9
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/mboxd_lpc_virtual.cpp b/mboxd_lpc_virtual.cpp
index 802c761..60ce0d3 100644
--- a/mboxd_lpc_virtual.cpp
+++ b/mboxd_lpc_virtual.cpp
@@ -29,6 +29,8 @@
*/
int reset_lpc(struct mbox_context *context)
{
+ destroy_vpnor(context);
+ init_vpnor(context);
vpnor_copy_bootloader_partition(context);
return point_to_memory(context);
}