public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* FFS Alignment and the FDF Specification
@ 2018-07-27  0:54 Tim Lewis
  2018-07-27  0:59 ` Zhu, Yonghong
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Lewis @ 2018-07-27  0:54 UTC (permalink / raw)
  To: edk2-devel

Is my understanding correct: the FDF specification only supports a maximum
of 64KB alignment for files (section 2.5.6), but the PI specification
supports (table 7), up to 16MB alignment. Or am I misreading it?

Thanks,

Tim

-----Original Message-----
From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Andrew Fish
Sent: Thursday, July 19, 2018 11:26 AM
To: Marvin H?user <Marvin.Haeuser@outlook.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] Help on AutoGen Files

Udit,

As Marvin points out the [LibraryClasses] section of the INF file are going
to imply the order of the library constructor calls in the AutoGen

Worst case you can demote FpgaInterfaceInit () from being a constructor to
just being a public library function that the other lib can call explicitly
from its constructor. Maybe that is too drastic and you could must move a
function out of FpgaInterfaceInit () and make that function part of the
Public library interface?

Thanks,

Andrew Fish

> On Jul 19, 2018, at 11:14 AM, Marvin H?user <Marvin.Haeuser@outlook.com>
wrote:
> 
> Hey Udit,
> 
> You cannot explicitly influence the order of the calls, but implicitly via
the dependency tree, which means you need to make SerialPortLib depend on
your LibraryClass instance.
> You did not mention which SerialPortLib instance you use, but probably you
need to execute FpgaInterfaceInit() earlier in platform code or fork
SerialPortLib for now.
> 
> Regards,
> Marvin
> 
>> -----Original Message-----
>> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Udit 
>> Kumar
>> Sent: Thursday, July 19, 2018 9:33 AM
>> To: edk2-devel@lists.01.org
>> Subject: [edk2] Help on AutoGen Files
>> 
>> Hi Experts,
>> How I can change the order of initialization in Constructor list of
autogen file.
>> In my build system, if I look at
>> MdeModulePkg/Universal/PCD/Pei/Pcd/DEBUG/AutoGen.c
>> Below is function of Library Constructor List
>> 
>> VOID
>> EFIAPI
>> ProcessLibraryConstructorList (
>>  IN       EFI_PEI_FILE_HANDLE       FileHandle,
>>  IN CONST EFI_PEI_SERVICES          **PeiServices
>>  )
>> {
>>  EFI_STATUS  Status;
>> 
>>  Status = BaseDebugLibSerialPortConstructor ();  ASSERT_EFI_ERROR 
>> (Status);
>> 
>>  Status = PeiServicesTablePointerLibConstructor (FileHandle, 
>> PeiServices);  ASSERT_EFI_ERROR (Status);
>> 
>>  Status = TimerConstructor ();
>>  ASSERT_EFI_ERROR (Status);
>> 
>>  Status = FpgaInterfaceInit ();
>>  ASSERT_EFI_ERROR (Status);
>> 
>> }
>> 
>> 
>> My problem is SerialPortConstructor needs frequency, which can be 
>> retrieved after  FpgaInterfaceInit() Therefore, my preferred way for 
>> this constructor list will be
>> FpgaInterfaceInit() followed by  BaseDebugLibSerialPortConstructor()
>> 
>> how I can achieve this.
>> 
>> 
>> Many Thanks
>> Udit
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel



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

* Re: FFS Alignment and the FDF Specification
  2018-07-27  0:54 FFS Alignment and the FDF Specification Tim Lewis
@ 2018-07-27  0:59 ` Zhu, Yonghong
  2018-07-27  1:08   ` Tim Lewis
  0 siblings, 1 reply; 4+ messages in thread
From: Zhu, Yonghong @ 2018-07-27  0:59 UTC (permalink / raw)
  To: Tim Lewis, edk2-devel@lists.01.org

Which version of FDF spec you use now ? I remember current we already support 16M ffs alignment.  FDF spec Version 1.28 have such info "Per PI 1.6 to extend FFS alignment to 16M".

Best Regards,
Zhu Yonghong

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tim Lewis
Sent: Friday, July 27, 2018 8:55 AM
To: edk2-devel@lists.01.org
Subject: [edk2] FFS Alignment and the FDF Specification

Is my understanding correct: the FDF specification only supports a maximum of 64KB alignment for files (section 2.5.6), but the PI specification supports (table 7), up to 16MB alignment. Or am I misreading it?

Thanks,

Tim

-----Original Message-----
From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Andrew Fish
Sent: Thursday, July 19, 2018 11:26 AM
To: Marvin H?user <Marvin.Haeuser@outlook.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] Help on AutoGen Files

Udit,

As Marvin points out the [LibraryClasses] section of the INF file are going to imply the order of the library constructor calls in the AutoGen

Worst case you can demote FpgaInterfaceInit () from being a constructor to just being a public library function that the other lib can call explicitly from its constructor. Maybe that is too drastic and you could must move a function out of FpgaInterfaceInit () and make that function part of the Public library interface?

Thanks,

Andrew Fish

> On Jul 19, 2018, at 11:14 AM, Marvin H?user 
> <Marvin.Haeuser@outlook.com>
wrote:
> 
> Hey Udit,
> 
> You cannot explicitly influence the order of the calls, but implicitly 
> via
the dependency tree, which means you need to make SerialPortLib depend on your LibraryClass instance.
> You did not mention which SerialPortLib instance you use, but probably 
> you
need to execute FpgaInterfaceInit() earlier in platform code or fork SerialPortLib for now.
> 
> Regards,
> Marvin
> 
>> -----Original Message-----
>> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Udit 
>> Kumar
>> Sent: Thursday, July 19, 2018 9:33 AM
>> To: edk2-devel@lists.01.org
>> Subject: [edk2] Help on AutoGen Files
>> 
>> Hi Experts,
>> How I can change the order of initialization in Constructor list of
autogen file.
>> In my build system, if I look at
>> MdeModulePkg/Universal/PCD/Pei/Pcd/DEBUG/AutoGen.c
>> Below is function of Library Constructor List
>> 
>> VOID
>> EFIAPI
>> ProcessLibraryConstructorList (
>>  IN       EFI_PEI_FILE_HANDLE       FileHandle,
>>  IN CONST EFI_PEI_SERVICES          **PeiServices
>>  )
>> {
>>  EFI_STATUS  Status;
>> 
>>  Status = BaseDebugLibSerialPortConstructor ();  ASSERT_EFI_ERROR 
>> (Status);
>> 
>>  Status = PeiServicesTablePointerLibConstructor (FileHandle, 
>> PeiServices);  ASSERT_EFI_ERROR (Status);
>> 
>>  Status = TimerConstructor ();
>>  ASSERT_EFI_ERROR (Status);
>> 
>>  Status = FpgaInterfaceInit ();
>>  ASSERT_EFI_ERROR (Status);
>> 
>> }
>> 
>> 
>> My problem is SerialPortConstructor needs frequency, which can be 
>> retrieved after  FpgaInterfaceInit() Therefore, my preferred way for 
>> this constructor list will be
>> FpgaInterfaceInit() followed by  BaseDebugLibSerialPortConstructor()
>> 
>> how I can achieve this.
>> 
>> 
>> Many Thanks
>> Udit
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: FFS Alignment and the FDF Specification
  2018-07-27  0:59 ` Zhu, Yonghong
