Message ID | 20240823141542.1411594-2-mjt@tls.msk.ru (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,1/3] hw/x86: add a couple of comments explaining how the kernel image is parsed | expand |
diff --git a/hw/i386/x86-common.c b/hw/i386/x86-common.c index c0c66a0eb5..992ea1f25e 100644 --- a/hw/i386/x86-common.c +++ b/hw/i386/x86-common.c @@ -665,8 +665,11 @@ void x86_load_linux(X86MachineState *x86ms, exit(1); } - /* kernel protocol version */ - if (ldl_p(header + 0x202) == 0x53726448) { + /* + * kernel protocol version. + * Please see https://www.kernel.org/doc/Documentation/x86/boot.txt + */ + if (ldl_p(header + 0x202) == 0x53726448) /* Magic signature "HdrS" */ { protocol = lduw_p(header + 0x206); } else { /*