Re: [edk2] FFS Alignment and the FDF Specification

2018-07-26 Thread Zhu, Yonghong


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.le...@insyde.com] 
Sent: Friday, July 27, 2018 9:09 AM
To: Zhu, Yonghong ; 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:

 ::= {"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  On Behalf Of Zhu, Yonghong
Sent: Thursday, July 26, 2018 5:59 PM
To: Tim Lewis ; 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-boun...@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  On Behalf Of Andrew Fish
Sent: Thursday, July 19, 2018 11:26 AM
To: Marvin H?user 
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 
> 
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  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://

Re: [edk2] FFS Alignment and the FDF Specification

2018-07-26 Thread Tim Lewis
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:

 ::= {"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  On Behalf Of Zhu,
Yonghong
Sent: Thursday, July 26, 2018 5:59 PM
To: Tim Lewis ; 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-boun...@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  On Behalf Of Andrew Fish
Sent: Thursday, July 19, 2018 11:26 AM
To: Marvin H?user 
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 
> 
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  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

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


Re: [edk2] FFS Alignment and the FDF Specification

2018-07-26 Thread Zhu, Yonghong
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-boun...@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  On Behalf Of Andrew Fish
Sent: Thursday, July 19, 2018 11:26 AM
To: Marvin H?user 
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 
> 
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  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


[edk2] FFS Alignment and the FDF Specification

2018-07-26 Thread Tim Lewis
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  On Behalf Of Andrew Fish
Sent: Thursday, July 19, 2018 11:26 AM
To: Marvin H?user 
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 
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  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