@ 2018-07-27  1:08   ` Tim Lewis
  2018-07-27  1:32     ` Zhu, Yonghong
  0 siblings, 1 reply; 4+ messages in thread
From: Tim Lewis @ 2018-07-27  1:08 UTC (permalink / raw)
  To: 'Zhu, Yonghong', edk2-devel

1.28. 

2.5.6 says: Alignment - Data (value is one of: 1, 2 4, 8, 16, 32, 64 128,
512, 1K, 2K, 4K, 8K, 16K,32K, 64K) byte aligned

The grammar 3.2.1 says:

<FfsAlignmentValues> ::= {"Auto"} {"8"} {"16"} {"32"} {"64"} {"128"}{"512"}
{"1K"} {"4K"} {"32K"} {"64K"}

This is the version from the EDK2 specs page.

-----Original Message-----
From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Zhu,
Yonghong
Sent: Thursday, July 26, 2018 5:59 PM
To: Tim Lewis <tim.lewis@insyde.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] FFS Alignment and the FDF Specification

Which version of FDF spec you use now ? I remember current we already
support 16M ffs alignment.  FDF spec Version 1.28 have such info "Per PI 1.6
to extend FFS alignment to 16M".

Best Regards,
Zhu Yonghong

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tim
Lewis
Sent: Friday, July 27, 2018 8:55 AM
To: edk2-devel@lists.01.org
Subject: [edk2] FFS Alignment and the FDF Specification

Is my understanding correct: the FDF specification only supports a maximum
of 64KB alignment for files (section 2.5.6), but the PI specification
supports (table 7), up to 16MB alignment. Or am I misreading it?

Thanks,

Tim

-----Original Message-----
From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Andrew Fish
Sent: Thursday, July 19, 2018 11:26 AM
To: Marvin H?user <Marvin.Haeuser@outlook.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] Help on AutoGen Files

Udit,

As Marvin points out the [LibraryClasses] section of the INF file are going
to imply the order of the library constructor calls in the AutoGen

Worst case you can demote FpgaInterfaceInit () from being a constructor to
just being a public library function that the other lib can call explicitly
from its constructor. Maybe that is too drastic and you could must move a
function out of FpgaInterfaceInit () and make that function part of the
Public library interface?

Thanks,

Andrew Fish

> On Jul 19, 2018, at 11:14 AM, Marvin H?user 
> <Marvin.Haeuser@outlook.com>
wrote:
> 
> Hey Udit,
> 
> You cannot explicitly influence the order of the calls, but implicitly 
> via
the dependency tree, which means you need to make SerialPortLib depend on
your LibraryClass instance.
> You did not mention which SerialPortLib instance you use, but probably 
> you
need to execute FpgaInterfaceInit() earlier in platform code or fork
SerialPortLib for now.
> 
> Regards,
> Marvin
> 
>> -----Original Message-----
>> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Udit 
>> Kumar
>> Sent: Thursday, July 19, 2018 9:33 AM
>> To: edk2-devel@lists.01.org
>> Subject: [edk2] Help on AutoGen Files
>> 
>> Hi Experts,
>> How I can change the order of initialization in Constructor list of
autogen file.
>> In my build system, if I look at
>> MdeModulePkg/Universal/PCD/Pei/Pcd/DEBUG/AutoGen.c
>> Below is function of Library Constructor List
>> 
>> VOID
>> EFIAPI
>> ProcessLibraryConstructorList (
>>  IN       EFI_PEI_FILE_HANDLE       FileHandle,
>>  IN CONST EFI_PEI_SERVICES          **PeiServices
>>  )
>> {
>>  EFI_STATUS  Status;
>> 
>>  Status = BaseDebugLibSerialPortConstructor ();  ASSERT_EFI_ERROR 
>> (Status);
>> 
>>  Status = PeiServicesTablePointerLibConstructor (FileHandle, 
>> PeiServices);  ASSERT_EFI_ERROR (Status);
>> 
>>  Status = TimerConstructor ();
>>  ASSERT_EFI_ERROR (Status);
>> 
>>  Status = FpgaInterfaceInit ();
>>  ASSERT_EFI_ERROR (Status);
>> 
>> }
>> 
>> 
>> My problem is SerialPortConstructor needs frequency, which can be 
>> retrieved after  FpgaInterfaceInit() Therefore, my preferred way for 
>> this constructor list will be
>> FpgaInterfaceInit() followed by  BaseDebugLibSerialPortConstructor()
>> 
>> how I can achieve this.
>> 
>> 
>> Many Thanks
>> Udit
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel



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

* Re: FFS Alignment and the FDF Specification
  2018-07-27  1:08   ` Tim Lewis
@ 2018-07-27  1:32     ` Zhu, Yonghong
  0 siblings, 0 replies; 4+ messages in thread
From: Zhu, Yonghong @ 2018-07-27  1:32 UTC (permalink / raw)
  To: Tim Lewis, edk2-devel@lists.01.org


How about get the doc from https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Draft-Specification ? This is current latest.

Or  https://edk2-docs.gitbooks.io/edk-ii-fdf-specification/content/v/release/1.28.01/ , this is the one match with UDK2018.

And current latest BaseTools it should also support the 16M FFS alignment.
I think the version you use in fact it is 1.27, but we made a typo error in the FDF spec that marked it as 1.28.  you can check the revision history or the value in the FDF_SPECIFICATION  in the spec.

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Tim Lewis [mailto:tim.lewis@insyde.com] 
Sent: Friday, July 27, 2018 9:09 AM
To: Zhu, Yonghong <yonghong.zhu@intel.com>; edk2-devel@lists.01.org
Subject: RE: [edk2] FFS Alignment and the FDF Specification

1.28. 

2.5.6 says: Alignment - Data (value is one of: 1, 2 4, 8, 16, 32, 64 128, 512, 1K, 2K, 4K, 8K, 16K,32K, 64K) byte aligned

The grammar 3.2.1 says:

<FfsAlignmentValues> ::= {"Auto"} {"8"} {"16"} {"32"} {"64"} {"128"}{"512"} {"1K"} {"4K"} {"32K"} {"64K"}

This is the version from the EDK2 specs page.

-----Original Message-----
From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Zhu, Yonghong
Sent: Thursday, July 26, 2018 5:59 PM
To: Tim Lewis <tim.lewis@insyde.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] FFS Alignment and the FDF Specification

Which version of FDF spec you use now ? I remember current we already support 16M ffs alignment.  FDF spec Version 1.28 have such info "Per PI 1.6 to extend FFS alignment to 16M".

Best Regards,
Zhu Yonghong

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tim Lewis
Sent: Friday, July 27, 2018 8:55 AM
To: edk2-devel@lists.01.org
Subject: [edk2] FFS Alignment and the FDF Specification

Is my understanding correct: the FDF specification only supports a maximum of 64KB alignment for files (section 2.5.6), but the PI specification supports (table 7), up to 16MB alignment. Or am I misreading it?

Thanks,

Tim

-----Original Message-----
From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Andrew Fish
Sent: Thursday, July 19, 2018 11:26 AM
To: Marvin H?user <Marvin.Haeuser@outlook.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] Help on AutoGen Files

Udit,

As Marvin points out the [LibraryClasses] section of the INF file are going to imply the order of the library constructor calls in the AutoGen

Worst case you can demote FpgaInterfaceInit () from being a constructor to just being a public library function that the other lib can call explicitly from its constructor. Maybe that is too drastic and you could must move a function out of FpgaInterfaceInit () and make that function part of the Public library interface?

Thanks,

Andrew Fish

> On Jul 19, 2018, at 11:14 AM, Marvin H?user 
> <Marvin.Haeuser@outlook.com>
wrote:
> 
> Hey Udit,
> 
> You cannot explicitly influence the order of the calls, but implicitly 
> via
the dependency tree, which means you need to make SerialPortLib depend on your LibraryClass instance.
> You did not mention which SerialPortLib instance you use, but probably 
> you
need to execute FpgaInterfaceInit() earlier in platform code or fork SerialPortLib for now.
> 
> Regards,
> Marvin
> 
>> -----Original Message-----
>> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Udit 
>> Kumar
>> Sent: Thursday, July 19, 2018 9:33 AM
>> To: edk2-devel@lists.01.org
>> Subject: [edk2] Help on AutoGen Files
>> 
>> Hi Experts,
>> How I can change the order of initialization in Constructor list of
autogen file.
>> In my build system, if I look at
>> MdeModulePkg/Universal/PCD/Pei/Pcd/DEBUG/AutoGen.c
>> Below is function of Library Constructor List
>> 
>> VOID
>> EFIAPI
>> ProcessLibraryConstructorList (
>>  IN       EFI_PEI_FILE_HANDLE       FileHandle,
>>  IN CONST EFI_PEI_SERVICES          **PeiServices
>>  )
>> {
>>  EFI_STATUS  Status;
>> 
>>  Status = BaseDebugLibSerialPortConstructor ();  ASSERT_EFI_ERROR 
>> (Status);
>> 
>>  Status = PeiServicesTablePointerLibConstructor (FileHandle, 
>> PeiServices);  ASSERT_EFI_ERROR (Status);
>> 
>>  Status = TimerConstructor ();
>>  ASSERT_EFI_ERROR (Status);
>> 
>>  Status = FpgaInterfaceInit ();
>>  ASSERT_EFI_ERROR (Status);
>> 
>> }
>> 
>> 
>> My problem is SerialPortConstructor needs frequency, which can be 
>> retrieved after  FpgaInterfaceInit() Therefore, my preferred way for 
>> this constructor list will be
>> FpgaInterfaceInit() followed by  BaseDebugLibSerialPortConstructor()
>> 
>> how I can achieve this.
>> 
>> 
>> Many Thanks
>> Udit
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel



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

end of thread, other threads:[~2018-07-27  1:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-27  0:54 FFS Alignment and the FDF Specification Tim Lewis
2018-07-27  0:59 ` Zhu, Yonghong
2018-07-27  1:08   ` Tim Lewis
2018-07-27  1:32     ` Zhu, Yonghong

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