-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are there any plans to rebase the FW EC code against the more up to date google EC code ? #57
Comments
For what it's worth, it appears that Google operates the same way. When a program is shipped it gets a branch, and that branch does not typically take updates from main. There was an effort early on to move hx20 (the Intel 11th Gen) to the new Zephyr-based EC over on Google's Gerrit instance, but it did not work properly and I suspect re-validating the entire program on a new EC would have been prohibitively expensive. I am sure Framework would appreciate some pull requests that fix the code you've identified as "low quality". But just a quick note...
The embedded controller is single-threaded and cooperatively multitasked. I believe there is no reentrancy in this case because the incoming port80 signals through eSPI trigger an interrupt and subsequent task queuing of the one task that handles port80 IO. |
Looking at the code it looks like port80 writes happen from multiple sources. the port80 value is treated in some places as a u8, other places a u16, u32 and int. Not particularly consistent. I have not checked the code, but some might be from normal code, and some might be from interrupt context, so that sort of potential problem does not look like it is addressed in the code yet.
|
Are there any plans to rebase the FW EC code against the more up to date google EC code ?
I have looked at some of the FW EC code, and some of it is pretty low quality to be honest.
So, my first thought is maybe go through it and improve things but I then looked at the google EC code, and it seems to have already fixed most of the problems.
I compared it to this:
git clone https://chromium.googlesource.com/chromiumos/platform/ec
Now, that is not to say the google code is super high quality. For example, it also has no re-entrant locking around the port80 history ring buffer. it also will not display all port80 values on the console. For example, if 4 port80 values are set in quick succession, it only outputs one of those to the console, thus missing/dropping some.
The text was updated successfully, but these errors were encountered: