127 Commits

Author SHA1 Message Date
Alex James
1f6d95aedf
OcConsoleLib: Normalize console font path (#579)
OcLoadConsoleFont currently loads the specified console path from
Resources\Font\\, which can cause vault failures if vault.plist doesn't
include the duplicate path separator. Remove it to match other paths.
2025-08-10 11:04:14 +03:00
Mike Beaton
fa4112e6bb OcConsoleLib: Change comment link from master to specified commit 2024-09-02 22:10:33 +01:00
Mike Beaton
0ad4a318b0 OcConsoleLib: Provide ConsoleFont option
to load custom .hex format console font file
2023-06-11 05:48:55 +01:00
Mike Beaton
5f2c525cc2 OcConsoleLib: Change out-of-range cursor handling to work round bug(?) in memtest86
- memtest86 does not re-read the text mode size after changing GOP resolution.
 - Possibly this is an issue in OC, in that this should not normally change? (But it is
   fundamental to Builtin renderer handling of console resolution that it will change,
   unless a fixed user mode size is specified.)
 - The only effect of this in memtest86 is that it attempts to place the white footer
   line of its text UI below the bottom of the screen; so this clamping, which seems
   reasonable anyway, completely works round it.
2023-05-18 09:16:01 +01:00
Mike Beaton
0df9d12630 OcConsoleLib: Ignore UIScale when required to reach minimum 80x25 text mode size 2023-05-18 09:16:01 +01:00
Mike Beaton
bc71bbf9ef OcConsoleLib: Add font pages
- Add back original ISO Latin font page 1
 - Add unicode box drawing and block element characters
2023-05-18 09:15:58 +01:00
Mike Beaton
301bde5d3d OcConsoleLib: Minor updates
- Remove long-standing unused ConsoleControlInstall method
 - Minor codestyle fix
 - Improve doc wording
2023-05-04 09:59:29 +01:00
Mike Beaton
065177ebb9 OcConsoleLib: Apply ConsoleMode console text resolution option to builtin text renderer 2023-05-04 09:59:29 +01:00
Mike Beaton
c8b93357b8 OcConsoleLib: Simplify use of builtin renderer uncontrolled mode
The renderer already (esp. since recent changes incl. reset to controlled on cls)
manages its own transitions to controlled, so we just need to indicate uncontrolled
in cases where something else has been rendering graphics
2023-05-04 09:59:22 +01:00
Mike Beaton
7feb7c98c3 OcConsoleLib: Builtin renderer updates
- Perform full clear screen on switch from graphics to text mode,
   if marked uncontrolled
 - Suppress remaining console coloured output (screen clear and
   cursor, text was already handled) if in graphics mode
 - Remain uncontrolled while in graphics mode
 - Improve builtin renderer screen size calculations
   o Although we appear to lose a small amount of height (i.e. up
     to one row) with the new font size scaled vertical padding,
     we were actually losing it anyway with the previous screen
     size calculation
 - Re-order initialisation of builtin mode
   o Avoid producing uncontrolled text with old text protocol,
     after resync screen clear of new controlled protocol
2023-05-03 22:21:11 +01:00
Mike Beaton
c1f0b9f169 OcConsoleLib: Implement InitialMode 2023-05-03 22:21:04 +01:00
Mike Beaton
216bdcedc3 OcConsoleLib: Builtin renderer updates
- Avoid additional clear screen when resyncing
 - Use same values to trigger full clear screen after background
   colour change as after mark uncontrolled
 - Only scroll used width when controlled
 - Reset controlled area after clear screen
 - Fix mConsoleMaxPosY init error for controlled mode
   o Present since 76e889f89af7ecdec0a8de191d7ded5856b338fb
 - Fix ConsoleControl wording in docs
 - Add ASSERTS and comments
2023-05-02 07:49:01 +01:00
Mike Beaton
acecdf5e7b Revert OcConsoleLib related parts of recent commits:
- Reverts part of commit 2439d58412c071cb735cde8a70c9ef964a095780.
 - Reverts commit a189bd53bc2ac1490dac7125a9ce11fd03571755.
 - Reverts part of commit b07843fe1d47454747ae4eda9ea0189aa9fb8c03.
2023-05-02 07:49:01 +01:00
Savva Mitrofanov
b2d438d6f3 Switch OcGuardLib to BaseOverflowLib 2023-04-13 13:16:14 +06:00
Mike Beaton
5d8e3f5836 OcConsoleLib: Additional info in GOP dump; additional guards on GopBurstMode 2023-04-09 10:18:58 +01:00
Mike Beaton
abe28e829f OcConsoleLib: Add GopBurstMode quirk
OcMemoryLib: Add additional PAT and MTRR caching support
2023-03-28 07:18:14 +01:00
Mike Beaton
b34b7c48f2 Various: Add missing .inf dependencies 2023-02-25 19:37:27 +03:00
Mike Beaton
2439d58412
OcConsoleLib: Prevent verbose boot text overwriting pre-existing graphics (#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 a189bd53bc2ac1490dac7125a9ce11fd03571755
   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
2023-02-22 02:01:39 +03:00
Mike Beaton
a189bd53bc OcConsoleLib: Do not clear screen on console reset if in graphics mode
Prevents clearing to console background colour when screen is in themed graphics mode
2023-01-29 23:20:28 +00:00
Mike Beaton
b07843fe1d OcConsoleLib: Prevent failure to properly start console in graphics mode
when previous console control protocol is non-existent or limited
2023-01-29 08:15:40 +00:00
Mike Beaton
0d993a068e OpenCoreUefi: Normalise protocol uninstall message format 2022-11-21 23:45:48 +00:00
PMheart
228f8ca1fb Codestyle: Apply codestyle changes with Uncrustify 2022-04-25 14:51:15 +02:00
vit9696
6cef37f0be OcConsoleLib: Fixed ProvideConsoleGop not disabling blit-only modes
This resolves verbose output issues on ASUS Z690F.
2021-11-11 00:48:54 +03:00
vit9696
20721dc99f Build: Fix minor typos, thx Slice&Co 2021-11-03 14:16:38 +03:00
vit9696
92ab271dba OcConsoleLib: Fix assertions with GopPassThrough 2021-05-29 13:01:52 +03:00
Vitaly Cheptsov
8dd01eb4fe
OcConsoleLib: Fix assertion on UGA failurei 2021-05-28 21:34:21 +03:00
vit9696
4e0ff2dfa7 OcConsoleLib: Added Apple variant of GopPassThrough
On MP3,1 with UGA there is a dangling UGA protocol with 1024x768
resolution on ConOut, which points nowhere when no Apple GPU is
installed. Installing GOP on it results in black screen due to
the wrong GOP being chosen for ConOut.

The workaround is not to install the GOP without AppleFramebufferInfo
but this is only applicable to Apple machines, thus the option.
2021-05-23 10:32:35 +03:00
vit9696
c8a0f310f2 OcConsoleLib: Revert BltOnly hack for direct renderer 2021-05-10 12:49:57 +03:00
vit9696
3c283f662a OcConsoleLib: Fix MTRR pointers 2021-05-09 15:52:09 +03:00
vit9696
31b5e1943b OcConsoleLib: Avoid potential rotation conflicts with bootloaders 2021-05-09 03:27:38 +03:00
vit9696
e094c2bd95 OcConsoleLib: Fix rotation and EfiBoot bridging 2021-05-09 02:59:05 +03:00
vit9696
479a5b15f3 OcConsoleLib: Add AppleEg2Info protocol and make rotation configurable 2021-05-09 00:43:09 +03:00
vit9696
b87d9eead2 OcBlitLib: Implement partial 180 degree rotation support 2021-05-08 19:12:30 +03:00
vit9696
f2bc348793 OcConsoleLib: Allow future interfacing builtin GOP with rotation 2021-05-08 16:27:35 +03:00
Vitaly Cheptsov
2ac5173028
OcConsoleLib: Fix MSVC compilation 2021-05-08 14:06:44 +03:00
vit9696
2abe2a6d1a OcBlitLib: Initial version for improved compatibility 2021-05-08 13:29:29 +03:00
vit9696
ef5a9d03a9 Build: Fix some warnings 2021-04-14 18:41:14 +03:00
vit9696
484c91d316 OcConsoleLib: Do not uninstall Apple FB Info when there is no GOP 2021-02-21 18:16:18 +03:00
PMheart
7180cdb43b
OpenCoreUefiInOut: Added GopPassThrough option to support GOP protocol over UGA (#211) 2021-02-21 18:13:15 +03:00
Vitaly Cheptsov
3ae11a90c6
OcConsoleLib: Fix message error level 2021-02-21 10:41:04 +03:00
vit9696
39605d02be OcConsoleLib: Fix installing Apple FB Info protocol when no GOP exists 2021-02-20 23:13:09 +03:00
vit9696
69ff426319 OcConsoleLib: Add framebuffer base and params logging 2021-01-31 19:53:19 +03:00
vit9696
6f936b8528 Library: Install all protocols on new handle 2021-01-22 20:29:14 +03:00
vit9696
68de5dbd70 Bootstrap: Print actual load path
closes acidanthera/bugtracker#1446
2021-01-20 17:15:59 +03:00
dakanji
ba5eea2de4
OcConsoleLib: Improve error reporting with TextoutputBuiltin (#143)
closes acidanthera/bugtracker#1238
2020-10-29 12:21:43 +03:00
John Davis
cde37269aa
VBIOS patching via ForceResolution option (#144)
* BiosVideo: Initial Intel patching functions

* BiosVideo: Implement patch protocol

* BiosVideo: Read EDID from VBE

* BiosVideo: Fix previous commits

* OpenDuet: Fix Windows builds

* BiosVideo: Fix MSVC warnings

* BiosVideo: Pull max resolution from EDID

* BiosVideo: Patch based on PCI vendor ID

* BiosVideo: Fix more MSVC warnings

* OcMiscLib: Try to fix OpenDuet MSVC compilation

* BiosVideo: Fix incorrect return status

* OpenDuet: Create OcDebugLogLibNull library

* Protocol: Rename OC_VBIOS_PATCH_PROTOCOL to OC_FORCE_RESOLUTION_PROTOCOL

* OpenCore: Add ForceResolution option

* BiosVideo: Fix consistency of height/width parameters

* Includes: Mark height/width as optional

* BiosVideo: Cleanup misc issues

* Docs: Add support note
2020-10-26 19:18:06 -05:00
vit9696
5d332ce5e8 OcConsoleLib: Fixed assert when trying to enable direct renderer
Happened on blit-only GOP, see acidanthera/bugtracker#1221
2020-10-17 20:27:45 +03:00
dakanji
8c78acfea0
OcConsoleLib: Fix typo from the previous commit (#137) 2020-10-13 10:34:28 +03:00
dakanji
d9cc30567c
Library: Firmware pluralisation fixes in the code (#136) 2020-10-13 01:42:59 +03:00
dakanji
7591a4991a
OcConsoleLib: Return Status on Providing Console GOP (#117)
closes acidanthera/bugtracker#1135
2020-09-06 14:41:02 +03:00