summaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorHsuan Ting Chen <roccochen@chromium.org>2023-02-17 19:36:38 +0800
committerFelix Held <felix-coreboot@felixheld.de>2023-02-21 21:31:25 +0000
commitde74711dc8bd7eceb9d9c13fb24a2cee40d47009 (patch)
tree5616948a98fc31ed135a0d762b5d83a0a0a518ce /.gitignore
parent73e9ac66ad8ff8f4b15389b5685f808ac20e204c (diff)
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>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions