coreboot-kgpe-d16/src
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 acpi/acpigen_dptf: Add pkg return to dptf_write_power_limits() 2023-02-14 05:39:57 +00:00
arch arch/x86/smbios: use cpu_cpuid_extended_level instead of open coding it 2023-02-21 20:14:43 +00:00
commonlib commonlib/bsd, libpayload: Do not include helpers.h in stddef.h 2023-02-16 17:55:37 +00:00
console console: Add SimNow console logging 2023-02-09 10:01:20 +00:00
cpu cpu/amd/pi/00730F01/model_16_init: use CPUID_FROM_FMS macro 2023-02-17 22:59:28 +00:00
device device: Add Kconfig options for D3COLD_SUPPORT and NO_S0IX_SUPPORT 2023-02-17 13:25:20 +00:00
drivers vga: Fix the support of extended ASCII 2023-02-21 21:31:25 +00:00
ec treewide: Remove useless "_STA: Status" comment 2023-02-19 11:20:37 +00:00
include cpu/x86/smm: Enable setting SMM console log level from mainboard 2023-02-15 21:53:07 +00:00
lib tree: Use __func__ instead of hard-coded names 2023-02-17 16:08:04 +00:00
mainboard mb/google/skyrim/var/markarth: Update Elan touchscreen power sequence 2023-02-21 14:58:07 +00:00
northbridge nb/intel/pineview/raminit.c: Get rid of duplicated branches 2023-02-17 16:01:33 +00:00
sbom payloads/Yabits: Remove deprecated Yabits Payload 2023-02-17 01:21:43 +00:00
security vboot: Fix reboot loop in recovery with VBOOT_CBFS_INTEGRATION 2023-02-21 01:36:50 +00:00
soc soc/amd/common/include/psp_efs: rename new PSP directory EFS entry 2023-02-20 15:39:30 +00:00
southbridge treewide: Remove unuseful "_ADR: Address" comment 2023-02-17 15:41:37 +00:00
superio treewide: Remove useless "_STA: Status" comment 2023-02-19 11:20:37 +00:00
vendorcode vc/intel/fsp/mtl: Update header files from 2473_86 to 2523_80 2023-02-17 07:52:31 +00:00
Kconfig tree: Drop repeated words 2023-02-07 04:37:31 +00:00