From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=104.47.0.84; helo=eur01-he1-obe.outbound.protection.outlook.com; envelope-from=evan.lloyd@arm.com; receiver=edk2-devel@lists.01.org Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0084.outbound.protection.outlook.com [104.47.0.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1F5D22252CBB0 for ; Thu, 22 Mar 2018 08:13:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=55yPs82NCfI5Yq1MGzBlf/Myu9GnZF6nc1o2IXdmvT4=; b=MUzq8hec7V86b8CY6oO4dwUSzRAQgSAiskma2sE1R31mWPShZ9f62j+h9xogq85Ht8ab+tFy30oCme2wMSXc0CZjV9fIwuN0ReqVxX0tVqzvJsj1Jn3SxxmbuLxSUHS1X62b5Cv3vt+swQihnwZFDzHEjjAqQg11JM7Fc3Xmu/w= Received: from HE1PR0801MB1771.eurprd08.prod.outlook.com (10.168.150.14) by HE1PR0801MB1546.eurprd08.prod.outlook.com (10.167.190.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Thu, 22 Mar 2018 15:20:09 +0000 Received: from HE1PR0801MB1771.eurprd08.prod.outlook.com ([fe80::69cc:3ecf:9c8c:f5a3]) by HE1PR0801MB1771.eurprd08.prod.outlook.com ([fe80::69cc:3ecf:9c8c:f5a3%17]) with mapi id 15.20.0588.017; Thu, 22 Mar 2018 15:20:09 +0000 From: Evan Lloyd To: Ard Biesheuvel , Girish Pathak CC: nd , "edk2-devel@lists.01.org" , "Leif Lindholm" , Stephanie Hughes-Fitt , Arvind Chauhan Thread-Topic: [edk2] [PATCH edk2-platforms v3 12/17] ARM/VExpressPkg: Allocate framebuffer using EfiRuntimeServicesData Thread-Index: AQHTwQTrRpgaSt2xTEir5Frckld5M6PbAkGAgAEhuxA= Date: Thu, 22 Mar 2018 15:20:09 +0000 Message-ID: References: <20180320161823.54020-1-girish.pathak@arm.com> <20180320161823.54020-13-girish.pathak@arm.com> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Evan.Lloyd@arm.com; x-originating-ip: [217.140.96.140] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0801MB1546; 7:Zu4li77Txo+Zn6RJ/krW2UdJHgUFHDSaNLYhtAzcXLehO+cXCoRiLYFEDTMQVUnFCsWPk3NxXtDoz68fu9lgEYAkJBWGauSdjPZsNh442W9Bz1Cw1C7vk3wNRhhhZ4sCZ+hNW/ToYFQeAmYQ0P2/wo9411Dz303uxySxLVI3d6QEBrvygQbFI3iiED41rHDbtWTvVKR0PH2AezeWY+WU2Xl0EPYZRhW/BA5b7rvVudmMJWujcKRw8zB8Fk/Y6yXN x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1c99fc20-b54d-4cba-0317-08d590086654 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0801MB1546; x-ms-traffictypediagnostic: HE1PR0801MB1546: nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917)(162533806227266); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR0801MB1546; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1546; x-forefront-prvs: 0619D53754 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39860400002)(346002)(396003)(39380400002)(376002)(199004)(13464003)(189003)(25786009)(53546011)(97736004)(74316002)(81166006)(229853002)(81156014)(7736002)(6506007)(305945005)(72206003)(966005)(478600001)(105586002)(106356001)(110136005)(2906002)(54906003)(76176011)(3660700001)(86362001)(316002)(8936002)(59450400001)(6116002)(3846002)(3280700002)(99286004)(8676002)(11346002)(26005)(6636002)(66066001)(102836004)(5660300001)(93886005)(4326008)(7696005)(2950100002)(14454004)(5250100002)(186003)(68736007)(6246003)(9686003)(53936002)(33656002)(55016002)(2900100001)(6306002)(6436002)(446003); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0801MB1546; H:HE1PR0801MB1771.eurprd08.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 1xP6VeHCfbyKGKVVhlbnO7gXx61NtIqYUE3+/adxvdbitMktLk00hvJzF3yJnhOeaYPbqtuqQkvUJCBTx33eWDBxJHuTCk3tbZtKsU0RJR79AMtrEEm2SQqirYrnR78oU4VVnATd0p9vANvMtWY6sh5UmHUCkQKerie4Wlcwdpajnc94YzY0NAkJlcBoTRAR7fmQSuhyBEEYhYPHj5VUKaGQRhcMl4EswdRBr+J7VMFJ7eKEeVcS8J1xpfToeB0aP4N5g077PvUZBNdX1LJZ34ej41Lyc53simAmonuXcgq5ruN+Y0ZE6n6EHot/AZACcLWIQrz4C0vE29JBDU7TUg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c99fc20-b54d-4cba-0317-08d590086654 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Mar 2018 15:20:09.2150 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1546 Subject: Re: [PATCH edk2-platforms v3 12/17] ARM/VExpressPkg: Allocate framebuffer using EfiRuntimeServicesData X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 15:13:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Ard. > -----Original Message----- > From: edk2-devel On Behalf Of Ard > Biesheuvel > Sent: 21 March 2018 18:27 > To: Girish Pathak > Cc: nd ; edk2-devel@lists.01.org; Leif Lindholm > ; Stephanie Hughes-Fitt Fitt@arm.com>; Arvind Chauhan > Subject: Re: [edk2] [PATCH edk2-platforms v3 12/17] ARM/VExpressPkg: > Allocate framebuffer using EfiRuntimeServicesData >=20 > On 21 March 2018 at 19:07, Girish Pathak > wrote: > > > > > >> -----Original Message----- > >> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] > >> Sent: 21 March 2018 03:38 > >> To: Girish Pathak > >> Cc: edk2-devel@lists.01.org; Leif Lindholm > >> ; Matteo Carlini ; > >> Stephanie Hughes-Fitt ; nd > >> ; Arvind Chauhan ; Daniil > Egranov > >> ; Thomas Abraham > > >> Subject: Re: [PATCH edk2-platforms v3 12/17] ARM/VExpressPkg: > >> Allocate framebuffer using EfiRuntimeServicesData > >> > >> On 21 March 2018 at 00:18, Girish Pathak > wrote: > >> > As per the UEFI specification(2.7) section 12.9, the GOP > >> > framebuffer memory can be accessed in the pre-boot and the post > >> > boot phase (by OS) Therefore the memory type EfiBootServicesData is > >> > incorrect for the framebuffer memory allocation. Change > >> > EfiBootServicesData with EfiRuntimeServicesData flag so that > >> > allocated memory can be access by the OS in the post boot phase. > >> > > >> > >> EfiRuntimeServicesData is intended for allocations that the EFI > >> runtime services need to access themselves at runtime, and will hence > >> be virtually remapped by SetVirtualAddressMap(). > >> > >> This does not apply to the framebuffer. Even if it may be used at OS > >> runtime, the firmware itself will never access it, so > >> EfiRuntimeServicesData is not appropriate > >> > >> Please use EfiReservedMemory instead. > > > > Specification (UEFI Spec 2_7_A Sept 6.pdf) describes > > EfiReservedMemoryType as Not usable before and after ExitBootServices, > See Table 28 & 29 Hence EfiReservedMemoryType is not suitable in this > case. Agree? > > >=20 > It is not usable as ordinary memory, given that you turn it into 'special= ' > memory (with side effects) by turning it into a framebuffer. >=20 > So EfiReservedMemory is perfectly appropriate here. [[Evan Lloyd]] First, I agree EfiReservedMemory is probably the sensible op= tion. The only alternative would be EfiMemoryMappedIO, and that, as you ha= ve pointed out in the past, introduces alignment requirements. If you are = happy to accept it, I'll ask Girish to go with that. However, Girish has a= point, if only that the UEFI spec need more clarity on this, especially as= https://lists.01.org/pipermail/edk2-devel/2017-February/007494.html pretty= much confirms it is the right way to go. In particular, the bald statemen= t "EfiReservedMemoryType Not usable.", seems unfortunate. Regards, Evan > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel