On Sun, Nov 24, 2013 at 06:01:03PM -0800, Jordan Justen wrote:
[...]
> > mXenInfo.HyperPages = AllocatePages (TransferPages);
> > @@ -72,6 +78,31 @@ XenConnect (
> > /* TBD: Locate hvm_info and reserve it away. */
> > mXenInfo.HvmInfo = NULL;
> >
> > + if (!AsciiStrCmp ((CHAR8 *) Info->Signature, "XenHVMOVMF")) {
>
> Would AsciiStrnCmp be a good idea here? Like I mentioned in the other
> patch, we normally use an integer based signature.
>
I think it is sufficient. We would like to keep the use that structure
to pass information. That structure is Xen => OVMF only and consumed
internally by OVMF.
> > + EFI_E820_ENTRY *E820Map;
> > + UINTN Loop, EntryCount, Base;
> > +
> > + /* E820 map */
> > + EntryCount = Info->E820Nr;
> > + Base = Info->E820;
> > +
> > + E820Map = AllocateZeroPool (sizeof(EFI_E820_ENTRY) * EntryCount);
> > +
> > + if (!E820Map) {
> > + FreePages (mXenInfo.HyperPages, TransferPages);
> > + return EFI_OUT_OF_RESOURCES;
> > + }
> > +
> > + for (Loop = 0; Loop < EntryCount; Loop++) {
> > + EFI_E820_ENTRY *src = (EFI_E820_ENTRY *)Base + Loop;
> > + EFI_E820_ENTRY *dst = (EFI_E820_ENTRY *)E820Map + Loop;
> > + CopyMem (dst, src, sizeof(EFI_E820_ENTRY));
> > + }
>
> How about AllocateCopyPool and just copy the entire array in one shot?
>
Sure, that seems much simpler. Thanks.
Wei.
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel