mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
6b289a1423
This patch replaces the former prominent use of pointers by references wherever feasible. This has the following benefits: * The contract between caller and callee becomes more obvious. When passing a reference, the contract says that the argument cannot be a null pointer. The caller is responsible to ensure that. Therefore, the use of reference eliminates the need to add defensive null-pointer checks at the callee site, which sometimes merely exist to be on the safe side. The bottom line is that the code becomes easier to follow. * Reference members must be initialized via an object initializer, which promotes a programming style that avoids intermediate object- construction states. Within core, there are still a few pointers as member variables left though. E.g., caused by the late association of 'Platform_thread' objects with their 'Platform_pd' objects. * If no pointers are present as member variables, we don't need to manually provide declarations of a private copy constructor and an assignment operator to avoid -Weffc++ errors "class ... has pointer data members [-Werror=effc++]". This patch also changes a few system bindings on NOVA and Fiasco.OC, e.g., the return value of the global 'cap_map' accessor has become a reference. Hence, the patch touches a few places outside of core. Fixes #3135 |
||
---|---|---|
.. | ||
etc | ||
include | ||
lib | ||
mk | ||
ports | ||
recipes | ||
run | ||
src | ||
xsd | ||
README |
This is generic part of the Genode implementation. It consists of two parts: :_Core_: is the ultimate root of the Genode application tree and provides abstractions for the lowest-level hardware resources such as RAM, ROM, CPU, and generic device access. All generic parts of Core can be found here - for system-specific implementations refer to the appropriate 'base-<system>' directory. :_Base libraries and protocols_: that are used by each Genode component to interact with other components. This is the glue that holds everything together. _Core_ may export information about the hardware platform by an ROM called 'platform_info'. Depending on the platform, e.g. ARM or x86 or riscv, and depending on the boot mode and boot loader and kernel, some nodes may not be populated. !<platform_info> ! <acpi revision="2" rsdt="0x1fe93074" xsdt="0x1fe930e8"/> ! <boot> ! <framebuffer phys="0x7300000" width="1024" height="768" bpp="32"/> ! </boot> !</platform_info> If the ACPI RSDT and XSDT physical pointer is reported by the used kernel and/or bootloader, _Core_ may provide this information by the ROM. If the graphic device is initialised and can be directly used by a framebuffer driver, _Core_ may provide the physical pointer to the framebuffer, the resolution and color depth in bits.