AHCI: Resolve port initialization conflict on boot vs S4 resume#5853
AHCI: Resolve port initialization conflict on boot vs S4 resume#5853G0retZ wants to merge 1 commit intogenodelabs:masterfrom
Conversation
On systems with an IOMMU, SATA ports were logged as "off (ATA)" at boot despite the BIOS having successfully initialized the devices. The boot and resume followed the same logic despite of different actual state of ports leading to non-working state for cold boot or S3 case. In order to fix that we need to add a bool parameter into reinit() call to alter the reinit logic between boot, S3 and S4 resumes. With this in place SATA disks get initialized properly on boot and S3 resume and should be also initialized properly on S4 resumes.
|
This addresses the issue #5088 |
|
@G0retZ: 4609a4c does - as observed by @cproc in #5088 - not call the Port reset during AHCI driver startup. This leaves the question of what will happen in case a BIOS doesn't hand over a half configured controller or in case there is no BIOS (think ARM based SoCs)? I would try to clear |
|
Thanks @G0retZ for the continued investigation. Happy to see it getting resolved. Also thanks @ssumpf for responding.
Thank you for being transparent about it. As a note of caution, Genode is not open for AI-generated code contributions due to the legal uncertainties of such code. In order to incorporate code into genuine Genode components (those that are marked by the license headers as being part of Genode) we must ensure that such code does not violate rights of third parties. On this account, the Genode contributor's agreement states "You certify and warrant that your Contributions to Genode Labs’s Products do not violate the intellectual property rights of third parties [...]". This cannot be assumed for code generated by AI models without legal records of their training material. As far as I know, AI service providers do not provide such evidence. |
Ok, I definitely need take this into account next time 👌 Since I don't have legal expertise here, could you please clarify in more details what counts as an unacceptable "AI generated code" contribution? What if I will use an AI agent service for advisory and static analysis only, but will type the actual code by my own hands? I'd like to know my limits here from Genode perspective 🤔 |
I'm not a lawyer. But I consider learning from any source (book, teacher, experience, internet search engine, AI model) as fine as long as the information source is legal (think of trade secrets). Code generation is different matter. Legally, regardless of whether running the model locally or as a service, unless you created the model yourself, you cannot know from which data the model parameters had been derived. So one should assume the worst. Common sense. The obvious way to stay safe is to craft code by hand, driven by human intent. At the end of the day, someone has to assert responsibility, for both technical and legal risks. A maintainer becomes responsible for the code whenever accepting a contribution. Accepting the risks of AI-generated artifacts would be irresponsible for Genode Labs. Hence, we have to keep our code untainted. |
Thanks for clarification! 🙏 |
|
Fixed in #5088 |
This PR is vibe-coded with thorough supervision and sanity check.
Though I'm not an expert in C++ nor in drivers development.
Here is the summary of the reasoning behind the changes produced by AI:
Tested on my system building Sculpt from the current


masterbranch and now I have access to all of my drives.