Age | Commit message (Collapse) | Author |
|
|
|
|
|
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
|
|
|
|
Even though the toolchain implicitly links against -lc, it does not know
where it should get LibC from except for the sysroot. In the case of
Clang this causes it to pick up the LibC stub instead, which might be
slightly outdated and feature missing symbols.
This is currently not an issue that manifests because we pass through
the dependency on LibC and other libraries by accident, which causes
CMake to link against the LibC target (instead of just the library),
and thus points the linker at the build output directory.
Since we are looking to fix that in the upcoming commits, let's make
sure that everything will still be able to find the proper LibC first.
|
|
Doesn't use them in libc headers so that those don't have to pull in
AK/Platform.h.
AK_COMPILER_GCC is set _only_ for gcc, not for clang too. (__GNUC__ is
defined in clang builds as well.) Using AK_COMPILER_GCC simplifies
things some.
AK_COMPILER_CLANG isn't as much of a win, other than that it's
consistent with AK_COMPILER_GCC.
|
|
We simply don't need that field anymore, as it was used when one
FramebufferDevice could contain multiple framebuffers within it, each
for a connected screen head.
|
|
LLVM 15 now warns (and thus errors) about this, and there is really no
point in keeping them.
|
|
This header file represents the entire interface between the kernel and
userland, and as such, no longer should be called FB.h but something
that represents the whole graphics subsystem.
|
|
|
|
Error::from_string_literal now takes direct char const*s, while
Error::from_string_view does what Error::from_string_literal used to do:
taking StringViews. This change will remove the need to insert `sv`
after error strings when returning string literal errors once
StringView(char const*) is removed.
No functional changes.
|
|
This commit moves the length calculations out to be directly on the
StringView users. This is an important step towards the goal of removing
StringView(char const*), as it moves the responsibility of calculating
the size of the string to the user of the StringView (which will prevent
naive uses causing OOB access).
|
|
Before of this patch, It happened that the return string could be "@@@",
as a result of doing mathematical addition of ASCII '@' with bits when
decoding the packed manufacturer ID bytes from the EDID.
To avoid this, consider m_legacy_manufacturer_id to be invalid until we
successfully decode the packed bytes.
|
|
|
|
|
|
This will be used later in the kernel code to simplify the EDID handling
code.
|
|
|
|
The stored value is in units of 10 kHz, which means that to get the
value in kHz, we need to multiply it by 10 and not 10000.
|
|
This API is only used by userland and it uses infallible Strings, so
let's just ifdef it out of the Kernel.
|
|
These APIs return Strings, which are OOM-infallibe, and as such, not
appropriate for Kernel use. Since these APIs are only used by userland
at the moment, we can just ifdef them out of the Kernel.
|
|
This also let's us use a KString instead of a string when we're in the
Kernel, which opens the path for OOM-failure propagation.
|
|
This also let's us use a KString instead of a string when we're in the
Kernel, which opens the path for OOM-failure propagation.
|
|
Code generators that generate their files for both Lagom and Serenity
have a blob in their CMake file like this:
set(TIME_ZONE_DATA_HEADER LibTimeZone/TimeZoneData.h)
set(TIME_ZONE_DATA_IMPLEMENTATION LibTimeZone/TimeZoneData.cpp)
set(TIME_ZONE_META_TARGET_PREFIX LibTimeZone_)
if (CMAKE_CURRENT_BINARY_DIR MATCHES ".*/LibTimeZone")
# Serenity build.
set(TIME_ZONE_DATA_HEADER TimeZoneData.h)
set(TIME_ZONE_DATA_IMPLEMENTATION TimeZoneData.cpp)
set(TIME_ZONE_META_TARGET_PREFIX "")
endif()
LibEDID generates files only for Serenity, but was using the Lagom build
version of the _HEADER, _IMPLEMENTATION, and _PREFIX variables. Thus if
pnp_ids.cmake was ever touched, the following error would be raised:
Userland/Libraries/LibEDID/EDID.cpp:18:18: fatal error:
LibEDID/PnpIDs.h: No such file or directory
18 | # include <LibEDID/LibEDID/PnpIDs.h>
Use the Serenity paths in pnp_ids.cmake and in the #include within
LibEDID itself.
|
|
Apologies for the enormous commit, but I don't see a way to split this
up nicely. In the vast majority of cases it's a simple change. A few
extra places can use TRY instead of manual error checking though. :^)
|
|
We weren't properly iterating the extension blocks and thought we
encountered an unexpected extension map block, when we really should
have just skipped over it.
|
|
The vertical values need to be multiplied with 2 for interlaced modes.
|
|
This downloads the UEFI's published PNP ID database and generates a
lookup table for use in LibEDID. The lookup table isn't optimized at
all, but this can be easily done at a later point if needed.
|
|
|
|
This library can be used (for the most part) by kernel drivers as well
as user mode. For this reason FixedPoint is used rather than floating
point, but kept to a minimum.
|