[edk2] [RFC PATCH v2 06/10] OvmfPkg/DxeBmDmaLib: Fix AllocateBounceBuffer parameter

Brijesh Singh posted 10 patches 7 years, 7 months ago
There is a newer version of this series
[edk2] [RFC PATCH v2 06/10] OvmfPkg/DxeBmDmaLib: Fix AllocateBounceBuffer parameter
Posted by Brijesh Singh 7 years, 7 months ago
The patch fixes AllocateBounceBuffer parameters.

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
---
 OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c b/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
index a342c9e..0d960a8 100644
--- a/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
+++ b/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
@@ -192,8 +192,8 @@ BmDmaMap (
   }
 
   return AllocateBounceBuffer ( 
-           Operation,
            FORCE_BELOW_4GB_TRUE,   
+           Operation,
            PhysicalAddress,
            NumberOfBytes,
            DeviceAddress,

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [RFC PATCH v2 06/10] OvmfPkg/DxeBmDmaLib: Fix AllocateBounceBuffer parameter
Posted by Laszlo Ersek 7 years, 7 months ago
On 03/21/17 22:13, Brijesh Singh wrote:
> The patch fixes AllocateBounceBuffer parameters.
> 
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
>  OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c b/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
> index a342c9e..0d960a8 100644
> --- a/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
> +++ b/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
> @@ -192,8 +192,8 @@ BmDmaMap (
>    }
>  
>    return AllocateBounceBuffer ( 
> -           Operation,
>             FORCE_BELOW_4GB_TRUE,   
> +           Operation,
>             PhysicalAddress,
>             NumberOfBytes,
>             DeviceAddress,
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> 

I'm not yet convinced that we should copy DxeBmDmaLib to OvmfPkg at all,
but even if we do, the argument order should be fixed in the original
first (under MdeModulePkg), and then copied to OvmfPkg.

Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [RFC PATCH v2 06/10] OvmfPkg/DxeBmDmaLib: Fix AllocateBounceBuffer parameter
Posted by Brijesh Singh 7 years, 7 months ago
On Mon, Mar 27, 2017 at 4:21 AM, Laszlo Ersek <lersek@redhat.com> wrote:

> On 03/21/17 22:13, Brijesh Singh wrote:
> > The patch fixes AllocateBounceBuffer parameters.
> >
> > Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> > ---
> >  OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
> b/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
> > index a342c9e..0d960a8 100644
> > --- a/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
> > +++ b/OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c
> > @@ -192,8 +192,8 @@ BmDmaMap (
> >    }
> >
> >    return AllocateBounceBuffer (
> > -           Operation,
> >             FORCE_BELOW_4GB_TRUE,
> > +           Operation,
> >             PhysicalAddress,
> >             NumberOfBytes,
> >             DeviceAddress,
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >
>
> I'm not yet convinced that we should copy DxeBmDmaLib to OvmfPkg at all,
> but even if we do, the argument order should be fixed in the original
> first (under MdeModulePkg), and then copied to OvmfPkg.
>
>
Like you said, BmDmaLib is not final and accepted solution in upstream.

Jiewen submitted RFC to provide an alternative way of clearing the
encryption bit mask.
We will need to look at that approach as well. In this RFC, i was trying to
show if BmDmaLib
gets accepted then how SEV will make use of it.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel