danderson / netboot

Packages and utilities for network booting
Apache License 2.0
1.48k stars 181 forks source link

fix architecture types 7 and 9 #101

Closed realtime-neil closed 4 years ago

realtime-neil commented 4 years ago

As of the writing of this document, the following pre-boot architecture types have been requested.

Type Architecture Name


0 Intel x86PC 1 NEC/PC98 2 EFI Itanium 3 DEC Alpha 4 Arc x86 5 Intel Lean Client 6 EFI IA32 7 EFI BC 8 EFI Xscale 9 EFI x86-64

-- https://tools.ietf.org/html/rfc4578#section-2.1

danderson commented 4 years ago

So, funny you should say that... I submitted an errata for that RFC, which swaps those two values :) https://www.rfc-editor.org/errata_search.php?rfc=4578

Have you hit a system where the code as-is fails? Unfortunately, due to this mixup, I was worried that I would forever be forced to guess what 7 and 9 actually mean, depending on which RFC or piece of code a firmware implementor looked at...

realtime-neil commented 4 years ago

I've found no such firmware, much less any bug therein. I found it in the code, and the erroneous RFC you reference was the first one I found. Sorry about that.

danderson commented 4 years ago

Phew, okay. I based the errata submission on the code in Intel's TianoCore UEFI implementation, which is what ~every x86 system uses as a base. It's unfortunate that there is this mismatch all over the place, but I think the way it works right now is empirically correct. If you find counter-examples, I'm more than happy to revisit and see what we can do to make things work.