Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

apop5
Copy link
Contributor

@apop5 apop5 commented Jun 27, 2024

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

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

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

Integration Instructions

N/A

@makubacki makubacki changed the title MdePkg/Include/Library/BaseLib: Add CRC16 CCITT False Implementation. MdePkg/Include/Library/BaseLib: Add CRC16 CCITT False Implementation. [Rebase & FF] Jun 28, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2024

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 ⚠️
Additional details and impacted files
@@                Coverage Diff                @@
##             release/202405     #994   +/-   ##
=================================================
  Coverage                  ?    0.82%           
=================================================
  Files                     ?     1421           
  Lines                     ?   356574           
  Branches                  ?     4339           
=================================================
  Hits                      ?     2954           
  Misses                    ?   352900           
  Partials                  ?      720           
Flag Coverage Δ
MdeModulePkg 0.20% <ø> (?)
MdePkg 3.30% <0.00%> (?)
NetworkPkg 0.55% <ø> (?)
UefiCpuPkg 2.90% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

MdePkg/Library/BaseLib/CheckSum.c Outdated Show resolved Hide resolved
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.
@apop5 apop5 merged commit b92fe92 into microsoft:release/202405 Jul 10, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants