On 12/04/13 01:57, Yao, Jiewen wrote:
> Hi Laszlo
> Your analysis below is exactly what the code implemented.
> Now I believe you and me have different understanding on PI specification, 
> not the UDK implementation. :-)
> 
> 
> "Normally this would be a violation of the protocol, because the pointer I'm 
> passing to BootScript->Write() doesn't point to runtime memory or ACPI NVS."
> Per my understanding, the word in UEFI/PI specification is to limit the 
> caller. So caller need follow UEFI/PI specification to make sure call the 
> function correctly.
> I do not believe callee need to do any check in this case. It is caller's 
> responsibility.
> You may also find some examples in UEFI spec, such as TPL. If caller did 
> wrong thing, system may crash.
> 
> 
> "But the implementation should save the pointer that I pass in, not the 
> pointed-to data."
> Again, since PI spec does not define format, an implementation can choose to 
> save pointer or save data.
> Personally, I cannot draw to the conclusion that we must save pointer based 
> on current PI specification.

The PI spec I have (Version 1.2.1) says in Vol 5, 8.7.1,

EFI_BOOT_SCRIPT_INFORMATION_OPCODE

  Summary

    Store the pointer to the arbitrary information in the boot script
    table. [...]

> My personal understanding for PI specification is to focus on data.
> Because if PI specification just need save pointer, there is no need to pass 
> InfomrationLength. This argument is not needed.

The InformationLength field makes sense in this case because it
describes how many bytes you can read after dereferencing the stored
pointer. The pointer identifies the base of an array in AcpiNVS or
runtime memory, and the InformationLength field describes the size.

> Anyway, your suggest on "save pointer" is another possible implementation for 
> Boot Script. You may add it in your own package and use the new one in your 
> modules.
> That is possible, since UDK package supports library override.
> 
> 
> All in all, since there is different understanding on PI specification, if 
> you want, I suggest we could discuss this topic in PIWG meeting - where we 
> discuss the PI specification.

Thanks for looking into this! I don't have strong feelings either way. I
was just surprised because the first opcode I added to the table was "do
nothing just show me something".

The current implementation makes perfect sense of course (one could
argue it makes *more* sense, because the boot script becomes
self-contained). I just perceive it to be different from the Summary
quoted above.

Thanks!
Laszlo

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to