Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some fix for building Linux host version with latest gnuefi lib #3

Open
wants to merge 178 commits into
base: master
Choose a base branch
from

Conversation

lslrt
Copy link

@lslrt lslrt commented May 15, 2019

Hello,

I found a couple of minor issues when trying to build the project for the Linux host using latest gnuefi lib.
Some issues were coming from gnuefi itself, I've submitted some trivial patches on their git repo, you can find the version of the gnuefi lib that I used here: https://sourceforge.net/u/lslrt/gnu-efi/ci/fix/tree/

Regards

jeremy-compostella and others added 30 commits July 25, 2016 18:44
Change-Id: Ic4021fb3f9779a77ccff0ea0ebeb609f2f72334e
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-35154
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/525723
This reverts commit af11ec9

Change-Id: Ic4021fb3f9779a77ccff0ea0ebeb609f2f72334d
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-37619
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/537501
Change-Id: I38000b4f854a044559b1df29d6ed36b974baa250
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-37619
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/537502
This driver converts the libpayload sysinfo memory map to an EFI
memory map.

Change-Id: I3ed5483065b319bf7a8120191575b21b97adf0ca
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-37619
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/539385
This driver look-up for the ACPI RSDP table and provide it as a
EFI configuration table.

Change-Id: I218a639c6ce5a0a1435cc1a573609c4c848b97a0
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-37619
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/539386
This driver provides reset support based on the CF9 IO port.

Change-Id: I04b86b958c5ca05157a8ddcdb82e7016b34f9a39
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-37619
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/539579
This driver provides the GetTime runtime service support based on the
libpayload rtc_read_clock() function.

Change-Id: I233045de63562aaf2475ffb157f71b0e4db17d17
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-37619
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/540024
Change-Id: Ibe56c3e5303a04234ae07f2239fd6a9d190b2a33
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-37619
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/539387
Change-Id: Ibd18c0de1e7ca5508b12cf3921dbb339d66990a5
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38073
Signed-off-by: Christophe Guerard <[email protected]>
Reviewed-on: https://android.intel.com:443/541350
Change-Id: Ifa14d4d09d5c6c83365b1a364dacb98d62ce7f75
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38216
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/542231
Change-Id: Ib3ed0db9fdead8b26a0a7eb2ffc129366e49296d
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38216
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/542232
Change-Id: Ia4ca165d2362b21ee2538b834dd6b0836064e4ce
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38216
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/542233
Change-Id: I366a3b60ba8b4c482b4a048859da9df9087a917e
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38216
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/542234
Change-Id: I5132864e7d78c0ecd6aff01354e906ba7bf0dff6
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38216
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/542445
Change-Id: I9717ed73b5a6aa861ab361a8e8a05b10de7ba05d
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38216
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/542235
If the RSDP table checksum is wrong, try to find another RSDP table.

Change-Id: Ia34567baebba2a556a17fd843495b65fe4614316
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38372
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/543117
Change-Id: I429210e2c4bc561bedeff35355f6f0d99fb2c12b
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38333
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/542897
Change-Id: Ic4bd567b8faf3a1dfc26e9bf96dab3bdeb8eab58
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38333
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/542898
Change-Id: I388530aa1dcebfced0bc235e4361277b63c50dc5
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38505
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/543856
Change-Id: I8f433588ad7b85070ec5a82b1bea10ad4acbb602
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38505
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/543857
Change-Id: Ib422383f08fac09a41056b92c98d8993f710470d
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-38505
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/543858
If core_handle is NULL then the error exit path leaks the previous
allocation of local_core_handle causing a memory leak. Instead,
move the null check on core_handle to before the memory allocation
to avoid this leak.

Signed-off-by: Colin Ian King <[email protected]>
Fix memory leak in dwc_xdci_core_init when core_handle is NULL
git log --pretty=format:"%h %ad | %s%d [%an]" origin/android/master..remotes/origin/abt/sandbox/jcompost/efiwrapper-pr3:
  ad0862a Thu Nov 10 10:30:12 2016 +0100 | Merge pull request intel#1 from ColinIanKing/master (HEAD, origin/abt/sandbox/jcompost/efiwrapper-pr3, github/master, github/master) [Jérémy Compostella]
  e18d1ad Mon Nov 7 20:36:52 2016 +0000 | Fix memory leak in dwc_xdci_core_init when core_handle is NULL [Colin Ian King]

git diff --stat origin/android/master..remotes/origin/abt/sandbox/jcompost/efiwrapper-pr3:
  drivers/dw3/XdciDWC.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Change-Id: Iac91941087b37b11ea7c598e4811db66c869310d
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-40038
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/551290
If the MemoryMap buffer is too small, the current buffer size needed
to hold the memory map should be returned in MemoryMapSize.

Change-Id: I79eadad32ba7758249b6690ab963c2a00536d917
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-40352
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/552543
Change-Id: I71ccbb0bf85633f18831d54c5b1aa956554fa16d
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-40352
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/553391
Change-Id: Ie450fa2b0eb3fb09c665b96954680c54d97d1103
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-40352
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/552582
Change-Id: Ib562a09089dd7745a0d42cb154461ee262a36178
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-40352
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/553226
The ewacpi module provides helpers function to get an ACPI table.

