summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi/loader/arch/amd64/framebuffer.c
Commit message (Collapse)AuthorAgeFilesLines
* Enable warnings in EFI boot codesmh2016-01-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Set WARNS if not set for EFI boot code and fix the issues highlighted by setting it. Most components are set to WARNS level 6 with few being left at lower levels due to the amount of changes needed to fix at higher levels. Error types fixed: * Missing / invalid casts * Missing inner structs * Unused vars * Missing static for internal only funcs * Missing prototypes * Alignment changes * Use of uninitialised vars * Unknown pragma (intrinsic) * Missing types etc due to missing includes * printf formatting types Reviewed by: emaste (in part) MFC after: 2 weeks X-MFC-With: r293268 Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D4839
* Introduce and use new EFI_ERROR_CODE macro for EFI errorsemaste2016-01-061-4/+4
| | | | | Submitted by: smh MFC after: 1 week
* loader.efi: strip trailing whitespaceemaste2015-12-211-1/+1
| | | | Sponsored by: The FreeBSD Foundation
* As expected, things aren't as simple as hoped. Consequently, we havemarcel2015-09-071-22/+76
| | | | | | | | | | | | | | | | | | | | | | no option but to use the smbios information to fill in the blanks. It's a good thing UGA is a protocol of the past and GOP has all the info we need. Anyway, the logic has been tweaked a little to get the easier bits of information up front. This includes the resolution and the frame buffer address. Then we look at the smbios information and define expected values as well as the missing bits (frame buffer offset and stride). If the values obtained match the expect values, we fill in the blanks and return. Otherwise we use the existing detection logic to figure it out. Rename the environment variables from uga_framebuffer abd uga_stride to hw.efifb.address and hw.efifb.stride. The latter names are more in line with other variable names. We currently have hardcoded settings for: 1. Mid-2007 iMac (iMac7,1) 2. Late-2007 MacBook (MacBook3,1)
* Auto-detect the UGA frame buffer and stride on a MacBook. We'remarcel2015-09-051-47/+88
| | | | | | | | striking a delicate balance between exhaustive searching and banking on assumptions. The environment variables can be used as a fall-back anyway. With this change, all known and tested Macs with only UGA should have a working console out of the box... for now...
* My MacBook has UGA only, but we fail to detect any changesmarcel2015-09-051-24/+50
| | | | | | | | | in the frame buffer when we flip pixels. Allow the detection to be bypassed by setting the uga_framebuffer and uga_stride variables. The kernel console works fine even when we can't detect pixel changes in the frame buffer, which indicates that the problem could be with reading from the frame buffer and not writing to it.
* For UGA, the frame buffer address obtained by scanning themarcel2015-09-031-52/+175
| | | | | | | | | | | | PCI BARs does not necessarily correspond to the upper-left most pixel. Scan the frame buffer for which byte changed when changing the pixel at (0,0). Use the same technique to determine the stride. Except for changing the pixel at (0,0), we change the pixel at (0,1). PR: 202730 Tested by: hartzell (at) alerce.com
* Add support for the UGA draw protocol. This includes adding amarcel2015-08-301-56/+196
| | | | | | | | | | | | | | | | | command called 'uga' to show whether UGA is implemented by the firmware and what the settings are. It also includes filling the efi_fb structure from the UGA information when GOP isn't implemented by the firmware. Since UGA does not provide information about the stride, we set the stride to the horizontal resolution. This is likely not correct and we should determine the stride by trial and error. For now, this should show something on the console rather than nothing. Refactor this file to maximize code reuse. PR: 202730
* Add a gop command to help diagnose VT efifb problems. The gopmarcel2015-08-301-0/+95
| | | | | | | command has the following sub-commands: list - list all possible modes (paged) get - return the current mode set <mode> - set the current mode to <mode>
* Move the efi loaders to be under sys/boot/efi. This will help us addandrew2015-04-011-0/+85
support for booting arm and arm64 from UEFI. Differential Revision: https://reviews.freebsd.org/D2164 Reviewed by: emaste, imp (previous version) Sponsored by: The FreeBSD Foundation
OpenPOWER on IntegriCloud