From e839a572b6461ddc309d3842bdb32fc04afae8b4 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Wed, 6 Mar 2013 13:00:23 -0500 Subject: [PATCH] --- yaml --- r: 360939 b: refs/heads/master c: 3c4aff6b9a183b4f24eb7b8dd6c8a92cdba3bc75 h: refs/heads/master i: 360937: 458069e2db56d54d481631a074cd2fab43f208c4 360935: e28c27e82238b00a2228c93ce156a9ed4758f5ad v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/bootparam_utils.h | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 750e27d34d1b..a009d6a38d74 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2e604c0f19dcdd433b3863ffc3da9bc0787ca765 +refs/heads/master: 3c4aff6b9a183b4f24eb7b8dd6c8a92cdba3bc75 diff --git a/trunk/arch/x86/include/asm/bootparam_utils.h b/trunk/arch/x86/include/asm/bootparam_utils.h index ff808ef4fdb4..653668d140f9 100644 --- a/trunk/arch/x86/include/asm/bootparam_utils.h +++ b/trunk/arch/x86/include/asm/bootparam_utils.h @@ -19,8 +19,22 @@ */ static void sanitize_boot_params(struct boot_params *boot_params) { + /* + * IMPORTANT NOTE TO BOOTLOADER AUTHORS: do not simply clear + * this field. The purpose of this field is to guarantee + * compliance with the x86 boot spec located in + * Documentation/x86/boot.txt . That spec says that the + * *whole* structure should be cleared, after which only the + * portion defined by struct setup_header (boot_params->hdr) + * should be copied in. + * + * If you're having an issue because the sentinel is set, you + * need to change the whole structure to be cleared, not this + * (or any other) individual field, or you will soon have + * problems again. + */ if (boot_params->sentinel) { - /*fields in boot_params are not valid, clear them */ + /* fields in boot_params are left uninitialized, clear them */ memset(&boot_params->olpc_ofw_header, 0, (char *)&boot_params->efi_info - (char *)&boot_params->olpc_ofw_header);