Re: [edk2] 'fastboot boot' TPL

2018-02-28 Thread Laszlo Ersek
On 02/28/18 09:19, Ard Biesheuvel wrote: > On 28 February 2018 at 08:15, Michael Zimmermann > wrote: >>> I agree. Did you run into any issues due to this? >> Surprisingly no. I was just trying to understand the fastboot implementation >> before I use it on my platform >>

Re: [edk2] 'fastboot boot' TPL

2018-02-28 Thread Michael Zimmermann
Well since the fastboot implementation already is an application (and not a driver) all we need to do is to use WaitEvent instead of a notify callback. Once that's fixed I'd add ASSERTs on the current tpl to the relevant API functions so you know immediately when you try to violate the spec. On

Re: [edk2] 'fastboot boot' TPL

2018-02-28 Thread Ard Biesheuvel
On 28 February 2018 at 08:15, Michael Zimmermann wrote: >> I agree. Did you run into any issues due to this? > Surprisingly no. I was just trying to understand the fastboot implementation > before I use it on my platform > and was surprised that this works at all. I can

Re: [edk2] 'fastboot boot' TPL

2018-02-28 Thread Michael Zimmermann
> I agree. Did you run into any issues due to this? Surprisingly no. I was just trying to understand the fastboot implementation before I use it on my platform and was surprised that this works at all. I can imagine that's because this is supposed to load linux's efistub which probably doesn't do

Re: [edk2] 'fastboot boot' TPL

2018-02-28 Thread Ard Biesheuvel
On 28 February 2018 at 07:56, Michael Zimmermann wrote: > I feel like both of you misunderstood my intention. > As I said in my initial mail, I'm not arguing the spec - I know that > StartImage must be called from TPL_APPLICATION. > > I'm just discussing a bug inside

Re: [edk2] 'fastboot boot' TPL

2018-02-27 Thread Michael Zimmermann
I feel like both of you misunderstood my intention. As I said in my initial mail, I'm not arguing the spec - I know that StartImage must be called from TPL_APPLICATION. I'm just discussing a bug inside EmbeddedPkg/Application/AndroidFastboot - because they actually do call StartImage from

Re: [edk2] 'fastboot boot' TPL

2018-02-27 Thread Andrew Fish
Violating the spec is undefined behavior. If it works that is bad luck, or good luck depending on your point of view. Sent from my iPhone > On Feb 27, 2018, at 11:33 PM, Michael Zimmermann > wrote: > > Are you sure? > > If you look at this file: >

Re: [edk2] 'fastboot boot' TPL

2018-02-27 Thread Michael Zimmermann
Are you sure? If you look at this file: https://github.com/tianocore/edk2/blob/master/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c The DataReady Event is a TPL_CALLBACK event. >From there the call chain goes as follows: AcceptCmd -> HandleBoot -> BootAndroidBootImg ->

[edk2] 'fastboot boot' TPL

2018-02-27 Thread Michael Zimmermann
>From looking at the code it seems to me that StartImage is called from TPL_CALLBACK. According to the Spec StartImage can only be called from https://lists.01.org/mailman/listinfo/edk2-devel