From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=147.11.146.13; helo=mail1.windriver.com; envelope-from=bill.paul@windriver.com; receiver=edk2-devel@lists.01.org Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4CDAB203BBBB5 for ; Mon, 14 May 2018 18:15:23 -0700 (PDT) Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id w4F1FMNa028479 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 14 May 2018 18:15:22 -0700 (PDT) Received: from ala-wpaul-lx1.wrs.com (147.11.157.242) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 14 May 2018 18:15:21 -0700 From: Bill Paul Organization: Wind River Systems To: Date: Mon, 14 May 2018 18:12:37 -0700 User-Agent: KMail/1.13.5 (Linux/2.6.32-28-generic; KDE/4.4.5; x86_64; ; ) CC: "Prakhya, Sai Praneeth" , "Neri, Ricardo" References: In-Reply-To: MIME-Version: 1.0 Message-ID: <201805141812.37378.wpaul@windriver.com> Subject: Re: Query regarding hole in EFI Memory Map X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 01:15:23 -0000 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Of all the gin joints in all the towns in all the world, Prakhya, Sai Praneeth had to walk into mine at 16:30 on Monday 14 May 2018 and say: > Hi All, > > Recently, I have observed that there was a hole in EFI Memory Map passed by > firmware to Linux kernel. So, wanted to check with you if this is expected > or not. > > My Test setup: > I usually boot qemu with OVMF and Linux kernel. I use below command to boot > kernel. "qemu-system-x86_64 -cpu host -hda -serial stdio > -bios -m 2G -enable-kvm -smp 2" > > I have noticed that the EFI Memory Map (printed by kernel) is almost > contiguous but with only one hole ranging from 0xA0000 to 0x100000. As far > as I know, kernel hasn't modified this EFI Memory Map, so I am assuming > that firmware has passed memory map with a hole. I have looked at UEFI > spec "GetMemoryMap()" definition, and it says "The map describes all of > memory, no matter how it is being used". So, I am thinking that EFI Memory > Map shouldn't have any holes, am I correct? If not, could someone please > explain me the reason for this hole in EFI Memory Map. The map may describe all of physical RAM, however it is not necessarily the case that all available RAM be physically contiguous. With older IBM PCs based on the Intel 8088 processor, you could only have a 1MB address space. The first 640KB was available for RAM. The remaining space traditionally contained memory-mapped option ROMs, particularly for things like the video BIOS routines. The VGA text screen was also mapped to 0xB8000. Obviously, later processors made it possible to have additional memory above 1MB (sometimes called "high memory"), but for backward compatibility purposes, the gap from 0xA0000 to 0xFFFFF remained. So basically, on Intel machines you will always see this gap in RAM due to "hysterical raisins." It's just an artifact of the platform design. (And for that reason you'll see it both with the UEFI memory map facility and the legacy E820 BIOS facility). -Bill > > > Please let me know if you want me to post the EFI Memory Map or E820 map > that I am looking at. > > Note: I have also observed the same hole in E820 map. > > > > Regards, > > Sai > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel -- ============================================================================= -Bill Paul (510) 749-2329 | Senior Member of Technical Staff, wpaul@windriver.com | Master of Unix-Fu - Wind River Systems ============================================================================= "I put a dollar in a change machine. Nothing changed." - George Carlin =============================================================================