rmad: Add a new executor API for EC reboot

BUG=b:242015925
TEST=FEATURES=test emerge-octopus rmad

Change-Id: I2d8aa8230b49f9b71e0cc3db3dc46df90eefcd70
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/3867332
Reviewed-by: Gene Chang <genechang@google.com>
Tested-by: Cheng-Han Yang <chenghan@chromium.org>
Commit-Queue: Cheng-Han Yang <chenghan@chromium.org>
diff --git a/rmad/executor/executor.cc b/rmad/executor/executor.cc
index 13e0a47..752c2b4 100644
--- a/rmad/executor/executor.cc
+++ b/rmad/executor/executor.cc
@@ -128,4 +128,9 @@
   std::move(callback).Run(false);
 }
 
+void Executor::RebootEc(RebootEcCallback callback) {
+  // TODO(chenghan): This is currently fake.
+  std::move(callback).Run(false);
+}
+
 }  // namespace rmad
diff --git a/rmad/executor/executor.h b/rmad/executor/executor.h
index 2030505..fdb5dc6 100644
--- a/rmad/executor/executor.h
+++ b/rmad/executor/executor.h
@@ -30,6 +30,7 @@
                         MountAndWriteLogCallback callback) override;
   void MountAndCopyFirmwareUpdater(
       uint8_t device_id, MountAndCopyFirmwareUpdaterCallback callback) override;
+  void RebootEc(RebootEcCallback callback) override;
 
  private:
   // Provides a Mojo endpoint that rmad can call to access the executor's Mojo
diff --git a/rmad/executor/mojom/executor.mojom b/rmad/executor/mojom/executor.mojom
index 1b3bba3..5370179 100644
--- a/rmad/executor/mojom/executor.mojom
+++ b/rmad/executor/mojom/executor.mojom
@@ -32,4 +32,12 @@
   // Response:
   // * |success| - true if successfully copies the firmware updater.
   MountAndCopyFirmwareUpdater(uint8 device_id) => (bool success);
+
+  // Perform an EC reboot.
+  //
+  // Input: None
+  //
+  // Response:
+  // * |success| - true if successfully triggers an EC reboot.
+  RebootEc() => (bool success);
 };