update_engine: Add hardware support for firmware_max_rollforward

- Adds the methods to get and set firmware_max_rollforward
- This is for supporting the rollback feature
- A future CL will set these values based on policy

BUG=chromium:840432
TEST=unittests

Change-Id: I560f4cef9595d4a52d011fcfeb7b2675a096aefa
Reviewed-on: https://chromium-review.googlesource.com/1062766
Commit-Ready: Zentaro Kavanagh <[email protected]>
Tested-by: Zentaro Kavanagh <[email protected]>
Reviewed-by: Amin Hassani <[email protected]>
diff --git a/common/hardware_interface.h b/common/hardware_interface.h
index 239e7c8..dd42e05 100644
--- a/common/hardware_interface.h
+++ b/common/hardware_interface.h
@@ -78,6 +78,17 @@
   // -1 on error, or if not running on Chrome OS.
   virtual int GetMinFirmwareKeyVersion() const = 0;
 
+  // Returns the maximum firmware key version that verified boot should roll
+  // forward to. This is the value of crossystem firmware_max_rollforward.
+  // Returns -1 on error, if this board does not yet support this value, or
+  // if not running on Chrome OS.
+  virtual int GetMaxFirmwareKeyRollforward() const = 0;
+
+  // Sets the maximum firmware key version that verified boot should roll
+  // forward to. This is the value of crossystem firmware_max_rollforward.
+  // This value is not available on all Chrome OS devices.
+  virtual bool SetMaxFirmwareKeyRollforward(int firmware_max_rollforward) = 0;
+
   // Sets the maximum kernel key version that verified boot should roll
   // forward to. This is the value of crossystem kernel_max_rollforward.
   // Returns false if the value cannot be set, or if not running on Chrome OS.