qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 06/10] ACPI ERST: build the ACPI ERST table


From: Eric DeVolder
Subject: Re: [PATCH v5 06/10] ACPI ERST: build the ACPI ERST table
Date: Wed, 28 Jul 2021 10:18:48 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0



On 7/27/21 7:01 AM, Igor Mammedov wrote:
On Mon, 26 Jul 2021 15:02:55 -0500
Eric DeVolder <eric.devolder@oracle.com> wrote:

[...]
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_BEGIN_READ_OPERATION:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_BEGIN_CLEAR_OPERATION:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_END_OPERATION:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_SET_RECORD_OFFSET:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER      , 0, 32,
+                s->bar0 + ERST_CSR_VALUE , 0, MASK32);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_EXECUTE_OPERATION:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_VALUE , ERST_EXECUTE_OPERATION_MAGIC, 
MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_CHECK_BUSY_STATUS:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_READ_REGISTER_VALUE , 0, 32,
+                s->bar0 + ERST_CSR_VALUE, 0x01, MASK8);
+            break;
+        case ACPI_ERST_ACTION_GET_COMMAND_STATUS:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_READ_REGISTER       , 0, 32,
+                s->bar0 + ERST_CSR_VALUE, 0, MASK8);
+            break;
+        case ACPI_ERST_ACTION_GET_RECORD_IDENTIFIER:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_READ_REGISTER       , 0, 64,
+                s->bar0 + ERST_CSR_VALUE, 0, MASK64);
+            break;
+        case ACPI_ERST_ACTION_SET_RECORD_IDENTIFIER:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER      , 0, 64,
+                s->bar0 + ERST_CSR_VALUE , 0, MASK64);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_GET_RECORD_COUNT:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_READ_REGISTER       , 0, 32,
+                s->bar0 + ERST_CSR_VALUE, 0, MASK32);
+            break;
+        case ACPI_ERST_ACTION_BEGIN_DUMMY_WRITE_OPERATION:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_RESERVED:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            break;
+        case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_READ_REGISTER       , 0, 64,
+                s->bar0 + ERST_CSR_VALUE, 0, MASK64);
+            break;
+        case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_LENGTH:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_READ_REGISTER       , 0, 64,
+                s->bar0 + ERST_CSR_VALUE, 0, MASK32);
+            break;
+        case ACPI_ERST_ACTION_GET_ERROR_LOG_ADDRESS_RANGE_ATTRIBUTES:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_READ_REGISTER       , 0, 32,
+                s->bar0 + ERST_CSR_VALUE, 0, MASK32);
+            break;
+        case ACPI_ERST_ACTION_GET_EXECUTE_OPERATION_TIMINGS:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_WRITE_REGISTER_VALUE, 0, 32,
+                s->bar0 + ERST_CSR_ACTION, action, MASK8);
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_READ_REGISTER       , 0, 64,
+                s->bar0 + ERST_CSR_VALUE, 0, MASK64);
+        default:
+            build_serialization_instruction_entry(table_data, action,
+                ACPI_ERST_INST_NOOP, 0, 0, 0, action, 0);
+            break;
+        }

../../builds/imammedo/qemu/hw/acpi/erst.c: In function ‘build_erst’:
../../builds/imammedo/qemu/hw/acpi/erst.c:754:13: error: this statement may 
fall through [-Werror=implicit-fallthrough=]
              build_serialization_instruction_entry(table_data, action,
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  ACPI_ERST_INST_READ_REGISTER       , 0, 64,
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  s->bar0 + ERST_CSR_VALUE, 0, MASK64);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../builds/imammedo/qemu/hw/acpi/erst.c:757:9: note: here
          default:
          ^~~~~~~
cc1: all warnings being treated as errors

Michael pointed this one out last week, I've since corrected it.



+    }
+    build_header(linker, table_data,
+                 (void *)(table_data->data + erst_start),
+                 "ERST", table_data->len - erst_start,
+                 1, oem_id, oem_table_id);
+}
+
+/*******************************************************************/
+/*******************************************************************/
+
    static const VMStateDescription erst_vmstate  = {
        .name = "acpi-erst",
        .version_id = 1,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]