public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Crc32 Calculation Miss
@ 2018-06-06 14:18 Guy Raviv
  2018-06-06 15:00 ` Gao, Liming
  2018-06-06 15:43 ` Andrew Fish
  0 siblings, 2 replies; 11+ messages in thread
From: Guy Raviv @ 2018-06-06 14:18 UTC (permalink / raw)
  To: edk2-devel

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  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-06 15:43 ` Andrew Fish
  1 sibling, 1 reply; 11+ messages in thread
From: Gao, Liming @ 2018-06-06 15:00 UTC (permalink / raw)
  To: Guy Raviv, edk2-devel@lists.01.org

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] On Behalf Of Guy Raviv
> Sent: Wednesday, June 6, 2018 10:18 PM
> To: 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
> https://lists.01.org/mailman/listinfo/edk2-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-06 14:18 Crc32 Calculation Miss Guy Raviv
  2018-06-06 15:00 ` Gao, Liming
@ 2018-06-06 15:43 ` Andrew Fish
  2018-06-07  6:18   ` Guy Raviv
  1 sibling, 1 reply; 11+ messages in thread
From: Andrew Fish @ 2018-06-06 15:43 UTC (permalink / raw)
  To: Guy Raviv; +Cc: edk2-devel


> On Jun 6, 2018, at 7:18 AM, Guy Raviv <guyraviv8@gmail.com> wrote:
> 
> 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.

Guy,

What region did you check? There are areas of the FLASH that get updated (NVRAM, region used by an embedded controller, etc.), or never get updated (system serial # programmed at the factory). 

> 2. i also compared two different binaries and found they are exactly the
> same.
> 

Did you compare the binaries as part of the build or on the system? 

Thanks,

Andrew Fish

> 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
> https://lists.01.org/mailman/listinfo/edk2-devel



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-06 15:43 ` Andrew Fish
@ 2018-06-07  6:18   ` Guy Raviv
  0 siblings, 0 replies; 11+ messages in thread
From: Guy Raviv @ 2018-06-07  6:18 UTC (permalink / raw)
  To: Andrew Fish, edk2-devel

Hi Andrew,

1. i checked the region which stores the code itself (called it MainFV), so
it is supposed to get updated only if i change the code.

2. i compared the binaries after the build, not in the system.

Thanks!

On Wed, Jun 6, 2018 at 6:43 PM, Andrew Fish <afish@apple.com> wrote:

>
> > On Jun 6, 2018, at 7:18 AM, Guy Raviv <guyraviv8@gmail.com> wrote:
> >
> > 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.
>
> Guy,
>
> What region did you check? There are areas of the FLASH that get updated
> (NVRAM, region used by an embedded controller, etc.), or never get updated
> (system serial # programmed at the factory).
>
> > 2. i also compared two different binaries and found they are exactly the
> > same.
> >
>
> Did you compare the binaries as part of the build or on the system?
>
> Thanks,
>
> Andrew Fish
>
> > 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
> > https://lists.01.org/mailman/listinfo/edk2-devel
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-06 15:00 ` Gao, Liming
@ 2018-06-07  6:34   ` Guy Raviv
  2018-06-10  6:59     ` Guy Raviv
  0 siblings, 1 reply; 11+ messages in thread
From: Guy Raviv @ 2018-06-07  6:34 UTC (permalink / raw)
  To: Gao, Liming; +Cc: edk2-devel@lists.01.org

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> 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] On Behalf Of
> Guy Raviv
> > Sent: Wednesday, June 6, 2018 10:18 PM
> > To: 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
> > https://lists.01.org/mailman/listinfo/edk2-devel
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-07  6:34   ` Guy Raviv
@ 2018-06-10  6:59     ` Guy Raviv
  2018-06-11  2:34       ` Gao, Liming
  0 siblings, 1 reply; 11+ messages in thread
From: Guy Raviv @ 2018-06-10  6:59 UTC (permalink / raw)
  To: Gao, Liming; +Cc: edk2-devel

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> 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> 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] On Behalf Of
>> Guy Raviv
>> > Sent: Wednesday, June 6, 2018 10:18 PM
>> > To: 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
>> > https://lists.01.org/mailman/listinfo/edk2-devel
>>
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-10  6:59     ` Guy Raviv
@ 2018-06-11  2:34       ` Gao, Liming
  2018-06-11  8:38         ` Guy Raviv
  0 siblings, 1 reply; 11+ messages in thread
From: Gao, Liming @ 2018-06-11  2:34 UTC (permalink / raw)
  To: Guy Raviv; +Cc: edk2-devel@lists.01.org

Guy:
  Does EFI_CALCULATE_CRC32() cover the flash data that includes PEI module?

Thanks
Liming
From: Guy Raviv [mailto:guyraviv8@gmail.com]
Sent: Sunday, June 10, 2018 2:59 PM
To: Gao, Liming <liming.gao@intel.com>
Cc: 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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-11  2:34       ` Gao, Liming
@ 2018-06-11  8:38         ` Guy Raviv
  2018-06-11 15:44           ` Gao, Liming
  0 siblings, 1 reply; 11+ messages in thread
From: Guy Raviv @ 2018-06-11  8:38 UTC (permalink / raw)
  To: Gao, Liming; +Cc: edk2-devel

 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> wrote:

> Guy:
>
>   Does EFI_CALCULATE_CRC32() cover the flash data that includes PEI
> module?
>
>
>
> Thanks
>
> Liming
>
> *From:* Guy Raviv [mailto:guyraviv8@gmail.com]
> *Sent:* Sunday, June 10, 2018 2:59 PM
> *To:* Gao, Liming <liming.gao@intel.com>
> *Cc:* 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> 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> 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] On Behalf Of
> Guy Raviv
> > Sent: Wednesday, June 6, 2018 10:18 PM
> > To: 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
> > https://lists.01.org/mailman/listinfo/edk2-devel
>
>
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-11  8:38         ` Guy Raviv
@ 2018-06-11 15:44           ` Gao, Liming
  2018-06-12  5:36             ` Guy Raviv
  0 siblings, 1 reply; 11+ messages in thread
From: Gao, Liming @ 2018-06-11 15:44 UTC (permalink / raw)
  To: Guy Raviv; +Cc: edk2-devel@lists.01.org

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-11 15:44           ` Gao, Liming
@ 2018-06-12  5:36             ` Guy Raviv
  2018-06-13  2:42               ` Gao, Liming
  0 siblings, 1 reply; 11+ messages in thread
From: Guy Raviv @ 2018-06-12  5:36 UTC (permalink / raw)
  To: Gao, Liming; +Cc: edk2-devel

I need to reach the pre memory code. Is it also loaded to the RAM(even
though it is already been executed?)

On Mon, 11 Jun 2018, 18:44 Gao, Liming, <liming.gao@intel.com> wrote:

> 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> wrote:
>
> Guy:
>
>   Does EFI_CALCULATE_CRC32() cover the flash data that includes PEI
> module?
>
>
>
> Thanks
>
> Liming
>
> *From:* Guy Raviv [mailto:guyraviv8@gmail.com]
> *Sent:* Sunday, June 10, 2018 2:59 PM
> *To:* Gao, Liming <liming.gao@intel.com>
> *Cc:* 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> 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> 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] On Behalf Of
> Guy Raviv
> > Sent: Wednesday, June 6, 2018 10:18 PM
> > To: 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
> > https://lists.01.org/mailman/listinfo/edk2-devel
>
>
>
>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Crc32 Calculation Miss
  2018-06-12  5:36             ` Guy Raviv
@ 2018-06-13  2:42               ` Gao, Liming
  0 siblings, 0 replies; 11+ messages in thread
From: Gao, Liming @ 2018-06-13  2:42 UTC (permalink / raw)
  To: Guy Raviv; +Cc: edk2-devel@lists.01.org

No. Most PEI runs in flash, are not loaded into RAM. So, I suggest to locate FvInfoPpi and get PEI FV image data. You can calculate CRC32 value of PEI FV image.

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

I need to reach the pre memory code. Is it also loaded to the RAM(even though it is already been executed?)

On Mon, 11 Jun 2018, 18:44 Gao, Liming, <liming.gao@intel.com<mailto:liming.gao@intel.com>> wrote:
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<mailto:guyraviv8@gmail.com>]
Sent: Monday, June 11, 2018 4:38 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

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-06-13  2:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox