public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: Guy Raviv <guyraviv8@gmail.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Crc32 Calculation Miss
Date: Mon, 11 Jun 2018 15:44:12 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E2958F2@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <CALFDPeXSmnqPYKmofRvqjw=dP-OBYZu_AjMUtE=phju03zSotQ@mail.gmail.com>

In pre memory, PEI code run in flash. After memory is ready, PEI code will be loaded into memory. There is no interface to access the whole flash data. But, you can access the firmware image that contains PEI and DXE driver. In PEI phase, you can locate FvInfoPpi (gEfiPeiFirmwareVolumeInfoPpiGuid) to get FV image base address and size; in DXE phase, you can locate FVB protocol (gEfiFirmwareVolumeBlockProtocolGuid) to get FV image base address and size.

From: Guy Raviv [mailto:guyraviv8@gmail.com]
Sent: Monday, June 11, 2018 4:38 PM
To: Gao, Liming <liming.gao@intel.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] Crc32 Calculation Miss

EFI_CALCULATE_CRC32()  just calculate the crc for the given address and size.

my question is whether PEI code is loaded into the RAM or not.
if it doesn't which seems reasonable, how can i reach it? some interface for accessing the whole flash data.

Thanks,

On Mon, Jun 11, 2018 at 5:34 AM Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>> wrote:
Guy:
  Does EFI_CALCULATE_CRC32() cover the flash data that includes PEI module?

Thanks
Liming
From: Guy Raviv [mailto:guyraviv8@gmail.com<mailto:guyraviv8@gmail.com>]
Sent: Sunday, June 10, 2018 2:59 PM
To: Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>>
Cc: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Subject: Re: [edk2] Crc32 Calculation Miss

Update -  it seems that only in the Pei modules a code change doesn't change the crc.
Does it make sense?
if so, is there any interface to calculate the flash data itself in the Dxe phase?

Thanks!
Guy

On Thu, Jun 7, 2018 at 9:34 AM Guy Raviv <guyraviv8@gmail.com<mailto:guyraviv8@gmail.com>> wrote:
Hi Gao,

I used the EFI_CALCULATE_CRC32 function from edkCompatibilityPkg\Foundation.

Thanks,

Guy

On Wed, Jun 6, 2018 at 6:00 PM, Gao, Liming <liming.gao@intel.com<mailto:liming.gao@intel.com>> wrote:
Do you use CalculateCrc32() in BaseLib to calculate CRC32 value for the different buffer?

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org<mailto:edk2-devel-bounces@lists.01.org>] On Behalf Of Guy Raviv
> Sent: Wednesday, June 6, 2018 10:18 PM
> To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> Subject: [edk2] Crc32 Calculation Miss
>
> Hi Everyone,
>
> I have an odd problem.
> In a specific module in my code (MRC training), code modification doesn't
> change the BIOS Crc calculation.
> 1. i checked in my project's fdf file if the FV base address and region
> size defined are the same as the parameters i'm putting in the calculation.
> 2. i also compared two different binaries and found they are exactly the
> same.
>
> does anyone have any idea what can be wrong here or where should i check?
>
> Thanks,
> Guy
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
> https://lists.01.org/mailman/listinfo/edk2-devel


  reply	other threads:[~2018-06-11 15:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 14:18 Crc32 Calculation Miss Guy Raviv
2018-06-06 15:00 ` Gao, Liming
2018-06-07  6:34   ` Guy Raviv
2018-06-10  6:59     ` Guy Raviv
2018-06-11  2:34       ` Gao, Liming
2018-06-11  8:38         ` Guy Raviv
2018-06-11 15:44           ` Gao, Liming [this message]
2018-06-12  5:36             ` Guy Raviv
2018-06-13  2:42               ` Gao, Liming
2018-06-06 15:43 ` Andrew Fish
2018-06-07  6:18   ` Guy Raviv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E2958F2@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox