From patchwork Tue Feb 19 15:47:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cohen, Eugene" X-Patchwork-Id: 14988 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2441523F72 for ; Tue, 19 Feb 2013 15:48:19 +0000 (UTC) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by fiordland.canonical.com (Postfix) with ESMTP id AAC2CA199CE for ; Tue, 19 Feb 2013 15:48:18 +0000 (UTC) Received: by mail-ve0-f179.google.com with SMTP id da11so5815254veb.24 for ; Tue, 19 Feb 2013 07:48:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:subject:thread-topic:thread-index:date :message-id:references:in-reply-to:accept-language:content-language :x-ms-has-attach:x-ms-tnef-correlator:x-originating-ip:content-type :content-transfer-encoding:mime-version:x-gm-message-state; bh=+H6s6SRJ4JESaY8sfa7/QgwJc2nMWbBC121eOdde+0M=; b=S/Hh8rJvxTahtoQ2nOeXjtrtS9QSPC6c7StbFyKNpFulhsv/o+n2I622sxCSvTPDC1 zZLzo8iGW2lucDNR9Skc1pteAJqMKsfxoRmP3CyJZSqCyCw6PyNsJLphKRrVj9KYrDeA 4T/qmlzeS96zDCtrIMsSEICJMO3WxQSSRWV6Kk6zLkozaaZkRu1zzjS1qRzIwuOTs8Cz WjM++VtcBYcJ6VtsajC1a/BP/5e10Rgrqbf5qeKdVT0eIBIh159bb1zUvYisrQFYAwyb sr8dJwOsKBetqqJgvyCKwbf7jElyrujBdBZx2KwYDvx1lJnv3TzMnt99NOZoruDCRQWX hoNQ== X-Received: by 10.220.149.82 with SMTP id s18mr21300852vcv.14.1361288898214; Tue, 19 Feb 2013 07:48:18 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp148686veb; Tue, 19 Feb 2013 07:48:17 -0800 (PST) X-Received: by 10.66.85.161 with SMTP id i1mr46351153paz.67.1361288896336; Tue, 19 Feb 2013 07:48:16 -0800 (PST) Received: from g4t0014.houston.hp.com (g4t0014.houston.hp.com. [15.201.24.17]) by mx.google.com with ESMTPS id t10si24473357pay.99.2013.02.19.07.48.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 19 Feb 2013 07:48:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of eugene@hp.com designates 15.201.24.17 as permitted sender) client-ip=15.201.24.17; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of eugene@hp.com designates 15.201.24.17 as permitted sender) smtp.mail=eugene@hp.com Received: from G9W0364.americas.hpqcorp.net (g9w0364.houston.hp.com [16.216.193.45]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by g4t0014.houston.hp.com (Postfix) with ESMTPS id 8E7AF2410F; Tue, 19 Feb 2013 15:48:14 +0000 (UTC) Received: from G4W6304.americas.hpqcorp.net (16.210.26.229) by G9W0364.americas.hpqcorp.net (16.216.193.45) with Microsoft SMTP Server (TLS) id 14.2.328.9; Tue, 19 Feb 2013 15:47:26 +0000 Received: from G4W3295.americas.hpqcorp.net ([169.254.3.77]) by G4W6304.americas.hpqcorp.net ([16.210.26.229]) with mapi id 14.02.0328.009; Tue, 19 Feb 2013 15:47:26 +0000 From: "Cohen, Eugene" To: Ryan Harkin , "boot-architecture@lists.linaro.org" , "patches@linaro.org" , "linaro-enterprise@lists.linaro.org" , "olivier.martin@arm.com" Subject: RE: [PATCH] MdeModulePkg/PartitionDxe: hack MBR unique signature to zero Thread-Topic: [PATCH] MdeModulePkg/PartitionDxe: hack MBR unique signature to zero Thread-Index: AQHODpoJs8f56IwsOUagLKTksE9KUJiBU3xA Date: Tue, 19 Feb 2013 15:47:25 +0000 Message-ID: References: <1361275768-21616-1-git-send-email-ryan.harkin@linaro.org> In-Reply-To: <1361275768-21616-1-git-send-email-ryan.harkin@linaro.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [15.201.58.24] MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlT8sFILSBtqOUNi1pyB2yf8zsRS1v+8XFjV+DwTcyyqF8/IKzu8OP307IfV2KpEWp0XA9Q Ryan, I'm uncomfortable with this hack and its side effects -- if you want to ensure that the boot process will boot any device path regardless of the MBR signature this can be handled as a modification to the device path matching logic in BDS. This could be a platform policy PCD boolean like 'BootIgnoreMbrSignature' or something. Also you mentioned about changes going upstream -- are the details of the upstreaming process from uefi.next to edk2 svn documented somewhere? Are you ensuring that all upstreamed patches come from parties that have signed the Contributor's Agreement? Thanks, Eugene -----Original Message----- From: boot-architecture-bounces@lists.linaro.org [mailto:boot-architecture-bounces@lists.linaro.org] On Behalf Of Ryan Harkin Sent: Tuesday, February 19, 2013 5:09 AM To: ryan.harkin@linaro.org; boot-architecture@lists.linaro.org; patches@linaro.org; linaro-enterprise@lists.linaro.org; olivier.martin@arm.com Subject: [PATCH] MdeModulePkg/PartitionDxe: hack MBR unique signature to zero This is a hack and is not intended to go upstream, but will be useful for Linaro's short term goals. Linaro's development boards use SD cards, currently we have a problem where each unique SD card has a different UUID when created with linaro-media-create / linaro-android-media create. This means that no one Boot Device configuration can boot Linaro images without some manual intervention from the user. This hack will zero the signature (UUID) read from the card meaning that all SD cards will appear to be the same card. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ryan Harkin --- MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 1.7.9.5 diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c index 4c64663..ef16396 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c @@ -155,6 +155,15 @@ PartitionInstallMbrChildHandles ( BlockSize, Mbr ); + + // RMH - hack - Linaro's development boards use SD cards, currently + we have // a problem where each unique SD card has a different UUID + when created // with linaro-media-create / linaro-android-media create. + // This means that no one Boot Device configuration can boot Linaro + images // without some manual intervention from the user. + // This hack will zero the signature (UUID) read from the card. + ZeroMem(&(Mbr->UniqueMbrSignature[0]), sizeof + (Mbr->UniqueMbrSignature)); + if (EFI_ERROR (Status)) { Found = Status; goto Done;