From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: Passing Xen memory map and resource map to OVMF Date: Tue, 12 Nov 2013 14:22:51 -0500 Message-ID: <20131112192251.GC12345@phenom.dumpdata.com> References: <20131112183321.GN13369@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20131112183321.GN13369@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: edk2-devel@lists.sourceforge.net, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, Nov 12, 2013 at 06:33:21PM +0000, Wei Liu wrote: > Hi all > > Currently OVMF determines memory size by consulting CMOS, then it makes > up memory map of its own. > > Consulting memory size by reading CMOS limits the RAM size to 1TB as > there's only 3 bytes from 0x5b-0x5d in CMOS, where the upper memory size > is stored. > > And from Xen's point of view, OVMF should use the memory mapped passed > by hypervisor (from hvmloader) instead of making up its own. > > To solve the above two problems all in one go, I plan to pass necessary > information (io resource, mmio resource) to OVMF from Xen. I will > construct the table / structure in hvmloader then hook up platform pei > code when OVMF is running on Xen. /me nods. The nice thing about that is that it could also allow us to modify the E820 from the toolstack for any combination we want. For example if you use e820_host=1 in your PV guest the E820 will look like the host one. Great for PCI passthrough when you have some stubborn cards. > > The first thing that comes in mind is to reuse E820 table for memory map > plus some extra fields for io / mmio resources. But I guess UEFI is the > new world so stuffs like E820 from old world will be less popular. Any > suggestion on existing table / data structure I can use? I think the E820 is fine. After all the Linux kernel picks up the EFI memmap and then stuffs it in E820. And there are some patches that do this for HVM already: http://article.gmane.org/gmane.comp.emulators.xen.devel/170593 for which I was hoping could be reworked as needed. > > > Thanks > Wei. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel