Kouya Shimura
2009-Jan-22 11:12 UTC
[Xen-devel] [PATCH] hvm bios: add PMM (a memory manager during POST)
The PMM (POST Memory Manager) offers malloc/free functionality for PCI option ROMs during POST (Power On Self Test). This patch adds a PMM functionality to the guest BIOS. For example, the option ROM on LSI Logic SAS card uses PMM and failed to initialize the device without PMM. Thus, the HVM can''t boot up directly from the passthroughed SCSI disk. gPXE also uses PMM (I don''t know what happens without PMM). With this patch, we succeeded in SAS boot of HVM. For further information about PMM: http://www.phoenix.com/en/OEM-ODM/Customer+Services/White+Papers-Specs/PC+Industry+Specifications.htm http://www.phoenix.com/NR/rdonlyres/873A00CF-33AC-4775-B77E-08E7B9754993/0/specspmm101.pdf Thanks, Kouya Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Jan-22 11:38 UTC
Re: [Xen-devel] [PATCH] hvm bios: add PMM (a memory manager during POST)
On 22/01/2009 11:12, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote:> The PMM (POST Memory Manager) offers malloc/free functionality > for PCI option ROMs during POST (Power On Self Test). > > This patch adds a PMM functionality to the guest BIOS.Hardcoding the entry point and setting up $PMM in hvmloader is not very nice. I think you should define the $PMM struct as data in rombios.c, and then you can directly reference pmm_entry_point without needing a .org directive. The only difficulty then is the checksum, which I think you should calculate in rombios.c rather than doing it in hvmloader. It''s a tiny bit of C or pretty trivial asm to do it that way. Overall this avoids further tying together hvmloader and rombios unnecessarily. Beyond that, the allocator looks pretty complicated, but as long as it works I suppose that is fine. It would be nice if you could add a top-of-file comment explaining the allocator algorithm, where it allocates memory from (scavenging from rombios''s e820 perhaps), and other details like that. Otherwise it''s rather unnecessarily opaque new code. A few more comments scattered through (especially at tops of functions) would be nice too! -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Kouya Shimura
2009-Jan-23 10:23 UTC
Re: [Xen-devel] [PATCH] hvm bios: add PMM (a memory manager during POST)
Hi Keir, Thanks for your review. Here is an updated patch using new 32-bit gateway interface. Thanks, Kouya Keir Fraser writes:> On 22/01/2009 11:12, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote: > > > The PMM (POST Memory Manager) offers malloc/free functionality > > for PCI option ROMs during POST (Power On Self Test). > > > > This patch adds a PMM functionality to the guest BIOS. > > Hardcoding the entry point and setting up $PMM in hvmloader is not very > nice. I think you should define the $PMM struct as data in rombios.c, and > then you can directly reference pmm_entry_point without needing a .org > directive. The only difficulty then is the checksum, which I think you > should calculate in rombios.c rather than doing it in hvmloader. It''s a tiny > bit of C or pretty trivial asm to do it that way. Overall this avoids > further tying together hvmloader and rombios unnecessarily. > > Beyond that, the allocator looks pretty complicated, but as long as it works > I suppose that is fine. It would be nice if you could add a top-of-file > comment explaining the allocator algorithm, where it allocates memory from > (scavenging from rombios''s e820 perhaps), and other details like that. > Otherwise it''s rather unnecessarily opaque new code. A few more comments > scattered through (especially at tops of functions) would be nice too!Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Jan-23 10:33 UTC
Re: [Xen-devel] [PATCH] hvm bios: add PMM (a memory manager during POST)
On 23/01/2009 10:23, "Kouya Shimura" <kouya@jp.fujitsu.com> wrote:> Thanks for your review. > Here is an updated patch using new 32-bit gateway interface.That looks great. Thanks Kouya! -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel