Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754756AbbG3HyQ (ORCPT ); Thu, 30 Jul 2015 03:54:16 -0400 Received: from terminus.zytor.com ([198.137.202.10]:41099 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866AbbG3HyP (ORCPT ); Thu, 30 Jul 2015 03:54:15 -0400 Message-ID: <55B9D806.7030705@zytor.com> Date: Thu, 30 Jul 2015 00:53:42 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Lee, Chun-Yi" , Matt Fleming CC: Thomas Gleixner , Borislav Petkov , Ingo Molnar , x86@kernel.org, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, "Lee, Chun-Yi" Subject: Re: [PATCH] x86_64/efi: Mapping Boot and Runtime EFI memory regions to different starting virtual address References: <1438230757-30840-1-git-send-email-jlee@suse.com> In-Reply-To: <1438230757-30840-1-git-send-email-jlee@suse.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1932 Lines: 44 On 07/29/2015 09:32 PM, Lee, Chun-Yi wrote: > When testing hibernate, I found the EFI runtime services was broken > on some old EFI machines on my hand, Intel DQ57TM development board > and Acer Gateway Z5WT2 notebook. > > After printing the EFI memmap and virtual address mapping on -4G area, > found those issue machines keep the physical address of Runtime > Data/Code regions unchanged but not Boot Data/Code. The logs were > attached on openSUSE bug: > https://bugzilla.suse.com/show_bug.cgi?id=939979 > > Due to Boot Data/Code can be used by OS as available memory regions, > so those old EFI BIOS do not keep the physical address of Boot regions > unchanged. But, address of Runtime regions are the same. > > On Intel DQ57TM, sometimes the order of EFI Boot regions changed. On > Acer Gateway Z5WT2, the amount of EFI Boot regions changed. > > The above changing of EFI Boot regions causes the EFI Runtime Data/Code > may not mapping to constant virtual address, that's because the EFI Boot > and Runtime regions are interleaved and EFI va mapping applied PMD > 2M-aligned logic. > > A workaround of this situation is mapping Boot and Runtime regions to > different starting virtual address. Then the changing of Boot Data/Code > regions will not affect to the virtual address mapping to Runtime > Data/Code. > > This patch adds codes for mapping Boot Data/Code regions start from > 0xffff_ffff_0000_0000, has 1G space. And mapping Runtime Data/Code > regions start from 0xffff_fffe_c000_0000 that has 63G space. > This changelog is at least partially incomprehensive. It also seems more than a bit aggressive to expect that 1 GB will be sufficient forever. -hpa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/