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
OcConsoleLib: Prevent verbose boot text overwriting pre-existing graphics #426
Conversation
FYI I have just double-checked this, and both commits are required, i.e. the second commit here alone does not fix acidanthera/bugtracker#2225 . |
I'll check in a few hours. Thank you |
I have detected yet another relevant case, addressed in a revised second commit 583621c. The is required because, while the code in 2974fbb detects After further research on this and in the native picker, I suspect that the reason this works on Macs, is because of some other difference between their Console implementation and ours, as regards when they do/do not clear screen. I no longer think they have a specific work-around for verbose mode in their picker. As far as I can tell, they don't (can't) do (the equivalent of) the clear screen on reset which I removed, however. But all this - probably - does not really matter. Based on how it actually looks, when it transitions into the early lines of verbose boot, on a fully native system, it occurs to me that this may be because they have a true ConSplitter. |
I've seen a way to reduce the hackery of commit 3 of this series, so moving the PR back to draft temporarily. EDIT: Now included in revised second commit of two. |
a58eff9
to
3e22a61
Compare
528f990
to
607fbd2
Compare
I'm getting major linkage errors when attempting to call OCABC where I'm calling it from. Moved to draft again. EDIT: I believe I've resolved this. If so, was not an issue in new code in these commits. Waiting for rebuild |
1992229
to
05dbfda
Compare
b8f092d
to
dac13c7
Compare
@@ -65,6 +65,7 @@ | |||
OcCryptoLib | |||
OcDeviceTreeLib | |||
OcGuardLib | |||
OcLogAggregatorLib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed?
@@ -0,0 +1,25 @@ | |||
## @file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the point of this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't need this to fix the screen clear now, and am going to do a revised version of this PR without it. But I still believe this is wrong and should be fixed to save someone else having to work it out in future.
The Null and Serial versions of DebugLib also included null functions for OcLogAggregatorLib. But OcLogAggregator lib is a separate library from DebugLib.
Because of further library dependencies, this error (as I believe it to be) was making it impossible to link OcAfterBootCompatLib anywhere except where it was already linked. After these changes - which look correct to me anyway - I could link it to another another library, OcBootManagementLib, as I needed to in this current (to be replaced) version of the PR, just fine.
32bb8ff
to
91265d3
Compare
…hics - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen work-around no longer required with this change. - These changes improve EnableGop driver in the same way, so update version number o Add EnableGop version in UI section, to enable tool builders to track it
This drops all the AfterBootCompatLib stuff. I think this is a complete, correct, pretty fully tested, and simple solution. The most significant change is clearing screen when we enter console mode from graphics mode. This is the key to not needing any strange ABC stuff, as it means boot.efi itself tells us whether it is running in console mode, and we clear the screen, or not, in response. (The Apple native system is visually very slightly different - a less than full screen console mode is centred on the screen rather than in the top left - but otherwise looks pretty much identical to how this behaves now.) |
Looks great now - @vit9696 imo test for artifacts and then merge. |
@vandroiy2013 I don't know if you have a moment to retest this one? I'm pretty sure I could replicate your issue and it is fully fixed now. This one is tested by me on (hack|mac native|mac+EnableGop driver)x(-v in boot-args|cmd+v in OC|cmd+v detected by boot.efi)x(console picker|canopy)x(ShowPicker:true|false). |
…hics (acidanthera#426) - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen work-around no longer required with this change. - These changes improve EnableGop driver in the same way, so update version number o Add EnableGop version in UI section, to enable tool builders to track it
…hics (acidanthera#426) - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen work-around no longer required with this change. - These changes improve EnableGop driver in the same way, so update version number o Add EnableGop version in UI section, to enable tool builders to track it
…hics (acidanthera#426) - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen work-around no longer required with this change. - These changes improve EnableGop driver in the same way, so update version number o Add EnableGop version in UI section, to enable tool builders to track it
…hics (acidanthera#426) - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen work-around no longer required with this change.
…hics (acidanthera#426) - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen when no valid entry from Apple picker (was added in a653620), no longer required with this change
…hics (acidanthera#426) - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen when no valid entry from Apple picker (was added in a653620), no longer required with this change
…hics (acidanthera#426) - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen when no valid entry from Apple picker (was added in a653620), no longer required with this change
…hics (acidanthera#426) - Clear console screen on change to console mode - Ensure entire screen is cleared at least once in console mode o Was not needed/was done by default, prior to a189bd5 o Remove GOP clear screen when no valid entry from Apple picker (was added in a653620), no longer required with this change
Was not needed/was done by default, prior to a189bd5
I appreciate that this is yet another 'fix' for a problem which was not present prior to recent changes.
However, I also believe that in this case, too, the change + fix is a genuine improvement over the previous code.
In this case:
The current version of this PR has two commits, and includes #424 .