diff mbox

[1/3] acpi: method: add _CBA control method test (LP: #1249171)

Message ID 1383882189-20997-1-git-send-email-alex.hung@canonical.com
State Accepted
Headers show

Commit Message

Alex Hung Nov. 8, 2013, 3:43 a.m. UTC
_CBA is defined in PCI firmware specification as below:

An ACPI method that is used to report the Enhanced Configuration Access base
address for any PCI Segment Groups and/or base address ranges within a PCI
Segment group. This allows run-time update for the hot added PCI components.

_CBA Control Method
	Arguments: None
	Result Code: Memory mapped configuration base address for the PCI-compatible
	host bridge returned as an integer

Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/acpi/method/method.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Colin Ian King Nov. 8, 2013, 8:02 a.m. UTC | #1
On 08/11/13 03:43, Alex Hung wrote:
> _CBA is defined in PCI firmware specification as below:
> 
> An ACPI method that is used to report the Enhanced Configuration Access base
> address for any PCI Segment Groups and/or base address ranges within a PCI
> Segment group. This allows run-time update for the hot added PCI components.
> 
> _CBA Control Method
> 	Arguments: None
> 	Result Code: Memory mapped configuration base address for the PCI-compatible
> 	host bridge returned as an integer
> 
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/acpi/method/method.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 9893955..5c82560 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -62,7 +62,7 @@
>   * _BST  10.2.2.6	Y
>   * _BTM  10.2.2.8	Y
>   * _BTP  10.2.2.7	Y
> - * _CBA  see PCI spec	N
> + * _CBA  PCI f/w spec	Y
>   * _CDM  6.2.1		N
>   * _CID  6.1.2		N
>   * _CLS  6.1.3		N requires PCI SIG class info
> @@ -4778,6 +4778,11 @@ static int method_test_DSS(fwts_framework *fw)
>  		"_DSS", arg, 1, method_test_NULL_return, NULL);
>  }
>  
> +static int method_test_CBA(fwts_framework *fw)
> +{
> +	return method_evaluate_method(fw, METHOD_OPTIONAL,
> +		"_CBA", NULL, 0, method_test_integer_return, NULL);
> +}
>  
>  /*
>   * Tests
> @@ -5078,7 +5083,7 @@ static fwts_framework_minor_test method_tests[] = {
>  	{ method_test_VPO, "Check _VPO (Video POST Options)." },
>  
>  	/* From PCI Specification */
> -	/* { method_test_CBA, "Check _CBA (Configuration Base Address)." }, */
> +	{ method_test_CBA, "Check _CBA (Configuration Base Address)." },
>  
>  	/* End! */
>  
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
Keng-Yu Lin Nov. 12, 2013, 7:19 a.m. UTC | #2
On Fri, Nov 8, 2013 at 11:43 AM, Alex Hung <alex.hung@canonical.com> wrote:
> _CBA is defined in PCI firmware specification as below:
>
> An ACPI method that is used to report the Enhanced Configuration Access base
> address for any PCI Segment Groups and/or base address ranges within a PCI
> Segment group. This allows run-time update for the hot added PCI components.
>
> _CBA Control Method
>         Arguments: None
>         Result Code: Memory mapped configuration base address for the PCI-compatible
>         host bridge returned as an integer
>
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/acpi/method/method.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index 9893955..5c82560 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -62,7 +62,7 @@
>   * _BST  10.2.2.6      Y
>   * _BTM  10.2.2.8      Y
>   * _BTP  10.2.2.7      Y
> - * _CBA  see PCI spec  N
> + * _CBA  PCI f/w spec  Y
>   * _CDM  6.2.1         N
>   * _CID  6.1.2         N
>   * _CLS  6.1.3         N requires PCI SIG class info
> @@ -4778,6 +4778,11 @@ static int method_test_DSS(fwts_framework *fw)
>                 "_DSS", arg, 1, method_test_NULL_return, NULL);
>  }
>
> +static int method_test_CBA(fwts_framework *fw)
> +{
> +       return method_evaluate_method(fw, METHOD_OPTIONAL,
> +               "_CBA", NULL, 0, method_test_integer_return, NULL);
> +}
>
>  /*
>   * Tests
> @@ -5078,7 +5083,7 @@ static fwts_framework_minor_test method_tests[] = {
>         { method_test_VPO, "Check _VPO (Video POST Options)." },
>
>         /* From PCI Specification */
> -       /* { method_test_CBA, "Check _CBA (Configuration Base Address)." }, */
> +       { method_test_CBA, "Check _CBA (Configuration Base Address)." },
>
>         /* End! */
>
> --
> 1.8.1.2
>

Acked-by: Keng-Yu Lin <kengyu@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index 9893955..5c82560 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -62,7 +62,7 @@ 
  * _BST  10.2.2.6	Y
  * _BTM  10.2.2.8	Y
  * _BTP  10.2.2.7	Y
- * _CBA  see PCI spec	N
+ * _CBA  PCI f/w spec	Y
  * _CDM  6.2.1		N
  * _CID  6.1.2		N
  * _CLS  6.1.3		N requires PCI SIG class info
@@ -4778,6 +4778,11 @@  static int method_test_DSS(fwts_framework *fw)
 		"_DSS", arg, 1, method_test_NULL_return, NULL);
 }
 
+static int method_test_CBA(fwts_framework *fw)
+{
+	return method_evaluate_method(fw, METHOD_OPTIONAL,
+		"_CBA", NULL, 0, method_test_integer_return, NULL);
+}
 
 /*
  * Tests
@@ -5078,7 +5083,7 @@  static fwts_framework_minor_test method_tests[] = {
 	{ method_test_VPO, "Check _VPO (Video POST Options)." },
 
 	/* From PCI Specification */
-	/* { method_test_CBA, "Check _CBA (Configuration Base Address)." }, */
+	{ method_test_CBA, "Check _CBA (Configuration Base Address)." },
 
 	/* End! */