From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Rutland Subject: Re: [PATCH 08/13] Xen: EFI: Parse DT parameters for Xen specific UEFI Date: Tue, 17 Nov 2015 11:37:01 +0000 Message-ID: <20151117113701.GE12586__47857.3893233717$1447760319$gmane$org@leverpostej> References: <1447754231-7772-1-git-send-email-shannon.zhao@linaro.org> <1447754231-7772-9-git-send-email-shannon.zhao@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ard Biesheuvel Cc: "devicetree@vger.kernel.org" , Hangaohuai , "linux-efi@vger.kernel.org" , Ian Campbell , Catalin Marinas , Will Deacon , Christoffer Dall , "xen-devel@lists.xen.org" , Julien Grall , Stefano Stabellini , Shannon Zhao , Shannon Zhao , "Huangpeng (Peter)" , "linux-arm-kernel@lists.infradead.org" List-Id: xen-devel@lists.xenproject.org On Tue, Nov 17, 2015 at 12:25:58PM +0100, Ard Biesheuvel wrote: > On 17 November 2015 at 10:57, wrote: > > From: Shannon Zhao > > > > Add a new function to parse DT parameters for Xen specific UEFI just > > like the way for normal UEFI. Then it could reuse the existing codes. > > > > Signed-off-by: Shannon Zhao > > --- > > drivers/firmware/efi/efi.c | 67 ++++++++++++++++++++++++++++++++++++++++++---- > > 1 file changed, 62 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c > > index d6144e3..629bd06 100644 > > --- a/drivers/firmware/efi/efi.c > > +++ b/drivers/firmware/efi/efi.c > > @@ -24,6 +24,7 @@ > > #include > > #include > > #include > > +#include > > > > struct efi __read_mostly efi = { > > .mps = EFI_INVALID_TABLE_ADDR, > > @@ -488,12 +489,60 @@ static __initdata struct { > > UEFI_PARAM("MemMap Desc. Version", "linux,uefi-mmap-desc-ver", desc_ver) > > }; > > > > +static __initdata struct { > > + const char name[32]; > > + const char propname[32]; > > + int offset; > > + int size; > > +} xen_dt_params[] = { > > + UEFI_PARAM("System Table", "xen,uefi-system-table", system_table), > > + UEFI_PARAM("MemMap Address", "xen,uefi-mmap-start", mmap), > > + UEFI_PARAM("MemMap Size", "xen,uefi-mmap-size", mmap_size), > > + UEFI_PARAM("MemMap Desc. Size", "xen,uefi-mmap-desc-size", desc_size), > > + UEFI_PARAM("MemMap Desc. Version", "xen,uefi-mmap-desc-ver", desc_ver) > > +}; > > + > > We discussed (and agreed afair) that dropping the "linux," prefix from > the DT properties was an acceptable change. If we do that, and reuse > the same names in the xen version (i.e., drop the "xen," prefix), we > could make this change a *lot* simpler. Regardless of if we drop the "linux," prefix from the existing strings, I think we need the "xen," prefix here. The xen EFI interface comes with additional caveats, and we need to treat it separately. Unless you're suggesting that /hypervisor/uefi-* is handled differently to /chosen/uefi-*? I think I'd still prefer the "xen," prefix regardless. Thanks, Mark.