Date   

Pull request process for the edk2 repo

Satoshi Tanda
 

Is there any documents and instructions I can follow to create a PR for the edk2 repo by myself? I filed an issue to the edk2 repo, and I doubt it will be fixed by anyone very soon. Since the fix seems trivial, I could submit a PR if that works.

Here is the ticket.

https://bugzilla.tianocore.org/show_bug.cgi?id=3405

How I can learn edk2’s PR process, or can anyone suggest what I could do to make it resolved?

Best,

Satoshi


UEFI Redfish support

Mahantesh Salimath
 

Hello,

I'm new to the group, I'm a system software engineer working for a corporation in USA.
I'm not sure where to post my queries, hence posting it here.

I have recently started working on adding Redfish support to our systems.
More specifically, I'm working on adding Events service feature:
(http://redfish.dmtf.org/schemas/DSP0266_1.12.0.html#event-service)

Clients can connect to Redfish service (Redfish Webserver) and subscribe to events
so that they receive a notification when a subscribed event occurs.
I'm wondering if system events such as: system reboot,
system booted successfully, error during bootup etc.,
can also be supported via this service ?

As per the Redfish specification, events such as: a cable is plugged or
a button pushed on the Host are supported via the Events service, so I think
the system events can also notified.

Now, for the system events to be notified, UEFI Redfish Client (on Host) must notify the Redfish service about these events.
I'm searching for this module in UEFI Redfish Client which is responsible for propagating such events to Redfish Service.

Any help in this regard is greatly appreciated.
Please feel free to correct any misconceptions.

Thanks.

Best,
Mahantesh


Re: [edk2-devel] [edk2-discuss] Google Summer of Code Interested Student

Caden Kline
 

I am happy to say that I'll be working on terminal improvement for GSoC.
Thanks for picking my proposal and thank you to my mentors(Rocio, Nate
DeSimone) for agreeing to work with me. My proposal is listed here (
https://summerofcode.withgoogle.com/projects/#5830503296401408 ); however,
it doesn't differ from the wiki page or what's been discussed in this
thread.

What is the best way to communicate with my mentors?

Also, in what format would the community prefer updates on the progress of
my work? Patches and information in the emails that get sent, Blog Posts,
new topic on the mailing list, thread on the maillist, or some combination?


On Mon, Mar 22, 2021 at 7:08 PM Andrew Fish via groups.io <afish=
apple.com@groups.io> wrote:



On Mar 22, 2021, at 11:31 AM, Nate DeSimone <
nathaniel.l.desimone@intel.com> wrote:

Hi Andrew,

I tested VT_UTF8 on the macOs Terminal software and I can confirm that
VT_UTF8 renders nicely. See the attached screenshot.
Nate,

Yes it is close to VT_UTF8, but not quite the same. I was looking back
through the driver and I’d forgotten how similar it really is.

Symbols used in table below
===========================
ESC = 0x1B
CSI = 0x9B
DEL = 0x7f
^ = CTRL

+=========+======+===========+==========+==========+=============+
| | EFI | EFI 1.10 | | | |
| | Scan | | VT100+ | | |
| KEY | Code | PC ANSI | VTUTF8 | VT100 | xterm-color |
+=========+======+===========+==========+==========+=============+
| NULL | 0x00 | | | | |
| UP | 0x01 | ESC [ A | ESC [ A | ESC [ A | ESC [ A |
| DOWN | 0x02 | ESC [ B | ESC [ B | ESC [ B | ESC [ B |
| RIGHT | 0x03 | ESC [ C | ESC [ C | ESC [ C | ESC [ C |
| LEFT | 0x04 | ESC [ D | ESC [ D | ESC [ D | ESC [ D |
| HOME | 0x05 | ESC [ H | ESC h | ESC [ H | ESC [ H |
| | | | | | ^A |
| END | 0x06 | ESC [ F | ESC k | ESC [ K | ESC [ F |
| INSERT | 0x07 | ESC [ @ | ESC + | ESC [ @ | ^E |
| | | ESC [ L | | ESC [ L | |
| DELETE | 0x08 | ESC [ X | ESC - | ESC [ P | 0x7f |
| PG UP | 0x09 | ESC [ I | ESC ? | ESC [ V | ESC [ 5 ~ |
| | | | | ESC [ ? | ^P |
| PG DOWN | 0x0A | ESC [ G | ESC / | ESC [ U | ESC [ 6 ~ |
| | | | | ESC [ / | ^N |
| F1 | 0x0B | ESC [ M | ESC 1 | ESC O P | ESC O P |
| F2 | 0x0C | ESC [ N | ESC 2 | ESC O Q | ESC O Q |
| F3 | 0x0D | ESC [ O | ESC 3 | ESC O w | ESC O R |
| F4 | 0x0E | ESC [ P | ESC 4 | ESC O x | ESC O S |
| F5 | 0x0F | ESC [ Q | ESC 5 | ESC O t | ESC [ 1 5 ~ |
| F6 | 0x10 | ESC [ R | ESC 6 | ESC O u | ESC [ 1 7 ~ |
| F7 | 0x11 | ESC [ S | ESC 7 | ESC O q | ESC [ 1 8 ~ |
| F8 | 0x12 | ESC [ T | ESC 8 | ESC O r | ESC [ 1 9 ~ |
| F9 | 0x13 | ESC [ U | ESC 9 | ESC O p | ESC [ 2 0 ~ |
| F10 | 0x14 | ESC [ V | ESC 0 | ESC O M | ESC [ 2 1 ~ |
| Escape | 0x17 | ESC | ESC | ESC | ESC |
+=========+======+===========+==========+==========+=============+
| F11 | 0x16 | | | | ESC [ 2 3 ~ |
| F12 | 0x16 | | | | ESC [ 2 4 ~ |
+=========+======+===========+==========+==========+=============+


I’m wondering it we could pick the default terminal type based on the
toolchain?

Thanks,

Andrew Fish

Thanks,
Nate

On 3/17/21, 9:02 AM, "Andrew Fish" <afish@apple.com <mailto:
afish@apple.com>> wrote:

If we are mentioning terminal types the default terminal type on a
Mac is xterm-256color. So that is going to be the default when people run
OVMF on a Mac. So it would be nice if we can add that. I can help out with
anything xterm-256color related.

Thanks,

Andrew Fish

On Mar 16, 2021, at 8:23 AM, Laszlo Ersek <lersek@redhat.com> wrote:

Hi Nate,

(adding Leif and Ard)

On 03/13/21 03:52, Desimone, Nathaniel L wrote:
I've created a new wiki page for this task with all the information I
have gathered thus far. I've done some more experimentation and found
that there are several newer terminal emulators that don't support
DEC Special Graphics so I've reduced the number of modes where DEC
Special Graphics should be preferred. Laszlo, if you could take a
look at the terminal type matrix I created that would be very
helpful.

https://github.com/tianocore/tianocore.github.io/wiki/Tasks-Terminal-driver-improvements

(

My background:

I settled on plain (non-UTF-8) xterm around 1998, and have been using it
ever since. Whenever something was off, I always tried to hammer the
application into conformance with my particular xterm setup, rather than
the other way around. I also have some quirky terminal settings -- for
me, "backspace" generates ^H / keycode 22 (stty sets erase to ^H),
"delete" generates keycode 119, and there's no "rubout". I still don't
use UTF-8 (I use latin2).

)

* Regarding ArmVirtPkg, I stick with the default TTY_TERMINAL=FALSE
setting (which means VT-100). Using that setting, I see the following
kind of "ASCII approximation" for box drawing:

/------------------------------------------------------------------------------\
| Boot Manager
|
\------------------------------------------------------------------------------/

I'm really happy with this, as I don't care much for nice-looking
boxes; instead I prefer portability.

(NB: this seems to disagree with your "Current Behavior (Which is
wrong)" line for VT100, as it suggests CP437. That's not what I'm
seeing with VT100.)

TTY_TERMINAL=TRUE would mainly affect backspace / delete I think -- as
far as I recall, that's why I asked Roy not to make TTY_TERMINAL=TRUE
the default, in 2015:

http://mid.mail-archive.com/555458DB.3090602@redhat.com
http://mid.mail-archive.com/CAFECyb_E+bGZt5xv7QhRqyD0jX=AzoEMw7VW_tjZr+E=sQf8ww@mail.gmail.com

(I'd like to CC Roy, but I can't tell if he's now working for Linaro,
Cavium, HPE, Marvell, or another company.)

* Regarding OvmfPkg, currently PC_ANSI is hard-coded, and for me it
looks like this:

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄż
ł Boot Manager
ł
ŔÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄŮ

Obviously I'd much prefer if I got the simple ASCII approximation here
as well.

* Whether VT100 and/or PC_ANSI and/or TTY_TERM are *officially* supposed
to use DEC Special Graphics, I can't tell.

I know what my preferences are:

- the current BackSpace and Delete mappings (which work fine for me
with both VT100 and PC_ANSI, but *not* with TTY_TERM),

- and the most primitive ASCII mapping (no special graphics, no UTF-8
sequences, etc). I really like a super dumb terminal, where taking
simple "ASCII screenshots" (and pasting them into plaintext emails!)
is *trivial*.

... Looking at your "Expected Behavior" table, there is only one line
left with "poor man's ASCII" -- namely, TTY_TERM. Unfortunately,
TTY_TERM breaks my BackSpace / Delete settings :(

* In summary, I'd prefer if (a) VT100 stayed as-is (using "poor man's
ASCII", as seen in ArmVirtPkg), and (b) if OVMF used *that* VT100,
rather than PC_ANSI, by default.

Thanks!
Laszlo











<macos_terminal_vt_utf8.png>






Not able to boot Linux after flashing Intel Quark Platform Image on Intel Galileo Gen 2

Nihal
 

Hello Everyone,

I have Flashed Intel Galileo Gen 2 using Intel Quark Platform image but I'm unable to boot OS after that.

Does anyone know how to solve this?

I am following this https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel/QuarkPlatformPkg

while following Install, Configure, and Boot Linux sec in https://github.com/tianocore/edk2-platforms/tree/master/Platform/Intel/QuarkPlatformPkg I'm getting this.

For better understanding see the attached SS


Re: 回复: [edk2-discuss] compile error

wenyi,xie
 

Hi,Liming:

Our project has several components, EDK2 is one of them. This project has a top makefile, and this top makefile will call sub makefile to build every component.
In the top makefile, it uses make -j4 to build every component include EDK2. So even if we add "option -n 1" to EDK2 build command, it doesn't work.
But if changing -j4 to -j1 in the top makefile, the error will not occur again.

And there's a warning when using make -j4.
Copying $EDK_TOOLS_PATH/Conf/target.template
to /home/phisik3/bios_tt/bios/output/edk2/BaseTools/Conf/target.txt
make[7]:warning: jobserver unvaliable: using -j1. Add '+' to parent make rule.
make[7]:Entering directory '/home/phisik3/bios_tt/bios'

Thanks
Wenyi

On 2021/5/14 10:40, gaoliming wrote:
Wenyi:

Build command has option -n. Can you try build -n 1 to disable multiple thread?

-n THREADNUMBER Build the platform using multi-threaded compiler. The
value overrides target.txt's
MAX_CONCURRENT_THREAD_NUMBER. When value is set to 0,
tool automatically detect number of processor threads,
set value to 1 means disable multi-thread build, and
set value to more than 1 means user specify the

Thanks
Liming
-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表 wenyi,xie
via groups.io
发送时间: 2021年5月13日 20:05
收件人: Feng, Bob C <bob.c.feng@intel.com>; discuss@edk2.groups.io;
Andrew (EFI) Fish <afish@apple.com>
主题: Re: [edk2-discuss] compile error

The environment is a docker, itself has no kernel, it depends on the kernel of
host machine.

On 2021/5/13 19:29, Feng, Bob C wrote:
Could you try the python3?

Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
wenyi,xie via groups.io
Sent: Thursday, May 13, 2021 7:20 PM
To: Andrew (EFI) Fish <afish@apple.com>; discuss@edk2.groups.io
Subject: Re: [edk2-discuss] compile error

And this error only occurred in a specific environment. We trace the commit
log and find this error relate to the feature "BaseTools Enable multiple-thread
autogen".
Maybe this environment doesn't support multi thread well, the root cause is
still unknown.
May I ask whether there's a way to disable this feature, or any other
workaround for this problem.

Thanks
Wenyi

On 2021/5/12 23:23, Andrew (EFI) Fish wrote:
That is an error in a Python build tool, not a compiler error?

Sent from my iPhone

On May 12, 2021, at 2:41 AM, wenyi,xie via groups.io
<xiewenyi2=huawei.com@groups.io> wrote:

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a
compile error, the error message like below. we roll back the EDK2 version
and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4
4.15.0-45-generic #86-Ubuntu SMP X86_64 python 2.7.17 Does anyone
know how to solve this compile error.

Building ...
/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/e
dk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
[AARCH64] Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File
"/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/
edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.




.







.


回复: [edk2-discuss] compile error

gaoliming
 

Wenyi:

Build command has option -n. Can you try build -n 1 to disable multiple thread?

-n THREADNUMBER Build the platform using multi-threaded compiler. The
value overrides target.txt's
MAX_CONCURRENT_THREAD_NUMBER. When value is set to 0,
tool automatically detect number of processor threads,
set value to 1 means disable multi-thread build, and
set value to more than 1 means user specify the

Thanks
Liming

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表 wenyi,xie
via groups.io
发送时间: 2021年5月13日 20:05
收件人: Feng, Bob C <bob.c.feng@intel.com>; discuss@edk2.groups.io;
Andrew (EFI) Fish <afish@apple.com>
主题: Re: [edk2-discuss] compile error

The environment is a docker, itself has no kernel, it depends on the kernel of
host machine.

On 2021/5/13 19:29, Feng, Bob C wrote:
Could you try the python3?

Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of
wenyi,xie via groups.io
Sent: Thursday, May 13, 2021 7:20 PM
To: Andrew (EFI) Fish <afish@apple.com>; discuss@edk2.groups.io
Subject: Re: [edk2-discuss] compile error

And this error only occurred in a specific environment. We trace the commit
log and find this error relate to the feature "BaseTools Enable multiple-thread
autogen".
Maybe this environment doesn't support multi thread well, the root cause is
still unknown.
May I ask whether there's a way to disable this feature, or any other
workaround for this problem.

Thanks
Wenyi

On 2021/5/12 23:23, Andrew (EFI) Fish wrote:
That is an error in a Python build tool, not a compiler error?

Sent from my iPhone

On May 12, 2021, at 2:41 AM, wenyi,xie via groups.io
<xiewenyi2=huawei.com@groups.io> wrote:

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a
compile error, the error message like below. we roll back the EDK2 version
and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4
4.15.0-45-generic #86-Ubuntu SMP X86_64 python 2.7.17 Does anyone
know how to solve this compile error.

Building ...
/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/e
dk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
[AARCH64] Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File
"/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/
edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.




.






Re: compile error

wenyi,xie
 

The environment is a docker, itself has no kernel, it depends on the kernel of host machine.

On 2021/5/13 19:29, Feng, Bob C wrote:
Could you try the python3?

Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of wenyi,xie via groups.io
Sent: Thursday, May 13, 2021 7:20 PM
To: Andrew (EFI) Fish <afish@apple.com>; discuss@edk2.groups.io
Subject: Re: [edk2-discuss] compile error

And this error only occurred in a specific environment. We trace the commit log and find this error relate to the feature "BaseTools Enable multiple-thread autogen".
Maybe this environment doesn't support multi thread well, the root cause is still unknown.
May I ask whether there's a way to disable this feature, or any other workaround for this problem.

Thanks
Wenyi

On 2021/5/12 23:23, Andrew (EFI) Fish wrote:
That is an error in a Python build tool, not a compiler error?

Sent from my iPhone

On May 12, 2021, at 2:41 AM, wenyi,xie via groups.io <xiewenyi2=huawei.com@groups.io> wrote:

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a compile error, the error message like below. we roll back the EDK2 version and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4
4.15.0-45-generic #86-Ubuntu SMP X86_64 python 2.7.17 Does anyone
know how to solve this compile error.

Building ...
/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf [AARCH64] Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.




.




Re: compile error

wenyi,xie
 

On 2021/5/13 19:29, Feng, Bob C wrote:
Could you try the python3?
We have tried to set the default version of python to 3.7, but the error is still there.


Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of wenyi,xie via groups.io
Sent: Thursday, May 13, 2021 7:20 PM
To: Andrew (EFI) Fish <afish@apple.com>; discuss@edk2.groups.io
Subject: Re: [edk2-discuss] compile error

And this error only occurred in a specific environment. We trace the commit log and find this error relate to the feature "BaseTools Enable multiple-thread autogen".
Maybe this environment doesn't support multi thread well, the root cause is still unknown.
May I ask whether there's a way to disable this feature, or any other workaround for this problem.

Thanks
Wenyi

On 2021/5/12 23:23, Andrew (EFI) Fish wrote:
That is an error in a Python build tool, not a compiler error?

Sent from my iPhone

On May 12, 2021, at 2:41 AM, wenyi,xie via groups.io <xiewenyi2=huawei.com@groups.io> wrote:

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a compile error, the error message like below. we roll back the EDK2 version and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4
4.15.0-45-generic #86-Ubuntu SMP X86_64 python 2.7.17 Does anyone
know how to solve this compile error.

Building ...
/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf [AARCH64] Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.




.




Re: compile error

Bob Feng
 

Could you try the python3?

Thanks,
Bob

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of wenyi,xie via groups.io
Sent: Thursday, May 13, 2021 7:20 PM
To: Andrew (EFI) Fish <afish@apple.com>; discuss@edk2.groups.io
Subject: Re: [edk2-discuss] compile error

And this error only occurred in a specific environment. We trace the commit log and find this error relate to the feature "BaseTools Enable multiple-thread autogen".
Maybe this environment doesn't support multi thread well, the root cause is still unknown.
May I ask whether there's a way to disable this feature, or any other workaround for this problem.

Thanks
Wenyi

On 2021/5/12 23:23, Andrew (EFI) Fish wrote:
That is an error in a Python build tool, not a compiler error?

Sent from my iPhone

On May 12, 2021, at 2:41 AM, wenyi,xie via groups.io <xiewenyi2=huawei.com@groups.io> wrote:

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a compile error, the error message like below. we roll back the EDK2 version and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4
4.15.0-45-generic #86-Ubuntu SMP X86_64 python 2.7.17 Does anyone
know how to solve this compile error.

Building ...
/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf [AARCH64] Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.




.


Re: compile error

wenyi,xie
 

And this error only occurred in a specific environment. We trace the commit log and find this error relate to the feature "BaseTools Enable multiple-thread autogen".
Maybe this environment doesn't support multi thread well, the root cause is still unknown.
May I ask whether there's a way to disable this feature, or any other workaround for this problem.

Thanks
Wenyi

On 2021/5/12 23:23, Andrew (EFI) Fish wrote:
That is an error in a Python build tool, not a compiler error?

Sent from my iPhone

On May 12, 2021, at 2:41 AM, wenyi,xie via groups.io <xiewenyi2=huawei.com@groups.io> wrote:

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a compile error, the error message like below. we roll back the EDK2 version and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4 4.15.0-45-generic #86-Ubuntu SMP X86_64
python 2.7.17
Does anyone know how to solve this compile error.

Building ... /home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf [AARCH64]
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.




.


Re: compile error

Andrew Fish
 

That is an error in a Python build tool, not a compiler error?

On May 12, 2021, at 2:41 AM, wenyi,xie via groups.io <xiewenyi2=huawei.com@groups.io> wrote:

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a compile error, the error message like below. we roll back the EDK2 version and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4 4.15.0-45-generic #86-Ubuntu SMP X86_64
python 2.7.17
Does anyone know how to solve this compile error.

Building ... /home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf [AARCH64]
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.





compile error

wenyi,xie
 

Hello everyone,

When we update EDK2 version from 201903 to 202011, we meet a compile error, the error message like below. we roll back the EDK2 version and find the error starts from 201908.
Our env is
Linux job-for-start-dev-docker-210-mxzlp-5vjvk-n9nt4 4.15.0-45-generic #86-Ubuntu SMP X86_64
python 2.7.17
Does anyone know how to solve this compile error.

Building ... /home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf [AARCH64]
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/phisik3/jenkins_home/workspace/C_56173/work_code/bios/output/edk2/BaseTools/Source/Python/AutoGen/AutoGenWorker.py", line 85, in run
log_message = self.log_q.get()
File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
res = self._recv()
UnpicklingError: invalid load key, ''.


Re: Is it possible to manually (from code) load 'Realtek UEFI UNDI Driver' from firmware?

Michael Brown
 

On 07/05/2021 13:08, Laszlo Ersek wrote:
On 05/07/21 09:13, alexey3nemckovich@gmail.com wrote:
I am developing efi application that should work with network.
I found, that some drivers (including 'Realtek UEFI UNDI Driver') are not loaded, when BIOS option 'Fast boot' is on.
I'v tried to load it using EFI_FIRMWARE_VOLUME2_PROTOCOL, enumerating files of type EFI_FV_FILETYPE_DRIVER and loading them, in such way
That will only load drivers that are part of the platform firmware. It
will not load drivers from the disk (which could otherwise be loaded via
Driver#### options), or from the ROM BARs of PCI cards. (The PCI bus
driver installs EFI_LOAD_FILE2_PROTOCOL on the handle that carries
EFI_PCI_IO_PROTOCOL too, for exposing the UEFI driver.) See also
EFI_PCI_IO_PROTOCOL.{RomSize,RomImage}.
... TBH I'm doubtful a UEFI application is supposed to load option ROM
drivers. That's the job of platform BDS. If "fast boot" is selected,
then the system seems to work as intended -- I'm doubtful that running
your application qualifies as "fast boot" either. I'd suggest disabling
fast boot in the first place.
There is also the possibility that the "fast boot" option is implemented by having the Realtek UEFI UNDI Driver itself check for the "fast boot" setting, and refusing to be loaded (i.e. returning an error from the entry point) if fast boot is enabled. I've seen some vendor drivers using that kind of hack.

Michael


Re: Is it possible to manually (from code) load 'Realtek UEFI UNDI Driver' from firmware?

Sean
 

The uefi spec defined method to request the bds connect something is using https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Protocol/BootManagerPolicy.h

We have been trying to move partners away from hacky solutions and to this method.

Thanks
Sean

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: discuss@edk2.groups.io <discuss@edk2.groups.io> on behalf of Laszlo Ersek <lersek@redhat.com>
Sent: Friday, May 7, 2021 9:08:17 PM
To: discuss@edk2.groups.io <discuss@edk2.groups.io>; alexey3nemckovich@gmail.com <alexey3nemckovich@gmail.com>
Subject: Re: [edk2-discuss] Is it possible to manually (from code) load 'Realtek UEFI UNDI Driver' from firmware?

On 05/07/21 09:13, alexey3nemckovich@gmail.com wrote:
I am developing efi application that should work with network.
I found, that some drivers (including 'Realtek UEFI UNDI Driver') are not loaded, when BIOS option 'Fast boot' is on.
I'v tried to load it using EFI_FIRMWARE_VOLUME2_PROTOCOL, enumerating files of type EFI_FV_FILETYPE_DRIVER and loading them, in such way
That will only load drivers that are part of the platform firmware. It
will not load drivers from the disk (which could otherwise be loaded via
Driver#### options), or from the ROM BARs of PCI cards. (The PCI bus
driver installs EFI_LOAD_FILE2_PROTOCOL on the handle that carries
EFI_PCI_IO_PROTOCOL too, for exposing the UEFI driver.) See also
EFI_PCI_IO_PROTOCOL.{RomSize,RomImage}.

... TBH I'm doubtful a UEFI application is supposed to load option ROM
drivers. That's the job of platform BDS. If "fast boot" is selected,
then the system seems to work as intended -- I'm doubtful that running
your application qualifies as "fast boot" either. I'd suggest disabling
fast boot in the first place.

Laszlo


Re: Is it possible to manually (from code) load 'Realtek UEFI UNDI Driver' from firmware?

Laszlo Ersek
 

On 05/07/21 09:13, alexey3nemckovich@gmail.com wrote:
I am developing efi application that should work with network.
I found, that some drivers (including 'Realtek UEFI UNDI Driver') are not loaded, when BIOS option 'Fast boot' is on.
I'v tried to load it using EFI_FIRMWARE_VOLUME2_PROTOCOL, enumerating files of type EFI_FV_FILETYPE_DRIVER and loading them, in such way
That will only load drivers that are part of the platform firmware. It
will not load drivers from the disk (which could otherwise be loaded via
Driver#### options), or from the ROM BARs of PCI cards. (The PCI bus
driver installs EFI_LOAD_FILE2_PROTOCOL on the handle that carries
EFI_PCI_IO_PROTOCOL too, for exposing the UEFI driver.) See also
EFI_PCI_IO_PROTOCOL.{RomSize,RomImage}.

... TBH I'm doubtful a UEFI application is supposed to load option ROM
drivers. That's the job of platform BDS. If "fast boot" is selected,
then the system seems to work as intended -- I'm doubtful that running
your application qualifies as "fast boot" either. I'd suggest disabling
fast boot in the first place.

Laszlo


Is it possible to manually (from code) load 'Realtek UEFI UNDI Driver' from firmware?

alexey3nemckovich@...
 

I am developing efi application that should work with network.
I found, that some drivers (including 'Realtek UEFI UNDI Driver') are not loaded, when BIOS option 'Fast boot' is on.
I'v tried to load it using EFI_FIRMWARE_VOLUME2_PROTOCOL, enumerating files of type EFI_FV_FILETYPE_DRIVER and loading them, in such way

Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiFirmwareVolumeProtocolGuid, NULL, &NoHandles, &Buffer);
if (!EFI_ERROR(Status)) {
for (Index = 0; Index < NoHandles; Index++) {
Status = gBS->HandleProtocol(Buffer[Index], &gEfiFirmwareVolumeProtocolGuid, (VOID **)&Fv);
if (!EFI_ERROR(Status)) {

for (Index2 = 0; Index2 < sizeof(FileTypes)/sizeof(EFI_FV_FILETYPE); Index2++) {

FileType = FileTypes[Index2];

Key = AllocatePool(Fv->KeySize);
ASSERT(Key != NULL);
ZeroMem(Key, Fv->KeySize);

Index3 = 0;

do {
NextStatus = Fv->GetNextFile(Fv, Key, &FileType, &NameGuid, &Attributes, &Size);

if (EFI_SUCCESS == NextStatus/* && Index3 < 50*/) {

Print(L"1\n");

UiSection = NULL;
Status = Fv->ReadSection(
Fv,
&NameGuid,
EFI_SECTION_USER_INTERFACE,
0,
(VOID **)&UiSection,
&Size,
&Authentication
);

Print(L"3\n");

if (!EFI_ERROR(Status)) {

Print(L"4\n");

Print(L"%d) Found driver image '%s'\n", Index3, UiSection);

EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_HANDLE ImageHandle;

DevicePath = FvFileDevicePath(Buffer[Index], &NameGuid);

Status = gBS->LoadImage(FALSE, gImageHandle, DevicePath, NULL, 0, &ImageHandle);
if (!EFI_ERROR(Status)) {
//PERF_END(NULL, "BDS", NULL, 0);

Print(L"%d) Load image success '%s'\n", Index3, UiSection);

Status = gBS->StartImage(ImageHandle, NULL, NULL);

Some drivers were loaded, but there was not 'Realtek UEFI UNDI Driver' among them.
Maybe somebody knows from where I can load this UNDI driver?


Is it possible to manually (from code) load 'Realtek UEFI UNDI Driver'?

alexey3nemckovich@...
 

I am developing efi application that should work with network.
I found, that some drivers (including 'Realtek UEFI UNDI Driver') are not loaded, when BIOS option 'Fast boot' is on.
I'v tried to load it using EFI_FIRMWARE_VOLUME2_PROTOCOL, enumerating files of type EFI_FV_FILETYPE_DRIVER and loading them, in such way

Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiFirmwareVolumeProtocolGuid, NULL, &NoHandles, &Buffer);
if (!EFI_ERROR(Status)) {
for (Index = 0; Index < NoHandles; Index++) {
Status = gBS->HandleProtocol(Buffer[Index], &gEfiFirmwareVolumeProtocolGuid, (VOID **)&Fv);
if (!EFI_ERROR(Status)) {

for (Index2 = 0; Index2 < sizeof(FileTypes)/sizeof(EFI_FV_FILETYPE); Index2++) {

FileType = FileTypes[Index2];

Key = AllocatePool(Fv->KeySize);
ASSERT(Key != NULL);
ZeroMem(Key, Fv->KeySize);

Index3 = 0;

do {
NextStatus = Fv->GetNextFile(Fv, Key, &FileType, &NameGuid, &Attributes, &Size);

if (EFI_SUCCESS == NextStatus/* && Index3 < 50*/) {

Print(L"1\n");

UiSection = NULL;
Status = Fv->ReadSection(
Fv,
&NameGuid,
EFI_SECTION_USER_INTERFACE,
0,
(VOID **)&UiSection,
&Size,
&Authentication
);

Print(L"3\n");

if (!EFI_ERROR(Status)) {

Print(L"4\n");

Print(L"%d) Found driver image '%s'\n", Index3, UiSection);

EFI_DEVICE_PATH_PROTOCOL *DevicePath;
EFI_HANDLE ImageHandle;

DevicePath = FvFileDevicePath(Buffer[Index], &NameGuid);

Status = gBS->LoadImage(FALSE, gImageHandle, DevicePath, NULL, 0, &ImageHandle);
if (!EFI_ERROR(Status)) {
//PERF_END(NULL, "BDS", NULL, 0);

Print(L"%d) Load image success '%s'\n", Index3, UiSection);

Status = gBS->StartImage(ImageHandle, NULL, NULL);

Some drivers were loaded, but there was not 'Realtek UEFI UNDI Driver' among them.
Maybe somebody knows from where and how I can load this UNDI driver?


Re: Drivers that based on two underlying hardware devices

Michael Brown
 

On 30/04/2021 21:56, Jeff Brasen wrote:
Trying to determine any recommendations for best practices for drivers that need to connect to multiple pieces of hardware and the interaction with the connection sequence. For example if a driver needs to talk to a given hardware component as well as an i2c device. With my understanding of the UEFI driver model seems to work there doesn't seem to be good way to support this without either needing to have a connect all or custom connection logic. If that is what is needed it isn't unworkable but thought I would ask if anyone has alternative ideas for this sort of devices and making a simplified connection approach for devices.
There should be a working example of this in almost any UEFI USB network driver, since most USB NICs require access to two USB-level interfaces but the EFI_USB_IO_PROTOCOL model exposes a single device handle per interface.

Hope that helps,

Michael


Drivers that based on two underlying hardware devices

Jeff Brasen
 

Hi,

Trying to determine any recommendations for best practices for drivers that need to connect to multiple pieces of hardware and the interaction with the connection sequence. For example if a driver needs to talk to a given hardware component as well as an i2c device. With my understanding of the UEFI driver model seems to work there doesn't seem to be good way to support this without either needing to have a connect all or custom connection logic. If that is what is needed it isn't unworkable but thought I would ask if anyone has alternative ideas for this sort of devices and making a simplified connection approach for devices.

Thanks,
Jeff


Re: Having problems when trying to instrument all code of a specific UEFI driver (including the library code)

mick21@...
 

For ASan and MSan I just add the relevant flags to CC_FLAGS and sometimes I have to add custom flags. I must mention that I enabled Windows as a target for MSan, this wasn't the case for my LLVM version.

[BuildOptions]
*_*_*_CC_FLAGS = -fsanitize=memory -mllvm -msan-smm-tianocore=1 -fsanitize-blacklist=/mnt/part5/edk2-msan/msan_blacklist.txt
For ASan I had to remove link-time optimizations, due to errors related to comdat sections which I could not fix. The more difficult part for me is setting up the shadow memory and implementing enough of the sanitizer runtime in order for it to work.

Also, some functions have other dependencies which are out of the instrumentation still, for instance [1]:

InternalSmmBase2->GetSmstLocation (InternalSmmBase2, &gSmst);
ASSERT (gSmst != NULL);
This initializes the gSmst variable, with the function SmmBase2GetSmstLocation() [2] in PiSmmIpl.c, and will now cause MSan to error on the ASSERT() call. I still have to work out these cases. That said, it is still very much a work in progress and it is all a bit hacky.

Kind regards,

Mick

[1] https://github.com/tianocore/edk2/blob/83876950ab3cf5278d0ae7542086bd4be75059d3/MdePkg/Library/SmmServicesTableLib/SmmServicesTableLib.c#L52
[2] https://github.com/tianocore/edk2/blob/83876950ab3cf5278d0ae7542086bd4be75059d3/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c#L77

161 - 180 of 889