• Daniel Drake's avatar
    x86: Don't clear olpc_ofw_header when sentinel is detected · d55e37bb
    Daniel Drake authored
    OpenFirmware wasn't quite following the protocol described in boot.txt
    and the kernel has detected this through use of the sentinel value
    in boot_params. OFW does zero out almost all of the stuff that it should
    do, but not the sentinel.
    
    This causes the kernel to clear olpc_ofw_header, which breaks x86 OLPC
    support.
    
    OpenFirmware has now been fixed. However, it would be nice if we could
    maintain Linux compatibility with old firmware versions. To do that, we just
    have to avoid zeroing out olpc_ofw_header.
    
    OFW does not write to any other parts of the header that are being zapped
    by the sentinel-detection code, and all users of olpc_ofw_header are
    somewhat protected through checking for the OLPC_OFW_SIG magic value
    before using it. So this should not cause any problems for anyone.
    Signed-off-by: default avatarDaniel Drake <dsd@laptop.org>
    Link: http://lkml.kernel.org/r/20130809221420.618E6FAB03@dev.laptop.orgAcked-by: default avatarYinghai Lu <yinghai@kernel.org>
    Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
    Cc: <stable@vger.kernel.org> # v3.9+
    d55e37bb
bootparam_utils.h 1.95 KB