Em Wed, 29 Jan 2025 16:23:28 +0100
Igor Mammedov <imamm...@redhat.com> escreveu:

> > +
> > +    /*
> > +     * Tell firmware to write into GPA the address of HEST via fw_cfg,
> > +     * once initialized.
> > +     */
> > +    bios_linker_loader_write_pointer(linker,
> > +                                     ACPI_HEST_ADDR_FW_CFG_FILE, 0,
> > +                                     sizeof(uint64_t),
> > +                                     ACPI_BUILD_TABLE_FILE, hest_offset);  
> 
> it's not safe to add this without compat logic, as it changes size of linker
> table and possibly layout.
> 
> I'd suggest to  partially combine this with use_hest_addr patch.
> One way to do it cleanly would be to move part introducing
> use_hest_addr here and set it to false to start with,
> and flip default to true one all hest_addr_le code in place.
> see related comment 6/13 

Ok. It also means I need to temporarily get ags there, e. g.:


+    AcpiGedState *acpi_ged_state;
+    AcpiGhesState *ags = NULL;
+
+    acpi_ged_state = ACPI_GED(object_resolve_path_type("", TYPE_ACPI_GED,
+                                                       NULL));
+    if (acpi_ged_state) {
+        ags = &acpi_ged_state->ghes_state;
+    }
...
+    if (ags->use_hest_addr) {
+        bios_linker_loader_write_pointer(linker,
+                                         ACPI_HEST_ADDR_FW_CFG_FILE, 0,
+                                         sizeof(uint64_t),
+                                         ACPI_BUILD_TABLE_FILE, hest_offset);
+    }


The part which gets ags will be dropped on this patch:

        ad2dc8716d1f acpi/generic_event_device: add logic to detect if HEST 
addr is available

which will set use_hest_addr to false, until we have everything in
place.

Thanks,
Mauro

Reply via email to