Attention is currently required from: Lance Zhao, Raul Rangel, Martin Roth, Tim Wawrzynczak, Julius Werner. Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59504 )
Change subject: acpi,Makefile: Add preload_acpi_dsdt ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
Well, what you have right now seems really fragile, if just shifting a few calls around here and the […]
If we have a cheap way of detecting if prefetching is done, handling the buffer could remain outside the prefetch task. Rough draft:
int handle_rdev_buffer(command, data) { if (!CONFIG(PREFETCH)) return 0; if (prefetch == active) { append_to_buffer(command, data); return 1; } else if (prefetch == done) { flush_buffer_to_rdev; prefetch = off; } return 0; }
rdev_eraseat(...) { if (handle_rdev_buffer(...)) return; normal_eraseat_things... }
rdev_writeat(...) { if (handle_rdev_buffer(...)) return; normal_writeat_things... }
The only interaction the prefetch task has with this is that it needs to set prefetch to "active" before starting work and to "done" when done. There also needs to be a call to flush_buffer_to_rdev sometimes at the end of a stage in case there's still stuff lingering in the buffer (e.g. nobody tried to write to flash after prefetch ended).