oem-ampere: eventManager: Support polling the RAS CEs

The events for RAS CEs is disabled by default. The Poll-based mechanizm
is required to check the existing of RAS CEs errors.
Add Ampere Poll-based mechanizm to poll RAS CEs events.

Change-Id: Iad48ef28a5dbd1dfe53506c0ac9f3a3e1eec2e22
Signed-off-by: Dung Cao <dung@os.amperecomputing.com>
Signed-off-by: Thu Nguyen <thu@os.amperecomputing.com>
diff --git a/oem/ampere/oem_ampere.hpp b/oem/ampere/oem_ampere.hpp
index 8e8c301..e2c298d 100644
--- a/oem/ampere/oem_ampere.hpp
+++ b/oem/ampere/oem_ampere.hpp
@@ -62,7 +62,8 @@
         reqHandler(reqHandler)
     {
         oemEventManager = std::make_shared<oem_ampere::OemEventManager>(
-            this->event, this->reqHandler, this->instanceIdDb);
+            this->event, this->reqHandler, this->instanceIdDb,
+            this->platformManager);
         createOemEventHandler(oemEventManager.get(), this->platformManager);
     }
 
@@ -133,6 +134,12 @@
                     request, payloadLength, formatVersion, tid,
                     eventDataOffset);
             }});
+
+        /* Register Ampere OEM handler to poll the PLDM events */
+        platformManager->registerOEMPollMethod(
+            [oemEventManager](pldm_tid_t tid) {
+                return oemEventManager->oemPollForPlatformEvent(tid);
+            });
     }
 
   private: