Attention is currently required from: Raul Rangel, Furquan Shaikh, Martin Roth, Felix Held. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49317 )
Change subject: drivers/uart: Add ACPI SPCR table generation ......................................................................
Patch Set 4:
(3 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/49317/comment/ca6dea40_c938cbfa PS4, Line 19: Please provide some details about requirements and design decisions. For instance, is the SPCR port expected to differ from the one for the coreboot console?
It looks like this is creating a mesh of the uart/acpi driver (that seems to serve a different purpose originally), the devicetree (which already has a different notation to specify devices) and our console/ uart drivers (which already have their own way of configuration (Kconfig mostly I guess).
I assume there are reasons to glue these things together, but I can't guess them right now.
File src/drivers/uart/acpi/acpi.c:
https://review.coreboot.org/c/coreboot/+/49317/comment/f0bdbf5a_7064d797 PS4, Line 159: if (config->spcr.base_address.addrh) { : spcr->base_address.access_size = config->spcr.base_address.access_size; : spcr->base_address.addrh = config->spcr.base_address.addrh; : spcr->base_address.addrl = config->spcr.base_address.addrl; : spcr->base_address.bit_width = config->spcr.base_address.bit_width; : spcr->base_address.space_id = config->spcr.base_address.space_id; : } If there is a I/O resource associated with the device, `dev` should reference it.
https://review.coreboot.org/c/coreboot/+/49317/comment/ab6a01cd_9dd839fd PS4, Line 182: if (config->spcr.pci_vendor_id) { : spcr->pci_device_number = config->spcr.pci_device_number; : spcr->pci_flags = config->spcr.pci_flags; : spcr->pci_segment = config->spcr.pci_segment; : spcr->pci_vendor_id = config->spcr.pci_vendor_id; : } : if ( config->spcr.pci_bus_number || config->spcr.pci_device_id || : config->spcr.pci_function_number) { : spcr->pci_bus_number = config->spcr.pci_bus_number; : spcr->pci_device_id = config->spcr.pci_device_id; : spcr->pci_function_number = config->spcr.pci_function_number; : } Why not use the information provided by `dev`?