commit | 4dbe3d729cee41a47dfc4620ee676cf43a242617 | [log] [tgz] |
---|---|---|
author | Lawrence Tang <lawrence.tang@arm.com> | Wed Jul 06 13:51:01 2022 +0100 |
committer | Lawrence Tang <lawrence.tang@arm.com> | Wed Jul 06 13:51:01 2022 +0100 |
tree | 8f966d7870d267d00aa6937419f45008df4cff3c | |
parent | 54da44148524de735b91eefb7cf4f777bc278bd1 [diff] [blame] |
Add PCIe error section parsing support.
diff --git a/cper-utils.c b/cper-utils.c index c29b9df..e0823b2 100644 --- a/cper-utils.c +++ b/cper-utils.c
@@ -170,4 +170,10 @@ } return 1; +} + +//Converts the given BCD byte to a standard integer. +int bcd_to_int(UINT8 bcd) +{ + return ((bcd & 0xF0) >> 4) * 10 + (bcd & 0x0F); } \ No newline at end of file