Add Timestamp to BIOS POST Codes and Boot Cycle Count
Added GetPostCodesWithTimeStamp methods to PostCode interface.
GetPostCodesWithTimeStamp logs microseconds since epoch
with each post code.
Deleted CurrentBootIndex property since to customer most recent
boot is always 1.
Added CurrentBootCycleCount property to indicate number of boot
cycles that have cached BIOS POST codes.
Tested:
Build with changes in phosphor-post-code-manager.
Invoke GetPostCodesWithTimeStamp with busctl and observe expected
postcode format: ("US since Epoch":, Post Code)
"1580923291420015": 1,
"1580923291428076": 2,
Change-Id: Ib79eee0f9eb9b944d206e69a97b841b9b6152cb9
Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
diff --git a/xyz/openbmc_project/State/Boot/PostCode.interface.yaml b/xyz/openbmc_project/State/Boot/PostCode.interface.yaml
index d4825a7..2ea20b4 100644
--- a/xyz/openbmc_project/State/Boot/PostCode.interface.yaml
+++ b/xyz/openbmc_project/State/Boot/PostCode.interface.yaml
@@ -3,11 +3,12 @@
into file system.
properties:
- - name: CurrentBootCycleIndex
+ - name: CurrentBootCycleCount
type: uint16
description: >
- It is used to indicate current boot cycle index.
- Index is start from 1 and continue to MaxBootCycleNum
+ It is used to indicate number of boot cycles that have
+ post codes archived. It starts from 1 and is limited to
+ MaxBootCycleNum.
- name: MaxBootCycleNum
type: uint16
description: >
@@ -15,6 +16,21 @@
It is used to indicate end user what's the max boot number,
and make sure get command parameter less than it.
methods:
+ - name: GetPostCodesWithTimeStamp
+ description: >
+ Method to get the cached post codes of the indicated boot cycle with timestamp.
+ parameters:
+ - name: Index
+ type: uint16
+ description: >
+ Index indicates which boot cycle of post codes is requested.
+ 1 is for the most recent boot cycle. CurrentBootCycleCount is for the
+ oldest boot cycle.
+ returns:
+ - name: Codes
+ type: dict[uint64, uint64]
+ description: >
+ An array of post codes and timestamp in microseconds since epoch
- name: GetPostCodes
description: >
Method to get the cached post codes of the indicated boot cycle.
@@ -23,11 +39,10 @@
type: uint16
description: >
Index indicates which boot cycle of post codes is requested.
+ 1 is for the most recent boot cycle. CurrentBootCycleCount is for the
+ oldest boot cycle.
returns:
- name: Codes
type: array[uint64]
description: >
An array of post codes of one boot cycle.
- errors:
- - xyz.openbmc_project.Common.Error.InternalFailure
- - xyz.openbmc_project.Common.Error.InvalidArgument