Change-Id: Icc77d4eccc9be4f02ab329174a6743cca383f51e
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-40354
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/552593
Change-Id: I7c3e2cf5f93fdc53daa0df3eb32c165934dd1bd6
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-40354
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/552544
xihua-chen and others added 17 commits October 15, 2018 06:09
Change-Id: I4b449ddbbb264a895dea7af9d659951ddf63e326
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-69939
Signed-off-by: Xihua Chen <[email protected]>
Reviewed-on: https://android.intel.com:443/648193
This patch change generation algorithm of emmc serialno to generate
same serialno with abl

Change-Id: I28b78e82a1124ff26cc154ab1c1270610089e7eb
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-70029
Signed-off-by: zhouji3x <[email protected]>
Reviewed-on: https://android.intel.com:443/648213
Change-Id: If14c0dcb80e617e18298929421812ce1a4e4c1c0
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-70355
Signed-off-by: Yang, KaiX <[email protected]>
Reviewed-on: https://android.intel.com:443/649224
…SSDT

Change-Id: Ie06e407d479550a50fe1c86f6e6a2888b2c8f13f
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-70444
Signed-off-by: Tang, Haoyu <[email protected]>
Reviewed-on: https://android.intel.com:443/649803
It allows to identify the board/platform from fastboot by using
the `fastboot getvar board' command.

Change-Id: I5054fb5ed52e86a488e4859a995db07502667c50
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-70868
Signed-off-by: Jason Dutra <[email protected]>
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/650230
Initialized 'device_map' array elements with index range: == 5.

Change-Id: I6a243a68f6f03db528087b4d9ea45fbf8b89803c
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71598
Signed-off-by: sunxunou <[email protected]>
Reviewed-on: https://android.intel.com:443/651484
Change-Id: I3933c4f22caf503c5258f7dbe644224021e73a54
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-72456
Signed-off-by: Yang, KaiX <[email protected]>
Reviewed-on: https://android.intel.com:443/654030
This driver creates a Graphical Output Protocol based on the pipe A
surface 1 assuming it has been approprietly setup by the BIOS (ABL).

It reads back the resolution information and the surface address
directly from the registers.

Change-Id: Ib893935964204faa4278a85dabceba21b3f8bc30
Tracked-On: https://jira.devtools.intel.com/browse/OAM-75934
Signed-off-by: Jeremy Compostella <[email protected]>
Reviewed-on: https://android.intel.com:443/655387
This pacth is to add support for erasing block protocol and implementing
erase block function of virtio block

Change-Id: I0df36ab44a9e20cc151be374ca01e9cf30e31a2a
Tracked-On: https://jira.devtools.intel.com/browse/OAM-71085
Signed-off-by: Yang, Kai <[email protected]>
Reviewed-on: https://android.intel.com:443/656295
Change-Id: I2d6cd405462ed6bde9219973881a436c21ce10d7
Tracked-On: https://jira.devtools.intel.com/browse/OAM-76189
Signed-off-by: Xihua Chen <[email protected]>
Reviewed-on: https://android.intel.com:443/660194
this patch support NVME security send/receive and register storage security
protocol(SSP) for NVME

Change-Id: Iad0b98df5e8554903d8abf7dc5f21cd5d535e091
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-52565
Signed-off-by: JianFeng,Zhou <[email protected]>
Reviewed-on: https://android.intel.com:443/657010
This fix the build with gnuefi version >= 3.0.5

Signed-off-by: leo <[email protected]>
It is only included by source files of the lib itself.
Also use quote include variant for media.h otherwise the preprocessor
will fail to find it without additional -I directive.

Signed-off-by: leo <[email protected]>
…IO in diskio.c

This fix the build with gnuefi version >= 3.0.5

Signed-off-by: leo <[email protected]>
@lslrt
Copy link
Author

lslrt commented May 18, 2019

Hello,

all necessary changes got merged into gnuefi master branch, so you can now use gnuefi master HEAD:
https://sourceforge.net/p/gnu-efi/code/ci/master/tree/ to test those changes rather than my private copy of gnuefi.

Regards

Copy link
Contributor

@phireg phireg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
Thank you for your contribution.
We need to rebase our version of gnuefi before taking your changes. We will keep you updated on the progress.
Thx.

==19621== 160 bytes in 1 blocks are definitely lost in loss record 3 of 3
==19621==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==19621==    by 0x4E5926B: XCreateGC (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==19621==    by 0x10F852: draw (in /home/lsartre/perso/efiwrapper/host/efiwrapper_host-eng)
==19621==    by 0x517F4A3: start_thread (pthread_create.c:456)

Signed-off-by: leo <[email protected]>
leo added 2 commits August 2, 2019 14:24
Initialize the child image suppress the following valgrind errors:

==17180== Conditional jump or move depends on uninitialised value(s)
==17180==    at 0x1169C8: install_protocol_interface (protocol.c:62)
==17180==    by 0x115891: interface_init (interface.c:51)
==17180==    by 0x110A5E: load_image (image.c:69)
==17180==    by 0x10BCE9: load_and_execute (main.c:193)
==17180==    by 0x10C3EA: main (main.c:374)
==17180==  Uninitialised value was created by a stack allocation
==17180==    at 0x10BC74: load_and_execute (main.c:181)

Signed-off-by: leo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.