[libc] Use __einfo() tuple as first argument to EUNIQ()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[libc] Redefine low 8 bits of error code as "platform error code"

The low 8 bits of an iPXE error code are currently defined as the
closest equivalent PXE error code.  Generalise this scheme to
platforms other than PC-BIOS by extending this definition to "closest
equivalent platform error code".  This allows for the possibility of
returning meaningful errors via EFI APIs.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[efi] Perform meaningful error code conversions

Exploit the redefinition of iPXE error codes to include a "platform
error code" to allow for meaningful conversion of EFI_STATUS values to
iPXE errors and vice versa.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[efi] Add sample platform-generated error disambiguations

Add disambiguated errors for LoadImage() and StartImage(), primarily
to demonstrate how to use __einfo_uniqify() and __einfo_platformify()
in the context of EFI platform errors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
[netdevice] Use link-layer address as part of RNG seed

iPXE currently seeds the random number generator using the system
timer tick count.  When large numbers of machines are booted
simultaneously, multiple machines may end up choosing the same DHCP
transaction ID (XID) value; this can cause problems.

Fix by using the least significant (and hence most variable) bits of
each network device's link-layer address to perturb the random number
generator.  This introduces some per-machine unique data into the
random number generator's seed, and so reduces the chances of DHCP XID
collisions.

This does not affect the ANS X9.82-compatible random bit generator
used by TLS and other cryptography code, which uses an entirely
separate source of entropy.

Originally-implemented-by: Bernhard Kohl <bernhard.kohl@nsn.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Merge branch 'master' into osimages