diff mbox

sbbr: Allow 16550 compatible serial port in DBG2

Message ID 20210629101048.933733-2-gjb@semihalf.com
State Superseded
Headers show

Commit Message

Grzegorz Bernacki June 29, 2021, 10:10 a.m. UTC
BSA 1.0 specification allow the serial port to be either
Arm SBSA Generic UART, PL011, or 16550. This patch adds
checking for 16550 port type.

BugLink: https://bugs.launchpad.net/fwts/+bug/1932567

Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
---
 src/acpi/dbg2/dbg2.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

Comments

Alex Hung June 29, 2021, 7:15 p.m. UTC | #1
The subject should be the names of the subsystems, i.e.
	acpi: dbg: llow 16550 compatible serial port in DBG2

but I can fix this when applying.

On 2021-06-29 4:10 a.m., Grzegorz Bernacki wrote:
> BSA 1.0 specification allow the serial port to be either
> Arm SBSA Generic UART, PL011, or 16550. This patch adds
> checking for 16550 port type.
> 
> BugLink: https://bugs.launchpad.net/fwts/+bug/1932567
> 
> Signed-off-by: Grzegorz Bernacki <gjb@semihalf.com>
> ---
>  src/acpi/dbg2/dbg2.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/src/acpi/dbg2/dbg2.c b/src/acpi/dbg2/dbg2.c
> index 6004dc61..ad2b7d62 100644
> --- a/src/acpi/dbg2/dbg2.c
> +++ b/src/acpi/dbg2/dbg2.c
> @@ -28,9 +28,12 @@
>  
>  #include "fwts_acpi_object_eval.h"
>  
> -#define SBBR_DBG2_PORT_SERIAL     0x8000
> -#define SBBR_DBG2_ARM_SBSA_UART   0x000E
> -#define SBBR_DBG2_ARM_PL011_UART  0x0003
> +#define SBBR_DBG2_PORT_SERIAL          0x8000
> +#define SBBR_DBG2_FULLY_16550_COMPAT   0x0000
> +#define SBBR_DBG2_16550_SUBSET_COMPAT  0x0001
> +#define SBBR_DBG2_ARM_PL011_UART       0x0003
> +#define SBBR_DBG2_ARM_SBSA_UART        0x000E
> +#define SBBR_DBG2_16550_COMPAT_GAS     0x0012
>  
>  static fwts_acpi_table_info *table;
>  acpi_table_init(DBG2, &table)
> @@ -53,8 +56,11 @@ static int dbg2_test2(fwts_framework *fw)
>  		if (((uint8_t*)info + info->length) >= ((uint8_t*)table + table->length))
>  			break;
>  		if (info->port_type == SBBR_DBG2_PORT_SERIAL &&
> -		   (info->port_subtype == SBBR_DBG2_ARM_SBSA_UART ||
> -		    info->port_subtype == SBBR_DBG2_ARM_PL011_UART)) {
> +		   (info->port_subtype == SBBR_DBG2_FULLY_16550_COMPAT ||
> +		    info->port_subtype == SBBR_DBG2_16550_SUBSET_COMPAT ||
> +		    info->port_subtype == SBBR_DBG2_ARM_PL011_UART ||
> +		    info->port_subtype == SBBR_DBG2_ARM_SBSA_UART ||
> +		    info->port_subtype == SBBR_DBG2_16550_COMPAT_GAS)) {
>  			fwts_passed(fw,
>  				"DBG2 provides a standard serial debug "
>  				"port and describes ARM SBSA Generic UART");
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/dbg2/dbg2.c b/src/acpi/dbg2/dbg2.c
index 6004dc61..ad2b7d62 100644
--- a/src/acpi/dbg2/dbg2.c
+++ b/src/acpi/dbg2/dbg2.c
@@ -28,9 +28,12 @@ 
 
 #include "fwts_acpi_object_eval.h"
 
-#define SBBR_DBG2_PORT_SERIAL     0x8000
-#define SBBR_DBG2_ARM_SBSA_UART   0x000E
-#define SBBR_DBG2_ARM_PL011_UART  0x0003
+#define SBBR_DBG2_PORT_SERIAL          0x8000
+#define SBBR_DBG2_FULLY_16550_COMPAT   0x0000
+#define SBBR_DBG2_16550_SUBSET_COMPAT  0x0001
+#define SBBR_DBG2_ARM_PL011_UART       0x0003
+#define SBBR_DBG2_ARM_SBSA_UART        0x000E
+#define SBBR_DBG2_16550_COMPAT_GAS     0x0012
 
 static fwts_acpi_table_info *table;
 acpi_table_init(DBG2, &table)
@@ -53,8 +56,11 @@  static int dbg2_test2(fwts_framework *fw)
 		if (((uint8_t*)info + info->length) >= ((uint8_t*)table + table->length))
 			break;
 		if (info->port_type == SBBR_DBG2_PORT_SERIAL &&
-		   (info->port_subtype == SBBR_DBG2_ARM_SBSA_UART ||
-		    info->port_subtype == SBBR_DBG2_ARM_PL011_UART)) {
+		   (info->port_subtype == SBBR_DBG2_FULLY_16550_COMPAT ||
+		    info->port_subtype == SBBR_DBG2_16550_SUBSET_COMPAT ||
+		    info->port_subtype == SBBR_DBG2_ARM_PL011_UART ||
+		    info->port_subtype == SBBR_DBG2_ARM_SBSA_UART ||
+		    info->port_subtype == SBBR_DBG2_16550_COMPAT_GAS)) {
 			fwts_passed(fw,
 				"DBG2 provides a standard serial debug "
 				"port and describes ARM SBSA Generic UART");