coreboot/src/drivers
Hsuan Ting Chen de74711dc8 vga: Fix the support of extended ASCII
VGA defineds the extended ASCII set based on CP437, but there is a bug
on printing them: in vga_write_at_offset(), we perform a bitwise or
between 'unsigned short' and 'signed char':

```
    p[i] = 0x0F00 | string[i];
```

If we want to show an extended ASCII character, string[i] will be
negative and this bitwise operation will fail due to their implicit
casting rule: convert signed char to unsigned short by adding 65536.

To fix this, we need to cast the string to unsigned char manually
somewhere. Since we still want to leverage the built-in string utilities
which only accepts const char*, we still preserve the original
prototypes before, and cast it until we write into the frame buffer.

BRANCH=brya
BUG=b:264666392
TEST=emerge-brya coreboot chromeos-bootimage
     and verify drawing characters with code > 127.

Change-Id: I9cd65fe9794e5b0d338147924f28efd27fc8a1e8
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73090
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
2023-02-21 21:31:25 +00:00
..
acpi/thermal_zone drivers/acpi: Add a chip driver to generate thermal zone 2021-05-20 08:01:11 +00:00
amd treewide: Remove unused <cpu/amd/mtrr.h> 2023-01-12 05:07:21 +00:00
ams include/bcd: move bcd code to commonlib/bsd/include 2021-08-23 14:08:47 +00:00
analogix/anx7625 treewide: Remove "ERROR: "/"WARN: " prefixes from log messages 2022-02-07 23:29:09 +00:00
asmedia src: Remove leading blank lines from SPDX header 2020-05-18 07:00:27 +00:00
aspeed src/drivers: Remove unnecessary space after casts 2022-11-22 13:40:56 +00:00
broadcom src: Make PCI ID define names shorter 2022-03-07 08:32:09 +00:00
camera treewide: Unify Google branding 2022-07-04 14:02:26 +00:00
crb Revert "security/tpm/: turn tis_{init,open} into tis_probe" 2022-12-23 21:31:11 +00:00
elog drivers/elog/gsmi.c: Fix compiling for 64bit 2022-09-01 16:43:33 +00:00
emulation/qemu treewide: Include <device/mmio.h> instead of <arch/mmio.h> 2022-12-10 05:07:14 +00:00
generic drivers/generic/nau8315: Change method for HID assignment 2022-12-17 20:29:15 +00:00
genesyslogic drivers/genesyslogic/gl9763e: Add set L1 entry delay to Max for GL9763E 2022-03-22 03:45:30 +00:00
gfx/generic drivers/gfx/generic: Add optional _HID for gfx devices 2021-12-01 22:04:12 +00:00
i2c drivers/i2c/nau8825: Fix typo: deboune -> debounce 2023-02-14 11:39:08 +00:00
intel drivers/fsp2: Don't print garbage if the FSP signature doesn't match 2023-02-10 15:52:40 +00:00
ipmi drivers/ipmi/ipmi_ops.c: Fix typo in error message 2022-12-09 17:07:21 +00:00
lenovo drivers: Remove unused <acpi/acpi.h> 2022-04-24 17:41:26 +00:00
maxim drivers/maxim/max77686/max77686.h: Remove repeated word 2021-01-18 07:39:21 +00:00
mipi src/drivers: Clean up includes 2022-10-26 16:38:45 +00:00
mrc_cache treewide: Fix old-style declarations 2023-01-17 04:23:49 +00:00
net drivers/net/r8168: Demote MAC lookup printk from error to warn 2023-02-10 08:28:20 +00:00
nxp/uwb mb/google/brya/var/ghost: Enable NXP UWB SR150 chip 2022-08-17 19:46:07 +00:00
ocp drivers/ocp/vpd: Override mainboard_set_smm_log_level 2023-02-16 00:47:11 +00:00
parade commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
pc80 vga: Fix the support of extended ASCII 2023-02-21 21:31:25 +00:00
pcie soc/intel/cmn/block/{pcie/rtd3,usb4}: Use helper functions for _DSD 2022-12-05 14:32:04 +00:00
ricoh/rce822 src: Make PCI ID define names shorter 2022-03-07 08:32:09 +00:00
secunet/dmi treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
siemens/nc_fpga treewide: Remove duplicated include <device/pci.h> 2023-02-01 03:03:34 +00:00
sil/3114 treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
smbus drivers/smbus: initialize SC16IS7XX I2C to UART converter chip 2022-10-03 16:14:25 +00:00
smmstore drivers/smmstore: Fix fmap_config.h dependency 2023-02-13 12:52:11 +00:00
soundwire device/mipi: Move to drivers/mipi 2021-08-26 15:18:45 +00:00
spi drivers/spi/acpi: Drop 'disable_gpio_export_in_crs' flag 2023-01-15 02:02:01 +00:00
ti commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
tpm drivers/tpm: Move TPM init to end of device init phase 2022-10-20 17:22:57 +00:00
uart treewide: Remove duplicated include <device/pci.h> 2023-02-01 03:03:34 +00:00
usb treewide: Remove duplicated include <device/pci.h> 2023-02-01 03:03:34 +00:00
vpd drivers/vpd: Demote FMAP not found printk from error to warn 2023-02-10 08:28:49 +00:00
wifi/generic treewide: Remove duplicated include <device/pci.h> 2023-02-01 03:03:34 +00:00
wwan/fm drivers/wwan/fm: Fix typo 2022-12-14 06:51:15 +00:00