From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753771AbcHQHCC (ORCPT ); Wed, 17 Aug 2016 03:02:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51858 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753609AbcHQHCB (ORCPT ); Wed, 17 Aug 2016 03:02:01 -0400 Date: Wed, 17 Aug 2016 15:01:51 +0800 From: Dave Young To: Alex Thorlton Cc: Borislav Petkov , Matt Fleming , linux-kernel@vger.kernel.org, Russ Anderson , Dimitri Sivanich , Mike Travis , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-efi@vger.kernel.org Subject: Re: [PATCH] Map in physical addresses in efi_map_region_fixed Message-ID: <20160817070151.GC5498@dhcp-128-65.nay.redhat.com> References: <1470441575-96065-1-git-send-email-athorlton@sgi.com> <20160815124258.GF30909@codeblueprint.co.uk> <20160815150709.GA6085@nazgul.tnic> <20160815184731.GS214806@stormcage.americas.sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160815184731.GS214806@stormcage.americas.sgi.com> User-Agent: Mutt/1.6.2 (2016-07-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 17 Aug 2016 07:02:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Why do you guys need the physical mapping all of a sudden? > > It's not that we need it all of the sudden, necessarily, it's just that > we've had to make other changes to make things work with the new, > (almost) completely isolated, EFI page tables. We ended up choosing the > lesser of two evils, and have decided to temporarily rely on the > physical address of our runtime code, instead of continuing to rely on > EFI_OLD_MEMMAP. In efi_map_region, there is already mapped md->phys_addr for broken firmware. SGI still need EFI_OLD_MEMMAP? I means in 1st kernel instead of kexec kernel. void __init efi_map_region(efi_memory_desc_t *md) { unsigned long size = md->num_pages << PAGE_SHIFT; u64 pa = md->phys_addr; if (efi_enabled(EFI_OLD_MEMMAP)) return old_map_region(md); /* * Make sure the 1:1 mappings are present as a catch-all for * b0rked * firmware which doesn't update all internal pointers after * switching * to virtual mode and would otherwise crap on us. */ __map_region(md, md->phys_addr); [snip] Thanks Dave