From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::231; helo=mail-wm0-x231.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 183A621A10972 for ; Mon, 27 Nov 2017 08:53:18 -0800 (PST) Received: by mail-wm0-x231.google.com with SMTP id n74so10766225wmi.3 for ; Mon, 27 Nov 2017 08:57:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=COYD5COQbd+l8RLAre5i18afKCy6kfvjwlD1peveo+Y=; b=DeHgnbl77/ODsaRZgN7SsQVZteuWXZ/C5gc2vr9Or/zpJ7QNmn4Gi7VsItc5oLASE0 S6PRHtyEYc98JVY9774y+cormi5i2WbL156dpC1i4ws/bBazrVDLY5tPXU2U+2GwgAB9 T9rrVHFa51aPnVPtzCqZxyQH4oLLv9TdzoKNA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=COYD5COQbd+l8RLAre5i18afKCy6kfvjwlD1peveo+Y=; b=nnwsZK5Xf3wI8iM4Hyox/A0BP6QyQz9VjOHW167Q1N3Vr2+sSbSexLEa/v6K0Mtqrt +EiCP4E2qhcQR/VizWrCZ01Av2OlGq41XQxForVFs9czhZ3eYInuaSHW0CbhrIEK7ni0 4Lqj+cj58t3Nzrh1QXYqkYAuRZPTZDlMrmFvfKEAxa7buvTywoj3pTHbKDC0xTNVerDw ye8JT8FNif1tLfUHH1cRRmK74DgCQ6UzCfb68QqMtpCDWUncq1hYJAnYN69CITpgMU8V OhxjeXbPm3pOG1yQZ9m8sVv/SOOncOuno/QsplLE89zzbxKqDIvidDktC2LNkRKKr80L n/gg== X-Gm-Message-State: AJaThX604Ag/INpt0uH6xQHDP6L9oRaycX40/KG+RCRd3o+g14vHDJGd 4JTutl6aCxUcYBxcusb6dE4RwQ== X-Google-Smtp-Source: AGs4zMbsqtICAVyx9UR4yEiwi3zUO87Oq0CS5sCjAlOVZUJoQKMGod/5VcuVhEiNLy9JcGR5Q3v1ug== X-Received: by 10.28.214.205 with SMTP id n196mr15434312wmg.10.1511801859179; Mon, 27 Nov 2017 08:57:39 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id g99sm46740301wrd.72.2017.11.27.08.57.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Nov 2017 08:57:38 -0800 (PST) Date: Mon, 27 Nov 2017 16:57:36 +0000 From: Leif Lindholm To: Laszlo Ersek Cc: kalyan-nagabhirava , edk2-devel@lists.01.org, ard.biesheuvel@linaro.org, mark.gregotski@linaro.org, Marcin Wojtas Message-ID: <20171127165736.drp63cy7vdxc2sak@bivouac.eciton.net> References: <20171121105336.26699-1-kalyankumar.nagabhirava@linaro.org> <20171126152206.yhb7gvofp4ne6f62@bivouac.eciton.net> MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH] [edk2-platforms]:Enabling Secure boot feature support on hikey platfrom X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2017 16:53:19 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 27, 2017 at 02:02:32PM +0100, Laszlo Ersek wrote: > On 11/26/17 16:22, Leif Lindholm wrote: > > (Adding Laszlo to cc based on a single comment I make below.) > > > > On Tue, Nov 21, 2017 at 04:23:36PM +0530, kalyan-nagabhirava wrote: > > >> [Guids.common] > >> gHiKeyTokenSpaceGuid = { 0x91148425, 0xcdd2, 0x4830, { 0x8b, 0xd0, 0xc6, 0x1c, 0x6d, 0xea, 0x36, 0x21 } } > >> + gHwTokenSpaceGuid = { 0x99999999, 0x74c5, 0x4043, { 0xb4, 0x17, 0xa3, 0x22, 0x38, 0x14, 0xce, 0x76 } } > > > > This very much looks like a not properly generated GUID. > > GUIDs must always be generated using an RFC4122-compliant algorithm. > > I generally recommend using > > https://www.guidgenerator.com/online-guid-generator.aspx. > > I just run "uuidgen" in a terminal window. Yeah, I just prefer pointing to someone that does not require installing anything, or requires specific operating systems. > >> +EFI_STATUS > >> +EFIAPI > >> +FvbSetAttributes( > >> + IN CONST EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL *This, > >> + IN OUT EFI_FVB_ATTRIBUTES_2 *Attributes > >> + ) > >> +{ > >> + DEBUG ((DEBUG_BLKIO, "FvbSetAttributes(0x%X) is not supported\n",*Attributes)); > >> + return EFI_UNSUPPORTED; > > > > As per my (very) recent comment to Marcin, I do not believe returning > > EFI_UNSUPPORTED is a valid thing to do here. Which to me suggests the > > implementation of FvbGetAttributes is also incorrect. > > > > Laszlo - what's your take on this in conjunction with PI 1.6 section > > 3.4.2? OvmfPkg does something very similar in > > EmuVariableFvbRuntimeDxe/Fvb.c. > > I guess you are right. The particular OvmfPkg code that you mention is > likely also spec-breaking. > > FWIW, in the OVMF flash driver that actually uses pflash, namely > > OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c > > the FvbSetVolumeAttributes() function appears both appropriate for the > spec and generic enough to copy elsewhere. Yes, that looks good, thanks! Marcin, Kalyan - please have a look at that implementation for inspiration. / Leif