Re: [edk2] [PATCH v2 1/2] ArmPkg/Include: Add standard SMC function IDs for MM interface.

2017-10-09 Thread Achin Gupta
On Mon, Oct 09, 2017 at 04:15:27PM +0100, Supreeth Venkatesh wrote:
> I can do that.

Thanks!

> However, "-4" is missing in the specification. Is there a chance to rectify 
> specification to add "-4", so that I can do both the defines.

To indicate what error? Anyways, lets take this offline. For the time being, the
code should match the spec.

cheers,
Achin

>
> Thanks,
> Supreeth
> -Original Message-
> From: Achin Gupta
> Sent: Monday, October 9, 2017 3:52 AM
> To: Ard Biesheuvel ; Supreeth Venkatesh 
> 
> Cc: Supreeth Venkatesh ; edk2-devel@lists.01.org; 
> Leif Lindholm ; nd 
> Subject: Re: [PATCH v2 1/2] ArmPkg/Include: Add standard SMC function IDs for 
> MM interface.
>
> Hi Ard/Supreeth,
>
> On Fri, Oct 06, 2017 at 10:05:46PM +0100, Ard Biesheuvel wrote:
> > On 27 September 2017 at 19:58, Supreeth Venkatesh
> >  wrote:
> > > This patch adds a list of function IDs that fall under the standard
> > > SMC range as defined in
> > > http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf.
> > >
> > > SMCs associated with Management Mode are in the range 0xC440 -
> > > 0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).
> > >
> > > The function(s) available to the normal world:
> > > 1. Request services from the secure MM environment using MM_COMMUNICATE.
> > >
> > > It also defines MM return codes.
> > >
> > > Contributed-under: TianoCore Contribution Agreement 1.1
> > > Signed-off-by: Achin Gupta 
> > > Signed-off-by: Supreeth Venkatesh 
> >
> > Both patches applied. Thanks.
>
> I should have spotted this earlier but the following define is not spec. 
> compliant. It says:
>
> > +#define ARM_SMC_MM_RET_NO_MEMORY   -4
>
> but should be
>
> > +#define ARM_SMC_MM_RET_NO_MEMORY   -5
>
> Supreeth. Could you please submit a patch to rectify this?
>
> cheers,
> Achin
>
> >
> > > ---
> > >  ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 20
> > > +++-
> > >  1 file changed, 19 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > > b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > > index 593a3ce729..37d0796649 100644
> > > --- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > > +++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > > @@ -1,6 +1,6 @@
> > >  /** @file
> > >  *
> > > -*  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
> > > +*  Copyright (c) 2012-2017, ARM Limited. All rights reserved.
> > >  *
> > >  *  This program and the accompanying materials
> > >  *  are licensed and made available under the terms and conditions
> > > of the BSD License @@ -40,6 +40,24 @@
> > >  #define ARM_SMC_STD_REVISION_MAJOR0x0
> > >  #define ARM_SMC_STD_REVISION_MINOR0x1
> > >
> > > +/*
> > > + * Management Mode (MM) calls cover a subset of the Standard Service 
> > > Call range.
> > > + * The list below is not exhaustive.
> > > + */
> > > +#define ARM_SMC_ID_MM_VERSION_AARCH32  0x8440
> > > +#define ARM_SMC_ID_MM_VERSION_AARCH64  0xC440
> > > +
> > > +// Request service from secure standalone MM environment
> > > +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32  0x8441
> > > +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64  0xC441
> > > +
> > > +/* MM return error codes */
> > > +#define ARM_SMC_MM_RET_SUCCESS  0
> > > +#define ARM_SMC_MM_RET_NOT_SUPPORTED   -1
> > > +#define ARM_SMC_MM_RET_INVALID_PARAMS  -2
> > > +#define ARM_SMC_MM_RET_DENIED  -3
> > > +#define ARM_SMC_MM_RET_NO_MEMORY   -4
> > > +
> > >  /*
> > >   * Power State Coordination Interface (PSCI) calls cover a subset of the
> > >   * Standard Service Call range.
> > > --
> > > 2.14.1
> > >
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 1/2] ArmPkg/Include: Add standard SMC function IDs for MM interface.

2017-10-09 Thread Supreeth Venkatesh
I can do that.
However, "-4" is missing in the specification. Is there a chance to rectify 
specification to add "-4", so that I can do both the defines.

Thanks,
Supreeth
-Original Message-
From: Achin Gupta
Sent: Monday, October 9, 2017 3:52 AM
To: Ard Biesheuvel ; Supreeth Venkatesh 

Cc: Supreeth Venkatesh ; edk2-devel@lists.01.org; 
Leif Lindholm ; nd 
Subject: Re: [PATCH v2 1/2] ArmPkg/Include: Add standard SMC function IDs for 
MM interface.

Hi Ard/Supreeth,

On Fri, Oct 06, 2017 at 10:05:46PM +0100, Ard Biesheuvel wrote:
> On 27 September 2017 at 19:58, Supreeth Venkatesh
>  wrote:
> > This patch adds a list of function IDs that fall under the standard
> > SMC range as defined in
> > http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf.
> >
> > SMCs associated with Management Mode are in the range 0xC440 -
> > 0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).
> >
> > The function(s) available to the normal world:
> > 1. Request services from the secure MM environment using MM_COMMUNICATE.
> >
> > It also defines MM return codes.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Achin Gupta 
> > Signed-off-by: Supreeth Venkatesh 
>
> Both patches applied. Thanks.

I should have spotted this earlier but the following define is not spec. 
compliant. It says:

> +#define ARM_SMC_MM_RET_NO_MEMORY   -4

but should be

> +#define ARM_SMC_MM_RET_NO_MEMORY   -5

Supreeth. Could you please submit a patch to rectify this?

cheers,
Achin

>
> > ---
> >  ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 20
> > +++-
> >  1 file changed, 19 insertions(+), 1 deletion(-)
> >
> > diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > index 593a3ce729..37d0796649 100644
> > --- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > +++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > @@ -1,6 +1,6 @@
> >  /** @file
> >  *
> > -*  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
> > +*  Copyright (c) 2012-2017, ARM Limited. All rights reserved.
> >  *
> >  *  This program and the accompanying materials
> >  *  are licensed and made available under the terms and conditions
> > of the BSD License @@ -40,6 +40,24 @@
> >  #define ARM_SMC_STD_REVISION_MAJOR0x0
> >  #define ARM_SMC_STD_REVISION_MINOR0x1
> >
> > +/*
> > + * Management Mode (MM) calls cover a subset of the Standard Service Call 
> > range.
> > + * The list below is not exhaustive.
> > + */
> > +#define ARM_SMC_ID_MM_VERSION_AARCH32  0x8440
> > +#define ARM_SMC_ID_MM_VERSION_AARCH64  0xC440
> > +
> > +// Request service from secure standalone MM environment
> > +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32  0x8441
> > +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64  0xC441
> > +
> > +/* MM return error codes */
> > +#define ARM_SMC_MM_RET_SUCCESS  0
> > +#define ARM_SMC_MM_RET_NOT_SUPPORTED   -1
> > +#define ARM_SMC_MM_RET_INVALID_PARAMS  -2
> > +#define ARM_SMC_MM_RET_DENIED  -3
> > +#define ARM_SMC_MM_RET_NO_MEMORY   -4
> > +
> >  /*
> >   * Power State Coordination Interface (PSCI) calls cover a subset of the
> >   * Standard Service Call range.
> > --
> > 2.14.1
> >
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 1/2] ArmPkg/Include: Add standard SMC function IDs for MM interface.

2017-10-09 Thread Achin Gupta
Hi Ard/Supreeth,

On Fri, Oct 06, 2017 at 10:05:46PM +0100, Ard Biesheuvel wrote:
> On 27 September 2017 at 19:58, Supreeth Venkatesh
>  wrote:
> > This patch adds a list of function IDs that fall under the standard
> > SMC range as defined in
> > http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf.
> >
> > SMCs associated with Management Mode are in the range 0xC440 -
> > 0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).
> >
> > The function(s) available to the normal world:
> > 1. Request services from the secure MM environment using MM_COMMUNICATE.
> >
> > It also defines MM return codes.
> >
> > Contributed-under: TianoCore Contribution Agreement 1.1
> > Signed-off-by: Achin Gupta 
> > Signed-off-by: Supreeth Venkatesh 
>
> Both patches applied. Thanks.

I should have spotted this earlier but the following define is not
spec. compliant. It says:

> +#define ARM_SMC_MM_RET_NO_MEMORY   -4

but should be

> +#define ARM_SMC_MM_RET_NO_MEMORY   -5

Supreeth. Could you please submit a patch to rectify this?

cheers,
Achin

>
> > ---
> >  ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 20 +++-
> >  1 file changed, 19 insertions(+), 1 deletion(-)
> >
> > diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h 
> > b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > index 593a3ce729..37d0796649 100644
> > --- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > +++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> > @@ -1,6 +1,6 @@
> >  /** @file
> >  *
> > -*  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
> > +*  Copyright (c) 2012-2017, ARM Limited. All rights reserved.
> >  *
> >  *  This program and the accompanying materials
> >  *  are licensed and made available under the terms and conditions of the 
> > BSD License
> > @@ -40,6 +40,24 @@
> >  #define ARM_SMC_STD_REVISION_MAJOR0x0
> >  #define ARM_SMC_STD_REVISION_MINOR0x1
> >
> > +/*
> > + * Management Mode (MM) calls cover a subset of the Standard Service Call 
> > range.
> > + * The list below is not exhaustive.
> > + */
> > +#define ARM_SMC_ID_MM_VERSION_AARCH32  0x8440
> > +#define ARM_SMC_ID_MM_VERSION_AARCH64  0xC440
> > +
> > +// Request service from secure standalone MM environment
> > +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32  0x8441
> > +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64  0xC441
> > +
> > +/* MM return error codes */
> > +#define ARM_SMC_MM_RET_SUCCESS  0
> > +#define ARM_SMC_MM_RET_NOT_SUPPORTED   -1
> > +#define ARM_SMC_MM_RET_INVALID_PARAMS  -2
> > +#define ARM_SMC_MM_RET_DENIED  -3
> > +#define ARM_SMC_MM_RET_NO_MEMORY   -4
> > +
> >  /*
> >   * Power State Coordination Interface (PSCI) calls cover a subset of the
> >   * Standard Service Call range.
> > --
> > 2.14.1
> >
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 1/2] ArmPkg/Include: Add standard SMC function IDs for MM interface.

2017-10-06 Thread Ard Biesheuvel
On 27 September 2017 at 19:58, Supreeth Venkatesh
 wrote:
> This patch adds a list of function IDs that fall under the standard
> SMC range as defined in
> http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf.
>
> SMCs associated with Management Mode are in the range 0xC440 -
> 0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).
>
> The function(s) available to the normal world:
> 1. Request services from the secure MM environment using MM_COMMUNICATE.
>
> It also defines MM return codes.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Achin Gupta 
> Signed-off-by: Supreeth Venkatesh 

Both patches applied. Thanks.

> ---
>  ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 20 +++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h 
> b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> index 593a3ce729..37d0796649 100644
> --- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> +++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
> @@ -1,6 +1,6 @@
>  /** @file
>  *
> -*  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
> +*  Copyright (c) 2012-2017, ARM Limited. All rights reserved.
>  *
>  *  This program and the accompanying materials
>  *  are licensed and made available under the terms and conditions of the BSD 
> License
> @@ -40,6 +40,24 @@
>  #define ARM_SMC_STD_REVISION_MAJOR0x0
>  #define ARM_SMC_STD_REVISION_MINOR0x1
>
> +/*
> + * Management Mode (MM) calls cover a subset of the Standard Service Call 
> range.
> + * The list below is not exhaustive.
> + */
> +#define ARM_SMC_ID_MM_VERSION_AARCH32  0x8440
> +#define ARM_SMC_ID_MM_VERSION_AARCH64  0xC440
> +
> +// Request service from secure standalone MM environment
> +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32  0x8441
> +#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64  0xC441
> +
> +/* MM return error codes */
> +#define ARM_SMC_MM_RET_SUCCESS  0
> +#define ARM_SMC_MM_RET_NOT_SUPPORTED   -1
> +#define ARM_SMC_MM_RET_INVALID_PARAMS  -2
> +#define ARM_SMC_MM_RET_DENIED  -3
> +#define ARM_SMC_MM_RET_NO_MEMORY   -4
> +
>  /*
>   * Power State Coordination Interface (PSCI) calls cover a subset of the
>   * Standard Service Call range.
> --
> 2.14.1
>
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2 1/2] ArmPkg/Include: Add standard SMC function IDs for MM interface.

2017-09-27 Thread Supreeth Venkatesh
This patch adds a list of function IDs that fall under the standard
SMC range as defined in
http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf.

SMCs associated with Management Mode are in the range 0xC440 -
0xC45f (64 bit) and 0x8440 - 0x845f (32 bit).

The function(s) available to the normal world:
1. Request services from the secure MM environment using MM_COMMUNICATE.

It also defines MM return codes.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Achin Gupta 
Signed-off-by: Supreeth Venkatesh 
---
 ArmPkg/Include/IndustryStandard/ArmStdSmc.h | 20 +++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h 
b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
index 593a3ce729..37d0796649 100644
--- a/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
+++ b/ArmPkg/Include/IndustryStandard/ArmStdSmc.h
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
+*  Copyright (c) 2012-2017, ARM Limited. All rights reserved.
 *
 *  This program and the accompanying materials
 *  are licensed and made available under the terms and conditions of the BSD 
License
@@ -40,6 +40,24 @@
 #define ARM_SMC_STD_REVISION_MAJOR0x0
 #define ARM_SMC_STD_REVISION_MINOR0x1
 
+/*
+ * Management Mode (MM) calls cover a subset of the Standard Service Call 
range.
+ * The list below is not exhaustive.
+ */
+#define ARM_SMC_ID_MM_VERSION_AARCH32  0x8440
+#define ARM_SMC_ID_MM_VERSION_AARCH64  0xC440
+
+// Request service from secure standalone MM environment
+#define ARM_SMC_ID_MM_COMMUNICATE_AARCH32  0x8441
+#define ARM_SMC_ID_MM_COMMUNICATE_AARCH64  0xC441
+
+/* MM return error codes */
+#define ARM_SMC_MM_RET_SUCCESS  0
+#define ARM_SMC_MM_RET_NOT_SUPPORTED   -1
+#define ARM_SMC_MM_RET_INVALID_PARAMS  -2
+#define ARM_SMC_MM_RET_DENIED  -3
+#define ARM_SMC_MM_RET_NO_MEMORY   -4
+
 /*
  * Power State Coordination Interface (PSCI) calls cover a subset of the
  * Standard Service Call range.
-- 
2.14.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel