microsoft / mu_basecore

Project Mu BaseCore
https://microsoft.github.io/mu/
Other
242 stars 124 forks source link

MdePkg/Include/Library/BaseLib: Add CRC16 CCITT False Implementation. [Rebase & FF] #994

Closed apop5 closed 3 months ago

apop5 commented 3 months ago

Description

This change is added to incorporate basic implementation for CRC16-CCITT-FALSE algorithm.

This function is useful for providing CRC16 value used in other data structures that requires CRC16 value that complies with JEDEC SPD requirements, i.e. BDAT table.

The lookup table is inherited from https://crccalc.com/ and the result values are also compared against this site.

Cherry-Pick the following commits:

dcdd08f1f0

How This Was Tested

The function output is compared and matches with the results of 3rd party online CRC calculators.

Integration Instructions

N/A

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Please upload report for BASE (release/202405@9887190). Learn more about missing BASE report.

Files Patch % Lines
MdePkg/Library/BaseLib/CheckSum.c 0.00% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/202405 #994 +/- ## ================================================= Coverage ? 0.82% ================================================= Files ? 1421 Lines ? 356574 Branches ? 4339 ================================================= Hits ? 2954 Misses ? 352900 Partials ? 720 ``` | [Flag](https://app.codecov.io/gh/microsoft/mu_basecore/pull/994/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | Coverage Δ | | |---|---|---| | [MdeModulePkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/994/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `0.20% <ø> (?)` | | | [MdePkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/994/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `3.30% <0.00%> (?)` | | | [NetworkPkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/994/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `0.55% <ø> (?)` | | | [UefiCpuPkg](https://app.codecov.io/gh/microsoft/mu_basecore/pull/994/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft) | `2.90% <ø> (?)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=microsoft#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.