Hi Ard,
ArmPlatformGlobalVariable is removed from edk2. But I still find the reference in OpenPlatformPkg tree. And I also have a few issues on it.
1. Without it, I failed to build my HiKey platform. Could you help to figure out how to resolve the build issue. 2. I stored global variables by this lib. Now it's removed. How could I store global variable? Do you have any solution on it?
Regards Haojian
On 11 January 2016 at 09:59, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi Ard,
ArmPlatformGlobalVariable is removed from edk2. But I still find the reference in OpenPlatformPkg tree. And I also have a few issues on it.
- Without it, I failed to build my HiKey platform. Could you help to
figure out how to resolve the build issue. 2. I stored global variables by this lib. Now it's removed. How could I store global variable? Do you have any solution on it?
Hello Haojian,
I am sorry to hear about this breakage.
The issue with ArmPlatformGlobalVariable was that it violates the PI spec, since it requires coordination between PEIMs beyond what is defined by the PI spec, and this breaks the interoperability model. EDK2 is the reference implementation for PI as well as UEFI, so ArmPlatformGlobalVariable really did not belong there.
The alternative is dynamic PCDs. I am not familiar with your particular use case: where do the variable get set, and where are they read?
Regards, Ard.
On 11 January 2016 at 17:42, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 11 January 2016 at 09:59, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi Ard,
ArmPlatformGlobalVariable is removed from edk2. But I still find the reference in OpenPlatformPkg tree. And I also have a few issues on it.
- Without it, I failed to build my HiKey platform. Could you help to
figure out how to resolve the build issue. 2. I stored global variables by this lib. Now it's removed. How could I store global variable? Do you have any solution on it?
Hello Haojian,
I am sorry to hear about this breakage.
The issue with ArmPlatformGlobalVariable was that it violates the PI spec, since it requires coordination between PEIMs beyond what is defined by the PI spec, and this breaks the interoperability model. EDK2 is the reference implementation for PI as well as UEFI, so ArmPlatformGlobalVariable really did not belong there.
The alternative is dynamic PCDs. I am not familiar with your particular use case: where do the variable get set, and where are they read?
1. In PeiMPCore.inf, ArmPlatformGlobalVariableLib is referenced. Without it, there's build error. Same issue in ArmJuno and ArmVexpress platform of OpenPlatformPkg.
2. In HiKey, I create some variables such as autoboot, bootdevice, serialno. These variables could be updated and recorded. They couldn't be reproduced by dynamic PCD.
OpenPlatformPkg is a submodule of edk2. I don't know how to upload my patches into my github account. So I couldn't share my latest code to you. Here's the reference of my old codebase. You could find ArmGlobalVariable is used in this file.
https://github.com/96boards/edk2/blob/hikey/HisiPkg/HiKeyPkg/Drivers/HiKeyDx...
Regards Haojian
On 11 January 2016 at 11:48, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 11 January 2016 at 17:42, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 11 January 2016 at 09:59, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi Ard,
ArmPlatformGlobalVariable is removed from edk2. But I still find the reference in OpenPlatformPkg tree. And I also have a few issues on it.
- Without it, I failed to build my HiKey platform. Could you help to
figure out how to resolve the build issue. 2. I stored global variables by this lib. Now it's removed. How could I store global variable? Do you have any solution on it?
Hello Haojian,
I am sorry to hear about this breakage.
The issue with ArmPlatformGlobalVariable was that it violates the PI spec, since it requires coordination between PEIMs beyond what is defined by the PI spec, and this breaks the interoperability model. EDK2 is the reference implementation for PI as well as UEFI, so ArmPlatformGlobalVariable really did not belong there.
The alternative is dynamic PCDs. I am not familiar with your particular use case: where do the variable get set, and where are they read?
- In PeiMPCore.inf, ArmPlatformGlobalVariableLib is referenced. Without it,
there's build error. Same issue in ArmJuno and ArmVexpress platform of OpenPlatformPkg.
Yes, those references should simply be removed after PrePi has been updated to the upstream version
- In HiKey, I create some variables such as autoboot, bootdevice, serialno.
These variables could be updated and recorded. They couldn't be reproduced by dynamic PCD.
Looking at the URL below, your code is not actually using ArmPlatformGlobalVariable, you are simply (ab)using its HOB guid as a scope identifier for you EFI variables. You can just use gEfiGlobalVariableGuid instead, or invent a completely new GUID. The usage itself has *nothing* to do with ArmPlatformGlobalVariable.
On 11 January 2016 at 20:35, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 11 January 2016 at 11:48, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 11 January 2016 at 17:42, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 11 January 2016 at 09:59, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi Ard,
ArmPlatformGlobalVariable is removed from edk2. But I still find the reference in OpenPlatformPkg tree. And I also have a few issues on it.
- Without it, I failed to build my HiKey platform. Could you help to
figure out how to resolve the build issue. 2. I stored global variables by this lib. Now it's removed. How could I store global variable? Do you have any solution on it?
Hello Haojian,
I am sorry to hear about this breakage.
The issue with ArmPlatformGlobalVariable was that it violates the PI spec, since it requires coordination between PEIMs beyond what is defined by the PI spec, and this breaks the interoperability model. EDK2 is the reference implementation for PI as well as UEFI, so ArmPlatformGlobalVariable really did not belong there.
The alternative is dynamic PCDs. I am not familiar with your particular use case: where do the variable get set, and where are they read?
- In PeiMPCore.inf, ArmPlatformGlobalVariableLib is referenced. Without it,
there's build error. Same issue in ArmJuno and ArmVexpress platform of OpenPlatformPkg.
Yes, those references should simply be removed after PrePi has been updated to the upstream version
- In HiKey, I create some variables such as autoboot, bootdevice, serialno.
These variables could be updated and recorded. They couldn't be reproduced by dynamic PCD.
Looking at the URL below, your code is not actually using ArmPlatformGlobalVariable, you are simply (ab)using its HOB guid as a scope identifier for you EFI variables. You can just use gEfiGlobalVariableGuid instead, or invent a completely new GUID. The usage itself has *nothing* to do with ArmPlatformGlobalVariable.
I'll try to use gEfiGlobalVariableGuid. But I think that I can't declare any variable in gEfiGlobalVariableGuid. I remember that only system variable could be accessed in gEfiGlobalVariableGuid. So I moved to use ArmPlatformGlobalVariable.
If I move to create a completely new GUID. How to declare variables in it? Is there any reference on it?
By the way, I also met build error below after rebasing to latest OpenPlatformPkg. If I use old OpenPlatformPkg code base (on August), I won't meet this issue. And I tried both gcc4.8 and gcc4.9. Do you know how to fix it?
`mCrcTable' referenced in section `.text.RuntimeDriverCalculateCrc32' of /opt/wo rkspace/boot/uefi/upstream/edk2/Build/HiKey/DEBUG_GCC49/AARCH64/MdeModulePkg/Cor e/RuntimeDxe/RuntimeDxe/OUTPUT/RuntimeDxe.lib(Crc32.obj): defined in discarded s ection `COMMON' of /opt/workspace/boot/uefi/upstream/edk2/Build/HiKey/DEBUG_GCC4 9/AARCH64/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe/OUTPUT/RuntimeDxe.lib(Crc32.ob j) `mCrcTable' referenced in section `.text.RuntimeDriverInitializeCrc32Table' of / opt/workspace/boot/uefi/upstream/edk2/Build/HiKey/DEBUG_GCC49/AARCH64/MdeModuleP kg/Core/RuntimeDxe/RuntimeDxe/OUTPUT/RuntimeDxe.lib(Crc32.obj): defined in disca rded section `COMMON' of /opt/workspace/boot/uefi/upstream/edk2/Build/HiKey/DEBU G_GCC49/AARCH64/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe/OUTPUT/RuntimeDxe.lib(Cr c32.obj)
Regards Haojian
On 11 January 2016 at 14:41, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 11 January 2016 at 20:35, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 11 January 2016 at 11:48, Haojian Zhuang haojian.zhuang@linaro.org wrote:
On 11 January 2016 at 17:42, Ard Biesheuvel ard.biesheuvel@linaro.org wrote:
On 11 January 2016 at 09:59, Haojian Zhuang haojian.zhuang@linaro.org wrote:
Hi Ard,
ArmPlatformGlobalVariable is removed from edk2. But I still find the reference in OpenPlatformPkg tree. And I also have a few issues on it.
- Without it, I failed to build my HiKey platform. Could you help to
figure out how to resolve the build issue. 2. I stored global variables by this lib. Now it's removed. How could I store global variable? Do you have any solution on it?
Hello Haojian,
I am sorry to hear about this breakage.
The issue with ArmPlatformGlobalVariable was that it violates the PI spec, since it requires coordination between PEIMs beyond what is defined by the PI spec, and this breaks the interoperability model. EDK2 is the reference implementation for PI as well as UEFI, so ArmPlatformGlobalVariable really did not belong there.
The alternative is dynamic PCDs. I am not familiar with your particular use case: where do the variable get set, and where are they read?
- In PeiMPCore.inf, ArmPlatformGlobalVariableLib is referenced. Without it,
there's build error. Same issue in ArmJuno and ArmVexpress platform of OpenPlatformPkg.
Yes, those references should simply be removed after PrePi has been updated to the upstream version
- In HiKey, I create some variables such as autoboot, bootdevice, serialno.
These variables could be updated and recorded. They couldn't be reproduced by dynamic PCD.
Looking at the URL below, your code is not actually using ArmPlatformGlobalVariable, you are simply (ab)using its HOB guid as a scope identifier for you EFI variables. You can just use gEfiGlobalVariableGuid instead, or invent a completely new GUID. The usage itself has *nothing* to do with ArmPlatformGlobalVariable.
I'll try to use gEfiGlobalVariableGuid. But I think that I can't declare any variable in gEfiGlobalVariableGuid. I remember that only system variable could be accessed in gEfiGlobalVariableGuid. So I moved to use ArmPlatformGlobalVariable.
If I move to create a completely new GUID. How to declare variables in it? Is there any reference on it?
Just create a new GUID, and use it like you are doing currently.
By the way, I also met build error below after rebasing to latest OpenPlatformPkg. If I use old OpenPlatformPkg code base (on August), I won't meet this issue. And I tried both gcc4.8 and gcc4.9. Do you know how to fix it?
`mCrcTable' referenced in section `.text.RuntimeDriverCalculateCrc32' of /opt/wo rkspace/boot/uefi/upstream/edk2/Build/HiKey/DEBUG_GCC49/AARCH64/MdeModulePkg/Cor e/RuntimeDxe/RuntimeDxe/OUTPUT/RuntimeDxe.lib(Crc32.obj): defined in discarded s ection `COMMON' of /opt/workspace/boot/uefi/upstream/edk2/Build/HiKey/DEBUG_GCC4 9/AARCH64/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe/OUTPUT/RuntimeDxe.lib(Crc32.ob j) `mCrcTable' referenced in section `.text.RuntimeDriverInitializeCrc32Table' of / opt/workspace/boot/uefi/upstream/edk2/Build/HiKey/DEBUG_GCC49/AARCH64/MdeModuleP kg/Core/RuntimeDxe/RuntimeDxe/OUTPUT/RuntimeDxe.lib(Crc32.obj): defined in disca rded section `COMMON' of /opt/workspace/boot/uefi/upstream/edk2/Build/HiKey/DEBU G_GCC49/AARCH64/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe/OUTPUT/RuntimeDxe.lib(Cr c32.obj)
Yes, you need to update your Conf/tools_def.txt. If you don't have any local changes, you can just remove it, and re-run 'source edksetup.sh'