On 11/23/18 09:35, Ard Biesheuvel wrote:
> On Thu, 22 Nov 2018 at 19:35, Laszlo Ersek <[email protected]> wrote:

>> [...]

> Indeed. I am updating the second patch to get rid of everything in
> BdsLib we are not currently using.

Thanks!

> Looking at 56bed2f41022afcbadecc9f2d537bd31c3d44cbc ("^W never mind
> ...

heh :)

> the intent appears to be that device path struct members do appear
> naturally aligned, even if the size of the data structure is not a
> multiple of the max alignment we expect to encounter.
>
> Presumably, this is why CoreConnectController () does the same in this
> regard.

Yeah, that's certainly for working around bugs elsewhere in the
firmware. The UEFI spec 2.7 says in "10.3.1 Generic Device Path
Structures":

    A Device Path is a series of generic Device Path nodes. The first
    Device Path node starts at byte offset zero of the Device Path. The
    next Device Path node starts at the end of the previous Device Path
    node. Therefore all nodes are byte-packed data structures that may
    appear on any byte boundary. *All code references to device path
    notes must assume all fields are unaligned.*

(Emphasis mine. And yes, the exact sentence that I'm quoting this
section for contains a typo, s/notes/nodes/.)

[...]

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to