From 00ac4afb9f4f01026b437a536f9eca5da2cfe78b Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 13 Oct 2022 09:04:58 +0200 Subject: [PATCH 0001/1921] acpica: make battery report working for thinkpads tested on T460p, X201, T470p by periodically checking and reporting. Issue #4631 --- repos/libports/recipes/pkg/acpica/runtime | 4 +- repos/libports/run/acpica.run | 2 +- repos/libports/src/app/acpica/README | 2 +- repos/libports/src/app/acpica/ec.h | 4 +- repos/libports/src/app/acpica/os.cc | 135 ++++++++++++---------- 5 files changed, 81 insertions(+), 66 deletions(-) diff --git a/repos/libports/recipes/pkg/acpica/runtime b/repos/libports/recipes/pkg/acpica/runtime index 3df07ea803..e2cd58d221 100644 --- a/repos/libports/recipes/pkg/acpica/runtime +++ b/repos/libports/recipes/pkg/acpica/runtime @@ -1,4 +1,4 @@ - + @@ -16,6 +16,6 @@ - + diff --git a/repos/libports/run/acpica.run b/repos/libports/run/acpica.run index cd180a7290..8055927ecf 100644 --- a/repos/libports/run/acpica.run +++ b/repos/libports/run/acpica.run @@ -184,7 +184,7 @@ set config { - + diff --git a/repos/libports/src/app/acpica/README b/repos/libports/src/app/acpica/README index 5c654b8d53..c89b9d28af 100644 --- a/repos/libports/src/app/acpica/README +++ b/repos/libports/src/app/acpica/README @@ -46,7 +46,7 @@ Excerpt of important parts of the acpica configuration ! ! ! ... -! +! ! ! ! diff --git a/repos/libports/src/app/acpica/ec.h b/repos/libports/src/app/acpica/ec.h index 173568cbac..44f70943ba 100644 --- a/repos/libports/src/app/acpica/ec.h +++ b/repos/libports/src/app/acpica/ec.h @@ -80,10 +80,8 @@ class Ec : Acpica::Callback { State::access_t state = ec->ec_cmdsta->inb(ec->ec_port_cmdsta); - if (!State::Sci_evt::get(state)) { - Genode::error("unknown status ", Genode::Hex(state)); + if (!State::Sci_evt::get(state)) return ACPI_REENABLE_GPE; /* gpe is acked and re-enabled */ - } ec->ec_cmdsta->outb(ec->ec_port_cmdsta, QR_EC); do { diff --git a/repos/libports/src/app/acpica/os.cc b/repos/libports/src/app/acpica/os.cc index 0a576a90a5..869966a8d2 100644 --- a/repos/libports/src/app/acpica/os.cc +++ b/repos/libports/src/app/acpica/os.cc @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2016-2017 Genode Labs GmbH + * Copyright (C) 2016-2022 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -45,14 +46,17 @@ namespace Acpica { #include "fixed.h" +using namespace Genode; + + struct Acpica::Statechange { - Genode::Signal_handler _dispatcher; - Genode::Attached_rom_dataspace _system_state; + Signal_handler _dispatcher; + Attached_rom_dataspace _system_state; bool _enable_reset; bool _enable_poweroff; - Statechange(Genode::Env &env, bool reset, bool poweroff) + Statechange(Env &env, bool reset, bool poweroff) : _dispatcher(env.ep(), *this, &Statechange::state_changed), _system_state(env, "system"), @@ -69,17 +73,16 @@ struct Acpica::Statechange if (!_system_state.valid()) return; - Genode::Xml_node system(_system_state.local_addr(), - _system_state.size()); + Xml_node system(_system_state.local_addr(), + _system_state.size()); - typedef Genode::String<32> State; + typedef String<32> State; State const state = system.attribute_value("state", State()); if (_enable_poweroff && state == "poweroff") { ACPI_STATUS res0 = AcpiEnterSleepStatePrep(5); ACPI_STATUS res1 = AcpiEnterSleepState(5); - Genode::error("system poweroff failed - " - "res=", Genode::Hex(res0), ",", Genode::Hex(res1)); + error("system poweroff failed - res=", Hex(res0), ",", Hex(res1)); return; } @@ -89,25 +92,29 @@ struct Acpica::Statechange res = AcpiReset(); } catch (...) { } - Genode::uint64_t const space_addr = AcpiGbl_FADT.ResetRegister.Address; - Genode::error("system reset failed - " - "err=", res, " " - "reset=", !!(AcpiGbl_FADT.Flags & ACPI_FADT_RESET_REGISTER), " " - "spaceid=", Genode::Hex(AcpiGbl_FADT.ResetRegister.SpaceId), " " - "addr=", Genode::Hex(space_addr)); + uint64_t const space_addr = AcpiGbl_FADT.ResetRegister.Address; + error("system reset failed - err=", res, + " reset=", !!(AcpiGbl_FADT.Flags & ACPI_FADT_RESET_REGISTER), + " spaceid=", Hex(AcpiGbl_FADT.ResetRegister.SpaceId), + " addr=", Hex(space_addr)); } } }; + struct Acpica::Main { - Genode::Env &env; - Genode::Heap heap { env.ram(), env.rm() }; + Env &env; + Heap heap { env.ram(), env.rm() }; - Genode::Attached_rom_dataspace config { env, "config" }; + Attached_rom_dataspace config { env, "config" }; - Genode::Signal_handler sci_irq; - Genode::Constructible sci_conn; + Signal_handler sci_irq; + Constructible sci_conn; + + Timer::Connection timer { env }; + Signal_handler timer_trigger { env.ep(), *this, + &Main::handle_timer }; Acpica::Reportstate * report { nullptr }; @@ -115,25 +122,25 @@ struct Acpica::Main unsigned unchanged_state_max; static struct Irq_handler { - UINT32 irq; - Genode::Irq_session::Trigger trigger; - Genode::Irq_session::Polarity polarity; - - ACPI_OSD_HANDLER handler; - void *context; + UINT32 irq; + Irq_session::Trigger trigger; + Irq_session::Polarity polarity; + ACPI_OSD_HANDLER handler; + void *context; } irq_handler; void init_acpica(); - Main(Genode::Env &env) + Main(Env &env) : env(env), sci_irq(env.ep(), *this, &Main::acpi_irq), - unchanged_state_max(config.xml().attribute_value("update_unchanged", 20U)) + unchanged_state_max(config.xml().attribute_value("update_unchanged", 10U)) { bool const enable_reset = config.xml().attribute_value("reset", false); bool const enable_poweroff = config.xml().attribute_value("poweroff", false); bool const enable_report = config.xml().attribute_value("report", false); + auto const periodic_ms = config.xml().attribute_value("report_period_ms", 0ULL); if (enable_report) report = new (heap) Acpica::Reportstate(env); @@ -148,19 +155,37 @@ struct Acpica::Main /* setup IRQ */ if (!irq_handler.handler) { - Genode::warning("no IRQ handling available"); + warning("no IRQ handling available"); return; } sci_conn.construct(env, irq_handler.irq, irq_handler.trigger, irq_handler.polarity); - Genode::log("SCI IRQ: ", irq_handler.irq, - " (", irq_handler.trigger, "-", irq_handler.polarity, ")"); + log("SCI IRQ: ", irq_handler.irq, " (", irq_handler.trigger, "-", + irq_handler.polarity, ")"); sci_conn->sigh(sci_irq); sci_conn->ack_irq(); + + if (periodic_ms) { + timer.sigh(timer_trigger); + timer.trigger_periodic(Microseconds(periodic_ms * 1000).value); + } } + + void handle_timer() + { + if (!irq_handler.handler) + return; + + irq_handler.handler(irq_handler.context); + + if (report) + report->generate_report(true /* force */); + } + + void acpi_irq() { if (!irq_handler.handler) @@ -182,9 +207,6 @@ struct Acpica::Main unchanged_state_count ++; if (unchanged_state_count >= unchanged_state_max) { - Genode::log("generate report because of ", - unchanged_state_count, " irqs without state " - "changes"); report->generate_report(true); unchanged_state_count = 0; } @@ -228,31 +250,29 @@ void Acpica::Main::init_acpica() if (false) { AcpiDbgLevel |= ACPI_LV_IO | ACPI_LV_INTERRUPTS | ACPI_LV_INIT_NAMES; AcpiDbgLayer |= ACPI_TABLES; - Genode::log("debugging level=", Genode::Hex(AcpiDbgLevel), - " layers=", Genode::Hex(AcpiDbgLayer)); + log("debugging level=", Hex(AcpiDbgLevel), + " layers=", Hex(AcpiDbgLayer)); } ACPI_STATUS status = AcpiInitializeSubsystem(); if (status != AE_OK) { - Genode::error("AcpiInitializeSubsystem failed, status=", status); + error("AcpiInitializeSubsystem failed, status=", status); return; } status = AcpiInitializeTables(nullptr, 0, true); if (status != AE_OK) { - Genode::error("AcpiInitializeTables failed, status=", status); + error("AcpiInitializeTables failed, status=", status); return; } status = AcpiLoadTables(); if (status != AE_OK) { - Genode::error("AcpiLoadTables failed, status=", status); + error("AcpiLoadTables failed, status=", status); return; } { - using Genode::Irq_session; - /* * ACPI Spec 2.1 General ACPI Terminology * @@ -269,8 +289,6 @@ void Acpica::Main::init_acpica() ACPI_STATUS status = AcpiGetTable(ACPI_STRING(ACPI_SIG_MADT), 0, (ACPI_TABLE_HEADER **)&madt); if (status == AE_OK) { - using Genode::String; - for_each_element(madt, (ACPI_SUBTABLE_HEADER *) nullptr, [&](ACPI_SUBTABLE_HEADER const * const s) { @@ -313,89 +331,88 @@ void Acpica::Main::init_acpica() status = AcpiEnableSubsystem(ACPI_FULL_INITIALIZATION); if (status != AE_OK) { - Genode::error("AcpiEnableSubsystem failed, status=", status); + error("AcpiEnableSubsystem failed, status=", status); return; } status = AcpiInitializeObjects(ACPI_NO_DEVICE_INIT); if (status != AE_OK) { - Genode::error("AcpiInitializeObjects (no devices) failed, status=", status); + error("AcpiInitializeObjects (no devices) failed, status=", status); return; } /* set APIC mode */ status = init_pic_mode(); if (status != AE_OK) { - Genode::error("Setting PIC mode failed, status=", status); + error("Setting PIC mode failed, status=", status); return; } /* Embedded controller */ status = AcpiGetDevices(ACPI_STRING("PNP0C09"), Ec::detect, this, nullptr); if (status != AE_OK) { - Genode::error("AcpiGetDevices failed, status=", status); + error("AcpiGetDevices failed, status=", status); return; } status = AcpiInitializeObjects(ACPI_FULL_INITIALIZATION); if (status != AE_OK) { - Genode::error("AcpiInitializeObjects (full init) failed, status=", status); + error("AcpiInitializeObjects (full init) failed, status=", status); return; } status = AcpiUpdateAllGpes(); if (status != AE_OK) { - Genode::error("AcpiUpdateAllGpes failed, status=", status); + error("AcpiUpdateAllGpes failed, status=", status); return; } status = AcpiEnableAllRuntimeGpes(); if (status != AE_OK) { - Genode::error("AcpiEnableAllRuntimeGpes failed, status=", status); + error("AcpiEnableAllRuntimeGpes failed, status=", status); return; } - /* note: ACPI_EVENT_PMTIMER claimed by nova kernel - not usable by us */ Fixed * acpi_fixed = new (heap) Fixed(report); status = AcpiInstallFixedEventHandler(ACPI_EVENT_POWER_BUTTON, Fixed::handle_power_button, acpi_fixed); if (status != AE_OK) - Genode::log("failed - power button registration - error=", status); + log("failed - power button registration - error=", status); status = AcpiInstallFixedEventHandler(ACPI_EVENT_SLEEP_BUTTON, Fixed::handle_sleep_button, acpi_fixed); if (status != AE_OK) - Genode::log("failed - sleep button registration - error=", status); + log("failed - sleep button registration - error=", status); /* AC Adapters and Power Source Objects */ status = AcpiGetDevices(ACPI_STRING("ACPI0003"), Ac::detect, this, nullptr); if (status != AE_OK) { - Genode::error("AcpiGetDevices (ACPI0003) failed, status=", status); + error("AcpiGetDevices (ACPI0003) failed, status=", status); return; } /* Smart battery control devices */ status = AcpiGetDevices(ACPI_STRING("PNP0C0A"), Battery::detect, this, nullptr); if (status != AE_OK) { - Genode::error("AcpiGetDevices (PNP0C0A) failed, status=", status); + error("AcpiGetDevices (PNP0C0A) failed, status=", status); return; } /* LID device */ status = AcpiGetDevices(ACPI_STRING("PNP0C0D"), Lid::detect, this, nullptr); if (status != AE_OK) { - Genode::error("AcpiGetDevices (PNP0C0D) failed, status=", status); + error("AcpiGetDevices (PNP0C0D) failed, status=", status); return; } /* Fujitsu HID device */ status = AcpiGetDevices(ACPI_STRING("FUJ02E3"), Fuj02e3::detect, this, nullptr); if (status != AE_OK) { - Genode::error("AcpiGetDevices (FUJ02E3) failed, status=", status); + error("AcpiGetDevices (FUJ02E3) failed, status=", status); return; } } @@ -408,7 +425,7 @@ ACPI_STATUS AcpiOsInstallInterruptHandler(UINT32 irq, ACPI_OSD_HANDLER handler, void *context) { if (irq != Acpica::Main::irq_handler.irq) { - Genode::error("SCI interrupt is ", Acpica::Main::irq_handler.irq, + error("SCI interrupt is ", Acpica::Main::irq_handler.irq, " but library requested ", irq); return AE_BAD_PARAMETER; } @@ -419,7 +436,7 @@ ACPI_STATUS AcpiOsInstallInterruptHandler(UINT32 irq, ACPI_OSD_HANDLER handler, } -void Component::construct(Genode::Env &env) +void Component::construct(Env &env) { /* XXX execute constructors of global statics */ env.exec_static_constructors(); From 2edf02dccb283a68c37ddca28801298dbfc01096 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 12 Oct 2022 20:44:52 +0200 Subject: [PATCH 0002/1921] themed_decorator: break link dependency to theme plain_decorator_theme.tar is not linked to the app but must be generated as side effect. Therefore, use CUSTOM_TARGET_DEPS to trigger the generation. Fixes #4637 --- repos/gems/src/app/themed_decorator/target.mk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/repos/gems/src/app/themed_decorator/target.mk b/repos/gems/src/app/themed_decorator/target.mk index e5a0470828..35f11a47f3 100644 --- a/repos/gems/src/app/themed_decorator/target.mk +++ b/repos/gems/src/app/themed_decorator/target.mk @@ -3,8 +3,13 @@ SRC_CC = main.cc theme.cc window.cc LIBS = base libc libpng zlib blit file INC_DIR += $(PRG_DIR) +CUSTOM_TARGET_DEPS += plain_decorator_theme.tar + +BUILD_ARTIFACTS := $(TARGET) plain_decorator_theme.tar + .PHONY: plain_decorator_theme.tar -$(TARGET): plain_decorator_theme.tar plain_decorator_theme.tar: - $(VERBOSE)cd $(PRG_DIR); tar cf $(PWD)/bin/$@ theme + $(MSG_CONVERT)$@ + $(VERBOSE)tar -cf $@ -C $(PRG_DIR) theme + $(VERBOSE)ln -sf $(BUILD_BASE_DIR)/$(PRG_REL_DIR)/$@ $(INSTALL_DIR)/$@ From c086eb088dbd1568a4224fcd3ccf288090376e40 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 12 Oct 2022 15:45:57 +0200 Subject: [PATCH 0003/1921] vmm_x86: guest code page in separate asm file Implement the guest code in dedicated assembler source file, assemble and link the binary to vmm_x86. The resulting guest-code binary populates one page that is mapped to host the reset vector of the guest. This approach simplifies future guest code adaption resp. extension, e.g., to test rdmsr/wrmsr exiting. Fixes #4638 --- repos/os/run/vmm_x86.run | 30 +++++++++++----------- repos/os/src/test/vmm_x86/component.cc | 13 +++------- repos/os/src/test/vmm_x86/guest.s | 35 ++++++++++++++++++++++++++ repos/os/src/test/vmm_x86/target.mk | 10 ++++++++ 4 files changed, 64 insertions(+), 24 deletions(-) create mode 100644 repos/os/src/test/vmm_x86/guest.s diff --git a/repos/os/run/vmm_x86.run b/repos/os/run/vmm_x86.run index 169eb9b428..7541cf6685 100644 --- a/repos/os/run/vmm_x86.run +++ b/repos/os/run/vmm_x86.run @@ -208,7 +208,7 @@ compare_output_to { [init -> vmm] vcpu 0 : created vcpu 0 : XX. vm exit - reason 0xfe handled by 'ep' vcpu 0 : XX. vm exit - reason 0x78 handled by 'ep' -vcpu 0 : XX. vm exit - halting vCPU - guest called HLT - ip=0xfff3 +vcpu 0 : XX. vm exit - halting vCPU - guest called HLT - ip=0xff81 } puts $output_1 @@ -217,19 +217,19 @@ compare_output_to { [init -> vmm] vcpu 1 : created vcpu 1 : XX. vm exit - reason 0xfe handled by 'ep' vcpu 1 : XX. vm exit - reason 0x78 handled by 'ep' -vcpu 1 : XX. vm exit - halting vCPU - guest called HLT - ip=0xfff3 +vcpu 1 : XX. vm exit - halting vCPU - guest called HLT - ip=0xff81 vcpu 1 : XX. vm exit - reason 0xff handled by 'ep' -vcpu 1 : XX. vm exit - due to pause() request - ip=0xfff3 +vcpu 1 : XX. vm exit - due to pause() request - ip=0xff81 vcpu 1 : XX. vm exit - reason 0x78 handled by 'ep' -vcpu 1 : XX. vm exit - halting vCPU - guest called HLT - ip=0xfff3 +vcpu 1 : XX. vm exit - halting vCPU - guest called HLT - ip=0xff81 vcpu 1 : XX. vm exit - reason 0xff handled by 'ep' -vcpu 1 : XX. vm exit - due to pause() request - ip=0xfff3 +vcpu 1 : XX. vm exit - due to pause() request - ip=0xff81 vcpu 1 : XX. vm exit - reason 0xff handled by 'ep' -vcpu 1 : XX. vm exit - due to pause() request - ip=0xfff5 +vcpu 1 : XX. vm exit - due to pause() request - ip=0xff83 vcpu 1 : XX. vm exit - reason 0x78 handled by 'ep' -vcpu 1 : XX. vm exit - halting vCPU - guest called HLT - ip=0xfff7 +vcpu 1 : XX. vm exit - halting vCPU - guest called HLT - ip=0xff85 vcpu 1 : XX. vm exit - reason 0xff handled by 'ep' -vcpu 1 : XX. vm exit - due to pause() request - ip=0xfff7 +vcpu 1 : XX. vm exit - due to pause() request - ip=0xff85 } puts $output_2 @@ -238,17 +238,17 @@ compare_output_to { [init -> vmm] vcpu 2 : created vcpu 2 : XX. vm exit - reason 0xfe handled by 'second ep' vcpu 2 : XX. vm exit - reason 0x78 handled by 'second ep' -vcpu 2 : XX. vm exit - halting vCPU - guest called HLT - ip=0xfff3 +vcpu 2 : XX. vm exit - halting vCPU - guest called HLT - ip=0xff81 vcpu 2 : XX. vm exit - reason 0xff handled by 'second ep' -vcpu 2 : XX. vm exit - due to pause() request - ip=0xfff3 +vcpu 2 : XX. vm exit - due to pause() request - ip=0xff81 vcpu 2 : XX. vm exit - reason 0x78 handled by 'second ep' -vcpu 2 : XX. vm exit - halting vCPU - guest called HLT - ip=0xfff3 +vcpu 2 : XX. vm exit - halting vCPU - guest called HLT - ip=0xff81 vcpu 2 : XX. vm exit - reason 0xff handled by 'second ep' -vcpu 2 : XX. vm exit - due to pause() request - ip=0xfff3 +vcpu 2 : XX. vm exit - due to pause() request - ip=0xff81 vcpu 2 : XX. vm exit - reason 0x78 handled by 'second ep' -vcpu 2 : XX. vm exit - halting vCPU - guest called HLT - ip=0xfff4 +vcpu 2 : XX. vm exit - halting vCPU - guest called HLT - ip=0xff82 vcpu 2 : XX. vm exit - reason 0xff handled by 'second ep' -vcpu 2 : XX. vm exit - due to pause() request - ip=0xfff4 +vcpu 2 : XX. vm exit - due to pause() request - ip=0xff82 } puts $output_3 @@ -257,7 +257,7 @@ compare_output_to { [init -> vmm] vcpu 3 : created vcpu 3 : XX. vm exit - reason 0xfe handled by 'second ep' vcpu 3 : XX. vm exit - reason 0x78 handled by 'second ep' -vcpu 3 : XX. vm exit - halting vCPU - guest called HLT - ip=0xfff3 +vcpu 3 : XX. vm exit - halting vCPU - guest called HLT - ip=0xff81 } set output $output_saved diff --git a/repos/os/src/test/vmm_x86/component.cc b/repos/os/src/test/vmm_x86/component.cc index 408c1088e2..e5ed5e0b41 100644 --- a/repos/os/src/test/vmm_x86/component.cc +++ b/repos/os/src/test/vmm_x86/component.cc @@ -216,6 +216,9 @@ class Vmm::Vcpu }; +extern char _binary_guest_bin_start[]; +extern char _binary_guest_bin_end[]; + class Vmm::Vm { private: @@ -295,17 +298,9 @@ class Vmm::Vm /* prepare guest memory with some instructions for testing */ uint8_t * guest = env.rm().attach(_memory); - unsigned byte = 0xff0; - guest[byte++] = 0x0f; /* rdtscp */ - guest[byte++] = 0x01; - guest[byte++] = 0xf9; + memcpy(guest, &_binary_guest_bin_start, 4096); - guest[byte++] = 0xf4; /* HLT instruction */ - guest[byte++] = 0xf4; /* HLT instruction */ - guest[byte++] = 0xeb; /* JMP - endless loop to RIP */ - guest[byte++] = 0xfe; /* JMP of -2 byte (size of JMP inst) */ - guest[byte++] = 0xf4; /* HLT instruction */ env.rm().detach(guest); log ("let vCPUs run - first EP"); diff --git a/repos/os/src/test/vmm_x86/guest.s b/repos/os/src/test/vmm_x86/guest.s new file mode 100644 index 0000000000..295ab1d3f4 --- /dev/null +++ b/repos/os/src/test/vmm_x86/guest.s @@ -0,0 +1,35 @@ +/* + * \brief VM session interface test for x86: guest code + * \author Alexander Boettcher + * \author Christian Helmuth + * \date 2018-09-26 + * + * The guest code is placed on the page hosting the reset vector 0xffff:fff0. + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +.code16 + +/* offset code start to keep the jmp distance in imm8 */ +.org 0xf7e, 0x90 +1: + rdtscp + hlt + hlt + jmp . + hlt + + jmp . + +/* reset vector entry - just jmp to code start above */ +.org 0xff0, 0x90 + jmp 1b + +/* fill page with hlt */ +.org 0x1000, 0xf4 diff --git a/repos/os/src/test/vmm_x86/target.mk b/repos/os/src/test/vmm_x86/target.mk index 8d9c6f31d0..139cbe20f6 100644 --- a/repos/os/src/test/vmm_x86/target.mk +++ b/repos/os/src/test/vmm_x86/target.mk @@ -4,3 +4,13 @@ SRC_CC = component.cc LIBS = base CC_CXX_WARN_STRICT_CONVERSION = + +SRC_BIN = guest.bin + +guest.o: guest.s + $(MSG_ASSEM)$@ + $(VERBOSE)$(CC) -m16 -c $< -o $@ + +guest.bin: guest.o + $(MSG_CONVERT)$@ + $(VERBOSE)$(OBJCOPY) -O binary $< $@ From 5e4e634625b6384b285c3e20d18d5e81eede82d9 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Fri, 23 Sep 2022 15:05:17 +0200 Subject: [PATCH 0004/1921] libs: use `select_from_ports` in eager assignments If `select_from_ports` is evaluated lazily, we might miss a port during the dependency check. A way to prevent this is to use the `:=` operator. Fixes genodelabs/genode#4618 --- repos/base-fiasco/lib/mk/kernel-fiasco.inc | 2 +- repos/base-fiasco/lib/mk/syscall-fiasco.inc | 2 +- repos/base-nova/src/kernel/nova/target.mk | 2 +- .../base-okl4/lib/import/import-syscall-okl4.mk | 2 +- repos/base-okl4/lib/mk/okl4_boot_info.mk | 10 +++++----- .../lib/mk/spec/x86/kernel-okl4-include.mk | 2 +- repos/base-okl4/lib/mk/spec/x86/kernel-okl4.mk | 2 +- repos/base-okl4/lib/mk/tools.mk | 2 +- repos/gems/lib/import/import-cbe.mk | 2 +- repos/gems/lib/import/import-cbe_common.mk | 2 +- repos/gems/lib/import/import-sha256_4k.mk | 2 +- repos/gems/lib/mk/aes_cbc_4k.mk | 2 +- repos/gems/lib/mk/sha256_4k.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_check.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_check_cxx.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_common.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_cxx.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_cxx_common.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_dump.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_dump_cxx.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_init.mk | 2 +- repos/gems/lib/mk/spec/x86_64/cbe_init_cxx.mk | 2 +- .../lib/mk/spec/x86_64/vfs_cbe_trust_anchor.mk | 2 +- repos/gems/src/test/tiled_wm/target.inc | 2 +- repos/libports/lib/import/import-acpica.mk | 3 ++- repos/libports/lib/import/import-curl.mk | 4 +++- repos/libports/lib/import/import-expat.mk | 4 +++- repos/libports/lib/import/import-fatfs_block.mk | 3 ++- repos/libports/lib/import/import-ffi.mk | 10 ++++++---- repos/libports/lib/import/import-freetype.mk | 3 ++- repos/libports/lib/import/import-jbig2dec.mk | 3 ++- .../libports/lib/import/import-jitterentropy.mk | 4 +++- repos/libports/lib/import/import-jpeg.mk | 3 ++- repos/libports/lib/import/import-libarchive.mk | 3 ++- repos/libports/lib/import/import-libbz2.mk | 3 ++- repos/libports/lib/import/import-libcrypto.mk | 4 +++- repos/libports/lib/import/import-libdrm.mk | 4 ++-- repos/libports/lib/import/import-libgcrypt.mk | 3 ++- repos/libports/lib/import/import-libiconv.mk | 3 ++- repos/libports/lib/import/import-liblzma.mk | 3 ++- .../libports/lib/import/import-libpcg_random.mk | 3 ++- repos/libports/lib/import/import-libpng.mk | 3 ++- repos/libports/lib/import/import-libssh.mk | 4 +++- repos/libports/lib/import/import-libssl.mk | 4 +++- repos/libports/lib/import/import-libusb.mk | 3 ++- repos/libports/lib/import/import-libuvc.mk | 3 ++- repos/libports/lib/import/import-libyuv.mk | 3 ++- repos/libports/lib/import/import-lwip.mk | 3 ++- repos/libports/lib/import/import-lz4.mk | 3 ++- repos/libports/lib/import/import-mupdf.mk | 3 ++- repos/libports/lib/import/import-ncurses.mk | 3 ++- repos/libports/lib/import/import-openjpeg.mk | 3 ++- repos/libports/lib/import/import-pcre.mk | 3 ++- repos/libports/lib/import/import-pcsc-lite.mk | 3 ++- repos/libports/lib/import/import-qoost.mk | 3 ++- repos/libports/lib/import/import-qt5_cmake.mk | 8 ++++---- repos/libports/lib/import/import-qt5_qmake.mk | 10 +++++----- repos/libports/lib/import/import-spark.mk | 10 +++++----- repos/libports/lib/import/import-x86emu.mk | 3 ++- repos/libports/lib/import/import-zlib.mk | 3 ++- repos/libports/lib/mk/gmp.inc | 2 +- repos/libports/lib/mk/icu.mk | 2 +- repos/libports/lib/mk/jbig2dec.mk | 6 +++--- repos/libports/lib/mk/jpeg.mk | 6 +++--- repos/libports/lib/mk/libarchive.mk | 6 +++--- repos/libports/lib/mk/libpcg_random.mk | 2 +- repos/libports/lib/mk/libyuv.inc | 4 ++-- repos/libports/lib/mk/openjpeg.mk | 8 ++++---- repos/libports/lib/mk/qemu-usb.inc | 4 ++-- repos/libports/lib/mk/spec/32bit/curl.mk | 3 ++- repos/libports/lib/mk/spec/64bit/curl.mk | 3 ++- repos/libports/lib/mk/spec/arm/ffi.mk | 2 +- repos/libports/lib/mk/spec/arm/libc-gen.mk | 2 +- repos/libports/lib/mk/spec/arm/libcrypto.mk | 4 +++- repos/libports/lib/mk/spec/arm_64/ffi.mk | 2 +- repos/libports/lib/mk/spec/arm_64/libc-gen.mk | 2 +- repos/libports/lib/mk/spec/arm_64/libcrypto.mk | 4 +++- repos/libports/lib/mk/spec/riscv/libc-gen.mk | 2 +- repos/libports/lib/mk/spec/x86_32/ffi.mk | 2 +- repos/libports/lib/mk/spec/x86_32/libcrypto.mk | 4 +++- repos/libports/lib/mk/spec/x86_64/ffi.mk | 2 +- repos/libports/lib/mk/spec/x86_64/libcrypto.mk | 4 +++- repos/libports/lib/mk/x86emu.mk | 2 +- repos/libports/lib/mk/zlib.mk | 16 ++++++++-------- repos/libports/src/test/fatfs_block_io/target.mk | 2 +- repos/libports/src/test/pcg32/target.mk | 2 +- repos/ports/lib/mk/gdbserver_platform.inc | 2 +- repos/ports/lib/mk/virtualbox5-common.inc | 4 ++-- repos/ports/lib/mk/virtualbox5-runtime.mk | 4 +++- repos/ports/lib/mk/virtualbox5-xml.mk | 4 +++- repos/ports/lib/mk/virtualbox6-runtime.mk | 4 +++- repos/ports/lib/mk/virtualbox6-xml.mk | 4 +++- repos/ports/src/app/gdb_monitor/target.mk | 2 +- repos/ports/src/noux-pkg/bash-minimal/target.mk | 2 +- repos/ports/src/noux-pkg/binutils/target.inc | 2 +- .../src/noux-pkg/coreutils-minimal/target.mk | 2 +- .../src/noux-pkg/e2fsprogs-minimal/target.mk | 2 +- repos/ports/src/noux-pkg/gcc/target.inc | 2 +- repos/ports/src/noux-pkg/gdb/target.inc | 2 +- repos/ports/src/noux-pkg/vim-minimal/target.mk | 2 +- 101 files changed, 196 insertions(+), 139 deletions(-) diff --git a/repos/base-fiasco/lib/mk/kernel-fiasco.inc b/repos/base-fiasco/lib/mk/kernel-fiasco.inc index 4502c6fe23..70eb7b21cb 100644 --- a/repos/base-fiasco/lib/mk/kernel-fiasco.inc +++ b/repos/base-fiasco/lib/mk/kernel-fiasco.inc @@ -1,4 +1,4 @@ -L4_SRC_DIR = $(call select_from_ports,fiasco)/src/kernel/fiasco/fiasco/snapshot +L4_SRC_DIR := $(call select_from_ports,fiasco)/src/kernel/fiasco/fiasco/snapshot FIASCO_BUILD_DIR = $(shell pwd)/build FIASCO = $(FIASCO_BUILD_DIR)/fiasco diff --git a/repos/base-fiasco/lib/mk/syscall-fiasco.inc b/repos/base-fiasco/lib/mk/syscall-fiasco.inc index c80cdf4e44..4722783810 100644 --- a/repos/base-fiasco/lib/mk/syscall-fiasco.inc +++ b/repos/base-fiasco/lib/mk/syscall-fiasco.inc @@ -6,7 +6,7 @@ # userland that comes with Fiasco. # -L4_SRC_DIR = $(call select_from_ports,fiasco)/src/kernel/fiasco/fiasco/snapshot +L4_SRC_DIR := $(call select_from_ports,fiasco)/src/kernel/fiasco/fiasco/snapshot L4_BUILD_DIR := $(shell pwd) # diff --git a/repos/base-nova/src/kernel/nova/target.mk b/repos/base-nova/src/kernel/nova/target.mk index bbaeb9b126..8f001c462f 100644 --- a/repos/base-nova/src/kernel/nova/target.mk +++ b/repos/base-nova/src/kernel/nova/target.mk @@ -3,7 +3,7 @@ include $(call select_from_repositories,mk/spec/nova.mk) TARGET = hypervisor REQUIRES = x86 nova NOVA_BUILD_DIR = $(BUILD_BASE_DIR)/kernel -NOVA_SRC_DIR = $(call select_from_ports,nova)/src/kernel/nova +NOVA_SRC_DIR := $(call select_from_ports,nova)/src/kernel/nova SRC_CC = $(sort $(notdir $(wildcard $(NOVA_SRC_DIR)/src/*.cpp))) SRC_S = $(sort $(notdir $(wildcard $(NOVA_SRC_DIR)/src/*.S))) INC_DIR = $(NOVA_SRC_DIR)/include diff --git a/repos/base-okl4/lib/import/import-syscall-okl4.mk b/repos/base-okl4/lib/import/import-syscall-okl4.mk index 030693d8b7..5eaa7633f0 100644 --- a/repos/base-okl4/lib/import/import-syscall-okl4.mk +++ b/repos/base-okl4/lib/import/import-syscall-okl4.mk @@ -1,4 +1,4 @@ -OKL4_DIR = $(call select_from_ports,okl4)/src/kernel/okl4 +OKL4_DIR := $(call select_from_ports,okl4)/src/kernel/okl4 # # Make sure that symlink modification times are handled correctly. diff --git a/repos/base-okl4/lib/mk/okl4_boot_info.mk b/repos/base-okl4/lib/mk/okl4_boot_info.mk index 74d9a4b07f..63e1bb0757 100644 --- a/repos/base-okl4/lib/mk/okl4_boot_info.mk +++ b/repos/base-okl4/lib/mk/okl4_boot_info.mk @@ -1,7 +1,7 @@ -SRC_C = bootinfo.c -LIBS += syscall-okl4 -INC_DIR += $(REP_DIR)/src/include/bootinfo/internal -CC_WARN = -Wall -Wno-attributes -OKL4_DIR = $(call select_from_ports,okl4)/src/kernel/okl4 +SRC_C = bootinfo.c +LIBS += syscall-okl4 +INC_DIR += $(REP_DIR)/src/include/bootinfo/internal +CC_WARN = -Wall -Wno-attributes +OKL4_DIR := $(call select_from_ports,okl4)/src/kernel/okl4 vpath bootinfo.c $(OKL4_DIR)/libs/bootinfo/src diff --git a/repos/base-okl4/lib/mk/spec/x86/kernel-okl4-include.mk b/repos/base-okl4/lib/mk/spec/x86/kernel-okl4-include.mk index 23796b206c..c5ee413151 100644 --- a/repos/base-okl4/lib/mk/spec/x86/kernel-okl4-include.mk +++ b/repos/base-okl4/lib/mk/spec/x86/kernel-okl4-include.mk @@ -1,4 +1,4 @@ -OKL4_SRC_DIR = $(call select_from_ports,okl4)/src/kernel/okl4 +OKL4_SRC_DIR := $(call select_from_ports,okl4)/src/kernel/okl4 ARCH_DIR = $(OKL4_SRC_DIR)/arch/ia32 PLAT_DIR = $(OKL4_SRC_DIR)/platform/pc99 INC_SYMLINKS = arch/apic.h \ diff --git a/repos/base-okl4/lib/mk/spec/x86/kernel-okl4.mk b/repos/base-okl4/lib/mk/spec/x86/kernel-okl4.mk index bafba103ca..dafeb8e11b 100644 --- a/repos/base-okl4/lib/mk/spec/x86/kernel-okl4.mk +++ b/repos/base-okl4/lib/mk/spec/x86/kernel-okl4.mk @@ -1,4 +1,4 @@ -OKL4_SRC_DIR = $(call select_from_ports,okl4)/src/kernel/okl4 +OKL4_SRC_DIR := $(call select_from_ports,okl4)/src/kernel/okl4 CONFIG = ARCH_IA32 \ CONFIG_ARCH_IA32=1 \ diff --git a/repos/base-okl4/lib/mk/tools.mk b/repos/base-okl4/lib/mk/tools.mk index 40d07e581c..399039581d 100644 --- a/repos/base-okl4/lib/mk/tools.mk +++ b/repos/base-okl4/lib/mk/tools.mk @@ -2,7 +2,7 @@ # Create symlink to elfweaver so that the run tool can use it from within the # build directory. # -OKL4_DIR = $(call select_from_ports,okl4)/src/kernel/okl4 +OKL4_DIR := $(call select_from_ports,okl4)/src/kernel/okl4 HOST_TOOLS += $(BUILD_BASE_DIR)/tool/okl4/elfweaver $(BUILD_BASE_DIR)/tool/okl4/elfweaver: diff --git a/repos/gems/lib/import/import-cbe.mk b/repos/gems/lib/import/import-cbe.mk index 51b1019e20..17cbac9eed 100644 --- a/repos/gems/lib/import/import-cbe.mk +++ b/repos/gems/lib/import/import-cbe.mk @@ -1,3 +1,3 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) INC_DIR += $(CBE_DIR)/src/lib/cbe diff --git a/repos/gems/lib/import/import-cbe_common.mk b/repos/gems/lib/import/import-cbe_common.mk index 439996f1f3..9470566f9e 100644 --- a/repos/gems/lib/import/import-cbe_common.mk +++ b/repos/gems/lib/import/import-cbe_common.mk @@ -1,3 +1,3 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) INC_DIR += $(CBE_DIR)/src/lib/cbe_common diff --git a/repos/gems/lib/import/import-sha256_4k.mk b/repos/gems/lib/import/import-sha256_4k.mk index 827297e31e..70ad128dc4 100644 --- a/repos/gems/lib/import/import-sha256_4k.mk +++ b/repos/gems/lib/import/import-sha256_4k.mk @@ -1,3 +1,3 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) INC_DIR += $(CBE_DIR)/src/lib/sha256_4k diff --git a/repos/gems/lib/mk/aes_cbc_4k.mk b/repos/gems/lib/mk/aes_cbc_4k.mk index e608140e6b..25220db772 100644 --- a/repos/gems/lib/mk/aes_cbc_4k.mk +++ b/repos/gems/lib/mk/aes_cbc_4k.mk @@ -1,4 +1,4 @@ -LIBSSL_PORT_DIR = $(call select_from_ports,openssl) +LIBSSL_PORT_DIR := $(call select_from_ports,openssl) LIBS += libcrypto SRC_CC += aes_cbc_4k.cc diff --git a/repos/gems/lib/mk/sha256_4k.mk b/repos/gems/lib/mk/sha256_4k.mk index 9d84472103..51b8cb1fbc 100644 --- a/repos/gems/lib/mk/sha256_4k.mk +++ b/repos/gems/lib/mk/sha256_4k.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) SRC_ADB := sha256_4k.adb LIBS += spark libsparkcrypto diff --git a/repos/gems/lib/mk/spec/x86_64/cbe.mk b/repos/gems/lib/mk/spec/x86_64/cbe.mk index 9a3e6c1333..b4a6747079 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark sha256_4k cbe_common diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_check.mk b/repos/gems/lib/mk/spec/x86_64/cbe_check.mk index 3706843c2e..c0bbaaba0d 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_check.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_check.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark sha256_4k cbe_common diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_check_cxx.mk b/repos/gems/lib/mk/spec/x86_64/cbe_check_cxx.mk index a55143eec0..67b0d32f94 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_check_cxx.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_check_cxx.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark libsparkcrypto sha256_4k cbe_common cbe_cxx_common LIBS += cbe_check diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_common.mk b/repos/gems/lib/mk/spec/x86_64/cbe_common.mk index f18f46a92b..75720e7c51 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_common.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_common.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark sha256_4k diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_cxx.mk b/repos/gems/lib/mk/spec/x86_64/cbe_cxx.mk index 9e5cec3260..def599094c 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_cxx.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_cxx.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark libsparkcrypto sha256_4k cbe cbe_common cbe_cxx_common diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_cxx_common.mk b/repos/gems/lib/mk/spec/x86_64/cbe_cxx_common.mk index 2d5fce837b..42df4ec892 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_cxx_common.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_cxx_common.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark cbe_common diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_dump.mk b/repos/gems/lib/mk/spec/x86_64/cbe_dump.mk index bbf4ad78ec..43fbaa662f 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_dump.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_dump.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark sha256_4k cbe_common diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_dump_cxx.mk b/repos/gems/lib/mk/spec/x86_64/cbe_dump_cxx.mk index 8894f2fbb1..7af5498569 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_dump_cxx.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_dump_cxx.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark libsparkcrypto sha256_4k cbe_common cbe_cxx_common LIBS += cbe_dump diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_init.mk b/repos/gems/lib/mk/spec/x86_64/cbe_init.mk index be772abde3..6523133d25 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_init.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_init.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark sha256_4k cbe_common cbe_cxx_common diff --git a/repos/gems/lib/mk/spec/x86_64/cbe_init_cxx.mk b/repos/gems/lib/mk/spec/x86_64/cbe_init_cxx.mk index c433466473..6940a693d1 100644 --- a/repos/gems/lib/mk/spec/x86_64/cbe_init_cxx.mk +++ b/repos/gems/lib/mk/spec/x86_64/cbe_init_cxx.mk @@ -1,4 +1,4 @@ -CBE_DIR = $(call select_from_ports,cbe) +CBE_DIR := $(call select_from_ports,cbe) LIBS += spark libsparkcrypto sha256_4k cbe_common cbe_cxx_common LIBS += cbe_init diff --git a/repos/gems/lib/mk/spec/x86_64/vfs_cbe_trust_anchor.mk b/repos/gems/lib/mk/spec/x86_64/vfs_cbe_trust_anchor.mk index 9ac5ac1d93..b3eacfa58a 100644 --- a/repos/gems/lib/mk/spec/x86_64/vfs_cbe_trust_anchor.mk +++ b/repos/gems/lib/mk/spec/x86_64/vfs_cbe_trust_anchor.mk @@ -1,4 +1,4 @@ -OPENSSL_DIR = $(call select_from_ports,openssl) +OPENSSL_DIR := $(call select_from_ports,openssl) SRC_CC += vfs.cc SRC_CC += aes_256.cc diff --git a/repos/gems/src/test/tiled_wm/target.inc b/repos/gems/src/test/tiled_wm/target.inc index 9f0fe2aebf..890a1b2d56 100644 --- a/repos/gems/src/test/tiled_wm/target.inc +++ b/repos/gems/src/test/tiled_wm/target.inc @@ -20,7 +20,7 @@ ICON_H = $(call select_from_repositories,include/qoost/icon.h) # fall-back to the qoost port directory if that fails ifeq ($(ICON_H),) -ICON_H = $(call select_from_ports,qoost)/include/qoost/icon.h +ICON_H := $(call select_from_ports,qoost)/include/qoost/icon.h endif icon.h: $(ICON_H) diff --git a/repos/libports/lib/import/import-acpica.mk b/repos/libports/lib/import/import-acpica.mk index fe90c1b962..30a0363244 100644 --- a/repos/libports/lib/import/import-acpica.mk +++ b/repos/libports/lib/import/import-acpica.mk @@ -1,2 +1,3 @@ -INC_DIR += $(call select_from_ports,acpica)/src/lib/acpica/source/include +ACPICA_DIR := $(call select_from_ports,acpica) +INC_DIR += $(ACPICA_DIR)/src/lib/acpica/source/include CC_OPT += -DACPI_INLINE=inline -Wno-builtin-declaration-mismatch diff --git a/repos/libports/lib/import/import-curl.mk b/repos/libports/lib/import/import-curl.mk index f200058b52..7bfe8f102b 100644 --- a/repos/libports/lib/import/import-curl.mk +++ b/repos/libports/lib/import/import-curl.mk @@ -1,4 +1,6 @@ ARCH = $(filter 32bit 64bit,$(SPECS)) +CURL_DIR := $(call select_from_ports,curl) + INC_DIR += $(call select_from_repositories,src/lib/curl)/spec/$(ARCH) -INC_DIR += $(call select_from_ports,curl)/include +INC_DIR += $(CURL_DIR)/include diff --git a/repos/libports/lib/import/import-expat.mk b/repos/libports/lib/import/import-expat.mk index df9ebc1579..882aed3a1e 100644 --- a/repos/libports/lib/import/import-expat.mk +++ b/repos/libports/lib/import/import-expat.mk @@ -1 +1,3 @@ -INC_DIR += $(call select_from_ports,expat)/include +EXPAT_DIR := $(call select_from_ports,expat) + +INC_DIR += $(EXPAT_DIR)/include diff --git a/repos/libports/lib/import/import-fatfs_block.mk b/repos/libports/lib/import/import-fatfs_block.mk index e331173e47..d50abef8a1 100644 --- a/repos/libports/lib/import/import-fatfs_block.mk +++ b/repos/libports/lib/import/import-fatfs_block.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,fatfs)/include +FATFS_DIR := $(call select_from_ports,fatfs) +INC_DIR += $(FATFS_DIR)/include diff --git a/repos/libports/lib/import/import-ffi.mk b/repos/libports/lib/import/import-ffi.mk index ffc076b48f..5f54616874 100644 --- a/repos/libports/lib/import/import-ffi.mk +++ b/repos/libports/lib/import/import-ffi.mk @@ -1,15 +1,17 @@ +FFI_DIR := $(call select_from_ports,ffi) + ifeq ($(filter-out $(SPECS),x86_32),) -INC_DIR += $(call select_from_ports,ffi)/include/ffi/spec/x86_32 +INC_DIR += $(FFI_DIR)/include/ffi/spec/x86_32 endif ifeq ($(filter-out $(SPECS),x86_64),) -INC_DIR += $(call select_from_ports,ffi)/include/ffi/spec/x86_64 +INC_DIR += $(FFI_DIR)/include/ffi/spec/x86_64 endif ifeq ($(filter-out $(SPECS),arm),) -INC_DIR += $(call select_from_ports,ffi)/include/ffi/spec/arm +INC_DIR += $(FFI_DIR)/include/ffi/spec/arm endif ifeq ($(filter-out $(SPECS),arm_64),) -INC_DIR += $(call select_from_ports,ffi)/include/ffi/spec/arm_64 +INC_DIR += $(FFI_DIR)/include/ffi/spec/arm_64 endif diff --git a/repos/libports/lib/import/import-freetype.mk b/repos/libports/lib/import/import-freetype.mk index 845fe1374e..32298ac450 100644 --- a/repos/libports/lib/import/import-freetype.mk +++ b/repos/libports/lib/import/import-freetype.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,freetype)/include +FREETYPE_DIR := $(call select_from_ports,freetype) +INC_DIR += $(FREETYPE_DIR)/include diff --git a/repos/libports/lib/import/import-jbig2dec.mk b/repos/libports/lib/import/import-jbig2dec.mk index 41fe1a6b0a..c62f819e59 100644 --- a/repos/libports/lib/import/import-jbig2dec.mk +++ b/repos/libports/lib/import/import-jbig2dec.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,jbig2dec)/include/jbig2dec +JBIG2DEC_DIR := $(call select_from_ports,jbig2dec) +INC_DIR += $(JBIG2DEC_DIR)/include/jbig2dec diff --git a/repos/libports/lib/import/import-jitterentropy.mk b/repos/libports/lib/import/import-jitterentropy.mk index 9fb6b5703b..4fc0283a63 100644 --- a/repos/libports/lib/import/import-jitterentropy.mk +++ b/repos/libports/lib/import/import-jitterentropy.mk @@ -10,10 +10,12 @@ else ifeq ($(filter-out $(SPECS),arm_v8),) TARGET_CPUARCH=arm_v8 endif +JITTERENTROPY_DIR := $(call select_from_ports,jitterentropy) + ifeq ($(CONTRIB_DIR),) REP_INC_DIR += include/jitterentropy else -INC_DIR += $(call select_from_ports,jitterentropy)/include/jitterentropy +INC_DIR += $(JITTERENTROPY_DIR)/include/jitterentropy endif INC_DIR += $(call select_from_repositories,src/lib/jitterentropy) diff --git a/repos/libports/lib/import/import-jpeg.mk b/repos/libports/lib/import/import-jpeg.mk index 06627b79fc..16ae90d3c4 100644 --- a/repos/libports/lib/import/import-jpeg.mk +++ b/repos/libports/lib/import/import-jpeg.mk @@ -1,2 +1,3 @@ -INC_DIR += $(call select_from_ports,jpeg)/include/jpeg +JPEG_DIR := $(call select_from_ports,jpeg) +INC_DIR += $(JPEG_DIR)/include/jpeg REP_INC_DIR += include/jpeg diff --git a/repos/libports/lib/import/import-libarchive.mk b/repos/libports/lib/import/import-libarchive.mk index 54638aa6cc..35349e3157 100644 --- a/repos/libports/lib/import/import-libarchive.mk +++ b/repos/libports/lib/import/import-libarchive.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,libarchive)/include/libarchive +LIBARCHIVE_DIR := $(call select_from_ports,libarchive) +INC_DIR += $(LIBARCHIVE_DIR)/include/libarchive diff --git a/repos/libports/lib/import/import-libbz2.mk b/repos/libports/lib/import/import-libbz2.mk index 77139ed660..44bfb1b55c 100644 --- a/repos/libports/lib/import/import-libbz2.mk +++ b/repos/libports/lib/import/import-libbz2.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,bzip2)/include/libbz2 +BZIP2_DIR := $(call select_from_ports,bzip2) +INC_DIR += $(BZIP2_DIR)/include/libbz2 diff --git a/repos/libports/lib/import/import-libcrypto.mk b/repos/libports/lib/import/import-libcrypto.mk index d9bc9207cd..3878ca4a8c 100644 --- a/repos/libports/lib/import/import-libcrypto.mk +++ b/repos/libports/lib/import/import-libcrypto.mk @@ -2,7 +2,9 @@ LIB_OPENSSL_DIR = $(call select_from_repositories,src/lib/openssl) ARCH = $(filter 32bit 64bit,$(SPECS)) -INC_DIR += $(call select_from_ports,openssl)/include +OPENSSL_DIR := $(call select_from_ports,openssl) + +INC_DIR += $(OPENSSL_DIR)/include INC_DIR += $(LIB_OPENSSL_DIR)/spec/$(ARCH) LIBS += libc diff --git a/repos/libports/lib/import/import-libdrm.mk b/repos/libports/lib/import/import-libdrm.mk index e9761840d1..b60f0b1735 100644 --- a/repos/libports/lib/import/import-libdrm.mk +++ b/repos/libports/lib/import/import-libdrm.mk @@ -1,7 +1,7 @@ ifeq ($(CONTRIB_DIR),) -DRM_SRC_DIR = $(realpath $(call select_from_repositories,include/drm)/../..) +DRM_SRC_DIR := $(realpath $(call select_from_repositories,include/drm)/../..) else -DRM_SRC_DIR = $(call select_from_ports,libdrm)/src/lib/libdrm +DRM_SRC_DIR := $(call select_from_ports,libdrm)/src/lib/libdrm endif INC_DIR += $(DRM_SRC_DIR) diff --git a/repos/libports/lib/import/import-libgcrypt.mk b/repos/libports/lib/import/import-libgcrypt.mk index 333fd8044e..22ac6669e0 100644 --- a/repos/libports/lib/import/import-libgcrypt.mk +++ b/repos/libports/lib/import/import-libgcrypt.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,libgcrypt)/include/libgcrypt +LIBGCRYPT_DIR := $(call select_from_ports,libgcrypt) +INC_DIR += $(LIBGCRYPT_DIR)/include/libgcrypt diff --git a/repos/libports/lib/import/import-libiconv.mk b/repos/libports/lib/import/import-libiconv.mk index 83db249fd1..40f7bb708b 100644 --- a/repos/libports/lib/import/import-libiconv.mk +++ b/repos/libports/lib/import/import-libiconv.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,libiconv)/include/iconv +LIBICONV_DIR := $(call select_from_ports,libiconv) +INC_DIR += $(LIBICONV_DIR)/include/iconv diff --git a/repos/libports/lib/import/import-liblzma.mk b/repos/libports/lib/import/import-liblzma.mk index 03fec5629f..24301daa02 100644 --- a/repos/libports/lib/import/import-liblzma.mk +++ b/repos/libports/lib/import/import-liblzma.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,xz)/include/liblzma +XZ_DIR := $(call select_from_ports,xz) +INC_DIR += $(XZ_DIR)/include/liblzma diff --git a/repos/libports/lib/import/import-libpcg_random.mk b/repos/libports/lib/import/import-libpcg_random.mk index 96356e689f..eff8b19bd8 100644 --- a/repos/libports/lib/import/import-libpcg_random.mk +++ b/repos/libports/lib/import/import-libpcg_random.mk @@ -1,3 +1,4 @@ +PCGC_DIR := $(call select_from_ports,pcg-c) INC_DIR += \ - $(call select_from_ports,pcg-c)/include/pcg-c \ + $(PCGC_DIR)/include/pcg-c \ $(call select_from_repositories,include/pcg-c) diff --git a/repos/libports/lib/import/import-libpng.mk b/repos/libports/lib/import/import-libpng.mk index 7df959a37e..8ae56db82f 100644 --- a/repos/libports/lib/import/import-libpng.mk +++ b/repos/libports/lib/import/import-libpng.mk @@ -1,2 +1,3 @@ +LIBPNG_DIR := $(call select_from_ports,libpng) INC_DIR += $(call select_from_repositories,include/libpng) -INC_DIR += $(call select_from_ports,libpng)/include/libpng +INC_DIR += $(LIBPNG_DIR)/include/libpng diff --git a/repos/libports/lib/import/import-libssh.mk b/repos/libports/lib/import/import-libssh.mk index d90f035c4e..8191348d38 100644 --- a/repos/libports/lib/import/import-libssh.mk +++ b/repos/libports/lib/import/import-libssh.mk @@ -1,2 +1,4 @@ +LIBSSH_DIR := $(call select_from_ports,libssh) + REP_INC_DIR += include/libssh -INC_DIR += $(call select_from_ports,libssh)/include +INC_DIR += $(LIBSSH_DIR)/include diff --git a/repos/libports/lib/import/import-libssl.mk b/repos/libports/lib/import/import-libssl.mk index 26ba0f89e8..54ea68acce 100644 --- a/repos/libports/lib/import/import-libssl.mk +++ b/repos/libports/lib/import/import-libssl.mk @@ -1,8 +1,10 @@ LIB_OPENSSL_DIR = $(call select_from_repositories,src/lib/openssl) +OPENSSL_DIR := $(call select_from_ports,openssl) + LIBS += libcrypto ARCH = $(filter 32bit 64bit,$(SPECS)) -INC_DIR += $(call select_from_ports,openssl)/include +INC_DIR += $(OPENSSL_DIR)/include INC_DIR += $(LIB_OPENSSL_DIR)/spec/$(ARCH) diff --git a/repos/libports/lib/import/import-libusb.mk b/repos/libports/lib/import/import-libusb.mk index fbba7ffa39..5caa0a1cf3 100644 --- a/repos/libports/lib/import/import-libusb.mk +++ b/repos/libports/lib/import/import-libusb.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,libusb)/include/libusb +LIBUSB_DIR := $(call select_from_ports,libusb) +INC_DIR += $(LIBUSB_DIR)/include/libusb diff --git a/repos/libports/lib/import/import-libuvc.mk b/repos/libports/lib/import/import-libuvc.mk index cedd152945..bdcb584fa1 100644 --- a/repos/libports/lib/import/import-libuvc.mk +++ b/repos/libports/lib/import/import-libuvc.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,libuvc)/include +LIBUVC_PORT_DIR := $(call select_from_ports,libuvc) +INC_DIR += $(LIBUVC_PORT_DIR)/include diff --git a/repos/libports/lib/import/import-libyuv.mk b/repos/libports/lib/import/import-libyuv.mk index 30442d8f52..8cc4b79621 100644 --- a/repos/libports/lib/import/import-libyuv.mk +++ b/repos/libports/lib/import/import-libyuv.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,libyuv)/include +LIBYUV_DIR := $(call select_from_ports,libyuv) +INC_DIR += $(LIBYUV_DIR)/include diff --git a/repos/libports/lib/import/import-lwip.mk b/repos/libports/lib/import/import-lwip.mk index e212bb85d1..5c4643ffff 100644 --- a/repos/libports/lib/import/import-lwip.mk +++ b/repos/libports/lib/import/import-lwip.mk @@ -1,2 +1,3 @@ -INC_DIR += $(call select_from_ports,lwip)/include/lwip +LWIP_DIR := $(call select_from_ports,lwip) +INC_DIR += $(LWIP_DIR)/include/lwip INC_DIR += $(call select_from_repositories,include/lwip) diff --git a/repos/libports/lib/import/import-lz4.mk b/repos/libports/lib/import/import-lz4.mk index cc2e006fc2..8659d2d1c5 100644 --- a/repos/libports/lib/import/import-lz4.mk +++ b/repos/libports/lib/import/import-lz4.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,lz4)/include/lz4 +LZ4_DIR := $(call select_from_ports,lz4) +INC_DIR += $(LZ4_DIR)/include/lz4 diff --git a/repos/libports/lib/import/import-mupdf.mk b/repos/libports/lib/import/import-mupdf.mk index 37e42a5d84..658399afbd 100644 --- a/repos/libports/lib/import/import-mupdf.mk +++ b/repos/libports/lib/import/import-mupdf.mk @@ -1,2 +1,3 @@ -INC_DIR += $(call select_from_ports,mupdf)/include/mupdf +MUPDF_PORT_DIR := $(call select_from_ports,mupdf) +INC_DIR += $(MUPDF_PORT_DIR)/include/mupdf diff --git a/repos/libports/lib/import/import-ncurses.mk b/repos/libports/lib/import/import-ncurses.mk index 21192ff316..e6889eb1a5 100644 --- a/repos/libports/lib/import/import-ncurses.mk +++ b/repos/libports/lib/import/import-ncurses.mk @@ -1,2 +1,3 @@ +NCURSES_DIR := $(call select_from_ports,ncurses) REP_INC_DIR += include/ncurses -INC_DIR += $(call select_from_ports,ncurses)/include/ncurses +INC_DIR += $(NCURSES_DIR)/include/ncurses diff --git a/repos/libports/lib/import/import-openjpeg.mk b/repos/libports/lib/import/import-openjpeg.mk index ba772fdfc6..b145f3b69e 100644 --- a/repos/libports/lib/import/import-openjpeg.mk +++ b/repos/libports/lib/import/import-openjpeg.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,openjpeg)/include/openjpeg +OPENJPEG_DIR := $(call select_from_ports,openjpeg) +INC_DIR += $(OPENJPEG_DIR)/include/openjpeg diff --git a/repos/libports/lib/import/import-pcre.mk b/repos/libports/lib/import/import-pcre.mk index 752c6a1ca6..780e9c90a7 100644 --- a/repos/libports/lib/import/import-pcre.mk +++ b/repos/libports/lib/import/import-pcre.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,pcre)/include/pcre +PCRE_DIR := $(call select_from_ports,pcre) +INC_DIR += $(PCRE_DIR)/include/pcre diff --git a/repos/libports/lib/import/import-pcsc-lite.mk b/repos/libports/lib/import/import-pcsc-lite.mk index eeda106512..606fa8b53d 100644 --- a/repos/libports/lib/import/import-pcsc-lite.mk +++ b/repos/libports/lib/import/import-pcsc-lite.mk @@ -1,5 +1,6 @@ +PCSCLITE_DIR := $(call select_from_ports,pcsc-lite) ifeq ($(CONTRIB_DIR),) REP_INC_DIR += include/PCSC else -INC_DIR += $(call select_from_ports,pcsc-lite)/include/PCSC +INC_DIR += $(PCSCLITE_DIR)/include/PCSC endif diff --git a/repos/libports/lib/import/import-qoost.mk b/repos/libports/lib/import/import-qoost.mk index 1203d20317..e5b2315117 100644 --- a/repos/libports/lib/import/import-qoost.mk +++ b/repos/libports/lib/import/import-qoost.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,qoost)/include +QOOST_DIR := $(call select_from_ports,qoost) +INC_DIR += $(QOOST_DIR)/include diff --git a/repos/libports/lib/import/import-qt5_cmake.mk b/repos/libports/lib/import/import-qt5_cmake.mk index 8f727b7ff6..8a9e3bd800 100644 --- a/repos/libports/lib/import/import-qt5_cmake.mk +++ b/repos/libports/lib/import/import-qt5_cmake.mk @@ -24,9 +24,9 @@ ifeq ($(CONTRIB_DIR),) QT_DIR = $(call select_from_repositories,src/lib/qt5) QT_API_DIR = $(call select_from_repositories,mkspecs)/.. else -QT_PORT_DIR = $(call select_from_ports,qt5) -QT_DIR = $(QT_PORT_DIR)/src/lib/qt5 -QT_API_DIR = $(QT_DIR)/genode/api +QT_PORT_DIR := $(call select_from_ports,qt5) +QT_DIR = $(QT_PORT_DIR)/src/lib/qt5 +QT_API_DIR = $(QT_DIR)/genode/api endif ifneq ($(VERBOSE),) @@ -96,7 +96,7 @@ GENODE_CMAKE_LFLAGS_SHLIB = \ ifeq ($(CONTRIB_DIR),) GENODE_CMAKE_GL_INCDIRS = $(call select_from_repositories,include/GL)/.. else -GENODE_CMAKE_GL_INCDIRS = $(call select_from_ports,mesa)/include +GENODE_CMAKE_GL_INCDIRS := $(call select_from_ports,mesa)/include endif GENODE_CMAKE_OPENGL_LIBS = $(CURDIR)/cmake_root/lib/mesa.lib.so diff --git a/repos/libports/lib/import/import-qt5_qmake.mk b/repos/libports/lib/import/import-qt5_qmake.mk index 271cfcbd6c..a4e853123e 100644 --- a/repos/libports/lib/import/import-qt5_qmake.mk +++ b/repos/libports/lib/import/import-qt5_qmake.mk @@ -25,9 +25,9 @@ ifeq ($(CONTRIB_DIR),) QT_DIR = $(call select_from_repositories,src/lib/qt5) QT_API_DIR = $(call select_from_repositories,mkspecs)/.. else -QT_PORT_DIR = $(call select_from_ports,qt5) -QT_DIR = $(QT_PORT_DIR)/src/lib/qt5 -QT_API_DIR = $(QT_DIR)/genode/api +QT_PORT_DIR := $(call select_from_ports,qt5) +QT_DIR = $(QT_PORT_DIR)/src/lib/qt5 +QT_API_DIR = $(QT_DIR)/genode/api endif ifneq ($(VERBOSE),) @@ -104,8 +104,8 @@ ifeq ($(CONTRIB_DIR),) GENODE_QMAKE_INCDIR_OPENGL = $(call select_from_repositories,include/GL)/.. GENODE_QMAKE_INCDIR_EGL = $(call select_from_repositories,include/EGL)/.. else -GENODE_QMAKE_INCDIR_OPENGL = $(call select_from_ports,mesa)/include -GENODE_QMAKE_INCDIR_EGL = $(call select_from_ports,mesa)/include +GENODE_QMAKE_INCDIR_OPENGL := $(call select_from_ports,mesa)/include +GENODE_QMAKE_INCDIR_EGL := $(call select_from_ports,mesa)/include endif GENODE_QMAKE_LIBS_OPENGL = $(CURDIR)/qmake_root/lib/mesa.lib.so diff --git a/repos/libports/lib/import/import-spark.mk b/repos/libports/lib/import/import-spark.mk index 67c2a20108..387effb3b9 100644 --- a/repos/libports/lib/import/import-spark.mk +++ b/repos/libports/lib/import/import-spark.mk @@ -1,10 +1,10 @@ ADA_RTS = $(BUILD_BASE_DIR)/var/libcache/spark -ADA_RTS_SOURCE = $(call select_from_ports,ada-runtime)/ada-runtime/contrib/gcc-8.3.0 -ADA_RUNTIME_DIR = $(call select_from_ports,ada-runtime)/ada-runtime/src/minimal -ADA_RUNTIME_LIB_DIR = $(call select_from_ports,ada-runtime)/ada-runtime/src/lib -ADA_RUNTIME_COMMON_DIR = $(call select_from_ports,ada-runtime)/ada-runtime/src/common -ADA_RUNTIME_PLATFORM_DIR = $(call select_from_ports,ada-runtime)/ada-runtime/platform +ADA_RTS_SOURCE := $(call select_from_ports,ada-runtime)/ada-runtime/contrib/gcc-8.3.0 +ADA_RUNTIME_DIR := $(call select_from_ports,ada-runtime)/ada-runtime/src/minimal +ADA_RUNTIME_LIB_DIR := $(call select_from_ports,ada-runtime)/ada-runtime/src/lib +ADA_RUNTIME_COMMON_DIR := $(call select_from_ports,ada-runtime)/ada-runtime/src/common +ADA_RUNTIME_PLATFORM_DIR := $(call select_from_ports,ada-runtime)/ada-runtime/platform INC_DIR += $(ADA_RUNTIME_DIR) \ $(ADA_RUNTIME_LIB_DIR) \ diff --git a/repos/libports/lib/import/import-x86emu.mk b/repos/libports/lib/import/import-x86emu.mk index e9a6582358..9354e7cf98 100644 --- a/repos/libports/lib/import/import-x86emu.mk +++ b/repos/libports/lib/import/import-x86emu.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,x86emu)/include +X86EMU_DIR := $(call select_from_ports,x86emu) +INC_DIR += $(X86EMU_DIR)/include diff --git a/repos/libports/lib/import/import-zlib.mk b/repos/libports/lib/import/import-zlib.mk index 532f54b00c..6c00173a4e 100644 --- a/repos/libports/lib/import/import-zlib.mk +++ b/repos/libports/lib/import/import-zlib.mk @@ -1 +1,2 @@ -INC_DIR += $(call select_from_ports,zlib)/include/zlib +ZLIB_DIR := $(call select_from_ports,zlib) +INC_DIR += $(ZLIB_DIR)/include/zlib diff --git a/repos/libports/lib/mk/gmp.inc b/repos/libports/lib/mk/gmp.inc index 9d5c7e7d37..5b00a65cfa 100644 --- a/repos/libports/lib/mk/gmp.inc +++ b/repos/libports/lib/mk/gmp.inc @@ -1,4 +1,4 @@ -GMP_DIR = $(call select_from_ports,gmp)/src/lib/gmp +GMP_DIR := $(call select_from_ports,gmp)/src/lib/gmp include $(REP_DIR)/lib/import/import-gmp.mk diff --git a/repos/libports/lib/mk/icu.mk b/repos/libports/lib/mk/icu.mk index 7e63d31698..1cea94a1c5 100644 --- a/repos/libports/lib/mk/icu.mk +++ b/repos/libports/lib/mk/icu.mk @@ -1,6 +1,6 @@ include $(call select_from_repositories,lib/import/import-icu.mk) -ICU_DIR = $(call select_from_ports,icu)/src/lib/icu +ICU_DIR := $(call select_from_ports,icu)/src/lib/icu # copy-pasted from $(ICU_DIR)/source/common/Makefile.in and renamed OBJECTS to ICU_COMMON_OBJECTS diff --git a/repos/libports/lib/mk/jbig2dec.mk b/repos/libports/lib/mk/jbig2dec.mk index 0ff2d82880..e711bf1d02 100644 --- a/repos/libports/lib/mk/jbig2dec.mk +++ b/repos/libports/lib/mk/jbig2dec.mk @@ -1,6 +1,6 @@ -JBIG2DEC_DIR = $(call select_from_ports,jbig2dec)/src/lib/jbig2dec -LIBS += libc libpng zlib -INC_DIR += $(JBIG2DEC_DIR) $(REP_DIR)/include/jbig2dec +JBIG2DEC_DIR := $(call select_from_ports,jbig2dec)/src/lib/jbig2dec +LIBS += libc libpng zlib +INC_DIR += $(JBIG2DEC_DIR) $(REP_DIR)/include/jbig2dec # incorporate all '*.c' files except those that are not part of the library FILTER_OUT = jbig2dec.c snprintf.c pbm2png.c diff --git a/repos/libports/lib/mk/jpeg.mk b/repos/libports/lib/mk/jpeg.mk index c7faa3e3e4..b061fe5c89 100644 --- a/repos/libports/lib/mk/jpeg.mk +++ b/repos/libports/lib/mk/jpeg.mk @@ -1,6 +1,6 @@ -JPEG = jpeg-7 -JPEG_DIR = $(call select_from_ports,jpeg)/src/lib/jpeg -LIBS += libc +JPEG = jpeg-7 +JPEG_DIR := $(call select_from_ports,jpeg)/src/lib/jpeg +LIBS += libc # use our customized 'jconfig.h' file INC_DIR += $(REP_DIR)/include/jpeg diff --git a/repos/libports/lib/mk/libarchive.mk b/repos/libports/lib/mk/libarchive.mk index 5eb95129d5..e2a1943268 100644 --- a/repos/libports/lib/mk/libarchive.mk +++ b/repos/libports/lib/mk/libarchive.mk @@ -1,6 +1,6 @@ -LIBARCHIVE_DIR = $(call select_from_ports,libarchive)/src/lib/libarchive -LIBS += libc zlib liblzma -INC_DIR += $(REP_DIR)/src/lib/libarchive $(LIBARCHIVE_DIR) +LIBARCHIVE_DIR := $(call select_from_ports,libarchive)/src/lib/libarchive +LIBS += libc zlib liblzma +INC_DIR += $(REP_DIR)/src/lib/libarchive $(LIBARCHIVE_DIR) ALL_SRC_C := $(notdir $(wildcard $(LIBARCHIVE_DIR)/libarchive/*.c)) diff --git a/repos/libports/lib/mk/libpcg_random.mk b/repos/libports/lib/mk/libpcg_random.mk index 44d46a442c..855cd0acec 100644 --- a/repos/libports/lib/mk/libpcg_random.mk +++ b/repos/libports/lib/mk/libpcg_random.mk @@ -1,5 +1,5 @@ include $(REP_DIR)/lib/import/import-libpcg_random.mk -PCG_SRC_DIR = $(call select_from_ports,pcg-c)/src/lib/pcg-c/src +PCG_SRC_DIR := $(call select_from_ports,pcg-c)/src/lib/pcg-c/src CC_OPT += -std=c99 diff --git a/repos/libports/lib/mk/libyuv.inc b/repos/libports/lib/mk/libyuv.inc index 03853c8ad4..813769a194 100644 --- a/repos/libports/lib/mk/libyuv.inc +++ b/repos/libports/lib/mk/libyuv.inc @@ -1,7 +1,7 @@ SHARED_LIB = yes -YUV_PORT = $(call select_from_ports,libyuv) -YUV_DIR = $(YUV_PORT)/src/lib/libyuv +YUV_PORT := $(call select_from_ports,libyuv) +YUV_DIR = $(YUV_PORT)/src/lib/libyuv LIBS = libc stdcxx jpeg diff --git a/repos/libports/lib/mk/openjpeg.mk b/repos/libports/lib/mk/openjpeg.mk index 36a43d3299..3dfab6592a 100644 --- a/repos/libports/lib/mk/openjpeg.mk +++ b/repos/libports/lib/mk/openjpeg.mk @@ -1,7 +1,7 @@ -OPENJPEG = openjpeg-1.4 -OPENJPEG_DIR = $(call select_from_ports,openjpeg)/src/lib/openjpeg/libopenjpeg -LIBS += libc libm -INC_DIR += $(OPENJPEG_DIR) $(REP_DIR)/include/openjpeg +OPENJPEG = openjpeg-1.4 +OPENJPEG_DIR := $(call select_from_ports,openjpeg)/src/lib/openjpeg/libopenjpeg +LIBS += libc libm +INC_DIR += $(OPENJPEG_DIR) $(REP_DIR)/include/openjpeg # incorporate all '*.c' files except those that are not part of the library FILTER_OUT = t1_generate_luts.c diff --git a/repos/libports/lib/mk/qemu-usb.inc b/repos/libports/lib/mk/qemu-usb.inc index cc5b6fbc7a..433b515c6d 100644 --- a/repos/libports/lib/mk/qemu-usb.inc +++ b/repos/libports/lib/mk/qemu-usb.inc @@ -1,5 +1,5 @@ -LIB_DIR = $(REP_DIR)/src/lib/qemu-usb -QEMU_USB_DIR = $(call select_from_ports,qemu-usb)/src/lib/qemu/hw/usb +LIB_DIR = $(REP_DIR)/src/lib/qemu-usb +QEMU_USB_DIR := $(call select_from_ports,qemu-usb)/src/lib/qemu/hw/usb CC_WARN= diff --git a/repos/libports/lib/mk/spec/32bit/curl.mk b/repos/libports/lib/mk/spec/32bit/curl.mk index 400af0d37c..5e756657dd 100644 --- a/repos/libports/lib/mk/spec/32bit/curl.mk +++ b/repos/libports/lib/mk/spec/32bit/curl.mk @@ -1,4 +1,5 @@ -INC_DIR += $(call select_from_ports,curl)/include +CURL_DIR := $(call select_from_ports,curl) +INC_DIR += $(CURL_DIR)/include INC_DIR += $(REP_DIR)/src/lib/curl/spec/32bit INC_DIR += $(REP_DIR)/src/lib/curl/spec/32bit/curl diff --git a/repos/libports/lib/mk/spec/64bit/curl.mk b/repos/libports/lib/mk/spec/64bit/curl.mk index 1ed26a02df..3027bce2fb 100644 --- a/repos/libports/lib/mk/spec/64bit/curl.mk +++ b/repos/libports/lib/mk/spec/64bit/curl.mk @@ -1,4 +1,5 @@ -INC_DIR += $(call select_from_ports,curl)/include +CURL_DIR := $(call select_from_ports,curl) +INC_DIR += $(CURL_DIR)/include INC_DIR += $(REP_DIR)/src/lib/curl/spec/64bit INC_DIR += $(REP_DIR)/src/lib/curl/spec/64bit/curl diff --git a/repos/libports/lib/mk/spec/arm/ffi.mk b/repos/libports/lib/mk/spec/arm/ffi.mk index 9f664fe11c..e0970ee6fa 100644 --- a/repos/libports/lib/mk/spec/arm/ffi.mk +++ b/repos/libports/lib/mk/spec/arm/ffi.mk @@ -2,7 +2,7 @@ SHARED_LIB = yes LIBS = libc -FFI_PORT = $(call select_from_ports,ffi)/src/lib/ffi +FFI_PORT := $(call select_from_ports,ffi)/src/lib/ffi INC_DIR = $(FFI_PORT)/include diff --git a/repos/libports/lib/mk/spec/arm/libc-gen.mk b/repos/libports/lib/mk/spec/arm/libc-gen.mk index 5890d9804e..9df7812365 100644 --- a/repos/libports/lib/mk/spec/arm/libc-gen.mk +++ b/repos/libports/lib/mk/spec/arm/libc-gen.mk @@ -19,7 +19,7 @@ SRC_C += $(filter-out $(FILTER_OUT_C),$(notdir $(wildcard $(LIBC_GEN_ARM_DIR)/* # path is in effect when building the libc from a source archive (where the # ucontext.h header is taken from the libc API archive). # -CC_OPT_makecontext = -I$(call select_from_ports,libc)/include/libc/sys \ +CC_OPT_makecontext = -I$(LIBC_PORT_DIR)/include/libc/sys \ $(addprefix -I,$(call select_from_repositories,include/libc/sys)) vpath % $(LIBC_GEN_ARM_DIR) diff --git a/repos/libports/lib/mk/spec/arm/libcrypto.mk b/repos/libports/lib/mk/spec/arm/libcrypto.mk index 12ad5fe259..81d6412831 100644 --- a/repos/libports/lib/mk/spec/arm/libcrypto.mk +++ b/repos/libports/lib/mk/spec/arm/libcrypto.mk @@ -31,7 +31,9 @@ SRC_S = \ sha/asm/sha512-armv4.S \ # end of SRC_S -vpath %.S $(call select_from_ports,openssl)/src/lib/openssl/crypto +OPENSSL_DIR := $(call select_from_ports,openssl) + +vpath %.S $(OPENSSL_DIR)/src/lib/openssl/crypto ifeq ($(filter-out $(SPECS),neon),) vpath armcap_genode.c $(REP_DIR)/src/lib/openssl/crypto/spec/neon diff --git a/repos/libports/lib/mk/spec/arm_64/ffi.mk b/repos/libports/lib/mk/spec/arm_64/ffi.mk index c27567b9bd..21c075834c 100644 --- a/repos/libports/lib/mk/spec/arm_64/ffi.mk +++ b/repos/libports/lib/mk/spec/arm_64/ffi.mk @@ -2,7 +2,7 @@ SHARED_LIB = yes LIBS = libc -FFI_PORT = $(call select_from_ports,ffi)/src/lib/ffi +FFI_PORT := $(call select_from_ports,ffi)/src/lib/ffi INC_DIR = $(FFI_PORT)/include diff --git a/repos/libports/lib/mk/spec/arm_64/libc-gen.mk b/repos/libports/lib/mk/spec/arm_64/libc-gen.mk index 11ea992549..b471c42a61 100644 --- a/repos/libports/lib/mk/spec/arm_64/libc-gen.mk +++ b/repos/libports/lib/mk/spec/arm_64/libc-gen.mk @@ -14,7 +14,7 @@ SRC_C += flt_rounds.c fpgetmask.c fpsetmask.c infinity.c makecontext.c # path is in effect when building the libc from a source archive (where the # ucontext.h header is taken from the libc API archive). # -CC_OPT_makecontext = -I$(call select_from_ports,libc)/include/libc/sys \ +CC_OPT_makecontext = -I$(LIBC_PORT_DIR)/include/libc/sys \ $(addprefix -I,$(call select_from_repositories,include/libc/sys)) vpath %.c $(LIBC_GEN_ARM64_DIR) diff --git a/repos/libports/lib/mk/spec/arm_64/libcrypto.mk b/repos/libports/lib/mk/spec/arm_64/libcrypto.mk index a82c6de822..1fd9e1c3a6 100644 --- a/repos/libports/lib/mk/spec/arm_64/libcrypto.mk +++ b/repos/libports/lib/mk/spec/arm_64/libcrypto.mk @@ -30,7 +30,9 @@ SRC_S = \ sha/asm/sha512-armv8.S \ # end of SRC_S -vpath %.S $(call select_from_ports,openssl)/src/lib/openssl/crypto +OPENSSL_DIR := $(call select_from_ports,openssl) + +vpath %.S $(OPENSSL_DIR)/src/lib/openssl/crypto ifeq ($(filter-out $(SPECS),neon),) vpath armcap_genode.c $(REP_DIR)/src/lib/openssl/crypto/spec/neon diff --git a/repos/libports/lib/mk/spec/riscv/libc-gen.mk b/repos/libports/lib/mk/spec/riscv/libc-gen.mk index 36b37cfc01..28261c00cd 100644 --- a/repos/libports/lib/mk/spec/riscv/libc-gen.mk +++ b/repos/libports/lib/mk/spec/riscv/libc-gen.mk @@ -12,7 +12,7 @@ SRC_C += flt_rounds.c fpgetmask.c fpsetmask.c infinity.c makecontext.c # path is in effect when building the libc from a source archive (where the # ucontext.h header is taken from the libc API archive). # -CC_OPT_makecontext = -I$(call select_from_ports,libc)/include/libc/sys \ +CC_OPT_makecontext = -I$(LIBC_PORT_DIR)/include/libc/sys \ $(addprefix -I,$(call select_from_repositories,/include/libc/sys)) CC_OPT += -DSOFTFLOAT_FOR_GCC diff --git a/repos/libports/lib/mk/spec/x86_32/ffi.mk b/repos/libports/lib/mk/spec/x86_32/ffi.mk index b0ffbf4a0e..f2c2b1c36f 100644 --- a/repos/libports/lib/mk/spec/x86_32/ffi.mk +++ b/repos/libports/lib/mk/spec/x86_32/ffi.mk @@ -2,7 +2,7 @@ SHARED_LIB = yes LIBS = libc -FFI_PORT = $(call select_from_ports,ffi)/src/lib/ffi +FFI_PORT := $(call select_from_ports,ffi)/src/lib/ffi INC_DIR = $(FFI_PORT)/include diff --git a/repos/libports/lib/mk/spec/x86_32/libcrypto.mk b/repos/libports/lib/mk/spec/x86_32/libcrypto.mk index 249c5bb1f0..18f5456006 100644 --- a/repos/libports/lib/mk/spec/x86_32/libcrypto.mk +++ b/repos/libports/lib/mk/spec/x86_32/libcrypto.mk @@ -34,7 +34,9 @@ SRC_S = \ x86cpuid.s \ # end of SRC_S -vpath %.s $(call select_from_ports,openssl)/src/lib/openssl/crypto +OPENSSL_DIR := $(call select_from_ports,openssl) + +vpath %.s $(OPENSSL_DIR)/src/lib/openssl/crypto include $(REP_DIR)/lib/mk/libcrypto.inc diff --git a/repos/libports/lib/mk/spec/x86_64/ffi.mk b/repos/libports/lib/mk/spec/x86_64/ffi.mk index fc2749ca1e..c194f958e6 100644 --- a/repos/libports/lib/mk/spec/x86_64/ffi.mk +++ b/repos/libports/lib/mk/spec/x86_64/ffi.mk @@ -2,7 +2,7 @@ SHARED_LIB = yes LIBS = libc -FFI_PORT = $(call select_from_ports,ffi)/src/lib/ffi +FFI_PORT := $(call select_from_ports,ffi)/src/lib/ffi INC_DIR = $(FFI_PORT)/include diff --git a/repos/libports/lib/mk/spec/x86_64/libcrypto.mk b/repos/libports/lib/mk/spec/x86_64/libcrypto.mk index b07dc709f5..edb1698065 100644 --- a/repos/libports/lib/mk/spec/x86_64/libcrypto.mk +++ b/repos/libports/lib/mk/spec/x86_64/libcrypto.mk @@ -45,7 +45,9 @@ SRC_S = \ x86_64cpuid.s \ # end of SRC_S -vpath %.s $(call select_from_ports,openssl)/src/lib/openssl/crypto +OPENSSL_DIR := $(call select_from_ports,openssl) + +vpath %.s $(OPENSSL_DIR)/src/lib/openssl/crypto include $(REP_DIR)/lib/mk/libcrypto.inc diff --git a/repos/libports/lib/mk/x86emu.mk b/repos/libports/lib/mk/x86emu.mk index 71cfb9a228..27de24f25f 100644 --- a/repos/libports/lib/mk/x86emu.mk +++ b/repos/libports/lib/mk/x86emu.mk @@ -2,7 +2,7 @@ # x86 real-mode emulation library # -X86EMU_DIR = $(call select_from_ports,x86emu)/src/lib/x86emu/contrib +X86EMU_DIR := $(call select_from_ports,x86emu)/src/lib/x86emu/contrib INC_DIR += $(X86EMU_DIR) $(REP_DIR)/include/x86emu CC_OPT += -fomit-frame-pointer -Wno-maybe-uninitialized diff --git a/repos/libports/lib/mk/zlib.mk b/repos/libports/lib/mk/zlib.mk index a73b9bf962..7691a984d4 100644 --- a/repos/libports/lib/mk/zlib.mk +++ b/repos/libports/lib/mk/zlib.mk @@ -1,11 +1,11 @@ -ZLIB_DIR = $(call select_from_ports,zlib)/src/lib/zlib -LIBS += libc -INC_DIR += $(ZLIB_DIR) -SRC_C = adler32.c compress.c crc32.c deflate.c gzclose.c \ - gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c \ - inftrees.c trees.c uncompr.c zutil.c -CC_WARN = -CC_OPT += -DZ_HAVE_UNISTD_H +ZLIB_DIR := $(call select_from_ports,zlib)/src/lib/zlib +LIBS += libc +INC_DIR += $(ZLIB_DIR) +SRC_C = adler32.c compress.c crc32.c deflate.c gzclose.c \ + gzlib.c gzread.c gzwrite.c infback.c inffast.c inflate.c \ + inftrees.c trees.c uncompr.c zutil.c +CC_WARN = +CC_OPT += -DZ_HAVE_UNISTD_H vpath %.c $(ZLIB_DIR) diff --git a/repos/libports/src/test/fatfs_block_io/target.mk b/repos/libports/src/test/fatfs_block_io/target.mk index 94a07f4401..dcb5d0f9c5 100644 --- a/repos/libports/src/test/fatfs_block_io/target.mk +++ b/repos/libports/src/test/fatfs_block_io/target.mk @@ -6,7 +6,7 @@ SRC_CC = component.cc CC_DEF += -D_MAX_SS=FF_MAX_SS CC_WARN += -Wno-pointer-to-int-cast -FATFS_PORT_DIR = $(call select_from_ports,fatfs) +FATFS_PORT_DIR := $(call select_from_ports,fatfs) INC_DIR += $(FATFS_PORT_DIR)/include/fatfs diff --git a/repos/libports/src/test/pcg32/target.mk b/repos/libports/src/test/pcg32/target.mk index aea82a9452..dcef4aec19 100644 --- a/repos/libports/src/test/pcg32/target.mk +++ b/repos/libports/src/test/pcg32/target.mk @@ -1,7 +1,7 @@ TARGET = test-pcg32 LIBS = libpcg_random posix -PCG_SRC_DIR = $(call select_from_ports,pcg-c)/src/lib/pcg-c +PCG_SRC_DIR := $(call select_from_ports,pcg-c)/src/lib/pcg-c INC_DIR += $(PCG_SRC_DIR)/extras SRC_C = check-pcg32-global.c entropy.c diff --git a/repos/ports/lib/mk/gdbserver_platform.inc b/repos/ports/lib/mk/gdbserver_platform.inc index 479b9ef7d9..1adb5bcbfb 100644 --- a/repos/ports/lib/mk/gdbserver_platform.inc +++ b/repos/ports/lib/mk/gdbserver_platform.inc @@ -1,4 +1,4 @@ -GDB_CONTRIB_DIR = $(call select_from_ports,gdb)/src/noux-pkg/gdb +GDB_CONTRIB_DIR := $(call select_from_ports,gdb)/src/noux-pkg/gdb INC_DIR += $(REP_DIR)/src/lib/gdbserver_libc_support \ $(REP_DIR)/src/lib/gdbserver_platform \ diff --git a/repos/ports/lib/mk/virtualbox5-common.inc b/repos/ports/lib/mk/virtualbox5-common.inc index 24e523a326..da4c04b7e5 100644 --- a/repos/ports/lib/mk/virtualbox5-common.inc +++ b/repos/ports/lib/mk/virtualbox5-common.inc @@ -12,8 +12,8 @@ REQUIRES += installation_of_yasm REQUIRES += installation_of_iasl endif -VIRTUALBOX_DIR = $(call select_from_ports,virtualbox5)/src/app/virtualbox -VIRTUALBOX_SDK_DIR = $(call select_from_ports,virtualbox5)/src/app/virtualbox_sdk +VIRTUALBOX_DIR := $(call select_from_ports,virtualbox5)/src/app/virtualbox +VIRTUALBOX_SDK_DIR := $(call select_from_ports,virtualbox5)/src/app/virtualbox_sdk VBOX_DIR = $(VIRTUALBOX_DIR)/src/VBox diff --git a/repos/ports/lib/mk/virtualbox5-runtime.mk b/repos/ports/lib/mk/virtualbox5-runtime.mk index ae8b5ed087..88aff635c2 100644 --- a/repos/ports/lib/mk/virtualbox5-runtime.mk +++ b/repos/ports/lib/mk/virtualbox5-runtime.mk @@ -1,10 +1,12 @@ include $(REP_DIR)/lib/mk/virtualbox5-common.inc +LIBICONV_DIR := $(call select_from_ports,libiconv) + INC_DIR += $(VBOX_DIR)/Runtime/include INC_DIR += $(VIRTUALBOX_DIR)/src/libs/liblzf-3.4 INC_DIR += $(VIRTUALBOX_DIR)/src/libs/zlib-1.2.8 -INC_DIR += $(call select_from_ports,libiconv)/include/iconv +INC_DIR += $(LIBICONV_DIR)/include/iconv GENERIC_SRC_CC = $(notdir $(wildcard $(VBOX_DIR)/Runtime/generic/*.cpp)) diff --git a/repos/ports/lib/mk/virtualbox5-xml.mk b/repos/ports/lib/mk/virtualbox5-xml.mk index 09b7f50c35..bf2b4cc21e 100644 --- a/repos/ports/lib/mk/virtualbox5-xml.mk +++ b/repos/ports/lib/mk/virtualbox5-xml.mk @@ -3,9 +3,11 @@ include $(REP_DIR)/lib/mk/virtualbox5-common.inc ZLIB_DIR = $(VIRTUALBOX_DIR)/src/libs/zlib-1.2.8 LIBXML_DIR = $(VIRTUALBOX_DIR)/src/libs/libxml2-2.9.4 +LIBICONV_DIR := $(call select_from_ports,libiconv) + INC_DIR += $(ZLIB_DIR) INC_DIR += $(LIBXML_DIR)/include -INC_DIR += $(call select_from_ports,libiconv)/include/iconv +INC_DIR += $(LIBICONV_DIR)/include/iconv LIBS += stdcxx diff --git a/repos/ports/lib/mk/virtualbox6-runtime.mk b/repos/ports/lib/mk/virtualbox6-runtime.mk index 92b7c937ac..b4a6203ac0 100644 --- a/repos/ports/lib/mk/virtualbox6-runtime.mk +++ b/repos/ports/lib/mk/virtualbox6-runtime.mk @@ -1,10 +1,12 @@ include $(REP_DIR)/lib/mk/virtualbox6-common.inc +LIBICONV_DIR := $(call select_from_ports,libiconv) + INC_DIR += $(VBOX_DIR)/Runtime/include INC_DIR += $(VIRTUALBOX_DIR)/src/libs/liblzf-3.4 INC_DIR += $(VIRTUALBOX_DIR)/src/libs/zlib-1.2.11 -INC_DIR += $(call select_from_ports,libiconv)/include/iconv +INC_DIR += $(LIBICONV_DIR)/include/iconv INC_DIR += $(REP_DIR)/src/virtualbox6/include/libc LIBS += stdcxx diff --git a/repos/ports/lib/mk/virtualbox6-xml.mk b/repos/ports/lib/mk/virtualbox6-xml.mk index 635e693720..cade8b289c 100644 --- a/repos/ports/lib/mk/virtualbox6-xml.mk +++ b/repos/ports/lib/mk/virtualbox6-xml.mk @@ -1,11 +1,13 @@ include $(REP_DIR)/lib/mk/virtualbox6-common.inc +LIBICONV_DIR := $(call select_from_ports,libiconv) + ZLIB_DIR = $(VIRTUALBOX_DIR)/src/libs/zlib-1.2.11 LIBXML_DIR = $(VIRTUALBOX_DIR)/src/libs/libxml2-2.9.4 INC_DIR += $(ZLIB_DIR) INC_DIR += $(LIBXML_DIR)/include -INC_DIR += $(call select_from_ports,libiconv)/include/iconv +INC_DIR += $(LIBICONV_DIR)/include/iconv INC_DIR += $(VBOX_DIR)/Runtime/include LIBS += stdcxx diff --git a/repos/ports/src/app/gdb_monitor/target.mk b/repos/ports/src/app/gdb_monitor/target.mk index 9b0986f3c4..cae42e9cc1 100644 --- a/repos/ports/src/app/gdb_monitor/target.mk +++ b/repos/ports/src/app/gdb_monitor/target.mk @@ -1,6 +1,6 @@ TARGET = gdb_monitor -GDB_CONTRIB_DIR = $(call select_from_ports,gdb)/src/noux-pkg/gdb +GDB_CONTRIB_DIR := $(call select_from_ports,gdb)/src/noux-pkg/gdb INC_DIR += $(GDB_CONTRIB_DIR)/include \ $(GDB_CONTRIB_DIR) \ diff --git a/repos/ports/src/noux-pkg/bash-minimal/target.mk b/repos/ports/src/noux-pkg/bash-minimal/target.mk index d3f7d4912b..dcb4ce44e6 100644 --- a/repos/ports/src/noux-pkg/bash-minimal/target.mk +++ b/repos/ports/src/noux-pkg/bash-minimal/target.mk @@ -2,6 +2,6 @@ BINARIES := bash INSTALL_TAR_CONTENT := $(addprefix bin/,$(BINARIES)) -PKG_DIR = $(call select_from_ports,bash)/src/noux-pkg/bash +PKG_DIR := $(call select_from_ports,bash)/src/noux-pkg/bash include $(REP_DIR)/src/noux-pkg/bash/target.inc diff --git a/repos/ports/src/noux-pkg/binutils/target.inc b/repos/ports/src/noux-pkg/binutils/target.inc index 57780ea5a6..fce2ecb3d4 100644 --- a/repos/ports/src/noux-pkg/binutils/target.inc +++ b/repos/ports/src/noux-pkg/binutils/target.inc @@ -11,6 +11,6 @@ CONFIGURE_ARGS = --disable-werror \ # MAKE_ENV = $(MKENV) -PKG_DIR = $(call select_from_ports,binutils)/src/noux-pkg/binutils +PKG_DIR := $(call select_from_ports,binutils)/src/noux-pkg/binutils include $(call select_from_repositories,mk/noux.mk) diff --git a/repos/ports/src/noux-pkg/coreutils-minimal/target.mk b/repos/ports/src/noux-pkg/coreutils-minimal/target.mk index d0b4eb36e5..a2fb037b29 100644 --- a/repos/ports/src/noux-pkg/coreutils-minimal/target.mk +++ b/repos/ports/src/noux-pkg/coreutils-minimal/target.mk @@ -2,6 +2,6 @@ BINARIES := cat cp ls mkdir mv rm rmdir sort tail md5sum INSTALL_TAR_CONTENT := $(addprefix bin/,$(BINARIES)) -PKG_DIR = $(call select_from_ports,coreutils)/src/noux-pkg/coreutils +PKG_DIR := $(call select_from_ports,coreutils)/src/noux-pkg/coreutils include $(REP_DIR)/src/noux-pkg/coreutils/target.inc diff --git a/repos/ports/src/noux-pkg/e2fsprogs-minimal/target.mk b/repos/ports/src/noux-pkg/e2fsprogs-minimal/target.mk index 856854a5e7..770fa97db3 100644 --- a/repos/ports/src/noux-pkg/e2fsprogs-minimal/target.mk +++ b/repos/ports/src/noux-pkg/e2fsprogs-minimal/target.mk @@ -2,6 +2,6 @@ BINARIES := fsck.ext2 mkfs.ext2 resize2fs INSTALL_TAR_CONTENT := $(addprefix bin/,$(BINARIES)) -PKG_DIR = $(call select_from_ports,e2fsprogs)/src/noux-pkg/e2fsprogs +PKG_DIR := $(call select_from_ports,e2fsprogs)/src/noux-pkg/e2fsprogs include $(REP_DIR)/src/noux-pkg/e2fsprogs/target.inc diff --git a/repos/ports/src/noux-pkg/gcc/target.inc b/repos/ports/src/noux-pkg/gcc/target.inc index ed17520d0e..97b166f013 100644 --- a/repos/ports/src/noux-pkg/gcc/target.inc +++ b/repos/ports/src/noux-pkg/gcc/target.inc @@ -1,6 +1,6 @@ PWD = $(shell pwd) -PKG_DIR = $(call select_from_ports,gcc)/src/noux-pkg/gcc +PKG_DIR := $(call select_from_ports,gcc)/src/noux-pkg/gcc CONFIGURE_ARGS = --program-prefix=$(PROGRAM_PREFIX) \ --target=$(GCC_TARGET) \ diff --git a/repos/ports/src/noux-pkg/gdb/target.inc b/repos/ports/src/noux-pkg/gdb/target.inc index cd8e64724e..2839f436f8 100644 --- a/repos/ports/src/noux-pkg/gdb/target.inc +++ b/repos/ports/src/noux-pkg/gdb/target.inc @@ -1,4 +1,4 @@ -PKG_DIR = $(call select_from_ports,gdb)/src/noux-pkg/gdb +PKG_DIR := $(call select_from_ports,gdb)/src/noux-pkg/gdb CONFIGURE_ARGS += --program-prefix=$(PROGRAM_PREFIX) \ --target=$(GDB_TARGET) \ diff --git a/repos/ports/src/noux-pkg/vim-minimal/target.mk b/repos/ports/src/noux-pkg/vim-minimal/target.mk index bde63f0284..f78fc7ea59 100644 --- a/repos/ports/src/noux-pkg/vim-minimal/target.mk +++ b/repos/ports/src/noux-pkg/vim-minimal/target.mk @@ -1,5 +1,5 @@ INSTALL_TAR_CONTENT := bin/vim -PKG_DIR = $(call select_from_ports,vim)/src/noux-pkg/vim +PKG_DIR := $(call select_from_ports,vim)/src/noux-pkg/vim include $(REP_DIR)/src/noux-pkg/vim/target.inc From 759ed40d987b3e9a3f09eee5cfc2990754a2f421 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 6 Oct 2022 14:17:35 +0200 Subject: [PATCH 0005/1921] hw: implement MSI support for x86 Fix genodelabs/genode#4633 --- .../base-hw/src/core/irq_session_component.cc | 5 ++-- repos/base-hw/src/core/platform.cc | 1 + repos/base-hw/src/core/platform.h | 22 +++++++++------- .../src/core/spec/arm/platform_support.cc | 9 +++---- .../src/core/spec/riscv/platform_support.cc | 7 +++--- .../src/core/spec/x86_64/platform_support.cc | 25 +++++++++++++++++-- 6 files changed, 48 insertions(+), 21 deletions(-) diff --git a/repos/base-hw/src/core/irq_session_component.cc b/repos/base-hw/src/core/irq_session_component.cc index 33d54b2f59..4f710b1df2 100644 --- a/repos/base-hw/src/core/irq_session_component.cc +++ b/repos/base-hw/src/core/irq_session_component.cc @@ -58,6 +58,7 @@ Irq_session_component::~Irq_session_component() using namespace Kernel; _irq_alloc.free((void *)(addr_t)_irq_number); + if (_is_msi) Platform::free_msi_vector(_address, _value); } @@ -72,10 +73,10 @@ Irq_session_component::Irq_session_component(Range_allocator &irq_alloc, Arg_string::find_arg(args, "device_config_phys").long_value(0); if (mmconf) { - _is_msi = - Platform::get_msi_params(mmconf, _address, _value, _irq_number); + _is_msi = Platform::alloc_msi_vector(_address, _value); if (!_is_msi) throw Service_denied(); + _irq_number = (unsigned) _value; } /* allocate interrupt */ diff --git a/repos/base-hw/src/core/platform.cc b/repos/base-hw/src/core/platform.cc index 66d1146a89..e51cb2210d 100644 --- a/repos/base-hw/src/core/platform.cc +++ b/repos/base-hw/src/core/platform.cc @@ -161,6 +161,7 @@ void Platform::_init_platform_info() xml.node("kernel", [&] () { xml.attribute("name", "hw"); xml.attribute("acpi", true); + xml.attribute("msi", true); }); _init_additional_platform_info(xml); xml.node("affinity-space", [&] () { diff --git a/repos/base-hw/src/core/platform.h b/repos/base-hw/src/core/platform.h index 44f72754f9..8924242887 100644 --- a/repos/base-hw/src/core/platform.h +++ b/repos/base-hw/src/core/platform.h @@ -97,18 +97,22 @@ class Genode::Platform : public Genode::Platform_generic static long irq(long const user_irq); /** - * Get MSI-related parameters from device PCI config space + * Allocate MSI exception vector entry * - * \param mmconf PCI config space address of device - * \param address MSI address register value to use - * \param data MSI data register value to use - * \param irq_number IRQ to use + * \param address MSI address register value to use + * \param data MSI data register value to use * - * \return true if the device is MSI-capable, false if not + * \return true if the platform is MSI-capable, false if not */ - static bool get_msi_params(const addr_t mmconf, - addr_t &address, addr_t &data, - unsigned &irq_number); + static bool alloc_msi_vector(addr_t &address, addr_t &data); + + /** + * Allocate MSI exception vector entry + * + * \param address MSI address register value to free + * \param data MSI data register value to free + */ + static void free_msi_vector(addr_t address, addr_t data); static addr_t core_phys_addr(addr_t virt); diff --git a/repos/base-hw/src/core/spec/arm/platform_support.cc b/repos/base-hw/src/core/spec/arm/platform_support.cc index 5bef5904c3..8890fb0d3d 100644 --- a/repos/base-hw/src/core/spec/arm/platform_support.cc +++ b/repos/base-hw/src/core/spec/arm/platform_support.cc @@ -26,8 +26,7 @@ void Platform::_init_additional_platform_info(Genode::Xml_generator&) { } long Platform::irq(long const user_irq) { return user_irq; } -bool Platform::get_msi_params(const addr_t /* mmconf */, addr_t & /* address */, - addr_t & /* data */, unsigned & /* irq_number */) -{ - return false; -} +bool Platform::alloc_msi_vector(addr_t &, addr_t &) { return false; } + + +void Platform::free_msi_vector(addr_t, addr_t) { } diff --git a/repos/base-hw/src/core/spec/riscv/platform_support.cc b/repos/base-hw/src/core/spec/riscv/platform_support.cc index 702c1b0c35..d9cb1ada00 100644 --- a/repos/base-hw/src/core/spec/riscv/platform_support.cc +++ b/repos/base-hw/src/core/spec/riscv/platform_support.cc @@ -28,6 +28,7 @@ void Platform::_init_additional_platform_info(Genode::Xml_generator&) { } long Platform::irq(long const user_irq ) { return user_irq; } -bool Platform::get_msi_params(addr_t /* mmconf */, addr_t & /* address */, - addr_t & /* data */, unsigned & /* irq_number */) { - return false; } +bool Platform::alloc_msi_vector(addr_t &, addr_t &) { return false; } + + +void Platform::free_msi_vector(addr_t, addr_t) { } diff --git a/repos/base-hw/src/core/spec/x86_64/platform_support.cc b/repos/base-hw/src/core/spec/x86_64/platform_support.cc index 70bdf6a40d..ef53e5dec2 100644 --- a/repos/base-hw/src/core/spec/x86_64/platform_support.cc +++ b/repos/base-hw/src/core/spec/x86_64/platform_support.cc @@ -15,6 +15,7 @@ #include #include #include +#include using namespace Genode; @@ -60,8 +61,28 @@ void Platform::_init_additional_platform_info(Xml_generator &xml) } -bool Platform::get_msi_params(addr_t, addr_t &, addr_t &, unsigned &) { - return false; } +Genode::Bit_allocator<64> & msi_allocator() +{ + static Genode::Bit_allocator<64> msi_allocator; + return msi_allocator; +} + + +bool Platform::alloc_msi_vector(addr_t & address, addr_t & value) +{ + try { + address = Hw::Cpu_memory_map::lapic_phys_base(); + value = Board::Pic::IPI - 1 - msi_allocator().alloc(); + return true; + } catch(...) {} + return false; +} + + +void Platform::free_msi_vector(addr_t, addr_t value) +{ + msi_allocator().free(Board::Pic::IPI - 1 - value); +} Board::Serial::Serial(addr_t, size_t, unsigned baudrate) From c0fddd0a14331c6358756bd726236de94852bb4e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 13 Oct 2022 16:02:17 +0200 Subject: [PATCH 0006/1921] nitpicker: drop double press/release events Fixes #4639 --- repos/os/src/server/nitpicker/user_state.cc | 37 +++++++++++++-------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/repos/os/src/server/nitpicker/user_state.cc b/repos/os/src/server/nitpicker/user_state.cc index d26b5ba7b2..07a25c931a 100644 --- a/repos/os/src/server/nitpicker/user_state.cc +++ b/repos/os/src/server/nitpicker/user_state.cc @@ -112,23 +112,34 @@ void User_state::_handle_input_event(Input::Event ev) ev.handle_touch([&] (Input::Touch_id, float x, float y) { _pointer_pos = Point((int)x, (int)y); }); + /* track key states, drop double press/release events */ + { + bool drop = false; + + ev.handle_press([&] (Keycode key, Codepoint) { + if (_key_array.pressed(key)) { + warning("suspicious double press of ", Input::key_name(key)); + drop = true; + } + _key_array.pressed(key, true); + }); + + ev.handle_release([&] (Keycode key) { + if (!_key_array.pressed(key)) { + warning("suspicious double release of ", Input::key_name(key)); + drop = true; + } + _key_array.pressed(key, false); + }); + + if (drop) + return; + } + /* count keys */ if (ev.press()) _key_cnt++; if (ev.release() && (_key_cnt > 0)) _key_cnt--; - /* track key states */ - ev.handle_press([&] (Keycode key, Codepoint) { - if (_key_array.pressed(key)) - Genode::warning("suspicious double press of ", Input::key_name(key)); - _key_array.pressed(key, true); - }); - - ev.handle_release([&] (Keycode key) { - if (!_key_array.pressed(key)) - Genode::warning("suspicious double release of ", Input::key_name(key)); - _key_array.pressed(key, false); - }); - if (ev.absolute_motion() || ev.relative_motion() || ev.touch()) { update_hover(); From 7ebd3a086adba526a15083030fe40a5f04cb5fcf Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 14 Oct 2022 11:51:59 +0200 Subject: [PATCH 0007/1921] nova: avoid reset on machines with too many CPUs The NOVA kernel and Genode's roottask core are configured to be runnable with up to 64 CPUs (MAX_SUPPORTED_CPUS in core resp. NUM_CPU in kernel). On machines with more CPUs a reset occurred. The commit checks for this case, bootstraps the first 64 CPUs only, and sends all other CPUs to sleep. Also, the platform_info ROM size is increased to host information about more than 32 CPUs. Issue #4640 --- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- repos/base-nova/src/core/platform.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index 26c3ed6a4b..8dc8cb7754 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -9ad770935115d201863fd83924e4684b14b8b56f +ab5601025e5e69a30f03219c3be108ff3d866ce4 diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index a20fb070fb..f2b3c2c941 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := a34076e7b8d48d08c2edee7754eadad8b6ea5312 +REV(nova) := 048109941862356b4785a50d1ef012d2ad9761c5 DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) diff --git a/repos/base-nova/src/core/platform.cc b/repos/base-nova/src/core/platform.cc index bb887537f9..8a563515c9 100644 --- a/repos/base-nova/src/core/platform.cc +++ b/repos/base-nova/src/core/platform.cc @@ -677,7 +677,7 @@ Platform::Platform() rom_name, " as ROM module"); }); }; - export_pages_as_rom_module("platform_info", 1, + export_pages_as_rom_module("platform_info", 1 + (MAX_SUPPORTED_CPUS / 32), [&] (char * const ptr, size_t const size) { Xml_generator xml(ptr, size, "platform_info", [&] () { From ab7101e3d2d3c2246daf42ea776b768f1fa746fa Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 18 Oct 2022 13:12:57 +0200 Subject: [PATCH 0008/1921] ahci_block: fix timer route in test Thanks to Cedric for the patch. Fixes #4644 --- repos/os/run/ahci_block.run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/run/ahci_block.run b/repos/os/run/ahci_block.run index 6fdb74bd8e..55124ad8ce 100644 --- a/repos/os/run/ahci_block.run +++ b/repos/os/run/ahci_block.run @@ -92,7 +92,7 @@ install_config { - + From cd08cd54a4af3a354241f746df0f6a7dfb3c460e Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Mon, 17 Oct 2022 09:17:21 +0200 Subject: [PATCH 0009/1921] usb_block_drv: allow for using UAS devices via BOT Reintroduce: USB Attached SCSI devices might expose a bulk-only interface as fall-back at interface 0 and alternate setting 0. This commit allows for probing all alternate settings of the active interface to be able to use such devices. The configuration was extended so that in case the device interface is known beforehand the driver can be configured accordingly. Additionally: Perform configuration reset upon sessions close in order to bring USB device to a well defined state. fixes #4494 --- repos/dde_linux/src/lib/lx_emul/usb.c | 1 + repos/os/src/drivers/usb_block/README | 12 ++++--- repos/os/src/drivers/usb_block/main.cc | 44 ++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 4 deletions(-) diff --git a/repos/dde_linux/src/lib/lx_emul/usb.c b/repos/dde_linux/src/lib/lx_emul/usb.c index 8d1bc39b2f..85df4f7bc1 100644 --- a/repos/dde_linux/src/lib/lx_emul/usb.c +++ b/repos/dde_linux/src/lib/lx_emul/usb.c @@ -262,6 +262,7 @@ static int usb_rpc_call(void * data) urbs->in_delete = 1; usb_kill_anchored_urbs(&urbs->submitted); urbs->in_delete = 0; + ret = usb_reset_configuration(udev); } usb_rpc_args.ret = ret; diff --git a/repos/os/src/drivers/usb_block/README b/repos/os/src/drivers/usb_block/README index 056eb495a0..6f0f75f5e5 100644 --- a/repos/os/src/drivers/usb_block/README +++ b/repos/os/src/drivers/usb_block/README @@ -8,13 +8,16 @@ Behavior This driver only supports USB Mass Storage Bulk-Only devices that use the SCSI Block Commands set (direct-access). Devices using different command sets, e.g, SD/HC devices or some external disc drives will not work properly -if at all. The following configuration snippets demonstrates how to use the -driver: +if at all. The driver will query the device and tries to use the first +bulk-only interface it finds. + +The following configuration snippets demonstrates how to use the driver: ! ! ! -! +! ! ! ! @@ -61,7 +64,8 @@ In addition to other attributes that can be used to configure sepecific aspects of the driver. The 'writeable' attribute denotes the permission of the Block session client to write to the USB device. Independent thereof the driver will query the device and will set the Block session operations accordingly. The -'interface' specifies the USB interface the driver should use. If the device +'interface' specifies the USB interface the driver should use and 'alt_setting' +allows for selecting the appropriate alternate setting. If the device provides multiple SCSI devices the 'lun' attribute is used to select the right one. When 'reset_device' is enabled, a 'bulk-only mass storage reset' command is sent to the device at the beginning of the initialization step. This command diff --git a/repos/os/src/drivers/usb_block/main.cc b/repos/os/src/drivers/usb_block/main.cc index 315ffe8c62..c1693d8992 100644 --- a/repos/os/src/drivers/usb_block/main.cc +++ b/repos/os/src/drivers/usb_block/main.cc @@ -170,6 +170,9 @@ struct Usb::Block_driver : Usb::Completion uint8_t active_interface = 0; uint8_t active_lun = 0; + enum { INVALID_ALT_SETTING = 256 }; + uint16_t active_alt_setting = 0; + uint32_t active_tag = 0; uint32_t new_tag() { return ++active_tag % 0xffffffu; } @@ -431,6 +434,43 @@ struct Usb::Block_driver : Usb::Completion IPROTO_BULK_ONLY = 80 }; + /* + * Devices following the USB Attached SCSI specification + * normally expose the bulk-only transport in interface 0 alt 0 + * and the UAS endpoints in interface 0 alt 1. + * + * The default interface and thereby 'iface.current()', however, + * might point to the interface 0 alt 1 for such devices. + * + * In case the alternate setting was not explicitly configured + * we look for the first bulk-only setting. + */ + + if (active_alt_setting == INVALID_ALT_SETTING) { + + /* cap value in case there is no bulk-only */ + active_alt_setting = 0; + + for (unsigned i = 0; i < iface.alternate_count(); i++) { + Alternate_interface &aif = iface.alternate_interface(i); + if (aif.iclass == ICLASS_MASS_STORAGE + && aif.isubclass == ISUBCLASS_SCSI + && aif.iprotocol == IPROTO_BULK_ONLY) { + + active_alt_setting = i; + + Genode::log("Use probed alternate setting ", + active_alt_setting, " for interface ", + active_interface); + break; + } + } + } + + Alternate_interface &aif = + iface.alternate_interface((uint8_t)active_alt_setting); + iface.set_alternate_interface(aif); + Alternate_interface &alt_iface = iface.current(); if (alt_iface.iclass != ICLASS_MASS_STORAGE @@ -782,6 +822,10 @@ struct Usb::Block_driver : Usb::Completion active_lun = node.attribute_value("lun", 0UL); reset_device = node.attribute_value("reset_device", false); verbose_scsi = node.attribute_value("verbose_scsi", false); + + active_alt_setting = + node.attribute_value("alt_setting", + (unsigned long)INVALID_ALT_SETTING); } /** From 4dee72a4870d98432b2bf9a932ca88e80b8c526d Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Tue, 18 Oct 2022 15:47:02 +0200 Subject: [PATCH 0010/1921] sculpt: fix shape-report routing in deploy example The deploy example mistakenly applied label rewriting for the pointer-shape report. Fixed genodelabs/genode#4645 --- repos/gems/sculpt/deploy/example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/sculpt/deploy/example b/repos/gems/sculpt/deploy/example index c25307766c..9058277385 100644 --- a/repos/gems/sculpt/deploy/example +++ b/repos/gems/sculpt/deploy/example @@ -20,7 +20,7 @@ - + From df4c4d5be2eb294a38f4312810fc82fa47c99660 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 20 Oct 2022 17:02:50 +0200 Subject: [PATCH 0011/1921] base: check for used blocks in Allocator_avl The check is required for alloc_addr() as the desired range may already be backed by a used block. --- repos/base/src/lib/base/allocator_avl.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/repos/base/src/lib/base/allocator_avl.cc b/repos/base/src/lib/base/allocator_avl.cc index d89e5c12c2..816a9d92ab 100644 --- a/repos/base/src/lib/base/allocator_avl.cc +++ b/repos/base/src/lib/base/allocator_avl.cc @@ -322,7 +322,7 @@ Allocator_avl_base::_allocate(size_t const size, unsigned align, Range range, Block *b_ptr = _addr_tree.first(); b_ptr = b_ptr ? search_fn(*b_ptr) : 0; - if (!b_ptr) { + if (!b_ptr || b_ptr->used()) { /* range conflict */ _md_alloc.free(two_blocks.b1_ptr, sizeof(Block)); _md_alloc.free(two_blocks.b2_ptr, sizeof(Block)); @@ -362,10 +362,6 @@ Allocator_avl_base::alloc_aligned(size_t size, unsigned align, Range range) Range_allocator::Alloc_result Allocator_avl_base::alloc_addr(size_t size, addr_t addr) { /* check for integer overflow */ - if (addr + size - 1 < addr) - return Alloc_error::DENIED; - - /* check for range conflict */ if (!_sum_in_range(addr, size)) return Alloc_error::DENIED; From d5577421f8996952bfaaffc7a422f206675f400c Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 21 Oct 2022 09:57:47 +0200 Subject: [PATCH 0012/1921] wireguard: create dir before generating asm file Prevents errors like follows. /bin/bash: arch/arm64/crypto/poly1305-core.S: No such file or directory make[4]: *** [.../genode/repos/dde_linux/lib/mk/spec/arm_64/wireguard_lx_inc_dirs.mk:17: arch/arm64/crypto/poly1305-core.S] Error 1 --- repos/dde_linux/lib/mk/spec/arm_64/wireguard_lx_inc_dirs.mk | 2 ++ repos/dde_linux/lib/mk/spec/x86_64/wireguard_lx_inc_dirs.mk | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/repos/dde_linux/lib/mk/spec/arm_64/wireguard_lx_inc_dirs.mk b/repos/dde_linux/lib/mk/spec/arm_64/wireguard_lx_inc_dirs.mk index f75fb7b75f..46449c8a0e 100644 --- a/repos/dde_linux/lib/mk/spec/arm_64/wireguard_lx_inc_dirs.mk +++ b/repos/dde_linux/lib/mk/spec/arm_64/wireguard_lx_inc_dirs.mk @@ -14,6 +14,8 @@ vpath arch/arm64/kernel/smp.c $(REP_DIR)/src/lib/lx_emul/shadow SRC_S += arch/arm64/crypto/poly1305-core.S arch/arm64/crypto/poly1305-core.S: + $(MSG_CONVERT)$@ + $(VERBOSE)mkdir -p $(dir $@) $(VERBOSE)perl $(LX_SRC_DIR)/arch/arm64/crypto/poly1305-armv8.pl > $@ CC_OPT_arch/arm64/crypto/poly1305-core += -Dpoly1305_init=poly1305_init_arm64 diff --git a/repos/dde_linux/lib/mk/spec/x86_64/wireguard_lx_inc_dirs.mk b/repos/dde_linux/lib/mk/spec/x86_64/wireguard_lx_inc_dirs.mk index 18a49b8891..b118e8d641 100644 --- a/repos/dde_linux/lib/mk/spec/x86_64/wireguard_lx_inc_dirs.mk +++ b/repos/dde_linux/lib/mk/spec/x86_64/wireguard_lx_inc_dirs.mk @@ -7,6 +7,8 @@ PRG_DIR := $(REP_DIR)/src/app/wireguard/spec/x86_64 SRC_S += arch/x86/crypto/poly1305-x86_64-cryptogams.S arch/x86/crypto/poly1305-x86_64-cryptogams.S: - perl $(LX_SRC_DIR)/arch/x86/crypto/poly1305-x86_64-cryptogams.pl > $@ + $(MSG_CONVERT)$@ + $(VERBOSE)mkdir -p $(dir $@) + $(VERBOSE)perl $(LX_SRC_DIR)/arch/x86/crypto/poly1305-x86_64-cryptogams.pl > $@ include $(REP_DIR)/lib/mk/wireguard_lx_inc_dirs.inc From 9467d4cb0b9a20a346e1aec8860590aaeb7bb3bc Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 21 Oct 2022 11:41:59 +0200 Subject: [PATCH 0013/1921] pci_decode: initial device-report buffer of 32K This prevents multiple generation attempts with undersized buffers on recent hardware, which needs at least 12K. --- repos/os/src/app/pci_decode/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/src/app/pci_decode/main.cc b/repos/os/src/app/pci_decode/main.cc index a786606a31..50a1bbdf71 100644 --- a/repos/os/src/app/pci_decode/main.cc +++ b/repos/os/src/app/pci_decode/main.cc @@ -34,7 +34,7 @@ struct Main Attached_rom_dataspace sys_rom { env, "system" }; Signal_handler
sys_rom_handler { env.ep(), *this, &Main::sys_rom_update }; - Expanding_reporter pci_reporter { env, "devices", "devices" }; + Expanding_reporter pci_reporter { env, "devices", "devices", { 32*1024 } }; Registry bridge_registry {}; /* contains host bridges */ bool apic_capable { false }; From 5a06a9dec11ab6d22d60a9007319788baca807f0 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 20 Oct 2022 15:12:52 +0200 Subject: [PATCH 0014/1921] lx_emul: provide pci_try_set_mwi() --- repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c b/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c index f9fc4b7aae..123d1e16fd 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c @@ -24,6 +24,12 @@ int pci_set_mwi(struct pci_dev * dev) } +int pci_try_set_mwi(struct pci_dev *dev) +{ + return pci_set_mwi(dev); +} + + bool pci_dev_run_wake(struct pci_dev * dev) { return false; From 9c136f66d4f0b8e1e57223d8eafcc58d412dd959 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 24 Oct 2022 14:33:35 +0200 Subject: [PATCH 0015/1921] ieee754: adjust RAM quota to sel4 --- repos/libports/run/ieee754.run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/repos/libports/run/ieee754.run b/repos/libports/run/ieee754.run index d9680819ca..75eb5ff5b2 100644 --- a/repos/libports/run/ieee754.run +++ b/repos/libports/run/ieee754.run @@ -25,7 +25,7 @@ install_config { - + @@ -33,7 +33,7 @@ install_config { - + @@ -41,7 +41,7 @@ install_config { - + @@ -49,7 +49,7 @@ install_config { - + From 7a5eab954137666e7ae2a0c4d268712113d37d89 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 26 Oct 2022 14:19:40 +0200 Subject: [PATCH 0016/1921] grub2: make ISO bootable on hardware With "grub2: update to newer grub2 2.06 version" a regression slipped in which makes the ISO not bootable on real hardware. The commit reverts to the previous behaviour, to load the GRUB2 modules after boot later one by one in the ISO format case. Fixes #4647 --- repos/base/ports/grub2.hash | 2 +- repos/base/ports/grub2.port | 2 +- tool/run/iso.inc | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/repos/base/ports/grub2.hash b/repos/base/ports/grub2.hash index 9bb012cc65..f61905c659 100644 --- a/repos/base/ports/grub2.hash +++ b/repos/base/ports/grub2.hash @@ -1 +1 @@ -f15e84afbb47b892ed26a5ae56f5bb038777a3c0 +aae6a9ce3485b9fe5c589817e4cfc80b199d8e11 diff --git a/repos/base/ports/grub2.port b/repos/base/ports/grub2.port index 8daa867699..7b212d5fa1 100644 --- a/repos/base/ports/grub2.port +++ b/repos/base/ports/grub2.port @@ -3,7 +3,7 @@ VERSION := git DOWNLOADS := g2fg.git URL(g2fg) := https://github.com/alex-ab/g2fg.git -REV(g2fg) := 7da0601946bd2bb75f4e9c3b56cb18e44b2997a1 +REV(g2fg) := 7fb21d87623a3e511ec755d9a4024e16728937be DIR(g2fg) := boot default: $(DOWNLOADS) diff --git a/tool/run/iso.inc b/tool/run/iso.inc index 9170c84f67..1bd59b47f7 100644 --- a/tool/run/iso.inc +++ b/tool/run/iso.inc @@ -14,5 +14,10 @@ proc install_iso_bootloader_to_run_dir { } { exec mkdir -p [run_dir]/boot/grub/i386-pc exec cp $grub2_path/boot/grub2/eltorito.img [run_dir]/boot/grub/i386-pc/. + set filelist [glob -nocomplain $grub2_path/boot/grub2/*.mod] + foreach file $filelist { + file copy $file [run_dir]/boot/grub/i386-pc/. + } + exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender } From b2189ae88b795e3aad8c6d07ec93989473718123 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Thu, 27 Oct 2022 15:19:18 +0200 Subject: [PATCH 0017/1921] vfs/log: block indefinitely on read access With this change, the log file system mimics the behaviour of /dev/stdin. Fixes #4649 --- repos/os/src/lib/vfs/log_file_system.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/os/src/lib/vfs/log_file_system.h b/repos/os/src/lib/vfs/log_file_system.h index c3711fd886..c615de8ad9 100644 --- a/repos/os/src/lib/vfs/log_file_system.h +++ b/repos/os/src/lib/vfs/log_file_system.h @@ -91,10 +91,10 @@ class Vfs::Log_file_system : public Single_file_system if (_line_pos > 0) _flush(); } - Read_result read(char *, file_size, file_size &out_count) override + Read_result read(char *, file_size, file_size &) override { - out_count = 0; - return READ_OK; + /* block indefinitely - mimics stdout resp. stdin w/o input */ + return READ_QUEUED; } Write_result write(char const *src, file_size count, From 9482355c47e1d518ae0c4ed68f7e440305cb5bdf Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 26 Oct 2022 17:28:30 +0200 Subject: [PATCH 0018/1921] lx_emul: allow different irqchip declarations To enable other irqchip declarations beyond the lx_emul generic code base, make the ARM specific initialization routine public. Ref genodelabs/genode#4651 --- repos/dde_linux/src/include/lx_emul/irq.h | 2 ++ .../src/lib/lx_emul/spec/arm/irqchip.c | 22 +++++++++---------- .../src/lib/lx_emul/spec/x86/irqchip.c | 6 +++++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/repos/dde_linux/src/include/lx_emul/irq.h b/repos/dde_linux/src/include/lx_emul/irq.h index 0a0dcf58f9..e98a37b121 100644 --- a/repos/dde_linux/src/include/lx_emul/irq.h +++ b/repos/dde_linux/src/include/lx_emul/irq.h @@ -19,6 +19,7 @@ extern "C" { #endif struct irq_desc; +struct device_node; void lx_emul_irq_unmask(unsigned int irq); @@ -32,6 +33,7 @@ extern void * lx_emul_irq_task_struct; unsigned int lx_emul_irq_last(void); +int lx_emul_irq_init(struct device_node *node, struct device_node *parent); #ifdef __cplusplus } #endif diff --git a/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c b/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c index 862790614c..4892c6903d 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c @@ -68,6 +68,12 @@ static int dde_domain_translate(struct irq_domain * d, unsigned long * hwirq, unsigned int * type) { + if (fwspec->param_count == 1) { + *hwirq = fwspec->param[0]; + *type = 0; + return 0; + } + if (is_of_node(fwspec->fwnode)) { if (fwspec->param_count != 3 || fwspec->param[0] != 0) return -EINVAL; @@ -114,17 +120,9 @@ static const struct irq_domain_ops dde_irqchip_data_domain_ops = { }; -static const struct of_device_id dde_of_match[] = { - { .compatible = "arm,gic-v3", .data = (const void *) 4 }, - { .compatible = "arm,cortex-a9-gic", .data = (const void *) 4 }, - { .compatible = "arm,gic-400", .data = (const void *) 4 }, - { /* END */ } -}; - static struct irq_domain *dde_irq_domain; -static int __init dde_irqchip_init(struct device_node *node, - struct device_node *parent) +int lx_emul_irq_init(struct device_node *node, struct device_node *parent) { dde_irq_domain = irq_domain_create_tree(&node->fwnode, &dde_irqchip_data_domain_ops, NULL); @@ -160,9 +158,9 @@ void lx_emul_register_of_irqchip_initcall(char const *compat, void *fn) } -IRQCHIP_DECLARE(dde_gic_v3, "arm,gic-v3", dde_irqchip_init); -IRQCHIP_DECLARE(dde_gic_a9, "arm,cortex-a9-gic", dde_irqchip_init); -IRQCHIP_DECLARE(dde_gic_400, "arm,gic-400", dde_irqchip_init); +IRQCHIP_DECLARE(dde_gic_v3, "arm,gic-v3", lx_emul_irq_init); +IRQCHIP_DECLARE(dde_gic_a9, "arm,cortex-a9-gic", lx_emul_irq_init); +IRQCHIP_DECLARE(dde_gic_400, "arm,gic-400", lx_emul_irq_init); int lx_emul_irq_task_function(void * data) diff --git a/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c b/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c index 06916672a7..b6b53149fe 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c @@ -31,6 +31,12 @@ static void dde_irq_mask(struct irq_data *d) } +int lx_emul_irq_init(struct device_node *node, struct device_node *parent) +{ + return 0; +} + + struct irq_chip dde_irqchip_data_chip = { .name = "dde-irqs", .irq_mask = dde_irq_mask, From 018c562447c2976197a31d1605b0b07dc3ddb454 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 26 Oct 2022 17:30:54 +0200 Subject: [PATCH 0019/1921] lx_emul: refine configurations & memory attributes Ref genodelabs/genode#4651 --- .../lx_emul/shadow/arch/arm/include/asm/memory.h | 13 +++++++++++++ .../lx_emul/shadow/arch/arm/include/asm/pgtable.h | 4 ++++ .../src/lib/lx_emul/shadow/kernel/rcu/srcutree.c | 2 ++ repos/dde_linux/src/lib/lx_emul/shadow/mm/slub.c | 3 +++ 4 files changed, 22 insertions(+) diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/memory.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/memory.h index 039aa72dee..be3a9d021a 100644 --- a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/memory.h +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/memory.h @@ -34,6 +34,19 @@ #define virt_addr_valid(kaddr) (kaddr != NULL) +#define arch_phys_to_idmap_offset 0ULL + +static inline unsigned long phys_to_idmap(phys_addr_t addr) +{ + return addr; +} + +static inline phys_addr_t idmap_to_phys(unsigned long idmap) +{ + return (phys_addr_t)idmap; +} + + #ifndef __virt_to_bus #define __virt_to_bus __pa #define __bus_to_virt __va diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/pgtable.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/pgtable.h index aa21f7eb39..948564fc44 100644 --- a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/pgtable.h +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/pgtable.h @@ -41,6 +41,10 @@ int pte_write(pte_t ptr); #define __swp_entry(type, offset) ( lx_emul_trace_and_stop(__func__), (swp_entry_t) { 0 } ) #define __swp_entry_to_pte(swp) ((pte_t) { (swp).val }) +#define pmd_page(pmd) NULL + +#define PAGE_KERNEL 0UL + #endif /* !__ASSEMBLY__ */ #endif /* __ASM_PGTABLE_H */ diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/srcutree.c b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/srcutree.c index f1704f63ed..22357afeb1 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/srcutree.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/srcutree.c @@ -24,6 +24,7 @@ int __srcu_read_lock(struct srcu_struct * ssp) void __srcu_read_unlock(struct srcu_struct * ssp, int idx) { } +#ifndef CONFIG_DEBUG_LOCK_ALLOC int init_srcu_struct(struct srcu_struct * ssp) { mutex_init(&ssp->srcu_cb_mutex); @@ -41,3 +42,4 @@ int init_srcu_struct(struct srcu_struct * ssp) smp_store_release(&ssp->srcu_gp_seq_needed, 0); /* Init done. */ return ssp->sda ? 0 : -ENOMEM; } +#endif diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/mm/slub.c b/repos/dde_linux/src/lib/lx_emul/shadow/mm/slub.c index acc54da72e..8f82736fd1 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/mm/slub.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/mm/slub.c @@ -140,6 +140,8 @@ void * kmem_cache_alloc_node(struct kmem_cache * s, gfp_t gfpflags, int node) #ifdef CONFIG_TRACING +#ifdef CONFIG_NUMA + void * kmem_cache_alloc_node_trace(struct kmem_cache * s, gfp_t gfpflags, int node, @@ -148,6 +150,7 @@ void * kmem_cache_alloc_node_trace(struct kmem_cache * s, return kmem_cache_alloc(s, gfpflags); } +#endif /* CONFIG_NUMA */ void * kmem_cache_alloc_trace(struct kmem_cache * s, gfp_t gfpflags, From f0315b271579410e24d67f5b41cb70c96e4fa92b Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 26 Oct 2022 17:22:52 +0200 Subject: [PATCH 0020/1921] dde_linux: remove legacy fec_nic_drv Ref genodelabs/genode#4651 --- .../recipes/src/fec_nic_drv/content.mk | 30 - repos/dde_linux/recipes/src/fec_nic_drv/hash | 1 - .../recipes/src/fec_nic_drv/used_apis | 8 - repos/dde_linux/src/drivers/nic/fec/dummy.c | 385 ---- .../dde_linux/src/drivers/nic/fec/lx_emul.cc | 1513 ------------- repos/dde_linux/src/drivers/nic/fec/lx_emul.h | 1938 ----------------- repos/dde_linux/src/drivers/nic/fec/lxc.c | 65 - repos/dde_linux/src/drivers/nic/fec/lxc.h | 40 - repos/dde_linux/src/drivers/nic/fec/main.cc | 120 - .../src/drivers/nic/fec/spec/arm_64/target.mk | 6 - .../src/drivers/nic/fec/spec/arm_v7/target.mk | 7 - .../dde_linux/src/drivers/nic/fec/target.inc | 50 - .../src/drivers/nic/fec/uplink_client.cc | 93 - .../src/drivers/nic/fec/uplink_client.h | 58 - 14 files changed, 4314 deletions(-) delete mode 100644 repos/dde_linux/recipes/src/fec_nic_drv/content.mk delete mode 100644 repos/dde_linux/recipes/src/fec_nic_drv/hash delete mode 100644 repos/dde_linux/recipes/src/fec_nic_drv/used_apis delete mode 100644 repos/dde_linux/src/drivers/nic/fec/dummy.c delete mode 100644 repos/dde_linux/src/drivers/nic/fec/lx_emul.cc delete mode 100644 repos/dde_linux/src/drivers/nic/fec/lx_emul.h delete mode 100644 repos/dde_linux/src/drivers/nic/fec/lxc.c delete mode 100644 repos/dde_linux/src/drivers/nic/fec/lxc.h delete mode 100644 repos/dde_linux/src/drivers/nic/fec/main.cc delete mode 100644 repos/dde_linux/src/drivers/nic/fec/spec/arm_64/target.mk delete mode 100644 repos/dde_linux/src/drivers/nic/fec/spec/arm_v7/target.mk delete mode 100644 repos/dde_linux/src/drivers/nic/fec/target.inc delete mode 100644 repos/dde_linux/src/drivers/nic/fec/uplink_client.cc delete mode 100644 repos/dde_linux/src/drivers/nic/fec/uplink_client.h diff --git a/repos/dde_linux/recipes/src/fec_nic_drv/content.mk b/repos/dde_linux/recipes/src/fec_nic_drv/content.mk deleted file mode 100644 index c2ff6e1c41..0000000000 --- a/repos/dde_linux/recipes/src/fec_nic_drv/content.mk +++ /dev/null @@ -1,30 +0,0 @@ -LIB_MK := lib/mk/fec_nic_include.mk \ - $(foreach SPEC,arm arm_64,lib/mk/spec/$(SPEC)/lx_kit_setjmp.mk) - -PORT_DIR := $(call port_dir,$(REP_DIR)/ports/dde_linux) - -MIRROR_FROM_REP_DIR := $(LIB_MK) \ - src/drivers/nic/linux_network_session_base.cc \ - src/drivers/nic/linux_network_session_base.h \ - lib/import/import-fec_nic_include.mk \ - src/include/legacy src/lib/legacy/lx_kit \ - src/lib/lx_kit/spec \ - $(foreach SPEC,arm arm_64 arm_v7,src/include/spec/$(SPEC)) \ - $(shell cd $(REP_DIR); find src/drivers/nic/fec -type f) - -MIRROR_FROM_PORT_DIR := $(shell cd $(PORT_DIR); find src/drivers/nic/fec -type f | grep -v ".git") -MIRROR_FROM_PORT_DIR := $(filter-out $(MIRROR_FROM_REP_DIR),$(MIRROR_FROM_PORT_DIR)) - -content: $(MIRROR_FROM_REP_DIR) $(MIRROR_FROM_PORT_DIR) - -$(MIRROR_FROM_REP_DIR): - $(mirror_from_rep_dir) - -$(MIRROR_FROM_PORT_DIR): - mkdir -p $(dir $@) - cp $(PORT_DIR)/$@ $@ - -content: LICENSE -LICENSE: - ( echo "GNU General Public License version 2, see:"; \ - echo "https://www.kernel.org/pub/linux/kernel/COPYING" ) > $@ diff --git a/repos/dde_linux/recipes/src/fec_nic_drv/hash b/repos/dde_linux/recipes/src/fec_nic_drv/hash deleted file mode 100644 index c369a03fb7..0000000000 --- a/repos/dde_linux/recipes/src/fec_nic_drv/hash +++ /dev/null @@ -1 +0,0 @@ -2022-10-11 e74e1fd7ac8c83a3754e8b876ac480e19fadd01a diff --git a/repos/dde_linux/recipes/src/fec_nic_drv/used_apis b/repos/dde_linux/recipes/src/fec_nic_drv/used_apis deleted file mode 100644 index fbea6143a0..0000000000 --- a/repos/dde_linux/recipes/src/fec_nic_drv/used_apis +++ /dev/null @@ -1,8 +0,0 @@ -base -os -platform_session -timer_session -nic_session -uplink_session -nic_driver -gpio_session diff --git a/repos/dde_linux/src/drivers/nic/fec/dummy.c b/repos/dde_linux/src/drivers/nic/fec/dummy.c deleted file mode 100644 index e66456b675..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/dummy.c +++ /dev/null @@ -1,385 +0,0 @@ -#include -#include -#include -#include -#include -#include - -void bus_unregister(struct bus_type *bus) -{ - TRACE_AND_STOP; -} - -void class_unregister(struct class *cls) -{ - TRACE_AND_STOP; -} - -size_t copy_from_user(void *to, void const *from, size_t len) -{ - TRACE_AND_STOP; - return -1; -} - -size_t copy_to_user(void *dst, void const *src, size_t len) -{ - TRACE_AND_STOP; - return -1; -} - -bool device_may_wakeup(struct device *dev) -{ - TRACE_AND_STOP; - return -1; -} - -void device_release_driver(struct device *dev) -{ - TRACE_AND_STOP; -} - -int disable_irq(unsigned int irq) -{ - TRACE_AND_STOP; - return -1; -} - -int disable_irq_wake(unsigned int irq) -{ - TRACE_AND_STOP; - return -1; -} - -void dma_free_coherent(struct device * d, size_t size, void *vaddr, dma_addr_t bus) -{ - TRACE_AND_STOP; -} - -void driver_unregister(struct device_driver *drv) -{ - TRACE_AND_STOP; -} - -void dst_release(struct dst_entry *dst) -{ - TRACE_AND_STOP; -} - -int enable_irq_wake(unsigned int irq) -{ - TRACE_AND_STOP; - return -1; -} - -void eth_hw_addr_random(struct net_device *dev) -{ - TRACE_AND_STOP; -} - -void ethtool_convert_legacy_u32_to_link_mode(unsigned long *dst, u32 legacy_u32) -{ - TRACE_AND_STOP; -} - -bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32, - const unsigned long *src) -{ - TRACE_AND_STOP; -} - -u32 ethtool_op_get_link(struct net_device * d) -{ - TRACE_AND_STOP; - return -1; -} - -int ethtool_op_get_ts_info(struct net_device * d, struct ethtool_ts_info * i) -{ - TRACE_AND_STOP; - return -1; -} - -bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap) -{ - TRACE_AND_STOP; - return -1; -} - -void free_irq(unsigned int irq, void *dev_id) -{ - TRACE_AND_STOP; -} - -void free_netdev(struct net_device * d) -{ - TRACE_AND_STOP; -} - -void free_uid(struct user_struct *dummy) -{ - TRACE_AND_STOP; -} - -bool gfp_pfmemalloc_allowed(gfp_t g) -{ - TRACE_AND_STOP; - return -1; -} - -bool gfpflags_allow_blocking(const gfp_t gfp_flags) -{ - TRACE_AND_STOP; -} - -int in_irq(void) -{ - TRACE_AND_STOP; - return -1; -} - -struct iphdr *ip_hdr(const struct sk_buff *skb) -{ - TRACE_AND_STOP; - return NULL; -} - -void *kmap_atomic(struct page *page) -{ - TRACE_AND_STOP; - return NULL; -} - -const char *kobject_name(const struct kobject *kobj) -{ - TRACE_AND_STOP; -} - -void kunmap_atomic(void *addr) -{ - TRACE_AND_STOP; -} - -void might_sleep() -{ - TRACE_AND_STOP; -} - -void mm_unaccount_pinned_pages(struct mmpin *mmp) -{ - TRACE_AND_STOP; -} - -void module_put(struct module *mod) -{ - TRACE_AND_STOP; -} - -void netif_tx_disable(struct net_device *dev) -{ - TRACE_AND_STOP; -} - -void netif_tx_stop_queue(struct netdev_queue *dev_queue) -{ - TRACE_AND_STOP; -} - -void netif_tx_wake_all_queues(struct net_device * d) -{ - TRACE_AND_STOP; -} - -void netif_tx_wake_queue(struct netdev_queue *dev_queue) -{ - TRACE_AND_STOP; -} - -int net_ratelimit(void) -{ - TRACE_AND_STOP; - return -1; -} - -ktime_t ns_to_ktime(u64 ns) -{ - ktime_t ret; - TRACE_AND_STOP; - return ret; -} - -struct timespec64 ns_to_timespec64(const s64 nsec) -{ - struct timespec64 ret; - TRACE_AND_STOP; - return ret; -} - -int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env) -{ - TRACE_AND_STOP; -} - -int of_mdio_parse_addr(struct device *dev, const struct device_node *np) -{ - TRACE_AND_STOP; -} - -struct device_node *of_node_get(struct device_node *node) -{ - TRACE_AND_STOP; - return NULL; -} - -void of_phy_deregister_fixed_link(struct device_node *np) -{ - TRACE_AND_STOP; -} - -int of_phy_register_fixed_link(struct device_node *np) -{ - TRACE_AND_STOP; - return -1; -} - -void phy_led_triggers_unregister(struct phy_device *phy) -{ - TRACE_AND_STOP; -} - -void pm_runtime_disable(struct device *dev) -{ - TRACE_AND_STOP; -} - -int pm_runtime_put(struct device *dev) -{ - TRACE_AND_STOP; -} - -void ptp_clock_event(struct ptp_clock *ptp, struct ptp_clock_event *event) -{ - TRACE_AND_STOP; -} - -int ptp_clock_index(struct ptp_clock *ptp) -{ - TRACE_AND_STOP; - return -1; -} - -int ptp_clock_unregister(struct ptp_clock *ptp) -{ - TRACE_AND_STOP; - return -1; -} - -bool page_is_pfmemalloc(struct page *page) -{ - TRACE_AND_STOP; - return -1; -} - -void put_page(struct page *page) -{ - TRACE_AND_STOP; -} - -void read_lock_bh(rwlock_t * l) -{ - TRACE_AND_STOP; -} - -void read_unlock_bh(rwlock_t * l) -{ - TRACE_AND_STOP; -} - -int regulator_disable(struct regulator *r) -{ - TRACE_AND_STOP; - return -1; -} - -void sk_free(struct sock *sk) -{ - TRACE_AND_STOP; -} - -void sock_efree(struct sk_buff *skb) -{ - TRACE_AND_STOP; -} - -int strcmp(const char *s1, const char *s2) -{ - TRACE_AND_STOP; - return -1; -} - -char *strncpy(char *dst, const char *src, size_t s) -{ - TRACE_AND_STOP; -} - -int sysfs_create_link_nowarn(struct kobject *kobj, - struct kobject *target, - const char *name) -{ - TRACE_AND_STOP; -} - -void sysfs_remove_link(struct kobject *kobj, const char *name) -{ - TRACE_AND_STOP; -} - -unsigned int tcp_hdrlen(const struct sk_buff *skb) -{ - TRACE_AND_STOP; - return -1; -} - -u64 timecounter_cyc2time(struct timecounter *tc, cycle_t cycle_tstamp) -{ - TRACE_AND_STOP; - return -1; -} - -void tso_build_data(struct sk_buff *skb, struct tso_t *tso, int size) -{ - TRACE_AND_STOP; -} - -void tso_build_hdr(struct sk_buff *skb, char *hdr, struct tso_t *tso, int size, bool is_last) -{ - TRACE_AND_STOP; -} - -int tso_count_descs(struct sk_buff *skb) -{ - TRACE_AND_STOP; - return -1; -} - -void tso_start(struct sk_buff *skb, struct tso_t *tso) -{ - TRACE_AND_STOP; -} - -void unregister_netdev(struct net_device * d) -{ - TRACE_AND_STOP; -} - -void usleep_range(unsigned long min, unsigned long max) -{ - TRACE_AND_STOP; -} - -void __vlan_hwaccel_put_tag(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci) -{ - TRACE_AND_STOP; -} - -struct user_namespace init_user_ns; -int sysctl_tstamp_allow_data; diff --git a/repos/dde_linux/src/drivers/nic/fec/lx_emul.cc b/repos/dde_linux/src/drivers/nic/fec/lx_emul.cc deleted file mode 100644 index 0d51491d7b..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/lx_emul.cc +++ /dev/null @@ -1,1513 +0,0 @@ -/* - * \brief Emulation of Linux kernel interfaces - * \author Stefan Kalkowski - * \date 2018-01-16 - */ - -/* - * Copyright (C) 2018 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -/** - * Unconditionally include common Genode headers _before_ lx_emul.h to - * prevent shenanigans with macro definitions. - */ -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#if DEBUG -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern "C" { struct page; } - -class Addr_to_page_mapping : public Genode::List::Element -{ - private: - - struct page *_page { nullptr }; - - static Genode::List & _list() - { - static Genode::List _l; - return _l; - } - - public: - - Addr_to_page_mapping(struct page *page) - : _page(page) { } - - static void insert(struct page * page) - { - Addr_to_page_mapping *m = (Addr_to_page_mapping*) - Lx::Malloc::mem().alloc(sizeof (Addr_to_page_mapping)); - m->_page = page; - _list().insert(m); - } - - static struct page * remove(unsigned long addr) - { - for (Addr_to_page_mapping *m = _list().first(); m; m = m->next()) - if ((unsigned long)m->_page->addr == addr) { - struct page * ret = m->_page; - _list().remove(m); - Lx::Malloc::mem().free(m); - return ret; - } - - return nullptr; - } - - static struct page * find_page(void* addr) - { - for (Addr_to_page_mapping *m = _list().first(); m; m = m->next()) - if ((unsigned long)m->_page->addr <= (unsigned long)addr && - ((unsigned long)m->_page->addr + m->_page->size) > (unsigned long)addr) - return m->_page; - return nullptr; - } -}; - - -struct Device : Genode::List::Element -{ - struct device * dev; /* Linux device */ - - Device(struct device *dev) : dev(dev) { - list()->insert(this); } - - static Genode::List *list() - { - static Genode::List _list; - return &_list; - } -}; - - -namespace Platform { - - struct Device_client; - - using Device_capability = Genode::Capability; -} - - -struct Platform::Device_client : Rpc_client -{ - Device_client(Device_capability cap) - : Rpc_client(cap) { } - - Irq_session_capability irq(unsigned id = 0) - { - return call(id); - } - - Io_mem_session_capability io_mem(unsigned id, Range &range) - { - return call(id, range); - } - - Dataspace_capability io_mem_dataspace(unsigned id = 0) - { - Range range { }; - return Io_mem_session_client(io_mem(id, range)).dataspace(); - } -}; - - -class Driver : public Genode::List::Element -{ - private: - - struct device_driver * _drv; /* Linux driver */ - - public: - - Driver(struct device_driver *drv) : _drv(drv) - { - list()->insert(this); - } - - /** - * List of all currently registered drivers - */ - static Genode::List *list() - { - static Genode::List _list; - return &_list; - } - - /** - * Match device and drivers - */ - bool match(struct device *dev) - { - /* - * Don't try if buses don't match, since drivers often use 'container_of' - * which might cast the device to non-matching type - */ - if (_drv->bus != dev->bus) - return false; - - return _drv->bus->match ? _drv->bus->match(dev, _drv) : true; - } - - /** - * Probe device with driver - */ - int probe(struct device *dev) - { - dev->driver = _drv; - - if (dev->bus->probe) return dev->bus->probe(dev); - else if (_drv->probe) - return _drv->probe(dev); - - return 0; - } -}; - - -struct Gpio_irq : public Genode::List::Element -{ - unsigned irq_nr; - bool enabled = true; - bool pending = false; - Gpio::Connection gpio; - Genode::Irq_session_client irq; - Genode::Signal_handler sigh; - Lx::Task task; - irq_handler_t ihandler; - void * dev_id; - - /** - * List of all currently registered irqs - */ - static Genode::List *list() - { - static Genode::List _list; - return &_list; - } - - static void run_irq(void *args) - { - Gpio_irq * girq = static_cast(args); - while (1) { - Lx::scheduler().current()->block_and_schedule(); - girq->ihandler(girq->irq_nr, girq->dev_id); - girq->irq.ack_irq(); - } - } - - void unblock() - { - if (enabled) task.unblock(); - - pending = !enabled; - } - - void enable() - { - enabled = true; - if (pending) unblock(); - } - - void disable() - { - enabled = false; - } - - Gpio_irq(Genode::Env &env, unsigned nr, irq_handler_t handler, void * dev_id) - : irq_nr(nr), - gpio(env, nr), - irq(gpio.irq_session(Gpio::Session::LOW_LEVEL)), - sigh(env.ep(), *this, &Gpio_irq::unblock), - task(run_irq, this, "gpio_irq", Lx::Task::PRIORITY_3, Lx::scheduler()), - ihandler(handler), - dev_id(dev_id) - { - list()->insert(this); - - irq.sigh(sigh); - irq.ack_irq(); - } -}; - - -static unsigned irq_counter = 32; - -struct Fec : public Genode::List::Element -{ - using String = Genode::String<128>; - - struct Mdio - { - struct Phy : public Genode::List::Element - { - String name; - String phy_driver { }; - String mdio_bus { }; - unsigned phy_reg { 0 }; - unsigned gpio_irq { 0 }; - struct phy_device * phy_dev { nullptr }; - - Phy(String name, Genode::Xml_node xml, Platform::Device_capability) - : name(name) - { - using namespace Genode; - - phy_driver = xml.attribute_value("type", String()); - xml.for_each_sub_node("property", [&] (Xml_node node) { - if (String("mdio_bus") == node.attribute_value("name", String())) { - mdio_bus = node.attribute_value("value", String()); } - if (String("mdio_reg") == node.attribute_value("name", String())) { - phy_reg = node.attribute_value("value", 0U); } - if (String("gpio_irq") == node.attribute_value("name", String())) { - gpio_irq = node.attribute_value("value", 0U); } - }); - } - }; - - Genode::List phys; - - template - void for_each(FUNC && f) { - for (Phy * p = phys.first(); p; p = p->next()) { f(*p); } } - }; - - String name; - String type; - Platform::Device_client device; - const unsigned irq { irq_counter }; - String phy_mode {}; - String phy_name {}; - bool magic_packet { true }; - int tx_queues { 1 }; - int rx_queues { 1 }; - struct net_device * net_dev { nullptr }; - Linux_network_session_base *session { nullptr }; - Genode::Attached_dataspace io_ds { Lx_kit::env().env().rm(), - device.io_mem_dataspace() }; - Genode::Constructible mdio; - Mdio::Phy * phy { nullptr }; - - Fec(String name, - Genode::Xml_node xml, - Platform::Device_capability cap) - : name(name), device(cap) - { - using namespace Genode; - - type = xml.attribute_value("type", String()); - xml.for_each_sub_node("property", [&] (Xml_node node) { - if (String("mii") == node.attribute_value("name", String())) { - phy_mode = node.attribute_value("value", String()); } - if (String("phy") == node.attribute_value("name", String())) { - phy_name = node.attribute_value("value", String()); } - if (String("magic_packet") == node.attribute_value("name", String())) { - magic_packet = node.attribute_value("value", true); } - if (String("tx-queues") == node.attribute_value("name", String())) { - tx_queues = node.attribute_value("value", 1UL); } - if (String("rx-queues") == node.attribute_value("name", String())) { - rx_queues = node.attribute_value("value", 1UL); } - }); - - irq_counter += 10; - } -}; - - -static Genode::List & fec_devices() -{ - static Genode::List list; - return list; -} - - -net_device * -Linux_network_session_base:: -_register_session(Linux_network_session_base &session, - Genode::Session_label policy) -{ - unsigned number = 0; - for (Fec * f = fec_devices().first(); f; f = f->next()) { number++; } - - for (Fec * f = fec_devices().first(); f; f = f->next()) { - /* If there is more than one device, check session label against card name */ - if (number > 1) { - Genode::Session_label name = policy.last_element(); - if (f->name != name) continue; - } - - /* Session already in use? */ - if (f->session) continue; - - f->session = &session; - return f->net_dev; - } - return nullptr; -} - - -#include -#include -#include -#include - -extern "C" { - -void lx_backtrace() -{ -#if DEBUG - Genode::backtrace(); -#endif -} - - -static Platform::Connection & platform_connection() -{ - static Genode::Constructible plat; - if (!plat.constructed()) plat.construct(Lx_kit::env().env()); - return *plat; -} - - -int platform_driver_register(struct platform_driver * drv) -{ - using namespace Genode; - using String = Fec::String; - - platform_connection().with_xml([&] (Xml_node & xml) { - xml.for_each_sub_node("device", [&] (Xml_node node) { - - String name = node.attribute_value("name", String()); - String type = node.attribute_value("type", String()); - - if (type == "fsl,imx6q-fec" || - type == "fsl,imx6sx-fec" || - type == "fsl,imx25-fec") { - Fec * f = new (Lx_kit::env().heap()) - Fec(name, node, platform_connection().acquire_device(name.string())); - - /* order of devices is important, therefore insert it at the end */ - Fec * last = fec_devices().first(); - for (; last; last = last->next()) { - if (!last->next()) { break; } - } - fec_devices().insert(f, last); - return; - } - - if (type == "ethernet-phy-ieee802.3-c22") { - Fec::Mdio::Phy * p = new (Lx_kit::env().heap()) - Fec::Mdio::Phy(name, node, platform_connection().acquire_device(name.string())); - for (Fec * f = fec_devices().first(); f; f = f->next()) { - if (f->phy_name == name) { f->phy = p; } - if (f->name == p->mdio_bus) { - if (!f->mdio.constructed()) { f->mdio.construct(); } - f->mdio->phys.insert(p); - } - } - } - }); - }); - - for (Fec * f = fec_devices().first(); f; f = f->next()) { - platform_device * pd = new (Lx::Malloc::dma()) platform_device(); - pd->name = f->name.string(); - pd->dev.of_node = (device_node*) f; - pd->dev.plat_dev = pd; - drv->probe(pd); - { - net_device * dev = f->net_dev; - int err = dev ? dev->netdev_ops->ndo_open(dev) : -1; - if (err) { - Genode::error("ndo_open() failed: ", err); - return err; - } - } - } - return 0; -} - - -struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, - unsigned char name_assign_type, - void (*setup)(struct net_device *), - unsigned int txqs, unsigned int rxqs) -{ - size_t alloc_size = ALIGN(sizeof(struct net_device), NETDEV_ALIGN); - alloc_size += sizeof_priv; - alloc_size += NETDEV_ALIGN - 1; - - struct net_device *p = (struct net_device*) kzalloc(alloc_size, - GFP_KERNEL); - struct net_device *dev = PTR_ALIGN(p, NETDEV_ALIGN); - - INIT_LIST_HEAD(&dev->mc.list); - dev->mc.count = 0; - - dev->gso_max_segs = GSO_MAX_SEGS; - - setup(dev); - - static const struct ethtool_ops default_ethtool_ops { }; - if (!dev->ethtool_ops) dev->ethtool_ops = &default_ethtool_ops; - - dev->dev_addr = (unsigned char*) kzalloc(ETH_ALEN, GFP_KERNEL); - - return dev; -} - - -bool of_device_is_available(const struct device_node *device) -{ - return device; -} - - -const struct of_device_id *of_match_device(const struct of_device_id *matches, - const struct device *dev) -{ - Fec * fec = (Fec*) dev->plat_dev->dev.of_node; - for (; matches && matches->compatible[0]; matches++) - if (Genode::strcmp(matches->compatible, fec->type.string()) == 0) - return matches; - - return nullptr; -} - - -void * devm_ioremap_resource(struct device *dev, struct resource *res) -{ - Fec * fec = (Fec*) dev->plat_dev->dev.of_node; - - return fec->io_ds.local_addr(); -} - - -void platform_set_drvdata(struct platform_device *pdev, void *data) -{ - pdev->dev.driver_data = data; - struct net_device * ndev = (net_device*)data; - ndev->dev.of_node = pdev->dev.of_node; -} - -int of_get_phy_mode(struct device_node *np) -{ - Fec * fec = (Fec*) np; - - for (int i = 0; i < PHY_INTERFACE_MODE_MAX; i++) - if (!Genode::strcmp(fec->phy_mode.string(), - phy_modes((phy_interface_t)i))) - return i; - - return -ENODEV; -} - - -ktime_t ktime_get_real(void) -{ - Lx::timer_update_jiffies(); - return ktime_get(); -} - - -void timecounter_init(struct timecounter *tc, const struct cyclecounter *cc, u64 start_tstamp) -{ - tc->cc = cc; - tc->cycle_last = cc->read(cc); - tc->nsec = start_tstamp; - tc->mask = (1ULL << cc->shift) - 1; - tc->frac = 0; -} - - -void *dma_alloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, gfp_t flag) -{ - void *addr = Lx::Malloc::dma().alloc_large(size); - dma_addr_t dma_addr = (dma_addr_t) Lx::Malloc::dma().phys_addr(addr); - - *dma_handle = (dma_addr_t) dma_addr; - return addr; -} - - -void *dmam_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp) -{ - dma_addr_t dma_addr; - void *addr; - if (size > 2048) { - addr = Lx::Malloc::dma().alloc_large(size); - dma_addr = (dma_addr_t) Lx::Malloc::dma().phys_addr(addr); - } else - addr = Lx::Malloc::dma().malloc(size, 12, &dma_addr); - - *dma_handle = dma_addr; - return addr; -} - - -dma_addr_t dma_map_single(struct device *dev, void *cpu_addr, size_t size, - enum dma_data_direction) -{ - dma_addr_t dma_addr = (dma_addr_t) Lx::Malloc::dma().phys_addr(cpu_addr); - - if (dma_addr == ~0UL) { - - struct page * p = Addr_to_page_mapping::find_page(cpu_addr); - if (p) { - dma_addr = (dma_addr_t) Lx::Malloc::dma().phys_addr(p->addr); - dma_addr += (dma_addr_t)cpu_addr - (dma_addr_t)p->addr; - } - - if (dma_addr == ~0UL) - Genode::error(__func__, ": virtual address ", cpu_addr, - " not registered for DMA"); - } - - return dma_addr; -} - - -int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) -{ - return (dma_addr == ~0UL) ? 1 : 0; -} - - -void *dev_get_platdata(const struct device *dev) -{ - return dev->platform_data; -} - - -int netif_running(const struct net_device *dev) -{ - return dev->state & (1 << __LINK_STATE_START); -} - - -void netif_carrier_on(struct net_device *dev) -{ - dev->state &= ~(1UL << __LINK_STATE_NOCARRIER); - - Fec * fec = (Fec*) dev->dev.of_node; - if (fec->session) fec->session->link_state(true); -} - - -void netif_carrier_off(struct net_device *dev) -{ - dev->state |= 1UL << __LINK_STATE_NOCARRIER; - - Fec * fec = (Fec*) dev->dev.of_node; - if (fec->session) fec->session->link_state(false); -} - - -int netif_device_present(struct net_device * d) -{ - TRACE; - return 1; -} - - - -int platform_get_irq(struct platform_device * d, unsigned int i) -{ - if (i > 1) return -1; - - Fec * fec = (Fec*) d->dev.of_node; - - return fec->irq + i; -} - - -int devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id) -{ - Fec * fec = (Fec*) dev->plat_dev->dev.of_node; - Lx::Irq::irq().request_irq(fec->device.irq(irq - fec->irq), irq, handler, dev_id); - return 0; -} - - -struct clk *devm_clk_get(struct device *dev, const char *id) -{ - static struct clk clocks[] { - { "ipg", 66*1000*1000 }, - { "ahb", 198*1000*1000 }, - { "ptp", 25*1000*1000 }, - { "enet_out", 25*1000*1000 }, - { "enet_clk_ref", 125*1000*1000 } }; - - for (unsigned i = 0; i < (sizeof(clocks) / sizeof(struct clk)); i++) - if (Genode::strcmp(clocks[i].name, id) == 0) - return &clocks[i]; - - Genode::error("MISSING CLOCK: ", id); - return nullptr; -} - - -unsigned long clk_get_rate(struct clk * clk) -{ - if (!clk) return 0; - return clk->rate; -} - - -int is_valid_ether_addr(const u8 * a) -{ - for (unsigned i = 0; i < ETH_ALEN; i++) - if (a[i] != 0 && a[i] != 255) return 1; - return 0; -} - - -int register_netdev(struct net_device * d) -{ - d->state |= (1 << __LINK_STATE_START) | (1UL << __LINK_STATE_NOCARRIER); - - Fec * fec = (Fec*) d->dev.of_node; - fec->net_dev = d; - - return 0; -} - - -void *kmem_cache_alloc_node(struct kmem_cache *cache, gfp_t, int) -{ - return (void*)cache->alloc_element(); -} - - -void get_page(struct page *page) -{ - atomic_inc(&page->_count); -} - - -static struct page *allocate_pages(gfp_t gfp_mask, size_t const size) -{ - struct page *page = (struct page *)kzalloc(sizeof(struct page), 0); - - page->addr = Lx::Malloc::dma().alloc_large(size); - page->size = size; - - if (!page->addr) { - Genode::error("alloc_pages: ", size, " failed"); - kfree(page); - return 0; - } - - Addr_to_page_mapping::insert(page); - - atomic_set(&page->_count, 1); - - return page; -} - - -struct page *alloc_pages(gfp_t gfp_mask, unsigned int order) -{ - size_t const size = PAGE_SIZE << order; - return allocate_pages(gfp_mask, size); -} - - -void *page_frag_alloc(struct page_frag_cache *, unsigned int const fragsz, - gfp_t const gfp_mask) -{ - struct page *page = allocate_pages(gfp_mask, fragsz); - return page ? page->addr : page; -} - - -void page_frag_free(void *addr) -{ - struct page *page = Addr_to_page_mapping::remove((unsigned long)addr); - - if (!atomic_dec_and_test(&page->_count)) - Genode::error("page reference count != 0"); - - Lx::Malloc::dma().free_large(page->addr); - kfree(page); -} - - -int driver_register(struct device_driver *drv) -{ - new (Lx::Malloc::mem()) Driver(drv); - return 0; -} - - -int device_add(struct device *dev) -{ - if (dev->driver) - return 0; - - /* foreach driver match and probe device */ - for (Driver *driver = Driver::list()->first(); driver; driver = driver->next()) - if (driver->match(dev)) { - int ret = driver->probe(dev); - - if (!ret) return 0; - } - - return 0; -} - - -void device_del(struct device *dev) -{ - if (dev->driver && dev->driver->remove) - dev->driver->remove(dev); -} - - -int device_register(struct device *dev) -{ - return device_add(dev); -} - - -void reinit_completion(struct completion *work) -{ - init_completion(work); -} - - -/* - * For compatibility with 4.4.3 drivers, the argument of this callback function - * is the 'data' member of the 'timer_list' object, which normally points to - * the 'timer_list' object itself when initialized with 'timer_setup()', but - * here it was overridden in '__wait_completion()' to point to the 'Lx::Task' - * object instead. - */ -static void _completion_timeout(struct timer_list *t) -{ - Lx::Task *task = (Lx::Task *)t; - task->unblock(); -} - - -long __wait_completion(struct completion *work, unsigned long timeout) -{ - timer_list t; - Lx::timer_update_jiffies(); - unsigned long j = timeout ? jiffies + timeout : 0; - - if (timeout) { - timer_setup(&t, _completion_timeout, 0u); - t.data = (unsigned long) Lx::scheduler().current(); - mod_timer(&t, j); - } - - while (!work->done) { - - if (j && j <= jiffies) { - lx_log(1, "timeout jiffies %lu", jiffies); - return 0; - } - - Lx::Task *task = Lx::scheduler().current(); - work->task = (void *)task; - task->block_and_schedule(); - } - - if (timeout) - del_timer(&t); - - work->done = 0; - - return (j || j == jiffies) ? 1 : j - jiffies; -} - - -size_t strlcpy(char *dest, const char *src, size_t size) -{ - size_t ret = Genode::strlen(src); - - if (size) { - size_t len = (ret >= size) ? size - 1 : ret; - Genode::memcpy(dest, src, len); - dest[len] = '\0'; - } - return ret; -} - - -void local_irq_restore(unsigned long f) { } - - -unsigned long local_irq_save(unsigned long flags) { return flags; } - - -int pm_runtime_get_sync(struct device *dev) -{ - return 0; -} - - -void pm_runtime_mark_last_busy(struct device *dev) { } - - -int in_interrupt(void) -{ - return 0; -} - - -int pm_runtime_put_autosuspend(struct device *dev) -{ - return 0; -} - - -int dev_set_name(struct device *dev, const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - - Genode::String_console sc(dev->name, 32); - sc.vprintf(fmt, args); - - va_end(args); - - new (Lx::Malloc::mem()) Device(dev); - return 0; -} - - -struct device *bus_find_device_by_name(struct bus_type *bus, struct device *start, const char *name) -{ - for (Device *dev = Device::list()->first(); dev; dev = dev->next()) { - if (Genode::strcmp(dev->dev->name, name) == 0) - return dev->dev; - } - return nullptr; -} - - -void netif_napi_add(struct net_device *dev, struct napi_struct *napi, - int (*poll)(struct napi_struct *, int), int weight) -{ - napi->dev = dev; - napi->poll = poll; - napi->state = NAPI_STATE_SCHED; - napi->weight = weight; -} - - -const char *dev_name(const struct device *dev) -{ - return dev->name; -} - - -extern "C" void consume_skb(struct sk_buff *skb); - -void dev_kfree_skb_any(struct sk_buff * sk) -{ - consume_skb(sk); -} - - -void napi_enable(struct napi_struct *n) -{ - clear_bit(NAPI_STATE_SCHED, &n->state); - clear_bit(NAPI_STATE_NPSVC, &n->state); -} - - -void napi_disable(struct napi_struct *n) -{ - set_bit(NAPI_STATE_SCHED, &n->state); - set_bit(NAPI_STATE_NPSVC, &n->state); -} - - -void __napi_schedule(struct napi_struct *n) -{ - Fec * fec = (Fec*) n->dev->dev.of_node; - if (fec->session) fec->session->unblock_rx_task(n); -} - - -bool napi_schedule_prep(struct napi_struct *n) -{ - return !test_and_set_bit(NAPI_STATE_SCHED, &n->state); -} - - -bool napi_complete_done(struct napi_struct *n, int work_done) -{ - clear_bit(NAPI_STATE_SCHED, &n->state); - return true; -} - - -unsigned long find_next_bit(const unsigned long *addr, unsigned long size, unsigned long offset) -{ - unsigned long i = offset / BITS_PER_LONG; - offset -= (i * BITS_PER_LONG); - - for (; offset < size; offset++) - if (addr[i] & (1UL << offset)) - return offset + (i * BITS_PER_LONG); - - return size; -} - - -gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb) -{ - Fec * fec = (Fec*) napi->dev->dev.of_node; - if (fec->session) fec->session->receive(skb); - - dev_kfree_skb(skb); - return GRO_NORMAL; -} - - -void dma_unmap_single(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir) -{ - // FIXME - TRACE; -} - - -bool netif_queue_stopped(const struct net_device *dev) -{ - // FIXME - TRACE; - return 0; -} - - -struct device_node *of_parse_phandle(const struct device_node *np, const char *phandle_name, int index) -{ - Fec * fec = (Fec*) np; - return (device_node*) fec->phy; -} - - -struct phy_device *of_phy_connect(struct net_device *dev, - struct device_node *phy_np, - void (*hndlr)(struct net_device *), - u32 flags, int iface) -{ - Fec::Mdio::Phy * phy = (Fec::Mdio::Phy*) phy_np; - struct phy_device * phydev = phy ? phy->phy_dev : nullptr; - if (!phydev) return nullptr; - - phydev->dev_flags = flags; - int ret = phy_connect_direct(dev, phydev, hndlr, (phy_interface_t)iface); - return ret ? nullptr : phydev; -} - - -struct device_node *of_get_child_by_name(const struct device_node *node, - const char *name) -{ - if (Genode::strcmp("mdio", name) != 0) return nullptr; - - Fec * fec = (Fec*) node; - return fec->mdio.constructed() ? (device_node*) &*fec->mdio : nullptr; -} - - -static int of_mdiobus_register_phy(Fec::Mdio::Phy & ph, struct mii_bus *mdio) -{ - struct phy_device * phy = get_phy_device(mdio, ph.phy_reg, false); - - if (!phy) return 1; - - phy->irq = ph.gpio_irq; - phy->mdio.dev.of_node = (device_node*) &ph; - - /* All data is now stored in the phy struct; - * register it */ - int rc = phy_device_register(phy); - if (rc) { - phy_device_free(phy); - return 1; - } - - ph.phy_dev = phy; - - dev_dbg(&mdio->dev, "registered phy at address %i\n", ph.phy_reg); - - return 0; -} - -int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) -{ - Fec::Mdio * fec_m = (Fec::Mdio*) np; - - mdio->phy_mask = ~0; - - /* Clear all the IRQ properties */ - if (mdio->irq) - for (unsigned i = 0; iirq[i] = PHY_POLL; - - mdio->dev.of_node = np; - - /* Register the MDIO bus */ - int rc = mdiobus_register(mdio); - if (rc) return rc; - - fec_m->for_each([&] (Fec::Mdio::Phy & phy) { - of_mdiobus_register_phy(phy, mdio); }); - return 0; -} - - -int of_driver_match_device(struct device *dev, const struct device_driver *drv) -{ - Fec::Mdio::Phy * phy = (Fec::Mdio::Phy*) dev->of_node; - - if (!phy) return 0; - - return (Genode::strcmp(drv->name, "Atheros 8035 ethernet") == 0) ? 1 : 0; -} - - -const void *of_get_property(const struct device_node *node, const char *name, int *lenp) -{ - Fec * fec = (Fec*) node; - if (Genode::strcmp("fsl,magic-packet", name) == 0) return (void*)fec->magic_packet; - - TRACE_AND_STOP; - return nullptr; -} - - -int of_property_read_u32(const struct device_node *np, const char *propname, u32 *out_value) -{ - Fec * fec = (Fec*) np; - - if (Genode::strcmp("max-speed", propname) == 0) return 1; - - if ((Genode::strcmp("fsl,num-tx-queues", propname) == 0) && fec->tx_queues) - *out_value = fec->tx_queues; - else if ((Genode::strcmp("fsl,num-rx-queues", propname) == 0) && fec->rx_queues) - *out_value = fec->rx_queues; - else - TRACE_AND_STOP; - - return 0; -} - - -void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp) -{ - if (size > 2048) Genode::warning("devm_kzalloc ", size); - return Lx::Malloc::mem().alloc(size); -} - - -int request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, const char *name, void *dev) -{ - new (Lx::Malloc::mem()) Gpio_irq(Lx_kit::env().env(), irq, handler, dev); - return 0; -} - - -int request_threaded_irq(unsigned int irq, irq_handler_t handler, - irq_handler_t thread_fn, - unsigned long flags, const char *name, void *dev) -{ - return request_irq(irq, thread_fn, flags, name, dev); -} - - -int enable_irq(unsigned int irq) -{ - for (Gpio_irq *girq = Gpio_irq::list()->first(); girq; girq = girq->next()) - if (girq->irq_nr == irq) { - girq->enable(); - return 0; - } - return 1; -} - - -int disable_irq_nosync(unsigned int irq) -{ - for (Gpio_irq *girq = Gpio_irq::list()->first(); girq; girq = girq->next()) - if (girq->irq_nr == irq) { - girq->disable(); - return 0; - } - return 1; -} - - -struct device_node *of_get_next_available_child(const struct device_node *node, struct device_node *prev) -{ - TRACE_AND_STOP; - return nullptr; -} - - -u64 timecounter_read(struct timecounter *tc) -{ - u64 nsec; - - cycle_t cycle_now, cycle_delta; - - /* increment time by nanoseconds since last call */ - { - /* read cycle counter: */ - cycle_now = tc->cc->read(tc->cc); - - /* calculate the delta since the last timecounter_read_delta(): */ - cycle_delta = (cycle_now - tc->cycle_last) & tc->cc->mask; - - /* convert to nanoseconds: */ - nsec = cyclecounter_cyc2ns(tc->cc, cycle_delta, - tc->mask, &tc->frac); - - /* update time stamp of timecounter_read_delta() call: */ - tc->cycle_last = cycle_now; - } - - nsec += tc->nsec; - tc->nsec = nsec; - - return nsec; -} - - -/********************* - ** DUMMY FUNCTIONS ** - *********************/ - -int bus_register(struct bus_type *bus) -{ - TRACE; - return 0; -} - -int class_register(struct class_ *cls) -{ - TRACE; - return 0; -} - -void clk_disable_unprepare(struct clk * c) -{ - TRACE; -} - -int clk_prepare_enable(struct clk * c) -{ - TRACE; - return 0; -} - -int device_bind_driver(struct device *dev) -{ - TRACE; - return 0; -} - -void device_initialize(struct device *dev) -{ - TRACE; -} - -int device_init_wakeup(struct device *dev, bool val) -{ - TRACE; - return 0; -} - -int device_set_wakeup_enable(struct device *dev, bool enable) -{ - TRACE; - return 0; -} - -struct regulator *__must_check devm_regulator_get(struct device *dev, const char *id) -{ - TRACE; - return nullptr; -} - -void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, size_t size, - enum dma_data_direction dir) -{ - TRACE; -} - -void dma_sync_single_for_device(struct device *dev, dma_addr_t addr, - size_t size, enum dma_data_direction dir) -{ - TRACE; -} - -struct device *get_device(struct device *dev) -{ - TRACE; - return dev; -} - -struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, unsigned int index) -{ - TRACE; - return nullptr; -} - -bool netdev_uses_dsa(struct net_device *dev) -{ - TRACE; - return false; -} - -void netif_tx_lock_bh(struct net_device *dev) -{ - TRACE; -} - -void netif_tx_start_all_queues(struct net_device *dev) -{ - TRACE; -} - -void netif_tx_unlock_bh(struct net_device *dev) -{ - TRACE; -} - -void netif_wake_queue(struct net_device * d) -{ - TRACE; -} - -const void *of_get_mac_address(struct device_node *np) -{ - TRACE; - return nullptr; -} - -int of_machine_is_compatible(const char *compat) - -{ - TRACE; - return 0; -} - -void of_node_put(struct device_node *node) -{ - TRACE; -} - -bool of_phy_is_fixed_link(struct device_node *np) -{ - TRACE; - return 0; -} - -bool of_property_read_bool(const struct device_node *np, const char *propname) -{ - TRACE; - return false; -} - -void phy_led_trigger_change_speed(struct phy_device *phy) -{ - TRACE; -} - -int phy_led_triggers_register(struct phy_device *phy) -{ - TRACE; - return -1; -} - -int pinctrl_pm_select_default_state(struct device *dev) -{ - TRACE; - return -1; -} - -int pinctrl_pm_select_sleep_state(struct device *dev) -{ - TRACE; - return -1; -} - -int platform_get_irq_byname(struct platform_device *dev, const char *name) -{ - TRACE; - return -1; -} - -struct resource *platform_get_resource(struct platform_device * d, unsigned r1, unsigned r2) -{ - TRACE; - return nullptr; -} - -int platform_irq_count(struct platform_device *dev) -{ - TRACE; - return 0; -} - -void pm_runtime_enable(struct device *dev) -{ - TRACE; -} - -void pm_runtime_get_noresume(struct device *dev) -{ - TRACE; -} - -int pm_runtime_set_active(struct device *dev) -{ - TRACE; - return 0; -} - -void pm_runtime_use_autosuspend(struct device *dev) -{ - TRACE; -} - -void pm_runtime_set_autosuspend_delay(struct device *dev, int delay) -{ - TRACE; -} - -struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, struct device *parent) -{ - TRACE; - return (ptp_clock*)0xdeadbeef; -} - -void put_device(struct device *dev) -{ - TRACE; -} - -int regulator_enable(struct regulator * d) -{ - TRACE; - return 0; -} - -int request_module(const char *fmt, ...) -{ - TRACE; - return 0; -} - -void rtnl_lock(void) -{ - TRACE; -} - -void rtnl_unlock(void) -{ - TRACE; -} - -void secpath_reset(struct sk_buff *skb) -{ - TRACE; -} - -int sysfs_create_link(struct kobject *kobj, struct kobject *target, const char *name) -{ - TRACE; - return -1; -} - -void trace_consume_skb(struct sk_buff * sb) -{ - TRACE; -} - -void trace_kfree_skb(struct sk_buff * sb, void * p) -{ - TRACE; -} - -void trace_mdio_access(void *dummy, ...) -{ - TRACE; -} - -int try_module_get(struct module *mod) -{ - TRACE; - return -1; -} - -} - - -#include - -#include -#include - - -/**************************** - ** lx_kit/backend_alloc.h ** - ****************************/ - -void backend_alloc_init(Genode::Env&, Genode::Ram_allocator&, - Genode::Allocator&) -{ - /* intentionally left blank */ -} - - -Genode::Ram_dataspace_capability Lx::backend_alloc(addr_t size, Cache cache) -{ - return platform_connection().alloc_dma_buffer(size, cache); -} - - -void Lx::backend_free(Genode::Ram_dataspace_capability cap) -{ - return platform_connection().free_dma_buffer(cap); -} - - -Genode::addr_t Lx::backend_dma_addr(Genode::Ram_dataspace_capability cap) -{ - return platform_connection().dma_addr(cap); -} diff --git a/repos/dde_linux/src/drivers/nic/fec/lx_emul.h b/repos/dde_linux/src/drivers/nic/fec/lx_emul.h deleted file mode 100644 index 3f4fe395c8..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/lx_emul.h +++ /dev/null @@ -1,1938 +0,0 @@ -/* - * \brief Freescale ethernet driver Linux emulation environment - * \author Stefan Kalkowski - * \date 2017-11-01 - */ - -/* - * Copyright (C) 2017 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -#ifndef _SRC__DRIVERS__NIC__FEC__LX_EMUL_H_ -#define _SRC__DRIVERS__NIC__FEC__LX_EMUL_H_ - -#include -#include - -#include - -#include -#include -#include -#include - -static inline void __read_once_size(const volatile void *p, void *res, int size) -{ - switch (size) { - case 1: *(__u8 *)res = *(volatile __u8 *)p; break; - case 2: *(__u16 *)res = *(volatile __u16 *)p; break; - case 4: *(__u32 *)res = *(volatile __u32 *)p; break; - case 8: *(__u64 *)res = *(volatile __u64 *)p; break; - default: - barrier(); - __builtin_memcpy((void *)res, (const void *)p, size); - barrier(); - } -} - -#ifdef __cplusplus -#define READ_ONCE(x) \ -({ \ - barrier(); \ - x; \ -}) -#else -#define READ_ONCE(x) \ -({ \ - union { typeof(x) __val; char __c[1]; } __u; \ - __read_once_size(&(x), __u.__c, sizeof(x)); \ - __u.__val; \ -}) -#endif - - -#include - -void lx_backtrace(void); - -#define DEBUG_LINUX_PRINTK 0 - -#define DEBUG 0 -#if DEBUG -#define TRACE \ - do { \ - lx_printf("%s not implemented\n", __func__); \ - } while (0) -#else -#define TRACE do { ; } while (0) -#endif - -#define TRACE_AND_STOP \ - do { \ - lx_printf("%s not implemented\n", __func__); \ - lx_backtrace(); \ - BUG(); \ - } while (0) - -#define ASSERT(x) \ - do { \ - if (!(x)) { \ - lx_printf("%s:%u assertion failed\n", __func__, __LINE__); \ - BUG(); \ - } \ - } while (0) - -typedef int clockid_t; - -#define PAGE_SIZE 4096UL - -enum { PAGE_SHIFT = 12 }; -enum { HZ = 100UL, }; - -typedef __u16 __le16; -typedef __u32 __le32; -typedef __u64 __le64; -typedef __u16 __be16; -typedef __u32 __be32; -typedef __u64 __be64; -typedef __s64 time64_t; - -#define L1_CACHE_BYTES 32 -#define SMP_CACHE_BYTES L1_CACHE_BYTES - -#define __aligned_u64 __u64 __attribute__((aligned(8))) -#define ____cacheline_aligned_in_smp __attribute__((aligned(SMP_CACHE_BYTES))) -#define ____cacheline_aligned __attribute__((aligned(SMP_CACHE_BYTES))) - - -struct iov_iter { }; -size_t iov_iter_count(struct iov_iter *i); - -#define dev_info( dev, format, arg...) lx_printf("dev_info: " format , ## arg) -#define dev_warn( dev, format, arg...) lx_printf("dev_warn: " format , ## arg) -#define dev_WARN( dev, format, arg...) lx_printf("dev_WARN: " format , ## arg) -#define dev_err( dev, format, arg...) lx_printf("dev_error: " format , ## arg) -#define dev_notice(dev, format, arg...) lx_printf("dev_notice: " format , ## arg) -#define dev_crit( dev, format, arg...) lx_printf("dev_crit: " format , ## arg) -#if DEBUG -#define dev_dbg( dev, format, arg...) printk("dev_dbg: " format , ## arg) -#else -#define dev_dbg( dev, format, arg...) -#endif - -#define pr_debug(fmt, ...) printk(KERN_INFO fmt, ##__VA_ARGS__) -#define pr_info(fmt, ...) printk(KERN_INFO fmt, ##__VA_ARGS__) -#define pr_err(fmt, ...) printk(KERN_ERR fmt, ##__VA_ARGS__) -#define pr_warn(fmt, ...) printk(KERN_ERR fmt, ##__VA_ARGS__) -#define pr_info_once(fmt, ...) printk(KERN_INFO fmt, ##__VA_ARGS__) -#define pr_notice(fmt, ...) printk(KERN_NOTICE fmt, ##__VA_ARGS__) -#define pr_emerg(fmt, ...) printk(KERN_INFO fmt, ##__VA_ARGS__) - -#define netdev_err(dev, fmt, args...) lx_printf("netdev_err: " fmt, ##args) -#define netdev_warn(dev, fmt, args...) lx_printf("netdev_warn: " fmt, ##args) -#define netdev_info(dev, fmt, args...) lx_printf("netdev_info: " fmt, ##args) - -#include -#include -#include -#include -#include - -#define from_timer(var, callback_timer, timer_fieldname) \ - container_of(callback_timer, typeof(*var), timer_fieldname) - -#include - -LX_MUTEX_INIT_DECLARE(mdio_board_lock); -LX_MUTEX_INIT_DECLARE(phy_fixup_lock); - -#define mdio_board_lock LX_MUTEX(mdio_board_lock) -#define phy_fixup_lock LX_MUTEX(phy_fixup_lock) - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -enum { - __GFP_COLD = 0x00000100u, - __GFP_REPEAT = 0x00000400u, -}; - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -enum { - ETH_HLEN = 14, - ETH_ALEN = 6, /* octets in one ethernet addr */ - ETH_P_8021Q = 0x8100, /* 802.1Q VLAN Extended Header */ - ETH_P_IP = 0x0800, - ETH_P_IPV6 = 0x86DD, - ETH_P_8021AD = 0x88A8, - VLAN_HLEN = 4, - VLAN_ETH_HLEN = 18, -}; - -typedef int raw_hdlc_proto; -typedef int cisco_proto; -typedef int fr_proto; -typedef int fr_proto_pvc; -typedef int fr_proto_pvc_info; -typedef int sync_serial_settings; -typedef int te1_settings; - -struct callback_head { - struct callback_head *next; - void (*func)(struct callback_head *head); -}; -#define rcu_head callback_head - -#define FIONREAD 0x541B -#define TIOCOUTQ 0x5411 - -struct completion { unsigned int done; void *task; }; -long __wait_completion(struct completion *work, unsigned long timeout); - -enum { - NAPI_STATE_SCHED, - NAPI_STATE_DISABLE, - NAPI_STATE_NPSVC, - NAPI_STATE_HASHED, -}; - -struct napi_struct -{ - struct net_device * dev; - int (*poll)(struct napi_struct *, int); - unsigned long state; - int weight; -}; - -#define writel(value, addr) (*(volatile uint32_t *)(addr) = (value)) -#define readl(addr) (*(volatile uint32_t *)(addr)) - -typedef u64 cycle_t; - -struct timespec64 { - time64_t tv_sec; /* seconds */ - long tv_nsec; /* nanoseconds */ -}; - -extern struct timespec64 ns_to_timespec64(const s64 nsec); - -static inline s64 timespec64_to_ns(const struct timespec64 *ts) -{ - return ((s64) ts->tv_sec * NSEC_PER_SEC) + ts->tv_nsec; -} - -#define ktime_to_ns(kt) ((kt)) - -ktime_t ns_to_ktime(u64 ns); - -struct device; -struct device_driver; - -struct bus_type -{ - const char * name; - const struct attribute_group **dev_groups; - - int (*match)(struct device *dev, struct device_driver *drv); - int (*uevent)(struct device *dev, struct kobj_uevent_env *env); - int (*probe)(struct device *dev); - - const struct dev_pm_ops *pm; -}; - -struct device_driver { - const char * name; - struct bus_type *bus; - struct module *owner; - const struct of_device_id*of_match_table; - const struct dev_pm_ops *pm; - int (*probe)(struct device *dev); - int (*remove) (struct device *dev); -}; - -struct class -{ - const char *name; - void (*dev_release)(struct device *dev); -}; - -struct attribute { - const char *name; -}; - -struct attribute_group -{ - struct attribute ** attrs; -}; - -struct platform_device; - -struct device { - char name[32]; - struct device * parent; - struct kobject kobj; - struct device_driver *driver; - void * platform_data; - void * driver_data; - const struct attribute_group **groups; - void (*release)(struct device *dev); - struct bus_type *bus; - struct class *class; - struct device_node *of_node; - struct fwnode_handle *fwnode; - struct platform_device *plat_dev; -}; - -struct platform_device { - const char * name; - struct device dev; - const struct platform_device_id * id_entry; -}; - -#define platform_get_device_id(pdev) ((pdev)->id_entry) - -static inline void *platform_get_drvdata(const struct platform_device *pdev) -{ - return pdev->dev.driver_data; -} - -void udelay(unsigned long usecs); - -enum netdev_tx { - NETDEV_TX_OK = 0x00, - NETDEV_TX_BUSY = 0x10, - NETDEV_TX_LOCKED = 0x20, -}; -typedef enum netdev_tx netdev_tx_t; - -struct sk_buff; -struct ifreq; - -#include - -struct net_device_ops { - int (*ndo_open) (struct net_device *dev); - int (*ndo_stop) (struct net_device *dev); - netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb, struct net_device *dev); - void (*ndo_set_rx_mode) (struct net_device *dev); - int (*ndo_change_mtu) (struct net_device *dev, int new_mtu); - int (*ndo_validate_addr) (struct net_device *dev); - void (*ndo_tx_timeout) (struct net_device *dev); - int (*ndo_set_mac_address)(struct net_device *dev, void *addr); - int (*ndo_do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd); - int (*ndo_set_features)(struct net_device *dev, netdev_features_t features); -}; - -struct net_device_stats { - unsigned long rx_packets; - unsigned long tx_packets; - unsigned long rx_bytes; - unsigned long tx_bytes; - unsigned long collisions; - unsigned long rx_errors; - unsigned long tx_errors; - unsigned long rx_dropped; - unsigned long tx_dropped; - unsigned long rx_length_errors; - unsigned long rx_over_errors; - unsigned long rx_crc_errors; - unsigned long rx_frame_errors; - unsigned long rx_fifo_errors; - unsigned long rx_missed_errors; - unsigned long tx_aborted_errors; - unsigned long tx_carrier_errors; - unsigned long tx_fifo_errors; - unsigned long tx_heartbeat_errors; - unsigned long tx_window_errors; -}; - -struct netdev_hw_addr { - struct list_head list; - unsigned char addr[32]; -}; - -struct netdev_hw_addr_list { - struct list_head list; - int count; -}; - -enum { NETDEV_ALIGN = 32, GSO_MAX_SEGS = 65535 }; - -enum netdev_state_t { - __LINK_STATE_START, - __LINK_STATE_PRESENT, - __LINK_STATE_NOCARRIER, - __LINK_STATE_LINKWATCH_PENDING, - __LINK_STATE_DORMANT, -}; - -#define MAX_ADDR_LEN 32 - -struct net_device -{ - const char * name; - unsigned long state; - netdev_features_t features; - struct net_device_stats stats; - netdev_features_t hw_features; - int ifindex; - const struct net_device_ops *netdev_ops; - const struct ethtool_ops *ethtool_ops; - const struct header_ops *header_ops; - unsigned int flags; - unsigned int priv_flags; - unsigned short hard_header_len; - unsigned long mtu; - unsigned int min_mtu; - unsigned long max_mtu; - unsigned short type; - unsigned char min_header_len; - unsigned char addr_len; - struct netdev_hw_addr_list mc; - unsigned char *dev_addr; - unsigned char broadcast[MAX_ADDR_LEN]; - unsigned long tx_queue_len; - int watchdog_timeo; - struct timer_list watchdog_timer; - struct device dev; - u16 gso_max_segs; - struct phy_device *phydev; -}; - -static inline void *netdev_priv(const struct net_device *dev) { - return (char *)dev + ALIGN(sizeof(struct net_device), NETDEV_ALIGN); } - -#define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) - -static inline u64 div_u64(u64 dividend, u32 divisor) { return dividend / divisor; } - -struct pps_event_time { - struct timespec64 ts_real; -}; - -size_t copy_from_user(void *to, void const *from, size_t len); -size_t copy_to_user(void *dst, void const *src, size_t len); - -int snprintf(char *buf, size_t size, const char *fmt, ...); - -struct clk -{ - const char * name; - unsigned long rate; -}; - -unsigned long clk_get_rate(struct clk * clk); - -#define module_param_array(macaddr, byte, arg1, arg2); - -# define swab32p __swab32p -# define swab32s __swab32s - -u64 local_clock(void); - -#define do_div(n,base) ({ \ - unsigned long __base = (base); \ - unsigned long __rem; \ - __rem = ((uint64_t)(n)) % __base; \ - (n) = ((uint64_t)(n)) / __base; \ - __rem; \ -}) - -enum { - MSEC_PER_SEC = 1000L, - USEC_PER_SEC = MSEC_PER_SEC * 1000L, -}; - -static inline int rcu_read_lock_held(void) { return 1; } -static inline int rcu_read_lock_bh_held(void) { return 1; } - -unsigned int jiffies_to_usecs(const unsigned long j); - -#define __aligned(x) __attribute__((aligned(x))) - -#define kmemcheck_bitfield_begin(name) -#define kmemcheck_bitfield_end(name) - -typedef __u32 __wsum; - -enum { NUMA_NO_NODE = -1 }; - -struct ts_state -{ - char cb[40]; -}; - -struct ts_config -{ - unsigned int (*get_next_block)(unsigned int consumed, - const u8 **dst, - struct ts_config *conf, - struct ts_state *state); - void (*finish)(struct ts_config *conf, - struct ts_state *state); -}; - -struct flow_dissector_key_control -{ - u16 thoff; - u16 addr_type; - u32 flags; -}; - -struct flow_keys -{ - struct flow_dissector_key_control control; -}; - -struct flow_dissector_key {}; - -struct flow_dissector {}; - -extern struct flow_dissector flow_keys_dissector; -extern struct flow_dissector flow_keys_buf_dissector; - -struct flowi4 {}; -struct flowi6 {}; - -__u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys); - -bool flow_keys_have_l4(struct flow_keys *keys); - -__u32 __get_hash_from_flowi4(const struct flowi4 *fl4, struct flow_keys *keys); - -bool gfpflags_allow_blocking(const gfp_t gfp_flags); - -struct lock_class_key { }; - -#define lockdep_set_class(lock, key) - -struct page -{ - atomic_t _count; - void *addr; - dma_addr_t paddr; - unsigned long private; - unsigned long size; -}; - -static inline struct page *compound_head(struct page *page) { return page; } - -bool page_is_pfmemalloc(struct page *page); - -void __free_page_frag(void *addr); - -struct page *alloc_pages_node(int nid, gfp_t gfp_mask, unsigned int order); - -void get_page(struct page *page); -void put_page(struct page *page); - -static inline void *page_address(struct page *page) { return page->addr; }; - -struct page_frag -{ - struct page *page; - __u16 offset; - __u16 size; -}; - -enum dma_data_direction { DMA_FROM_DEVICE = 2 }; - -dma_addr_t dma_map_page(struct device *dev, struct page *page, size_t offset, size_t size, enum dma_data_direction dir); - -void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir); - -#define L1_CACHE_BYTES 32 - - -size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); - -__wsum csum_block_add(__wsum csum, __wsum csum2, int offset); -__wsum csum_sub(__wsum csum, __wsum addend); -__wsum csum_partial(const void *buff, int len, __wsum sum); - -typedef struct poll_table_struct { } poll_table; - -size_t copy_from_iter(void *addr, size_t bytes, struct iov_iter *i); -size_t copy_to_iter(void *addr, size_t bytes, struct iov_iter *i); - -struct partial_page -{ - unsigned int offset; - unsigned int len; -}; - -struct splice_pipe_desc -{ - struct page **pages; - struct partial_page *partial; - int nr_pages; - unsigned int nr_pages_max; - unsigned int flags; - const struct pipe_buf_operations *ops; - void (*spd_release)(struct splice_pipe_desc *, unsigned int); -}; - -struct timespec ktime_to_timespec(const ktime_t kt); - -typedef __u16 __sum16; - -__sum16 csum_fold(__wsum csum); -__wsum csum_add(__wsum csum, __wsum addend); -__wsum remcsum_adjust(void *ptr, __wsum csum, int start, int offset); - -#define htons(x) __cpu_to_be16(x) - -struct iphdr { - __u8 ihl:4; - __u8 version:4; - __u8 tos; - __be16 tot_len; - __be16 frag_off; - __u8 ttl; - __u8 protocol; - __sum16 check; - __be32 saddr; - __be32 daddr; -}; - -struct sk_buff; -struct iphdr *ip_hdr(const struct sk_buff *skb); - -typedef unsigned short ushort; - -dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size, enum dma_data_direction dir); - -enum { DMA_TO_DEVICE = 1 }; - -int dma_mapping_error(struct device *dev, dma_addr_t dma_addr); - -void dma_unmap_single(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir); - -void dev_kfree_skb_any(struct sk_buff *); - -int net_ratelimit(void); - -unsigned int tcp_hdrlen(const struct sk_buff *skb); - -struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, unsigned int index); -void netif_tx_stop_queue(struct netdev_queue *dev_queue); -void netif_tx_wake_queue(struct netdev_queue *dev_queue); -bool netif_queue_stopped(const struct net_device *dev); - -#define CONFIG_ARM 1 -#define CONFIG_ARCH_MXC 1 -#define CONFIG_DEBUG_LOCK_ALLOC 1 -#define CONFIG_MDIO_DEVICE 1 -#define CONFIG_OF_MDIO 1 -#define CONFIG_PHYLIB 1 -#define CONFIG_PTP_1588_CLOCK 1 - -void rtnl_lock(void); -void rtnl_unlock(void); - -int netif_device_present(struct net_device *); -int netif_running(const struct net_device *dev); -void netif_wake_queue(struct net_device *); -void netif_tx_lock_bh(struct net_device *dev); -void netif_tx_unlock_bh(struct net_device *dev); - -void napi_enable(struct napi_struct *n); -void napi_disable(struct napi_struct *n); - -#define __randomize_layout - -extern unsigned long find_next_bit(const unsigned long *addr, unsigned long - size, unsigned long offset); -#define find_first_bit(addr, size) find_next_bit((addr), (size), 0) - -#define prefetch(x) __builtin_prefetch(x) -#define prefetchw(x) __builtin_prefetch(x,1) - -#define ntohs(x) __be16_to_cpu(x) - -struct vlan_hdr -{ - __be16 h_vlan_TCI; -}; - -__be16 eth_type_trans(struct sk_buff *, struct net_device *); - -void __vlan_hwaccel_put_tag(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); - -enum gro_result { - GRO_MERGED, - GRO_MERGED_FREE, - GRO_HELD, - GRO_NORMAL, - GRO_DROP, -}; -typedef enum gro_result gro_result_t; - -gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb); - -void dma_sync_single_for_device(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir); - -void *dev_get_platdata(const struct device *dev); - -int is_valid_ether_addr(const u8 *); - -const void *of_get_mac_address(struct device_node *np); - -void eth_hw_addr_random(struct net_device *dev); - -int pm_runtime_get_sync(struct device *dev); - -void reinit_completion(struct completion *x); - -void pm_runtime_mark_last_busy(struct device *dev); - -int pm_runtime_put_autosuspend(struct device *dev); - -int clk_prepare_enable(struct clk *); - -void clk_disable_unprepare(struct clk *); - -struct phy_device *of_phy_connect(struct net_device *dev, struct device_node *phy_np, void (*hndlr)(struct net_device *), u32 flags, int iface); - -const char *dev_name(const struct device *dev); - -void *kmalloc(size_t size, gfp_t flags); -void kfree(const void *); -void *kzalloc(size_t size, gfp_t flags); - -struct mii_bus; -struct device_node *of_get_child_by_name( const struct device_node *node, const char *name); -void of_node_put(struct device_node *node); -int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np); - -struct resource *platform_get_resource(struct platform_device *, unsigned, unsigned); - -/******************************* - ** asm-generic/atomic-long.h ** - *******************************/ - -static inline int atomic_long_cmpxchg(atomic_long_t *v, long old, long n) { - return cmpxchg(&v->counter, old, n); } - -/************************ - ** linux/capability.h ** - ************************/ - -bool capable(int); - -/************************* - ** linux/cgroup-defs.h ** - *************************/ - -struct cgroup; - -/****************** - ** linux/cred.h ** - ******************/ - -struct user_struct *current_user(); - -/******************* - ** linux/delay.h ** - *******************/ - -void usleep_range(unsigned long min, unsigned long max); - -/************************* - ** linux/etherdevice.h ** - *************************/ - -static inline void ether_addr_copy(u8 *dst, const u8 *src) -{ - *(u32 *)dst = *(const u32 *)src; - *(u16 *)(dst+ 4) = *(const u16 *)(src + 4); -} - -/********************* - ** linux/ethtool.h ** - *********************/ - -struct ethtool_link_ksettings; - -/**************** - ** linux/fs.h ** - ****************/ - -typedef struct { - size_t written; - size_t count; - union { - char __user *buf; - void *data; - } arg; - int error; -} read_descriptor_t; - -/******************** - ** linux/fwnode.h ** - ********************/ - -struct fwnode_handle { int dummy; }; - -/********************** - ** linux/mm_types.h ** - **********************/ - -struct page_frag_cache -{ - bool pfmemalloc; -}; - -/***************** - ** linux/gfp.h ** - *****************/ - -void *page_frag_alloc(struct page_frag_cache *nc, - unsigned int fragsz, gfp_t gfp_mask); - -void page_frag_free(void *addr); - -/********************* - ** linux/if_vlan.h ** - *********************/ - -static inline bool eth_type_vlan(__be16 ethertype) { return false; } - -/*********************** - ** linux/interrupt.h ** - ***********************/ - -#define IRQF_SHARED 0x00000080 -#define IRQF_ONESHOT 0x00002000 - -int request_threaded_irq(unsigned int irq, irq_handler_t handler, - irq_handler_t thread_fn, - unsigned long flags, const char *name, void *dev); - -/********************* - ** linux/lockdep.h ** - *********************/ - -struct lockdep_map { }; - -#define mutex_release(l, n, i) - -/***************************** - ** linux/mod_devicetable.h ** - *****************************/ - -#define MDIO_NAME_SIZE 32 - -/************************ - ** linux/memcontrol.h ** - ************************/ - -struct mem_cgroup; - -#define mem_cgroup_sockets_enabled 0 - -static inline bool mem_cgroup_under_socket_pressure(struct mem_cgroup *memcg) { - return false; } - -/*********************** - ** linux/netdevice.h ** - ***********************/ - -void __napi_schedule(struct napi_struct *n); - -typedef struct sk_buff **(*gro_receive_t)(struct sk_buff **, struct sk_buff *); - -struct sk_buff **call_gro_receive(gro_receive_t cb, struct sk_buff **head, struct sk_buff *skb); - -void dev_consume_skb_any(struct sk_buff *skb); - -bool napi_complete_done(struct napi_struct *n, int work_done); - -bool napi_schedule_prep(struct napi_struct *n); - -void skb_gro_flush_final(struct sk_buff *skb, struct sk_buff **pp, int flush); - -/**************** - ** linux/of.h ** - ****************/ - -struct device_node -{ - const char * full_name; - struct fwnode_handle fwnode; -}; - -#define of_fwnode_handle(node) \ - ({ \ - typeof(node) __of_fwnode_handle_node = (node); \ - \ - __of_fwnode_handle_node ? \ - &__of_fwnode_handle_node->fwnode : NULL; \ - }) - -int of_machine_is_compatible(const char *compat); - -bool of_property_read_bool(const struct device_node *np, const char *propname); - -/*********************** - ** linux/of_device.h ** - ***********************/ - -int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env); - -/********************* - ** linux/of_mdio.h ** - *********************/ - -int of_mdio_parse_addr(struct device *dev, const struct device_node *np); - -void of_phy_deregister_fixed_link(struct device_node *np); - -/***************** - ** linux/pci.h ** - *****************/ - -int dev_is_pci(struct device *dev); - -struct pci_dev; - -struct device_node * pci_device_to_OF_node(const struct pci_dev *pdev); - -#define to_pci_dev(n) NULL - -/****************************** - ** linux/phy_led_triggers.h ** - ******************************/ - -void phy_led_trigger_change_speed(struct phy_device *phy); - -int phy_led_triggers_register(struct phy_device *phy); - -void phy_led_triggers_unregister(struct phy_device *phy); - -/***************************** - ** linux/platform_device.h ** - *****************************/ - -int platform_get_irq_byname(struct platform_device *dev, const char *name); - -int platform_irq_count(struct platform_device *); - -/************************ - ** linux/pm_runtime.h ** - ************************/ - -void pm_runtime_disable(struct device *dev); - -int pm_runtime_put(struct device *dev); - -/********************* - ** linux/preempt.h ** - *********************/ - -#define in_task() (1) - -/********************** - ** linux/rcupdate.h ** - **********************/ - -#define rcu_assign_pointer(p, v) (p = v); - -#define rcu_dereference_protected(p, c) p - -/************************* - ** linux/scatterlist.h ** - *************************/ - -#define sg_is_last(sg) ((sg)->page_link & 0x02) - -/************************** - ** linux/sched/signal.h ** - **************************/ - -unsigned long rlimit(unsigned int limit); - -/************************ - ** linux/sched/user.h ** - ************************/ - -struct user_struct -{ - atomic_long_t locked_vm; -}; - -void free_uid(struct user_struct *); - -struct user_struct *get_uid(struct user_struct *u); - -/****************** - ** linux/sctp.h ** - ******************/ - -struct sctphdr -{ - unsigned unused; -}; - -struct kmem_cache *kmem_cache_create_usercopy(const char *name, size_t size, - size_t align, slab_flags_t flags, - size_t useroffset, size_t usersize, - void (*ctor)(void *)); - -/****************** - ** linux/slab.h ** - ******************/ - -void *kcalloc(size_t n, size_t size, gfp_t flags); - -void kmem_cache_free_bulk(struct kmem_cache *, size_t, void **); - -/********************** - ** linux/spinlock.h ** - **********************/ - -int spin_is_locked(spinlock_t *lock); - -/******************** - ** linux/stddef.h ** - ********************/ - -#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER)) - -/******************* - ** linux/sysfs.h ** - *******************/ - -int sysfs_create_link(struct kobject *kobj, struct kobject *target, const char *name); - -int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, const char *name); - -void sysfs_remove_link(struct kobject *kobj, const char *name); - -/************************* - ** linux/thread_info.h ** - *************************/ - -static inline void check_object_size(const void *ptr, unsigned long n, - bool to_user) { } - -void __bad_copy_from(void); -void __bad_copy_to(void); - -static inline void copy_overflow(int size, unsigned long count) -{ - WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count); -} - -static __always_inline bool -check_copy_size(const void *addr, size_t bytes, bool is_source) -{ - int sz = __compiletime_object_size(addr); - if (unlikely(sz >= 0 && sz < bytes)) { - if (!__builtin_constant_p(bytes)) - copy_overflow(sz, bytes); - else if (is_source) - __bad_copy_from(); - else - __bad_copy_to(); - return false; - } - check_object_size(addr, bytes, is_source); - return true; -} - -/**************************** - ** linux/user_namespace.h ** - ****************************/ - -struct user_namespace { }; - -/******************** - ** linux/uidgid.h ** - ********************/ - -kuid_t make_kuid(struct user_namespace *from, uid_t uid); - -/***************** - ** linux/uio.h ** - *****************/ - -struct kvec -{ - void *iov_base; - size_t iov_len; -}; - -bool _copy_from_iter_full(void *addr, size_t bytes, struct iov_iter *i); - -static __always_inline __must_check -bool copy_from_iter_full(void *addr, size_t bytes, struct iov_iter *i) -{ - if (unlikely(!check_copy_size(addr, bytes, false))) - return false; - else - return _copy_from_iter_full(addr, bytes, i); -} - -bool copy_from_iter_full_nocache(void *addr, size_t bytes, struct iov_iter *i); - -bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); - -/****************** - ** linux/wait.h ** - ******************/ - -bool wq_has_sleeper(struct wait_queue_head *wq_head); - -/******************** - ** net/checksum.h ** - ********************/ - -static inline __wsum -csum_block_sub(__wsum csum, __wsum csum2, int offset) -{ - return csum_block_add(csum, ~csum2, offset); -} - -static inline __wsum csum_unfold(__sum16 n) -{ - return (__force __wsum)n; -} - -/************************** - ** net/flow_dissector.h ** - **************************/ - -#define FLOW_DISSECTOR_F_PARSE_1ST_FRAG BIT(0) - -/************************* - ** net/net_namespace.h ** - *************************/ - -struct net; - -/****************** - ** net/l3mdev.h ** - ******************/ - -int l3mdev_master_ifindex_by_index(struct net *net, int ifindex); - -/********************* - ** net/pkt_sched.h ** - *********************/ - -#define DEFAULT_TX_QUEUE_LEN 1000 - -/*********************** - ** soc/imx/cpuidle.h ** - ***********************/ - -static inline void imx6q_cpuidle_fec_irqs_used(void) { } -static inline void imx6q_cpuidle_fec_irqs_unused(void) { } - -/************************* - ** trace/events/mdio.h ** - *************************/ - -void trace_mdio_access(void *dummy, ...); - -/********************************* - ** uapi/asm-generic/resource.h ** - *********************************/ - -# define RLIMIT_MEMLOCK 8 /* max locked-in-memory address space */ - -/***************************** - ** uapi/linux/capability.h ** - *****************************/ - -#define CAP_IPC_LOCK 14 - -/************************* - ** uapi/linux/kernel.h ** - *************************/ - -#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) - -/****************************** - ** uapi/linux/libc-compat.h ** - ******************************/ - -#define __UAPI_DEF_IF_IFMAP 1 -#define __UAPI_DEF_IF_IFNAMSIZ 1 -#define __UAPI_DEF_IF_IFREQ 1 -#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 - -/************************ - ** uapi/linux/types.h ** - ************************/ - -typedef unsigned __poll_t; - -/************************/ - -#define DECLARE_BITMAP(name,bits) \ - unsigned long name[BITS_TO_LONGS(bits)] - -#include -#include -#include -#include -#include -#include -#include - -int ethtool_op_get_ts_info(struct net_device *, struct ethtool_ts_info *); - -int device_set_wakeup_enable(struct device *dev, bool enable); - -bool device_may_wakeup(struct device *dev); - -int enable_irq_wake(unsigned int irq); -int disable_irq_wake(unsigned int irq); - -u32 ethtool_op_get_link(struct net_device *); - -void *dma_alloc_coherent(struct device *, size_t, dma_addr_t *, gfp_t); -void dma_free_coherent(struct device *, size_t size, void *vaddr, dma_addr_t bus); - -void netif_tx_start_all_queues(struct net_device *dev); - -int pinctrl_pm_select_default_state(struct device *dev); - -int pinctrl_pm_select_sleep_state(struct device *dev); - -void netif_tx_disable(struct net_device *dev); - -#include - -#define netdev_hw_addr_list_for_each(ha, l) \ - list_for_each_entry(ha, &(l)->list, list) - -#define netdev_for_each_mc_addr(ha, dev) \ - netdev_hw_addr_list_for_each(ha, &(dev)->mc) - -void netif_tx_wake_all_queues(struct net_device *); - -int eth_validate_addr(struct net_device *); - -void *dmam_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t gfp); - -int eth_change_mtu(struct net_device *dev, int new_mtu); -int eth_validate_addr(struct net_device *dev); - -void netif_napi_add(struct net_device *dev, struct napi_struct *napi, int (*poll)(struct napi_struct *, int), int weight); - -bool of_device_is_available(const struct device_node *device); -int of_property_read_u32(const struct device_node *np, const char *propname, u32 *out_value); - -enum { NAPI_POLL_WEIGHT = 64 }; - -#define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) - -struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs, unsigned int rxqs); - -void *devm_ioremap_resource(struct device *dev, struct resource *res); - -const struct of_device_id *of_match_device(const struct of_device_id *matches, const struct device *dev); - -const void *of_get_property(const struct device_node *node, const char *name, int *lenp); - -void platform_set_drvdata(struct platform_device *pdev, void *data); - -struct device_node *of_parse_phandle(const struct device_node *np, const char *phandle_name, int index); - -int of_phy_register_fixed_link(struct device_node *np); -bool of_phy_is_fixed_link(struct device_node *np); -struct device_node *of_node_get(struct device_node *node); -int of_get_phy_mode(struct device_node *np); - -struct clk *devm_clk_get(struct device *dev, const char *id); -struct regulator *__must_check devm_regulator_get(struct device *dev, const char *id); - -void pm_runtime_set_autosuspend_delay(struct device *dev, int delay); -void pm_runtime_use_autosuspend(struct device *dev); -void pm_runtime_get_noresume(struct device *dev); -int pm_runtime_set_active(struct device *dev); -void pm_runtime_enable(struct device *dev); - -int regulator_enable(struct regulator *); - -int platform_get_irq(struct platform_device *, unsigned int); - -void netif_carrier_off(struct net_device *dev); - -int register_netdev(struct net_device *); -void unregister_netdev(struct net_device *); - -void free_netdev(struct net_device *); - -int device_init_wakeup(struct device *dev, bool val); - -int regulator_disable(struct regulator *r); - -void *dev_get_drvdata(const struct device *dev); - -void netif_device_attach(struct net_device *); -void netif_device_detach(struct net_device *dev); - -int devm_request_irq(struct device *dev, unsigned int irq, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id); - -#define SET_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) -#define SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) - -struct platform_driver { - int (*probe)(struct platform_device *); - int (*remove)(struct platform_device *); - struct device_driver driver; - const struct platform_device_id *id_table; -}; - -int platform_driver_register(struct platform_driver *); -void platform_driver_unregister(struct platform_driver *); - -#define module_driver(__driver, __register, __unregister, ...) \ -static int __init __driver##_init(void) \ -{ \ - return __register(&(__driver) , ##__VA_ARGS__); \ -} \ -module_init(__driver##_init); \ -static void __exit __driver##_exit(void) \ -{ \ - __unregister(&(__driver) , ##__VA_ARGS__); \ -} \ -module_exit(__driver##_exit); - -#define module_platform_driver(__platform_driver) \ - module_driver(__platform_driver, platform_driver_register, \ - platform_driver_unregister) - -struct tasklet_struct -{ - void (*func)(unsigned long); - unsigned long data; -}; - -#define PTR_ALIGN(p, a) ({ \ - unsigned long _p = (unsigned long)p; \ - _p = (_p + a - 1) & ~(a - 1); \ - p = (typeof(p))_p; \ - p; \ -}) - -struct kmem_cache; -struct kmem_cache *kmem_cache_create(const char *, size_t, size_t, unsigned long, void (*)(void *)); -void kmem_cache_destroy(struct kmem_cache *); -void *kmem_cache_alloc(struct kmem_cache *, gfp_t); -void *kmem_cache_zalloc(struct kmem_cache *k, gfp_t flags); -void kmem_cache_free(struct kmem_cache *, void *); -void *kmalloc_node_track_caller(size_t size, gfp_t flags, int node); -void *kmem_cache_alloc_node(struct kmem_cache *s, gfp_t flags, int node); - -struct mem_cgroup {}; -typedef int possible_net_t; -typedef int rwlock_t; - -bool gfp_pfmemalloc_allowed(gfp_t); - -struct cred { - struct user_namespace * user_ns; -}; - -struct file { - const struct cred * f_cred; -}; - -struct net -{ - struct user_namespace * user_ns; -}; - -struct percpu_counter { - s64 count; -}; - -static inline int percpu_counter_init(struct percpu_counter *fbc, s64 amount, gfp_t gfp) -{ - fbc->count = amount; - return 0; -} - -static inline s64 percpu_counter_read(struct percpu_counter *fbc) -{ - return fbc->count; -} - -static inline -void percpu_counter_add(struct percpu_counter *fbc, s64 amount) -{ - fbc->count += amount; -} - -static inline -void __percpu_counter_add(struct percpu_counter *fbc, s64 amount, s32 batch) -{ - percpu_counter_add(fbc, amount); -} - -s64 percpu_counter_sum_positive(struct percpu_counter *fbc); - -static inline void percpu_counter_inc(struct percpu_counter *fbc) -{ - percpu_counter_add(fbc, 1); -} - -static inline void percpu_counter_dec(struct percpu_counter *fbc) -{ - percpu_counter_add(fbc, -1); -} - -static inline -s64 percpu_counter_read_positive(struct percpu_counter *fbc) -{ - return fbc->count; -} - -void percpu_counter_destroy(struct percpu_counter *fbc); - -s64 percpu_counter_sum(struct percpu_counter *fbc); - -void local_bh_disable(void); -void local_bh_enable(void); - -#include -#include - -static inline int net_eq(const struct net *net1, const struct net *net2) { - return net1 == net2; } - -extern struct net init_net; - -struct net *dev_net(const struct net_device *dev); - -#define read_pnet(pnet) (&init_net) - -void bitmap_fill(unsigned long *dst, int nbits); -void bitmap_zero(unsigned long *dst, int nbits); - -typedef unsigned seqlock_t; - - -enum { LL_MAX_HEADER = 96 }; - -struct hh_cache -{ - u16 hh_len; - u16 __pad; - seqlock_t hh_lock; - -#define HH_DATA_MOD 16 -#define HH_DATA_OFF(__len) \ - (HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1)) -#define HH_DATA_ALIGN(__len) \ - (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1)) - unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)]; -}; - -struct seq_net_private { - struct net *net; -}; - -struct seq_file; -struct ctl_table; - -typedef int proc_handler (struct ctl_table *ctl, int write, void __user *buffer, size_t *lenp, loff_t *ppos); - -unsigned read_seqbegin(const seqlock_t *sl); -unsigned read_seqretry(const seqlock_t *sl, unsigned start); - -int dev_queue_xmit(struct sk_buff *skb); - -#define raw_smp_processor_id() 0 - -#define rcu_dereference_bh(p) p -#define rcu_dereference_raw(p) p -#define rcu_dereference_check(p, c) p -#define rcu_dereference(p) p - -struct page_counter -{ - atomic_long_t count; - unsigned long limit; -}; - -struct cg_proto -{ - struct page_counter memory_allocated; - struct percpu_counter sockets_allocated; - int memory_pressure; - long sysctl_mem[3]; -}; - -void page_counter_charge(struct page_counter *counter, unsigned long nr_pages); -unsigned long page_counter_read(struct page_counter *counter); -void page_counter_uncharge(struct page_counter *counter, unsigned long nr_pages); - -enum { UNDER_LIMIT, SOFT_LIMIT, OVER_LIMIT }; - -struct inode -{ - kuid_t i_uid; -}; - -struct vm_area_struct; - -void write_lock_bh(rwlock_t *); -void write_unlock_bh(rwlock_t *); - -struct sock; -struct socket; - -void security_sock_graft(struct sock *, struct socket *); - -u32 prandom_u32(void); - -void rcu_read_lock(void); -void rcu_read_unlock(void); - -bool net_gso_ok(netdev_features_t features, int gso_type); - -size_t copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i); - -bool poll_does_not_wait(const poll_table *p); -void poll_wait(struct file *f, wait_queue_head_t *w, poll_table *p); - -struct task_struct -{ - unsigned int flags; - struct page_frag task_frag; -}; - -extern struct task_struct *current; - -int in_softirq(void); - -enum { MAX_SCHEDULE_TIMEOUT = 1000 }; - -#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) - -#define write_pnet(pnet, net) do { (void)(net);} while (0) - -#define smp_load_acquire(p) *(p) -#define smp_store_release(p, v) *(p) = v; - -size_t ksize(void *); - -#define kmemcheck_bitfield_begin(name) -#define kmemcheck_bitfield_end(name) -#define kmemcheck_annotate_bitfield(ptr, name) -#define kmemcheck_annotate_variable(var) - -struct page *virt_to_head_page(const void *x); - -#define DEFINE_PER_CPU(type, name) \ - typeof(type) name -#define this_cpu_ptr(ptr) ptr - -void *__alloc_page_frag(struct page_frag_cache *nc, unsigned int fragsz, gfp_t gfp_mask); - -unsigned long local_irq_save(unsigned long flags); -void local_irq_restore(unsigned long); - -int in_irq(void); - -void trace_kfree_skb(struct sk_buff *, void *); -void trace_consume_skb(struct sk_buff *); - -struct page *alloc_pages(gfp_t gfp_mask, unsigned int order); - -#define alloc_page(gfp_mask) alloc_pages(gfp_mask, 0) - -#define page_private(page) ((page)->private) -#define set_page_private(page, v) ((page)->private = (v)) - -void *kmap_atomic(struct page *page); -void kunmap_atomic(void *addr); - -struct page *virt_to_page(const void *x); - -struct pipe_inode_info; - -ssize_t splice_to_pipe(struct pipe_inode_info *, struct splice_pipe_desc *); - -extern const struct pipe_buf_operations nosteal_pipe_buf_ops; - -__wsum csum_partial_ext(const void *buff, int len, __wsum sum); -__wsum csum_block_add_ext(__wsum csum, __wsum csum2, int offset, int len); -__wsum csum_partial_copy(const void *src, void *dst, int len, __wsum sum); -#define csum_partial_copy_nocheck(src, dst, len, sum) \ - csum_partial_copy((src), (dst), (len), (sum)) - -unsigned int textsearch_find(struct ts_config *, struct ts_state *); - -__be16 skb_network_protocol(struct sk_buff *skb, int *depth); - -bool can_checksum_protocol(netdev_features_t features, __be16 protocol); - -unsigned int skb_gro_offset(const struct sk_buff *skb); - -unsigned int skb_gro_len(const struct sk_buff *skb); - -#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb) - -enum { NAPI_GRO_FREE = 1, NAPI_GRO_FREE_STOLEN_HEAD = 2, }; - -struct napi_gro_cb -{ - u16 flush; - u16 count; - u8 same_flow; - u8 free; - struct sk_buff *last; -}; - -enum { - SLAB_HWCACHE_ALIGN = 0x00002000ul, - SLAB_CACHE_DMA = 0x00004000ul, - SLAB_PANIC = 0x00040000ul, - SLAB_LX_DMA = 0x80000000ul, -}; - -void sg_mark_end(struct scatterlist *sg); -void sg_set_buf(struct scatterlist *, const void *, unsigned int); -void sg_set_page(struct scatterlist *, struct page *, unsigned int, unsigned int); - -struct inet_skb_parm -{ - int iif; -}; - -enum { - IPPROTO_IP = 0, - IPPROTO_TCP = 6, - IPPROTO_UDP = 17, - IPPROTO_AH = 51, -}; - -enum { - IPPROTO_HOPOPTS = 0, - IPPROTO_ROUTING = 43, - IPPROTO_FRAGMENT = 44, - IPPROTO_DSTOPTS = 60, -}; - -void read_lock_bh(rwlock_t *); -void read_unlock_bh(rwlock_t *); - -bool file_ns_capable(const struct file *file, struct user_namespace *ns, int cap); - -extern struct user_namespace init_user_ns; - -enum { CAP_NET_RAW = 13 }; - -struct tcphdr -{ - __be16 source; - __be16 dest; - __be32 seq; - __be32 ack_seq; - __u16 res1:4, - doff:4, - fin:1, - syn:1, - rst:1, - psh:1, - ack:1, - urg:1, - ece:1, - cwr:1; - __be16 window; - __sum16 check; -}; - -struct tcphdr *tcp_hdr(const struct sk_buff *skb); - -struct udphdr -{ - __sum16 check; -}; - -struct udphdr *udp_hdr(const struct sk_buff *skb); - -struct in6_addr {}; - -struct ipv6hdr -{ - __be16 payload_len; - __u8 nexthdr; - struct in6_addr saddr; - struct in6_addr daddr; -}; - -struct ipv6hdr *ipv6_hdr(const struct sk_buff *skb); - -struct ipv6_opt_hdr -{ - __u8 nexthdr; - __u8 hdrlen; -} __attribute__((packed)); - -struct ip_auth_hdr -{ - __u8 nexthdr; - __u8 hdrlen; -}; - -struct frag_hdr -{ - __u8 nexthdr; - __be16 frag_off; -}; - -#define ipv6_optlen(p) (((p)->hdrlen+1) << 3) -#define ipv6_authlen(p) (((p)->hdrlen+2) << 2) - -enum { IP_OFFSET = 0x1FFF, IP_MF = 0x2000 }; - -enum { IP6_MF = 0x0001, IP6_OFFSET = 0xfff8 }; - -unsigned int ip_hdrlen(const struct sk_buff *skb); - -__sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr, unsigned short len, unsigned short proto, __wsum sum); - -__sum16 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, unsigned short proto, __wsum csum); - -void secpath_reset(struct sk_buff *); - -struct tcphdr *inner_tcp_hdr(const struct sk_buff *skb); -unsigned int inner_tcp_hdrlen(const struct sk_buff *skb); - -#define skb_vlan_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT) - -void vlan_set_encap_proto(struct sk_buff *skb, struct vlan_hdr *vhdr); - -#define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */ -#define VLAN_TAG_PRESENT VLAN_CFI_MASK - -int __vlan_insert_tag(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); - -#define skb_vlan_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT) - -void put_device(struct device *dev); - -typedef void (*dr_release_t)(struct device *dev, void *res); -typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data); - -void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp); -void devres_add(struct device *dev, void *res); -void devres_free(void *res); -int devres_release(struct device *dev, dr_release_t release, dr_match_t match, void *match_data); - -int dev_set_name(struct device *dev, const char *fmt, ...); - -int device_register(struct device *dev); - -void device_del(struct device *dev); - -int in_interrupt(void); - -int of_driver_match_device(struct device *dev, const struct device_driver *drv); - -struct device_attribute -{ - struct attribute attr; -}; - -#define __ATTRIBUTE_GROUPS(_name) \ - static const struct attribute_group *_name##_groups[] = { \ - &_name##_group, \ - NULL, \ - } - -#define ATTRIBUTE_GROUPS(_name) \ - static const struct attribute_group _name##_group = { \ - .attrs = _name##_attrs, \ - }; \ -__ATTRIBUTE_GROUPS(_name) - - -int sprintf(char *buf, const char *fmt, ...); - -#define __ATTR_NULL { .attr = { .name = NULL } } - -#define __ATTR_RO(name) __ATTR_NULL - -#define DEVICE_ATTR_RO(_name) \ - struct device_attribute dev_attr_##_name = __ATTR_RO(_name) - -int class_register(struct class *cls); -void class_unregister(struct class *cls); - -int bus_register(struct bus_type *bus); -void bus_unregister(struct bus_type *bus); - -#define __stringify(x...) #x - -int request_module(const char *name, ...); - -void device_initialize(struct device *dev); - -extern struct workqueue_struct *system_power_efficient_wq; - -int request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, const char *name, void *dev); -void free_irq(unsigned int irq, void *dev_id); -int enable_irq(unsigned int irq); -int disable_irq(unsigned int irq); -int disable_irq_nosync(unsigned int irq); - -void netif_carrier_on(struct net_device *dev); - -typedef struct { - __u8 b[16]; -} uuid_le; - -int device_add(struct device *dev); -struct device *get_device(struct device *dev); - -struct device *bus_find_device_by_name(struct bus_type *bus, struct device *start, const char *name); - -void msleep(unsigned int); - -int device_bind_driver(struct device *dev); -void device_release_driver(struct device *dev); - -struct device *class_find_device(struct class *cls, struct device *start, const void *data, int (*match)(struct device *, const void *)); - -struct device_node *of_get_next_available_child(const struct device_node *node, struct device_node *prev); - -#define for_each_available_child_of_node(parent, child) \ - for (child = of_get_next_available_child(parent, NULL); child != NULL; \ - child = of_get_next_available_child(parent, child)) - -int driver_register(struct device_driver *drv); -void driver_unregister(struct device_driver *drv); - -int __init netdev_boot_setup(char *str); - -static inline void eth_broadcast_addr(u8 *addr) { - memset(addr, 0xff, ETH_ALEN); } - -static inline void eth_zero_addr(u8 *addr) { - memset(addr, 0x00, ETH_ALEN); } - -static inline bool is_multicast_ether_addr(const u8 *addr) -{ - return 0x01 & addr[0]; -} - -static inline bool is_multicast_ether_addr_64bits(const u8 addr[6+2]) -{ - return is_multicast_ether_addr(addr); -} - -static inline bool ether_addr_equal_64bits(const u8 addr1[6+2], const u8 addr2[6+2]) -{ - const u16 *a = (const u16 *)addr1; - const u16 *b = (const u16 *)addr2; - - return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) == 0; -} - -static inline bool eth_proto_is_802_3(__be16 proto) -{ - proto &= htons(0xFF00); - return (u16)proto >= (u16)htons(ETH_P_802_3_MIN); -} - -static inline unsigned long compare_ether_header(const void *a, const void *b) -{ - u32 *a32 = (u32 *)((u8 *)a + 2); - u32 *b32 = (u32 *)((u8 *)b + 2); - - return (*(u16 *)a ^ *(u16 *)b) | (a32[0] ^ b32[0]) | - (a32[1] ^ b32[1]) | (a32[2] ^ b32[2]); - -} - -bool netdev_uses_dsa(struct net_device *dev); - -enum { - IFF_LIVE_ADDR_CHANGE = 0x100000, - IFF_TX_SKB_SHARING = 0x10000, -}; - -enum { ARPHRD_ETHER = 1, }; - -struct neighbour; - -struct header_ops -{ - int (*create) (struct sk_buff *skb, struct net_device *dev, - unsigned short type, const void *daddr, - const void *saddr, unsigned int len); - int (*parse)(const struct sk_buff *skb, unsigned char *haddr); - int (*rebuild)(struct sk_buff *skb); - int (*cache)(const struct neighbour *neigh, struct hh_cache *hh, __be16 type); - void (*cache_update)(struct hh_cache *hh, - const struct net_device *dev, - const unsigned char *haddr); -}; - -struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, unsigned char name_assign_type, void (*setup)(struct net_device *), unsigned int txqs, unsigned int rxqs); - -enum { NET_NAME_UNKNOWN = 0 }; - -int scnprintf(char *buf, size_t size, const char *fmt, ...); - -void *skb_gro_header_fast(struct sk_buff *skb, unsigned int offset); -void *skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen); -void *skb_gro_header_slow(struct sk_buff *skb, unsigned int hlen, unsigned int offset); -void skb_gro_pull(struct sk_buff *skb, unsigned int len); -void skb_gro_postpull_rcsum(struct sk_buff *skb, const void *start, unsigned int len); - -struct offload_callbacks -{ - struct sk_buff **(*gro_receive)(struct sk_buff **head, struct sk_buff *skb); - int (*gro_complete)(struct sk_buff *skb, int nhoff); -}; - -struct packet_offload -{ - __be16 type; - u16 priority; - struct offload_callbacks callbacks; -}; - -struct packet_offload *gro_find_receive_by_type(__be16 type); -struct packet_offload *gro_find_complete_by_type(__be16 type); - -#define fs_initcall(x) - -void dev_add_offload(struct packet_offload *po); - -void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp); - -struct pm_qos_request {}; - -#include - -#endif /* _SRC__DRIVERS__NIC__FEC__LX_EMUL_H_ */ diff --git a/repos/dde_linux/src/drivers/nic/fec/lxc.c b/repos/dde_linux/src/drivers/nic/fec/lxc.c deleted file mode 100644 index 3f595cfea8..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/lxc.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * \brief Linux emulation code - * \author Josef Soentgen - * \date 2014-03-07 - */ - -/* - * Copyright (C) 2014-2017 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -/* linux includes */ -#include -#include - -/* local includes */ -#include - - -struct Skb skb_helper(struct sk_buff *skb) -{ - struct Skb helper; - - skb_push(skb, ETH_HLEN); - - helper.packet = skb->data; - helper.packet_size = skb->len; - helper.frag = 0; - helper.frag_size = 0; - - /** - * If received packets are too large (as of now 128 bytes) the actually - * payload is put into a fragment. Otherwise the payload is stored directly - * in the sk_buff. - */ - if (skb_shinfo(skb)->nr_frags) { - if (skb_shinfo(skb)->nr_frags > 1) - printk("more than 1 fragment in skb: %p nr_frags: %d", skb, - skb_shinfo(skb)->nr_frags); - - skb_frag_t *f = &skb_shinfo(skb)->frags[0]; - helper.frag = skb_frag_address(f); - helper.frag_size = skb_frag_size(f); - /* fragment contains payload but header is still found in packet */ - helper.packet_size = ETH_HLEN; - } - - return helper; -} - - -struct sk_buff *lxc_alloc_skb(size_t len, size_t headroom) -{ - struct sk_buff *skb = alloc_skb(len + headroom, GFP_KERNEL | GFP_LX_DMA); - skb_reserve(skb, headroom); - return skb; -} - - -unsigned char *lxc_skb_put(struct sk_buff *skb, size_t len) -{ - return skb_put(skb, len); -} diff --git a/repos/dde_linux/src/drivers/nic/fec/lxc.h b/repos/dde_linux/src/drivers/nic/fec/lxc.h deleted file mode 100644 index 0bdad76ab7..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/lxc.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * \brief Lx C env - * \author Josef Soentgen - * \date 2016-03-04 - */ - -/* - * Copyright (C) 2016-2017 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -#ifndef _LXC_H_ -#define _LXC_H_ - -/* - * The sk_buff struct contains empty array members whose - * size differs between C and C++. Since we want to access - * certain members of the sk_buff from C++ we have to use - * a uniform format useable from both languages.W - * - * Note: we pull struct skb_buff as well as size_t from - * headers included before this one. - */ -struct Skb -{ - void *packet; - size_t packet_size; - void *frag; - size_t frag_size; -}; - -struct Skb skb_helper(struct sk_buff *skb); -bool is_eapol(struct sk_buff *skb); - -struct sk_buff *lxc_alloc_skb(size_t len, size_t headroom); -unsigned char *lxc_skb_put(struct sk_buff *skb, size_t len); - -#endif /* _LXC_H_ */ diff --git a/repos/dde_linux/src/drivers/nic/fec/main.cc b/repos/dde_linux/src/drivers/nic/fec/main.cc deleted file mode 100644 index 8d6d879448..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/main.cc +++ /dev/null @@ -1,120 +0,0 @@ -/* - * \brief Freescale ethernet driver - * \author Stefan Kalkowski - * \date 2017-10-19 - */ - -/* - * Copyright (C) 2017 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - - -/* Genode includes */ -#include -#include -#include - -/* local includes */ -#include - -/* Linux emulation environment includes */ -#include -#include -#include -#include -#include -#include -#include -#include - -/* Linux module functions */ -extern "C" int module_fec_driver_init(); -extern "C" int module_phy_module_init(); -extern "C" int subsys_phy_init(); -extern "C" void skb_init(); - -static void run_linux(void * m); - -struct workqueue_struct *system_wq; -struct workqueue_struct *system_power_efficient_wq; -unsigned long jiffies; - -struct Main -{ - Genode::Env & env; - Genode::Entrypoint & ep { env.ep() }; - Genode::Attached_rom_dataspace config_rom { env, "config" }; - Genode::Heap heap { env.ram(), env.rm() }; - Genode::Constructible uplink_client { }; - - /* Linux task that handles the initialization */ - Genode::Constructible linux; - - Main(Genode::Env &env) : env(env) - { - Genode::log("--- freescale ethernet driver ---"); - - Lx_kit::construct_env(env); - - LX_MUTEX_INIT(mdio_board_lock); - LX_MUTEX_INIT(phy_fixup_lock); - - /* init singleton Lx::Scheduler */ - Lx::scheduler(&env); - - Lx::malloc_init(env, heap); - - /* init singleton Lx::Timer */ - Lx::timer(&env, &ep, &heap, &jiffies); - - /* init singleton Lx::Irq */ - Lx::Irq::irq(&ep, &heap); - - /* init singleton Lx::Work */ - Lx::Work::work_queue(&heap); - - linux.construct(run_linux, reinterpret_cast(this), - "linux", Lx::Task::PRIORITY_0, Lx::scheduler()); - - /* give all task a first kick before returning */ - Lx::scheduler().schedule(); - } - - void announce() - { - uplink_client.construct( env, heap, - config_rom.xml().attribute_value( - "uplink_label", Genode::Session_label::String { "" })); - } - - Lx::Task &linux_task() { return *linux; } -}; - - -static void run_linux(void * m) -{ - Main & main = *reinterpret_cast(m); - - system_wq = (workqueue_struct *)kzalloc(sizeof(workqueue_struct), 0); - system_power_efficient_wq = (workqueue_struct *)kzalloc(sizeof(workqueue_struct), 0); - - skb_init(); - subsys_phy_init(); - module_phy_module_init(); - module_fec_driver_init(); - - main.announce(); - while (1) Lx::scheduler().current()->block_and_schedule(); -} - - -void Component::construct(Genode::Env &env) -{ - /* XXX execute constructors of global statics */ - env.exec_static_constructors(); - - static Main m(env); -} diff --git a/repos/dde_linux/src/drivers/nic/fec/spec/arm_64/target.mk b/repos/dde_linux/src/drivers/nic/fec/spec/arm_64/target.mk deleted file mode 100644 index f1b8dd0fc8..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/spec/arm_64/target.mk +++ /dev/null @@ -1,6 +0,0 @@ -REQUIRES = arm_64 - -include $(REP_DIR)/src/drivers/nic/fec/target.inc - -# lx_kit -INC_DIR += $(REP_DIR)/src/include/spec/arm_64 diff --git a/repos/dde_linux/src/drivers/nic/fec/spec/arm_v7/target.mk b/repos/dde_linux/src/drivers/nic/fec/spec/arm_v7/target.mk deleted file mode 100644 index 94f76c82b2..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/spec/arm_v7/target.mk +++ /dev/null @@ -1,7 +0,0 @@ -REQUIRES = arm_v7 - -include $(REP_DIR)/src/drivers/nic/fec/target.inc - -# lx_kit -INC_DIR += $(REP_DIR)/src/include/spec/arm -INC_DIR += $(REP_DIR)/src/include/spec/arm_v7 diff --git a/repos/dde_linux/src/drivers/nic/fec/target.inc b/repos/dde_linux/src/drivers/nic/fec/target.inc deleted file mode 100644 index 0aa35cd40b..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/target.inc +++ /dev/null @@ -1,50 +0,0 @@ -TARGET = fec_nic_drv -LIBS = base lx_kit_setjmp fec_nic_include nic_driver -SRC_CC += main.cc lx_emul.cc uplink_client.cc -SRC_CC += linux_network_session_base.cc -SRC_C += dummy.c lxc.c -INC_DIR += $(PRG_DIR)/../.. -INC_DIR += $(REP_DIR)/src/drivers/nic - -# lx_kit -SRC_CC += env.cc irq.cc malloc.cc scheduler.cc timer.cc work.cc printf.cc bug.cc -INC_DIR += $(REP_DIR)/src/include - -# contrib code -LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/nic/fec -SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/net/ethernet/freescale/*.c)) -SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/drivers/net/phy/*.c)) -SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/net/core/*.c)) -SRC_C += $(notdir $(wildcard $(LX_CONTRIB_DIR)/net/ethernet/*.c)) -INC_DIR += $(LX_CONTRIB_DIR)/include - -# -# Linux sources are C89 with GNU extensions -# -CC_C_OPT += -std=gnu89 - -# -# Reduce build noise of compiling contrib code -# -CC_OPT_fec_ptp = -Wno-unused-but-set-variable -Wno-unused-variable \ - -Wno-maybe-uninitialized -Wno-uninitialized -CC_OPT_fec_main = -Wno-unused-but-set-variable -Wno-unused-variable \ - -Wno-pointer-sign -Wno-int-conversion -Wno-unused-function \ - -Wno-uninitialized -CC_OPT_skbuff = -Wno-pointer-sign -Wno-int-conversion -Wno-uninitialized -CC_OPT_mdio_bus = -Wno-implicit-int -Wno-unused-function -Wno-pointer-sign -CC_OPT_eth = -Wno-pointer-sign -Wno-unused-function -CC_OPT_phy = -Wno-unused-function -Wno-unused-but-set-variable -CC_OPT_phy_device = -Wno-unused-function -CC_OPT_at803x = -Wno-unused-variable - -vpath linux_network_session_base.cc $(REP_DIR)/src/drivers/nic -vpath %.c $(LX_CONTRIB_DIR)/drivers/net/ethernet/freescale -vpath %.c $(LX_CONTRIB_DIR)/drivers/net/phy -vpath %.c $(LX_CONTRIB_DIR)/net/core -vpath %.c $(LX_CONTRIB_DIR)/net/ethernet -vpath %.c $(PRG_DIR)/../.. -vpath %.cc $(PRG_DIR)/../.. -vpath %.cc $(REP_DIR)/src/lib/legacy/lx_kit - -CC_CXX_WARN_STRICT = diff --git a/repos/dde_linux/src/drivers/nic/fec/uplink_client.cc b/repos/dde_linux/src/drivers/nic/fec/uplink_client.cc deleted file mode 100644 index af6d1206de..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/uplink_client.cc +++ /dev/null @@ -1,93 +0,0 @@ -/* - * \brief Uplink session client role of the driver - * \author Martin Stein - * \date 2020-12-10 - */ - -/* - * Copyright (C) 2020 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -/* local include */ -#include - -#include - -extern "C" { -#include -}; - - -Genode::Uplink_client::Transmit_result -Genode::Uplink_client::_drv_transmit_pkt(const char *conn_rx_pkt_base, - size_t conn_rx_pkt_size) -{ - /* - * We must not be called from another task, just from the - * packet stream dispatcher. - */ - if (Lx::scheduler().active()) { - warning("scheduler active"); - return Transmit_result::RETRY; - } - - struct sk_buff *skb { - lxc_alloc_skb(conn_rx_pkt_size + - HEAD_ROOM, HEAD_ROOM) }; - - unsigned char *data = lxc_skb_put(skb, conn_rx_pkt_size); - memcpy(data, conn_rx_pkt_base, conn_rx_pkt_size); - - _tx_data.ndev = _ndev; - _tx_data.skb = skb; - - _tx_task.unblock(); - Lx::scheduler().schedule(); - return Transmit_result::ACCEPTED; -} - - -Genode::Uplink_client::Uplink_client(Env &env, - Allocator &alloc, - Session_label const &label) -: - Linux_network_session_base { label }, - Uplink_client_base { env, alloc, - Net::Mac_address(_ndev->dev_addr) } -{ - _drv_handle_link_state(_read_link_state_from_ndev()); -} - - -void Genode::Uplink_client::link_state(bool state) -{ - _drv_handle_link_state(state); -} - - -void Genode::Uplink_client::receive(struct sk_buff *skb) -{ - Skb skb_helpr { skb_helper(skb) }; - _drv_rx_handle_pkt( - skb_helpr.packet_size + skb_helpr.frag_size, - [&] (void *conn_tx_pkt_base, - size_t &) - { - memcpy( - conn_tx_pkt_base, - skb_helpr.packet, - skb_helpr.packet_size); - - if (skb_helpr.frag_size) { - - memcpy( - (char *)conn_tx_pkt_base + skb_helpr.packet_size, - skb_helpr.frag, - skb_helpr.frag_size); - } - return Write_result::WRITE_SUCCEEDED; - }); -} diff --git a/repos/dde_linux/src/drivers/nic/fec/uplink_client.h b/repos/dde_linux/src/drivers/nic/fec/uplink_client.h deleted file mode 100644 index 96e44aabe3..0000000000 --- a/repos/dde_linux/src/drivers/nic/fec/uplink_client.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * \brief Uplink session client role of the driver - * \author Martin Stein - * \date 2020-12-10 - */ - -/* - * Copyright (C) 2020 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _SRC__DRIVERS__NIC__FEC__UPLINK_CLIENT_H_ -#define _SRC__DRIVERS__NIC__FEC__UPLINK_CLIENT_H_ - -/* NIC driver includes */ -#include - -/* local include */ -#include - -namespace Genode { - - class Uplink_client; -} - - -class Genode::Uplink_client : public Linux_network_session_base, - public Uplink_client_base -{ - private: - - /************************ - ** Uplink_client_base ** - ************************/ - - Transmit_result - _drv_transmit_pkt(const char *conn_rx_pkt_base, - size_t conn_rx_pkt_size) override; - - public: - - Uplink_client(Env &env, - Allocator &alloc, - Session_label const &label); - - - /******************************** - ** Linux_network_session_base ** - ********************************/ - - void link_state(bool state) override; - - void receive(struct sk_buff *skb) override; -}; - -#endif /* _SRC__DRIVERS__NIC__FEC__UPLINK_CLIENT_H_ */ From 01e1e4e5b91084b3bf303f9c4ce45a7f44c85964 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 27 Oct 2022 14:37:42 +0200 Subject: [PATCH 0021/1921] platform_drv: add "leave_operational" attribute If a device should not be reset, powered off, and its clocks shall stay untouched when it gets released, the leave_operational attribute can be set to true in the device node of the related device inside the devices ROM delivered to the platform driver. This is useful for drivers, which only enable and initialize their device, and can be closed afterwards. Ref genodelabs/genode#4654 --- repos/os/src/drivers/platform/device.cc | 41 +++++++++++-------- repos/os/src/drivers/platform/device.h | 4 +- .../drivers/platform/device_model_policy.cc | 3 +- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/repos/os/src/drivers/platform/device.cc b/repos/os/src/drivers/platform/device.cc index 082d0d8a4b..a4a83e0181 100644 --- a/repos/os/src/drivers/platform/device.cc +++ b/repos/os/src/drivers/platform/device.cc @@ -92,25 +92,27 @@ void Driver::Device::release(Session_component & sc) if (!(_owner == sc)) return; - pci_disable(_env, *this); + if (!_leave_operational) { + pci_disable(_env, *this); - _reset_domain_list.for_each([&] (Reset_domain & r) - { - _model.resets().apply(r.name, [&] (Driver::Reset &reset) { - reset.assert(); }); - }); + _reset_domain_list.for_each([&] (Reset_domain & r) + { + _model.resets().apply(r.name, [&] (Driver::Reset &reset) { + reset.assert(); }); + }); - _power_domain_list.for_each([&] (Power_domain & p) - { - _model.powers().apply(p.name, [&] (Driver::Power &power) { - power.off(); }); - }); + _power_domain_list.for_each([&] (Power_domain & p) + { + _model.powers().apply(p.name, [&] (Driver::Power &power) { + power.off(); }); + }); - _clock_list.for_each([&] (Clock & c) - { - _model.clocks().apply(c.name, [&] (Driver::Clock &clock) { - clock.disable(); }); - }); + _clock_list.for_each([&] (Clock & c) + { + _model.clocks().apply(c.name, [&] (Driver::Clock &clock) { + clock.disable(); }); + }); + } _owner = Owner(); sc.update_devices_rom(); @@ -181,8 +183,11 @@ void Driver::Device::generate(Xml_generator & xml, bool info) const } -Driver::Device::Device(Env & env, Device_model & model, Name name, Type type) -: _env(env), _model(model), _name(name), _type(type) { } +Driver::Device::Device(Env & env, Device_model & model, Name name, Type type, + bool leave_operational) +: + _env(env), _model(model), _name(name), _type(type), + _leave_operational(leave_operational) { } Driver::Device::~Device() diff --git a/repos/os/src/drivers/platform/device.h b/repos/os/src/drivers/platform/device.h index 267c1d50f6..029162e1ab 100644 --- a/repos/os/src/drivers/platform/device.h +++ b/repos/os/src/drivers/platform/device.h @@ -210,7 +210,8 @@ class Driver::Device : private List_model::Element Reserved_memory(Range range) : range(range) {} }; - Device(Env & env, Device_model & model, Name name, Type type); + Device(Env & env, Device_model & model, Name name, Type type, + bool leave_operational); virtual ~Device(); Name name() const; @@ -279,6 +280,7 @@ class Driver::Device : private List_model::Element Device_model & _model; Name const _name; Type const _type; + bool const _leave_operational; Owner _owner {}; List_model _io_mem_list {}; List_model _irq_list {}; diff --git a/repos/os/src/drivers/platform/device_model_policy.cc b/repos/os/src/drivers/platform/device_model_policy.cc index 45a04d8321..cb8745395a 100644 --- a/repos/os/src/drivers/platform/device_model_policy.cc +++ b/repos/os/src/drivers/platform/device_model_policy.cc @@ -71,7 +71,8 @@ Device & Device_model::create_element(Genode::Xml_node node) { Device::Name name = node.attribute_value("name", Device::Name()); Device::Type type = node.attribute_value("type", Device::Type()); - return *(new (_heap) Device(_env, *this, name, type)); + bool leave_operational = node.attribute_value("leave_operational", false); + return *(new (_heap) Device(_env, *this, name, type, leave_operational)); } From a670c2a674dec85615968cce5baf32c6a5fd3157 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 28 Oct 2022 09:00:14 +0200 Subject: [PATCH 0022/1921] Download expat from GitHub The tar.gz archive of version 2.4.9 vanished from sourceforge. As the project moves to GitHub currently and the archive of 2.4.9 is still available there, just update the download location. Content and hashes did not change. --- repos/libports/ports/expat.hash | 2 +- repos/libports/ports/expat.port | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/repos/libports/ports/expat.hash b/repos/libports/ports/expat.hash index 18e0f7956f..c53f630f05 100644 --- a/repos/libports/ports/expat.hash +++ b/repos/libports/ports/expat.hash @@ -1 +1 @@ -0670a7b071ea29d0287d5f89c7fba1b852c8a146 +506479a4c858d32e9d2e49fb6436842105539e06 diff --git a/repos/libports/ports/expat.port b/repos/libports/ports/expat.port index 3cd81de14a..75e23c4e44 100644 --- a/repos/libports/ports/expat.port +++ b/repos/libports/ports/expat.port @@ -1,8 +1,9 @@ LICENSE := MIT DOWNLOADS := expat.archive VERSION := 2.4.9 +RELEASE := R_$(subst .,_,$(VERSION)) -URL(expat) := http://sourceforge.net/projects/expat/files/expat/$(VERSION)/expat-$(VERSION).tar.gz +URL(expat) := https://github.com/libexpat/libexpat/releases/download/$(RELEASE)/expat-$(VERSION).tar.gz SHA(expat) := 4415710268555b32c4e5ab06a583bea9fec8ff89333b218b70b43d4ca10e38fa DIR(expat) := src/lib/expat/contrib From d8d9f940751d579ba0df9e86af68dc1bdf8e5a61 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 31 Oct 2022 11:53:13 +0100 Subject: [PATCH 0023/1921] base-sel4: implement clean cache operations This commit uses the seL4_BenchmarkFlushCaches syscall to partly implement cache maintaince for this kernel. Ref genodelabs/genode#4651 --- repos/base-sel4/src/lib/base/arm/cache.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/repos/base-sel4/src/lib/base/arm/cache.cc b/repos/base-sel4/src/lib/base/arm/cache.cc index 331f8b09e3..d6697d1225 100644 --- a/repos/base-sel4/src/lib/base/arm/cache.cc +++ b/repos/base-sel4/src/lib/base/arm/cache.cc @@ -14,15 +14,19 @@ #include #include +/* seL4 includes */ +#include + + void Genode::cache_coherent(Genode::addr_t, Genode::size_t) { - error(__func__, " not implemented for this kernel!"); + seL4_BenchmarkFlushCaches(); } void Genode::cache_clean_invalidate_data(Genode::addr_t, Genode::size_t) { - error(__func__, " not implemented for this kernel!"); + seL4_BenchmarkFlushCaches(); } From 11a6117da648e525f53ca033d6be9f13aa59685c Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 27 Oct 2022 13:47:54 +0200 Subject: [PATCH 0024/1921] genode_c_api: add config update to block interface Ref genodelabs/genode#4653 --- repos/os/include/genode_c_api/block.h | 6 ++++- repos/os/src/lib/genode_c_api/block.cc | 37 +++++++++++++++++++------- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/repos/os/include/genode_c_api/block.h b/repos/os/include/genode_c_api/block.h index b021790074..1354acdc4e 100644 --- a/repos/os/include/genode_c_api/block.h +++ b/repos/os/include/genode_c_api/block.h @@ -21,8 +21,11 @@ struct genode_block_session; /* definition is private to the implementation */ #ifdef __cplusplus + +void genode_block_apply_config(Genode::Xml_node const & config); + extern "C" { -#endif +#endif /* __cplusplus */ /******************** @@ -41,6 +44,7 @@ void genode_block_init(struct genode_env *env, genode_shared_dataspace_free_t); + /************************************** ** Block device lifetime management ** **************************************/ diff --git a/repos/os/src/lib/genode_c_api/block.cc b/repos/os/src/lib/genode_c_api/block.cc index 6f58a11fc6..6957203e27 100644 --- a/repos/os/src/lib/genode_c_api/block.cc +++ b/repos/os/src/lib/genode_c_api/block.cc @@ -11,11 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -#include -#include #include #include #include +#include #include #include @@ -106,12 +105,13 @@ class Root : public Root_component : name(name), info(info) {} }; - Env & _env; - Signal_context_capability _sigh_cap; - Attached_rom_dataspace _config { _env, "config" }; - Reporter _reporter { _env, "block_devices" }; - Constructible _sessions[MAX_BLOCK_DEVICES]; - bool _announced { false }; + Env & _env; + Signal_context_capability _sigh_cap; + Constructible _config { }; + Reporter _reporter { _env, "block_devices" }; + Constructible _sessions[MAX_BLOCK_DEVICES]; + bool _announced { false }; + bool _report_needed { false }; Root(const Root&); Root & operator=(const Root&); @@ -141,6 +141,7 @@ class Root : public Root_component void discontinue_device(const char * name); genode_block_session * session(const char * name); void notify_peers(); + void apply_config(Xml_node const &); }; @@ -235,8 +236,11 @@ genode_block_session::genode_block_session(Env & env, genode_block_session * ::Root::_create_session(const char * args, Affinity const &) { + if (!_config.constructed()) + throw Service_denied(); + Session_label const label = label_from_args(args); - Session_policy const policy(label, _config.xml()); + Session_policy const policy(label, _config->xml()); Session_info::Name const device = policy.attribute_value("device", Session_info::Name()); @@ -283,7 +287,7 @@ void ::Root::_destroy_session(genode_block_session * session) void ::Root::_report() { - if (!_config.xml().attribute_value("report", false)) + if (!_report_needed) return; _reporter.enabled(true); @@ -351,6 +355,13 @@ void ::Root::notify_peers() } +void ::Root::apply_config(Xml_node const & config) +{ + _config.construct(*md_alloc(), config); + _report_needed = config.attribute_value("report", false); +} + + ::Root::Root(Env & env, Allocator & alloc, Signal_context_capability cap) : Root_component(env.ep(), alloc), @@ -423,3 +434,9 @@ extern "C" void genode_block_notify_peers() { if (_block_root) _block_root->notify_peers(); } + + +void genode_block_apply_config(Xml_node const & config) +{ + if (_block_root) _block_root->apply_config(config); +} From 73fec3bdb78b5155c108d7822651053932a9265d Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 26 Oct 2022 17:38:12 +0200 Subject: [PATCH 0025/1921] sculpt: add ROM route to nic_drv's DTB Ref genodelabs/genode#4652 --- repos/gems/run/sculpt.run | 13 +++++++++++-- .../gems/src/app/sculpt_manager/runtime/nic_drv.cc | 1 + 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index 932b267c93..c7540b99fe 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -160,6 +160,15 @@ proc nic_drv { } { } +proc nic_drv_dtb { } { + + if {[have_board imx8q_evk]} { return fec_nic_drv-imx8q_evk.dtb } + if {[have_board mnt_reform2]} { return fec_nic_drv-mnt_reform2.dtb } + + return nic_unavailable +} + + proc log_core_start_node { } { if {[have_board linux]} return @@ -617,7 +626,8 @@ install_config { } [log_route] { - + + @@ -938,7 +948,6 @@ if {[have_board linux]} { copy_file [run_dir]/genode/fs_rom [run_dir]/genode/cached_fs_rom } - # support for the Leitzentrale GUI copy_file [genode_dir]/repos/gems/src/app/backdrop/genode_logo.png [run_dir]/genode/ copy_file [genode_dir]/repos/gems/run/sculpt/drop_shadow.png [run_dir]/genode/ diff --git a/repos/gems/src/app/sculpt_manager/runtime/nic_drv.cc b/repos/gems/src/app/sculpt_manager/runtime/nic_drv.cc index fc9aa960dd..a735f3a548 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/nic_drv.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/nic_drv.cc @@ -35,6 +35,7 @@ void Sculpt::gen_nic_drv_start_content(Xml_generator &xml) xml.attribute("label", "nic"); }); }); gen_parent_rom_route(xml, "nic_drv"); + gen_parent_rom_route(xml, "nic_drv.dtb"); gen_parent_rom_route(xml, "ld.lib.so"); gen_parent_route (xml); gen_parent_route (xml); From cd8538da9a444aa8204b9eb9744a90ecd0811ea3 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 1 Nov 2022 15:16:04 +0100 Subject: [PATCH 0026/1921] qt5: apply pull request, change screen pixel format to RGB32 Fixes #4657 --- repos/libports/ports/qt5.hash | 2 +- repos/libports/ports/qt5.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/libports/ports/qt5.hash b/repos/libports/ports/qt5.hash index 9e579599f1..f8fa9c3c1a 100644 --- a/repos/libports/ports/qt5.hash +++ b/repos/libports/ports/qt5.hash @@ -1 +1 @@ -42324c0a611d86fbfdaf5ded294650807038421e +3ce96283bad58ebc8e19f441381f4b63f60326c8 diff --git a/repos/libports/ports/qt5.port b/repos/libports/ports/qt5.port index 23538678b0..5167856bd6 100644 --- a/repos/libports/ports/qt5.port +++ b/repos/libports/ports/qt5.port @@ -4,5 +4,5 @@ VERSION := 5.15.2 DOWNLOADS := qt5.git URL(qt5) := https://github.com/cproc/qt5.git -REV(qt5) := issue4621 +REV(qt5) := issue4657 DIR(qt5) := src/lib/qt5 From 49b4b8597dc4e0ff5bc3319eb4b8cd1e61bc6f45 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 10 Oct 2022 18:18:01 +0200 Subject: [PATCH 0027/1921] os/pin_driver: support for time-multiplexed in/out This patch equips the pin-driver framework with support for the time-multiplexed operation of a pin as output or input. This is needed when implementing I2C communication via a bit-banging driver. To operate pin in both directions, a driver obtains both a pin-state and a pin-control session for the same pin. The pin-state session can be used to sense the current pin state. The control session allows the client to set the pin to high or low (using the 'state' method), or to set it to high-impedance via the 'yield' method. Once switched to high-impedance, the pin can be used as input. Issue genodelabs/genode-allwinner#10 --- repos/os/include/os/pin_driver.h | 4 +++- .../os/include/pin_control_session/component.h | 17 +++++++++++++++-- .../os/include/pin_control_session/connection.h | 2 ++ .../pin_control_session/pin_control_session.h | 5 ++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/repos/os/include/os/pin_driver.h b/repos/os/include/os/pin_driver.h index 18f470f91c..edefddd807 100644 --- a/repos/os/include/os/pin_driver.h +++ b/repos/os/include/os/pin_driver.h @@ -39,6 +39,8 @@ namespace Pin { { using Pin::Root, Direction::IN>::Root; }; + + enum class Level { LOW, HIGH, HIGH_IMPEDANCE }; } @@ -53,7 +55,7 @@ struct Pin::Driver : Interface /** * Set pin state */ - virtual void pin_state(ID, bool enabled) = 0; + virtual void pin_state(ID, Level) = 0; /** * Return pin ID assigned to the specified session label diff --git a/repos/os/include/pin_control_session/component.h b/repos/os/include/pin_control_session/component.h index d82e90471c..1a52695c50 100644 --- a/repos/os/include/pin_control_session/component.h +++ b/repos/os/include/pin_control_session/component.h @@ -39,6 +39,12 @@ class Pin_control::Session_component : public Session_object using Session_object::label; + void _state(Pin::Level level) + { + if (_assignment.target.constructed()) + _assignment.driver.pin_state(_assignment.target->id, level); + } + public: using Pin_id = ID; @@ -57,8 +63,15 @@ class Pin_control::Session_component : public Session_object */ void state(bool enabled) override { - if (_assignment.target.constructed()) - _assignment.driver.pin_state(_assignment.target->id, enabled); + _state(enabled ? Pin::Level::HIGH : Pin::Level::LOW); + } + + /** + * Pin_control::Session interface + */ + void yield() override + { + _state(Pin::Level::HIGH_IMPEDANCE); } void update_assignment() diff --git a/repos/os/include/pin_control_session/connection.h b/repos/os/include/pin_control_session/connection.h index 3b2bf1782b..0806c2bf08 100644 --- a/repos/os/include/pin_control_session/connection.h +++ b/repos/os/include/pin_control_session/connection.h @@ -35,6 +35,8 @@ struct Pin_control::Connection : private Genode::Connection, { } void state(bool enabled) override { call(enabled); } + + void yield() override { call(); } }; #endif /* _INCLUDE__PIN_CONTROL_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/pin_control_session/pin_control_session.h b/repos/os/include/pin_control_session/pin_control_session.h index 909c55bf22..a222550d7a 100644 --- a/repos/os/include/pin_control_session/pin_control_session.h +++ b/repos/os/include/pin_control_session/pin_control_session.h @@ -40,8 +40,11 @@ struct Pin_control::Session : Genode::Session virtual void state(bool) = 0; + virtual void yield() = 0; + GENODE_RPC(Rpc_state, void, state, bool); - GENODE_RPC_INTERFACE(Rpc_state); + GENODE_RPC(Rpc_yield, void, yield); + GENODE_RPC_INTERFACE(Rpc_state, Rpc_yield); }; #endif /* _INCLUDE__PIN_CONTROL_SESSION__PIN_CONTROL_SESSION_H_ */ From 3b06a274652ee1be6f15e128aa18c00746954719 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 11 Oct 2022 14:34:18 +0200 Subject: [PATCH 0028/1921] sculpt: add pin_session and pin_control resources --- repos/gems/recipes/src/sculpt_manager/used_apis | 2 ++ repos/gems/run/sculpt.run | 4 ++++ repos/gems/src/app/sculpt_manager/main.cc | 4 ++++ repos/gems/src/app/sculpt_manager/model/route.h | 4 ++++ repos/gems/src/app/sculpt_manager/model/runtime_config.h | 2 ++ repos/gems/src/app/sculpt_manager/model/service.h | 4 +++- 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/repos/gems/recipes/src/sculpt_manager/used_apis b/repos/gems/recipes/src/sculpt_manager/used_apis index e7262d88d2..274e0f2552 100644 --- a/repos/gems/recipes/src/sculpt_manager/used_apis +++ b/repos/gems/recipes/src/sculpt_manager/used_apis @@ -16,3 +16,5 @@ input_session event_session capture_session gpu_session +pin_state_session +pin_control_session diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index c7540b99fe..d2b3543263 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -414,6 +414,8 @@ install_config { + + @@ -632,6 +634,8 @@ install_config { + + diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index cd5a9785e5..03dce96546 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -24,6 +24,8 @@ #include #include #include +#include +#include /* included from depot_deploy tool */ #include @@ -1843,6 +1845,8 @@ void Sculpt::Main::_generate_runtime_config(Xml_generator &xml) const gen_parent_service(xml); gen_parent_service(xml); gen_parent_service(xml); + gen_parent_service(xml); + gen_parent_service(xml); }); xml.node("affinity-space", [&] () { diff --git a/repos/gems/src/app/sculpt_manager/model/route.h b/repos/gems/src/app/sculpt_manager/model/route.h index 7f0ce21dd1..396fc6e22b 100644 --- a/repos/gems/src/app/sculpt_manager/model/route.h +++ b/repos/gems/src/app/sculpt_manager/model/route.h @@ -49,6 +49,8 @@ struct Sculpt::Route : List_model::Element case Service::Type::USB: return "usb"; case Service::Type::RTC: return "rtc"; case Service::Type::PLATFORM: return "platform"; + case Service::Type::PIN_STATE: return "pin_state"; + case Service::Type::PIN_CONTROL: return "pin_control"; case Service::Type::VM: return "vm"; case Service::Type::PD: return "pd"; case Service::Type::UNDEFINED: break; @@ -80,6 +82,8 @@ struct Sculpt::Route : List_model::Element case Service::Type::USB: return "USB"; case Service::Type::RTC: return "Real-time clock"; case Service::Type::PLATFORM: return "Device access"; + case Service::Type::PIN_STATE: return "GPIO pin state"; + case Service::Type::PIN_CONTROL: return "GPIO pin control"; case Service::Type::VM: return "Hardware-based virtualization"; case Service::Type::PD: return "Protection domain"; case Service::Type::UNDEFINED: break; diff --git a/repos/gems/src/app/sculpt_manager/model/runtime_config.h b/repos/gems/src/app/sculpt_manager/model/runtime_config.h index c9eac86b36..fcb1a494da 100644 --- a/repos/gems/src/app/sculpt_manager/model/runtime_config.h +++ b/repos/gems/src/app/sculpt_manager/model/runtime_config.h @@ -356,6 +356,8 @@ class Sculpt::Runtime_config _pci_audio { _r, Type::PLATFORM, "audio hardware", "audio" }, _pci_acpi { _r, Type::PLATFORM, "ACPI", "acpica" }, _hw_gpu { _r, Type::PLATFORM, "GPU hardware", "gpu" }, + _pin_state { _r, Type::PIN_STATE, "GPIO pin state" }, + _pin_ctrl { _r, Type::PIN_CONTROL, "GPIO pin control" }, _trace { _r, Type::TRACE, "system-global tracing" }, _vm { _r, Type::VM, "virtualization hardware" }, _pd { _r, Type::PD, "system PD service" }; diff --git a/repos/gems/src/app/sculpt_manager/model/service.h b/repos/gems/src/app/sculpt_manager/model/service.h index 9714498091..c7a19af4b1 100644 --- a/repos/gems/src/app/sculpt_manager/model/service.h +++ b/repos/gems/src/app/sculpt_manager/model/service.h @@ -27,7 +27,7 @@ struct Sculpt::Service enum class Type { AUDIO_IN, AUDIO_OUT, BLOCK, EVENT, CAPTURE, FILE_SYSTEM, NIC, GUI, GPU, RM, IO_MEM, IO_PORT, IRQ, REPORT, ROM, TERMINAL, TRACE, USB, RTC, - PLATFORM, VM, PD, UPLINK, UNDEFINED }; + PLATFORM, PIN_STATE, PIN_CONTROL, VM, PD, UPLINK, UNDEFINED }; enum class Match_label { EXACT, LAST }; @@ -64,6 +64,8 @@ struct Sculpt::Service case Type::USB: return "Usb"; case Type::RTC: return "Rtc"; case Type::PLATFORM: return "Platform"; + case Type::PIN_STATE: return "Pin_state"; + case Type::PIN_CONTROL: return "Pin_control"; case Type::VM: return "VM"; case Type::PD: return "PD"; case Type::UNDEFINED: break; From bb067f529bf5634104d59039a86997d84d6f9bf9 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 2 Nov 2022 10:35:04 +0100 Subject: [PATCH 0029/1921] sculpt_manager: relax nic_drv policy label When using the newer genode_c_api uplink library, an uplink connection uses the device name as label, which enables integrators to use different policies resp. routes for different devices driven by one driver. The nic_drv policy of the nic_roouter configuration generated by the sculpt_manager however uses an empty label like: "nic_drv -> ". This is the way how existent NIC drivers, like ipxe_nic_drv requested their uplink session. To support both driver variants this commit relaxes the policy by checking for a prefix only. Ref genodelabs/genode#4660 --- repos/gems/src/app/sculpt_manager/network.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/src/app/sculpt_manager/network.cc b/repos/gems/src/app/sculpt_manager/network.cc index b386fad5a9..212b05eab5 100644 --- a/repos/gems/src/app/sculpt_manager/network.cc +++ b/repos/gems/src/app/sculpt_manager/network.cc @@ -19,7 +19,7 @@ void Sculpt::Network::_generate_nic_router_uplink(Xml_generator &xml, char const *label) { xml.node("policy", [&] () { - xml.attribute("label", label); + xml.attribute("label_prefix", label); xml.attribute("domain", "uplink"); }); gen_named_node(xml, "domain", "uplink", [&] () { From 5df68922ebd877ce66880f79dd421d39ce80039c Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 1 Nov 2022 13:50:21 +0100 Subject: [PATCH 0030/1921] linux/pc: enable IOMMU config for intel fb to apply scanout scratch page GTT workaround drivers/gpu/drm/i915/gt/intel_ggtt.c -> gen8_gmch_probe() -> intel_scanout_needs_vtd_wa(i915) Fixes #4659 --- .../drivers/framebuffer/intel/pc/dummies.c | 13 +++++++++++ .../drivers/framebuffer/intel/pc/lx_emul.c | 13 ++++++++++- repos/pc/src/drivers/usb_host/pc/dep.list | 1 + repos/pc/src/drivers/usb_host/pc/lx_emul.c | 23 +++++++++++++++++++ repos/pc/src/lib/wifi/dummies.c | 15 ++++++++++++ repos/pc/src/pc_linux/target.inc | 5 +++- 6 files changed, 68 insertions(+), 2 deletions(-) diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/dummies.c b/repos/pc/src/drivers/framebuffer/intel/pc/dummies.c index 2dcdda40a9..6a0a341cb9 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/dummies.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/dummies.c @@ -577,3 +577,16 @@ int pci_bus_write_config_byte(struct pci_bus *bus, unsigned int devfn, { lx_emul_trace_and_stop(__func__); } + + +int pci_enable_msi(struct pci_dev *dev) +{ + lx_emul_trace(__func__); + return -ENOSYS; +} + + +void pci_disable_msi(struct pci_dev *dev) +{ + lx_emul_trace(__func__); +} diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c index 56b6b89c96..e24a50d9d6 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -31,7 +32,8 @@ struct dma_fence_ops const i915_fence_ops; pteval_t __default_kernel_pte_mask __read_mostly = ~0; -int acpi_disabled = 0; +int acpi_disabled = 0; +int intel_iommu_gfx_mapped = 0; void intel_wopcm_init_early(struct intel_wopcm * wopcm) @@ -217,6 +219,15 @@ void intel_gt_init_early(struct intel_gt * gt, struct drm_i915_private * i915) /* disable panel self refresh (required for FUJITSU S937/S938) */ i915->params.enable_psr = 0; + + /* + * Tells driver that IOMMU, e.g. VT-d, is on, so that scratch page + * workaround is applied by Intel display driver: + * + * drivers/gpu/drm/i915/gt/intel_ggtt.c + * -> gen8_gmch_probe() -> intel_scanout_needs_vtd_wa(i915) + */ + intel_iommu_gfx_mapped = 1; } diff --git a/repos/pc/src/drivers/usb_host/pc/dep.list b/repos/pc/src/drivers/usb_host/pc/dep.list index d673f89f82..6cb87aca5e 100644 --- a/repos/pc/src/drivers/usb_host/pc/dep.list +++ b/repos/pc/src/drivers/usb_host/pc/dep.list @@ -29,6 +29,7 @@ drivers/usb/host/xhci-ext-caps.h drivers/usb/host/xhci-pci.h drivers/usb/host/xhci-trace.h drivers/usb/host/xhci.h +include/asm-generic/dma-mapping.h include/asm-generic/export.h include/linux/bcd.h include/linux/extcon.h diff --git a/repos/pc/src/drivers/usb_host/pc/lx_emul.c b/repos/pc/src/drivers/usb_host/pc/lx_emul.c index 63c49b4c63..3471080d94 100644 --- a/repos/pc/src/drivers/usb_host/pc/lx_emul.c +++ b/repos/pc/src/drivers/usb_host/pc/lx_emul.c @@ -85,3 +85,26 @@ int pci_write_config_word(const struct pci_dev * dev,int where,u16 val) } lx_emul_trace_and_stop(__func__); } + + +int pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs, + unsigned int max_vecs, unsigned int flags, + struct irq_affinity *aff_desc) +{ + if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1 && dev->irq) + return 1; + return -ENOSPC; +} + + +int pci_irq_vector(struct pci_dev *dev, unsigned int nr) +{ + if (WARN_ON_ONCE(nr > 0)) + return -EINVAL; + return dev->irq; +} + + +void pci_free_irq_vectors(struct pci_dev *dev) +{ +} diff --git a/repos/pc/src/lib/wifi/dummies.c b/repos/pc/src/lib/wifi/dummies.c index c77659d25d..5edfb9da31 100644 --- a/repos/pc/src/lib/wifi/dummies.c +++ b/repos/pc/src/lib/wifi/dummies.c @@ -339,3 +339,18 @@ void synchronize_rcu_expedited(void) { lx_emul_trace(__func__); } + + +int pci_enable_msi(struct pci_dev *dev) +{ + lx_emul_trace(__func__); + return -ENOSYS; +} + + +int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, + int minvec, int maxvec) +{ + lx_emul_trace(__func__); + return -ENOSYS; +} diff --git a/repos/pc/src/pc_linux/target.inc b/repos/pc/src/pc_linux/target.inc index ea452d107f..f282ab6646 100644 --- a/repos/pc/src/pc_linux/target.inc +++ b/repos/pc/src/pc_linux/target.inc @@ -15,7 +15,10 @@ LX_ENABLE += BINFMT_ELF BINFMT_SCRIPT BLK_DEV_INITRD LX_ENABLE += SERIAL_8250 SERIAL_8250_CONSOLE # PCI support -LX_ENABLE += PCI +LX_ENABLE += PCI PCI_MSI + +# IOMMU support (used by Intel fb to apply scanout scratch page workaround) +LX_ENABLE += IOMMU_SUPPORT INTEL_IOMMU # ACPI support LX_ENABLE += ACPI From 72217a6771a3a1401743194d9d9430e65f6b3a0a Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 2 Nov 2022 16:00:57 +0100 Subject: [PATCH 0031/1921] intel_fb: support larger resolutions Increase "assumed" internal kernel memory size based on available memory to support allocation of framebuffer larger than 16M, which was before hardcoded. Issue #4659 --- repos/pc/run/intel_fb.run | 4 ++-- repos/pc/src/drivers/framebuffer/intel/pc/emul.cc | 6 ++++++ repos/pc/src/drivers/framebuffer/intel/pc/gem.c | 13 +++++++++---- repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c | 8 +++----- repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h | 2 ++ 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/repos/pc/run/intel_fb.run b/repos/pc/run/intel_fb.run index 4689dc1d61..7a9f58f57b 100644 --- a/repos/pc/run/intel_fb.run +++ b/repos/pc/run/intel_fb.run @@ -216,7 +216,7 @@ append config { append_if $use_gpu config { - + @@ -241,7 +241,7 @@ append_if $use_gpu config { append config { - + } append_if $use_gpu config { diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/emul.cc b/repos/pc/src/drivers/framebuffer/intel/pc/emul.cc index 0baedcea44..76d1084a91 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/emul.cc +++ b/repos/pc/src/drivers/framebuffer/intel/pc/emul.cc @@ -48,3 +48,9 @@ unsigned short emul_intel_gmch_control_reg() return ret; } + + +unsigned long long emul_avail_ram() +{ + return Lx_kit::env().env.pd().avail_ram().value; +} diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/gem.c b/repos/pc/src/drivers/framebuffer/intel/pc/gem.c index 7e7ad9646d..5729c9bf8a 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/gem.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/gem.c @@ -333,9 +333,6 @@ void i915_gem_driver_register(struct drm_i915_private * i915) void i915_gem_init_early(struct drm_i915_private *dev_priv) { - /* 4 * 4M XXX */ - unsigned const ram_pages = 4 * 1024; - i915_gem_init__mm(dev_priv); /* i915_gem_init__contexts(dev_priv); @@ -345,7 +342,15 @@ void i915_gem_init_early(struct drm_i915_private *dev_priv) spin_lock_init(&dev_priv->fb_tracking.lock); - totalram_pages_add(ram_pages); + /* + * Used by resource_size() check in shmem_get_pages in + * drivers/gpu/drm/i915/gem/i915_gem_shmem.c and initialized in + * i915_gem_shmem_setup() using totalram_pages() + * + * The memory is managed by Genode, so we have just to provide a + * value which is "big" enough truncated by the max available memory. + */ + totalram_pages_add(emul_avail_ram() / 4096); } diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c index e24a50d9d6..aaf96dafde 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c @@ -44,13 +44,9 @@ void intel_wopcm_init_early(struct intel_wopcm * wopcm) void si_meminfo(struct sysinfo * val) { - /* 4M, ttm actually use only half - more or configurable XXX ? */ - unsigned const ram_pages = 1024; + unsigned long long const ram_pages = emul_avail_ram() / PAGE_SIZE; /* used by drivers/gpu/drm/ttm/ttm_device.c */ - - lx_emul_trace(__func__); - val->totalram = ram_pages; val->sharedram = 0; val->freeram = ram_pages; @@ -58,6 +54,8 @@ void si_meminfo(struct sysinfo * val) val->totalhigh = 0; val->freehigh = 0; val->mem_unit = PAGE_SIZE; + + lx_emul_trace(__func__); } diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h index aa6eb2c74e..7956705a14 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h @@ -38,6 +38,8 @@ unsigned short emul_intel_gmch_control_reg(void); enum { OPREGION_PSEUDO_PHYS_ADDR = 0xffffefff }; +unsigned long long emul_avail_ram(void); + #ifdef __cplusplus } #endif From eb318d5ceba8b9627c10c7d0bc618b98820a407a Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 2 Nov 2022 16:02:43 +0100 Subject: [PATCH 0032/1921] intel_fb: handle too large framebuffer allocation In case the allocation fails for the largest possible connector mode, try smaller modes. Additional add option to specify maximal resolution. Issue #4659 --- repos/pc/run/intel_fb.run | 16 +++- .../src/drivers/framebuffer/intel/pc/README | 5 ++ .../src/drivers/framebuffer/intel/pc/emul.cc | 3 + .../pc/src/drivers/framebuffer/intel/pc/gem.c | 10 +++ .../framebuffer/intel/pc/generated_dummies.c | 8 -- .../drivers/framebuffer/intel/pc/lx_emul.c | 32 ++++++++ .../drivers/framebuffer/intel/pc/lx_emul.h | 1 + .../drivers/framebuffer/intel/pc/lx_i915.h | 2 + .../drivers/framebuffer/intel/pc/lx_user.c | 80 +++++++++++++++++-- .../src/drivers/framebuffer/intel/pc/main.cc | 7 ++ 10 files changed, 145 insertions(+), 19 deletions(-) diff --git a/repos/pc/run/intel_fb.run b/repos/pc/run/intel_fb.run index 7a9f58f57b..378910389e 100644 --- a/repos/pc/run/intel_fb.run +++ b/repos/pc/run/intel_fb.run @@ -16,6 +16,12 @@ if {[get_cmd_switch --autopilot] && [have_board linux]} { set use_gpu 1 set use_top 0 +set use_fb_controller 0 +if {$use_fb_controller} { + set apply_on_hotplug "no" +} else { + set apply_on_hotplug "yes" +} set build_components { core init timer @@ -193,7 +199,7 @@ append config { - + @@ -253,11 +259,12 @@ append config { - + } +append_if $use_fb_controller { - + @@ -265,8 +272,9 @@ append config { - + } +append config { diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/README b/repos/pc/src/drivers/framebuffer/intel/pc/README index cad8de7123..bb951c161a 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/README +++ b/repos/pc/src/drivers/framebuffer/intel/pc/README @@ -39,6 +39,11 @@ about the change in resolution. The brightness value is in percent and takes effect only if supported by the hardware. +The maximal physical resolution can be enforced by: + +! +! + The virtual resolution can be enforced by: ! diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/emul.cc b/repos/pc/src/drivers/framebuffer/intel/pc/emul.cc index 76d1084a91..9b0623395f 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/emul.cc +++ b/repos/pc/src/drivers/framebuffer/intel/pc/emul.cc @@ -20,6 +20,9 @@ void *emul_alloc_shmem_file_buffer(unsigned long size) { + if (!size) + return nullptr; + auto &buffer = Lx_kit::env().memory.alloc_buffer(size); return reinterpret_cast(buffer.virt_addr()); } diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/gem.c b/repos/pc/src/drivers/framebuffer/intel/pc/gem.c index 5729c9bf8a..eb63762d1b 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/gem.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/gem.c @@ -246,6 +246,16 @@ int i915_gem_init(struct drm_i915_private *dev_priv) { int ret; + /* request & enforce max resolution if smaller than hardware limits */ + struct genode_mode dummy_mode = { }; + lx_emul_i915_connector_config("dummy", &dummy_mode); + if (dummy_mode.max_width && dummy_mode.max_height) { + if (dev_priv->drm.mode_config.max_width > dummy_mode.max_width) + dev_priv->drm.mode_config.max_width = dummy_mode.max_width; + if (dev_priv->drm.mode_config.max_height > dummy_mode.max_height) + dev_priv->drm.mode_config.max_height = dummy_mode.max_height; + } + /* We need to fallback to 4K pages if host doesn't support huge gtt. */ /* if (intel_vgpu_active(dev_priv) && !intel_vgpu_has_huge_gtt(dev_priv)) diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c b/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c index 3b7ca3eadb..cdd1581a77 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c @@ -521,14 +521,6 @@ bool file_ns_capable(const struct file * file,struct user_namespace * ns,int cap } -#include - -void fput(struct file * file) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void framebuffer_release(struct fb_info * info) diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c index aaf96dafde..cdfe99fa75 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.c @@ -108,6 +108,9 @@ struct file *shmem_file_setup(char const *name, loff_t size, struct shmem_file_buffer *private_data; loff_t const nrpages = (size / PAGE_SIZE) + ((size % (PAGE_SIZE)) ? 1 : 0); + if (!size) + return (struct file*)ERR_PTR(-EINVAL); + f = kzalloc(sizeof (struct file), 0); if (!f) { return (struct file*)ERR_PTR(-ENOMEM); @@ -165,6 +168,35 @@ err_inode: } +static void _free_file(struct file *file) +{ + struct inode *inode; + struct address_space *mapping; + struct shmem_file_buffer *private_data; + + mapping = file->f_mapping; + inode = file->f_inode; + private_data = mapping->private_data; + + lx_emul_forget_pages(private_data->addr, mapping->nrpages << 12); + emul_free_shmem_file_buffer(private_data->addr); + + kfree(private_data); + kfree(mapping); + kfree(inode); + kfree(file->f_path.dentry); + kfree(file); +} + + +void fput(struct file *file) +{ + if (atomic_long_sub_and_test(1, &file->f_count)) { + _free_file(file); + } +} + + struct page *shmem_read_mapping_page_gfp(struct address_space *mapping, pgoff_t index, gfp_t gfp) { diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h index 7956705a14..a8be1f2e07 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h @@ -29,6 +29,7 @@ struct dma_fence_work_ops; void lx_emul_time_udelay(unsigned long usec); void *emul_alloc_shmem_file_buffer(unsigned long); +void emul_free_shmem_file_buffer(void *); void * intel_io_mem_map(unsigned long offset, unsigned long size); diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_i915.h b/repos/pc/src/drivers/framebuffer/intel/pc/lx_i915.h index 0c3fe858d2..1eef0726a3 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_i915.h +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_i915.h @@ -17,6 +17,8 @@ struct genode_mode { unsigned width; unsigned height; + unsigned max_width; + unsigned max_height; unsigned hz; unsigned brightness; unsigned enabled; diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_user.c b/repos/pc/src/drivers/framebuffer/intel/pc/lx_user.c index ab8864a6a5..bbd7fdf984 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_user.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_user.c @@ -36,7 +36,7 @@ static struct drm_fb_helper * i915_fb(void) { return &i915->fbdev->helper; } /* * Heuristic to calculate max resolution across all connectors */ -static void preferred_mode(struct drm_display_mode *prefer) +static void preferred_mode(struct drm_display_mode *prefer, uint64_t smaller_as) { struct drm_connector *connector = NULL; struct drm_display_mode *mode = NULL; @@ -68,6 +68,15 @@ static void preferred_mode(struct drm_display_mode *prefer) } } + /* maximal resolution enforcement */ + if (conf_mode.max_width && conf_mode.max_height) { + if (conf_mode.max_width * conf_mode.height < smaller_as) + smaller_as = conf_mode.max_width * conf_mode.max_height + 1; + + if (conf_mode.max_width * conf_mode.height < prefer->hdisplay * prefer->vdisplay) + continue; + } + if (!conf_mode.width || !conf_mode.height) continue; @@ -78,7 +87,13 @@ static void preferred_mode(struct drm_display_mode *prefer) } drm_connector_list_iter_end(&conn_iter); - /* if nothing was configured by Genode's config, apply heuristic */ + /* too large check */ + if (smaller_as <= (uint64_t)prefer->hdisplay * prefer->vdisplay) { + prefer->hdisplay = 0; + prefer->vdisplay = 0; + } + + /* if too large or nothing configured by Genode's config */ if (!prefer->hdisplay || !prefer->vdisplay) { drm_connector_list_iter_begin(i915_fb()->dev, &conn_iter); drm_client_for_each_connector_iter(connector, &conn_iter) { @@ -86,6 +101,9 @@ static void preferred_mode(struct drm_display_mode *prefer) if (!mode) continue; + if (smaller_as <= (uint64_t)mode->hdisplay * mode->vdisplay) + continue; + if (mode->hdisplay * mode->vdisplay > prefer->hdisplay * prefer->vdisplay) { prefer->hdisplay = mode->hdisplay; prefer->vdisplay = mode->vdisplay; @@ -134,6 +152,9 @@ static unsigned get_brightness(struct drm_connector * const connector, static bool reconfigure(void * data) { + static uint64_t width_smaller_as = 100000; + static uint64_t height_smaller_as = 100000; + struct drm_display_mode *mode = NULL; struct drm_display_mode mode_preferred = {}; struct drm_mode_set *mode_set = NULL; @@ -147,7 +168,7 @@ static bool reconfigure(void * data) BUG_ON(!i915_fb()->funcs); BUG_ON(!i915_fb()->funcs->fb_probe); - preferred_mode(&mode_preferred); + preferred_mode(&mode_preferred, width_smaller_as * height_smaller_as); if (mode_preferred.hdisplay && mode_preferred.vdisplay) { unsigned err = 0; @@ -161,10 +182,44 @@ static bool reconfigure(void * data) sizes.surface_height = sizes.fb_height; err = (*i915_fb()->funcs->fb_probe)(i915_fb(), &sizes); - /* i915_fb()->fb contains adjusted drm_frambuffer object */ + /* i915_fb()->fb contains adjusted drm_framebuffer object */ - if (err || !i915_fb()->fbdev) - printk("setting up framebuffer failed - error=%d\n", err); + if (err || !i915_fb()->fbdev) { + printk("setting up framebuffer of %ux%u failed - error=%d\n", + mode_preferred.hdisplay, mode_preferred.vdisplay, err); + + if (err == -ENOMEM) { + /* + * roll back code for intelfb_create() in + * drivers/gpu/drm/i915/display/intel_fbdev.c: + * + * vma = intel_pin_and_fence_fb_obj(&ifbdev->fb->base, false, + * &view, false, &flags); + * if (IS_ERR(vma)) { + * + * If the partial allocation is not reverted, the next + * i915_fb()->funcs->fb_probe (which calls intelfb_create) + * will try the old resolution, which failed and fails again, + * instead of using the new smaller resolution. + */ + struct intel_fbdev *ifbdev = + container_of(i915_fb(), struct intel_fbdev, helper); + + if (ifbdev && ifbdev->fb) { + drm_framebuffer_put(&ifbdev->fb->base); + ifbdev->fb = NULL; + } + + width_smaller_as = mode_preferred.hdisplay; + height_smaller_as = mode_preferred.vdisplay; + + retry = true; + return retry; + } + } else { + width_smaller_as = 100000; + height_smaller_as = 100000; + } } if (!i915_fb()->fb) @@ -203,6 +258,11 @@ static bool reconfigure(void * data) if (!mode) continue; + /* allocated framebuffer smaller than mode can't be used */ + if (report_fb_info.var.xres * report_fb_info.var.yres < + mode->vdisplay * mode->hdisplay) + continue; + /* use mode id if configured and matches exactly */ if (conf_mode.id) { if (conf_mode.id != mode_id) @@ -248,7 +308,13 @@ static bool reconfigure(void * data) /* no matching mode ? */ if (!mode_match) { - /* use first mode */ + + /* allocated framebuffer smaller than mode can't be used */ + if (report_fb_info.var.xres * report_fb_info.var.yres < + mode->vdisplay * mode->hdisplay) + continue; + + /* use first smaller mode */ mode_match = mode; if (conf_mode.enabled) diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/main.cc b/repos/pc/src/drivers/framebuffer/intel/pc/main.cc index 3bbc4f0482..154a925269 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/main.cc +++ b/repos/pc/src/drivers/framebuffer/intel/pc/main.cc @@ -192,6 +192,8 @@ void Framebuffer::Driver::lookup_config(char const * const name, unsigned force_width = config.xml().attribute_value("force_width", 0u); unsigned force_height = config.xml().attribute_value("force_height", 0u); + unsigned max_width = config.xml().attribute_value("max_width", 0u); + unsigned max_height = config.xml().attribute_value("max_height", 0u); /* iterate independently of force* ever to get brightness and hz */ config.xml().for_each_sub_node("connector", [&] (Xml_node &node) { @@ -220,6 +222,11 @@ void Framebuffer::Driver::lookup_config(char const * const name, mode.height = force_height; mode.id = 0; } + + if (max_width && max_height) { + mode.max_width = max_width; + mode.max_height = max_height; + } } From 95ee0f58f2f78fedadd903995b89623089fcc62e Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 2 Nov 2022 15:58:46 +0100 Subject: [PATCH 0033/1921] sculpt: enforce max width/height by configuration Issue #4659 --- repos/gems/sculpt/fb_drv/default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/sculpt/fb_drv/default b/repos/gems/sculpt/fb_drv/default index d93fa209a7..88a3019609 100644 --- a/repos/gems/sculpt/fb_drv/default +++ b/repos/gems/sculpt/fb_drv/default @@ -1,4 +1,4 @@ - + From 85f98d703870c6ccccc82d8a42bfb46fe071be3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Fri, 29 Jul 2022 16:51:52 +0200 Subject: [PATCH 0034/1921] dde_linux: provide __phys_to_pfn for arm64 This macro is needed by the 'pinephone_camera_drv' driver port. Fixes #4625. --- .../lx_emul/shadow/arch/arm64/include/asm/memory.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/memory.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/memory.h index f0d24e2d05..5d5aadde9a 100644 --- a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/memory.h +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/memory.h @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -61,4 +62,16 @@ static inline struct page *virt_to_page(void const *v) { return lx_emul_virt_to_ #endif /* __ASSEMBLY__ */ +/* + * Normally included from and + * implemented via PHYS_PFN() + */ +#define __phys_to_pfn(paddr) PHYS_PFN(paddr) + +/* + * Normally included from and + * implemented via PFN_PHYS() + */ +#define __pfn_to_phys(pfn) PFN_PHYS(pfn) + #endif /* __ASM_MEMORY_H */ From b03059b933b5677327c6f4cb7fa113b637bdfa2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 4 Aug 2022 11:12:04 +0200 Subject: [PATCH 0035/1921] dde_linux: allow GPIO state access To complement the GPIO support allow for setting and reading input pins. So far this is needed by drivers that attempt to perform I2C bit-banging via GPIO pins. Fixes #4624. --- repos/dde_linux/src/include/lx_emul/pin.h | 7 +++++ repos/dde_linux/src/lib/lx_emul/pin.cc | 35 +++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/repos/dde_linux/src/include/lx_emul/pin.h b/repos/dde_linux/src/include/lx_emul/pin.h index 74bb5dbb43..f5d554f66e 100644 --- a/repos/dde_linux/src/include/lx_emul/pin.h +++ b/repos/dde_linux/src/include/lx_emul/pin.h @@ -25,6 +25,13 @@ extern "C" { */ void lx_emul_pin_control(char const *pin_name, bool enabled); +/** + * Get input state of GPIO pin + * + * \pin_name GPIO name used as label for corresponding 'Pin_state' session + */ +int lx_emul_pin_sense(char const *pin_name); + /** * Request interrupt backed by an IRQ session */ diff --git a/repos/dde_linux/src/lib/lx_emul/pin.cc b/repos/dde_linux/src/lib/lx_emul/pin.cc index 7fb683dbfd..2a78f67975 100644 --- a/repos/dde_linux/src/lib/lx_emul/pin.cc +++ b/repos/dde_linux/src/lib/lx_emul/pin.cc @@ -14,6 +14,7 @@ /* Genode includes */ #include #include +#include #include #include @@ -75,10 +76,13 @@ namespace { Name const name; Constructible _control { }; + Constructible _state { }; Constructible _irq { }; Io_signal_handler _irq_handler { _env.ep(), *this, &Pin::_handle_irq }; + enum class Direction { IN, OUT } _direction { Direction::IN }; + void _handle_irq() { _pin_irq_handler.handle_pin_irq(_irq_info); @@ -100,6 +104,25 @@ namespace { _control.construct(_env, name.string()); _control->state(enabled); + _direction = Direction::OUT; + } + + bool sense() + { + if (_irq.constructed()) { + error("attempt to drive interrupt pin ", name, " as input"); + return false; + } + + if (_control.constructed() && (_direction == Direction::OUT)) { + _control->yield(); + _direction = Direction::IN; + } + + if (!_state.constructed()) + _state.construct(_env, name.string()); + + return _state->state(); } void associate_with_gic_and_unmask_irq(Irq_info irq_info) @@ -200,6 +223,18 @@ extern "C" void lx_emul_pin_control(char const *pin_name, bool enabled) } +extern "C" void lx_emul_backtrace(void); + + +extern "C" int lx_emul_pin_sense(char const *pin_name) +{ + bool result = false; + pins().with_pin(pin_name, [&] (Pin &pin) { + result = pin.sense(); }); + return result; +} + + extern "C" void lx_emul_pin_irq_unmask(unsigned gic_irq, unsigned pin_irq, char const *pin_name) { From 3082950e744aca57f8e28381148e1792485ecbf9 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 2 Nov 2022 11:17:51 +0100 Subject: [PATCH 0036/1921] usb_session: align USB packet allocation correctly To prevent caching side-effects of USB DMA memory taken from the packet stream all allocations of USB packets need to be on separated cachelines at least. Fix genodelabs/genode#4655 --- repos/dde_linux/src/drivers/usb_modem/driver.h | 2 +- repos/dde_linux/src/drivers/usb_net/driver.h | 2 +- repos/dde_linux/src/include/legacy/lx_kit/usb.h | 2 +- repos/libports/src/lib/libusb/genode_usb_raw.cc | 10 +++++----- repos/libports/src/lib/qemu-usb/host.cc | 2 +- repos/os/include/usb/packet_handler.h | 2 +- repos/os/include/usb_session/client.h | 14 ++++++++++++++ 7 files changed, 24 insertions(+), 10 deletions(-) diff --git a/repos/dde_linux/src/drivers/usb_modem/driver.h b/repos/dde_linux/src/drivers/usb_modem/driver.h index 97e5f3797b..68f47c73b1 100644 --- a/repos/dde_linux/src/drivers/usb_modem/driver.h +++ b/repos/dde_linux/src/drivers/usb_modem/driver.h @@ -105,7 +105,7 @@ struct Driver private: Usb::Session_client & _usb; - Usb::Packet_descriptor _packet { _usb.source()->alloc_packet(0) }; + Usb::Packet_descriptor _packet { _usb.alloc_packet(0) }; completion _comp; public: diff --git a/repos/dde_linux/src/drivers/usb_net/driver.h b/repos/dde_linux/src/drivers/usb_net/driver.h index e1e265c8e6..3afb931fb7 100644 --- a/repos/dde_linux/src/drivers/usb_net/driver.h +++ b/repos/dde_linux/src/drivers/usb_net/driver.h @@ -103,7 +103,7 @@ struct Driver private: Usb::Session_client & _usb; - Usb::Packet_descriptor _packet { _usb.source()->alloc_packet(0) }; + Usb::Packet_descriptor _packet { _usb.alloc_packet(0) }; completion _comp; public: diff --git a/repos/dde_linux/src/include/legacy/lx_kit/usb.h b/repos/dde_linux/src/include/legacy/lx_kit/usb.h index 6d503b0efe..00d80aec68 100644 --- a/repos/dde_linux/src/include/legacy/lx_kit/usb.h +++ b/repos/dde_linux/src/include/legacy/lx_kit/usb.h @@ -26,7 +26,7 @@ class Urb : public Usb::Completion Usb::Session_client & _usb; urb & _urb; Usb::Packet_descriptor _packet { - _usb.source()->alloc_packet(_urb.transfer_buffer_length) }; + _usb.alloc_packet(_urb.transfer_buffer_length) }; bool _completed { false }; public: diff --git a/repos/libports/src/lib/libusb/genode_usb_raw.cc b/repos/libports/src/lib/libusb/genode_usb_raw.cc index a861e82e7b..a46a37897b 100644 --- a/repos/libports/src/lib/libusb/genode_usb_raw.cc +++ b/repos/libports/src/lib/libusb/genode_usb_raw.cc @@ -80,7 +80,7 @@ struct Usb_device raw_config_descriptor = (char*)malloc(config_descriptor.total_length); Usb::Packet_descriptor p = - usb_connection->source()->alloc_packet(config_descriptor.total_length); + usb_connection->alloc_packet(config_descriptor.total_length); p.type = Usb::Packet_descriptor::CTRL; p.control.request = LIBUSB_REQUEST_GET_DESCRIPTOR; @@ -121,7 +121,7 @@ struct Usb_device return false; Usb::Packet_descriptor p = - usb_connection->source()->alloc_packet(0); + usb_connection->alloc_packet(0); p.type = Usb::Packet_descriptor::ALT_SETTING; p.interface.number = number; @@ -521,7 +521,7 @@ static int genode_submit_transfer(struct usbi_transfer * itransfer) Usb::Packet_descriptor p; try { - p = usb_device->usb_connection->source()->alloc_packet(setup->wLength); + p = usb_device->usb_connection->alloc_packet(setup->wLength); } catch (Usb::Session::Tx::Source::Packet_alloc_failed) { return LIBUSB_ERROR_BUSY; } @@ -565,7 +565,7 @@ static int genode_submit_transfer(struct usbi_transfer * itransfer) Usb::Packet_descriptor p; try { - p = usb_device->usb_connection->source()->alloc_packet(transfer->length); + p = usb_device->usb_connection->alloc_packet(transfer->length); } catch (Usb::Session::Tx::Source::Packet_alloc_failed) { return LIBUSB_ERROR_BUSY; } @@ -601,7 +601,7 @@ static int genode_submit_transfer(struct usbi_transfer * itransfer) Usb::Packet_descriptor p; try { - p = usb_device->usb_connection->source()->alloc_packet(total_length); + p = usb_device->usb_connection->alloc_packet(total_length); } catch (Usb::Session::Tx::Source::Packet_alloc_failed) { return LIBUSB_ERROR_BUSY; } diff --git a/repos/libports/src/lib/qemu-usb/host.cc b/repos/libports/src/lib/qemu-usb/host.cc index cd2bbbbbe8..e042f31214 100644 --- a/repos/libports/src/lib/qemu-usb/host.cc +++ b/repos/libports/src/lib/qemu-usb/host.cc @@ -534,7 +534,7 @@ struct Usb_host_device : List::Element throw Packet_alloc_failed(); } - Usb::Packet_descriptor packet = usb_raw.source()->alloc_packet(length); + Usb::Packet_descriptor packet = usb_raw.alloc_packet(length); if (!completion) { packet.completion = nullptr; diff --git a/repos/os/include/usb/packet_handler.h b/repos/os/include/usb/packet_handler.h index 98ff826843..3ab175d41e 100644 --- a/repos/os/include/usb/packet_handler.h +++ b/repos/os/include/usb/packet_handler.h @@ -94,7 +94,7 @@ class Usb::Packet_handler while (true) { try { - Packet_descriptor p = _connection.source()->alloc_packet(size); + Packet_descriptor p = _connection.alloc_packet(size); return p; } catch (Usb::Session::Tx::Source::Packet_alloc_failed) { /* block until some packets are freed */ diff --git a/repos/os/include/usb_session/client.h b/repos/os/include/usb_session/client.h index 4b4554fac3..8f60861ee3 100644 --- a/repos/os/include/usb_session/client.h +++ b/repos/os/include/usb_session/client.h @@ -52,6 +52,20 @@ class Usb::Session_client : public Genode::Rpc_client sigh_state_change(state_change); } + /* + * Helper utility to always allocate correctly aligned USB packets + */ + Packet_descriptor alloc_packet(Genode::size_t size) + { + /* + * At least on ARM the minimal alignment for distinct + * DMA-capable USB URBs shall meet a maximum cache-line + * size of 128 bytes + */ + enum { URB_PAYLOAD_MIN_ALIGN_LOG2 = 7 }; + return source()->alloc_packet(size, URB_PAYLOAD_MIN_ALIGN_LOG2); + } + /*************************** ** USB session interface ** ***************************/ From bc5663f1a322db6b4477cfa4d528055ee2d1fd9f Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 2 Nov 2022 15:44:39 +0100 Subject: [PATCH 0037/1921] os: remove obsolete i.MX framebuffer session Ref genodelabs/genode#4661 --- .../imx53/imx_framebuffer_session/client.h | 47 ------------ .../imx_framebuffer_session/connection.h | 75 ------------------- .../imx_framebuffer_session.h | 48 ------------ 3 files changed, 170 deletions(-) delete mode 100644 repos/os/include/spec/imx53/imx_framebuffer_session/client.h delete mode 100644 repos/os/include/spec/imx53/imx_framebuffer_session/connection.h delete mode 100644 repos/os/include/spec/imx53/imx_framebuffer_session/imx_framebuffer_session.h diff --git a/repos/os/include/spec/imx53/imx_framebuffer_session/client.h b/repos/os/include/spec/imx53/imx_framebuffer_session/client.h deleted file mode 100644 index 52d832d4cb..0000000000 --- a/repos/os/include/spec/imx53/imx_framebuffer_session/client.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * \brief Client-side i.MX53 specific framebuffer interface - * \author Stefan Kalkowski - * \date 2013-02-26 - */ - -/* - * Copyright (C) 2006-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__IMX_FRAMEBUFFER_SESSION__CLIENT_H_ -#define _INCLUDE__IMX_FRAMEBUFFER_SESSION__CLIENT_H_ - -#include -#include -#include - -namespace Framebuffer { struct Imx_client; } - - -struct Framebuffer::Imx_client : Genode::Rpc_client -{ - explicit Imx_client(Capability session) - : Genode::Rpc_client(session) { } - - Genode::Dataspace_capability dataspace() override { - return call(); } - - Mode mode() const override { return call(); } - - void mode_sigh(Genode::Signal_context_capability sigh) override { - call(sigh); } - - void sync_sigh(Genode::Signal_context_capability sigh) override { - call(sigh); } - - void refresh(int x, int y, int w, int h) override { - call(x, y, w, h); } - - void overlay(Genode::addr_t phys_addr, int x, int y, int alpha) override { - call(phys_addr, x, y, alpha); } -}; - -#endif /* _INCLUDE__IMX_FRAMEBUFFER_SESSION__CLIENT_H_ */ diff --git a/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h b/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h deleted file mode 100644 index 0b4d8978aa..0000000000 --- a/repos/os/include/spec/imx53/imx_framebuffer_session/connection.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * \brief Connection to i.MX53 specific frame-buffer service - * \author Stefan Kalkowski - * \date 2013-02-26 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__IMX_FRAMEBUFFER_SESSION__CONNECTION_H_ -#define _INCLUDE__IMX_FRAMEBUFFER_SESSION__CONNECTION_H_ - -#include -#include -#include - -namespace Framebuffer { class Imx_connection; } - - -class Framebuffer::Imx_connection : public Genode::Connection, - public Imx_client -{ - private: - - /** - * Create session and return typed session capability - */ - Capability _connect(Genode::Parent &parent, - unsigned width, unsigned height, - Mode::Format format) - { - using namespace Genode; - - enum { ARGBUF_SIZE = 128 }; - char argbuf[ARGBUF_SIZE]; - - /* donate ram quota for storing server-side meta data */ - copy_cstring(argbuf, "ram_quota=8K", sizeof(argbuf)); - - /* set optional session-constructor arguments */ - if (width) - Arg_string::set_arg(argbuf, sizeof(argbuf), "fb_width", width); - if (height) - Arg_string::set_arg(argbuf, sizeof(argbuf), "fb_height", height); - if (format != Mode::INVALID) - Arg_string::set_arg(argbuf, sizeof(argbuf), "fb_format", format); - - return session(parent, argbuf); - } - - public: - - /** - * Constructor - * - * \param mode desired size and pixel format - * - * The specified values are not enforced. After creating the - * session, you should validate the actual frame-buffer attributes - * by calling the 'info' method of the frame-buffer interface. - */ - Imx_connection(Genode::Env &env, Framebuffer::Mode mode) - : - Genode::Connection(env, _connect(env.parent(), - mode.width(), mode.height(), - mode.format())), - Imx_client(cap()) - { } -}; - -#endif /* _INCLUDE__IMX_FRAMEBUFFER_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/spec/imx53/imx_framebuffer_session/imx_framebuffer_session.h b/repos/os/include/spec/imx53/imx_framebuffer_session/imx_framebuffer_session.h deleted file mode 100644 index 8333c57d42..0000000000 --- a/repos/os/include/spec/imx53/imx_framebuffer_session/imx_framebuffer_session.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * \brief i.MX53 specific framebuffer session extension - * \author Stefan Kalkowski - * \date 2013-02-26 - */ - -/* - * Copyright (C) 2011-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__IMX_FRAMEBUFFER_SESSION__IMX_FRAMEBUFFER_SESSION_H_ -#define _INCLUDE__IMX_FRAMEBUFFER_SESSION__IMX_FRAMEBUFFER_SESSION_H_ - -#include -#include -#include - -namespace Framebuffer { struct Imx_session; } - - -struct Framebuffer::Imx_session : Session -{ - virtual ~Imx_session() { } - - /** - * Set overlay properties - * - * \param phys_base physical base address of overlay framebuffer - * \param x horizontal position in pixel - * \param y vertical position in pixel - * \param alpha alpha transparency value of overlay (0-255) - */ - virtual void overlay(Genode::addr_t phys_base, int x, int y, int alpha) = 0; - - - /********************* - ** RPC declaration ** - *********************/ - - GENODE_RPC(Rpc_overlay, void, overlay, Genode::addr_t, int, int, int); - - GENODE_RPC_INTERFACE_INHERIT(Session, Rpc_overlay); -}; - -#endif /* _INCLUDE__IMX_FRAMEBUFFER_SESSION__IMX_FRAMEBUFFER_SESSION_H_ */ From f78710a4ea8e2b582b2a6e12ee01dd742023b2c4 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Fri, 4 Nov 2022 16:50:07 +0100 Subject: [PATCH 0038/1921] Fix version typo in Sculpt documentation --- repos/gems/recipes/pkg/sculpt/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/recipes/pkg/sculpt/README b/repos/gems/recipes/pkg/sculpt/README index 2288a466cc..ed0b1f7d4a 100644 --- a/repos/gems/recipes/pkg/sculpt/README +++ b/repos/gems/recipes/pkg/sculpt/README @@ -1425,7 +1425,7 @@ a free download at [https://genode.org]. ! ./tool/depot/download \ ! genodelabs/pkg/x86_64/sculpt/2022-10-13 \ ! genodelabs/pkg/x86_64/drivers_managed-pc/2022-10-11 \ - ! genodelabs/pkg/x86_64/wifi/2022-10-11 \ + ! genodelabs/pkg/x86_64/wifi/2022-10-13 \ ! genodelabs/bin/x86_64/ipxe_nic_drv/2022-10-11 # Create a build directory From 1593b646802f10373d3484af7cf09f1b2dbf8713 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 8 Nov 2022 18:26:36 +0100 Subject: [PATCH 0039/1921] vbox: reduce noise of some unimplemented fucntions --- repos/ports/src/virtualbox6/dummies.cc | 2 +- repos/ports/src/virtualbox6/nem.cc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/repos/ports/src/virtualbox6/dummies.cc b/repos/ports/src/virtualbox6/dummies.cc index 6d9885f9b6..4758f13f91 100644 --- a/repos/ports/src/virtualbox6/dummies.cc +++ b/repos/ports/src/virtualbox6/dummies.cc @@ -309,7 +309,7 @@ int pdmR3LdrInitU(PUVM) { return VINF_SUCCESS; } int PDMR3LdrLoadVMMR0U(PUVM) { return VINF_SUCCESS; } void PDMR3LdrRelocateU(PUVM, RTGCINTPTR) { } int pdmR3LoadR3U(PUVM, const char *, const char *) { return VINF_SUCCESS; } -void pdmR3LdrTermU(PUVM) TRACE() +void pdmR3LdrTermU(PUVM) { } int PDMR3LdrLoadR0(PUVM, const char *, const char *) { return VINF_SUCCESS; } char *pdmR3FileR3(const char * file, bool) diff --git a/repos/ports/src/virtualbox6/nem.cc b/repos/ports/src/virtualbox6/nem.cc index 830a1d6adb..2b89634d24 100644 --- a/repos/ports/src/virtualbox6/nem.cc +++ b/repos/ports/src/virtualbox6/nem.cc @@ -230,7 +230,10 @@ int nemR3NativeInitCompleted(PVM pVM, VMINITCOMPLETED enmWhat) } -int nemR3NativeTerm(PVM pVM) TRACE(VINF_SUCCESS) +int nemR3NativeTerm(PVM pVM) +{ + return VINF_SUCCESS; +} /** @@ -248,7 +251,7 @@ void nemR3NativeReset(PVM pVM) TRACE() * reset. * @param fInitIpi Whether this is the INIT IPI or hot (un)plugging case. */ -void nemR3NativeResetCpu(PVMCPU pVCpu, bool fInitIpi) TRACE() +void nemR3NativeResetCpu(PVMCPU pVCpu, bool fInitIpi) { } VBOXSTRICTRC nemR3NativeRunGC(PVM pVM, PVMCPU pVCpu) From a579e924000c8e319454c43fcd5f387da040f626 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 8 Nov 2022 18:33:04 +0100 Subject: [PATCH 0040/1921] wifi.run: configure /dev/urandom as libc RNG --- repos/pc/run/wifi.run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/pc/run/wifi.run b/repos/pc/run/wifi.run index 939416b98d..320f279da1 100644 --- a/repos/pc/run/wifi.run +++ b/repos/pc/run/wifi.run @@ -276,7 +276,7 @@ append config { - + From 49b07f898e107413d222c3fa90dd56e02e9f8d5d Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 8 Nov 2022 18:37:34 +0100 Subject: [PATCH 0041/1921] qemu-usb: remove diagnostic error message --- repos/libports/src/lib/libusb/genode_usb_raw.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/repos/libports/src/lib/libusb/genode_usb_raw.cc b/repos/libports/src/lib/libusb/genode_usb_raw.cc index a46a37897b..7513f1916b 100644 --- a/repos/libports/src/lib/libusb/genode_usb_raw.cc +++ b/repos/libports/src/lib/libusb/genode_usb_raw.cc @@ -164,7 +164,6 @@ struct Usb_device if (!p.succeded || itransfer->flags & USBI_TRANSFER_CANCELLING) { if (!p.succeded) { - Genode::error("USB transfer failed: ", (unsigned)p.type); if (p.error == Usb::Packet_descriptor::NO_DEVICE_ERROR) throw Device_has_vanished(); } From e507f1438a9ab8f39c3c6768a02204c34fa7e84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 10 Nov 2022 13:39:24 +0100 Subject: [PATCH 0042/1921] libports: add mesa_gpu-lima recipe Similar to the others 'mesa_gpu' pkgs add one for 'lima'. --- .../libports/recipes/pkg/mesa_gpu-lima/README | 1 + .../recipes/pkg/mesa_gpu-lima/archives | 4 ++ repos/libports/recipes/pkg/mesa_gpu-lima/hash | 1 + .../recipes/pkg/mesa_gpu-lima/runtime | 55 +++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 repos/libports/recipes/pkg/mesa_gpu-lima/README create mode 100644 repos/libports/recipes/pkg/mesa_gpu-lima/archives create mode 100644 repos/libports/recipes/pkg/mesa_gpu-lima/hash create mode 100644 repos/libports/recipes/pkg/mesa_gpu-lima/runtime diff --git a/repos/libports/recipes/pkg/mesa_gpu-lima/README b/repos/libports/recipes/pkg/mesa_gpu-lima/README new file mode 100644 index 0000000000..0cfe5140e3 --- /dev/null +++ b/repos/libports/recipes/pkg/mesa_gpu-lima/README @@ -0,0 +1 @@ +Lima Gallium driver of MESA for Mali400 GPUs diff --git a/repos/libports/recipes/pkg/mesa_gpu-lima/archives b/repos/libports/recipes/pkg/mesa_gpu-lima/archives new file mode 100644 index 0000000000..f548df6f3e --- /dev/null +++ b/repos/libports/recipes/pkg/mesa_gpu-lima/archives @@ -0,0 +1,4 @@ +_/src/cached_fs_rom +_/src/init +_/src/mesa +_/src/vfs diff --git a/repos/libports/recipes/pkg/mesa_gpu-lima/hash b/repos/libports/recipes/pkg/mesa_gpu-lima/hash new file mode 100644 index 0000000000..0600fee8fa --- /dev/null +++ b/repos/libports/recipes/pkg/mesa_gpu-lima/hash @@ -0,0 +1 @@ +2022-11-10 1c15bce5255265c4649dc1b8d3b5e9437cf33212 diff --git a/repos/libports/recipes/pkg/mesa_gpu-lima/runtime b/repos/libports/recipes/pkg/mesa_gpu-lima/runtime new file mode 100644 index 0000000000..f1eb36a1b8 --- /dev/null +++ b/repos/libports/recipes/pkg/mesa_gpu-lima/runtime @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7cb0986c1fa4e87c63afb36bc12fbdc79d2bf4ca Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 26 Aug 2022 10:49:38 +0200 Subject: [PATCH 0043/1921] rtc_drv: extend src package to dummy driver --- repos/os/recipes/src/rtc_drv/content.mk | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/repos/os/recipes/src/rtc_drv/content.mk b/repos/os/recipes/src/rtc_drv/content.mk index e47460fb99..6b94827cfb 100644 --- a/repos/os/recipes/src/rtc_drv/content.mk +++ b/repos/os/recipes/src/rtc_drv/content.mk @@ -1,10 +1,2 @@ -SRC_DIR = src/drivers/rtc/spec/x86 +SRC_DIR = src/drivers/rtc include $(GENODE_DIR)/repos/base/recipes/src/content.inc - -CONTENT = src/drivers/rtc/README src/drivers/rtc/rtc.h src/drivers/rtc/main.cc \ - src/drivers/rtc/target.inc - -content: $(CONTENT) - -$(CONTENT): - $(mirror_from_rep_dir) From bbcca835a59b00d8f76d115da46672e210280118 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 10 Nov 2022 14:58:25 +0100 Subject: [PATCH 0044/1921] sculpt: make graph features configurable This patch makes the component graph better reusable for the phone version of Sculpt. In the phone version, the '+' menu does not exist. So we need to omit the corresponding button. Furthermore, the storage dialog is presented in a dedicate section of the GUI instead of presenting it inside the 'storage' graph node. The phone version also does not offer the inspect view. So we need to omit the corresponding buttons. --- repos/gems/src/app/sculpt_manager/feature.h | 34 +++++++++++++++++++ repos/gems/src/app/sculpt_manager/graph.cc | 8 +++-- .../src/app/sculpt_manager/view/fs_dialog.h | 15 ++++---- 3 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 repos/gems/src/app/sculpt_manager/feature.h diff --git a/repos/gems/src/app/sculpt_manager/feature.h b/repos/gems/src/app/sculpt_manager/feature.h new file mode 100644 index 0000000000..185a942027 --- /dev/null +++ b/repos/gems/src/app/sculpt_manager/feature.h @@ -0,0 +1,34 @@ +/* + * \brief Compile-time feature selection + * \author Norman Feske + * \date 2022-11-10 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _FEATURE_H_ +#define _FEATURE_H_ + +#include + +namespace Sculpt { struct Feature; }; + + +struct Sculpt::Feature +{ + /* show the '+' botton at the graph for opening the deploy popup dialog */ + static constexpr bool PRESENT_PLUS_MENU = true; + + /* manage storage from within the respective graph nodes */ + static constexpr bool STORAGE_DIALOG_HOSTED_IN_GRAPH = true; + + /* allow the browsing of file systems via the inspect view */ + static constexpr bool INSPECT_VIEW = false; +}; + +#endif /* _FEATURE_H_ */ diff --git a/repos/gems/src/app/sculpt_manager/graph.cc b/repos/gems/src/app/sculpt_manager/graph.cc index 225d5a7ee2..8e2ab6dcc0 100644 --- a/repos/gems/src/app/sculpt_manager/graph.cc +++ b/repos/gems/src/app/sculpt_manager/graph.cc @@ -12,6 +12,7 @@ */ #include +#include #include using namespace Sculpt; @@ -157,7 +158,7 @@ void Graph::generate(Xml_generator &xml) const { xml.node("depgraph", [&] () { - if (_sculpt_partition.valid()) { + if (Feature::PRESENT_PLUS_MENU && _sculpt_partition.valid()) { gen_named_node(xml, "button", "global+", [&] () { _add_button_item.gen_button_attr(xml, "global+"); @@ -168,7 +169,10 @@ void Graph::generate(Xml_generator &xml) const xml.attribute("text", "+"); }); }); } - _gen_storage_node(xml); + if (Feature::STORAGE_DIALOG_HOSTED_IN_GRAPH) + _gen_storage_node(xml); + else + _gen_parent_node(xml, "storage", "Storage"); if (_storage_devices.usb_present) _gen_usb_node(xml); diff --git a/repos/gems/src/app/sculpt_manager/view/fs_dialog.h b/repos/gems/src/app/sculpt_manager/view/fs_dialog.h index c2e4529983..7db39f58c5 100644 --- a/repos/gems/src/app/sculpt_manager/view/fs_dialog.h +++ b/repos/gems/src/app/sculpt_manager/view/fs_dialog.h @@ -14,6 +14,7 @@ #ifndef _VIEW__FS_DIALOG_H_ #define _VIEW__FS_DIALOG_H_ +#include #include #include @@ -48,14 +49,16 @@ struct Sculpt::Fs_dialog : Noncopyable, Dialog void generate(Xml_generator &xml, File_system const &file_system) const { - xml.node("button", [&] () { - _inspect_item.gen_button_attr(xml, "browse"); + if (Feature::INSPECT_VIEW) { + xml.node("button", [&] () { + _inspect_item.gen_button_attr(xml, "browse"); - if (file_system.inspected) - xml.attribute("selected", "yes"); + if (file_system.inspected) + xml.attribute("selected", "yes"); - xml.node("label", [&] () { xml.attribute("text", "Inspect"); }); - }); + xml.node("label", [&] () { xml.attribute("text", "Inspect"); }); + }); + } if (!_used_target.valid() || _used_target == _target) { xml.node("button", [&] () { From 03a142174f9bed5f19d0c56403519b85aef3baca Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 26 Aug 2022 10:49:38 +0200 Subject: [PATCH 0045/1921] os: add dummy RTC driver package --- .../recipes/pkg/system_clock-dummy/README | 1 + .../recipes/pkg/system_clock-dummy/archives | 3 ++ .../recipes/pkg/system_clock-dummy/hash | 1 + .../recipes/pkg/system_clock-dummy/runtime | 51 +++++++++++++++++++ 4 files changed, 56 insertions(+) create mode 100644 repos/libports/recipes/pkg/system_clock-dummy/README create mode 100644 repos/libports/recipes/pkg/system_clock-dummy/archives create mode 100644 repos/libports/recipes/pkg/system_clock-dummy/hash create mode 100644 repos/libports/recipes/pkg/system_clock-dummy/runtime diff --git a/repos/libports/recipes/pkg/system_clock-dummy/README b/repos/libports/recipes/pkg/system_clock-dummy/README new file mode 100644 index 0000000000..e2ad88317a --- /dev/null +++ b/repos/libports/recipes/pkg/system_clock-dummy/README @@ -0,0 +1 @@ +Subsystem for system real-time clock diff --git a/repos/libports/recipes/pkg/system_clock-dummy/archives b/repos/libports/recipes/pkg/system_clock-dummy/archives new file mode 100644 index 0000000000..9284eccce8 --- /dev/null +++ b/repos/libports/recipes/pkg/system_clock-dummy/archives @@ -0,0 +1,3 @@ +_/src/system_rtc +_/src/rtc_drv +_/src/init diff --git a/repos/libports/recipes/pkg/system_clock-dummy/hash b/repos/libports/recipes/pkg/system_clock-dummy/hash new file mode 100644 index 0000000000..344bb74e32 --- /dev/null +++ b/repos/libports/recipes/pkg/system_clock-dummy/hash @@ -0,0 +1 @@ +2021-10-14-a 5592455fcfd116dc54054a3f8167cc16eb739ac5 diff --git a/repos/libports/recipes/pkg/system_clock-dummy/runtime b/repos/libports/recipes/pkg/system_clock-dummy/runtime new file mode 100644 index 0000000000..626ec3c10b --- /dev/null +++ b/repos/libports/recipes/pkg/system_clock-dummy/runtime @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 1b66b1bd7c16c2be93f8d2a5533dffb71b5072d8 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Wed, 19 Oct 2022 17:29:02 +0200 Subject: [PATCH 0046/1921] platform_drv: check quota before dma allocations (taken from legacy) '_env_ram' allocations can lead to 'Expanding_pd_session_client::try_alloc' quota upgrades, which in turn may lead to a resource request by the platform driver. Therefore, we check the available quota within the platform driver before allocations. This is not an optimal solution. issue #4667 related issue #3767 --- repos/os/src/drivers/platform/session_component.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/repos/os/src/drivers/platform/session_component.cc b/repos/os/src/drivers/platform/session_component.cc index 081ab14ed1..68168094fe 100644 --- a/repos/os/src/drivers/platform/session_component.cc +++ b/repos/os/src/drivers/platform/session_component.cc @@ -176,6 +176,19 @@ Session_component::alloc_dma_buffer(size_t const size, Cache cache) { Ram_dataspace_capability ram_cap { }; + /* + * Check available quota beforehand and reflect the state back + * to the client because the 'Expanding_pd_session_client' will + * ask its parent otherwise. + */ + enum { WATERMARK_CAP_QUOTA = 8, }; + if (_env.pd().avail_caps().value < WATERMARK_CAP_QUOTA) + throw Out_of_caps(); + + enum { WATERMARK_RAM_QUOTA = 4096, }; + if (_env.pd().avail_ram().value < WATERMARK_RAM_QUOTA) + throw Out_of_ram(); + try { ram_cap = _env_ram.alloc(size, cache); } catch (Ram_allocator::Denied) { } From 22460525a055313fc09db9cc1307065b39e163b6 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 11 Nov 2022 10:10:59 +0100 Subject: [PATCH 0047/1921] platform_session/dma_buffer: remove 'retry_with_upgrade' 'retry_with_upgrade' is called by 'platform_session/connection.h' -> 'alloc_dma_buffer' already. issue #4667 --- repos/os/include/platform_session/dma_buffer.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/repos/os/include/platform_session/dma_buffer.h b/repos/os/include/platform_session/dma_buffer.h index b80f42d2cd..38b03d6c2b 100644 --- a/repos/os/include/platform_session/dma_buffer.h +++ b/repos/os/include/platform_session/dma_buffer.h @@ -29,11 +29,8 @@ class Platform::Dma_buffer : Noncopyable size_t const size; Cache const cache; - Ram_dataspace_capability _alloc() - { - return platform.retry_with_upgrade(Ram_quota{4096}, Cap_quota{2}, - [&] () { return platform.alloc_dma_buffer(size, cache); }); - } + Ram_dataspace_capability _alloc() { + return platform.alloc_dma_buffer(size, cache); } Ram_dataspace_capability cap = _alloc(); From ff6b2bffdca0f9bbe393a364b4aebc17fd359501 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Mon, 24 Oct 2022 08:45:41 +0200 Subject: [PATCH 0048/1921] ahci: use Dma_buffer instead of 'alloc_dma_buffer' issue #4667 --- repos/os/src/drivers/ahci/ahci.h | 65 ++++++++++++------------------- repos/os/src/drivers/ahci/main.cc | 10 ++--- 2 files changed, 30 insertions(+), 45 deletions(-) diff --git a/repos/os/src/drivers/ahci/ahci.h b/repos/os/src/drivers/ahci/ahci.h index 8a11e51923..58772d1571 100644 --- a/repos/os/src/drivers/ahci/ahci.h +++ b/repos/os/src/drivers/ahci/ahci.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -522,6 +523,7 @@ struct Ahci::Port : private Port_base using Port_base::index; using Port_base::hba; using Port_base::delayer; + using Port_base::plat; struct Not_ready : Exception { }; @@ -529,9 +531,10 @@ struct Ahci::Port : private Port_base Region_map &rm; unsigned cmd_slots = hba.command_slots(); - Ram_dataspace_capability device_ds { }; - Ram_dataspace_capability cmd_ds { }; - Ram_dataspace_capability device_info_ds { }; + Platform::Dma_buffer device_dma { plat, 0x1000, CACHED }; + Platform::Dma_buffer cmd_dma { plat, + align_addr(cmd_slots * Command_table::size(), 12), CACHED }; + Platform::Dma_buffer device_info_dma { plat, 0x1000, CACHED }; addr_t device_info_dma_addr = 0; @@ -539,7 +542,9 @@ struct Ahci::Port : private Port_base addr_t fis_base = 0; addr_t cmd_table = 0; addr_t device_info = 0; - addr_t dma_base = 0; /* physical address of DMA memory */ + + Constructible dma_buffer { }; + addr_t dma_base = 0; /* physical address of DMA memory */ Port(Protocol &protocol, Region_map &rm, Platform::Connection & plat, Hba &hba, Mmio::Delayer &delayer, unsigned index) @@ -570,23 +575,7 @@ struct Ahci::Port : private Port_base } } - virtual ~Port() - { - if (device_ds.valid()) { - rm.detach((void *)cmd_list); - plat.free_dma_buffer(device_ds); - } - - if (cmd_ds.valid()) { - rm.detach((void *)cmd_table); - plat.free_dma_buffer(cmd_ds); - } - - if (device_info_ds.valid()) { - rm.detach((void*)device_info); - plat.free_dma_buffer(device_info_ds); - } - } + virtual ~Port() { } /** * Command list base (1K length naturally aligned) @@ -880,11 +869,9 @@ struct Ahci::Port : private Port_base void setup_memory() { - device_ds = plat.alloc_dma_buffer(0x1000, CACHED); - /* command list 1K */ - addr_t phys = plat.dma_addr(device_ds); - cmd_list = (addr_t)rm.attach(device_ds); + addr_t phys = device_dma.dma_addr(); + cmd_list = addr_t(device_dma.local_addr()); command_list_base(phys); /* receive FIS base 256 byte */ @@ -899,10 +886,8 @@ struct Ahci::Port : private Port_base fis_rcv_base(phys + 1024); /* command table */ - size_t cmd_size = align_addr(cmd_slots * Command_table::size(), 12); - cmd_ds = plat.alloc_dma_buffer(cmd_size, CACHED); - cmd_table = (addr_t)rm.attach(cmd_ds); - phys = plat.dma_addr(cmd_ds); + cmd_table = addr_t(cmd_dma.local_addr()); + phys = cmd_dma.dma_addr(); /* set command table addresses in command list */ for (unsigned i = 0; i < cmd_slots; i++) { @@ -911,9 +896,8 @@ struct Ahci::Port : private Port_base } /* dataspace for device info */ - device_info_ds = plat.alloc_dma_buffer(0x1000, CACHED); - device_info_dma_addr = plat.dma_addr(device_info_ds); - device_info = rm.attach(device_info_ds); + device_info_dma_addr = device_info_dma.dma_addr(); + device_info = addr_t(device_info_dma.local_addr()); } addr_t command_table_addr(unsigned slot) @@ -951,19 +935,20 @@ struct Ahci::Port : private Port_base return true; } - Ram_dataspace_capability alloc_buffer(size_t size) + Dataspace_capability alloc_buffer(size_t size) { - if (dma_base) return Ram_dataspace_capability(); + if (dma_buffer.constructed()) return Dataspace_capability(); - Ram_dataspace_capability dma = plat.alloc_dma_buffer(size, CACHED); - dma_base = plat.dma_addr(dma); - return dma; + dma_buffer.construct(plat, size, CACHED); + dma_base = dma_buffer->dma_addr(); + + return dma_buffer->cap(); } - void free_buffer(Ram_dataspace_capability ds) + void free_buffer() { - dma_base = 0; - plat.free_dma_buffer(ds); + if (!dma_buffer.constructed()) return; + dma_buffer.destruct(); } /********************** diff --git a/repos/os/src/drivers/ahci/main.cc b/repos/os/src/drivers/ahci/main.cc index b535e384a1..ce95442bdd 100644 --- a/repos/os/src/drivers/ahci/main.cc +++ b/repos/os/src/drivers/ahci/main.cc @@ -196,9 +196,9 @@ class Ahci::Driver : Noncopyable struct Ahci::Block_session_handler : Interface { - Env &env; - Port &port; - Ram_dataspace_capability ds; + Env &env; + Port &port; + Dataspace_capability ds; Signal_handler request_handler { env.ep(), *this, &Block_session_handler::handle}; @@ -209,10 +209,10 @@ struct Ahci::Block_session_handler : Interface ~Block_session_handler() { - port.free_buffer(ds); + port.free_buffer(); } - virtual void handle_requests()= 0; + virtual void handle_requests() = 0; void handle() { From f76f5db2fae2eb1216b852574a18bb84b789dadd Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 11 Nov 2022 10:14:08 +0100 Subject: [PATCH 0049/1921] drivers: use DMA buffer more consistent Replace 'alloc_dma_buffer' by 'Dma_buffer' issue #4667 --- repos/os/src/drivers/framebuffer/pl11x/main.cc | 12 ++++-------- repos/os/src/drivers/framebuffer/ram/main.cc | 18 +++++++----------- repos/os/src/test/platform_drv/main.cc | 11 ++++++----- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/repos/os/src/drivers/framebuffer/pl11x/main.cc b/repos/os/src/drivers/framebuffer/pl11x/main.cc index fd33426c0f..4f0b2e5a06 100644 --- a/repos/os/src/drivers/framebuffer/pl11x/main.cc +++ b/repos/os/src/drivers/framebuffer/pl11x/main.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -73,7 +74,7 @@ struct Pl11x_driver::Main { using Pixel = Capture::Pixel; - Surface surface(_fb_ds.local_addr(), _size); + Surface surface(_fb_dma.local_addr(), _size); _captured_screen.apply_to_surface(surface); } @@ -90,11 +91,7 @@ struct Pl11x_driver::Main Platform::Device _sp810_dev { _platform, Type { "arm,sp810" } }; Platform::Device::Mmio _lcd_io_mem { _pl11x_dev }; Platform::Device::Mmio _sys_mem { _sp810_dev }; - - Ram_dataspace_capability _fb_ds_cap { - _platform.alloc_dma_buffer(FRAMEBUFFER_SIZE, UNCACHED) }; - - Attached_dataspace _fb_ds { _env.rm(), _fb_ds_cap }; + Platform::Dma_buffer _fb_dma { _platform, FRAMEBUFFER_SIZE, UNCACHED }; void _init_device(); @@ -197,8 +194,7 @@ void Pl11x_driver::Main::_init_device() reg_write(PL11X_REG_TIMING3, tim3); /* set framebuffer address and ctrl register */ - addr_t const fb_dma_base = (addr_t)_platform.dma_addr(_fb_ds_cap); - reg_write(PL11X_REG_UPBASE, fb_dma_base); + reg_write(PL11X_REG_UPBASE, _fb_dma.dma_addr()); reg_write(PL11X_REG_LPBASE, 0); reg_write(PL11X_REG_IMSC, 0); reg_write(PL11X_REG_CTRL, ctrl); diff --git a/repos/os/src/drivers/framebuffer/ram/main.cc b/repos/os/src/drivers/framebuffer/ram/main.cc index 208d095435..f0db5be48e 100644 --- a/repos/os/src/drivers/framebuffer/ram/main.cc +++ b/repos/os/src/drivers/framebuffer/ram/main.cc @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -61,13 +62,8 @@ class Main Platform::Device::Mmio _fw_mem { _fw_dev }; Fw _fw { (addr_t)_fw_mem.local_addr() }; - Ram_dataspace_capability _fb_ds_cap { - _platform.alloc_dma_buffer(SCR_HEIGHT * SCR_STRIDE, UNCACHED) }; - Attached_dataspace _fb_ds { _env.rm(), _fb_ds_cap }; - - Ram_dataspace_capability _config_ds_cap { - _platform.alloc_dma_buffer(0x1000, UNCACHED) }; - Attached_dataspace _config_ds { _env.rm(), _config_ds_cap }; + Platform::Dma_buffer _fb_dma { _platform, SCR_HEIGHT * SCR_STRIDE, UNCACHED }; + Platform::Dma_buffer _config_dma { _platform, 0x1000, UNCACHED }; Capture::Area const _size { SCR_WIDTH, SCR_HEIGHT }; Capture::Connection _capture { _env }; @@ -81,7 +77,7 @@ class Main { using Pixel = Capture::Pixel; - Surface surface(_fb_ds.local_addr(), _size); + Surface surface(_fb_dma.local_addr(), _size); _captured_screen.apply_to_surface(surface); } @@ -173,9 +169,9 @@ class Main _fw_selector(file.key); - addr_t config_addr = (addr_t)_config_ds.local_addr(); - addr_t config_phys = (addr_t)_platform.dma_addr(_config_ds_cap); - addr_t fb_phys = (addr_t)_platform.dma_addr(_fb_ds_cap); + addr_t config_addr = (addr_t)_config_dma.local_addr(); + addr_t config_phys = _config_dma.dma_addr(); + addr_t fb_phys = _fb_dma.dma_addr(); Ram_fb_config config { config_addr }; config.write(host_to_big_endian(fb_phys)); diff --git a/repos/os/src/test/platform_drv/main.cc b/repos/os/src/test/platform_drv/main.cc index f4ce9192fc..f859c9ed4b 100644 --- a/repos/os/src/test/platform_drv/main.cc +++ b/repos/os/src/test/platform_drv/main.cc @@ -14,7 +14,6 @@ #include #include #include - /* WARNING DO NOT COPY THIS !!! */ /* * We make everything public from the platform device classes @@ -25,6 +24,8 @@ #undef private /* WARNING DO NOT COPY THIS !!! */ +#include + using namespace Genode; struct Main @@ -158,7 +159,7 @@ struct Main case 3: next_step(4, 4, 0x40000000, 32); return; - case 4: + case 4: { /* Instantiate and destroy all devices */ start_driver(0); start_driver(1); @@ -169,7 +170,7 @@ struct Main stop_driver(2); stop_driver(3); /* allocate big DMA dataspace */ - platform->alloc_dma_buffer(0x80000, UNCACHED); + Platform::Dma_buffer buffer { *platform, 0x80000, UNCACHED }; /* close the whole session */ platform.destruct(); platform.construct(env); @@ -180,10 +181,10 @@ struct Main start_driver(3); /* repeatedly start and destroy device sessions to detect leakages */ for (unsigned idx = 0; idx < 1000; idx++) { - platform->free_dma_buffer(platform->alloc_dma_buffer(0x4000, UNCACHED)); + Platform::Dma_buffer dma { *platform, 0x4000, UNCACHED }; } next_step(0, 0, 0x40000000, 32); - return; + return; } case 5: stop_driver(0); stop_driver(1); From 8bd548416d0b6a5f532151b97f2133dfb548b5bb Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Wed, 26 Oct 2022 16:08:41 +0200 Subject: [PATCH 0050/1921] sculpt: increase drivers caps for fuji4 (has ahci and nvme) One test notebook has an AHCI and NVMe controller and reaches the quota limit in Sculpt. issue #4667 --- repos/gems/run/sculpt.run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index d2b3543263..c8ddbe5109 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -374,7 +374,7 @@ install_config { - + From 852d21db14ba639506b5782d9c6346b9f8231ffb Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Thu, 10 Nov 2022 09:56:42 +0100 Subject: [PATCH 0051/1921] vbox6: print error in case machine powerup fails Retrieve error message (best effort and might fail) from progress information. issue #4666 --- repos/ports/src/virtualbox6/main.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/repos/ports/src/virtualbox6/main.cc b/repos/ports/src/virtualbox6/main.cc index 1dd498ad2e..1e64ce59b1 100644 --- a/repos/ports/src/virtualbox6/main.cc +++ b/repos/ports/src/virtualbox6/main.cc @@ -335,6 +335,15 @@ struct Main : Event_handler if (state != MachineState_Running) { error("machine could not enter running state"); + + /* retrieve and print error information */ + IVirtualBoxErrorInfo *info; + progress->COMGETTER(ErrorInfo)(&info); + + PRUnichar *text = (PRUnichar *)malloc(4096); + info->GetText((PRUnichar **)&text); + Genode::log("Error: ", Utf8Str(text).c_str()); + throw Fatal(); } } From 2aa01e309ced36ea439ea93934959c13efcacd03 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 1 Jul 2022 14:35:04 +0200 Subject: [PATCH 0052/1921] gpu/intel: GEN12+ * clock frequency * topology * exec lists * IRQ handling * improved resource management issue #4664 --- repos/os/include/gpu/info_intel.h | 56 +++- repos/os/src/drivers/gpu/intel/main.cc | 264 +++++++++++---- repos/os/src/drivers/gpu/intel/mmio.h | 300 ++++++++++++++++-- .../src/drivers/gpu/intel/ppgtt_allocator.h | 6 +- 4 files changed, 527 insertions(+), 99 deletions(-) diff --git a/repos/os/include/gpu/info_intel.h b/repos/os/include/gpu/info_intel.h index c7295ad7d0..bb30af4b21 100644 --- a/repos/os/include/gpu/info_intel.h +++ b/repos/os/include/gpu/info_intel.h @@ -33,6 +33,7 @@ struct Gpu::Info_intel using Features = Genode::uint32_t; using size_t = Genode::size_t; using Context_id = Genode::uint32_t; + using uint8_t = Genode::uint8_t; Chip_id chip_id; Features features; @@ -41,16 +42,55 @@ struct Gpu::Info_intel Sequence_number last_completed; - struct Revision { Genode::uint8_t value; } revision; - struct Slice_mask { unsigned value; } slice_mask; - struct Subslice_mask { unsigned value; } subslice_mask; - struct Eu_total { unsigned value; } eus; - struct Subslices { unsigned value; } subslices; + struct Revision { Genode::uint8_t value; } revision; + struct Slice_mask { unsigned value; } slice_mask; + struct Subslice_mask { unsigned value; } subslice_mask; + struct Eu_total { unsigned value; } eus; + struct Subslices { unsigned value; } subslices; + struct Clock_frequency { unsigned value; } clock_frequency; + + struct Topology + { + enum { + MAX_SLICES = 3, + MAX_SUBSLICES = 32, + MAX_EUS = 16, + }; + + uint8_t slice_mask { 0 }; + uint8_t subslice_mask[MAX_SLICES * (MAX_SUBSLICES / 8)] { }; + uint8_t eu_mask[MAX_SLICES * MAX_SUBSLICES * (MAX_EUS / 8)] { }; + + uint8_t max_slices { 0 }; + uint8_t max_subslices { 0 }; + uint8_t max_eus_per_subslice { 0 }; + + uint8_t ss_stride { 0 }; + uint8_t eu_stride { 0 }; + + bool valid { false }; + + bool has_subslice(unsigned slice, unsigned subslice) + { + unsigned ss_idx = subslice / 8; + uint8_t mask = subslice_mask[slice * ss_stride + ss_idx]; + return mask & (1u << (subslice % 8)); + } + + unsigned eu_idx(unsigned slice, unsigned subslice) + { + unsigned slice_stride = max_slices * eu_stride; + return slice * slice_stride + subslice * eu_stride; + } + }; + + struct Topology topology { }; Info_intel(Chip_id chip_id, Features features, size_t aperture_size, Context_id ctx_id, Sequence_number last, Revision rev, Slice_mask s_mask, Subslice_mask ss_mask, - Eu_total eu, Subslices subslice) + Eu_total eu, Subslices subslice, Clock_frequency clock_frequency, + Topology topology) : chip_id(chip_id), features(features), aperture_size(aperture_size), ctx_id(ctx_id), @@ -59,7 +99,9 @@ struct Gpu::Info_intel slice_mask(s_mask), subslice_mask(ss_mask), eus(eu), - subslices(subslice) + subslices(subslice), + clock_frequency(clock_frequency), + topology(topology) { } }; diff --git a/repos/os/src/drivers/gpu/intel/main.cc b/repos/os/src/drivers/gpu/intel/main.cc index f0f1189553..9a4397d1e9 100644 --- a/repos/os/src/drivers/gpu/intel/main.cc +++ b/repos/os/src/drivers/gpu/intel/main.cc @@ -56,7 +56,7 @@ namespace Igd { struct Igd::Device_info { - enum Platform { UNKNOWN, BROADWELL, SKYLAKE, KABYLAKE, WHISKEYLAKE }; + enum Platform { UNKNOWN, BROADWELL, SKYLAKE, KABYLAKE, WHISKEYLAKE, TIGERLAKE }; enum Stepping { A0, B0, C0, D0, D1, E0, F0, G0 }; uint16_t id; @@ -89,23 +89,52 @@ struct Igd::Device ** PCI ** *********/ - struct Pci_backend_alloc : Utils::Backend_alloc + struct Pci_backend_alloc : Utils::Backend_alloc, Ram_allocator { + Env &_env; Platform::Connection &_pci; - Pci_backend_alloc(Platform::Connection &pci) : _pci(pci) { } + Pci_backend_alloc(Env &env, Platform::Connection &pci) + : _env(env), _pci(pci) { } Ram_dataspace_capability alloc(size_t size) override { - return _pci.retry_with_upgrade(Genode::Ram_quota{PAGE_SIZE}, - Genode::Cap_quota{8}, [&] () { - return _pci.alloc_dma_buffer(size, Genode::UNCACHED); }); + enum { + UPGRADE_RAM = 8 * PAGE_SIZE, + UPGRADE_CAPS = 2, + UPGRADE_ATTEMPTS = ~0U + }; + + return retry( + [&] () { + return retry( + [&] () { return _pci.Client::alloc_dma_buffer(size, UNCACHED); }, + [&] () + { + if (_env.pd().avail_caps().value < UPGRADE_CAPS) { + warning("alloc dma buffer: out if caps"); + throw Gpu::Session::Out_of_caps(); + } + + _pci.upgrade_caps(UPGRADE_CAPS); + }, + UPGRADE_ATTEMPTS); + }, + [&] () + { + if (_env.pd().avail_ram().value < size) { + warning("alloc dma buffer: out of ram"); + throw Gpu::Session::Out_of_ram(); + } + _pci.upgrade_ram(size); + }, + UPGRADE_ATTEMPTS); } void free(Ram_dataspace_capability cap) override { if (!cap.valid()) { - Genode::error("could not free, capability invalid"); + error("could not free, capability invalid"); return; } @@ -117,15 +146,28 @@ struct Igd::Device return _pci.dma_addr(ds_cap); } - } _pci_backend_alloc { _platform }; + /** + * RAM allocator interface + */ + size_t dataspace_size(Ram_dataspace_capability) const override { return 0; } + + Alloc_result try_alloc(size_t size, Cache) override + { + return alloc(size); + } + + } _pci_backend_alloc { _env, _platform }; + + Device_info _info { }; + Gpu::Info_intel::Revision _revision { }; + Gpu::Info_intel::Slice_mask _slice_mask { }; + Gpu::Info_intel::Subslice_mask _subslice_mask { }; + Gpu::Info_intel::Eu_total _eus { }; + Gpu::Info_intel::Subslices _subslices { }; + Gpu::Info_intel::Topology _topology { }; + Gpu::Info_intel::Clock_frequency _clock_frequency { }; - Device_info _info { }; - Gpu::Info_intel::Revision _revision { }; - Gpu::Info_intel::Slice_mask _slice_mask { }; - Gpu::Info_intel::Subslice_mask _subslice_mask { }; - Gpu::Info_intel::Eu_total _eus { }; - Gpu::Info_intel::Subslices _subslices { }; bool _supported(Xml_node & supported, uint16_t dev_id, @@ -147,10 +189,10 @@ struct Igd::Device return; struct Igd::Device_info const info { - .id = device, - .generation = generation, - .platform = platform_type(platform), - .features = 0 + .id = device, + .generation = generation, + .platform = platform_type(platform), + .features = 0, }; if (info.platform == Igd::Device_info::Platform::UNKNOWN) @@ -158,7 +200,8 @@ struct Igd::Device if (info.id == dev_id) { _info = info; - _revision.value = rev_id; + _revision.value = rev_id; + _clock_frequency.value = _mmio.clock_frequency(generation); found = true; return; @@ -178,6 +221,8 @@ struct Igd::Device return Igd::Device_info::Platform::KABYLAKE; if (platform == "whiskeylake") return Igd::Device_info::Platform::WHISKEYLAKE; + if (platform == "tigerlake") + return Igd::Device_info::Platform::TIGERLAKE; return Igd::Device_info::UNKNOWN; } @@ -185,7 +230,6 @@ struct Igd::Device ** GGTT ** **********/ - size_t _ggtt_size() { /* @@ -575,7 +619,9 @@ struct Igd::Device _device._slice_mask, _device._subslice_mask, _device._eus, - _device._subslices); + _device._subslices, + _device._clock_frequency, + _device._topology); } ~Vgpu() @@ -622,7 +668,9 @@ struct Igd::Device + ((_device.generation().value == 9) ? 6 : 0) + ((_device.generation().value == 8) ? 20 : 22) /* epilog + w/a */ + (dc_flush_wa ? 12 : 0); - if (!el.ring_avail(need)) { el.ring_reset_and_fill_zero(); } + + if (!el.ring_avail(need)) + el.ring_reset_and_fill_zero(); /* save old tail */ Ring_buffer::Index const tail = el.ring_tail(); @@ -888,6 +936,23 @@ struct Igd::Device _mmio.write(desc[0]); } + void _submit_execlist_gen12(Engine &engine) + { + if (_mmio.read() == 0) + return; + + Execlist &el = *engine.execlist; + + _mmio.write(el.elem0().low(), 0); + _mmio.write(el.elem0().high(), 1); + + for (unsigned i = 2; i < 16; i++) + _mmio.write(0, i); + + /* load SQ to EQ */ + _mmio.write(1); + } + Vgpu *_unschedule_current_vgpu() { Vgpu *result = nullptr; @@ -916,7 +981,10 @@ struct Igd::Device _mmio.flush_gfx_tlb(); - _submit_execlist(rcs); + if (_info.generation < 11) + _submit_execlist(rcs); + else + _submit_execlist_gen12(rcs); _active_vgpu = gpu; _timer.trigger_once(WATCHDOG_TIMEOUT); @@ -926,11 +994,6 @@ struct Igd::Device ** INTR ** **********/ - void _clear_rcs_iir(Mmio::GT_0_INTERRUPT_IIR::access_t const v) - { - _mmio.write_post(v); - } - /** * \return true, if Vgpu is done and has not further work */ @@ -989,7 +1052,8 @@ struct Igd::Device if (!_active_vgpu) { return; } Genode::error("watchdog triggered: engine stuck," - " vGPU=", _active_vgpu->id()); + " vGPU=", _active_vgpu->id(), " IRQ: ", + Hex(_mmio.read_irq_vector(_info.generation))); _mmio.dump(); _mmio.error_dump(); _mmio.fault_dump(); @@ -1021,7 +1085,7 @@ struct Igd::Device _mmio.reset(_info.generation); _mmio.clear_errors(); _mmio.init(); - _mmio.enable_intr(); + _mmio.enable_intr(_info.generation); } /** @@ -1084,6 +1148,9 @@ struct Igd::Device _subslices.value ++; _init_eu_total(3, SUBSLICE_MAX, 8); + } else + if (_info.generation == 12) { + _init_topology_gen12(); } else Genode::error("unsupported platform ", (int)_info.platform); @@ -1093,6 +1160,46 @@ struct Igd::Device _timer.sigh(_watchdog_timeout_sigh); } + void _init_topology_gen12() + { + /* NOTE: This needs to be different for DG2 and Xe_HP */ + _topology.max_slices = 1; + _topology.max_subslices = 6; + _topology.max_eus_per_subslice = 16; + _topology.ss_stride = 1; /* roundup(6/8) */ + _topology.eu_stride = 2; /* 16/8 */ + + /* NOTE: 1 for >=12.5 */ + _topology.slice_mask = _mmio.read(); + if (_topology.slice_mask > 1) + error("topology: slices > 1"); + + uint32_t dss_en = _mmio.read(); + memcpy(_topology.subslice_mask, &dss_en, sizeof(dss_en)); + + /* Gen12 uses dual-subslices */ + uint8_t eu_en_fuse = ~_mmio.read(); + uint16_t eu_en { 0 }; + for (unsigned i = 0; i < _topology.max_eus_per_subslice / 2; i++) { + if (eu_en_fuse & (1u << i)) { + _eus.value += 2; + eu_en |= (3u << (i * 2)); + } + } + + for (unsigned i = 0; i < _topology.max_subslices; i++) { + if (_topology.has_subslice(0, i)) { + _subslices.value++; + unsigned offset = _topology.eu_idx(0, i); + for (unsigned j = 0; j < _topology.eu_stride; j++) { + _topology.eu_mask[offset + j] = (eu_en >> (8 * j)) & 0xff; + } + } + } + + _topology.valid = true; + } + void _clock_gating() { if (_info.platform == Device_info::Platform::KABYLAKE) { @@ -1382,22 +1489,24 @@ struct Igd::Device _clear_fence(id); } - unsigned handle_irq() + bool handle_irq() { - Mmio::MASTER_INT_CTL::access_t master = _mmio.read(); + bool display_irq = _mmio.display_irq(_info.generation); /* handle render interrupts only */ - if (Mmio::MASTER_INT_CTL::Render_interrupts_pending::get(master) == 0) - return master; + if (_mmio.render_irq(_info.generation) == false) + return display_irq; - _mmio.disable_master_irq(); + _mmio.disable_master_irq(_info.generation); - Mmio::GT_0_INTERRUPT_IIR::access_t const v = _mmio.read(); + Mmio::GEN12_RENDER_INTR_VEC::access_t const v = _mmio.read_irq_vector(_info.generation); - bool const ctx_switch = Mmio::GT_0_INTERRUPT_IIR::Cs_ctx_switch_interrupt::get(v); - bool const user_complete = Mmio::GT_0_INTERRUPT_IIR::Cs_mi_user_interrupt::get(v); + bool const ctx_switch = Mmio::GEN12_RENDER_INTR_VEC::Cs_ctx_switch_interrupt::get(v); + bool const user_complete = Mmio::GEN12_RENDER_INTR_VEC::Cs_mi_user_interrupt::get(v); - if (v) { _clear_rcs_iir(v); } + if (v) { + _mmio.clear_render_irq(_info.generation, v); + } Vgpu *notify_gpu = nullptr; if (user_complete) { @@ -1428,10 +1537,10 @@ struct Igd::Device } } - return master; + return display_irq; } - void enable_master_irq() { _mmio.enable_master_irq(); } + void enable_master_irq() { _mmio.enable_master_irq(_info.generation); } private: @@ -1465,10 +1574,10 @@ class Gpu::Session_component : public Genode::Session_object Genode::Env &_env; Genode::Region_map &_rm; Constrained_ram_allocator _ram; - Heap _heap { _ram, _rm }; + Igd::Device &_device; + Heap _heap { _device._pci_backend_alloc, _rm }; Capability _session_cap { cap() }; - Igd::Device &_device; Igd::Device::Vgpu _vgpu; struct Resource_guard @@ -1483,24 +1592,38 @@ class Gpu::Session_component : public Genode::Session_object { } /* worst case */ - bool avail_caps() { return _cap_quota_guard.have_avail(Cap_quota { 5 }); } + bool avail_caps() { return _cap_quota_guard.have_avail(Cap_quota { 15 }); } - /* size + possible heap allocations */ + /* size + possible heap allocations + possible page table allocation + + * + 16KB for 'ep.manage' + unkown overhead */ bool avail_ram(size_t size = 0) { - return _ram_quota_guard.have_avail(Ram_quota { size + 2*1024*1024 }); } + return _ram_quota_guard.have_avail(Ram_quota { size + 2*1024*1024+4096 + + 1024*1024 + 16*1024 + 1024*1024}); } - void withdraw(size_t caps, size_t ram) + void withdraw(size_t caps_old, size_t caps_new, + size_t ram_old, size_t ram_new) { + size_t caps = caps_old > caps_new ? caps_old - caps_new : 0; + size_t ram = ram_old > ram_new ? ram_old - ram_new : 0; + try { _cap_quota_guard.withdraw(Cap_quota { caps }); _ram_quota_guard.withdraw(Ram_quota { ram }); - } catch (... /* intentional catch-all */) { + } catch (Genode::Out_of_caps) { /* * At this point something in the accounting went wrong * and as quick-fix let the client abort rather than the * multiplexer. */ - throw Service_denied(); + Genode::error("Quota guard out of caps! from ", __builtin_return_address(0)); + throw Gpu::Session::Out_of_caps(); + } catch (Genode::Out_of_ram) { + Genode::error("Quota guard out of ram! from ", __builtin_return_address(0)); + Genode::error("guard ram: ", _ram_quota_guard.avail().value, " requested: ", ram); + throw Gpu::Session::Out_of_ram(); + } catch (...) { + Genode::error("Unknown exception in 'Resourcd_guard::withdraw'"); + throw; } } @@ -1600,9 +1723,13 @@ class Gpu::Session_component : public Genode::Session_object void _apply_buffer_local(Gpu::Buffer_id id, FN const &fn) { Buffer_local::Id_space::Id local_id { .value = id.value }; - _buffer_space.apply(local_id, [&] (Buffer_local &buffer) { - fn(buffer); - }); + try { + _buffer_space.apply(local_id, [&] (Buffer_local &buffer) { + fn(buffer); + }); + } catch (Buffer_local::Id_space::Unknown_id) { + error("Unknown id: ", id.value); + } } Genode::uint64_t seqno { 0 }; @@ -1758,8 +1885,8 @@ class Gpu::Session_component : public Genode::Session_object size_t ram_before = _env.pd().avail_ram().value; Ram_dataspace_capability ds_cap = _device.alloc_buffer(_heap, size); - addr_t phys_addr = _device.dma_addr(ds_cap); - Buffer *buffer = new (&_heap) Buffer(ds_cap, phys_addr, _session_cap); + addr_t phys_addr = _device.dma_addr(ds_cap); + Buffer *buffer = new (&_heap) Buffer(ds_cap, phys_addr, _session_cap); _env.ep().manage(*buffer); try { @@ -1768,17 +1895,17 @@ class Gpu::Session_component : public Genode::Session_object _env.ep().dissolve(*buffer); destroy(&_heap, buffer); _device.free_buffer(_heap, ds_cap); - throw Gpu::Session_component::Conflicting_id(); + return Dataspace_capability(); } size_t caps_after = _env.pd().avail_caps().value; size_t ram_after = _env.pd().avail_ram().value; - /* limit to buffer size */ - buffer->ram_used = min(ram_before - ram_after, size); - buffer->caps_used = (caps_before - caps_after) > 0; + /* limit to buffer size for replenish */ + buffer->ram_used = min(ram_before > ram_after ? ram_before - ram_after : 0, size); + buffer->caps_used = caps_before > caps_after ? true : false; - _resource_guard.withdraw(caps_before - caps_after, buffer->ram_used); + _resource_guard.withdraw(caps_before, caps_after, ram_before, ram_after); return ds_cap; } @@ -1877,8 +2004,8 @@ class Gpu::Session_component : public Genode::Session_object size_t caps_after = _env.pd().avail_caps().value; size_t ram_after = _env.pd().avail_ram().value; - _resource_guard.withdraw(caps_before - caps_after, - ram_before - ram_after); + _resource_guard.withdraw(caps_before, caps_after, + ram_before , ram_after); return true; }; @@ -1956,8 +2083,8 @@ class Gpu::Session_component : public Genode::Session_object size_t caps_after = _env.pd().avail_caps().value; size_t ram_after = _env.pd().avail_ram().value; - _resource_guard.withdraw(caps_before - caps_after, - ram_before - ram_after); + _resource_guard.withdraw(caps_before, caps_after, + ram_before, ram_after); return true; } @@ -2081,7 +2208,7 @@ class Gpu::Root : public Gpu::Root_component using namespace Genode; return new (md_alloc()) - Session_component(_env, _env.ep(), _env.ram(), _env.rm(), + Session_component(_env, _env.ep(), _device->_pci_backend_alloc, _env.rm(), resources, session_label_from_args(args), session_diag_from_args(args), @@ -2198,9 +2325,9 @@ struct Main : Irq_ack_handler, Gpu_reset_handler void handle_irq() { - unsigned master = 0; + bool display_irq = false; if (_igd_device.constructed()) - master = _igd_device->handle_irq(); + display_irq = _igd_device->handle_irq(); /* GPU not present forward all IRQs to platform client */ else { _platform_root.handle_irq(); @@ -2211,10 +2338,9 @@ struct Main : Irq_ack_handler, Gpu_reset_handler * GPU present check for display engine related IRQs before calling platform * client */ - using Master = Igd::Mmio::MASTER_INT_CTL; - if (Master::De_interrupts_pending::get(master) && - (_platform_root.handle_irq())) + if (display_irq && _platform_root.handle_irq()) { return; + } ack_irq(); } diff --git a/repos/os/src/drivers/gpu/intel/mmio.h b/repos/os/src/drivers/gpu/intel/mmio.h index fa99778151..c5a4358486 100644 --- a/repos/os/src/drivers/gpu/intel/mmio.h +++ b/repos/os/src/drivers/gpu/intel/mmio.h @@ -194,6 +194,66 @@ class Igd::Mmio : public Platform::Device::Mmio struct GT_3_INTERRUPT_IIR : GT_3_INTERRUPT<0x44338> { }; struct GT_3_INTERRUPT_IER : GT_3_INTERRUPT<0x4433C> { }; + /** + * GEN11+ interrupt registers + * IHD-OS-TGL-Vol 2c-12.21 part1 p. 1039 ff. + */ + struct GEN12_GFX_MSTR_INTR : Register<0x190010, 32> + { + struct Master_interrupt_enable : Bitfield<31, 1> { }; + struct Display : Bitfield<16, 1> { }; + struct Gt_dw_1 : Bitfield< 1, 1> { }; + struct Gt_dw_0 : Bitfield< 0, 1> { }; + }; + + /* p. 1089 */ + struct GEN12_GT_INTR_DW0 : Register<0x190018, 32> + { + struct Rcs0 : Bitfield<0, 1> { }; + }; + + /* p. 1091 */ + struct GEN12_INTR_IDENTITY_REG0 : Register<0x190060, 32> + { + struct Valid : Bitfield<31, 1> { }; + struct Engine_interrupt : Bitfield<0, 16> { }; + }; + + /* + * p. 1092 + * + * Select engine ID to read INTR_IDENTITY from, use only one bit at a time, + * layout is as INTR_DW0 register + */ + struct GEN12_INTR_IIR_SELECTOR0 : Register<0x190070, 32, true> + { + struct Rcs0 : Bitfield<0, 1> { }; + }; + + /* p. 1077 */ + struct GEN12_RENDER_COPY_INTR_ENABLE : Register<0x190030, 32> + { + struct Render_enable : Bitfield<16, 16> { }; + struct Copy_enable : Bitfield< 0, 16> { }; + }; + + /* + * IHD-OS-TGL-Vol 2d-12.21 p. 818 ff + */ + struct GEN12_RENDER_INTR_VEC : Genode::Register<16> + { + struct Catastrophic_error : Bitfield<15, 1> { }; + struct Eu_restart : Bitfield<14, 1> { }; + struct Context_stall : Bitfield<13, 1> { }; + struct Cs_wait_on_semaphore : Bitfield<11, 1> { }; + struct Cs_ctx_switch_interrupt : Bitfield< 8, 1> { }; + struct Legacy_page_fault_error : Bitfield< 7, 1> { }; + struct Cs_watchdog_counter_expired : Bitfield< 6, 1> { }; + struct Cs_pipe_control_notify : Bitfield< 4, 1> { }; + struct Cs_error_interrupt : Bitfield< 3, 1> { }; + struct Cs_mi_user_interrupt : Bitfield< 0, 1> { }; + }; + /************************** ** Page-table registers ** **************************/ @@ -696,6 +756,36 @@ class Igd::Mmio : public Platform::Device::Mmio struct ELEM_DESCRIPTOR1 : Register<0x4400, 32> { }; struct ELEM_DESCRIPTOR2 : Register<0x4404, 32> { }; + /** + * GEN9+ GPM unit lx 5.15 + */ + struct CTC_MODE : Register<0xa26c, 32> + { + struct Source_divide_logic : Bitfield<0, 1> { }; + }; + + /** + * GEN8+ RPM unit + */ + struct RPM_CONFIG0 : Register<0x0d00, 32> + { + struct Ctc_shift : Bitfield<1, 2> { }; + struct Crystal_clock_frequency : Bitfield<3, 3> { }; + + static uint32_t clock_frequency(Crystal_clock_frequency::access_t freq) + { + switch (freq) { + case 0: return 24'000'000; + case 1: return 19'200'000; + case 2: return 38'400'000; + case 3: return 25'000'000; + default: + Genode::error("Unknown crystal clock frequency: ", freq); + return 0; + } + } + }; + /** * Forcewake for GEN9 & GEN10, lx 5.13 */ @@ -823,6 +913,28 @@ class Igd::Mmio : public Platform::Device::Mmio */ struct EU_DISABLE : Register_array<0x9134, 32, 12, 8> { }; + /* + * IHD-OS-TGL-Vol 2c-12.21 part2 p. 81 + */ + struct MIRROR_EU_DISABLE0 : Register<0x9134, 32> + { + struct Disabled : Bitfield<0, 8> { }; + }; + + /* + * IHD-OS-TGL-Vol 2c-12.2 part 2 p.98 + */ + struct MIRROR_GT_SLICE_EN : Register<0x9138, 32> + { + struct Enabled : Bitfield<0, 8> { }; + }; + + /* + * IHD-OS-TGL-Vol 2c-12.21 part2 p.97 + */ + struct MIRROR_GT_DSS_ENABLE : Register<0x913c, 32> { }; + + /* * IHD-OS-BDW-Vol 2c-11.15 p. 611 ff. */ @@ -835,6 +947,7 @@ class Igd::Mmio : public Platform::Device::Mmio struct Fence_valid : Bitfield< 0, 1> { }; }; + /* * IHD-OS-BDW-Vol 12-11.15 p. 5 */ @@ -845,6 +958,7 @@ class Igd::Mmio : public Platform::Device::Mmio ** EXECLIST registers ** ************************/ + /* GEN8-11 */ /* * IHD-OS-BDW-Vol 2c-11.15 p. 435 */ @@ -895,6 +1009,34 @@ class Igd::Mmio : public Platform::Device::Mmio struct EXECLIST_SUBMITPORT_VCSUNIT1 : EXECLIST_SUBMITPORT_BASE<0x1C000> { }; struct EXECLIST_SUBMITPORT_BSCUNIT : EXECLIST_SUBMITPORT_BASE<0x22000> { }; + /* GEN12 */ + template + struct GEN12_EXECLIST_STATUS_BASE : Register + { + using B = Register; + struct Execution_queue_invalid : B::template Bitfield<0, 1> { }; + }; + + struct GEN12_EXECLIST_STATUS_RSCUNIT : GEN12_EXECLIST_STATUS_BASE<0x02000> { }; + + /* + * IHD-OS-TGL-Vol 2c-12.21 p. 896 + */ + struct GEN12_EXECLIST_SQ_CONTENTS_RSCUNIT : Register_array<0x2510, 32, 16, 32> { }; + + /* + * IHD-OS-TGL-Vol 2c-12.21 p.891 + */ + template + struct GEN12_EXECLIST_CONTROL_BASE : Register + { + using B = Register; + /* load submission queue into exec queue */ + struct Load : B::template Bitfield<0, 1> { }; + }; + + struct GEN12_EXECLIST_CONTROL_RSCUNIT : GEN12_EXECLIST_CONTROL_BASE<0x02000> { }; + /* * IHD-OS-BDW-Vol 2c-11.15 p. 266 ff. * IHD-OS-BDW-Vol 6-11.15 p. 19 ff. @@ -1023,7 +1165,6 @@ class Igd::Mmio : public Platform::Device::Mmio using namespace Genode; while (read()) { - log(__func__, " ", __LINE__, " wait ", Hex(read())); _delayer.usleep(500 * 1000); _fw_enable_wa(); @@ -1048,7 +1189,6 @@ class Igd::Mmio : public Platform::Device::Mmio using namespace Genode; while (read()) { - log(__func__, " ", __LINE__, " wait ", Hex(read())); _delayer.usleep(500 * 1000); } @@ -1059,12 +1199,7 @@ class Igd::Mmio : public Platform::Device::Mmio _delayer.usleep(100 * 1000); - log(__func__, " ", __LINE__, " ", - Genode::Hex(read()), " ", - Genode::Hex(read())); - while (!(read())) { - log(__func__, " ", __LINE__, " wait ", Hex(read())); _delayer.usleep(500 * 1000); } @@ -1092,8 +1227,6 @@ class Igd::Mmio : public Platform::Device::Mmio write(v); while (read()) { - Genode::log(__func__, " ", __LINE__, " wait ", - Genode::Hex(read())); _delayer.usleep(500 * 1000); } } @@ -1119,6 +1252,12 @@ class Igd::Mmio : public Platform::Device::Mmio /* TODO DE intr handling (p. 363) */ } + void _intr_reset_gen12() + { + write(0); + write_post(0xffffffff); + } + /** * Enable interrupts */ @@ -1201,6 +1340,16 @@ class Igd::Mmio : public Platform::Device::Mmio write_post(1); } + void _intr_enable_gen12() + { + GEN12_RENDER_INTR_VEC::access_t vec { 0 }; + GEN12_RENDER_INTR_VEC::Cs_mi_user_interrupt::set(vec, 1); + GEN12_RENDER_INTR_VEC::Cs_ctx_switch_interrupt::set(vec, 1); + write(vec); + write_post(~vec); + write(1); + } + /** * Disable Render P-states */ @@ -1421,6 +1570,31 @@ class Igd::Mmio : public Platform::Device::Mmio write(v); } + uint32_t _clock_frequency_gen12() + { + uint32_t freq { 0 }; + + /* TIMESTAMP_OVERRIDE when source divide logic */ + if (read()) { + Genode::error("clock frequency: source divide not implemented"); + } + /* RMP_CONFIG when crystal logic */ + else { + freq = RPM_CONFIG0::clock_frequency( + read()); + + Genode::log("clock frequency: ", freq, " Hz from crystal logic"); + + /* + * Shift by Ctc_shift for lowest timestamp counter because counter may + * not increment at every cycle + */ + freq >>= 3 - read(); + } + + return freq; + } + public: Mmio(Platform::Device & device, Genode::Env & env) @@ -1433,6 +1607,15 @@ class Igd::Mmio : public Platform::Device::Mmio (void)read(); } + + uint32_t clock_frequency(unsigned const generation) + { + if (generation >= 11) + return _clock_frequency_gen12(); + + return 0; + } + void forcewake_gen8_enable() { _fw_enable(FORCEWAKE_ID_RENDER); } void forcewake_gen8_disable() { _fw_disable(FORCEWAKE_ID_RENDER); } @@ -1440,12 +1623,12 @@ class Igd::Mmio : public Platform::Device::Mmio { _fw_enable_gt(); _fw_enable_render(); - _fw_enable_media(); + //_fw_enable_media(); } void forcewake_gen9_disable() { - _fw_disable_media(); + //_fw_disable_media(); _fw_disable_render(); _fw_disable_gt(); } @@ -1457,6 +1640,7 @@ class Igd::Mmio : public Platform::Device::Mmio forcewake_gen8_enable(); return; case 9: + case 12: forcewake_gen9_enable(); return; default: @@ -1470,7 +1654,8 @@ class Igd::Mmio : public Platform::Device::Mmio case 8: forcewake_gen8_disable(); return; - case 9: + case 9: [[fallthrough]]; + case 12: forcewake_gen9_disable(); return; default: @@ -1486,7 +1671,10 @@ class Igd::Mmio : public Platform::Device::Mmio return; case 9: reset_gen9(); - return; + break; + case 12: + reset_gen12(); + break;; default: Genode::error(__func__, " unsupported generation ", generation); } @@ -1516,29 +1704,101 @@ class Igd::Mmio : public Platform::Device::Mmio _set_page_attributes(); } + void reset_gen12() + { + _intr_reset_gen12(); + _fw_reset_gen9(); + forcewake_gen9_enable(); + _reset_device(); + _reset_fences(); + + _disable_nde_handshake(); + _set_page_attributes(); + } + void init() { _disable_rps(); _enable_execlist(); } - void enable_intr() - { + void enable_intr(unsigned const generation) + { write(0xffffff00); - _intr_enable(); + if (generation < 11) + _intr_enable(); + else + _intr_enable_gen12(); } - void disable_master_irq() + void disable_master_irq(unsigned const generation) { - write_post(0); + if (generation < 11) + write_post(0); + else + write(0); } - void enable_master_irq() + void enable_master_irq(unsigned const generation) { - write_post(1); + if (generation < 11) + write_post(1); + else + write(1); } + bool render_irq(unsigned const generation) + { + if (generation < 11) + return read() == 1; + else { + if (read() == 1 && + read() == 1) + return true; + } + return false; + } + + GEN12_RENDER_INTR_VEC::access_t read_irq_vector(unsigned const generation) + { + GEN12_RENDER_INTR_VEC::access_t vec = 0; + if (generation < 11) { + vec = read(); + } else { + write(1); + + try { + wait_for(Attempts(50), Microseconds(500), _delayer, + GEN12_INTR_IDENTITY_REG0::Valid::Equal(1)); + } catch (Polling_timeout) { + Genode::error(__func__, " IRQ vector not valid"); + return vec; + } + vec = read(); + write(1); + } + + return vec; + }; + + void clear_render_irq(unsigned const generation, Genode::uint16_t v) + { + if (generation < 11) + write_post(v); + else + write(1); + } + + bool display_irq(unsigned const generation) + { + if (generation < 11) + return read() != 0; + else + return read() == 1; + } + + void flush_gfx_tlb() { _gfx_flush_cntl(); } void clear_errors() diff --git a/repos/os/src/drivers/gpu/intel/ppgtt_allocator.h b/repos/os/src/drivers/gpu/intel/ppgtt_allocator.h index 9860aaee05..e661b613ea 100644 --- a/repos/os/src/drivers/gpu/intel/ppgtt_allocator.h +++ b/repos/os/src/drivers/gpu/intel/ppgtt_allocator.h @@ -73,9 +73,9 @@ class Igd::Ppgtt_allocator : public Genode::Translation_table_allocator try { ds = _backend.alloc(alloc_size); } - catch (Genode::Out_of_ram) { return Alloc_error::OUT_OF_RAM; } - catch (Genode::Out_of_caps) { return Alloc_error::OUT_OF_CAPS; } - catch (...) { return Alloc_error::DENIED; } + catch (Gpu::Session::Out_of_ram) { throw; } + catch (Gpu::Session::Out_of_caps) { throw; } + catch (...) { return Alloc_error::DENIED; } Alloc_error alloc_error = Alloc_error::DENIED; From aafe9ae2d62626beaa09a75ec17bfcfa909a65a2 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Mon, 25 Apr 2022 09:53:48 +0200 Subject: [PATCH 0053/1921] sculpt: add Intel Xe GPU (Tigerlake) issue #4664 --- repos/gems/sculpt/gpu_drv/intel | 1 + 1 file changed, 1 insertion(+) diff --git a/repos/gems/sculpt/gpu_drv/intel b/repos/gems/sculpt/gpu_drv/intel index cf4a9a53e3..aa28360135 100644 --- a/repos/gems/sculpt/gpu_drv/intel +++ b/repos/gems/sculpt/gpu_drv/intel @@ -8,4 +8,5 @@ + From 25c1cdec9507ac1349229d88ab8fa897ef136d31 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Thu, 10 Nov 2022 17:10:12 +0100 Subject: [PATCH 0054/1921] libdrm/iris: GEN12+ * timestamp fequency * topology issue #4664 --- repos/libports/src/lib/libdrm/ioctl_iris.cc | 61 ++++++++++++++++++--- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_iris.cc b/repos/libports/src/lib/libdrm/ioctl_iris.cc index bb96d0d1c5..f742cfe8a7 100644 --- a/repos/libports/src/lib/libdrm/ioctl_iris.cc +++ b/repos/libports/src/lib/libdrm/ioctl_iris.cc @@ -793,9 +793,10 @@ class Drm_call *value = _gpu_info.revision.value; return 0; case I915_PARAM_CS_TIMESTAMP_FREQUENCY: - if (verbose_ioctl) + *value = _gpu_info.clock_frequency.value; + if (verbose_ioctl && *value == 0) Genode::error("I915_PARAM_CS_TIMESTAMP_FREQUENCY not supported"); - return -1; + return *value ? 0 : -1; case I915_PARAM_SLICE_MASK: *value = _gpu_info.slice_mask.value; return 0; @@ -1023,15 +1024,61 @@ class Drm_call return 0; } + + int _device_create_topology(void *arg) + { + auto topo = reinterpret_cast(arg); + + Gpu::Info_intel::Topology const &info = _gpu_info.topology; + + size_t slice_length = sizeof(info.slice_mask); + size_t subslice_length = info.max_slices * info.ss_stride; + size_t eu_length = info.max_slices * info.max_subslices * info.eu_stride; + + Genode::memset(topo, 0, sizeof(*topo)); + topo->max_slices = info.max_slices; + topo->max_subslices = info.max_subslices; + topo->max_eus_per_subslice = info.max_eus_per_subslice; + topo->subslice_offset = slice_length; + topo->subslice_stride = info.ss_stride; + topo->eu_offset = slice_length + subslice_length; + topo->eu_stride = info.eu_stride; + + Genode::memcpy(topo->data, &info.slice_mask, slice_length); + Genode::memcpy(topo->data + slice_length, info.subslice_mask, + subslice_length); + Genode::memcpy(topo->data + slice_length + subslice_length, + info.eu_mask, eu_length); + + return 0; + } + int _device_query(void *arg) { auto const query = reinterpret_cast(arg); - if (verbose_ioctl) - Genode::error("device specific iocall DRM_I915_QUERY not supported" - " - num_items=", query->num_items); + if (query->num_items != 1) { + if (verbose_ioctl) + Genode::error("device specific iocall DRM_I915_QUERY for num_items != 1 not supported" + " - num_items=", query->num_items); + return -1; + } - return -1; + auto const item = reinterpret_cast(query->items_ptr); + + if (item->query_id != DRM_I915_QUERY_TOPOLOGY_INFO || _gpu_info.topology.valid == false) { + if (verbose_ioctl) + Genode::error("device specific iocall DRM_I915_QUERY not supported for " + " - query_id: ", Genode::Hex(item->query_id)); + return -1; + } + + if (!item->data_ptr) { + item->length = 1; + return 0; + } + + return _device_create_topology((void *)item->data_ptr); } int _device_ioctl(unsigned cmd, void *arg) @@ -1385,6 +1432,6 @@ extern "C" int genode_ioctl(int /* fd */, unsigned long request, void *arg) if (verbose_ioctl) { dump_ioctl(request); } int const ret = _call->ioctl(request, arg); - if (verbose_ioctl) { Genode::log("returned ", ret); } + if (verbose_ioctl) { Genode::log("returned ", ret, " from ", __builtin_return_address(0)); } return ret; } From c0367fc30e2083fd31dca2dbc223ff6975b4d1dc Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Mon, 7 Nov 2022 09:39:14 +0100 Subject: [PATCH 0055/1921] libdrm/iris: synchronization The Morph browser seems to access libdrm multi-threaded. Put this into a separate commit in order to revert it easily. issue #4664 --- repos/libports/src/lib/libdrm/ioctl_iris.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/libports/src/lib/libdrm/ioctl_iris.cc b/repos/libports/src/lib/libdrm/ioctl_iris.cc index f742cfe8a7..69f20325f8 100644 --- a/repos/libports/src/lib/libdrm/ioctl_iris.cc +++ b/repos/libports/src/lib/libdrm/ioctl_iris.cc @@ -536,6 +536,7 @@ class Drm_call Genode::Env &_env { *vfs_gpu_env() }; Genode::Heap _heap { _env.ram(), _env.rm() }; Gpu::Connection _gpu_session { _env }; + Genode::Mutex _drm_mutex { }; Gpu::Info_intel const &_gpu_info { *_gpu_session.attached_info() }; @@ -1363,6 +1364,8 @@ class Drm_call int ioctl(unsigned long request, void *arg) { + Genode::Mutex::Guard guard { _drm_mutex }; + bool const device = device_ioctl(request); return device ? _device_ioctl(device_number(request), arg) : _generic_ioctl(command_number(request), arg); From 0b569ed8c77fd746ff3b655d20e277e82e36e799 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Tue, 8 Nov 2022 14:44:39 +0100 Subject: [PATCH 0056/1921] mesa/iris: remove binder patch There is one binder with one memory zone per OpenGL context. The patch was needed before because Genode didn't have proper context support (separate page tables) leading to binders from one or more context being allocated to the same GPU address with the same page tables. This was clearly an error and is fixed with context support. issue #4664 --- repos/libports/ports/mesa.hash | 2 +- repos/libports/ports/mesa.port | 1 - .../src/lib/mesa/patches/iris_binder.patch | 26 ------------------- 3 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 repos/libports/src/lib/mesa/patches/iris_binder.patch diff --git a/repos/libports/ports/mesa.hash b/repos/libports/ports/mesa.hash index 10cd30a7c9..9b2d18690d 100644 --- a/repos/libports/ports/mesa.hash +++ b/repos/libports/ports/mesa.hash @@ -1 +1 @@ -a195203391df18dabe0e9c247301d9f3df1c8192 +5762ad18c4b5d48ad6b8651fc554e65d656e144f diff --git a/repos/libports/ports/mesa.port b/repos/libports/ports/mesa.port index ffb87f3a4d..4749b492ac 100644 --- a/repos/libports/ports/mesa.port +++ b/repos/libports/ports/mesa.port @@ -18,7 +18,6 @@ PATCHES := src/lib/mesa/patches/bitset_redefined.patch \ src/lib/mesa/patches/iris.patch \ src/lib/mesa/patches/iris_bufmgr_tmp.patch \ src/lib/mesa/patches/iris_bufmgr_unmap.patch \ - src/lib/mesa/patches/iris_binder.patch \ src/lib/mesa/patches/iris_disable_compute.patch \ src/lib/mesa/patches/lseek.patch \ src/lib/mesa/patches/mesa.patch \ diff --git a/repos/libports/src/lib/mesa/patches/iris_binder.patch b/repos/libports/src/lib/mesa/patches/iris_binder.patch deleted file mode 100644 index 77f105bd05..0000000000 --- a/repos/libports/src/lib/mesa/patches/iris_binder.patch +++ /dev/null @@ -1,26 +0,0 @@ -The binder re-uses vgpu addresses of buffer objects, which are scheduled -to be deleted, but not yet destroyed. The drm_ioctl backend still have a -vgpu mapping of the not yet destroyed buffer object. When the binder reuses -the vgpu address for a new/another buffer object, the gpu multiplexer will -complain about an overmap. To avoid that, as workaround, don't reuse vgpu -addresses immediately in the binder. ---- a/src/lib/mesa/src/gallium/drivers/iris/iris_binder.c -+++ a/src/lib/mesa/src/gallium/drivers/iris/iris_binder.c -@@ -71,7 +71,7 @@ - struct iris_bufmgr *bufmgr = screen->bufmgr; - struct iris_binder *binder = &ice->state.binder; - -- uint64_t next_address = IRIS_MEMZONE_BINDER_START; -+ static uint64_t next_address = IRIS_MEMZONE_BINDER_START; - - if (binder->bo) { - /* Place the new binder just after the old binder, unless we've hit the -@@ -100,6 +100,8 @@ - */ - ice->state.dirty |= IRIS_DIRTY_RENDER_BUFFER; - ice->state.stage_dirty |= IRIS_ALL_STAGE_DIRTY_BINDINGS; -+ -+ next_address += IRIS_BINDER_SIZE; - } - - static uint32_t From 3936fe25dc04b0d4eec30393959c2df0c544dd70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 14 Nov 2022 13:27:31 +0100 Subject: [PATCH 0057/1921] sculpt: fix VESA framebuffer driver integration The platform driver configuration is missing the required 'info' attribute that allows the 'vesa_fb_drv' to map the proper I/O memory address of the framebuffer. In addition the driver requires at least '2' more CAPs, so raise the quota to '110'. Fixes #4668. --- repos/gems/sculpt/drivers/pc | 2 +- repos/gems/src/app/driver_manager/main.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/gems/sculpt/drivers/pc b/repos/gems/sculpt/drivers/pc index 8f2f2879cd..937d982e1d 100644 --- a/repos/gems/sculpt/drivers/pc +++ b/repos/gems/sculpt/drivers/pc @@ -156,7 +156,7 @@ - + diff --git a/repos/gems/src/app/driver_manager/main.cc b/repos/gems/src/app/driver_manager/main.cc index 85be9c78a4..da4a3ac9cb 100644 --- a/repos/gems/src/app/driver_manager/main.cc +++ b/repos/gems/src/app/driver_manager/main.cc @@ -189,7 +189,7 @@ struct Driver_manager::Vesa_fb_driver : Device_driver { xml.node("start", [&] () { _gen_common_start_node_content(xml, "vesa_fb_drv", "vesa_fb_drv", - Ram_quota{8*1024*1024}, Cap_quota{100}, + Ram_quota{8*1024*1024}, Cap_quota{110}, Priority{-1}, Version{0}); xml.node("route", [&] () { _gen_config_route(xml, "fb_drv.config"); From d323072bb689d6f164d08555d86b02c08e299e4c Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 1 Nov 2022 17:14:54 +0100 Subject: [PATCH 0058/1921] libc: build 'libc-string' library with -O3 Fixes #4658 --- repos/libports/lib/mk/libc-string.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repos/libports/lib/mk/libc-string.mk b/repos/libports/lib/mk/libc-string.mk index 74128c27bf..ac787cbf29 100644 --- a/repos/libports/lib/mk/libc-string.mk +++ b/repos/libports/lib/mk/libc-string.mk @@ -16,6 +16,8 @@ SRC_C = $(filter-out $(FILTER_OUT),$(notdir $(wildcard $(LIBC_STRING_DIR)/*.c))) # prevent the generation of a 'memset()' call in 'memset()' CC_OPT_memset += -fno-tree-loop-distribute-patterns +override CC_OLEVEL := -O3 + include $(REP_DIR)/lib/mk/libc-common.inc vpath %.c $(LIBC_STRING_DIR) From f5ab6ea7ae23836b2942629c5e37c8f9d2492dcf Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Fri, 4 Nov 2022 16:47:18 +0100 Subject: [PATCH 0059/1921] libports: update expat to 2.5.0 Fixes #4662 --- repos/libports/ports/expat.hash | 2 +- repos/libports/ports/expat.port | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/libports/ports/expat.hash b/repos/libports/ports/expat.hash index c53f630f05..6948ea03f3 100644 --- a/repos/libports/ports/expat.hash +++ b/repos/libports/ports/expat.hash @@ -1 +1 @@ -506479a4c858d32e9d2e49fb6436842105539e06 +9e709d49f9245c0df1849e9a89879c38010e1192 diff --git a/repos/libports/ports/expat.port b/repos/libports/ports/expat.port index 75e23c4e44..6f521667c2 100644 --- a/repos/libports/ports/expat.port +++ b/repos/libports/ports/expat.port @@ -1,10 +1,10 @@ LICENSE := MIT DOWNLOADS := expat.archive -VERSION := 2.4.9 +VERSION := 2.5.0 RELEASE := R_$(subst .,_,$(VERSION)) URL(expat) := https://github.com/libexpat/libexpat/releases/download/$(RELEASE)/expat-$(VERSION).tar.gz -SHA(expat) := 4415710268555b32c4e5ab06a583bea9fec8ff89333b218b70b43d4ca10e38fa +SHA(expat) := 6b902ab103843592be5e99504f846ec109c1abb692e85347587f237a4ffa1033 DIR(expat) := src/lib/expat/contrib DIRS := include From a89eb5e7e3f078a689e798cc07e2e9f56499f1b5 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 15 Nov 2022 14:05:31 +0100 Subject: [PATCH 0060/1921] Increase acpi_drv RAM/CAP quota in USB tests The amount of 7M/350 matches repos/gems/sculpt/drivers/pc. --- repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config b/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config index 08b2fbe9b4..25501a0b46 100644 --- a/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config +++ b/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config @@ -33,8 +33,8 @@ - - + + From b66987e1ce906b813929758295d884209eb14dbd Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 4 Nov 2022 08:04:42 +0100 Subject: [PATCH 0061/1921] base-nova: export iommu feature from HIP to platform_info issue #4665 --- repos/base-nova/include/nova/syscall-generic.h | 5 +++-- repos/base-nova/src/core/platform.cc | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/repos/base-nova/include/nova/syscall-generic.h b/repos/base-nova/include/nova/syscall-generic.h index f37e4042c3..1654bdbc3f 100644 --- a/repos/base-nova/include/nova/syscall-generic.h +++ b/repos/base-nova/include/nova/syscall-generic.h @@ -128,8 +128,9 @@ namespace Nova { uint32_t const tsc_freq; /* time-stamp counter frequency in kHz */ uint32_t const bus_freq; /* bus frequency in kHz */ - bool has_feature_vmx() const { return feature_flags & (1 << 1); } - bool has_feature_svm() const { return feature_flags & (1 << 2); } + bool has_feature_iommu() const { return feature_flags & (1 << 0); } + bool has_feature_vmx() const { return feature_flags & (1 << 1); } + bool has_feature_svm() const { return feature_flags & (1 << 2); } struct Cpu_desc { uint8_t flags; diff --git a/repos/base-nova/src/core/platform.cc b/repos/base-nova/src/core/platform.cc index 8a563515c9..111edf17de 100644 --- a/repos/base-nova/src/core/platform.cc +++ b/repos/base-nova/src/core/platform.cc @@ -685,6 +685,7 @@ Platform::Platform() xml.attribute("name", "nova"); xml.attribute("acpi", true); xml.attribute("msi" , true); + xml.attribute("iommu", hip.has_feature_iommu()); }); if (efi_sys_tab_phy) { xml.node("efi-system-table", [&] () { From 77fc2f1e8636a4e9c857c2a78f4aca2f7eb4a314 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 4 Nov 2022 08:06:25 +0100 Subject: [PATCH 0062/1921] platfrom_drv: map DMA memory non-natural when iommu is present Consume '' tag from 'devices' report. In case an IOMMU is present map physical memory to arbitrary locations within IO page table range 1K-4G. This way every device PD has access to ~4GB of DMA space. issue #4665 --- repos/os/src/drivers/platform/common.h | 26 +++++-- .../src/drivers/platform/device_component.cc | 2 +- repos/os/src/drivers/platform/device_pd.cc | 76 ++++++++++++++++++- repos/os/src/drivers/platform/device_pd.h | 12 ++- repos/os/src/drivers/platform/root.cc | 8 +- repos/os/src/drivers/platform/root.h | 4 +- .../src/drivers/platform/session_component.cc | 26 +++++-- .../src/drivers/platform/session_component.h | 9 ++- 8 files changed, 137 insertions(+), 26 deletions(-) diff --git a/repos/os/src/drivers/platform/common.h b/repos/os/src/drivers/platform/common.h index 49adc6a7f4..bcbf881105 100644 --- a/repos/os/src/drivers/platform/common.h +++ b/repos/os/src/drivers/platform/common.h @@ -21,18 +21,20 @@ class Driver::Common : Device_reporter Env & _env; String<64> _rom_name; - Attached_rom_dataspace _devices_rom { _env, _rom_name.string() }; - Heap _heap { _env.ram(), _env.rm() }; - Sliced_heap _sliced_heap { _env.ram(), _env.rm() }; - Device_model _devices { _env, _heap, *this }; - Signal_handler _dev_handler { _env.ep(), *this, - &Common::_handle_devices }; + Attached_rom_dataspace _devices_rom { _env, _rom_name.string() }; + Attached_rom_dataspace _platform_info { _env, "platform_info" }; + Heap _heap { _env.ram(), _env.rm() }; + Sliced_heap _sliced_heap { _env.ram(), _env.rm() }; + Device_model _devices { _env, _heap, *this }; + Signal_handler _dev_handler { _env.ep(), *this, + &Common::_handle_devices }; Driver::Root _root; Constructible _cfg_reporter { }; Constructible _dev_reporter { }; void _handle_devices(); + bool _iommu(); public: @@ -63,6 +65,16 @@ void Driver::Common::_handle_devices() } +bool Driver::Common::_iommu() +{ + bool iommu = false; + _platform_info.xml().with_optional_sub_node("kernel", [&] (Xml_node xml) { + iommu = xml.attribute_value("iommu", false); }); + + return iommu; +} + + void Driver::Common::update_report() { if (_dev_reporter.constructed()) @@ -103,7 +115,7 @@ Driver::Common::Common(Genode::Env & env, _env(env), _rom_name(config_rom.xml().attribute_value("devices_rom", String<64>("devices"))), - _root(_env, _sliced_heap, config_rom, _devices) + _root(_env, _sliced_heap, config_rom, _devices, _iommu()) { _devices_rom.sigh(_dev_handler); _handle_devices(); diff --git a/repos/os/src/drivers/platform/device_component.cc b/repos/os/src/drivers/platform/device_component.cc index 67f8851638..8de57a28b4 100644 --- a/repos/os/src/drivers/platform/device_component.cc +++ b/repos/os/src/drivers/platform/device_component.cc @@ -220,7 +220,7 @@ Device_component::Device_component(Registry & registry, iomem.io_mem.construct(_env, iomem.range.start, iomem.range.size, false); session.device_pd().attach_dma_mem(iomem.io_mem->dataspace(), - iomem.range.start); + iomem.range.start, true); }); } catch(...) { _release_resources(); diff --git a/repos/os/src/drivers/platform/device_pd.cc b/repos/os/src/drivers/platform/device_pd.cc index 9fe5d88904..362bc1718c 100644 --- a/repos/os/src/drivers/platform/device_pd.cc +++ b/repos/os/src/drivers/platform/device_pd.cc @@ -67,13 +67,65 @@ void Device_pd::Region_map_client::upgrade_caps() } -void Device_pd::attach_dma_mem(Dataspace_capability ds_cap, - addr_t const dma_addr) +addr_t Device_pd::_dma_addr(addr_t const phys_addr, + size_t const size, + bool const force_phys_addr) +{ + using Range_ok = Range_allocator::Range_ok; + using Alloc_error = Allocator::Alloc_error; + + if (!_iommu) return phys_addr; + + /* + * 1:1 mapping (remove from DMA memory allocator) + */ + if (force_phys_addr) { + _dma_alloc.remove_range(phys_addr, size).with_result( + [&] (Range_ok) -> addr_t { return phys_addr; }, + [&] (Alloc_error err) -> addr_t { + switch (err) { + case Alloc_error::OUT_OF_RAM: throw Out_of_ram(); + case Alloc_error::OUT_OF_CAPS: throw Out_of_caps(); + case Alloc_error::DENIED: + error("Could not free DMA range ", + Hex(phys_addr), " - ", Hex(phys_addr + size - 1), + " (error: ", err, ")"); + break; + } + return 0; + }); + } + + return _dma_alloc.alloc_aligned(size, 12).convert( + [&] (void *ptr) { return (addr_t)ptr; }, + [&] (Alloc_error err) -> addr_t { + switch (err) { + case Alloc_error::OUT_OF_RAM: throw Out_of_ram(); + case Alloc_error::OUT_OF_CAPS: throw Out_of_caps(); + case Alloc_error::DENIED: + error("Could not allocate DMA area of size: ", size, + " total avail: ", _dma_alloc.avail(), + " (error: ", err, ")"); + break; + }; + return 0; + }); +} + + +addr_t Device_pd::attach_dma_mem(Dataspace_capability ds_cap, + addr_t const phys_addr, + bool const force_phys_addr) { using namespace Genode; - bool retry = false; + bool retry = false; + Dataspace_client ds_client(ds_cap); + size_t size = ds_client.size(); + addr_t dma_addr = _dma_addr(phys_addr, size, force_phys_addr); + + if (dma_addr == 0) return 0; do { _pd.attach_dma(ds_cap, dma_addr).with_result( @@ -100,6 +152,15 @@ void Device_pd::attach_dma_mem(Dataspace_capability ds_cap, } ); } while (retry); + + return dma_addr; +} + + +void Device_pd::free_dma_mem(addr_t dma_addr) +{ + if (_iommu) + _dma_alloc.free((void *)dma_addr); } @@ -125,11 +186,18 @@ void Device_pd::assign_pci(Io_mem_dataspace_capability const io_mem_cap, Device_pd::Device_pd(Env & env, + Allocator & md_alloc, Ram_quota_guard & ram_guard, - Cap_quota_guard & cap_guard) + Cap_quota_guard & cap_guard, + bool const iommu) : _pd(env, Pd_connection::Device_pd()), + _dma_alloc(&md_alloc), _iommu(iommu), _address_space(env, _pd, ram_guard, cap_guard) { + /* 0x1000 - 4GB per device PD */ + enum { DMA_SIZE = 0xffffe000 }; + _dma_alloc.add_range(0x1000, DMA_SIZE); + _pd.ref_account(env.pd_session_cap()); } diff --git a/repos/os/src/drivers/platform/device_pd.h b/repos/os/src/drivers/platform/device_pd.h index f8e8f2a0ae..2ecc1fb1c1 100644 --- a/repos/os/src/drivers/platform/device_pd.h +++ b/repos/os/src/drivers/platform/device_pd.h @@ -15,6 +15,7 @@ #define _SRC__DRIVERS__PLATFORM__DEVICE_PD_H_ /* base */ +#include #include #include #include @@ -32,6 +33,8 @@ class Driver::Device_pd private: Pd_connection _pd; + Allocator_avl _dma_alloc; + bool const _iommu; /** * Custom handling of PD-session depletion during attach operations @@ -70,13 +73,18 @@ class Driver::Device_pd void upgrade_caps(); } _address_space; + addr_t _dma_addr(addr_t phys_addr, size_t size, bool const force_phys_addr); + public: Device_pd(Env &env, + Allocator &md_alloc, Ram_quota_guard &ram_guard, - Cap_quota_guard &cap_guard); + Cap_quota_guard &cap_guard, + bool const iommu); - void attach_dma_mem(Dataspace_capability, addr_t dma_addr); + addr_t attach_dma_mem(Dataspace_capability, addr_t phys_addr, bool force_phys_addr); + void free_dma_mem(addr_t dma_addr); void assign_pci(Io_mem_dataspace_capability const, Pci::Bdf const); }; diff --git a/repos/os/src/drivers/platform/root.cc b/repos/os/src/drivers/platform/root.cc index db1bb1b62c..173b220e4d 100644 --- a/repos/os/src/drivers/platform/root.cc +++ b/repos/os/src/drivers/platform/root.cc @@ -46,7 +46,8 @@ Driver::Session_component * Driver::Root::_create_session(const char *args) session_resources_from_args(args), session_diag_from_args(args), policy.attribute_value("info", false), - policy.attribute_value("version", Version())); + policy.attribute_value("version", Version()), + _iommu); } catch (Session_policy::No_policy_defined) { error("Invalid session request, no matching policy for ", "'", label_from_args(args).string(), "'"); @@ -70,6 +71,7 @@ void Driver::Root::_upgrade_session(Session_component * sc, const char * args) Driver::Root::Root(Env & env, Sliced_heap & sliced_heap, Attached_rom_dataspace const & config, - Device_model & devices) + Device_model & devices, + bool const iommu) : Root_component(env.ep(), sliced_heap), - _env(env), _config(config), _devices(devices) { } + _env(env), _config(config), _devices(devices), _iommu(iommu) { } diff --git a/repos/os/src/drivers/platform/root.h b/repos/os/src/drivers/platform/root.h index 93d8ed0983..c5a761132b 100644 --- a/repos/os/src/drivers/platform/root.h +++ b/repos/os/src/drivers/platform/root.h @@ -30,7 +30,8 @@ class Driver::Root : public Root_component Root(Env & env, Sliced_heap & sliced_heap, Attached_rom_dataspace const & config, - Device_model & devices); + Device_model & devices, + bool const iommu); void update_policy(); @@ -43,6 +44,7 @@ class Driver::Root : public Root_component Env & _env; Attached_rom_dataspace const & _config; Device_model & _devices; + bool const _iommu; Registry _sessions {}; }; diff --git a/repos/os/src/drivers/platform/session_component.cc b/repos/os/src/drivers/platform/session_component.cc index 68168094fe..ad6c405bbe 100644 --- a/repos/os/src/drivers/platform/session_component.cc +++ b/repos/os/src/drivers/platform/session_component.cc @@ -44,6 +44,7 @@ void Session_component::_release_device(Device_component & dc) void Session_component::_free_dma_buffer(Dma_buffer & buf) { Ram_dataspace_capability cap = buf.cap; + _device_pd.free_dma_mem(buf.dma_addr); destroy(heap(), &buf); _env_ram.free(cap); } @@ -195,10 +196,9 @@ Session_component::alloc_dma_buffer(size_t const size, Cache cache) if (!ram_cap.valid()) return ram_cap; + Dma_buffer *buf { nullptr }; try { - Dma_buffer & buf = - *(new (heap()) Dma_buffer(_buffer_registry, ram_cap)); - _device_pd.attach_dma_mem(ram_cap, _env.pd().dma_addr(buf.cap)); + buf = new (heap()) Dma_buffer(_buffer_registry, ram_cap); } catch (Out_of_ram) { _env_ram.free(ram_cap); throw; @@ -207,6 +207,18 @@ Session_component::alloc_dma_buffer(size_t const size, Cache cache) throw; } + try { + buf->dma_addr = _device_pd.attach_dma_mem(ram_cap, _env.pd().dma_addr(buf->cap), false); + } catch (Out_of_ram) { + destroy(heap(), buf); + _env_ram.free(ram_cap); + throw; + } catch (Out_of_caps) { + destroy(heap(), buf); + _env_ram.free(ram_cap); + throw; + } + return ram_cap; } @@ -230,7 +242,7 @@ Genode::addr_t Session_component::dma_addr(Ram_dataspace_capability ram_cap) _buffer_registry.for_each([&] (Dma_buffer const & buf) { if (buf.cap.local_name() == ram_cap.local_name()) - ret = _env.pd().dma_addr(buf.cap); }); + ret = buf.dma_addr; }); return ret; } @@ -244,12 +256,14 @@ Session_component::Session_component(Env & env, Resources const & resources, Diag const & diag, bool const info, - Policy_version const version) + Policy_version const version, + bool const iommu) : Session_object(env.ep(), resources, label, diag), Session_registry::Element(registry, *this), Dynamic_rom_session::Xml_producer("devices"), - _env(env), _config(config), _devices(devices), _info(info), _version(version) + _env(env), _config(config), _devices(devices), _info(info), _version(version), + _iommu(iommu) { /* * FIXME: As the ROM session does not propagate Out_of_* diff --git a/repos/os/src/drivers/platform/session_component.h b/repos/os/src/drivers/platform/session_component.h index dbc91b660a..570b83d45c 100644 --- a/repos/os/src/drivers/platform/session_component.h +++ b/repos/os/src/drivers/platform/session_component.h @@ -52,7 +52,8 @@ class Driver::Session_component Resources const & resources, Diag const & diag, bool const info, - Policy_version const version); + Policy_version const version, + bool const iommu); ~Session_component(); @@ -90,6 +91,7 @@ class Driver::Session_component struct Dma_buffer : Registry::Element { Ram_dataspace_capability const cap; + addr_t dma_addr { 0 }; Dma_buffer(Registry & registry, Ram_dataspace_capability const cap) @@ -110,9 +112,12 @@ class Driver::Session_component _env.rm(), *this }; bool _info; Policy_version _version; + bool const _iommu; Device_pd _device_pd { _env, + _md_alloc, _ram_quota_guard(), - _cap_quota_guard() }; + _cap_quota_guard(), + _iommu }; Device_capability _acquire(Device & device); void _release_device(Device_component & dc); From 0a8d6ddba9ac18f3aa24d4fd5ab5b7ce6f93f167 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 4 Nov 2022 08:10:20 +0100 Subject: [PATCH 0063/1921] core: Ignore constraints on allocations if allocator is exhausted Try to allocate within constraint area first. In case the area is exhausted, try allocation at other memory locations. The motivation for this is to limit DMA allocations to 4GB (since some devices require addresses below 4GB). On some platforms there is little physical RAM in this area (<1GB) and the constrainted area exhausts. In case an IOMMU is present, RAM at higher locations can still be mapped below 4GB, which is done in the platform drivers. issue #4665 --- repos/base/src/core/ram_dataspace_factory.cc | 26 +++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/repos/base/src/core/ram_dataspace_factory.cc b/repos/base/src/core/ram_dataspace_factory.cc index 04911289a0..691b9f1b6a 100644 --- a/repos/base/src/core/ram_dataspace_factory.cc +++ b/repos/base/src/core/ram_dataspace_factory.cc @@ -40,16 +40,24 @@ Ram_dataspace_factory::try_alloc(size_t ds_size, Cache cache) */ Range_allocator::Alloc_result allocated_range = Allocator::Alloc_error::DENIED; - /* - * If no physical constraint exists, try to allocate physical memory at - * high locations (3G for 32-bit / 4G for 64-bit platforms) in order to - * preserve lower physical regions for device drivers, which may have DMA - * constraints. - */ - if (_phys_range.start == 0 && _phys_range.end == ~0UL) { + /* apply constraints */ + if (_phys_range.start != 0 || _phys_range.end != ~0UL) { + for (size_t align_log2 = log2(ds_size); align_log2 >= 12; align_log2--) { + allocated_range = _phys_alloc.alloc_aligned(ds_size, (unsigned)align_log2, _phys_range); + if (allocated_range.ok()) + break; + } + } + /* + * If no physical constraint exists or constraints failed, try to allocate + * physical memory at high locations (3G for 32-bit / 4G for 64-bit platforms) + * in order to preserve lower physical regions for device drivers, which may + * have DMA constraints. + */ + if (!allocated_range.ok()) { addr_t const high_start = (sizeof(void *) == 4 ? 3UL : 4UL) << 30; - Phys_range const range { .start = high_start, .end = _phys_range.end }; + Phys_range const range { .start = high_start, .end = ~0UL }; for (size_t align_log2 = log2(ds_size); align_log2 >= 12; align_log2--) { allocated_range = _phys_alloc.alloc_aligned(ds_size, (unsigned)align_log2, range); @@ -58,7 +66,7 @@ Ram_dataspace_factory::try_alloc(size_t ds_size, Cache cache) } } - /* apply constraints, or retry if larger memory allocation failed */ + /* retry if larger non-constrained memory allocation failed */ if (!allocated_range.ok()) { for (size_t align_log2 = log2(ds_size); align_log2 >= 12; align_log2--) { allocated_range = _phys_alloc.alloc_aligned(ds_size, (unsigned)align_log2, _phys_range); From bcea2a958e969d6a03b2904cbf11c9c4508645f1 Mon Sep 17 00:00:00 2001 From: Benjamin Lamowski Date: Thu, 10 Nov 2022 13:41:12 +0100 Subject: [PATCH 0064/1921] wifi/pc: implement firmware requests without warning Until now, requesting optional blobs such as 'iwl-debug-yoyo.bin' has just failed silently. To support desired blobs such as PNVM firmware, implement the loading of optional firmware while preserving the nowarn characteristics of the function. Issue #4663 --- repos/pc/src/lib/wifi/firmware.cc | 9 ++++++--- repos/pc/src/lib/wifi/lx_emul.c | 26 +++++++++++++++----------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/repos/pc/src/lib/wifi/firmware.cc b/repos/pc/src/lib/wifi/firmware.cc index 99d0feb098..03676e1f61 100644 --- a/repos/pc/src/lib/wifi/firmware.cc +++ b/repos/pc/src/lib/wifi/firmware.cc @@ -56,7 +56,8 @@ size_t fw_list_len = sizeof(fw_list) / sizeof(fw_list[0]); ** linux/firmware.h ** **********************/ -extern "C" int lx_emul_request_firmware_nowait(const char *name, void **dest, size_t *result) +extern "C" int lx_emul_request_firmware_nowait(const char *name, void **dest, + size_t *result, bool warn) { if (!dest || !result) return -1; @@ -70,8 +71,10 @@ extern "C" int lx_emul_request_firmware_nowait(const char *name, void **dest, si } } - if (!fwl) { - Genode::error("firmware '", name, "' is not in the firmware white list"); + if (!fwl ) { + if (warn) + Genode::error("firmware '", name, "' is not in the firmware white list"); + return -1; } diff --git a/repos/pc/src/lib/wifi/lx_emul.c b/repos/pc/src/lib/wifi/lx_emul.c index 2f307ae823..ae803ea61e 100644 --- a/repos/pc/src/lib/wifi/lx_emul.c +++ b/repos/pc/src/lib/wifi/lx_emul.c @@ -157,7 +157,8 @@ static void request_firmware_work_func(struct work_struct *work) #endif -extern int lx_emul_request_firmware_nowait(const char *name, void *dest, size_t *result); +extern int lx_emul_request_firmware_nowait(const char *name, void *dest, + size_t *result, bool warn); extern void lx_emul_release_firmware(void const *data, size_t size); extern void rtnl_lock(void); @@ -176,7 +177,7 @@ int request_firmware_nowait(struct module * module, #endif bool reg_db; - if (lx_emul_request_firmware_nowait(name, &fw->data, &fw->size)) { + if (lx_emul_request_firmware_nowait(name, &fw->data, &fw->size, true)) { kfree(fw); return -1; } @@ -218,17 +219,17 @@ int request_firmware_nowait(struct module * module, } -int request_firmware(const struct firmware ** firmware_p, - const char * name, struct device * device) +int request_firmware_common(const struct firmware **firmware_p, + const char *name, struct device *device, bool warn) { struct firmware *fw; if (!*firmware_p) return -1; - fw = kzalloc(sizeof (struct firmware), GFP_KERNEL); + fw = kzalloc(sizeof(struct firmware), GFP_KERNEL); - if (lx_emul_request_firmware_nowait(name, &fw->data, &fw->size)) { + if (lx_emul_request_firmware_nowait(name, &fw->data, &fw->size, warn)) { kfree(fw); return -1; } @@ -238,6 +239,13 @@ int request_firmware(const struct firmware ** firmware_p, } +int request_firmware(const struct firmware ** firmware_p, + const char * name, struct device * device) +{ + return request_firmware_common(firmware_p, name, device, true); +} + + void release_firmware(const struct firmware * fw) { lx_emul_release_firmware(fw->data, fw->size); @@ -245,13 +253,9 @@ void release_firmware(const struct firmware * fw) } -/* - * This function is only called when using newer WIFI6 devices to - * load 'iwl-debug-yoyo.bin'. We simply deny the request. - */ int firmware_request_nowarn(const struct firmware ** firmware,const char * name,struct device * device) { - return -1; + return request_firmware_common(firmware, name, device, false); } From 04efe88044a031027a4ef2b66306abeb80195da1 Mon Sep 17 00:00:00 2001 From: Benjamin Lamowski Date: Thu, 10 Nov 2022 13:37:42 +0100 Subject: [PATCH 0065/1921] wifi/pc: add support for loading PNVM files Intel wifi cards in the AX210 family need additional PNVM firmware to function properly. Enable the bundling and loading of *.pnvm files. Issue #4663 --- repos/dde_linux/recipes/raw/wifi_firmware/content.mk | 1 + repos/pc/lib/mk/wifi_firmware.mk | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/repos/dde_linux/recipes/raw/wifi_firmware/content.mk b/repos/dde_linux/recipes/raw/wifi_firmware/content.mk index 7855d1f15d..e401f3c944 100644 --- a/repos/dde_linux/recipes/raw/wifi_firmware/content.mk +++ b/repos/dde_linux/recipes/raw/wifi_firmware/content.mk @@ -6,6 +6,7 @@ content: ucode_files LICENSE.wifi_drv .PHONY: ucode_files ucode_files: cp $(PORT_DIR)/firmware/*.ucode . + cp $(PORT_DIR)/firmware/*.pnvm . cp $(PORT_DIR)/firmware/regulatory.db . cp $(PORT_DIR)/firmware/regulatory.db.p7s . diff --git a/repos/pc/lib/mk/wifi_firmware.mk b/repos/pc/lib/mk/wifi_firmware.mk index a00a214329..bad533c218 100644 --- a/repos/pc/lib/mk/wifi_firmware.mk +++ b/repos/pc/lib/mk/wifi_firmware.mk @@ -5,6 +5,7 @@ FW_CONTRIB_DIR := $(call select_from_ports,linux-firmware) IMAGES := $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.ucode)) +IMAGES += $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.pnvm)) IMAGES += $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.db)) IMAGES += $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.p7s)) BIN_DIR := $(BUILD_BASE_DIR)/bin @@ -15,6 +16,9 @@ CUSTOM_TARGET_DEPS += $(addprefix $(BIN_DIR)/,$(IMAGES)) $(BIN_DIR)/%.ucode: $(FW_DIR)/%.ucode $(VERBOSE)cp $^ $@ +$(BIN_DIR)/%.pnvm: $(FW_DIR)/%.pnvm + $(VERBOSE)cp $^ $@ + $(BIN_DIR)/%.db: $(FW_DIR)/%.db $(VERBOSE)cp $^ $@ From e46a7dd6f555eb1653d56f0847641194d14efcb6 Mon Sep 17 00:00:00 2001 From: Benjamin Lamowski Date: Mon, 7 Nov 2022 12:36:58 +0100 Subject: [PATCH 0066/1921] dde_linux: fix Intel Intel AX211 wifi without MSI-X Lack of MSI-X support in DDE Linux causes a timeout when the Intel AX211 tries to call back into the driver while loading the PNVM file while interrupts are still disabled. With the patch picked up from QubesOS the card works on an X1 Nano G2: https://github.com/QubesOS/qubes-linux-kernel/commit/5fcfe0f19ed5ff2bd3514644afce0af642c326c6 Issue #4663 --- .../iwlwifi_enable_irq_before_pnvm.patch | 46 +++++++++++++++++++ repos/dde_linux/ports/linux.hash | 2 +- repos/dde_linux/ports/linux.port | 2 +- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 repos/dde_linux/patches/iwlwifi_enable_irq_before_pnvm.patch diff --git a/repos/dde_linux/patches/iwlwifi_enable_irq_before_pnvm.patch b/repos/dde_linux/patches/iwlwifi_enable_irq_before_pnvm.patch new file mode 100644 index 0000000000..da7167d943 --- /dev/null +++ b/repos/dde_linux/patches/iwlwifi_enable_irq_before_pnvm.patch @@ -0,0 +1,46 @@ +From b4024bb479b2ee9b34125b65472a0537043c8dc4 Mon Sep 17 00:00:00 2001 +From: Chris Rogers +Date: Thu, 1 Sep 2022 15:56:14 +0200 +Subject: [PATCH] Re-enable interrupts before loading PNVM. + +For cards in the AX210+ family that advertise a SKU and try to load a PNVM, +in the non-MSIX (MSI) case the normal firmware load flow disables all interrupts +from the card except ALIVE and RX. This is primarily to enforce the driver's +assumption that we will not receive RF_KILL before the firmware has finished +loading, or else an unintelligible error is dumped. + +This unfortunately also prevents us from responding to an interrupt from the +card after 'kicking the doorbell' (UREG_DOORBELL_TO_ISR6_PNVM). We therefore +wait until the specified timeout and report "Timeout waiting for PNVM load!" +and fail out of driver initialization. + +This patch re-enables interrupts prior to loading the PNVM so we can respond +properly when the card notifies us of a successful PNVM load. Since the FW is +technically 'ALIVE' at this point, it should be ok to also re-enable RF_KILL. +--- + drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +index f041e77af059..ec982ddce196 100644 +--- src/linux/drivers/net/wireless/intel/iwlwifi/mvm/fw.c ++++ src/linux/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +@@ -404,6 +404,15 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm, + return -EIO; + } + ++ /* ++ * re-enable interrupts so we can get a response from ++ * the card when kicking the doorbell during pnvm load. ++ * This is only needed in the non-msix case. FW is ++ * technically alive at this point so re-enabling rf-kill ++ * interrupt is probably ok. ++ */ ++ iwl_trans_interrupts(mvm->trans, true); ++ + ret = iwl_pnvm_load(mvm->trans, &mvm->notif_wait); + if (ret) { + IWL_ERR(mvm, "Timeout waiting for PNVM load!\n"); +-- +2.35.3 + diff --git a/repos/dde_linux/ports/linux.hash b/repos/dde_linux/ports/linux.hash index 9a3b2b669a..d39912c7bf 100644 --- a/repos/dde_linux/ports/linux.hash +++ b/repos/dde_linux/ports/linux.hash @@ -1 +1 @@ -340e0ebc16b91aab3ff33d3d03611dcddd02d450 +3258c9b6efca7364b55b34139f0f4333c3eab88d diff --git a/repos/dde_linux/ports/linux.port b/repos/dde_linux/ports/linux.port index f03066519a..3d8dc55c4c 100644 --- a/repos/dde_linux/ports/linux.port +++ b/repos/dde_linux/ports/linux.port @@ -9,7 +9,7 @@ DIR(linux) := src/linux # # Patches # -PATCH_FILES := i915_irq.patch i915_alderlake.patch xhci_abort_ring.patch +PATCH_FILES := i915_irq.patch i915_alderlake.patch xhci_abort_ring.patch iwlwifi_enable_irq_before_pnvm.patch PATCHES += $(addprefix patches/,$(PATCH_FILES)) # i915 From 0e9a49d1cf4a7e402029fc99d83f25b37fc55e2b Mon Sep 17 00:00:00 2001 From: Benjamin Lamowski Date: Mon, 7 Nov 2022 11:49:59 +0100 Subject: [PATCH 0067/1921] wifi/pc: add firmware for the Intel AX211 Lenovo Thinkpads with 12th gen Intel i7 CPUs such as the X1 Nano G2 may contain such a wifi card. Issue #4663 --- repos/dde_linux/ports/linux-firmware.hash | 2 +- repos/dde_linux/ports/linux-firmware.port | 4 ++-- repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc | 2 ++ repos/pc/src/lib/wifi/firmware.cc | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/repos/dde_linux/ports/linux-firmware.hash b/repos/dde_linux/ports/linux-firmware.hash index b9ccede6ce..946b3f2507 100644 --- a/repos/dde_linux/ports/linux-firmware.hash +++ b/repos/dde_linux/ports/linux-firmware.hash @@ -1 +1 @@ -7531725735ef90f88369aafe8e930c43f2daf2ec +e9fdf82a31f0106cd2604a644685e7c080a12d09 diff --git a/repos/dde_linux/ports/linux-firmware.port b/repos/dde_linux/ports/linux-firmware.port index 2f83c4b756..981d16a09f 100644 --- a/repos/dde_linux/ports/linux-firmware.port +++ b/repos/dde_linux/ports/linux-firmware.port @@ -2,7 +2,7 @@ LICENSE := mixed VERSION := 1 DOWNLOADS := fw.archive -FW_REV := e71a9b96ee6acc9fd6ec97ed92fb7152fa721671 +FW_REV := cbd51e5ee647ec834c30a3987225cae2341753b0 URL(fw) := https://github.com/cnuke/dde_linux_firmware/archive/$(FW_REV).tar.gz -SHA(fw) := 7e613822fca17453260bafbb99da62f5eb0aedaa839b1569ca7bc7eb3eb8e23f +SHA(fw) := 486e3e4cc3022acca2b134c11feb8d3bbc4bd07a588a7c56e6fc07174bf3d573 DIR(fw) := firmware diff --git a/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc b/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc index a72dd1af9f..073fdf502e 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc @@ -88,6 +88,8 @@ void Sculpt::gen_wifi_drv_start_content(Xml_generator &xml) gen_parent_rom_route(xml, "iwlwifi-9000-pu-b0-jf-b0-46.ucode"); gen_parent_rom_route(xml, "iwlwifi-QuZ-a0-hr-b0-63.ucode"); gen_parent_rom_route(xml, "iwlwifi-so-a0-hr-b0-64.ucode"); + gen_parent_rom_route(xml, "iwlwifi-so-a0-gf-a0-64.ucode"); + gen_parent_rom_route(xml, "iwlwifi-so-a0-gf-a0.pnvm"); gen_parent_rom_route(xml, "regulatory.db"); gen_parent_rom_route(xml, "regulatory.db.p7s"); gen_parent_route (xml); diff --git a/repos/pc/src/lib/wifi/firmware.cc b/repos/pc/src/lib/wifi/firmware.cc index 03676e1f61..195cdc56e7 100644 --- a/repos/pc/src/lib/wifi/firmware.cc +++ b/repos/pc/src/lib/wifi/firmware.cc @@ -46,6 +46,8 @@ Firmware_list fw_list[] = { { "iwlwifi-QuZ-a0-hr-b0-63.ucode", 1334804, nullptr }, { "iwlwifi-QuZ-a0-hr-b0-64.ucode", 1334804, "iwlwifi-QuZ-a0-hr-b0-63.ucode" }, { "iwlwifi-so-a0-hr-b0-64.ucode", 1427384, nullptr }, + { "iwlwifi-so-a0-gf-a0-64.ucode", 1515812, nullptr }, + { "iwlwifi-so-a0-gf-a0.pnvm", 41808, nullptr }, }; From b78b543011ba2a120998e6bf71a133a5c5946cac Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 15 Nov 2022 13:34:37 +0100 Subject: [PATCH 0068/1921] vmm: make ARM VMM configureable This commit enables users of the VMM to define CPU type and count, RAM size, kernel and initrd ROM names, GIC version, and Virtio devices to be used. Derived from the configuration values a flattened device-tree blob (DTB) is generated and transfered to the VM. Fix genodelabs/genode#4670 --- repos/os/run/vmm_arm.run | 90 ++-- repos/os/src/server/vmm/README | 84 ++++ repos/os/src/server/vmm/board_base.h | 43 ++ repos/os/src/server/vmm/config.cc | 66 +++ repos/os/src/server/vmm/config.h | 147 +++++++ repos/os/src/server/vmm/fdt.cc | 397 ++++++++++++++++++ repos/os/src/server/vmm/fdt.h | 149 +++++++ repos/os/src/server/vmm/gic.cc | 23 +- repos/os/src/server/vmm/main.cc | 35 +- repos/os/src/server/vmm/psci.h | 2 + repos/os/src/server/vmm/spec/arm_v7/board.h | 49 +-- repos/os/src/server/vmm/spec/arm_v7/target.mk | 21 +- repos/os/src/server/vmm/spec/arm_v8/board.h | 48 +-- repos/os/src/server/vmm/spec/arm_v8/cpu.cc | 12 +- repos/os/src/server/vmm/spec/arm_v8/target.mk | 21 +- repos/os/src/server/vmm/target.inc | 18 + repos/os/src/server/vmm/virtio_device.h | 11 +- repos/os/src/server/vmm/vm.cc | 130 ++++-- repos/os/src/server/vmm/vm.h | 70 +-- 19 files changed, 1175 insertions(+), 241 deletions(-) create mode 100644 repos/os/src/server/vmm/README create mode 100644 repos/os/src/server/vmm/board_base.h create mode 100644 repos/os/src/server/vmm/config.cc create mode 100644 repos/os/src/server/vmm/config.h create mode 100644 repos/os/src/server/vmm/fdt.cc create mode 100644 repos/os/src/server/vmm/fdt.h create mode 100644 repos/os/src/server/vmm/target.inc diff --git a/repos/os/run/vmm_arm.run b/repos/os/run/vmm_arm.run index 06a8ada3ae..d80052352a 100644 --- a/repos/os/run/vmm_arm.run +++ b/repos/os/run/vmm_arm.run @@ -26,6 +26,35 @@ import_from_depot [depot_user]/src/[base_src] \ build { test/terminal_expect_send } +proc vmm_config { } { + + # for early printk add bootarg: earlycon=pl011,0x9000000 + + if {[have_spec arm]} { + return { + + + + + } + } + + if {[have_spec arm_64]} { + return { + + + + + } + } + + return unavailable +} + install_config { @@ -92,7 +121,7 @@ install_config { - + } [vmm_config] { @@ -112,12 +141,7 @@ if { [have_spec arm] } { if {![file exists bin/linux]} { puts "Download linux kernel ..." - exec >& /dev/null wget -c -O bin/linux http://genode.org/files/release-20.05/linux-arm32 - } - - if {![file exists bin/dtb]} { - puts "Download device tree blob ..." - exec >& /dev/null wget -c -O bin/dtb http://genode.org/files/release-21.02/dtb-arm32-virt + exec >& /dev/null wget -c -O bin/linux http://genode.org/files/release-22.11/linux-virtio-arm32 } if {![file exists bin/initrd]} { @@ -126,22 +150,15 @@ if { [have_spec arm] } { } # -# To obtain the linux kernel, do the following steps: -# -# wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.3.10.tar.xz -# -# tar -xJf linux-5.3.10.tar.xz -# cd linux-5.3.10 -# -# make O=../build-linux-aarch32 ARCH=arm CROSS_COMPILE=/usr/local/genode/tool/current/bin/genode-arm- defconfig -# make O=../build-linux-aarch32 ARCH=arm CROSS_COMPILE=/usr/local/genode/tool/current/bin/genode-arm- -j32 -# -# copy ../build-linux-aarch32/arch/arm/boot/zImage to your build directory in 'bin/linux' +# To build the linux kernel from scratch, do the following steps: # +# wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.14.21.tar.xz +# tar -xJf linux-5.14.21.tar.xz +# cd linux-5.14.21 +# wget -O .config https://raw.githubusercontent.com/skalk/linux/66fb717e92b47512d8f686860a2c5e7329d01691/arch/arm/configs/virtio_only_defconfig +# make ARCH=arm CROSS_COMPILE=/usr/local/genode/tool/current/bin/genode-arm- # -# To get the dtb (device-tree-binary), you have to compile the file: -# repos/os/src/server/vmm/spec/arm_v7/virt.dts with the dtc compiler: -# dtc repos/os/src/server/vmm/spec/arm_v7/virt.dts > bin/dtb +# copy arch/arm/boot/Image to your build directory in 'bin/linux' # # # To construct the initrd do the following: @@ -169,12 +186,7 @@ if { [have_spec arm_64] } { if {![file exists bin/linux]} { puts "Download linux kernel ..." - exec >& /dev/null wget -c -O bin/linux http://genode.org/files/release-20.02/linux-arm64 - } - - if {![file exists bin/dtb]} { - puts "Download device tree blob ..." - exec >& /dev/null wget -c -O bin/dtb http://genode.org/files/release-21.02/dtb-arm64-virt-smp + exec >& /dev/null wget -c -O bin/linux http://genode.org/files/release-22.11/linux-virtio-arm64 } if {![file exists bin/initrd]} { @@ -183,22 +195,15 @@ if { [have_spec arm_64] } { } # -# To obtain the linux kernel, do the following steps: -# -# wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.53.tar.xz -# -# tar -xJf linux-4.19.53.tar.xz -# cd linux-4.19.53 -# -# make O=../build-linux-aarch64 ARCH=arm64 CROSS_COMPILE=/usr/local/genode/tool/current/bin/genode-aarch64- defconfig -# make O=../build-linux-aarch64 ARCH=arm64 CROSS_COMPILE=/usr/local/genode/tool/current/bin/genode-aarch64- -j32 -# -# copy ../build-linux-aarch64/arch/arm64/boot/Image to your build directory in 'bin/linux' +# To build the linux kernel from scratch, do the following steps: # +# wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.14.21.tar.xz +# tar -xJf linux-5.14.21.tar.xz +# cd linux-5.14.21 +# wget -O .config https://raw.githubusercontent.com/skalk/linux/66fb717e92b47512d8f686860a2c5e7329d01691/arch/arm64/configs/virtio_only_defconfig +# make ARCH=arm64 CROSS_COMPILE=/usr/local/genode/tool/current/bin/genode-aarch64- # -# To get the dtb (device-tree-binary), you have to compile the file: -# repos/os/src/server/vmm/spec/arm_v8/virt.dts with the dtc compiler: -# dtc repos/os/src/server/vmm/spec/arm_v8/virt.dts > bin/dtb +# copy arch/arm64/boot/Image to your build directory in 'bin/linux' # # # To construct the initrd do the following: @@ -227,7 +232,6 @@ exec [installed_command mkfs.vfat] bin/block.img build_boot_image { test-terminal_expect_send linux - dtb initrd block.img } @@ -238,4 +242,4 @@ build_boot_image { append qemu_args " -nographic " run_genode_until "\[init -> vm\] .*resolv.conf.*" 220 -exec rm bin/linux bin/dtb bin/initrd bin/block.img +exec rm bin/linux bin/initrd bin/block.img diff --git a/repos/os/src/server/vmm/README b/repos/os/src/server/vmm/README new file mode 100644 index 0000000000..32a65a7a77 --- /dev/null +++ b/repos/os/src/server/vmm/README @@ -0,0 +1,84 @@ +The vmm component implements a virtual-machine monitor that is able to +drive Linux VMs on ARMv7 and ARMv8 using hardware-assisted virtualization. +It uses the VM session for ARM, currently provided by the base-hw kernel only. +It is limited to load Linux kernel binaries and an initram-filesystem only. + +The VMM produces a flattened device-tree blob (DTB) to the Linux guest OS +that is derived from the configuration of the VMM. + +The following configuration attributes are evaluated: + +! + +Configuration attributes explained in more detail: + +:kernel_rom: + This attribute is optional. It denotes the ROM, which is requested as kernel + binary to be loaded. The default name requested will be "linux". Please note + that the Linux kernel image shouldn't be gzipped, because the VMM does not + deflate the image before loading. + +:initrd_rom: + This attribute is optional. It denotes the ROM, which is requested as initramfs + resp. initrd to be loaded. The default name requested will be "initrd". + +:ram_size: + This attribute is mandatory. It defines the size of the VM's memory. + +:cpu_count: + This attribute is mandatory. It defines the available number of virtual CPUs + for the VM. The virtual CPUs are getting assigned round-robin to the physical + CPUs available to the VMM. + +:cpu_type: + This attribute's default value is "arm,cortex-a15". If your underlying hardware + has a different one, you should use here the Linux-specific CPU compatible string + for the actual CPU of your board. + +:gic_version: + This attribute's default value is "2". If your underlying hardware uses a + different ARM Generic Interrupt Controller version, you should specify the + actual version here. The only versions allowed are 2 and 3. Other interrupt + controller models are not supported. + +:bootargs: + This attribute is mandatory. It defines the Linux kernel's cmdline. The default + value is "console=ttyAMA0" + + +Virtio devices +-------------- + +In addition to the general configuration attributes, one can define several Virtio +devices per VM. This is done by configuration sub-nodes, like: + +! +! +! +! ... +! + +For each virtio_device node the following attributes need to be set: + +:name: + A unique name denoting the device. + +:type: + The Virtio type of device. One can decide in between "console", "net", + and "block". The "console" type gets mapped to a Genode Terminal session, + "net" is mapped to a Nic session, and "block" to a Block session. + + +Additional devices +------------------ + +Apart from defined Virtio devices, as well as the defined CPUs and GIC version, +the VMM always assigns a PL011 UART device to the VM, which gets connected to +a Terminal session as backend. This Terminal session uses "earlycon" as +last label. diff --git a/repos/os/src/server/vmm/board_base.h b/repos/os/src/server/vmm/board_base.h new file mode 100644 index 0000000000..e4164d9687 --- /dev/null +++ b/repos/os/src/server/vmm/board_base.h @@ -0,0 +1,43 @@ +/* + * \brief VMM - board definitions + * \author Stefan Kalkowski + * \date 2019-11-13 + */ + +/* + * Copyright (C) 2019 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__SERVER__VMM__BOARD_H_ +#define _SRC__SERVER__VMM__BOARD_H_ + +namespace Vmm { + + enum { + GICD_MMIO_START = 0x8000000, + GICD_MMIO_SIZE = 0x10000, + GICC_MMIO_START = 0x8010000, + GICC_MMIO_SIZE = 0x10000, + GICR_MMIO_START = 0x80a0000, + GICR_MMIO_SIZE = 0xf60000, + + PL011_MMIO_START = 0x9000000, + PL011_MMIO_SIZE = 0x1000, + PL011_IRQ = 33, + + VIRTIO_MMIO_START = 0xa000000, + VIRTIO_MMIO_SIZE = 0x1000000, + VIRTIO_IRQ_START = 40, + VIRTIO_IRQ_COUNT = 128, + + RAM_START = 0x40000000, + MINIMUM_RAM_SIZE = 32 * 1024 * 1024, + + VTIMER_IRQ = 27, + }; +} + +#endif /* _SRC__SERVER__VMM__BOARD_H_ */ diff --git a/repos/os/src/server/vmm/config.cc b/repos/os/src/server/vmm/config.cc new file mode 100644 index 0000000000..4c9fd4dca4 --- /dev/null +++ b/repos/os/src/server/vmm/config.cc @@ -0,0 +1,66 @@ +/* + * \brief VMM for ARM virtualization - config frontend + * \author Stefan Kalkowski + * \date 2022-11-10 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include + +using namespace Genode; +using namespace Vmm; + + +Config::Virtio_device::Virtio_device(Name & name, Type type, Config & config) +: + _config(config), + name(name), + type(type), + mmio_start(config._mmio_alloc.alloc(MMIO_SIZE)), + mmio_size(MMIO_SIZE), + irq(config._irq_alloc.alloc()) {} + + +Config::Virtio_device::~Virtio_device() +{ + _config._irq_alloc.free(irq); + _config._mmio_alloc.free(mmio_start); +} + + +void Vmm::Config::update(Xml_node node) +{ + _kernel_name = node.attribute_value("kernel_rom", Name("linux")); + _initrd_name = node.attribute_value("initrd_rom", Name("initrd")); + _ram_size = node.attribute_value("ram_size", Number_of_bytes()); + _cpu_count = node.attribute_value("cpu_count", 0U); + _cpu_type = node.attribute_value("cpu_type", Name("arm,cortex-a15")); + _gic_version = node.attribute_value("gic_version", 2U); + _bootargs = node.attribute_value("bootargs", Arguments("console=ttyAMA0")); + + if (_gic_version < 2 || _gic_version > 3) { + error("Invalid GIC version, supported are: 2 and 3"); + throw Invalid_configuration(); + } + + if (_ram_size < MINIMUM_RAM_SIZE) { + error("Minimum RAM size is ", Hex((size_t)MINIMUM_RAM_SIZE)); + warning("Reset RAM size to minimum"); + _ram_size = MINIMUM_RAM_SIZE; + } + + if (_cpu_count < 1) { + error("Minimum CPU count is 1"); + warning("Reset CPU count to minimum"); + _cpu_count = 1; + } + + Virtio_device_update_policy policy(*this); + _model.update_from_xml(policy, node); +} diff --git a/repos/os/src/server/vmm/config.h b/repos/os/src/server/vmm/config.h new file mode 100644 index 0000000000..cb188d6299 --- /dev/null +++ b/repos/os/src/server/vmm/config.h @@ -0,0 +1,147 @@ +/* + * \brief VMM for ARM virtualization - config frontend + * \author Stefan Kalkowski + * \date 2022-11-10 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__SERVER__VMM__CONFIG_H_ +#define _SRC__SERVER__VMM__CONFIG_H_ + +#include +#include +#include +#include +#include +#include +#include + +namespace Vmm { + class Config; + using namespace Genode; +} + +class Vmm::Config +{ + public: + + struct Invalid_configuration{}; + + using Name = String<128>; + using Arguments = String<512>; + + struct Virtio_device : List_model::Element + { + enum Type { INVALID, CONSOLE, NET, BLOCK }; + + enum { MMIO_SIZE = 0x200 }; + + Config & _config; + + Virtio_device(Name & name, Type type, Config & config); + ~Virtio_device(); + + Name const name; + Type const type; + void * const mmio_start; + size_t const mmio_size; + unsigned const irq; + }; + + private: + + struct Irq_allocator + { + Bit_allocator _alloc {}; + + unsigned alloc() { + return VIRTIO_IRQ_START + _alloc.alloc(); } + void free(unsigned irq) { + _alloc.free(VIRTIO_IRQ_START+irq); } + }; + + Heap & _heap; + Allocator_avl _mmio_alloc { &_heap }; + Irq_allocator _irq_alloc { }; + Name _kernel_name { }; + Name _initrd_name { }; + size_t _ram_size { 0 }; + unsigned _cpu_count { 0 }; + Name _cpu_type { }; + unsigned _gic_version { 0 }; + Arguments _bootargs { }; + + List_model _model; + + struct Virtio_device_update_policy + : List_model::Update_policy + { + Config & config; + + Virtio_device_update_policy(Config & config) + : config(config) {} + + static Virtio_device::Type type(Xml_node node) + { + Virtio_device::Type t = Virtio_device::INVALID; + Config::Name type = node.attribute_value("type", Config::Name()); + if (type == "console") t = Virtio_device::CONSOLE; + if (type == "net") t = Virtio_device::NET; + if (type == "block") t = Virtio_device::BLOCK; + return t; + } + + void destroy_element(Element & dev) { destroy(config._heap, &dev); } + + Element & create_element(Genode::Xml_node node) + { + Config::Name name = node.attribute_value("name", Config::Name()); + Virtio_device::Type t = type(node); + if (t == Virtio_device::INVALID || !name.valid()) { + error("Invalid type or missing name in Virtio device node"); + throw Invalid_configuration(); + } + return *(new (config._heap) Element(name, t, config)); + } + + void update_element(Element &, Genode::Xml_node) {} + + static bool element_matches_xml_node(Element const & dev, Xml_node node) + { + Config::Name name = node.attribute_value("name", Config::Name()); + Virtio_device::Type t = type(node); + return name == dev.name && t == dev.type; + } + + static bool node_is_element(Xml_node node) { + return node.has_type("virtio_device"); } + }; + + public: + + Config(Heap & heap) : _heap(heap) { + _mmio_alloc.add_range(VIRTIO_MMIO_START, VIRTIO_MMIO_SIZE); } + + const char * kernel_name() const { return _kernel_name.string(); } + const char * initrd_name() const { return _initrd_name.string(); } + const char * cpu_type() const { return _cpu_type.string(); } + const char * bootargs() const { return _bootargs.string(); } + + size_t ram_size() const { return _ram_size; } + unsigned cpu_count() const { return _cpu_count; } + unsigned gic_version() const { return _gic_version; } + + template + void for_each_virtio_device(FN const & fn) const { + _model.for_each(fn); } + + void update(Xml_node); +}; + +#endif /* _SRC__SERVER__VMM__CONFIG_H_ */ diff --git a/repos/os/src/server/vmm/fdt.cc b/repos/os/src/server/vmm/fdt.cc new file mode 100644 index 0000000000..294c3ba3a0 --- /dev/null +++ b/repos/os/src/server/vmm/fdt.cc @@ -0,0 +1,397 @@ +/* + * \brief VMM utilities to generate a flattened device tree blob + * \author Stefan Kalkowski + * \date 2022-11-04 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include +#include +#include +#include +#include + +using namespace Genode; + +class Mmio_big_endian_access +{ + friend Register_set_plain_access; + + private: + + addr_t const _base; + + /** + * Write '_ACCESS_T' typed 'value' to MMIO base + 'offset' + */ + template + inline void _write(off_t const offset, ACCESS_T const value) + { + addr_t const dst = _base + offset; + *(ACCESS_T volatile *)dst = host_to_big_endian(value); + } + + /** + * Read '_ACCESS_T' typed from MMIO base + 'offset' + */ + template + inline ACCESS_T _read(off_t const &offset) const + { + addr_t const dst = _base + offset; + ACCESS_T const value = *(ACCESS_T volatile *)dst; + return host_to_big_endian(value); + } + + public: + + Mmio_big_endian_access(addr_t const base) : _base(base) { } + + addr_t base() const { return _base; } +}; + + +struct Mmio : Mmio_big_endian_access, + Register_set +{ + Mmio(addr_t const base) + : + Mmio_big_endian_access(base), + Register_set(*static_cast(this)) { } +}; + + +struct Fdt_header : Mmio +{ + struct Magic : Register<0x0, 32> {}; + struct Totalsize : Register<0x4, 32> {}; + struct Off_dt_struct : Register<0x8, 32> {}; + struct Off_dt_strings : Register<0xc, 32> {}; + struct Off_mem_rsvmap : Register<0x10, 32> {}; + struct Version : Register<0x14, 32> {}; + struct Last_comp_version : Register<0x18, 32> {}; + struct Boot_cpuid_phys : Register<0x1c, 32> {}; + struct Size_dt_strings : Register<0x20, 32> {}; + struct Size_dt_struct : Register<0x24, 32> {}; + + using Mmio::Mmio; + + enum { SIZE = 10*4 }; +}; + + +struct Fdt_reserve_entry : Mmio +{ + struct Address : Register<0, 64> {}; + struct Size : Register<8, 64> {}; + + using Mmio::Mmio; + + enum { SIZE = 2*8 }; +}; + + +enum Fdt_tokens { + FDT_BEGIN_NODE = 0x00000001U, + FDT_END_NODE = 0x00000002U, + FDT_PROP = 0x00000003U, + FDT_NOP = 0x00000004U, + FDT_END = 0x00000009U, +}; + + +struct Fdt_token : Mmio +{ + struct Type : Register<0, 32> {}; + + Fdt_token(addr_t const base, Fdt_tokens type) + : + Mmio(base) + { + write(type); + } + + enum { SIZE = 4 }; +}; + + +struct Fdt_prop : Fdt_token +{ + struct Len : Register<4, 32> {}; + struct Nameoff : Register<8, 32> {}; + + Fdt_prop(addr_t base, uint32_t len, uint32_t name_offset) + : + Fdt_token(base, FDT_PROP) + { + write(len); + write(name_offset); + } + + enum { SIZE = Fdt_token::SIZE + 2*4 }; +}; + + +enum Interrupt_specifier { + GIC_SPI = 0, + GIC_PPI = 1, +}; + + +enum Interrupt_type { + IRQ_TYPE_NONE = 0, + IRQ_TYPE_EDGE_RISING = 1, + IRQ_TYPE_EDGE_FALLING = 2, + IRQ_TYPE_EDGE_BOTH = 3, + IRQ_TYPE_LEVEL_HIGH = 4, + IRQ_TYPE_LEVEL_LOW = 8, +}; + + +enum { + FDT_MAGIC = 0xd00dfeed, + FDT_VERSION = 17, + FDT_COMP_VERSION = 16, +}; + + +enum Phandles { + GIC = 1, + CLK = 2 +}; + +struct Value +{ + uint32_t value; + + Value(uint32_t const & v) : value(v) {}; + Value() : value(0) {}; + + Value &operator= (uint32_t const & v) + { + value = v; + return *this; + } + + size_t length() const { return sizeof(value); } + + template + void write(uint32_t off, T & buf) const + { + uint32_t v = host_to_big_endian(value); + buf.write(off, &v, length()); + } +}; + + +template +struct Array : Genode::Array +{ + using Genode::Array::Array; + + size_t length() const + { + size_t ret = 0; + this->for_each([&] (unsigned, T const & v) { ret += v.length(); }); + return ret; + } + + template + void write(uint32_t off, BUF & buf) const + { + this->for_each([&] (unsigned, T const & v) { + v.write(off, buf); + off += (uint32_t)v.length(); + }); + } +}; + + +void Vmm::Fdt_generator::_generate_tree(uint32_t & off, Config const & config, + void * initrd_start, size_t initrd_size) +{ + using Name = Fdt_dictionary::Name; + + auto node = [&] (auto const & name, auto const & fn) + { + Fdt_token start(_buffer.addr+off, FDT_BEGIN_NODE); + off += Fdt_token::SIZE; + _buffer.write(off, name.string(), name.length()); + off += (uint32_t)name.length(); + off = align_addr(off, 2); + fn(); + Fdt_token end(_buffer.addr+off, FDT_END_NODE); + off += Fdt_token::SIZE; + }; + + auto property = [&] (auto const & name, auto const & val) + { + _dict.add(name); + Fdt_prop prop(_buffer.addr+off, (uint32_t)val.length(), + _dict.offset(name)); + off += Fdt_prop::SIZE; + val.write(off, _buffer); + off = align_addr(off+(uint32_t)val.length(), 2); + }; + + node(Name(""), [&] () + { + property(Name("compatible"), Name("linux,dummy-virt")); + property(Name("#address-cells"), Value(2)); + property(Name("#size-cells"), Value(2)); + property(Name("interrupt-parent"), Value(GIC)); + + node(Name("cpus"), [&] () + { + property(Name("#address-cells"), Value(1)); + property(Name("#size-cells"), Value(0)); + + for (unsigned i = 0; i < config.cpu_count(); i++) { + node(Name("cpu@", i), [&] () + { + property(Name("compatible"), Name(config.cpu_type())); + property(Name("reg"), Value(i)); + property(Name("device_type"), Name("cpu")); + property(Name("enable-method"), Name("psci")); + }); + } + }); + + node(Name("psci"), [&] () + { + property(Name("compatible"), Name("arm,psci-1.0")); + property(Name("method"), Name("hvc")); + property(Name("cpu_suspend"), Value{Psci::CPU_SUSPEND}); + property(Name("cpu_off"), Value{Psci::CPU_OFF}); + property(Name("cpu_on"), Value{Psci::CPU_ON}); + }); + + node(Name("timer"), [&] () + { + property(Name("compatible"), + ::Array("arm,armv8-timer", "arm,armv7-timer")); + property(Name("interrupts"), + ::Array(GIC_PPI, 0xd, IRQ_TYPE_LEVEL_HIGH, + GIC_PPI, 0xe, IRQ_TYPE_LEVEL_HIGH, + GIC_PPI, 0xb, IRQ_TYPE_LEVEL_HIGH, + GIC_PPI, 0xa, IRQ_TYPE_LEVEL_HIGH)); + }); + + node(Name("gic"), [&] () + { + bool gicv2 = config.gic_version() < 3U; + property(Name("phandle"), Value(GIC)); + property(Name("compatible"), + (gicv2) ? Name("arm,gic-400") : Name("arm,gic-v3")); + property(Name("ranges"), ::Array()); + property(Name("interrupt-controller"), ::Array()); + property(Name("#address-cells"), Value(2)); + property(Name("#redistributor-regions"), Value(1)); + property(Name("#interrupt-cells"), Value(3)); + property(Name("#size-cells"), Value(2)); + property(Name("reg"), + ::Array(0, GICD_MMIO_START, 0, GICD_MMIO_SIZE, + 0, (gicv2) ? GICC_MMIO_START : GICR_MMIO_START, + 0, (gicv2) ? GICC_MMIO_SIZE : GICR_MMIO_SIZE)); + }); + + node(Name("clocks"), [&] () + { + property(Name("#address-cells"), Value(1)); + property(Name("#size-cells"), Value(0)); + + node(Name("clk@0"), [&] () + { + property(Name("compatible"), Name("fixed-clock")); + property(Name("clock-output-names"), Name("clk24mhz")); + property(Name("clock-frequency"), Value(24000000)); + property(Name("#clock-cells"), Value(0)); + property(Name("reg"), Value(0)); + property(Name("phandle"), Value(CLK)); + }); + }); + + node(Name("pl011"), [&] () + { + property(Name("compatible"), + ::Array("arm,pl011", "arm,primecell")); + property(Name("interrupts"), + ::Array(GIC_SPI, PL011_IRQ-32, IRQ_TYPE_LEVEL_HIGH)); + property(Name("reg"), ::Array(0, PL011_MMIO_START, + 0, PL011_MMIO_SIZE)); + property(Name("clock-names"), + ::Array("uartclk", "apb_pclk")); + property(Name("clocks"), ::Array(CLK, CLK)); + }); + + node(Name("memory"), [&] () + { + property(Name("reg"), ::Array(0, RAM_START, 0, config.ram_size())); + property(Name("device_type"), Name("memory")); + }); + + node(Name("chosen"), [&] () + { + /* we're sure that the initrd start address is wide below 4GB */ + uint32_t start = (uint32_t)((addr_t)initrd_start & 0xffffffff); + property(Name("linux,initrd-start"), Value(start)); + property(Name("linux,initrd-end"), Value(start+initrd_size)); + property(Name("bootargs"), Name(config.bootargs())); + property(Name("stdout-path"), Name("/pl011")); + }); + + config.for_each_virtio_device([&] (Config::Virtio_device const & dev) { + node(Name("virtio@", dev.mmio_start), [&] () + { + property(Name("interrupts"), + ::Array(GIC_SPI, dev.irq-32, IRQ_TYPE_EDGE_RISING)); + property(Name("compatible"), Name("virtio,mmio")); + property(Name("dma-coherent"), ::Array()); + property(Name("reg"), + ::Array(0, (uint32_t)((addr_t)dev.mmio_start & 0xffffffff), + 0, (uint32_t)dev.mmio_size)); + }); + }); + }); + + Fdt_token end(_buffer.addr+off, FDT_END); + off += Fdt_token::SIZE; +} + + +void Vmm::Fdt_generator::generate(Config const & config, + void * initrd_start, size_t initrd_size) +{ + Fdt_header header(_buffer.addr); + header.write(FDT_MAGIC); + header.write(FDT_VERSION); + header.write(FDT_COMP_VERSION); + header.write(0); + + uint32_t off = Fdt_header::SIZE; + header.write(off); + Fdt_reserve_entry memory(_buffer.addr+off); + memory.write(0); + memory.write(0); + + off += Fdt_reserve_entry::SIZE; + header.write(off); + + _generate_tree(off, config, initrd_start, initrd_size); + + header.write(off-Fdt_header::SIZE-Fdt_reserve_entry::SIZE); + + header.write(off); + header.write(_dict.length()); + _dict.write([&] (addr_t o, const char * src, size_t len) { + _buffer.write(off+o, src, len); }); + + off += _dict.length(); + header.write(off); +} diff --git a/repos/os/src/server/vmm/fdt.h b/repos/os/src/server/vmm/fdt.h new file mode 100644 index 0000000000..979c772975 --- /dev/null +++ b/repos/os/src/server/vmm/fdt.h @@ -0,0 +1,149 @@ +/* + * \brief VMM utilities to generate a flattened device tree blob + * \author Stefan Kalkowski + * \date 2022-11-04 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__SERVER__VMM__FDT_H_ +#define _SRC__SERVER__VMM__FDT_H_ + +#include +#include +#include +#include + +namespace Vmm { + class Fdt_generator; + + using namespace Genode; +} + + +class Vmm::Fdt_generator +{ + private: + + class Fdt_dictionary + { + public: + + struct Name : Genode::String<64> + { + using String<64>::String; + + template + void write(uint32_t off, T & buf) const { + buf.write(off, string(), length()); } + }; + + private: + + struct String : Dictionary::Element + { + uint32_t const offset; + + String(Dictionary & dict, + Name const & name, + uint32_t offset) + : + Dictionary::Element(dict, name), + offset(offset) {} + }; + + Heap & _heap; + uint32_t _offset { 0U }; + Dictionary _dict {}; + + public: + + struct Not_found {}; + + Fdt_dictionary(Heap & heap) : _heap(heap) { } + + ~Fdt_dictionary() + { + for (;;) + if (!_dict.with_any_element([&] (String & str) { + destroy(_heap, &str); })) + break; + } + + void add(Name const & name) + { + _dict.with_element(name, [&] (String const &) {}, [&] () + { + new (_heap) String(_dict, name, _offset); + _offset += (uint32_t)name.length(); + }); + } + + uint32_t offset(Name const & name) const + { + return _dict.with_element(name, [&] (String const & str) + { + return str.offset; + }, [&] () + { + throw Not_found(); + return 0; + }); + } + + template + void write(WRITE_FN const & write_fn) const + { + _dict.for_each([&] (String const & str) + { + write_fn(str.offset, str.name.string(), str.name.length()); + }); + } + + uint32_t length() const { return _offset; } + }; + + + struct Buffer + { + struct Buffer_exceeded {}; + + addr_t const addr; + size_t const size; + size_t used { 0 }; + + Buffer(addr_t addr, size_t size) : addr(addr), size(size) {} + + void write(addr_t offset, void const * data, size_t length) + { + if ((offset + length) > size) + throw Buffer_exceeded(); + + memcpy((void*)(addr + offset), data, length); + if ((offset + length) > used) used = offset + length; + } + }; + + Env & _env; + Heap & _heap; + Buffer _buffer; + Fdt_dictionary _dict { _heap }; + + void _generate_tree(uint32_t & off, Config const & config, + void * initrd_start, size_t initrd_size); + + public: + + Fdt_generator(Env & env, Heap & heap, addr_t dtb_addr, size_t max_size) + : _env(env), _heap(heap), _buffer(dtb_addr, max_size) { } + + void generate(Config const & config, void * initrd_start, + size_t initrd_size); +}; + +#endif /* _SRC__SERVER__VMM__FDT_H_ */ diff --git a/repos/os/src/server/vmm/gic.cc b/repos/os/src/server/vmm/gic.cc index 25e67e5128..e3a9a465b0 100644 --- a/repos/os/src/server/vmm/gic.cc +++ b/repos/os/src/server/vmm/gic.cc @@ -207,7 +207,7 @@ Gic::Gicd_banked::Gicd_banked(Cpu_base & cpu, Gic & gic, Mmio_bus & bus) _rdist.construct(GICR_MMIO_START + (cpu.cpu_id()*0x20000), 0x20000, cpu.cpu_id(), - Vm::last_cpu() == cpu.cpu_id()); + (_gic._cpu_cnt-1) == cpu.cpu_id()); bus.add(*_rdist); } } @@ -251,26 +251,27 @@ void Gic::Gicd_sgir::write(Address_range &, Cpu & cpu, unsigned target_list = Target_list::get(value); unsigned irq = Int_id::get(value); - for (unsigned i = 0; i <= Vm::last_cpu(); i++) { + cpu.vm().for_each_cpu([&] (Cpu & c) { switch (type) { case Target_filter::MYSELF: - if (i != cpu.cpu_id()) { continue; } + if (c.cpu_id() != cpu.cpu_id()) + return; break; case Target_filter::ALL: - if (i == cpu.cpu_id()) { continue; } + if (c.cpu_id() == cpu.cpu_id()) + return; break; case Target_filter::LIST: - if (!(target_list & (1< #include +#include #include +#include +#include +#include -void Component::construct(Genode::Env & env) { static Vmm::Vm vm(env); } +using namespace Genode; + + +struct Main +{ + Env & env; + Heap heap { env.ram(), env.rm() }; + Attached_rom_dataspace config_rom { env, "config" }; + Signal_handler
handler { env.ep(), *this, &Main::update }; + Vmm::Config config { heap }; + Constructible vm {}; + + void update() + { + config_rom.update(); + config.update(config_rom.xml()); + vm.construct(env, heap, config); + } + + Main(Env & env) : env(env) + { + config_rom.sigh(handler); + update(); + } + +}; + + +void Component::construct(Env & env) { static Main m(env); } diff --git a/repos/os/src/server/vmm/psci.h b/repos/os/src/server/vmm/psci.h index 04e93ac779..147d6e8471 100644 --- a/repos/os/src/server/vmm/psci.h +++ b/repos/os/src/server/vmm/psci.h @@ -22,6 +22,8 @@ namespace Vmm { MIGRATE_INFO_TYPE = 0x84000006, PSCI_FEATURES = 0x8400000a, CPU_ON_32 = 0x84000003, + CPU_SUSPEND = 0xc4000001, + CPU_OFF = 0xc4000002, CPU_ON = 0xc4000003, }; diff --git a/repos/os/src/server/vmm/spec/arm_v7/board.h b/repos/os/src/server/vmm/spec/arm_v7/board.h index 32d533d72d..bfb98e59a0 100644 --- a/repos/os/src/server/vmm/spec/arm_v7/board.h +++ b/repos/os/src/server/vmm/spec/arm_v7/board.h @@ -1,5 +1,5 @@ /* - * \brief VMM address space utility + * \brief VMM - board definitions for ARM 32-bit * \author Stefan Kalkowski * \date 2019-11-13 */ @@ -11,47 +11,14 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _SRC__SERVER__VMM__BOARD_H_ -#define _SRC__SERVER__VMM__BOARD_H_ +#ifndef _SRC__SERVER__VMM__SPEC__ARM_V7__BOARD_H_ +#define _SRC__SERVER__VMM__SPEC__ARM_V7__BOARD_H_ + +#include namespace Vmm { - - enum { - SIZE_1_MB = 1024 * 1024, - KERNEL_OFFSET = 54 * SIZE_1_MB, - DTB_OFFSET = 64 * SIZE_1_MB, - INITRD_OFFSET = 96 * SIZE_1_MB, - - GIC_VERSION = 2, - GICD_MMIO_START = 0x8000000, - GICD_MMIO_SIZE = 0x10000, - GICC_MMIO_START = 0x8010000, - GICR_MMIO_START = 0x80a0000, - GICR_MMIO_SIZE = 0xf60000, - - PL011_MMIO_START = 0x9000000, - PL011_MMIO_SIZE = 0x1000, - PL011_IRQ = 33, - - VIRTIO_CONSOLE_MMIO_START = 0xa000000, - VIRTIO_CONSOLE_MMIO_SIZE = 0x200, - VIRTIO_CONSOLE_IRQ = 48, - - VIRTIO_NET_MMIO_START = 0xa000200, - VIRTIO_NET_MMIO_SIZE = 0x200, - VIRTIO_NET_IRQ = 49, - - VIRTIO_BLK_MMIO_START = 0xa000400, - VIRTIO_BLK_MMIO_SIZE = 0x200, - VIRTIO_BLK_IRQ = 50, - - RAM_START = 0x40000000, - RAM_SIZE = 128 * 1024 *1024, - - VTIMER_IRQ = 27, - - MAX_CPUS = 1, - }; + enum { KERNEL_OFFSET = 0x8000, }; } -#endif /* _SRC__SERVER__VMM__BOARD_H_ */ +#endif /* _SRC__SERVER__VMM__SPEC__ARM_V7__BOARD_H_ */ + diff --git a/repos/os/src/server/vmm/spec/arm_v7/target.mk b/repos/os/src/server/vmm/spec/arm_v7/target.mk index 175ad7c3bb..bcfd68502a 100644 --- a/repos/os/src/server/vmm/spec/arm_v7/target.mk +++ b/repos/os/src/server/vmm/spec/arm_v7/target.mk @@ -1,18 +1,5 @@ -TARGET = vmm -REQUIRES = hw arm_v7 -LIBS = base +include $(PRG_DIR)/../../target.inc + +REQUIRES += arm_v7 SRC_CC += spec/arm_v7/generic_timer.cc -SRC_CC += address_space.cc -SRC_CC += cpu.cc -SRC_CC += cpu_base.cc -SRC_CC += generic_timer.cc -SRC_CC += gic.cc -SRC_CC += main.cc -SRC_CC += mmio.cc -SRC_CC += pl011.cc -SRC_CC += vm.cc -INC_DIR += $(PRG_DIR)/../.. $(PRG_DIR) - -vpath %.cc $(PRG_DIR)/../.. - -CC_CXX_WARN_STRICT := +SRC_CC += spec/arm_v7/cpu.cc diff --git a/repos/os/src/server/vmm/spec/arm_v8/board.h b/repos/os/src/server/vmm/spec/arm_v8/board.h index 9f17addb85..466e7fc3c8 100644 --- a/repos/os/src/server/vmm/spec/arm_v8/board.h +++ b/repos/os/src/server/vmm/spec/arm_v8/board.h @@ -1,5 +1,5 @@ /* - * \brief VMM address space utility + * \brief VMM - board definitions for ARM 64-bit * \author Stefan Kalkowski * \date 2019-11-13 */ @@ -11,47 +11,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _SRC__SERVER__VMM__BOARD_H_ -#define _SRC__SERVER__VMM__BOARD_H_ +#ifndef _SRC__SERVER__VMM__SPEC__ARM_V8__BOARD_H_ +#define _SRC__SERVER__VMM__SPEC__ARM_V8__BOARD_H_ + +#include namespace Vmm { - - enum { - SIZE_1_MB = 1024 * 1024, - KERNEL_OFFSET = 0x80000, - INITRD_OFFSET = 32 * SIZE_1_MB, - DTB_OFFSET = 64 * SIZE_1_MB, - - GIC_VERSION = 3, - GICD_MMIO_START = 0x8000000, - GICD_MMIO_SIZE = 0x10000, - GICC_MMIO_START = 0x8010000, - GICR_MMIO_START = 0x80a0000, - GICR_MMIO_SIZE = 0xf60000, - - PL011_MMIO_START = 0x9000000, - PL011_MMIO_SIZE = 0x1000, - PL011_IRQ = 33, - - VIRTIO_CONSOLE_MMIO_START = 0xa000000, - VIRTIO_CONSOLE_MMIO_SIZE = 0x200, - VIRTIO_CONSOLE_IRQ = 48, - - VIRTIO_NET_MMIO_START = 0xa000200, - VIRTIO_NET_MMIO_SIZE = 0x200, - VIRTIO_NET_IRQ = 49, - - VIRTIO_BLK_MMIO_START = 0xa000400, - VIRTIO_BLK_MMIO_SIZE = 0x200, - VIRTIO_BLK_IRQ = 50, - - RAM_START = 0x40000000, - RAM_SIZE = 128 * 1024 *1024, - - VTIMER_IRQ = 27, - - MAX_CPUS = 4, - }; + enum { KERNEL_OFFSET = 0x80000, }; } -#endif /* _SRC__SERVER__VMM__BOARD_H_ */ +#endif /* _SRC__SERVER__VMM__SPEC__ARM_V8__BOARD_H_ */ diff --git a/repos/os/src/server/vmm/spec/arm_v8/cpu.cc b/repos/os/src/server/vmm/spec/arm_v8/cpu.cc index 20c992eda6..96d202de40 100644 --- a/repos/os/src/server/vmm/spec/arm_v8/cpu.cc +++ b/repos/os/src/server/vmm/spec/arm_v8/cpu.cc @@ -188,14 +188,12 @@ void Cpu::Icc_sgi1r_el1::write(Genode::addr_t v) unsigned target_list = v & 0xffff; unsigned irq = (v >> 24) & 0xf; - for (unsigned i = 0; i <= Vm::last_cpu(); i++) { - if (target_list & (1< class Virtio_device; using namespace Genode; @@ -219,8 +220,16 @@ class Vmm::Virtio_split_queue }; +class Vmm::Virtio_device_base : public List::Element +{ + public: + + virtual ~Virtio_device_base() {} +}; + + template -class Vmm::Virtio_device : public Vmm::Mmio_device +class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base { protected: diff --git a/repos/os/src/server/vmm/vm.cc b/repos/os/src/server/vmm/vm.cc index d01ddd9d15..7d40779c33 100644 --- a/repos/os/src/server/vmm/vm.cc +++ b/repos/os/src/server/vmm/vm.cc @@ -11,53 +11,87 @@ * under the terms of the GNU Affero General Public License version 3. */ +#include #include using Vmm::Vm; -void Vm::_load_kernel() + +enum { LOG2_2MB = 21 }; + +Genode::Entrypoint & Vm::Cpu_entry::ep(unsigned i, Vm & vm) { - Genode::memcpy((void*)(_ram.local() + KERNEL_OFFSET), - _kernel_rom.local_addr(), - _kernel_rom.size()); + if (i == 0) + return vm._env.ep(); + + _ep.construct(vm._env, STACK_SIZE, "vcpu ep", + vm._env.cpu().affinity_space().location_of_index(i)); + return *_ep; } -void Vm::_load_dtb() + +Vm::Cpu_entry::Cpu_entry(unsigned i, Vm & vm) +: + cpu(vm, vm._vm, vm._bus, vm._gic, vm._env, vm._heap, ep(i, vm), i) { } + + +Genode::addr_t Vm::_initrd_offset() const { - Genode::memcpy((void*)(_ram.local() + DTB_OFFSET), - _dtb_rom.local_addr(), - _dtb_rom.size()); + return align_addr(KERNEL_OFFSET+_kernel_rom.size(), LOG2_2MB); +} + + +Genode::addr_t Vm::_dtb_offset() const +{ + return align_addr(_initrd_offset()+_initrd_rom.size(), LOG2_2MB); +} + + +void Vm::_load_kernel() +{ + memcpy((void*)(_ram.local() + KERNEL_OFFSET), + _kernel_rom.local_addr(), _kernel_rom.size()); } void Vm::_load_initrd() { - Genode::memcpy((void*)(_ram.local() + INITRD_OFFSET), - _initrd_rom.local_addr(), - _initrd_rom.size()); + memcpy((void*)(_ram.local() + _initrd_offset()), + _initrd_rom.local_addr(), _initrd_rom.size()); +} + + +void Vm::_load_dtb() +{ + Fdt_generator fdt(_env, _heap, _ram.local() + _dtb_offset(), 1 << LOG2_2MB); + fdt.generate(_config, (void*)(_ram.base()+_initrd_offset()), _initrd_rom.size()); } Vmm::Cpu & Vm::boot_cpu() { - if (!_cpus[0].constructed()) - _cpus[0].construct(*this, _vm, _bus, _gic, _env, _heap, _env.ep(), 0); - return *_cpus[0]; + if (!_cpu_list.first()) { + Cpu_entry * last = nullptr; + for (unsigned i = 0; i < _config.cpu_count(); i++) { + Cpu_entry * e = new (_heap) Cpu_entry(i, *this); + _cpu_list.insert(e, last); + last = e; + } + } + + return _cpu_list.first()->cpu; } -Vm::Vm(Genode::Env & env) -: _env(env), - _gic("Gicv3", GICD_MMIO_START, GICD_MMIO_SIZE, - MAX_CPUS, GIC_VERSION, _vm, _bus, env), - _uart("Pl011", PL011_MMIO_START, PL011_MMIO_SIZE, - PL011_IRQ, boot_cpu(), _bus, env), - _virtio_console("HVC", VIRTIO_CONSOLE_MMIO_START, VIRTIO_CONSOLE_MMIO_SIZE, - VIRTIO_CONSOLE_IRQ, boot_cpu(), _bus, _ram, env), - _virtio_net("Net", VIRTIO_NET_MMIO_START, VIRTIO_NET_MMIO_SIZE, - VIRTIO_NET_IRQ, boot_cpu(), _bus, _ram, env), - _virtio_block("Block", VIRTIO_BLK_MMIO_START, VIRTIO_BLK_MMIO_SIZE, - VIRTIO_BLK_IRQ, boot_cpu(), _bus, _ram, env, _heap) +Vm::Vm(Genode::Env & env, Heap & heap, Config & config) +: + _env(env), + _heap(heap), + _config(config), + _gic("Gic", GICD_MMIO_START, GICD_MMIO_SIZE, + config.cpu_count(), config.gic_version(), _vm, _bus, env), + _uart("Pl011", PL011_MMIO_START, PL011_MMIO_SIZE, + PL011_IRQ, boot_cpu(), _bus, env) { _vm.attach(_vm_ram.cap(), RAM_START, Genode::Vm_session::Attach_attr { .offset = 0, @@ -65,21 +99,45 @@ Vm::Vm(Genode::Env & env) .executable = true, .writeable = true }); - _load_kernel(); - _load_dtb(); - _load_initrd(); + _config.for_each_virtio_device([&] (Config::Virtio_device const & dev) { + switch (dev.type) { + case Config::Virtio_device::CONSOLE: + _device_list.insert(new (_heap) + Virtio_console(dev.name.string(), (uint64_t)dev.mmio_start, + dev.mmio_size, dev.irq, boot_cpu(), + _bus, _ram, env)); + return; + case Config::Virtio_device::NET: + _device_list.insert(new (_heap) + Virtio_net(dev.name.string(), (uint64_t)dev.mmio_start, + dev.mmio_size, dev.irq, boot_cpu(), _bus, _ram, + env)); + return; + case Config::Virtio_device::BLOCK: + _device_list.insert(new (_heap) + Virtio_block_device(dev.name.string(), (uint64_t)dev.mmio_start, + dev.mmio_size, dev.irq, boot_cpu(), + _bus, _ram, env, heap)); + default: + return; + }; + }); - for (unsigned i = 1; i < MAX_CPUS; i++) { - Genode::Affinity::Space space = _env.cpu().affinity_space(); - Genode::Affinity::Location location(space.location_of_index(i)); - _eps[i].construct(_env, STACK_SIZE, "vcpu ep", location); - _cpus[i].construct(*this, _vm, _bus, _gic, _env, _heap, *_eps[i], i); - } + _load_kernel(); + _load_initrd(); + _load_dtb(); Genode::log("Start virtual machine ..."); Cpu & cpu = boot_cpu(); cpu.initialize_boot(_ram.base() + KERNEL_OFFSET, - _ram.base() + DTB_OFFSET); + _ram.base() + _dtb_offset()); cpu.run(); }; + + +Vm::~Vm() +{ + while (_cpu_list.first()) destroy(_heap, _cpu_list.first()); + while (_device_list.first()) destroy(_heap, _device_list.first()); +} diff --git a/repos/os/src/server/vmm/vm.h b/repos/os/src/server/vmm/vm.h index 6e11b97a56..715debda75 100644 --- a/repos/os/src/server/vmm/vm.h +++ b/repos/os/src/server/vmm/vm.h @@ -15,6 +15,7 @@ #define _SRC__SERVER__VMM__VM_H_ #include +#include #include #include #include @@ -28,42 +29,54 @@ #include #include -namespace Vmm { class Vm; } +namespace Vmm { + class Vm; + using namespace Genode; +} class Vmm::Vm { private: - using Ep = Genode::Entrypoint; + struct Cpu_entry : List::Element + { + enum { STACK_SIZE = sizeof(unsigned long) * 2048, }; - enum { STACK_SIZE = sizeof(unsigned long) * 2048, }; + Constructible _ep {}; - Genode::Env & _env; - Genode::Vm_connection _vm { _env }; - Genode::Attached_rom_dataspace _kernel_rom { _env, "linux" }; - Genode::Attached_rom_dataspace _dtb_rom { _env, "dtb" }; - Genode::Attached_rom_dataspace _initrd_rom { _env, "initrd" }; - Genode::Attached_ram_dataspace _vm_ram { _env.ram(), _env.rm(), - RAM_SIZE, Genode::CACHED }; - Ram _ram { RAM_START, RAM_SIZE, - (Genode::addr_t)_vm_ram.local_addr()}; - Genode::Heap _heap { _env.ram(), _env.rm() }; - Mmio_bus _bus; - Gic _gic; - Genode::Constructible _eps[MAX_CPUS]; - Genode::Constructible _cpus[MAX_CPUS]; - Pl011 _uart; - Virtio_console _virtio_console; - Virtio_net _virtio_net; - Virtio_block_device _virtio_block; + Entrypoint & ep(unsigned i, Vm & vm); + Cpu cpu; + + Cpu_entry(unsigned idx, Vm & vm); + }; + + Env & _env; + Heap & _heap; + Config & _config; + Vm_connection _vm { _env }; + Attached_rom_dataspace _kernel_rom { _env, _config.kernel_name() }; + Attached_rom_dataspace _initrd_rom { _env, _config.initrd_name() }; + Attached_ram_dataspace _vm_ram { _env.ram(), _env.rm(), + _config.ram_size(), CACHED }; + Ram _ram { RAM_START, _config.ram_size(), + (addr_t)_vm_ram.local_addr()}; + Mmio_bus _bus; + Gic _gic; + List _cpu_list; + List _device_list; + Pl011 _uart; + + addr_t _initrd_offset() const; + addr_t _dtb_offset() const; void _load_kernel(); - void _load_dtb(); void _load_initrd(); + void _load_dtb(); public: - Vm(Genode::Env & env); + Vm(Env & env, Heap & heap, Config & config); + ~Vm(); Mmio_bus & bus() { return _bus; } Cpu & boot_cpu(); @@ -71,11 +84,16 @@ class Vmm::Vm template void cpu(unsigned cpu, F func) { - if (cpu >= MAX_CPUS) Genode::error("Cpu number out of bounds "); - else func(*_cpus[cpu]); + for (Cpu_entry * ce = _cpu_list.first(); ce; ce = ce->next()) + if (ce->cpu.cpu_id() == cpu) func(ce->cpu); } - static unsigned last_cpu() { return MAX_CPUS - 1; } + template + void for_each_cpu(F func) + { + for (Cpu_entry * ce = _cpu_list.first(); ce; ce = ce->next()) + func(ce->cpu); + } }; #endif /* _SRC__SERVER__VMM__VM_H_ */ From 3250f1951beb14ee67df807aa709cccbc404da71 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Tue, 15 Nov 2022 15:37:37 +0100 Subject: [PATCH 0069/1921] vbox6: gim system time update measurement 200 TSC ticks for max measurement duration can get too small on platforms with high TSC frequencies (e.g., >3GHz) and low CPU frequencies often caused by HWP configurations. Therefore, we express the measurement duration in NS (not ticks) and calculate max duration ticks using the TSC frequency. This way the max duration becomes independent of the TSC frequency. fixes #4672 --- repos/ports/src/virtualbox6/sup_gim.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/repos/ports/src/virtualbox6/sup_gim.cc b/repos/ports/src/virtualbox6/sup_gim.cc index f19576bca8..e9c21d9394 100644 --- a/repos/ports/src/virtualbox6/sup_gim.cc +++ b/repos/ports/src/virtualbox6/sup_gim.cc @@ -27,6 +27,7 @@ /* Genode includes */ #include +#include /* VirtualBox includes */ #include /* needed for access to VM::gim.s */ @@ -59,6 +60,18 @@ void Sup::update_gim_system_time(VM &vm, VMCPU &vmcpu) uint64_t uTsc = 0; uint64_t uVirtNanoTS = 0; + enum { MAX_MEASUREMENT_DURATION_NS = 400U }; + + /* calculate max duration from tsc */ + PSUPGLOBALINFOPAGE pGip = g_pSUPGlobalInfoPage; + uint64_t max_ticks = MAX_MEASUREMENT_DURATION_NS; + + if(pGip && pGip->u64CpuHz) { + /* round */ + uint64_t ticks_per_ns = (pGip->u64CpuHz + 500'000'000) / 1'000'000'000; + max_ticks = max(ticks_per_ns * MAX_MEASUREMENT_DURATION_NS, max_ticks); + } + /* * If we got preempted during the measurement, repeat. */ @@ -68,14 +81,14 @@ void Sup::update_gim_system_time(VM &vm, VMCPU &vmcpu) uVirtNanoTS = TMVirtualGetNoCheck(&vm) | UINT64_C(1); uint64_t const uTsc_again = TMCpuTickGetNoCheck(&vmcpu) | UINT64_C(1); - enum { MAX_MEASUREMENT_DURATION = 200U }; - if (uTsc_again - uTsc < MAX_MEASUREMENT_DURATION) + if (uTsc_again - uTsc < max_ticks) break; if (round > 3 && round % 2 == 0) warning("preemption during measurement, uTsc=", uTsc, - " uTsc_again=", uTsc_again, " uVirtNanoTS=", uVirtNanoTS); + " uTsc_again=", uTsc_again, " uVirtNanoTS=", uVirtNanoTS, + " max_ticks=", max_ticks); } for (VMCPUID idCpu = 0; idCpu < vm.cCpus; idCpu++) { From 25d7970b6fe61d8e7a9653a9a82526ac437c8be3 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 16 Nov 2022 15:24:54 +0100 Subject: [PATCH 0070/1921] depot: fix README of pkg/usb_modem_drv --- repos/dde_linux/recipes/pkg/usb_modem_drv/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/dde_linux/recipes/pkg/usb_modem_drv/README b/repos/dde_linux/recipes/pkg/usb_modem_drv/README index 2186801aae..0aa6d2cff4 100644 --- a/repos/dde_linux/recipes/pkg/usb_modem_drv/README +++ b/repos/dde_linux/recipes/pkg/usb_modem_drv/README @@ -1,2 +1,2 @@ - Package for bundling wifi_drv and wifi_firmware + Runtime for USB GSM/LTE modem driver From c58d799f1636d64e5eb0497c331708d75b93847a Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 17 Nov 2022 07:55:49 +0100 Subject: [PATCH 0071/1921] depot: update recipe hashes --- repos/base-fiasco/recipes/src/base-fiasco/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash | 2 +- repos/base-foc/recipes/src/base-foc-pbxa9/hash | 2 +- repos/base-foc/recipes/src/base-foc-pc/hash | 2 +- repos/base-foc/recipes/src/base-foc-rpi3/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx53_qsb/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash | 2 +- repos/base-hw/recipes/src/base-hw-nit6_solox/hash | 2 +- repos/base-hw/recipes/src/base-hw-pbxa9/hash | 2 +- repos/base-hw/recipes/src/base-hw-pc/hash | 2 +- repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash | 2 +- repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash | 2 +- repos/base-linux/recipes/api/base-linux/hash | 2 +- repos/base-linux/recipes/src/base-linux/hash | 2 +- repos/base-nova/recipes/api/base-nova/hash | 2 +- repos/base-nova/recipes/src/base-nova/hash | 2 +- repos/base-okl4/recipes/src/base-okl4/hash | 2 +- repos/base-pistachio/recipes/src/base-pistachio/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-x86/hash | 2 +- repos/base/recipes/pkg/test-ds_ownership/hash | 2 +- repos/base/recipes/pkg/test-entrypoint/hash | 2 +- repos/base/recipes/pkg/test-log/hash | 2 +- repos/base/recipes/pkg/test-mmio/hash | 2 +- repos/base/recipes/pkg/test-new_delete/hash | 2 +- repos/base/recipes/pkg/test-reconstructible/hash | 2 +- repos/base/recipes/pkg/test-registry/hash | 2 +- repos/base/recipes/pkg/test-rm_fault/hash | 2 +- repos/base/recipes/pkg/test-rm_fault_no_nox/hash | 2 +- repos/base/recipes/pkg/test-rm_nested/hash | 2 +- repos/base/recipes/pkg/test-rm_stress/hash | 2 +- repos/base/recipes/pkg/test-sanitizer/hash | 2 +- repos/base/recipes/pkg/test-stack_smash/hash | 2 +- repos/base/recipes/pkg/test-synced_interface/hash | 2 +- repos/base/recipes/pkg/test-timer/hash | 2 +- repos/base/recipes/pkg/test-tls/hash | 2 +- repos/base/recipes/pkg/test-token/hash | 2 +- repos/base/recipes/pkg/test-xml_generator/hash | 2 +- repos/base/recipes/pkg/test-xml_node/hash | 2 +- repos/base/recipes/src/test-xml_generator/hash | 2 +- repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash | 2 +- repos/dde_bsd/recipes/src/bsd_audio_drv/hash | 2 +- repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash | 2 +- repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash | 2 +- repos/dde_linux/recipes/pkg/usb_modem_drv/hash | 2 +- repos/dde_linux/recipes/pkg/wireguard/hash | 2 +- repos/dde_linux/recipes/raw/wifi_firmware/hash | 2 +- repos/dde_linux/recipes/src/legacy_usb_host_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_hid_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_modem_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_net_drv/hash | 2 +- repos/dde_linux/recipes/src/vfs_lxip/hash | 2 +- repos/dde_linux/recipes/src/wireguard/hash | 2 +- repos/dde_rump/recipes/pkg/ext2_fs/hash | 2 +- repos/dde_rump/recipes/src/rump/hash | 2 +- repos/demo/recipes/src/demo/hash | 2 +- repos/gems/recipes/api/aes_cbc_4k/hash | 2 +- repos/gems/recipes/pkg/backdrop/hash | 2 +- repos/gems/recipes/pkg/cbe_check/hash | 2 +- repos/gems/recipes/pkg/cbe_demo/hash | 2 +- repos/gems/recipes/pkg/cbe_fs/hash | 2 +- repos/gems/recipes/pkg/cbe_init/hash | 2 +- repos/gems/recipes/pkg/cbe_shell/hash | 2 +- repos/gems/recipes/pkg/cbe_ta_fs/hash | 2 +- repos/gems/recipes/pkg/cbe_ta_vfs/hash | 2 +- repos/gems/recipes/pkg/cbe_vbox5-nova/hash | 2 +- repos/gems/recipes/pkg/cbe_vfs/hash | 2 +- repos/gems/recipes/pkg/cbe_vm_fs/hash | 2 +- repos/gems/recipes/pkg/depot_download/hash | 2 +- repos/gems/recipes/pkg/download_coreplus/hash | 2 +- repos/gems/recipes/pkg/drivers_managed-pc/hash | 2 +- repos/gems/recipes/pkg/drivers_nic-pc/hash | 2 +- repos/gems/recipes/pkg/file_vault/hash | 2 +- repos/gems/recipes/pkg/fonts_fs/hash | 2 +- repos/gems/recipes/pkg/motif_decorator/hash | 2 +- repos/gems/recipes/pkg/motif_wm/hash | 2 +- repos/gems/recipes/pkg/nano3d/hash | 2 +- repos/gems/recipes/pkg/sculpt/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution-pc/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution/hash | 2 +- repos/gems/recipes/pkg/sticks_blue_backdrop/hash | 2 +- repos/gems/recipes/pkg/terminal/hash | 2 +- repos/gems/recipes/pkg/test-depot_query_index/hash | 2 +- repos/gems/recipes/pkg/test-fs_tool/hash | 2 +- repos/gems/recipes/pkg/test-libc_vfs_audit/hash | 2 +- repos/gems/recipes/pkg/themed_decorator/hash | 2 +- repos/gems/recipes/pkg/themed_wm/hash | 2 +- repos/gems/recipes/pkg/touch_keyboard/hash | 2 +- repos/gems/recipes/pkg/trace_fs/hash | 2 +- repos/gems/recipes/pkg/trace_recorder/hash | 2 +- repos/gems/recipes/pkg/window_layouter/hash | 2 +- repos/gems/recipes/pkg/wm/hash | 2 +- repos/gems/recipes/raw/drivers_managed-pc/hash | 2 +- repos/gems/recipes/src/backdrop/hash | 2 +- repos/gems/recipes/src/cbe/hash | 2 +- repos/gems/recipes/src/cpu_load_display/hash | 2 +- repos/gems/recipes/src/decorator/hash | 2 +- repos/gems/recipes/src/depot_deploy/hash | 2 +- repos/gems/recipes/src/depot_download_manager/hash | 2 +- repos/gems/recipes/src/depot_query/hash | 2 +- repos/gems/recipes/src/driver_manager/hash | 2 +- repos/gems/recipes/src/file_terminal/hash | 2 +- repos/gems/recipes/src/file_vault/hash | 2 +- repos/gems/recipes/src/fs_query/hash | 2 +- repos/gems/recipes/src/fs_tool/hash | 2 +- repos/gems/recipes/src/gpt_write/hash | 2 +- repos/gems/recipes/src/gui_fader/hash | 2 +- repos/gems/recipes/src/menu_view/hash | 2 +- repos/gems/recipes/src/mixer_gui_qt/hash | 2 +- repos/gems/recipes/src/nano3d/hash | 2 +- repos/gems/recipes/src/sculpt_manager/hash | 2 +- repos/gems/recipes/src/terminal/hash | 2 +- repos/gems/recipes/src/test-tiled_wm/hash | 2 +- repos/gems/recipes/src/text_area/hash | 2 +- repos/gems/recipes/src/themed_decorator/hash | 2 +- repos/gems/recipes/src/touch_keyboard/hash | 2 +- repos/gems/recipes/src/trace_recorder/hash | 2 +- repos/gems/recipes/src/trace_recorder_policy/hash | 2 +- repos/gems/recipes/src/vfs_audit/hash | 2 +- repos/gems/recipes/src/vfs_gpu/hash | 2 +- repos/gems/recipes/src/vfs_import/hash | 2 +- repos/gems/recipes/src/vfs_pipe/hash | 2 +- repos/gems/recipes/src/vfs_trace/hash | 2 +- repos/gems/recipes/src/vfs_ttf/hash | 2 +- repos/gems/recipes/src/window_layouter/hash | 2 +- repos/gems/recipes/src/wm/hash | 2 +- repos/libports/recipes/api/curl/hash | 2 +- repos/libports/recipes/api/expat/hash | 2 +- repos/libports/recipes/api/fatfs/hash | 2 +- repos/libports/recipes/api/jitterentropy/hash | 2 +- repos/libports/recipes/api/libdrm/hash | 2 +- repos/libports/recipes/api/libgcrypt/hash | 2 +- repos/libports/recipes/api/lwip/hash | 2 +- repos/libports/recipes/api/openssl/hash | 2 +- repos/libports/recipes/api/pcre16/hash | 2 +- repos/libports/recipes/api/pcsc-lite/hash | 2 +- repos/libports/recipes/api/qoost/hash | 2 +- repos/libports/recipes/api/qt5/hash | 2 +- repos/libports/recipes/api/spark/hash | 2 +- repos/libports/recipes/pkg/acpica/hash | 2 +- repos/libports/recipes/pkg/gcov/hash | 2 +- repos/libports/recipes/pkg/mesa_gears/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-cpu/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-intel/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-lima/hash | 2 +- repos/libports/recipes/pkg/pdf_view/hash | 2 +- repos/libports/recipes/pkg/qt5_textedit/hash | 2 +- repos/libports/recipes/pkg/system_clock-dummy/hash | 2 +- repos/libports/recipes/pkg/system_clock-pc/hash | 2 +- repos/libports/recipes/pkg/system_rtc-linux/hash | 2 +- repos/libports/recipes/pkg/system_rtc-pc/hash | 2 +- repos/libports/recipes/pkg/test-expat/hash | 2 +- repos/libports/recipes/pkg/test-ldso/hash | 2 +- repos/libports/recipes/pkg/test-libc/hash | 2 +- repos/libports/recipes/pkg/test-libc_connect_lwip/hash | 2 +- repos/libports/recipes/pkg/test-libc_connect_lxip/hash | 2 +- .../libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash | 2 +- .../libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash | 2 +- repos/libports/recipes/pkg/test-libc_counter/hash | 2 +- repos/libports/recipes/pkg/test-libc_execve/hash | 2 +- repos/libports/recipes/pkg/test-libc_fifo_pipe/hash | 2 +- repos/libports/recipes/pkg/test-libc_fork/hash | 2 +- repos/libports/recipes/pkg/test-libc_getenv/hash | 2 +- repos/libports/recipes/pkg/test-libc_pipe/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_block/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_counter/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_fs/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_ram/hash | 2 +- repos/libports/recipes/pkg/test-pthread/hash | 2 +- repos/libports/recipes/pkg/test-sequence/hash | 2 +- repos/libports/recipes/pkg/test-spark/hash | 2 +- repos/libports/recipes/pkg/test-spark_exception/hash | 2 +- repos/libports/recipes/pkg/test-spark_secondary_stack/hash | 2 +- repos/libports/recipes/pkg/test-stdcxx/hash | 2 +- repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash | 2 +- repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash | 2 +- repos/libports/recipes/pkg/usb_webcam/hash | 2 +- repos/libports/recipes/src/acpica/hash | 2 +- repos/libports/recipes/src/curl/hash | 2 +- repos/libports/recipes/src/expat/hash | 2 +- repos/libports/recipes/src/extract/hash | 2 +- repos/libports/recipes/src/fetchurl/hash | 2 +- repos/libports/recipes/src/ffi/hash | 2 +- repos/libports/recipes/src/gmp/hash | 2 +- repos/libports/recipes/src/icu/hash | 2 +- repos/libports/recipes/src/jbig2dec/hash | 2 +- repos/libports/recipes/src/jpeg/hash | 2 +- repos/libports/recipes/src/libarchive/hash | 2 +- repos/libports/recipes/src/libc/hash | 2 +- repos/libports/recipes/src/libdrm/hash | 2 +- repos/libports/recipes/src/libqgenodeviewwidget/hash | 2 +- repos/libports/recipes/src/libqpluginwidget/hash | 2 +- repos/libports/recipes/src/libsparkcrypto/hash | 2 +- repos/libports/recipes/src/libssh/hash | 2 +- repos/libports/recipes/src/libusb/hash | 2 +- repos/libports/recipes/src/libuvc/hash | 2 +- repos/libports/recipes/src/libyuv/hash | 2 +- repos/libports/recipes/src/mesa/hash | 2 +- repos/libports/recipes/src/mesa_gears/hash | 2 +- repos/libports/recipes/src/openjpeg/hash | 2 +- repos/libports/recipes/src/openssl/hash | 2 +- repos/libports/recipes/src/pcre16/hash | 2 +- repos/libports/recipes/src/pcsc-lite/hash | 2 +- repos/libports/recipes/src/pdf_view/hash | 2 +- repos/libports/recipes/src/qt5_base/hash | 2 +- repos/libports/recipes/src/qt5_calculatorform/hash | 2 +- repos/libports/recipes/src/qt5_declarative/hash | 2 +- repos/libports/recipes/src/qt5_graphicaleffects/hash | 2 +- repos/libports/recipes/src/qt5_launchpad/hash | 2 +- repos/libports/recipes/src/qt5_openglwindow/hash | 2 +- repos/libports/recipes/src/qt5_quickcontrols/hash | 2 +- repos/libports/recipes/src/qt5_quickcontrols2/hash | 2 +- repos/libports/recipes/src/qt5_samegame/hash | 2 +- repos/libports/recipes/src/qt5_svg/hash | 2 +- repos/libports/recipes/src/qt5_testqstring/hash | 2 +- repos/libports/recipes/src/qt5_tetrix/hash | 2 +- repos/libports/recipes/src/qt5_textedit/hash | 2 +- repos/libports/recipes/src/qt5_virtualkeyboard/hash | 2 +- repos/libports/recipes/src/qt5_virtualkeyboard_example/hash | 2 +- repos/libports/recipes/src/spark/hash | 2 +- repos/libports/recipes/src/system_rtc/hash | 2 +- repos/libports/recipes/src/test-expat/hash | 2 +- repos/libports/recipes/src/test-libc_fifo_pipe/hash | 2 +- repos/libports/recipes/src/test-qpluginwidget/hash | 2 +- repos/libports/recipes/src/test-qt_core/hash | 2 +- repos/libports/recipes/src/test-qt_core_cmake/hash | 2 +- repos/libports/recipes/src/test-qt_quick/hash | 2 +- repos/libports/recipes/src/test-spark/hash | 2 +- repos/libports/recipes/src/test-spark_exception/hash | 2 +- repos/libports/recipes/src/test-spark_secondary_stack/hash | 2 +- repos/libports/recipes/src/test-tcp/hash | 2 +- repos/libports/recipes/src/usb_webcam/hash | 2 +- repos/libports/recipes/src/vesa_drv/hash | 2 +- repos/libports/recipes/src/vfs_fatfs/hash | 2 +- repos/libports/recipes/src/vfs_jitterentropy/hash | 2 +- repos/libports/recipes/src/vfs_libusb/hash | 2 +- repos/libports/recipes/src/vfs_lwip/hash | 2 +- repos/libports/recipes/src/vfs_oss/hash | 2 +- repos/libports/recipes/src/zlib/hash | 2 +- repos/os/recipes/api/genode_c_api/hash | 2 +- repos/os/recipes/api/gpu_session/hash | 2 +- repos/os/recipes/api/os/hash | 2 +- repos/os/recipes/api/pin_control_session/hash | 2 +- repos/os/recipes/api/platform_session/hash | 2 +- repos/os/recipes/api/usb_session/hash | 2 +- repos/os/recipes/pkg/black_hole/hash | 2 +- repos/os/recipes/pkg/chroot/hash | 2 +- repos/os/recipes/pkg/clipboard/hash | 2 +- repos/os/recipes/pkg/cpu_balancer/hash | 2 +- repos/os/recipes/pkg/cpu_balancer_config/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-linux/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-pbxa9/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-pc/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash | 2 +- repos/os/recipes/pkg/drivers_nic-linux/hash | 2 +- repos/os/recipes/pkg/drivers_nic-pbxa9/hash | 2 +- repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash | 2 +- repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash | 2 +- repos/os/recipes/pkg/fs_report/hash | 2 +- repos/os/recipes/pkg/fs_rom/hash | 2 +- repos/os/recipes/pkg/mixer/hash | 2 +- repos/os/recipes/pkg/nic_router-nat/hash | 2 +- repos/os/recipes/pkg/nit_focus/hash | 2 +- repos/os/recipes/pkg/part_block/hash | 2 +- repos/os/recipes/pkg/recall_fs/hash | 2 +- repos/os/recipes/pkg/report_rom/hash | 2 +- repos/os/recipes/pkg/rom_filter/hash | 2 +- repos/os/recipes/pkg/rom_reporter/hash | 2 +- repos/os/recipes/pkg/test-black_hole/hash | 2 +- repos/os/recipes/pkg/test-capture/hash | 2 +- repos/os/recipes/pkg/test-clipboard/hash | 2 +- repos/os/recipes/pkg/test-dynamic_config/hash | 2 +- repos/os/recipes/pkg/test-dynamic_config_loader/hash | 2 +- repos/os/recipes/pkg/test-fault_detection/hash | 2 +- repos/os/recipes/pkg/test-fs_packet/hash | 2 +- repos/os/recipes/pkg/test-fs_report/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update_fs/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update_ram/hash | 2 +- repos/os/recipes/pkg/test-init/hash | 2 +- repos/os/recipes/pkg/test-init_loop/hash | 2 +- repos/os/recipes/pkg/test-lx_block/hash | 2 +- repos/os/recipes/pkg/test-nic_loopback/hash | 2 +- repos/os/recipes/pkg/test-nic_perf/hash | 2 +- repos/os/recipes/pkg/test-nic_perf_router/hash | 2 +- repos/os/recipes/pkg/test-part_block_gpt/hash | 2 +- repos/os/recipes/pkg/test-part_block_mbr/hash | 2 +- repos/os/recipes/pkg/test-ram_fs_chunk/hash | 2 +- repos/os/recipes/pkg/test-read_only_rom/hash | 2 +- repos/os/recipes/pkg/test-report_rom/hash | 2 +- repos/os/recipes/pkg/test-resource_request/hash | 2 +- repos/os/recipes/pkg/test-resource_yield/hash | 2 +- repos/os/recipes/pkg/test-rom_filter/hash | 2 +- repos/os/recipes/pkg/test-rtc/hash | 2 +- repos/os/recipes/pkg/test-sandbox/hash | 2 +- repos/os/recipes/pkg/test-signal/hash | 2 +- repos/os/recipes/pkg/test-slab/hash | 2 +- repos/os/recipes/pkg/test-terminal_crosslink/hash | 2 +- repos/os/recipes/pkg/test-trace/hash | 2 +- repos/os/recipes/pkg/test-trace_buffer/hash | 2 +- repos/os/recipes/pkg/test-trace_logger/hash | 2 +- repos/os/recipes/pkg/test-utf8/hash | 2 +- repos/os/recipes/pkg/test-vfs_block/hash | 2 +- repos/os/recipes/pkg/test-vfs_stress_fs/hash | 2 +- repos/os/recipes/pkg/test-vfs_stress_ram/hash | 2 +- repos/os/recipes/pkg/test-weak_ptr/hash | 2 +- repos/os/recipes/pkg/trace_logger/hash | 2 +- repos/os/recipes/pkg/vfs/hash | 2 +- repos/os/recipes/pkg/vfs_block/hash | 2 +- repos/os/recipes/src/acpi_drv/hash | 2 +- repos/os/recipes/src/ahci_drv/hash | 2 +- repos/os/recipes/src/black_hole/hash | 2 +- repos/os/recipes/src/block_tester/hash | 2 +- repos/os/recipes/src/boot_fb_drv/hash | 2 +- repos/os/recipes/src/cached_fs_rom/hash | 2 +- repos/os/recipes/src/chroot/hash | 2 +- repos/os/recipes/src/clipboard/hash | 2 +- repos/os/recipes/src/cpu_balancer/hash | 2 +- repos/os/recipes/src/cpu_burner/hash | 2 +- repos/os/recipes/src/dummy/hash | 2 +- repos/os/recipes/src/dummy_rtc_drv/hash | 2 +- repos/os/recipes/src/dynamic_rom/hash | 2 +- repos/os/recipes/src/event_filter/hash | 2 +- repos/os/recipes/src/fb_sdl/hash | 2 +- repos/os/recipes/src/fs_report/hash | 2 +- repos/os/recipes/src/fs_rom/hash | 2 +- repos/os/recipes/src/global_keys_handler/hash | 2 +- repos/os/recipes/src/gui_fb/hash | 2 +- repos/os/recipes/src/init/hash | 2 +- repos/os/recipes/src/input_event_bridge/hash | 2 +- repos/os/recipes/src/intel_gpu_drv/hash | 2 +- repos/os/recipes/src/lan9118_nic_drv/hash | 2 +- repos/os/recipes/src/linux_nic_drv/hash | 2 +- repos/os/recipes/src/linux_rtc_drv/hash | 2 +- repos/os/recipes/src/loader/hash | 2 +- repos/os/recipes/src/log_core/hash | 2 +- repos/os/recipes/src/log_terminal/hash | 2 +- repos/os/recipes/src/lx_block/hash | 2 +- repos/os/recipes/src/lx_fs/hash | 2 +- repos/os/recipes/src/mixer/hash | 2 +- repos/os/recipes/src/nic_bridge/hash | 2 +- repos/os/recipes/src/nic_loopback/hash | 2 +- repos/os/recipes/src/nic_perf/hash | 2 +- repos/os/recipes/src/nic_router/hash | 2 +- repos/os/recipes/src/nit_focus/hash | 2 +- repos/os/recipes/src/nitpicker/hash | 2 +- repos/os/recipes/src/nvme_drv/hash | 2 +- repos/os/recipes/src/part_block/hash | 2 +- repos/os/recipes/src/pbxa9_drivers/hash | 2 +- repos/os/recipes/src/pci_decode/hash | 2 +- repos/os/recipes/src/platform_drv/hash | 2 +- repos/os/recipes/src/ps2_drv/hash | 2 +- repos/os/recipes/src/report_rom/hash | 2 +- repos/os/recipes/src/rom_filter/hash | 2 +- repos/os/recipes/src/rom_reporter/hash | 2 +- repos/os/recipes/src/rom_to_file/hash | 2 +- repos/os/recipes/src/rtc_drv/hash | 2 +- repos/os/recipes/src/sandbox/hash | 2 +- repos/os/recipes/src/sequence/hash | 2 +- repos/os/recipes/src/terminal_crosslink/hash | 2 +- repos/os/recipes/src/terminal_log/hash | 2 +- repos/os/recipes/src/test-black_hole/hash | 2 +- repos/os/recipes/src/test-bomb/hash | 2 +- repos/os/recipes/src/test-capture/hash | 2 +- repos/os/recipes/src/test-clipboard/hash | 2 +- repos/os/recipes/src/test-dynamic_config/hash | 2 +- repos/os/recipes/src/test-fault_detection/hash | 2 +- repos/os/recipes/src/test-fs_packet/hash | 2 +- repos/os/recipes/src/test-fs_report/hash | 2 +- repos/os/recipes/src/test-init/hash | 2 +- repos/os/recipes/src/test-init_loop/hash | 2 +- repos/os/recipes/src/test-nic_loopback/hash | 2 +- repos/os/recipes/src/test-ram_fs_chunk/hash | 2 +- repos/os/recipes/src/test-report_rom/hash | 2 +- repos/os/recipes/src/test-resource_request/hash | 2 +- repos/os/recipes/src/test-resource_yield/hash | 2 +- repos/os/recipes/src/test-rtc/hash | 2 +- repos/os/recipes/src/test-sandbox/hash | 2 +- repos/os/recipes/src/test-signal/hash | 2 +- repos/os/recipes/src/test-slab/hash | 2 +- repos/os/recipes/src/test-terminal_crosslink/hash | 2 +- repos/os/recipes/src/test-trace/hash | 2 +- repos/os/recipes/src/test-trace_buffer/hash | 2 +- repos/os/recipes/src/test-trace_logger/hash | 2 +- repos/os/recipes/src/test-utf8/hash | 2 +- repos/os/recipes/src/test-vfs_capture/hash | 2 +- repos/os/recipes/src/test-vfs_stress/hash | 2 +- repos/os/recipes/src/test-weak_ptr/hash | 2 +- repos/os/recipes/src/top/hash | 2 +- repos/os/recipes/src/trace_logger/hash | 2 +- repos/os/recipes/src/trace_policy/hash | 2 +- repos/os/recipes/src/trace_subject_reporter/hash | 2 +- repos/os/recipes/src/usb_block_drv/hash | 2 +- repos/os/recipes/src/vfs/hash | 2 +- repos/os/recipes/src/vfs_block/hash | 2 +- repos/os/recipes/src/vfs_capture/hash | 2 +- repos/os/recipes/src/vfs_tap/hash | 2 +- repos/os/recipes/src/virt_qemu_drivers/hash | 2 +- repos/os/recipes/src/virtdev_rom/hash | 2 +- repos/os/recipes/src/virtio_fb_drv/hash | 2 +- repos/os/recipes/src/virtio_input_drv/hash | 2 +- repos/os/recipes/src/virtio_nic_drv/hash | 2 +- repos/os/recipes/src/vmm/hash | 2 +- repos/pc/recipes/api/pc_linux/hash | 2 +- repos/pc/recipes/pkg/test_usb_host_drv-pc/hash | 2 +- repos/pc/recipes/pkg/wifi/hash | 2 +- repos/pc/recipes/raw/test_usb_host_drv-pc/hash | 2 +- repos/pc/recipes/src/pc_intel_fb_drv/hash | 2 +- repos/pc/recipes/src/pc_platform_drv/hash | 2 +- repos/pc/recipes/src/pc_usb_host_drv/hash | 2 +- repos/pc/recipes/src/pc_wifi_drv/hash | 2 +- repos/ports/recipes/pkg/report_dump/hash | 2 +- repos/ports/recipes/pkg/system_shell/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-capture/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-sculpt/hash | 2 +- repos/ports/recipes/pkg/vbox5/hash | 2 +- repos/ports/recipes/pkg/vbox6-capture/hash | 2 +- repos/ports/recipes/pkg/vbox6/hash | 2 +- repos/ports/recipes/src/bash-minimal/hash | 2 +- repos/ports/recipes/src/binutils_x86/hash | 2 +- repos/ports/recipes/src/coreutils-minimal/hash | 2 +- repos/ports/recipes/src/e2fsprogs-minimal/hash | 2 +- repos/ports/recipes/src/gcc_x86/hash | 2 +- repos/ports/recipes/src/lighttpd/hash | 2 +- repos/ports/recipes/src/vbox5-nova/hash | 2 +- repos/ports/recipes/src/vbox5/hash | 2 +- repos/ports/recipes/src/vbox6/hash | 2 +- repos/ports/recipes/src/verify/hash | 2 +- repos/ports/recipes/src/vim-minimal/hash | 2 +- 437 files changed, 437 insertions(+), 437 deletions(-) diff --git a/repos/base-fiasco/recipes/src/base-fiasco/hash b/repos/base-fiasco/recipes/src/base-fiasco/hash index f9dac8e5fc..611677e034 100644 --- a/repos/base-fiasco/recipes/src/base-fiasco/hash +++ b/repos/base-fiasco/recipes/src/base-fiasco/hash @@ -1 +1 @@ -2022-10-11 1f0607de6493bad0e47b24e66d84474652e8b6be +2022-11-16 12b5ce53963916e91f2498a68ba1fe050033b96b diff --git a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash index 265fd08d89..c3060c069c 100644 --- a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash +++ b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-10-11 d258920f8664460c78eeea25fafb89eaa5e7adf5 +2022-11-16 545b0e6b80827253c4af5a66b08ca2af033cf925 diff --git a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash index b26ae8d41e..da9b3ea886 100644 --- a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash +++ b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash @@ -1 +1 @@ -2022-10-11 1c94d29566bccccced246eeaf90702348e2b1a7f +2022-11-16 57b04828c2cac7593af35e8fd42e7da50d0ad7fd diff --git a/repos/base-foc/recipes/src/base-foc-pbxa9/hash b/repos/base-foc/recipes/src/base-foc-pbxa9/hash index 51ecc915eb..4f4aef3584 100644 --- a/repos/base-foc/recipes/src/base-foc-pbxa9/hash +++ b/repos/base-foc/recipes/src/base-foc-pbxa9/hash @@ -1 +1 @@ -2022-10-11 2668fd23d5cbd45b8f632073fc7c155f96ecb848 +2022-11-16 004ccd56aa35a49e757d694e3dd8381235992ba9 diff --git a/repos/base-foc/recipes/src/base-foc-pc/hash b/repos/base-foc/recipes/src/base-foc-pc/hash index 56c9910ab6..f118eb5ca9 100644 --- a/repos/base-foc/recipes/src/base-foc-pc/hash +++ b/repos/base-foc/recipes/src/base-foc-pc/hash @@ -1 +1 @@ -2022-10-11 8da054ff9e4c37895816fd30857b3c42d9e75eb0 +2022-11-16 035e36972554989fc34cf00c8013f73076ffbc39 diff --git a/repos/base-foc/recipes/src/base-foc-rpi3/hash b/repos/base-foc/recipes/src/base-foc-rpi3/hash index e63b5c8e6a..735b088313 100644 --- a/repos/base-foc/recipes/src/base-foc-rpi3/hash +++ b/repos/base-foc/recipes/src/base-foc-rpi3/hash @@ -1 +1 @@ -2022-10-11 f41df6b57d2c4b090a84427e02950df84fb385ad +2022-11-16 e86a07511300ee74e0dcd977533e119658c96f7f diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash b/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash index 8dbc470141..dae612c7d3 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash @@ -1 +1 @@ -2022-10-11 50db06fe21eca6c46c9b4bf7fcbc81538ac74f32 +2022-11-16 7da561b89b82f096ada05936a8d055f3a7399580 diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash index 6d37391b56..4487f47b81 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash @@ -1 +1 @@ -2022-10-11 1377d3a2b7afaa265cc5ae6bbd515679be527c40 +2022-11-16 f2385e15f671e8fa2a712de73d65c254a2df4ed0 diff --git a/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash b/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash index 00b6238861..771683bb41 100644 --- a/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash +++ b/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-10-11 c32cf899ce00bd69aff5bbd4f7b6b611d2bfa47d +2022-11-16 bf9abe69a229683ea69a0709d013611c33bb3f7c diff --git a/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash b/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash index 0df81b7f31..03f7df2592 100644 --- a/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash +++ b/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash @@ -1 +1 @@ -2022-10-11 39ff297bc573b8e8bf4f2e6e233bf0b1b21f13af +2022-11-16 542675dffb8d6b2b6ff36cea831cc87824a5e61c diff --git a/repos/base-hw/recipes/src/base-hw-nit6_solox/hash b/repos/base-hw/recipes/src/base-hw-nit6_solox/hash index 59a5a7a695..d353779971 100644 --- a/repos/base-hw/recipes/src/base-hw-nit6_solox/hash +++ b/repos/base-hw/recipes/src/base-hw-nit6_solox/hash @@ -1 +1 @@ -2022-10-11 f5456c3ed55b53ccaefee603fdb8d9b1e3ca84ab +2022-11-16 c0c9e8ca427cd704554d3a19d2a4846e332209de diff --git a/repos/base-hw/recipes/src/base-hw-pbxa9/hash b/repos/base-hw/recipes/src/base-hw-pbxa9/hash index 9f9b562e4e..b5871e584c 100644 --- a/repos/base-hw/recipes/src/base-hw-pbxa9/hash +++ b/repos/base-hw/recipes/src/base-hw-pbxa9/hash @@ -1 +1 @@ -2022-10-11 de2f50d9164952dbbf6ce76d29abad5d96da8512 +2022-11-16 5a94c1157de71d8a20bca88c7b839a539806a9e1 diff --git a/repos/base-hw/recipes/src/base-hw-pc/hash b/repos/base-hw/recipes/src/base-hw-pc/hash index 7518974942..31e9675c74 100644 --- a/repos/base-hw/recipes/src/base-hw-pc/hash +++ b/repos/base-hw/recipes/src/base-hw-pc/hash @@ -1 +1 @@ -2022-10-11 5d72eb4e34f582c06c086345b225cee91ce539cc +2022-11-16 ba04a68f49a2aca7c0e85cea1438c3496bd86280 diff --git a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash index 0eecd093ea..806be54200 100644 --- a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash +++ b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-10-11 70e53c98ef4b3215440efb2ea09e07ff7cd97c4f +2022-11-16 e3677d7ae46ccd0a06cb016b101e0073b185e898 diff --git a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash index ec4320f9e9..53cce321c7 100644 --- a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash +++ b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-10-11 c146d70c9bde3f928110c868a54b8c800beffd79 +2022-11-16 8c8f95eb89e598a2258538397671bf8768d1a9dd diff --git a/repos/base-linux/recipes/api/base-linux/hash b/repos/base-linux/recipes/api/base-linux/hash index dbb7c16ebe..b4672ab145 100644 --- a/repos/base-linux/recipes/api/base-linux/hash +++ b/repos/base-linux/recipes/api/base-linux/hash @@ -1 +1 @@ -2022-10-11 4544924c73b2ee1d8d2717672320f14732807267 +2022-11-16 b2b11b8d5dbe3f064eaf88c8cd5911eb79779968 diff --git a/repos/base-linux/recipes/src/base-linux/hash b/repos/base-linux/recipes/src/base-linux/hash index 7f3752b7d0..008054c417 100644 --- a/repos/base-linux/recipes/src/base-linux/hash +++ b/repos/base-linux/recipes/src/base-linux/hash @@ -1 +1 @@ -2022-10-11 d7e12d81f12f081bb7c00233c18f3c8ac2f00d67 +2022-11-16 48ae01f3f648fa402e064f57a47e8315c070bf40 diff --git a/repos/base-nova/recipes/api/base-nova/hash b/repos/base-nova/recipes/api/base-nova/hash index bbdab0a29c..eaa457ffca 100644 --- a/repos/base-nova/recipes/api/base-nova/hash +++ b/repos/base-nova/recipes/api/base-nova/hash @@ -1 +1 @@ -2022-10-11 4458ea63a69ae070e19a3cb09a403137755d2cb0 +2022-11-16 17876fc3a184cc8de6afb45855cdd51b0b7b996f diff --git a/repos/base-nova/recipes/src/base-nova/hash b/repos/base-nova/recipes/src/base-nova/hash index c2b670f646..f532cfb7f7 100644 --- a/repos/base-nova/recipes/src/base-nova/hash +++ b/repos/base-nova/recipes/src/base-nova/hash @@ -1 +1 @@ -2022-10-11 574204b7d442811236bba60e4fe3f79e34fe9985 +2022-11-16 70d33a44988da786f0acb49d6df5aa36eb5b6fd7 diff --git a/repos/base-okl4/recipes/src/base-okl4/hash b/repos/base-okl4/recipes/src/base-okl4/hash index acee3cdeb5..f5de655227 100644 --- a/repos/base-okl4/recipes/src/base-okl4/hash +++ b/repos/base-okl4/recipes/src/base-okl4/hash @@ -1 +1 @@ -2022-10-11 b81b8b94731cda35017a740b0110ff4e8e233e07 +2022-11-16 f88f9334303c8919089efff99c070c08f71f2740 diff --git a/repos/base-pistachio/recipes/src/base-pistachio/hash b/repos/base-pistachio/recipes/src/base-pistachio/hash index 6177cd0ad9..371c4dcb04 100644 --- a/repos/base-pistachio/recipes/src/base-pistachio/hash +++ b/repos/base-pistachio/recipes/src/base-pistachio/hash @@ -1 +1 @@ -2022-10-11 b522663f9c8c779f255e2a5eb37f98b4301c5446 +2022-11-16 c878978cbdea4b0dee91fe9086021e6d54d9627b diff --git a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash index 9b27295d9e..b64db005fe 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-10-11 6966c1e6595fec6e545ae729b9a5893e745a9fc9 +2022-11-16 75fb939e08458c22f9e37ce3cf7440a0d84b7d45 diff --git a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash index bfb3e928ec..7976e531e3 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash @@ -1 +1 @@ -2022-10-11 e11873b5f947ab3013208e8b4ad7621113b00580 +2022-11-16 bb3c02121935d3871aa5366c97ad2d0a60b46981 diff --git a/repos/base-sel4/recipes/src/base-sel4-x86/hash b/repos/base-sel4/recipes/src/base-sel4-x86/hash index 44aa295142..2a518d8e58 100644 --- a/repos/base-sel4/recipes/src/base-sel4-x86/hash +++ b/repos/base-sel4/recipes/src/base-sel4-x86/hash @@ -1 +1 @@ -2022-10-11 b816b62207fc76123ce72f844fa3914163949f56 +2022-11-16 67f94893a84a91b66f7ac6b895116e8bedc39a7e diff --git a/repos/base/recipes/pkg/test-ds_ownership/hash b/repos/base/recipes/pkg/test-ds_ownership/hash index 587dda17cb..e76e14da8d 100644 --- a/repos/base/recipes/pkg/test-ds_ownership/hash +++ b/repos/base/recipes/pkg/test-ds_ownership/hash @@ -1 +1 @@ -2022-10-11 b08e70f6de91f200618103ec75f53898c6ef60e8 +2022-11-16 0c82f21b693ea1755badccf0423bc350bd8cd47a diff --git a/repos/base/recipes/pkg/test-entrypoint/hash b/repos/base/recipes/pkg/test-entrypoint/hash index f392de77ae..729a802db6 100644 --- a/repos/base/recipes/pkg/test-entrypoint/hash +++ b/repos/base/recipes/pkg/test-entrypoint/hash @@ -1 +1 @@ -2022-10-11 ad5b85ab1377744e2f747ca2eb5010a3aee87f70 +2022-11-16 cb7edc30ebeae7a1ba97e96beab98a6b91b9235d diff --git a/repos/base/recipes/pkg/test-log/hash b/repos/base/recipes/pkg/test-log/hash index e4d25877e6..3c67516c39 100644 --- a/repos/base/recipes/pkg/test-log/hash +++ b/repos/base/recipes/pkg/test-log/hash @@ -1 +1 @@ -2022-10-11 3e1b9be9b239017a54b6b595cdec5891623ba59f +2022-11-16 aafe96c6ce5abfd861d38d0159aacf1f30bc27fa diff --git a/repos/base/recipes/pkg/test-mmio/hash b/repos/base/recipes/pkg/test-mmio/hash index 63bb8c9fff..701d0c0d6b 100644 --- a/repos/base/recipes/pkg/test-mmio/hash +++ b/repos/base/recipes/pkg/test-mmio/hash @@ -1 +1 @@ -2022-10-11 ee3cb10ce306e2afab97018d2bda4e33ce3f863c +2022-11-16 c6d5aa24272e9591e74b28c9154e0593ba9c50af diff --git a/repos/base/recipes/pkg/test-new_delete/hash b/repos/base/recipes/pkg/test-new_delete/hash index 8fdf563d97..64effa3315 100644 --- a/repos/base/recipes/pkg/test-new_delete/hash +++ b/repos/base/recipes/pkg/test-new_delete/hash @@ -1 +1 @@ -2022-10-11 dac71b5071da69f218826b2bdc5462b7cf0c28a3 +2022-11-16 9ca5f70749fc452647dcb209d29d01965251c86b diff --git a/repos/base/recipes/pkg/test-reconstructible/hash b/repos/base/recipes/pkg/test-reconstructible/hash index 99f66adb70..90c62b6a10 100644 --- a/repos/base/recipes/pkg/test-reconstructible/hash +++ b/repos/base/recipes/pkg/test-reconstructible/hash @@ -1 +1 @@ -2022-10-11 5f899fc663f34b1c1aeeba243e54edc092aa40fa +2022-11-16 9161f5b8d1fbbfda7122905fc5047124def0ed30 diff --git a/repos/base/recipes/pkg/test-registry/hash b/repos/base/recipes/pkg/test-registry/hash index ce25cb14f6..0a9d52e97c 100644 --- a/repos/base/recipes/pkg/test-registry/hash +++ b/repos/base/recipes/pkg/test-registry/hash @@ -1 +1 @@ -2022-10-11 50b25d7a4bbde78fc1722a4e822370eb49cb6b95 +2022-11-16 895a088741097f20c622a3acb03692a97a9a37ed diff --git a/repos/base/recipes/pkg/test-rm_fault/hash b/repos/base/recipes/pkg/test-rm_fault/hash index 2660982cdc..ffce6a0561 100644 --- a/repos/base/recipes/pkg/test-rm_fault/hash +++ b/repos/base/recipes/pkg/test-rm_fault/hash @@ -1 +1 @@ -2022-10-11 8882e9bea4fdc16ff4910913a79223d62aeb0cdc +2022-11-16 b9e07abe49d25e654895b5d88b3de79faf149595 diff --git a/repos/base/recipes/pkg/test-rm_fault_no_nox/hash b/repos/base/recipes/pkg/test-rm_fault_no_nox/hash index f0fed0ff13..02afb73325 100644 --- a/repos/base/recipes/pkg/test-rm_fault_no_nox/hash +++ b/repos/base/recipes/pkg/test-rm_fault_no_nox/hash @@ -1 +1 @@ -2022-10-11 a2514b901565ebf0aa88a955c4431fe733964758 +2022-11-16 693e1aac370b9f5fe0b6fd414bfadaeb1643818f diff --git a/repos/base/recipes/pkg/test-rm_nested/hash b/repos/base/recipes/pkg/test-rm_nested/hash index 617c2179b0..103ee82e15 100644 --- a/repos/base/recipes/pkg/test-rm_nested/hash +++ b/repos/base/recipes/pkg/test-rm_nested/hash @@ -1 +1 @@ -2022-10-11 3a4ebd01ee612ba2e12ae8df14d6299fb4431375 +2022-11-16 8d28cc22706b56d4b6ab8efd1e01556470012639 diff --git a/repos/base/recipes/pkg/test-rm_stress/hash b/repos/base/recipes/pkg/test-rm_stress/hash index a7c6d8a6d0..8e0d03d052 100644 --- a/repos/base/recipes/pkg/test-rm_stress/hash +++ b/repos/base/recipes/pkg/test-rm_stress/hash @@ -1 +1 @@ -2022-10-11 5ac901826381a7d6de528cd3d3520b0767385f6c +2022-11-16 08bead93a28766ed68f1b585467e71a091d7eaf8 diff --git a/repos/base/recipes/pkg/test-sanitizer/hash b/repos/base/recipes/pkg/test-sanitizer/hash index 655a1c5294..a30b005bc8 100644 --- a/repos/base/recipes/pkg/test-sanitizer/hash +++ b/repos/base/recipes/pkg/test-sanitizer/hash @@ -1 +1 @@ -2022-10-11 36717c21923ac35c938ad73930f1d1576ecaf385 +2022-11-16 9d0fabfb9c5d64c37b2a64d067fbba247ad89774 diff --git a/repos/base/recipes/pkg/test-stack_smash/hash b/repos/base/recipes/pkg/test-stack_smash/hash index 3c46805904..c1cfe5e0ae 100644 --- a/repos/base/recipes/pkg/test-stack_smash/hash +++ b/repos/base/recipes/pkg/test-stack_smash/hash @@ -1 +1 @@ -2022-10-11 b8e011ab9a1ae92c4293ab07f9a6b7df71c6aabc +2022-11-16 e6a1a87566edf388b032f7617a60ec9b6d885446 diff --git a/repos/base/recipes/pkg/test-synced_interface/hash b/repos/base/recipes/pkg/test-synced_interface/hash index 053c382dc6..7cf6a15893 100644 --- a/repos/base/recipes/pkg/test-synced_interface/hash +++ b/repos/base/recipes/pkg/test-synced_interface/hash @@ -1 +1 @@ -2022-10-11 0a151f72dc20e2e6b8cca80b761128dee92bb7c5 +2022-11-16 dbc285bad348fe019e7ad6565ab4dc6803029eb5 diff --git a/repos/base/recipes/pkg/test-timer/hash b/repos/base/recipes/pkg/test-timer/hash index 56f8cf4688..a59557b9fe 100644 --- a/repos/base/recipes/pkg/test-timer/hash +++ b/repos/base/recipes/pkg/test-timer/hash @@ -1 +1 @@ -2022-10-11 8070010a6f4553f3be84c5fbe0729f50e5d3fde0 +2022-11-16 ade80b1d33954370c0fbcf8023af96a6bbb86dba diff --git a/repos/base/recipes/pkg/test-tls/hash b/repos/base/recipes/pkg/test-tls/hash index eb94a8999b..588fb41a01 100644 --- a/repos/base/recipes/pkg/test-tls/hash +++ b/repos/base/recipes/pkg/test-tls/hash @@ -1 +1 @@ -2022-10-11 5068ceee7e2285a398ac7b6936f6d16c8daa29ea +2022-11-16 f24dac77aec510b070bcfd77d6652baebb80145b diff --git a/repos/base/recipes/pkg/test-token/hash b/repos/base/recipes/pkg/test-token/hash index 513c91136b..5dc0099d17 100644 --- a/repos/base/recipes/pkg/test-token/hash +++ b/repos/base/recipes/pkg/test-token/hash @@ -1 +1 @@ -2022-10-11 c4e1fb742ffc41fdb81aeb2ca2638ca81459578d +2022-11-16 96a0c142e2460275bfeb60130a1bdcfbf46c8c59 diff --git a/repos/base/recipes/pkg/test-xml_generator/hash b/repos/base/recipes/pkg/test-xml_generator/hash index 01508ca781..4e383ad01e 100644 --- a/repos/base/recipes/pkg/test-xml_generator/hash +++ b/repos/base/recipes/pkg/test-xml_generator/hash @@ -1 +1 @@ -2022-10-11 f44af3d8cc1af7801408f855c1c8c168c8d84aa7 +2022-11-16 c7ecab24c25292f2c51bb28afcfd58be04a9a3b7 diff --git a/repos/base/recipes/pkg/test-xml_node/hash b/repos/base/recipes/pkg/test-xml_node/hash index fc516acfbc..bcd1f019d3 100644 --- a/repos/base/recipes/pkg/test-xml_node/hash +++ b/repos/base/recipes/pkg/test-xml_node/hash @@ -1 +1 @@ -2022-10-11 682420bf32f10e223946d7713bf70255ede1d451 +2022-11-16 002ace00510a0692261c5603edf653e66c990cb2 diff --git a/repos/base/recipes/src/test-xml_generator/hash b/repos/base/recipes/src/test-xml_generator/hash index 0858b2605a..3e88915048 100644 --- a/repos/base/recipes/src/test-xml_generator/hash +++ b/repos/base/recipes/src/test-xml_generator/hash @@ -1 +1 @@ -2022-10-11 be8b5157c899db1007904028d0f77dc50acc1a7f +2022-11-16 c2906452276d65b1a2abfd440ebbdafea6b9986c diff --git a/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash b/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash index d0a0da2612..412c0105f8 100644 --- a/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash +++ b/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash @@ -1 +1 @@ -2022-10-11 c9953284ebe0570c926982c35f37647a3132549d +2022-11-16 829ee51d0d112b41eca87cbb139af7a9382c574f diff --git a/repos/dde_bsd/recipes/src/bsd_audio_drv/hash b/repos/dde_bsd/recipes/src/bsd_audio_drv/hash index 7893b4e706..e9f77a8ec2 100644 --- a/repos/dde_bsd/recipes/src/bsd_audio_drv/hash +++ b/repos/dde_bsd/recipes/src/bsd_audio_drv/hash @@ -1 +1 @@ -2022-10-11 eeb4565fb902ca980c98c6225c5c8141c8744011 +2022-11-16 4f31afed3b1d8238f90e89e7f40b8462f5cbc121 diff --git a/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash b/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash index 73448b0de8..cd9699c1d4 100644 --- a/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash +++ b/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash @@ -1 +1 @@ -2022-10-11 81aa4a211b16eeb77790f78e6ab7a73cf7e0d8ea +2022-11-16 12023ef33aa0c0bed2f42cca044d049fcdc13fc3 diff --git a/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash b/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash index 8817b010df..3c2c31b77a 100644 --- a/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash +++ b/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash @@ -1 +1 @@ -2022-10-11 10d78218838caee3e8c9425b095d72047855c540 +2022-11-16 bc1c6a231c740674d584c613da9e69ddefd0bcfe diff --git a/repos/dde_linux/recipes/pkg/usb_modem_drv/hash b/repos/dde_linux/recipes/pkg/usb_modem_drv/hash index 4cfb305c58..a0051cf3ba 100644 --- a/repos/dde_linux/recipes/pkg/usb_modem_drv/hash +++ b/repos/dde_linux/recipes/pkg/usb_modem_drv/hash @@ -1 +1 @@ -2022-10-11 d4a3f14c2372e08152aa37579287a7daabad3c89 +2022-11-16 3335a723e92e3711d1db863b18ade047844529ab diff --git a/repos/dde_linux/recipes/pkg/wireguard/hash b/repos/dde_linux/recipes/pkg/wireguard/hash index 07cf04a816..6c9020ae42 100644 --- a/repos/dde_linux/recipes/pkg/wireguard/hash +++ b/repos/dde_linux/recipes/pkg/wireguard/hash @@ -1 +1 @@ -2022-10-11 b31c539ffae68e4b0c2adecd0e9b33fbd08427bf +2022-11-16 9a2a194ec71479f6c18715f0bc87146d53fd232c diff --git a/repos/dde_linux/recipes/raw/wifi_firmware/hash b/repos/dde_linux/recipes/raw/wifi_firmware/hash index 5ecda29fbb..2bcef7a636 100644 --- a/repos/dde_linux/recipes/raw/wifi_firmware/hash +++ b/repos/dde_linux/recipes/raw/wifi_firmware/hash @@ -1 +1 @@ -2022-10-11 62161db5be2609208c76ba8b012e934236516560 +2022-11-16 d3bbcc86f0716c6bf922357a75a64d6dd082cdbb diff --git a/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash b/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash index 554488b875..7455e042a8 100644 --- a/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash +++ b/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash @@ -1 +1 @@ -2022-10-11 3fff048b831e4b1ab2a8b59feabd7864aefb1ff8 +2022-11-16 19effdc50e8447753fdc888c923f07a7ea77fc12 diff --git a/repos/dde_linux/recipes/src/usb_hid_drv/hash b/repos/dde_linux/recipes/src/usb_hid_drv/hash index c7e1ee6689..68e02c0ef5 100644 --- a/repos/dde_linux/recipes/src/usb_hid_drv/hash +++ b/repos/dde_linux/recipes/src/usb_hid_drv/hash @@ -1 +1 @@ -2022-10-11 b936b82d2da5ada0ff7102b89239fa7f477fdf4d +2022-11-16 15920ae1fe8804f96a1516174c7c828860d07c9b diff --git a/repos/dde_linux/recipes/src/usb_modem_drv/hash b/repos/dde_linux/recipes/src/usb_modem_drv/hash index 9e1d6736bf..f6143ceab6 100644 --- a/repos/dde_linux/recipes/src/usb_modem_drv/hash +++ b/repos/dde_linux/recipes/src/usb_modem_drv/hash @@ -1 +1 @@ -2022-10-11 dfdfca445b4bbabd24ddd444afa7d97392b60c60 +2022-11-16 fefc6c2f34701f6131303ca311eccd0c05aa50a0 diff --git a/repos/dde_linux/recipes/src/usb_net_drv/hash b/repos/dde_linux/recipes/src/usb_net_drv/hash index 954c165bc5..d1838e0099 100644 --- a/repos/dde_linux/recipes/src/usb_net_drv/hash +++ b/repos/dde_linux/recipes/src/usb_net_drv/hash @@ -1 +1 @@ -2022-10-11 3ded3d656b353ca05073fc2d415995945563958c +2022-11-16 08a338af31231f11e409d4bb202f40c66c98dd81 diff --git a/repos/dde_linux/recipes/src/vfs_lxip/hash b/repos/dde_linux/recipes/src/vfs_lxip/hash index 9e8df11181..d50360a038 100644 --- a/repos/dde_linux/recipes/src/vfs_lxip/hash +++ b/repos/dde_linux/recipes/src/vfs_lxip/hash @@ -1 +1 @@ -2022-10-11 bad5c0f463cffe748e801d6b9a73b10783370937 +2022-11-16 fa0eb3f54ac60eecebf3be35c06023ad81cb03a2 diff --git a/repos/dde_linux/recipes/src/wireguard/hash b/repos/dde_linux/recipes/src/wireguard/hash index 10001e4c8c..bf0db3bf53 100644 --- a/repos/dde_linux/recipes/src/wireguard/hash +++ b/repos/dde_linux/recipes/src/wireguard/hash @@ -1 +1 @@ -2022-10-11 5b4f582838aaba69839caa75d98284972d895e4a +2022-11-16 5e46009f54c24e0ee553c3116b9f69d97506f1fa diff --git a/repos/dde_rump/recipes/pkg/ext2_fs/hash b/repos/dde_rump/recipes/pkg/ext2_fs/hash index 2c6c02a129..ffd2658e6d 100644 --- a/repos/dde_rump/recipes/pkg/ext2_fs/hash +++ b/repos/dde_rump/recipes/pkg/ext2_fs/hash @@ -1 +1 @@ -2022-10-11 471f04a6b3cbfd02278fca144bb0da50d9413afd +2022-11-16 28ee2391783861c7491447dda71c0e9b8bf04fe7 diff --git a/repos/dde_rump/recipes/src/rump/hash b/repos/dde_rump/recipes/src/rump/hash index 82c45366ca..69b5562fcc 100644 --- a/repos/dde_rump/recipes/src/rump/hash +++ b/repos/dde_rump/recipes/src/rump/hash @@ -1 +1 @@ -2022-10-11 81b29b202375628e525cb04fa85b1e26281b3104 +2022-11-16 bd2bbd01bfa9c8f321d878b8b686f7d24f4892f3 diff --git a/repos/demo/recipes/src/demo/hash b/repos/demo/recipes/src/demo/hash index 03947f62ab..f7dc0474ee 100644 --- a/repos/demo/recipes/src/demo/hash +++ b/repos/demo/recipes/src/demo/hash @@ -1 +1 @@ -2022-10-11 cc09664f5f8d788c50b4c934e5e91b23047976b2 +2022-11-16 00d118b74b250cb897d2bae146024c6c8e0ece96 diff --git a/repos/gems/recipes/api/aes_cbc_4k/hash b/repos/gems/recipes/api/aes_cbc_4k/hash index 1bb1e0f27d..8169c7b4ea 100644 --- a/repos/gems/recipes/api/aes_cbc_4k/hash +++ b/repos/gems/recipes/api/aes_cbc_4k/hash @@ -1 +1 @@ -2020-10-08 b3af8e115f484b87b6d2c4ca2f5995f9cc89f564 +2022-11-16 dc9b5d340700743cb329f065a6d20fa1caa6a6b0 diff --git a/repos/gems/recipes/pkg/backdrop/hash b/repos/gems/recipes/pkg/backdrop/hash index eab5eba089..cbc7f3122e 100644 --- a/repos/gems/recipes/pkg/backdrop/hash +++ b/repos/gems/recipes/pkg/backdrop/hash @@ -1 +1 @@ -2022-10-13 b00223783c322607b182859c92acaf3ba3e658e8 +2022-11-16 bbb37254077cb4a8ef31c1763c06ed4672bf2695 diff --git a/repos/gems/recipes/pkg/cbe_check/hash b/repos/gems/recipes/pkg/cbe_check/hash index 1cec881c18..aaaea2e040 100644 --- a/repos/gems/recipes/pkg/cbe_check/hash +++ b/repos/gems/recipes/pkg/cbe_check/hash @@ -1 +1 @@ -2022-10-11 dd494f67f47e6f72396096a5d78ec9e39e33daa3 +2022-11-16 97b7c005e9298c5448864a4a14e19187fe7ede38 diff --git a/repos/gems/recipes/pkg/cbe_demo/hash b/repos/gems/recipes/pkg/cbe_demo/hash index 12f3c7455b..f97564e13b 100644 --- a/repos/gems/recipes/pkg/cbe_demo/hash +++ b/repos/gems/recipes/pkg/cbe_demo/hash @@ -1 +1 @@ -2022-10-11 1abcdaeee14b64273f64012e5c31fb7c5a65c29b +2022-11-16 9fb681f240eec099422bcdddeca183b9bff271f2 diff --git a/repos/gems/recipes/pkg/cbe_fs/hash b/repos/gems/recipes/pkg/cbe_fs/hash index 901395e9da..ef93b9d729 100644 --- a/repos/gems/recipes/pkg/cbe_fs/hash +++ b/repos/gems/recipes/pkg/cbe_fs/hash @@ -1 +1 @@ -2022-10-11 52f4213d4cad2b2cee831bbb8ea9945202e83f79 +2022-11-16 7a4fdb42cda811025a684edb5de3ffefe2b93c07 diff --git a/repos/gems/recipes/pkg/cbe_init/hash b/repos/gems/recipes/pkg/cbe_init/hash index 05477b8c79..21e532f1ac 100644 --- a/repos/gems/recipes/pkg/cbe_init/hash +++ b/repos/gems/recipes/pkg/cbe_init/hash @@ -1 +1 @@ -2022-10-11 b421d276ef4dfe8a5978784ae871e8202eded34a +2022-11-16 21a3b4141f1f0a3a237d8fe94acb32b4a4118408 diff --git a/repos/gems/recipes/pkg/cbe_shell/hash b/repos/gems/recipes/pkg/cbe_shell/hash index 0be50da7ee..03cac5b1da 100644 --- a/repos/gems/recipes/pkg/cbe_shell/hash +++ b/repos/gems/recipes/pkg/cbe_shell/hash @@ -1 +1 @@ -2022-10-11 2406f94216b8baa28ff2c29c28186248b0e358f2 +2022-11-16 539a56098eaebee894d38901e4e89d5ffedf35c5 diff --git a/repos/gems/recipes/pkg/cbe_ta_fs/hash b/repos/gems/recipes/pkg/cbe_ta_fs/hash index fb3ea6b1ab..3060148704 100644 --- a/repos/gems/recipes/pkg/cbe_ta_fs/hash +++ b/repos/gems/recipes/pkg/cbe_ta_fs/hash @@ -1 +1 @@ -2022-10-11 cdac720138f53eb7a1f8bed894df70e50c8ab51e +2022-11-16 9a07c058111568a2f9d8638223ad271443bfb05a diff --git a/repos/gems/recipes/pkg/cbe_ta_vfs/hash b/repos/gems/recipes/pkg/cbe_ta_vfs/hash index 6a134e9963..e79f8e4c0e 100644 --- a/repos/gems/recipes/pkg/cbe_ta_vfs/hash +++ b/repos/gems/recipes/pkg/cbe_ta_vfs/hash @@ -1 +1 @@ -2022-10-11 ac80b08a508e81d0e0ef0f23173e5513eea2458a +2022-11-16 2c5fe4eb195a16eb22eae70ff76cd88ef23de7ae diff --git a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash index 0440702cfb..f66a9368a2 100644 --- a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash +++ b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash @@ -1 +1 @@ -2022-10-11 88bda5a10f171c9583a74520ff09dc2ff5387117 +2022-11-16 404449fcf0c6e7146c54b3ed50ee646374bdacce diff --git a/repos/gems/recipes/pkg/cbe_vfs/hash b/repos/gems/recipes/pkg/cbe_vfs/hash index 2a585dd30b..b9924b47a6 100644 --- a/repos/gems/recipes/pkg/cbe_vfs/hash +++ b/repos/gems/recipes/pkg/cbe_vfs/hash @@ -1 +1 @@ -2022-10-11 acd6dcc0ef8be80f6ed551e3cde5652e635f87c0 +2022-11-16 602957b46c7a6f2888cae7e9c902163070f7a8e5 diff --git a/repos/gems/recipes/pkg/cbe_vm_fs/hash b/repos/gems/recipes/pkg/cbe_vm_fs/hash index 60e44c340f..a2608f7f03 100644 --- a/repos/gems/recipes/pkg/cbe_vm_fs/hash +++ b/repos/gems/recipes/pkg/cbe_vm_fs/hash @@ -1 +1 @@ -2022-10-11 7632d9fdb3fc4f1e8cbcaaa1cdb0701e1d356067 +2022-11-16 acb9bc730c145e1fd81e280511a0f90820f441ee diff --git a/repos/gems/recipes/pkg/depot_download/hash b/repos/gems/recipes/pkg/depot_download/hash index 30874afe72..e9f215a6c5 100644 --- a/repos/gems/recipes/pkg/depot_download/hash +++ b/repos/gems/recipes/pkg/depot_download/hash @@ -1 +1 @@ -2022-10-13 9f7435d6d60af7f9d94c93dd3c7a6ae245631793 +2022-11-16 f2d4ce547ddf0d0b0beaec1b063a08728db66c5a diff --git a/repos/gems/recipes/pkg/download_coreplus/hash b/repos/gems/recipes/pkg/download_coreplus/hash index 9f873f6fb3..ea2959f03f 100644 --- a/repos/gems/recipes/pkg/download_coreplus/hash +++ b/repos/gems/recipes/pkg/download_coreplus/hash @@ -1 +1 @@ -2022-10-11 fae14a8c48d7e8604ce899e1b51778f853b96d45 +2022-11-16 e78fe320ec4c309c9d37b45e1a48d16daddc88a6 diff --git a/repos/gems/recipes/pkg/drivers_managed-pc/hash b/repos/gems/recipes/pkg/drivers_managed-pc/hash index 32e6afee7b..0096241a41 100644 --- a/repos/gems/recipes/pkg/drivers_managed-pc/hash +++ b/repos/gems/recipes/pkg/drivers_managed-pc/hash @@ -1 +1 @@ -2022-10-11 fed4fe31d6fa61ee24703dbbd00b51332918a2d3 +2022-11-16 f232396aca8bb62878f6d68de50b3f30c273699b diff --git a/repos/gems/recipes/pkg/drivers_nic-pc/hash b/repos/gems/recipes/pkg/drivers_nic-pc/hash index a66f767377..3e1ca24c6c 100644 --- a/repos/gems/recipes/pkg/drivers_nic-pc/hash +++ b/repos/gems/recipes/pkg/drivers_nic-pc/hash @@ -1 +1 @@ -2022-10-11 220c5c13e341721ce6bec0e7cefc5be69332bcd0 +2022-11-16 f86ade17159ca096a91c12ebdbf06d73fa4fe02e diff --git a/repos/gems/recipes/pkg/file_vault/hash b/repos/gems/recipes/pkg/file_vault/hash index 1f9b870a65..9c6296c6c8 100644 --- a/repos/gems/recipes/pkg/file_vault/hash +++ b/repos/gems/recipes/pkg/file_vault/hash @@ -1 +1 @@ -2022-10-13 3d75a6cdbf1edea4b8c6baa812b99306ea9bccd3 +2022-11-16 f042f7750fe81d9db5a9000fc8e73ad36c1f5435 diff --git a/repos/gems/recipes/pkg/fonts_fs/hash b/repos/gems/recipes/pkg/fonts_fs/hash index d8f71ef436..9bbbc03feb 100644 --- a/repos/gems/recipes/pkg/fonts_fs/hash +++ b/repos/gems/recipes/pkg/fonts_fs/hash @@ -1 +1 @@ -2022-10-13 fb27f0adcbcadbe43b783898aa0b673431c4778f +2022-11-16 8d258cc6dce0a8155bcc16244381668d89ee943c diff --git a/repos/gems/recipes/pkg/motif_decorator/hash b/repos/gems/recipes/pkg/motif_decorator/hash index 160d6fd150..8dcb1c252b 100644 --- a/repos/gems/recipes/pkg/motif_decorator/hash +++ b/repos/gems/recipes/pkg/motif_decorator/hash @@ -1 +1 @@ -2022-10-11 f92962e72a1a8a2cb47174182353c9212c5c6ca8 +2022-11-16 0f862ac14329db47c1c58440a0e4cf9afe036ca8 diff --git a/repos/gems/recipes/pkg/motif_wm/hash b/repos/gems/recipes/pkg/motif_wm/hash index 87e473fc83..e193df74c4 100644 --- a/repos/gems/recipes/pkg/motif_wm/hash +++ b/repos/gems/recipes/pkg/motif_wm/hash @@ -1 +1 @@ -2022-10-11 4f7f346d62605699b15c00cf372df8b183fdbd73 +2022-11-16 26d24c29bd176332e69df0e55ef63a574b3c0f19 diff --git a/repos/gems/recipes/pkg/nano3d/hash b/repos/gems/recipes/pkg/nano3d/hash index d0ec3f2dc2..1e999babfc 100644 --- a/repos/gems/recipes/pkg/nano3d/hash +++ b/repos/gems/recipes/pkg/nano3d/hash @@ -1 +1 @@ -2022-10-11 00c70e2e4e387aa586de87d8457a2db81adb98cf +2022-11-16 59c65f0a9782197935abecbc00571c6ea2388566 diff --git a/repos/gems/recipes/pkg/sculpt/hash b/repos/gems/recipes/pkg/sculpt/hash index 5a87a644b8..5dd79f43eb 100644 --- a/repos/gems/recipes/pkg/sculpt/hash +++ b/repos/gems/recipes/pkg/sculpt/hash @@ -1 +1 @@ -2022-10-13 62d4cba5f20eb055fcddbfb0a0782a26a41a05bb +2022-11-16 2c118e491fb6345fa74e329e26a53d3102c857d9 diff --git a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash index 07caffb436..d9b21668e3 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash @@ -1 +1 @@ -2022-10-13 53f99931eb79653c3322969f688a0f03e70067c7 +2022-11-16 5de93b9f7476088568be90c6cf4d8a91cc01a7c4 diff --git a/repos/gems/recipes/pkg/sculpt_distribution/hash b/repos/gems/recipes/pkg/sculpt_distribution/hash index b509cd1aaf..80f347b5e0 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution/hash @@ -1 +1 @@ -2022-10-13 9e3c5b5caca0a6fa75135b6fab2919ce5d859db8 +2022-11-16 24a4665a5be805f748a2ac7654194202095ea86f diff --git a/repos/gems/recipes/pkg/sticks_blue_backdrop/hash b/repos/gems/recipes/pkg/sticks_blue_backdrop/hash index 372cc5cd7d..ab6d8a90e2 100644 --- a/repos/gems/recipes/pkg/sticks_blue_backdrop/hash +++ b/repos/gems/recipes/pkg/sticks_blue_backdrop/hash @@ -1 +1 @@ -2022-10-13 e203007e277de9d209a982a2934de7bb000e1307 +2022-11-16 264bf8aa90a0cb988b8297239333577809554592 diff --git a/repos/gems/recipes/pkg/terminal/hash b/repos/gems/recipes/pkg/terminal/hash index f4ab0bab85..fa6d50afaf 100644 --- a/repos/gems/recipes/pkg/terminal/hash +++ b/repos/gems/recipes/pkg/terminal/hash @@ -1 +1 @@ -2022-10-13 a0d3530170f168a65b4b6c5c9aff2991ce46d46f +2022-11-16 a7959fba1dde7b4fe4f3f7fe5afc8cb735c52766 diff --git a/repos/gems/recipes/pkg/test-depot_query_index/hash b/repos/gems/recipes/pkg/test-depot_query_index/hash index 7da52bb3cd..92bf27aac9 100644 --- a/repos/gems/recipes/pkg/test-depot_query_index/hash +++ b/repos/gems/recipes/pkg/test-depot_query_index/hash @@ -1 +1 @@ -2022-10-11 2640d4a2bc6c7b2fb30ef1c7ba8c3795c817a490 +2022-11-16 0b075593d8cc5b19ddd528ddf58fc4e3d128d777 diff --git a/repos/gems/recipes/pkg/test-fs_tool/hash b/repos/gems/recipes/pkg/test-fs_tool/hash index 9a5d1b2413..9963a85999 100644 --- a/repos/gems/recipes/pkg/test-fs_tool/hash +++ b/repos/gems/recipes/pkg/test-fs_tool/hash @@ -1 +1 @@ -2022-10-11 1b6b18360e4e135195e6061f2643b04e2a7d7949 +2022-11-16 f06e03eb7f9fc3eaaed66bbbd37fb280e333ed30 diff --git a/repos/gems/recipes/pkg/test-libc_vfs_audit/hash b/repos/gems/recipes/pkg/test-libc_vfs_audit/hash index fe15652081..7350da55bf 100644 --- a/repos/gems/recipes/pkg/test-libc_vfs_audit/hash +++ b/repos/gems/recipes/pkg/test-libc_vfs_audit/hash @@ -1 +1 @@ -2022-10-11 a99a7224ce32cb28f98fed706ba43ce0edf37dc6 +2022-11-16 4b98cb5d17eda89122da1732b1e239124f37e0ce diff --git a/repos/gems/recipes/pkg/themed_decorator/hash b/repos/gems/recipes/pkg/themed_decorator/hash index 92c6afe513..485789a12b 100644 --- a/repos/gems/recipes/pkg/themed_decorator/hash +++ b/repos/gems/recipes/pkg/themed_decorator/hash @@ -1 +1 @@ -2022-10-13 92a206a1fda70d239e09e2e2da237cb32f6ce6cd +2022-11-16 48a097b8b43a4a18c4bcea045421d3509998ddb3 diff --git a/repos/gems/recipes/pkg/themed_wm/hash b/repos/gems/recipes/pkg/themed_wm/hash index a7570e7041..f5e949fa40 100644 --- a/repos/gems/recipes/pkg/themed_wm/hash +++ b/repos/gems/recipes/pkg/themed_wm/hash @@ -1 +1 @@ -2022-10-13 c0f904d3528e41ff8972421c3f9cbffe09cd278e +2022-11-16 42fc49a65b04c6080828356156f6f9193e21a67e diff --git a/repos/gems/recipes/pkg/touch_keyboard/hash b/repos/gems/recipes/pkg/touch_keyboard/hash index 6b61a442e7..f9e62f60e2 100644 --- a/repos/gems/recipes/pkg/touch_keyboard/hash +++ b/repos/gems/recipes/pkg/touch_keyboard/hash @@ -1 +1 @@ -2022-10-11 ec0a903171e6350df4a08eb29173c378d63891c7 +2022-11-16 2564e22ad9c18851b611a1d9f6b946da9db51604 diff --git a/repos/gems/recipes/pkg/trace_fs/hash b/repos/gems/recipes/pkg/trace_fs/hash index 118eba3883..5b03996131 100644 --- a/repos/gems/recipes/pkg/trace_fs/hash +++ b/repos/gems/recipes/pkg/trace_fs/hash @@ -1 +1 @@ -2022-10-11 821bac64a9e990f323c726aa1827ce98b687243f +2022-11-16 d6599bb3145b7775f635d72fad70da3e1a63612c diff --git a/repos/gems/recipes/pkg/trace_recorder/hash b/repos/gems/recipes/pkg/trace_recorder/hash index 8cf12cbfe2..bfa6610dc7 100644 --- a/repos/gems/recipes/pkg/trace_recorder/hash +++ b/repos/gems/recipes/pkg/trace_recorder/hash @@ -1 +1 @@ -2022-10-11 b45d4038157878810f947907fcb9f15b01744f3e +2022-11-16 9b5a53d7a2b8aabf33ab0d584a28a7cd76856433 diff --git a/repos/gems/recipes/pkg/window_layouter/hash b/repos/gems/recipes/pkg/window_layouter/hash index 718af69449..f74821ac97 100644 --- a/repos/gems/recipes/pkg/window_layouter/hash +++ b/repos/gems/recipes/pkg/window_layouter/hash @@ -1 +1 @@ -2022-10-11 a20768bf1966a3726ab91b62aa2c246f174f652f +2022-11-16 1e95b168a5e3359009e097ddd1136eac9411effb diff --git a/repos/gems/recipes/pkg/wm/hash b/repos/gems/recipes/pkg/wm/hash index 82248ca5fc..6eac85c71c 100644 --- a/repos/gems/recipes/pkg/wm/hash +++ b/repos/gems/recipes/pkg/wm/hash @@ -1 +1 @@ -2022-10-11 ae24edc9941d54c0196f1c1decfe3727b23fa43c +2022-11-16 77398bf367a9065f9dce0b27768c505c201eae60 diff --git a/repos/gems/recipes/raw/drivers_managed-pc/hash b/repos/gems/recipes/raw/drivers_managed-pc/hash index c801d93ff3..b8b89511f6 100644 --- a/repos/gems/recipes/raw/drivers_managed-pc/hash +++ b/repos/gems/recipes/raw/drivers_managed-pc/hash @@ -1 +1 @@ -2022-10-11 22cc2fbd5da3aabdcce9609279bc9bd2b979ce86 +2022-11-16 a838ad097e450f6584792aeb0f609ba0d0a3c14d diff --git a/repos/gems/recipes/src/backdrop/hash b/repos/gems/recipes/src/backdrop/hash index 9dd825de99..f9c3074123 100644 --- a/repos/gems/recipes/src/backdrop/hash +++ b/repos/gems/recipes/src/backdrop/hash @@ -1 +1 @@ -2022-10-11 faa480b6d9fcdf818e1754996cc0c99dd82ffccb +2022-11-16 ffdc5359ba72005c5a8f4ebcf3a2d1cf63ca9282 diff --git a/repos/gems/recipes/src/cbe/hash b/repos/gems/recipes/src/cbe/hash index d27b6ec185..63992eb48a 100644 --- a/repos/gems/recipes/src/cbe/hash +++ b/repos/gems/recipes/src/cbe/hash @@ -1 +1 @@ -2022-10-11 c3c620fed0857dc3906ce890e88b81460a8cebcf +2022-11-16 c76cd4f860c9cde1088f34dc945409db0b6b9b60 diff --git a/repos/gems/recipes/src/cpu_load_display/hash b/repos/gems/recipes/src/cpu_load_display/hash index 8db52ab87e..b40de19a7b 100644 --- a/repos/gems/recipes/src/cpu_load_display/hash +++ b/repos/gems/recipes/src/cpu_load_display/hash @@ -1 +1 @@ -2022-10-11 90e0830e9a21156012b869af6e255af3668b4858 +2022-11-16 8ed8a667b464159aa393b1c02bdd3d911b908f5d diff --git a/repos/gems/recipes/src/decorator/hash b/repos/gems/recipes/src/decorator/hash index a39fdc7909..63c2957358 100644 --- a/repos/gems/recipes/src/decorator/hash +++ b/repos/gems/recipes/src/decorator/hash @@ -1 +1 @@ -2022-10-11 0864ed25c9b9743e054893676c76bd422f2415a3 +2022-11-16 efa5cb4a3461e0f9b5aa28635aa81860ca8c2e6f diff --git a/repos/gems/recipes/src/depot_deploy/hash b/repos/gems/recipes/src/depot_deploy/hash index 32f6d6ff8c..86cc1cc512 100644 --- a/repos/gems/recipes/src/depot_deploy/hash +++ b/repos/gems/recipes/src/depot_deploy/hash @@ -1 +1 @@ -2022-10-11 2bf948df4162227c68fd8d716ec94bd2eba60e29 +2022-11-16 329f46b64a010835014a57cf580aca9d854c62c5 diff --git a/repos/gems/recipes/src/depot_download_manager/hash b/repos/gems/recipes/src/depot_download_manager/hash index 51a1a0025b..053498612b 100644 --- a/repos/gems/recipes/src/depot_download_manager/hash +++ b/repos/gems/recipes/src/depot_download_manager/hash @@ -1 +1 @@ -2022-10-11 274f86371619648007163653bebe9b0555782406 +2022-11-16 374799b6ef6178823968834649c7014c489c8c8b diff --git a/repos/gems/recipes/src/depot_query/hash b/repos/gems/recipes/src/depot_query/hash index f1c213723b..935cde5c4d 100644 --- a/repos/gems/recipes/src/depot_query/hash +++ b/repos/gems/recipes/src/depot_query/hash @@ -1 +1 @@ -2022-10-11 c757802a205342dbf58ff604611d92cf3c2ce280 +2022-11-16 0fcc69d62671a6b3478c8410311cbfb6f9ea659d diff --git a/repos/gems/recipes/src/driver_manager/hash b/repos/gems/recipes/src/driver_manager/hash index fe9f027bad..fe0512f023 100644 --- a/repos/gems/recipes/src/driver_manager/hash +++ b/repos/gems/recipes/src/driver_manager/hash @@ -1 +1 @@ -2022-10-11 704cf63c28060848e7a6e32f8e09d7b17713191f +2022-11-16 1e6bb2ebf01a01eb5f701be8c5f547192d03c9fd diff --git a/repos/gems/recipes/src/file_terminal/hash b/repos/gems/recipes/src/file_terminal/hash index 75e75e23c3..15fa442252 100644 --- a/repos/gems/recipes/src/file_terminal/hash +++ b/repos/gems/recipes/src/file_terminal/hash @@ -1 +1 @@ -2022-10-11 74ce813497608b8ac11730ea66f42b42c4c39cf4 +2022-11-16 bab305374387f13f17a1a29686d2fd6635867bc0 diff --git a/repos/gems/recipes/src/file_vault/hash b/repos/gems/recipes/src/file_vault/hash index e1a8d8c31e..9fe47c2a98 100644 --- a/repos/gems/recipes/src/file_vault/hash +++ b/repos/gems/recipes/src/file_vault/hash @@ -1 +1 @@ -2022-10-11 7bbfb3dd257ed3d060d55562838aeb172a45d889 +2022-11-16 5d73f31885dac34c2389140abe6a0c7acef27877 diff --git a/repos/gems/recipes/src/fs_query/hash b/repos/gems/recipes/src/fs_query/hash index 09018f4449..7c3654301d 100644 --- a/repos/gems/recipes/src/fs_query/hash +++ b/repos/gems/recipes/src/fs_query/hash @@ -1 +1 @@ -2022-10-11 5de9cfd4d9378ed841f73fcb3b769eb6e90d86f1 +2022-11-16 ecdd65d8e01efe5626755f9616b57c44cde3c0a1 diff --git a/repos/gems/recipes/src/fs_tool/hash b/repos/gems/recipes/src/fs_tool/hash index 044af660c3..b9c5ffcd3f 100644 --- a/repos/gems/recipes/src/fs_tool/hash +++ b/repos/gems/recipes/src/fs_tool/hash @@ -1 +1 @@ -2022-10-11 417c08e6375c8c7c5fabcb2fcb611f92a8360128 +2022-11-16 a91d76e01fe904d453de812528bc94b06b671666 diff --git a/repos/gems/recipes/src/gpt_write/hash b/repos/gems/recipes/src/gpt_write/hash index da0aea6d0f..2189298371 100644 --- a/repos/gems/recipes/src/gpt_write/hash +++ b/repos/gems/recipes/src/gpt_write/hash @@ -1 +1 @@ -2022-10-11 f4c859ae7ed2b831ff0640c268ba08c8a56d068c +2022-11-16 1c8771116b50fe588aa67c1ebc4fcc10f6f60a69 diff --git a/repos/gems/recipes/src/gui_fader/hash b/repos/gems/recipes/src/gui_fader/hash index c2fa728476..6e53e153a8 100644 --- a/repos/gems/recipes/src/gui_fader/hash +++ b/repos/gems/recipes/src/gui_fader/hash @@ -1 +1 @@ -2022-10-11 ffc35308c31c07acea73f54df62f9e2e8f6c6a62 +2022-11-16 b48077f98ea0335940ef3725f964a9dd74cdc4bc diff --git a/repos/gems/recipes/src/menu_view/hash b/repos/gems/recipes/src/menu_view/hash index 51dbb46245..1859a77c02 100644 --- a/repos/gems/recipes/src/menu_view/hash +++ b/repos/gems/recipes/src/menu_view/hash @@ -1 +1 @@ -2022-10-11 cb0d998ca517f90acd8f0444a35cd5b24898370d +2022-11-16 01b94f9803614d3fef93a3d38953163068b2b6ab diff --git a/repos/gems/recipes/src/mixer_gui_qt/hash b/repos/gems/recipes/src/mixer_gui_qt/hash index 2851b8fc6e..e848fd1b59 100644 --- a/repos/gems/recipes/src/mixer_gui_qt/hash +++ b/repos/gems/recipes/src/mixer_gui_qt/hash @@ -1 +1 @@ -2022-10-11 23fa467ada8295c214055becab46af7e0ef9dd0d +2022-11-16 4c6ffd46ea037f13e8431d79eb7da5c4c2f4469c diff --git a/repos/gems/recipes/src/nano3d/hash b/repos/gems/recipes/src/nano3d/hash index 00a81c99f0..1c42380fda 100644 --- a/repos/gems/recipes/src/nano3d/hash +++ b/repos/gems/recipes/src/nano3d/hash @@ -1 +1 @@ -2022-10-11 f1eb32b7c67854fd73712d1d2c7e36f5dd253a72 +2022-11-16 452a7e608ae23e65be3ca355001713158f1e89ff diff --git a/repos/gems/recipes/src/sculpt_manager/hash b/repos/gems/recipes/src/sculpt_manager/hash index a3ff0fdd89..9be8e55bfd 100644 --- a/repos/gems/recipes/src/sculpt_manager/hash +++ b/repos/gems/recipes/src/sculpt_manager/hash @@ -1 +1 @@ -2022-10-11 c2e1836933260c7b6b46338a6dfc78d3267e3a0e +2022-11-16 0e2b945cd50e656afe9448901b67888a298b2b43 diff --git a/repos/gems/recipes/src/terminal/hash b/repos/gems/recipes/src/terminal/hash index 80a98152c6..2d4bf732e1 100644 --- a/repos/gems/recipes/src/terminal/hash +++ b/repos/gems/recipes/src/terminal/hash @@ -1 +1 @@ -2022-10-11 2121b391c707691e0411d20ad1a88ab29a475789 +2022-11-16 544855acbb7aa360a21b709f07d19b8f49554ddc diff --git a/repos/gems/recipes/src/test-tiled_wm/hash b/repos/gems/recipes/src/test-tiled_wm/hash index b35530b96f..f95bceef38 100644 --- a/repos/gems/recipes/src/test-tiled_wm/hash +++ b/repos/gems/recipes/src/test-tiled_wm/hash @@ -1 +1 @@ -2022-10-11 d9d27fe2bf521f7d00276fecbea8521b52c782b6 +2022-11-16 2c8c52e8257911015ef610c8c9d86edf37f690e8 diff --git a/repos/gems/recipes/src/text_area/hash b/repos/gems/recipes/src/text_area/hash index c7adb9f9a9..e46e8667e7 100644 --- a/repos/gems/recipes/src/text_area/hash +++ b/repos/gems/recipes/src/text_area/hash @@ -1 +1 @@ -2022-10-11 b4eb3c590a32951c6afe5e22d141547296cb1dba +2022-11-16 529f2c8e701b7f22458e0021fc961ac039a0d81b diff --git a/repos/gems/recipes/src/themed_decorator/hash b/repos/gems/recipes/src/themed_decorator/hash index e618e2777f..8a9defb800 100644 --- a/repos/gems/recipes/src/themed_decorator/hash +++ b/repos/gems/recipes/src/themed_decorator/hash @@ -1 +1 @@ -2022-10-11 d343af3773d60e3a1b1842ad1b40ddf8fb24d0d9 +2022-11-16 b192fc6b6a164066c03404e8fd0588efbbaec1de diff --git a/repos/gems/recipes/src/touch_keyboard/hash b/repos/gems/recipes/src/touch_keyboard/hash index d42aeab93a..5cd33ad872 100644 --- a/repos/gems/recipes/src/touch_keyboard/hash +++ b/repos/gems/recipes/src/touch_keyboard/hash @@ -1 +1 @@ -2022-10-11 9f6d1e7262cf45e4caebccdb6ce921267d728f24 +2022-11-16 3c7a5bc360a3d68e36a257c29faedbdd0a7f0fb8 diff --git a/repos/gems/recipes/src/trace_recorder/hash b/repos/gems/recipes/src/trace_recorder/hash index 5e6f084781..363f59be09 100644 --- a/repos/gems/recipes/src/trace_recorder/hash +++ b/repos/gems/recipes/src/trace_recorder/hash @@ -1 +1 @@ -2022-10-11 a6ecff7f4724f84fbcf400facaadbee02b8b71a3 +2022-11-16 2adf990574e166065279c7d05bd6a73e8ee5d238 diff --git a/repos/gems/recipes/src/trace_recorder_policy/hash b/repos/gems/recipes/src/trace_recorder_policy/hash index 4cab48b7d6..851eefbd03 100644 --- a/repos/gems/recipes/src/trace_recorder_policy/hash +++ b/repos/gems/recipes/src/trace_recorder_policy/hash @@ -1 +1 @@ -2022-10-11 691b44f3a42ca20a083ee943cfbfa30728fea096 +2022-11-16 67b9c0a0a37203539e10dede0c1d3a6062ceff0e diff --git a/repos/gems/recipes/src/vfs_audit/hash b/repos/gems/recipes/src/vfs_audit/hash index 9b11118cd1..be10cf51fa 100644 --- a/repos/gems/recipes/src/vfs_audit/hash +++ b/repos/gems/recipes/src/vfs_audit/hash @@ -1 +1 @@ -2022-10-11 9208c00dae777095efd90f327b6c50202259510f +2022-11-16 6d742c10c51dc694b86235bfebb42849bd654bbf diff --git a/repos/gems/recipes/src/vfs_gpu/hash b/repos/gems/recipes/src/vfs_gpu/hash index 65cca59d20..80ea13dd91 100644 --- a/repos/gems/recipes/src/vfs_gpu/hash +++ b/repos/gems/recipes/src/vfs_gpu/hash @@ -1 +1 @@ -2022-10-11 7ccb03553c97450003485041444d6294a2af3433 +2022-11-16 a69e03be88befaa1301fefa420a3971777918908 diff --git a/repos/gems/recipes/src/vfs_import/hash b/repos/gems/recipes/src/vfs_import/hash index ce79cb4b32..da9fd1a2ce 100644 --- a/repos/gems/recipes/src/vfs_import/hash +++ b/repos/gems/recipes/src/vfs_import/hash @@ -1 +1 @@ -2022-10-11 ef11a71e800302f591c4ec3f2a485ad40bb7b292 +2022-11-16 f9f834980468e4ddbc7193af8a9163dca24f87f2 diff --git a/repos/gems/recipes/src/vfs_pipe/hash b/repos/gems/recipes/src/vfs_pipe/hash index 0096353611..d9713b80d5 100644 --- a/repos/gems/recipes/src/vfs_pipe/hash +++ b/repos/gems/recipes/src/vfs_pipe/hash @@ -1 +1 @@ -2022-10-11 3dde86d6bc53d990aeab08d69df453bbaea31abb +2022-11-16 6cbfa6bfbb390e9eaa60e94eb49c5e03300c8bce diff --git a/repos/gems/recipes/src/vfs_trace/hash b/repos/gems/recipes/src/vfs_trace/hash index 9ac242450a..99e8aa45b8 100644 --- a/repos/gems/recipes/src/vfs_trace/hash +++ b/repos/gems/recipes/src/vfs_trace/hash @@ -1 +1 @@ -2022-10-11 8bc1d36ee4880e3089222f7d94f591c492183470 +2022-11-16 c167f1beccc9133bf43b0d9b9e45687c7d2e86f5 diff --git a/repos/gems/recipes/src/vfs_ttf/hash b/repos/gems/recipes/src/vfs_ttf/hash index 14609a7edd..e01179efad 100644 --- a/repos/gems/recipes/src/vfs_ttf/hash +++ b/repos/gems/recipes/src/vfs_ttf/hash @@ -1 +1 @@ -2022-10-11 6f40ba23acca2486636f89f6b801eff2ed3c412d +2022-11-16 8a32b60e8b4e10c295a821834dbe621c5fe929b4 diff --git a/repos/gems/recipes/src/window_layouter/hash b/repos/gems/recipes/src/window_layouter/hash index 47b2836141..3cdf13fb2d 100644 --- a/repos/gems/recipes/src/window_layouter/hash +++ b/repos/gems/recipes/src/window_layouter/hash @@ -1 +1 @@ -2022-10-11 417a70046cd3f32c20afb420a23a616c6044f151 +2022-11-16 cb1b9a540951b407ee221aa5d0e13149050069f2 diff --git a/repos/gems/recipes/src/wm/hash b/repos/gems/recipes/src/wm/hash index d287b43089..362b161f81 100644 --- a/repos/gems/recipes/src/wm/hash +++ b/repos/gems/recipes/src/wm/hash @@ -1 +1 @@ -2022-10-11 cd6fcf446e7b5b987effd0c99f37ec326b7b5d71 +2022-11-16 f4189517b0115193a147de266e604636b20ab6cf diff --git a/repos/libports/recipes/api/curl/hash b/repos/libports/recipes/api/curl/hash index 8d1ae6b959..91b48f948f 100644 --- a/repos/libports/recipes/api/curl/hash +++ b/repos/libports/recipes/api/curl/hash @@ -1 +1 @@ -2022-04-27 2391b0c17c1277ded4b62223fa006a6ffe097a84 +2022-11-16 7c2eed84cd67d82a4b4326f718e9885964abb847 diff --git a/repos/libports/recipes/api/expat/hash b/repos/libports/recipes/api/expat/hash index e8422873fe..10bfde20f9 100644 --- a/repos/libports/recipes/api/expat/hash +++ b/repos/libports/recipes/api/expat/hash @@ -1 +1 @@ -2022-10-11 4f9a1485df5176990ac710c56b5fd4cdc9c18f69 +2022-11-16 711960e1296a81625b1932da3c732cedfc195d2c diff --git a/repos/libports/recipes/api/fatfs/hash b/repos/libports/recipes/api/fatfs/hash index 54cc7ac25f..e0d2e2686f 100644 --- a/repos/libports/recipes/api/fatfs/hash +++ b/repos/libports/recipes/api/fatfs/hash @@ -1 +1 @@ -2022-04-27 c7a6cf94f3a6a591222951762fcbb5bad8855216 +2022-11-16 5477bb4242d54e90c43ce61707fcc07303219b5b diff --git a/repos/libports/recipes/api/jitterentropy/hash b/repos/libports/recipes/api/jitterentropy/hash index 43bd002854..c55f388693 100644 --- a/repos/libports/recipes/api/jitterentropy/hash +++ b/repos/libports/recipes/api/jitterentropy/hash @@ -1 +1 @@ -2022-05-24 62ec2d406e13878ed44ed3468a05a352ee6d1e00 +2022-11-16 8fcc26af671ee6b86620d8256c01254fff34f6fb diff --git a/repos/libports/recipes/api/libdrm/hash b/repos/libports/recipes/api/libdrm/hash index 132163e5ae..762972aae2 100644 --- a/repos/libports/recipes/api/libdrm/hash +++ b/repos/libports/recipes/api/libdrm/hash @@ -1 +1 @@ -2022-08-16 4b9e10789ce5311dfa3aa688ce0e0dbee532e13f +2022-11-16 fa413c371434f8b87da6936b3688d04fad807fdc diff --git a/repos/libports/recipes/api/libgcrypt/hash b/repos/libports/recipes/api/libgcrypt/hash index 9addcc2db6..29d00c3baf 100644 --- a/repos/libports/recipes/api/libgcrypt/hash +++ b/repos/libports/recipes/api/libgcrypt/hash @@ -1 +1 @@ -2022-04-27 bb02abe386ad69ecfc9c36499d5b0eb16272bbd5 +2022-11-16 70790e8c5b6ebf1026e73559b1ae9e7c8dd8be2e diff --git a/repos/libports/recipes/api/lwip/hash b/repos/libports/recipes/api/lwip/hash index 5a0dd77bb8..175be1edeb 100644 --- a/repos/libports/recipes/api/lwip/hash +++ b/repos/libports/recipes/api/lwip/hash @@ -1 +1 @@ -2022-02-14 b7ee0e54e5fc1545af39d1bdffe923392e2b677b +2022-11-16 b9b95ee7902032cdb3619d1601d28fb9eab83251 diff --git a/repos/libports/recipes/api/openssl/hash b/repos/libports/recipes/api/openssl/hash index 9e0cd935a5..5a9b2d2f9d 100644 --- a/repos/libports/recipes/api/openssl/hash +++ b/repos/libports/recipes/api/openssl/hash @@ -1 +1 @@ -2021-02-22 ec7491344de00827befefd708d51c1794858bf56 +2022-11-16 db6c6822b41a2f7d3880734000e8193cc2254400 diff --git a/repos/libports/recipes/api/pcre16/hash b/repos/libports/recipes/api/pcre16/hash index 4338ed0ac8..92151812f8 100644 --- a/repos/libports/recipes/api/pcre16/hash +++ b/repos/libports/recipes/api/pcre16/hash @@ -1 +1 @@ -2019-02-25 1000c4784d6c79576aa7e4fcf85b42e229e2506e +2022-11-16 a35fe75f288d4e35334d7aa8640088fde2a8c069 diff --git a/repos/libports/recipes/api/pcsc-lite/hash b/repos/libports/recipes/api/pcsc-lite/hash index 899ef488d9..4901b7e58e 100644 --- a/repos/libports/recipes/api/pcsc-lite/hash +++ b/repos/libports/recipes/api/pcsc-lite/hash @@ -1 +1 @@ -2022-08-30 d9e0d7a0a115b076da34b678283a202bc641bd47 +2022-11-16 15fdef14df5b80e0a898835bab9e5e2608f06c82 diff --git a/repos/libports/recipes/api/qoost/hash b/repos/libports/recipes/api/qoost/hash index 2b2de744e8..3d6569eb59 100644 --- a/repos/libports/recipes/api/qoost/hash +++ b/repos/libports/recipes/api/qoost/hash @@ -1 +1 @@ -2019-02-25 8da8545aaaba2a1e21c01cd3b2eb524bf309154b +2022-11-16 7890e97372f4b8449abc3dfcc9c2176e961b9a9a diff --git a/repos/libports/recipes/api/qt5/hash b/repos/libports/recipes/api/qt5/hash index 10f95be2ed..8ff900f2f1 100644 --- a/repos/libports/recipes/api/qt5/hash +++ b/repos/libports/recipes/api/qt5/hash @@ -1 +1 @@ -2022-08-30 300d4abc0fa184cacd1c11cd56f23a7877f847b5 +2022-11-16 870762f90b93b42bc17f568f7a199f901bac36ec diff --git a/repos/libports/recipes/api/spark/hash b/repos/libports/recipes/api/spark/hash index a0d65fc2ca..7e51b0ba8a 100644 --- a/repos/libports/recipes/api/spark/hash +++ b/repos/libports/recipes/api/spark/hash @@ -1 +1 @@ -2021-05-27 df42ff6382e3a6e30e0a7d1b28a67683b7dc5db6 +2022-11-16 7caa75e52af6f8aea3e9c94a108c3cc06477767b diff --git a/repos/libports/recipes/pkg/acpica/hash b/repos/libports/recipes/pkg/acpica/hash index 5cdc831b33..7908dae565 100644 --- a/repos/libports/recipes/pkg/acpica/hash +++ b/repos/libports/recipes/pkg/acpica/hash @@ -1 +1 @@ -2022-10-11 010ed31b6429fe9c7500b1477e737eea4abb9f16 +2022-11-16 548686309235a020ae03fe6603556e712ef6c7e0 diff --git a/repos/libports/recipes/pkg/gcov/hash b/repos/libports/recipes/pkg/gcov/hash index 75fbbd8b1e..b424f3f42f 100644 --- a/repos/libports/recipes/pkg/gcov/hash +++ b/repos/libports/recipes/pkg/gcov/hash @@ -1 +1 @@ -2022-10-11 7c4dca705f1a0534841465b849b1a51ae0771ec7 +2022-11-16 6e705684b4c41627d6672b46b4caee05ec1cdbf5 diff --git a/repos/libports/recipes/pkg/mesa_gears/hash b/repos/libports/recipes/pkg/mesa_gears/hash index 8ebc61b586..33dfab806d 100644 --- a/repos/libports/recipes/pkg/mesa_gears/hash +++ b/repos/libports/recipes/pkg/mesa_gears/hash @@ -1 +1 @@ -2022-10-13 cfa9c3c161538a4684b21882e12080853b53fce0 +2022-11-16 77da01a3b0f30795726cb891ecfe67d10cffb972 diff --git a/repos/libports/recipes/pkg/mesa_gpu-cpu/hash b/repos/libports/recipes/pkg/mesa_gpu-cpu/hash index 35e9d36675..b0f8df282a 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-cpu/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-cpu/hash @@ -1 +1 @@ -2022-10-11 28685840b44eb4fb4040405e5380703512e7f4cd +2022-11-16 f18e0bdba4ea9a73889dc1cf29b14f011aeb2d46 diff --git a/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash b/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash index e2a03613ff..09afc9b7e3 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash @@ -1 +1 @@ -2022-10-11 aacfa725e1707e027f5443cbbe091e6c4ead4024 +2022-11-16 b95e29c7a0e82d734a239c2c72b256245cf50bae diff --git a/repos/libports/recipes/pkg/mesa_gpu-intel/hash b/repos/libports/recipes/pkg/mesa_gpu-intel/hash index aefdc0b5aa..2eae12b530 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-intel/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-intel/hash @@ -1 +1 @@ -2022-10-11 a19bdb0ebc89fe526154ba1b20ed5637084aff9a +2022-11-16 765acb6b0ee67e02e7c57f94b5ea11e662d2be70 diff --git a/repos/libports/recipes/pkg/mesa_gpu-lima/hash b/repos/libports/recipes/pkg/mesa_gpu-lima/hash index 0600fee8fa..a62f1cae20 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-lima/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-lima/hash @@ -1 +1 @@ -2022-11-10 1c15bce5255265c4649dc1b8d3b5e9437cf33212 +2022-11-16 d2ffadf83f397cb161cf77ed6274ebe7b853a489 diff --git a/repos/libports/recipes/pkg/pdf_view/hash b/repos/libports/recipes/pkg/pdf_view/hash index b391eab46e..b0b666785a 100644 --- a/repos/libports/recipes/pkg/pdf_view/hash +++ b/repos/libports/recipes/pkg/pdf_view/hash @@ -1 +1 @@ -2022-10-13 6a7f926f0ba2b94e41c88013eb2d8732a69e6f51 +2022-11-16 b70e0b19a298d341cac5519f23c0fb6b9792f301 diff --git a/repos/libports/recipes/pkg/qt5_textedit/hash b/repos/libports/recipes/pkg/qt5_textedit/hash index 82f7485a7c..a2cdd6e128 100644 --- a/repos/libports/recipes/pkg/qt5_textedit/hash +++ b/repos/libports/recipes/pkg/qt5_textedit/hash @@ -1 +1 @@ -2022-10-13 73be73a9a8085a69e2317f49f0a39ef7d485f498 +2022-11-16 5bdaed3579b0a2944001b3b4a518e0cab3c38116 diff --git a/repos/libports/recipes/pkg/system_clock-dummy/hash b/repos/libports/recipes/pkg/system_clock-dummy/hash index 344bb74e32..3e8ff898a4 100644 --- a/repos/libports/recipes/pkg/system_clock-dummy/hash +++ b/repos/libports/recipes/pkg/system_clock-dummy/hash @@ -1 +1 @@ -2021-10-14-a 5592455fcfd116dc54054a3f8167cc16eb739ac5 +2022-11-16 0becd4186ea6caaf1718a0ba4694896429b7c470 diff --git a/repos/libports/recipes/pkg/system_clock-pc/hash b/repos/libports/recipes/pkg/system_clock-pc/hash index e4c9fdd48c..314537bd44 100644 --- a/repos/libports/recipes/pkg/system_clock-pc/hash +++ b/repos/libports/recipes/pkg/system_clock-pc/hash @@ -1 +1 @@ -2022-10-11 6703af7d1d42c5ef9abc0b1eae59b36ed5e7e8e9 +2022-11-16 d8858177ed81fe768416470082e94809d251ed0c diff --git a/repos/libports/recipes/pkg/system_rtc-linux/hash b/repos/libports/recipes/pkg/system_rtc-linux/hash index d9631eefe6..80e31bcc3a 100644 --- a/repos/libports/recipes/pkg/system_rtc-linux/hash +++ b/repos/libports/recipes/pkg/system_rtc-linux/hash @@ -1 +1 @@ -2022-10-11 1179a2775ec1e504dbb35fcf632d65c2ad20800b +2022-11-16 6fb4eea8b41112c577e421ceb1bebc5c36ea61e9 diff --git a/repos/libports/recipes/pkg/system_rtc-pc/hash b/repos/libports/recipes/pkg/system_rtc-pc/hash index e22e8d4e51..9f004de9ef 100644 --- a/repos/libports/recipes/pkg/system_rtc-pc/hash +++ b/repos/libports/recipes/pkg/system_rtc-pc/hash @@ -1 +1 @@ -2022-10-11 4894e0037fdadbf7743a17d0986e318f127219ad +2022-11-16 de6b7d385e1e21c8dd257d0a11b6d976e2c2944e diff --git a/repos/libports/recipes/pkg/test-expat/hash b/repos/libports/recipes/pkg/test-expat/hash index aa92241f67..24e0dd3473 100644 --- a/repos/libports/recipes/pkg/test-expat/hash +++ b/repos/libports/recipes/pkg/test-expat/hash @@ -1 +1 @@ -2022-10-11 6cdc95e5e667701b1b7a4803537b61bdb4722121 +2022-11-16 b57b4ca46f19c7553abe2088b84c132fce838a2f diff --git a/repos/libports/recipes/pkg/test-ldso/hash b/repos/libports/recipes/pkg/test-ldso/hash index 45569f78e1..accfd41ab9 100644 --- a/repos/libports/recipes/pkg/test-ldso/hash +++ b/repos/libports/recipes/pkg/test-ldso/hash @@ -1 +1 @@ -2022-10-11 70b6c3d065e4836869ee8bbaf5f29c2c1caeedb4 +2022-11-16 b9bafd854042c7e8861f237c92a703b1ebf8f69c diff --git a/repos/libports/recipes/pkg/test-libc/hash b/repos/libports/recipes/pkg/test-libc/hash index 17364c1eca..2011b5ae00 100644 --- a/repos/libports/recipes/pkg/test-libc/hash +++ b/repos/libports/recipes/pkg/test-libc/hash @@ -1 +1 @@ -2022-10-11 f4852024822ef5b9015fafd5cba97a2c3f09addb +2022-11-16 59cb8ded07357f2dd5d78a19dbfb21ffd09756d2 diff --git a/repos/libports/recipes/pkg/test-libc_connect_lwip/hash b/repos/libports/recipes/pkg/test-libc_connect_lwip/hash index 0301a10696..bdc35fd70d 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lwip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_lwip/hash @@ -1 +1 @@ -2022-10-11 d619be6ebfcfe5fa939926dfd4bce27ff0531c79 +2022-11-16 d19253a3d09844f2495e42510f7cc48329eeef8b diff --git a/repos/libports/recipes/pkg/test-libc_connect_lxip/hash b/repos/libports/recipes/pkg/test-libc_connect_lxip/hash index f1a635a65a..2a53bd0f23 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lxip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_lxip/hash @@ -1 +1 @@ -2022-10-11 dc311df66d06ec7ddcb7cab2c3c17ec97aa6e827 +2022-11-16 43f55039429248ba5d3216ce1423812aa37b06cb diff --git a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash index 49db64435b..b272191a86 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash @@ -1 +1 @@ -2022-10-11 9750f56cdf2fee65677c6be816686dcfff865d2b +2022-11-16 3249dadf528753dfc52e9ca16bd6079f4851a049 diff --git a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash index 6266173a5b..05d5f18a74 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash @@ -1 +1 @@ -2022-10-11 29e4e47dcb4b1beaa266e55c787e82c7b7fdbb88 +2022-11-16 956ea8cad01075826a9e20668cc55f74353afe49 diff --git a/repos/libports/recipes/pkg/test-libc_counter/hash b/repos/libports/recipes/pkg/test-libc_counter/hash index eb28b7e36a..9d373ffbeb 100644 --- a/repos/libports/recipes/pkg/test-libc_counter/hash +++ b/repos/libports/recipes/pkg/test-libc_counter/hash @@ -1 +1 @@ -2022-10-11 a58d662a69a0e033a82e4b0276cf3dc6808a658b +2022-11-16 a6a270e6e6d61bd9d5da0b7d7734011084660f35 diff --git a/repos/libports/recipes/pkg/test-libc_execve/hash b/repos/libports/recipes/pkg/test-libc_execve/hash index 92d5abe35e..c44f861311 100644 --- a/repos/libports/recipes/pkg/test-libc_execve/hash +++ b/repos/libports/recipes/pkg/test-libc_execve/hash @@ -1 +1 @@ -2022-10-11 a6da458cc4475893d8d5dbb4e6f82ab0fba9ddff +2022-11-16 78b404a0c8b2bb98dc696775ad3a99aec107783d diff --git a/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash b/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash index fe5ae4e7f8..c503efaef0 100644 --- a/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash +++ b/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash @@ -1 +1 @@ -2022-10-11 b9d99184dc03b5d7463e38a88cae5e8e9b8fd3eb +2022-11-16 a6365ada03599200519b71855d7d870801887232 diff --git a/repos/libports/recipes/pkg/test-libc_fork/hash b/repos/libports/recipes/pkg/test-libc_fork/hash index 03ecd4a371..1f6e3ea874 100644 --- a/repos/libports/recipes/pkg/test-libc_fork/hash +++ b/repos/libports/recipes/pkg/test-libc_fork/hash @@ -1 +1 @@ -2022-10-11 f88a4f41243030217cac55b2fac678ce85c471a4 +2022-11-16 adb584599b25d211355d6974078e71fdb27db404 diff --git a/repos/libports/recipes/pkg/test-libc_getenv/hash b/repos/libports/recipes/pkg/test-libc_getenv/hash index 9f30e33310..057927fcfd 100644 --- a/repos/libports/recipes/pkg/test-libc_getenv/hash +++ b/repos/libports/recipes/pkg/test-libc_getenv/hash @@ -1 +1 @@ -2022-10-11 a945322eb922856b9b9b84a979bc2f236baf3655 +2022-11-16 5e4dbd34f84122678659bd7ad5e54f0550374c96 diff --git a/repos/libports/recipes/pkg/test-libc_pipe/hash b/repos/libports/recipes/pkg/test-libc_pipe/hash index 7a2ccf8304..6586659800 100644 --- a/repos/libports/recipes/pkg/test-libc_pipe/hash +++ b/repos/libports/recipes/pkg/test-libc_pipe/hash @@ -1 +1 @@ -2022-10-11 a2d01973e762a100f58c9245bc2383669cc62bfc +2022-11-16 8049b0a8a1d38ece1b623263166ea75ab389b2a4 diff --git a/repos/libports/recipes/pkg/test-libc_vfs/hash b/repos/libports/recipes/pkg/test-libc_vfs/hash index 25de530e25..2fc3a0db0f 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs/hash @@ -1 +1 @@ -2022-10-11 58abaa720f3d07a129ff8e757ddab2bf502e92b6 +2022-11-16 db2e1ead49b4e819881fd75a044e6a0f16967e12 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_block/hash b/repos/libports/recipes/pkg/test-libc_vfs_block/hash index a1544c89f5..7d43a9e43b 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_block/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_block/hash @@ -1 +1 @@ -2022-10-11 0da2881ead0fd9e952c0586c43ae433666aa2410 +2022-11-16 194eb0a1f3697971e90569cdf5c16d1a401fdfcd diff --git a/repos/libports/recipes/pkg/test-libc_vfs_counter/hash b/repos/libports/recipes/pkg/test-libc_vfs_counter/hash index 23d6ae5bc7..524b57f88b 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_counter/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_counter/hash @@ -1 +1 @@ -2022-10-11 63a14aa5aa1cdae19b67777a9e3b1150340fac25 +2022-11-16 a823abb9a4201c659ffe44d9e99d09cba6d75797 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_fs/hash b/repos/libports/recipes/pkg/test-libc_vfs_fs/hash index c193a619b8..a201ced6e0 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_fs/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_fs/hash @@ -1 +1 @@ -2022-10-11 f5ec4eaeae3ff7b9cbb5f8b0df126a3ebb07690d +2022-11-16 d7030434580735f8059e9af7e68b2286fe0f13a3 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash b/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash index 81dd32f88d..a210b0b36d 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash @@ -1 +1 @@ -2022-10-11 e6cec3a18012f9adcc9224f17113d7b5693e294f +2022-11-16 642a05d482cded81d3a83b3ca69037c6b0f0bd2c diff --git a/repos/libports/recipes/pkg/test-libc_vfs_ram/hash b/repos/libports/recipes/pkg/test-libc_vfs_ram/hash index 20f0cf0745..6cebeb7658 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_ram/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_ram/hash @@ -1 +1 @@ -2022-10-11 4c9a757c6963232d8deb113d2c1f09d4d9d0ac30 +2022-11-16 325313bb3f55ba59dbe0c4fd6b585ab3ce8a93ea diff --git a/repos/libports/recipes/pkg/test-pthread/hash b/repos/libports/recipes/pkg/test-pthread/hash index 1b0e3cf289..da4cd149d7 100644 --- a/repos/libports/recipes/pkg/test-pthread/hash +++ b/repos/libports/recipes/pkg/test-pthread/hash @@ -1 +1 @@ -2022-10-11 d5d4a5658647fe48b695cac310b765db8cf60de8 +2022-11-16 1c76422b88d1880907a0ab9c54d320e3bc435656 diff --git a/repos/libports/recipes/pkg/test-sequence/hash b/repos/libports/recipes/pkg/test-sequence/hash index 59d0cc901c..8a3de2f566 100644 --- a/repos/libports/recipes/pkg/test-sequence/hash +++ b/repos/libports/recipes/pkg/test-sequence/hash @@ -1 +1 @@ -2022-10-11 08680caf1b7c83c1561c9ad608bb5d80b156c854 +2022-11-16 25fa2aad90d74e2c76321451733527fc9fcdda3b diff --git a/repos/libports/recipes/pkg/test-spark/hash b/repos/libports/recipes/pkg/test-spark/hash index 2067ef247d..70b7f75b43 100644 --- a/repos/libports/recipes/pkg/test-spark/hash +++ b/repos/libports/recipes/pkg/test-spark/hash @@ -1 +1 @@ -2022-10-11 e3932a70a7495781bdb74c651ff2a5f96d18812b +2022-11-16 509140f0061c4777fb81c972673da3322441dcaa diff --git a/repos/libports/recipes/pkg/test-spark_exception/hash b/repos/libports/recipes/pkg/test-spark_exception/hash index 7520e5091a..4435f279f5 100644 --- a/repos/libports/recipes/pkg/test-spark_exception/hash +++ b/repos/libports/recipes/pkg/test-spark_exception/hash @@ -1 +1 @@ -2022-10-11 0983fe9b5f2473dd9ae86a89271416f159ce8ff6 +2022-11-16 cc10687b5407afd6512ecadced631c37316349a1 diff --git a/repos/libports/recipes/pkg/test-spark_secondary_stack/hash b/repos/libports/recipes/pkg/test-spark_secondary_stack/hash index 055dc51e02..3338dc75ee 100644 --- a/repos/libports/recipes/pkg/test-spark_secondary_stack/hash +++ b/repos/libports/recipes/pkg/test-spark_secondary_stack/hash @@ -1 +1 @@ -2022-10-11 700d158cb3226460047663da00fe3ecc14af91d7 +2022-11-16 a2245f33f03d054a3848efec9889f6597f2206ef diff --git a/repos/libports/recipes/pkg/test-stdcxx/hash b/repos/libports/recipes/pkg/test-stdcxx/hash index 5d8819d614..18b1b687f3 100644 --- a/repos/libports/recipes/pkg/test-stdcxx/hash +++ b/repos/libports/recipes/pkg/test-stdcxx/hash @@ -1 +1 @@ -2022-10-11 16dea14e86385295418e3d78487f863c0f91611d +2022-11-16 afae93d322717b9bbffcca6fac8965db92584005 diff --git a/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash b/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash index f6577f2d99..dacbb2eab2 100644 --- a/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash +++ b/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash @@ -1 +1 @@ -2022-10-11 96563e3769e7277446ab7f9db5526f6904205c40 +2022-11-16 cb163aa087eabda6b643887c8183cf36f5c3ca7a diff --git a/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash b/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash index 5a5731f746..2720e43bc9 100644 --- a/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash +++ b/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash @@ -1 +1 @@ -2022-10-11 5f998ee868e6f23cd9b6dd64adc04db7eff8533b +2022-11-16 9b52b6f72355b78844fa7b874c43599efda18259 diff --git a/repos/libports/recipes/pkg/usb_webcam/hash b/repos/libports/recipes/pkg/usb_webcam/hash index 09c3d9c560..7004f21b89 100644 --- a/repos/libports/recipes/pkg/usb_webcam/hash +++ b/repos/libports/recipes/pkg/usb_webcam/hash @@ -1 +1 @@ -2022-10-13 eaefe067dcf1b9742f8296db7db582233f186f88 +2022-11-16 67a42a6633c48790cc11a2d5198e2e86758c52b6 diff --git a/repos/libports/recipes/src/acpica/hash b/repos/libports/recipes/src/acpica/hash index 2d23877e4b..0fa5ca11a4 100644 --- a/repos/libports/recipes/src/acpica/hash +++ b/repos/libports/recipes/src/acpica/hash @@ -1 +1 @@ -2022-10-11 ff22a592fe565270bd64d7f5fbe8533dc55e2d71 +2022-11-16 ec5bfaafba175597babc1b12f0cb389e5da895c1 diff --git a/repos/libports/recipes/src/curl/hash b/repos/libports/recipes/src/curl/hash index 32ff57deca..1d24918430 100644 --- a/repos/libports/recipes/src/curl/hash +++ b/repos/libports/recipes/src/curl/hash @@ -1 +1 @@ -2022-09-20 2b42dc9b73136d8971e0a660daf8c12479be5ec2 +2022-11-16 a47fb8673e18ea7aaaa9ed31be6fad9dda632901 diff --git a/repos/libports/recipes/src/expat/hash b/repos/libports/recipes/src/expat/hash index 87b6331174..2f3081700e 100644 --- a/repos/libports/recipes/src/expat/hash +++ b/repos/libports/recipes/src/expat/hash @@ -1 +1 @@ -2022-10-11 e2a4ccd47e295414514051d675c4da6d9b9e3ba7 +2022-11-16 73916fa5825ec1452d7672d011a66423165fa5c7 diff --git a/repos/libports/recipes/src/extract/hash b/repos/libports/recipes/src/extract/hash index 66211778fc..dbde48d96f 100644 --- a/repos/libports/recipes/src/extract/hash +++ b/repos/libports/recipes/src/extract/hash @@ -1 +1 @@ -2022-10-11 8a3e451403f1179ed1831ab1881a479fa72e48f4 +2022-11-16 cf1466f974c0d6e22e192a6d9d8e1af9ec5ce4ec diff --git a/repos/libports/recipes/src/fetchurl/hash b/repos/libports/recipes/src/fetchurl/hash index 4153cfc4c8..ad0a64ea42 100644 --- a/repos/libports/recipes/src/fetchurl/hash +++ b/repos/libports/recipes/src/fetchurl/hash @@ -1 +1 @@ -2022-10-11 7b4b05eec74a47b664b8f2f5ecc889325316784c +2022-11-16 3dd71783daf73ef866f13e90987996b1f9220368 diff --git a/repos/libports/recipes/src/ffi/hash b/repos/libports/recipes/src/ffi/hash index 103fa42c11..e3a2acb86c 100644 --- a/repos/libports/recipes/src/ffi/hash +++ b/repos/libports/recipes/src/ffi/hash @@ -1 +1 @@ -2022-09-20 2884df560359edc475faf202944e6d2c33461d58 +2022-11-16 2b36627a05a9fecf645208b300040d017ccc2f63 diff --git a/repos/libports/recipes/src/gmp/hash b/repos/libports/recipes/src/gmp/hash index 6479928113..9798c447cf 100644 --- a/repos/libports/recipes/src/gmp/hash +++ b/repos/libports/recipes/src/gmp/hash @@ -1 +1 @@ -2022-09-20 b5b7cedcb6d1c91e90df4e237044d4b615b171bc +2022-11-16 b205ed8d55dd886f19aa517938c0adaa8065451a diff --git a/repos/libports/recipes/src/icu/hash b/repos/libports/recipes/src/icu/hash index aac6b686b7..b63c2831bd 100644 --- a/repos/libports/recipes/src/icu/hash +++ b/repos/libports/recipes/src/icu/hash @@ -1 +1 @@ -2022-09-20 2c33a86082764c248d194ee056510d3618c6fb3e +2022-11-16 4d29b286428a01aa9ba0c32a1d76bb059db63c41 diff --git a/repos/libports/recipes/src/jbig2dec/hash b/repos/libports/recipes/src/jbig2dec/hash index 646155e6cc..3218b018b5 100644 --- a/repos/libports/recipes/src/jbig2dec/hash +++ b/repos/libports/recipes/src/jbig2dec/hash @@ -1 +1 @@ -2022-09-20 1a9994db1bf4b4a33ccba255d80398eefe9b0b8c +2022-11-16 77e92d5bf11676fb8de4ed02f3668e23241b997d diff --git a/repos/libports/recipes/src/jpeg/hash b/repos/libports/recipes/src/jpeg/hash index beca8ba600..266435015f 100644 --- a/repos/libports/recipes/src/jpeg/hash +++ b/repos/libports/recipes/src/jpeg/hash @@ -1 +1 @@ -2022-09-20 041bd52075e34cf85c25f8afe43aa24ea7683a3a +2022-11-16 2d7df3600b4ea6593b59810a41c64419086f346e diff --git a/repos/libports/recipes/src/libarchive/hash b/repos/libports/recipes/src/libarchive/hash index 5753f6768c..ad13746862 100644 --- a/repos/libports/recipes/src/libarchive/hash +++ b/repos/libports/recipes/src/libarchive/hash @@ -1 +1 @@ -2022-09-20 da2a277ee6fd4078d223a1005a71e38362265a70 +2022-11-16 87eee45f4126d85cb1626310fadfba8b202f8cdd diff --git a/repos/libports/recipes/src/libc/hash b/repos/libports/recipes/src/libc/hash index 52898bf921..f5ae794aaf 100644 --- a/repos/libports/recipes/src/libc/hash +++ b/repos/libports/recipes/src/libc/hash @@ -1 +1 @@ -2022-10-13 fdff5ab92d134ae67156c8d146623b2a3598cf31 +2022-11-16 57745e95abf2c2c21c7182ed71231d45908d49cb diff --git a/repos/libports/recipes/src/libdrm/hash b/repos/libports/recipes/src/libdrm/hash index 292975a948..7472828762 100644 --- a/repos/libports/recipes/src/libdrm/hash +++ b/repos/libports/recipes/src/libdrm/hash @@ -1 +1 @@ -2022-10-11 af750390f99c4153594d76efc8e13ed182cf2673 +2022-11-16 7283f1ca508712fa7a94c7cf98675a8f0b21fbf0 diff --git a/repos/libports/recipes/src/libqgenodeviewwidget/hash b/repos/libports/recipes/src/libqgenodeviewwidget/hash index 45168a9998..beee9de838 100644 --- a/repos/libports/recipes/src/libqgenodeviewwidget/hash +++ b/repos/libports/recipes/src/libqgenodeviewwidget/hash @@ -1 +1 @@ -2022-10-11 7d98fc5f71a4e471c599fc07ef7a031f2282954a +2022-11-16 d6d21e437224fe0a315b42df60299f03758e677e diff --git a/repos/libports/recipes/src/libqpluginwidget/hash b/repos/libports/recipes/src/libqpluginwidget/hash index 9cb491e3c2..3a27601969 100644 --- a/repos/libports/recipes/src/libqpluginwidget/hash +++ b/repos/libports/recipes/src/libqpluginwidget/hash @@ -1 +1 @@ -2022-10-11 5e56e0ce38b347524e091d6f9ca076d3c9097c6f +2022-11-16 67e389450897e8ea3c375addc2af6e2d71e7c52f diff --git a/repos/libports/recipes/src/libsparkcrypto/hash b/repos/libports/recipes/src/libsparkcrypto/hash index e12ff0ed14..1817cda337 100644 --- a/repos/libports/recipes/src/libsparkcrypto/hash +++ b/repos/libports/recipes/src/libsparkcrypto/hash @@ -1 +1 @@ -2022-10-11 646a27ce2aab9762af8d731948b58c1ff7ad751c +2022-11-16 2d97aab9b708366a86a298122558efacd14b8845 diff --git a/repos/libports/recipes/src/libssh/hash b/repos/libports/recipes/src/libssh/hash index d4ac9156dc..c676f346f2 100644 --- a/repos/libports/recipes/src/libssh/hash +++ b/repos/libports/recipes/src/libssh/hash @@ -1 +1 @@ -2022-09-20 55658b63d0770036d91d8db34fbae90d65a1d285 +2022-11-16 2e976deaab4957a70caf0c984ea14cb9c86aaff9 diff --git a/repos/libports/recipes/src/libusb/hash b/repos/libports/recipes/src/libusb/hash index cd1b5d5576..c6a8814274 100644 --- a/repos/libports/recipes/src/libusb/hash +++ b/repos/libports/recipes/src/libusb/hash @@ -1 +1 @@ -2022-10-11 03995e51617a0fabbc87101a9c222fd8cb08d304 +2022-11-16 0d8f4302acae68d31487468d353ed2e5d2f3886c diff --git a/repos/libports/recipes/src/libuvc/hash b/repos/libports/recipes/src/libuvc/hash index d8abaf3769..47aa4d3af0 100644 --- a/repos/libports/recipes/src/libuvc/hash +++ b/repos/libports/recipes/src/libuvc/hash @@ -1 +1 @@ -2022-09-20 d338f6475fafa2a202a8259ddfbf1c9ad0bde31d +2022-11-16 da5e62e764b6789080ea28927711d48826cc6225 diff --git a/repos/libports/recipes/src/libyuv/hash b/repos/libports/recipes/src/libyuv/hash index 58b928f5cc..e9b490e4f5 100644 --- a/repos/libports/recipes/src/libyuv/hash +++ b/repos/libports/recipes/src/libyuv/hash @@ -1 +1 @@ -2022-09-20 bf41103397fdfdbd5e460638b8617159747b634d +2022-11-16 56d1a14d599a69893a17506e17f34356b3b71814 diff --git a/repos/libports/recipes/src/mesa/hash b/repos/libports/recipes/src/mesa/hash index 35e2aba98b..cac2a9891f 100644 --- a/repos/libports/recipes/src/mesa/hash +++ b/repos/libports/recipes/src/mesa/hash @@ -1 +1 @@ -2022-10-11 80a21453436fce0ae3669a9e2b87a190c0631f67 +2022-11-16 384c61d947a11c0962b3814e22ce04fa5a85cb90 diff --git a/repos/libports/recipes/src/mesa_gears/hash b/repos/libports/recipes/src/mesa_gears/hash index 696633fa93..a1c07aff36 100644 --- a/repos/libports/recipes/src/mesa_gears/hash +++ b/repos/libports/recipes/src/mesa_gears/hash @@ -1 +1 @@ -2022-10-11 b84518c009820d3e8cf980cb318d1dc9c62a8c63 +2022-11-16 cb144d0023999f5609a71f43c2cb4186652ca404 diff --git a/repos/libports/recipes/src/openjpeg/hash b/repos/libports/recipes/src/openjpeg/hash index f23f210ceb..44e2e6cef5 100644 --- a/repos/libports/recipes/src/openjpeg/hash +++ b/repos/libports/recipes/src/openjpeg/hash @@ -1 +1 @@ -2022-09-20 9ff601aceafac1b63c4fb079923b93e59d411979 +2022-11-16 111b24c63f1e25a591e2ef47463672f32f9ae29b diff --git a/repos/libports/recipes/src/openssl/hash b/repos/libports/recipes/src/openssl/hash index 42f9121328..f15051d588 100644 --- a/repos/libports/recipes/src/openssl/hash +++ b/repos/libports/recipes/src/openssl/hash @@ -1 +1 @@ -2022-09-20 1f50428a4a36a39cda1186a6101bcfd2cc4192aa +2022-11-16 531a60d3de6cc462a69e122011663503f8cb63f8 diff --git a/repos/libports/recipes/src/pcre16/hash b/repos/libports/recipes/src/pcre16/hash index 67f6e3c959..810ce42284 100644 --- a/repos/libports/recipes/src/pcre16/hash +++ b/repos/libports/recipes/src/pcre16/hash @@ -1 +1 @@ -2022-09-20 9012960553c3c4cf8cbcb96ef8f8b7222c465d9d +2022-11-16 5434c284246a909b30aa9e4c34f65d09b57dc491 diff --git a/repos/libports/recipes/src/pcsc-lite/hash b/repos/libports/recipes/src/pcsc-lite/hash index 707f62b207..3e434bd5df 100644 --- a/repos/libports/recipes/src/pcsc-lite/hash +++ b/repos/libports/recipes/src/pcsc-lite/hash @@ -1 +1 @@ -2022-10-11 3ee3a9bcd5b952cc1c56676ce651775250bc8af8 +2022-11-16 762945f35cc7e4e663e9f255d4e9fb7ba1e0da02 diff --git a/repos/libports/recipes/src/pdf_view/hash b/repos/libports/recipes/src/pdf_view/hash index 750312ad0d..200ae9d5be 100644 --- a/repos/libports/recipes/src/pdf_view/hash +++ b/repos/libports/recipes/src/pdf_view/hash @@ -1 +1 @@ -2022-10-11 80b92e892bfefecca2b23476ed89656a475ed132 +2022-11-16 ce126f1a622a19925b26f2361dd8b37dce552938 diff --git a/repos/libports/recipes/src/qt5_base/hash b/repos/libports/recipes/src/qt5_base/hash index 4895f3ff45..9a9a7cab75 100644 --- a/repos/libports/recipes/src/qt5_base/hash +++ b/repos/libports/recipes/src/qt5_base/hash @@ -1 +1 @@ -2022-10-11 d8a53fcab0988af397a33814d962f20c876a5e3b +2022-11-16 07149062b866de75383f101b7b07d0a0742a62b5 diff --git a/repos/libports/recipes/src/qt5_calculatorform/hash b/repos/libports/recipes/src/qt5_calculatorform/hash index 9139a0d39e..af5601455d 100644 --- a/repos/libports/recipes/src/qt5_calculatorform/hash +++ b/repos/libports/recipes/src/qt5_calculatorform/hash @@ -1 +1 @@ -2022-08-30 b44671ee2b979fdc7836c7e7bae6399e207214ca +2022-11-16 6a9f77dfabcf81907cba313be8f3431918a1d59b diff --git a/repos/libports/recipes/src/qt5_declarative/hash b/repos/libports/recipes/src/qt5_declarative/hash index 7d3c28d59d..92bbf1b50c 100644 --- a/repos/libports/recipes/src/qt5_declarative/hash +++ b/repos/libports/recipes/src/qt5_declarative/hash @@ -1 +1 @@ -2022-09-20 55e8fcd3ee409df0dbf9c2f5cd02778fe21b7e86 +2022-11-16 ab992d4a66a069784ad093b32f3aafe6bffa380e diff --git a/repos/libports/recipes/src/qt5_graphicaleffects/hash b/repos/libports/recipes/src/qt5_graphicaleffects/hash index f78b9f2255..db9b4a87ed 100644 --- a/repos/libports/recipes/src/qt5_graphicaleffects/hash +++ b/repos/libports/recipes/src/qt5_graphicaleffects/hash @@ -1 +1 @@ -2022-09-20 6cf72310c4eb2905e3efbe3adfec288433f2e934 +2022-11-16 addffa484294c1afe1b9eeac584a487d8acde383 diff --git a/repos/libports/recipes/src/qt5_launchpad/hash b/repos/libports/recipes/src/qt5_launchpad/hash index ee224b7379..57641e26e3 100644 --- a/repos/libports/recipes/src/qt5_launchpad/hash +++ b/repos/libports/recipes/src/qt5_launchpad/hash @@ -1 +1 @@ -2022-10-11 d71a7793511c4289527cd5baf105448922b79402 +2022-11-16 4ac82ca3b1b9b855151f55909924103a7e5a02ad diff --git a/repos/libports/recipes/src/qt5_openglwindow/hash b/repos/libports/recipes/src/qt5_openglwindow/hash index bdc3974e9d..076c727b3c 100644 --- a/repos/libports/recipes/src/qt5_openglwindow/hash +++ b/repos/libports/recipes/src/qt5_openglwindow/hash @@ -1 +1 @@ -2022-08-30 851f203cd6105315d2c2054183a8d9efcd3b43f8 +2022-11-16 ea61729747cb448ad4dd5888357121d93890b2d2 diff --git a/repos/libports/recipes/src/qt5_quickcontrols/hash b/repos/libports/recipes/src/qt5_quickcontrols/hash index d1f627e5d7..44e5d61738 100644 --- a/repos/libports/recipes/src/qt5_quickcontrols/hash +++ b/repos/libports/recipes/src/qt5_quickcontrols/hash @@ -1 +1 @@ -2022-09-20 4fefc4a7c46449a25e150001b73bdb5f98e22c95 +2022-11-16 350308788e4399aae4bb14c5705097c04386fb72 diff --git a/repos/libports/recipes/src/qt5_quickcontrols2/hash b/repos/libports/recipes/src/qt5_quickcontrols2/hash index 32cde01a3c..e5f6466aa5 100644 --- a/repos/libports/recipes/src/qt5_quickcontrols2/hash +++ b/repos/libports/recipes/src/qt5_quickcontrols2/hash @@ -1 +1 @@ -2022-10-11 a0e802568223e4fae71e7115bba3143d70e84c6b +2022-11-16 2b43089c3e08c21f7f50915427085eadd682009a diff --git a/repos/libports/recipes/src/qt5_samegame/hash b/repos/libports/recipes/src/qt5_samegame/hash index 64e481575e..bef8e6a521 100644 --- a/repos/libports/recipes/src/qt5_samegame/hash +++ b/repos/libports/recipes/src/qt5_samegame/hash @@ -1 +1 @@ -2022-08-30 b9eceb7e1abf3b4ff2c8c510e237720e9ab6dfed +2022-11-16 de2dbd71edf3fad37c92cf4fa9ca29d9f8e688b4 diff --git a/repos/libports/recipes/src/qt5_svg/hash b/repos/libports/recipes/src/qt5_svg/hash index a5fa8477d3..d2bba84724 100644 --- a/repos/libports/recipes/src/qt5_svg/hash +++ b/repos/libports/recipes/src/qt5_svg/hash @@ -1 +1 @@ -2022-10-11 51837b4dcdb04fc9e81d67051aec225cd00224bb +2022-11-16 80ded8a65c9d21764c305dff527a5f2bed148b10 diff --git a/repos/libports/recipes/src/qt5_testqstring/hash b/repos/libports/recipes/src/qt5_testqstring/hash index ab5c83dd6e..867a325f9c 100644 --- a/repos/libports/recipes/src/qt5_testqstring/hash +++ b/repos/libports/recipes/src/qt5_testqstring/hash @@ -1 +1 @@ -2022-08-30 33e6402a6faa06b35c92afc9342315093b201225 +2022-11-16 4ba94cd34324a7b5d02574aa02cc709a500cd976 diff --git a/repos/libports/recipes/src/qt5_tetrix/hash b/repos/libports/recipes/src/qt5_tetrix/hash index 68b3dfc984..7c471573c8 100644 --- a/repos/libports/recipes/src/qt5_tetrix/hash +++ b/repos/libports/recipes/src/qt5_tetrix/hash @@ -1 +1 @@ -2022-08-30 cc1350a99df2aab2e7e17ffbb7d67314fce2fc84 +2022-11-16 8aabe4ff56c2fef17001a0fd54193a02c4369a12 diff --git a/repos/libports/recipes/src/qt5_textedit/hash b/repos/libports/recipes/src/qt5_textedit/hash index b19245a587..33a5d49f30 100644 --- a/repos/libports/recipes/src/qt5_textedit/hash +++ b/repos/libports/recipes/src/qt5_textedit/hash @@ -1 +1 @@ -2022-08-30 d6d0a086cd494b22d8cf2a7e05aeeb73060b09a0 +2022-11-16 587ce87520013889ba5b8fe87a0cb3272836a6f1 diff --git a/repos/libports/recipes/src/qt5_virtualkeyboard/hash b/repos/libports/recipes/src/qt5_virtualkeyboard/hash index 36e3279481..36c24a79c9 100644 --- a/repos/libports/recipes/src/qt5_virtualkeyboard/hash +++ b/repos/libports/recipes/src/qt5_virtualkeyboard/hash @@ -1 +1 @@ -2022-09-20 06964a1a05dc8fbb04c04bdbc975e770e316f183 +2022-11-16 eac0ae066b6cd08b5b7721b5248e6184ef418b96 diff --git a/repos/libports/recipes/src/qt5_virtualkeyboard_example/hash b/repos/libports/recipes/src/qt5_virtualkeyboard_example/hash index cc2a907ad9..74e7939c46 100644 --- a/repos/libports/recipes/src/qt5_virtualkeyboard_example/hash +++ b/repos/libports/recipes/src/qt5_virtualkeyboard_example/hash @@ -1 +1 @@ -2022-08-30 10a0c02f2d5e8cd608332d2a80bcd7d32627b098 +2022-11-16 6ccbcb3bf7b26d53df6c1aab682db10bced558db diff --git a/repos/libports/recipes/src/spark/hash b/repos/libports/recipes/src/spark/hash index fae8908f29..20dfe69535 100644 --- a/repos/libports/recipes/src/spark/hash +++ b/repos/libports/recipes/src/spark/hash @@ -1 +1 @@ -2022-10-11 82dec2574027d3de35cb3eccae8485693ba5a240 +2022-11-16 e9c07f6f0d4a7daa32b8896b076cf2feca165b42 diff --git a/repos/libports/recipes/src/system_rtc/hash b/repos/libports/recipes/src/system_rtc/hash index 530dec7195..ff8ba91610 100644 --- a/repos/libports/recipes/src/system_rtc/hash +++ b/repos/libports/recipes/src/system_rtc/hash @@ -1 +1 @@ -2022-10-11 c0be5474be58af327cb8b46af18996382c91f22f +2022-11-16 26642100b08d7453e0d9ca8e6d610e1af0c32a23 diff --git a/repos/libports/recipes/src/test-expat/hash b/repos/libports/recipes/src/test-expat/hash index 9dc4e5ffcc..a40f7f5362 100644 --- a/repos/libports/recipes/src/test-expat/hash +++ b/repos/libports/recipes/src/test-expat/hash @@ -1 +1 @@ -2022-10-11 3453dad7cb7fede0194d97947cf95c3171732f74 +2022-11-16 5649353388ab23888d9ef96f793abfcb0213ff0a diff --git a/repos/libports/recipes/src/test-libc_fifo_pipe/hash b/repos/libports/recipes/src/test-libc_fifo_pipe/hash index dd8f022beb..1300fef846 100644 --- a/repos/libports/recipes/src/test-libc_fifo_pipe/hash +++ b/repos/libports/recipes/src/test-libc_fifo_pipe/hash @@ -1 +1 @@ -2022-10-11 48434f5ed85d393949d3e387ed1446291de89efe +2022-11-16 077105ded9c670a90b94c734ef93994e0a367d6f diff --git a/repos/libports/recipes/src/test-qpluginwidget/hash b/repos/libports/recipes/src/test-qpluginwidget/hash index 11ea581505..8cf022fbd0 100644 --- a/repos/libports/recipes/src/test-qpluginwidget/hash +++ b/repos/libports/recipes/src/test-qpluginwidget/hash @@ -1 +1 @@ -2022-10-11 a49ec21d38c46209ec91ca45ecb8e4ea01fdc3af +2022-11-16 3fe60e9cb462149746e2bc72c40c00a9f5db0582 diff --git a/repos/libports/recipes/src/test-qt_core/hash b/repos/libports/recipes/src/test-qt_core/hash index 67739c2d19..5e71b032d9 100644 --- a/repos/libports/recipes/src/test-qt_core/hash +++ b/repos/libports/recipes/src/test-qt_core/hash @@ -1 +1 @@ -2022-08-30 e2c7f2e03c87f975a2bbd5237258d3b7c8669b74 +2022-11-16 219104176c919a2cb359e419e7cc2db5f2d66476 diff --git a/repos/libports/recipes/src/test-qt_core_cmake/hash b/repos/libports/recipes/src/test-qt_core_cmake/hash index 237d5a9ea9..a3120f84f0 100644 --- a/repos/libports/recipes/src/test-qt_core_cmake/hash +++ b/repos/libports/recipes/src/test-qt_core_cmake/hash @@ -1 +1 @@ -2022-08-30 9c6c12ef146561485ddf030a3e6627ed92145742 +2022-11-16 48c43e510438426e26b1ef8750f8d166187fae53 diff --git a/repos/libports/recipes/src/test-qt_quick/hash b/repos/libports/recipes/src/test-qt_quick/hash index 0028c06d1f..b6e376660e 100644 --- a/repos/libports/recipes/src/test-qt_quick/hash +++ b/repos/libports/recipes/src/test-qt_quick/hash @@ -1 +1 @@ -2022-08-30 dd31841c322eb2117674fc19aab62f92ad0b2a12 +2022-11-16 3beaa0b42d07a26a50e15ed2cf66b0fd919d768a diff --git a/repos/libports/recipes/src/test-spark/hash b/repos/libports/recipes/src/test-spark/hash index 51bca8ddb0..e6c6351e33 100644 --- a/repos/libports/recipes/src/test-spark/hash +++ b/repos/libports/recipes/src/test-spark/hash @@ -1 +1 @@ -2022-10-11 074a982ea2a545ddfcf27b51455085b5f944d61b +2022-11-16 370cab7a82f5a5e4e22f80a9c6b8779f32bc5c8f diff --git a/repos/libports/recipes/src/test-spark_exception/hash b/repos/libports/recipes/src/test-spark_exception/hash index f30fb3eda8..3be47738ef 100644 --- a/repos/libports/recipes/src/test-spark_exception/hash +++ b/repos/libports/recipes/src/test-spark_exception/hash @@ -1 +1 @@ -2022-10-11 e388164b9b47cd31543b8b1b66f13f59644446ff +2022-11-16 f3f6ce2092df06ccaef3d0dcf582b174b514f5d3 diff --git a/repos/libports/recipes/src/test-spark_secondary_stack/hash b/repos/libports/recipes/src/test-spark_secondary_stack/hash index affb4af0e5..971e64ae85 100644 --- a/repos/libports/recipes/src/test-spark_secondary_stack/hash +++ b/repos/libports/recipes/src/test-spark_secondary_stack/hash @@ -1 +1 @@ -2022-10-11 64d7c92796d4a3c1c04c10092a58b458ebade3b5 +2022-11-16 42145d9d3b4fe034f920d7d5d5f70b083d113ed9 diff --git a/repos/libports/recipes/src/test-tcp/hash b/repos/libports/recipes/src/test-tcp/hash index 8bc3aedb06..03cf6798ac 100644 --- a/repos/libports/recipes/src/test-tcp/hash +++ b/repos/libports/recipes/src/test-tcp/hash @@ -1 +1 @@ -2022-10-11 611d06974faa2a15f658c7cb5f684e7c3a548cd5 +2022-11-16 d1a86e26845ec88c4b5dce41d06207f0503f1dc7 diff --git a/repos/libports/recipes/src/usb_webcam/hash b/repos/libports/recipes/src/usb_webcam/hash index 39f5e56858..0fbf5d968b 100644 --- a/repos/libports/recipes/src/usb_webcam/hash +++ b/repos/libports/recipes/src/usb_webcam/hash @@ -1 +1 @@ -2022-10-11 a8cc0dbcc7fc421c45af6400b9a566fb03c4f44e +2022-11-16 0b993fdf3f0a71b9b42c959aed7ea174bcbf2ea8 diff --git a/repos/libports/recipes/src/vesa_drv/hash b/repos/libports/recipes/src/vesa_drv/hash index 146cbce7dd..2e7975e538 100644 --- a/repos/libports/recipes/src/vesa_drv/hash +++ b/repos/libports/recipes/src/vesa_drv/hash @@ -1 +1 @@ -2022-10-11 3746a88365ebfdcc6440d39be669e01903a2133a +2022-11-16 99d7b9e9e9df99f874807740f443c6d3ab1ca5fc diff --git a/repos/libports/recipes/src/vfs_fatfs/hash b/repos/libports/recipes/src/vfs_fatfs/hash index 349cad888f..ba695e75c1 100644 --- a/repos/libports/recipes/src/vfs_fatfs/hash +++ b/repos/libports/recipes/src/vfs_fatfs/hash @@ -1 +1 @@ -2022-10-11 b8f687011ad5d750782a7ed6494e801b6c05176f +2022-11-16 3b97ac5f7f634389e5f126915a93e8582cecc99f diff --git a/repos/libports/recipes/src/vfs_jitterentropy/hash b/repos/libports/recipes/src/vfs_jitterentropy/hash index a35776ba74..2094b2ea96 100644 --- a/repos/libports/recipes/src/vfs_jitterentropy/hash +++ b/repos/libports/recipes/src/vfs_jitterentropy/hash @@ -1 +1 @@ -2022-10-11 c948d2c7ce11bd5fed263570fe046e74eefe0e3c +2022-11-16 c6ddbf20fb4539ad39390fe6dae003fc46fcb037 diff --git a/repos/libports/recipes/src/vfs_libusb/hash b/repos/libports/recipes/src/vfs_libusb/hash index e5409277c6..f600205c36 100644 --- a/repos/libports/recipes/src/vfs_libusb/hash +++ b/repos/libports/recipes/src/vfs_libusb/hash @@ -1 +1 @@ -2022-10-11 5812aa31e5b4bcf3dfbe2e888424f4e39fa97436 +2022-11-16 f1b92846fe0789342344dd749f453845d04782e9 diff --git a/repos/libports/recipes/src/vfs_lwip/hash b/repos/libports/recipes/src/vfs_lwip/hash index 60016f5697..6736b21ae7 100644 --- a/repos/libports/recipes/src/vfs_lwip/hash +++ b/repos/libports/recipes/src/vfs_lwip/hash @@ -1 +1 @@ -2022-10-11 280016dd3a9af5336d614c926c000aa2bffb52db +2022-11-16 277cf90d4e966b21d6643f32f4bbf03c8a8c8d19 diff --git a/repos/libports/recipes/src/vfs_oss/hash b/repos/libports/recipes/src/vfs_oss/hash index 78b9aeaa36..b123770499 100644 --- a/repos/libports/recipes/src/vfs_oss/hash +++ b/repos/libports/recipes/src/vfs_oss/hash @@ -1 +1 @@ -2022-10-11 de27f5f6110cbdcaa80364992e550ec92f646c49 +2022-11-16 2651c55eac84e8b1cc8cda215fedb1e2bc26bb10 diff --git a/repos/libports/recipes/src/zlib/hash b/repos/libports/recipes/src/zlib/hash index c28bbde692..6397a56208 100644 --- a/repos/libports/recipes/src/zlib/hash +++ b/repos/libports/recipes/src/zlib/hash @@ -1 +1 @@ -2022-09-20 7dcd0c79c0ada0df3a5279207760e61e86367c2f +2022-11-16 ff106b57e01f085abfa2e96adcd93ff6766e8eaa diff --git a/repos/os/recipes/api/genode_c_api/hash b/repos/os/recipes/api/genode_c_api/hash index faaf835e4d..510ccaf228 100644 --- a/repos/os/recipes/api/genode_c_api/hash +++ b/repos/os/recipes/api/genode_c_api/hash @@ -1 +1 @@ -2022-09-20 a4488c152b5ff9071cdcd7d135f62efcaf53b6ac +2022-11-16 b376e5d82f1332f70474b58089b6837aed2af045 diff --git a/repos/os/recipes/api/gpu_session/hash b/repos/os/recipes/api/gpu_session/hash index a828008be2..b2f5180b2c 100644 --- a/repos/os/recipes/api/gpu_session/hash +++ b/repos/os/recipes/api/gpu_session/hash @@ -1 +1 @@ -2022-08-16 7b3ada81f3f160f6ae0032f6d4e40a10793cbae9 +2022-11-16 8e451e360360150401526aaa41468041ee78bce6 diff --git a/repos/os/recipes/api/os/hash b/repos/os/recipes/api/os/hash index 77df326c5c..62af5995b1 100644 --- a/repos/os/recipes/api/os/hash +++ b/repos/os/recipes/api/os/hash @@ -1 +1 @@ -2022-10-11 d2302f0d0fdb9b8f616461c5295d83ea0da48e36 +2022-11-16 8d06c2cccbe00e1eb06d54eac06e2f96627a3fe5 diff --git a/repos/os/recipes/api/pin_control_session/hash b/repos/os/recipes/api/pin_control_session/hash index 5f3cf68bd5..50b451f0d0 100644 --- a/repos/os/recipes/api/pin_control_session/hash +++ b/repos/os/recipes/api/pin_control_session/hash @@ -1 +1 @@ -2021-11-22 c606e4faa49bea958091b14ece22ed2d668d2d35 +2022-11-16 f3d070bf2859b8826972a7ec4778194d3aa1be3c diff --git a/repos/os/recipes/api/platform_session/hash b/repos/os/recipes/api/platform_session/hash index 4680c2190e..ce65bad1aa 100644 --- a/repos/os/recipes/api/platform_session/hash +++ b/repos/os/recipes/api/platform_session/hash @@ -1 +1 @@ -2022-10-11 adcb54072a44c3bcd981b58ede26ab822fdbf328 +2022-11-16 42965c22f078e93657caab2adfdd3c4fad3bc082 diff --git a/repos/os/recipes/api/usb_session/hash b/repos/os/recipes/api/usb_session/hash index 396423c23a..e8a2b518f2 100644 --- a/repos/os/recipes/api/usb_session/hash +++ b/repos/os/recipes/api/usb_session/hash @@ -1 +1 @@ -2022-08-30 63fbe4de4dc753a71f69abcc1079393284e11fee +2022-11-16 64fde41a923bb218c2777114d2abecece740cf7f diff --git a/repos/os/recipes/pkg/black_hole/hash b/repos/os/recipes/pkg/black_hole/hash index 65a4815378..07b94ac2ea 100644 --- a/repos/os/recipes/pkg/black_hole/hash +++ b/repos/os/recipes/pkg/black_hole/hash @@ -1 +1 @@ -2022-10-11 aea241129878eba26a3b9d29ad03a0131b10a5f3 +2022-11-16 1aca3cb49bc20aabd322e8601c24360756174d70 diff --git a/repos/os/recipes/pkg/chroot/hash b/repos/os/recipes/pkg/chroot/hash index 0bbc73e616..ffec5bd1c7 100644 --- a/repos/os/recipes/pkg/chroot/hash +++ b/repos/os/recipes/pkg/chroot/hash @@ -1 +1 @@ -2022-10-11 bb7ae9efbe99d15190ff498c32a8f0dd0597d8de +2022-11-16 9aa42cf5996405730dc2fdfb1cbbee2928f1334e diff --git a/repos/os/recipes/pkg/clipboard/hash b/repos/os/recipes/pkg/clipboard/hash index f474fccf2c..94de471047 100644 --- a/repos/os/recipes/pkg/clipboard/hash +++ b/repos/os/recipes/pkg/clipboard/hash @@ -1 +1 @@ -2022-10-11 3c99bdb273857e2988a2054330d59acdd5de7378 +2022-11-16 860ec05996e65984220adab991a7b5a97b59f7af diff --git a/repos/os/recipes/pkg/cpu_balancer/hash b/repos/os/recipes/pkg/cpu_balancer/hash index 123b952894..25306acc36 100644 --- a/repos/os/recipes/pkg/cpu_balancer/hash +++ b/repos/os/recipes/pkg/cpu_balancer/hash @@ -1 +1 @@ -2022-10-11 723ea5fbde749abfe6ac49b8a8b8d9eb76a9f77c +2022-11-16 fb3c2da609710131b2f7c0105a5d6611630c346f diff --git a/repos/os/recipes/pkg/cpu_balancer_config/hash b/repos/os/recipes/pkg/cpu_balancer_config/hash index 8c17f2af46..838758a12a 100644 --- a/repos/os/recipes/pkg/cpu_balancer_config/hash +++ b/repos/os/recipes/pkg/cpu_balancer_config/hash @@ -1 +1 @@ -2022-10-11 daa7ac3ab6dfa7e8cc98b455b3aba13c0ecfbe0a +2022-11-16 8a3c16dd3c5d40cc2297fc1e7226ce37d58419f5 diff --git a/repos/os/recipes/pkg/drivers_interactive-linux/hash b/repos/os/recipes/pkg/drivers_interactive-linux/hash index b3ff078e62..8c194ae61f 100644 --- a/repos/os/recipes/pkg/drivers_interactive-linux/hash +++ b/repos/os/recipes/pkg/drivers_interactive-linux/hash @@ -1 +1 @@ -2022-10-11 d31991d2b17ff1cf82d6ef022ccbdf2f51560769 +2022-11-16 89adf601d7fd0e7a2a7b3e700aaa5084b0aeed86 diff --git a/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash b/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash index 9527d6544f..4150b5f0e2 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash +++ b/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash @@ -1 +1 @@ -2022-10-11 29a8a43cc84a40b4e6f131d9b76532367fbadf2f +2022-11-16 21d382e972f6b5c391a756f95bfcda0e8f058612 diff --git a/repos/os/recipes/pkg/drivers_interactive-pc/hash b/repos/os/recipes/pkg/drivers_interactive-pc/hash index 22053e77a3..4f63297bfb 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pc/hash +++ b/repos/os/recipes/pkg/drivers_interactive-pc/hash @@ -1 +1 @@ -2022-10-11 4cf6004aa40c9e7bf02b5e0d9c8776753ea7cd7d +2022-11-16 a70f996f39015ae7b66821780d577c887391e4c2 diff --git a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash index c7d9ae1f3d..08fdb4ac0e 100644 --- a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash +++ b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-10-11 62e92d13e82a37bd498799e6fa5d06cb8ef930ed +2022-11-16 bbed3a2aa141be658825310503cff0c1d817e3f1 diff --git a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash index c7d9ae1f3d..08fdb4ac0e 100644 --- a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash +++ b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-10-11 62e92d13e82a37bd498799e6fa5d06cb8ef930ed +2022-11-16 bbed3a2aa141be658825310503cff0c1d817e3f1 diff --git a/repos/os/recipes/pkg/drivers_nic-linux/hash b/repos/os/recipes/pkg/drivers_nic-linux/hash index d02a57c5d6..0a22acffe3 100644 --- a/repos/os/recipes/pkg/drivers_nic-linux/hash +++ b/repos/os/recipes/pkg/drivers_nic-linux/hash @@ -1 +1 @@ -2022-10-11 baf260966e8c88ecc60415016fa9144ccb51db04 +2022-11-16 88dde793b836de160c3c6d09d04d4acfa5e72f9f diff --git a/repos/os/recipes/pkg/drivers_nic-pbxa9/hash b/repos/os/recipes/pkg/drivers_nic-pbxa9/hash index 7bb82af8ee..00d0cb4aa9 100644 --- a/repos/os/recipes/pkg/drivers_nic-pbxa9/hash +++ b/repos/os/recipes/pkg/drivers_nic-pbxa9/hash @@ -1 +1 @@ -2022-10-11 c6c8e9464cffc6a7e467d534a2cc25b729ebb738 +2022-11-16 18b463a844d629e56d4298ae7d31fea0cc5018b8 diff --git a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash index 05f713cf78..d2cf70645d 100644 --- a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash +++ b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-10-11 d86aa4f30cf763d57ff20df4d088d97dff64548a +2022-11-16 fc91ed360ce862440e2ea96289a8aafe5f5cdcf6 diff --git a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash index 05f713cf78..d2cf70645d 100644 --- a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash +++ b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-10-11 d86aa4f30cf763d57ff20df4d088d97dff64548a +2022-11-16 fc91ed360ce862440e2ea96289a8aafe5f5cdcf6 diff --git a/repos/os/recipes/pkg/fs_report/hash b/repos/os/recipes/pkg/fs_report/hash index 54ece5c94f..bc59f46dfb 100644 --- a/repos/os/recipes/pkg/fs_report/hash +++ b/repos/os/recipes/pkg/fs_report/hash @@ -1 +1 @@ -2022-10-11 700987d4bfce4e0f84375e90519a2558fe7054cd +2022-11-16 f814cd7dcdc2576b7b1206fa7770a0e97e43a7f4 diff --git a/repos/os/recipes/pkg/fs_rom/hash b/repos/os/recipes/pkg/fs_rom/hash index 7ff34aedef..2b1c3d8145 100644 --- a/repos/os/recipes/pkg/fs_rom/hash +++ b/repos/os/recipes/pkg/fs_rom/hash @@ -1 +1 @@ -2022-10-11 32048032d17845fac915a51d8010a658b2d135c7 +2022-11-16 9788596f2dacebf5615038a3aad90c25bca535e9 diff --git a/repos/os/recipes/pkg/mixer/hash b/repos/os/recipes/pkg/mixer/hash index 36c782acf9..8fa8d3b4b8 100644 --- a/repos/os/recipes/pkg/mixer/hash +++ b/repos/os/recipes/pkg/mixer/hash @@ -1 +1 @@ -2022-10-11 d5c13f8da5e61dba061ffebb2bc8645c110acd48 +2022-11-16 814b9e51059da7ef8eee984ab7b3d1cf61b0c1e2 diff --git a/repos/os/recipes/pkg/nic_router-nat/hash b/repos/os/recipes/pkg/nic_router-nat/hash index 4d28460ced..ac295cd84c 100644 --- a/repos/os/recipes/pkg/nic_router-nat/hash +++ b/repos/os/recipes/pkg/nic_router-nat/hash @@ -1 +1 @@ -2022-10-13 91cf27f8392f854540f919bb89bffa416d230903 +2022-11-16 634a3039276ee2a21931f3313fb4e44af6087486 diff --git a/repos/os/recipes/pkg/nit_focus/hash b/repos/os/recipes/pkg/nit_focus/hash index d3ba9ea7a7..5583be0f6f 100644 --- a/repos/os/recipes/pkg/nit_focus/hash +++ b/repos/os/recipes/pkg/nit_focus/hash @@ -1 +1 @@ -2022-10-11 4246fb270937a5e17ac6e251c957d0a7623dc670 +2022-11-16 7b55d9e8cefc1b200983dea82d95229f444a40d9 diff --git a/repos/os/recipes/pkg/part_block/hash b/repos/os/recipes/pkg/part_block/hash index 55111b2cd8..4045968928 100644 --- a/repos/os/recipes/pkg/part_block/hash +++ b/repos/os/recipes/pkg/part_block/hash @@ -1 +1 @@ -2022-10-11 a4317ecd68cfaff34eec8c70d90bed48ec92c5cd +2022-11-16 9df3a289233349efa8253df9fd32b78a09197104 diff --git a/repos/os/recipes/pkg/recall_fs/hash b/repos/os/recipes/pkg/recall_fs/hash index cd3a9a30b1..951ffe5c49 100644 --- a/repos/os/recipes/pkg/recall_fs/hash +++ b/repos/os/recipes/pkg/recall_fs/hash @@ -1 +1 @@ -2022-10-11 dfc16bacfcb776ca8232cb1072afdcde9232f206 +2022-11-16 2ececdc836047a36038349a99691b001b89a4bb1 diff --git a/repos/os/recipes/pkg/report_rom/hash b/repos/os/recipes/pkg/report_rom/hash index fa4da740c2..543238576b 100644 --- a/repos/os/recipes/pkg/report_rom/hash +++ b/repos/os/recipes/pkg/report_rom/hash @@ -1 +1 @@ -2022-10-11 5a392e0400332aa46243f87f3434143e5a1a3e31 +2022-11-16 de8acbfdef0d6a1cc8a4dca2211a41320e82bb1b diff --git a/repos/os/recipes/pkg/rom_filter/hash b/repos/os/recipes/pkg/rom_filter/hash index d839f63300..43308f2803 100644 --- a/repos/os/recipes/pkg/rom_filter/hash +++ b/repos/os/recipes/pkg/rom_filter/hash @@ -1 +1 @@ -2022-10-11 51081176262ccb5ed8d517138ea3da1440bf7d3b +2022-11-16 66f056748ac138035fb75292b8bc70407401de2e diff --git a/repos/os/recipes/pkg/rom_reporter/hash b/repos/os/recipes/pkg/rom_reporter/hash index 33de8309d7..3a69c6fdd9 100644 --- a/repos/os/recipes/pkg/rom_reporter/hash +++ b/repos/os/recipes/pkg/rom_reporter/hash @@ -1 +1 @@ -2022-10-11 b4f86a6bdf4073a55edb47d0a68e02066d47b78f +2022-11-16 3a12c06bda5c6316e03bc04ffd0c8257015acbe4 diff --git a/repos/os/recipes/pkg/test-black_hole/hash b/repos/os/recipes/pkg/test-black_hole/hash index 3aea8699c7..0362c905ee 100644 --- a/repos/os/recipes/pkg/test-black_hole/hash +++ b/repos/os/recipes/pkg/test-black_hole/hash @@ -1 +1 @@ -2022-10-11 7ce1c14c911cc0a419045151504ff157f5d26b7d +2022-11-16 d77fe0f7ed360f6c701b95db33f851ee82367dcb diff --git a/repos/os/recipes/pkg/test-capture/hash b/repos/os/recipes/pkg/test-capture/hash index b0c4635de8..ca41665f9e 100644 --- a/repos/os/recipes/pkg/test-capture/hash +++ b/repos/os/recipes/pkg/test-capture/hash @@ -1 +1 @@ -2022-10-11 7d3945b9a8d6bfb01dea1e97b1256b566aaf0ef7 +2022-11-16 5c26436cbfc07c92e61b0d351f5df8d0a88288d3 diff --git a/repos/os/recipes/pkg/test-clipboard/hash b/repos/os/recipes/pkg/test-clipboard/hash index 4f1d95a27d..2add31d724 100644 --- a/repos/os/recipes/pkg/test-clipboard/hash +++ b/repos/os/recipes/pkg/test-clipboard/hash @@ -1 +1 @@ -2022-10-11 eee75418fdbaf99c4a426a611e8216daf6fda7ea +2022-11-16 1dcbf3b87c918adb4ebab528663fa04676ca8617 diff --git a/repos/os/recipes/pkg/test-dynamic_config/hash b/repos/os/recipes/pkg/test-dynamic_config/hash index 1f8c86082b..9513b1565d 100644 --- a/repos/os/recipes/pkg/test-dynamic_config/hash +++ b/repos/os/recipes/pkg/test-dynamic_config/hash @@ -1 +1 @@ -2022-10-11 30054f67f3b1ddfe6688f4b8da7cacdf55b136a1 +2022-11-16 1c552558d669941a14977c9d8a1cf164a210e969 diff --git a/repos/os/recipes/pkg/test-dynamic_config_loader/hash b/repos/os/recipes/pkg/test-dynamic_config_loader/hash index c1c3fbd530..1a4a05f9df 100644 --- a/repos/os/recipes/pkg/test-dynamic_config_loader/hash +++ b/repos/os/recipes/pkg/test-dynamic_config_loader/hash @@ -1 +1 @@ -2022-10-11 87ef09d7d73ceb319c965567f8ed356a10eb1b3e +2022-11-16 6deb807bd0a0e8415d4c3c2cf90545e35f003f5c diff --git a/repos/os/recipes/pkg/test-fault_detection/hash b/repos/os/recipes/pkg/test-fault_detection/hash index 5b6c221e78..1ad8bd7c61 100644 --- a/repos/os/recipes/pkg/test-fault_detection/hash +++ b/repos/os/recipes/pkg/test-fault_detection/hash @@ -1 +1 @@ -2022-10-11 cf2cb45d256b1882fc55ec8b647beab0e3c71401 +2022-11-16 87260d3b5179eaaec0954e48c119cab6c4a8ed2e diff --git a/repos/os/recipes/pkg/test-fs_packet/hash b/repos/os/recipes/pkg/test-fs_packet/hash index eaee6465c8..01e2d9a71f 100644 --- a/repos/os/recipes/pkg/test-fs_packet/hash +++ b/repos/os/recipes/pkg/test-fs_packet/hash @@ -1 +1 @@ -2022-10-11 c8153a4ad7a626febc1a470f3873f94f56c0f4c4 +2022-11-16 e7634f72283c1c896696f747c1aad3722c9060ae diff --git a/repos/os/recipes/pkg/test-fs_report/hash b/repos/os/recipes/pkg/test-fs_report/hash index 9c9ebed335..f067f4360c 100644 --- a/repos/os/recipes/pkg/test-fs_report/hash +++ b/repos/os/recipes/pkg/test-fs_report/hash @@ -1 +1 @@ -2022-10-11 7a4ed19dd9e3950d915e96dcd90d0e634d5055f6 +2022-11-16 8f34f370f247286631254ffda492df46d3390691 diff --git a/repos/os/recipes/pkg/test-fs_rom_update/hash b/repos/os/recipes/pkg/test-fs_rom_update/hash index f42c1b2c1e..9d67ddd7c8 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update/hash @@ -1 +1 @@ -2022-10-11 6e44b98ab57f654631bb885d2a59c4d2f7c62d94 +2022-11-16 de516b76f4d0f0bb7d4f275727d353346b97f436 diff --git a/repos/os/recipes/pkg/test-fs_rom_update_fs/hash b/repos/os/recipes/pkg/test-fs_rom_update_fs/hash index b1ed756ecf..37e6a0b3b9 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update_fs/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update_fs/hash @@ -1 +1 @@ -2022-10-11 3903f54c0be779846ac6d74cd022fef3281d1064 +2022-11-16 4997f01391ec5fac3830cf41a60446cc4aa1347e diff --git a/repos/os/recipes/pkg/test-fs_rom_update_ram/hash b/repos/os/recipes/pkg/test-fs_rom_update_ram/hash index 9e9a5014e3..4182da1ec8 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update_ram/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update_ram/hash @@ -1 +1 @@ -2022-10-11 161dc221eda72a95b546a335bb1ab31ac8f42ad2 +2022-11-16 ccfe5ae8049e4aa0674aac9e4f0981d0330e50ed diff --git a/repos/os/recipes/pkg/test-init/hash b/repos/os/recipes/pkg/test-init/hash index b1fbc5b9f1..52d83b6581 100644 --- a/repos/os/recipes/pkg/test-init/hash +++ b/repos/os/recipes/pkg/test-init/hash @@ -1 +1 @@ -2022-10-11 06b93fe3cddb656a2f0284262d364e8d2412c4a4 +2022-11-16 e8618195e9e622053a34840524e89dba28179ca0 diff --git a/repos/os/recipes/pkg/test-init_loop/hash b/repos/os/recipes/pkg/test-init_loop/hash index be1b0dd9bf..aefcf5c96c 100644 --- a/repos/os/recipes/pkg/test-init_loop/hash +++ b/repos/os/recipes/pkg/test-init_loop/hash @@ -1 +1 @@ -2022-10-11 10de16fc39c7346d7827219b3a54469e1e9737f3 +2022-11-16 76e1a790dd731dc36d37c1046a023bf5986674c0 diff --git a/repos/os/recipes/pkg/test-lx_block/hash b/repos/os/recipes/pkg/test-lx_block/hash index c64d4041cb..b0229b9b9f 100644 --- a/repos/os/recipes/pkg/test-lx_block/hash +++ b/repos/os/recipes/pkg/test-lx_block/hash @@ -1 +1 @@ -2022-10-11 90538e539505e44d772ec54b1a88444403978b5e +2022-11-16 a2b8f42c00aba11061623871b387118ab21504dc diff --git a/repos/os/recipes/pkg/test-nic_loopback/hash b/repos/os/recipes/pkg/test-nic_loopback/hash index 3ee2e5bb69..e25ec235c9 100644 --- a/repos/os/recipes/pkg/test-nic_loopback/hash +++ b/repos/os/recipes/pkg/test-nic_loopback/hash @@ -1 +1 @@ -2022-10-11 63b3c5d8b3b997daa201bb7de6066390d2201acc +2022-11-16 43643b88efccbe33a840308f60d4aca77b322007 diff --git a/repos/os/recipes/pkg/test-nic_perf/hash b/repos/os/recipes/pkg/test-nic_perf/hash index 4c37b14e11..1b5b8db5f5 100644 --- a/repos/os/recipes/pkg/test-nic_perf/hash +++ b/repos/os/recipes/pkg/test-nic_perf/hash @@ -1 +1 @@ -2022-10-11 01ed91fe6c3a721a021ef434dbc1e414e8773227 +2022-11-16 3cba2fad58713e2fc5dc88da202d85cec6a5eb04 diff --git a/repos/os/recipes/pkg/test-nic_perf_router/hash b/repos/os/recipes/pkg/test-nic_perf_router/hash index 2a25f6e711..367e1ca172 100644 --- a/repos/os/recipes/pkg/test-nic_perf_router/hash +++ b/repos/os/recipes/pkg/test-nic_perf_router/hash @@ -1 +1 @@ -2022-10-11 a0f6af0744a81671807c2b9f7522782ae59a01a0 +2022-11-16 26a5a07a842aac33083fa54033cc8fb7db8e49a8 diff --git a/repos/os/recipes/pkg/test-part_block_gpt/hash b/repos/os/recipes/pkg/test-part_block_gpt/hash index 480f0530aa..0ba232e9ee 100644 --- a/repos/os/recipes/pkg/test-part_block_gpt/hash +++ b/repos/os/recipes/pkg/test-part_block_gpt/hash @@ -1 +1 @@ -2022-10-11 1e5dc67eb6cdbc0037397efa622a1fe72eb691ca +2022-11-16 5c7ef5981152d352e5cebbc1439e4cc7e2225719 diff --git a/repos/os/recipes/pkg/test-part_block_mbr/hash b/repos/os/recipes/pkg/test-part_block_mbr/hash index a5d4bdb24f..df5868f9e3 100644 --- a/repos/os/recipes/pkg/test-part_block_mbr/hash +++ b/repos/os/recipes/pkg/test-part_block_mbr/hash @@ -1 +1 @@ -2022-10-11 962e458c21acd09fa355afec4bcbd029f3dc11c9 +2022-11-16 f15d2655c625c3343e2fab8eec1022240bd4b902 diff --git a/repos/os/recipes/pkg/test-ram_fs_chunk/hash b/repos/os/recipes/pkg/test-ram_fs_chunk/hash index b8fedf70d1..94fdf4df6e 100644 --- a/repos/os/recipes/pkg/test-ram_fs_chunk/hash +++ b/repos/os/recipes/pkg/test-ram_fs_chunk/hash @@ -1 +1 @@ -2022-10-11 308bc5b21a023ebcfc7a16e2181320e7bc699a50 +2022-11-16 390a1901875de9652db8e828bc151e0880e27fc2 diff --git a/repos/os/recipes/pkg/test-read_only_rom/hash b/repos/os/recipes/pkg/test-read_only_rom/hash index 5f9de76ab1..2c4cb1413f 100644 --- a/repos/os/recipes/pkg/test-read_only_rom/hash +++ b/repos/os/recipes/pkg/test-read_only_rom/hash @@ -1 +1 @@ -2022-10-11 4970a65f723c7079a5cfc086b4c2b28f8411f1c3 +2022-11-16 50c02ceaa3c0715aeab52548840741f172cc29bd diff --git a/repos/os/recipes/pkg/test-report_rom/hash b/repos/os/recipes/pkg/test-report_rom/hash index 8c1d4a3bf1..6ecb41af5e 100644 --- a/repos/os/recipes/pkg/test-report_rom/hash +++ b/repos/os/recipes/pkg/test-report_rom/hash @@ -1 +1 @@ -2022-10-11 ce26028800223f982f34847c5f52294fb6db47e5 +2022-11-16 68baa0d001a7a37a4c37e77f6ff8864e11d5d974 diff --git a/repos/os/recipes/pkg/test-resource_request/hash b/repos/os/recipes/pkg/test-resource_request/hash index 6cb309d8dc..98f714008a 100644 --- a/repos/os/recipes/pkg/test-resource_request/hash +++ b/repos/os/recipes/pkg/test-resource_request/hash @@ -1 +1 @@ -2022-10-11 1d6c747b6e1eeae1d9089a1a2f24b893d8ada861 +2022-11-16 9c53aab0796b2e9a6764a653fa87d47de75b48ca diff --git a/repos/os/recipes/pkg/test-resource_yield/hash b/repos/os/recipes/pkg/test-resource_yield/hash index f98b25a115..60ce004bc0 100644 --- a/repos/os/recipes/pkg/test-resource_yield/hash +++ b/repos/os/recipes/pkg/test-resource_yield/hash @@ -1 +1 @@ -2022-10-11 44f5ebf6e58c908ce48cbe68be5abb4503230416 +2022-11-16 337638458610b37fd1cbc95e9018a1f0f185c6db diff --git a/repos/os/recipes/pkg/test-rom_filter/hash b/repos/os/recipes/pkg/test-rom_filter/hash index 556fd4117e..e2bdea437d 100644 --- a/repos/os/recipes/pkg/test-rom_filter/hash +++ b/repos/os/recipes/pkg/test-rom_filter/hash @@ -1 +1 @@ -2022-10-11 9b242f1b2c0b79909b700ee0fb134367069c87ef +2022-11-16 32062a9cd00649fa83021ec4335c319a80f9cee8 diff --git a/repos/os/recipes/pkg/test-rtc/hash b/repos/os/recipes/pkg/test-rtc/hash index a7522fa972..87d9159a13 100644 --- a/repos/os/recipes/pkg/test-rtc/hash +++ b/repos/os/recipes/pkg/test-rtc/hash @@ -1 +1 @@ -2022-10-11 ede3254208690f9c6e690c06fc2d9c6666c932ff +2022-11-16 81160e436878caaba4e6b70b393fe2b675785d3d diff --git a/repos/os/recipes/pkg/test-sandbox/hash b/repos/os/recipes/pkg/test-sandbox/hash index f185fff94e..ad0c0c1a78 100644 --- a/repos/os/recipes/pkg/test-sandbox/hash +++ b/repos/os/recipes/pkg/test-sandbox/hash @@ -1 +1 @@ -2022-10-11 d8f87310a02150b2b5c3860568e58786d2c52247 +2022-11-16 9a7150329c3362e9621dad6ed4d3a8c56af92fb8 diff --git a/repos/os/recipes/pkg/test-signal/hash b/repos/os/recipes/pkg/test-signal/hash index 9494585d24..495a7177c7 100644 --- a/repos/os/recipes/pkg/test-signal/hash +++ b/repos/os/recipes/pkg/test-signal/hash @@ -1 +1 @@ -2022-10-11 d8ce46f7a8b617c64e17f4e9ea5d1016770b3bf9 +2022-11-16 695e66fd3e651207f8408c3e1723fea2545a7fb4 diff --git a/repos/os/recipes/pkg/test-slab/hash b/repos/os/recipes/pkg/test-slab/hash index 47d412434f..ab427d450d 100644 --- a/repos/os/recipes/pkg/test-slab/hash +++ b/repos/os/recipes/pkg/test-slab/hash @@ -1 +1 @@ -2022-10-11 344566c7a689431547b8bd4cc2d4ef71940705f0 +2022-11-16 7d93bfb227cb187627b193243268cb3e2d539a0c diff --git a/repos/os/recipes/pkg/test-terminal_crosslink/hash b/repos/os/recipes/pkg/test-terminal_crosslink/hash index 6384190faf..c0b776ae7d 100644 --- a/repos/os/recipes/pkg/test-terminal_crosslink/hash +++ b/repos/os/recipes/pkg/test-terminal_crosslink/hash @@ -1 +1 @@ -2022-10-11 609e65676bab87357ab92e5c1482cebe059bae64 +2022-11-16 1353ad332949b3b635f44c54e3abec4b5d8bc60a diff --git a/repos/os/recipes/pkg/test-trace/hash b/repos/os/recipes/pkg/test-trace/hash index 251f6bc3d7..6b42d9bfe3 100644 --- a/repos/os/recipes/pkg/test-trace/hash +++ b/repos/os/recipes/pkg/test-trace/hash @@ -1 +1 @@ -2022-10-11 611b6ec956723f9a14a3f00f0b66e0bd694daf7f +2022-11-16 038f27f48d961bdbd1def864dd9ff1841ee2b9b8 diff --git a/repos/os/recipes/pkg/test-trace_buffer/hash b/repos/os/recipes/pkg/test-trace_buffer/hash index 9ac5f2fc2a..ddb35bfd5c 100644 --- a/repos/os/recipes/pkg/test-trace_buffer/hash +++ b/repos/os/recipes/pkg/test-trace_buffer/hash @@ -1 +1 @@ -2022-10-11 2690a52fb045138d79d679f1affbf0f8c3a27483 +2022-11-16 9c4d15e2f509218dc2b244d5a40517184be74f63 diff --git a/repos/os/recipes/pkg/test-trace_logger/hash b/repos/os/recipes/pkg/test-trace_logger/hash index 77676b38cb..9ae41e3e2b 100644 --- a/repos/os/recipes/pkg/test-trace_logger/hash +++ b/repos/os/recipes/pkg/test-trace_logger/hash @@ -1 +1 @@ -2022-10-11 2a50bc8c841f305277855a924a532e5c6909884d +2022-11-16 207941f91b7ce9b257c579e9fb347e56eed91c46 diff --git a/repos/os/recipes/pkg/test-utf8/hash b/repos/os/recipes/pkg/test-utf8/hash index 56c81bbfb0..ffd91a2ec5 100644 --- a/repos/os/recipes/pkg/test-utf8/hash +++ b/repos/os/recipes/pkg/test-utf8/hash @@ -1 +1 @@ -2022-10-11 d73134d210d7ca255b5588ff65a998beba123907 +2022-11-16 6fa8d26e20e8ee9dcc39972b3b3f2b8bef7504e8 diff --git a/repos/os/recipes/pkg/test-vfs_block/hash b/repos/os/recipes/pkg/test-vfs_block/hash index ff0185c08e..77fe6304f6 100644 --- a/repos/os/recipes/pkg/test-vfs_block/hash +++ b/repos/os/recipes/pkg/test-vfs_block/hash @@ -1 +1 @@ -2022-10-11 b840034b7ec21f269070b254cea5b0c16ed90b5e +2022-11-16 991d2c1959fed3e96b4195281aba2a36ed642b8a diff --git a/repos/os/recipes/pkg/test-vfs_stress_fs/hash b/repos/os/recipes/pkg/test-vfs_stress_fs/hash index 3302dcaa90..5b1c3e996d 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_fs/hash +++ b/repos/os/recipes/pkg/test-vfs_stress_fs/hash @@ -1 +1 @@ -2022-10-11 1a58c208669889d6d80fd9d893d3d09b1d66fdb6 +2022-11-16 9ac88fbdf30e2fed2024f278ed3c039cfb4f572f diff --git a/repos/os/recipes/pkg/test-vfs_stress_ram/hash b/repos/os/recipes/pkg/test-vfs_stress_ram/hash index 9b77a1573d..cfb1c0064a 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_ram/hash +++ b/repos/os/recipes/pkg/test-vfs_stress_ram/hash @@ -1 +1 @@ -2022-10-11 5ffa8bb13e3b081074da7812d3dfa6da759deaf1 +2022-11-16 d8e1bfb419156213e54afff34569be4f21f500d4 diff --git a/repos/os/recipes/pkg/test-weak_ptr/hash b/repos/os/recipes/pkg/test-weak_ptr/hash index 9224413431..a88397dd83 100644 --- a/repos/os/recipes/pkg/test-weak_ptr/hash +++ b/repos/os/recipes/pkg/test-weak_ptr/hash @@ -1 +1 @@ -2022-10-11 78e9073cdfb713063e5705c11a09faec76eb47c6 +2022-11-16 740dc6a33678b5fbd2bde64849c2fd731f6c8676 diff --git a/repos/os/recipes/pkg/trace_logger/hash b/repos/os/recipes/pkg/trace_logger/hash index 7326c8967a..48f2a18caa 100644 --- a/repos/os/recipes/pkg/trace_logger/hash +++ b/repos/os/recipes/pkg/trace_logger/hash @@ -1 +1 @@ -2022-10-11 5c3376142d6635290b939319d65dbfaa55001c94 +2022-11-16 f1a5d7dcc525c994b25c7cf53a54e10f561a7a62 diff --git a/repos/os/recipes/pkg/vfs/hash b/repos/os/recipes/pkg/vfs/hash index fa5cf31d83..57984d1648 100644 --- a/repos/os/recipes/pkg/vfs/hash +++ b/repos/os/recipes/pkg/vfs/hash @@ -1 +1 @@ -2022-10-11 32c161dc634a1d5a2e3c5774fba0f4133857bcad +2022-11-16 cc6f3d5d0d2a80bab13edb2f504d8e765925c70b diff --git a/repos/os/recipes/pkg/vfs_block/hash b/repos/os/recipes/pkg/vfs_block/hash index 6a47b0938e..b73c8c67e1 100644 --- a/repos/os/recipes/pkg/vfs_block/hash +++ b/repos/os/recipes/pkg/vfs_block/hash @@ -1 +1 @@ -2022-10-11 7cab6890a30250d4e29cb239438dc53e6ad0da91 +2022-11-16 6cface1530aaa0c48e66fcdabf7d135f70709ac2 diff --git a/repos/os/recipes/src/acpi_drv/hash b/repos/os/recipes/src/acpi_drv/hash index 6cd67b959d..7901e77585 100644 --- a/repos/os/recipes/src/acpi_drv/hash +++ b/repos/os/recipes/src/acpi_drv/hash @@ -1 +1 @@ -2022-10-11 9805a7846e9ffc77a58bf0a66efd1ad37095df9e +2022-11-16 f7c0ededda80a908b49e241b53d474c062d40de7 diff --git a/repos/os/recipes/src/ahci_drv/hash b/repos/os/recipes/src/ahci_drv/hash index 5a7216cf55..6713754a4f 100644 --- a/repos/os/recipes/src/ahci_drv/hash +++ b/repos/os/recipes/src/ahci_drv/hash @@ -1 +1 @@ -2022-10-11 1cda0ef83ca9fa0dd99b085e0c79ab87166a7889 +2022-11-16 42eee867bd3080e8fe56eb4aa9bfde974868d59a diff --git a/repos/os/recipes/src/black_hole/hash b/repos/os/recipes/src/black_hole/hash index 20a32b9961..c8e74510c3 100644 --- a/repos/os/recipes/src/black_hole/hash +++ b/repos/os/recipes/src/black_hole/hash @@ -1 +1 @@ -2022-10-11 1166063113ed0e24c8c6bec6827ee102240210f3 +2022-11-16 9c0bfaecc97a604a5b1876bfa2c2f3be6ea49903 diff --git a/repos/os/recipes/src/block_tester/hash b/repos/os/recipes/src/block_tester/hash index f7936d4f8e..bdb4810409 100644 --- a/repos/os/recipes/src/block_tester/hash +++ b/repos/os/recipes/src/block_tester/hash @@ -1 +1 @@ -2022-10-11 3cd9023c61da5f2ae3f0d9bee913c3e37f65cb93 +2022-11-16 1694f29a5914f87b580f154839d68bb0faa6deb2 diff --git a/repos/os/recipes/src/boot_fb_drv/hash b/repos/os/recipes/src/boot_fb_drv/hash index 8e2b631d11..12cdd1bc58 100644 --- a/repos/os/recipes/src/boot_fb_drv/hash +++ b/repos/os/recipes/src/boot_fb_drv/hash @@ -1 +1 @@ -2022-10-11 1c4e66b4681e6efb5779f07a9c88cfe76a975fee +2022-11-16 72d221a13c9d334764c27cf7aac907f1d8d2b228 diff --git a/repos/os/recipes/src/cached_fs_rom/hash b/repos/os/recipes/src/cached_fs_rom/hash index 514322fe84..3d6c96fc80 100644 --- a/repos/os/recipes/src/cached_fs_rom/hash +++ b/repos/os/recipes/src/cached_fs_rom/hash @@ -1 +1 @@ -2022-10-11 3185b0a5480f2939a4f2493f9e1d3aaa4f8044fb +2022-11-16 6a6f5a91b008adba810f005f76230cb8171710cc diff --git a/repos/os/recipes/src/chroot/hash b/repos/os/recipes/src/chroot/hash index 5f2fc5a708..2b110f52af 100644 --- a/repos/os/recipes/src/chroot/hash +++ b/repos/os/recipes/src/chroot/hash @@ -1 +1 @@ -2022-10-11 c1a23e3e04f71c1cb617260f306781cbcc7bbeac +2022-11-16 0dd7d091d0ad212c5bc72725939b45a70e69ecf0 diff --git a/repos/os/recipes/src/clipboard/hash b/repos/os/recipes/src/clipboard/hash index a156735127..6a80a5dbb0 100644 --- a/repos/os/recipes/src/clipboard/hash +++ b/repos/os/recipes/src/clipboard/hash @@ -1 +1 @@ -2022-10-11 cebcb310ae5674cac9a096bbba9f1688315ab9f2 +2022-11-16 37a72aa0f666a37c0a07c119a3ae929070ad3e8e diff --git a/repos/os/recipes/src/cpu_balancer/hash b/repos/os/recipes/src/cpu_balancer/hash index 88222d6630..c6801e28a8 100644 --- a/repos/os/recipes/src/cpu_balancer/hash +++ b/repos/os/recipes/src/cpu_balancer/hash @@ -1 +1 @@ -2022-10-11 40e6f50ed41ff3b4aaf2a97ccd9bdcda205a4426 +2022-11-16 1be7c7edeb1287e9994c07942d63c695eb6152be diff --git a/repos/os/recipes/src/cpu_burner/hash b/repos/os/recipes/src/cpu_burner/hash index da5b30404a..bc06739200 100644 --- a/repos/os/recipes/src/cpu_burner/hash +++ b/repos/os/recipes/src/cpu_burner/hash @@ -1 +1 @@ -2022-10-11 a9c8e0a23366e43bc54d7dca8cd54bf6cf738f77 +2022-11-16 4a16f72156c04c10b83a4020720ed0ecaa71c3e7 diff --git a/repos/os/recipes/src/dummy/hash b/repos/os/recipes/src/dummy/hash index 66dde21aea..d3453d6868 100644 --- a/repos/os/recipes/src/dummy/hash +++ b/repos/os/recipes/src/dummy/hash @@ -1 +1 @@ -2022-10-11 71455f41edc47cdb10f6dc0757c7574c9e3683fa +2022-11-16 7716d42f6e8c8de78c6e88743836dfa98e13c904 diff --git a/repos/os/recipes/src/dummy_rtc_drv/hash b/repos/os/recipes/src/dummy_rtc_drv/hash index 64ce01b3fe..675f45fbc9 100644 --- a/repos/os/recipes/src/dummy_rtc_drv/hash +++ b/repos/os/recipes/src/dummy_rtc_drv/hash @@ -1 +1 @@ -2022-10-11 73b82e3423e8b7edf41057dabd171ece07d492e3 +2022-11-16 9deb68e42dd4a3d17ad8c3afbcdf1b39eb6e3eb3 diff --git a/repos/os/recipes/src/dynamic_rom/hash b/repos/os/recipes/src/dynamic_rom/hash index 2aeb34d298..745e5e37b3 100644 --- a/repos/os/recipes/src/dynamic_rom/hash +++ b/repos/os/recipes/src/dynamic_rom/hash @@ -1 +1 @@ -2022-10-11 b6004adc3e1fe3ebdce593dad14801c4e22c0694 +2022-11-16 975a4079b87a3a9ec7ed2559a860fd477094a2f4 diff --git a/repos/os/recipes/src/event_filter/hash b/repos/os/recipes/src/event_filter/hash index 1753fed14a..d057b247c3 100644 --- a/repos/os/recipes/src/event_filter/hash +++ b/repos/os/recipes/src/event_filter/hash @@ -1 +1 @@ -2022-10-11 b1761ae7399d467577f794d24deca5399b7915a1 +2022-11-16 cef34a4386c92759d2a9f5b5716ce6d5aac8c540 diff --git a/repos/os/recipes/src/fb_sdl/hash b/repos/os/recipes/src/fb_sdl/hash index 1fd12104b9..e5792d48c5 100644 --- a/repos/os/recipes/src/fb_sdl/hash +++ b/repos/os/recipes/src/fb_sdl/hash @@ -1 +1 @@ -2022-10-11 21da60c780a4cec8c2066d13fbc2685eb4b3a866 +2022-11-16 4e1ef82cc38cc920f282cea3d2f1645b9064f93c diff --git a/repos/os/recipes/src/fs_report/hash b/repos/os/recipes/src/fs_report/hash index 10c4999885..d3f257153b 100644 --- a/repos/os/recipes/src/fs_report/hash +++ b/repos/os/recipes/src/fs_report/hash @@ -1 +1 @@ -2022-10-11 82beab5b9f03b106b9df24e8ebda58520e64ae58 +2022-11-16 74ce0dfdc20b4eff12e176300b1f6686eb7992ca diff --git a/repos/os/recipes/src/fs_rom/hash b/repos/os/recipes/src/fs_rom/hash index 1bc319652d..e3ff0d74eb 100644 --- a/repos/os/recipes/src/fs_rom/hash +++ b/repos/os/recipes/src/fs_rom/hash @@ -1 +1 @@ -2022-10-11 9358d50551dabbf2eb0c2c7c32f11204f7cfc024 +2022-11-16 4887e5c5a33845f325d6cace9594d687341f154e diff --git a/repos/os/recipes/src/global_keys_handler/hash b/repos/os/recipes/src/global_keys_handler/hash index 5b724175db..400a176207 100644 --- a/repos/os/recipes/src/global_keys_handler/hash +++ b/repos/os/recipes/src/global_keys_handler/hash @@ -1 +1 @@ -2022-10-11 368fa1b3dddff106c67458cb68ab7ab552aa0618 +2022-11-16 c8ea0393c538667842d500f7102956d58f7d27f3 diff --git a/repos/os/recipes/src/gui_fb/hash b/repos/os/recipes/src/gui_fb/hash index c01a8db0f3..78fc8ec609 100644 --- a/repos/os/recipes/src/gui_fb/hash +++ b/repos/os/recipes/src/gui_fb/hash @@ -1 +1 @@ -2022-10-11 ac109767621e92a3794d715e4ca10cf6231f92ce +2022-11-16 eabe1def1836152ee52406493be1929e135525fe diff --git a/repos/os/recipes/src/init/hash b/repos/os/recipes/src/init/hash index 7c42efbe67..e107c76913 100644 --- a/repos/os/recipes/src/init/hash +++ b/repos/os/recipes/src/init/hash @@ -1 +1 @@ -2022-10-11 605688d1c4ecc12497b9a60538ff07fbfb904fc6 +2022-11-16 be46e7714a48962b7570660fcafbd9ce6cd21249 diff --git a/repos/os/recipes/src/input_event_bridge/hash b/repos/os/recipes/src/input_event_bridge/hash index f70a39c7bd..71967fd4cc 100644 --- a/repos/os/recipes/src/input_event_bridge/hash +++ b/repos/os/recipes/src/input_event_bridge/hash @@ -1 +1 @@ -2022-10-11 c702cb6d81359af2ec072e77957224b9aa007c24 +2022-11-16 7142a76650e6e25d3f9325832249f091ad145294 diff --git a/repos/os/recipes/src/intel_gpu_drv/hash b/repos/os/recipes/src/intel_gpu_drv/hash index b7f3ddf053..aacf14bb3d 100644 --- a/repos/os/recipes/src/intel_gpu_drv/hash +++ b/repos/os/recipes/src/intel_gpu_drv/hash @@ -1 +1 @@ -2022-10-11 0dc53728a22cf380185a81bfc11881cebf1b7430 +2022-11-16 86eca01ca5ed4d9eaf31f061f91cef16a7eba00e diff --git a/repos/os/recipes/src/lan9118_nic_drv/hash b/repos/os/recipes/src/lan9118_nic_drv/hash index 2f6ba73523..575543b3ba 100644 --- a/repos/os/recipes/src/lan9118_nic_drv/hash +++ b/repos/os/recipes/src/lan9118_nic_drv/hash @@ -1 +1 @@ -2022-10-11 cf22a7cb41f15854a45c6a80ce068e13644c7133 +2022-11-16 cff1a8d8268bbf6d1742a976847049fd6fbfbf94 diff --git a/repos/os/recipes/src/linux_nic_drv/hash b/repos/os/recipes/src/linux_nic_drv/hash index 50491f70fa..3ff77843cb 100644 --- a/repos/os/recipes/src/linux_nic_drv/hash +++ b/repos/os/recipes/src/linux_nic_drv/hash @@ -1 +1 @@ -2022-10-11 660b73eccbf6ca293d6b2f3162030eb3db84dc4a +2022-11-16 d74c8dd70eaf3e3c55967d2b8c05e850be8101f3 diff --git a/repos/os/recipes/src/linux_rtc_drv/hash b/repos/os/recipes/src/linux_rtc_drv/hash index 463cfaec12..adaefe3d1d 100644 --- a/repos/os/recipes/src/linux_rtc_drv/hash +++ b/repos/os/recipes/src/linux_rtc_drv/hash @@ -1 +1 @@ -2022-10-11 33ce5984090693c657e2561a73f25a0cc72b5432 +2022-11-16 bef05989be2bc27c0b327fb2cefcba259bc1c735 diff --git a/repos/os/recipes/src/loader/hash b/repos/os/recipes/src/loader/hash index bbe45b1ed6..5446730ce9 100644 --- a/repos/os/recipes/src/loader/hash +++ b/repos/os/recipes/src/loader/hash @@ -1 +1 @@ -2022-10-11 a2daddeddff06de347a5cb6ef182f3a83d406245 +2022-11-16 808654f41ea7231ea64f6348c73d9840a35102d7 diff --git a/repos/os/recipes/src/log_core/hash b/repos/os/recipes/src/log_core/hash index 6a8ed5774b..a0fa11f801 100644 --- a/repos/os/recipes/src/log_core/hash +++ b/repos/os/recipes/src/log_core/hash @@ -1 +1 @@ -2022-10-11 cb9e12dfc72a03387476f61ed8c840673e750900 +2022-11-16 8855930bf31217e105d90139fde16df73ae02aa3 diff --git a/repos/os/recipes/src/log_terminal/hash b/repos/os/recipes/src/log_terminal/hash index a986d7b9c1..23c258045e 100644 --- a/repos/os/recipes/src/log_terminal/hash +++ b/repos/os/recipes/src/log_terminal/hash @@ -1 +1 @@ -2022-10-11 aa500b712f0b435cb8f42f825c407cb26d65ac0d +2022-11-16 c26724a2d43f25cc96f1c707b56fde2c839fd34b diff --git a/repos/os/recipes/src/lx_block/hash b/repos/os/recipes/src/lx_block/hash index d798f6054c..b8d6eb92d6 100644 --- a/repos/os/recipes/src/lx_block/hash +++ b/repos/os/recipes/src/lx_block/hash @@ -1 +1 @@ -2022-10-11 7791c681a8b2af7b687145f0cf9203f26b54ed70 +2022-11-16 544f4b1a9d8fb1749590b672a8143f8bf94a99a7 diff --git a/repos/os/recipes/src/lx_fs/hash b/repos/os/recipes/src/lx_fs/hash index 3817301587..4862f35b84 100644 --- a/repos/os/recipes/src/lx_fs/hash +++ b/repos/os/recipes/src/lx_fs/hash @@ -1 +1 @@ -2022-10-11 2849a6b5e48bf31f188ae7191e08d9515efc8073 +2022-11-16 a3820f9344ee112f6d964dce4eb3ed0a8ceab35a diff --git a/repos/os/recipes/src/mixer/hash b/repos/os/recipes/src/mixer/hash index 233702b04f..a946876ff1 100644 --- a/repos/os/recipes/src/mixer/hash +++ b/repos/os/recipes/src/mixer/hash @@ -1 +1 @@ -2022-10-11 c189e802f0b23452b5c952d49f518bc9e0e7637b +2022-11-16 54d0296a6c583b23fbeb245cea09a459dd37ad4f diff --git a/repos/os/recipes/src/nic_bridge/hash b/repos/os/recipes/src/nic_bridge/hash index 8fdc6e89bb..1265369149 100644 --- a/repos/os/recipes/src/nic_bridge/hash +++ b/repos/os/recipes/src/nic_bridge/hash @@ -1 +1 @@ -2022-10-11 9e0177577eb19bef0558332d742259d710ea066b +2022-11-16 e5ee91c09ad99ad7c8f070976ef7453153ad39ec diff --git a/repos/os/recipes/src/nic_loopback/hash b/repos/os/recipes/src/nic_loopback/hash index 6a0013db6f..096bc77a57 100644 --- a/repos/os/recipes/src/nic_loopback/hash +++ b/repos/os/recipes/src/nic_loopback/hash @@ -1 +1 @@ -2022-10-11 257044c9db6cd651c714a79bb29072f34c764d33 +2022-11-16 999bb6900324b1902454210194c56d0ef26b0956 diff --git a/repos/os/recipes/src/nic_perf/hash b/repos/os/recipes/src/nic_perf/hash index 6527662bd8..4cac38fa29 100644 --- a/repos/os/recipes/src/nic_perf/hash +++ b/repos/os/recipes/src/nic_perf/hash @@ -1 +1 @@ -2022-10-11 757ee083a110c637ae6b82058b73d0f3bc7ac245 +2022-11-16 5fff140f05f1981ac4a0d59c4a50a546f45cd0e2 diff --git a/repos/os/recipes/src/nic_router/hash b/repos/os/recipes/src/nic_router/hash index 154b25631d..d7fe041e4e 100644 --- a/repos/os/recipes/src/nic_router/hash +++ b/repos/os/recipes/src/nic_router/hash @@ -1 +1 @@ -2022-10-13 3fb16b7db3e03ca4ab82ff9f6672eeb455f8c3f1 +2022-11-16 e8db3112d8763b7e6b215c9c7a359610a8f8f042 diff --git a/repos/os/recipes/src/nit_focus/hash b/repos/os/recipes/src/nit_focus/hash index d18421241b..859a8c31df 100644 --- a/repos/os/recipes/src/nit_focus/hash +++ b/repos/os/recipes/src/nit_focus/hash @@ -1 +1 @@ -2022-10-11 b0579dd9fae4ad62119a4800ba93c6f20928ea3e +2022-11-16 58ea820d2cb00233535f248cd8d517e09e8ab9c1 diff --git a/repos/os/recipes/src/nitpicker/hash b/repos/os/recipes/src/nitpicker/hash index a5ae468ad0..6a86b2897d 100644 --- a/repos/os/recipes/src/nitpicker/hash +++ b/repos/os/recipes/src/nitpicker/hash @@ -1 +1 @@ -2022-10-11 8f6b75a88d34b0ff2c14510900224e5a30574edb +2022-11-16 b4e5b18553c1497d16e8d8ebfb4800a609a18cd2 diff --git a/repos/os/recipes/src/nvme_drv/hash b/repos/os/recipes/src/nvme_drv/hash index 6e482c0dda..8f43d48416 100644 --- a/repos/os/recipes/src/nvme_drv/hash +++ b/repos/os/recipes/src/nvme_drv/hash @@ -1 +1 @@ -2022-10-11 1745aaed73094365ab6ec8f804d20293c3ec1856 +2022-11-16 eb8810a4b3c35be517561b5aeec2df146f24b684 diff --git a/repos/os/recipes/src/part_block/hash b/repos/os/recipes/src/part_block/hash index b3976d103b..6dacb155f7 100644 --- a/repos/os/recipes/src/part_block/hash +++ b/repos/os/recipes/src/part_block/hash @@ -1 +1 @@ -2022-10-11 43dc37fb7b2a4de45d318e58cadcdf9108353f94 +2022-11-16 87b094e45d1c668f46ecc808ccd8fbbbab3b4739 diff --git a/repos/os/recipes/src/pbxa9_drivers/hash b/repos/os/recipes/src/pbxa9_drivers/hash index dc77a5e995..890194cd22 100644 --- a/repos/os/recipes/src/pbxa9_drivers/hash +++ b/repos/os/recipes/src/pbxa9_drivers/hash @@ -1 +1 @@ -2022-10-11 4de1f028c228a3baf2644c69344b6127042aa2b1 +2022-11-16 dca6c21cf88e6870db0b5d3f3cce674a5c7fbde0 diff --git a/repos/os/recipes/src/pci_decode/hash b/repos/os/recipes/src/pci_decode/hash index 8765ce7029..8723dd9835 100644 --- a/repos/os/recipes/src/pci_decode/hash +++ b/repos/os/recipes/src/pci_decode/hash @@ -1 +1 @@ -2022-10-11 c5a093ad45d20f407fdc58bc129003216e9ea890 +2022-11-16 7183f9f8b0ed4aa69395a15849edaed80c02c857 diff --git a/repos/os/recipes/src/platform_drv/hash b/repos/os/recipes/src/platform_drv/hash index adf10f1c19..e550b42ea3 100644 --- a/repos/os/recipes/src/platform_drv/hash +++ b/repos/os/recipes/src/platform_drv/hash @@ -1 +1 @@ -2022-10-11 66e7c8c6b35a2b4dcd1d881568992bd8400983d8 +2022-11-16 032060e97c17cb2a0d9e6e229f0ca6c69ef21615 diff --git a/repos/os/recipes/src/ps2_drv/hash b/repos/os/recipes/src/ps2_drv/hash index e93a642d76..4214a26918 100644 --- a/repos/os/recipes/src/ps2_drv/hash +++ b/repos/os/recipes/src/ps2_drv/hash @@ -1 +1 @@ -2022-10-11 c3ab14b58d2cfd217c360e36f9af4432b979bb7f +2022-11-16 fa55b674b2afbedc5ad11c03e240495cda1000b0 diff --git a/repos/os/recipes/src/report_rom/hash b/repos/os/recipes/src/report_rom/hash index 3e97941fd3..dbd516a212 100644 --- a/repos/os/recipes/src/report_rom/hash +++ b/repos/os/recipes/src/report_rom/hash @@ -1 +1 @@ -2022-10-11 831a60dc7eef884a4edbb6226b3d5d6a23195e3c +2022-11-16 417ef148fb5c72c9689ea61c7ca3dffcd92d81c5 diff --git a/repos/os/recipes/src/rom_filter/hash b/repos/os/recipes/src/rom_filter/hash index 20b25f7c9c..795ae49b57 100644 --- a/repos/os/recipes/src/rom_filter/hash +++ b/repos/os/recipes/src/rom_filter/hash @@ -1 +1 @@ -2022-10-11 4127584c22b8b59577a32fe71cab3f6e9435eba2 +2022-11-16 28ebc095492d5fca03b335803f54298ff398f3c1 diff --git a/repos/os/recipes/src/rom_reporter/hash b/repos/os/recipes/src/rom_reporter/hash index 043de8c1e9..ab28caf0a1 100644 --- a/repos/os/recipes/src/rom_reporter/hash +++ b/repos/os/recipes/src/rom_reporter/hash @@ -1 +1 @@ -2022-10-11 1c57ce6783fcafc2a8c708e7835c351e158ec055 +2022-11-16 ec4eff34ffd86fe6ed05128a9c52f34f8ecdf803 diff --git a/repos/os/recipes/src/rom_to_file/hash b/repos/os/recipes/src/rom_to_file/hash index 6183f726b1..7201e9a5a2 100644 --- a/repos/os/recipes/src/rom_to_file/hash +++ b/repos/os/recipes/src/rom_to_file/hash @@ -1 +1 @@ -2022-10-11 0f1d82e4fc126d38db9e2996b109506e5ccb72ba +2022-11-16 217eacc4e1bc5612eaac1db8e166fd02c8c40132 diff --git a/repos/os/recipes/src/rtc_drv/hash b/repos/os/recipes/src/rtc_drv/hash index aba42aee83..01f45be4b4 100644 --- a/repos/os/recipes/src/rtc_drv/hash +++ b/repos/os/recipes/src/rtc_drv/hash @@ -1 +1 @@ -2022-10-11 0e17ab580579fbac952fd3355931cff6e63d930a +2022-11-16 68b95cd09e62ec053f655b2fabd4ab7773501b52 diff --git a/repos/os/recipes/src/sandbox/hash b/repos/os/recipes/src/sandbox/hash index 498d0a3710..208cea54e9 100644 --- a/repos/os/recipes/src/sandbox/hash +++ b/repos/os/recipes/src/sandbox/hash @@ -1 +1 @@ -2022-10-11 8b913decfc5235d73021901c19b5f5ed4c5f8050 +2022-11-16 1ddc82237897e8fd1bb621112739063607d53794 diff --git a/repos/os/recipes/src/sequence/hash b/repos/os/recipes/src/sequence/hash index 5673e1ac47..91db6aeacd 100644 --- a/repos/os/recipes/src/sequence/hash +++ b/repos/os/recipes/src/sequence/hash @@ -1 +1 @@ -2022-10-11 7e245128c005cbde72463a0f8d9fd255e9ad7bef +2022-11-16 084dae7a6695f793205cc72a02622d2c91bfb509 diff --git a/repos/os/recipes/src/terminal_crosslink/hash b/repos/os/recipes/src/terminal_crosslink/hash index 4d44344be6..a1e924090f 100644 --- a/repos/os/recipes/src/terminal_crosslink/hash +++ b/repos/os/recipes/src/terminal_crosslink/hash @@ -1 +1 @@ -2022-10-11 02d81f1159bbcc9478d7ed1c075c59a7a0ed53db +2022-11-16 8b89f055caf9f0ad0a6d7a25a272bb5ce9e98f42 diff --git a/repos/os/recipes/src/terminal_log/hash b/repos/os/recipes/src/terminal_log/hash index d82c2a5710..ab327dba50 100644 --- a/repos/os/recipes/src/terminal_log/hash +++ b/repos/os/recipes/src/terminal_log/hash @@ -1 +1 @@ -2022-10-11 c440470a248b9ba3f3d311661925d66f7b2a10c7 +2022-11-16 4a61c707b8add203e74db112b3d3fc0136efbc08 diff --git a/repos/os/recipes/src/test-black_hole/hash b/repos/os/recipes/src/test-black_hole/hash index f2b4e5f8c9..247a8755ab 100644 --- a/repos/os/recipes/src/test-black_hole/hash +++ b/repos/os/recipes/src/test-black_hole/hash @@ -1 +1 @@ -2022-10-11 7c24f7278c21d5940555daf55d015686a11ad967 +2022-11-16 fbda522796b584f1ef860c876e04ae322cf38678 diff --git a/repos/os/recipes/src/test-bomb/hash b/repos/os/recipes/src/test-bomb/hash index 575d7c67d3..21739a2caa 100644 --- a/repos/os/recipes/src/test-bomb/hash +++ b/repos/os/recipes/src/test-bomb/hash @@ -1 +1 @@ -2022-10-11 e00c030976f304ea2a549a7173293061ac7d8e5b +2022-11-16 ea9d29e54f4dd69219c99d4a6e669ed6a039ae52 diff --git a/repos/os/recipes/src/test-capture/hash b/repos/os/recipes/src/test-capture/hash index 2472a38cb0..99292521f4 100644 --- a/repos/os/recipes/src/test-capture/hash +++ b/repos/os/recipes/src/test-capture/hash @@ -1 +1 @@ -2022-10-11 1c41dfc307702b545b26bec7970a1dd5fc9aff17 +2022-11-16 3fd676f043019dd507481fd4f79c4b17f0e9e1af diff --git a/repos/os/recipes/src/test-clipboard/hash b/repos/os/recipes/src/test-clipboard/hash index a54e3b97e2..d0061cfbea 100644 --- a/repos/os/recipes/src/test-clipboard/hash +++ b/repos/os/recipes/src/test-clipboard/hash @@ -1 +1 @@ -2022-10-11 f19cacaaca8997bbe1709d6c682db9791938f53f +2022-11-16 56defead95063caa35ebc4207976de8d728779c6 diff --git a/repos/os/recipes/src/test-dynamic_config/hash b/repos/os/recipes/src/test-dynamic_config/hash index a691607f38..b0af598bd7 100644 --- a/repos/os/recipes/src/test-dynamic_config/hash +++ b/repos/os/recipes/src/test-dynamic_config/hash @@ -1 +1 @@ -2022-10-11 cc09b228062e72e7018d9da06ea3aa2b7269a8a3 +2022-11-16 8ed10f9f8c7eae93054fdb8659f6f6b57d94b8bf diff --git a/repos/os/recipes/src/test-fault_detection/hash b/repos/os/recipes/src/test-fault_detection/hash index bf7769374f..cf17fc6e1c 100644 --- a/repos/os/recipes/src/test-fault_detection/hash +++ b/repos/os/recipes/src/test-fault_detection/hash @@ -1 +1 @@ -2022-10-11 4fc59ce6c20619ec9f4aee7d5ba067bd1c55021b +2022-11-16 4611f86b20437a85d2396dabb2f15e069658dc40 diff --git a/repos/os/recipes/src/test-fs_packet/hash b/repos/os/recipes/src/test-fs_packet/hash index 4163823a7d..437550dd56 100644 --- a/repos/os/recipes/src/test-fs_packet/hash +++ b/repos/os/recipes/src/test-fs_packet/hash @@ -1 +1 @@ -2022-10-11 91d8adce148627b3edc97a3ac76927942947fd13 +2022-11-16 6638b77cf793c24cb060e965d9cf6a526081cf71 diff --git a/repos/os/recipes/src/test-fs_report/hash b/repos/os/recipes/src/test-fs_report/hash index f94b3fd718..6029d1d837 100644 --- a/repos/os/recipes/src/test-fs_report/hash +++ b/repos/os/recipes/src/test-fs_report/hash @@ -1 +1 @@ -2022-10-11 5036e9b14e875ac85a472c4b89b2532a681515fe +2022-11-16 81d9a9795f448a007db159bb49de03c1b59c1e49 diff --git a/repos/os/recipes/src/test-init/hash b/repos/os/recipes/src/test-init/hash index 94741ff002..d60ce0bcfd 100644 --- a/repos/os/recipes/src/test-init/hash +++ b/repos/os/recipes/src/test-init/hash @@ -1 +1 @@ -2022-10-11 ce6285b1ab01445b506024c4c32a2fe1cadac23d +2022-11-16 2da369d3f7263e834428ca0f7d569ab04dc47dc9 diff --git a/repos/os/recipes/src/test-init_loop/hash b/repos/os/recipes/src/test-init_loop/hash index 8da6e90a3c..7f7b9acd94 100644 --- a/repos/os/recipes/src/test-init_loop/hash +++ b/repos/os/recipes/src/test-init_loop/hash @@ -1 +1 @@ -2022-10-11 8848321913f52ed40c54cf168718c2ac5e528f8c +2022-11-16 fd40817a4a5f7ac04bcfe94dee2977644d89007f diff --git a/repos/os/recipes/src/test-nic_loopback/hash b/repos/os/recipes/src/test-nic_loopback/hash index 10b79e1d94..bb9c768247 100644 --- a/repos/os/recipes/src/test-nic_loopback/hash +++ b/repos/os/recipes/src/test-nic_loopback/hash @@ -1 +1 @@ -2022-10-11 632494bcde32aa6c0b07d509d904f936a6ef9c43 +2022-11-16 35269d6f38b1e2de16e09683f6a27d7a1515fd39 diff --git a/repos/os/recipes/src/test-ram_fs_chunk/hash b/repos/os/recipes/src/test-ram_fs_chunk/hash index f34022e05f..b1745a0965 100644 --- a/repos/os/recipes/src/test-ram_fs_chunk/hash +++ b/repos/os/recipes/src/test-ram_fs_chunk/hash @@ -1 +1 @@ -2022-10-11 1b7e381425e9ec734e20ca68a8ca35c933967f2b +2022-11-16 058c30eff9a6e13c7ccf0bc586be8034b4f4d1a0 diff --git a/repos/os/recipes/src/test-report_rom/hash b/repos/os/recipes/src/test-report_rom/hash index ed896442dd..809f536e4e 100644 --- a/repos/os/recipes/src/test-report_rom/hash +++ b/repos/os/recipes/src/test-report_rom/hash @@ -1 +1 @@ -2022-10-11 93833d0d1cf6a19e38241cb4300b29529236ca75 +2022-11-16 d42edb5f8b14b0a3a105501b09c0c3d74b00e786 diff --git a/repos/os/recipes/src/test-resource_request/hash b/repos/os/recipes/src/test-resource_request/hash index 82980c626b..6e0525ade1 100644 --- a/repos/os/recipes/src/test-resource_request/hash +++ b/repos/os/recipes/src/test-resource_request/hash @@ -1 +1 @@ -2022-10-11 d04d83b10577aaf26043393c654fccadfb65ffb0 +2022-11-16 866f239ad4f781aeaaa280830d982d0125a9b23e diff --git a/repos/os/recipes/src/test-resource_yield/hash b/repos/os/recipes/src/test-resource_yield/hash index 9b978917d6..e18a1f1242 100644 --- a/repos/os/recipes/src/test-resource_yield/hash +++ b/repos/os/recipes/src/test-resource_yield/hash @@ -1 +1 @@ -2022-10-11 a514a8d94fab7060669ced14ea2e58a244791989 +2022-11-16 22ab8616ac7ba9b64de1c406276470ccb35ebe47 diff --git a/repos/os/recipes/src/test-rtc/hash b/repos/os/recipes/src/test-rtc/hash index aac14704d0..4f90a8fa37 100644 --- a/repos/os/recipes/src/test-rtc/hash +++ b/repos/os/recipes/src/test-rtc/hash @@ -1 +1 @@ -2022-10-11 945d51546f25976da522ced39e52452fc3a9504d +2022-11-16 c7c07d1c79bdddf72db1baff7819d243f676fbc1 diff --git a/repos/os/recipes/src/test-sandbox/hash b/repos/os/recipes/src/test-sandbox/hash index 585d0aaa31..1db0070032 100644 --- a/repos/os/recipes/src/test-sandbox/hash +++ b/repos/os/recipes/src/test-sandbox/hash @@ -1 +1 @@ -2022-10-11 2a88b8be0637628801db56c141938de2b9e954b5 +2022-11-16 c3410d2c6db9d7f09d57c4339705cbb8b44f4b1b diff --git a/repos/os/recipes/src/test-signal/hash b/repos/os/recipes/src/test-signal/hash index 6ba4b1566e..220dd335ef 100644 --- a/repos/os/recipes/src/test-signal/hash +++ b/repos/os/recipes/src/test-signal/hash @@ -1 +1 @@ -2022-10-11 eeb7e45485768e3a2d8d40e7f398cb0bbb75fc07 +2022-11-16 99ee51a44cb9df88cf1af591c639ddf3cfcb421b diff --git a/repos/os/recipes/src/test-slab/hash b/repos/os/recipes/src/test-slab/hash index 15d0971254..c54bcb3620 100644 --- a/repos/os/recipes/src/test-slab/hash +++ b/repos/os/recipes/src/test-slab/hash @@ -1 +1 @@ -2022-10-11 86cad05d7a49d815f0051f95a23b15d24dc90fe6 +2022-11-16 ab976fcae5854d4fb38aacab8c3e99115814bde4 diff --git a/repos/os/recipes/src/test-terminal_crosslink/hash b/repos/os/recipes/src/test-terminal_crosslink/hash index 33b0b225e4..91c18e284c 100644 --- a/repos/os/recipes/src/test-terminal_crosslink/hash +++ b/repos/os/recipes/src/test-terminal_crosslink/hash @@ -1 +1 @@ -2022-10-11 6d50dc56306af1ef5257e60b1e774a4d80045c2f +2022-11-16 3f7c502a2c68c499883328784f0bc5b51540b7da diff --git a/repos/os/recipes/src/test-trace/hash b/repos/os/recipes/src/test-trace/hash index 78e061fb86..41d0ec6342 100644 --- a/repos/os/recipes/src/test-trace/hash +++ b/repos/os/recipes/src/test-trace/hash @@ -1 +1 @@ -2022-10-11 c5be43b3072b4b0ba38b010ae408942009c18ff2 +2022-11-16 7f0cd50667884b345ab4bbb90ddfd95a4b57c45c diff --git a/repos/os/recipes/src/test-trace_buffer/hash b/repos/os/recipes/src/test-trace_buffer/hash index 25a132d7ac..faecbff7a5 100644 --- a/repos/os/recipes/src/test-trace_buffer/hash +++ b/repos/os/recipes/src/test-trace_buffer/hash @@ -1 +1 @@ -2022-10-11 4e12417721def36da1fd7d710c8a3edb46f32ed7 +2022-11-16 97972fd6977b891ef69a8634b2eed8b8d12149ec diff --git a/repos/os/recipes/src/test-trace_logger/hash b/repos/os/recipes/src/test-trace_logger/hash index 32a3db1542..6378ff01f7 100644 --- a/repos/os/recipes/src/test-trace_logger/hash +++ b/repos/os/recipes/src/test-trace_logger/hash @@ -1 +1 @@ -2022-10-11 b08b4306d9974d28f1279d5218c157311e2400f8 +2022-11-16 d329cd6bfb9b5a154a26a100d984f805e922ab40 diff --git a/repos/os/recipes/src/test-utf8/hash b/repos/os/recipes/src/test-utf8/hash index 80dae7d33f..584175c562 100644 --- a/repos/os/recipes/src/test-utf8/hash +++ b/repos/os/recipes/src/test-utf8/hash @@ -1 +1 @@ -2022-10-11 289dd5465cccbb92017488e556308d1662dfecff +2022-11-16 ea22601226c18b8db70ad531640aa50445fa683b diff --git a/repos/os/recipes/src/test-vfs_capture/hash b/repos/os/recipes/src/test-vfs_capture/hash index 3cb46cd1e5..574b73ae1b 100644 --- a/repos/os/recipes/src/test-vfs_capture/hash +++ b/repos/os/recipes/src/test-vfs_capture/hash @@ -1 +1 @@ -2022-10-11 a39d9a3c730dee74a3100069badf459bd6e78328 +2022-11-16 be8a641f13caa23f4d8422b42530186c0851ab99 diff --git a/repos/os/recipes/src/test-vfs_stress/hash b/repos/os/recipes/src/test-vfs_stress/hash index 8f3a15bf4c..5004bfb8d8 100644 --- a/repos/os/recipes/src/test-vfs_stress/hash +++ b/repos/os/recipes/src/test-vfs_stress/hash @@ -1 +1 @@ -2022-10-11 a201fde7cc23c0942431fa8d7a6d57a5501d7126 +2022-11-16 5b2479de637f54493878337d681e26698bfe131d diff --git a/repos/os/recipes/src/test-weak_ptr/hash b/repos/os/recipes/src/test-weak_ptr/hash index 6a7cae940a..671492e1fa 100644 --- a/repos/os/recipes/src/test-weak_ptr/hash +++ b/repos/os/recipes/src/test-weak_ptr/hash @@ -1 +1 @@ -2022-10-11 ac4ba4301657310608a2ba4e6081f1a78da6a05d +2022-11-16 3a2ee7f23f5e8f3041749945bfa86f02a97adcc9 diff --git a/repos/os/recipes/src/top/hash b/repos/os/recipes/src/top/hash index a843181d6b..6d43e60b3f 100644 --- a/repos/os/recipes/src/top/hash +++ b/repos/os/recipes/src/top/hash @@ -1 +1 @@ -2022-10-11 7e4c13346add57c5753c9810ff7f8c7b02060751 +2022-11-16 5070cc036bdedcb69a674a5d876c0ee8ec321a66 diff --git a/repos/os/recipes/src/trace_logger/hash b/repos/os/recipes/src/trace_logger/hash index 71853e4125..9231188672 100644 --- a/repos/os/recipes/src/trace_logger/hash +++ b/repos/os/recipes/src/trace_logger/hash @@ -1 +1 @@ -2022-10-11 9aab8773d2ff92fae541b59a3d276b39b69fa943 +2022-11-16 c35741d4dc1cd0ef9380311032f01a3221d2db65 diff --git a/repos/os/recipes/src/trace_policy/hash b/repos/os/recipes/src/trace_policy/hash index bb5efe9f1b..9066ab103e 100644 --- a/repos/os/recipes/src/trace_policy/hash +++ b/repos/os/recipes/src/trace_policy/hash @@ -1 +1 @@ -2022-10-11 5c4a83aeef4e52061da34644db8c3ec404214efd +2022-11-16 e9e0b832978c982be7dffc985162578f1da3dab0 diff --git a/repos/os/recipes/src/trace_subject_reporter/hash b/repos/os/recipes/src/trace_subject_reporter/hash index 57dd9a05f9..d335186554 100644 --- a/repos/os/recipes/src/trace_subject_reporter/hash +++ b/repos/os/recipes/src/trace_subject_reporter/hash @@ -1 +1 @@ -2022-10-11 85aad43b6815e90f12ddf1b87a902c335ef0704d +2022-11-16 6b18210f513cefbaff2f7b37b64ba8ca993ac861 diff --git a/repos/os/recipes/src/usb_block_drv/hash b/repos/os/recipes/src/usb_block_drv/hash index 75319b2aeb..cd9d77b3cb 100644 --- a/repos/os/recipes/src/usb_block_drv/hash +++ b/repos/os/recipes/src/usb_block_drv/hash @@ -1 +1 @@ -2022-10-11 0af1f69552a93148bebdc36d89d4535c72abe16b +2022-11-16 9fa09f8fc7c1742a8adede5305da0a3f2b8caf5a diff --git a/repos/os/recipes/src/vfs/hash b/repos/os/recipes/src/vfs/hash index b9787897b9..05197b184e 100644 --- a/repos/os/recipes/src/vfs/hash +++ b/repos/os/recipes/src/vfs/hash @@ -1 +1 @@ -2022-10-11 e528b11dabfa358cc99c145c15036b03adcf63dd +2022-11-16 3e3df722643f376c88f373816d7106b21ac14af0 diff --git a/repos/os/recipes/src/vfs_block/hash b/repos/os/recipes/src/vfs_block/hash index 106b09df89..863af22f72 100644 --- a/repos/os/recipes/src/vfs_block/hash +++ b/repos/os/recipes/src/vfs_block/hash @@ -1 +1 @@ -2022-10-11 88697e51d1a6d319caeacb435d1106086b25b6f9 +2022-11-16 96e834731ecc65ec6326ea9e01fac3a810f7e92f diff --git a/repos/os/recipes/src/vfs_capture/hash b/repos/os/recipes/src/vfs_capture/hash index c6d73d9dbe..7c9c7b6302 100644 --- a/repos/os/recipes/src/vfs_capture/hash +++ b/repos/os/recipes/src/vfs_capture/hash @@ -1 +1 @@ -2022-10-11 f334596c5101f31c2c79fc6cfd1fcd8ad9acaef1 +2022-11-16 d6f9166b21a9abdeee98b36486a93066761073eb diff --git a/repos/os/recipes/src/vfs_tap/hash b/repos/os/recipes/src/vfs_tap/hash index 77f448acb2..64fc52135c 100644 --- a/repos/os/recipes/src/vfs_tap/hash +++ b/repos/os/recipes/src/vfs_tap/hash @@ -1 +1 @@ -2022-10-11 e3715852e3429eb2c809dc8712d9aaffe1892e89 +2022-11-16 91ee5b57e9f0c30c64fcafbf1b93df58ae2b1512 diff --git a/repos/os/recipes/src/virt_qemu_drivers/hash b/repos/os/recipes/src/virt_qemu_drivers/hash index 26e58b7c8a..a9c21456e1 100644 --- a/repos/os/recipes/src/virt_qemu_drivers/hash +++ b/repos/os/recipes/src/virt_qemu_drivers/hash @@ -1 +1 @@ -2022-10-11 c63b9056079a4b29c8e30b2f716278eaafd723ce +2022-11-16 f0244f5f25821e153a042c965018c8b2833176e5 diff --git a/repos/os/recipes/src/virtdev_rom/hash b/repos/os/recipes/src/virtdev_rom/hash index 4dbef8d666..d7b71ea89f 100644 --- a/repos/os/recipes/src/virtdev_rom/hash +++ b/repos/os/recipes/src/virtdev_rom/hash @@ -1 +1 @@ -2022-10-11 293794c814bca8b0f45cea1ce89c740abc08fdbf +2022-11-16 f757d60a2e7fc04e35e2883e6122b58d5f352f36 diff --git a/repos/os/recipes/src/virtio_fb_drv/hash b/repos/os/recipes/src/virtio_fb_drv/hash index afd0a996d3..755685b4db 100644 --- a/repos/os/recipes/src/virtio_fb_drv/hash +++ b/repos/os/recipes/src/virtio_fb_drv/hash @@ -1 +1 @@ -2022-10-11 b52ead0214ef7975bc1457916682f30e70bec5b9 +2022-11-16 e08913b6aaa124283cc1520241b354c5de3542cf diff --git a/repos/os/recipes/src/virtio_input_drv/hash b/repos/os/recipes/src/virtio_input_drv/hash index 086a89ddbd..1c19c92be3 100644 --- a/repos/os/recipes/src/virtio_input_drv/hash +++ b/repos/os/recipes/src/virtio_input_drv/hash @@ -1 +1 @@ -2022-10-11 f1ff132c2d3a406ad1fce6decff5050ac53285cd +2022-11-16 abc98e12b63d49597632b7215d4342c762cbc470 diff --git a/repos/os/recipes/src/virtio_nic_drv/hash b/repos/os/recipes/src/virtio_nic_drv/hash index bc457314f9..1630119253 100644 --- a/repos/os/recipes/src/virtio_nic_drv/hash +++ b/repos/os/recipes/src/virtio_nic_drv/hash @@ -1 +1 @@ -2022-10-11 4398449ab003f50147fbef829766b9aa8733ed50 +2022-11-16 24d400040bb1a3bb0f65ecb4f2da7befe34084b2 diff --git a/repos/os/recipes/src/vmm/hash b/repos/os/recipes/src/vmm/hash index 97e17cb04b..9a550171f2 100644 --- a/repos/os/recipes/src/vmm/hash +++ b/repos/os/recipes/src/vmm/hash @@ -1 +1 @@ -2022-10-11 cf2a7c3d0070df2efe04a92104e977c6725eacde +2022-11-16 2d487300f33eb1e4b831bb9c7e56c2df98cd5483 diff --git a/repos/pc/recipes/api/pc_linux/hash b/repos/pc/recipes/api/pc_linux/hash index ee68de47ec..12c924b59a 100644 --- a/repos/pc/recipes/api/pc_linux/hash +++ b/repos/pc/recipes/api/pc_linux/hash @@ -1 +1 @@ -2022-10-11 3e36ba37ccdbaba16ac81203f7cd9ff64770e5c2 +2022-11-16 6d702e31d820cba677ee8167f7472f29041da551 diff --git a/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash b/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash index 11b6c37586..7012356676 100644 --- a/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash +++ b/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash @@ -1 +1 @@ -2022-10-11 dab06b4f474d2ed85bdc6a63fd2890f3fea1d91f +2022-11-16 7beb7b3765ae046deab008392ad717109b049a64 diff --git a/repos/pc/recipes/pkg/wifi/hash b/repos/pc/recipes/pkg/wifi/hash index b88d034ef9..c680d15c32 100644 --- a/repos/pc/recipes/pkg/wifi/hash +++ b/repos/pc/recipes/pkg/wifi/hash @@ -1 +1 @@ -2022-10-13 5ab7d538e658982e2c7d3eea4ff89d9ded806c59 +2022-11-16 900bb08c26edda43511763b278af170102333184 diff --git a/repos/pc/recipes/raw/test_usb_host_drv-pc/hash b/repos/pc/recipes/raw/test_usb_host_drv-pc/hash index 71bfa06df1..f6e4902b12 100644 --- a/repos/pc/recipes/raw/test_usb_host_drv-pc/hash +++ b/repos/pc/recipes/raw/test_usb_host_drv-pc/hash @@ -1 +1 @@ -2022-10-11 7c76567c99f9500da5f48e212a0ade1ba264804c +2022-11-16 493621650f0f3a64b9a59ef77e7c31785a4d0655 diff --git a/repos/pc/recipes/src/pc_intel_fb_drv/hash b/repos/pc/recipes/src/pc_intel_fb_drv/hash index 8484bb4d1d..e9be69cf0d 100644 --- a/repos/pc/recipes/src/pc_intel_fb_drv/hash +++ b/repos/pc/recipes/src/pc_intel_fb_drv/hash @@ -1 +1 @@ -2022-10-11 88ac1a413e845d81586d82d292a83131f5e93c23 +2022-11-16 688ca184eb7aa142014e246065fa36f0d6ab14af diff --git a/repos/pc/recipes/src/pc_platform_drv/hash b/repos/pc/recipes/src/pc_platform_drv/hash index 877b0e7f62..db015d8651 100644 --- a/repos/pc/recipes/src/pc_platform_drv/hash +++ b/repos/pc/recipes/src/pc_platform_drv/hash @@ -1 +1 @@ -2022-10-11 5644ac6c90238da37942ce92b228b168dd32f373 +2022-11-16 6e607e0d4fcfc5ffe6cd7915562270f28859f72f diff --git a/repos/pc/recipes/src/pc_usb_host_drv/hash b/repos/pc/recipes/src/pc_usb_host_drv/hash index 56d3fa4489..baa91c589e 100644 --- a/repos/pc/recipes/src/pc_usb_host_drv/hash +++ b/repos/pc/recipes/src/pc_usb_host_drv/hash @@ -1 +1 @@ -2022-10-11 99faca67ba2fce667cc5bfe61d45e9903b2fa786 +2022-11-16 29083b00d0ec94851b6ea936095536db994d41ab diff --git a/repos/pc/recipes/src/pc_wifi_drv/hash b/repos/pc/recipes/src/pc_wifi_drv/hash index 33b26ea5f5..e832d857da 100644 --- a/repos/pc/recipes/src/pc_wifi_drv/hash +++ b/repos/pc/recipes/src/pc_wifi_drv/hash @@ -1 +1 @@ -2022-10-11 ce28302f496619ac0db3345f83ce1db27a2558de +2022-11-16 43c475a889d98dcef214a2a113f7b1758f511c01 diff --git a/repos/ports/recipes/pkg/report_dump/hash b/repos/ports/recipes/pkg/report_dump/hash index 66f8aea133..181c6d4fd6 100644 --- a/repos/ports/recipes/pkg/report_dump/hash +++ b/repos/ports/recipes/pkg/report_dump/hash @@ -1 +1 @@ -2022-10-13 b21600b1d04c15bac05fef3c0c85b461434af654 +2022-11-16 18bc3bfb81ef98e7d555d50dd611d9dddc5623d6 diff --git a/repos/ports/recipes/pkg/system_shell/hash b/repos/ports/recipes/pkg/system_shell/hash index 3a3a6ff11a..37341774e2 100644 --- a/repos/ports/recipes/pkg/system_shell/hash +++ b/repos/ports/recipes/pkg/system_shell/hash @@ -1 +1 @@ -2022-10-13 d5a6a38faf1a189e344e20315d7e3b5ff3c655b9 +2022-11-16 793859f247ff5fc545d0053982e3deecebb174d6 diff --git a/repos/ports/recipes/pkg/vbox5-nova-capture/hash b/repos/ports/recipes/pkg/vbox5-nova-capture/hash index 273664f308..d1f2d4d44a 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-capture/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-capture/hash @@ -1 +1 @@ -2022-10-11 e8bc59a090a8ecbbf42d722ff0281638ffb163fe +2022-11-16 41ba56e74aae375e3dc87746919adc33fe38c101 diff --git a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash index 06fdf892ad..0777732974 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash @@ -1 +1 @@ -2022-10-11 86aecdf04bd865d5437baf7d6938b772f410bfc5 +2022-11-16 b27548da1479f75e6169d9837553d7ef9afa2f11 diff --git a/repos/ports/recipes/pkg/vbox5/hash b/repos/ports/recipes/pkg/vbox5/hash index be8ef78173..2de92c6d60 100644 --- a/repos/ports/recipes/pkg/vbox5/hash +++ b/repos/ports/recipes/pkg/vbox5/hash @@ -1 +1 @@ -2022-10-11 573ef802db888376637cc80d18193fd60c044ef6 +2022-11-16 6bfa67853b633c6d5eefbfdb1be437aad3d51266 diff --git a/repos/ports/recipes/pkg/vbox6-capture/hash b/repos/ports/recipes/pkg/vbox6-capture/hash index 2d4949c76e..8c39c1d8a8 100644 --- a/repos/ports/recipes/pkg/vbox6-capture/hash +++ b/repos/ports/recipes/pkg/vbox6-capture/hash @@ -1 +1 @@ -2022-10-13 5ee9b1fe8cba2b4de594a86536d1715fa1f19f60 +2022-11-16 efeeb5ffb175d5c14501c458441fb5403f2dc8fa diff --git a/repos/ports/recipes/pkg/vbox6/hash b/repos/ports/recipes/pkg/vbox6/hash index 5fd62b4ce6..524220e9b8 100644 --- a/repos/ports/recipes/pkg/vbox6/hash +++ b/repos/ports/recipes/pkg/vbox6/hash @@ -1 +1 @@ -2022-10-13 e4ebeaebba14936f204f7a26c14c237f9a44d636 +2022-11-16 41aeedd01e79eae4a2cab2bf1c23b52b37901ba2 diff --git a/repos/ports/recipes/src/bash-minimal/hash b/repos/ports/recipes/src/bash-minimal/hash index 0a1f7575f8..7a1e75a84d 100644 --- a/repos/ports/recipes/src/bash-minimal/hash +++ b/repos/ports/recipes/src/bash-minimal/hash @@ -1 +1 @@ -2022-08-30 4e01ba599b1e81d6f383a2fe391c248db5b9e91c +2022-11-16 7353a6e15b52cbbbe83f9dd0eecd34ea4b3473fd diff --git a/repos/ports/recipes/src/binutils_x86/hash b/repos/ports/recipes/src/binutils_x86/hash index 9c0c55530c..6813d00905 100644 --- a/repos/ports/recipes/src/binutils_x86/hash +++ b/repos/ports/recipes/src/binutils_x86/hash @@ -1 +1 @@ -2022-10-11 55f7c886de2811792d996fe4a31f7e3f9ff5fb63 +2022-11-16 0ff0de7696540adaa5b815926cde7d722597ba01 diff --git a/repos/ports/recipes/src/coreutils-minimal/hash b/repos/ports/recipes/src/coreutils-minimal/hash index a4d435e825..52d4c864f7 100644 --- a/repos/ports/recipes/src/coreutils-minimal/hash +++ b/repos/ports/recipes/src/coreutils-minimal/hash @@ -1 +1 @@ -2022-08-30 5ca3aaf8787681887803a0874e3c0b3739b0c4a9 +2022-11-16 514ff37dcb1659356e5992de2f1aa9b3a5f9e1de diff --git a/repos/ports/recipes/src/e2fsprogs-minimal/hash b/repos/ports/recipes/src/e2fsprogs-minimal/hash index b694d897e4..adbb6e5b78 100644 --- a/repos/ports/recipes/src/e2fsprogs-minimal/hash +++ b/repos/ports/recipes/src/e2fsprogs-minimal/hash @@ -1 +1 @@ -2022-08-30 143e7e64f872e51785d58255ec76f91523dc741d +2022-11-16 1b1950b38e18f68156902dbbfe51def2c47f64f7 diff --git a/repos/ports/recipes/src/gcc_x86/hash b/repos/ports/recipes/src/gcc_x86/hash index 1ea0f2a4af..d1e88ddf75 100644 --- a/repos/ports/recipes/src/gcc_x86/hash +++ b/repos/ports/recipes/src/gcc_x86/hash @@ -1 +1 @@ -2022-10-11 40ae61731f6aa03b3769c8adaecd69220abef743 +2022-11-16 a2702c4425df466fd900c98fb5a2915ac33f01d3 diff --git a/repos/ports/recipes/src/lighttpd/hash b/repos/ports/recipes/src/lighttpd/hash index 55e962551b..443e7a6c5e 100644 --- a/repos/ports/recipes/src/lighttpd/hash +++ b/repos/ports/recipes/src/lighttpd/hash @@ -1 +1 @@ -2022-08-30 e1ec2a914a651dafd2d6a66e6d14eeb5fdd714a2 +2022-11-16 15b4b1755c9a318af15f8901e0fcb4795622f03f diff --git a/repos/ports/recipes/src/vbox5-nova/hash b/repos/ports/recipes/src/vbox5-nova/hash index eb83062bb1..e83fc6e388 100644 --- a/repos/ports/recipes/src/vbox5-nova/hash +++ b/repos/ports/recipes/src/vbox5-nova/hash @@ -1 +1 @@ -2022-10-11 70396f6e3d594fc40501f10c464d992a4d20a00c +2022-11-16 65b947678d53855505ebc077b414fbf3f0b48148 diff --git a/repos/ports/recipes/src/vbox5/hash b/repos/ports/recipes/src/vbox5/hash index c50b6d6f07..be2262391b 100644 --- a/repos/ports/recipes/src/vbox5/hash +++ b/repos/ports/recipes/src/vbox5/hash @@ -1 +1 @@ -2022-10-11 67b26c708d462ac6989edd77660bf0b16bde013c +2022-11-16 269caad597b97e2791e859604a7416ebbb2ba0a4 diff --git a/repos/ports/recipes/src/vbox6/hash b/repos/ports/recipes/src/vbox6/hash index 63dc853b4a..0682e18d16 100644 --- a/repos/ports/recipes/src/vbox6/hash +++ b/repos/ports/recipes/src/vbox6/hash @@ -1 +1 @@ -2022-10-11 ed6b31b0a54a9950aa97b0b801ef151f69b52f74 +2022-11-16 59a20c2333c8fd9890272e1b3ee984274275f160 diff --git a/repos/ports/recipes/src/verify/hash b/repos/ports/recipes/src/verify/hash index e1966b15c5..f66cc7ebc0 100644 --- a/repos/ports/recipes/src/verify/hash +++ b/repos/ports/recipes/src/verify/hash @@ -1 +1 @@ -2022-10-11 d615fad468fd99978be7ceb2ddaab29cd619de5e +2022-11-16 34794d4efdefc73d4836489c35ce03c26b2cf387 diff --git a/repos/ports/recipes/src/vim-minimal/hash b/repos/ports/recipes/src/vim-minimal/hash index e210efd9dc..870596c95a 100644 --- a/repos/ports/recipes/src/vim-minimal/hash +++ b/repos/ports/recipes/src/vim-minimal/hash @@ -1 +1 @@ -2022-08-30 30e5c88017752ae7ab7132326a1dc64f2bbe3247 +2022-11-16 2b688dd994ea964e5cd88896fc347f52b0e42fc7 From 4bacba431b45aa2d632dca7f3a5042ff7453f67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 17 Nov 2022 13:49:28 +0100 Subject: [PATCH 0072/1921] nvme_drv: do not mask interrupts During interrupt handling the driver masked and cleared interrupts as recommended in the spec to prevent spurious or unnecessary interrupts from occurring. Due to the way the current implementation operates new Block requests got submitted while handling completions for already finished ones. Since interrupts where masked at this point the controller did not generate interrupts when the newly submitted requests got completed. As the mask/clear optimization is apparently not strictly needed and according to the spec undefined when using MSI-X it is removed. Fixes #4684 --- repos/os/src/drivers/nvme/main.cc | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/repos/os/src/drivers/nvme/main.cc b/repos/os/src/drivers/nvme/main.cc index 44ed8d7ffb..3b3d55ac98 100644 --- a/repos/os/src/drivers/nvme/main.cc +++ b/repos/os/src/drivers/nvme/main.cc @@ -1082,11 +1082,12 @@ class Nvme::Controller : Platform::Device, /** * Clean interrupts */ - void clear_intr() - { - write(1); - ack(); - } + void clear_intr() { write(1); } + + /** + * Acknowledge interrupt + */ + void ack_irq() { Platform::Device::Irq::ack(); } /* * Identify NVM system @@ -1798,14 +1799,9 @@ class Nvme::Driver : Genode::Noncopyable _submits_pending = true; } - void mask_irq() - { - _nvme_ctrlr.mask_intr(); - } - void ack_irq() { - _nvme_ctrlr.clear_intr(); + _nvme_ctrlr.ack_irq(); } bool execute() @@ -1869,7 +1865,6 @@ struct Nvme::Main : Rpc_object> void _handle_irq() { - _driver.mask_irq(); _handle_requests(); _driver.ack_irq(); } From 790e81349fb9c376ac806979a760ad6086671143 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 8 Nov 2022 15:53:41 +0100 Subject: [PATCH 0073/1921] mixer.run: adjust to new platform driver Issue #4656 --- repos/os/run/mixer.run | 106 ++++++++++++++++++++++++++++++----------- 1 file changed, 79 insertions(+), 27 deletions(-) diff --git a/repos/os/run/mixer.run b/repos/os/run/mixer.run index 5966a2f2aa..653ffc3106 100644 --- a/repos/os/run/mixer.run +++ b/repos/os/run/mixer.run @@ -2,19 +2,23 @@ # Build # +if {[have_include "power_on/qemu"]} { + puts "\nTest running on Qemu is not supported.\n" + exit 0 +} + # generic components set build_components { core init timer drivers/audio + drivers/platform server/mixer server/dynamic_rom server/report_rom + app/pci_decode test/audio_out } -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - build $build_components create_boot_directory @@ -40,40 +44,90 @@ set config { - } + -append_platform_drv_config - -append config { - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -87,7 +141,7 @@ append config { - + @@ -101,7 +155,7 @@ append config { - + @@ -175,13 +229,11 @@ if {[expr ![file exists bin/client1.f32] || ![file exists bin/client2.f32]]} { append boot_modules { core ld.lib.so init timer report_rom dynamic_rom - } [audio_drv_binary] { test-audio_out + platform_drv acpi_drv pci_decode + pci_audio_drv test-audio_out mixer client1.f32 client2.f32 } -# platform-specific components -append_platform_drv_boot_modules - build_boot_image $boot_modules -append qemu_args "-soundhw es1370 -nographic" +append qemu_args " -nographic" run_genode_until forever From da60200377c9a1f9015f944f6a6e3b48ccc822ad Mon Sep 17 00:00:00 2001 From: Roman Iten Date: Fri, 30 Sep 2022 10:38:29 +0200 Subject: [PATCH 0074/1921] libports: use GitHub mirror for fatfs It looks like http://www.elm-chan.org is blocking certain IP ranges, because downloading the source archive on certain machines fails with "403 Forbidden". Fixes genodelabs/genode#4623 --- repos/libports/ports/fatfs.hash | 2 +- repos/libports/ports/fatfs.port | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/repos/libports/ports/fatfs.hash b/repos/libports/ports/fatfs.hash index 2aa9fd32f8..9af208c355 100644 --- a/repos/libports/ports/fatfs.hash +++ b/repos/libports/ports/fatfs.hash @@ -1 +1 @@ -973b91980a4eff6f47c81e4a2de8d94726fc2ffc +2ac244a73ed86d8b429a0cf35bb65f20397b1709 diff --git a/repos/libports/ports/fatfs.port b/repos/libports/ports/fatfs.port index c530ac6b89..f0993d12b5 100644 --- a/repos/libports/ports/fatfs.port +++ b/repos/libports/ports/fatfs.port @@ -2,10 +2,12 @@ LICENSE := BSD VERSION := 0.13b DOWNLOADS := fatfs.archive -URL(fatfs) := http://www.elm-chan.org/fsw/ff/arc/ff13b.zip -SHA(fatfs) := 43a577724e5595d73c643891cb2959919885b458149794a085a98254784f5a9b +URL(fatfs) := https://github.com/abbrev/fatfs/archive/refs/tags/R$(VERSION).tar.gz +SHA(fatfs) := 7b182f2d65387d8d300a684773b21c0579bc3665a8c32138475cdcfd086149fc DIR(fatfs) := src/lib/fatfs +TAR_OPT(fatfs) := --strip-components 1 + DIRS := include/fatfs DIR_CONTENT(include/fatfs) := \ $(addprefix src/lib/fatfs/source/, ff.h diskio.h integer.h ffconf.h) From 7ebe09fbf7298b6c7bf5c1c8f52c73a7ac20dae2 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 17 Nov 2022 17:10:47 +0100 Subject: [PATCH 0075/1921] pci_decode: limit PCI config space mappings Map only one PCI bus at once when parsing the PCI buses. Fix genodelabs/genode#4686 --- repos/os/src/app/pci_decode/main.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/repos/os/src/app/pci_decode/main.cc b/repos/os/src/app/pci_decode/main.cc index 50a1bbdf71..2216c7af46 100644 --- a/repos/os/src/app/pci_decode/main.cc +++ b/repos/os/src/app/pci_decode/main.cc @@ -49,7 +49,7 @@ struct Main void parse_pci_function(Bdf bdf, Config & cfg, addr_t cfg_phys_base, Xml_generator & generator, unsigned & msi); - void parse_pci_bus(bus_t bus, bus_t offset, addr_t base, addr_t phys_base, + void parse_pci_bus(bus_t bus, addr_t base, addr_t phys_base, Xml_generator & generator, unsigned & msi); void parse_irq_override_rules(Xml_node & xml); @@ -231,7 +231,6 @@ void Main::parse_pci_function(Bdf bdf, void Main::parse_pci_bus(bus_t bus, - bus_t offset, addr_t base, addr_t phys_base, Xml_generator & generator, @@ -243,7 +242,7 @@ void Main::parse_pci_bus(bus_t bus, if (!cfg.valid()) return true; - parse_pci_function({(bus_t)(bus+offset), dev, fn}, cfg, + parse_pci_function({(bus_t)bus, dev, fn}, cfg, config_phys_base, generator, msi_number); return !(fn == 0 && !cfg.read()); @@ -251,8 +250,7 @@ void Main::parse_pci_bus(bus_t bus, for (dev_t dev = 0; dev < DEVICES_PER_BUS_MAX; dev++) { for (func_t fn = 0; fn < FUNCTION_PER_DEVICE_MAX; fn++) { - unsigned factor = (bus * DEVICES_PER_BUS_MAX + dev) * - FUNCTION_PER_DEVICE_MAX + fn; + unsigned factor = dev * FUNCTION_PER_DEVICE_MAX + fn; addr_t config_base = base + factor * FUNCTION_CONFIG_SPACE_SIZE; addr_t config_phys_base = phys_base + factor * FUNCTION_CONFIG_SPACE_SIZE; @@ -293,14 +291,16 @@ void Main::parse_pci_config_spaces(Xml_node & xml) new (heap) Bridge(bridge_registry, { bus_off, 0, 0 }, bus_off, last_bus); - pci_config_ds.construct(env, base, count * FUNCTION_CONFIG_SPACE_SIZE); - bus_t bus = 0; - do - parse_pci_bus((bus_t)bus, bus_off, + do { + enum { BUS_SIZE = DEVICES_PER_BUS_MAX * FUNCTION_PER_DEVICE_MAX + * FUNCTION_CONFIG_SPACE_SIZE }; + addr_t offset = base + bus * BUS_SIZE; + pci_config_ds.construct(env, offset, BUS_SIZE); + parse_pci_bus((bus_t)bus + bus_off, (addr_t)pci_config_ds->local_addr(), - base, generator, msi_number); - while (bus++ < last_bus); + offset, generator, msi_number); + } while (bus++ < last_bus); pci_config_ds.destruct(); }); From 565be454aa9de86337131c995ff120860485043e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 18 Nov 2022 08:46:12 +0100 Subject: [PATCH 0076/1921] Mention Johannes' VM guide in Sculpt documentation --- repos/gems/recipes/pkg/sculpt/README | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/repos/gems/recipes/pkg/sculpt/README b/repos/gems/recipes/pkg/sculpt/README index ed0b1f7d4a..4cb5638530 100644 --- a/repos/gems/recipes/pkg/sculpt/README +++ b/repos/gems/recipes/pkg/sculpt/README @@ -315,7 +315,9 @@ For inspiration, please follow the postings at [https://genodians.org/jws/2019-07-08-download_debian-guest-additions-reloaded] For configuring and starting the virtual machine, you may find the - following guide useful: + following guides useful: + + [https://genodians.org/jschlatow/2022-10-27-fresh-vm-on-sculpt] [https://genodians.org/m-stein/2019-03-07-vm-with-sculpt-ce-preview] From 03470e7babed4033c4351149323abd67316df5bc Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 1 Aug 2022 14:41:05 +0200 Subject: [PATCH 0077/1921] nova: use kernel with suspend/resume support Issue #4669 --- repos/base-nova/include/nova/syscall-generic.h | 2 +- repos/base-nova/include/spec/32bit/nova/syscalls.h | 12 ++++++++++-- repos/base-nova/include/spec/64bit/nova/syscalls.h | 12 ++++++++++-- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/repos/base-nova/include/nova/syscall-generic.h b/repos/base-nova/include/nova/syscall-generic.h index 1654bdbc3f..a9194569c4 100644 --- a/repos/base-nova/include/nova/syscall-generic.h +++ b/repos/base-nova/include/nova/syscall-generic.h @@ -56,7 +56,7 @@ namespace Nova { NOVA_CREATE_PT = 0x5, NOVA_CREATE_SM = 0x6, NOVA_REVOKE = 0x7, - NOVA_LOOKUP = 0x8, + NOVA_MISC = 0x8, /* lookup, delegate, acpi_suspend */ NOVA_EC_CTRL = 0x9, NOVA_SC_CTRL = 0xa, NOVA_PT_CTRL = 0xb, diff --git a/repos/base-nova/include/spec/32bit/nova/syscalls.h b/repos/base-nova/include/spec/32bit/nova/syscalls.h index 6fb41d4fee..22de9e655f 100644 --- a/repos/base-nova/include/spec/32bit/nova/syscalls.h +++ b/repos/base-nova/include/spec/32bit/nova/syscalls.h @@ -405,7 +405,7 @@ namespace Nova { inline uint8_t lookup(Crd &crd) { mword_t crd_r; - uint8_t res = syscall_1(NOVA_LOOKUP, 0, 0, crd.value(), &crd_r); + uint8_t res = syscall_1(NOVA_MISC, 0, 0, crd.value(), &crd_r); crd = Crd(crd_r); return res; } @@ -414,7 +414,15 @@ namespace Nova { ALWAYS_INLINE inline uint8_t delegate(mword_t pd_snd, mword_t pd_dst, Crd crd_dst) { - return syscall_2(NOVA_LOOKUP, 1, pd_snd, crd_dst.value(), pd_dst); + return syscall_2(NOVA_MISC, 1, pd_snd, crd_dst.value(), pd_dst); + } + + + ALWAYS_INLINE + inline uint8_t acpi_suspend(mword_t sm_auth_acpi, mword_t sleep_state_a, + mword_t sleep_state_b) + { + return syscall_2(NOVA_MISC, 2, sm_auth_acpi, sleep_state_a, sleep_state_b); } diff --git a/repos/base-nova/include/spec/64bit/nova/syscalls.h b/repos/base-nova/include/spec/64bit/nova/syscalls.h index 9e8fa765fc..0491379fa9 100644 --- a/repos/base-nova/include/spec/64bit/nova/syscalls.h +++ b/repos/base-nova/include/spec/64bit/nova/syscalls.h @@ -342,7 +342,7 @@ namespace Nova { inline uint8_t lookup(Crd &crd) { mword_t crd_r; - uint8_t res = syscall_1(NOVA_LOOKUP, 0, 0, crd.value(), &crd_r); + uint8_t res = syscall_1(NOVA_MISC, 0, 0, crd.value(), &crd_r); crd = Crd(crd_r); return res; } @@ -351,7 +351,15 @@ namespace Nova { ALWAYS_INLINE inline uint8_t delegate(mword_t pd_snd, mword_t pd_dst, Crd crd_dst) { - return syscall_2(NOVA_LOOKUP, 1, pd_snd, crd_dst.value(), pd_dst); + return syscall_2(NOVA_MISC, 1, pd_snd, crd_dst.value(), pd_dst); + } + + + ALWAYS_INLINE + inline uint8_t acpi_suspend(mword_t sm_auth_acpi, mword_t sleep_state_a, + mword_t sleep_state_b) + { + return syscall_2(NOVA_MISC, 2, sm_auth_acpi, sleep_state_a, sleep_state_b); } diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index 8dc8cb7754..b4fec77779 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -ab5601025e5e69a30f03219c3be108ff3d866ce4 +5e7fa1e56f6ebe1a5c88d7e5278585c543ca3cf3 diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index f2b3c2c941..1d8fd79361 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := 048109941862356b4785a50d1ef012d2ad9761c5 +REV(nova) := 0a54bd120ee15672089a0fcacef3b02cc0db523b DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) From fd2a21690988c4a89902f5f4a02e0dae8307a013 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 29 Sep 2022 14:32:36 +0200 Subject: [PATCH 0078/1921] base: support ACPI suspend via Pd::managing_system Issue #4669 --- .../base-nova/src/core/pd_session_support.cc | 35 ++++++++++++++++++- .../base/include/spec/x86_32/cpu/cpu_state.h | 4 +++ .../base/include/spec/x86_64/cpu/cpu_state.h | 4 +++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/repos/base-nova/src/core/pd_session_support.cc b/repos/base-nova/src/core/pd_session_support.cc index 99b0726c4f..344a623d15 100644 --- a/repos/base-nova/src/core/pd_session_support.cc +++ b/repos/base-nova/src/core/pd_session_support.cc @@ -109,4 +109,37 @@ void Pd_session_component::map(addr_t virt, addr_t size) using State = Genode::Pd_session::Managing_system_state; -State Pd_session_component::managing_system(State const &) { return State(); } +State Pd_session_component::managing_system(State const &request) +{ + bool const suspend = (_managing_system == Managing_system::PERMITTED) && + (request.trapno == State::ACPI_SUSPEND_REQUEST); + State respond { }; + + if (!suspend) { + /* report failed attempt */ + respond.trapno = 0; + return respond; + } + + /* + * The trapno/ip/sp registers used below are just convention to transfer + * the intended sleep state S0 ... S5. The values are read out by an + * ACPI AML component and are of type TYP_SLPx as described in the + * ACPI specification, e.g. TYP_SLPa and TYP_SLPb. The values differ + * between different PC systems/boards. + * + * \note trapno/ip/sp registers are chosen because they exist in + * Managing_system_state for x86_32 and x86_64. + */ + uint8_t const sleep_type_a = uint8_t(request.ip); + uint8_t const sleep_type_b = uint8_t(request.sp); + + auto const cap_suspend = platform_specific().core_pd_sel() + 3; + auto const result = Nova::acpi_suspend(cap_suspend, sleep_type_a, + sleep_type_b); + + if (result == Nova::NOVA_OK) + respond.trapno = 1 /* success, which means we resumed already */; + + return respond; +} diff --git a/repos/base/include/spec/x86_32/cpu/cpu_state.h b/repos/base/include/spec/x86_32/cpu/cpu_state.h index 2b88fd613f..61d459021a 100644 --- a/repos/base/include/spec/x86_32/cpu/cpu_state.h +++ b/repos/base/include/spec/x86_32/cpu/cpu_state.h @@ -36,6 +36,10 @@ struct Genode::Cpu_state addr_t fs = 0; addr_t eflags = 0; addr_t trapno = 0; + + enum { + ACPI_SUSPEND_REQUEST = 0x100, /* convention for managing_system() */ + }; }; #endif /* _INCLUDE__SPEC__X86_32__CPU__CPU_STATE_H_ */ diff --git a/repos/base/include/spec/x86_64/cpu/cpu_state.h b/repos/base/include/spec/x86_64/cpu/cpu_state.h index 7ab0324be9..4388a90596 100644 --- a/repos/base/include/spec/x86_64/cpu/cpu_state.h +++ b/repos/base/include/spec/x86_64/cpu/cpu_state.h @@ -57,6 +57,10 @@ struct Genode::Cpu_state addr_t eflags = 0; addr_t sp = 0; addr_t ss = 0; + + enum { + ACPI_SUSPEND_REQUEST = 0x100, /* convention for managing_system() */ + }; }; #endif /* _INCLUDE__SPEC__X86_64__CPU__CPU_STATE_H_ */ From 58ff53ec526a4f9da9be099025de08d1f5221a4f Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 21 Sep 2022 15:47:15 +0200 Subject: [PATCH 0079/1921] acpica: report S0-S5 sleep state support Issue #4669 --- repos/libports/src/app/acpica/os.cc | 7 +++++ repos/libports/src/app/acpica/report.cc | 41 +++++++++++++++++++++++++ repos/libports/src/app/acpica/target.mk | 2 +- repos/libports/src/app/acpica/util.h | 4 +-- 4 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 repos/libports/src/app/acpica/report.cc diff --git a/repos/libports/src/app/acpica/os.cc b/repos/libports/src/app/acpica/os.cc index 869966a8d2..5ac4a79cf5 100644 --- a/repos/libports/src/app/acpica/os.cc +++ b/repos/libports/src/app/acpica/os.cc @@ -129,6 +129,8 @@ struct Acpica::Main void *context; } irq_handler; + Expanding_reporter report_sleep_states { env, "sleep_states", "sleep_states" }; + void init_acpica(); Main(Env &env) @@ -415,6 +417,11 @@ void Acpica::Main::init_acpica() error("AcpiGetDevices (FUJ02E3) failed, status=", status); return; } + + /* report S0-S5 support and the SLP_TYPa/b values to be used by kernel(s) */ + report_sleep_states.generate([&] (auto &xml) { + Acpica::generate_suspend_report(xml); + }); } diff --git a/repos/libports/src/app/acpica/report.cc b/repos/libports/src/app/acpica/report.cc new file mode 100644 index 0000000000..1972a57b22 --- /dev/null +++ b/repos/libports/src/app/acpica/report.cc @@ -0,0 +1,41 @@ +/* + * \brief Generate XML report + * \author Alexander Boettcher + */ + +/* + * Copyright (C) 2018-2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include + +#include "util.h" + +using namespace Acpica; + +using Genode::Reporter; + +void Acpica::generate_suspend_report(Reporter::Xml_generator &xml) +{ + for (unsigned sleep_state = 1; sleep_state < ACPI_S_STATE_COUNT; sleep_state ++) { + UINT8 slp_typa {}; + UINT8 slp_typb {}; + + ACPI_STATUS const result = AcpiGetSleepTypeData (sleep_state, + &slp_typa, + &slp_typb); + + Genode::String<4> const state_name("S", sleep_state); + xml.node(state_name.string(), [&] () { + xml.attribute("supported", result == AE_OK); + if (result == AE_OK) { + xml.attribute("SLP_TYPa", slp_typa); + xml.attribute("SLP_TYPb", slp_typb); + } + }); + } +} diff --git a/repos/libports/src/app/acpica/target.mk b/repos/libports/src/app/acpica/target.mk index 1a09936831..0db7d0f48c 100644 --- a/repos/libports/src/app/acpica/target.mk +++ b/repos/libports/src/app/acpica/target.mk @@ -1,5 +1,5 @@ TARGET := acpica -SRC_CC := os.cc printf.cc +SRC_CC := os.cc printf.cc report.cc REQUIRES := x86 LIBS += base acpica diff --git a/repos/libports/src/app/acpica/util.h b/repos/libports/src/app/acpica/util.h index 40643e68c9..a37d81f5e1 100644 --- a/repos/libports/src/app/acpica/util.h +++ b/repos/libports/src/app/acpica/util.h @@ -17,15 +17,15 @@ extern "C" { #include "acpi.h" } -class Bridge; namespace Acpica { template class Buffer; template class Callback; - void generate_report(Genode::Env &, Bridge *); template void for_each_element(H const head, S *, F const &fn, FSIZE const &fn_size); + + void generate_suspend_report(Genode::Reporter::Xml_generator &); } template From dee178aae57ea2e479992171d8a037a849fb9a67 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 22 Jan 2021 13:22:37 +0100 Subject: [PATCH 0080/1921] acpica: execute suspend&resume ACPI methods on 'system' ROM state changes. Issue #4669 --- repos/libports/src/app/acpica/README | 2 +- repos/libports/src/app/acpica/os.cc | 67 ++++++++++++++++++++++++++-- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/repos/libports/src/app/acpica/README b/repos/libports/src/app/acpica/README index c89b9d28af..7ac6a4cfa9 100644 --- a/repos/libports/src/app/acpica/README +++ b/repos/libports/src/app/acpica/README @@ -46,7 +46,7 @@ Excerpt of important parts of the acpica configuration ! ! ! ... -! +! ! ! ! diff --git a/repos/libports/src/app/acpica/os.cc b/repos/libports/src/app/acpica/os.cc index 5ac4a79cf5..2bd586c766 100644 --- a/repos/libports/src/app/acpica/os.cc +++ b/repos/libports/src/app/acpica/os.cc @@ -55,18 +55,70 @@ struct Acpica::Statechange Attached_rom_dataspace _system_state; bool _enable_reset; bool _enable_poweroff; + bool _enable_sleep; - Statechange(Env &env, bool reset, bool poweroff) + Statechange(Env &env, bool reset, bool poweroff, bool sleep) : _dispatcher(env.ep(), *this, &Statechange::state_changed), _system_state(env, "system"), - _enable_reset(reset), _enable_poweroff(poweroff) + _enable_reset(reset), _enable_poweroff(poweroff), _enable_sleep(sleep) { _system_state.sigh(_dispatcher); state_changed(); } + template + void suspend_prepare_check(T const &state) + { + if (!_enable_sleep) + return; + + UINT8 sleep_state = 0; + + if (state == "s0_prepare") { sleep_state = 0; } else + if (state == "s1_prepare") { sleep_state = 1; } else + if (state == "s2_prepare") { sleep_state = 2; } else + if (state == "s3_prepare") { sleep_state = 3; } else + if (state == "s4_prepare") { sleep_state = 4; } else + if (state == "s5_prepare") { sleep_state = 5; } else + return; + + Genode::log("prepare suspend S", sleep_state); + + ACPI_STATUS res = AcpiEnterSleepStatePrep(sleep_state); + if (ACPI_FAILURE(res)) + Genode::error("AcpiEnterSleepStatePrep failed ", + res, " ", AcpiFormatException(res)); + } + + template + void resume_check(T const &state) + { + if (!_enable_sleep) + return; + + UINT8 sleep_state = 0; + + if (state == "s0_resume") { sleep_state = 0; } else + if (state == "s1_resume") { sleep_state = 1; } else + if (state == "s2_resume") { sleep_state = 2; } else + if (state == "s3_resume") { sleep_state = 3; } else + if (state == "s4_resume") { sleep_state = 4; } else + if (state == "s5_resume") { sleep_state = 5; } else + return; + + ACPI_STATUS res = AcpiLeaveSleepStatePrep(sleep_state); + if (ACPI_FAILURE(res)) + Genode::error("AcpiLeaveSleepStatePrep failed ", + res, " ", AcpiFormatException(res)); + + res = AcpiLeaveSleepState(sleep_state); + if (ACPI_FAILURE(res)) + Genode::error("AcpiLeaveSleepState failed ", + res, " ", AcpiFormatException(res)); + } + void state_changed() { _system_state.update(); @@ -98,6 +150,11 @@ struct Acpica::Statechange " spaceid=", Hex(AcpiGbl_FADT.ResetRegister.SpaceId), " addr=", Hex(space_addr)); } + + suspend_prepare_check(state); + + resume_check(state); + } }; @@ -139,6 +196,7 @@ struct Acpica::Main sci_irq(env.ep(), *this, &Main::acpi_irq), unchanged_state_max(config.xml().attribute_value("update_unchanged", 10U)) { + bool const enable_sleep = config.xml().attribute_value("sleep", false); bool const enable_reset = config.xml().attribute_value("reset", false); bool const enable_poweroff = config.xml().attribute_value("poweroff", false); bool const enable_report = config.xml().attribute_value("report", false); @@ -152,8 +210,9 @@ struct Acpica::Main if (enable_report) report->enable(); - if (enable_reset || enable_poweroff) - new (heap) Acpica::Statechange(env, enable_reset, enable_poweroff); + if (enable_reset || enable_poweroff || enable_sleep) + new (heap) Acpica::Statechange(env, enable_reset, enable_poweroff, + enable_sleep); /* setup IRQ */ if (!irq_handler.handler) { From 224b766eb1ec13b4c829b3ea39cbaf0f610d9841 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 1 Aug 2022 17:14:10 +0200 Subject: [PATCH 0081/1921] add acpi suspend test scenario Test to trigger periodically ACPI suspend and resume and periodically trying to restart graphic driver. Tested successfully with X201 and T420. Issue #4669 --- repos/libports/run/acpi_suspend.run | 381 +++++++++++++++++++ repos/libports/src/test/suspend/component.cc | 124 ++++++ repos/libports/src/test/suspend/target.mk | 5 + 3 files changed, 510 insertions(+) create mode 100644 repos/libports/run/acpi_suspend.run create mode 100644 repos/libports/src/test/suspend/component.cc create mode 100644 repos/libports/src/test/suspend/target.mk diff --git a/repos/libports/run/acpi_suspend.run b/repos/libports/run/acpi_suspend.run new file mode 100644 index 0000000000..d564adf64b --- /dev/null +++ b/repos/libports/run/acpi_suspend.run @@ -0,0 +1,381 @@ +# +# Test to trigger periodically ACPI suspend and resume and periodically +# trying to restart graphic driver. +# +# The pc_intel_fb_drv is restarting on X201 successfully after resume. +# On Qemu the restart of vesa_fb_drv after resume does not work up to now. +# +# Intel AMT SOL most the time does not work after resume. +# PCMCIA Serial card worked reliable on X201 after resume. +# + +assert_spec x86 +assert_spec nova + +# non Intel machines has no GPU support, e.g. Qemu and AMD +set board_non_intel [expr [have_include "power_on/qemu"]] + +if {$board_non_intel} { + set fb_platform_service "platform_drv" +} else { + set fb_platform_service "intel_gpu_drv" +} + + +proc display_config { } { + global board_non_intel + + if {$board_non_intel} { + return { + + + + + + + + } + } + + return { + + + + + + + } +} + +proc gpu_config { } { + global board_non_intel + + if {$board_non_intel} return + + return { + + + + + + + + + + + + + + + + + + + + + + + + } +} + + +set build_components { + core timer init + server/report_rom + server/dynamic_rom + server/rom_filter + drivers/acpi + drivers/platform + drivers/framebuffer/intel/pc + drivers/framebuffer/vesa + drivers/framebuffer/boot + drivers/gpu/intel + app/acpica + app/pci_decode + test/framebuffer + test/suspend +} + +build $build_components + +create_boot_directory + +set config "" +append config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } [gpu_config] { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } [display_config] { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +install_config $config + +# non PCI devices for platform_drv, e.g. ps2/pit +file copy [select_from_repositories board/[board]/devices] [run_dir]/genode/devices + +set boot_modules { + core ld.lib.so init timer + report_rom dynamic_rom rom_filter + acpi_drv pc_platform_drv pci_decode + pc_intel_fb_drv test-framebuffer vesa_fb_drv intel_gpu_drv boot_fb_drv + acpica + test-suspend +} + +build_boot_image $boot_modules + +# qemu machine model q35 and multiple CPUs don't work with NOVA kernel +# +# src/lapic.cpp Acpi::delay(2) spins on PM_TMR forever +# +# According to qemu monitor "info mtree", +# +# address-space: I/O +# 0000000000000000-000000000000ffff (prio 0, i/o): io +# ... +# 0000000000000600-000000000000067f (prio 0, i/o): ich9-pm +# 0000000000000600-0000000000000603 (prio 0, i/o): acpi-evt +# 0000000000000604-0000000000000605 (prio 0, i/o): acpi-cnt +# 0000000000000608-000000000000060b (prio 0, i/o): acpi-tmr +# 0000000000000620-000000000000062f (prio 0, i/o): acpi-gpe0 +# 0000000000000630-0000000000000637 (prio 0, i/o): acpi-smi +# 0000000000000660-000000000000067f (prio 0, i/o): sm-tco +# +# address-space: I/O +# 0000000000000000-000000000000ffff (prio 0, i/o): io +# 0000000000000000-0000000000000003 (prio 0, i/o): acpi-evt +# 0000000000000004-0000000000000005 (prio 0, i/o): acpi-cnt +# 0000000000000008-000000000000000b (prio 0, i/o): acpi-tmr +# 0000000000000020-000000000000002f (prio 0, i/o): acpi-gpe0 +# 0000000000000030-0000000000000037 (prio 0, i/o): acpi-smi +# 0000000000000060-000000000000007f (prio 0, i/o): sm-tco +# +# the "ich9-pm" device behind/attached on a LPC PCI device +# +# ./hw/isa/lpc_ich9.c +# ./hw/acpi/ich9.c: memory_region_init(&pm->io, OBJECT(lpc_pci), "ich9-pm", ICH9_PMIO_SIZE) +# +# is not at the right i/o space right location anymore. It seems that the +# parent of ich9-pm stays disabled ... +# +# Further debugging shows: +# +# qemu/roms/seabios/src/resume.c s3_resume -> pci_resume +# qemu/roms/seabios/src/fw/pciinit.c pci_resume +# +# In pci_resume the mmcfg and q35 and ich9-pm for PCIe is tried to be +# re-enabled, but actually the calls never hit in Qemu. +# It seems that mch_mmconfig_setup should use I/O PCI access in order to +# enable MMIO PCI MMCFG access. +# +append qemu_args "-smp 1" + +run_genode_until forever diff --git a/repos/libports/src/test/suspend/component.cc b/repos/libports/src/test/suspend/component.cc new file mode 100644 index 0000000000..6b7b90d5e1 --- /dev/null +++ b/repos/libports/src/test/suspend/component.cc @@ -0,0 +1,124 @@ +/* + * \brief Test to trigger ACPI S3 suspend via Pd::managing_system() + * \author Alexander Boettcher + * \date 2022-08-01 + * + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include +#include + + +using namespace Genode; + + +class Suspend +{ + private: + + Env &_env; + Attached_rom_dataspace _system_rom { _env, "system" }; + Attached_rom_dataspace _sleep_support { _env, "sleep_states" }; + Signal_handler _handler { _env.ep(), *this, + &Suspend::system_update }; + + uint8_t s3_sleep_typea { }; + uint8_t s3_sleep_typeb { }; + bool s3_sleep_valid { }; + + void suspend() + { + /* + * S0: normal power on + * S1: low wake latency sleeping - cpu caches off - no reset vector used on resume in kernel ! + * S2: low wake latency sleep - start from reset vector + * S3: low wake latency sleep - some parts powered off -> "suspend to RAM" + * S4: long wake latency sleep - "suspend to disk" + * S5: soft off state + */ + + if (!s3_sleep_valid) { + warning("suspend ... denied"); + return; + } + + log("suspend S3 (", s3_sleep_typea, ",", s3_sleep_typeb, ") ..."); + + Pd_session::Managing_system_state in, out; + + in.trapno = Pd_session::Managing_system_state::ACPI_SUSPEND_REQUEST; + in.ip = s3_sleep_typea; + in.sp = s3_sleep_typeb; + + out = _env.pd().managing_system (in); + + if (!out.trapno) + log("suspend failed"); + else + log("resumed from S3"); + } + + void system_update() + { + _system_rom.update(); + _sleep_support.update(); + + if (_system_rom.valid()) { + auto state = _system_rom.xml().attribute_value("state", + String<16>("")); + + log("system update requested to '", state, "'"); + + if (state == "suspend") + suspend(); + } + + if (_sleep_support.valid()) { + _sleep_support.xml().with_optional_sub_node("S3", [&] (auto const &node) { + auto const typea = "SLP_TYPa"; + auto const typeb = "SLP_TYPb"; + + s3_sleep_valid = node.attribute_value("supported", false) && + node.has_attribute(typea) && + node.has_attribute(typeb); + + if (s3_sleep_valid) { + unsigned tmpa = node.attribute_value(typea, 0u); + unsigned tmpb = node.attribute_value(typeb, 0u); + if (tmpa < 256) + s3_sleep_typea = uint8_t(node.attribute_value(typea, 0u)); + else + s3_sleep_valid = false; + + if (tmpb < 256) + s3_sleep_typeb = uint8_t(node.attribute_value(typeb, 0u)); + else + s3_sleep_valid = false; + } + }); + } + } + + public: + + Suspend(Env &env) : _env(env) + { + _system_rom.sigh(_handler); + _sleep_support.sigh(_handler); + + system_update(); + } +}; + +void Component::construct(Genode::Env &env) +{ + static Suspend suspend(env); +} diff --git a/repos/libports/src/test/suspend/target.mk b/repos/libports/src/test/suspend/target.mk new file mode 100644 index 0000000000..b8548910ae --- /dev/null +++ b/repos/libports/src/test/suspend/target.mk @@ -0,0 +1,5 @@ +TARGET = test-suspend +SRC_CC = component.cc +LIBS = base + +REQUIRES := x86 From 327427095181924a535302a4b2dd640e3aa0094b Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 15 Nov 2022 14:18:14 +0100 Subject: [PATCH 0082/1921] os: remove audio_out_click run-script Almost a duplicate of repos/dde_bsd/run/audio_out.run Ref genodelabs/genode#4671 --- repos/os/run/audio_out_click.run | 116 ------------------------------- 1 file changed, 116 deletions(-) delete mode 100644 repos/os/run/audio_out_click.run diff --git a/repos/os/run/audio_out_click.run b/repos/os/run/audio_out_click.run deleted file mode 100644 index a3a949205b..0000000000 --- a/repos/os/run/audio_out_click.run +++ /dev/null @@ -1,116 +0,0 @@ -assert_spec x86 - -# -# Build -# - -set build_components { - core init timer - drivers/audio - drivers/ps2 - server/mixer - test/audio_out - test/audio_out_click -} - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - -create_boot_directory - -# -# Config -# - -append config { - - - - - - - - - - - - - - - - - - } - -append_platform_drv_config - -append config { - - - - - - - - - - - - - - - - - - - - - - - sample.raw - - - - - - - - - - - - - -} - -install_config $config - - -if {[expr ![file exists bin/sample.raw] || ![file exists bin/click.raw]]} { - puts "" - puts "The sample and/or click file is missing. Please take a look at" - puts "repos/dde_bsd/README, create 'sample.raw' and/or 'click.raw'" - puts "and put the file(s) into './bin'. afterwards" - puts "" - exit 1 -} - -# -# Boot modules -# - -append boot_modules { - core ld.lib.so init timer mixer ps2_drv } [audio_drv_binary] { - test-audio_out test-audio_out_click - sample.raw click.raw } - -# platform-specific modules -append_platform_drv_boot_modules - -build_boot_image $boot_modules - -append qemu_args " -nographic -soundhw es1370 " - -run_genode_until forever From de083efcf2b63c4b562b02daf61c6c336f6d21d0 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 15 Nov 2022 14:37:38 +0100 Subject: [PATCH 0083/1921] os: remove platform_drv.inc from run-scripts * block_tester.run: use Linux only * vfs_block: was not dependent on platform_drv anyway Ref genodelabs/genode#4671 --- repos/os/run/block_tester.run | 112 +++++----------------------------- repos/os/run/vfs_block.run | 37 ++--------- 2 files changed, 19 insertions(+), 130 deletions(-) diff --git a/repos/os/run/block_tester.run b/repos/os/run/block_tester.run index cda437d220..d1ad2c19b3 100644 --- a/repos/os/run/block_tester.run +++ b/repos/os/run/block_tester.run @@ -1,12 +1,4 @@ -assert_spec x86 - -set use_linux [have_spec linux] - -if {[get_cmd_switch --autopilot] && ![have_include "power_on/qemu"]} { - puts "\n Run script is not supported on this platform. \n"; - exit 0 -} - +assert_spec linux # # Check used commands @@ -15,31 +7,15 @@ set dd [installed_command dd] set sfdisk [installed_command sfdisk] set sgdisk [installed_command sgdisk] -set drv0 "ahci_drv" -set drv1 "ahci_drv" - -if { $use_linux } { - set drv0 "lx_block0" - set drv1 "lx_block1" -} - -# -# Build -# -set build_components { +create_boot_directory +build { core init timer - drivers/ahci server/lx_block server/report_rom app/block_tester server/part_block } -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - proc create_disk_image {number} { global dd global sfdisk @@ -50,17 +26,12 @@ proc create_disk_image {number} { if { $number == 0 } { exec echo -e "2048 2097151 - -\n2099200 2095070 - -" | $sfdisk -f bin/block$number.raw } else { - exec $sgdisk --clear bin/block$number.raw - exec $sgdisk -n1:2048:2099199 -n2:2099200:4194270 bin/block$number.raw + catch { exec $sgdisk --clear bin/block$number.raw } + catch { exec $sgdisk -n1:2048:2099199 -n2:2099200:4194270 bin/block$number.raw } } } -create_boot_directory - -# -# Generate config -# -append config { +install_config { @@ -80,37 +51,15 @@ append config { - } + -append_platform_drv_config - -append config { -} -append_if [expr !$use_linux] config { - - - - - - - - - - - - - - -} - -append_if $use_linux config { @@ -123,18 +72,14 @@ append_if $use_linux config { -} -append config { - } - append config " - " - append config { + + @@ -143,15 +88,14 @@ append config { + - } - append config " - " - append config { + + @@ -160,9 +104,7 @@ append config { -} -append config { @@ -176,9 +118,7 @@ append config { -} -append config { @@ -248,9 +188,7 @@ append config { -} -append config { @@ -264,9 +202,7 @@ append config { -} -append config { @@ -337,35 +273,15 @@ append config { } -install_config $config - create_disk_image 0 create_disk_image 1 -# -# Boot modules -# - -# generic modules -set boot_modules { - core init timer ahci_drv block_tester report_rom +build_boot_image { + core init timer block_tester report_rom ld.lib.so part_block -} - -append_if $use_linux boot_modules { block0.raw block1.raw lx_block } -append_platform_drv_boot_modules - -build_boot_image $boot_modules - -append qemu_args " -nographic -nographic" -append qemu_args " -drive id=disk,file=bin/block0.raw,format=raw,if=none \ - -drive id=disk2,file=bin/block1.raw,format=raw,if=none \ - -device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0 \ - -device ide-hd,drive=disk2,bus=ahci.1 -boot d" - run_genode_until {.*--- all tests finished ---.*\n} 360 set serial_id [output_spawn_id] run_genode_until {.*--- all tests finished ---.*\n} 360 $serial_id diff --git a/repos/os/run/vfs_block.run b/repos/os/run/vfs_block.run index 55243f5a64..3622c80882 100644 --- a/repos/os/run/vfs_block.run +++ b/repos/os/run/vfs_block.run @@ -1,7 +1,5 @@ -# -# Build -# -set build_components { +create_boot_directory +build { core init timer server/vfs server/vfs_block @@ -9,18 +7,7 @@ set build_components { lib/vfs_import } -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - - -create_boot_directory - -# -# Generate config -# -append config { +install_config { @@ -41,11 +28,7 @@ append config { - } - -append_platform_drv_config - -append config { + @@ -122,19 +105,9 @@ append config { } -install_config $config - -# -# Boot modules -# - -set boot_modules { +build_boot_image { core init timer vfs vfs_block block_tester ld.lib.so vfs.lib.so vfs_import.lib.so } -append_platform_drv_boot_modules - -build_boot_image $boot_modules - run_genode_until {.*child "block_tester" exited with exit value 0.*\n} 60 From 08378dd148b6e009349d805fa6e1eb01ca6b5d21 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 15 Nov 2022 15:54:02 +0100 Subject: [PATCH 0084/1921] libports: remove platform_drv.inc from run-scripts Ref genodelabs/genode#4671 --- repos/libports/run/libc_with_libc.run | 24 ++------- repos/libports/run/mupdf.run | 15 ++---- repos/libports/run/oss.run | 73 +++++++++++++++++++-------- repos/libports/run/webcam.inc | 73 +++++++++++++++++++-------- 4 files changed, 111 insertions(+), 74 deletions(-) diff --git a/repos/libports/run/libc_with_libc.run b/repos/libports/run/libc_with_libc.run index 27439ee4e6..eb2ce9d91b 100644 --- a/repos/libports/run/libc_with_libc.run +++ b/repos/libports/run/libc_with_libc.run @@ -1,15 +1,8 @@ -set build_components { - core init timer test/libc_with_libc -} - -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components +build { core init timer test/libc_with_libc } create_boot_directory -set config { +install_config { @@ -28,11 +21,8 @@ set config { - } + -append_platform_drv_config - -append config { @@ -42,18 +32,12 @@ append config { } -install_config $config - -set boot_modules { +build_boot_image { core init timer ld.lib.so libc.lib.so vfs.lib.so test-libc_with_libc } -append_platform_drv_boot_modules - -build_boot_image $boot_modules - append qemu_args " -nographic " run_genode_until ".*finished with_libc tests.*\n" 10 diff --git a/repos/libports/run/mupdf.run b/repos/libports/run/mupdf.run index 32be5c1764..0dd70e06b9 100644 --- a/repos/libports/run/mupdf.run +++ b/repos/libports/run/mupdf.run @@ -1,11 +1,6 @@ -set build_components { app/pdf_view } - -source ${genode_dir}/repos/base/run/platform_drv.inc - -build $build_components +build { app/pdf_view } create_boot_directory - import_from_depot \ [depot_user]/pkg/[drivers_interactive_pkg] \ [depot_user]/pkg/motif_wm \ @@ -13,7 +8,7 @@ import_from_depot \ [depot_user]/src/init \ [depot_user]/src/nitpicker \ -set config { +install_config { @@ -96,8 +91,6 @@ set config { } -install_config $config - # # Download test PDF file # @@ -118,7 +111,7 @@ set fd [open [run_dir]/genode/focus w] puts $fd " focus\"/>" close $fd -append boot_modules { +build_boot_image { libc.lib.so vfs.lib.so libm.lib.so openjpeg.lib.so freetype.lib.so libpng.lib.so zlib.lib.so jbig2dec.lib.so mupdf.lib.so jpeg.lib.so @@ -126,8 +119,6 @@ append boot_modules { test.pdf } -build_boot_image $boot_modules - append qemu_args " -m 800" run_genode_until forever diff --git a/repos/libports/run/oss.run b/repos/libports/run/oss.run index c6c070d4e7..a1ef5faeda 100644 --- a/repos/libports/run/oss.run +++ b/repos/libports/run/oss.run @@ -1,3 +1,5 @@ +assert_spec x86 + if {[have_board linux]} { puts "Run script does not support Linux." exit 0 @@ -8,20 +10,19 @@ if {[have_include "power_on/qemu"]} { exit 0 } -set build_components { +build { core init timer + drivers/acpi drivers/audio + drivers/platform + app/pci_decode + server/report_rom lib/vfs_oss test/oss } -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components - -build $build_components - create_boot_directory -append config { +install_config { @@ -37,17 +38,55 @@ append config { + -} -append_platform_drv_config + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -append config { - + @@ -61,6 +100,7 @@ append config { + @@ -81,18 +121,11 @@ append config { } -install_config $config - -set boot_modules { +build_boot_image { core init timer test-oss ld.lib.so libc.lib.so vfs.lib.so libm.lib.so posix.lib.so vfs_oss.lib.so + pci_audio_drv platform_drv pci_decode acpi_drv report_rom } -append boot_modules [audio_drv_binary] - -append_platform_drv_boot_modules - -build_boot_image $boot_modules - run_genode_until forever diff --git a/repos/libports/run/webcam.inc b/repos/libports/run/webcam.inc index bd74817677..70dcd36f1f 100644 --- a/repos/libports/run/webcam.inc +++ b/repos/libports/run/webcam.inc @@ -1,7 +1,5 @@ assert_spec x86 -set build_components { } - # fuji4 proc libuvc_vendor_id {} { return "0x04f2" } proc libuvc_product_id {} { return "0xb564" } @@ -19,26 +17,23 @@ proc libuvc_product_id {} { return "0xb564" } #proc libuvc_product_id {} { return "0x58db" } - create_boot_directory import_from_depot [depot_user]/src/[base_src] \ + [depot_user]/pkg/usb_webcam \ + [depot_user]/src/acpi_drv \ + [depot_user]/src/dynamic_rom \ [depot_user]/src/init \ [depot_user]/src/nitpicker \ - [depot_user]/src/dynamic_rom \ - [depot_user]/src/rom_reporter \ - [depot_user]/src/report_rom \ [depot_user]/src/pc_usb_host_drv \ - [depot_user]/src/vesa_drv \ - [depot_user]/pkg/usb_webcam + [depot_user]/src/pci_decode \ + [depot_user]/src/platform_drv \ + [depot_user]/src/report_rom \ + [depot_user]/src/rom_reporter \ + [depot_user]/src/vesa_drv import_from_depot $test_imports -source ${genode_dir}/repos/base/run/platform_drv.inc -append_platform_drv_build_components -build $build_components - - append config { @@ -56,11 +51,7 @@ append config { -} -append_platform_drv_config - -append config { @@ -69,6 +60,48 @@ append config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -180,11 +213,7 @@ append config { install_config $config -append_platform_drv_boot_modules - -append boot_modules { } - -build_boot_image $boot_modules +build_boot_image { } append qemu_args { -usb -device usb-host,vendorid=[libuvc_vendor_id],productid=[libuvc_product_id] } From 9e61fb90c57cebfd399ac4dc8531ad539e99df21 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 15 Nov 2022 15:59:31 +0100 Subject: [PATCH 0085/1921] Remove legacy platform_drv, API, and platform.inc Fix genodelabs/genode#4671 --- repos/base/run/platform_drv.inc | 261 ---- .../legacy/x86/platform_device/capability.h | 19 - .../legacy/x86/platform_device/client.h | 64 - .../legacy/x86/platform_device/device.h | 38 - .../x86/platform_device/platform_device.h | 262 ---- .../legacy/x86/platform_session/capability.h | 22 - .../legacy/x86/platform_session/client.h | 53 - .../legacy/x86/platform_session/connection.h | 51 - .../x86/platform_session/platform_session.h | 112 -- .../recipes/api/platform_session/content.mk | 8 +- .../os/src/drivers/platform/legacy/x86/README | 207 --- .../platform/legacy/x86/acpi_devices.cc | 207 --- .../platform/legacy/x86/acpi_devices.h | 71 - .../drivers/platform/legacy/x86/device_pd.cc | 117 -- .../drivers/platform/legacy/x86/device_pd.h | 124 -- .../os/src/drivers/platform/legacy/x86/irq.cc | 296 ---- .../os/src/drivers/platform/legacy/x86/irq.h | 189 --- .../drivers/platform/legacy/x86/irq_proxy.h | 141 -- .../src/drivers/platform/legacy/x86/main.cc | 215 --- .../platform/legacy/x86/nonpci_devices.cc | 363 ----- .../drivers/platform/legacy/x86/pci_bridge.h | 62 - .../platform/legacy/x86/pci_config_access.h | 265 ---- .../drivers/platform/legacy/x86/pci_device.cc | 341 ----- .../legacy/x86/pci_device_component.h | 608 -------- .../platform/legacy/x86/pci_device_config.h | 458 ------ .../legacy/x86/pci_session_component.h | 1224 ----------------- .../drivers/platform/legacy/x86/session.cc | 161 --- .../src/drivers/platform/legacy/x86/target.mk | 9 - 28 files changed, 1 insertion(+), 5947 deletions(-) delete mode 100644 repos/base/run/platform_drv.inc delete mode 100644 repos/os/include/legacy/x86/platform_device/capability.h delete mode 100644 repos/os/include/legacy/x86/platform_device/client.h delete mode 100644 repos/os/include/legacy/x86/platform_device/device.h delete mode 100644 repos/os/include/legacy/x86/platform_device/platform_device.h delete mode 100644 repos/os/include/legacy/x86/platform_session/capability.h delete mode 100644 repos/os/include/legacy/x86/platform_session/client.h delete mode 100644 repos/os/include/legacy/x86/platform_session/connection.h delete mode 100644 repos/os/include/legacy/x86/platform_session/platform_session.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/README delete mode 100644 repos/os/src/drivers/platform/legacy/x86/acpi_devices.cc delete mode 100644 repos/os/src/drivers/platform/legacy/x86/acpi_devices.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/device_pd.cc delete mode 100644 repos/os/src/drivers/platform/legacy/x86/device_pd.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/irq.cc delete mode 100644 repos/os/src/drivers/platform/legacy/x86/irq.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/irq_proxy.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/main.cc delete mode 100644 repos/os/src/drivers/platform/legacy/x86/nonpci_devices.cc delete mode 100644 repos/os/src/drivers/platform/legacy/x86/pci_bridge.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/pci_config_access.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/pci_device.cc delete mode 100644 repos/os/src/drivers/platform/legacy/x86/pci_device_component.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/pci_device_config.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/pci_session_component.h delete mode 100644 repos/os/src/drivers/platform/legacy/x86/session.cc delete mode 100644 repos/os/src/drivers/platform/legacy/x86/target.mk diff --git a/repos/base/run/platform_drv.inc b/repos/base/run/platform_drv.inc deleted file mode 100644 index 3da9f74d87..0000000000 --- a/repos/base/run/platform_drv.inc +++ /dev/null @@ -1,261 +0,0 @@ -proc have_platform_drv {} { - return [expr [have_board pc]] -} - - -## -# Return name of the USB driver binary -# -proc usb_host_drv_binary { } { - if {[have_board rpi]} { return legacy_rpi_usb_host_drv } - if {[have_board imx6q_sabrelite]} { return legacy_imx6q_sabrelite_usb_host_drv } - if {[have_board pc]} { return pc_usb_host_drv } - return no_usb_drv_available -} - - -## -# Return name of the audio driver binary -# -proc audio_drv_binary { } { - if {[have_board linux]} { return linux_audio_drv } - if {[have_board pc]} { return pci_audio_drv } - return no_audio_drv_available -} - -## -# Return attributes of the audio driver's node -# -proc audio_drv_start_attr { } { - if {[have_board linux]} { return {ld="no"} } - return "" -} - -proc acpi_drv_name { } { - global use_acpica_as_acpi_drv - if {[info exists use_acpica_as_acpi_drv] && $use_acpica_as_acpi_drv} { - return acpica } - - return acpi_drv -} - -proc platform_drv_build_components {} { - set drv_build_components "" - if {[have_board pc]} { - lappend drv_build_components drivers/platform/legacy/x86 - lappend drv_build_components server/report_rom - if {[acpi_drv_name] eq "acpi_drv"} { - lappend drv_build_components drivers/acpi - } - if {[acpi_drv_name] eq "acpica"} { - lappend drv_build_components app/acpica - } - } - return $drv_build_components -} - - -proc append_platform_drv_build_components {} { - global build_components - append build_components { } [platform_drv_build_components] -} - -proc platform_drv_binary {} { - if {[have_board pc]} { return legacy_pc_platform_drv } - return no_platform_drv_available -} - -proc platform_drv_boot_modules {} { - set drv_boot_modules "" - lappend_if [have_platform_drv] drv_boot_modules [platform_drv_binary] - - if {[have_board pc]} { - lappend drv_boot_modules report_rom - lappend drv_boot_modules [acpi_drv_name] - } - - return $drv_boot_modules -} - -proc append_platform_drv_boot_modules {} { - global boot_modules - append boot_modules { } [platform_drv_boot_modules] -} - - -proc platform_drv_policy {} { - - if {![have_board pc]} { - return {} - } - - set drv_policy "" - - if {[acpi_drv_name] eq "acpica"} { - append drv_policy { - } - } - - append drv_policy { - - - - - - - - - - - - - } - - return $drv_policy -} - - -proc platform_drv_priority {} { return "" } -proc platform_drv_add_routing {} { - - if {[acpi_drv_name] eq "acpica"} { - return { - } - } - - return "" -} - - -proc platform_drv_config_config {} { - if {[acpi_drv_name] eq "acpica"} { - return { - } - } - - return {} -} - - -proc platform_drv_config {} { - set drv_config "" - - if {[have_board pc]} { - - append drv_config { - - } - - if {[acpi_drv_name] eq "acpica"} { - append drv_config { - - } - } else { - append drv_config { - } - } - - append drv_config { - - - - - - - } - - append_if [expr {[acpi_drv_name] eq "acpica"}] drv_config { - - - - - } - - append drv_config { - - - - } - - append drv_config " - " - - append drv_config { - - - - - - - - - - } - - append_if [expr {[acpi_drv_name] eq "acpica"}] drv_config { - } - - append drv_config { - - - - - - - - } - - } - - if {[have_platform_drv]} { - - append drv_config { - - - - - } - - append_if [have_board pc] drv_config { - } - - append_if [have_spec arm] drv_config { - } - - append drv_config { - - } - - append drv_config "[platform_drv_add_routing]" - - append_if [have_board pc] drv_config { - } - - append_if [expr [have_board pc]] drv_config { - } - - append_if [expr [have_board rpi] || [have_board pc]] drv_config { - } - - append drv_config { - - } - - append drv_config [platform_drv_config_config] - append drv_config [platform_drv_policy] - - append drv_config { - - } - - } - - return $drv_config -} - - -proc append_platform_drv_config {} { - global config - append config [platform_drv_config] - return $config -} diff --git a/repos/os/include/legacy/x86/platform_device/capability.h b/repos/os/include/legacy/x86/platform_device/capability.h deleted file mode 100644 index 6fc9cd1d5c..0000000000 --- a/repos/os/include/legacy/x86/platform_device/capability.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * \brief Device capability type - * \author Norman Feske - * \date 2008-08-16 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#pragma once - -#include -#include - -namespace Platform { typedef Genode::Capability Device_capability; } diff --git a/repos/os/include/legacy/x86/platform_device/client.h b/repos/os/include/legacy/x86/platform_device/client.h deleted file mode 100644 index 5883ec6913..0000000000 --- a/repos/os/include/legacy/x86/platform_device/client.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * \brief Client-side interface for PCI device - * \author Norman Feske - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__CLIENT_H_ -#define _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__CLIENT_H_ - -#include -#include -#include -#include - -namespace Platform { struct Device_client; } - - -struct Platform::Device_client : public Rpc_client -{ - Device_client(Device_capability device) - : Rpc_client(device) { } - - void bus_address(unsigned char *bus, unsigned char *dev, unsigned char *fn) override { - call(bus, dev, fn); } - - unsigned short vendor_id() override { - return call(); } - - unsigned short device_id() override { - return call(); } - - unsigned class_code() override { - return call(); } - - Resource resource(int resource_id) override { - return call(resource_id); } - - unsigned config_read(unsigned char address, Access_size size) override { - return call(address, size); } - - void config_write(unsigned char address, unsigned value, Access_size size) override { - call(address, value, size); } - - Irq_session_capability irq(uint8_t id) override { - return call(id); } - - Io_port_session_capability io_port(uint8_t id) override { - return call(id); } - - Io_mem_session_capability io_mem(uint8_t id, - Cache cache = Cache::UNCACHED, - addr_t offset = 0, - size_t size = ~0UL) override { - return call(id, cache, offset, size); } -}; - -#endif /* _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__CLIENT_H_ */ diff --git a/repos/os/include/legacy/x86/platform_device/device.h b/repos/os/include/legacy/x86/platform_device/device.h deleted file mode 100644 index 06f2657fd8..0000000000 --- a/repos/os/include/legacy/x86/platform_device/device.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * \brief Abstract platform device interface - * \author Alexander Boettcher - * \date 2015-03-15 - */ - -/* - * Copyright (C) 2015-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__DEVICE_H_ -#define _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__DEVICE_H_ - -#include -#include -#include -#include - -namespace Platform { class Abstract_device; } - -struct Platform::Abstract_device : Genode::Interface -{ - /** - * Get IRQ session capability - */ - virtual Genode::Irq_session_capability irq(Genode::uint8_t) = 0; - - /** - * Get IO mem session capability of specified resource id - */ - virtual Genode::Io_mem_session_capability io_mem(Genode::uint8_t, Genode::Cache, - Genode::addr_t, Genode::size_t) = 0; -}; - -#endif /* _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__DEVICE_H_ */ diff --git a/repos/os/include/legacy/x86/platform_device/platform_device.h b/repos/os/include/legacy/x86/platform_device/platform_device.h deleted file mode 100644 index e628a5d689..0000000000 --- a/repos/os/include/legacy/x86/platform_device/platform_device.h +++ /dev/null @@ -1,262 +0,0 @@ -/* - * \brief PCI-device interface - * \author Norman Feske - * \author Christian Helmuth - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__PLATFORM_DEVICE_H_ -#define _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__PLATFORM_DEVICE_H_ - -/* Genode includes */ -#include -#include -#include -#include -#include -#include -#include - -/* os includes */ -#include - -namespace Platform { - - using namespace Genode; - - struct Device; -} - - -struct Platform::Device : Platform::Abstract_device -{ - /********************* - ** Exception types ** - *********************/ - - class Resource - { - private: - - unsigned _bar = 0; /* content of base-address register */ - unsigned _size = 0; /* resource size */ - - public: - - /** - * Resource type, either port I/O resource or memory-mapped resource - */ - enum Type { IO, MEMORY, INVALID }; - - /** - * Default constructor - */ - Resource() { } - - /** - * Constructor - * - * \param bar content of base-address register - * \param size resource size - * - * This constructor is only used by the PCI bus driver - * that implements the server-side of the the PCI session. - * If bar is set to zero, the constructed resource description - * represents an INVALID resource. - */ - Resource(unsigned bar, unsigned size) - : _bar(bar), _size(size) { } - - /** - * Return base address of resource - */ - unsigned base() const - { - /* - * Mask out the resource-description bits of the base - * address register. I/O resources use the lowest 2 - * bits, memory resources use the lowest 4 bits. - */ - return _bar & ((type() == IO) ? ~3 : ~15); - } - - /** - * Return resource size in bytes - */ - unsigned size() const { return _size; } - - /** - * Return true if resource is prefetchable memory - */ - bool prefetchable() const - { - return type() == MEMORY && (_bar & (1 << 3)); - } - - /** - * Return resource type - */ - Type type() const - { - if (_bar == 0) - return INVALID; - - return (_bar & 1) ? IO : MEMORY; - } - - /** - * Return raw register content - */ - unsigned bar() const { return _bar; } - }; - - enum { NUM_RESOURCES = 6 }; - - virtual ~Device() { } - - /** - * Return bus, device, and function number of the device - */ - virtual void bus_address(unsigned char *bus, unsigned char *dev, - unsigned char *fn) = 0; - - /** - * Return vendor ID obtained from the PCI config space - */ - virtual unsigned short vendor_id() = 0; - - /** - * Return device ID obtained from the PCI config space - */ - virtual unsigned short device_id() = 0; - - /** - * Return device class code from the PCI config space - */ - virtual unsigned class_code() = 0; - - /** - * Query PCI-resource information - * - * \param resource_id index of according PCI resource of the device - * - * \return resource description - * \retval INVALID the supplied resource ID is invalid - */ - virtual Resource resource(int resource_id) = 0; - - /** - * Access size for operations directly accessing the config space - */ - enum Access_size { ACCESS_8BIT, ACCESS_16BIT, ACCESS_32BIT }; - - /** - * Read configuration space - */ - virtual unsigned config_read(unsigned char address, Access_size size) = 0; - - /** - * Write configuration space - * - * \throw Out_of_ram - * \throw Out_of_caps - */ - virtual void config_write(unsigned char address, unsigned value, - Access_size size) = 0; - - /** - * Query Io_port of specified bar - * - * \param id index of according PCI resource of the device - * - * \throw Out_of_ram - * \throw Out_of_caps - */ - virtual Io_port_session_capability io_port(uint8_t id) = 0; - - /* - * The base classes are defined as follows: - * - * 0x00 | legacy device - * 0x01 | mass-storage controller - * 0x02 | network controller - * 0x03 | display controller - * 0x04 | multimedia device - * 0x05 | memory controller - * 0x06 | bridge device - * 0x07 | simple-communication controller - * 0x08 | base-system peripheral - * 0x09 | input device - * 0x0a | docking station - * 0x0b | processor - * 0x0c | serial bus controller - * 0x0d | wireless controller - * 0x0e | intelligent I/O controller - * 0x0f | satellite-communications controller - * 0x10 | encryption/decryption controller - * 0x11 | data-acquisition and signal-processing controller - * 0x12 | reserved - * ... | - * 0xff | device does not fit in any of the defined classes - */ - - unsigned base_class() { return class_code() >> 16; } - unsigned sub_class() { return (class_code() >> 8) & 0xff; } - - /** - * Convenience method to translate a PCI physical BAR id to a Genode - * virtual one usable with the io_port and io_mem methods. The virtual id - * is solely valid for the specific BAR type. - */ - uint8_t phys_bar_to_virt(uint8_t phys_bar) - { - uint8_t virt_io_port = 0, virt_io_mem = 0; - - for (unsigned i = 0; i < phys_bar; i++) { - Resource::Type type = resource(i).type(); - if (type == Resource::Type::IO) - virt_io_port ++; - else if (type == Resource::Type::MEMORY) - virt_io_mem ++; - } - - Resource::Type type = resource(phys_bar).type(); - return type == Resource::Type::IO ? virt_io_port : virt_io_mem; - } - - /********************* - ** RPC declaration ** - *********************/ - - GENODE_RPC(Rpc_bus_address, void, bus_address, - unsigned char *, unsigned char *, unsigned char *); - GENODE_RPC(Rpc_vendor_id, unsigned short, vendor_id); - GENODE_RPC(Rpc_device_id, unsigned short, device_id); - GENODE_RPC(Rpc_class_code, unsigned, class_code); - GENODE_RPC(Rpc_resource, Resource, resource, int); - GENODE_RPC(Rpc_config_read, unsigned, config_read, - unsigned char, Access_size); - GENODE_RPC_THROW(Rpc_config_write, void, config_write, - GENODE_TYPE_LIST(Out_of_ram, Out_of_caps), - unsigned char, unsigned, Access_size); - GENODE_RPC(Rpc_irq, Irq_session_capability, irq, uint8_t); - GENODE_RPC_THROW(Rpc_io_port, Io_port_session_capability, io_port, - GENODE_TYPE_LIST(Out_of_ram, Out_of_caps), - uint8_t); - GENODE_RPC_THROW(Rpc_io_mem, Io_mem_session_capability, io_mem, - GENODE_TYPE_LIST(Out_of_ram, Out_of_caps), - uint8_t, Cache, addr_t, size_t); - - GENODE_RPC_INTERFACE(Rpc_bus_address, Rpc_vendor_id, Rpc_device_id, - Rpc_class_code, Rpc_resource, Rpc_config_read, - Rpc_config_write, Rpc_irq, Rpc_io_port, Rpc_io_mem); -}; - -#endif /* _INCLUDE__LEGACY__X86__PLATFORM_DEVICE__PLATFORM_DEVICE_H_ */ diff --git a/repos/os/include/legacy/x86/platform_session/capability.h b/repos/os/include/legacy/x86/platform_session/capability.h deleted file mode 100644 index d6b128b020..0000000000 --- a/repos/os/include/legacy/x86/platform_session/capability.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * \brief Platform session capability type - * \author Stefan Kalkowski - * \date 2013-04-29 - */ - -/* - * Copyright (C) 2013-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__LEGACY__X86__PLATFORM_SESSION__CAPABILITY_H_ -#define _INCLUDE__LEGACY__X86__PLATFORM_SESSION__CAPABILITY_H_ - -#include -#include - -namespace Platform { typedef Genode::Capability Session_capability; } - -#endif /* _INCLUDE__LEGACY__X86__PLATFORM_SESSION__CAPABILITY_H_ */ diff --git a/repos/os/include/legacy/x86/platform_session/client.h b/repos/os/include/legacy/x86/platform_session/client.h deleted file mode 100644 index e3ad1016cd..0000000000 --- a/repos/os/include/legacy/x86/platform_session/client.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * \brief Client-side PCI-session interface - * \author Norman Feske - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__LEGACY__X86__PLATFORM_SESSION_H_ -#define _INCLUDE__LEGACY__X86__PLATFORM_SESSION_H_ - -#include -#include -#include - -namespace Platform { struct Client; } - - -struct Platform::Client : public Rpc_client -{ - Client(Session_capability session) : Rpc_client(session) { } - - Device_capability first_device(unsigned device_class = 0, - unsigned class_mask = 0) override { - return call(device_class, class_mask); } - - Device_capability next_device(Device_capability prev_device, - unsigned device_class = 0, - unsigned class_mask = 0) override { - return call(prev_device, device_class, class_mask); } - - void release_device(Device_capability device) override { - call(device); } - - Ram_dataspace_capability alloc_dma_buffer(size_t size, Cache cache) override { - return call(size, cache); } - - void free_dma_buffer(Ram_dataspace_capability cap) override { - call(cap); } - - addr_t dma_addr(Ram_dataspace_capability cap) override { - return call(cap); } - - Device_capability device(Device_name const &device) override { - return call(device); } -}; - -#endif /* _INCLUDE__LEGACY__X86__PLATFORM_SESSION_H_ */ diff --git a/repos/os/include/legacy/x86/platform_session/connection.h b/repos/os/include/legacy/x86/platform_session/connection.h deleted file mode 100644 index e0943e91c2..0000000000 --- a/repos/os/include/legacy/x86/platform_session/connection.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * \brief Connection to Platform service - * \author Norman Feske - * \date 2008-08-22 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__LEGACY__X86__PLATFORM_SESSION__CONNECTION_H_ -#define _INCLUDE__LEGACY__X86__PLATFORM_SESSION__CONNECTION_H_ - -#include -#include -#include - -namespace Platform { struct Connection; } - - -struct Platform::Connection : Genode::Connection, Client -{ - /** - * Constructor - */ - Connection(Env &env) - : - Genode::Connection(env, session(env.parent(), - "ram_quota=16K, cap_quota=%u", - CAP_QUOTA)), - Client(cap()) - { } - - template - auto with_upgrade(FUNC func) -> decltype(func()) - { - return retry( - [&] () { - return retry( - [&] () { return func(); }, - [&] () { this->upgrade_caps(2); }); - }, - [&] () { this->upgrade_ram(4096); } - ); - } -}; - -#endif /* _INCLUDE__LEGACY__X86__PLATFORM_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/legacy/x86/platform_session/platform_session.h b/repos/os/include/legacy/x86/platform_session/platform_session.h deleted file mode 100644 index d8ba9a6028..0000000000 --- a/repos/os/include/legacy/x86/platform_session/platform_session.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * \brief Platform session interface - * \author Norman Feske - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__LEGACY__X86__PLATFORM_SESSION__PLATFORM_SESSION_H_ -#define _INCLUDE__LEGACY__X86__PLATFORM_SESSION__PLATFORM_SESSION_H_ - -/* Genode includes */ -#include -#include -#include - -/* os includes */ -#include -#include - -namespace Platform { struct Session; } - - -struct Platform::Session : Genode::Session -{ - /** - * \noapi - */ - static const char *service_name() { return "Platform"; } - - enum { RAM_QUOTA = 16 * 1024, CAP_QUOTA = 2 }; - - virtual ~Session() { } - - /** - * Find first accessible device - */ - virtual Device_capability first_device(unsigned, unsigned) = 0; - - /** - * Find next accessible device - * - * \param prev_device previous device - * - * The 'prev_device' argument is used to iterate through all - * devices. - */ - virtual Device_capability next_device(Device_capability prev_device, - unsigned, unsigned) = 0; - - /** - * Free server-internal data structures representing the device - * - * Use this method to relax the heap partition of your PCI session. - */ - virtual void release_device(Device_capability device) = 0; - - typedef Rpc_in_buffer<8> Device_name; - - /** - * Provide non-PCI device known by unique name - */ - virtual Device_capability device(Device_name const &string) = 0; - - /** - * Allocate memory suitable for DMA - */ - virtual Ram_dataspace_capability alloc_dma_buffer(size_t, Cache) = 0; - - /** - * Free previously allocated DMA memory - */ - virtual void free_dma_buffer(Ram_dataspace_capability) = 0; - - /** - * Return the bus address of the previously allocated DMA memory - */ - virtual addr_t dma_addr(Ram_dataspace_capability) = 0; - - /********************* - ** RPC declaration ** - *********************/ - - GENODE_RPC_THROW(Rpc_first_device, Device_capability, first_device, - GENODE_TYPE_LIST(Out_of_ram, Out_of_caps), - unsigned, unsigned); - GENODE_RPC_THROW(Rpc_next_device, Device_capability, next_device, - GENODE_TYPE_LIST(Out_of_ram, Out_of_caps), - Device_capability, unsigned, unsigned); - GENODE_RPC(Rpc_release_device, void, release_device, Device_capability); - GENODE_RPC_THROW(Rpc_alloc_dma_buffer, Ram_dataspace_capability, - alloc_dma_buffer, - GENODE_TYPE_LIST(Out_of_ram, Out_of_caps), - size_t, Cache); - GENODE_RPC(Rpc_free_dma_buffer, void, free_dma_buffer, - Ram_dataspace_capability); - GENODE_RPC(Rpc_dma_addr, addr_t, dma_addr, Ram_dataspace_capability); - GENODE_RPC_THROW(Rpc_device, Device_capability, device, - GENODE_TYPE_LIST(Out_of_ram, Out_of_caps), - Device_name const &); - - GENODE_RPC_INTERFACE(Rpc_first_device, Rpc_next_device, - Rpc_release_device, Rpc_alloc_dma_buffer, - Rpc_free_dma_buffer, Rpc_dma_addr, Rpc_device); -}; - -#endif /* _INCLUDE__LEGACY__X86__PLATFORM_SESSION__PLATFORM_SESSION_H_ */ diff --git a/repos/os/recipes/api/platform_session/content.mk b/repos/os/recipes/api/platform_session/content.mk index eab9147ce0..ea809d6d40 100644 --- a/repos/os/recipes/api/platform_session/content.mk +++ b/repos/os/recipes/api/platform_session/content.mk @@ -1,9 +1,3 @@ -INCLUDE_SUB_DIRS := platform_session \ - legacy/x86/platform_session \ - legacy/x86/platform_device - -INCLUDE_DIRS := $(addprefix include/,$(INCLUDE_SUB_DIRS)) - -MIRRORED_FROM_REP_DIR := $(INCLUDE_DIRS) +MIRRORED_FROM_REP_DIR := include/platform_session include $(REP_DIR)/recipes/api/session.inc diff --git a/repos/os/src/drivers/platform/legacy/x86/README b/repos/os/src/drivers/platform/legacy/x86/README deleted file mode 100644 index 6391dc0346..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/README +++ /dev/null @@ -1,207 +0,0 @@ -This directory contains the implementation of Genode's x86 platform driver. - -Behavior --------- - -On startup the driver scans the PCI bus hierarchy and stores the found devices. -Per client a policy must be configured that states which client can -access certain devices to form a virtual pci bus per client. The client may -iterate through the virtual pci bus using the 'first' and 'next' methods of -the platform_session interface to discover all available devices of the virtual -bus. Non PCI devices may be discovered by using 'device' of the -platform_session interface. As a result of the discovery a client obtains a -device capability. - -With the device capability the resources of the devices can be obtained, e.g. -io_port, io_mem and irq of the platform_device interface. - -Policy usage ------------- - -A policy may contain several nodes describing several devices. The entries of -a policy may describe PCI devices as non PCI devices. A PCI device is -explicitly configured by the triple 'bus', 'device', 'function': - -! -! -! ... -! -! -! -! -! -! -! ... - -or more fuzzy by a device class alias: - -! -! -! ... -! -! -! -! -! -! ... - - -Non PCI devices, as the PS2 controller are named by a "device" node in the policy: - -! -! -! -! -! -! -! -! -! ... -! -! -! ... - -The managing_system attribute is evaluated by init. If set to "yes" it -permits a component, the platform driver, to restrict the allocation of memory to -specific physical RAM ranges. The platform driver uses this feature to ensure that -the allocation of DMA capable memory consider several restrictions. For -example, some drivers, as the UHCI controller, requires a -physical memory address below 4G. Another example is that on 32bit hosts -physical to virtual identical mappings of DMA memory for the device_pd -(required when IOMMU is used) must be below the kernel memory boundary (3G). -On some systems, e.g., base-hw kernel on certain ARM platforms, it allows the -platform driver to call system management firmware via kernel syscalls. - -The platform driver waits on startup on the first valid ACPI report, typically -provided dynamically by the acpi driver. -The report contains further information about the hardware the platform driver can -not discover (e.g. IRQ re-routing information, PCI ECAM/MMCONF information). - -A specific route to a report_rom service named 'acpi_report_rom' looks as -in the following: - -! -! ... -! -! -! -! -! ... -! -! ... - -Synchronize ACPI startup and platform driver --------------------------------------------- - -If the config attribute 'acpi_ready' is set to 'yes', the platform driver -monitors a ROM in XML format named 'acpi_ready'. - -! -! - -The platform driver will announce its service not as 'Platform', but instead -as 'Acpi' first. - -An ACPI application like acpica can connect to the platform driver and may -reconfigure hardware devices according to the ACPI table findings. If the -system state changes to "acpi_ready in the XML ROM 'acpi_ready': - -! - -the platform driver will announce the platform session as 'Platform', so -that drivers may start to operate with the platform driver. - -Supported PCI class aliases ---------------------------- - -The following class names are supported which correspond to the -specified PCI base class (B), sub class (S) and programming interface -(P) combinations. ('-' matches all devices in the category) - -alias B S P - -ALL - - - -AHCI 01 06 - -AUDIO 04 01 - -ETHERNET 02 00 - -HDAUDIO 04 03 - -ISABRIDGE 06 01 - -NVME 01 08 02 -USB 0c 03 00 10 20 30 -USB4 0c 03 40 -VGA 03 00 00 -WIFI 02 80 - - -Fixups for insufficient PCI BAR configuration ---------------------------------------------- - -If PCI devices happen to miss complete configuration after boot, the -platform driver supports nodes for concrete devices -(specified by bus-device-functions tuples). As depicted below, the - node instructs the platform driver to remap BAR id 0 to address -0x4017002000, which amends the BIOS configuration and is stringently -required for BARs with address 0. - -! -! -! - - -Supported non PCI devices -------------------------- - -The driver provides for the PS2 and PIT device the IO_PORT and IRQ resources. - -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! -! diff --git a/repos/os/src/drivers/platform/legacy/x86/acpi_devices.cc b/repos/os/src/drivers/platform/legacy/x86/acpi_devices.cc deleted file mode 100644 index ae1cf74d85..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/acpi_devices.cc +++ /dev/null @@ -1,207 +0,0 @@ -/* - * \brief ACPI device information from config - * \author Christian Helmuth - * \date 2022-05-16 - */ - -/* - * Copyright (C) 2022 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#include "acpi_devices.h" - -namespace Platform { namespace Acpi { - struct Device_impl; - - typedef String<16> Str; -}} - - -void Platform::Acpi::Device::Resource::print(Output &o) const -{ - using Genode::print; - switch (type) { - case Type::IRQ: - print(o, "IRQ [", base); - print(o, " ", irq == Irq::EDGE ? "edge" : irq == Irq::LEVEL_LOW ? "level-low" : "level-high"); - print(o, "]"); - break; - case Type::IOMEM: - print(o, "IOMEM "); - print(o, "[", Hex(base, Hex::Prefix::OMIT_PREFIX, Hex::PAD)); - print(o, "-", Hex(base + (size - 1), Hex::Prefix::OMIT_PREFIX, Hex::PAD)); - print(o, "]"); - break; - case Type::IOPORT: - print(o, "IOPORT "); - print(o, "[", Hex((unsigned short)base, Hex::Prefix::OMIT_PREFIX, Hex::PAD)); - print(o, "-", Hex((unsigned short)(base + (size - 1)), Hex::Prefix::OMIT_PREFIX, Hex::PAD)); - print(o, "]"); - break; - } -} - - -class Platform::Acpi::Device_impl : private Registry::Element, - public Platform::Acpi::Device -{ - private: - - Hid _hid; /* ACPI Spec 6.1.5 Hardware ID */ - - struct Resource_element : Registry::Element - { - unsigned id; - Resource res; - - Resource_element(Registry ®istry, - unsigned id, - Resource res) - : - Registry::Element(registry, *this), - id(id), res(res) - { } - }; - - Registry _resource_registry { }; - - Resource_result _lookup_resource(Resource::Type type, unsigned const id) const - { - Resource const *res = nullptr; - _resource_registry.for_each([&] (Resource_element const &e) { - if (e.res.type == type && e.id == id) - res = &e.res; - }); - - if (res) - return *res; - else - return Invalid_resource { }; - } - - unsigned _max_irq_id { 0 }; - unsigned _max_iomem_id { 0 }; - unsigned _max_ioport_id { 0 }; - - public: - - Device_impl(Registry ®istry, - Allocator &heap, Xml_node config) - : - Registry::Element(registry, *this), - _hid(config.attribute_value("name", Hid("ACPI0000"))) - { - config.for_each_sub_node("irq", [&] (Xml_node node) { - auto irq = [&] (Str const &mode, Str const &polarity) { - if (mode == "level") { - if (polarity == "high") - return Resource::Irq::LEVEL_HIGH; - else - return Resource::Irq::LEVEL_LOW; - } else { - return Resource::Irq::EDGE; - } - }; - new (heap) - Resource_element { - _resource_registry, - _max_irq_id++, - Resource { - .type = Resource::Type::IRQ, - .base = node.attribute_value("number", addr_t(0)), - .irq = irq(node.attribute_value("mode", Str("unchanged")), - node.attribute_value("polarity", Str("unchanged"))) } }; - }); - config.for_each_sub_node("io_mem", [&] (Xml_node node) { - new (heap) - Resource_element { - _resource_registry, - _max_iomem_id++, - Resource { - .type = Resource::Type::IOMEM, - .base = node.attribute_value("address", addr_t(0)), - .size = node.attribute_value("size", size_t(0)) } }; - }); - config.for_each_sub_node("io_port_range", [&] (Xml_node node) { - new (heap) - Resource_element { - _resource_registry, - _max_ioport_id++, - Resource { - .type = Resource::Type::IOPORT, - .base = node.attribute_value("address", addr_t(0)), - .size = node.attribute_value("size", size_t(0)) } }; - }); - } - - ~Device_impl() { error("unexpected call of ", __func__); } - - /* Platform::Acpi::Device interface */ - - Hid hid() const override { return _hid; } - - Resource_result resource(unsigned idx) const override - { - /* - * Index of all IOMEM and IOPORT resources - no IRQ! - * - * first _max_iomem_id IOMEM, then _max_ioport_id IOPORT - */ - if (idx < _max_iomem_id) - return iomem(idx); - else if (idx < _max_iomem_id + _max_ioport_id) - return ioport(idx - _max_iomem_id); - else - return Invalid_resource { }; - } - - Resource_result irq(unsigned id) const override - { - return _lookup_resource(Resource::Type::IRQ, id); - } - - Resource_result iomem(unsigned id) const override - { - return _lookup_resource(Resource::Type::IOMEM, id); - } - - Resource_result ioport(unsigned id) const override - { - return _lookup_resource(Resource::Type::IOPORT, id); - } -}; - - -Platform::Acpi::Device_registry::Lookup_result -Platform::Acpi::Device_registry::lookup(Platform::Acpi::Device::Hid hid) const -{ - Device const *found = nullptr; - - this->for_each([&] (Device const &device) { - if (device.hid() == hid) - found = &device; - }); - - if (found) - return found; - else - return Lookup_failed { }; -} - - -void Platform::Acpi::Device_registry::init_devices(Allocator &heap, Xml_node config) -{ - /* init only once */ - if (_initialized) - return; - - config.for_each_sub_node("device", [&] (Xml_node node) { - if (node.attribute_value("type", Str()) == "acpi") - new (heap) Device_impl(*this, heap, node); - }); - - _initialized = true; -} diff --git a/repos/os/src/drivers/platform/legacy/x86/acpi_devices.h b/repos/os/src/drivers/platform/legacy/x86/acpi_devices.h deleted file mode 100644 index 89e7aa98e3..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/acpi_devices.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - * \brief ACPI device information from config - * \author Christian Helmuth - * \date 2022-05-16 - */ - -/* - * Copyright (C) 2022 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#include -#include -#include -#include - - -namespace Platform { namespace Acpi { - using namespace Genode; - - class Device; - - class Device_registry; -} } - - -struct Platform::Acpi::Device : Interface -{ - typedef String<10> Hid; /* ACPI Spec 6.1.5 Hardware ID */ - - struct Resource - { - enum class Type { IRQ, IOMEM, IOPORT }; - - enum class Irq { EDGE, LEVEL_LOW, LEVEL_HIGH }; - - Type type; - addr_t base; - - union { - size_t size; - Irq irq; - }; - - void print(Output &o) const; - }; - - enum struct Invalid_resource { }; - typedef Attempt Resource_result; - - virtual Hid hid() const = 0; - virtual Resource_result resource(unsigned idx) const = 0; - virtual Resource_result irq(unsigned id) const = 0; - virtual Resource_result iomem(unsigned id) const = 0; - virtual Resource_result ioport(unsigned id) const = 0; -}; - - -struct Platform::Acpi::Device_registry : Genode::Registry -{ - bool _initialized { false }; - - void init_devices(Allocator &heap, Xml_node config); - - enum struct Lookup_failed { }; - typedef Attempt Lookup_result; - - Lookup_result lookup(Device::Hid name) const; -}; diff --git a/repos/os/src/drivers/platform/legacy/x86/device_pd.cc b/repos/os/src/drivers/platform/legacy/x86/device_pd.cc deleted file mode 100644 index 455a9f3342..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/device_pd.cc +++ /dev/null @@ -1,117 +0,0 @@ -/* - * \brief Pci device protection domain service for platform driver - * \author Alexander Boettcher - * \date 2013-02-10 - */ - -/* - * Copyright (C) 2013-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#include -#include -#include -#include - -#include - -#include "device_pd.h" - -void Platform::Device_pd::attach_dma_mem(Dataspace_capability ds_cap, - addr_t const dma_addr) -{ - using namespace Genode; - - Dataspace_client ds_client(ds_cap); - - size_t const size = ds_client.size(); - - addr_t page = ~0UL; - - using Attach_dma_error = Pd_session::Attach_dma_error; - - bool retry = false; - - do { - _pd.attach_dma(ds_cap, dma_addr).with_result( - - [&] (Pd_session::Attach_dma_ok) { - - page = dma_addr; - - /* trigger eager mapping of memory */ - _pd.map(page, size); - retry = false; - }, - [&] (Attach_dma_error e) { - switch (e) { - case Attach_dma_error::OUT_OF_RAM: - _address_space.upgrade_ram(); - retry = true; - break; - case Attach_dma_error::OUT_OF_CAPS: - _address_space.upgrade_caps(); - retry = true; - break; - case Attach_dma_error::DENIED: - warning("Pd_session::attach_dma denied"); - page = dma_addr; - retry = false; - break; - } - } - ); - } while (retry); - - /* sanity check */ - if ((page == ~0UL) || (page != dma_addr)) { - if (page != ~0UL) - _address_space.detach(page); - - error(_label, ": attachment of DMA memory @ ", - Hex(dma_addr), "+", Hex(size), " " "failed page=", Hex(page)); - return; - } -} - -void Platform::Device_pd::assign_pci(Io_mem_dataspace_capability const io_mem_cap, - addr_t const offset, uint16_t const rid) -{ - Dataspace_client ds_client(io_mem_cap); - - addr_t page = _address_space.attach(io_mem_cap, 0x1000, offset); - - /* sanity check */ - if (!page) - throw Region_map::Region_conflict(); - - /* trigger eager mapping of memory */ - _pd.map(page, 0x1000); - - /* utility to print rid value */ - struct Rid - { - uint16_t const v; - explicit Rid(uint16_t rid) : v(rid) { } - void print(Output &out) const - { - using Genode::print; - print(out, Hex((uint8_t)(v >> 8), Hex::Prefix::OMIT_PREFIX, Hex::PAD), ":", - Hex((uint8_t)((v >> 3) & 0x1f), Hex::Prefix::OMIT_PREFIX, Hex::PAD), ".", - Hex(v & 0x7, Hex::Prefix::OMIT_PREFIX)); - } - }; - - /* try to assign pci device to this protection domain */ - if (!_pd.assign_pci(page, rid)) - error(_label, ": assignment of PCI device ", Rid(rid), " failed ", - "virt=", Hex(page)); - else - log(_label,": assignment of PCI device ", Rid(rid), " succeeded"); - - /* we don't need the mapping anymore */ - _address_space.detach(page); -} diff --git a/repos/os/src/drivers/platform/legacy/x86/device_pd.h b/repos/os/src/drivers/platform/legacy/x86/device_pd.h deleted file mode 100644 index 366aaac867..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/device_pd.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * \brief Device PD handling for the platform driver - * \author Alexander Boettcher - * \date 2015-11-05 - */ - -/* - * Copyright (C) 2015-2021 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _DEVICE_PD_H_ -#define _DEVICE_PD_H_ - -/* base */ -#include -#include -#include -#include -#include - -/* os */ -#include - -namespace Platform { class Device_pd; } - - -class Platform::Device_pd -{ - private: - - Pd_connection _pd; - Session_label const &_label; - - /** - * Custom handling of PD-session depletion during attach operations - * - * The default implementation of 'env.rm()' automatically issues a resource - * request if the PD session quota gets exhausted. For the device PD, we don't - * want to issue resource requests but let the platform driver reflect this - * condition to its client. - */ - struct Expanding_region_map_client : Region_map_client - { - Env &_env; - Pd_connection &_pd; - Ram_quota_guard &_ram_guard; - Cap_quota_guard &_cap_guard; - - Expanding_region_map_client(Env &env, - Pd_connection &pd, - Ram_quota_guard &ram_guard, - Cap_quota_guard &cap_guard) - : - Region_map_client(pd.address_space()), _env(env), _pd(pd), - _ram_guard(ram_guard), _cap_guard(cap_guard) - { } - - Local_addr attach(Dataspace_capability ds, - size_t size = 0, off_t offset = 0, - bool use_local_addr = false, - Local_addr local_addr = (void *)0, - bool executable = false, - bool writeable = true) override - { - return retry( - [&] () { - return retry( - [&] () { - return Region_map_client::attach(ds, size, offset, - use_local_addr, - local_addr, - executable, - writeable); }, - [&] () { - upgrade_caps(); - } - ); - }, - [&] () { - upgrade_ram(); - } - ); - } - - void upgrade_ram() - { - enum { UPGRADE_RAM_QUOTA = 4096 }; - Ram_quota const ram { UPGRADE_RAM_QUOTA }; - _ram_guard.withdraw(ram); - _env.pd().transfer_quota(_pd.rpc_cap(), ram); - } - - void upgrade_caps() - { - enum { UPGRADE_CAP_QUOTA = 2 }; - Cap_quota const caps { UPGRADE_CAP_QUOTA }; - _cap_guard.withdraw(caps); - _env.pd().transfer_quota(_pd.rpc_cap(), caps); - } - } _address_space; - - public: - - Device_pd(Env &env, - Session_label const &label, - Ram_quota_guard &ram_guard, - Cap_quota_guard &cap_guard) - : - _pd(env, Pd_connection::Device_pd()), - _label(label), - _address_space(env, _pd, ram_guard, cap_guard) - { - _pd.ref_account(env.pd_session_cap()); - } - - void attach_dma_mem(Dataspace_capability, addr_t dma_addr); - void assign_pci(Io_mem_dataspace_capability const, - addr_t const, uint16_t const); -}; - -#endif /* _DEVICE_PD_H_ */ diff --git a/repos/os/src/drivers/platform/legacy/x86/irq.cc b/repos/os/src/drivers/platform/legacy/x86/irq.cc deleted file mode 100644 index 609142475d..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/irq.cc +++ /dev/null @@ -1,296 +0,0 @@ -/* - * \brief Implementation of shared IRQs in platform driver - * \author Alexander Boettcher - * \date 2015-03-27 - */ - -/* - * Copyright (C) 2015-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -/* Genode includes */ -#include -#include -#include - -/* Platform driver include */ -#include "irq.h" -#include "pci_session_component.h" - - -namespace Platform { - class Irq_component; - class Irq_allocator; -} - - -/** - * A simple allocator implementation used by the Irq_proxy - */ -class Platform::Irq_allocator -{ - private: - - /* - * We partition the IRQ space (128 GSIs) into 40 legacy IRQs and 64 MSIs (and - * hope the partitions will never overlap on any bizarre platform.) - */ - enum { LEGACY = 40, MSI = 64, LEGACY_ARRAY = 64 }; - - Bit_array _legacy { }; - Bit_allocator _msi { }; - - public: - - Irq_allocator() - { - /* reserve the last 24 legacy IRQs - 40 IRQs remaining */ - _legacy.set(LEGACY, LEGACY_ARRAY - LEGACY); - } - - unsigned alloc_msi() - { - try { - return _msi.alloc(); - } catch (Bit_allocator::Out_of_indices) { return ~0U; } - } - - void free_msi(unsigned msi) { _msi.free(msi); } - - bool alloc_irq(addr_t addr) - { - try { - _legacy.set(addr, 1); - return true; - } catch (...) { - return false; - } - } -}; - - -/** - * One allocator for managing in use IRQ numbers and one IRQ thread waiting - * for Genode signals of all hardware IRQs. - */ -static Platform::Irq_allocator irq_alloc; - - -/** - * Irq_proxy interface implementation - */ -class Platform::Irq_component : public Platform::Irq_proxy -{ - private: - - Irq_connection _irq; - Signal_handler _irq_dispatcher; - - bool _associated; - - public: - - void _ack_irq() { - /* - * Associate handler only when required, because our partner may - * also implement shared irq and would expect to get ack_irq() - * form us even if we have no client ... - */ - if (!_associated) { - _associated = true; - /* register signal handler on irq_session */ - _irq.sigh(_irq_dispatcher); - } - - _irq.ack_irq(); - } - - virtual bool remove_sharer(Platform::Irq_sigh *s) override { - if (!Irq_proxy::remove_sharer(s)) - return false; - - /* De-associate handler. */ - _associated = false; - _irq.sigh(Signal_context_capability()); - return true; - } - - public: - - Irq_component(Env &env, unsigned gsi, - Irq_session::Trigger trigger, - Irq_session::Polarity polarity) - : - Irq_proxy(gsi), - _irq(env, gsi, trigger, polarity), - _irq_dispatcher(env.ep(), *this, &Platform::Irq_proxy::notify_about_irq), - _associated(false) - { } - - static Irq_component *get_irq_proxy(unsigned irq_number, - Irq_allocator *irq_alloc = nullptr, - Irq_session::Trigger trigger = Irq_session::TRIGGER_UNCHANGED, - Irq_session::Polarity polarity = Irq_session::POLARITY_UNCHANGED, - Env *env = nullptr, - Allocator *heap = nullptr) - { - static List proxies; - static Mutex proxies_mutex; - - Mutex::Guard mutex_guard(proxies_mutex); - - /* lookup proxy in database */ - for (Irq_proxy *p = proxies.first(); p; p = p->next()) - if (p->irq_number() == irq_number) - return static_cast(p); - - /* try to create proxy */ - if (!irq_alloc || !env || !heap || !irq_alloc->alloc_irq(irq_number)) - return 0; - - Irq_component *new_proxy = new (heap) Irq_component(*env, irq_number, trigger, - polarity); - proxies.insert(new_proxy); - return new_proxy; - } -}; - - - -/******************************* - ** PCI IRQ session component ** - *******************************/ - -void Platform::Irq_session_component::ack_irq() -{ - if (msi()) { - _msi_conn->ack_irq(); - return; - } - - /* shared irq handling */ - Irq_component *irq_obj = Irq_component::get_irq_proxy(_gsi); - if (!irq_obj) { - error("expected to find IRQ proxy for IRQ ", Hex(_gsi)); - return; - } - - if (irq_obj->ack_irq()) - irq_obj->_ack_irq(); -} - - -Platform::Irq_session_component::Irq_session_component(unsigned irq, - addr_t pci_config_space, - Env &env, - Allocator &heap, - Irq_session::Trigger trigger, - Irq_session::Polarity polarity) -: - _gsi(irq) -{ - if (pci_config_space != ~0UL) { - /* msi way */ - unsigned msi = irq_alloc.alloc_msi(); - if (msi != ~0U) { - try { - using namespace Genode; - - _msi_conn.construct(env, msi, Irq_session::TRIGGER_UNCHANGED, - Irq_session::POLARITY_UNCHANGED, - pci_config_space); - - _msi_info = _msi_conn->info(); - if (_msi_info.type == Irq_session::Info::Type::MSI) { - _gsi = msi; - return; - } - } catch (Service_denied) { } - - irq_alloc.free_msi(msi); - } - } - - /* invalid irq number for pci_devices */ - if (_gsi >= INVALID_IRQ) - return; - - _gsi = Platform::Irq_override::irq_override(_gsi, trigger, polarity); - if (_gsi != irq || trigger != Irq_session::TRIGGER_UNCHANGED || - polarity != POLARITY_UNCHANGED) { - - log("IRQ override ", irq, "->", _gsi, ", " - "trigger mode: ", trigger, ", ", "polarity: ", polarity); - } - - try { - /* check if shared IRQ object was used before */ - if (Irq_component::get_irq_proxy(_gsi, &irq_alloc, trigger, - polarity, &env, &heap)) - return; - } catch (Service_denied) { } - - error("unavailable IRQ ", Hex(_gsi), " requested"); -} - - -Platform::Irq_session_component::~Irq_session_component() -{ - if (msi()) { - _msi_conn->sigh(Signal_context_capability()); - - irq_alloc.free_msi(_gsi); - return; - } - - /* shared irq handling */ - Irq_component *irq_obj = Irq_component::get_irq_proxy(_gsi); - if (!irq_obj) return; - - if (_irq_sigh.valid()) - irq_obj->remove_sharer(&_irq_sigh); -} - - -void Platform::Irq_session_component::sigh(Signal_context_capability sigh) -{ - if (_msi_conn.constructed()) { - /* register signal handler for msi directly at parent */ - _msi_conn->sigh(sigh); - return; - } - - /* shared irq handling */ - Irq_component *irq_obj = Irq_component::get_irq_proxy(_gsi); - if (!irq_obj) { - error("signal handler got not registered - irq object unavailable"); - return; - } - - Signal_context_capability old = _irq_sigh; - - if (old.valid() && !sigh.valid()) - irq_obj->remove_sharer(&_irq_sigh); - - _irq_sigh = sigh; - - if (!old.valid() && sigh.valid()) - irq_obj->add_sharer(&_irq_sigh); -} - - -unsigned short Platform::Irq_routing::rewrite(Pci::Bdf const bdf, unsigned char pin) -{ - unsigned const bridge_bdf_bus = Platform::bridge_bdf(bdf.bus); - - for (Irq_routing *i = list()->first(); i; i = i->next()) { - if ((bdf.device == i->_device) && (pin - 1 == i->_device_pin) && - (i->_bridge_bdf == bridge_bdf_bus)) - return i->_gsi; - } - - return 0; -} diff --git a/repos/os/src/drivers/platform/legacy/x86/irq.h b/repos/os/src/drivers/platform/legacy/x86/irq.h deleted file mode 100644 index 55c2402a96..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/irq.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * \brief IRQ session interface - * \author Alexander Boettcher - * \date 2015-03-25 - */ - -/* - * Copyright (C) 2015-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _X86__IRQ_H_ -#define _X86__IRQ_H_ - -#include -#include -#include -#include - -/* platform local includes */ -#include -#include - - -namespace Platform { - class Irq_session_component; - class Irq_override; - class Irq_routing; -} - - -class Platform::Irq_session_component : public Rpc_object, - private List::Element -{ - private: - - friend class List; - - unsigned _gsi; - Platform::Irq_sigh _irq_sigh { }; - Irq_session::Info _msi_info { }; - - Constructible _msi_conn { }; - - public: - - enum { INVALID_IRQ = 0xffU }; - - Irq_session_component(unsigned, addr_t, Env &, Allocator &heap, - Trigger trigger = TRIGGER_UNCHANGED, - Polarity polarity = POLARITY_UNCHANGED); - - ~Irq_session_component(); - - bool msi() - { - return _msi_conn.constructed() && - _msi_info.type == Irq_session::Info::Type::MSI; - } - - unsigned gsi() { return _gsi; } - - unsigned long msi_address() const { return _msi_info.address; } - unsigned long msi_data() const { return _msi_info.value; } - - /*************************** - ** Irq session interface ** - ***************************/ - - void ack_irq() override; - void sigh(Signal_context_capability) override; - - Info info() override - { - return { .type = Info::Type::INVALID, .address = 0, .value = 0 }; - } -}; - - -/** - * List that holds interrupt override information - */ -class Platform::Irq_override : public List::Element -{ - private: - - unsigned short const _irq; /* source IRQ */ - unsigned short const _gsi; /* target GSI */ - Irq_session::Trigger const _trigger; /* interrupt trigger mode */ - Irq_session::Polarity const _polarity; /* interrupt polarity */ - - Irq_session::Trigger _mode2trigger(unsigned mode) - { - enum { EDGE = 0x4, LEVEL = 0xc }; - - switch (mode & 0xc) { - case EDGE: - return Irq_session::TRIGGER_EDGE; - case LEVEL: - return Irq_session::TRIGGER_LEVEL; - default: - return Irq_session::TRIGGER_UNCHANGED; - } - } - - Irq_session::Polarity _mode2polarity(unsigned mode) - { - using namespace Genode; - enum { HIGH = 0x1, LOW = 0x3 }; - - switch (mode & 0x3) { - case HIGH: - return Irq_session::POLARITY_HIGH; - case LOW: - return Irq_session::POLARITY_LOW; - default: - return Irq_session::POLARITY_UNCHANGED; - } - } - - public: - - Irq_override(unsigned irq, unsigned gsi, unsigned mode) - : - _irq(irq), _gsi(gsi), - _trigger(_mode2trigger(mode)), _polarity(_mode2polarity(mode)) - { } - - static List *list() - { - static List _list; - return &_list; - } - - unsigned short irq() const { return _irq; } - unsigned short gsi() const { return _gsi; } - Irq_session::Trigger trigger() const { return _trigger; } - Irq_session::Polarity polarity() const { return _polarity; } - - static unsigned irq_override(unsigned irq, - Irq_session::Trigger &trigger, - Irq_session::Polarity &polarity) - { - for (Irq_override *i = list()->first(); i; i = i->next()) - if (i->irq() == irq) { - trigger = i->trigger(); - polarity = i->polarity(); - return i->gsi(); - } - - /* trigger and polarity not touched in this case! */ - return irq; - } -}; - - -/** - * List that holds interrupt rewrite information - */ -class Platform::Irq_routing : public List::Element -{ - private: - - unsigned short _gsi; - unsigned short _bridge_bdf; - unsigned short _device; - unsigned char _device_pin; - - public: - - static List *list() - { - static List _list; - return &_list; - } - - Irq_routing(unsigned short gsi, unsigned short bridge_bdf, - unsigned char device, unsigned char device_pin) - : - _gsi(gsi), _bridge_bdf(bridge_bdf), _device(device), - _device_pin(device_pin) - { } - - static unsigned short rewrite(Pci::Bdf, unsigned char pin); -}; - -#endif /* _X86__IRQ_H_ */ diff --git a/repos/os/src/drivers/platform/legacy/x86/irq_proxy.h b/repos/os/src/drivers/platform/legacy/x86/irq_proxy.h deleted file mode 100644 index c4971e435f..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/irq_proxy.h +++ /dev/null @@ -1,141 +0,0 @@ -/** - * \brief Shared-interrupt support - * \author Christian Helmuth - * \author Sebastian Sumpf - * \date 2009-12-15 - */ - -/* - * Copyright (C) 2009-2020 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _DRIVERS__PLATFORM__SPEC__X86__IRQ_PROXY_H_ -#define _DRIVERS__PLATFORM__SPEC__X86__IRQ_PROXY_H_ - -#include - -namespace Platform { - class Irq_sigh; - class Irq_proxy; -} - - -class Platform::Irq_sigh : public Signal_context_capability, - public List::Element -{ - public: - - Irq_sigh & operator= (Signal_context_capability const &cap) - { - Signal_context_capability::operator=(cap); - return *this; - } - - Irq_sigh() { } - - void notify() { Signal_transmitter(*this).submit(1); } -}; - - -/* - * Proxy thread that associates to the interrupt and unblocks waiting irqctrl - * threads. - * - * XXX resources are not accounted as the interrupt is shared - */ -class Platform::Irq_proxy : private List::Element -{ - private: - - friend class List; - - protected: - - unsigned const _irq_number; - - List _sigh_list { }; - - Mutex _mutex { }; /* protects this object */ - int _num_sharers = 0; /* number of clients sharing this IRQ */ - int _num_acknowledgers = 0; /* number of currently blocked clients */ - bool _woken_up = false; /* client decided to wake me up - - this prevents multiple wakeups - to happen during initialization */ - public: - - using List::Element::next; - - Irq_proxy(unsigned irq_number) : _irq_number(irq_number) { } - - virtual ~Irq_proxy() { } - - /** - * Acknowledgements of clients - */ - virtual bool ack_irq() - { - Mutex::Guard mutex_guard(_mutex); - - _num_acknowledgers++; - - /* - * The proxy thread has to be woken up if no client woke it up - * before and this client is the last aspired acknowledger. - */ - if (!_woken_up && _num_acknowledgers == _num_sharers) { - _woken_up = true; - } - - return _woken_up; - } - - /** - * Notify all clients about irq - */ - void notify_about_irq() - { - Mutex::Guard mutex_guard(_mutex); - - /* reset acknowledger state */ - _num_acknowledgers = 0; - _woken_up = false; - - /* inform blocked clients */ - for (Irq_sigh * s = _sigh_list.first(); s ; s = s->next()) - s->notify(); - } - - unsigned irq_number() const { return _irq_number; } - - virtual bool add_sharer(Irq_sigh *s) - { - Mutex::Guard mutex_guard(_mutex); - - ++_num_sharers; - _sigh_list.insert(s); - - return true; - } - - virtual bool remove_sharer(Irq_sigh *s) - { - Mutex::Guard mutex_guard(_mutex); - - _sigh_list.remove(s); - --_num_sharers; - - if (_woken_up) - return _num_sharers == 0; - - if (_num_acknowledgers == _num_sharers) { - _woken_up = true; - } - - return _num_sharers == 0; - } -}; - -#endif /* _DRIVERS__PLATFORM__SPEC__X86__IRQ_PROXY_H_ */ diff --git a/repos/os/src/drivers/platform/legacy/x86/main.cc b/repos/os/src/drivers/platform/legacy/x86/main.cc deleted file mode 100644 index 58c3e5e777..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/main.cc +++ /dev/null @@ -1,215 +0,0 @@ -/* - * \brief Platform driver for x86 - * \author Norman Feske - * \author Christian Helmuth - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#include -#include -#include - -#include - -#include "pci_session_component.h" -#include "pci_device_config.h" -#include "device_pd.h" -#include "acpi_devices.h" - -namespace Platform { - struct Main; - - namespace Nonpci { void acpi_device_registry(Acpi::Device_registry &); } -}; - -struct Platform::Main -{ - Env &_env; - - Heap _heap { _env.ram(), _env.rm() }; - - Acpi::Device_registry _acpi_device_registry { }; - - /* - * Use sliced heap to allocate each session component at a separate - * dataspace. - */ - Sliced_heap sliced_heap { _env.ram(), _env.rm() }; - - Attached_rom_dataspace _config { _env, "config" }; - - Constructible acpi_rom { }; - Constructible root { }; - - Constructible system_state { }; - Constructible acpi_ready { }; - - Signal_handler
_acpi_report { _env.ep(), *this, - &Main::acpi_update }; - Signal_handler
_system_report { _env.ep(), *this, - &Main::system_update }; - Signal_handler
_config_handler { _env.ep(), *this, - &Main::config_update }; - - Capability > root_cap { }; - - bool _acpi_ready = false; - - void _attempt_acpi_reset(); - - void acpi_update() - { - if (!root.constructed()) { - acpi_rom->update(); - - if (!acpi_rom->valid()) - return; - - bool msi_platform = false; - bool acpi_platform = false; - - try { - Attached_rom_dataspace info { _env, "platform_info" }; - info.xml().with_optional_sub_node("kernel", [&] (Xml_node const &node) { - acpi_platform = node.attribute_value("acpi", acpi_platform); - msi_platform = node.attribute_value("msi" , msi_platform); - }); - } catch (...) { } - - root.construct(_env, _heap, sliced_heap, _config, - acpi_rom->local_addr(), acpi_platform, - msi_platform); - } - - if (root_cap.valid()) - return; - - /* don't announce service if no policy entry is available */ - if (!root->config_with_policy()) - return; - - root_cap = _env.ep().manage(*root); - - if (_acpi_ready) { - Parent::Service_name announce_for_acpi("Acpi"); - _env.parent().announce(announce_for_acpi, root_cap); - } else - _env.parent().announce(root_cap); - } - - void system_update() - { - if (acpi_ready.constructed()) - acpi_ready->update(); - - if (!root.constructed()) - return; - - if (acpi_ready.constructed() && acpi_ready->valid()) { - Xml_node system(acpi_ready->local_addr(), acpi_ready->size()); - - typedef String<16> Value; - const Value state = system.attribute_value("state", Value("unknown")); - - if (state == "acpi_ready" && root_cap.valid()) { - _env.parent().announce(root_cap); - root_cap = Capability > (); - } - } - } - - void config_update() - { - _config.update(); - - if (!_config.valid()) - return; - - if (!root_cap.valid()) - acpi_update(); - - bool const system_state_was_constructed = system_state.constructed(); - - system_state.conditional(_config.xml().attribute_value("system", false), - _env, "system"); - - if (system_state.constructed() && !system_state_was_constructed) - system_state->sigh(_config_handler); - - if (system_state.constructed()) { - system_state->update(); - if (system_state->xml().attribute_value("state", String<16>()) == "reset") - _attempt_acpi_reset(); - } - - if (root.constructed()) { - root->generate_pci_report(); - root->config_update(); - } - - _acpi_device_registry.init_devices(_heap, _config.xml()); - } - - Main(Env &env) : _env(env) - { - _config.sigh(_config_handler); - - if (_config.valid()) - _acpi_ready = _config.xml().attribute_value("acpi_ready", false); - - if (_acpi_ready) { - acpi_ready.construct(env, "acpi_ready"); - acpi_ready->sigh(_system_report); - } - - /* wait for the first valid acpi report */ - acpi_rom.construct(env, "acpi"); - acpi_rom->sigh(_acpi_report); - - /* check if already valid */ - config_update(); - acpi_update(); - system_update(); - - Nonpci::acpi_device_registry(_acpi_device_registry); - } -}; - - -void Platform::Main::_attempt_acpi_reset() -{ - if (!acpi_rom.constructed()) - return; - - acpi_rom->xml().with_optional_sub_node("reset", [&] (Xml_node reset) { - - uint16_t const io_port = reset.attribute_value("io_port", (uint16_t)0); - uint8_t const value = reset.attribute_value("value", (uint8_t)0); - - log("trigger reset by writing value ", value, " to I/O port ", Hex(io_port)); - - try { - Io_port_connection reset_port { _env, io_port, 1 }; - reset_port.outb(io_port, value); - } - catch (...) { - error("unable to access reset I/O port ", Hex(io_port)); - } - }); -} - - -void Component::construct(Genode::Env &env) -{ - /* XXX execute constructors of global statics */ - env.exec_static_constructors(); - - static Platform::Main main(env); -} diff --git a/repos/os/src/drivers/platform/legacy/x86/nonpci_devices.cc b/repos/os/src/drivers/platform/legacy/x86/nonpci_devices.cc deleted file mode 100644 index 550883b19b..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/nonpci_devices.cc +++ /dev/null @@ -1,363 +0,0 @@ -/* - * \brief Non PCI devices, e.g. PS2 - * \author Alexander Boettcher - * \author Christian Helmuth - * \date 2015-04-17 - */ - -/* - * Copyright (C) 2015-2021 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#include "pci_session_component.h" -#include "irq.h" -#include "acpi_devices.h" - -namespace Platform { namespace Nonpci { class Ps2; class Pit; } } - - -class Platform::Nonpci::Ps2 : public Device_component -{ - private: - - enum { - IRQ_KEYBOARD = 1, - IRQ_MOUSE = 12, - - ACCESS_WIDTH = 1, - REG_DATA = 0x60, - REG_STATUS = 0x64, - }; - - Rpc_entrypoint &_ep; - Platform::Irq_session_component _irq_mouse; - Io_port_connection _data; - Io_port_connection _status; - - public: - - Ps2(Env &env, - Attached_io_mem_dataspace &pciconf, - Session_component &session, - Allocator &heap_for_irq, - Pci::Config::Delayer &delayer, - Device_bars_pool &devices_bars) - : - Device_component(env, pciconf, session, IRQ_KEYBOARD, - heap_for_irq, delayer, devices_bars), - _ep(env.ep().rpc_ep()), - _irq_mouse(IRQ_MOUSE, ~0UL, env, heap_for_irq), - _data(env, REG_DATA, ACCESS_WIDTH), - _status(env, REG_STATUS, ACCESS_WIDTH) - { - _ep.manage(&_irq_mouse); - } - - ~Ps2() { _ep.dissolve(&_irq_mouse); } - - Irq_session_capability irq(uint8_t virt_irq) override - { - switch (virt_irq) { - case 0: - log("PS2 uses IRQ, vector ", Hex(IRQ_KEYBOARD)); - return Device_component::irq(virt_irq); - case 1: - log("PS2 uses IRQ, vector ", Hex(IRQ_MOUSE)); - return _irq_mouse.cap(); - default: - return Irq_session_capability(); - } - } - - Io_port_session_capability io_port(uint8_t io_port) override - { - if (io_port == 0) - return _data.cap(); - if (io_port == 1) - return _status.cap(); - - return Io_port_session_capability(); - } - - Io_mem_session_capability io_mem(uint8_t, Cache, addr_t, size_t) override - { - return Io_mem_session_capability(); - } - - Device_name_string name() const override { return "PS2"; } -}; - - -class Platform::Nonpci::Pit : public Device_component -{ - private: - - enum { - IRQ_PIT = 0, - - PIT_PORT = 0x40, - PORTS_WIDTH = 4 - }; - - Io_port_connection _ports; - - public: - - Pit(Env &env, - Attached_io_mem_dataspace &pciconf, - Session_component &session, - Allocator &heap_for_irq, - Pci::Config::Delayer &delayer, - Device_bars_pool &devices_bars) - : - Device_component(env, pciconf, session, IRQ_PIT, - heap_for_irq, delayer, devices_bars), - _ports(env, PIT_PORT, PORTS_WIDTH) - { } - - Io_port_session_capability io_port(uint8_t io_port) override - { - if (io_port == 0) - return _ports.cap(); - - return Io_port_session_capability(); - } - - Device_name_string name() const override { return "PIT"; } -}; - - -namespace Platform { namespace Nonpci { - class Acpi; - - void acpi_device_registry(Platform::Acpi::Device_registry &); -} } - - -static Platform::Acpi::Device_registry *_acpi_device_registry; - -void Platform::Nonpci::acpi_device_registry(Platform::Acpi::Device_registry ®istry) -{ - _acpi_device_registry = ®istry; -} - - -class Platform::Nonpci::Acpi : public Device_component -{ - private: - - Env &_env; - - Allocator &_session_heap; - - Platform::Acpi::Device const &_acpi_device; - - Irq_session_component *_irq0 = nullptr; - - /* - * Noncopyable - */ - Acpi(Acpi const &) = delete; - Acpi &operator = (Acpi const &) = delete; - - public: - - Acpi(Platform::Acpi::Device const &acpi_device, - Env &env, - Attached_io_mem_dataspace &pciconf, - Session_component &session, - Allocator &session_heap, - Allocator &global_heap, - Pci::Config::Delayer &delayer, - Device_bars_pool &devices_bars) - : - Device_component(env, pciconf, session, 0, - global_heap, delayer, devices_bars), - _env(env), _session_heap(session_heap), _acpi_device(acpi_device) - { } - - Device_name_string name() const override { return _acpi_device.hid(); } - - /* Platform::Device interface */ - - void bus_address(unsigned char *bus, unsigned char *dev, - unsigned char *fn) override - { - *bus = 0; *dev = 0; *fn = 0; - } - - unsigned short vendor_id() override { return ~0; } - - unsigned short device_id() override { return ~0; } - - unsigned class_code() override { return ~0; } - - Resource resource(int resource_id) override - { - using Acpi_device = Platform::Acpi::Device; - - return _acpi_device.resource(resource_id).convert( - [&] (Acpi_device::Resource r) { - /* craft artificial BAR values from resource info */ - switch (r.type) { - case Acpi_device::Resource::Type::IOMEM: - return Resource((r.base & 0xfffffff0) | 0b0000, r.size); - - case Acpi_device::Resource::Type::IOPORT: - return Resource((r.base & 0xfffffffc) | 0b01, r.size); - - case Acpi_device::Resource::Type::IRQ: - return Resource(); - } - return Resource(); - }, - [&] (Acpi_device::Invalid_resource) { return Resource(); }); - } - - unsigned config_read(unsigned char, Access_size) override - { - warning("ignore config_read from ACPI device ", _acpi_device.hid()); - return 0; - } - - void config_write(unsigned char, unsigned, Access_size) override - { - warning("ignore config_write to ACPI device ", _acpi_device.hid()); - } - - Irq_session_capability irq(uint8_t v_id) override - { - using Acpi_device = Platform::Acpi::Device; - - /* TODO more than one IRQ */ - if (v_id != 0) { - warning("ACPI device with more than one IRQ not supported (requested id ", v_id, ")"); - return Irq_session_capability(); - } - if (_irq0) return _irq0->cap(); - - /* TODO needs try see pci_device.cc ::iomem() */ - return _acpi_device.irq(v_id).convert( - [&] (Acpi_device::Resource r) { - Platform::Irq_session_component &irq = - *new(_session_heap) - Platform::Irq_session_component(r.base, ~0UL, _env, _session_heap, - Irq_session::TRIGGER_LEVEL, - Irq_session::POLARITY_LOW); - _env.ep().manage(irq); - _irq0 = &irq; - return irq.cap(); - }, - [&] (Acpi_device::Invalid_resource) { return Irq_session_capability(); }); - } - - Io_port_session_capability io_port(uint8_t v_id) override - { - using Acpi_device = Platform::Acpi::Device; - - /* TODO needs try see pci_device.cc ::iomem() */ - - return _acpi_device.ioport(v_id).convert( - [&] (Acpi_device::Resource r) { - Io_port_connection &ioport = - *new (_session_heap) Io_port_connection(_env, r.base, r.size); - return ioport.cap(); - }, - [&] (Acpi_device::Invalid_resource) { return Io_port_session_capability(); }); - } - - Io_mem_session_capability io_mem(uint8_t v_id, - Cache /* ignored */, - addr_t /* ignored */, - size_t /* ignored */) override - { - using Acpi_device = Platform::Acpi::Device; - - /* TODO needs try see pci_device.cc ::iomem() */ - - return _acpi_device.iomem(v_id).convert( - [&] (Acpi_device::Resource r) { - Io_mem_connection &iomem = - *new (_session_heap) Io_mem_connection(_env, r.base, r.size); - return iomem.cap(); - }, - [&] (Acpi_device::Invalid_resource) { return Io_mem_session_capability(); }); - } -}; - - -/** - * Platform session component devices which are non PCI devices, e.g. PS2 - */ -Platform::Device_capability Platform::Session_component::device(Device_name const &name) -{ - if (!name.valid_string()) - return Device_capability(); - - Device_name_string const device_name { name.string() }; - - enum class Type { UNKNOWN, PS2, PIT, ACPI } device_type { Type::UNKNOWN }; - - Platform::Acpi::Device const *acpi_device = nullptr; - - if (device_name == "PS2") - device_type = Type::PS2; - - else if (device_name == "PIT") - device_type = Type::PIT; - - else if (_acpi_device_registry) - device_type = _acpi_device_registry->lookup(device_name).convert( - [&] (Acpi::Device const *device) { - acpi_device = device; - return Type::ACPI; - }, - [&] (Acpi::Device_registry::Lookup_failed) { return Type::UNKNOWN; }); - - bool const found = device_type != Type::UNKNOWN; - - if (!found) { - error("unknown device name '", device_name, "'"); - return Device_capability(); - } - - if (!permit_device(device_name.string())) { - error("denied access to device '", device_name, "' for " - "session '", _label, "'"); - return Device_capability(); - } - - try { - Device_component * dev = nullptr; - - switch (device_type) { - case Type::PS2: - dev = new (_md_alloc) Nonpci::Ps2(_env, _pciconf, *this, - _global_heap, _delayer, - _devices_bars); - break; - case Type::PIT: - dev = new (_md_alloc) Nonpci::Pit(_env, _pciconf, *this, - _global_heap, _delayer, - _devices_bars); - break; - case Type::ACPI: - dev = new (_md_alloc) Nonpci::Acpi(*acpi_device, - _env, _pciconf, *this, - _md_alloc, - _global_heap, _delayer, - _devices_bars); - break; - default: - return Device_capability(); - } - - _device_list.insert(dev); - return _env.ep().rpc_ep().manage(dev); - } - catch (Out_of_ram) { throw; } - catch (Service_denied) { return Device_capability(); } -} diff --git a/repos/os/src/drivers/platform/legacy/x86/pci_bridge.h b/repos/os/src/drivers/platform/legacy/x86/pci_bridge.h deleted file mode 100644 index 92ba968e46..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/pci_bridge.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * \brief PCI bridge discovery - * \author Sebastian Sumpf - * \date 2012-02-25 - */ - - /* - * Copyright (C) 2009-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _PCI_BRIDGE_H_ -#define _PCI_BRIDGE_H_ - -#include - -namespace Platform { class Bridge; } - - -/** - * List of PCI-bridge devices - */ -class Platform::Bridge : public List::Element -{ - private: - - /* PCI config space fields of bridge */ - unsigned char _bus; - unsigned char _dev; - unsigned char _fun; - - unsigned char _secondary_bus; - unsigned char _subordinate_bus; - - public: - - Bridge(unsigned char bus, unsigned char dev, unsigned char fun, - unsigned char secondary_bus, unsigned char subordinate_bus) - : - _bus(bus), _dev(dev), _fun(fun), _secondary_bus(secondary_bus), - _subordinate_bus(subordinate_bus) - { } - - bool part_of (unsigned char bus) const - { - return _secondary_bus <= bus && bus <= _subordinate_bus; - } - - unsigned short bdf() - { - unsigned short bdf = _bus; - bdf = (bdf << 8) | ((_dev & 0x1f) << 3) | (_fun & 0x7); - return bdf; - } - - enum { INVALID_ROOT_BRIDGE = 0x10000U }; - static unsigned root_bridge_bdf; -}; - -#endif /* _PCI_BRIDGE_H_ */ diff --git a/repos/os/src/drivers/platform/legacy/x86/pci_config_access.h b/repos/os/src/drivers/platform/legacy/x86/pci_config_access.h deleted file mode 100644 index ed22e1af0c..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/pci_config_access.h +++ /dev/null @@ -1,265 +0,0 @@ -/* - * \brief PCI configuration access for the platform driver - * \author Norman Feske - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2021 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _X86_PCI_CONFIG_ACCESS_H_ -#define _X86_PCI_CONFIG_ACCESS_H_ - -#include -#include -#include -#include -#include - -namespace Platform { namespace Pci { struct Bdf; struct Config; } } - - -struct Platform::Pci::Bdf -{ - unsigned bus, device, function; - - static Bdf from_value(uint16_t const bdf) - { - return Bdf { .bus = (bdf >> 8) & 0xffu, - .device = (bdf >> 3) & 0x1fu, - .function = bdf & 0x07u }; - } - - static Bdf from_xml(Xml_node node) - { - return Bdf { .bus = node.attribute_value("bus", 0U), - .device = node.attribute_value("device", 0U), - .function = node.attribute_value("function", 0U) }; - } - - - uint16_t value() const { - return ((bus & 0xff) << 8) | ((device & 0x1f) << 3) | (function & 7); } - - bool operator == (Bdf const &other) const { - return value() == other.value(); } - - void print(Output &out) const - { - using Genode::print; - print(out, Hex((uint8_t)bus, Hex::Prefix::OMIT_PREFIX, Hex::Pad::PAD), - ":", Hex((uint8_t)device, Hex::Prefix::OMIT_PREFIX, Hex::Pad::PAD), - ".", Hex(function, Hex::Prefix::OMIT_PREFIX)); - } -}; - - -namespace Platform { - - class Config_access - { - private: - - Attached_io_mem_dataspace &_pciconf; - - size_t const _pciconf_size; - - /** - * Calculate device offset from BDF - * - * \return device base address - */ - unsigned _dev_base(Pci::Bdf const bdf) - { - return unsigned(bdf.value()) << 12; - } - - Bit_array<256> _used { }; - - void _use_register(unsigned char addr, unsigned short width) - { - for (unsigned i = 0; i < width; i++) - if (!_used.get(addr + i, 1)) - _used.set(addr + i, 1); - } - - public: - - class Invalid_mmio_access : Exception { }; - - Config_access(Attached_io_mem_dataspace &pciconf) - : - _pciconf(pciconf), - _pciconf_size(Dataspace_client(_pciconf.cap()).size()) - { } - - Config_access(Config_access &c) - : _pciconf(c._pciconf), _pciconf_size(c._pciconf_size) { } - - /** - * Read value from config space of specified device/function - * - * \param bdf target PCI bus, device & function ID - * \param addr target byte within targeted PCI config space - * \param size bit width of read access - * - * \return value read from specified config-space address - * - * There is no range check for the input values. - */ - unsigned read(Pci::Bdf const bdf, unsigned char const addr, - Device::Access_size const size, bool const track = true) - { - unsigned const offset = _dev_base(bdf) + addr; - char const * const field_ptr = _pciconf.local_addr() + offset; - - if (offset >= _pciconf_size) - throw Invalid_mmio_access(); - - switch (size) { - - case Device::ACCESS_8BIT: - if (track) - _use_register(addr, 1); - return *(uint8_t const *)field_ptr; - - case Device::ACCESS_16BIT: - if (track) - _use_register(addr, 2); - return *(uint16_t const *)field_ptr; - - case Device::ACCESS_32BIT: - if (track) - _use_register(addr, 4); - return *(uint32_t const *)field_ptr; - } - return ~0U; - } - - /** - * Write to config space of specified device/function - * - * \param bdf target PCI bus, device & function ID - * \param addr target byte within targeted PCI config space - * \param value value to be written - * \param size bit width of write access - * - * There is no range check for the input values. - */ - void write(Pci::Bdf const bdf, unsigned char const addr, - unsigned const value, Device::Access_size const size, - bool const track = true) - { - unsigned const offset = _dev_base(bdf) + addr; - char * const field_ptr = _pciconf.local_addr() + offset; - - if (offset >= _pciconf_size) - throw Invalid_mmio_access(); - - /* - * Write value to targeted address, see read() comment above - * for an explanation of the assembly templates - */ - switch (size) { - - case Device::ACCESS_8BIT: - if (track) - _use_register(addr, 1); - *(uint8_t volatile *)field_ptr = value; - break; - - case Device::ACCESS_16BIT: - if (track) - _use_register(addr, 2); - *(uint16_t volatile *)field_ptr = value; - break; - - case Device::ACCESS_32BIT: - if (track) - _use_register(addr, 4); - *(uint32_t volatile *)field_ptr = value; - break; - } - } - - bool reg_in_use(unsigned char addr, Device::Access_size size) - { - switch (size) { - case Device::ACCESS_8BIT: - return _used.get(addr, 1); - case Device::ACCESS_16BIT: - return _used.get(addr, 2); - case Device::ACCESS_32BIT: - return _used.get(addr, 4); - default: - return true; - } - } - }; -} - -/** - * Type-safe, fine-grained access to a PCI config space of a device - * - * It is similar to Genode::Mmio but uses Config_access as backend. - */ -struct Platform::Pci::Config: Register_set -{ - private: - - friend Register_set_plain_access; - - Config_access &_config; - Pci::Bdf _bdf; - uint16_t _cap; - - template - inline ACCESS_T _read(off_t const &offset) const - { - addr_t const cap = _cap + offset; - - if (sizeof(ACCESS_T) == 1) - return _config.read(_bdf, cap, Device::ACCESS_8BIT); - if (sizeof(ACCESS_T) == 2) - return _config.read(_bdf, cap, Device::ACCESS_16BIT); - if (sizeof(ACCESS_T) == 4) - return _config.read(_bdf, cap, Device::ACCESS_32BIT); - - warning("unsupported read ", sizeof(ACCESS_T)); - return 0; - } - - template - inline void _write(off_t const offset, ACCESS_T const value) - { - addr_t const cap = _cap + offset; - - switch (sizeof(ACCESS_T)) { - case 1 : - _config.write(_bdf, cap, value, Device::ACCESS_8BIT); - break; - case 2 : - _config.write(_bdf, cap, value, Device::ACCESS_16BIT); - break; - case 4 : - _config.write(_bdf, cap, value, Device::ACCESS_32BIT); - break; - default: - warning("unsupported write ", sizeof(ACCESS_T)); - } - } - - public: - - Config(Config_access &config, Pci::Bdf const &bdf, uint16_t cap) - : - Register_set(*this), _config(config), _bdf(bdf), _cap(cap) - { } - -}; - -#endif /* _X86_PCI_CONFIG_ACCESS_H_ */ diff --git a/repos/os/src/drivers/platform/legacy/x86/pci_device.cc b/repos/os/src/drivers/platform/legacy/x86/pci_device.cc deleted file mode 100644 index 30aa26399b..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/pci_device.cc +++ /dev/null @@ -1,341 +0,0 @@ -/* - * \brief PCI device component implementation - * \author Alexander Boettcher - * \author Christian Helmuth - * \date 2022-06-24 - */ - -/* - * Copyright (C) 2015-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#include "pci_session_component.h" -#include "pci_device_component.h" - - -Genode::Io_port_session_capability Platform::Device_component::io_port(uint8_t const v_id) -{ - uint8_t const max = sizeof(_io_port_conn) / sizeof(_io_port_conn[0]); - uint8_t r_id = 0; - - for (unsigned i = 0; i < max; ++i) { - Pci::Resource res = _device_config.resource(i); - - if (!res.valid() || res.mem()) - continue; - - if (v_id != r_id) { - ++r_id; - continue; - } - - if (_io_port_conn[v_id] != nullptr) - return _io_port_conn[v_id]->cap(); - - try { - _io_port_conn[v_id] = new (_slab_ioport) - Io_port_connection(_env, res.base(), res.size()); - return _io_port_conn[v_id]->cap(); - } catch (...) { - return Io_port_session_capability(); - } - } - - return Io_port_session_capability(); -} - -Genode::Io_mem_session_capability Platform::Device_component::io_mem(uint8_t const v_id, - Cache const caching, - addr_t const offset, - size_t const size) -{ - uint8_t max = sizeof(_io_mem) / sizeof(_io_mem[0]); - uint8_t r_id = 0; - - for (unsigned i = 0; i < max; ++i) { - Pci::Resource res = _device_config.resource(i); - - if (!res.valid() || !res.mem()) - continue; - - if (v_id != r_id) { - ++r_id; - continue; - } - - /* limit IO_MEM session size to resource size */ - size_t const res_size = min(size, res.size()); - - if (offset >= res.size() || offset > res.size() - res_size) - return Io_mem_session_capability(); - - /* error if MEM64 resource base address above 4G on 32-bit */ - if (res.base() > ~(addr_t)0) { - error("request for MEM64 resource of ", _device_config, - " at ", Hex(res.base()), " not supported on 32-bit system"); - return Io_mem_session_capability(); - } - - try { - bool const wc = caching == Cache::WRITE_COMBINED; - Io_mem * io_mem = new (_slab_iomem) Io_mem(_env, - res.base() + offset, - res_size, wc); - _io_mem[i].insert(io_mem); - return io_mem->cap(); - } - catch (Out_of_caps) { - warning("Out_of_caps in Device_component::io_mem"); - throw; - } - catch (Out_of_ram) { - warning("Out_of_ram in Device_component::io_mem"); - throw; - } - catch (...) { - warning("unhandled exception in 'Device_component::io_mem'"); - return Io_mem_session_capability(); - } - } - - return Io_mem_session_capability(); -} - - -unsigned Platform::Device_component::config_read(unsigned char address, Access_size size) -{ - if (pci_device()) - return _device_config.read(_config_access, address, size, - _device_config.DONT_TRACK_ACCESS); - - return ~0; -} - - -void Platform::Device_component::config_write(unsigned char address, - unsigned value, - Access_size size) -{ - if (!pci_device()) - return; - - /* white list of ports which we permit to write */ - switch (address) { - case 0x40 ... 0xff: - /* allow access to device-specific registers if not used by us */ - if (!_device_config.reg_in_use(_config_access, address, size)) - break; - - error(_device_config, " write access to " - "address=", Hex(address), " " - "value=", Hex(value), " " - "size=", Hex(size), " " - "denied - it is used by the platform driver."); - return; - case Device_config::PCI_CMD_REG: /* COMMAND register - first byte */ - if (size == Access_size::ACCESS_16BIT) - break; - [[fallthrough]]; - case Device_config::PCI_CMD_REG + 1: /* COMMAND register - second byte */ - case 0xd: /* Latency timer */ - if (size == Access_size::ACCESS_8BIT) - break; - [[fallthrough]]; - default: - warning(_device_config, " write access to " - "address=", Hex(address), " " - "value=", Hex(value), " " - "size=", Hex(size), " " - "got dropped"); - return; - } - - /* assign device to device_pd */ - if (!_device_assigned && - address == Device_config::PCI_CMD_REG && - (value & Device_config::PCI_CMD_DMA)) { - - try { _session.assign_device(this); } - catch (Out_of_ram) { throw; } - catch (Out_of_caps) { throw; } - catch (...) { - error("assignment to device failed"); - } - _device_assigned = true; - _device_used = true; - } - - _device_config.write(_config_access, address, value, size, - _device_config.DONT_TRACK_ACCESS); -} - -Genode::Irq_session_capability Platform::Device_component::irq(uint8_t id) -{ - if (id != 0) - return Irq_session_capability(); - - if (_irq_session) - return _irq_session->cap(); - - if (!pci_device()) { - /* Non PCI devices */ - _irq_session = construct_at(_mem_irq_component, - _irq_line, ~0UL, - _env, - _global_heap); - - _env.ep().rpc_ep().manage(_irq_session); - return _irq_session->cap(); - } - - uint16_t const msi_cap = _msi_cap(); - uint16_t const msix_cap = _msix_cap(); - bool const try_msi_msix = (_session.msi_usage() && msi_cap) || - (_session.msix_usage() && msix_cap); - _irq_session = construct_at(_mem_irq_component, - _configure_irq(_irq_line, msi_cap, msix_cap), - try_msi_msix ? _config_space : ~0UL, - _env, _global_heap); - _env.ep().rpc_ep().manage(_irq_session); - - bool msix_used = false; - bool msi_used = false; - - if (_irq_session->msi()) { - if (_session.msix_usage() && msix_cap) - msix_used = _setup_msix(msix_cap); - if (!msix_used && msi_cap) - msi_used = _setup_msi(msi_cap); - } - - if (_irq_session->msi()) - log(_device_config, " uses ", - msix_used ? "MSI-X " : "", - (msix_used && msi_cap) ? "(supports MSI) " : "", - msi_used ? "MSI ": "", - (msi_used && msix_cap) ? "(supports MSI-X) " : "", - (!msi_used && !msix_used) ? "no MSI/-X/IRQ " : "", - "vector ", Hex(_irq_session->msi_data()), ", " - "address ", Hex(_irq_session->msi_address())); - else - log(_device_config, " uses IRQ, vector ", - Hex(_irq_line), - (msi_cap || msix_cap) ? ", supports:" : "", - msi_cap ? " MSI" : "", - msix_cap ? " MSI-X" : ""); - - return _irq_session->cap(); -} - -bool Platform::Device_component::_setup_msi(uint16_t const msi_cap) -{ - try { - addr_t const msi_address = _irq_session->msi_address(); - uint32_t const msi_value = _irq_session->msi_data(); - - uint16_t msi = _read_config_16(msi_cap + 2); - - _write_config_32(msi_cap + 0x4, msi_address); - - if (msi & CAP_MSI_64) { - uint32_t upper_address = sizeof(msi_address) > 4 - ? uint64_t(msi_address) >> 32 - : 0UL; - - _write_config_16(msi_cap + 0x8, upper_address); - _write_config_16(msi_cap + 0xc, msi_value); - } else - _write_config_16(msi_cap + 0x8, msi_value); - - /* enable MSI */ - _device_config.write(_config_access, msi_cap + 2, - msi ^ MSI_ENABLED, - Platform::Device::ACCESS_8BIT); - - msi = _read_config_16(msi_cap + 2); - - return msi & MSI_ENABLED; - } catch (...) { } - - return false; -} - -bool Platform::Device_component::_setup_msix(uint16_t const msix_cap) -{ - try { - struct Table_pba : Register<32> - { - struct Bir : Bitfield<0, 3> { }; - struct Offset : Bitfield<3, 29> { }; - }; - - addr_t const msi_address = _irq_session->msi_address(); - uint32_t const msi_value = _irq_session->msi_data(); - - uint16_t ctrl = _read_config_16(msix_cap + 2); - - uint32_t const slots = Msix_ctrl::Slots::get(ctrl) + 1; - - uint32_t const table = _read_config_32(msix_cap + 4); - uint8_t const table_bir = Table_pba::Bir::masked(table); - uint32_t const table_off = Table_pba::Offset::masked(table); - - enum { SIZEOF_MSI_TABLE_ENTRY = 16, SIZE_IOMEM = 0x1000 }; - - Pci::Resource res = _device_config.resource(table_bir); - if (!slots || !res.valid() || res.size() < SIZE_IOMEM || - table_off > res.size() - SIZE_IOMEM) - return false; - - if (slots * SIZEOF_MSI_TABLE_ENTRY > SIZE_IOMEM) - return false; - - uint64_t const msix_table_phys = res.base() + table_off; - - apply_msix_table(res, msix_table_phys, SIZE_IOMEM, - [&](addr_t const msix_table) - { - struct Msi_entry : public Mmio { - Msi_entry(addr_t const base) : Mmio(base) { } - - struct Address_low : Register<0x0, 32> { }; - struct Address_high : Register<0x4, 32> { }; - struct Value : Register<0x8, 32> { }; - struct Vector : Register<0xc, 32> { - struct Mask : Bitfield <0, 1> { }; - }; - } msi_entry_0 (msix_table); - - /* setup first msi-x table entry */ - msi_entry_0.write(msi_address & ~(0x3UL)); - msi_entry_0.write(sizeof(msi_address) == 4 ? 0 : msi_address >> 32); - msi_entry_0.write(msi_value); - msi_entry_0.write(0); - - /* disable all msi-x table entries beside the first one */ - for (unsigned i = 1; i < slots; i++) { - struct Msi_entry unused (msix_table + SIZEOF_MSI_TABLE_ENTRY * i); - unused.write(1); - } - - /* enable MSI-X */ - Msix_ctrl::Fmask::set(ctrl, 0); - Msix_ctrl::Enable::set(ctrl, 1); - _write_config_16(msix_cap + 2, ctrl); - }); - - /* check back that MSI-X got enabled */ - ctrl = _read_config_16(msix_cap + 2); - - return Msix_ctrl::Enable::get(ctrl); - } catch (Out_of_caps) { - warning("Out_of_caps during MSI-X enablement"); } - catch (Out_of_ram) { - warning("Out_of_ram during MSI-X enablement"); } - catch (...) { warning("MSI-X enablement failed"); } - - return false; -} diff --git a/repos/os/src/drivers/platform/legacy/x86/pci_device_component.h b/repos/os/src/drivers/platform/legacy/x86/pci_device_component.h deleted file mode 100644 index db3d92da36..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/pci_device_component.h +++ /dev/null @@ -1,608 +0,0 @@ -/* - * \brief platform device component - * \author Norman Feske - * \author Christian Helmuth - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _PCI_DEVICE_COMPONENT_H_ -#define _PCI_DEVICE_COMPONENT_H_ - -/* base */ -#include -#include -#include -#include -#include -#include - -/* os */ -#include - -/* local */ -#include "pci_device_config.h" -#include "irq.h" - -namespace Platform { - class Device_component; - class Session_component; - - typedef String<10> Device_name_string; - - typedef Registry > Device_bars_pool; -} - - -class Platform::Device_component : public Rpc_object, - private List::Element -{ - private: - - friend class List; - - /* - * Noncopyable - */ - Device_component(Device_component const &); - Device_component &operator = (Device_component const &); - - Env &_env; - Pci::Config::Delayer &_delayer; - Device_bars_pool &_devices_bars; - Device_config _device_config { }; - addr_t _config_space; - Config_access _config_access; - Platform::Session_component &_session; - Irq_session_component *_irq_session = nullptr; - unsigned short _irq_line; - bool _device_used { false }; - bool _device_assigned { false }; - Allocator &_global_heap; - - class Io_mem : public Io_mem_connection, - private List::Element - { - private: - - friend class List; - friend class Platform::Device_component; - - public: - - addr_t const base; - size_t const size; - - Io_mem(Env &env, addr_t base, size_t size, bool wc) - : - Io_mem_connection(env, base, size, wc), - base(base), size(size) - { } - }; - - enum { - IO_BLOCK_SIZE = sizeof(Io_port_connection) * - Device::NUM_RESOURCES + 32 + 8 * sizeof(void *), - IO_MEM_SIZE = sizeof(Io_mem) * - Device::NUM_RESOURCES + 32 + 8 * sizeof(void *), - PCI_IRQ_LINE = 0x3c, - PCI_IRQ_PIN = 0x3d, - - CAP_MSI_64 = 0x80, - MSI_ENABLED = 0x1 - }; - - struct Msix_ctrl : Register<16> - { - struct Slots : Bitfield< 0, 10> { }; - struct Fmask : Bitfield<14, 1> { }; - struct Enable : Bitfield<15, 1> { }; - }; - - struct Pci_express : Pci::Config - { - Pci_express(Device_component &dev, uint16_t cap) - : Pci::Config(dev._config_access, dev._device_config.bdf(), cap) { } - - struct Capabilities : Register<0x04, 32> { - struct Reset : Bitfield< 28, 1> { }; }; - struct Control: Register<0x08, 16> { - struct Reset : Bitfield< 15, 1> { }; }; - struct Status: Register<0x0a, 16> { - struct Pending : Bitfield< 5, 1> { }; }; - struct Capabilities2 : Register<0x24, 32> { - struct Readiness : Bitfield<31, 1> { }; }; - struct Status2 : Register<0x32, 16> { - struct Readiness_status : Bitfield<15, 1> { }; }; - }; - - struct Pci_power: Pci::Config - { - Pci_power(Device_component &dev, uint16_t cap) - : Pci::Config(dev._config_access, dev._device_config.bdf(), cap) { } - - struct Capabilities : Register<0x02, 16> - { - struct Specific_init : Bitfield< 5, 1> { }; - }; - struct Control : Register<0x04, 16> - { - struct D0_3 : Bitfield< 0, 2> { }; - struct No_soft_reset : Bitfield< 3, 1> { }; - }; - }; - - - Tslab _slab_ioport; - char _slab_ioport_block_data[IO_BLOCK_SIZE]; - - Tslab _slab_iomem; - char _slab_iomem_block_data[IO_MEM_SIZE]; - - char _mem_irq_component[sizeof(Irq_session_component)]; - - Io_port_connection *_io_port_conn[Device::NUM_RESOURCES]; - - /* list of requested resource chunks per BAR */ - List _io_mem[Device::NUM_RESOURCES]; - - struct Status : Register<8> - { - struct Capabilities : Bitfield<4,1> { }; - - inline static access_t read(uint8_t t) { return t; } - }; - - /** - * Convenience functions to increase readability of code - */ - uint16_t _read_config_16(uint16_t const cap) - { - return _device_config.read(_config_access, cap, - Platform::Device::ACCESS_16BIT); - } - - void _write_config_16(uint16_t const cap, uint16_t const value) - { - _device_config.write(_config_access, cap, value, - Platform::Device::ACCESS_16BIT); - } - - uint32_t _read_config_32(uint16_t const cap) - { - return _device_config.read(_config_access, cap, - Platform::Device::ACCESS_32BIT); - } - - void _write_config_32(uint16_t const cap, uint32_t const value) - { - _device_config.write(_config_access, cap, value, - Platform::Device::ACCESS_32BIT); - } - - /** - * Read out msi capabilities of the device. - */ - uint16_t _msi_cap() - { - enum { CAP_MSI = 0x5 }; - return _lookup_cap(CAP_MSI); - } - - uint16_t _msix_cap() - { - enum { CAP_MSI_X = 0x11 }; - return _lookup_cap(CAP_MSI_X); - } - - uint16_t _power_cap() - { - enum { CAP_POWER = 0x1 }; - return _lookup_cap(CAP_POWER); - } - - /* PCI express cap (not PCI express extended cap!) */ - uint16_t _pcie_cap() - { - enum { CAP_PCIE = 0x10 }; - return _lookup_cap(CAP_PCIE); - } - - uint16_t _lookup_cap(uint16_t const target_cap) - { - enum { PCI_STATUS = 0x6, PCI_CAP_OFFSET = 0x34 }; - - Status::access_t status = Status::read(_read_config_16(PCI_STATUS)); - if (!Status::Capabilities::get(status)) - return 0; - - uint8_t cap = _read_config_16(PCI_CAP_OFFSET); - - for (uint16_t val = 0; cap; cap = val >> 8) { - val = _read_config_16(cap); - if ((val & 0xff) != target_cap) - continue; - - return cap; - } - - return 0; - } - - - /** - * Disable MSI/MSI-X if already enabled. - */ - unsigned _configure_irq(unsigned irq, uint16_t const msi_cap, - uint16_t const msix_cap) - { - uint8_t pin = _device_config.read(_config_access, PCI_IRQ_PIN, - Platform::Device::ACCESS_8BIT); - if (!pin) - return Irq_session_component::INVALID_IRQ; - - /* lookup rewrite information as provided by acpi table */ - uint16_t irq_r = Irq_routing::rewrite(_device_config.bdf(), pin); - if (irq_r) { - log(_device_config, " adjust IRQ as reported by ACPI: ", - irq, " -> ", irq_r); - - _irq_line = irq = irq_r; - } - - if (msi_cap) { - uint16_t msi = _read_config_16(msi_cap + 2); - - if (msi & MSI_ENABLED) - /* disable MSI */ - _device_config.write(_config_access, msi_cap + 2, - msi ^ MSI_ENABLED, - Platform::Device::ACCESS_8BIT); - } - - if (msix_cap) { - uint16_t msix = _read_config_16(msix_cap + 2); - - if (Msix_ctrl::Enable::get(msix)) { - Msix_ctrl::Enable::set(msix, 0); - - _write_config_16(msix_cap + 2, msix); - } - } - - return irq; - } - - - /** - * Disable bus master dma if already enabled. - */ - void _disable_bus_master_dma() - { - /* - * Disabling a bridge may make the devices behind non-functional, - * as we have no driver which will switch it on again - */ - if (_device_config.pci_bridge() || - _device_config.bdf() == Pci::Bdf::from_value(Platform::Bridge::root_bridge_bdf)) - return; - - _device_config.disable_bus_master_dma(_config_access); - } - - bool _setup_msi(uint16_t); - bool _setup_msix(uint16_t); - - template - void apply_msix_table(Pci::Resource const &lookup, - addr_t const msix_table_phys, - size_t const msix_table_size, - FUNC const &fn) - { - uint8_t max = sizeof(_io_mem) / sizeof(_io_mem[0]); - for (unsigned i = 0; i < max; ++i) { - Pci::Resource res = _device_config.resource(i); - - if (!res.valid() || !res.mem()) - continue; - - if (res.base() != lookup.base() || res.size() != lookup.size()) - continue; - - for (Io_mem * io_mem = _io_mem[i].first(); io_mem; io_mem = io_mem->next()) { - - if (!(io_mem->base <= msix_table_phys && - msix_table_phys + msix_table_size <= io_mem->base + io_mem->size)) - continue; - - size_t const offset = msix_table_phys - io_mem->base; - - Attached_dataspace mem_io(_env.rm(), io_mem->dataspace()); - - fn(reinterpret_cast(mem_io.local_addr()) + offset); - - return; - } - } - - /* requested io_mem not allocated by Pci::Resource - try direct */ - Io_mem io_mem(_env, msix_table_phys, msix_table_size, false); - Attached_dataspace mem_io(_env.rm(), io_mem.dataspace()); - addr_t const offset = msix_table_phys & 0xfffull; - addr_t const msix_table = reinterpret_cast(mem_io.local_addr()) + offset; - - fn(msix_table); - } - - void _device_reset() - { - uint16_t const cap = _pcie_cap(); - if (!cap) - return; - - Pci_express pci_cap(*this, cap); - - if (!pci_cap.read()) - return; - - log(_device_config, " reset function"); - - pci_cap.write(1); - - try { - /* optional use FLR Time if available instead of heuristic */ - pci_cap.wait_for(Pci::Config::Attempts(100), - Pci::Config::Microseconds(10000), _delayer, - Pci_express::Status::Pending::Equal(0)); - } catch (Pci::Config::Polling_timeout) { - warning(_device_config, " reset timeout raised"); - } - } - - void _power_off() - { - /* don't touch unused device */ - if (!_device_used) - return; - - uint16_t const cap = _power_cap(); - if (!cap) { - _disable_bus_master_dma(); - return; - } - - /* - * PCI Power Management - 8.2.2 D3 State - * - * "If the device driver is not capable of fully reinitializing" - * "a function, the operating system should not put the function" - * "into D3" - * - * Actually, at this point we don't know about the capabilities of - * the actual driver. - */ - log(_device_config, " power off"); - - /* - * "When placing a function into D3, the operating system software" - * "is required to disable I/O and memory space as well as bus" - * "mastering via the PCI Command register. - */ - Device_config::Pci_header header (_config_access, _device_config.bdf()); - - auto command = header.read(); - Device_config::Pci_header::Command::Dma::set(command, 0); - Device_config::Pci_header::Command::Memory::set(command, 0); - Device_config::Pci_header::Command::Ioport::set(command, 0); - - header.write(command); - - /* power off */ - Pci_power pci_cap(*this, cap); - pci_cap.write(3); - } - - void _power_on() - { - uint16_t const cap = _power_cap(); - if (!cap) - return; - - Pci_power pci_cap(*this, cap); - - if (pci_cap.read() == 0) - return; - - /* since it was off before, it got used by powering it on */ - _device_used = true; - - log(_device_config, " power on", - pci_cap.read() ? ", no_soft_reset" : "", - pci_cap.read() ? ", specific_init_required" : ""); - - /* power on */ - pci_cap.write(0); - - /* - * PCI Express 4.3 - 5.3.1.4. D3 State - * - * "Unless Readiness Notifications mechanisms are used ..." - * "a minimum recovery time following a D3 hot → D0 transition of" - * "at least 10 ms ..." - */ - _delayer.usleep(10'000); - - /* - * PCI Power Management - 3.2.4 - PMCSR Power Management Control/Status - * - * "no additional operating system intervention is required ..." - * "beyond writing the PowerState" - */ - if (pci_cap.read()) - return; - - _device_reset(); - - _devices_bars.for_each([&](auto const &bars) { - if (!(bars.bdf == _device_config.bdf())) - return; - - _device_config.restore_bars(_config_access, bars); - }); - - /* re-read the resources which set to valid ones after power on */ - _device_config = Device_config(_device_config.bdf(), - &_config_access); - } - - public: - - /** - * Constructor for PCI devices - */ - Device_component(Env &env, - Device_config device_config, addr_t addr, - Config_access &config_access, - Platform::Session_component &session, - Allocator &md_alloc, - Allocator &global_heap, - Pci::Config::Delayer &delayer, - Device_bars_pool &devices_bars) - : - _env(env), - _delayer(delayer), - _devices_bars(devices_bars), - _device_config(device_config), _config_space(addr), - _config_access(config_access), - _session(session), - _irq_line(_device_config.read(_config_access, PCI_IRQ_LINE, - Platform::Device::ACCESS_8BIT)), - _global_heap(global_heap), - _slab_ioport(&md_alloc, &_slab_ioport_block_data), - _slab_iomem(&md_alloc, &_slab_iomem_block_data) - { - for (unsigned i = 0; i < Device::NUM_RESOURCES; i++) { - _io_port_conn[i] = nullptr; - } - - _power_on(); - } - - /** - * Constructor for non PCI devices - */ - Device_component(Env &env, - Attached_io_mem_dataspace &pciconf, - Platform::Session_component &session, unsigned irq, - Allocator &global_heap, - Pci::Config::Delayer &delayer, - Device_bars_pool &devices_bars) - : - _env(env), - _delayer(delayer), - _devices_bars(devices_bars), - _config_space(~0UL), - _config_access(pciconf), - _session(session), - _irq_line(irq), - _global_heap(global_heap), - _slab_ioport(nullptr, &_slab_ioport_block_data), - _slab_iomem(nullptr, &_slab_iomem_block_data) - { - for (unsigned i = 0; i < Device::NUM_RESOURCES; i++) - _io_port_conn[i] = nullptr; - } - - /** - * De-constructor - */ - ~Device_component() - { - if (_irq_session) { - _env.ep().rpc_ep().dissolve(_irq_session); - _irq_session->~Irq_session_component(); - } - - for (unsigned i = 0; i < Device::NUM_RESOURCES; i++) { - if (_io_port_conn[i]) - destroy(_slab_ioport, _io_port_conn[i]); - - while (Io_mem * io_mem = _io_mem[i].first()) { - _io_mem[i].remove(io_mem); - destroy(_slab_iomem, io_mem); - } - } - - if (!pci_device()) - return; - - _power_off(); - } - - /* distinct non-PCI and PCI devices */ - bool pci_device() const { return _device_config.valid(); } - - /**************************************** - ** Methods used solely by pci session ** - ****************************************/ - - Device_config device_config() const { return _device_config; } - addr_t config_space() const { return _config_space; } - - virtual Device_name_string name() const { return "PCI"; } - - template - void for_each_device(FUNC const &fn) const - { - fn(*this); - - for (auto *dev = this; dev; dev = dev->next()) { - fn(*dev); } - } - - /************************** - ** PCI-device interface ** - **************************/ - - void bus_address(unsigned char *bus, unsigned char *dev, - unsigned char *fn) override - { - *bus = _device_config.bdf().bus; - *dev = _device_config.bdf().device; - *fn = _device_config.bdf().function; - } - - unsigned short vendor_id() override { return _device_config.vendor_id(); } - - unsigned short device_id() override { return _device_config.device_id(); } - - unsigned class_code() override { return _device_config.class_code(); } - - Resource resource(int resource_id) override - { - if (pci_device()) - return _device_config.resource(resource_id).api_resource(); - - /* return invalid resource if device is invalid */ - return Resource(0, 0); - } - - unsigned config_read(unsigned char address, Access_size size) override; - - void config_write(unsigned char address, unsigned value, - Access_size size) override; - - Irq_session_capability irq(uint8_t) override; - - Io_port_session_capability io_port(uint8_t) override; - - Io_mem_session_capability io_mem(uint8_t, Cache, addr_t, size_t) override; -}; - -#endif /* _PCI_DEVICE_COMPONENT_H_ */ diff --git a/repos/os/src/drivers/platform/legacy/x86/pci_device_config.h b/repos/os/src/drivers/platform/legacy/x86/pci_device_config.h deleted file mode 100644 index 0478bc988b..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/pci_device_config.h +++ /dev/null @@ -1,458 +0,0 @@ -/* - * \brief PCI device configuration - * \author Norman Feske - * \author Christian Helmuth - * \date 2008-01-29 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _X86__PCI_DEVICE_CONFIG_H_ -#define _X86__PCI_DEVICE_CONFIG_H_ - -#include -#include -#include -#include "pci_config_access.h" - - -namespace Platform { namespace Pci { struct Resource; } } - - -class Platform::Pci::Resource -{ - public: - - struct Bar : Register<32> - { - struct Space : Bitfield<0,1> { enum { MEM = 0, PORT = 1 }; }; - - struct Mem_type : Bitfield<1,2> { enum { MEM32 = 0, MEM64 = 2 }; }; - struct Mem_prefetch : Bitfield<3,1> { }; - struct Mem_address_mask : Bitfield<4,28> { }; - struct Port_address_mask : Bitfield<2,14> { }; - - static bool mem(access_t r) { return Space::get(r) == Space::MEM; } - static bool mem64(access_t r) { return mem(r) - && Mem_type::get(r) == Mem_type::MEM64; } - static uint64_t mem_address(access_t r0, uint64_t r1) { return (r1 << 32) | Mem_address_mask::masked(r0); } - static uint64_t mem_size(access_t r0, uint64_t r1) { return ~mem_address(r0, r1) + 1; } - - static uint16_t port_address(access_t r) { return Port_address_mask::masked(r); } - static uint16_t port_size(access_t r) { return ~port_address(r) + 1; } - }; - - private: - - uint32_t _bar[2] { 0, 0 }; /* contains two consecutive BARs for MEM64 */ - uint64_t _size { 0 }; - - public: - - /* invalid resource */ - Resource() { } - - /* PORT or MEM32 resource */ - Resource(uint32_t bar, uint32_t size) - : - _bar{bar, 0}, _size(mem() ? Bar::mem_size(size, ~0) : Bar::port_size(size)) - { } - - /* MEM64 resource */ - Resource(uint32_t bar0, uint32_t size0, uint32_t bar1, uint32_t size1) - : _bar{bar0, bar1}, _size(Bar::mem_size(size0, size1)) - { } - - bool valid() const { return !!_bar[0]; } /* no base address -> invalid */ - bool mem() const { return Bar::mem(_bar[0]); } - bool mem64() const { return mem() && Bar::mem64(_bar[0]); } - uint64_t base() const { return mem() ? Bar::mem_address(_bar[0], _bar[1]) - : Bar::port_address(_bar[0]); } - uint64_t size() const { return _size; } - - Platform::Device::Resource api_resource() - { - /* - * The API type limits to 32-bit currently (defined in - * spec/x86/platform_device/platform_device.h) - */ - return Device::Resource((unsigned)_bar[0], (unsigned)_size); - } - - void print(Output &out) const - { - Genode::print(out, Hex_range(base(), size())); - Genode::print(out, " ("); - Genode::print(out, valid() ? mem() ? Bar::mem64(_bar[0]) ? "MEM64" : "MEM" : "IO" : "invalid"); - Genode::print(out, ")"); - } -}; - - -namespace Platform { - - class Device_config - { - private: - - Pci::Bdf _bdf; - - /* - * Information provided by the PCI config space - */ - unsigned _vendor_id = 0, _device_id = 0; - unsigned _class_code = 0; - unsigned _header_type = 0; - - /* - * Header type definitions - */ - enum { - HEADER_FUNCTION = 0, - HEADER_PCI_TO_PCI = 1, - HEADER_CARD_BUS = 2 - }; - - Platform::Pci::Resource _resource[Device::NUM_RESOURCES]; - - bool _resource_id_is_valid(int resource_id) const - { - /* - * The maximum number of PCI resources depends on the - * header type of the device. - */ - int max_num = _header_type == HEADER_FUNCTION ? Device::NUM_RESOURCES - : _header_type == HEADER_PCI_TO_PCI ? 2 - : 0; - - return resource_id >= 0 && resource_id < max_num; - } - - enum { INVALID_VENDOR = 0xffffU }; - - public: - - enum { MAX_BUSES = 256, MAX_DEVICES = 32, MAX_FUNCTIONS = 8 }; - - enum { - PCI_CMD_REG = 0x4, - PCI_CMD_MASK = 0x7, /* IOPORT (1), MEM(2), DMA(4) */ - PCI_CMD_DMA = 0x4, - }; - - struct Pci_header : Pci::Config - { - Pci_header(Config_access &access, Pci::Bdf const bdf) - : Pci::Config(access, bdf, 0 /* from start */) { } - - struct Command : Register<0x04, 16> - { - struct Ioport : Bitfield< 0, 1> { }; - struct Memory : Bitfield< 1, 1> { }; - struct Dma : Bitfield< 2, 1> { }; - }; - }; - - struct Device_bars - { - Pci::Bdf bdf; - - uint32_t bar_addr[Device::NUM_RESOURCES] { }; - - bool all_invalid() const - { - for (unsigned i = 0; i < Device::NUM_RESOURCES; i++) { - if (bar_addr[i] != 0 && bar_addr[i] != ~0U) - return false; - } - return true; - } - - Device_bars(Pci::Bdf bdf) : bdf(bdf) { } - virtual ~Device_bars() { }; - }; - - /** - * Constructor - */ - Device_config() : _bdf({ .bus = 0, .device = 0, .function = 0 }) { - _vendor_id = INVALID_VENDOR; } - - Device_config(Pci::Bdf bdf) : _bdf(bdf) { } - - Device_config(Pci::Bdf bdf, Config_access *pci_config) : _bdf(bdf) - { - _vendor_id = pci_config->read(bdf, 0, Device::ACCESS_16BIT); - - /* break here if device is invalid */ - if (_vendor_id == INVALID_VENDOR) - return; - - _device_id = pci_config->read(bdf, 2, Device::ACCESS_16BIT); - _class_code = pci_config->read(bdf, 8, Device::ACCESS_32BIT) >> 8; - _class_code &= 0xffffff; - _header_type = pci_config->read(bdf, 0xe, Device::ACCESS_8BIT); - _header_type &= 0x7f; - - /* - * We prevent scanning function 1-7 of non-multi-function - * devices by checking bit 7 (mf bit) of function 0 of the - * device. Note, the mf bit of function 1-7 is not significant - * and may be set or unset. - */ - if (bdf.function != 0) { - Pci::Bdf const dev { .bus = bdf.bus, .device = bdf.device, .function = 0 }; - if (!(pci_config->read(dev, 0xe, Device::ACCESS_8BIT) & 0x80)) { - _vendor_id = INVALID_VENDOR; - return; - } - } - - /* - * We iterate over all BARs but check for 64-bit memory - * resources, which are stored in two consecutive BARs. The - * MEM64 information is stored in the first resource entry and - * the second resource is marked invalid. - */ - int i = 0; - while (_resource_id_is_valid(i)) { - - using Pci::Resource; - - /* index of base-address register in configuration space */ - unsigned const bar_idx = 0x10 + 4 * i; - - /* First, save initial base-address register value. */ - unsigned const bar_value = pci_config->read(bdf, bar_idx, Device::ACCESS_32BIT); - - /* - * Second, determine resource size (and validity) by writing - * a magic value (all bits set) to the base-address - * register. In response, the device clears a number of - * lowest-significant bits corresponding to the resource - * size. - */ - pci_config->write(bdf, bar_idx, ~0, Device::ACCESS_32BIT); - unsigned const bar_size = pci_config->read(bdf, bar_idx, Device::ACCESS_32BIT); - - /* skip invalid resource BARs */ - if (bar_value == ~0U || bar_size == 0U) { - _resource[i] = Resource(); - ++i; - continue; - } - - /* - * Finally, we write back the bar-address value as assigned - * by the BIOS. - */ - pci_config->write(bdf, bar_idx, bar_value, Device::ACCESS_32BIT); - - if (!Resource::Bar::mem64(bar_value)) { - _resource[i] = Resource(bar_value, bar_size); - ++i; - } else { - /* also consume next BAR for MEM64 */ - unsigned const bar2_idx = bar_idx + 4; - unsigned const bar2_value = - pci_config->read(bdf, bar2_idx, Device::ACCESS_32BIT); - pci_config->write(bdf, bar2_idx, ~0, Device::ACCESS_32BIT); - unsigned const bar2_size = - pci_config->read(bdf, bar2_idx, Device::ACCESS_32BIT); - pci_config->write(bdf, bar2_idx, bar2_value, Device::ACCESS_32BIT); - - /* combine into first resource and mark second as invalid */ - _resource[i] = Resource(bar_value, bar_size, - bar2_value, bar2_size); - ++i; - _resource[i] = Resource(); - ++i; - } - } - } - - /** - * Accessor function for device location - */ - Pci::Bdf bdf() const { return _bdf; } - - void print(Output &out) const { Genode::print(out, bdf()); } - - /** - * Accessor functions for device information - */ - unsigned short device_id() { return _device_id; } - unsigned short vendor_id() { return _vendor_id; } - unsigned int class_code() { return _class_code; } - - /** - * Return true if device is a PCI bridge - */ - bool pci_bridge() const { return _header_type == HEADER_PCI_TO_PCI; } - - /** - * Return true if device is valid - */ - bool valid() const { return _vendor_id != INVALID_VENDOR; } - - /** - * Return resource description by resource ID - */ - Platform::Pci::Resource resource(int resource_id) - { - /* return invalid resource if sanity check fails */ - if (!_resource_id_is_valid(resource_id)) - return Platform::Pci::Resource(); - - return _resource[resource_id]; - } - - void remap_resource(Config_access &config, int const id, - uint64_t const base_address) - { - if (!_resource_id_is_valid(id)) - return; - - using Pci::Resource; - - Resource &res = _resource[id]; - - log(*this, " remap BAR", id, " ", res, " to ", Hex(base_address)); - - struct Resource_params { uint32_t bar; uint32_t size; }; - - auto update_bar = [&] (int const id, uint32_t const address) { - unsigned const off = 0x10 + 4 * id; - - config.write(_bdf, off, ~0U, Device::ACCESS_32BIT); - - uint32_t const size = config.read(_bdf, off, Device::ACCESS_32BIT); - - config.write(_bdf, off, address, Device::ACCESS_32BIT); - - return Resource_params { - .bar = config.read(_bdf, off, Device::ACCESS_32BIT), - .size = size - }; - }; - - Resource_params const bar0 = update_bar(id, base_address & 0xffffffff); - - if (!res.mem64()) { - res = Resource(bar0.bar, bar0.size); - return; - } - - Resource_params const bar1 = update_bar(id + 1, (base_address >> 32) & 0xffffffff); - - res = Resource(bar0.bar, bar0.size, bar1.bar, bar1.size); - } - - template void for_each_resource(FN const &fn) const - { - for (unsigned r = 0; r < Device::NUM_RESOURCES; r++) { - if (!_resource_id_is_valid(r)) - break; - - if (_resource[r].valid()) - fn(r, _resource[r]); - } - } - - /** - * Read configuration space - */ - enum { DONT_TRACK_ACCESS = false }; - unsigned read(Config_access &pci_config, unsigned char address, - Device::Access_size size, bool track = true) - { - return pci_config.read(_bdf, address, size, track); - } - - /** - * Write configuration space - */ - void write(Config_access &pci_config, unsigned char address, - unsigned long value, Device::Access_size size, - bool track = true) - { - pci_config.write(_bdf, address, value, size, track); - } - - bool reg_in_use(Config_access &pci_config, unsigned char address, - Device::Access_size size) { - return pci_config.reg_in_use(address, size); } - - void disable_bus_master_dma(Config_access &pci_config) - { - Pci_header header (pci_config, _bdf); - - if (header.read()) - header.write(0); - } - - Device_bars save_bars() - { - Device_bars bars (_bdf); - - for (unsigned r = 0; r < Device::NUM_RESOURCES; r++) { - if (!_resource_id_is_valid(r)) - break; - - bars.bar_addr[r] = _resource[r].base(); - } - - return bars; - }; - - void restore_bars(Config_access &config, Device_bars const &bars) - { - for (unsigned r = 0; r < Device::NUM_RESOURCES; r++) { - if (!_resource_id_is_valid(r)) - break; - - /* index of base-address register in configuration space */ - unsigned const bar_idx = 0x10 + 4 * r; - - /* PCI protocol to write address after requesting size */ - config.write(_bdf, bar_idx, ~0U, Device::ACCESS_32BIT); - config.read (_bdf, bar_idx, Device::ACCESS_32BIT); - config.write(_bdf, bar_idx, bars.bar_addr[r], - Device::ACCESS_32BIT); - } - } - }; - - class Config_space : private List::Element - { - private: - - friend class List; - - uint32_t _bdf_start; - uint32_t _func_count; - addr_t _base; - - public: - - using List::Element::next; - - Config_space(uint32_t bdf_start, uint32_t func_count, addr_t base) - : - _bdf_start(bdf_start), _func_count(func_count), _base(base) {} - - addr_t lookup_config_space(Pci::Bdf const bdf) - { - if ((_bdf_start <= bdf.value()) && (bdf.value() <= _bdf_start + _func_count - 1)) - return _base + (unsigned(bdf.value()) << 12); - return 0; - } - }; -} - -#endif /* _X86__PCI_DEVICE_CONFIG_H_ */ diff --git a/repos/os/src/drivers/platform/legacy/x86/pci_session_component.h b/repos/os/src/drivers/platform/legacy/x86/pci_session_component.h deleted file mode 100644 index ddf2828faa..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/pci_session_component.h +++ /dev/null @@ -1,1224 +0,0 @@ -/* - * \brief Platform session component - * \author Norman Feske - * \author Christian Helmuth - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _PCI_SESSION_COMPONENT_H_ -#define _PCI_SESSION_COMPONENT_H_ - -/* base */ -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -/* os */ -#include -#include -#include -#include - -/* local */ -#include "device_pd.h" -#include "pci_bridge.h" -#include "pci_config_access.h" -#include "pci_device_component.h" - -namespace Platform { - - unsigned short bridge_bdf(unsigned char bus); - - class Pci_buses; - class Ram_dataspace; - class Rmrr; - class Root; - class Session_component; -} - - -class Platform::Ram_dataspace : public List::Element -{ - private: - - Ram_dataspace_capability const _cap; - - public: - - Ram_dataspace(Ram_dataspace_capability c) : _cap(c) { } - - bool match(const Ram_dataspace_capability &cap) const { - return cap.local_name() == _cap.local_name(); } - - Ram_dataspace_capability cap() const { return _cap; } -}; - - -class Platform::Rmrr : public List::Element -{ - public: - - class Bdf : public List::Element - { - private: - - uint8_t _bus, _dev, _func; - - public: - - Bdf(uint8_t bus, uint8_t dev, uint8_t func) - : _bus(bus), _dev(dev), _func(func) { } - - bool match(Pci::Bdf const bdf) - { - return bdf.bus == _bus && bdf.device == _dev && - bdf.function == _func; - } - }; - - private: - - uint64_t const _start, _end; - - Io_mem_dataspace_capability _cap { }; - - List _bdf_list { }; - - Constructible _io_mem { }; - - public: - - Rmrr(uint64_t start, uint64_t end) : _start(start), _end(end) { } - - Io_mem_dataspace_capability match(Env &env, Device_config config) - { - for (Bdf *bdf = _bdf_list.first(); bdf; bdf = bdf->next()) { - if (!bdf->match(config.bdf())) - continue; - - if (_cap.valid()) - return _cap; - - _io_mem.construct(env, _start, _end - _start + 1); - _cap = _io_mem->dataspace(); - return _cap; - } - return Io_mem_dataspace_capability(); - } - - addr_t start() const { return _start; } - - void add(Bdf * bdf) { _bdf_list.insert(bdf); } - - static List *list() - { - static List _list; - return &_list; - } -}; - - -class Platform::Pci_buses -{ - private: - - Bit_array _valid { }; - - void _scan_bus(Config_access &, Allocator &, Device_bars_pool &, - unsigned char bus, Xml_node const &config); - - bool _bus_valid(int bus) - { - if (bus >= Device_config::MAX_BUSES) - return false; - - return _valid.get(bus, 1); - } - - public: - - Pci_buses(Allocator &heap, - Attached_io_mem_dataspace &pciconf, - Device_bars_pool &devices_bars, - Xml_node const &config_node) - { - Config_access c(pciconf); - _scan_bus(c, heap, devices_bars, 0 /* root bus */, config_node); - } - - /** - * Scan PCI buses for a device - * - * \param bus start scanning at bus number - * \param device start scanning at device number - * \param function start scanning at function number - * \param out_device_config device config information of the - * found device - * \param config_access interface for accessing the PCI - * configuration - * space - * - * \retval true device was found - * \retval false no device was found - */ - bool find_next(unsigned bus, unsigned device, unsigned function, - Device_config *out_device_config, - Config_access *config_access) - { - for (; bus < Device_config::MAX_BUSES; bus++) { - if (!_bus_valid(bus)) - continue; - - for (; device < Device_config::MAX_DEVICES; device++) { - for (; function < Device_config::MAX_FUNCTIONS; function++) { - - /* read config space */ - Pci::Bdf const bdf { .bus = bus, .device = device, .function = function }; - Device_config config(bdf, config_access); - - if (config.valid()) { - *out_device_config = config; - return true; - } - } - function = 0; /* init value for next device */ - } - device = 0; /* init value for next bus */ - } - return false; - } -}; - - -class Platform::Session_component : public Rpc_object -{ - private: - - Env &_env; - Attached_rom_dataspace &_config; - Attached_io_mem_dataspace &_pciconf; - addr_t const _pciconf_base; - Ram_quota_guard _ram_guard; - Cap_quota_guard _cap_guard; - Constrained_ram_allocator _env_ram { _env.pd(), _ram_guard, _cap_guard }; - Heap _md_alloc; - Session_label const _label; - List _device_list { }; - Platform::Pci_buses &_pci_bus; - Allocator &_global_heap; - Pci::Config::Delayer &_delayer; - Device_bars_pool &_devices_bars; - bool const _iommu; - bool const _msi_avail; - bool _msi_usage { true }; - bool _msix_usage { true }; - - /** - * Registry of RAM dataspaces allocated by the session - */ - List _ram_caps { }; - - void _insert(Ram_dataspace_capability cap) { - _ram_caps.insert(new (_md_alloc) Platform::Ram_dataspace(cap)); } - - bool _owned(Ram_dataspace_capability cap) - { - for (Ram_dataspace *ds = _ram_caps.first(); ds; ds = ds->next()) - if (ds->match(cap)) - return true; - - return false; - } - - bool _remove(Ram_dataspace_capability cap) - { - for (Platform::Ram_dataspace *ds = _ram_caps.first(); ds; - ds = ds->next()) { - - if (!ds->match(cap)) - continue; - - _ram_caps.remove(ds); - destroy(_md_alloc, ds); - return true; - } - return false; - } - - Platform::Device_pd _device_pd { _env, _label, _ram_guard, _cap_guard }; - - enum { MAX_PCI_DEVICES = Device_config::MAX_BUSES * - Device_config::MAX_DEVICES * - Device_config::MAX_FUNCTIONS }; - - static Bit_array bdf_in_use; - - /** - * List containing extended PCI config space information - */ - static List &config_space_list() - { - static List config_space; - return config_space; - } - - /** - * Find for a given PCI device described by the bus:dev:func triple - * the corresponding extended 4K PCI config space address. - * A io mem dataspace is created and returned. - */ - addr_t lookup_config_space(Pci::Bdf const bdf) - { - addr_t config_space = ~0UL; /* invalid */ - - Config_space *e = config_space_list().first(); - for (; e && (config_space == ~0UL); e = e->next()) - config_space = e->lookup_config_space(bdf); - - return config_space; - } - - typedef String<32> Alias_name; - - /* - * List of aliases for PCI base class, sub class, and - * programming interface triples supported in XML config - */ - bool valid_alias(Alias_name const &name, unsigned const class_code = ~0U) - { - /* wildcard 0xff matches all codes */ - auto wildcard = [] (uint8_t v) { return v == 0xff; }; - - static struct Alias { - const char *name; - uint8_t b, s, p; /* base class, sub class, progif */ - } const aliases [] = { - { "ALL" , 0xff, 0xff, 0xff}, - { "AHCI" , 0x01, 0x06, 0xff}, - { "AUDIO" , 0x04, 0x01, 0xff}, - { "ETHERNET" , 0x02, 0x00, 0xff}, - { "HDAUDIO" , 0x04, 0x03, 0xff}, - { "ISABRIDGE", 0x06, 0x01, 0xff}, - { "NVME" , 0x01, 0x08, 0x02}, - { "USB" , 0x0c, 0x03, 0x00}, /* UHCI */ - { "USB" , 0x0c, 0x03, 0x10}, /* OHCI */ - { "USB" , 0x0c, 0x03, 0x20}, /* EHCI */ - { "USB" , 0x0c, 0x03, 0x30}, /* XHCI */ - { "USB4" , 0x0c, 0x03, 0x40}, /* USB4 NHI/Thunderbolt */ - { "VGA" , 0x03, 0x00, 0x00}, - { "WIFI" , 0x02, 0x80, 0xff}, - }; - - uint8_t const b = (class_code >> 16) & 0xff; - uint8_t const s = (class_code >> 8) & 0xff; - uint8_t const p = class_code & 0xff; - - for (Alias const &alias : aliases) { - if (name != alias.name) - continue; - - if ((wildcard(b) || wildcard(alias.b) || b == alias.b) - && (wildcard(s) || wildcard(alias.s) || s == alias.s) - && (wildcard(p) || wildcard(alias.p) || p == alias.p)) - return true; - } - - return false; - } - - /** - * Check device usage according to session policy - */ - bool permit_device(const char * name) - { - Session_policy const policy { _label, _config.xml() }; - - try { - policy.for_each_sub_node("device", [&] (Xml_node dev) { - - /* enforce restriction based on name */ - if (dev.attribute_value("name", Device_name_string()) == name) - /* found identical match - permit access */ - throw true; - }); - } catch (bool result) { return result; } - - return false; - } - - static bool _bdf_exactly_specified(Xml_node node) - { - return node.has_attribute("bus") - && node.has_attribute("device") - && node.has_attribute("function"); - } - - static bool _bdf_attributes_in_valid_range(Xml_node const &node) - { - return _bdf_exactly_specified(node) - && (node.attribute_value("bus", 0U) < Device_config::MAX_BUSES) - && (node.attribute_value("device", 0U) < Device_config::MAX_DEVICES) - && (node.attribute_value("function", 0U) < Device_config::MAX_FUNCTIONS); - } - - static bool _bdf_matches(Xml_node const &node, Pci::Bdf const &bdf) - { - return Pci::Bdf::from_xml(node) == bdf; - } - - /** - * Check according session policy device usage - */ - bool permit_device(Pci::Bdf const bdf, unsigned const class_code) - { - try { - Session_policy const policy { _label, _config.xml() }; - - policy.for_each_sub_node("pci", [&] (Xml_node node) { - - if (_bdf_exactly_specified(node)) { - if (_bdf_matches(node, bdf)) - throw true; - /* check also for class entry */ - } - - if (!node.has_attribute("class")) - return; - - /* enforce restriction based upon classes */ - auto alias = node.attribute_value("class", Alias_name()); - - if (!valid_alias(alias, class_code)) - return; - - /* if this bdf is used by some policy - deny */ - if (alias != "ALL" && find_dev_in_policy(bdf)) - return; - - throw true; - }); - } catch (bool result) { return result; } - - return false; - } - - /** - * Lookup a given device name. - */ - bool find_dev_in_policy(const char * dev_name, bool once = true) - { - try { - _config.xml().for_each_sub_node("policy", [&] (Xml_node policy) { - policy.for_each_sub_node("device", [&] (Xml_node device) { - - if (device.attribute_value("name", Device_name_string()) == dev_name) { - - if (once) - throw true; - once = true; - } - }); - }); - } catch (bool result) { return result; } - - return false; - } - - /** - * Lookup a given device name. - */ - bool find_dev_in_policy(Pci::Bdf const bdf, bool once = true) - { - try { - Xml_node xml = _config.xml(); - xml.for_each_sub_node("policy", [&] (Xml_node policy) { - policy.for_each_sub_node("pci", [&] (Xml_node node) { - - if (_bdf_exactly_specified(node)) { - - if (_bdf_matches(node, bdf)) { - - if (once) - throw true; - once = true; - } - } - }); - }); - } catch (bool result) { return result; } - - return false; - } - - public: - - /** - * Constructor - */ - Session_component(Env &env, - Attached_rom_dataspace &config, - Attached_io_mem_dataspace &pciconf, - addr_t pciconf_base, - Platform::Pci_buses &buses, - Allocator &global_heap, - Pci::Config::Delayer &delayer, - Device_bars_pool &devices_bars, - char const *args, - bool const iommu, - bool const msi) - : - _env(env), - _config(config), - _pciconf(pciconf), - _pciconf_base(pciconf_base), - _ram_guard(ram_quota_from_args(args)), - _cap_guard(cap_quota_from_args(args)), - _md_alloc(_env_ram, env.rm()), - _label(label_from_args(args)), - _pci_bus(buses), - _global_heap(global_heap), - _delayer(delayer), - _devices_bars(devices_bars), - _iommu(iommu), - _msi_avail(msi) - { - /* subtract the RPC session and session dataspace capabilities */ - _cap_guard.withdraw(Cap_quota{2}); - - check_for_policy(); - } - - void check_for_policy() - { - Session_policy const policy { _label, _config.xml() }; - - if (_msi_avail) { - _msi_usage = policy.attribute_value("msi", _msi_usage); - _msix_usage = _msi_usage && - policy.attribute_value("msix", _msix_usage); - } else - _msi_usage = _msix_usage = false; - - /* check policy for non-pci devices */ - policy.for_each_sub_node("device", [&] (Xml_node device_node) { - - if (!device_node.has_attribute("name")) { - error("'", _label, "' - device node " "misses 'name' attribute"); - throw Service_denied(); - } - - Device_name_string const name = - device_node.attribute_value("name", Device_name_string()); - - enum { DOUBLET = false }; - if (find_dev_in_policy(name.string(), DOUBLET)) { - error("'", _label, "' - device '", name, "' " - "is part of more than one policy"); - throw Service_denied(); - } - }); - - /* pci devices */ - policy.for_each_sub_node("pci", [&] (Xml_node node) { - - enum { INVALID_CLASS = 0x1000000U }; - - /** - * Valid input is either a triple of 'bus', 'device', - * 'function' attributes or a single 'class' attribute. - * All other attribute names are traded as wrong. - */ - if (node.has_attribute("class")) { - - Alias_name const alias = node.attribute_value("class", Alias_name()); - - if (!valid_alias(alias)) { - error("'", _label, "' - invalid 'class' ", - "attribute '", alias, "'"); - throw Service_denied(); - } - - /* sanity check that 'class' is the only attribute */ - try { - node.attribute(1); - error("'", _label, "' - attributes beside 'class' detected"); - throw Service_denied(); - } - catch (Xml_attribute::Nonexistent_attribute) { } - - /* we have a class and it is the only attribute */ - return; - } - - /* no 'class' attribute - now check for valid bdf triple */ - try { - node.attribute(3); - error("'", _label, "' - " "invalid number of pci node attributes"); - throw Service_denied(); - - } catch (Xml_attribute::Nonexistent_attribute) { } - - if (_bdf_exactly_specified(node)) { - - if (!_bdf_attributes_in_valid_range(node)) { - error("'", _label, "' - " - "invalid pci node attributes for bdf"); - throw Service_denied(); - } - - Pci::Bdf const bdf = Pci::Bdf::from_xml(node); - - enum { DOUBLET = false }; - if (find_dev_in_policy(bdf, DOUBLET)) { - error("'", _label, "' - device '", bdf, "' " - "is part of more than one policy"); - throw Service_denied(); - } - } - }); - } - - bool policy_valid() - { - try { - /* check that policy is available */ - check_for_policy(); - } catch (...) { - return false; - } - - /* check that device entries in policy are still permitted */ - if (!_device_list.first()) - return true; - - bool result = true; - - _device_list.first()->for_each_device([&](auto const &dev) { - - /* Non PCI devices */ - if (!dev.pci_device()) { - if (!permit_device(dev.name().string())) - result = false; - - return; - } - - /* PCI devices */ - if (!permit_device(dev.device_config().bdf(), - dev.device_config().class_code())) - result = false; - }); - - return result; - } - - /** - * Destructor - */ - ~Session_component() - { - /* release all elements of the session's device list */ - while (_device_list.first()) - release_device(_device_list.first()->cap()); - - while (Platform::Ram_dataspace *ds = _ram_caps.first()) { - _ram_caps.remove(ds); - _env_ram.free(ds->cap()); - destroy(_md_alloc, ds); - } - } - - - void upgrade_resources(Session::Resources resources) - { - _ram_guard.upgrade(resources.ram_quota); - _cap_guard.upgrade(resources.cap_quota); - } - - - static void add_config_space(uint32_t bdf_start, - uint32_t func_count, - addr_t base, - Allocator &heap) - { - Config_space * space = - new (heap) Config_space(bdf_start, func_count, base); - config_space_list().insert(space); - } - - - /** - * Check whether msi usage was explicitly switched off - */ - bool msi_usage() const { return _msi_usage; } - - - /** - * Check whether msi-x usage was explicitly switched off - */ - bool msix_usage() const { return _msix_usage; } - - /*************************** - ** PCI session interface ** - ***************************/ - - Device_capability first_device(unsigned device_class, - unsigned class_mask) override { - return next_device(Device_capability(), device_class, class_mask); } - - Device_capability next_device(Device_capability prev_device, - unsigned device_class, - unsigned class_mask) override - { - /* - * Create the interface to the PCI config space. - */ - Config_access config_access(_pciconf); - - /* lookup device component for previous device */ - auto lambda = [&] (Device_component *prev) - { - - /* - * Start bus scanning after the previous device's location. - * If no valid device was specified for 'prev_device', - * start at the beginning. - */ - int bus = 0, device = 0, function = -1; - - if (prev) { - Device_config config = prev->device_config(); - bus = config.bdf().bus; - device = config.bdf().device; - function = config.bdf().function; - } - - /* - * Scan buses for devices. - * If no device is found, return an invalid capability. - */ - Device_config config; - - while (true) { - function += 1; - if (!_pci_bus.find_next(bus, device, function, &config, - &config_access)) - return Device_capability(); - - /* get new bdf values */ - bus = config.bdf().bus; - device = config.bdf().device; - function = config.bdf().function; - - /* if filter of driver don't match skip and continue */ - if ((config.class_code() ^ device_class) & class_mask) - continue; - - /* check that policy permit access to the matched device */ - if (permit_device(Pci::Bdf { (unsigned)bus, - (unsigned)device, - (unsigned)function }, - config.class_code())) - break; - } - - /* lookup if we have a extended pci config space */ - addr_t config_space = lookup_config_space(config.bdf()); - - /* - * A device was found. Create a new device component for the - * device and return its capability. - */ - Device_component * dev = new (_md_alloc) - Device_component(_env, config, config_space, config_access, - *this, _md_alloc, _global_heap, _delayer, - _devices_bars); - - _device_list.insert(dev); - - try { - /* if more than one driver uses the device - warn about */ - if (bdf_in_use.get(config.bdf().value(), 1)) - error("Device ", config, " is used by more than one driver - " - "session '", _label, "'."); - else - bdf_in_use.set(config.bdf().value(), 1); - - return _env.ep().rpc_ep().manage(dev); - } catch (...) { - _device_list.remove(dev); - destroy(_md_alloc, dev); - throw; - } - }; - return _env.ep().rpc_ep().apply(prev_device, lambda); - } - - void release_device(Device_capability device_cap) override - { - Device_component * device = nullptr; - auto lambda = [&] (Device_component *d) - { - device = d; - if (!device) - return; - - if (device->pci_device()) { - if (bdf_in_use.get(device->device_config().bdf().value(), 1)) - bdf_in_use.clear(device->device_config().bdf().value(), 1); - } - - _device_list.remove(device); - _env.ep().rpc_ep().dissolve(device); - }; - - /* lookup device component */ - _env.ep().rpc_ep().apply(device_cap, lambda); - - if (device) - destroy(_md_alloc, device); - } - - void assign_device(Device_component * device) - { - if (!device || device->config_space() == ~0UL || !_iommu) - return; - - try { - addr_t const base_ecam = _pciconf_base; - addr_t const base_offset = 0x1000UL * device->device_config().bdf().value(); - - if (base_ecam + base_offset != device->config_space()) - throw 1; - - for (Rmrr *r = Rmrr::list()->first(); r; r = r->next()) { - Io_mem_dataspace_capability rmrr_cap = r->match(_env, device->device_config()); - if (rmrr_cap.valid()) - _device_pd.attach_dma_mem(rmrr_cap, r->start()); - } - - _device_pd.assign_pci(_pciconf.cap(), base_offset, - device->device_config().bdf().value()); - - } catch (...) { - error("assignment to device pd or of RMRR region failed"); - } - } - - /** - * De-/Allocation of dma capable dataspaces - */ - - Ram_dataspace_capability alloc_dma_buffer(size_t const size, Cache cache) override - { - /* - * Check available quota beforehand and reflect the state back - * to the client because the 'Expanding_pd_session_client' will - * ask its parent otherwise. - */ - enum { WATERMARK_CAP_QUOTA = 8, }; - if (_env.pd().avail_caps().value < WATERMARK_CAP_QUOTA) - throw Out_of_caps(); - - enum { WATERMARK_RAM_QUOTA = 4096, }; - if (_env.pd().avail_ram().value < WATERMARK_RAM_QUOTA) - throw Out_of_ram(); - - if (!size) - return {}; - - Ram_dataspace_capability ram_cap = _env_ram.alloc(size, cache); - addr_t const dma_addr = _env.pd().dma_addr(ram_cap); - - if (!ram_cap.valid()) - return ram_cap; - - try { - _device_pd.attach_dma_mem(ram_cap, dma_addr); - _insert(ram_cap); - } catch (Out_of_ram) { - _env_ram.free(ram_cap); - throw Out_of_ram(); - } catch (Out_of_caps) { - _env_ram.free(ram_cap); - throw Out_of_caps(); - } - - return ram_cap; - } - - void free_dma_buffer(Ram_dataspace_capability ram_cap) override - { - if (!ram_cap.valid() || !_remove(ram_cap)) - return; - - _env_ram.free(ram_cap); - } - - addr_t dma_addr(Ram_dataspace_capability ram_cap) override - { - if (!ram_cap.valid() || !_owned(ram_cap)) - return 0; - - return _env.pd().dma_addr(ram_cap); - } - - /* non-PCI devices */ - Device_capability device(Device_name const &name) override; -}; - - -class Platform::Root : public Root_component -{ - private: - - Env &_env; - Allocator &_heap; - Attached_rom_dataspace &_config; - - Constructible _pci_confspace { }; - addr_t _pci_confspace_base = 0; - Constructible _pci_reporter { }; - - Device_bars_pool _devices_bars { }; - - Constructible _buses { }; - - bool _iommu { false }; - bool _pci_reported { false }; - bool _msi_platform; - - struct Timer_delayer : Pci::Config::Delayer, Timer::Connection - { - Timer_delayer(Env &env) : Timer::Connection(env) { } - - void usleep(uint64_t us) override { Timer::Connection::usleep(us); } - } _delayer { _env }; - - Registry > _sessions { }; - - void _parse_report_rom(Env &env, const char * acpi_rom, - bool acpi_platform) - { - Xml_node xml_acpi(acpi_rom); - if (!xml_acpi.has_type("acpi")) - throw 1; - - xml_acpi.for_each_sub_node("bdf", [&] (Xml_node &node) { - - uint32_t const bdf_start = node.attribute_value("start", 0U); - uint32_t const func_count = node.attribute_value("count", 0U); - addr_t const base = node.attribute_value("base", 0UL); - - Session_component::add_config_space(bdf_start, func_count, - base, _heap); - - Device_config const bdf_first(Pci::Bdf::from_value(bdf_start)); - Device_config const bdf_last(Pci::Bdf::from_value(bdf_start + - func_count - 1)); - - addr_t const memory_size = 0x1000UL * func_count; - - /* Simplification: Only consider first config space and - * check if it is for domain 0 */ - if (bdf_start || _pci_confspace.constructed()) { - warning("ECAM/MMCONF range ", - bdf_first, "-", bdf_last, " - addr ", - Hex_range(base, memory_size), " ignored"); - return; - } - - log("ECAM/MMCONF range ", bdf_first, "-", bdf_last, " - addr ", - Hex_range(base, memory_size)); - - _pci_confspace_base = base; - _pci_confspace.construct(env, base, memory_size); - }); - - if (!_pci_confspace.constructed()) - throw 2; - - Config_access config_access(*_pci_confspace); - - for (unsigned i = 0; i < xml_acpi.num_sub_nodes(); i++) { - Xml_node node = xml_acpi.sub_node(i); - - if (node.has_type("bdf") || node.has_type("reset")) - continue; - - if (node.has_type("irq_override")) { - unsigned const irq = node.attribute_value("irq", 0xffU); - unsigned const gsi = node.attribute_value("gsi", 0xffU); - unsigned const flags = node.attribute_value("flags", 0xffU); - - if (!acpi_platform) { - warning("MADT IRQ ", irq, "-> GSI ", gsi, " flags ", - flags, " ignored"); - continue; - } - - using Platform::Irq_override; - Irq_override * o = new (_heap) Irq_override(irq, gsi, - flags); - Irq_override::list()->insert(o); - continue; - } - - if (node.has_type("drhd") || node.has_type("ivdb")) { - _iommu = true; - continue; - } - - if (node.has_type("rmrr")) { - uint64_t const - mem_start = node.attribute_value("start", (uint64_t)0), - mem_end = node.attribute_value("end", (uint64_t)0); - - if (node.num_sub_nodes() == 0) - throw 3; - - Rmrr * rmrr = new (_heap) Rmrr(mem_start, mem_end); - Rmrr::list()->insert(rmrr); - - for (unsigned s = 0; s < node.num_sub_nodes(); s++) { - Xml_node scope = node.sub_node(s); - if (!scope.num_sub_nodes() || !scope.has_type("scope")) - throw 4; - - unsigned bus = 0, dev = 0, func = 0; - scope.attribute("bus_start").value(bus); - - for (unsigned p = 0; p < scope.num_sub_nodes(); p++) { - Xml_node path = scope.sub_node(p); - if (!path.has_type("path")) - throw 5; - - path.attribute("dev") .value(dev); - path.attribute("func").value(func); - - Pci::Bdf const bdf = { .bus = bus, .device = dev, - .function = func }; - - Device_config bridge(bdf, &config_access); - if (bridge.pci_bridge()) - /* PCI bridge spec 3.2.5.3, 3.2.5.4 */ - bus = bridge.read(config_access, 0x19, - Device::ACCESS_8BIT); - } - - rmrr->add(new (_heap) Rmrr::Bdf(bus, dev, func)); - } - continue; - } - - if (node.has_type("root_bridge")) { - node.attribute("bdf").value(Platform::Bridge::root_bridge_bdf); - continue; - } - - if (!node.has_type("routing")) { - error ("unsupported node '", node.type(), "'"); - throw __LINE__; - } - - unsigned const gsi = node.attribute_value("gsi", 0U), - bridge_bdf = node.attribute_value("bridge_bdf", 0U), - device = node.attribute_value("device", 0U), - device_pin = node.attribute_value("device_pin", 0U); - - /* drop routing information on non ACPI platform */ - if (!acpi_platform) - continue; - - Irq_routing * r = new (_heap) Irq_routing(gsi, bridge_bdf, - device, device_pin); - Irq_routing::list()->insert(r); - } - } - - void _construct_buses() - { - Dataspace_client ds_pci_mmio(_pci_confspace->cap()); - - uint64_t const phys_addr = _pci_confspace_base; - uint64_t const phys_size = ds_pci_mmio.size(); - uint64_t mmio_size = 0x10000000UL; /* max MMCONF memory */ - - /* try surviving wrong ACPI ECAM/MMCONF table information */ - while (true) { - try { - _buses.construct(_heap, *_pci_confspace, _devices_bars, _config.xml()); - /* construction and scan succeeded */ - break; - } catch (Platform::Config_access::Invalid_mmio_access) { - - error("ECAM/MMCONF MMIO access out of bounds - " - "ACPI table information is wrong!"); - - _pci_confspace.destruct(); - - while (mmio_size > phys_size) { - try { - error(" adjust size from ", Hex(phys_size), - "->", Hex(mmio_size)); - _pci_confspace.construct(_env, phys_addr, mmio_size); - /* got memory - try again */ - break; - } catch (Service_denied) { - /* decrease by one bus memory size */ - mmio_size -= 0x1000UL * 32 * 8; - } - } - if (mmio_size <= phys_size) - /* broken machine - you're lost */ - throw; - } - } - } - - protected: - - Session_component *_create_session(const char *args) override - { - try { - return new (md_alloc()) - Registered(_sessions, _env, _config, - *_pci_confspace, - _pci_confspace_base, - *_buses, _heap, _delayer, - _devices_bars, args, _iommu, - _msi_platform); - } - catch (Session_policy::No_policy_defined) { - error("Invalid session request, no matching policy for ", - "'", label_from_args(args).string(), "'"); - throw Service_denied(); - } - } - - void _upgrade_session(Session_component *s, const char *args) override { - s->upgrade_resources(session_resources_from_args(args)); } - - public: - - /** - * Constructor - * - * \param ep entry point to be used for serving the PCI session - * and PCI device interface - * \param md_alloc meta-data allocator for allocating PCI-session - * components and PCI-device components - */ - Root(Env &env, Allocator &heap, Allocator &md_alloc, Attached_rom_dataspace &config, - char const *acpi_rom, bool acpi_platform, bool msi_platform) - : - Root_component(&env.ep().rpc_ep(), &md_alloc), - _env(env), - _heap(heap), - _config(config), - _msi_platform(msi_platform) - { - try { - _parse_report_rom(env, acpi_rom, acpi_platform); - } catch (...) { - error("ACPI report parsing error."); - throw; - } - - if (Platform::Bridge::root_bridge_bdf < Platform::Bridge::INVALID_ROOT_BRIDGE) { - Device_config config(Pci::Bdf::from_value(Platform::Bridge::root_bridge_bdf)); - log("Root bridge: ", config); - } else { - warning("Root bridge: unknown"); - } - - _construct_buses(); - - generate_pci_report(); - } - - void generate_pci_report() - { - if (!_pci_reported && _config.valid() && - _config.xml().has_sub_node("report") && - _config.xml().sub_node("report").attribute_value("pci", false)) { - - _pci_reported = true; - - _pci_reporter.construct(_env, "pci", "pci"); - - Config_access config_access(*_pci_confspace); - Device_config config; - - _pci_reporter->generate([&] (Reporter::Xml_generator &xml) { - int bus = 0, device = 0, function = -1; - - /* iterate over pci devices */ - while (true) { - function += 1; - if (!(*_buses).find_next(bus, device, function, &config, - &config_access)) - return; - - bus = config.bdf().bus; - device = config.bdf().device; - function = config.bdf().function; - - xml.node("device", [&] () { - xml.attribute("bus" , String<5>(Hex(bus))); - xml.attribute("device" , String<5>(Hex(device))); - xml.attribute("function" , String<5>(Hex(function))); - xml.attribute("vendor_id" , String<8>(Hex(config.vendor_id()))); - xml.attribute("device_id" , String<8>(Hex(config.device_id()))); - xml.attribute("class_code", String<12>(Hex(config.class_code()))); - xml.attribute("bridge" , config.pci_bridge() ? "yes" : "no"); - - enum { PCI_STATUS = 0x6, PCI_CAP_OFFSET = 0x34 }; - - try { - config.read(config_access, PCI_STATUS, Platform::Device::ACCESS_16BIT); - - uint8_t cap = config.read(config_access, - PCI_CAP_OFFSET, - Platform::Device::ACCESS_8BIT); - - for (uint16_t val = 0; cap; cap = val >> 8) { - val = config.read(config_access, cap, Platform::Device::ACCESS_16BIT); - xml.attribute("cap", String<8>(Hex(val & 0xff))); - } - } catch (...) { - xml.attribute("cap", "failed to read"); - } - }); - } - }); - } - } - - bool config_with_policy() const { - return _config.valid() && _config.xml().has_sub_node("policy"); } - - void config_update() - { - _sessions.for_each([&](auto &session) { - if (!session.policy_valid()) - destroy(session); - }); - } -}; - -#endif /* _PCI_SESSION_COMPONENT_H_ */ diff --git a/repos/os/src/drivers/platform/legacy/x86/session.cc b/repos/os/src/drivers/platform/legacy/x86/session.cc deleted file mode 100644 index c08901dbbd..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/session.cc +++ /dev/null @@ -1,161 +0,0 @@ -/* - * \brief platform session component - * \author Norman Feske - * \date 2008-01-28 - */ - -/* - * Copyright (C) 2008-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#include "pci_session_component.h" -#include "pci_bridge.h" - - -/* set during ACPI ROM parsing to valid value */ -unsigned Platform::Bridge::root_bridge_bdf = INVALID_ROOT_BRIDGE; - - -static Genode::List *bridges() -{ - static Genode::List list; - return &list; -} - - -unsigned short Platform::bridge_bdf(unsigned char bus) -{ - for (Platform::Bridge *bridge = bridges()->first(); bridge; - bridge = bridge->next()) - { - if (bridge->part_of(bus)) - return bridge->bdf(); - } - /* XXX Ideally, this case should never happen */ - return Platform::Bridge::root_bridge_bdf; -} - -void Platform::Pci_buses::_scan_bus(Config_access &config_access, - Allocator &heap, - Device_bars_pool &devices_bars, - unsigned char bus, - Xml_node const &config_node) -{ - for (unsigned dev = 0; dev < Device_config::MAX_DEVICES; ++dev) { - for (unsigned fun = 0; fun < Device_config::MAX_FUNCTIONS; ++fun) { - - Pci::Bdf const bdf { .bus = bus, .device = dev, .function = fun }; - - /* read config space */ - Device_config config(bdf, &config_access); - - if (!config.valid()) - continue; - - /* apply fixups to BAR memory resources */ - config.for_each_resource([&] (int const id, Platform::Pci::Resource const res) - { - uint64_t remap_address = 0; - config_node.for_each_sub_node("pci-fixup", [&] (Xml_node node) { - if (!node.has_attribute("bus") - || !node.has_attribute("device") - || !node.has_attribute("function") - || !(bdf == Pci::Bdf::from_xml(node))) - return; - - node.for_each_sub_node("bar", [&] (Xml_node node) { - if (node.attribute_value("id", (long)-1) == id) - remap_address = node.attribute_value("address", (uint64_t)0); - }); - }); - - if (remap_address) { - config.remap_resource(config_access, id, 0x4017002000); - return; - } - - if (!res.base() && res.mem()) - warning(bdf, " BAR", id, " ", res, - " has invalid base address - consider "); - }); - - /* remember Device BARs required after power off and/or reset */ - Device_config::Device_bars bars = config.save_bars(); - if (!bars.all_invalid()) - new (heap) Registered(devices_bars, bars); - - /* - * Switch off PCI bus master DMA for some classes of devices, - * which caused trouble. - * Some devices are enabled by BIOS/UEFI or/and bootloaders and - * aren't switch off when handing over to the kernel and Genode. - * By disabling bus master DMA they should stop to issue DMA - * operations and IRQs. IRQs are problematic, if it is a shared - * IRQ - e.g. Ethernet and graphic card share a GSI IRQ. If the - * graphic card driver is started without a Ethernet driver, - * the graphic card may ack all IRQs. We may end up in a endless - * IRQ/ACK loop, since no Ethernet driver acknowledge/disable IRQ - * generation on the Ethernet device. - * - * Switching off PCI bus master DMA in general is a bad idea, - * since some device classes require a explicit handover protocol - * between BIOS/UEFI and device, e.g. USB. Violating such protocols - * lead to hard hangs on some machines. - */ - if (config.class_code() >> 8) { - uint16_t classcode = config.class_code() >> 16; - uint16_t subclass = (config.class_code() >> 8) & 0xff; - - if ((classcode == 0x2 && subclass == 0x00) /* ETHERNET */) { - config.disable_bus_master_dma(config_access); - } - } - - /* - * There is at least one device on the current bus, so - * we mark it as valid. - */ - if (!_valid.get(bus, 1)) - _valid.set(bus, 1); - - /* scan behind bridge */ - if (config.pci_bridge()) { - /* PCI bridge spec 3.2.5.3, 3.2.5.4 */ - unsigned char sec_bus = config.read(config_access, 0x19, - Device::ACCESS_8BIT); - unsigned char sub_bus = config.read(config_access, 0x20, - Device::ACCESS_8BIT); - - bridges()->insert(new (heap) Bridge(bus, dev, fun, sec_bus, - sub_bus)); - - uint16_t cmd = config.read(config_access, - Device_config::PCI_CMD_REG, - Platform::Device::ACCESS_16BIT); - - const bool enabled = (cmd & Device_config::PCI_CMD_MASK) - == Device_config::PCI_CMD_MASK; - - if (!enabled) { - config.write(config_access, Device_config::PCI_CMD_REG, - cmd | Device_config::PCI_CMD_MASK, - Platform::Device::ACCESS_16BIT); - } - - log(config, " - bridge ", - Hex(sec_bus, Hex::Prefix::OMIT_PREFIX, Hex::Pad::PAD), - ":00.0", !enabled ? " enabled" : ""); - - _scan_bus(config_access, heap, devices_bars, sec_bus, config_node); - } - } - } -} - - -using Platform::Session_component; - -Genode::Bit_array Session_component::bdf_in_use; diff --git a/repos/os/src/drivers/platform/legacy/x86/target.mk b/repos/os/src/drivers/platform/legacy/x86/target.mk deleted file mode 100644 index d9ab3786c1..0000000000 --- a/repos/os/src/drivers/platform/legacy/x86/target.mk +++ /dev/null @@ -1,9 +0,0 @@ -TARGET = legacy_pc_platform_drv -REQUIRES = x86 -SRC_CC = main.cc irq.cc pci_device.cc nonpci_devices.cc session.cc -SRC_CC += device_pd.cc acpi_devices.cc -LIBS = base - -INC_DIR = $(PRG_DIR) - -CC_CXX_WARN_STRICT_CONVERSION = From 7cb19ee2b3c645c3259fb48bb410d7097e89e935 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 1 Jun 2022 15:45:11 +0200 Subject: [PATCH 0086/1921] sntp_client: add depot src recipe Ref genodelabs/genode#4687 --- repos/libports/recipes/src/sntp_client/content.mk | 8 ++++++++ repos/libports/recipes/src/sntp_client/hash | 1 + repos/libports/recipes/src/sntp_client/used_apis | 6 ++++++ 3 files changed, 15 insertions(+) create mode 100644 repos/libports/recipes/src/sntp_client/content.mk create mode 100644 repos/libports/recipes/src/sntp_client/hash create mode 100644 repos/libports/recipes/src/sntp_client/used_apis diff --git a/repos/libports/recipes/src/sntp_client/content.mk b/repos/libports/recipes/src/sntp_client/content.mk new file mode 100644 index 0000000000..120693d3e2 --- /dev/null +++ b/repos/libports/recipes/src/sntp_client/content.mk @@ -0,0 +1,8 @@ +SRC_DIR = src/app/sntp_client +include $(GENODE_DIR)/repos/base/recipes/src/content.inc + +content: src/lib/musl_tm + +src/lib/musl_tm: + mkdir -p src/lib + cp -r $(GENODE_DIR)/repos/libports/$@ $@ diff --git a/repos/libports/recipes/src/sntp_client/hash b/repos/libports/recipes/src/sntp_client/hash new file mode 100644 index 0000000000..05d2ef8be0 --- /dev/null +++ b/repos/libports/recipes/src/sntp_client/hash @@ -0,0 +1 @@ +2022-05-31-a a079c0893d3acb89dab9ab70e0e8437bdc3518a0 diff --git a/repos/libports/recipes/src/sntp_client/used_apis b/repos/libports/recipes/src/sntp_client/used_apis new file mode 100644 index 0000000000..df3c45820e --- /dev/null +++ b/repos/libports/recipes/src/sntp_client/used_apis @@ -0,0 +1,6 @@ +base +os +net +nic_session +rtc_session +report_session From c9efcfab173bd1ac478f16f682b6256c3a88c078 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 17 Nov 2022 15:23:08 +0100 Subject: [PATCH 0087/1921] sntp_dummy_rtc: add depot package recipe This recipe combines the dummy_rtc_drv, which consumes a given time, and provides the "Rtc" service to its clients with the simple NTP client, which provides the current time to the RTC driver in regular intervals. Ref genodelabs/genode#4687 --- .../recipes/pkg/sntp_dummy_rtc/README | 2 + .../recipes/pkg/sntp_dummy_rtc/archives | 5 +++ .../libports/recipes/pkg/sntp_dummy_rtc/hash | 1 + .../recipes/pkg/sntp_dummy_rtc/runtime | 14 ++++++ .../recipes/raw/sntp_dummy_rtc/content.mk | 4 ++ .../libports/recipes/raw/sntp_dummy_rtc/hash | 1 + .../recipes/raw/sntp_dummy_rtc/ntp_rtc.config | 43 +++++++++++++++++++ 7 files changed, 70 insertions(+) create mode 100644 repos/libports/recipes/pkg/sntp_dummy_rtc/README create mode 100755 repos/libports/recipes/pkg/sntp_dummy_rtc/archives create mode 100644 repos/libports/recipes/pkg/sntp_dummy_rtc/hash create mode 100755 repos/libports/recipes/pkg/sntp_dummy_rtc/runtime create mode 100644 repos/libports/recipes/raw/sntp_dummy_rtc/content.mk create mode 100644 repos/libports/recipes/raw/sntp_dummy_rtc/hash create mode 100644 repos/libports/recipes/raw/sntp_dummy_rtc/ntp_rtc.config diff --git a/repos/libports/recipes/pkg/sntp_dummy_rtc/README b/repos/libports/recipes/pkg/sntp_dummy_rtc/README new file mode 100644 index 0000000000..09e65c44ae --- /dev/null +++ b/repos/libports/recipes/pkg/sntp_dummy_rtc/README @@ -0,0 +1,2 @@ + + Runtime for combining the dummy RTC driver with NTP updates diff --git a/repos/libports/recipes/pkg/sntp_dummy_rtc/archives b/repos/libports/recipes/pkg/sntp_dummy_rtc/archives new file mode 100755 index 0000000000..7779e3c196 --- /dev/null +++ b/repos/libports/recipes/pkg/sntp_dummy_rtc/archives @@ -0,0 +1,5 @@ +_/raw/sntp_dummy_rtc +_/src/sntp_client +_/src/dummy_rtc_drv +_/src/report_rom +_/src/init diff --git a/repos/libports/recipes/pkg/sntp_dummy_rtc/hash b/repos/libports/recipes/pkg/sntp_dummy_rtc/hash new file mode 100644 index 0000000000..86a1d8264e --- /dev/null +++ b/repos/libports/recipes/pkg/sntp_dummy_rtc/hash @@ -0,0 +1 @@ +2022-11-17 4561972104bd152029598ba339b5e1bbf44fc593 diff --git a/repos/libports/recipes/pkg/sntp_dummy_rtc/runtime b/repos/libports/recipes/pkg/sntp_dummy_rtc/runtime new file mode 100755 index 0000000000..679ea68619 --- /dev/null +++ b/repos/libports/recipes/pkg/sntp_dummy_rtc/runtime @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/repos/libports/recipes/raw/sntp_dummy_rtc/content.mk b/repos/libports/recipes/raw/sntp_dummy_rtc/content.mk new file mode 100644 index 0000000000..fe292267ca --- /dev/null +++ b/repos/libports/recipes/raw/sntp_dummy_rtc/content.mk @@ -0,0 +1,4 @@ +content: ntp_rtc.config + +ntp_rtc.config: + cp $(REP_DIR)/recipes/raw/sntp_dummy_rtc/$@ $@ diff --git a/repos/libports/recipes/raw/sntp_dummy_rtc/hash b/repos/libports/recipes/raw/sntp_dummy_rtc/hash new file mode 100644 index 0000000000..d4f355792b --- /dev/null +++ b/repos/libports/recipes/raw/sntp_dummy_rtc/hash @@ -0,0 +1 @@ +2022-11-17 35f7a244e9441671f9e6ce2c866f3889e056d7b7 diff --git a/repos/libports/recipes/raw/sntp_dummy_rtc/ntp_rtc.config b/repos/libports/recipes/raw/sntp_dummy_rtc/ntp_rtc.config new file mode 100644 index 0000000000..7ef6ecd3a0 --- /dev/null +++ b/repos/libports/recipes/raw/sntp_dummy_rtc/ntp_rtc.config @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 10aa5ebf03707376729dda70e0131de613e53ae2 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 18 Nov 2022 13:59:10 +0100 Subject: [PATCH 0088/1921] pci_decode: report devices from ACPI info Although we do not have the full ACPI information parsed yet, to announce non-PCI devices derived from the ACPI tables, the device description of the assumed devices is now integral-part of pci_decode. Formerly, the information was gained separatedly as boot-module, whereby we lost synchronization in between ACPI/PCI parsing, BIOS handover, and PS/2 emulation code already acting. --- .../recipes/pkg/drivers_managed-pc/archives | 1 - repos/gems/sculpt/drivers/pc | 24 +--- repos/libports/run/acpica.run | 29 +--- .../pkg/drivers_interactive-pc/archives | 1 - .../raw/drivers_interactive-pc/drivers.config | 28 +--- repos/os/src/app/pci_decode/main.cc | 128 ++++++++++++------ repos/pc/recipes/raw/pc-devices/content.mk | 4 - repos/pc/recipes/raw/pc-devices/hash | 1 - 8 files changed, 97 insertions(+), 119 deletions(-) delete mode 100644 repos/pc/recipes/raw/pc-devices/content.mk delete mode 100644 repos/pc/recipes/raw/pc-devices/hash diff --git a/repos/gems/recipes/pkg/drivers_managed-pc/archives b/repos/gems/recipes/pkg/drivers_managed-pc/archives index 8a7135141d..23edcacd3b 100644 --- a/repos/gems/recipes/pkg/drivers_managed-pc/archives +++ b/repos/gems/recipes/pkg/drivers_managed-pc/archives @@ -18,4 +18,3 @@ _/src/driver_manager _/src/rom_filter _/src/rom_reporter _/raw/drivers_managed-pc -_/raw/pc-devices diff --git a/repos/gems/sculpt/drivers/pc b/repos/gems/sculpt/drivers/pc index 937d982e1d..5f525a132c 100644 --- a/repos/gems/sculpt/drivers/pc +++ b/repos/gems/sculpt/drivers/pc @@ -41,7 +41,7 @@ - + @@ -115,33 +115,13 @@ - - - - - - - - - - - - - - - - - - - - - + diff --git a/repos/libports/run/acpica.run b/repos/libports/run/acpica.run index 8055927ecf..2a4ed38e2f 100644 --- a/repos/libports/run/acpica.run +++ b/repos/libports/run/acpica.run @@ -24,7 +24,6 @@ import_from_depot [depot_user]/src/dynamic_rom \ [depot_user]/src/event_filter \ [depot_user]/src/pc_usb_host_drv \ [depot_user]/src/ps2_drv \ - [depot_user]/src/rom_filter \ [depot_user]/src/report_rom \ [depot_user]/src/usb_hid_drv @@ -57,9 +56,9 @@ set config { - - - + + + @@ -80,26 +79,6 @@ set config { - - - - - - - - - - - - - - - - - - - - @@ -111,7 +90,7 @@ set config { - + diff --git a/repos/os/recipes/pkg/drivers_interactive-pc/archives b/repos/os/recipes/pkg/drivers_interactive-pc/archives index 3749d1bf72..8d02ed1cd6 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pc/archives +++ b/repos/os/recipes/pkg/drivers_interactive-pc/archives @@ -9,4 +9,3 @@ _/src/rom_filter _/src/event_filter _/src/pci_decode _/raw/drivers_interactive-pc -_/raw/pc-devices diff --git a/repos/os/recipes/raw/drivers_interactive-pc/drivers.config b/repos/os/recipes/raw/drivers_interactive-pc/drivers.config index 6e8093a435..6ee7c45faa 100644 --- a/repos/os/recipes/raw/drivers_interactive-pc/drivers.config +++ b/repos/os/recipes/raw/drivers_interactive-pc/drivers.config @@ -36,9 +36,9 @@ - - - + + + @@ -48,26 +48,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -88,7 +68,7 @@ - + diff --git a/repos/os/src/app/pci_decode/main.cc b/repos/os/src/app/pci_decode/main.cc index 2216c7af46..3384b281ac 100644 --- a/repos/os/src/app/pci_decode/main.cc +++ b/repos/os/src/app/pci_decode/main.cc @@ -53,7 +53,8 @@ struct Main Xml_generator & generator, unsigned & msi); void parse_irq_override_rules(Xml_node & xml); - void parse_pci_config_spaces(Xml_node & xml); + void parse_pci_config_spaces(Xml_node & xml, Xml_generator & generator); + void parse_acpi_device_info(Xml_generator & generator); void sys_rom_update(); template @@ -261,49 +262,90 @@ void Main::parse_pci_bus(bus_t bus, } -void Main::parse_pci_config_spaces(Xml_node & xml) +/* + * By now, we do not have the necessary information about non-PCI devices + * available from the ACPI tables, therefore we hard-code typical devices + * we assume to be found in this function. In the future, this function + * shall interpret ACPI tables information. + */ +void Main::parse_acpi_device_info(Xml_generator & gen) { - pci_reporter.generate([&] (Xml_generator & generator) + /* + * PS/2 device + */ + gen.node("device", [&] { - /* - * We count beginning from 1 not 0, because some clients (Linux drivers) - * do not ignore the pseudo MSI number announced, but interpret zero as - * invalid. - */ - unsigned msi_number = 1; - unsigned host_bridge_num = 0; - - xml.for_each_sub_node("bdf", [&] (Xml_node & xml) + gen.attribute("name", "ps2"); + gen.node("irq", [&] { gen.attribute("number", 1U); }); + gen.node("irq", [&] { gen.attribute("number", 12U); }); + gen.node("io_port_range", [&] { - addr_t const start = xml.attribute_value("start", 0UL); - addr_t const base = xml.attribute_value("base", 0UL); - size_t const count = xml.attribute_value("count", 0UL); - - bus_t const bus_off = (bus_t) (start / FUNCTION_PER_BUS_MAX); - bus_t const last_bus = (bus_t) - (max(1UL, (count / FUNCTION_PER_BUS_MAX)) - 1); - - if (host_bridge_num++) { - error("We do not support multiple host bridges by now!"); - return; - } - - new (heap) Bridge(bridge_registry, { bus_off, 0, 0 }, - bus_off, last_bus); - - bus_t bus = 0; - do { - enum { BUS_SIZE = DEVICES_PER_BUS_MAX * FUNCTION_PER_DEVICE_MAX - * FUNCTION_CONFIG_SPACE_SIZE }; - addr_t offset = base + bus * BUS_SIZE; - pci_config_ds.construct(env, offset, BUS_SIZE); - parse_pci_bus((bus_t)bus + bus_off, - (addr_t)pci_config_ds->local_addr(), - offset, generator, msi_number); - } while (bus++ < last_bus); - - pci_config_ds.destruct(); + gen.attribute("address", "0x60"); + gen.attribute("size", 1U); }); + gen.node("io_port_range", [&] + { + gen.attribute("address", "0x64"); + gen.attribute("size", 1U); + }); + }); + + /* + * PIT device + */ + gen.node("device", [&] + { + gen.attribute("name", "pit"); + gen.node("irq", [&] { gen.attribute("number", 0U); }); + gen.node("io_port_range", [&] + { + gen.attribute("address", "0x40"); + gen.attribute("size", 4U); + }); + }); +} + + +void Main::parse_pci_config_spaces(Xml_node & xml, Xml_generator & generator) +{ + /* + * We count beginning from 1 not 0, because some clients (Linux drivers) + * do not ignore the pseudo MSI number announced, but interpret zero as + * invalid. + */ + unsigned msi_number = 1; + unsigned host_bridge_num = 0; + + xml.for_each_sub_node("bdf", [&] (Xml_node & xml) + { + addr_t const start = xml.attribute_value("start", 0UL); + addr_t const base = xml.attribute_value("base", 0UL); + size_t const count = xml.attribute_value("count", 0UL); + + bus_t const bus_off = (bus_t) (start / FUNCTION_PER_BUS_MAX); + bus_t const last_bus = (bus_t) + (max(1UL, (count / FUNCTION_PER_BUS_MAX)) - 1); + + if (host_bridge_num++) { + error("We do not support multiple host bridges by now!"); + return; + } + + new (heap) Bridge(bridge_registry, { bus_off, 0, 0 }, + bus_off, last_bus); + + bus_t bus = 0; + do { + enum { BUS_SIZE = DEVICES_PER_BUS_MAX * FUNCTION_PER_DEVICE_MAX + * FUNCTION_CONFIG_SPACE_SIZE }; + addr_t offset = base + bus * BUS_SIZE; + pci_config_ds.construct(env, offset, BUS_SIZE); + parse_pci_bus((bus_t)bus + bus_off, + (addr_t)pci_config_ds->local_addr(), + offset, generator, msi_number); + } while (bus++ < last_bus); + + pci_config_ds.destruct(); }); } @@ -332,7 +374,11 @@ void Main::sys_rom_update() reserved_memory_list.update_from_xml(policy, xml); } - parse_pci_config_spaces(xml); + pci_reporter.generate([&] (Xml_generator & generator) + { + parse_acpi_device_info(generator); + parse_pci_config_spaces(xml, generator); + }); } diff --git a/repos/pc/recipes/raw/pc-devices/content.mk b/repos/pc/recipes/raw/pc-devices/content.mk deleted file mode 100644 index b9b79df7c4..0000000000 --- a/repos/pc/recipes/raw/pc-devices/content.mk +++ /dev/null @@ -1,4 +0,0 @@ -content: devices - -devices: - cp $(GENODE_DIR)/repos/base/board/pc/$@ $@ diff --git a/repos/pc/recipes/raw/pc-devices/hash b/repos/pc/recipes/raw/pc-devices/hash deleted file mode 100644 index b744230dec..0000000000 --- a/repos/pc/recipes/raw/pc-devices/hash +++ /dev/null @@ -1 +0,0 @@ -2022-09-15 184a930a9bf6fa8dc67582adbd3f940bf815a767 From f6825eea5f1aa5e872728a433ed4ff1c8d9f3f44 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 18 Nov 2022 14:11:38 +0100 Subject: [PATCH 0089/1921] pci_decode: increase default ram quota To circumvent problems of the page-table entries getting short on sel4, increase the RAM quota for this component in all run-scripts. Fix #4686 --- repos/dde_bsd/run/audio_in.run | 2 +- repos/dde_bsd/run/audio_out.run | 2 +- repos/dde_linux/run/nic_router_uplinks.run | 2 +- repos/gems/recipes/raw/drivers_nic-pc/drivers.config | 2 +- repos/gems/sculpt/drivers/pc | 2 +- repos/libports/run/acpica.run | 2 +- repos/libports/run/oss.run | 2 +- repos/libports/run/webcam.inc | 2 +- repos/os/recipes/raw/drivers_interactive-pc/drivers.config | 2 +- repos/os/run/ahci_block.run | 2 +- repos/os/run/mixer.run | 2 +- repos/os/run/nvme.run | 2 +- repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config | 2 +- repos/pc/run/intel_fb.run | 2 +- repos/pc/run/wifi.run | 2 +- repos/ports/run/netperf.inc | 2 +- repos/ports/run/vbox5_genode_usb_hid_raw.run | 2 +- repos/ports/run/virtualbox_auto.inc | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/repos/dde_bsd/run/audio_in.run b/repos/dde_bsd/run/audio_in.run index 681ee398a2..3b0fa1714c 100644 --- a/repos/dde_bsd/run/audio_in.run +++ b/repos/dde_bsd/run/audio_in.run @@ -77,7 +77,7 @@ append config { - + diff --git a/repos/dde_bsd/run/audio_out.run b/repos/dde_bsd/run/audio_out.run index 86bd1dc7ce..1118b9bccf 100644 --- a/repos/dde_bsd/run/audio_out.run +++ b/repos/dde_bsd/run/audio_out.run @@ -65,7 +65,7 @@ install_config { - + diff --git a/repos/dde_linux/run/nic_router_uplinks.run b/repos/dde_linux/run/nic_router_uplinks.run index 7be419db01..930a654fb7 100644 --- a/repos/dde_linux/run/nic_router_uplinks.run +++ b/repos/dde_linux/run/nic_router_uplinks.run @@ -68,7 +68,7 @@ install_config { - + diff --git a/repos/gems/recipes/raw/drivers_nic-pc/drivers.config b/repos/gems/recipes/raw/drivers_nic-pc/drivers.config index 8420d00037..b1e2af5f66 100644 --- a/repos/gems/recipes/raw/drivers_nic-pc/drivers.config +++ b/repos/gems/recipes/raw/drivers_nic-pc/drivers.config @@ -50,7 +50,7 @@ - + diff --git a/repos/gems/sculpt/drivers/pc b/repos/gems/sculpt/drivers/pc index 5f525a132c..b1c6cb3f6a 100644 --- a/repos/gems/sculpt/drivers/pc +++ b/repos/gems/sculpt/drivers/pc @@ -102,7 +102,7 @@ - + diff --git a/repos/libports/run/acpica.run b/repos/libports/run/acpica.run index 2a4ed38e2f..b48de3165d 100644 --- a/repos/libports/run/acpica.run +++ b/repos/libports/run/acpica.run @@ -71,7 +71,7 @@ set config { - + diff --git a/repos/libports/run/oss.run b/repos/libports/run/oss.run index a1ef5faeda..66a85052fb 100644 --- a/repos/libports/run/oss.run +++ b/repos/libports/run/oss.run @@ -62,7 +62,7 @@ install_config { - + diff --git a/repos/libports/run/webcam.inc b/repos/libports/run/webcam.inc index 70dcd36f1f..5be683a3ef 100644 --- a/repos/libports/run/webcam.inc +++ b/repos/libports/run/webcam.inc @@ -78,7 +78,7 @@ append config { - + diff --git a/repos/os/recipes/raw/drivers_interactive-pc/drivers.config b/repos/os/recipes/raw/drivers_interactive-pc/drivers.config index 6ee7c45faa..6cc7741022 100644 --- a/repos/os/recipes/raw/drivers_interactive-pc/drivers.config +++ b/repos/os/recipes/raw/drivers_interactive-pc/drivers.config @@ -49,7 +49,7 @@ - + diff --git a/repos/os/run/ahci_block.run b/repos/os/run/ahci_block.run index 55124ad8ce..fb537f9084 100644 --- a/repos/os/run/ahci_block.run +++ b/repos/os/run/ahci_block.run @@ -64,7 +64,7 @@ install_config { - + diff --git a/repos/os/run/mixer.run b/repos/os/run/mixer.run index 653ffc3106..490dbdcfad 100644 --- a/repos/os/run/mixer.run +++ b/repos/os/run/mixer.run @@ -75,7 +75,7 @@ set config { - + diff --git a/repos/os/run/nvme.run b/repos/os/run/nvme.run index e0c70e5ef1..9e35a4539f 100644 --- a/repos/os/run/nvme.run +++ b/repos/os/run/nvme.run @@ -115,7 +115,7 @@ append config { - + diff --git a/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config b/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config index 25501a0b46..a99f43514f 100644 --- a/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config +++ b/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config @@ -47,7 +47,7 @@ - + diff --git a/repos/pc/run/intel_fb.run b/repos/pc/run/intel_fb.run index 378910389e..d7bef2b9d4 100644 --- a/repos/pc/run/intel_fb.run +++ b/repos/pc/run/intel_fb.run @@ -99,7 +99,7 @@ append config { - + diff --git a/repos/pc/run/wifi.run b/repos/pc/run/wifi.run index 320f279da1..5b4bd460a1 100644 --- a/repos/pc/run/wifi.run +++ b/repos/pc/run/wifi.run @@ -140,7 +140,7 @@ append config { - + diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc index b131110fe3..d715cba382 100644 --- a/repos/ports/run/netperf.inc +++ b/repos/ports/run/netperf.inc @@ -212,7 +212,7 @@ if { $use_wifi_driver } { - + diff --git a/repos/ports/run/vbox5_genode_usb_hid_raw.run b/repos/ports/run/vbox5_genode_usb_hid_raw.run index 11deac5b93..b7ec7dd770 100644 --- a/repos/ports/run/vbox5_genode_usb_hid_raw.run +++ b/repos/ports/run/vbox5_genode_usb_hid_raw.run @@ -80,7 +80,7 @@ install_config { - + diff --git a/repos/ports/run/virtualbox_auto.inc b/repos/ports/run/virtualbox_auto.inc index da923eba6d..cc4ef11d8e 100644 --- a/repos/ports/run/virtualbox_auto.inc +++ b/repos/ports/run/virtualbox_auto.inc @@ -132,7 +132,7 @@ append config { - + From 132906c92554566e3217852ba69df4e3ab21c5bd Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Wed, 16 Nov 2022 12:51:00 +0100 Subject: [PATCH 0090/1921] platform_drv: update ROM in device_by_type() This is required for scenarios in which a device appears at a later point in time. If the ROM is not updated, the device_by_type() method may operate on an outdated dataspace and never find the device it is waiting for. --- repos/os/include/platform_session/connection.h | 1 + 1 file changed, 1 insertion(+) diff --git a/repos/os/include/platform_session/connection.h b/repos/os/include/platform_session/connection.h index fbfa62a024..a0e8a4f2b0 100644 --- a/repos/os/include/platform_session/connection.h +++ b/repos/os/include/platform_session/connection.h @@ -139,6 +139,7 @@ class Platform::Connection : public Genode::Connection, Capability cap; + update(); with_xml([&] (Xml_node & xml) { xml.for_each_sub_node("device", [&] (Xml_node node) { From 5d6242916415724d20978d19a9bf26a9e3bd0106 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Sun, 20 Nov 2022 07:12:31 +0100 Subject: [PATCH 0091/1921] libc: check path pointer in 'symlink' and 'unlink' Fixes #4688 --- repos/libports/src/lib/libc/file_operations.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/repos/libports/src/lib/libc/file_operations.cc b/repos/libports/src/lib/libc/file_operations.cc index b0da2ce4f0..cec1882438 100644 --- a/repos/libports/src/lib/libc/file_operations.cc +++ b/repos/libports/src/lib/libc/file_operations.cc @@ -721,6 +721,9 @@ extern "C" int stat(const char *path, struct stat *buf) extern "C" int symlink(const char *oldpath, const char *newpath) { + if (!oldpath || !newpath) + return Errno(EFAULT); + try { Absolute_path resolved_path; resolve_symlinks_except_last_element(newpath, resolved_path); @@ -733,6 +736,9 @@ extern "C" int symlink(const char *oldpath, const char *newpath) extern "C" int unlink(const char *path) { + if (!path) + return Errno(EFAULT); + try { Absolute_path resolved_path; resolve_symlinks_except_last_element(path, resolved_path); From 866df561317bf39c28843d57e6fda1a2b8862361 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Sun, 20 Nov 2022 07:09:57 +0100 Subject: [PATCH 0092/1921] libc: handle empty path string in file I/O functions Fixes #4689 --- .../libports/src/lib/libc/file_operations.cc | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/repos/libports/src/lib/libc/file_operations.cc b/repos/libports/src/lib/libc/file_operations.cc index cec1882438..f2fa1c9652 100644 --- a/repos/libports/src/lib/libc/file_operations.cc +++ b/repos/libports/src/lib/libc/file_operations.cc @@ -218,6 +218,9 @@ extern "C" int access(const char *path, int amode) if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + try { Absolute_path resolved_path; resolve_symlinks(path, resolved_path); @@ -234,6 +237,9 @@ extern "C" int chdir(const char *path) if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + struct stat stat_buf; if ((stat(path, &stat_buf) == -1) || (!S_ISDIR(stat_buf.st_mode))) { @@ -336,6 +342,9 @@ __SYS_(int, fstatat, (int libc_fd, char const *path, struct stat *buf, int flags if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + if (*path == '/') { if (flags & AT_SYMLINK_NOFOLLOW) return lstat(path, buf); @@ -395,6 +404,9 @@ extern "C" int lstat(const char *path, struct stat *buf) if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + try { Absolute_path resolved_path; resolve_symlinks_except_last_element(path, resolved_path); @@ -411,6 +423,9 @@ extern "C" int mkdir(const char *path, mode_t mode) if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + try { Absolute_path resolved_path; resolve_symlinks_except_last_element(path, resolved_path); @@ -526,6 +541,9 @@ __SYS_(int, open, (const char *pathname, int flags, ...), if (!pathname) return Errno(EFAULT); + if (pathname[0] == '\0') + return Errno(ENOENT); + Absolute_path resolved_path; Plugin *plugin; @@ -574,6 +592,9 @@ __SYS_(int, openat, (int libc_fd, const char *path, int flags, ...), if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + va_list ap; va_start(ap, flags); mode_t mode = va_arg(ap, unsigned); @@ -646,6 +667,9 @@ extern "C" ssize_t readlink(const char *path, char *buf, ::size_t bufsiz) if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + try { Absolute_path resolved_path; resolve_symlinks_except_last_element(path, resolved_path); @@ -661,6 +685,9 @@ extern "C" int rename(const char *oldpath, const char *newpath) if (!oldpath || !newpath) return Errno(EFAULT); + if ((oldpath[0] == '\0') || (newpath[0] == '\0')) + return Errno(ENOENT); + try { Absolute_path resolved_oldpath, resolved_newpath; resolve_symlinks_except_last_element(oldpath, resolved_oldpath); @@ -681,6 +708,9 @@ extern "C" int rmdir(const char *path) if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + try { Absolute_path resolved_path; resolve_symlinks_except_last_element(path, resolved_path); @@ -708,6 +738,9 @@ extern "C" int stat(const char *path, struct stat *buf) if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + try { Absolute_path resolved_path; resolve_symlinks(path, resolved_path); @@ -724,6 +757,9 @@ extern "C" int symlink(const char *oldpath, const char *newpath) if (!oldpath || !newpath) return Errno(EFAULT); + if ((oldpath[0] == '\0') || (newpath[0] == '\0')) + return Errno(ENOENT); + try { Absolute_path resolved_path; resolve_symlinks_except_last_element(newpath, resolved_path); @@ -739,6 +775,9 @@ extern "C" int unlink(const char *path) if (!path) return Errno(EFAULT); + if (path[0] == '\0') + return Errno(ENOENT); + try { Absolute_path resolved_path; resolve_symlinks_except_last_element(path, resolved_path); From 345c01677ddbbc4b45e0b2a41414a6b45c04265c Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 10 Nov 2022 04:20:20 +0100 Subject: [PATCH 0093/1921] hw: fix 'Kernel::time()' deviation in ARM generic timer Issue #4360 --- repos/base-hw/src/core/spec/arm/generic_timer.cc | 5 ++--- repos/base-hw/src/core/spec/arm/generic_timer.h | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/repos/base-hw/src/core/spec/arm/generic_timer.cc b/repos/base-hw/src/core/spec/arm/generic_timer.cc index 5bf6195059..659e28b145 100644 --- a/repos/base-hw/src/core/spec/arm/generic_timer.cc +++ b/repos/base-hw/src/core/spec/arm/generic_timer.cc @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2019 Genode Labs GmbH + * Copyright (C) 2019-2022 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -34,7 +34,6 @@ Board::Timer::Timer(unsigned) : ticks_per_ms((unsigned)(_freq() / 1000)) void Timer::_start_one_shot(time_t const ticks) { - _device.last_time = Cpu::Cntpct::read(); Cpu::Cntp_tval::write((Cpu::Cntp_tval::access_t)ticks); Cpu::Cntp_ctl::access_t ctl = Cpu::Cntp_ctl::read(); Cpu::Cntp_ctl::Istatus::set(ctl, 0); @@ -44,7 +43,7 @@ void Timer::_start_one_shot(time_t const ticks) time_t Timer::_duration() const { - return Cpu::Cntpct::read() - _device.last_time; + return Cpu::Cntpct::read() - _time; } diff --git a/repos/base-hw/src/core/spec/arm/generic_timer.h b/repos/base-hw/src/core/spec/arm/generic_timer.h index c06f18ee9c..a047670ac1 100644 --- a/repos/base-hw/src/core/spec/arm/generic_timer.h +++ b/repos/base-hw/src/core/spec/arm/generic_timer.h @@ -26,8 +26,6 @@ struct Board::Timer unsigned const ticks_per_ms; - Kernel::time_t last_time { 0 }; - Timer(unsigned); }; From acb6bbb649d8bf65faee18565d5a9fa76be8df04 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Mon, 21 Nov 2022 11:58:40 +0100 Subject: [PATCH 0094/1921] hw: fix 'Kernel::time()' deviation in RISC-V timer Issue #4360 --- repos/base-hw/src/core/spec/riscv/timer.cc | 7 +++---- repos/base-hw/src/core/spec/riscv/timer.h | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/repos/base-hw/src/core/spec/riscv/timer.cc b/repos/base-hw/src/core/spec/riscv/timer.cc index 4538533bfb..1747414ba5 100644 --- a/repos/base-hw/src/core/spec/riscv/timer.cc +++ b/repos/base-hw/src/core/spec/riscv/timer.cc @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2021 Genode Labs GmbH + * Copyright (C) 2021-2022 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -39,8 +39,7 @@ time_t Board::Timer::stime() const void Timer::_start_one_shot(time_t const ticks) { - _device.last_time = _device.stime(); - Sbi::set_timer(_device.last_time + ticks); + Sbi::set_timer(_time + ticks); } @@ -58,7 +57,7 @@ time_t Timer::_max_value() const { time_t Timer::_duration() const { - return _device.stime() - _device.last_time; + return _device.stime() - _time; } diff --git a/repos/base-hw/src/core/spec/riscv/timer.h b/repos/base-hw/src/core/spec/riscv/timer.h index 04138565cd..a1d30a1d90 100644 --- a/repos/base-hw/src/core/spec/riscv/timer.h +++ b/repos/base-hw/src/core/spec/riscv/timer.h @@ -31,8 +31,6 @@ struct Board::Timer TICKS_PER_US = TICKS_PER_MS / 1000, }; - Kernel::time_t last_time { 0 }; - Kernel::time_t stime() const; Timer(unsigned); From 424ed1b79a4839649c654081180a565cdc3cff1d Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 7 Dec 2021 09:02:50 +0100 Subject: [PATCH 0095/1921] libc: remove Reconstructible / use local_submit in kernel --- repos/libports/src/lib/libc/internal/kernel.h | 10 +++++----- repos/libports/src/lib/libc/internal/pthread.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/repos/libports/src/lib/libc/internal/kernel.h b/repos/libports/src/lib/libc/internal/kernel.h index c1629e8c46..5729bd27b6 100644 --- a/repos/libports/src/lib/libc/internal/kernel.h +++ b/repos/libports/src/lib/libc/internal/kernel.h @@ -198,7 +198,7 @@ struct Libc::Kernel final : Vfs::Io_response_handler, Atexit _atexit { _heap }; - Reconstructible> _resume_main_handler { + Io_signal_handler _resume_main_handler { _env.ep(), *this, &Kernel::_resume_main }; jmp_buf _kernel_context; @@ -275,7 +275,7 @@ struct Libc::Kernel final : Vfs::Io_response_handler, Monitor::Pool _monitors { *this }; - Reconstructible> _execute_monitors { + Io_signal_handler _execute_monitors { _env.ep(), *this, &Kernel::_monitors_handler }; Monitor::Pool::State _execute_monitors_pending = Monitor::Pool::State::ALL_COMPLETE; @@ -517,7 +517,7 @@ struct Libc::Kernel final : Vfs::Io_response_handler, if (_main_context()) _resume_main(); else - Signal_transmitter(*_resume_main_handler).submit(); + _resume_main_handler.local_submit(); } _pthreads.resume_all(); @@ -573,7 +573,7 @@ struct Libc::Kernel final : Vfs::Io_response_handler, if (_main_context()) _monitors_handler(); else - _execute_monitors->local_submit(); + _execute_monitors.local_submit(); } /** @@ -615,7 +615,7 @@ struct Libc::Kernel final : Vfs::Io_response_handler, if (_main_context()) _resume_main(); else - Signal_transmitter(*_resume_main_handler).submit(); + _resume_main_handler.local_submit(); } /** diff --git a/repos/libports/src/lib/libc/internal/pthread.h b/repos/libports/src/lib/libc/internal/pthread.h index 71c1d61dea..299486f6d7 100644 --- a/repos/libports/src/lib/libc/internal/pthread.h +++ b/repos/libports/src/lib/libc/internal/pthread.h @@ -132,7 +132,7 @@ struct Libc::Pthread : Noncopyable /* * The mutex synchronizes the execution of cancel() and join() to * protect the about-to-exit pthread to be destructed before it leaves - * trigger_monitor_examination(), which uses a 'Signal_transmitter' + * trigger_monitor_examination(), which uses 'Signal_context::local_submit()' * and, therefore, holds a reference to a signal context capability * that needs to be released before the thread can be destroyed. */ From b596db3eedcae5fd0dfe5d6a2d8fd6e663aa6bde Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 21 Nov 2022 15:35:11 +0100 Subject: [PATCH 0096/1921] pistachio: size-aligned I/O mem mapping in core This commit circumvents faulty behaviour of base-pistachio, if the PCI config space gets requested megabyte-wise. It occurs that we get a mapping sequence in between sigma0, core and component, like the following: 0xe1000000 => 0xbf001000 => 0x10b000, with the consequence that the component stalls when accessing the latter one. By requesting I/O memory aligned to the size, the faulty behaviour vanishes. Ref #4686 --- repos/base-pistachio/src/core/io_mem_session_support.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/base-pistachio/src/core/io_mem_session_support.cc b/repos/base-pistachio/src/core/io_mem_session_support.cc index b1365d467e..71a6c01e1f 100644 --- a/repos/base-pistachio/src/core/io_mem_session_support.cc +++ b/repos/base-pistachio/src/core/io_mem_session_support.cc @@ -66,10 +66,10 @@ addr_t Io_mem_session_component::_map_local(addr_t base, size_t size) if (is_conventional_memory(base)) return base; - /* align large I/O dataspaces on a super-page boundary within core */ + /* align large I/O dataspaces to super page size, otherwise to size */ size_t const align = (size >= get_super_page_size()) - ? get_super_page_size_log2() - : get_page_size_log2(); + ? get_super_page_size_log2() + : log2(size); return platform().region_alloc().alloc_aligned(size, align).convert( [&] (void *ptr) { return (addr_t)ptr; }, From a91467f3a8de7986a831583d5a942b5d1eca068b Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 22 Nov 2022 13:58:31 +0100 Subject: [PATCH 0097/1921] platform_drv: support enforced 1:1 DMA mapping Follow up commit of "platfrom_drv: map DMA memory non-natural when iommu is present" Issue #4665 --- repos/os/src/drivers/platform/device_pd.cc | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/repos/os/src/drivers/platform/device_pd.cc b/repos/os/src/drivers/platform/device_pd.cc index 362bc1718c..84b62e859c 100644 --- a/repos/os/src/drivers/platform/device_pd.cc +++ b/repos/os/src/drivers/platform/device_pd.cc @@ -71,28 +71,26 @@ addr_t Device_pd::_dma_addr(addr_t const phys_addr, size_t const size, bool const force_phys_addr) { - using Range_ok = Range_allocator::Range_ok; using Alloc_error = Allocator::Alloc_error; if (!_iommu) return phys_addr; /* - * 1:1 mapping (remove from DMA memory allocator) + * 1:1 mapping (allocate at specified range from DMA memory allocator) */ if (force_phys_addr) { - _dma_alloc.remove_range(phys_addr, size).with_result( - [&] (Range_ok) -> addr_t { return phys_addr; }, - [&] (Alloc_error err) -> addr_t { - switch (err) { - case Alloc_error::OUT_OF_RAM: throw Out_of_ram(); - case Alloc_error::OUT_OF_CAPS: throw Out_of_caps(); - case Alloc_error::DENIED: - error("Could not free DMA range ", - Hex(phys_addr), " - ", Hex(phys_addr + size - 1), - " (error: ", err, ")"); - break; - } - return 0; + return _dma_alloc.alloc_addr(size, phys_addr).convert( + [&] (void *) -> addr_t { return phys_addr; }, + [&] (Alloc_error err) -> addr_t { + switch (err) { + case Alloc_error::OUT_OF_RAM: throw Out_of_ram(); + case Alloc_error::OUT_OF_CAPS: throw Out_of_caps(); + case Alloc_error::DENIED: + error("Could not attach DMA range at ", + Hex_range(phys_addr, size), " (error: ", err, ")"); + break; + } + return 0UL; }); } From ffb48ed030baebfc0760edee1eaae2e1df98b104 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 22 Nov 2022 16:17:02 +0100 Subject: [PATCH 0098/1921] extract: handle leading '/' in 'create_directories()' Fixes #4690 --- repos/libports/src/app/extract/main.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repos/libports/src/app/extract/main.cc b/repos/libports/src/app/extract/main.cc index 5eb435f799..ec473d39a1 100644 --- a/repos/libports/src/app/extract/main.cc +++ b/repos/libports/src/app/extract/main.cc @@ -54,6 +54,10 @@ bool create_directories(Genode::String const &path) if (!end_of_elem && !end_of_path) continue; + /* handle leading '/' */ + if (end_of_elem && (sub_path_len == 0)) + continue; + Genode::String sub_path(Genode::Cstring(path.string(), sub_path_len)); /* create directory for sub path if it does not already exist */ From f4b06be24bc9d099bbd1445963506f58b8386d76 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 22 Nov 2022 16:34:34 +0100 Subject: [PATCH 0099/1921] fetchurl: handle leading '/' in '_process_fetch()' Fixes #4691 --- repos/libports/src/app/fetchurl/component.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repos/libports/src/app/fetchurl/component.cc b/repos/libports/src/app/fetchurl/component.cc index e7966de5e8..da6efc8345 100644 --- a/repos/libports/src/app/fetchurl/component.cc +++ b/repos/libports/src/app/fetchurl/component.cc @@ -216,6 +216,10 @@ struct Fetchurl::Main if (!end_of_elem) continue; + /* handle leading '/' */ + if (end_of_elem && (sub_path_len == 0)) + continue; + Genode::String<256> sub_path(Genode::Cstring(out_path, sub_path_len)); /* skip '/' */ From 15f75216c7777699226d908b5f8f492c994cb02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 7 Nov 2022 14:18:32 +0100 Subject: [PATCH 0100/1921] libdrm/lima: serialize poll and ioctl with mutex There is at least one client that performs DRM calls from multiple pthreads, which is not supported for now. We guard the concurrent access by grabbing a pthread_mutex before each operation. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 358f0a0b06..cd50e25ae3 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -30,6 +30,7 @@ extern "C" { #include #include #include +#include #include #include @@ -827,6 +828,13 @@ static void dump_ioctl(unsigned long request) int lima_drm_ioctl(unsigned long request, void *arg) { + static pthread_mutex_t ioctl_mutex = PTHREAD_MUTEX_INITIALIZER; + int const err = pthread_mutex_lock(&ioctl_mutex); + if (err) { + Genode::error("could not lock ioctl mutex: ", err); + return -1; + } + if (verbose_ioctl) dump_ioctl(request); @@ -836,9 +844,13 @@ int lima_drm_ioctl(unsigned long request, void *arg) if (verbose_ioctl) Genode::log("returned ", ret); + pthread_mutex_unlock(&ioctl_mutex); + return ret; } catch (...) { } + pthread_mutex_unlock(&ioctl_mutex); + return -1; } @@ -858,7 +870,15 @@ int lima_drm_munmap(void *addr) int lima_drm_poll(int fd) { + static pthread_mutex_t poll_mutex = PTHREAD_MUTEX_INITIALIZER; + int const err = pthread_mutex_lock(&poll_mutex); + if (err) { + Genode::error("could not lock poll mutex: ", err); + return -1; + } + int const handle = fd - Lima::Call::SYNC_FD; _drm->wait_for_syncobj((unsigned)handle); + pthread_mutex_unlock(&poll_mutex); return 0; } From 331a2e39ebfe417caf343711b6d53a044ee99376 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 24 Nov 2022 09:56:57 +0100 Subject: [PATCH 0101/1921] qt5: reduce warning messages from QPA plugin Fixes #4692 --- repos/libports/ports/qt5.hash | 2 +- repos/libports/ports/qt5.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/libports/ports/qt5.hash b/repos/libports/ports/qt5.hash index f8fa9c3c1a..dc393b0f5e 100644 --- a/repos/libports/ports/qt5.hash +++ b/repos/libports/ports/qt5.hash @@ -1 +1 @@ -3ce96283bad58ebc8e19f441381f4b63f60326c8 +3d25bb6b12ee2d7e051cbac00de15290c6688932 diff --git a/repos/libports/ports/qt5.port b/repos/libports/ports/qt5.port index 5167856bd6..cde8a69699 100644 --- a/repos/libports/ports/qt5.port +++ b/repos/libports/ports/qt5.port @@ -4,5 +4,5 @@ VERSION := 5.15.2 DOWNLOADS := qt5.git URL(qt5) := https://github.com/cproc/qt5.git -REV(qt5) := issue4657 +REV(qt5) := issue4692 DIR(qt5) := src/lib/qt5 From 8ddd93ec2768ae2a2216f2d93fb94bd764e64e8c Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 17 Nov 2022 15:32:58 +0100 Subject: [PATCH 0102/1921] vbox: avoid uncaught nic Empty_ack_queue exception Fixes #4677 --- repos/ports/src/virtualbox5/network.cpp | 85 ++++++++++++++++-------- repos/ports/src/virtualbox6/network.cc | 87 +++++++++++++++++-------- 2 files changed, 120 insertions(+), 52 deletions(-) diff --git a/repos/ports/src/virtualbox5/network.cpp b/repos/ports/src/virtualbox5/network.cpp index 12b4d1e2e5..8bed758258 100644 --- a/repos/ports/src/virtualbox5/network.cpp +++ b/repos/ports/src/virtualbox5/network.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2014-2017 Genode Labs GmbH + * Copyright (C) 2014-2022 Genode Labs GmbH * * This file is distributed under the terms of the GNU General Public License * version 2. @@ -156,25 +156,14 @@ class Nic_client destruct_blockade().wakeup(); } - void _tx_ack(bool block = false) + void _tx_ack() { /* check for acknowledgements */ - while (_nic.tx()->ack_avail() || block) { + while (_nic.tx()->ack_avail()) { Nic::Packet_descriptor acked_packet = _nic.tx()->get_acked_packet(); - _nic.tx()->release_packet(acked_packet); - block = false; - } - } - - Nic::Packet_descriptor _alloc_tx_packet(Genode::size_t len) - { - while (true) { - try { - Nic::Packet_descriptor packet = _nic.tx()->alloc_packet(len); - return packet; - } catch (Nic::Session::Tx::Source::Packet_alloc_failed) { - _tx_ack(true); - } + auto packet_allocated_len = Nic::Packet_descriptor(acked_packet.offset(), + Nic::Packet_allocator::OFFSET_PACKET_SIZE); + _nic.tx()->release_packet(packet_allocated_len); } } @@ -232,18 +221,36 @@ class Nic_client Genode::Signal_context_capability dispatcher() { return _destruct_dispatcher; } Nic::Mac_address mac_address() { return _nic.mac_address(); } - int send_packet(void *packet, uint32_t packet_len) + bool alloc_packet(Nic::Packet_descriptor &pkg, uint32_t packet_len) + { + auto const result = _nic.tx()->alloc_packet_attempt(packet_len); + + return result.convert([&](auto &p) { + pkg = p; + return true; + }, [&] (auto &) { + return false; + }); + } + + int send_packet(Nic::Packet_descriptor const &tx_packet, void *packet, uint32_t packet_len) { if (!_link_up) { return VERR_NET_DOWN; } - Nic::Packet_descriptor tx_packet = _alloc_tx_packet(packet_len); - - char *tx_content = _nic.tx()->packet_content(tx_packet); - Genode::memcpy(tx_content, packet, packet_len); - - _nic.tx()->submit_packet(tx_packet); + /* check for acknowledgements */ _tx_ack(); + if (tx_packet.size() < packet_len) { + RTLogPrintf("%s: packet too large\n", __func__); + _nic.tx()->release_packet(tx_packet); + return VINF_SUCCESS; + } + + /* send it */ + auto const tx_content = _nic.tx()->packet_content(tx_packet); + Genode::memcpy(tx_content, packet, packet_len); + auto tx_packet_actual_len = Nic::Packet_descriptor(tx_packet.offset(), packet_len); + _nic.tx()->submit_packet(tx_packet_actual_len); return VINF_SUCCESS; } }; @@ -274,6 +281,7 @@ static DECLCALLBACK(int) drvNicNetworkUp_AllocBuf(PPDMINETWORKUP pInterface, siz PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf) { PDRVNIC pThis = PDMINETWORKUP_2_DRVNIC(pInterface); + Nic_client *nic_client = pThis->nic_client; /* * Allocate a scatter / gather buffer descriptor that is immediately @@ -304,6 +312,20 @@ static DECLCALLBACK(int) drvNicNetworkUp_AllocBuf(PPDMINETWORKUP pInterface, siz pSgBuf->aSegs[0].cbSeg = pSgBuf->cbAvailable; pSgBuf->aSegs[0].pvSeg = pSgBuf + 1; + pSgBuf->pvAllocator = RTMemAllocZ(sizeof(Nic::Packet_descriptor)); + if (!pSgBuf->pvAllocator) { + RTMemFree(pSgBuf); + return VERR_TRY_AGAIN; + } + + if (!nic_client->alloc_packet(*(Nic::Packet_descriptor *)pSgBuf->pvAllocator, + Nic::Packet_allocator::OFFSET_PACKET_SIZE)) { + RTMemFree(pSgBuf->pvAllocator); + RTMemFree(pSgBuf); + /* VERR_ERR_MEMORY leads to assertion in E1000 ... try again is evaluated */ + return VERR_TRY_AGAIN; + } + *ppSgBuf = pSgBuf; return VINF_SUCCESS; } @@ -319,6 +341,8 @@ static DECLCALLBACK(int) drvNicNetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDM { Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC); pSgBuf->fFlags = 0; + if (pSgBuf->pvAllocator) + RTMemFree(pSgBuf->pvAllocator); RTMemFree(pSgBuf); } return VINF_SUCCESS; @@ -336,6 +360,13 @@ static DECLCALLBACK(int) drvNicNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDM AssertPtr(pSgBuf); Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC); + if (!pSgBuf->pvAllocator) { + RTLogPrintf("%s: error in packet allocation\n", __func__); + return VERR_GENERAL_FAILURE; + } + + auto &packet = *(Nic::Packet_descriptor *)pSgBuf->pvAllocator; + /* Set an FTM checkpoint as this operation changes the state permanently. */ PDMDrvHlpFTSetCheckpoint(pThis->pDrvIns, FTMCHECKPOINTTYPE_NETWORK); @@ -346,7 +377,7 @@ static DECLCALLBACK(int) drvNicNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDM "%.*Rhxd\n", pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed, pSgBuf->cbUsed, pSgBuf->aSegs[0].pvSeg)); - rc = nic_client->send_packet(pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed); + rc = nic_client->send_packet(packet, pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed); } else { @@ -361,13 +392,15 @@ static DECLCALLBACK(int) drvNicNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDM uint32_t cbSegFrame; void *pvSegFrame = PDMNetGsoCarveSegmentQD(pGso, (uint8_t *)pbFrame, pSgBuf->cbUsed, abHdrScratch, iSeg, cSegs, &cbSegFrame); - rc = nic_client->send_packet(pvSegFrame, cbSegFrame); + rc = nic_client->send_packet(packet, pvSegFrame, cbSegFrame); if (RT_FAILURE(rc)) break; } } pSgBuf->fFlags = 0; + if (pSgBuf->pvAllocator) + RTMemFree(pSgBuf->pvAllocator); RTMemFree(pSgBuf); AssertRC(rc); diff --git a/repos/ports/src/virtualbox6/network.cc b/repos/ports/src/virtualbox6/network.cc index e58bd17485..d9e9ce576b 100644 --- a/repos/ports/src/virtualbox6/network.cc +++ b/repos/ports/src/virtualbox6/network.cc @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2014-2021 Genode Labs GmbH + * Copyright (C) 2014-2022 Genode Labs GmbH * * This file is distributed under the terms of the GNU General Public License * version 2. @@ -171,25 +171,14 @@ class Nic_client destruct_blockade().wakeup(); } - void _tx_ack(bool block = false) + void _tx_ack() { /* check for acknowledgements */ - while (_nic.tx()->ack_avail() || block) { + while (_nic.tx()->ack_avail()) { Nic::Packet_descriptor acked_packet = _nic.tx()->get_acked_packet(); - _nic.tx()->release_packet(acked_packet); - block = false; - } - } - - Nic::Packet_descriptor _alloc_tx_packet(Genode::size_t len) - { - while (true) { - try { - Nic::Packet_descriptor packet = _nic.tx()->alloc_packet(len); - return packet; - } catch (Nic::Session::Tx::Source::Packet_alloc_failed) { - _tx_ack(true); - } + auto packet_allocated_len = Nic::Packet_descriptor(acked_packet.offset(), + Nic::Packet_allocator::OFFSET_PACKET_SIZE); + _nic.tx()->release_packet(packet_allocated_len); } } @@ -247,18 +236,36 @@ class Nic_client Genode::Signal_context_capability dispatcher() { return _destruct_dispatcher; } Nic::Mac_address mac_address() { return _nic.mac_address(); } - int send_packet(void *packet, uint32_t packet_len) + bool alloc_packet(Nic::Packet_descriptor &pkg, uint32_t packet_len) + { + auto const result = _nic.tx()->alloc_packet_attempt(packet_len); + + return result.convert([&](auto &p) { + pkg = p; + return true; + }, [&] (auto &) { + return false; + }); + } + + int send_packet(Nic::Packet_descriptor const &tx_packet, void *packet, uint32_t packet_len) { if (!_link_up) { return VERR_NET_DOWN; } - Nic::Packet_descriptor tx_packet = _alloc_tx_packet(packet_len); - - char *tx_content = _nic.tx()->packet_content(tx_packet); - Genode::memcpy(tx_content, packet, packet_len); - - _nic.tx()->submit_packet(tx_packet); + /* check for acknowledgements */ _tx_ack(); + if (tx_packet.size() < packet_len) { + RTLogPrintf("%s: packet too large\n", __func__); + _nic.tx()->release_packet(tx_packet); + return VINF_SUCCESS; + } + + /* send it */ + auto const tx_content = _nic.tx()->packet_content(tx_packet); + Genode::memcpy(tx_content, packet, packet_len); + auto tx_packet_actual_len = Nic::Packet_descriptor(tx_packet.offset(), packet_len); + _nic.tx()->submit_packet(tx_packet_actual_len); return VINF_SUCCESS; } }; @@ -288,6 +295,9 @@ static DECLCALLBACK(int) drvNicNetworkUp_BeginXmit(PPDMINETWORKUP pInterface, bo static DECLCALLBACK(int) drvNicNetworkUp_AllocBuf(PPDMINETWORKUP pInterface, size_t cbMin, PCPDMNETWORKGSO pGso, PPPDMSCATTERGATHER ppSgBuf) { + PDRVNIC pThis = PDMINETWORKUP_2_DRVNIC(pInterface); + Nic_client *nic_client = pThis->nic_client; + /* * Allocate a scatter / gather buffer descriptor that is immediately * followed by the buffer space of its single segment. The GSO context @@ -317,6 +327,20 @@ static DECLCALLBACK(int) drvNicNetworkUp_AllocBuf(PPDMINETWORKUP pInterface, siz pSgBuf->aSegs[0].cbSeg = pSgBuf->cbAvailable; pSgBuf->aSegs[0].pvSeg = pSgBuf + 1; + pSgBuf->pvAllocator = RTMemAllocZ(sizeof(Nic::Packet_descriptor)); + if (!pSgBuf->pvAllocator) { + RTMemFree(pSgBuf); + return VERR_TRY_AGAIN; + } + + if (!nic_client->alloc_packet(*(Nic::Packet_descriptor *)pSgBuf->pvAllocator, + Nic::Packet_allocator::OFFSET_PACKET_SIZE)) { + RTMemFree(pSgBuf->pvAllocator); + RTMemFree(pSgBuf); + /* VERR_ERR_MEMORY leads to assertion in E1000 ... try again is evaluated */ + return VERR_TRY_AGAIN; + } + *ppSgBuf = pSgBuf; return VINF_SUCCESS; } @@ -331,6 +355,8 @@ static DECLCALLBACK(int) drvNicNetworkUp_FreeBuf(PPDMINETWORKUP pInterface, PPDM { Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC); pSgBuf->fFlags = 0; + if (pSgBuf->pvAllocator) + RTMemFree(pSgBuf->pvAllocator); RTMemFree(pSgBuf); } return VINF_SUCCESS; @@ -348,6 +374,13 @@ static DECLCALLBACK(int) drvNicNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDM AssertPtr(pSgBuf); Assert((pSgBuf->fFlags & PDMSCATTERGATHER_FLAGS_MAGIC_MASK) == PDMSCATTERGATHER_FLAGS_MAGIC); + if (!pSgBuf->pvAllocator) { + RTLogPrintf("%s: error in packet allocation\n", __func__); + return VERR_GENERAL_FAILURE; + } + + auto &packet = *(Nic::Packet_descriptor *)pSgBuf->pvAllocator; + int rc; if (!pSgBuf->pvUser) { @@ -355,7 +388,7 @@ static DECLCALLBACK(int) drvNicNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDM "%.*Rhxd\n", pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed, pSgBuf->cbUsed, pSgBuf->aSegs[0].pvSeg)); - rc = nic_client->send_packet(pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed); + rc = nic_client->send_packet(packet, pSgBuf->aSegs[0].pvSeg, pSgBuf->cbUsed); } else { @@ -370,13 +403,15 @@ static DECLCALLBACK(int) drvNicNetworkUp_SendBuf(PPDMINETWORKUP pInterface, PPDM uint32_t cbSegFrame; void *pvSegFrame = PDMNetGsoCarveSegmentQD(pGso, (uint8_t *)pbFrame, pSgBuf->cbUsed, abHdrScratch, iSeg, cSegs, &cbSegFrame); - rc = nic_client->send_packet(pvSegFrame, cbSegFrame); + rc = nic_client->send_packet(packet, pvSegFrame, cbSegFrame); if (RT_FAILURE(rc)) break; } } pSgBuf->fFlags = 0; + if (pSgBuf->pvAllocator) + RTMemFree(pSgBuf->pvAllocator); RTMemFree(pSgBuf); AssertRC(rc); From 5cff81fc2947094fb4a4e046762a9444be094fe3 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 22 Nov 2022 12:03:02 +0100 Subject: [PATCH 0103/1921] usb c_api: prevent exception on full ack queue Count more accurately how much packets are in flied, and whether new packets can be handled. Moreover, catch potential exceptions whenever acknowledging a packet, and warn about the lost acknowledgement. Fix genodelabs/genode#4678 --- repos/os/src/lib/genode_c_api/usb.cc | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/repos/os/src/lib/genode_c_api/usb.cc b/repos/os/src/lib/genode_c_api/usb.cc index a31fd05d27..c0234eef21 100644 --- a/repos/os/src/lib/genode_c_api/usb.cc +++ b/repos/os/src/lib/genode_c_api/usb.cc @@ -84,7 +84,8 @@ class genode_usb_session : public Usb::Session_rpc_object Session_label const _label; List_element _le { this }; - void _ack(int err, Usb::Packet_descriptor p); + unsigned _packets_in_fly(); + void _ack(int err, Usb::Packet_descriptor p); /* * Non_copyable @@ -411,13 +412,26 @@ void genode_usb_session::release_interface(unsigned iface) } +unsigned genode_usb_session::_packets_in_fly() +{ + unsigned ret = 0; + for (unsigned idx = 0; idx < MAX_PACKETS_IN_FLY; idx++) + if (packets[idx].constructed()) ret++; + return ret; +} + + void genode_usb_session::_ack(int err, Usb::Packet_descriptor p) { if (err == NO_ERROR) p.succeded = true; else p.error = (Usb::Packet_descriptor::Error)err; - sink()->acknowledge_packet(p); + try { + sink()->acknowledge_packet(p); + } catch(...) { + warning("USB client's ack queue run full, looses packet ack!"); + } } @@ -439,15 +453,15 @@ bool genode_usb_session::request(genode_usb_request_callbacks & req, void * data /* get next packet from request stream */ while (true) { - if (!sink()->packet_avail() || !sink()->ack_slots_free()) + if (!sink()->packet_avail() || + (sink()->ack_slots_free() <= _packets_in_fly())) return false; p = sink()->get_packet(); if (sink()->packet_valid(p)) break; - p.error = Packet_descriptor::PACKET_INVALID_ERROR; - sink()->acknowledge_packet(p); + _ack(Packet_descriptor::PACKET_INVALID_ERROR, p); } addr_t offset = (addr_t)sink()->packet_content(p) - From 5ff8e7cadf2caf6f2b8ec36cf7132fbb977e5547 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 28 Nov 2022 15:22:39 +0100 Subject: [PATCH 0104/1921] lx_emul: use usb_unlink_urb() in timeout handler Replace usb_kill_urb() by usb_unlink_urb() in the timeout handler for control URBs, as usb_kill_urb() may block and is not allowed to be called in IRQ/bottom half contexts. Fixes #4681 --- repos/dde_linux/src/lib/lx_emul/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/dde_linux/src/lib/lx_emul/usb.c b/repos/dde_linux/src/lib/lx_emul/usb.c index 85df4f7bc1..2fe04dc17d 100644 --- a/repos/dde_linux/src/lib/lx_emul/usb.c +++ b/repos/dde_linux/src/lib/lx_emul/usb.c @@ -521,7 +521,7 @@ static void urb_timeout(struct timer_list *t) { struct usb_urb_context * context = from_timer(context, t, timeo); context->timer_state = TIMER_TRIGGERED; - usb_kill_urb(context->urb); + usb_unlink_urb(context->urb); } From b033b30f95383d583d9596ae23da1d8063476627 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 29 Nov 2022 12:32:49 +0100 Subject: [PATCH 0105/1921] depot: update recipe hashes --- repos/base-fiasco/recipes/src/base-fiasco/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash | 2 +- repos/base-foc/recipes/src/base-foc-pbxa9/hash | 2 +- repos/base-foc/recipes/src/base-foc-pc/hash | 2 +- repos/base-foc/recipes/src/base-foc-rpi3/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx53_qsb/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash | 2 +- repos/base-hw/recipes/src/base-hw-nit6_solox/hash | 2 +- repos/base-hw/recipes/src/base-hw-pbxa9/hash | 2 +- repos/base-hw/recipes/src/base-hw-pc/hash | 2 +- repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash | 2 +- repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash | 2 +- repos/base-linux/recipes/src/base-linux/hash | 2 +- repos/base-nova/recipes/api/base-nova/hash | 2 +- repos/base-nova/recipes/src/base-nova/hash | 2 +- repos/base-okl4/recipes/src/base-okl4/hash | 2 +- repos/base-pistachio/recipes/src/base-pistachio/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-x86/hash | 2 +- repos/base/recipes/api/base/hash | 2 +- repos/base/recipes/pkg/test-ds_ownership/hash | 2 +- repos/base/recipes/pkg/test-entrypoint/hash | 2 +- repos/base/recipes/pkg/test-log/hash | 2 +- repos/base/recipes/pkg/test-mmio/hash | 2 +- repos/base/recipes/pkg/test-new_delete/hash | 2 +- repos/base/recipes/pkg/test-reconstructible/hash | 2 +- repos/base/recipes/pkg/test-registry/hash | 2 +- repos/base/recipes/pkg/test-rm_fault/hash | 2 +- repos/base/recipes/pkg/test-rm_fault_no_nox/hash | 2 +- repos/base/recipes/pkg/test-rm_nested/hash | 2 +- repos/base/recipes/pkg/test-rm_stress/hash | 2 +- repos/base/recipes/pkg/test-sanitizer/hash | 2 +- repos/base/recipes/pkg/test-stack_smash/hash | 2 +- repos/base/recipes/pkg/test-synced_interface/hash | 2 +- repos/base/recipes/pkg/test-timer/hash | 2 +- repos/base/recipes/pkg/test-tls/hash | 2 +- repos/base/recipes/pkg/test-token/hash | 2 +- repos/base/recipes/pkg/test-xml_generator/hash | 2 +- repos/base/recipes/pkg/test-xml_node/hash | 2 +- repos/base/recipes/src/test-ds_ownership/hash | 2 +- repos/base/recipes/src/test-entrypoint/hash | 2 +- repos/base/recipes/src/test-log/hash | 2 +- repos/base/recipes/src/test-mmio/hash | 2 +- repos/base/recipes/src/test-new_delete/hash | 2 +- repos/base/recipes/src/test-reconstructible/hash | 2 +- repos/base/recipes/src/test-registry/hash | 2 +- repos/base/recipes/src/test-rm_fault/hash | 2 +- repos/base/recipes/src/test-rm_nested/hash | 2 +- repos/base/recipes/src/test-rm_stress/hash | 2 +- repos/base/recipes/src/test-sanitizer/hash | 2 +- repos/base/recipes/src/test-segfault/hash | 2 +- repos/base/recipes/src/test-stack_smash/hash | 2 +- repos/base/recipes/src/test-synced_interface/hash | 2 +- repos/base/recipes/src/test-timer/hash | 2 +- repos/base/recipes/src/test-tls/hash | 2 +- repos/base/recipes/src/test-token/hash | 2 +- repos/base/recipes/src/test-xml_generator/hash | 2 +- repos/base/recipes/src/test-xml_node/hash | 2 +- repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash | 2 +- repos/dde_bsd/recipes/src/bsd_audio_drv/hash | 2 +- repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash | 2 +- repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash | 2 +- repos/dde_linux/recipes/pkg/usb_modem_drv/hash | 2 +- repos/dde_linux/recipes/pkg/wireguard/hash | 2 +- repos/dde_linux/recipes/src/legacy_usb_host_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_hid_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_modem_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_net_drv/hash | 2 +- repos/dde_linux/recipes/src/vfs_lxip/hash | 2 +- repos/dde_linux/recipes/src/wireguard/hash | 2 +- repos/dde_rump/recipes/pkg/ext2_fs/hash | 2 +- repos/dde_rump/recipes/src/rump/hash | 2 +- repos/demo/recipes/src/demo/hash | 2 +- repos/gems/recipes/pkg/backdrop/hash | 2 +- repos/gems/recipes/pkg/cbe_check/hash | 2 +- repos/gems/recipes/pkg/cbe_demo/hash | 2 +- repos/gems/recipes/pkg/cbe_fs/hash | 2 +- repos/gems/recipes/pkg/cbe_init/hash | 2 +- repos/gems/recipes/pkg/cbe_shell/hash | 2 +- repos/gems/recipes/pkg/cbe_ta_fs/hash | 2 +- repos/gems/recipes/pkg/cbe_ta_vfs/hash | 2 +- repos/gems/recipes/pkg/cbe_vbox5-nova/hash | 2 +- repos/gems/recipes/pkg/cbe_vfs/hash | 2 +- repos/gems/recipes/pkg/cbe_vm_fs/hash | 2 +- repos/gems/recipes/pkg/depot_download/hash | 2 +- repos/gems/recipes/pkg/download_coreplus/hash | 2 +- repos/gems/recipes/pkg/drivers_managed-pc/hash | 2 +- repos/gems/recipes/pkg/drivers_nic-pc/hash | 2 +- repos/gems/recipes/pkg/file_vault/hash | 2 +- repos/gems/recipes/pkg/fonts_fs/hash | 2 +- repos/gems/recipes/pkg/motif_decorator/hash | 2 +- repos/gems/recipes/pkg/motif_wm/hash | 2 +- repos/gems/recipes/pkg/nano3d/hash | 2 +- repos/gems/recipes/pkg/sculpt/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution-pc/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution/hash | 2 +- repos/gems/recipes/pkg/sticks_blue_backdrop/hash | 2 +- repos/gems/recipes/pkg/terminal/hash | 2 +- repos/gems/recipes/pkg/test-depot_query_index/hash | 2 +- repos/gems/recipes/pkg/test-fs_tool/hash | 2 +- repos/gems/recipes/pkg/test-libc_vfs_audit/hash | 2 +- repos/gems/recipes/pkg/themed_decorator/hash | 2 +- repos/gems/recipes/pkg/themed_wm/hash | 2 +- repos/gems/recipes/pkg/touch_keyboard/hash | 2 +- repos/gems/recipes/pkg/trace_fs/hash | 2 +- repos/gems/recipes/pkg/trace_recorder/hash | 2 +- repos/gems/recipes/pkg/window_layouter/hash | 2 +- repos/gems/recipes/pkg/wm/hash | 2 +- repos/gems/recipes/raw/drivers_managed-pc/hash | 2 +- repos/gems/recipes/raw/drivers_nic-pc/hash | 2 +- repos/gems/recipes/src/backdrop/hash | 2 +- repos/gems/recipes/src/cbe/hash | 2 +- repos/gems/recipes/src/cpu_load_display/hash | 2 +- repos/gems/recipes/src/decorator/hash | 2 +- repos/gems/recipes/src/depot_deploy/hash | 2 +- repos/gems/recipes/src/depot_download_manager/hash | 2 +- repos/gems/recipes/src/depot_query/hash | 2 +- repos/gems/recipes/src/driver_manager/hash | 2 +- repos/gems/recipes/src/file_terminal/hash | 2 +- repos/gems/recipes/src/file_vault/hash | 2 +- repos/gems/recipes/src/fs_query/hash | 2 +- repos/gems/recipes/src/fs_tool/hash | 2 +- repos/gems/recipes/src/gpt_write/hash | 2 +- repos/gems/recipes/src/gui_fader/hash | 2 +- repos/gems/recipes/src/menu_view/hash | 2 +- repos/gems/recipes/src/mixer_gui_qt/hash | 2 +- repos/gems/recipes/src/nano3d/hash | 2 +- repos/gems/recipes/src/sculpt_manager/hash | 2 +- repos/gems/recipes/src/terminal/hash | 2 +- repos/gems/recipes/src/test-tiled_wm/hash | 2 +- repos/gems/recipes/src/text_area/hash | 2 +- repos/gems/recipes/src/themed_decorator/hash | 2 +- repos/gems/recipes/src/touch_keyboard/hash | 2 +- repos/gems/recipes/src/trace_recorder/hash | 2 +- repos/gems/recipes/src/trace_recorder_policy/hash | 2 +- repos/gems/recipes/src/vfs_audit/hash | 2 +- repos/gems/recipes/src/vfs_gpu/hash | 2 +- repos/gems/recipes/src/vfs_import/hash | 2 +- repos/gems/recipes/src/vfs_pipe/hash | 2 +- repos/gems/recipes/src/vfs_trace/hash | 2 +- repos/gems/recipes/src/vfs_ttf/hash | 2 +- repos/gems/recipes/src/window_layouter/hash | 2 +- repos/gems/recipes/src/wm/hash | 2 +- repos/libports/recipes/api/fatfs/hash | 2 +- repos/libports/recipes/pkg/acpica/hash | 2 +- repos/libports/recipes/pkg/gcov/hash | 2 +- repos/libports/recipes/pkg/mesa_gears/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-cpu/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-intel/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-lima/hash | 2 +- repos/libports/recipes/pkg/pdf_view/hash | 2 +- repos/libports/recipes/pkg/qt5_textedit/hash | 2 +- repos/libports/recipes/pkg/sntp_dummy_rtc/hash | 2 +- repos/libports/recipes/pkg/system_clock-dummy/hash | 2 +- repos/libports/recipes/pkg/system_clock-pc/hash | 2 +- repos/libports/recipes/pkg/system_rtc-linux/hash | 2 +- repos/libports/recipes/pkg/system_rtc-pc/hash | 2 +- repos/libports/recipes/pkg/test-expat/hash | 2 +- repos/libports/recipes/pkg/test-ldso/hash | 2 +- repos/libports/recipes/pkg/test-libc/hash | 2 +- repos/libports/recipes/pkg/test-libc_connect_lwip/hash | 2 +- repos/libports/recipes/pkg/test-libc_connect_lxip/hash | 2 +- .../libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash | 2 +- .../libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash | 2 +- repos/libports/recipes/pkg/test-libc_counter/hash | 2 +- repos/libports/recipes/pkg/test-libc_execve/hash | 2 +- repos/libports/recipes/pkg/test-libc_fifo_pipe/hash | 2 +- repos/libports/recipes/pkg/test-libc_fork/hash | 2 +- repos/libports/recipes/pkg/test-libc_getenv/hash | 2 +- repos/libports/recipes/pkg/test-libc_pipe/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_block/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_counter/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_fs/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_ram/hash | 2 +- repos/libports/recipes/pkg/test-pthread/hash | 2 +- repos/libports/recipes/pkg/test-sequence/hash | 2 +- repos/libports/recipes/pkg/test-spark/hash | 2 +- repos/libports/recipes/pkg/test-spark_exception/hash | 2 +- repos/libports/recipes/pkg/test-spark_secondary_stack/hash | 2 +- repos/libports/recipes/pkg/test-stdcxx/hash | 2 +- repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash | 2 +- repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash | 2 +- repos/libports/recipes/pkg/usb_webcam/hash | 2 +- repos/libports/recipes/src/acpica/hash | 2 +- repos/libports/recipes/src/extract/hash | 2 +- repos/libports/recipes/src/fetchurl/hash | 2 +- repos/libports/recipes/src/gcov/hash | 2 +- repos/libports/recipes/src/libc/hash | 2 +- repos/libports/recipes/src/libdrm/hash | 2 +- repos/libports/recipes/src/libqgenodeviewwidget/hash | 2 +- repos/libports/recipes/src/libqpluginwidget/hash | 2 +- repos/libports/recipes/src/libsparkcrypto/hash | 2 +- repos/libports/recipes/src/libusb/hash | 2 +- repos/libports/recipes/src/mesa/hash | 2 +- repos/libports/recipes/src/mesa_gears/hash | 2 +- repos/libports/recipes/src/pcsc-lite/hash | 2 +- repos/libports/recipes/src/pdf_view/hash | 2 +- repos/libports/recipes/src/posix/hash | 2 +- repos/libports/recipes/src/qt5_base/hash | 2 +- repos/libports/recipes/src/qt5_component/hash | 2 +- repos/libports/recipes/src/qt5_launchpad/hash | 2 +- repos/libports/recipes/src/qt5_quickcontrols2/hash | 2 +- repos/libports/recipes/src/qt5_svg/hash | 2 +- repos/libports/recipes/src/sanitizer/hash | 2 +- repos/libports/recipes/src/sntp_client/hash | 2 +- repos/libports/recipes/src/spark/hash | 2 +- repos/libports/recipes/src/system_rtc/hash | 2 +- repos/libports/recipes/src/test-ldso/hash | 2 +- repos/libports/recipes/src/test-libc_fifo_pipe/hash | 2 +- repos/libports/recipes/src/test-libc_vfs/hash | 2 +- repos/libports/recipes/src/test-libc_vfs_block/hash | 2 +- repos/libports/recipes/src/test-netty/hash | 2 +- repos/libports/recipes/src/test-pthread/hash | 2 +- repos/libports/recipes/src/test-qpluginwidget/hash | 2 +- repos/libports/recipes/src/test-spark/hash | 2 +- repos/libports/recipes/src/test-spark_exception/hash | 2 +- repos/libports/recipes/src/test-spark_secondary_stack/hash | 2 +- repos/libports/recipes/src/test-tcp/hash | 2 +- repos/libports/recipes/src/usb_webcam/hash | 2 +- repos/libports/recipes/src/vesa_drv/hash | 2 +- repos/libports/recipes/src/vfs_fatfs/hash | 2 +- repos/libports/recipes/src/vfs_jitterentropy/hash | 2 +- repos/libports/recipes/src/vfs_libusb/hash | 2 +- repos/libports/recipes/src/vfs_lwip/hash | 2 +- repos/libports/recipes/src/vfs_oss/hash | 2 +- repos/os/recipes/api/genode_c_api/hash | 2 +- repos/os/recipes/api/platform_session/hash | 2 +- repos/os/recipes/pkg/black_hole/hash | 2 +- repos/os/recipes/pkg/chroot/hash | 2 +- repos/os/recipes/pkg/clipboard/hash | 2 +- repos/os/recipes/pkg/cpu_balancer/hash | 2 +- repos/os/recipes/pkg/cpu_balancer_config/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-linux/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-pbxa9/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-pc/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash | 2 +- repos/os/recipes/pkg/drivers_nic-linux/hash | 2 +- repos/os/recipes/pkg/drivers_nic-pbxa9/hash | 2 +- repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash | 2 +- repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash | 2 +- repos/os/recipes/pkg/fs_report/hash | 2 +- repos/os/recipes/pkg/fs_rom/hash | 2 +- repos/os/recipes/pkg/mixer/hash | 2 +- repos/os/recipes/pkg/nic_router-nat/hash | 2 +- repos/os/recipes/pkg/nit_focus/hash | 2 +- repos/os/recipes/pkg/part_block/hash | 2 +- repos/os/recipes/pkg/recall_fs/hash | 2 +- repos/os/recipes/pkg/report_rom/hash | 2 +- repos/os/recipes/pkg/rom_filter/hash | 2 +- repos/os/recipes/pkg/rom_reporter/hash | 2 +- repos/os/recipes/pkg/test-black_hole/hash | 2 +- repos/os/recipes/pkg/test-capture/hash | 2 +- repos/os/recipes/pkg/test-clipboard/hash | 2 +- repos/os/recipes/pkg/test-dynamic_config/hash | 2 +- repos/os/recipes/pkg/test-dynamic_config_loader/hash | 2 +- repos/os/recipes/pkg/test-fault_detection/hash | 2 +- repos/os/recipes/pkg/test-fs_packet/hash | 2 +- repos/os/recipes/pkg/test-fs_report/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update_fs/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update_ram/hash | 2 +- repos/os/recipes/pkg/test-init/hash | 2 +- repos/os/recipes/pkg/test-init_loop/hash | 2 +- repos/os/recipes/pkg/test-lx_block/hash | 2 +- repos/os/recipes/pkg/test-nic_loopback/hash | 2 +- repos/os/recipes/pkg/test-nic_perf/hash | 2 +- repos/os/recipes/pkg/test-nic_perf_router/hash | 2 +- repos/os/recipes/pkg/test-part_block_gpt/hash | 2 +- repos/os/recipes/pkg/test-part_block_mbr/hash | 2 +- repos/os/recipes/pkg/test-ram_fs_chunk/hash | 2 +- repos/os/recipes/pkg/test-read_only_rom/hash | 2 +- repos/os/recipes/pkg/test-report_rom/hash | 2 +- repos/os/recipes/pkg/test-resource_request/hash | 2 +- repos/os/recipes/pkg/test-resource_yield/hash | 2 +- repos/os/recipes/pkg/test-rom_filter/hash | 2 +- repos/os/recipes/pkg/test-rtc/hash | 2 +- repos/os/recipes/pkg/test-sandbox/hash | 2 +- repos/os/recipes/pkg/test-signal/hash | 2 +- repos/os/recipes/pkg/test-slab/hash | 2 +- repos/os/recipes/pkg/test-terminal_crosslink/hash | 2 +- repos/os/recipes/pkg/test-trace/hash | 2 +- repos/os/recipes/pkg/test-trace_buffer/hash | 2 +- repos/os/recipes/pkg/test-trace_logger/hash | 2 +- repos/os/recipes/pkg/test-utf8/hash | 2 +- repos/os/recipes/pkg/test-vfs_block/hash | 2 +- repos/os/recipes/pkg/test-vfs_stress_fs/hash | 2 +- repos/os/recipes/pkg/test-vfs_stress_ram/hash | 2 +- repos/os/recipes/pkg/test-weak_ptr/hash | 2 +- repos/os/recipes/pkg/trace_logger/hash | 2 +- repos/os/recipes/pkg/vfs/hash | 2 +- repos/os/recipes/pkg/vfs_block/hash | 2 +- repos/os/recipes/raw/drivers_interactive-pc/hash | 2 +- repos/os/recipes/src/acpi_drv/hash | 2 +- repos/os/recipes/src/ahci_drv/hash | 2 +- repos/os/recipes/src/black_hole/hash | 2 +- repos/os/recipes/src/block_tester/hash | 2 +- repos/os/recipes/src/boot_fb_drv/hash | 2 +- repos/os/recipes/src/cached_fs_rom/hash | 2 +- repos/os/recipes/src/chroot/hash | 2 +- repos/os/recipes/src/clipboard/hash | 2 +- repos/os/recipes/src/cpu_balancer/hash | 2 +- repos/os/recipes/src/cpu_burner/hash | 2 +- repos/os/recipes/src/dummy/hash | 2 +- repos/os/recipes/src/dummy_rtc_drv/hash | 2 +- repos/os/recipes/src/dynamic_rom/hash | 2 +- repos/os/recipes/src/event_filter/hash | 2 +- repos/os/recipes/src/fb_sdl/hash | 2 +- repos/os/recipes/src/fs_report/hash | 2 +- repos/os/recipes/src/fs_rom/hash | 2 +- repos/os/recipes/src/global_keys_handler/hash | 2 +- repos/os/recipes/src/gui_fb/hash | 2 +- repos/os/recipes/src/init/hash | 2 +- repos/os/recipes/src/input_event_bridge/hash | 2 +- repos/os/recipes/src/intel_gpu_drv/hash | 2 +- repos/os/recipes/src/lan9118_nic_drv/hash | 2 +- repos/os/recipes/src/linux_nic_drv/hash | 2 +- repos/os/recipes/src/linux_rtc_drv/hash | 2 +- repos/os/recipes/src/loader/hash | 2 +- repos/os/recipes/src/log_core/hash | 2 +- repos/os/recipes/src/log_terminal/hash | 2 +- repos/os/recipes/src/lx_block/hash | 2 +- repos/os/recipes/src/lx_fs/hash | 2 +- repos/os/recipes/src/mixer/hash | 2 +- repos/os/recipes/src/nic_bridge/hash | 2 +- repos/os/recipes/src/nic_loopback/hash | 2 +- repos/os/recipes/src/nic_perf/hash | 2 +- repos/os/recipes/src/nic_router/hash | 2 +- repos/os/recipes/src/nit_focus/hash | 2 +- repos/os/recipes/src/nitpicker/hash | 2 +- repos/os/recipes/src/nvme_drv/hash | 2 +- repos/os/recipes/src/part_block/hash | 2 +- repos/os/recipes/src/pbxa9_drivers/hash | 2 +- repos/os/recipes/src/pci_decode/hash | 2 +- repos/os/recipes/src/platform_drv/hash | 2 +- repos/os/recipes/src/ps2_drv/hash | 2 +- repos/os/recipes/src/report_rom/hash | 2 +- repos/os/recipes/src/rom_filter/hash | 2 +- repos/os/recipes/src/rom_logger/hash | 2 +- repos/os/recipes/src/rom_reporter/hash | 2 +- repos/os/recipes/src/rom_to_file/hash | 2 +- repos/os/recipes/src/rtc_drv/hash | 2 +- repos/os/recipes/src/sandbox/hash | 2 +- repos/os/recipes/src/sequence/hash | 2 +- repos/os/recipes/src/shim/hash | 2 +- repos/os/recipes/src/terminal_crosslink/hash | 2 +- repos/os/recipes/src/terminal_log/hash | 2 +- repos/os/recipes/src/test-black_hole/hash | 2 +- repos/os/recipes/src/test-bomb/hash | 2 +- repos/os/recipes/src/test-capture/hash | 2 +- repos/os/recipes/src/test-clipboard/hash | 2 +- repos/os/recipes/src/test-dynamic_config/hash | 2 +- repos/os/recipes/src/test-fault_detection/hash | 2 +- repos/os/recipes/src/test-fs_packet/hash | 2 +- repos/os/recipes/src/test-fs_report/hash | 2 +- repos/os/recipes/src/test-immutable_rom/hash | 2 +- repos/os/recipes/src/test-init/hash | 2 +- repos/os/recipes/src/test-init_loop/hash | 2 +- repos/os/recipes/src/test-nic_loopback/hash | 2 +- repos/os/recipes/src/test-ram_fs_chunk/hash | 2 +- repos/os/recipes/src/test-report_rom/hash | 2 +- repos/os/recipes/src/test-resource_request/hash | 2 +- repos/os/recipes/src/test-resource_yield/hash | 2 +- repos/os/recipes/src/test-rtc/hash | 2 +- repos/os/recipes/src/test-sandbox/hash | 2 +- repos/os/recipes/src/test-signal/hash | 2 +- repos/os/recipes/src/test-slab/hash | 2 +- repos/os/recipes/src/test-terminal_crosslink/hash | 2 +- repos/os/recipes/src/test-trace/hash | 2 +- repos/os/recipes/src/test-trace_buffer/hash | 2 +- repos/os/recipes/src/test-trace_logger/hash | 2 +- repos/os/recipes/src/test-utf8/hash | 2 +- repos/os/recipes/src/test-vfs_capture/hash | 2 +- repos/os/recipes/src/test-vfs_stress/hash | 2 +- repos/os/recipes/src/test-weak_ptr/hash | 2 +- repos/os/recipes/src/top/hash | 2 +- repos/os/recipes/src/trace_logger/hash | 2 +- repos/os/recipes/src/trace_policy/hash | 2 +- repos/os/recipes/src/trace_subject_reporter/hash | 2 +- repos/os/recipes/src/usb_block_drv/hash | 2 +- repos/os/recipes/src/vfs/hash | 2 +- repos/os/recipes/src/vfs_block/hash | 2 +- repos/os/recipes/src/vfs_capture/hash | 2 +- repos/os/recipes/src/vfs_tap/hash | 2 +- repos/os/recipes/src/virt_qemu_drivers/hash | 2 +- repos/os/recipes/src/virtdev_rom/hash | 2 +- repos/os/recipes/src/virtio_fb_drv/hash | 2 +- repos/os/recipes/src/virtio_input_drv/hash | 2 +- repos/os/recipes/src/virtio_nic_drv/hash | 2 +- repos/os/recipes/src/vmm/hash | 2 +- repos/pc/recipes/api/pc_linux/hash | 2 +- repos/pc/recipes/pkg/test_usb_host_drv-pc/hash | 2 +- repos/pc/recipes/pkg/wifi/hash | 2 +- repos/pc/recipes/raw/test_usb_host_drv-pc/hash | 2 +- repos/pc/recipes/src/pc_intel_fb_drv/hash | 2 +- repos/pc/recipes/src/pc_platform_drv/hash | 2 +- repos/pc/recipes/src/pc_usb_host_drv/hash | 2 +- repos/pc/recipes/src/pc_wifi_drv/hash | 2 +- repos/ports/recipes/pkg/report_dump/hash | 2 +- repos/ports/recipes/pkg/system_shell/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-capture/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-sculpt/hash | 2 +- repos/ports/recipes/pkg/vbox5/hash | 2 +- repos/ports/recipes/pkg/vbox6-capture/hash | 2 +- repos/ports/recipes/pkg/vbox6/hash | 2 +- repos/ports/recipes/src/vbox5-nova/hash | 2 +- repos/ports/recipes/src/vbox5/hash | 2 +- repos/ports/recipes/src/vbox6/hash | 2 +- repos/ports/recipes/src/verify/hash | 2 +- 416 files changed, 416 insertions(+), 416 deletions(-) diff --git a/repos/base-fiasco/recipes/src/base-fiasco/hash b/repos/base-fiasco/recipes/src/base-fiasco/hash index 611677e034..e12e57b43e 100644 --- a/repos/base-fiasco/recipes/src/base-fiasco/hash +++ b/repos/base-fiasco/recipes/src/base-fiasco/hash @@ -1 +1 @@ -2022-11-16 12b5ce53963916e91f2498a68ba1fe050033b96b +2022-11-28 1e6b88f19291c5ea31d5d9aa16b63e7033a5ddfc diff --git a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash index c3060c069c..5f5e102911 100644 --- a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash +++ b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-11-16 545b0e6b80827253c4af5a66b08ca2af033cf925 +2022-11-28 b0df14ef1352c15d64689521c5862846dd4b81a4 diff --git a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash index da9b3ea886..4de370930a 100644 --- a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash +++ b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash @@ -1 +1 @@ -2022-11-16 57b04828c2cac7593af35e8fd42e7da50d0ad7fd +2022-11-28 65b44578983ce5e6c566e5d9b38774c32c5f7d23 diff --git a/repos/base-foc/recipes/src/base-foc-pbxa9/hash b/repos/base-foc/recipes/src/base-foc-pbxa9/hash index 4f4aef3584..49b3cb050d 100644 --- a/repos/base-foc/recipes/src/base-foc-pbxa9/hash +++ b/repos/base-foc/recipes/src/base-foc-pbxa9/hash @@ -1 +1 @@ -2022-11-16 004ccd56aa35a49e757d694e3dd8381235992ba9 +2022-11-28 b2b92bface9bf00840bc740c60cee4ff4f253962 diff --git a/repos/base-foc/recipes/src/base-foc-pc/hash b/repos/base-foc/recipes/src/base-foc-pc/hash index f118eb5ca9..20c597e0cc 100644 --- a/repos/base-foc/recipes/src/base-foc-pc/hash +++ b/repos/base-foc/recipes/src/base-foc-pc/hash @@ -1 +1 @@ -2022-11-16 035e36972554989fc34cf00c8013f73076ffbc39 +2022-11-28 cb25553ebce32eda79ab40e29a3fe90ede14a4cc diff --git a/repos/base-foc/recipes/src/base-foc-rpi3/hash b/repos/base-foc/recipes/src/base-foc-rpi3/hash index 735b088313..fdee2a6a18 100644 --- a/repos/base-foc/recipes/src/base-foc-rpi3/hash +++ b/repos/base-foc/recipes/src/base-foc-rpi3/hash @@ -1 +1 @@ -2022-11-16 e86a07511300ee74e0dcd977533e119658c96f7f +2022-11-28 e90271cb55b3de3dc64ce3e4d1837b116ce5055d diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash b/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash index dae612c7d3..aa4d6734a8 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash @@ -1 +1 @@ -2022-11-16 7da561b89b82f096ada05936a8d055f3a7399580 +2022-11-28 4b31134918427ba8b6245ebcc7479ca43bc8b576 diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash index 4487f47b81..8e9bbe620a 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash @@ -1 +1 @@ -2022-11-16 f2385e15f671e8fa2a712de73d65c254a2df4ed0 +2022-11-28 baf012b749fcc3ba5cda6379a653e64b95cc5d20 diff --git a/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash b/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash index 771683bb41..0f6e74aa37 100644 --- a/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash +++ b/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-11-16 bf9abe69a229683ea69a0709d013611c33bb3f7c +2022-11-28 4c713511d0f6ae1f3e97aab663f877bef1834a81 diff --git a/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash b/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash index 03f7df2592..075ad62ee6 100644 --- a/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash +++ b/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash @@ -1 +1 @@ -2022-11-16 542675dffb8d6b2b6ff36cea831cc87824a5e61c +2022-11-28 9cd1725c9e2855764f149312eb226bc1227bb442 diff --git a/repos/base-hw/recipes/src/base-hw-nit6_solox/hash b/repos/base-hw/recipes/src/base-hw-nit6_solox/hash index d353779971..c26106e545 100644 --- a/repos/base-hw/recipes/src/base-hw-nit6_solox/hash +++ b/repos/base-hw/recipes/src/base-hw-nit6_solox/hash @@ -1 +1 @@ -2022-11-16 c0c9e8ca427cd704554d3a19d2a4846e332209de +2022-11-28 4911a05710737556a8a1eceda54183d8f1784131 diff --git a/repos/base-hw/recipes/src/base-hw-pbxa9/hash b/repos/base-hw/recipes/src/base-hw-pbxa9/hash index b5871e584c..54b1372fc5 100644 --- a/repos/base-hw/recipes/src/base-hw-pbxa9/hash +++ b/repos/base-hw/recipes/src/base-hw-pbxa9/hash @@ -1 +1 @@ -2022-11-16 5a94c1157de71d8a20bca88c7b839a539806a9e1 +2022-11-28 f8a343c3fd836250ab866caf7f61606ec01c1436 diff --git a/repos/base-hw/recipes/src/base-hw-pc/hash b/repos/base-hw/recipes/src/base-hw-pc/hash index 31e9675c74..3823c8127a 100644 --- a/repos/base-hw/recipes/src/base-hw-pc/hash +++ b/repos/base-hw/recipes/src/base-hw-pc/hash @@ -1 +1 @@ -2022-11-16 ba04a68f49a2aca7c0e85cea1438c3496bd86280 +2022-11-28 1c7acb0980f1d7329c09723c137828e6341ff831 diff --git a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash index 806be54200..3984b9d6c3 100644 --- a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash +++ b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-11-16 e3677d7ae46ccd0a06cb016b101e0073b185e898 +2022-11-28 38601231bb9e1287239fae16a12306654ff5f38e diff --git a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash index 53cce321c7..95ba07ad9d 100644 --- a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash +++ b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-11-16 8c8f95eb89e598a2258538397671bf8768d1a9dd +2022-11-28 949e1a7aa68d315ab3f8a1b0dddc0dc0955f6f0e diff --git a/repos/base-linux/recipes/src/base-linux/hash b/repos/base-linux/recipes/src/base-linux/hash index 008054c417..7e3d482548 100644 --- a/repos/base-linux/recipes/src/base-linux/hash +++ b/repos/base-linux/recipes/src/base-linux/hash @@ -1 +1 @@ -2022-11-16 48ae01f3f648fa402e064f57a47e8315c070bf40 +2022-11-28 d78d2f81477107346595c31af10102c2156cbd9b diff --git a/repos/base-nova/recipes/api/base-nova/hash b/repos/base-nova/recipes/api/base-nova/hash index eaa457ffca..7be688e067 100644 --- a/repos/base-nova/recipes/api/base-nova/hash +++ b/repos/base-nova/recipes/api/base-nova/hash @@ -1 +1 @@ -2022-11-16 17876fc3a184cc8de6afb45855cdd51b0b7b996f +2022-11-28 477ebf1f47ada5b6c1867ffc28696de84589f057 diff --git a/repos/base-nova/recipes/src/base-nova/hash b/repos/base-nova/recipes/src/base-nova/hash index f532cfb7f7..fecbccd4a6 100644 --- a/repos/base-nova/recipes/src/base-nova/hash +++ b/repos/base-nova/recipes/src/base-nova/hash @@ -1 +1 @@ -2022-11-16 70d33a44988da786f0acb49d6df5aa36eb5b6fd7 +2022-11-28 f388f10a62eba224e23b8f19c87d727f621d11d2 diff --git a/repos/base-okl4/recipes/src/base-okl4/hash b/repos/base-okl4/recipes/src/base-okl4/hash index f5de655227..5799da9d56 100644 --- a/repos/base-okl4/recipes/src/base-okl4/hash +++ b/repos/base-okl4/recipes/src/base-okl4/hash @@ -1 +1 @@ -2022-11-16 f88f9334303c8919089efff99c070c08f71f2740 +2022-11-28 30ef28067f7ff2cd514855ee57ab07016eb25cfd diff --git a/repos/base-pistachio/recipes/src/base-pistachio/hash b/repos/base-pistachio/recipes/src/base-pistachio/hash index 371c4dcb04..9c02cab8eb 100644 --- a/repos/base-pistachio/recipes/src/base-pistachio/hash +++ b/repos/base-pistachio/recipes/src/base-pistachio/hash @@ -1 +1 @@ -2022-11-16 c878978cbdea4b0dee91fe9086021e6d54d9627b +2022-11-28 790b1cf70551a6d848a49d632db81f216e5d726d diff --git a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash index b64db005fe..7cc3b6596f 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-11-16 75fb939e08458c22f9e37ce3cf7440a0d84b7d45 +2022-11-28 9921532782c7b3fe76c985ec9199ebd2ef8a2b98 diff --git a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash index 7976e531e3..a2b3baef80 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash @@ -1 +1 @@ -2022-11-16 bb3c02121935d3871aa5366c97ad2d0a60b46981 +2022-11-28 7ee9377b56e69d827266421737fba55de39ee1e2 diff --git a/repos/base-sel4/recipes/src/base-sel4-x86/hash b/repos/base-sel4/recipes/src/base-sel4-x86/hash index 2a518d8e58..cf1d9c6acc 100644 --- a/repos/base-sel4/recipes/src/base-sel4-x86/hash +++ b/repos/base-sel4/recipes/src/base-sel4-x86/hash @@ -1 +1 @@ -2022-11-16 67f94893a84a91b66f7ac6b895116e8bedc39a7e +2022-11-28 a046500de5f9853cc4de0a5e9602bdbc3c7d4e62 diff --git a/repos/base/recipes/api/base/hash b/repos/base/recipes/api/base/hash index 65319582e1..87fc0ad867 100644 --- a/repos/base/recipes/api/base/hash +++ b/repos/base/recipes/api/base/hash @@ -1 +1 @@ -2022-10-11 1574044ae0ee33a9ad3bdadb3c487c47d4f45bff +2022-11-28 93ef5e12228862b1d6cf4aadf1bc8a29c5ab1da2 diff --git a/repos/base/recipes/pkg/test-ds_ownership/hash b/repos/base/recipes/pkg/test-ds_ownership/hash index e76e14da8d..653e868f34 100644 --- a/repos/base/recipes/pkg/test-ds_ownership/hash +++ b/repos/base/recipes/pkg/test-ds_ownership/hash @@ -1 +1 @@ -2022-11-16 0c82f21b693ea1755badccf0423bc350bd8cd47a +2022-11-28 7bbf9712b5652c09448d2d9139ebc39c806edb28 diff --git a/repos/base/recipes/pkg/test-entrypoint/hash b/repos/base/recipes/pkg/test-entrypoint/hash index 729a802db6..e6c8f77213 100644 --- a/repos/base/recipes/pkg/test-entrypoint/hash +++ b/repos/base/recipes/pkg/test-entrypoint/hash @@ -1 +1 @@ -2022-11-16 cb7edc30ebeae7a1ba97e96beab98a6b91b9235d +2022-11-28 368615e64eb70b9343c49ad039c5fdb3a2a79eef diff --git a/repos/base/recipes/pkg/test-log/hash b/repos/base/recipes/pkg/test-log/hash index 3c67516c39..d228de8283 100644 --- a/repos/base/recipes/pkg/test-log/hash +++ b/repos/base/recipes/pkg/test-log/hash @@ -1 +1 @@ -2022-11-16 aafe96c6ce5abfd861d38d0159aacf1f30bc27fa +2022-11-28 5dcecf5348e600de43e8d30f2563d15886b06e09 diff --git a/repos/base/recipes/pkg/test-mmio/hash b/repos/base/recipes/pkg/test-mmio/hash index 701d0c0d6b..971cf037e1 100644 --- a/repos/base/recipes/pkg/test-mmio/hash +++ b/repos/base/recipes/pkg/test-mmio/hash @@ -1 +1 @@ -2022-11-16 c6d5aa24272e9591e74b28c9154e0593ba9c50af +2022-11-28 ff91cca72fefce0b666b1a307a77767ac6d970fe diff --git a/repos/base/recipes/pkg/test-new_delete/hash b/repos/base/recipes/pkg/test-new_delete/hash index 64effa3315..9310b4f6eb 100644 --- a/repos/base/recipes/pkg/test-new_delete/hash +++ b/repos/base/recipes/pkg/test-new_delete/hash @@ -1 +1 @@ -2022-11-16 9ca5f70749fc452647dcb209d29d01965251c86b +2022-11-28 5193256955bebd6e8a14fcd4bc5f966948b89342 diff --git a/repos/base/recipes/pkg/test-reconstructible/hash b/repos/base/recipes/pkg/test-reconstructible/hash index 90c62b6a10..4ebc39aa82 100644 --- a/repos/base/recipes/pkg/test-reconstructible/hash +++ b/repos/base/recipes/pkg/test-reconstructible/hash @@ -1 +1 @@ -2022-11-16 9161f5b8d1fbbfda7122905fc5047124def0ed30 +2022-11-28 07255ef26fc8ff63d164aa017b1062f5fa4f1dad diff --git a/repos/base/recipes/pkg/test-registry/hash b/repos/base/recipes/pkg/test-registry/hash index 0a9d52e97c..fe5da8fc1c 100644 --- a/repos/base/recipes/pkg/test-registry/hash +++ b/repos/base/recipes/pkg/test-registry/hash @@ -1 +1 @@ -2022-11-16 895a088741097f20c622a3acb03692a97a9a37ed +2022-11-28 c8b7e7eedc4aba80720e49432424c82eb5eb847b diff --git a/repos/base/recipes/pkg/test-rm_fault/hash b/repos/base/recipes/pkg/test-rm_fault/hash index ffce6a0561..f532e7ea3a 100644 --- a/repos/base/recipes/pkg/test-rm_fault/hash +++ b/repos/base/recipes/pkg/test-rm_fault/hash @@ -1 +1 @@ -2022-11-16 b9e07abe49d25e654895b5d88b3de79faf149595 +2022-11-28 26cfc5fae062e4e3287b3ae73d111e5b731fd507 diff --git a/repos/base/recipes/pkg/test-rm_fault_no_nox/hash b/repos/base/recipes/pkg/test-rm_fault_no_nox/hash index 02afb73325..b0e7ca505d 100644 --- a/repos/base/recipes/pkg/test-rm_fault_no_nox/hash +++ b/repos/base/recipes/pkg/test-rm_fault_no_nox/hash @@ -1 +1 @@ -2022-11-16 693e1aac370b9f5fe0b6fd414bfadaeb1643818f +2022-11-28 ce526179fb7727a95ce6fd1e12b70d2c8b14f1fd diff --git a/repos/base/recipes/pkg/test-rm_nested/hash b/repos/base/recipes/pkg/test-rm_nested/hash index 103ee82e15..3fdc4219f4 100644 --- a/repos/base/recipes/pkg/test-rm_nested/hash +++ b/repos/base/recipes/pkg/test-rm_nested/hash @@ -1 +1 @@ -2022-11-16 8d28cc22706b56d4b6ab8efd1e01556470012639 +2022-11-28 7bfd7a1754bce62fcb628b4fe4f37d1afeb8aa62 diff --git a/repos/base/recipes/pkg/test-rm_stress/hash b/repos/base/recipes/pkg/test-rm_stress/hash index 8e0d03d052..20fc2476a9 100644 --- a/repos/base/recipes/pkg/test-rm_stress/hash +++ b/repos/base/recipes/pkg/test-rm_stress/hash @@ -1 +1 @@ -2022-11-16 08bead93a28766ed68f1b585467e71a091d7eaf8 +2022-11-28 9a1cf2c7a2a97828b63c6f0ace0e4039f0cd9009 diff --git a/repos/base/recipes/pkg/test-sanitizer/hash b/repos/base/recipes/pkg/test-sanitizer/hash index a30b005bc8..b8efb6a5f9 100644 --- a/repos/base/recipes/pkg/test-sanitizer/hash +++ b/repos/base/recipes/pkg/test-sanitizer/hash @@ -1 +1 @@ -2022-11-16 9d0fabfb9c5d64c37b2a64d067fbba247ad89774 +2022-11-28 330249a2238707692af8b11950bd3e484ef3d2fb diff --git a/repos/base/recipes/pkg/test-stack_smash/hash b/repos/base/recipes/pkg/test-stack_smash/hash index c1cfe5e0ae..c79cef8cd1 100644 --- a/repos/base/recipes/pkg/test-stack_smash/hash +++ b/repos/base/recipes/pkg/test-stack_smash/hash @@ -1 +1 @@ -2022-11-16 e6a1a87566edf388b032f7617a60ec9b6d885446 +2022-11-28 4981c2b06dce52d12dfa3ca54b3363a26693a168 diff --git a/repos/base/recipes/pkg/test-synced_interface/hash b/repos/base/recipes/pkg/test-synced_interface/hash index 7cf6a15893..cb4aee6485 100644 --- a/repos/base/recipes/pkg/test-synced_interface/hash +++ b/repos/base/recipes/pkg/test-synced_interface/hash @@ -1 +1 @@ -2022-11-16 dbc285bad348fe019e7ad6565ab4dc6803029eb5 +2022-11-28 9fed19d998788be7ecd7aa55f2781e6979e05b98 diff --git a/repos/base/recipes/pkg/test-timer/hash b/repos/base/recipes/pkg/test-timer/hash index a59557b9fe..474fc290a0 100644 --- a/repos/base/recipes/pkg/test-timer/hash +++ b/repos/base/recipes/pkg/test-timer/hash @@ -1 +1 @@ -2022-11-16 ade80b1d33954370c0fbcf8023af96a6bbb86dba +2022-11-28 acf0592eb4f536ac2487bee60e5a300e17322ce3 diff --git a/repos/base/recipes/pkg/test-tls/hash b/repos/base/recipes/pkg/test-tls/hash index 588fb41a01..92a3310ada 100644 --- a/repos/base/recipes/pkg/test-tls/hash +++ b/repos/base/recipes/pkg/test-tls/hash @@ -1 +1 @@ -2022-11-16 f24dac77aec510b070bcfd77d6652baebb80145b +2022-11-28 81f1719d4c422d52bb72635d67cb696113d05538 diff --git a/repos/base/recipes/pkg/test-token/hash b/repos/base/recipes/pkg/test-token/hash index 5dc0099d17..91ff3527e3 100644 --- a/repos/base/recipes/pkg/test-token/hash +++ b/repos/base/recipes/pkg/test-token/hash @@ -1 +1 @@ -2022-11-16 96a0c142e2460275bfeb60130a1bdcfbf46c8c59 +2022-11-28 a81f65b49dbefcce900e3dc4bb17266d59139f15 diff --git a/repos/base/recipes/pkg/test-xml_generator/hash b/repos/base/recipes/pkg/test-xml_generator/hash index 4e383ad01e..0754eedd2e 100644 --- a/repos/base/recipes/pkg/test-xml_generator/hash +++ b/repos/base/recipes/pkg/test-xml_generator/hash @@ -1 +1 @@ -2022-11-16 c7ecab24c25292f2c51bb28afcfd58be04a9a3b7 +2022-11-28 b5e583a2b8e45cf0e76bd4084c56722c01dbae23 diff --git a/repos/base/recipes/pkg/test-xml_node/hash b/repos/base/recipes/pkg/test-xml_node/hash index bcd1f019d3..e85dbcaac0 100644 --- a/repos/base/recipes/pkg/test-xml_node/hash +++ b/repos/base/recipes/pkg/test-xml_node/hash @@ -1 +1 @@ -2022-11-16 002ace00510a0692261c5603edf653e66c990cb2 +2022-11-28 c4322b1cdb3577e2ace0392674463ee3502c6671 diff --git a/repos/base/recipes/src/test-ds_ownership/hash b/repos/base/recipes/src/test-ds_ownership/hash index cd73f3f0ac..3381b8a2cf 100644 --- a/repos/base/recipes/src/test-ds_ownership/hash +++ b/repos/base/recipes/src/test-ds_ownership/hash @@ -1 +1 @@ -2022-10-11 359a8ba82f0a85f6f83c2e140120e0ec2fc2ff4b +2022-11-28 a0af185e7e460bc6dabd748910f7fbd4d4f0dfb1 diff --git a/repos/base/recipes/src/test-entrypoint/hash b/repos/base/recipes/src/test-entrypoint/hash index 9ea1110839..c0342616e0 100644 --- a/repos/base/recipes/src/test-entrypoint/hash +++ b/repos/base/recipes/src/test-entrypoint/hash @@ -1 +1 @@ -2022-10-11 5a9a370fb5f6483aa652fd13e805f8970580d8d7 +2022-11-28 0c907f7d61dc30f19ac6da140ba5f53dca8c1da1 diff --git a/repos/base/recipes/src/test-log/hash b/repos/base/recipes/src/test-log/hash index bf465ce443..b2294c3711 100644 --- a/repos/base/recipes/src/test-log/hash +++ b/repos/base/recipes/src/test-log/hash @@ -1 +1 @@ -2022-10-11 095026fa1d5dc144f0d2bd21f3b0aad4c1ddacbd +2022-11-28 bbb1a42f32341bcb0e4484d23280d3673dfbc862 diff --git a/repos/base/recipes/src/test-mmio/hash b/repos/base/recipes/src/test-mmio/hash index 6247eefd30..1a580b8804 100644 --- a/repos/base/recipes/src/test-mmio/hash +++ b/repos/base/recipes/src/test-mmio/hash @@ -1 +1 @@ -2022-10-11 2fc5a59b9a18db38188c8f0b5cd140f8af25debf +2022-11-28 9423125e07ad67440bc5706fac70bcbab989eee1 diff --git a/repos/base/recipes/src/test-new_delete/hash b/repos/base/recipes/src/test-new_delete/hash index 196fd52868..389b544a8c 100644 --- a/repos/base/recipes/src/test-new_delete/hash +++ b/repos/base/recipes/src/test-new_delete/hash @@ -1 +1 @@ -2022-10-11 4b8f0df83f00b36d32640a767a861327034e51ed +2022-11-28 0d5e727a64a19468fa712e4e4d09df11dbf5f332 diff --git a/repos/base/recipes/src/test-reconstructible/hash b/repos/base/recipes/src/test-reconstructible/hash index 62b89f129b..282806c04b 100644 --- a/repos/base/recipes/src/test-reconstructible/hash +++ b/repos/base/recipes/src/test-reconstructible/hash @@ -1 +1 @@ -2022-10-11 03229606efad94460265721c6f828fdf4f1c1e36 +2022-11-28 8d03cb6e09ffd09f8da94883b2383f818c3ec2e3 diff --git a/repos/base/recipes/src/test-registry/hash b/repos/base/recipes/src/test-registry/hash index dd85d8a1ff..8b138830e2 100644 --- a/repos/base/recipes/src/test-registry/hash +++ b/repos/base/recipes/src/test-registry/hash @@ -1 +1 @@ -2022-10-11 3a9a202788b631072f5bc4a6220083ea3f0804ee +2022-11-28 d83f259a57c46362ae5cb99a3db7d227be2e49e6 diff --git a/repos/base/recipes/src/test-rm_fault/hash b/repos/base/recipes/src/test-rm_fault/hash index 8bb4d51590..1a2399a1cc 100644 --- a/repos/base/recipes/src/test-rm_fault/hash +++ b/repos/base/recipes/src/test-rm_fault/hash @@ -1 +1 @@ -2022-10-11 31d8bd8cf827651dc7996e6d3ca7b005ddc0bdcd +2022-11-28 c81e23a9289ced085ef20f2f38bdea8ab226a4c4 diff --git a/repos/base/recipes/src/test-rm_nested/hash b/repos/base/recipes/src/test-rm_nested/hash index 86599133e2..819ace99c0 100644 --- a/repos/base/recipes/src/test-rm_nested/hash +++ b/repos/base/recipes/src/test-rm_nested/hash @@ -1 +1 @@ -2022-10-11 c81db79ecd943606a3113aad3e804c715fc33a1c +2022-11-28 df1c0350d79841200c665c84ff1f97503c6d7379 diff --git a/repos/base/recipes/src/test-rm_stress/hash b/repos/base/recipes/src/test-rm_stress/hash index 68e858396b..28b9e478bf 100644 --- a/repos/base/recipes/src/test-rm_stress/hash +++ b/repos/base/recipes/src/test-rm_stress/hash @@ -1 +1 @@ -2022-10-11 ef88b5f407d0b49926354c8144d2322b778dfcad +2022-11-28 efcb6e0a65748a77525b8183ee5117abfcbc1d6d diff --git a/repos/base/recipes/src/test-sanitizer/hash b/repos/base/recipes/src/test-sanitizer/hash index 2423895026..1ccf314013 100644 --- a/repos/base/recipes/src/test-sanitizer/hash +++ b/repos/base/recipes/src/test-sanitizer/hash @@ -1 +1 @@ -2022-10-11 27a1948a58c15301b3e1978f409ce9b076d704bc +2022-11-28 0ed1dbb332f5ccd52a9772beb187c7a132fbcaa0 diff --git a/repos/base/recipes/src/test-segfault/hash b/repos/base/recipes/src/test-segfault/hash index f409498935..b69b6acfe2 100644 --- a/repos/base/recipes/src/test-segfault/hash +++ b/repos/base/recipes/src/test-segfault/hash @@ -1 +1 @@ -2022-10-11 29971db890cb657bb8d41bf07636ba21752ca8b3 +2022-11-28 5cd78fbe34ade935d3731bb14901151abcf92e5e diff --git a/repos/base/recipes/src/test-stack_smash/hash b/repos/base/recipes/src/test-stack_smash/hash index 8202e3d036..33f32952fb 100644 --- a/repos/base/recipes/src/test-stack_smash/hash +++ b/repos/base/recipes/src/test-stack_smash/hash @@ -1 +1 @@ -2022-10-11 483ee9045181e9912f60834b45436d0226763bb8 +2022-11-28 073290fdbd6dde919173015719f2cccba8fca7e2 diff --git a/repos/base/recipes/src/test-synced_interface/hash b/repos/base/recipes/src/test-synced_interface/hash index 87e2688cb7..bb6322cecd 100644 --- a/repos/base/recipes/src/test-synced_interface/hash +++ b/repos/base/recipes/src/test-synced_interface/hash @@ -1 +1 @@ -2022-10-11 bdabeb64387faee3c5307377d72bcb99f4086f00 +2022-11-28 60d711f6c67c5b1ce5144efe889a32c66dcdcba7 diff --git a/repos/base/recipes/src/test-timer/hash b/repos/base/recipes/src/test-timer/hash index 80fa15879a..20124199e0 100644 --- a/repos/base/recipes/src/test-timer/hash +++ b/repos/base/recipes/src/test-timer/hash @@ -1 +1 @@ -2022-10-11 18675e4c9e59c67edede9b4c0eb0eb8bd8ff56d2 +2022-11-28 1a50e1b783758f7f91f510e4479ca8451d35cabd diff --git a/repos/base/recipes/src/test-tls/hash b/repos/base/recipes/src/test-tls/hash index 26715c617c..63bf3e4705 100644 --- a/repos/base/recipes/src/test-tls/hash +++ b/repos/base/recipes/src/test-tls/hash @@ -1 +1 @@ -2022-10-11 e0674b3ea25b560f92bfe65b9ccbed95c3119665 +2022-11-28 c2089cad10fc9185140641a3f9ebd857b2555715 diff --git a/repos/base/recipes/src/test-token/hash b/repos/base/recipes/src/test-token/hash index efd237b5be..6921af8c09 100644 --- a/repos/base/recipes/src/test-token/hash +++ b/repos/base/recipes/src/test-token/hash @@ -1 +1 @@ -2022-10-11 6b24a7f9187ca2e87c5acffd6cd61c63bca52477 +2022-11-28 c65a8dd448678f98235a007aa94b040438bb1ff2 diff --git a/repos/base/recipes/src/test-xml_generator/hash b/repos/base/recipes/src/test-xml_generator/hash index 3e88915048..1c0b04afaa 100644 --- a/repos/base/recipes/src/test-xml_generator/hash +++ b/repos/base/recipes/src/test-xml_generator/hash @@ -1 +1 @@ -2022-11-16 c2906452276d65b1a2abfd440ebbdafea6b9986c +2022-11-28 6b579c54c77e056dbd7d35bd1abbf3fe9846d084 diff --git a/repos/base/recipes/src/test-xml_node/hash b/repos/base/recipes/src/test-xml_node/hash index 4dd2a34d95..41d467a040 100644 --- a/repos/base/recipes/src/test-xml_node/hash +++ b/repos/base/recipes/src/test-xml_node/hash @@ -1 +1 @@ -2022-10-11 53ba6ffafbcb4b78411e4117bbc3e7e3d721f20e +2022-11-28 f3cbb844e60da53a09571cff6701917c243a22bc diff --git a/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash b/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash index 412c0105f8..f2c5c37175 100644 --- a/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash +++ b/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash @@ -1 +1 @@ -2022-11-16 829ee51d0d112b41eca87cbb139af7a9382c574f +2022-11-28 6848cd66567304a5657be0b4618cb57272d0867c diff --git a/repos/dde_bsd/recipes/src/bsd_audio_drv/hash b/repos/dde_bsd/recipes/src/bsd_audio_drv/hash index e9f77a8ec2..ebdc301a33 100644 --- a/repos/dde_bsd/recipes/src/bsd_audio_drv/hash +++ b/repos/dde_bsd/recipes/src/bsd_audio_drv/hash @@ -1 +1 @@ -2022-11-16 4f31afed3b1d8238f90e89e7f40b8462f5cbc121 +2022-11-28 727fa6bfab0cdd85b249d1b40ec83603744e1590 diff --git a/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash b/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash index cd9699c1d4..9a0b679c62 100644 --- a/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash +++ b/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash @@ -1 +1 @@ -2022-11-16 12023ef33aa0c0bed2f42cca044d049fcdc13fc3 +2022-11-28 8dbebfae082434708a34ad0f7705de729795b750 diff --git a/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash b/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash index 3c2c31b77a..2ca38f5e9f 100644 --- a/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash +++ b/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash @@ -1 +1 @@ -2022-11-16 bc1c6a231c740674d584c613da9e69ddefd0bcfe +2022-11-28 2f79cd0fd3048e40dfe722f03f851d9b9241c2ff diff --git a/repos/dde_linux/recipes/pkg/usb_modem_drv/hash b/repos/dde_linux/recipes/pkg/usb_modem_drv/hash index a0051cf3ba..8d674db164 100644 --- a/repos/dde_linux/recipes/pkg/usb_modem_drv/hash +++ b/repos/dde_linux/recipes/pkg/usb_modem_drv/hash @@ -1 +1 @@ -2022-11-16 3335a723e92e3711d1db863b18ade047844529ab +2022-11-28 2736e2fd93e8eff477bf63fde88f9aee5bf2536e diff --git a/repos/dde_linux/recipes/pkg/wireguard/hash b/repos/dde_linux/recipes/pkg/wireguard/hash index 6c9020ae42..d8b88bca5c 100644 --- a/repos/dde_linux/recipes/pkg/wireguard/hash +++ b/repos/dde_linux/recipes/pkg/wireguard/hash @@ -1 +1 @@ -2022-11-16 9a2a194ec71479f6c18715f0bc87146d53fd232c +2022-11-28 ab75ee7a8386ce6b3a5ed5e4572affe36aa19853 diff --git a/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash b/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash index 7455e042a8..564785ee0d 100644 --- a/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash +++ b/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash @@ -1 +1 @@ -2022-11-16 19effdc50e8447753fdc888c923f07a7ea77fc12 +2022-11-28 7802af55e9bd84c2d54c25eea0fa265a95908ed0 diff --git a/repos/dde_linux/recipes/src/usb_hid_drv/hash b/repos/dde_linux/recipes/src/usb_hid_drv/hash index 68e02c0ef5..967679e343 100644 --- a/repos/dde_linux/recipes/src/usb_hid_drv/hash +++ b/repos/dde_linux/recipes/src/usb_hid_drv/hash @@ -1 +1 @@ -2022-11-16 15920ae1fe8804f96a1516174c7c828860d07c9b +2022-11-28 998c46e9c791486e13a2e1c4d45c99f65962d92b diff --git a/repos/dde_linux/recipes/src/usb_modem_drv/hash b/repos/dde_linux/recipes/src/usb_modem_drv/hash index f6143ceab6..171042ce63 100644 --- a/repos/dde_linux/recipes/src/usb_modem_drv/hash +++ b/repos/dde_linux/recipes/src/usb_modem_drv/hash @@ -1 +1 @@ -2022-11-16 fefc6c2f34701f6131303ca311eccd0c05aa50a0 +2022-11-28 9b11a4880e99507fda1d939d3a4b5bda614e3235 diff --git a/repos/dde_linux/recipes/src/usb_net_drv/hash b/repos/dde_linux/recipes/src/usb_net_drv/hash index d1838e0099..d78d3c80da 100644 --- a/repos/dde_linux/recipes/src/usb_net_drv/hash +++ b/repos/dde_linux/recipes/src/usb_net_drv/hash @@ -1 +1 @@ -2022-11-16 08a338af31231f11e409d4bb202f40c66c98dd81 +2022-11-28 343b8e047ab927555382da64309c8eaad3264d7a diff --git a/repos/dde_linux/recipes/src/vfs_lxip/hash b/repos/dde_linux/recipes/src/vfs_lxip/hash index d50360a038..ed5d4ea737 100644 --- a/repos/dde_linux/recipes/src/vfs_lxip/hash +++ b/repos/dde_linux/recipes/src/vfs_lxip/hash @@ -1 +1 @@ -2022-11-16 fa0eb3f54ac60eecebf3be35c06023ad81cb03a2 +2022-11-28 cb8af9269a7b354407e391e86ec3e773dd92570a diff --git a/repos/dde_linux/recipes/src/wireguard/hash b/repos/dde_linux/recipes/src/wireguard/hash index bf0db3bf53..fef0123268 100644 --- a/repos/dde_linux/recipes/src/wireguard/hash +++ b/repos/dde_linux/recipes/src/wireguard/hash @@ -1 +1 @@ -2022-11-16 5e46009f54c24e0ee553c3116b9f69d97506f1fa +2022-11-28 a33c56f7c89c365037c5a6c3f15e021068fd902f diff --git a/repos/dde_rump/recipes/pkg/ext2_fs/hash b/repos/dde_rump/recipes/pkg/ext2_fs/hash index ffd2658e6d..465fdd6b43 100644 --- a/repos/dde_rump/recipes/pkg/ext2_fs/hash +++ b/repos/dde_rump/recipes/pkg/ext2_fs/hash @@ -1 +1 @@ -2022-11-16 28ee2391783861c7491447dda71c0e9b8bf04fe7 +2022-11-28 52af57263470bd47864d0ac56f7121670f597883 diff --git a/repos/dde_rump/recipes/src/rump/hash b/repos/dde_rump/recipes/src/rump/hash index 69b5562fcc..a51d75075b 100644 --- a/repos/dde_rump/recipes/src/rump/hash +++ b/repos/dde_rump/recipes/src/rump/hash @@ -1 +1 @@ -2022-11-16 bd2bbd01bfa9c8f321d878b8b686f7d24f4892f3 +2022-11-28 f5eed1f6dc5063d82be723feab4ab5150475cf61 diff --git a/repos/demo/recipes/src/demo/hash b/repos/demo/recipes/src/demo/hash index f7dc0474ee..f4602522bc 100644 --- a/repos/demo/recipes/src/demo/hash +++ b/repos/demo/recipes/src/demo/hash @@ -1 +1 @@ -2022-11-16 00d118b74b250cb897d2bae146024c6c8e0ece96 +2022-11-28 ab607bcc0b1dd4307ff53bc472bb4b9a3e26d403 diff --git a/repos/gems/recipes/pkg/backdrop/hash b/repos/gems/recipes/pkg/backdrop/hash index cbc7f3122e..77c9fb0664 100644 --- a/repos/gems/recipes/pkg/backdrop/hash +++ b/repos/gems/recipes/pkg/backdrop/hash @@ -1 +1 @@ -2022-11-16 bbb37254077cb4a8ef31c1763c06ed4672bf2695 +2022-11-28 b10a543f5bbe48410ee3e143b77c54a39e14846d diff --git a/repos/gems/recipes/pkg/cbe_check/hash b/repos/gems/recipes/pkg/cbe_check/hash index aaaea2e040..3a023eb8d4 100644 --- a/repos/gems/recipes/pkg/cbe_check/hash +++ b/repos/gems/recipes/pkg/cbe_check/hash @@ -1 +1 @@ -2022-11-16 97b7c005e9298c5448864a4a14e19187fe7ede38 +2022-11-28 1ee22221264b2c95e4545f6591b532ba3f628fe3 diff --git a/repos/gems/recipes/pkg/cbe_demo/hash b/repos/gems/recipes/pkg/cbe_demo/hash index f97564e13b..b8c3120842 100644 --- a/repos/gems/recipes/pkg/cbe_demo/hash +++ b/repos/gems/recipes/pkg/cbe_demo/hash @@ -1 +1 @@ -2022-11-16 9fb681f240eec099422bcdddeca183b9bff271f2 +2022-11-28 a0e5607602730c0e8e25e662561b2673d6d3ff15 diff --git a/repos/gems/recipes/pkg/cbe_fs/hash b/repos/gems/recipes/pkg/cbe_fs/hash index ef93b9d729..1be0a4c7f0 100644 --- a/repos/gems/recipes/pkg/cbe_fs/hash +++ b/repos/gems/recipes/pkg/cbe_fs/hash @@ -1 +1 @@ -2022-11-16 7a4fdb42cda811025a684edb5de3ffefe2b93c07 +2022-11-28 e6a50213cd2ba486333425a2b2fa5f27a976697c diff --git a/repos/gems/recipes/pkg/cbe_init/hash b/repos/gems/recipes/pkg/cbe_init/hash index 21e532f1ac..b23bbd7c12 100644 --- a/repos/gems/recipes/pkg/cbe_init/hash +++ b/repos/gems/recipes/pkg/cbe_init/hash @@ -1 +1 @@ -2022-11-16 21a3b4141f1f0a3a237d8fe94acb32b4a4118408 +2022-11-28 277306469c87a3c8690fa8399324d55a54248f62 diff --git a/repos/gems/recipes/pkg/cbe_shell/hash b/repos/gems/recipes/pkg/cbe_shell/hash index 03cac5b1da..c74adb3054 100644 --- a/repos/gems/recipes/pkg/cbe_shell/hash +++ b/repos/gems/recipes/pkg/cbe_shell/hash @@ -1 +1 @@ -2022-11-16 539a56098eaebee894d38901e4e89d5ffedf35c5 +2022-11-28 7f43d3b50bcc6a9ce3fa6faa2fc5f71f8831bb42 diff --git a/repos/gems/recipes/pkg/cbe_ta_fs/hash b/repos/gems/recipes/pkg/cbe_ta_fs/hash index 3060148704..6c901cc28b 100644 --- a/repos/gems/recipes/pkg/cbe_ta_fs/hash +++ b/repos/gems/recipes/pkg/cbe_ta_fs/hash @@ -1 +1 @@ -2022-11-16 9a07c058111568a2f9d8638223ad271443bfb05a +2022-11-28 2735b0d3df66fb7edde3d7aa7ac252532653cc45 diff --git a/repos/gems/recipes/pkg/cbe_ta_vfs/hash b/repos/gems/recipes/pkg/cbe_ta_vfs/hash index e79f8e4c0e..066a373041 100644 --- a/repos/gems/recipes/pkg/cbe_ta_vfs/hash +++ b/repos/gems/recipes/pkg/cbe_ta_vfs/hash @@ -1 +1 @@ -2022-11-16 2c5fe4eb195a16eb22eae70ff76cd88ef23de7ae +2022-11-28 17acc493e5d2e87871cbee7a4224b249c7c028fd diff --git a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash index f66a9368a2..f497d3a6bf 100644 --- a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash +++ b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash @@ -1 +1 @@ -2022-11-16 404449fcf0c6e7146c54b3ed50ee646374bdacce +2022-11-28 20722cb85427a061a88ac50b3c3a6184bba059af diff --git a/repos/gems/recipes/pkg/cbe_vfs/hash b/repos/gems/recipes/pkg/cbe_vfs/hash index b9924b47a6..859c004292 100644 --- a/repos/gems/recipes/pkg/cbe_vfs/hash +++ b/repos/gems/recipes/pkg/cbe_vfs/hash @@ -1 +1 @@ -2022-11-16 602957b46c7a6f2888cae7e9c902163070f7a8e5 +2022-11-28 b4cf460dd4670bd6690d787d317bf1d79dc861a9 diff --git a/repos/gems/recipes/pkg/cbe_vm_fs/hash b/repos/gems/recipes/pkg/cbe_vm_fs/hash index a2608f7f03..e7a34412d8 100644 --- a/repos/gems/recipes/pkg/cbe_vm_fs/hash +++ b/repos/gems/recipes/pkg/cbe_vm_fs/hash @@ -1 +1 @@ -2022-11-16 acb9bc730c145e1fd81e280511a0f90820f441ee +2022-11-28 210c41b473a68a8c08f16bb709b6160e127de0ea diff --git a/repos/gems/recipes/pkg/depot_download/hash b/repos/gems/recipes/pkg/depot_download/hash index e9f215a6c5..1901f633be 100644 --- a/repos/gems/recipes/pkg/depot_download/hash +++ b/repos/gems/recipes/pkg/depot_download/hash @@ -1 +1 @@ -2022-11-16 f2d4ce547ddf0d0b0beaec1b063a08728db66c5a +2022-11-28 e86d94d146a531dff1cd8b46d4f2aa3135d32597 diff --git a/repos/gems/recipes/pkg/download_coreplus/hash b/repos/gems/recipes/pkg/download_coreplus/hash index ea2959f03f..0265ed9655 100644 --- a/repos/gems/recipes/pkg/download_coreplus/hash +++ b/repos/gems/recipes/pkg/download_coreplus/hash @@ -1 +1 @@ -2022-11-16 e78fe320ec4c309c9d37b45e1a48d16daddc88a6 +2022-11-28 5d18299b2a80937cd53a9891567bb0018ce52f52 diff --git a/repos/gems/recipes/pkg/drivers_managed-pc/hash b/repos/gems/recipes/pkg/drivers_managed-pc/hash index 0096241a41..adfd4036ec 100644 --- a/repos/gems/recipes/pkg/drivers_managed-pc/hash +++ b/repos/gems/recipes/pkg/drivers_managed-pc/hash @@ -1 +1 @@ -2022-11-16 f232396aca8bb62878f6d68de50b3f30c273699b +2022-11-28 836fdc788f8c25a57909ff895fedf6f1db6f655f diff --git a/repos/gems/recipes/pkg/drivers_nic-pc/hash b/repos/gems/recipes/pkg/drivers_nic-pc/hash index 3e1ca24c6c..6f21bec484 100644 --- a/repos/gems/recipes/pkg/drivers_nic-pc/hash +++ b/repos/gems/recipes/pkg/drivers_nic-pc/hash @@ -1 +1 @@ -2022-11-16 f86ade17159ca096a91c12ebdbf06d73fa4fe02e +2022-11-28 26d587d4f74ba5095b37e5cb454337ca2ba9d327 diff --git a/repos/gems/recipes/pkg/file_vault/hash b/repos/gems/recipes/pkg/file_vault/hash index 9c6296c6c8..54d987c617 100644 --- a/repos/gems/recipes/pkg/file_vault/hash +++ b/repos/gems/recipes/pkg/file_vault/hash @@ -1 +1 @@ -2022-11-16 f042f7750fe81d9db5a9000fc8e73ad36c1f5435 +2022-11-28 eed4bf9a2df52787ab8f1667038e62734d076536 diff --git a/repos/gems/recipes/pkg/fonts_fs/hash b/repos/gems/recipes/pkg/fonts_fs/hash index 9bbbc03feb..b76a5bbc71 100644 --- a/repos/gems/recipes/pkg/fonts_fs/hash +++ b/repos/gems/recipes/pkg/fonts_fs/hash @@ -1 +1 @@ -2022-11-16 8d258cc6dce0a8155bcc16244381668d89ee943c +2022-11-28 b3636e55f1acf66208ea2ef82f38be55e563c251 diff --git a/repos/gems/recipes/pkg/motif_decorator/hash b/repos/gems/recipes/pkg/motif_decorator/hash index 8dcb1c252b..292bebc0b8 100644 --- a/repos/gems/recipes/pkg/motif_decorator/hash +++ b/repos/gems/recipes/pkg/motif_decorator/hash @@ -1 +1 @@ -2022-11-16 0f862ac14329db47c1c58440a0e4cf9afe036ca8 +2022-11-28 8c8d2a2a1ea5a8c7dbe294fc7be963ab084dee98 diff --git a/repos/gems/recipes/pkg/motif_wm/hash b/repos/gems/recipes/pkg/motif_wm/hash index e193df74c4..69ec5fdc62 100644 --- a/repos/gems/recipes/pkg/motif_wm/hash +++ b/repos/gems/recipes/pkg/motif_wm/hash @@ -1 +1 @@ -2022-11-16 26d24c29bd176332e69df0e55ef63a574b3c0f19 +2022-11-28 abb82f2cf9672e91b9e33858616f494942d81fb3 diff --git a/repos/gems/recipes/pkg/nano3d/hash b/repos/gems/recipes/pkg/nano3d/hash index 1e999babfc..a2fd8e3049 100644 --- a/repos/gems/recipes/pkg/nano3d/hash +++ b/repos/gems/recipes/pkg/nano3d/hash @@ -1 +1 @@ -2022-11-16 59c65f0a9782197935abecbc00571c6ea2388566 +2022-11-28 4c644ad993be994acdca966edeee9217e7da85a8 diff --git a/repos/gems/recipes/pkg/sculpt/hash b/repos/gems/recipes/pkg/sculpt/hash index 5dd79f43eb..6d6a9b2c9d 100644 --- a/repos/gems/recipes/pkg/sculpt/hash +++ b/repos/gems/recipes/pkg/sculpt/hash @@ -1 +1 @@ -2022-11-16 2c118e491fb6345fa74e329e26a53d3102c857d9 +2022-11-28 8fb87a439d220a2c2de46b279e22cffe96f3eeaf diff --git a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash index d9b21668e3..35d501c330 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash @@ -1 +1 @@ -2022-11-16 5de93b9f7476088568be90c6cf4d8a91cc01a7c4 +2022-11-28 f3274565245f683fcff0792daa880bc9aa8b63d8 diff --git a/repos/gems/recipes/pkg/sculpt_distribution/hash b/repos/gems/recipes/pkg/sculpt_distribution/hash index 80f347b5e0..2d69f00c22 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution/hash @@ -1 +1 @@ -2022-11-16 24a4665a5be805f748a2ac7654194202095ea86f +2022-11-28 5c74f6958249c1aff39d470d52f08ead451e49b1 diff --git a/repos/gems/recipes/pkg/sticks_blue_backdrop/hash b/repos/gems/recipes/pkg/sticks_blue_backdrop/hash index ab6d8a90e2..8e2ea7e1e6 100644 --- a/repos/gems/recipes/pkg/sticks_blue_backdrop/hash +++ b/repos/gems/recipes/pkg/sticks_blue_backdrop/hash @@ -1 +1 @@ -2022-11-16 264bf8aa90a0cb988b8297239333577809554592 +2022-11-28 e1c565e161b93391a5ae5341ee30c22273eb50c5 diff --git a/repos/gems/recipes/pkg/terminal/hash b/repos/gems/recipes/pkg/terminal/hash index fa6d50afaf..f7cd6735b9 100644 --- a/repos/gems/recipes/pkg/terminal/hash +++ b/repos/gems/recipes/pkg/terminal/hash @@ -1 +1 @@ -2022-11-16 a7959fba1dde7b4fe4f3f7fe5afc8cb735c52766 +2022-11-28 8778b62968db3468fe15285fe911b15651b9a38e diff --git a/repos/gems/recipes/pkg/test-depot_query_index/hash b/repos/gems/recipes/pkg/test-depot_query_index/hash index 92bf27aac9..915354fcf1 100644 --- a/repos/gems/recipes/pkg/test-depot_query_index/hash +++ b/repos/gems/recipes/pkg/test-depot_query_index/hash @@ -1 +1 @@ -2022-11-16 0b075593d8cc5b19ddd528ddf58fc4e3d128d777 +2022-11-28 7a23dfd000e07f92bf8bafa338e27196eb4585ee diff --git a/repos/gems/recipes/pkg/test-fs_tool/hash b/repos/gems/recipes/pkg/test-fs_tool/hash index 9963a85999..352b083cc1 100644 --- a/repos/gems/recipes/pkg/test-fs_tool/hash +++ b/repos/gems/recipes/pkg/test-fs_tool/hash @@ -1 +1 @@ -2022-11-16 f06e03eb7f9fc3eaaed66bbbd37fb280e333ed30 +2022-11-28 51301c4dca52400bab9c2a12e29d2d6dc10877c5 diff --git a/repos/gems/recipes/pkg/test-libc_vfs_audit/hash b/repos/gems/recipes/pkg/test-libc_vfs_audit/hash index 7350da55bf..7908af4054 100644 --- a/repos/gems/recipes/pkg/test-libc_vfs_audit/hash +++ b/repos/gems/recipes/pkg/test-libc_vfs_audit/hash @@ -1 +1 @@ -2022-11-16 4b98cb5d17eda89122da1732b1e239124f37e0ce +2022-11-28 7d42b9a71c956aaf692aaf27820d4839402ef386 diff --git a/repos/gems/recipes/pkg/themed_decorator/hash b/repos/gems/recipes/pkg/themed_decorator/hash index 485789a12b..1f2a012db2 100644 --- a/repos/gems/recipes/pkg/themed_decorator/hash +++ b/repos/gems/recipes/pkg/themed_decorator/hash @@ -1 +1 @@ -2022-11-16 48a097b8b43a4a18c4bcea045421d3509998ddb3 +2022-11-28 f9e86fa7343def96db4941bcd8dcf6d475d063d6 diff --git a/repos/gems/recipes/pkg/themed_wm/hash b/repos/gems/recipes/pkg/themed_wm/hash index f5e949fa40..109faed0dd 100644 --- a/repos/gems/recipes/pkg/themed_wm/hash +++ b/repos/gems/recipes/pkg/themed_wm/hash @@ -1 +1 @@ -2022-11-16 42fc49a65b04c6080828356156f6f9193e21a67e +2022-11-28 c98125173a78d7cfc801e64d6a63200b349d34d3 diff --git a/repos/gems/recipes/pkg/touch_keyboard/hash b/repos/gems/recipes/pkg/touch_keyboard/hash index f9e62f60e2..67738f565e 100644 --- a/repos/gems/recipes/pkg/touch_keyboard/hash +++ b/repos/gems/recipes/pkg/touch_keyboard/hash @@ -1 +1 @@ -2022-11-16 2564e22ad9c18851b611a1d9f6b946da9db51604 +2022-11-28 9890a7e5ba89114c69c6161aaa6e10accf59a3f0 diff --git a/repos/gems/recipes/pkg/trace_fs/hash b/repos/gems/recipes/pkg/trace_fs/hash index 5b03996131..1ae19e6a5f 100644 --- a/repos/gems/recipes/pkg/trace_fs/hash +++ b/repos/gems/recipes/pkg/trace_fs/hash @@ -1 +1 @@ -2022-11-16 d6599bb3145b7775f635d72fad70da3e1a63612c +2022-11-28 a6f67fd9b282fc42cf3da058df6114da050f097c diff --git a/repos/gems/recipes/pkg/trace_recorder/hash b/repos/gems/recipes/pkg/trace_recorder/hash index bfa6610dc7..4572b3b7b3 100644 --- a/repos/gems/recipes/pkg/trace_recorder/hash +++ b/repos/gems/recipes/pkg/trace_recorder/hash @@ -1 +1 @@ -2022-11-16 9b5a53d7a2b8aabf33ab0d584a28a7cd76856433 +2022-11-28 a493ba2cf3016770c20731d09c7bc7b5035a8981 diff --git a/repos/gems/recipes/pkg/window_layouter/hash b/repos/gems/recipes/pkg/window_layouter/hash index f74821ac97..8e6812206a 100644 --- a/repos/gems/recipes/pkg/window_layouter/hash +++ b/repos/gems/recipes/pkg/window_layouter/hash @@ -1 +1 @@ -2022-11-16 1e95b168a5e3359009e097ddd1136eac9411effb +2022-11-28 e60dcae97ca301fd032b83c570384f7917b125bf diff --git a/repos/gems/recipes/pkg/wm/hash b/repos/gems/recipes/pkg/wm/hash index 6eac85c71c..4986722653 100644 --- a/repos/gems/recipes/pkg/wm/hash +++ b/repos/gems/recipes/pkg/wm/hash @@ -1 +1 @@ -2022-11-16 77398bf367a9065f9dce0b27768c505c201eae60 +2022-11-28 0dc98e078addeb0c569c9d09c9edcf09f917cd46 diff --git a/repos/gems/recipes/raw/drivers_managed-pc/hash b/repos/gems/recipes/raw/drivers_managed-pc/hash index b8b89511f6..df3bad9546 100644 --- a/repos/gems/recipes/raw/drivers_managed-pc/hash +++ b/repos/gems/recipes/raw/drivers_managed-pc/hash @@ -1 +1 @@ -2022-11-16 a838ad097e450f6584792aeb0f609ba0d0a3c14d +2022-11-28 617e573bfe0b992a9ae6bc4917173dbbf4e0e151 diff --git a/repos/gems/recipes/raw/drivers_nic-pc/hash b/repos/gems/recipes/raw/drivers_nic-pc/hash index a5498a378f..2f789ea458 100644 --- a/repos/gems/recipes/raw/drivers_nic-pc/hash +++ b/repos/gems/recipes/raw/drivers_nic-pc/hash @@ -1 +1 @@ -2022-10-11 58bccdc056ef84f180f2d6c65f7f75191f252b75 +2022-11-28 2d30bc9c217698c26bfa666e2bdc903801bb423c diff --git a/repos/gems/recipes/src/backdrop/hash b/repos/gems/recipes/src/backdrop/hash index f9c3074123..6667c51c16 100644 --- a/repos/gems/recipes/src/backdrop/hash +++ b/repos/gems/recipes/src/backdrop/hash @@ -1 +1 @@ -2022-11-16 ffdc5359ba72005c5a8f4ebcf3a2d1cf63ca9282 +2022-11-28 178a2e1a69d24e103dd9b8338969c27fd4d00d54 diff --git a/repos/gems/recipes/src/cbe/hash b/repos/gems/recipes/src/cbe/hash index 63992eb48a..7757515f44 100644 --- a/repos/gems/recipes/src/cbe/hash +++ b/repos/gems/recipes/src/cbe/hash @@ -1 +1 @@ -2022-11-16 c76cd4f860c9cde1088f34dc945409db0b6b9b60 +2022-11-28 aa78e96f2d33106a20e5e5d4aa5c6065392a6ae8 diff --git a/repos/gems/recipes/src/cpu_load_display/hash b/repos/gems/recipes/src/cpu_load_display/hash index b40de19a7b..c75460e538 100644 --- a/repos/gems/recipes/src/cpu_load_display/hash +++ b/repos/gems/recipes/src/cpu_load_display/hash @@ -1 +1 @@ -2022-11-16 8ed8a667b464159aa393b1c02bdd3d911b908f5d +2022-11-28 a6a2ee70b1c9ec32badcbdc17b77964888191595 diff --git a/repos/gems/recipes/src/decorator/hash b/repos/gems/recipes/src/decorator/hash index 63c2957358..e9cf12351d 100644 --- a/repos/gems/recipes/src/decorator/hash +++ b/repos/gems/recipes/src/decorator/hash @@ -1 +1 @@ -2022-11-16 efa5cb4a3461e0f9b5aa28635aa81860ca8c2e6f +2022-11-28 7a7decfc6e089b63be4e15b939eae384a84194de diff --git a/repos/gems/recipes/src/depot_deploy/hash b/repos/gems/recipes/src/depot_deploy/hash index 86cc1cc512..641693fd4c 100644 --- a/repos/gems/recipes/src/depot_deploy/hash +++ b/repos/gems/recipes/src/depot_deploy/hash @@ -1 +1 @@ -2022-11-16 329f46b64a010835014a57cf580aca9d854c62c5 +2022-11-28 dc81f5b3d25af2103255188af2de6995aec04034 diff --git a/repos/gems/recipes/src/depot_download_manager/hash b/repos/gems/recipes/src/depot_download_manager/hash index 053498612b..7fbfc2badd 100644 --- a/repos/gems/recipes/src/depot_download_manager/hash +++ b/repos/gems/recipes/src/depot_download_manager/hash @@ -1 +1 @@ -2022-11-16 374799b6ef6178823968834649c7014c489c8c8b +2022-11-28 a3a15f17e007bde187a2972709ad064a2a0c601f diff --git a/repos/gems/recipes/src/depot_query/hash b/repos/gems/recipes/src/depot_query/hash index 935cde5c4d..5f0eedc586 100644 --- a/repos/gems/recipes/src/depot_query/hash +++ b/repos/gems/recipes/src/depot_query/hash @@ -1 +1 @@ -2022-11-16 0fcc69d62671a6b3478c8410311cbfb6f9ea659d +2022-11-28 9aa1162c9d118f8d95c483309fb8dad426805f45 diff --git a/repos/gems/recipes/src/driver_manager/hash b/repos/gems/recipes/src/driver_manager/hash index fe0512f023..7165908d24 100644 --- a/repos/gems/recipes/src/driver_manager/hash +++ b/repos/gems/recipes/src/driver_manager/hash @@ -1 +1 @@ -2022-11-16 1e6bb2ebf01a01eb5f701be8c5f547192d03c9fd +2022-11-28 ec54cf3f63cecb1c74c585c82b3c901b374779ef diff --git a/repos/gems/recipes/src/file_terminal/hash b/repos/gems/recipes/src/file_terminal/hash index 15fa442252..3efda36ff3 100644 --- a/repos/gems/recipes/src/file_terminal/hash +++ b/repos/gems/recipes/src/file_terminal/hash @@ -1 +1 @@ -2022-11-16 bab305374387f13f17a1a29686d2fd6635867bc0 +2022-11-28 7b007fbfa82c8ad68cd527facd0984b16228c7d6 diff --git a/repos/gems/recipes/src/file_vault/hash b/repos/gems/recipes/src/file_vault/hash index 9fe47c2a98..0a79edd3ca 100644 --- a/repos/gems/recipes/src/file_vault/hash +++ b/repos/gems/recipes/src/file_vault/hash @@ -1 +1 @@ -2022-11-16 5d73f31885dac34c2389140abe6a0c7acef27877 +2022-11-28 646ca249d4aaec8d8a6e12f0eb3adb82964de87a diff --git a/repos/gems/recipes/src/fs_query/hash b/repos/gems/recipes/src/fs_query/hash index 7c3654301d..e067b8b3d7 100644 --- a/repos/gems/recipes/src/fs_query/hash +++ b/repos/gems/recipes/src/fs_query/hash @@ -1 +1 @@ -2022-11-16 ecdd65d8e01efe5626755f9616b57c44cde3c0a1 +2022-11-28 3610f9f1999e64ad3e6520fa8d1854bcc226333b diff --git a/repos/gems/recipes/src/fs_tool/hash b/repos/gems/recipes/src/fs_tool/hash index b9c5ffcd3f..854130f951 100644 --- a/repos/gems/recipes/src/fs_tool/hash +++ b/repos/gems/recipes/src/fs_tool/hash @@ -1 +1 @@ -2022-11-16 a91d76e01fe904d453de812528bc94b06b671666 +2022-11-28 08bae47a5b700efc549195647cbe91314d369760 diff --git a/repos/gems/recipes/src/gpt_write/hash b/repos/gems/recipes/src/gpt_write/hash index 2189298371..69d381dd4f 100644 --- a/repos/gems/recipes/src/gpt_write/hash +++ b/repos/gems/recipes/src/gpt_write/hash @@ -1 +1 @@ -2022-11-16 1c8771116b50fe588aa67c1ebc4fcc10f6f60a69 +2022-11-28 0a36d011f8e9b5f95037c2f91a08f2970af80afc diff --git a/repos/gems/recipes/src/gui_fader/hash b/repos/gems/recipes/src/gui_fader/hash index 6e53e153a8..181629af0a 100644 --- a/repos/gems/recipes/src/gui_fader/hash +++ b/repos/gems/recipes/src/gui_fader/hash @@ -1 +1 @@ -2022-11-16 b48077f98ea0335940ef3725f964a9dd74cdc4bc +2022-11-28 ca3b925f90f62a16ffa11fe7506fe2e23774dd29 diff --git a/repos/gems/recipes/src/menu_view/hash b/repos/gems/recipes/src/menu_view/hash index 1859a77c02..84e7f78ffa 100644 --- a/repos/gems/recipes/src/menu_view/hash +++ b/repos/gems/recipes/src/menu_view/hash @@ -1 +1 @@ -2022-11-16 01b94f9803614d3fef93a3d38953163068b2b6ab +2022-11-28 4e509f07f2dc56490031d58aa8c46a3690bb5b1b diff --git a/repos/gems/recipes/src/mixer_gui_qt/hash b/repos/gems/recipes/src/mixer_gui_qt/hash index e848fd1b59..626067f3b4 100644 --- a/repos/gems/recipes/src/mixer_gui_qt/hash +++ b/repos/gems/recipes/src/mixer_gui_qt/hash @@ -1 +1 @@ -2022-11-16 4c6ffd46ea037f13e8431d79eb7da5c4c2f4469c +2022-11-28 891b5c550c0192fc5133c36fbc46233c76cb95e9 diff --git a/repos/gems/recipes/src/nano3d/hash b/repos/gems/recipes/src/nano3d/hash index 1c42380fda..676cb1ec60 100644 --- a/repos/gems/recipes/src/nano3d/hash +++ b/repos/gems/recipes/src/nano3d/hash @@ -1 +1 @@ -2022-11-16 452a7e608ae23e65be3ca355001713158f1e89ff +2022-11-28 93496d680d49e19469cea914451ad80f18a773c4 diff --git a/repos/gems/recipes/src/sculpt_manager/hash b/repos/gems/recipes/src/sculpt_manager/hash index 9be8e55bfd..6fd609a782 100644 --- a/repos/gems/recipes/src/sculpt_manager/hash +++ b/repos/gems/recipes/src/sculpt_manager/hash @@ -1 +1 @@ -2022-11-16 0e2b945cd50e656afe9448901b67888a298b2b43 +2022-11-28 7ac521181bf9719a308aca32a4284648dd54c1bf diff --git a/repos/gems/recipes/src/terminal/hash b/repos/gems/recipes/src/terminal/hash index 2d4bf732e1..77fefdb651 100644 --- a/repos/gems/recipes/src/terminal/hash +++ b/repos/gems/recipes/src/terminal/hash @@ -1 +1 @@ -2022-11-16 544855acbb7aa360a21b709f07d19b8f49554ddc +2022-11-28 b4f4b24c4b61ec77d925c539c701a34a0c78995d diff --git a/repos/gems/recipes/src/test-tiled_wm/hash b/repos/gems/recipes/src/test-tiled_wm/hash index f95bceef38..54e2785004 100644 --- a/repos/gems/recipes/src/test-tiled_wm/hash +++ b/repos/gems/recipes/src/test-tiled_wm/hash @@ -1 +1 @@ -2022-11-16 2c8c52e8257911015ef610c8c9d86edf37f690e8 +2022-11-28 3a73e92e2ab621b350cdb9f1165c988e636fb54c diff --git a/repos/gems/recipes/src/text_area/hash b/repos/gems/recipes/src/text_area/hash index e46e8667e7..74cce147c3 100644 --- a/repos/gems/recipes/src/text_area/hash +++ b/repos/gems/recipes/src/text_area/hash @@ -1 +1 @@ -2022-11-16 529f2c8e701b7f22458e0021fc961ac039a0d81b +2022-11-28 d24d4abaf3ad825756cec938986c500c79bf7d6a diff --git a/repos/gems/recipes/src/themed_decorator/hash b/repos/gems/recipes/src/themed_decorator/hash index 8a9defb800..d9b9dcffae 100644 --- a/repos/gems/recipes/src/themed_decorator/hash +++ b/repos/gems/recipes/src/themed_decorator/hash @@ -1 +1 @@ -2022-11-16 b192fc6b6a164066c03404e8fd0588efbbaec1de +2022-11-28 45f860f93636fafd9c8dfbfd7a3fbd2603ec9df9 diff --git a/repos/gems/recipes/src/touch_keyboard/hash b/repos/gems/recipes/src/touch_keyboard/hash index 5cd33ad872..9dd55abda4 100644 --- a/repos/gems/recipes/src/touch_keyboard/hash +++ b/repos/gems/recipes/src/touch_keyboard/hash @@ -1 +1 @@ -2022-11-16 3c7a5bc360a3d68e36a257c29faedbdd0a7f0fb8 +2022-11-28 250904babcfa1842a9c0f60e4b5e902debb8d03c diff --git a/repos/gems/recipes/src/trace_recorder/hash b/repos/gems/recipes/src/trace_recorder/hash index 363f59be09..62de01f130 100644 --- a/repos/gems/recipes/src/trace_recorder/hash +++ b/repos/gems/recipes/src/trace_recorder/hash @@ -1 +1 @@ -2022-11-16 2adf990574e166065279c7d05bd6a73e8ee5d238 +2022-11-28 0b74fcb1e9bc2007686bf284678ecfd74ac01a80 diff --git a/repos/gems/recipes/src/trace_recorder_policy/hash b/repos/gems/recipes/src/trace_recorder_policy/hash index 851eefbd03..f80e898ed5 100644 --- a/repos/gems/recipes/src/trace_recorder_policy/hash +++ b/repos/gems/recipes/src/trace_recorder_policy/hash @@ -1 +1 @@ -2022-11-16 67b9c0a0a37203539e10dede0c1d3a6062ceff0e +2022-11-28 0f84b459836ca9789288f50fe92d754fd4913c1b diff --git a/repos/gems/recipes/src/vfs_audit/hash b/repos/gems/recipes/src/vfs_audit/hash index be10cf51fa..8ca52615fb 100644 --- a/repos/gems/recipes/src/vfs_audit/hash +++ b/repos/gems/recipes/src/vfs_audit/hash @@ -1 +1 @@ -2022-11-16 6d742c10c51dc694b86235bfebb42849bd654bbf +2022-11-28 1444e5e77be9f2eb28a610674eb57bc38e75afc3 diff --git a/repos/gems/recipes/src/vfs_gpu/hash b/repos/gems/recipes/src/vfs_gpu/hash index 80ea13dd91..ac327eb23c 100644 --- a/repos/gems/recipes/src/vfs_gpu/hash +++ b/repos/gems/recipes/src/vfs_gpu/hash @@ -1 +1 @@ -2022-11-16 a69e03be88befaa1301fefa420a3971777918908 +2022-11-28 67a860c3129099983289117ea962d928c212eb3e diff --git a/repos/gems/recipes/src/vfs_import/hash b/repos/gems/recipes/src/vfs_import/hash index da9fd1a2ce..d8d3b4c259 100644 --- a/repos/gems/recipes/src/vfs_import/hash +++ b/repos/gems/recipes/src/vfs_import/hash @@ -1 +1 @@ -2022-11-16 f9f834980468e4ddbc7193af8a9163dca24f87f2 +2022-11-28 898a4182af848e49c887fdd3cb31a93e33bc9b05 diff --git a/repos/gems/recipes/src/vfs_pipe/hash b/repos/gems/recipes/src/vfs_pipe/hash index d9713b80d5..a98ae4d0e3 100644 --- a/repos/gems/recipes/src/vfs_pipe/hash +++ b/repos/gems/recipes/src/vfs_pipe/hash @@ -1 +1 @@ -2022-11-16 6cbfa6bfbb390e9eaa60e94eb49c5e03300c8bce +2022-11-28 ea9080ddda1d8b0b9032045088db4bdc77532616 diff --git a/repos/gems/recipes/src/vfs_trace/hash b/repos/gems/recipes/src/vfs_trace/hash index 99e8aa45b8..67e6bbd729 100644 --- a/repos/gems/recipes/src/vfs_trace/hash +++ b/repos/gems/recipes/src/vfs_trace/hash @@ -1 +1 @@ -2022-11-16 c167f1beccc9133bf43b0d9b9e45687c7d2e86f5 +2022-11-28 d8f6be91515ccd15edd3cce77ed7ca93d5760c15 diff --git a/repos/gems/recipes/src/vfs_ttf/hash b/repos/gems/recipes/src/vfs_ttf/hash index e01179efad..005607a152 100644 --- a/repos/gems/recipes/src/vfs_ttf/hash +++ b/repos/gems/recipes/src/vfs_ttf/hash @@ -1 +1 @@ -2022-11-16 8a32b60e8b4e10c295a821834dbe621c5fe929b4 +2022-11-28 1622eabbc307577c3ca01c7c48a5830dcd59bc83 diff --git a/repos/gems/recipes/src/window_layouter/hash b/repos/gems/recipes/src/window_layouter/hash index 3cdf13fb2d..cd29853e8f 100644 --- a/repos/gems/recipes/src/window_layouter/hash +++ b/repos/gems/recipes/src/window_layouter/hash @@ -1 +1 @@ -2022-11-16 cb1b9a540951b407ee221aa5d0e13149050069f2 +2022-11-28 3c5816e6936409cb5ee582a5f848cc5373b873c5 diff --git a/repos/gems/recipes/src/wm/hash b/repos/gems/recipes/src/wm/hash index 362b161f81..f93749bd28 100644 --- a/repos/gems/recipes/src/wm/hash +++ b/repos/gems/recipes/src/wm/hash @@ -1 +1 @@ -2022-11-16 f4189517b0115193a147de266e604636b20ab6cf +2022-11-28 c48556031030008518d93a409314d50057335013 diff --git a/repos/libports/recipes/api/fatfs/hash b/repos/libports/recipes/api/fatfs/hash index e0d2e2686f..c1f085ac62 100644 --- a/repos/libports/recipes/api/fatfs/hash +++ b/repos/libports/recipes/api/fatfs/hash @@ -1 +1 @@ -2022-11-16 5477bb4242d54e90c43ce61707fcc07303219b5b +2022-11-28 3f70b23f1d356d77b1363c266b6e0c9a0fc64478 diff --git a/repos/libports/recipes/pkg/acpica/hash b/repos/libports/recipes/pkg/acpica/hash index 7908dae565..0cd84f422c 100644 --- a/repos/libports/recipes/pkg/acpica/hash +++ b/repos/libports/recipes/pkg/acpica/hash @@ -1 +1 @@ -2022-11-16 548686309235a020ae03fe6603556e712ef6c7e0 +2022-11-28 644e11b5e9ccecb07d65d6fddfa83d67a6685395 diff --git a/repos/libports/recipes/pkg/gcov/hash b/repos/libports/recipes/pkg/gcov/hash index b424f3f42f..0df8d930bd 100644 --- a/repos/libports/recipes/pkg/gcov/hash +++ b/repos/libports/recipes/pkg/gcov/hash @@ -1 +1 @@ -2022-11-16 6e705684b4c41627d6672b46b4caee05ec1cdbf5 +2022-11-28 11d28d9c926b9fff0b138df0928dd37a19682f14 diff --git a/repos/libports/recipes/pkg/mesa_gears/hash b/repos/libports/recipes/pkg/mesa_gears/hash index 33dfab806d..6a972640d9 100644 --- a/repos/libports/recipes/pkg/mesa_gears/hash +++ b/repos/libports/recipes/pkg/mesa_gears/hash @@ -1 +1 @@ -2022-11-16 77da01a3b0f30795726cb891ecfe67d10cffb972 +2022-11-28 4c7c7ffd06022c8ec489dd5b2492b9d4c90f8a70 diff --git a/repos/libports/recipes/pkg/mesa_gpu-cpu/hash b/repos/libports/recipes/pkg/mesa_gpu-cpu/hash index b0f8df282a..028fcb6275 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-cpu/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-cpu/hash @@ -1 +1 @@ -2022-11-16 f18e0bdba4ea9a73889dc1cf29b14f011aeb2d46 +2022-11-28 fd39545e7acfd213529fd015f41ddd653d12b8cb diff --git a/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash b/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash index 09afc9b7e3..793122fc18 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash @@ -1 +1 @@ -2022-11-16 b95e29c7a0e82d734a239c2c72b256245cf50bae +2022-11-28 35eab3625a423dd07b07baac72c8ed99a2f6c1c3 diff --git a/repos/libports/recipes/pkg/mesa_gpu-intel/hash b/repos/libports/recipes/pkg/mesa_gpu-intel/hash index 2eae12b530..7dd3a56272 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-intel/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-intel/hash @@ -1 +1 @@ -2022-11-16 765acb6b0ee67e02e7c57f94b5ea11e662d2be70 +2022-11-28 82af682ae4296f7e34358c8c063500e0f102765d diff --git a/repos/libports/recipes/pkg/mesa_gpu-lima/hash b/repos/libports/recipes/pkg/mesa_gpu-lima/hash index a62f1cae20..7461b133d8 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-lima/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-lima/hash @@ -1 +1 @@ -2022-11-16 d2ffadf83f397cb161cf77ed6274ebe7b853a489 +2022-11-28 9090cbc5c27834ee3474d14307ac24ed8b490cb4 diff --git a/repos/libports/recipes/pkg/pdf_view/hash b/repos/libports/recipes/pkg/pdf_view/hash index b0b666785a..dc67b925ab 100644 --- a/repos/libports/recipes/pkg/pdf_view/hash +++ b/repos/libports/recipes/pkg/pdf_view/hash @@ -1 +1 @@ -2022-11-16 b70e0b19a298d341cac5519f23c0fb6b9792f301 +2022-11-28 881b4bd84c7d9cb787b4f2a6828589bae58a1c78 diff --git a/repos/libports/recipes/pkg/qt5_textedit/hash b/repos/libports/recipes/pkg/qt5_textedit/hash index a2cdd6e128..f4ab1634fa 100644 --- a/repos/libports/recipes/pkg/qt5_textedit/hash +++ b/repos/libports/recipes/pkg/qt5_textedit/hash @@ -1 +1 @@ -2022-11-16 5bdaed3579b0a2944001b3b4a518e0cab3c38116 +2022-11-28 c7968bf31e3c941ada5720de1a77cf9165b090b2 diff --git a/repos/libports/recipes/pkg/sntp_dummy_rtc/hash b/repos/libports/recipes/pkg/sntp_dummy_rtc/hash index 86a1d8264e..93ab7b36d9 100644 --- a/repos/libports/recipes/pkg/sntp_dummy_rtc/hash +++ b/repos/libports/recipes/pkg/sntp_dummy_rtc/hash @@ -1 +1 @@ -2022-11-17 4561972104bd152029598ba339b5e1bbf44fc593 +2022-11-28 a9ba3616ab64cb80eee6e874d8bb7c4ddce1d2d0 diff --git a/repos/libports/recipes/pkg/system_clock-dummy/hash b/repos/libports/recipes/pkg/system_clock-dummy/hash index 3e8ff898a4..41efb8bad2 100644 --- a/repos/libports/recipes/pkg/system_clock-dummy/hash +++ b/repos/libports/recipes/pkg/system_clock-dummy/hash @@ -1 +1 @@ -2022-11-16 0becd4186ea6caaf1718a0ba4694896429b7c470 +2022-11-28 a74b86ce0a26a90c000f64935d44dc1ee2ad1ad2 diff --git a/repos/libports/recipes/pkg/system_clock-pc/hash b/repos/libports/recipes/pkg/system_clock-pc/hash index 314537bd44..b72de043db 100644 --- a/repos/libports/recipes/pkg/system_clock-pc/hash +++ b/repos/libports/recipes/pkg/system_clock-pc/hash @@ -1 +1 @@ -2022-11-16 d8858177ed81fe768416470082e94809d251ed0c +2022-11-28 a08083f3814bd19aa6cc0bffdde3f6816df2f906 diff --git a/repos/libports/recipes/pkg/system_rtc-linux/hash b/repos/libports/recipes/pkg/system_rtc-linux/hash index 80e31bcc3a..b4dfe30495 100644 --- a/repos/libports/recipes/pkg/system_rtc-linux/hash +++ b/repos/libports/recipes/pkg/system_rtc-linux/hash @@ -1 +1 @@ -2022-11-16 6fb4eea8b41112c577e421ceb1bebc5c36ea61e9 +2022-11-28 f6e93de47e2bfb349bdbdac00442b5f48ca3d8bb diff --git a/repos/libports/recipes/pkg/system_rtc-pc/hash b/repos/libports/recipes/pkg/system_rtc-pc/hash index 9f004de9ef..42ae9b1b08 100644 --- a/repos/libports/recipes/pkg/system_rtc-pc/hash +++ b/repos/libports/recipes/pkg/system_rtc-pc/hash @@ -1 +1 @@ -2022-11-16 de6b7d385e1e21c8dd257d0a11b6d976e2c2944e +2022-11-28 844ad88f6038b55862c166692b18b38e1252f26f diff --git a/repos/libports/recipes/pkg/test-expat/hash b/repos/libports/recipes/pkg/test-expat/hash index 24e0dd3473..7dcc5a5fe6 100644 --- a/repos/libports/recipes/pkg/test-expat/hash +++ b/repos/libports/recipes/pkg/test-expat/hash @@ -1 +1 @@ -2022-11-16 b57b4ca46f19c7553abe2088b84c132fce838a2f +2022-11-28 f15365a79e3d499dd3cc0250ce71b7343f7f67ef diff --git a/repos/libports/recipes/pkg/test-ldso/hash b/repos/libports/recipes/pkg/test-ldso/hash index accfd41ab9..43cd07222e 100644 --- a/repos/libports/recipes/pkg/test-ldso/hash +++ b/repos/libports/recipes/pkg/test-ldso/hash @@ -1 +1 @@ -2022-11-16 b9bafd854042c7e8861f237c92a703b1ebf8f69c +2022-11-28 c6b1cc49b3d235b308bfa920756597ca9a0cde37 diff --git a/repos/libports/recipes/pkg/test-libc/hash b/repos/libports/recipes/pkg/test-libc/hash index 2011b5ae00..4ba0b81b2f 100644 --- a/repos/libports/recipes/pkg/test-libc/hash +++ b/repos/libports/recipes/pkg/test-libc/hash @@ -1 +1 @@ -2022-11-16 59cb8ded07357f2dd5d78a19dbfb21ffd09756d2 +2022-11-28 c6501d55917dd098ceca85924b4ea7d0306fe54e diff --git a/repos/libports/recipes/pkg/test-libc_connect_lwip/hash b/repos/libports/recipes/pkg/test-libc_connect_lwip/hash index bdc35fd70d..db8037d9bf 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lwip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_lwip/hash @@ -1 +1 @@ -2022-11-16 d19253a3d09844f2495e42510f7cc48329eeef8b +2022-11-28 d6ae8e35e8eeb3dd7750c28115b35f9944d3c7f6 diff --git a/repos/libports/recipes/pkg/test-libc_connect_lxip/hash b/repos/libports/recipes/pkg/test-libc_connect_lxip/hash index 2a53bd0f23..cb1397261c 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lxip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_lxip/hash @@ -1 +1 @@ -2022-11-16 43f55039429248ba5d3216ce1423812aa37b06cb +2022-11-28 982a9e161e5088aaf0107ad9a971d80a7c3f67a9 diff --git a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash index b272191a86..13e690140c 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash @@ -1 +1 @@ -2022-11-16 3249dadf528753dfc52e9ca16bd6079f4851a049 +2022-11-28 077a530bf543d298581de3dca8c6af25b9962dc2 diff --git a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash index 05d5f18a74..1e7063d685 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash @@ -1 +1 @@ -2022-11-16 956ea8cad01075826a9e20668cc55f74353afe49 +2022-11-28 712e3bf834381e41783cf04fd68d4262337ee479 diff --git a/repos/libports/recipes/pkg/test-libc_counter/hash b/repos/libports/recipes/pkg/test-libc_counter/hash index 9d373ffbeb..f8722d7d06 100644 --- a/repos/libports/recipes/pkg/test-libc_counter/hash +++ b/repos/libports/recipes/pkg/test-libc_counter/hash @@ -1 +1 @@ -2022-11-16 a6a270e6e6d61bd9d5da0b7d7734011084660f35 +2022-11-28 73f50a7fded3ec2ab679dbe34f58151b205fb239 diff --git a/repos/libports/recipes/pkg/test-libc_execve/hash b/repos/libports/recipes/pkg/test-libc_execve/hash index c44f861311..27bc61971d 100644 --- a/repos/libports/recipes/pkg/test-libc_execve/hash +++ b/repos/libports/recipes/pkg/test-libc_execve/hash @@ -1 +1 @@ -2022-11-16 78b404a0c8b2bb98dc696775ad3a99aec107783d +2022-11-28 c5558736c215a0f3c63f01d7c67ffee3e418ef03 diff --git a/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash b/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash index c503efaef0..ea7cd1db6d 100644 --- a/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash +++ b/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash @@ -1 +1 @@ -2022-11-16 a6365ada03599200519b71855d7d870801887232 +2022-11-28 a797b4d88d046e65385e97b698b9022a02434e70 diff --git a/repos/libports/recipes/pkg/test-libc_fork/hash b/repos/libports/recipes/pkg/test-libc_fork/hash index 1f6e3ea874..082205ac32 100644 --- a/repos/libports/recipes/pkg/test-libc_fork/hash +++ b/repos/libports/recipes/pkg/test-libc_fork/hash @@ -1 +1 @@ -2022-11-16 adb584599b25d211355d6974078e71fdb27db404 +2022-11-28 73124d1c5ec5bca09602829c460cac8a998e1799 diff --git a/repos/libports/recipes/pkg/test-libc_getenv/hash b/repos/libports/recipes/pkg/test-libc_getenv/hash index 057927fcfd..200417fc50 100644 --- a/repos/libports/recipes/pkg/test-libc_getenv/hash +++ b/repos/libports/recipes/pkg/test-libc_getenv/hash @@ -1 +1 @@ -2022-11-16 5e4dbd34f84122678659bd7ad5e54f0550374c96 +2022-11-28 18636d48c8d70c59af4deee0619c3903c30bea7d diff --git a/repos/libports/recipes/pkg/test-libc_pipe/hash b/repos/libports/recipes/pkg/test-libc_pipe/hash index 6586659800..e22ef521c1 100644 --- a/repos/libports/recipes/pkg/test-libc_pipe/hash +++ b/repos/libports/recipes/pkg/test-libc_pipe/hash @@ -1 +1 @@ -2022-11-16 8049b0a8a1d38ece1b623263166ea75ab389b2a4 +2022-11-28 a630c441aa0c26e938e1b7117181ceba3257fdf6 diff --git a/repos/libports/recipes/pkg/test-libc_vfs/hash b/repos/libports/recipes/pkg/test-libc_vfs/hash index 2fc3a0db0f..34a715aa7f 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs/hash @@ -1 +1 @@ -2022-11-16 db2e1ead49b4e819881fd75a044e6a0f16967e12 +2022-11-28 47bb86f7f831503d5288b435cbf355be889c106d diff --git a/repos/libports/recipes/pkg/test-libc_vfs_block/hash b/repos/libports/recipes/pkg/test-libc_vfs_block/hash index 7d43a9e43b..2609f06067 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_block/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_block/hash @@ -1 +1 @@ -2022-11-16 194eb0a1f3697971e90569cdf5c16d1a401fdfcd +2022-11-28 d68c9015c93802a7f230b6b29eb56454a494b43b diff --git a/repos/libports/recipes/pkg/test-libc_vfs_counter/hash b/repos/libports/recipes/pkg/test-libc_vfs_counter/hash index 524b57f88b..d65a88f87e 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_counter/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_counter/hash @@ -1 +1 @@ -2022-11-16 a823abb9a4201c659ffe44d9e99d09cba6d75797 +2022-11-28 9f0e25982153c2693b5f0b525d55a7b21103c734 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_fs/hash b/repos/libports/recipes/pkg/test-libc_vfs_fs/hash index a201ced6e0..264c821c33 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_fs/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_fs/hash @@ -1 +1 @@ -2022-11-16 d7030434580735f8059e9af7e68b2286fe0f13a3 +2022-11-28 2a8606a48a0d4099d2a81f2f80692c7e71df0f47 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash b/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash index a210b0b36d..843fcd2c03 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash @@ -1 +1 @@ -2022-11-16 642a05d482cded81d3a83b3ca69037c6b0f0bd2c +2022-11-28 82cd2044ed13411539237340f64f007b0f478997 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_ram/hash b/repos/libports/recipes/pkg/test-libc_vfs_ram/hash index 6cebeb7658..f7522e16e8 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_ram/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_ram/hash @@ -1 +1 @@ -2022-11-16 325313bb3f55ba59dbe0c4fd6b585ab3ce8a93ea +2022-11-28 aa7dced8464072c52e760cf8f8c3aab0a638e3b0 diff --git a/repos/libports/recipes/pkg/test-pthread/hash b/repos/libports/recipes/pkg/test-pthread/hash index da4cd149d7..bd947937c0 100644 --- a/repos/libports/recipes/pkg/test-pthread/hash +++ b/repos/libports/recipes/pkg/test-pthread/hash @@ -1 +1 @@ -2022-11-16 1c76422b88d1880907a0ab9c54d320e3bc435656 +2022-11-28 e0032f00cfdb9fcdc3b761930b41b1e72c4e099e diff --git a/repos/libports/recipes/pkg/test-sequence/hash b/repos/libports/recipes/pkg/test-sequence/hash index 8a3de2f566..b85ab7375f 100644 --- a/repos/libports/recipes/pkg/test-sequence/hash +++ b/repos/libports/recipes/pkg/test-sequence/hash @@ -1 +1 @@ -2022-11-16 25fa2aad90d74e2c76321451733527fc9fcdda3b +2022-11-28 a4f93da86bc76f1f586f205b02cf644aa94cb2cd diff --git a/repos/libports/recipes/pkg/test-spark/hash b/repos/libports/recipes/pkg/test-spark/hash index 70b7f75b43..c083c72b25 100644 --- a/repos/libports/recipes/pkg/test-spark/hash +++ b/repos/libports/recipes/pkg/test-spark/hash @@ -1 +1 @@ -2022-11-16 509140f0061c4777fb81c972673da3322441dcaa +2022-11-28 3c173e41a71ad2d84807ee6a47bc05b8afcf87ba diff --git a/repos/libports/recipes/pkg/test-spark_exception/hash b/repos/libports/recipes/pkg/test-spark_exception/hash index 4435f279f5..85d1c4e6ca 100644 --- a/repos/libports/recipes/pkg/test-spark_exception/hash +++ b/repos/libports/recipes/pkg/test-spark_exception/hash @@ -1 +1 @@ -2022-11-16 cc10687b5407afd6512ecadced631c37316349a1 +2022-11-28 5567d3d41fd530c9908acafce53947c26e1bd1ad diff --git a/repos/libports/recipes/pkg/test-spark_secondary_stack/hash b/repos/libports/recipes/pkg/test-spark_secondary_stack/hash index 3338dc75ee..5459b65f2d 100644 --- a/repos/libports/recipes/pkg/test-spark_secondary_stack/hash +++ b/repos/libports/recipes/pkg/test-spark_secondary_stack/hash @@ -1 +1 @@ -2022-11-16 a2245f33f03d054a3848efec9889f6597f2206ef +2022-11-28 582a04a493514b22fb3ba3798a789c531444d8b7 diff --git a/repos/libports/recipes/pkg/test-stdcxx/hash b/repos/libports/recipes/pkg/test-stdcxx/hash index 18b1b687f3..902a12d6a4 100644 --- a/repos/libports/recipes/pkg/test-stdcxx/hash +++ b/repos/libports/recipes/pkg/test-stdcxx/hash @@ -1 +1 @@ -2022-11-16 afae93d322717b9bbffcca6fac8965db92584005 +2022-11-28 9eb944366f2f15638956a4fbafba2c86858facff diff --git a/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash b/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash index dacbb2eab2..0807bd45f6 100644 --- a/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash +++ b/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash @@ -1 +1 @@ -2022-11-16 cb163aa087eabda6b643887c8183cf36f5c3ca7a +2022-11-28 9c62785ef445fb59f89c0d72318c30272e9ac461 diff --git a/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash b/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash index 2720e43bc9..6d79f26813 100644 --- a/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash +++ b/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash @@ -1 +1 @@ -2022-11-16 9b52b6f72355b78844fa7b874c43599efda18259 +2022-11-28 f2b1737f36921127cf9364607d6c6a2f01c38761 diff --git a/repos/libports/recipes/pkg/usb_webcam/hash b/repos/libports/recipes/pkg/usb_webcam/hash index 7004f21b89..2c5200670a 100644 --- a/repos/libports/recipes/pkg/usb_webcam/hash +++ b/repos/libports/recipes/pkg/usb_webcam/hash @@ -1 +1 @@ -2022-11-16 67a42a6633c48790cc11a2d5198e2e86758c52b6 +2022-11-28 9fb8dfb07f8aadde9472d7d40bc046c9bf366894 diff --git a/repos/libports/recipes/src/acpica/hash b/repos/libports/recipes/src/acpica/hash index 0fa5ca11a4..0304269fc7 100644 --- a/repos/libports/recipes/src/acpica/hash +++ b/repos/libports/recipes/src/acpica/hash @@ -1 +1 @@ -2022-11-16 ec5bfaafba175597babc1b12f0cb389e5da895c1 +2022-11-28 e62feaf32fd421ec4969d3a005c55b7dcaf3c218 diff --git a/repos/libports/recipes/src/extract/hash b/repos/libports/recipes/src/extract/hash index dbde48d96f..6163849a9d 100644 --- a/repos/libports/recipes/src/extract/hash +++ b/repos/libports/recipes/src/extract/hash @@ -1 +1 @@ -2022-11-16 cf1466f974c0d6e22e192a6d9d8e1af9ec5ce4ec +2022-11-28 75ad0314354d9804ce5b3b461a155bd46bd7c546 diff --git a/repos/libports/recipes/src/fetchurl/hash b/repos/libports/recipes/src/fetchurl/hash index ad0a64ea42..40d59afbb7 100644 --- a/repos/libports/recipes/src/fetchurl/hash +++ b/repos/libports/recipes/src/fetchurl/hash @@ -1 +1 @@ -2022-11-16 3dd71783daf73ef866f13e90987996b1f9220368 +2022-11-28 0f2038c0a302471f1d0961c8ec46f1c0d41ffd00 diff --git a/repos/libports/recipes/src/gcov/hash b/repos/libports/recipes/src/gcov/hash index 8028287bf7..497cb4d17e 100644 --- a/repos/libports/recipes/src/gcov/hash +++ b/repos/libports/recipes/src/gcov/hash @@ -1 +1 @@ -2022-10-11 ead970c91c1867e13ff7810507f79ef4ce0e9811 +2022-11-28 4c65451b7bec7b733f96d4a7715ce8dbae9daaf4 diff --git a/repos/libports/recipes/src/libc/hash b/repos/libports/recipes/src/libc/hash index f5ae794aaf..c3bf468d6e 100644 --- a/repos/libports/recipes/src/libc/hash +++ b/repos/libports/recipes/src/libc/hash @@ -1 +1 @@ -2022-11-16 57745e95abf2c2c21c7182ed71231d45908d49cb +2022-11-28 4134da2f9d6aea46b460136381321fdb88c4681a diff --git a/repos/libports/recipes/src/libdrm/hash b/repos/libports/recipes/src/libdrm/hash index 7472828762..af4ff50ddb 100644 --- a/repos/libports/recipes/src/libdrm/hash +++ b/repos/libports/recipes/src/libdrm/hash @@ -1 +1 @@ -2022-11-16 7283f1ca508712fa7a94c7cf98675a8f0b21fbf0 +2022-11-28 a3a8bcae9dc5b6c981cb2149b09eb4c553dd054a diff --git a/repos/libports/recipes/src/libqgenodeviewwidget/hash b/repos/libports/recipes/src/libqgenodeviewwidget/hash index beee9de838..99052a7b5d 100644 --- a/repos/libports/recipes/src/libqgenodeviewwidget/hash +++ b/repos/libports/recipes/src/libqgenodeviewwidget/hash @@ -1 +1 @@ -2022-11-16 d6d21e437224fe0a315b42df60299f03758e677e +2022-11-28 9fef470d16823f37e4b1fb17026fb902c6e00f99 diff --git a/repos/libports/recipes/src/libqpluginwidget/hash b/repos/libports/recipes/src/libqpluginwidget/hash index 3a27601969..8fa3bada60 100644 --- a/repos/libports/recipes/src/libqpluginwidget/hash +++ b/repos/libports/recipes/src/libqpluginwidget/hash @@ -1 +1 @@ -2022-11-16 67e389450897e8ea3c375addc2af6e2d71e7c52f +2022-11-28 192d0310d2c8066dbe694dd3f1f4ae90f1d17807 diff --git a/repos/libports/recipes/src/libsparkcrypto/hash b/repos/libports/recipes/src/libsparkcrypto/hash index 1817cda337..3f65c0a489 100644 --- a/repos/libports/recipes/src/libsparkcrypto/hash +++ b/repos/libports/recipes/src/libsparkcrypto/hash @@ -1 +1 @@ -2022-11-16 2d97aab9b708366a86a298122558efacd14b8845 +2022-11-28 4a5fae0f25783c228f02d3590429b0d910999ebd diff --git a/repos/libports/recipes/src/libusb/hash b/repos/libports/recipes/src/libusb/hash index c6a8814274..39c4d4ae10 100644 --- a/repos/libports/recipes/src/libusb/hash +++ b/repos/libports/recipes/src/libusb/hash @@ -1 +1 @@ -2022-11-16 0d8f4302acae68d31487468d353ed2e5d2f3886c +2022-11-28 fb2910024e82d54a4f4e202e54fc9a79f43f26fe diff --git a/repos/libports/recipes/src/mesa/hash b/repos/libports/recipes/src/mesa/hash index cac2a9891f..ea57c46c8d 100644 --- a/repos/libports/recipes/src/mesa/hash +++ b/repos/libports/recipes/src/mesa/hash @@ -1 +1 @@ -2022-11-16 384c61d947a11c0962b3814e22ce04fa5a85cb90 +2022-11-28 86b4451216a535ad142e310d8ced068b0c773995 diff --git a/repos/libports/recipes/src/mesa_gears/hash b/repos/libports/recipes/src/mesa_gears/hash index a1c07aff36..a67650c770 100644 --- a/repos/libports/recipes/src/mesa_gears/hash +++ b/repos/libports/recipes/src/mesa_gears/hash @@ -1 +1 @@ -2022-11-16 cb144d0023999f5609a71f43c2cb4186652ca404 +2022-11-28 5851598eeb0f07ccce3c6206ad26a6323374db2f diff --git a/repos/libports/recipes/src/pcsc-lite/hash b/repos/libports/recipes/src/pcsc-lite/hash index 3e434bd5df..96ac522f6e 100644 --- a/repos/libports/recipes/src/pcsc-lite/hash +++ b/repos/libports/recipes/src/pcsc-lite/hash @@ -1 +1 @@ -2022-11-16 762945f35cc7e4e663e9f255d4e9fb7ba1e0da02 +2022-11-28 c01d9efc6082419a254c1baf87e029e5a11f91e4 diff --git a/repos/libports/recipes/src/pdf_view/hash b/repos/libports/recipes/src/pdf_view/hash index 200ae9d5be..737270e068 100644 --- a/repos/libports/recipes/src/pdf_view/hash +++ b/repos/libports/recipes/src/pdf_view/hash @@ -1 +1 @@ -2022-11-16 ce126f1a622a19925b26f2361dd8b37dce552938 +2022-11-28 812446fdb5296e4a90e82c05846148c5b48f7949 diff --git a/repos/libports/recipes/src/posix/hash b/repos/libports/recipes/src/posix/hash index fbdeb891ab..aa5ac7eab8 100644 --- a/repos/libports/recipes/src/posix/hash +++ b/repos/libports/recipes/src/posix/hash @@ -1 +1 @@ -2022-10-11 28d0e6f82eca5822b451f823ff7f7c5e402c95f1 +2022-11-28 ce351ff0ccb3df0c71b46e5b9ae997ab0c05ec51 diff --git a/repos/libports/recipes/src/qt5_base/hash b/repos/libports/recipes/src/qt5_base/hash index 9a9a7cab75..e319360596 100644 --- a/repos/libports/recipes/src/qt5_base/hash +++ b/repos/libports/recipes/src/qt5_base/hash @@ -1 +1 @@ -2022-11-16 07149062b866de75383f101b7b07d0a0742a62b5 +2022-11-28 f5189ce7b8ca0d74646ead04e4dc435786b18421 diff --git a/repos/libports/recipes/src/qt5_component/hash b/repos/libports/recipes/src/qt5_component/hash index 8fbc39cda1..f0ff24468a 100644 --- a/repos/libports/recipes/src/qt5_component/hash +++ b/repos/libports/recipes/src/qt5_component/hash @@ -1 +1 @@ -2022-10-11 2fadcbd4659e661b1cf1892dd98c372db00d65a1 +2022-11-28 a63b8eb3ebf6bf1853d71cc22b35b94b850bdd95 diff --git a/repos/libports/recipes/src/qt5_launchpad/hash b/repos/libports/recipes/src/qt5_launchpad/hash index 57641e26e3..42191307ac 100644 --- a/repos/libports/recipes/src/qt5_launchpad/hash +++ b/repos/libports/recipes/src/qt5_launchpad/hash @@ -1 +1 @@ -2022-11-16 4ac82ca3b1b9b855151f55909924103a7e5a02ad +2022-11-28 3c60ba3664f9bff53378669a40d2c8e86102085c diff --git a/repos/libports/recipes/src/qt5_quickcontrols2/hash b/repos/libports/recipes/src/qt5_quickcontrols2/hash index e5f6466aa5..135beb127b 100644 --- a/repos/libports/recipes/src/qt5_quickcontrols2/hash +++ b/repos/libports/recipes/src/qt5_quickcontrols2/hash @@ -1 +1 @@ -2022-11-16 2b43089c3e08c21f7f50915427085eadd682009a +2022-11-28 c2b069aeb351afc8731e38c8c53ba45a97144314 diff --git a/repos/libports/recipes/src/qt5_svg/hash b/repos/libports/recipes/src/qt5_svg/hash index d2bba84724..72c01da4ce 100644 --- a/repos/libports/recipes/src/qt5_svg/hash +++ b/repos/libports/recipes/src/qt5_svg/hash @@ -1 +1 @@ -2022-11-16 80ded8a65c9d21764c305dff527a5f2bed148b10 +2022-11-28 0cc57040de5e8d0645fcfb0bba71e0ee625946da diff --git a/repos/libports/recipes/src/sanitizer/hash b/repos/libports/recipes/src/sanitizer/hash index fe0c5cdc91..640fea67b7 100644 --- a/repos/libports/recipes/src/sanitizer/hash +++ b/repos/libports/recipes/src/sanitizer/hash @@ -1 +1 @@ -2022-10-11 b58cf7feadf436304b142cf97d754d9c12ba15f7 +2022-11-28 f80af1d52227f86b2c805d5f7e77e06fc842b756 diff --git a/repos/libports/recipes/src/sntp_client/hash b/repos/libports/recipes/src/sntp_client/hash index 05d2ef8be0..029415c4f1 100644 --- a/repos/libports/recipes/src/sntp_client/hash +++ b/repos/libports/recipes/src/sntp_client/hash @@ -1 +1 @@ -2022-05-31-a a079c0893d3acb89dab9ab70e0e8437bdc3518a0 +2022-11-28 e4594420932adff726401ad1ac9e1ab6d1673251 diff --git a/repos/libports/recipes/src/spark/hash b/repos/libports/recipes/src/spark/hash index 20dfe69535..6bbdad7101 100644 --- a/repos/libports/recipes/src/spark/hash +++ b/repos/libports/recipes/src/spark/hash @@ -1 +1 @@ -2022-11-16 e9c07f6f0d4a7daa32b8896b076cf2feca165b42 +2022-11-28 939e582dcbf729b103c7700d7ddf6eb6ed3c14d1 diff --git a/repos/libports/recipes/src/system_rtc/hash b/repos/libports/recipes/src/system_rtc/hash index ff8ba91610..6ee389f489 100644 --- a/repos/libports/recipes/src/system_rtc/hash +++ b/repos/libports/recipes/src/system_rtc/hash @@ -1 +1 @@ -2022-11-16 26642100b08d7453e0d9ca8e6d610e1af0c32a23 +2022-11-28 9f3efa9b2062f13aab25b23963c38f55cf6a2f82 diff --git a/repos/libports/recipes/src/test-ldso/hash b/repos/libports/recipes/src/test-ldso/hash index d7766ef8b3..42cf612749 100644 --- a/repos/libports/recipes/src/test-ldso/hash +++ b/repos/libports/recipes/src/test-ldso/hash @@ -1 +1 @@ -2022-10-11 95c52dc593f10432df5414e202a600acfcf7ea92 +2022-11-28 8645e8425035125533b08dcb9828dd8c9221b220 diff --git a/repos/libports/recipes/src/test-libc_fifo_pipe/hash b/repos/libports/recipes/src/test-libc_fifo_pipe/hash index 1300fef846..64b3c63563 100644 --- a/repos/libports/recipes/src/test-libc_fifo_pipe/hash +++ b/repos/libports/recipes/src/test-libc_fifo_pipe/hash @@ -1 +1 @@ -2022-11-16 077105ded9c670a90b94c734ef93994e0a367d6f +2022-11-28 8eda3d9e48fc55c09e5f3e3246b384b19d8369f4 diff --git a/repos/libports/recipes/src/test-libc_vfs/hash b/repos/libports/recipes/src/test-libc_vfs/hash index 59779b3029..4f61fdb2f8 100644 --- a/repos/libports/recipes/src/test-libc_vfs/hash +++ b/repos/libports/recipes/src/test-libc_vfs/hash @@ -1 +1 @@ -2022-10-11 f56404d7b90c8918407a54700dcc4f8ed8b61e34 +2022-11-28 af8906f1e9d479a8303c608f5477ce511b38d570 diff --git a/repos/libports/recipes/src/test-libc_vfs_block/hash b/repos/libports/recipes/src/test-libc_vfs_block/hash index a425ca58bc..ce764ddc1c 100644 --- a/repos/libports/recipes/src/test-libc_vfs_block/hash +++ b/repos/libports/recipes/src/test-libc_vfs_block/hash @@ -1 +1 @@ -2022-10-11 8d10d9cc36ee0ac926306bb8bef583652ad8bdd5 +2022-11-28 3bb1e44c6e1c9a21e8a854d711c6f39be99a4ddd diff --git a/repos/libports/recipes/src/test-netty/hash b/repos/libports/recipes/src/test-netty/hash index 0691a1d531..2cd00347a8 100644 --- a/repos/libports/recipes/src/test-netty/hash +++ b/repos/libports/recipes/src/test-netty/hash @@ -1 +1 @@ -2022-10-11 4a91a51af6e2dcd10147d7c518cb58d26927c4bd +2022-11-28 6148ad53fc4b417326e4a0e29772e37a1a104c19 diff --git a/repos/libports/recipes/src/test-pthread/hash b/repos/libports/recipes/src/test-pthread/hash index 59fb93c51e..0ab413e771 100644 --- a/repos/libports/recipes/src/test-pthread/hash +++ b/repos/libports/recipes/src/test-pthread/hash @@ -1 +1 @@ -2022-10-11 b57a6326cda95e2b2ea063ed52e67ce84f04cc1a +2022-11-28 b61e0d028e3ac57095b33a00a370b9266c08da0b diff --git a/repos/libports/recipes/src/test-qpluginwidget/hash b/repos/libports/recipes/src/test-qpluginwidget/hash index 8cf022fbd0..676b302a95 100644 --- a/repos/libports/recipes/src/test-qpluginwidget/hash +++ b/repos/libports/recipes/src/test-qpluginwidget/hash @@ -1 +1 @@ -2022-11-16 3fe60e9cb462149746e2bc72c40c00a9f5db0582 +2022-11-28 2e81467bb0823d68d3525cc1c680b0c4cef46c14 diff --git a/repos/libports/recipes/src/test-spark/hash b/repos/libports/recipes/src/test-spark/hash index e6c6351e33..a7004bf3f2 100644 --- a/repos/libports/recipes/src/test-spark/hash +++ b/repos/libports/recipes/src/test-spark/hash @@ -1 +1 @@ -2022-11-16 370cab7a82f5a5e4e22f80a9c6b8779f32bc5c8f +2022-11-28 d33ea8426c2640855b7039d79fc06b88db0a88e0 diff --git a/repos/libports/recipes/src/test-spark_exception/hash b/repos/libports/recipes/src/test-spark_exception/hash index 3be47738ef..2e12474a36 100644 --- a/repos/libports/recipes/src/test-spark_exception/hash +++ b/repos/libports/recipes/src/test-spark_exception/hash @@ -1 +1 @@ -2022-11-16 f3f6ce2092df06ccaef3d0dcf582b174b514f5d3 +2022-11-28 fbb738e421b5c0d85f99d83d3c009923e1b483da diff --git a/repos/libports/recipes/src/test-spark_secondary_stack/hash b/repos/libports/recipes/src/test-spark_secondary_stack/hash index 971e64ae85..7252e2922f 100644 --- a/repos/libports/recipes/src/test-spark_secondary_stack/hash +++ b/repos/libports/recipes/src/test-spark_secondary_stack/hash @@ -1 +1 @@ -2022-11-16 42145d9d3b4fe034f920d7d5d5f70b083d113ed9 +2022-11-28 4c3776bc479d79e4218fdd53c8a641ee0e8f0463 diff --git a/repos/libports/recipes/src/test-tcp/hash b/repos/libports/recipes/src/test-tcp/hash index 03cf6798ac..ed2cc3b51f 100644 --- a/repos/libports/recipes/src/test-tcp/hash +++ b/repos/libports/recipes/src/test-tcp/hash @@ -1 +1 @@ -2022-11-16 d1a86e26845ec88c4b5dce41d06207f0503f1dc7 +2022-11-28 3304e65b77951a3837ce33ebcd38ce59c7ba1ccb diff --git a/repos/libports/recipes/src/usb_webcam/hash b/repos/libports/recipes/src/usb_webcam/hash index 0fbf5d968b..84fdd0c543 100644 --- a/repos/libports/recipes/src/usb_webcam/hash +++ b/repos/libports/recipes/src/usb_webcam/hash @@ -1 +1 @@ -2022-11-16 0b993fdf3f0a71b9b42c959aed7ea174bcbf2ea8 +2022-11-28 0c51fde93e19e2d25186c84aaae5dac12dd589cf diff --git a/repos/libports/recipes/src/vesa_drv/hash b/repos/libports/recipes/src/vesa_drv/hash index 2e7975e538..2e7716901e 100644 --- a/repos/libports/recipes/src/vesa_drv/hash +++ b/repos/libports/recipes/src/vesa_drv/hash @@ -1 +1 @@ -2022-11-16 99d7b9e9e9df99f874807740f443c6d3ab1ca5fc +2022-11-28 b2c140214ce07c51dd5fe6da30ad720447183c3b diff --git a/repos/libports/recipes/src/vfs_fatfs/hash b/repos/libports/recipes/src/vfs_fatfs/hash index ba695e75c1..3146816332 100644 --- a/repos/libports/recipes/src/vfs_fatfs/hash +++ b/repos/libports/recipes/src/vfs_fatfs/hash @@ -1 +1 @@ -2022-11-16 3b97ac5f7f634389e5f126915a93e8582cecc99f +2022-11-28 50f01521241a90aee8d40e6af351b715c8347cf6 diff --git a/repos/libports/recipes/src/vfs_jitterentropy/hash b/repos/libports/recipes/src/vfs_jitterentropy/hash index 2094b2ea96..e446110649 100644 --- a/repos/libports/recipes/src/vfs_jitterentropy/hash +++ b/repos/libports/recipes/src/vfs_jitterentropy/hash @@ -1 +1 @@ -2022-11-16 c6ddbf20fb4539ad39390fe6dae003fc46fcb037 +2022-11-28 788ca4103d1b15c889747bc2ce5026b774157cbe diff --git a/repos/libports/recipes/src/vfs_libusb/hash b/repos/libports/recipes/src/vfs_libusb/hash index f600205c36..1b6fce1a43 100644 --- a/repos/libports/recipes/src/vfs_libusb/hash +++ b/repos/libports/recipes/src/vfs_libusb/hash @@ -1 +1 @@ -2022-11-16 f1b92846fe0789342344dd749f453845d04782e9 +2022-11-28 f5f5728185bd06ed0c94cfcf3c0207d697e8c11d diff --git a/repos/libports/recipes/src/vfs_lwip/hash b/repos/libports/recipes/src/vfs_lwip/hash index 6736b21ae7..54debcc641 100644 --- a/repos/libports/recipes/src/vfs_lwip/hash +++ b/repos/libports/recipes/src/vfs_lwip/hash @@ -1 +1 @@ -2022-11-16 277cf90d4e966b21d6643f32f4bbf03c8a8c8d19 +2022-11-28 552c93534c4cab754436bb35b27f5d7a3aaa15fd diff --git a/repos/libports/recipes/src/vfs_oss/hash b/repos/libports/recipes/src/vfs_oss/hash index b123770499..9693dc3124 100644 --- a/repos/libports/recipes/src/vfs_oss/hash +++ b/repos/libports/recipes/src/vfs_oss/hash @@ -1 +1 @@ -2022-11-16 2651c55eac84e8b1cc8cda215fedb1e2bc26bb10 +2022-11-28 140f824c7f71a83a1cc83995d75c88b4cdcd73b1 diff --git a/repos/os/recipes/api/genode_c_api/hash b/repos/os/recipes/api/genode_c_api/hash index 510ccaf228..c7e136de80 100644 --- a/repos/os/recipes/api/genode_c_api/hash +++ b/repos/os/recipes/api/genode_c_api/hash @@ -1 +1 @@ -2022-11-16 b376e5d82f1332f70474b58089b6837aed2af045 +2022-11-28 b1356f251b6d21245113c71d319d5b61f8113e67 diff --git a/repos/os/recipes/api/platform_session/hash b/repos/os/recipes/api/platform_session/hash index ce65bad1aa..aec2fd438a 100644 --- a/repos/os/recipes/api/platform_session/hash +++ b/repos/os/recipes/api/platform_session/hash @@ -1 +1 @@ -2022-11-16 42965c22f078e93657caab2adfdd3c4fad3bc082 +2022-11-28 5ef258f0abcb217e1d0dec5b4ea7fafa1a75f54f diff --git a/repos/os/recipes/pkg/black_hole/hash b/repos/os/recipes/pkg/black_hole/hash index 07b94ac2ea..62e3e33b3c 100644 --- a/repos/os/recipes/pkg/black_hole/hash +++ b/repos/os/recipes/pkg/black_hole/hash @@ -1 +1 @@ -2022-11-16 1aca3cb49bc20aabd322e8601c24360756174d70 +2022-11-28 d56bcd206037174a541f4eddb7db5c9f07350959 diff --git a/repos/os/recipes/pkg/chroot/hash b/repos/os/recipes/pkg/chroot/hash index ffec5bd1c7..dff7ae5e28 100644 --- a/repos/os/recipes/pkg/chroot/hash +++ b/repos/os/recipes/pkg/chroot/hash @@ -1 +1 @@ -2022-11-16 9aa42cf5996405730dc2fdfb1cbbee2928f1334e +2022-11-28 99c14ed31c09379216162d2c71b28384585865d5 diff --git a/repos/os/recipes/pkg/clipboard/hash b/repos/os/recipes/pkg/clipboard/hash index 94de471047..70387a98e9 100644 --- a/repos/os/recipes/pkg/clipboard/hash +++ b/repos/os/recipes/pkg/clipboard/hash @@ -1 +1 @@ -2022-11-16 860ec05996e65984220adab991a7b5a97b59f7af +2022-11-28 b8f0a19889af4fdca89eb714da13ea9ea91443b7 diff --git a/repos/os/recipes/pkg/cpu_balancer/hash b/repos/os/recipes/pkg/cpu_balancer/hash index 25306acc36..eb782d77b1 100644 --- a/repos/os/recipes/pkg/cpu_balancer/hash +++ b/repos/os/recipes/pkg/cpu_balancer/hash @@ -1 +1 @@ -2022-11-16 fb3c2da609710131b2f7c0105a5d6611630c346f +2022-11-28 f747463aee5a3c29ef3c685910d9c4716fcc2743 diff --git a/repos/os/recipes/pkg/cpu_balancer_config/hash b/repos/os/recipes/pkg/cpu_balancer_config/hash index 838758a12a..31c9e8fcb8 100644 --- a/repos/os/recipes/pkg/cpu_balancer_config/hash +++ b/repos/os/recipes/pkg/cpu_balancer_config/hash @@ -1 +1 @@ -2022-11-16 8a3c16dd3c5d40cc2297fc1e7226ce37d58419f5 +2022-11-28 9db9805dd58d2c1adc59774aa814ffc88e66b6dd diff --git a/repos/os/recipes/pkg/drivers_interactive-linux/hash b/repos/os/recipes/pkg/drivers_interactive-linux/hash index 8c194ae61f..abd023c439 100644 --- a/repos/os/recipes/pkg/drivers_interactive-linux/hash +++ b/repos/os/recipes/pkg/drivers_interactive-linux/hash @@ -1 +1 @@ -2022-11-16 89adf601d7fd0e7a2a7b3e700aaa5084b0aeed86 +2022-11-28 626a30929bbdaebfd6bf40a3dc26159d7ae2b6a9 diff --git a/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash b/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash index 4150b5f0e2..1cd3e8d180 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash +++ b/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash @@ -1 +1 @@ -2022-11-16 21d382e972f6b5c391a756f95bfcda0e8f058612 +2022-11-28 60e42d4ca1c3ee70e46e489efc4a6f06a96882be diff --git a/repos/os/recipes/pkg/drivers_interactive-pc/hash b/repos/os/recipes/pkg/drivers_interactive-pc/hash index 4f63297bfb..ed4d885a90 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pc/hash +++ b/repos/os/recipes/pkg/drivers_interactive-pc/hash @@ -1 +1 @@ -2022-11-16 a70f996f39015ae7b66821780d577c887391e4c2 +2022-11-28 4ff01e8b21c88bb7ad5b2271c005c4ad255d5cf9 diff --git a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash index 08fdb4ac0e..9bc2398aa8 100644 --- a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash +++ b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-11-16 bbed3a2aa141be658825310503cff0c1d817e3f1 +2022-11-28 140593babd3a93d22d47bcc2d452d111488e1e76 diff --git a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash index 08fdb4ac0e..9bc2398aa8 100644 --- a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash +++ b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-11-16 bbed3a2aa141be658825310503cff0c1d817e3f1 +2022-11-28 140593babd3a93d22d47bcc2d452d111488e1e76 diff --git a/repos/os/recipes/pkg/drivers_nic-linux/hash b/repos/os/recipes/pkg/drivers_nic-linux/hash index 0a22acffe3..75d35918a6 100644 --- a/repos/os/recipes/pkg/drivers_nic-linux/hash +++ b/repos/os/recipes/pkg/drivers_nic-linux/hash @@ -1 +1 @@ -2022-11-16 88dde793b836de160c3c6d09d04d4acfa5e72f9f +2022-11-28 dc77beeaed76c87597123cc172f778c0f8835726 diff --git a/repos/os/recipes/pkg/drivers_nic-pbxa9/hash b/repos/os/recipes/pkg/drivers_nic-pbxa9/hash index 00d0cb4aa9..cddcaf096c 100644 --- a/repos/os/recipes/pkg/drivers_nic-pbxa9/hash +++ b/repos/os/recipes/pkg/drivers_nic-pbxa9/hash @@ -1 +1 @@ -2022-11-16 18b463a844d629e56d4298ae7d31fea0cc5018b8 +2022-11-28 376b86adb327190bc78b9220fde1bc69374d1a6c diff --git a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash index d2cf70645d..885b34a133 100644 --- a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash +++ b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-11-16 fc91ed360ce862440e2ea96289a8aafe5f5cdcf6 +2022-11-28 8744b0b07a32af21bd8245872b04198445d788bc diff --git a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash index d2cf70645d..885b34a133 100644 --- a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash +++ b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-11-16 fc91ed360ce862440e2ea96289a8aafe5f5cdcf6 +2022-11-28 8744b0b07a32af21bd8245872b04198445d788bc diff --git a/repos/os/recipes/pkg/fs_report/hash b/repos/os/recipes/pkg/fs_report/hash index bc59f46dfb..2ab9b75473 100644 --- a/repos/os/recipes/pkg/fs_report/hash +++ b/repos/os/recipes/pkg/fs_report/hash @@ -1 +1 @@ -2022-11-16 f814cd7dcdc2576b7b1206fa7770a0e97e43a7f4 +2022-11-28 18d76e77d7d2973bf49047dc9d274a2e7b8fb026 diff --git a/repos/os/recipes/pkg/fs_rom/hash b/repos/os/recipes/pkg/fs_rom/hash index 2b1c3d8145..4eecc73599 100644 --- a/repos/os/recipes/pkg/fs_rom/hash +++ b/repos/os/recipes/pkg/fs_rom/hash @@ -1 +1 @@ -2022-11-16 9788596f2dacebf5615038a3aad90c25bca535e9 +2022-11-28 96389106d1242548d3551551b1dbc05c2b0eaad8 diff --git a/repos/os/recipes/pkg/mixer/hash b/repos/os/recipes/pkg/mixer/hash index 8fa8d3b4b8..59671e2ab6 100644 --- a/repos/os/recipes/pkg/mixer/hash +++ b/repos/os/recipes/pkg/mixer/hash @@ -1 +1 @@ -2022-11-16 814b9e51059da7ef8eee984ab7b3d1cf61b0c1e2 +2022-11-28 2c17b15681294b6e1f092402a2b25fa2ec8997d8 diff --git a/repos/os/recipes/pkg/nic_router-nat/hash b/repos/os/recipes/pkg/nic_router-nat/hash index ac295cd84c..b8f20b05e5 100644 --- a/repos/os/recipes/pkg/nic_router-nat/hash +++ b/repos/os/recipes/pkg/nic_router-nat/hash @@ -1 +1 @@ -2022-11-16 634a3039276ee2a21931f3313fb4e44af6087486 +2022-11-28 c8d61048b1a5e3689150115852364a4ea4c57e5b diff --git a/repos/os/recipes/pkg/nit_focus/hash b/repos/os/recipes/pkg/nit_focus/hash index 5583be0f6f..09a1876fe9 100644 --- a/repos/os/recipes/pkg/nit_focus/hash +++ b/repos/os/recipes/pkg/nit_focus/hash @@ -1 +1 @@ -2022-11-16 7b55d9e8cefc1b200983dea82d95229f444a40d9 +2022-11-28 4436494fe3bf53a523ef44e0ac04724286fb7dc6 diff --git a/repos/os/recipes/pkg/part_block/hash b/repos/os/recipes/pkg/part_block/hash index 4045968928..6547e6a1d8 100644 --- a/repos/os/recipes/pkg/part_block/hash +++ b/repos/os/recipes/pkg/part_block/hash @@ -1 +1 @@ -2022-11-16 9df3a289233349efa8253df9fd32b78a09197104 +2022-11-28 d9cd8c0320d663ce7b4f7dea89db4a69fdfc6ed7 diff --git a/repos/os/recipes/pkg/recall_fs/hash b/repos/os/recipes/pkg/recall_fs/hash index 951ffe5c49..252cf9dfc2 100644 --- a/repos/os/recipes/pkg/recall_fs/hash +++ b/repos/os/recipes/pkg/recall_fs/hash @@ -1 +1 @@ -2022-11-16 2ececdc836047a36038349a99691b001b89a4bb1 +2022-11-28 07c55736faad906fed51afcbc45fc01126de03d1 diff --git a/repos/os/recipes/pkg/report_rom/hash b/repos/os/recipes/pkg/report_rom/hash index 543238576b..33237989de 100644 --- a/repos/os/recipes/pkg/report_rom/hash +++ b/repos/os/recipes/pkg/report_rom/hash @@ -1 +1 @@ -2022-11-16 de8acbfdef0d6a1cc8a4dca2211a41320e82bb1b +2022-11-28 78731560c6e848ae2b1fd6f06985daf68b388fb9 diff --git a/repos/os/recipes/pkg/rom_filter/hash b/repos/os/recipes/pkg/rom_filter/hash index 43308f2803..448acff3fd 100644 --- a/repos/os/recipes/pkg/rom_filter/hash +++ b/repos/os/recipes/pkg/rom_filter/hash @@ -1 +1 @@ -2022-11-16 66f056748ac138035fb75292b8bc70407401de2e +2022-11-28 db52c15e70b737ebf0a07aeefe42ed313fd94c9c diff --git a/repos/os/recipes/pkg/rom_reporter/hash b/repos/os/recipes/pkg/rom_reporter/hash index 3a69c6fdd9..11db03169c 100644 --- a/repos/os/recipes/pkg/rom_reporter/hash +++ b/repos/os/recipes/pkg/rom_reporter/hash @@ -1 +1 @@ -2022-11-16 3a12c06bda5c6316e03bc04ffd0c8257015acbe4 +2022-11-28 f027f718caa38813a647718b017a8654900d42cf diff --git a/repos/os/recipes/pkg/test-black_hole/hash b/repos/os/recipes/pkg/test-black_hole/hash index 0362c905ee..9848bd8b48 100644 --- a/repos/os/recipes/pkg/test-black_hole/hash +++ b/repos/os/recipes/pkg/test-black_hole/hash @@ -1 +1 @@ -2022-11-16 d77fe0f7ed360f6c701b95db33f851ee82367dcb +2022-11-28 0411251efb3e30bb7a5d5c9f142fdf32b4e00fa6 diff --git a/repos/os/recipes/pkg/test-capture/hash b/repos/os/recipes/pkg/test-capture/hash index ca41665f9e..a688cadf04 100644 --- a/repos/os/recipes/pkg/test-capture/hash +++ b/repos/os/recipes/pkg/test-capture/hash @@ -1 +1 @@ -2022-11-16 5c26436cbfc07c92e61b0d351f5df8d0a88288d3 +2022-11-28 afd1dd7bee4be47f6375f70e7edad3b1e59be196 diff --git a/repos/os/recipes/pkg/test-clipboard/hash b/repos/os/recipes/pkg/test-clipboard/hash index 2add31d724..b7e8a9be6f 100644 --- a/repos/os/recipes/pkg/test-clipboard/hash +++ b/repos/os/recipes/pkg/test-clipboard/hash @@ -1 +1 @@ -2022-11-16 1dcbf3b87c918adb4ebab528663fa04676ca8617 +2022-11-28 27b42b11ae331b2c8240fd2fe72df385a2ce871c diff --git a/repos/os/recipes/pkg/test-dynamic_config/hash b/repos/os/recipes/pkg/test-dynamic_config/hash index 9513b1565d..c56159dfe2 100644 --- a/repos/os/recipes/pkg/test-dynamic_config/hash +++ b/repos/os/recipes/pkg/test-dynamic_config/hash @@ -1 +1 @@ -2022-11-16 1c552558d669941a14977c9d8a1cf164a210e969 +2022-11-28 f03f62ec59aa7c8745fa1e06c05b34050bb44af6 diff --git a/repos/os/recipes/pkg/test-dynamic_config_loader/hash b/repos/os/recipes/pkg/test-dynamic_config_loader/hash index 1a4a05f9df..4258889542 100644 --- a/repos/os/recipes/pkg/test-dynamic_config_loader/hash +++ b/repos/os/recipes/pkg/test-dynamic_config_loader/hash @@ -1 +1 @@ -2022-11-16 6deb807bd0a0e8415d4c3c2cf90545e35f003f5c +2022-11-28 6c9dc7fe9fe09ef2f086a3bbfeb676aeda7201bc diff --git a/repos/os/recipes/pkg/test-fault_detection/hash b/repos/os/recipes/pkg/test-fault_detection/hash index 1ad8bd7c61..f4b187325d 100644 --- a/repos/os/recipes/pkg/test-fault_detection/hash +++ b/repos/os/recipes/pkg/test-fault_detection/hash @@ -1 +1 @@ -2022-11-16 87260d3b5179eaaec0954e48c119cab6c4a8ed2e +2022-11-28 65907ee49425ba7fea350d39bfc74c4b8b3dc604 diff --git a/repos/os/recipes/pkg/test-fs_packet/hash b/repos/os/recipes/pkg/test-fs_packet/hash index 01e2d9a71f..b0858a41dc 100644 --- a/repos/os/recipes/pkg/test-fs_packet/hash +++ b/repos/os/recipes/pkg/test-fs_packet/hash @@ -1 +1 @@ -2022-11-16 e7634f72283c1c896696f747c1aad3722c9060ae +2022-11-28 b1a1b48bbc64078fa87a1897fb34bdd224d18cca diff --git a/repos/os/recipes/pkg/test-fs_report/hash b/repos/os/recipes/pkg/test-fs_report/hash index f067f4360c..252e61a5a7 100644 --- a/repos/os/recipes/pkg/test-fs_report/hash +++ b/repos/os/recipes/pkg/test-fs_report/hash @@ -1 +1 @@ -2022-11-16 8f34f370f247286631254ffda492df46d3390691 +2022-11-28 201f14ba8b2ec7af751d49308fef66b726f657f4 diff --git a/repos/os/recipes/pkg/test-fs_rom_update/hash b/repos/os/recipes/pkg/test-fs_rom_update/hash index 9d67ddd7c8..18dfdcec5c 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update/hash @@ -1 +1 @@ -2022-11-16 de516b76f4d0f0bb7d4f275727d353346b97f436 +2022-11-28 e35220cb75b5d5fe357e07121f920e8f16e4313a diff --git a/repos/os/recipes/pkg/test-fs_rom_update_fs/hash b/repos/os/recipes/pkg/test-fs_rom_update_fs/hash index 37e6a0b3b9..31c5299c02 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update_fs/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update_fs/hash @@ -1 +1 @@ -2022-11-16 4997f01391ec5fac3830cf41a60446cc4aa1347e +2022-11-28 f348e0122cf29d3bbb1226b973dde754b5cf7c1d diff --git a/repos/os/recipes/pkg/test-fs_rom_update_ram/hash b/repos/os/recipes/pkg/test-fs_rom_update_ram/hash index 4182da1ec8..27ca3b2512 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update_ram/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update_ram/hash @@ -1 +1 @@ -2022-11-16 ccfe5ae8049e4aa0674aac9e4f0981d0330e50ed +2022-11-28 998701c5b149673e4ca3148ddecd16ee80e798aa diff --git a/repos/os/recipes/pkg/test-init/hash b/repos/os/recipes/pkg/test-init/hash index 52d83b6581..0657025092 100644 --- a/repos/os/recipes/pkg/test-init/hash +++ b/repos/os/recipes/pkg/test-init/hash @@ -1 +1 @@ -2022-11-16 e8618195e9e622053a34840524e89dba28179ca0 +2022-11-28 ff25195def22208e3d77753885f3991cbddf219c diff --git a/repos/os/recipes/pkg/test-init_loop/hash b/repos/os/recipes/pkg/test-init_loop/hash index aefcf5c96c..36f9cd4fbe 100644 --- a/repos/os/recipes/pkg/test-init_loop/hash +++ b/repos/os/recipes/pkg/test-init_loop/hash @@ -1 +1 @@ -2022-11-16 76e1a790dd731dc36d37c1046a023bf5986674c0 +2022-11-28 e2363470c70b198758cd0b3f44cbd77cfeeae190 diff --git a/repos/os/recipes/pkg/test-lx_block/hash b/repos/os/recipes/pkg/test-lx_block/hash index b0229b9b9f..4830872183 100644 --- a/repos/os/recipes/pkg/test-lx_block/hash +++ b/repos/os/recipes/pkg/test-lx_block/hash @@ -1 +1 @@ -2022-11-16 a2b8f42c00aba11061623871b387118ab21504dc +2022-11-28 1765857fa454b08d85639cb1267f006fbf3fff88 diff --git a/repos/os/recipes/pkg/test-nic_loopback/hash b/repos/os/recipes/pkg/test-nic_loopback/hash index e25ec235c9..0281547f21 100644 --- a/repos/os/recipes/pkg/test-nic_loopback/hash +++ b/repos/os/recipes/pkg/test-nic_loopback/hash @@ -1 +1 @@ -2022-11-16 43643b88efccbe33a840308f60d4aca77b322007 +2022-11-28 cf747ebcb6d7589f09e420884deeb96bcbc30f4d diff --git a/repos/os/recipes/pkg/test-nic_perf/hash b/repos/os/recipes/pkg/test-nic_perf/hash index 1b5b8db5f5..6936773834 100644 --- a/repos/os/recipes/pkg/test-nic_perf/hash +++ b/repos/os/recipes/pkg/test-nic_perf/hash @@ -1 +1 @@ -2022-11-16 3cba2fad58713e2fc5dc88da202d85cec6a5eb04 +2022-11-28 19eb2701bacc5dae5f9c7ca2248cf0a4fde5e20b diff --git a/repos/os/recipes/pkg/test-nic_perf_router/hash b/repos/os/recipes/pkg/test-nic_perf_router/hash index 367e1ca172..639db367b7 100644 --- a/repos/os/recipes/pkg/test-nic_perf_router/hash +++ b/repos/os/recipes/pkg/test-nic_perf_router/hash @@ -1 +1 @@ -2022-11-16 26a5a07a842aac33083fa54033cc8fb7db8e49a8 +2022-11-28 689ba3f308befbb408806ab91155c40b3c52705a diff --git a/repos/os/recipes/pkg/test-part_block_gpt/hash b/repos/os/recipes/pkg/test-part_block_gpt/hash index 0ba232e9ee..b4395c074c 100644 --- a/repos/os/recipes/pkg/test-part_block_gpt/hash +++ b/repos/os/recipes/pkg/test-part_block_gpt/hash @@ -1 +1 @@ -2022-11-16 5c7ef5981152d352e5cebbc1439e4cc7e2225719 +2022-11-28 144a933973718abdeb95a20f091c8b2e39a710fb diff --git a/repos/os/recipes/pkg/test-part_block_mbr/hash b/repos/os/recipes/pkg/test-part_block_mbr/hash index df5868f9e3..fe139f9248 100644 --- a/repos/os/recipes/pkg/test-part_block_mbr/hash +++ b/repos/os/recipes/pkg/test-part_block_mbr/hash @@ -1 +1 @@ -2022-11-16 f15d2655c625c3343e2fab8eec1022240bd4b902 +2022-11-28 1b525e092104187461dd47d7e6efa1ef8938e005 diff --git a/repos/os/recipes/pkg/test-ram_fs_chunk/hash b/repos/os/recipes/pkg/test-ram_fs_chunk/hash index 94fdf4df6e..9d349aeaad 100644 --- a/repos/os/recipes/pkg/test-ram_fs_chunk/hash +++ b/repos/os/recipes/pkg/test-ram_fs_chunk/hash @@ -1 +1 @@ -2022-11-16 390a1901875de9652db8e828bc151e0880e27fc2 +2022-11-28 096e8bd0a5effe423cb8fad4c9f451c3091dde33 diff --git a/repos/os/recipes/pkg/test-read_only_rom/hash b/repos/os/recipes/pkg/test-read_only_rom/hash index 2c4cb1413f..d8be2ed7a8 100644 --- a/repos/os/recipes/pkg/test-read_only_rom/hash +++ b/repos/os/recipes/pkg/test-read_only_rom/hash @@ -1 +1 @@ -2022-11-16 50c02ceaa3c0715aeab52548840741f172cc29bd +2022-11-28 122128ea2a20bbe898a816d1b1bcf4bfb2432b83 diff --git a/repos/os/recipes/pkg/test-report_rom/hash b/repos/os/recipes/pkg/test-report_rom/hash index 6ecb41af5e..c95cd20de2 100644 --- a/repos/os/recipes/pkg/test-report_rom/hash +++ b/repos/os/recipes/pkg/test-report_rom/hash @@ -1 +1 @@ -2022-11-16 68baa0d001a7a37a4c37e77f6ff8864e11d5d974 +2022-11-28 402bb41943eccc87cfd1cf7ee81a3d0b8cbba224 diff --git a/repos/os/recipes/pkg/test-resource_request/hash b/repos/os/recipes/pkg/test-resource_request/hash index 98f714008a..85210fa629 100644 --- a/repos/os/recipes/pkg/test-resource_request/hash +++ b/repos/os/recipes/pkg/test-resource_request/hash @@ -1 +1 @@ -2022-11-16 9c53aab0796b2e9a6764a653fa87d47de75b48ca +2022-11-28 4f1b9aea7d0293bde70b5158d14e1838d8015dea diff --git a/repos/os/recipes/pkg/test-resource_yield/hash b/repos/os/recipes/pkg/test-resource_yield/hash index 60ce004bc0..2b4adcc47c 100644 --- a/repos/os/recipes/pkg/test-resource_yield/hash +++ b/repos/os/recipes/pkg/test-resource_yield/hash @@ -1 +1 @@ -2022-11-16 337638458610b37fd1cbc95e9018a1f0f185c6db +2022-11-28 7480c32094f0b27a033ffa555b4ab2619b333adc diff --git a/repos/os/recipes/pkg/test-rom_filter/hash b/repos/os/recipes/pkg/test-rom_filter/hash index e2bdea437d..01f1b1948d 100644 --- a/repos/os/recipes/pkg/test-rom_filter/hash +++ b/repos/os/recipes/pkg/test-rom_filter/hash @@ -1 +1 @@ -2022-11-16 32062a9cd00649fa83021ec4335c319a80f9cee8 +2022-11-28 95ba076dda8fde536052024818549816c4c4b2c2 diff --git a/repos/os/recipes/pkg/test-rtc/hash b/repos/os/recipes/pkg/test-rtc/hash index 87d9159a13..65e9701ce4 100644 --- a/repos/os/recipes/pkg/test-rtc/hash +++ b/repos/os/recipes/pkg/test-rtc/hash @@ -1 +1 @@ -2022-11-16 81160e436878caaba4e6b70b393fe2b675785d3d +2022-11-28 4712d9ee8d4cdad45cf9234825e08b9429e147f2 diff --git a/repos/os/recipes/pkg/test-sandbox/hash b/repos/os/recipes/pkg/test-sandbox/hash index ad0c0c1a78..c0cab5931e 100644 --- a/repos/os/recipes/pkg/test-sandbox/hash +++ b/repos/os/recipes/pkg/test-sandbox/hash @@ -1 +1 @@ -2022-11-16 9a7150329c3362e9621dad6ed4d3a8c56af92fb8 +2022-11-28 c104dd07b6231a39c5731dc25094fae519803103 diff --git a/repos/os/recipes/pkg/test-signal/hash b/repos/os/recipes/pkg/test-signal/hash index 495a7177c7..0ba15245ee 100644 --- a/repos/os/recipes/pkg/test-signal/hash +++ b/repos/os/recipes/pkg/test-signal/hash @@ -1 +1 @@ -2022-11-16 695e66fd3e651207f8408c3e1723fea2545a7fb4 +2022-11-28 dd32bfc05f8b701b6ff373c3f30f013503aa411b diff --git a/repos/os/recipes/pkg/test-slab/hash b/repos/os/recipes/pkg/test-slab/hash index ab427d450d..8dde5550eb 100644 --- a/repos/os/recipes/pkg/test-slab/hash +++ b/repos/os/recipes/pkg/test-slab/hash @@ -1 +1 @@ -2022-11-16 7d93bfb227cb187627b193243268cb3e2d539a0c +2022-11-28 256a36d8b5f936424a8b8b722a34e3c392841f34 diff --git a/repos/os/recipes/pkg/test-terminal_crosslink/hash b/repos/os/recipes/pkg/test-terminal_crosslink/hash index c0b776ae7d..ea5ec46a12 100644 --- a/repos/os/recipes/pkg/test-terminal_crosslink/hash +++ b/repos/os/recipes/pkg/test-terminal_crosslink/hash @@ -1 +1 @@ -2022-11-16 1353ad332949b3b635f44c54e3abec4b5d8bc60a +2022-11-28 d837989767a9c064a8fcb70f4ec1ffe5eaa68f9e diff --git a/repos/os/recipes/pkg/test-trace/hash b/repos/os/recipes/pkg/test-trace/hash index 6b42d9bfe3..8268c2098a 100644 --- a/repos/os/recipes/pkg/test-trace/hash +++ b/repos/os/recipes/pkg/test-trace/hash @@ -1 +1 @@ -2022-11-16 038f27f48d961bdbd1def864dd9ff1841ee2b9b8 +2022-11-28 7d5173a490930245f6a337de912df2c1e2eb0f9d diff --git a/repos/os/recipes/pkg/test-trace_buffer/hash b/repos/os/recipes/pkg/test-trace_buffer/hash index ddb35bfd5c..96b61a57a8 100644 --- a/repos/os/recipes/pkg/test-trace_buffer/hash +++ b/repos/os/recipes/pkg/test-trace_buffer/hash @@ -1 +1 @@ -2022-11-16 9c4d15e2f509218dc2b244d5a40517184be74f63 +2022-11-28 73f8875b00baf1b603ba5f323ed0776b335f577f diff --git a/repos/os/recipes/pkg/test-trace_logger/hash b/repos/os/recipes/pkg/test-trace_logger/hash index 9ae41e3e2b..a56eefddb4 100644 --- a/repos/os/recipes/pkg/test-trace_logger/hash +++ b/repos/os/recipes/pkg/test-trace_logger/hash @@ -1 +1 @@ -2022-11-16 207941f91b7ce9b257c579e9fb347e56eed91c46 +2022-11-28 bfa111a932859761875fc3d7327b07198cb59d70 diff --git a/repos/os/recipes/pkg/test-utf8/hash b/repos/os/recipes/pkg/test-utf8/hash index ffd91a2ec5..6d2690e65b 100644 --- a/repos/os/recipes/pkg/test-utf8/hash +++ b/repos/os/recipes/pkg/test-utf8/hash @@ -1 +1 @@ -2022-11-16 6fa8d26e20e8ee9dcc39972b3b3f2b8bef7504e8 +2022-11-28 7555d3b09b7e62e9c9a6f820bb57e6da69df3ca1 diff --git a/repos/os/recipes/pkg/test-vfs_block/hash b/repos/os/recipes/pkg/test-vfs_block/hash index 77fe6304f6..7c2bef3582 100644 --- a/repos/os/recipes/pkg/test-vfs_block/hash +++ b/repos/os/recipes/pkg/test-vfs_block/hash @@ -1 +1 @@ -2022-11-16 991d2c1959fed3e96b4195281aba2a36ed642b8a +2022-11-28 38ecf777af467008a3df8d2c7deb8af974ff7d56 diff --git a/repos/os/recipes/pkg/test-vfs_stress_fs/hash b/repos/os/recipes/pkg/test-vfs_stress_fs/hash index 5b1c3e996d..e5eb62328d 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_fs/hash +++ b/repos/os/recipes/pkg/test-vfs_stress_fs/hash @@ -1 +1 @@ -2022-11-16 9ac88fbdf30e2fed2024f278ed3c039cfb4f572f +2022-11-28 bbdc4f370ccd4a422b67fea47011f3efccb46d5d diff --git a/repos/os/recipes/pkg/test-vfs_stress_ram/hash b/repos/os/recipes/pkg/test-vfs_stress_ram/hash index cfb1c0064a..f0958396a3 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_ram/hash +++ b/repos/os/recipes/pkg/test-vfs_stress_ram/hash @@ -1 +1 @@ -2022-11-16 d8e1bfb419156213e54afff34569be4f21f500d4 +2022-11-28 62eb327427ea898c32e38c96a46308e678a040b7 diff --git a/repos/os/recipes/pkg/test-weak_ptr/hash b/repos/os/recipes/pkg/test-weak_ptr/hash index a88397dd83..c8cf7aabfe 100644 --- a/repos/os/recipes/pkg/test-weak_ptr/hash +++ b/repos/os/recipes/pkg/test-weak_ptr/hash @@ -1 +1 @@ -2022-11-16 740dc6a33678b5fbd2bde64849c2fd731f6c8676 +2022-11-28 935fc19c15ea33fc935e993ebc5a20ab7bd2dd14 diff --git a/repos/os/recipes/pkg/trace_logger/hash b/repos/os/recipes/pkg/trace_logger/hash index 48f2a18caa..f3f7efdcbe 100644 --- a/repos/os/recipes/pkg/trace_logger/hash +++ b/repos/os/recipes/pkg/trace_logger/hash @@ -1 +1 @@ -2022-11-16 f1a5d7dcc525c994b25c7cf53a54e10f561a7a62 +2022-11-28 3629e6b044af7f0d24411d5845a9c8261786ab43 diff --git a/repos/os/recipes/pkg/vfs/hash b/repos/os/recipes/pkg/vfs/hash index 57984d1648..3810cdb318 100644 --- a/repos/os/recipes/pkg/vfs/hash +++ b/repos/os/recipes/pkg/vfs/hash @@ -1 +1 @@ -2022-11-16 cc6f3d5d0d2a80bab13edb2f504d8e765925c70b +2022-11-28 2e215711da551daff1387fc66916a92d270e143a diff --git a/repos/os/recipes/pkg/vfs_block/hash b/repos/os/recipes/pkg/vfs_block/hash index b73c8c67e1..d1a7b220da 100644 --- a/repos/os/recipes/pkg/vfs_block/hash +++ b/repos/os/recipes/pkg/vfs_block/hash @@ -1 +1 @@ -2022-11-16 6cface1530aaa0c48e66fcdabf7d135f70709ac2 +2022-11-28 d47e32b129b59904cb9a3c773799908c234f6cbe diff --git a/repos/os/recipes/raw/drivers_interactive-pc/hash b/repos/os/recipes/raw/drivers_interactive-pc/hash index 21c7677dfe..5c47fd4bec 100644 --- a/repos/os/recipes/raw/drivers_interactive-pc/hash +++ b/repos/os/recipes/raw/drivers_interactive-pc/hash @@ -1 +1 @@ -2022-10-11 551db516e914069b3d83b7649170c5b2bb2e5f43 +2022-11-28 f8d55fceb9149218ed0f729483e064b815d77da3 diff --git a/repos/os/recipes/src/acpi_drv/hash b/repos/os/recipes/src/acpi_drv/hash index 7901e77585..7b7821b4a7 100644 --- a/repos/os/recipes/src/acpi_drv/hash +++ b/repos/os/recipes/src/acpi_drv/hash @@ -1 +1 @@ -2022-11-16 f7c0ededda80a908b49e241b53d474c062d40de7 +2022-11-28 025741266235a6bf83f527095f2b1d260419f08a diff --git a/repos/os/recipes/src/ahci_drv/hash b/repos/os/recipes/src/ahci_drv/hash index 6713754a4f..3cb0011efa 100644 --- a/repos/os/recipes/src/ahci_drv/hash +++ b/repos/os/recipes/src/ahci_drv/hash @@ -1 +1 @@ -2022-11-16 42eee867bd3080e8fe56eb4aa9bfde974868d59a +2022-11-28 15147e9b30313af51fafbd7dcfb36a1319949373 diff --git a/repos/os/recipes/src/black_hole/hash b/repos/os/recipes/src/black_hole/hash index c8e74510c3..3b130b2a79 100644 --- a/repos/os/recipes/src/black_hole/hash +++ b/repos/os/recipes/src/black_hole/hash @@ -1 +1 @@ -2022-11-16 9c0bfaecc97a604a5b1876bfa2c2f3be6ea49903 +2022-11-28 622f47dfde13c71d0993223438615beaa49a6cc7 diff --git a/repos/os/recipes/src/block_tester/hash b/repos/os/recipes/src/block_tester/hash index bdb4810409..2de9ccfeae 100644 --- a/repos/os/recipes/src/block_tester/hash +++ b/repos/os/recipes/src/block_tester/hash @@ -1 +1 @@ -2022-11-16 1694f29a5914f87b580f154839d68bb0faa6deb2 +2022-11-28 b03ab089beb7fb04f788c7c999d2cb89d312134e diff --git a/repos/os/recipes/src/boot_fb_drv/hash b/repos/os/recipes/src/boot_fb_drv/hash index 12cdd1bc58..d4ee30e701 100644 --- a/repos/os/recipes/src/boot_fb_drv/hash +++ b/repos/os/recipes/src/boot_fb_drv/hash @@ -1 +1 @@ -2022-11-16 72d221a13c9d334764c27cf7aac907f1d8d2b228 +2022-11-28 161d87c017034c828eb748758b75215f284d8aff diff --git a/repos/os/recipes/src/cached_fs_rom/hash b/repos/os/recipes/src/cached_fs_rom/hash index 3d6c96fc80..98f993e098 100644 --- a/repos/os/recipes/src/cached_fs_rom/hash +++ b/repos/os/recipes/src/cached_fs_rom/hash @@ -1 +1 @@ -2022-11-16 6a6f5a91b008adba810f005f76230cb8171710cc +2022-11-28 2e5fc01d51e3c057f642673e2e7c34d19be60971 diff --git a/repos/os/recipes/src/chroot/hash b/repos/os/recipes/src/chroot/hash index 2b110f52af..8eaac6f3dc 100644 --- a/repos/os/recipes/src/chroot/hash +++ b/repos/os/recipes/src/chroot/hash @@ -1 +1 @@ -2022-11-16 0dd7d091d0ad212c5bc72725939b45a70e69ecf0 +2022-11-28 49f41209a3bb7aa981badff69802c8f1f22d73e0 diff --git a/repos/os/recipes/src/clipboard/hash b/repos/os/recipes/src/clipboard/hash index 6a80a5dbb0..9d28b78c35 100644 --- a/repos/os/recipes/src/clipboard/hash +++ b/repos/os/recipes/src/clipboard/hash @@ -1 +1 @@ -2022-11-16 37a72aa0f666a37c0a07c119a3ae929070ad3e8e +2022-11-28 f3eaa7925290309ba2238b6c1188ff56586999ac diff --git a/repos/os/recipes/src/cpu_balancer/hash b/repos/os/recipes/src/cpu_balancer/hash index c6801e28a8..b6e8a551dd 100644 --- a/repos/os/recipes/src/cpu_balancer/hash +++ b/repos/os/recipes/src/cpu_balancer/hash @@ -1 +1 @@ -2022-11-16 1be7c7edeb1287e9994c07942d63c695eb6152be +2022-11-28 9666528d4811e48eb5dc3e4ea3df14f18ca7bce8 diff --git a/repos/os/recipes/src/cpu_burner/hash b/repos/os/recipes/src/cpu_burner/hash index bc06739200..6eeda946df 100644 --- a/repos/os/recipes/src/cpu_burner/hash +++ b/repos/os/recipes/src/cpu_burner/hash @@ -1 +1 @@ -2022-11-16 4a16f72156c04c10b83a4020720ed0ecaa71c3e7 +2022-11-28 7c28fc0411f4bcc3f61eaa9961f377fb5f487551 diff --git a/repos/os/recipes/src/dummy/hash b/repos/os/recipes/src/dummy/hash index d3453d6868..648ac1ccaf 100644 --- a/repos/os/recipes/src/dummy/hash +++ b/repos/os/recipes/src/dummy/hash @@ -1 +1 @@ -2022-11-16 7716d42f6e8c8de78c6e88743836dfa98e13c904 +2022-11-28 410aa3d382c657eed516ddd37b9623edec5f74c0 diff --git a/repos/os/recipes/src/dummy_rtc_drv/hash b/repos/os/recipes/src/dummy_rtc_drv/hash index 675f45fbc9..b2d091c8aa 100644 --- a/repos/os/recipes/src/dummy_rtc_drv/hash +++ b/repos/os/recipes/src/dummy_rtc_drv/hash @@ -1 +1 @@ -2022-11-16 9deb68e42dd4a3d17ad8c3afbcdf1b39eb6e3eb3 +2022-11-28 9935be39ec2e78e1c36997c056bdcb6c6a070e32 diff --git a/repos/os/recipes/src/dynamic_rom/hash b/repos/os/recipes/src/dynamic_rom/hash index 745e5e37b3..2c54314357 100644 --- a/repos/os/recipes/src/dynamic_rom/hash +++ b/repos/os/recipes/src/dynamic_rom/hash @@ -1 +1 @@ -2022-11-16 975a4079b87a3a9ec7ed2559a860fd477094a2f4 +2022-11-28 484d80dea72ae531ef8a8c9eb03a43c7335356c4 diff --git a/repos/os/recipes/src/event_filter/hash b/repos/os/recipes/src/event_filter/hash index d057b247c3..b162132a97 100644 --- a/repos/os/recipes/src/event_filter/hash +++ b/repos/os/recipes/src/event_filter/hash @@ -1 +1 @@ -2022-11-16 cef34a4386c92759d2a9f5b5716ce6d5aac8c540 +2022-11-28 e6bd1c07ab2ad63ecd98622852f8f033316d6fa5 diff --git a/repos/os/recipes/src/fb_sdl/hash b/repos/os/recipes/src/fb_sdl/hash index e5792d48c5..794eb4d290 100644 --- a/repos/os/recipes/src/fb_sdl/hash +++ b/repos/os/recipes/src/fb_sdl/hash @@ -1 +1 @@ -2022-11-16 4e1ef82cc38cc920f282cea3d2f1645b9064f93c +2022-11-28 68edf47d303c88a1e4c0bdd5940e3562386dd633 diff --git a/repos/os/recipes/src/fs_report/hash b/repos/os/recipes/src/fs_report/hash index d3f257153b..969b8188a0 100644 --- a/repos/os/recipes/src/fs_report/hash +++ b/repos/os/recipes/src/fs_report/hash @@ -1 +1 @@ -2022-11-16 74ce0dfdc20b4eff12e176300b1f6686eb7992ca +2022-11-28 5e1b7f3b8c5962d53122090bdcb0ee1395add5ad diff --git a/repos/os/recipes/src/fs_rom/hash b/repos/os/recipes/src/fs_rom/hash index e3ff0d74eb..ab922ed8b6 100644 --- a/repos/os/recipes/src/fs_rom/hash +++ b/repos/os/recipes/src/fs_rom/hash @@ -1 +1 @@ -2022-11-16 4887e5c5a33845f325d6cace9594d687341f154e +2022-11-28 b4e0d5a5d55f4c00a360a7824289eb257a7d3247 diff --git a/repos/os/recipes/src/global_keys_handler/hash b/repos/os/recipes/src/global_keys_handler/hash index 400a176207..b4ccf0ea85 100644 --- a/repos/os/recipes/src/global_keys_handler/hash +++ b/repos/os/recipes/src/global_keys_handler/hash @@ -1 +1 @@ -2022-11-16 c8ea0393c538667842d500f7102956d58f7d27f3 +2022-11-28 8214a36ddc856b8764e145faeb85d1dec794e37c diff --git a/repos/os/recipes/src/gui_fb/hash b/repos/os/recipes/src/gui_fb/hash index 78fc8ec609..de2a0f79f6 100644 --- a/repos/os/recipes/src/gui_fb/hash +++ b/repos/os/recipes/src/gui_fb/hash @@ -1 +1 @@ -2022-11-16 eabe1def1836152ee52406493be1929e135525fe +2022-11-28 d67df878a17fd5331ccdbfdbbcd7f4e49c58dc0a diff --git a/repos/os/recipes/src/init/hash b/repos/os/recipes/src/init/hash index e107c76913..bedfc0dd85 100644 --- a/repos/os/recipes/src/init/hash +++ b/repos/os/recipes/src/init/hash @@ -1 +1 @@ -2022-11-16 be46e7714a48962b7570660fcafbd9ce6cd21249 +2022-11-28 8f77041c5000c8c37f27413791bbdfeb72e1efa4 diff --git a/repos/os/recipes/src/input_event_bridge/hash b/repos/os/recipes/src/input_event_bridge/hash index 71967fd4cc..c653528e9b 100644 --- a/repos/os/recipes/src/input_event_bridge/hash +++ b/repos/os/recipes/src/input_event_bridge/hash @@ -1 +1 @@ -2022-11-16 7142a76650e6e25d3f9325832249f091ad145294 +2022-11-28 f8453049de0931646ff9f49ef3de9320bc195370 diff --git a/repos/os/recipes/src/intel_gpu_drv/hash b/repos/os/recipes/src/intel_gpu_drv/hash index aacf14bb3d..dab9d984e8 100644 --- a/repos/os/recipes/src/intel_gpu_drv/hash +++ b/repos/os/recipes/src/intel_gpu_drv/hash @@ -1 +1 @@ -2022-11-16 86eca01ca5ed4d9eaf31f061f91cef16a7eba00e +2022-11-28 5fddfe0fe451f926dd71254b4f65cd29a9f01e4e diff --git a/repos/os/recipes/src/lan9118_nic_drv/hash b/repos/os/recipes/src/lan9118_nic_drv/hash index 575543b3ba..3577c50455 100644 --- a/repos/os/recipes/src/lan9118_nic_drv/hash +++ b/repos/os/recipes/src/lan9118_nic_drv/hash @@ -1 +1 @@ -2022-11-16 cff1a8d8268bbf6d1742a976847049fd6fbfbf94 +2022-11-28 dde6aec8e47f38fb0abafb99f39eff970631a23a diff --git a/repos/os/recipes/src/linux_nic_drv/hash b/repos/os/recipes/src/linux_nic_drv/hash index 3ff77843cb..514a7a1188 100644 --- a/repos/os/recipes/src/linux_nic_drv/hash +++ b/repos/os/recipes/src/linux_nic_drv/hash @@ -1 +1 @@ -2022-11-16 d74c8dd70eaf3e3c55967d2b8c05e850be8101f3 +2022-11-28 b030396deab1a531a684b10b238bd7db9409aa93 diff --git a/repos/os/recipes/src/linux_rtc_drv/hash b/repos/os/recipes/src/linux_rtc_drv/hash index adaefe3d1d..e9561d0db9 100644 --- a/repos/os/recipes/src/linux_rtc_drv/hash +++ b/repos/os/recipes/src/linux_rtc_drv/hash @@ -1 +1 @@ -2022-11-16 bef05989be2bc27c0b327fb2cefcba259bc1c735 +2022-11-28 b71ccbbf47d074f563909c905607d8bcdcb7ed29 diff --git a/repos/os/recipes/src/loader/hash b/repos/os/recipes/src/loader/hash index 5446730ce9..f9d258a7c3 100644 --- a/repos/os/recipes/src/loader/hash +++ b/repos/os/recipes/src/loader/hash @@ -1 +1 @@ -2022-11-16 808654f41ea7231ea64f6348c73d9840a35102d7 +2022-11-28 61275abd691ef544bd6c8ba04f10a59aded9e1cc diff --git a/repos/os/recipes/src/log_core/hash b/repos/os/recipes/src/log_core/hash index a0fa11f801..44ab6ef8e4 100644 --- a/repos/os/recipes/src/log_core/hash +++ b/repos/os/recipes/src/log_core/hash @@ -1 +1 @@ -2022-11-16 8855930bf31217e105d90139fde16df73ae02aa3 +2022-11-28 56fbe756a33fdf18204d31f035286cca6bf56210 diff --git a/repos/os/recipes/src/log_terminal/hash b/repos/os/recipes/src/log_terminal/hash index 23c258045e..181d6f280a 100644 --- a/repos/os/recipes/src/log_terminal/hash +++ b/repos/os/recipes/src/log_terminal/hash @@ -1 +1 @@ -2022-11-16 c26724a2d43f25cc96f1c707b56fde2c839fd34b +2022-11-28 9170e7d664a1222966f60d1c8691c340d8ecc3d8 diff --git a/repos/os/recipes/src/lx_block/hash b/repos/os/recipes/src/lx_block/hash index b8d6eb92d6..2e37ceedea 100644 --- a/repos/os/recipes/src/lx_block/hash +++ b/repos/os/recipes/src/lx_block/hash @@ -1 +1 @@ -2022-11-16 544f4b1a9d8fb1749590b672a8143f8bf94a99a7 +2022-11-28 941a772f04ada4054707256308c0451f531ebb35 diff --git a/repos/os/recipes/src/lx_fs/hash b/repos/os/recipes/src/lx_fs/hash index 4862f35b84..6085530512 100644 --- a/repos/os/recipes/src/lx_fs/hash +++ b/repos/os/recipes/src/lx_fs/hash @@ -1 +1 @@ -2022-11-16 a3820f9344ee112f6d964dce4eb3ed0a8ceab35a +2022-11-28 66284ed0c4d43eb9eb43a3215181434da83c7988 diff --git a/repos/os/recipes/src/mixer/hash b/repos/os/recipes/src/mixer/hash index a946876ff1..5dc6159245 100644 --- a/repos/os/recipes/src/mixer/hash +++ b/repos/os/recipes/src/mixer/hash @@ -1 +1 @@ -2022-11-16 54d0296a6c583b23fbeb245cea09a459dd37ad4f +2022-11-28 95bec403e652469b6ce20640e11cd9ab38b21c37 diff --git a/repos/os/recipes/src/nic_bridge/hash b/repos/os/recipes/src/nic_bridge/hash index 1265369149..6dcd09321c 100644 --- a/repos/os/recipes/src/nic_bridge/hash +++ b/repos/os/recipes/src/nic_bridge/hash @@ -1 +1 @@ -2022-11-16 e5ee91c09ad99ad7c8f070976ef7453153ad39ec +2022-11-28 5a889cf9ef7575529ea13cae43834d77219bb7da diff --git a/repos/os/recipes/src/nic_loopback/hash b/repos/os/recipes/src/nic_loopback/hash index 096bc77a57..c2b6e34ea8 100644 --- a/repos/os/recipes/src/nic_loopback/hash +++ b/repos/os/recipes/src/nic_loopback/hash @@ -1 +1 @@ -2022-11-16 999bb6900324b1902454210194c56d0ef26b0956 +2022-11-28 b2d483f644620a457d151fc17a43a7974ea7a454 diff --git a/repos/os/recipes/src/nic_perf/hash b/repos/os/recipes/src/nic_perf/hash index 4cac38fa29..c24755ae6a 100644 --- a/repos/os/recipes/src/nic_perf/hash +++ b/repos/os/recipes/src/nic_perf/hash @@ -1 +1 @@ -2022-11-16 5fff140f05f1981ac4a0d59c4a50a546f45cd0e2 +2022-11-28 c045dfb88f1445cc93b926b219d5f5b9c987aa1b diff --git a/repos/os/recipes/src/nic_router/hash b/repos/os/recipes/src/nic_router/hash index d7fe041e4e..04c35e6851 100644 --- a/repos/os/recipes/src/nic_router/hash +++ b/repos/os/recipes/src/nic_router/hash @@ -1 +1 @@ -2022-11-16 e8db3112d8763b7e6b215c9c7a359610a8f8f042 +2022-11-28 9786a043569fe1c84c900a18ecd6e1c8cb196fcd diff --git a/repos/os/recipes/src/nit_focus/hash b/repos/os/recipes/src/nit_focus/hash index 859a8c31df..07298c74e1 100644 --- a/repos/os/recipes/src/nit_focus/hash +++ b/repos/os/recipes/src/nit_focus/hash @@ -1 +1 @@ -2022-11-16 58ea820d2cb00233535f248cd8d517e09e8ab9c1 +2022-11-28 06aad8d63d52151c81f73b1a15eb4c570ba027af diff --git a/repos/os/recipes/src/nitpicker/hash b/repos/os/recipes/src/nitpicker/hash index 6a86b2897d..510ae33306 100644 --- a/repos/os/recipes/src/nitpicker/hash +++ b/repos/os/recipes/src/nitpicker/hash @@ -1 +1 @@ -2022-11-16 b4e5b18553c1497d16e8d8ebfb4800a609a18cd2 +2022-11-28 eedf2b6ccffcd6c40a08c0f230971ca17eae5f52 diff --git a/repos/os/recipes/src/nvme_drv/hash b/repos/os/recipes/src/nvme_drv/hash index 8f43d48416..d989e3789b 100644 --- a/repos/os/recipes/src/nvme_drv/hash +++ b/repos/os/recipes/src/nvme_drv/hash @@ -1 +1 @@ -2022-11-16 eb8810a4b3c35be517561b5aeec2df146f24b684 +2022-11-28 551ba8ea43fd5605c28b59048919388459fcc9f3 diff --git a/repos/os/recipes/src/part_block/hash b/repos/os/recipes/src/part_block/hash index 6dacb155f7..c3e12c5f13 100644 --- a/repos/os/recipes/src/part_block/hash +++ b/repos/os/recipes/src/part_block/hash @@ -1 +1 @@ -2022-11-16 87b094e45d1c668f46ecc808ccd8fbbbab3b4739 +2022-11-28 8762d6bc14fe3c51b763903eb0177e698ee4fadc diff --git a/repos/os/recipes/src/pbxa9_drivers/hash b/repos/os/recipes/src/pbxa9_drivers/hash index 890194cd22..8f79fef4b7 100644 --- a/repos/os/recipes/src/pbxa9_drivers/hash +++ b/repos/os/recipes/src/pbxa9_drivers/hash @@ -1 +1 @@ -2022-11-16 dca6c21cf88e6870db0b5d3f3cce674a5c7fbde0 +2022-11-28 3b2a089de958f2d3040c27b67156bed1def60d05 diff --git a/repos/os/recipes/src/pci_decode/hash b/repos/os/recipes/src/pci_decode/hash index 8723dd9835..17ad75ec26 100644 --- a/repos/os/recipes/src/pci_decode/hash +++ b/repos/os/recipes/src/pci_decode/hash @@ -1 +1 @@ -2022-11-16 7183f9f8b0ed4aa69395a15849edaed80c02c857 +2022-11-28 e3d840f05ebd35536e9b1f1d60aba735a5546085 diff --git a/repos/os/recipes/src/platform_drv/hash b/repos/os/recipes/src/platform_drv/hash index e550b42ea3..c88aa0ce81 100644 --- a/repos/os/recipes/src/platform_drv/hash +++ b/repos/os/recipes/src/platform_drv/hash @@ -1 +1 @@ -2022-11-16 032060e97c17cb2a0d9e6e229f0ca6c69ef21615 +2022-11-28 53fae319c42ba220f46d56058fd597107e43613d diff --git a/repos/os/recipes/src/ps2_drv/hash b/repos/os/recipes/src/ps2_drv/hash index 4214a26918..f05f4e10b5 100644 --- a/repos/os/recipes/src/ps2_drv/hash +++ b/repos/os/recipes/src/ps2_drv/hash @@ -1 +1 @@ -2022-11-16 fa55b674b2afbedc5ad11c03e240495cda1000b0 +2022-11-28 b57176ef25d9ba9b16dc88b3a97703f32aeff096 diff --git a/repos/os/recipes/src/report_rom/hash b/repos/os/recipes/src/report_rom/hash index dbd516a212..3497f5e1fb 100644 --- a/repos/os/recipes/src/report_rom/hash +++ b/repos/os/recipes/src/report_rom/hash @@ -1 +1 @@ -2022-11-16 417ef148fb5c72c9689ea61c7ca3dffcd92d81c5 +2022-11-28 22eb520d3c94f25d4a49f5973734d39ecb9b2d3c diff --git a/repos/os/recipes/src/rom_filter/hash b/repos/os/recipes/src/rom_filter/hash index 795ae49b57..edeeea1b26 100644 --- a/repos/os/recipes/src/rom_filter/hash +++ b/repos/os/recipes/src/rom_filter/hash @@ -1 +1 @@ -2022-11-16 28ebc095492d5fca03b335803f54298ff398f3c1 +2022-11-28 f6bf7df82f7d837db4690425d35e9b2fe3e49a2f diff --git a/repos/os/recipes/src/rom_logger/hash b/repos/os/recipes/src/rom_logger/hash index 7b23fa9990..838084c9f8 100644 --- a/repos/os/recipes/src/rom_logger/hash +++ b/repos/os/recipes/src/rom_logger/hash @@ -1 +1 @@ -2022-10-11 b207357854c335b2c1081be7c583f04930c539ef +2022-11-28 8ac932d53147d472f0d8e3a7c0762596e4df7c7e diff --git a/repos/os/recipes/src/rom_reporter/hash b/repos/os/recipes/src/rom_reporter/hash index ab28caf0a1..264a050590 100644 --- a/repos/os/recipes/src/rom_reporter/hash +++ b/repos/os/recipes/src/rom_reporter/hash @@ -1 +1 @@ -2022-11-16 ec4eff34ffd86fe6ed05128a9c52f34f8ecdf803 +2022-11-28 bdfa513e062e668aa37e61243a06d46f6bcb020b diff --git a/repos/os/recipes/src/rom_to_file/hash b/repos/os/recipes/src/rom_to_file/hash index 7201e9a5a2..51cb8bd781 100644 --- a/repos/os/recipes/src/rom_to_file/hash +++ b/repos/os/recipes/src/rom_to_file/hash @@ -1 +1 @@ -2022-11-16 217eacc4e1bc5612eaac1db8e166fd02c8c40132 +2022-11-28 5366c008f1cfa5a6e14785cac03cf85e83110c31 diff --git a/repos/os/recipes/src/rtc_drv/hash b/repos/os/recipes/src/rtc_drv/hash index 01f45be4b4..a78975262a 100644 --- a/repos/os/recipes/src/rtc_drv/hash +++ b/repos/os/recipes/src/rtc_drv/hash @@ -1 +1 @@ -2022-11-16 68b95cd09e62ec053f655b2fabd4ab7773501b52 +2022-11-28 3d0044f20ad6e8d72c879a23dab4d11a0caf6e00 diff --git a/repos/os/recipes/src/sandbox/hash b/repos/os/recipes/src/sandbox/hash index 208cea54e9..dd0fb8c92b 100644 --- a/repos/os/recipes/src/sandbox/hash +++ b/repos/os/recipes/src/sandbox/hash @@ -1 +1 @@ -2022-11-16 1ddc82237897e8fd1bb621112739063607d53794 +2022-11-28 e6cc4053c231b66134b1e7837371dc8a75d659a5 diff --git a/repos/os/recipes/src/sequence/hash b/repos/os/recipes/src/sequence/hash index 91db6aeacd..d68412e80b 100644 --- a/repos/os/recipes/src/sequence/hash +++ b/repos/os/recipes/src/sequence/hash @@ -1 +1 @@ -2022-11-16 084dae7a6695f793205cc72a02622d2c91bfb509 +2022-11-28 c9d4ed95e98df821e04b0459b0b41a271da12eda diff --git a/repos/os/recipes/src/shim/hash b/repos/os/recipes/src/shim/hash index 7f7348d333..5c17cb4d56 100644 --- a/repos/os/recipes/src/shim/hash +++ b/repos/os/recipes/src/shim/hash @@ -1 +1 @@ -2022-10-11 c19f6134a15baf12d7c14f77ee8204a19bd1d2af +2022-11-28 56924223dec6fa302fdaa984101dd4f21ba2597c diff --git a/repos/os/recipes/src/terminal_crosslink/hash b/repos/os/recipes/src/terminal_crosslink/hash index a1e924090f..b9a035eceb 100644 --- a/repos/os/recipes/src/terminal_crosslink/hash +++ b/repos/os/recipes/src/terminal_crosslink/hash @@ -1 +1 @@ -2022-11-16 8b89f055caf9f0ad0a6d7a25a272bb5ce9e98f42 +2022-11-28 34a77c1408d73fcd88657e8075449fd2e376b342 diff --git a/repos/os/recipes/src/terminal_log/hash b/repos/os/recipes/src/terminal_log/hash index ab327dba50..0fe3ae4e82 100644 --- a/repos/os/recipes/src/terminal_log/hash +++ b/repos/os/recipes/src/terminal_log/hash @@ -1 +1 @@ -2022-11-16 4a61c707b8add203e74db112b3d3fc0136efbc08 +2022-11-28 bfa0f9f5ef3a86d7c2013d4362c8a5d1a350241a diff --git a/repos/os/recipes/src/test-black_hole/hash b/repos/os/recipes/src/test-black_hole/hash index 247a8755ab..5828a03cc3 100644 --- a/repos/os/recipes/src/test-black_hole/hash +++ b/repos/os/recipes/src/test-black_hole/hash @@ -1 +1 @@ -2022-11-16 fbda522796b584f1ef860c876e04ae322cf38678 +2022-11-28 d8c17df3d79a61c6f0b0a4f56b8c97f345ffa95d diff --git a/repos/os/recipes/src/test-bomb/hash b/repos/os/recipes/src/test-bomb/hash index 21739a2caa..4fef5b6aa2 100644 --- a/repos/os/recipes/src/test-bomb/hash +++ b/repos/os/recipes/src/test-bomb/hash @@ -1 +1 @@ -2022-11-16 ea9d29e54f4dd69219c99d4a6e669ed6a039ae52 +2022-11-28 81fe6404e3160b8683bab4e132fd28081d47be1e diff --git a/repos/os/recipes/src/test-capture/hash b/repos/os/recipes/src/test-capture/hash index 99292521f4..acce899f3e 100644 --- a/repos/os/recipes/src/test-capture/hash +++ b/repos/os/recipes/src/test-capture/hash @@ -1 +1 @@ -2022-11-16 3fd676f043019dd507481fd4f79c4b17f0e9e1af +2022-11-28 241dccca6c5fb64f3d8c250d86e4ecb527ff89a3 diff --git a/repos/os/recipes/src/test-clipboard/hash b/repos/os/recipes/src/test-clipboard/hash index d0061cfbea..7e36f415bd 100644 --- a/repos/os/recipes/src/test-clipboard/hash +++ b/repos/os/recipes/src/test-clipboard/hash @@ -1 +1 @@ -2022-11-16 56defead95063caa35ebc4207976de8d728779c6 +2022-11-28 1df29b71dcf1deda358bb5d44d16e000ed951f49 diff --git a/repos/os/recipes/src/test-dynamic_config/hash b/repos/os/recipes/src/test-dynamic_config/hash index b0af598bd7..ff0c87e3da 100644 --- a/repos/os/recipes/src/test-dynamic_config/hash +++ b/repos/os/recipes/src/test-dynamic_config/hash @@ -1 +1 @@ -2022-11-16 8ed10f9f8c7eae93054fdb8659f6f6b57d94b8bf +2022-11-28 b7f43cb28fc888363b8df925bb90036498ed4adf diff --git a/repos/os/recipes/src/test-fault_detection/hash b/repos/os/recipes/src/test-fault_detection/hash index cf17fc6e1c..6c17c2e210 100644 --- a/repos/os/recipes/src/test-fault_detection/hash +++ b/repos/os/recipes/src/test-fault_detection/hash @@ -1 +1 @@ -2022-11-16 4611f86b20437a85d2396dabb2f15e069658dc40 +2022-11-28 9ad74c62a9e3ac2a9ad0d1dc98f4adb15d7a858b diff --git a/repos/os/recipes/src/test-fs_packet/hash b/repos/os/recipes/src/test-fs_packet/hash index 437550dd56..02aa3bf7c9 100644 --- a/repos/os/recipes/src/test-fs_packet/hash +++ b/repos/os/recipes/src/test-fs_packet/hash @@ -1 +1 @@ -2022-11-16 6638b77cf793c24cb060e965d9cf6a526081cf71 +2022-11-28 d510376089169dfc2a96694f5285df88ffb249e8 diff --git a/repos/os/recipes/src/test-fs_report/hash b/repos/os/recipes/src/test-fs_report/hash index 6029d1d837..744b271bf5 100644 --- a/repos/os/recipes/src/test-fs_report/hash +++ b/repos/os/recipes/src/test-fs_report/hash @@ -1 +1 @@ -2022-11-16 81d9a9795f448a007db159bb49de03c1b59c1e49 +2022-11-28 5deba770c73eed756598e89b56704ab65b76fa88 diff --git a/repos/os/recipes/src/test-immutable_rom/hash b/repos/os/recipes/src/test-immutable_rom/hash index 28743b5ac8..b41a97a442 100644 --- a/repos/os/recipes/src/test-immutable_rom/hash +++ b/repos/os/recipes/src/test-immutable_rom/hash @@ -1 +1 @@ -2022-10-11 a34d8c8bf25e2c2b64abb737853b4c35bc85756b +2022-11-28 f9e4e2c524da153332107882ab2cd9e8a6b9b8ba diff --git a/repos/os/recipes/src/test-init/hash b/repos/os/recipes/src/test-init/hash index d60ce0bcfd..2992b948f9 100644 --- a/repos/os/recipes/src/test-init/hash +++ b/repos/os/recipes/src/test-init/hash @@ -1 +1 @@ -2022-11-16 2da369d3f7263e834428ca0f7d569ab04dc47dc9 +2022-11-28 e368ef50d578fda1b99ab551f7a5b5da3b67f9bf diff --git a/repos/os/recipes/src/test-init_loop/hash b/repos/os/recipes/src/test-init_loop/hash index 7f7b9acd94..425a69ba28 100644 --- a/repos/os/recipes/src/test-init_loop/hash +++ b/repos/os/recipes/src/test-init_loop/hash @@ -1 +1 @@ -2022-11-16 fd40817a4a5f7ac04bcfe94dee2977644d89007f +2022-11-28 bc3f678595d589e1601ca092c03eb160538f07c6 diff --git a/repos/os/recipes/src/test-nic_loopback/hash b/repos/os/recipes/src/test-nic_loopback/hash index bb9c768247..6f3c0ee855 100644 --- a/repos/os/recipes/src/test-nic_loopback/hash +++ b/repos/os/recipes/src/test-nic_loopback/hash @@ -1 +1 @@ -2022-11-16 35269d6f38b1e2de16e09683f6a27d7a1515fd39 +2022-11-28 fa45adc128a035b6f9875b5b8ad59828cae3fd75 diff --git a/repos/os/recipes/src/test-ram_fs_chunk/hash b/repos/os/recipes/src/test-ram_fs_chunk/hash index b1745a0965..784ab0d588 100644 --- a/repos/os/recipes/src/test-ram_fs_chunk/hash +++ b/repos/os/recipes/src/test-ram_fs_chunk/hash @@ -1 +1 @@ -2022-11-16 058c30eff9a6e13c7ccf0bc586be8034b4f4d1a0 +2022-11-28 c222783eee6696a5ccee65120ba5d12946c92525 diff --git a/repos/os/recipes/src/test-report_rom/hash b/repos/os/recipes/src/test-report_rom/hash index 809f536e4e..5c474c366d 100644 --- a/repos/os/recipes/src/test-report_rom/hash +++ b/repos/os/recipes/src/test-report_rom/hash @@ -1 +1 @@ -2022-11-16 d42edb5f8b14b0a3a105501b09c0c3d74b00e786 +2022-11-28 0356a56c43ef4fe063d09c0a118fddeba28ad523 diff --git a/repos/os/recipes/src/test-resource_request/hash b/repos/os/recipes/src/test-resource_request/hash index 6e0525ade1..1b2240b445 100644 --- a/repos/os/recipes/src/test-resource_request/hash +++ b/repos/os/recipes/src/test-resource_request/hash @@ -1 +1 @@ -2022-11-16 866f239ad4f781aeaaa280830d982d0125a9b23e +2022-11-28 dd0b47fc858d4d8a99fe470ec2a363de6b03d073 diff --git a/repos/os/recipes/src/test-resource_yield/hash b/repos/os/recipes/src/test-resource_yield/hash index e18a1f1242..f126999a38 100644 --- a/repos/os/recipes/src/test-resource_yield/hash +++ b/repos/os/recipes/src/test-resource_yield/hash @@ -1 +1 @@ -2022-11-16 22ab8616ac7ba9b64de1c406276470ccb35ebe47 +2022-11-28 5d4b024ce12be63b1825e0ffbb9c0f6b4ff81c6c diff --git a/repos/os/recipes/src/test-rtc/hash b/repos/os/recipes/src/test-rtc/hash index 4f90a8fa37..336c986ec0 100644 --- a/repos/os/recipes/src/test-rtc/hash +++ b/repos/os/recipes/src/test-rtc/hash @@ -1 +1 @@ -2022-11-16 c7c07d1c79bdddf72db1baff7819d243f676fbc1 +2022-11-28 2d24ca3c68ee597ca3be4591ab2284b09489710a diff --git a/repos/os/recipes/src/test-sandbox/hash b/repos/os/recipes/src/test-sandbox/hash index 1db0070032..7c466b89ae 100644 --- a/repos/os/recipes/src/test-sandbox/hash +++ b/repos/os/recipes/src/test-sandbox/hash @@ -1 +1 @@ -2022-11-16 c3410d2c6db9d7f09d57c4339705cbb8b44f4b1b +2022-11-28 769863110889c6c5fb7483541e48a5a38b29994a diff --git a/repos/os/recipes/src/test-signal/hash b/repos/os/recipes/src/test-signal/hash index 220dd335ef..4568f0f26a 100644 --- a/repos/os/recipes/src/test-signal/hash +++ b/repos/os/recipes/src/test-signal/hash @@ -1 +1 @@ -2022-11-16 99ee51a44cb9df88cf1af591c639ddf3cfcb421b +2022-11-28 df2cee69eb7d111fa536fed50155a8a46d899fda diff --git a/repos/os/recipes/src/test-slab/hash b/repos/os/recipes/src/test-slab/hash index c54bcb3620..1e1061a9be 100644 --- a/repos/os/recipes/src/test-slab/hash +++ b/repos/os/recipes/src/test-slab/hash @@ -1 +1 @@ -2022-11-16 ab976fcae5854d4fb38aacab8c3e99115814bde4 +2022-11-28 51bd9f7cbda28dd8c07e28eed13d744353ae3c9e diff --git a/repos/os/recipes/src/test-terminal_crosslink/hash b/repos/os/recipes/src/test-terminal_crosslink/hash index 91c18e284c..570962cb8a 100644 --- a/repos/os/recipes/src/test-terminal_crosslink/hash +++ b/repos/os/recipes/src/test-terminal_crosslink/hash @@ -1 +1 @@ -2022-11-16 3f7c502a2c68c499883328784f0bc5b51540b7da +2022-11-28 985288493035093bd197407040a08f2e2b9266b2 diff --git a/repos/os/recipes/src/test-trace/hash b/repos/os/recipes/src/test-trace/hash index 41d0ec6342..e389a4306b 100644 --- a/repos/os/recipes/src/test-trace/hash +++ b/repos/os/recipes/src/test-trace/hash @@ -1 +1 @@ -2022-11-16 7f0cd50667884b345ab4bbb90ddfd95a4b57c45c +2022-11-28 b900626ff300571e0f1dd98a93e42728afe50b27 diff --git a/repos/os/recipes/src/test-trace_buffer/hash b/repos/os/recipes/src/test-trace_buffer/hash index faecbff7a5..bcdf587836 100644 --- a/repos/os/recipes/src/test-trace_buffer/hash +++ b/repos/os/recipes/src/test-trace_buffer/hash @@ -1 +1 @@ -2022-11-16 97972fd6977b891ef69a8634b2eed8b8d12149ec +2022-11-28 fcde39f7c0c709b68be1f950384831d04c027271 diff --git a/repos/os/recipes/src/test-trace_logger/hash b/repos/os/recipes/src/test-trace_logger/hash index 6378ff01f7..0e1342861c 100644 --- a/repos/os/recipes/src/test-trace_logger/hash +++ b/repos/os/recipes/src/test-trace_logger/hash @@ -1 +1 @@ -2022-11-16 d329cd6bfb9b5a154a26a100d984f805e922ab40 +2022-11-28 9c690a961f99d86f6a8955d90de2f0664fc92bae diff --git a/repos/os/recipes/src/test-utf8/hash b/repos/os/recipes/src/test-utf8/hash index 584175c562..670b7d305f 100644 --- a/repos/os/recipes/src/test-utf8/hash +++ b/repos/os/recipes/src/test-utf8/hash @@ -1 +1 @@ -2022-11-16 ea22601226c18b8db70ad531640aa50445fa683b +2022-11-28 ee9fbc99a5d7275c1a6426bd0131d632e95e6391 diff --git a/repos/os/recipes/src/test-vfs_capture/hash b/repos/os/recipes/src/test-vfs_capture/hash index 574b73ae1b..b75f60ab68 100644 --- a/repos/os/recipes/src/test-vfs_capture/hash +++ b/repos/os/recipes/src/test-vfs_capture/hash @@ -1 +1 @@ -2022-11-16 be8a641f13caa23f4d8422b42530186c0851ab99 +2022-11-28 cb8668eb94cdacd6236560188706b621c8b5415a diff --git a/repos/os/recipes/src/test-vfs_stress/hash b/repos/os/recipes/src/test-vfs_stress/hash index 5004bfb8d8..782593ebc9 100644 --- a/repos/os/recipes/src/test-vfs_stress/hash +++ b/repos/os/recipes/src/test-vfs_stress/hash @@ -1 +1 @@ -2022-11-16 5b2479de637f54493878337d681e26698bfe131d +2022-11-28 6624d2b50f179eb9e136e5bde045b15176551cf1 diff --git a/repos/os/recipes/src/test-weak_ptr/hash b/repos/os/recipes/src/test-weak_ptr/hash index 671492e1fa..d7021c0de4 100644 --- a/repos/os/recipes/src/test-weak_ptr/hash +++ b/repos/os/recipes/src/test-weak_ptr/hash @@ -1 +1 @@ -2022-11-16 3a2ee7f23f5e8f3041749945bfa86f02a97adcc9 +2022-11-28 020971de6a9b321599dbe7af566842e7625cae0f diff --git a/repos/os/recipes/src/top/hash b/repos/os/recipes/src/top/hash index 6d43e60b3f..f900964f7e 100644 --- a/repos/os/recipes/src/top/hash +++ b/repos/os/recipes/src/top/hash @@ -1 +1 @@ -2022-11-16 5070cc036bdedcb69a674a5d876c0ee8ec321a66 +2022-11-28 fbedb8ec16c7b887ae8b5aaac0c8c9df2cb27025 diff --git a/repos/os/recipes/src/trace_logger/hash b/repos/os/recipes/src/trace_logger/hash index 9231188672..f530f1b0e4 100644 --- a/repos/os/recipes/src/trace_logger/hash +++ b/repos/os/recipes/src/trace_logger/hash @@ -1 +1 @@ -2022-11-16 c35741d4dc1cd0ef9380311032f01a3221d2db65 +2022-11-28 9fddf43a06772ea9fe2feeaab24c00923add83b9 diff --git a/repos/os/recipes/src/trace_policy/hash b/repos/os/recipes/src/trace_policy/hash index 9066ab103e..3b07397a52 100644 --- a/repos/os/recipes/src/trace_policy/hash +++ b/repos/os/recipes/src/trace_policy/hash @@ -1 +1 @@ -2022-11-16 e9e0b832978c982be7dffc985162578f1da3dab0 +2022-11-28 d4a4ef06475d460364606b205c5c78d5e067ee2a diff --git a/repos/os/recipes/src/trace_subject_reporter/hash b/repos/os/recipes/src/trace_subject_reporter/hash index d335186554..fe80951e4f 100644 --- a/repos/os/recipes/src/trace_subject_reporter/hash +++ b/repos/os/recipes/src/trace_subject_reporter/hash @@ -1 +1 @@ -2022-11-16 6b18210f513cefbaff2f7b37b64ba8ca993ac861 +2022-11-28 2a26c7676ff0d0df109489cdc2a3e93167f832a8 diff --git a/repos/os/recipes/src/usb_block_drv/hash b/repos/os/recipes/src/usb_block_drv/hash index cd9d77b3cb..95d51de42f 100644 --- a/repos/os/recipes/src/usb_block_drv/hash +++ b/repos/os/recipes/src/usb_block_drv/hash @@ -1 +1 @@ -2022-11-16 9fa09f8fc7c1742a8adede5305da0a3f2b8caf5a +2022-11-28 165f33762a584ba72df032274b4de2dbacdd942d diff --git a/repos/os/recipes/src/vfs/hash b/repos/os/recipes/src/vfs/hash index 05197b184e..b56ed700e5 100644 --- a/repos/os/recipes/src/vfs/hash +++ b/repos/os/recipes/src/vfs/hash @@ -1 +1 @@ -2022-11-16 3e3df722643f376c88f373816d7106b21ac14af0 +2022-11-28 da93420db82a087d722f8e608babddf57557da76 diff --git a/repos/os/recipes/src/vfs_block/hash b/repos/os/recipes/src/vfs_block/hash index 863af22f72..869a083d5d 100644 --- a/repos/os/recipes/src/vfs_block/hash +++ b/repos/os/recipes/src/vfs_block/hash @@ -1 +1 @@ -2022-11-16 96e834731ecc65ec6326ea9e01fac3a810f7e92f +2022-11-28 9448a58ff8f80c9120e0e58a0d3bf0d2df75972a diff --git a/repos/os/recipes/src/vfs_capture/hash b/repos/os/recipes/src/vfs_capture/hash index 7c9c7b6302..4844f8dd2c 100644 --- a/repos/os/recipes/src/vfs_capture/hash +++ b/repos/os/recipes/src/vfs_capture/hash @@ -1 +1 @@ -2022-11-16 d6f9166b21a9abdeee98b36486a93066761073eb +2022-11-28 f1b8f3e260dd313a2245cca3c7cdabde9e5b0f0f diff --git a/repos/os/recipes/src/vfs_tap/hash b/repos/os/recipes/src/vfs_tap/hash index 64fc52135c..b7cf9403cc 100644 --- a/repos/os/recipes/src/vfs_tap/hash +++ b/repos/os/recipes/src/vfs_tap/hash @@ -1 +1 @@ -2022-11-16 91ee5b57e9f0c30c64fcafbf1b93df58ae2b1512 +2022-11-28 ba833904139a95727c616900ed19ea2fb8bd8f50 diff --git a/repos/os/recipes/src/virt_qemu_drivers/hash b/repos/os/recipes/src/virt_qemu_drivers/hash index a9c21456e1..b8d9fdb14f 100644 --- a/repos/os/recipes/src/virt_qemu_drivers/hash +++ b/repos/os/recipes/src/virt_qemu_drivers/hash @@ -1 +1 @@ -2022-11-16 f0244f5f25821e153a042c965018c8b2833176e5 +2022-11-28 189e5cc49cb620db8ab24619515949caf9ecd8b3 diff --git a/repos/os/recipes/src/virtdev_rom/hash b/repos/os/recipes/src/virtdev_rom/hash index d7b71ea89f..f53e83d1a3 100644 --- a/repos/os/recipes/src/virtdev_rom/hash +++ b/repos/os/recipes/src/virtdev_rom/hash @@ -1 +1 @@ -2022-11-16 f757d60a2e7fc04e35e2883e6122b58d5f352f36 +2022-11-28 b1c3355215d2e230ec5ff120808120ce815a7488 diff --git a/repos/os/recipes/src/virtio_fb_drv/hash b/repos/os/recipes/src/virtio_fb_drv/hash index 755685b4db..ecda29299c 100644 --- a/repos/os/recipes/src/virtio_fb_drv/hash +++ b/repos/os/recipes/src/virtio_fb_drv/hash @@ -1 +1 @@ -2022-11-16 e08913b6aaa124283cc1520241b354c5de3542cf +2022-11-28 4be148de32bcc3cdc65ac66fedc730d5dc720d18 diff --git a/repos/os/recipes/src/virtio_input_drv/hash b/repos/os/recipes/src/virtio_input_drv/hash index 1c19c92be3..1ef6c27b8c 100644 --- a/repos/os/recipes/src/virtio_input_drv/hash +++ b/repos/os/recipes/src/virtio_input_drv/hash @@ -1 +1 @@ -2022-11-16 abc98e12b63d49597632b7215d4342c762cbc470 +2022-11-28 d871e347655109ae145b645ed269f21a0bb532ad diff --git a/repos/os/recipes/src/virtio_nic_drv/hash b/repos/os/recipes/src/virtio_nic_drv/hash index 1630119253..97e796a226 100644 --- a/repos/os/recipes/src/virtio_nic_drv/hash +++ b/repos/os/recipes/src/virtio_nic_drv/hash @@ -1 +1 @@ -2022-11-16 24d400040bb1a3bb0f65ecb4f2da7befe34084b2 +2022-11-28 8a6a4bfb7916328bc3a9654f4faefa04adb95a12 diff --git a/repos/os/recipes/src/vmm/hash b/repos/os/recipes/src/vmm/hash index 9a550171f2..319687f623 100644 --- a/repos/os/recipes/src/vmm/hash +++ b/repos/os/recipes/src/vmm/hash @@ -1 +1 @@ -2022-11-16 2d487300f33eb1e4b831bb9c7e56c2df98cd5483 +2022-11-28 02b2cf34136b24e72d8a12de10451c2755af451b diff --git a/repos/pc/recipes/api/pc_linux/hash b/repos/pc/recipes/api/pc_linux/hash index 12c924b59a..91ff1c5784 100644 --- a/repos/pc/recipes/api/pc_linux/hash +++ b/repos/pc/recipes/api/pc_linux/hash @@ -1 +1 @@ -2022-11-16 6d702e31d820cba677ee8167f7472f29041da551 +2022-11-28 059cee301930dbbf236f39af54892e8a28e6de54 diff --git a/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash b/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash index 7012356676..9e1b66fb44 100644 --- a/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash +++ b/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash @@ -1 +1 @@ -2022-11-16 7beb7b3765ae046deab008392ad717109b049a64 +2022-11-28 9da14b94e1d9dfa8fee2ed57106cef151480d0fd diff --git a/repos/pc/recipes/pkg/wifi/hash b/repos/pc/recipes/pkg/wifi/hash index c680d15c32..72263780a4 100644 --- a/repos/pc/recipes/pkg/wifi/hash +++ b/repos/pc/recipes/pkg/wifi/hash @@ -1 +1 @@ -2022-11-16 900bb08c26edda43511763b278af170102333184 +2022-11-28 cd6f658b56199af1a1c749ecff9c5b02d2707fcc diff --git a/repos/pc/recipes/raw/test_usb_host_drv-pc/hash b/repos/pc/recipes/raw/test_usb_host_drv-pc/hash index f6e4902b12..bd4076041d 100644 --- a/repos/pc/recipes/raw/test_usb_host_drv-pc/hash +++ b/repos/pc/recipes/raw/test_usb_host_drv-pc/hash @@ -1 +1 @@ -2022-11-16 493621650f0f3a64b9a59ef77e7c31785a4d0655 +2022-11-28 fa01946bfc921e0b9af4122266c772ff1ef8f48f diff --git a/repos/pc/recipes/src/pc_intel_fb_drv/hash b/repos/pc/recipes/src/pc_intel_fb_drv/hash index e9be69cf0d..55722638a3 100644 --- a/repos/pc/recipes/src/pc_intel_fb_drv/hash +++ b/repos/pc/recipes/src/pc_intel_fb_drv/hash @@ -1 +1 @@ -2022-11-16 688ca184eb7aa142014e246065fa36f0d6ab14af +2022-11-28 87bd7cd3522c9e9fe3998637023cce6eab6d0e87 diff --git a/repos/pc/recipes/src/pc_platform_drv/hash b/repos/pc/recipes/src/pc_platform_drv/hash index db015d8651..b3b6d4657d 100644 --- a/repos/pc/recipes/src/pc_platform_drv/hash +++ b/repos/pc/recipes/src/pc_platform_drv/hash @@ -1 +1 @@ -2022-11-16 6e607e0d4fcfc5ffe6cd7915562270f28859f72f +2022-11-28 262312bbe4d4b929b2da8ca43ecd46691fd2e4fc diff --git a/repos/pc/recipes/src/pc_usb_host_drv/hash b/repos/pc/recipes/src/pc_usb_host_drv/hash index baa91c589e..0886928c57 100644 --- a/repos/pc/recipes/src/pc_usb_host_drv/hash +++ b/repos/pc/recipes/src/pc_usb_host_drv/hash @@ -1 +1 @@ -2022-11-16 29083b00d0ec94851b6ea936095536db994d41ab +2022-11-28 86e3b997265a1206e5a4107525a7353d6b15ecf0 diff --git a/repos/pc/recipes/src/pc_wifi_drv/hash b/repos/pc/recipes/src/pc_wifi_drv/hash index e832d857da..980745fc83 100644 --- a/repos/pc/recipes/src/pc_wifi_drv/hash +++ b/repos/pc/recipes/src/pc_wifi_drv/hash @@ -1 +1 @@ -2022-11-16 43c475a889d98dcef214a2a113f7b1758f511c01 +2022-11-28 dd2d3c3121be1c6de414c7b36bf888989b22306a diff --git a/repos/ports/recipes/pkg/report_dump/hash b/repos/ports/recipes/pkg/report_dump/hash index 181c6d4fd6..b7d5edbc27 100644 --- a/repos/ports/recipes/pkg/report_dump/hash +++ b/repos/ports/recipes/pkg/report_dump/hash @@ -1 +1 @@ -2022-11-16 18bc3bfb81ef98e7d555d50dd611d9dddc5623d6 +2022-11-28 ea0effdb269079ecb795ac6c1af1917dc7f5f0db diff --git a/repos/ports/recipes/pkg/system_shell/hash b/repos/ports/recipes/pkg/system_shell/hash index 37341774e2..3eff89d686 100644 --- a/repos/ports/recipes/pkg/system_shell/hash +++ b/repos/ports/recipes/pkg/system_shell/hash @@ -1 +1 @@ -2022-11-16 793859f247ff5fc545d0053982e3deecebb174d6 +2022-11-28 a22cb9b581a21c4f53d0ef4f856a8a8a3cc20454 diff --git a/repos/ports/recipes/pkg/vbox5-nova-capture/hash b/repos/ports/recipes/pkg/vbox5-nova-capture/hash index d1f2d4d44a..00549d2eab 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-capture/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-capture/hash @@ -1 +1 @@ -2022-11-16 41ba56e74aae375e3dc87746919adc33fe38c101 +2022-11-28 1b04dcdbd1c7ba6796a3082ea82e1f0bb523cd8c diff --git a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash index 0777732974..41375d4417 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash @@ -1 +1 @@ -2022-11-16 b27548da1479f75e6169d9837553d7ef9afa2f11 +2022-11-28 d68191df5bf9a5a0463c42cd2b69aaa9721f80d7 diff --git a/repos/ports/recipes/pkg/vbox5/hash b/repos/ports/recipes/pkg/vbox5/hash index 2de92c6d60..7395cc430d 100644 --- a/repos/ports/recipes/pkg/vbox5/hash +++ b/repos/ports/recipes/pkg/vbox5/hash @@ -1 +1 @@ -2022-11-16 6bfa67853b633c6d5eefbfdb1be437aad3d51266 +2022-11-28 a5676bd1efacf99ed787e0a25c765cb87541c4f0 diff --git a/repos/ports/recipes/pkg/vbox6-capture/hash b/repos/ports/recipes/pkg/vbox6-capture/hash index 8c39c1d8a8..e4559e3591 100644 --- a/repos/ports/recipes/pkg/vbox6-capture/hash +++ b/repos/ports/recipes/pkg/vbox6-capture/hash @@ -1 +1 @@ -2022-11-16 efeeb5ffb175d5c14501c458441fb5403f2dc8fa +2022-11-28 70224ab6d960e5456c0147c54bb3b46cb6441bd0 diff --git a/repos/ports/recipes/pkg/vbox6/hash b/repos/ports/recipes/pkg/vbox6/hash index 524220e9b8..43526518f3 100644 --- a/repos/ports/recipes/pkg/vbox6/hash +++ b/repos/ports/recipes/pkg/vbox6/hash @@ -1 +1 @@ -2022-11-16 41aeedd01e79eae4a2cab2bf1c23b52b37901ba2 +2022-11-28 d87959381855fcb306f3e2b6390e5beaaab1417b diff --git a/repos/ports/recipes/src/vbox5-nova/hash b/repos/ports/recipes/src/vbox5-nova/hash index e83fc6e388..c34710bfbe 100644 --- a/repos/ports/recipes/src/vbox5-nova/hash +++ b/repos/ports/recipes/src/vbox5-nova/hash @@ -1 +1 @@ -2022-11-16 65b947678d53855505ebc077b414fbf3f0b48148 +2022-11-28 056083f7d17b13919c714a21073e73828419e29a diff --git a/repos/ports/recipes/src/vbox5/hash b/repos/ports/recipes/src/vbox5/hash index be2262391b..aabec301a6 100644 --- a/repos/ports/recipes/src/vbox5/hash +++ b/repos/ports/recipes/src/vbox5/hash @@ -1 +1 @@ -2022-11-16 269caad597b97e2791e859604a7416ebbb2ba0a4 +2022-11-28 52a31e5514bf2087621c26ed77f64f6521965b1c diff --git a/repos/ports/recipes/src/vbox6/hash b/repos/ports/recipes/src/vbox6/hash index 0682e18d16..786547a49a 100644 --- a/repos/ports/recipes/src/vbox6/hash +++ b/repos/ports/recipes/src/vbox6/hash @@ -1 +1 @@ -2022-11-16 59a20c2333c8fd9890272e1b3ee984274275f160 +2022-11-28 b8b9f1547a278a3e5323f9ac0dbe7b9fdd807b90 diff --git a/repos/ports/recipes/src/verify/hash b/repos/ports/recipes/src/verify/hash index f66cc7ebc0..a6caa3f95b 100644 --- a/repos/ports/recipes/src/verify/hash +++ b/repos/ports/recipes/src/verify/hash @@ -1 +1 @@ -2022-11-16 34794d4efdefc73d4836489c35ce03c26b2cf387 +2022-11-28 24211ee2bb1f90f8210ccb326a09c3311415cac9 From 168aa04c854b4e53f986fc9311a92598e9b64478 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 30 Nov 2022 10:21:23 +0100 Subject: [PATCH 0106/1921] doc: minor fix in release notes of version 22.08 --- doc/release_notes/22-08.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release_notes/22-08.txt b/doc/release_notes/22-08.txt index 6b501b28f2..224cb4a750 100644 --- a/doc/release_notes/22-08.txt +++ b/doc/release_notes/22-08.txt @@ -400,7 +400,7 @@ We invite seasoned developers - especially those who are following the [https://genodians.org/nfeske/index - Pine-fun article series] - to experiment with the new phone variant. It can be built via the following command: -! built/arm_v8a$ make run/sculpt KERNEL=hw BOARD=pinephone SCULPT=phone +! build/arm_v8a$ make run/sculpt KERNEL=hw BOARD=pinephone SCULPT=phone For a broader audience, we plan to provide a ready-to-use SD-card image for the PinePhone in tandem with the next release of Sculpt OS. From 0048ff2a2f84a11222e5ad75d7ab89cafc5e6b12 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 29 Nov 2022 16:20:18 +0100 Subject: [PATCH 0107/1921] doc: updated components.txt --- doc/components.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/components.txt b/doc/components.txt index 7fe7f350e5..f0fd0e552b 100644 --- a/doc/components.txt +++ b/doc/components.txt @@ -90,6 +90,11 @@ Platform devices this simple ACPI parser traverses the ACPI tables and reports device-resource information (e.g., interrupt lines of PCI devices). +:_os/src/app/pci_decode/_: + A component that reports the physical information about PCI devices after + parsing and initializing the PCI bus. The reported information is usually + consumed by the platform driver. + :_os/src/app/smbios_decoder/_: A component that parses SMBIOS information on x86 platforms and makes the result available as a report. @@ -148,8 +153,11 @@ capture-session and event-session interfaces respectively. Serves as both framebuffer and input driver on Linux using libSDL. This driver is only usable on the Linux base platform. +:_os/src/drivers/framebuffer/virtio/_: + Driver for the Virtio virtual graphics device as supported by Qemu. + :_os/src/drivers/gpu/intel/_: - An experimental Intel Graphics GPU multiplexer for Broadwell and newer. + An Intel Graphics GPU multiplexer for Broadwell and newer. :_pc/src/drivers/framebuffer/intel/_: Framebuffer driver for Intel i915 compatible graphic cards based on @@ -249,9 +257,6 @@ defined at _os/include/nic_session/_. :_dde_linux/src/drivers/usb_net/_: USB network driver using the USB session interface. -:_dde_linux/src/drivers/nic/fec/_: - Driver for ethernet NICs of the i.MX SoC family. - Resource multiplexers ##################### From faa1e6f1b2b22c809cb43890e80eca3744d03baf Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 28 Nov 2022 14:31:42 +0100 Subject: [PATCH 0108/1921] Release notes for version 22.11 --- doc/release_notes/22-11.txt | 1015 +++++++++++++++++++++++++++++++++++ 1 file changed, 1015 insertions(+) create mode 100644 doc/release_notes/22-11.txt diff --git a/doc/release_notes/22-11.txt b/doc/release_notes/22-11.txt new file mode 100644 index 0000000000..03d3323929 --- /dev/null +++ b/doc/release_notes/22-11.txt @@ -0,0 +1,1015 @@ + + + =============================================== + Release notes for the Genode OS Framework 22.11 + =============================================== + + Genode Labs + + + +With version 22.11, we pursued two new exploratory topics as we envisioned on +the project's [https://genode.org/about/road-map - road map] for this year, +namely the use of the framework for hardware-software co-design work, +and principally enabling suspend/resume functionality on PCs. + +A decade ago, we +[https://genode.org/documentation/release-notes/11.02#Approaching_platform_support_for_Xilinx_MicroBlaze - explored the combination] +of Genode with FPGA technology for the first time. +Our interest in this direction got reignited two years ago when we started +enabling Genode on a board based on the Xilinx Zynq, which combines an ARMv7 +SoC with FPGA fabric. This line of work eventually culminated in new +development work flows for creating hardware IP cores and Genode components in +tandem. Section [Hardware-software co-design with Genode on Xilinx Zynq] covers +the results of this line of work. + +The second largely exploratory topic is the practical use of sleep states +on PC hardware, which - until this point - remained rather mysterious to us. +Section [Low-level mechanism for suspend/resume on PC platforms] reports +on our findings and the forthcoming integration of this feature into Genode. + +Besides the exploration work, the profound enhancement of our Intel GPU +multiplexer stands out. As detailed in Section +[Hardware-accelerated graphics with Intel GEN12+ GPUs], the new version +supports up-to-date GEN12+ GPUs, comes with numerous robustness and +performance improvements, and got adapted to Genode's new uniform driver +infrastructure. + +The latter point brings us to the most elaborate development under the hood +of the framework, which is the great unification of the device-driver +interfaces across all supported architectures. +Section [Uniform use of new platform-driver interface] wraps up this +intensive line of work, which left no PC-related driver unturned. + +A recurring theme throughout this year is the use of Genode on the PinePhone. +The current release is no exception. +Sections [Emerging Sculpt OS variant for the PinePhone] and +[PinePhone drivers for audio, camera, and power control] report on the +progress at the user-facing side as well as the driver-related achievements +digging deep into the realms of power management, audio, and the camera. + +Among the many further topics of the current release are virtualization on PC +and ARM (Sections [ARM virtual machine monitor] and [Seoul VMM]), plenty +of device-driver improvements, and enhanced tooling that makes the framework +ever more enjoyable to use (Section [Build system and tools]). + + +Hardware-software co-design with Genode on Xilinx Zynq +###################################################### + +A distinct feature of the Xilinx Zynq-7000 SoC is the combination of its +Cortex-A9 CPU with an FPGA, which is also referred to as _programmable logic_. +As the name suggests, the FPGA can be programmed with custom hardware designs +and thus act as an accelerator, DSP, or an arbitrary peripheral device. The +Zynq platform thereby accommodates a playground for hardware-software co-design +for a comparably low budget. + +While extending the platform support for the Zynq in general, we have +particularly been working towards establishing the required infrastructure +for supporting hardware-software co-design in Genode. With this release, we +can draw an almost complete picture of such a co-design workflow in Genode. +Our achievements culminate in a beginner-level tutorial for the Zybo Z7 board. + + +Runtime reconfiguration of the FPGA +=================================== + +A key component to FPGA runtime reconfiguration in Genode is the +_drivers_fpga-zynq_ subsystem that we already +[https://genode.org/documentation/release-notes/22.05#Xilinx_Zynq - introduced with release 22.05]. + +This subsystem enabled bitstream loading at runtime in order to reprogram the +FPGA. In conjunction with the _Zynq Driver Manager_, it allowed +launching/stopping of device drivers in accordance with the availability of the +devices implemented on the FPGA. + +For this release, we reworked this subsystem in order to support switching +between several bitstreams. In particular, we added a _devices manager_ to +merge the static 'devices' ROM with a bitstream-dependent set of devices. The +latter is specified by the component's configuration as follows: + +! +! +! +! +! +! +! +! +! + +The configuration comprises an arbitrary number of _bitstream_ nodes with a +mandatory _name_ attribute. Each _bitstream_ node may contain a set of device +specifications as expected by the platform driver. The _devices manager_ merges +the static 'devices' ROM with the devices of the currently loaded bitstream, +which is reported by the _fpga_drv_ component. The result is then consumed +by the platform driver. The bitstream to be loaded is specified by the +configuration of the _fpga_drv_ as follows: + +! +! +! + +These changes are bundled into the new _drivers_fpga-zynq_ subsystem. +The figure below illustrates how this subsystem is used as a replacement for +the platform driver. + +[image zynq_driver_manager] + +Just as the standard platform driver, the subsystem expects a 'policy' and +'devices' ROM. In addition, we must provide it with a _devices_manager.config_ +ROM as shown above. The bitstreams as well as the configuration for the internal +_fpga_drv_ component must be provided via a file system session. + +In addition to these changes to the _drivers_fpga-zynq_ subsystem, we added +configurability of the four FPGA clocks ("fpga0" to "fpga3") to the Zynq +platform driver. Moreover, we added four equally named reset domains. + +All changes are found in the +[https://github.com/genodelabs/genode-zynq - genode-zynq] +repository. + + +Packaging of bitstreams with Goa +================================ + +Custom hardware designs for the Zynq SoC are created with Xilinx Vivado. +In order to simplify reproducing a bitstream from its sources and creating +corresponding depot archives, we added Vivado as a supported build system to +[https://github.com/nfeske/goa - Goa]. In particular, we leveraged the fact +that a hardware project can be exported from Vivado as a tcl script that +reproduces the project. With this approach, we only need to keep the custom +source files and omit any generated glue code. + +In addition, we added support for auto-generating a _devices_manager.config_ +from a hardware design. When provided with a sparse _devices_ file (mentioning +the name or type of each device), Goa tries to extract the corresponding MMIO +addresses and clock rates from the design and adds a corresponding +_devices_manager.config_ to the depot archive. + +Please find detailed instructions in the Goa documentation via + +! $ goa help build-systems + + +Pin driver and co-design tutorial +================================= + +Following the lead of the Allwinner SoC, we implemented a pin driver for the +Zynq platform. Since GPIO on the Zynq may require loading of a custom bitstream +in case the FPGA's I/O pins are used, we developed and published a tutorial +for the Zybo Z7 board. This tutorial showcases a co-design workflow +demonstrating the use of the pin driver, custom hardware design with Xilinx +Vivado, bitstream generation and packaging with Goa as well as bitstream +switching at runtime. +You can find the tutorial on the new +[https://www.hackster.io/genode/ - Genode channel on hackster.io]. + + +Hardware-accelerated graphics with Intel GEN12+ GPUs +#################################################### + +With our big [https://mesa3d.org - Mesa 3D] library update from version 11.2.2 +to version [https://genode.org/documentation/release-notes/21.08 - 21.0.0], +we also switched the Intel graphics back end from the dated DRI2/i965 to the +Gallium/Iris based graphics driver. The reason for doing so is becoming +apparent with the current Genode release. The old i965 driver does not support +newer Intel Graphics hardware and is limited to (U)HD graphics devices found, +for example, on Broadwell, Skylake, or Kabylake platforms. The new +[https://en.wikipedia.org/wiki/Intel_Xe - Intel Xe] (eXascale for +everyone = GEN12) hardware is only supported by the Iris driver and can be +found on current architectures like Tigerlake or Alderlake. Intel Xe comes +with a completely new instruction set architecture (ISA). Thanks to our switch +to Iris, most of these ISA changes are handled transparently by the Mesa +library for us. The main task for Genode was to adjust our Intel GPU +multiplexer to the new graphics-device generation. + + +Intel GPU-GEN12 multiplexer adjustments +======================================= + +Genode's GPU multiplexer is a very low level component within the 3D graphics +stack. Technically, it handles the GPU resources (like graphics memory) and the +scheduling and execution of compiled GPU code (i.e., batch buffers) of the +graphics device. It is also responsible for providing separation of different +GPU clients, which is achieved by GPU contexts with a separate page table per +client in hardware. Also, it serves interrupts and informs the clients, +respectively the 3D applications, about progress so a client can submit the +next rendering request. For Intel Xe, there are only two changes within this +low level ISA. First, the interrupt handling registers have been improved. +It has become easier to distinguish, for example, between a display-engine +interrupt and a rendering interrupt. Since graphics cards can have many +interrupt causes, this is a useful and welcome change. Second, it is now +possible to schedule 16 instead of 4 jobs onto the GPU. While we don't take +advantage of this feature yet - we schedule one job at a time - this may come +in handy for use cases like 3D compositing. Additionally, the multiplexer has +to provide information about slices, subslices, and EUs (Execution Units) to +Mesa clients. + + +Stability and resource improvements +=================================== + +Resources need to be traded on Genode, and it is essential that the GPU +multiplexer does not pay for memory allocations or capability upgrades from +its own budget. The client has to donate these resources beforehand. +If this rule is violated, the multiplexer might run out of budget and stall +all clients. Because 3D applications can require a huge amount of resources, +this has been a challenging topic during the last release cycle, and we are +glad to announce that even sophisticated workloads are now running well on +Genode. There is still room for improvement, but the current situation is +already reassuring. Stability-wise, we have tested the updated 3D stack with +various workloads (games, browsers, VirtualBox6-3D) and did fix all issues +that we came across. + + +Base framework and OS-level infrastructure +########################################## + +Base API changes +================ + +New 'Dictionary' utility +------------------------ + +Throughout the Genode code base, there are several places where objects are +accessed by using a name as key. To avoid the repeated manual crafting of such +data structures, we introduced a basic 'Dictionary' data structure located at +_base/include/util/dictionary.h_. + +It follows the patterns of the existing 'Id_space' and 'Registry'. That is, +elements are automatically added to the dictionary at construction time, +respectively removed at destruction time. There exists a 'with_element' method +for applying a functor to one element by specifying a name as key, and a +'with_any_element' method that can be used to destruct all dictionary items. + + +Tightening the 'Xml_node' interface +----------------------------------- + +The former 'with_sub_node' method has been renamed to 'with_optional_sub_node' +to better reflect the intention of the caller. If no sub node of the specified +type exists, the specified functor is not executed. + +Use cases where a sub node is mandatory are best covered by the new +'with_sub_node' method that takes two functors as arguments, one called with +the matching sub node, and one that is called if no such sub node exists. + + +NIC router +========== + +The NIC router now generates reports triggered by internal events +(re-configuration, link state change, etc.) asynchronously. This has the +benefit that the potentially expensive report update does not delay the event +processing that triggered the update and that a report is guaranteed to reflect +a consistent state of the router's internals. + +Furthermore, if the '' attribute 'link_state_triggers' is set, the +router now updates the report also whenever a network session gets constructed +or destructed. This is definitely necessary with sessions whose link state is +"up" because we should consider a non-existent session to be "down". However, +in real-world scenarios, a subscriber might want to know about the +construction and destruction of sessions that are "down" as well because one +has to be able to synchronize the lifetime of local objects that keep track of +the link states. + +Besides the polishing of the report functionality, there are some improvements +related to the DHCP processing in the router. First, the router is now robust +against invalid DNS addresses in DHCP ACK packets. Next, the DHCP client +doesn't produce oversized Ethernet packets anymore. This is important in +networks with a low bandwidth. Then, the link state of a session that is bound +to the state of another domain via the '' attribute +'dns_config_from' is now correctly synchronized to whether that domain has an +IP configuration or not. And, last but not least, the DHCP server now accepts +the optimized startup sequence of clients like Debian that store their lease +persistently and directly try re-requesting it on boot-up (no DHCP DISCOVER). +These last two changes both prevent DHCP re-attempts that could cause a +significantly delayed network boot-up at applications behind the router. + + +Improved support for time-multiplexed GPIO pins +=============================================== + +Prompted by the need to enable a bit-banging I2C driver on the PinePhone, +we extended Genode's pin-driver framework introduced in version +[https://genode.org/documentation/release-notes/21.11#Pin_I_O_session_interfaces - 21.11] +with support for the time-multiplexed operation of a pin as output or input. + +To operate a pin in both directions, a driver obtains both a pin-state and a +pin-control session for the same pin. The pin-state session can be used to +sense the current pin state. The control session allows the client to set the +pin to high or low (using the 'state' method), or to set it to high-impedance +via the 'yield' method. Once switched to high-impedance, the pin can be used +as input. + + +Libraries and applications +########################## + +Emerging Sculpt OS variant for the PinePhone +============================================ + +Genode on the PinePhone has come a long way, most of which is covered by the +[https://genode.org/documentation/genode-platforms-22-05.pdf - Genode Platforms] +document. Device-driver work accounts for the majority of the effort, which is +nicely wrapped up with the current release as described in +Section [PinePhone drivers for audio, camera, and power control]. +With the fundamental device drivers for the PinePhone covered, we can now turn +our attention to system-integration work, ultimately raising the question of +how a Genode-based phone should best present itself to the user. + +[image sculpt_pinephone_22_11] + The forthcoming phone variant of the user interface of Sculpt OS. + +We take this question as an opportunity for exploration. Similarly to +how the so-called Leitzentrale of [https://genode.org/download/sculpt - Sculpt OS] +provides the user with an administrative view on the system that is separate +from the user-defined desktop runtime, we pursued the division of the phone's +UI into two faces that can be toggled with a simple touch gesture. The first +one accommodates the role of the device as a fixed-function appliance similar +to the functionality of a feature phone whereas the second one can be shaped +entirely by the user. The screenshots above give a glimpse of the user +interface of the appliance side. It covers low-level device parameters, voice +calls, establishing network connectivity, and the installation and management +of the software running on the user-defined side. One can see several cues +from Sculpt OS such as the component graph. + +The clear-cut separation of the two roles of the device opens up new ways to +leverage Genode's component architecture. For example, observing that the +appliance role needs only a subset of components, we can orchestrate the +startup of the system such that those components are started first. This way, +the device's basic functions like voice calls become available in under 7 +seconds when powering-on the device. + +Regarding the built-in feature set, we implemented the fundamental device +functions that everyone takes for granted, like displaying the battery state, +triggering the charging when a charger gets connected, controlling the +brightness of the display, or powering down the device. + +The phone variant of Sculpt OS evolves in the +[https://github.com/nfeske/genode-allwinner - genode-allwinner] repository, +specifically within the _sculpt/_ and _src/app/phone_manager/_ directories. +It can be built via the following command: + +! build/arm_v8a$ make run/sculpt KERNEL=hw BOARD=pinephone SCULPT=phone + +For loading the system on the PinePhone, please follow the instructions given +in the following article. + +:Booting Genode on the PinePhone: + + [https://genodians.org/nfeske/2021-09-20-pine-fun-pinephone-boot] + +Note that the current version is still at a rather developer-focused stage. +To avoid testimonies of a prematurely released version, we decided to postpone +the release of a ready-to-use image until the feature set generally expected +from a phone is complete and well tested. + + +ARM virtual machine monitor +=========================== + +The hardware-assisted virtual machine monitor (VMM) for ARM developed for +Genode is part of the framework since release +[https://genode.org/documentation/release-notes/15.02#Virtualization_on_ARM - 15.02]. +Over the years, it got extended to support recent ARMv8 hardware, VirtIO +device models for console, network, block, and so on. Nevertheless, the given +device models, memory dimensions, and Linux specifics like initramfs size +remained hard-coded within the VMM component, and not easily configurable. + +Now, the VMM accepts a configuration that enables one to define various +aspects of the virtual machine and guest OS. The VMM is still focused on Linux +OS guests though. Formerly, a pre-compiled flattened device-tree binary (DTB) +was used by the VMM to boot the Linux guest. The new version of the VMM +generates the DTB based on its own configuration. + +An example configuration looks like the following: + +! +! +! +! +! + +The RAM size and CPU count attributes are mandatory. All other attributes are +optional and use default values. However, it is noteworthy that you should use +the correct values for the CPU type and the Generic Interrupt Controller (GIC) +version that matches your underlying hardware. Due to the usage of +hardware-dependent virtualization extensions, the VMM and guest OS should see +the correct hardware description for CPU and interrupt controller. + + +Seoul VMM +========= + +The Seoul/Vancouver VMM - introduced to Genode with release 11.11 - is an +x86 based VMM which runs on Genode@NOVA, Genode@seL4, and Genode@Fiasco.OC on +Intel and on AMD hardware. It is used with 32-bit Linux VMs typically. + +Over the last and this year, the VMM got VirtIO support with the goal to +improve the usability when used day-to-day, e.g., on Sculpt OS. Given the +observation that most Linux guests come readily (or easy to install) equipped +with VirtIO driver support, we can avoid fiddling with building or integrating +guest drivers manually. The Seoul VMM got extended by implementations for the +VirtIO input device model, VirtIO GPU device model (2D by now) and VirtIO +audio device model. + +With the new input model, absolute mouse positions are supported, so that the +mouse pointer positions in Genode's Sculpt OS and in the guest VM can be kept +in sync. Beforehand, it was hardly possible when solely using the PS/2 model +using relative motion vectors. +With the new 2D GPU model, the mouse pointer shape of the guest VM can be +exported and shown by Genode's GUI multiplexer instead of the native mouse +pointer, which improves the visual impression and avoids confusion. +Additionally, with the new GPU model, resizeable and arbitrary resolution +dimension are possible, which was not feasible with the former VGA/VESA model. +The overall painting overhead is more manageable since partial updates are +supported by the device model. +The VirtIO audio model enables playback of music when streaming & surfing in +the VM, which was beforehand not possible because no audio model was +available. The new VirtIO models of the Seoul VMM were finally mapped to +Genode's GUI, input and audio-out session interfaces. + +Combined, the new device models improve the overall usability when using Seoul +on Sculpt OS. Several packages of alex-ab's depot are available to get +started, ranging from a full on target Debian installation over pre-packed and +ready to use VMs to up-to-date Firefox and Thunderbird VMs based on Tiny Core +Linux. Whereas the Firefox VM is entirely disposable - as mentioned in +[https://genodians.org/alex-ab/2019-03-06-disposal-browser-vm] - +the Thunderbird VM relies on persistent storage. + + +Device drivers +############## + +Uniform use of new platform-driver interface +============================================ + +In release +[https://genode.org/documentation/release-notes/22.02#Platform_driver - 22.02], +Genode's generic platform API for all architectures got introduced and the +x86-specific platform API got deprecated. However, at that point, all +x86-based device drivers still used the deprecated API and the deprecated +platform driver. With this release, all device drivers are now reworked to use +the generic platform API, and driver. The deprecated platform driver and API +have been removed. + +To make all previous scenarios work again, several changes were necessary. The +changes - especially concerning the _pci_decode_ and _platform_drv_ +components - are described in the following. + +PCI decoder +----------- + +The PCI decoder, introduced in release +[https://genode.org/documentation/release-notes/22.05#Platform_driver - 22.05], +consumes ACPI information delivered by the ACPI driver and additional platform +information from the core component. It uses this information to find and scan +PCI buses for devices and their capabilities. Finally, it creates a report +about all PCI devices found. + +While using more and more device drivers with the generic platform driver and +PCI decoder, we realized that on some platforms, not all PCI bridges are +necessarily enabled, which leaves the devices behind such a bridge unusable. +This is now fixed by enabling all PCI bridges. + +The information about reserved memory regions for PCI devices is already used +in the boot process, e.g., memory for video graphic cards is discovered by the +ACPI driver. However, the PCI decoder did not yet offer this information in +its devices report. Therefore, the platform driver did not know about the +reserved memory, and could not set up an IOMMU appropriately. From now on, +the PCI decoder reports such memory regions as follows. + +! +! ... +! +! + +The PCI memory _Base Address Registers_ (BARs) provide information about +pre-fetchable memory. This information is now additionally exported by the PCI +decoder and can be used by the platform driver (see the next section for +details). The information is presented in the following form: + +! +! ... +! +! + +Currently, the PCI decoder decides about the type of interrupt which can be +used for a PCI device. The background is that several kernels, like OKL4, +do not support the use of _Message-Signaled-Interrupts_ (MSI) or MSI-X. Older +kernels, like Pistachio, do not even support the I/O _Advanced Programmable_ +_Interrupt Controller_ (IOAPIC), and are even more limited regarding available +interrupt pins. +On kernels that support all kinds of interrupts, devices with support for MSI +or MSI-X were reported to prefer MSI-X. However, in rare cases we observed +problems with the WiFi driver on MSI-X capable hardware. Therefore, we switch +the priority of reporting MSI over MSI-X if both are available. +In addition, we experienced problems with some Intel HDAUDIO cards and MSIs. +Therefore, we do not report the MSI capability on those devices for the +time being. + + +Platform driver +--------------- + +The generic platform driver got re-worked to support the newly provided +information from the PCI decoder. The given reserved memory regions of a +device are used to add corresponding entries in the IOMMU. + +The new "prefetchable" attribute for corresponding I/O memory regions - +typically only "stolen memory" of the video graphics card - is used to decide +when I/O memory can be mapped as write-combined into the address space of the +client. Now that the platform driver decides for which I/O memory these +special paging attributes are sensible to use, the actual driver no longer +needs to distinguish special paging attributes for I/O memory. +Therefore, we removed those details from the 'io_mem' call. + +PCI devices on x86 without MSI or MSI-X support may still share the same +interrupt line. To make the generic platform driver functional on these +platforms, we had to add shared interrupt support. When the platform driver +receives its devices report, it iterates over all devices and their interrupt +resources, and detects any shared interrupts. For those interrupts, the +platform driver provides a custom IRQ service, thereby realizing the sharing. +For all other interrupts, it hands out the IRQ capability as obtained from +core directly. + +The generic platform driver can now set up MSI-X within the PCI configuration +space of a device, if the devices ROM instructs it to do so. + +The ability to power and reset PCI devices was also missing in the generic +platform driver so far. We caught up on implementing this feature. + +Several PCI enablement quirks are needed for correctly running devices and +drivers. Especially the hand-off of devices in between BIOS/UEFI and OS are an +example for this. We encountered problems when doing this too late. Therefore, +we moved the PCI quirks from the moment of first usage to the startup of the +platform driver. Moreover, PCI quirks for EHCI and HDAUDIO were added. + +VirtIO PCI devices hide several important information about their queues inside +the PCI configuration space. Now that we do not provide direct access to the +PCI configuration space to device drivers, the platform driver needs to +identify VirtIO devices, and provide the necessary information via the devices +ROM to the driver. It does so in the following way: + +! +! +! ... +! +! +! + +Sometimes a device driver is needed to set up a device but doesn't necessarily +need to stay present while the device is active. The PCIe host controller for +the i.MX 8MQ SoC described in +Section [New PCI and network drivers for NXP i.MX] is such an example. +To be able to destruct a platform resp. single device session at the platform +driver without automatically powering it off or resetting it, we introduced +the "leave_operational" attribute. As the name suggests, it leaves a device +untouched when its session gets closed. The attribute is part of the policy +node for the client within the platform driver's configuration. + +Platform driver for PC hardware +------------------------------- + +The vanished and deprecated x86-specific platform driver was able to reset a +machine via I/O port access. It did so upon observing the 'state' attribute of +the system ROM having the value "reset". +This feature is mainly used within Sculpt OS. To not lose this ability, +a platform driver specific to PCs is now part of the _repos/pc_ repository. +It shares all code and semantics with the generic platform driver, but adds +this single functionality. + +Platform API clients +-------------------- + +All remaining x86-centered device drivers got reworked to use the generic +platform API and its helper utilities in _platform_session/device.h_ and +_platform_session/dma_buffer.h_. + +The lx_kit and lx_emul layers within the _repos/dde_linux_ repository now use +one and the same generic layer too. While reworking these libraries, we +addressed a performance penalty in the interrupt handling. The multiple +opening and closing of interrupt sessions is now eliminated. +Moreover, we removed the legacy_pc_usb_host_drv from _repos/dde_linux_. + +All run-scripts and packages were revised to use the new drivers. + + +PinePhone drivers for audio, camera, and power control +====================================================== + +Over the past 18 months, we have steadily expanded the base of device drivers +for the PinePhone, initially addressing the +[https://genodians.org/nfeske/2021-12-21-pine-fun-display - display] and +[https://genodians.org/nfeske/2022-03-16-pine-fun-touchscreen - touchscreen], +later covering the +[https://genode.org/documentation/release-notes/22.02#PinePhone_modem_access - modem], +[https://genode.org/documentation/release-notes/22.05#Custom_system-control_processor__SCP__firmware - system control], +[https://genode.org/documentation/release-notes/22.08#GPU_and_Mesa_driver_for_Mali-400 - GPU], and +[https://genode.org/documentation/release-notes/22.08#SD-card_driver_for_the_PinePhone - SD-card]. +With the current release, we wrap up this line of work with drivers for +audio, camera, and power control. + +As a prerequisite step for enabling the camera, we changed the version of the +Linux kernel that we use as donor of the driver code. Up to now, we relied on +the vanilla Linux kernel for the Allwinner SoC. However, the camera support +still resides on [https://xnux.eu - Ondrej Jirman's] custom kernel +(orange-pi-5.14), which is apparently the kernel of choice for most Linux +distributions for the PinePhone. We follow suit. + + +Audio +----- + +The added audio support consists of two separate components, namely an +audio-control driver and audio in/out driver. The former controls the audio +routing and mixing on the hardware level. It is responsible to route the mic +to the modem during voice call, control the gain, or enable/disable the +speaker. The privacy-sensitive audio-control driver is meant to be part of the +base system of Sculpt. It operates according to its configuration, which can +be updated dynamically. + +Volumes can be configured by nodes within the '' node using a volume +attribute (range 0-100) where 0 implies turning off the input or output +device. Supported nodes are '', '', and ''. +Furthermore, a '' node can be used to switch the audio path between the +modem and the ARM application processor (SoC). Its 'target' attribute can be +set to either "soc" (default) or "modem". The "soc" mode implicitly sets the +codec's sample rate to 44.1 KHz whereas "modem" mode sets the sample rate to +48 KHz. This distinction is required because the modem is compatible with 8 +KHz only. The modem's 8 KHz can be cleanly converted to 48 KHz. + +In contrast to the audio-control driver, the audio in/out driver is concerned +with streaming PCM audio data to/from the ARM application processor. It allows +audio applications hosted in the user-defined runtime of Sculpt OS to record +and play audio via Genode's audio-in and audio-out session interfaces. +The combination of both drivers can be exercised via the +[https://github.com/genodelabs/genode-allwinner/blob/master/run/audio_pinephone.run - audio_pinephone.run] +script. + + +Power control +------------- + +The new power-control driver is based on our custom firmware for the A64's +system-control processor (SCP) in combination with Genode's dedicated +scp-session interface that allows Genode components to interact with the SCP. + +To properly arbitrate the access to the power-management IC (PMIC) between the +SCP firmware and the ARM application processor, the PMIC driver has been moved +entirely to the SCP side. This way, both the SCP firmware and Genode-based SCP +clients become able to safely access the PMIC without stepping on each other's +toes. In particular, the platform driver acts as an SCP client to toggle power +controls. Since the platform driver now depends on the SCP, we co-located the +formerly separate SCP driver component with the platform driver. + +Built upon this infrastructure, a new power driver exercises control over +several low-level aspects of the PinePhone hardware such as: + +* Platform reboot (via the PMIC), +* Powering down the system (via the PMIC), +* Switching between the power profiles "performance" and "economic", + which clock the ARM CPU at 1296 MHz and 816 MHz respectively, +* Reporting the remaining battery capacity, power draw, or charge current, +* Triggering the charging when connecting a charger, and +* Adjusting the backlight brightness. + +Besides being integrated in Sculpt OS, the driver can be exercised in +isolation using the +[https://github.com/genodelabs/genode-allwinner/blob/master/run/power_pinephone.run - power_pinephone.run] +script. + + +Camera +------ + +The added camera driver component consists of a port of the Linux SUN6I-CSI as +well as OV5640 and GC2145 drivers. It renders the captured camera image data +into a GUI session according to the following configuration attributes. + +The 'camera' attribute selects the camera. Supported values as "front" and +"rear". The 'width' and 'height' attributes select the horizontal and vertical +resolution. Valid configurations are 640x480 as well as 1280x720. The 'fps' +attribute selects the capture rate of the camera. Valid values are "15" and +"30". The 'format' attribute selects the capture format. The only valid value +is "yuv", which selects YUV420. The 'convert' attribute specifies if the +captured image data is converted to the pixel format suitable for the GUI +display. Default is "true". The 'rotate' attribute specifies if the capture +image data is rotated counter-clockwise and flipped. Default is 'true'. + +The integration of the driver is exemplified by the +[https://github.com/genodelabs/genode-allwinner/blob/master/run/camera_pinephone.run - camera_pinephone.run] script. +The test scenario displays the camera image on the framebuffer. It repeatedly +switches between front and rear camera. + + +New PCI and network drivers for NXP i.MX +======================================== + +PCIe host controller for i.MX 8MQ +--------------------------------- + +The i.MX 8MQ SoC includes two PCI-express host controllers. The MNT Reform 2 +laptop for example exposes both via one M.2 and one miniPCIe socket, e.g., to +drive an NVMe card and a WiFi card. In contrast to x86-based PCs, those PCIe +controllers are not set up by boot-firmware like BIOS or UEFI, but need to be +driven by the OS first. Therefore, this release contains a new PCIe driver for +the mentioned SoC. This driver does not provide a special API. It uses the +platform driver to obtain the device resources of the PCIe controller, and +enables and configures it appropriately. It then parses the PCI configuration +space of the device behind the controller, which in fact acts as PCI host +bridge. The collected device and PCI information is then exposed via the +report service analogously to the PCI decode component available for x86. +Finally, the platform driver resp. another incarnation of the platform driver +can consume this report as devices ROM, and provide the device resources to a +driver of the PCI device. + +In practice, we have tested the PCIe host controller driver in combination +with an NVMe card used in the MNT Reform 2 laptop only. Moreover, it got +integrated in Sculpt OS for the MNT Reform 2. Therefore, we had to add an +i.MX 8MQ specific driver manager. This management component is able to check +for the availability of an NVMe device, controls the driver's lifetime, and +assembles a block-device report that covers both SD-card and NVMe devices. + + +FEC Network driver +------------------ + +There is long-standing support for the _Freescale Ethernet Controller_ (FEC) +within Genode available, supporting a broad range of SoCs from i.MX 53 up to +i.MX 8. +But the existing driver port taken from Linux 4.16.3 was running shakily on +the i.MX 8MQ SoC and the i.MX 6 Sabrelite board. Instead of trying to +investigate potentially violated semantics in the legacy DDE Linux emulation +code, we ported the Linux device driver for FEC from scratch. Thereby, we've +used the recent DDE Linux porting approach, first described in the +[https://genode.org/documentation/release-notes/21.08#Linux-device-driver_environment_re-imagined - 21.08] +release. +The new driver is based on the vanilla Linux kernel 5.11 plus the MNT Reform 2 +patches provided by Lukas Hartmann, which we already use for other drivers +available in the genode-imx repository. + +To enable the driver to work correctly, it needs information about its clock +frequencies. Therefore, we have extended the platform driver for i.MX 53, and +introduced new rudimentary platform drivers specific to i.MX 6 and 7, which +expose the needed clock frequencies. + + +USB-C on i.MX 8MQ EVK +--------------------- + +The USB host controller driver for the i.MX 8MQ EVK board did not enable the +second USB host controller yet, which is connected to the USB-C socket of the +board. Now this host controller gets driven too. + + +Intel graphics +============== + +The Intel display driver was enabled to run on Intel Alderlake graphics PCs, +tested on the 12th Gen +[https://frame.work/de/en/products/laptop-12-gen-intel - Framework Laptop]. +Furthermore, the driver now supports 4K displays, tested specifically on Dell +Ultrasharp and LG 27MU67 hardware. Additionally, the driver may now be +configured to set up an upper resolution bound to avoid out-of-service +exceptions due to unexpectedly high memory needs. This feature is used by +default on Sculpt to limit resolutions to WQHD aka 1440p aka 2560x1440 pixels +and can be changed in _repos/gems/sculpt/fb_drv/default_. + + +Audio driver updated to OpenBSD 7.1 +=================================== + +We updated the audio-driver component to OpenBSD version 7.1 that brings in +support for playback on more recent 12th Gen Intel machines. Besides the +update, we remedied a long-standing shortcoming when handling multiple +HD-Audio devices and removed the support for old audio devices. + +The component contained a simple check to exclude known non-working devices +but depending on the machine's configuration, this check was incomplete. Rather +than extending the check, we took a step back and changed the probing +behavior of the component: + +![init -> audio_drv] azalia0 [8086:160c] +![init -> audio_drv] : +![init -> audio_drv] azalia0: no supported codecs +![init -> audio_drv] azalia1 [8086:9ca0] +![init -> audio_drv] : +![init -> audio_drv] azalia1: codecs: Realtek ALC292 +![init -> audio_drv] audio0 at azalia1 + +It now checks all available devices and picks the first one it can use. This +comes in handy in configurations where the virtual PCI-bus is populated with +all audio devices found in a machine and some of them contain unsupported +codecs as, among others, found on GPUs. + +Furthermore, we decided to remove the _eap_ and _auich_ drivers as these +drivers rely on I/O port access, which still had to be enabled in the +component after the switch to the new platform driver and due to being of +minor importance in daily use. The first one was mainly used to initially +develop the component and later on for testing in QEMU. The second one on the +other hand was merely enabled to provide a shot at getting audio in VirtualBox +VMs where the component did not work with the HDA device model at the time. + + +Improved ACPICA driver +====================== + +The ACPICA driver got improved support for Thinkpad notebooks to report ACPI +events and in particular battery state changes. The frequency of checking of +state changes, which are not triggered by an ACPI event, can now be configured +explicitly, which is documented in the README file of the component. + +Additionally, the ACPICA component got extended to support ACPI suspend & +resume functionality. On the one hand the component can be configured to +determine and report the supported ACPI sleep states (S1-S5) of a PC machine. +On the other hand, the component can now react on 'system' ROM changes and +participate on sleep state preparation and the subsequent wakeup procedure +using the ACPICA library, e.g., AcpiEnterSleepStatePrep, +AcpiLeaveSleepStatePrep and AcpiLeaveSleepState. + + +Wireless-networking improvements +================================ + +In the process of enabling the Intel AX211 WiFi card, DDE-Linux and the WiFi +driver were enhanced to support loading PNVM firmware files. Ultimately, a +[https://github.com/QubesOS/qubes-linux-kernel/commit/5fcfe0f19ed5ff2bd3514644afce0af642c326c6 - workaround] +from QubesOS was needed to make the card work, highlighting shared challenges +that both our projects face when using Linux drivers in unconventional ways to +improve system security. + + +Platforms +######### + +Low-level mechanism for suspend/resume on PC platforms +====================================================== + +On modern PC platforms, suspend and resume is realized by using a mechanism +provided by ACPI. The Advanced Configuration and Power Interface defines +(besides many other things) several global states (Gx) and six sleep states (Sx) +an operating system (OS) can choose. Oversimplified, the S0 state is the +normal working state, S1-S2 are light sleeping states, S3 is known as +"suspend to RAM" state, S4 is called "suspend to disk" and S5 is mostly "off". +See [https://en.wikipedia.org/wiki/ACPI#OSPM_responsibilities] for a basic +overview and further pointers for reading. + +The supported sleep states vary between PCs, some of which do not even support +all states. An operating system has to look up and determine the supported Sx +states, which are part of ACPI tables and ACPI AML code. Beginning with this +Genode release, we can use the ACPICA driver to lookup the supported Sx +states. The sleep states themselves are represented as two values (TYP_SLPa +and TYP_SLPb in ACPI specification) and are reported by the ACPICA driver. + +In order to trigger/program the intended sleep state, an OS like Genode + used +kernel has to look up and set up several ACPI tables, e.g., FACS & FADT. Via +the tables, the OS deposits a wakeup vector, which is called by the UEFI +firmware on wakeup. Before actually going to sleep, the OS has to take care to +flush all kinds of hardware cached state either to memory or persistence +storage, depending on the Sx state. + +With this release, we added principal support for S3 "suspend to RAM" in +Genode using the NOVA kernel. The kernel now supports a privileged suspend +syscall, which is solely available to Genode's core roottask. The invocation +is triggered and guarded by Genode's 'Pd::managing_system' RPC function, which +takes both TYP_SLPa and TYP_SLPb values as parameters representing the +intended Sx state. On invocation, Genode's core will check that the component +holds Genode's managing-system capability. On success, the suspend syscall of +the NOVA kernel is invoked and will lead to holding all CPUs, depositing the +wakeup vector in the ACPI tables, flushing cached state of Genode's components +to memory, like CPU registers, FPU state, IO-APIC state and virtualization +state of Intel' VMX or AMD's SVM. Finally, both TYP_SLP values will be used to +trigger the sleep state. + +On ACPI wakeup, the UEFI/BIOS firmware wakes up the NOVA kernel via the +deposited wakeup vector. The kernel re-initializes the CPU and wakes up all +other CPUs. Finally, control will be transferred to Genode's roottask (core), +which can thereby return from the 'Pd::managing_system' RPC call. + +Before and after the actual suspend and resume, the ACPICA driver should +be used to run ACPI AML methods to prepare and post-process the system state +change, which may affect the success of the Sx state transfer depending on the +used PC platform. Additionally, after resume, all hardware and their drivers +must be considered to be re-initialized. The re-initialization and re-starting +of drivers and hardware, e.g., PCI, is not finished currently. + +An early prototype for exercising this scenario is available in the form of +the _acpi_suspend.run_ script in the _libports_ repository. This test scenario +periodically suspends and resumes the hardware and also restarts the used +display driver. The low level ACPI suspend and resume can be observed to work +quite reliable, which we could validate across several generations of Intel +notebooks and some AMD desktop machines. However, the re-starting of the +display driver is not always reliable. Restarting the Intel display driver +worked notably well on older Thinkpad notebooks, e.g., X201 and T420. + +Note that the suspend/resume feature is still work in progress. The next +potential work items are the addition of suspend/resume support to the base-hw +kernel, ways to power-off and power-on (PCI) hardware, e.g.,via the new +platform driver, and re-initializing and/or re-starting drivers. Additionally, +a convenient way to debug resume issues is desired when no serial output is +working anymore after resume. + + +Base-HW microkernel +=================== + +The base-hw kernel, which was specifically developed for Genode, did not +provide the use of _Message-Signaled-Interrupts_ (MSI), and MSI-X yet. With +this release, x86 architectural support for MSI and MSI-X entered the base-hw +kernel. The usage of MSI or legacy interrupts is transparent to the user. It +gets determined in the interplay of the PCI decode component, platform driver, +and core. + + +NOVA microhypervisor +==================== + +Besides the added ACPI suspend/resume support described in +Section [Low-level mechanism for suspend/resume on PC platforms], the kernel +received principal support to run on more than 32 CPUs. By default, Genode's +and the kernel's CPU limit is set to 64, configurable by the constants +MAX_SUPPORTED_CPUS in Genode's core respectively NUM_CPU in the kernel. +In our tests, up to 250 CPUs were usable in Qemu. + + +Build system and tools +###################### + +Streamlined building of libraries +================================= + +The release adds special handling for 'lib/' arguments to the build +system, which supersedes the former 'LIB=' mechanism. Whereas the old +mechanism was limited to a single library, the new convention allows multiple +library arguments, similar to regular targets. + +The change brings two immediate benefits. First, the streamlining of library +and target arguments allows for the building of libraries via the 'build' +command of the run tool. Second, it alleviates the need for pseudo _target.mk_ +files for building shared libraries that have no direct dependencies, in +particular VFS plugins. + +Note that _target.mk_ files located under _src/lib/_ are no longer reachable. +Therefore, all run scripts that used to trigger the build of a shared library +via a pseudo target must be adapted. E.g., 'build lib/vfs/tap' must be +replaced by 'build lib/vfs_tap'. + +The former 'LIB=' option is no longer supported. + + +Boot-loading over HTTP +====================== + +The standard network-boot approach for x86 at Genode Labs has been a +combination of the PC-integrated Preboot Execution Environment (PXE), the +Pulsar boot loader, and the TFTP protocol for years. Because Pulsar is tied +to legacy BIOS interfaces, UEFI-only hardware demands for alternatives. iPXE +is a field-tested, UEFI-compatible alternative that is already supported in +Genode's run tool via _load/ipxe_. + +One of the prominent features of iPXE is the support for additional network +(boot) protocols beyond TFTP with HTTP as a tempting option to improve boot +performance. This release enhances the _load/ipxe_ run module to optionally +configure and spawn the lightweight HTTP server _lighttpd_ to serve the boot +image to iPXE using the following declarations in _etc/build.conf_. + +! RUN_OPT += --include load/ipxe +! RUN_OPT += --load-ipxe-base-dir /tftpboot +! RUN_OPT += --load-ipxe-boot-dir /ipxe +! RUN_OPT += --load-ipxe-lighttpd +! RUN_OPT += --load-ipxe-lighttpd-port 2209 + +The HTTP server is run only while the run tool is executed, killed on exit, +and limited to serve the contents of the test-specific directory under +_var/run/_ in your build directory. Your iPXE boot loader should be configured +to chain the automatically generated _boot.cfg_ file as follows. + +! #!ipxe +! chain http://:2209/boot.cfg + +For more details, please refer to the dedicated Genodians.org article. + +:Getting Fujitsu U7411 up and running - Network Boot: + + [https://genodians.org/chelmuth/2022-11-24-u7411-up-and-running] + + +Configurable Intel HWP mode +=========================== + +We updated our version of the Bender chain-boot loader to be configurable +regarding the mode in which to run Intel's Hardware P-States (HWP). When +running Genode on NOVA, the HWP mode can now be controlled via the new run +option '--bender-intel-hwp-mode'. The option responds to the values 'off', +'performance', 'balanced', and 'power_saving'. The default value is +'performance' in order to stay backwards compatible. On kernels other than +NOVA, HWP remains turned off in general. From 65135f5f7a72c121399fdbfd993208b07c1e12db Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 30 Nov 2022 12:21:30 +0100 Subject: [PATCH 0109/1921] News item for version 22.11 --- doc/news.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/news.txt b/doc/news.txt index 46f5b2cd18..642471c122 100644 --- a/doc/news.txt +++ b/doc/news.txt @@ -4,6 +4,39 @@ =========== +Genode OS Framework release 22.11 | 2022-11-30 +############################################## + +| Genode 22.11 enables hardware-accelerated graphics on up-to-date Intel +| GEN12+ hardware, introduces work flows for hardware-software co-design, +| wraps up the framework's unified device-driver infrastructure across PC and +| ARM, and pushes forward the use of Genode on the PinePhone. + +The Genode OS framework is both a dependable foundation for custom operating +systems - like Sculpt OS - and at the same time a playground for new ideas. +The just released version 22.11 pays tribute to both facets. On the one hand, +it features the results of our year-long effort of unifying and simplifying +the framework's device-driver infrastructure across all base platforms, which +subjects the interaction of driver components with device hardware to an +unprecedentedly rigid regime of least privilege. This makes Genode-based +systems ever more dependable and clear. + +The role of Genode as a playground for innovation is embodied by the +combination of the framework with reconfigurable hardware. The release +introduces new work flows for designing hardware IP cores and Genode +components in tandem, which allows for low-complexity software-hardware +co-designs that fit like a glove. + +Feature-wise, the new version covers a vast area of topics. The enhancement of +our Intel GPU multiplexer to current GEN12+ hardware stands out most. Further +topics range from the emerging user interface for Genode on the PinePhone, +over plenty of device-driver work, to virtualization improvements on ARM and +PC hardware. + +These and many more topics of the new version are covered by the official +[https:/documentation/release-notes/22.11 - release documentation of version 22.11...] + + Sculpt OS release 22.10 | 2022-10-13 #################################### From aa2f61fa0ec30daae76e7523f8dc2f608b890780 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 30 Nov 2022 07:49:58 +0100 Subject: [PATCH 0110/1921] depot: update recipe hashes --- repos/ports/recipes/src/tar/hash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/ports/recipes/src/tar/hash b/repos/ports/recipes/src/tar/hash index 4b78c4a7ab..bf704cef47 100644 --- a/repos/ports/recipes/src/tar/hash +++ b/repos/ports/recipes/src/tar/hash @@ -1 +1 @@ -2022-08-30 eee4bdb8fc6c646fadaa77291a85accc314fe60f +2022-11-29 85985a7e89f9239eb17110b04d22e41ca3f1847f From f44b16eaa3197dacf0aebe6d8f2f49d0c5f47e2a Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 30 Nov 2022 12:24:29 +0100 Subject: [PATCH 0111/1921] version: 22.11 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 54de1e741d..8b84b727be 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -22.08 +22.11 From 2dae1e05044297e90ebe7696df6dc74e909414e7 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 30 Nov 2022 14:38:55 +0100 Subject: [PATCH 0112/1921] Adjust image name in release_notes/22-11.txt --- doc/release_notes/22-11.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/release_notes/22-11.txt b/doc/release_notes/22-11.txt index 03d3323929..06e54b3794 100644 --- a/doc/release_notes/22-11.txt +++ b/doc/release_notes/22-11.txt @@ -114,7 +114,7 @@ These changes are bundled into the new _drivers_fpga-zynq_ subsystem. The figure below illustrates how this subsystem is used as a replacement for the platform driver. -[image zynq_driver_manager] +[image zynq_driver_manager_22_11] Just as the standard platform driver, the subsystem expects a 'policy' and 'devices' ROM. In addition, we must provide it with a _devices_manager.config_ From 4c5db31110ccbdadb89d495c2e6b5189253fc379 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 1 Dec 2022 11:47:32 +0100 Subject: [PATCH 0113/1921] base: ld-.abi.so depends on symbol.map This prevents errors like the following during parallel builds. MERGE ld-hw.abi.so /usr/local/genode/tool/21.05/bin/genode-arm-ld:symbol.map:0: syntax error in VERSION script --- repos/base/lib/mk/ld-platform.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/repos/base/lib/mk/ld-platform.inc b/repos/base/lib/mk/ld-platform.inc index 9b80296614..c7f983d1c1 100644 --- a/repos/base/lib/mk/ld-platform.inc +++ b/repos/base/lib/mk/ld-platform.inc @@ -20,6 +20,7 @@ SYMBOLS := $(BASE_DIR)/lib/symbols/ld # Generate symbol map from the ABI # $(LIB).lib.so: symbol.map +$(LIB).abi.so: symbol.map symbol.map: $(MAKEFILE_LIST) symbol.map: $(BASE_DIR)/lib/symbols/ld $(MSG_CONVERT)$@ From f3fc11713a8c2137538fee0411c1ff28e9aff38f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 1 Dec 2022 13:51:58 +0100 Subject: [PATCH 0114/1921] sculpt: re-enable inspect view by default The inspect view got accidentally disabled by commit "sculpt: make graph features configurable". --- repos/gems/src/app/sculpt_manager/feature.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/src/app/sculpt_manager/feature.h b/repos/gems/src/app/sculpt_manager/feature.h index 185a942027..a37c53f3fb 100644 --- a/repos/gems/src/app/sculpt_manager/feature.h +++ b/repos/gems/src/app/sculpt_manager/feature.h @@ -28,7 +28,7 @@ struct Sculpt::Feature static constexpr bool STORAGE_DIALOG_HOSTED_IN_GRAPH = true; /* allow the browsing of file systems via the inspect view */ - static constexpr bool INSPECT_VIEW = false; + static constexpr bool INSPECT_VIEW = true; }; #endif /* _FEATURE_H_ */ From f10c470969ccf367dc91a4fb747a4a23c733fd1b Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 1 Dec 2022 20:08:35 +0100 Subject: [PATCH 0115/1921] sculpt_manager: fix router label lookup The commit "sculpt_manager: relax nic_drv policy label" introduced the use of the "label_prefix" attribute instead of "label" for the uplink policy in the NIC router. However, it missed an appropriate adaption of the lookup of that attribute when the Sculpt manager has to decide which uplink is used in a manually managed router config. This caused the uplink to disappear whenever a user created a manually managed router config. This commit fixes the problem. Issue #4660 Fixes #4695 --- repos/gems/src/app/sculpt_manager/network.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/network.cc b/repos/gems/src/app/sculpt_manager/network.cc index 212b05eab5..bca00fe340 100644 --- a/repos/gems/src/app/sculpt_manager/network.cc +++ b/repos/gems/src/app/sculpt_manager/network.cc @@ -174,13 +174,13 @@ void Sculpt::Network::_update_nic_target_from_config(Xml_node const &config) if (uplink.attribute_value("domain", String<16>()) != "uplink") return; - if (uplink.attribute_value("label", String<16>()) == "nic_drv -> ") + if (uplink.attribute_value("label_prefix", String<16>()) == "nic_drv -> ") result = Nic_target::WIRED; - if (uplink.attribute_value("label", String<16>()) == "wifi_drv -> ") + if (uplink.attribute_value("label_prefix", String<16>()) == "wifi_drv -> ") result = Nic_target::WIFI; - if (uplink.attribute_value("label", String<16>()) == "usb_net -> ") + if (uplink.attribute_value("label_prefix", String<16>()) == "usb_net -> ") result = Nic_target::MODEM; }); return result; From a9383dfa79744f76c7626840165aa80f4e07e004 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 30 Nov 2022 17:02:59 +0100 Subject: [PATCH 0116/1921] run/image/uboot: use gzip --fast by default By making the use of gzip's '--best' option configurable and disabling it by default, this patch noticably reduces the built-test cycle from 15 to 10 seconds when integrating the Sculpt system image for the PinePhone. Fixes #4693 --- tool/run/image/uboot | 21 ++++++++++++++++++++- tool/run/image/uboot_fit | 15 ++++++++++++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/tool/run/image/uboot b/tool/run/image/uboot index 5cf5f1ed44..d17e21fa40 100644 --- a/tool/run/image/uboot +++ b/tool/run/image/uboot @@ -11,12 +11,31 @@ proc image_uboot_use_no_gzip { } { return [get_cmd_switch --image-uboot-no-gzip] } +## +# Make gzip compression more aggressive +# +# Using this option reduces the image size by circa 10%. But it comes at the +# cost of significantly slowing down the gzip step for large images (e.g., 6 +# seconds instead of 2 seconds for a image of 13 MiB). The option is suitable +# when building a release. But for quick build-test cycles, it is best keep +# it disabled. +# +proc image_uboot_gzip_opt { } { + if {[get_cmd_switch --image-uboot-gzip-best]} { + return "--best" + } else { + return "--fast" + } +} + + ## # Build U-boot bootloader specific uImage # # \param elf_img ELF binary to build uImage from # proc run_image {elf_img} { + # parse ELF entrypoint and load address set entrypoint [exec [cross_dev_prefix]readelf -h $elf_img | \ grep "Entry point address: " | \ @@ -34,7 +53,7 @@ proc run_image {elf_img} { # compress ELF if $use_gzip { - exec gzip --best --force $bin_img + exec gzip [image_uboot_gzip_opt] --force $bin_img set bin_ext .gz set compress_type gzip } diff --git a/tool/run/image/uboot_fit b/tool/run/image/uboot_fit index 801777a24f..51309cdc6c 100644 --- a/tool/run/image/uboot_fit +++ b/tool/run/image/uboot_fit @@ -10,6 +10,19 @@ # proc image_uboot_use_no_gzip { } { return [get_cmd_switch --image-uboot-no-gzip] } +## +# Make gzip compression more aggressive +# +# Please refer to the comment in run/image/uboot. +# +proc image_uboot_gzip_opt { } { + if {[get_cmd_switch --image-uboot-gzip-best]} { + return "--best" + } else { + return "--fast" + } +} + ## # Build U-boot bootloader specific image.itb @@ -34,7 +47,7 @@ proc run_image {elf_img} { # compress ELF if $use_gzip { - exec gzip --best --force $bin_img + exec gzip [image_uboot_gzip_opt] --force $bin_img set bin_ext .gz set compress_type gzip } From ed9a8299b2c024b1e3c9611e919e1a09081ae8a2 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 1 Dec 2022 12:18:42 +0100 Subject: [PATCH 0117/1921] run/image/uboot: merge with uboot_fit Both modules were quite similar except the the name of the FIT image (image.itb) and the mkimage command line. FIT images are now produced by the following RUN_OPT. RUN_OPT += --include image/uboot --image-uboot-fit Issue #4693 --- tool/run/image/uboot | 20 +++++++++---- tool/run/image/uboot_fit | 63 ---------------------------------------- 2 files changed, 15 insertions(+), 68 deletions(-) delete mode 100644 tool/run/image/uboot_fit diff --git a/tool/run/image/uboot b/tool/run/image/uboot index d17e21fa40..abc3bf8b0a 100644 --- a/tool/run/image/uboot +++ b/tool/run/image/uboot @@ -1,7 +1,8 @@ ## -# Build U-boot bootloader specific uImage +# Build U-boot bootloader specific uImage/image.itb # # \param --image-uboot-no-gzip do not gzip the uImage +# \param --image-uboot-fit build image.itb FIT image # @@ -10,6 +11,8 @@ # proc image_uboot_use_no_gzip { } { return [get_cmd_switch --image-uboot-no-gzip] } +proc image_uboot_use_fit { } { return [get_cmd_switch --image-uboot-fit] } + ## # Make gzip compression more aggressive @@ -61,9 +64,16 @@ proc run_image {elf_img} { set arch "arm" if {[have_spec arm_64]} { set arch "arm64" } - # create uImage - set uboot_img [run_dir]/uImage - exec mkimage -A $arch -O linux -T kernel -C $compress_type -a $load_addr \ - -e $entrypoint -d $bin_img$bin_ext $uboot_img + if {[image_uboot_use_fit]} { + # create image.itb + set uboot_img [run_dir]/image.itb + exec mkimage -f auto -A $arch -O linux -T kernel -C $compress_type -a $load_addr \ + -e $entrypoint -d $bin_img$bin_ext $uboot_img + } else { + # create uImage + set uboot_img [run_dir]/uImage + exec mkimage -A $arch -O linux -T kernel -C $compress_type -a $load_addr \ + -e $entrypoint -d $bin_img$bin_ext $uboot_img + } exec rm -rf $bin_img$bin_ext } diff --git a/tool/run/image/uboot_fit b/tool/run/image/uboot_fit deleted file mode 100644 index 51309cdc6c..0000000000 --- a/tool/run/image/uboot_fit +++ /dev/null @@ -1,63 +0,0 @@ -## -# Build U-boot bootloader specific image.itb (FIT image) -# -# \param --image-uboot-no-gzip do not gzip the image.itb -# - - -## -# Check if the image.itb should be gzipped -# -proc image_uboot_use_no_gzip { } { return [get_cmd_switch --image-uboot-no-gzip] } - -## -# Make gzip compression more aggressive -# -# Please refer to the comment in run/image/uboot. -# -proc image_uboot_gzip_opt { } { - if {[get_cmd_switch --image-uboot-gzip-best]} { - return "--best" - } else { - return "--fast" - } -} - - -## -# Build U-boot bootloader specific image.itb -# -# \param elf_img ELF binary to build image.itb from -# -proc run_image {elf_img} { - # parse ELF entrypoint and load address - set entrypoint [exec [cross_dev_prefix]readelf -h $elf_img | \ - grep "Entry point address: " | \ - sed -e "s/.*Entry point address: *//"] - set load_addr [exec [cross_dev_prefix]readelf -l $elf_img | \ - grep -m 1 "LOAD"] - set load_addr [lindex [regexp -inline -all -- {\S+} $load_addr] 3] - - set bin_img "[run_dir]/image.bin" - exec [cross_dev_prefix]objcopy -O binary $elf_img $bin_img - - set use_gzip [expr ![image_uboot_use_no_gzip]] - set compress_type none - set bin_ext "" - - # compress ELF - if $use_gzip { - exec gzip [image_uboot_gzip_opt] --force $bin_img - set bin_ext .gz - set compress_type gzip - } - - set arch "arm" - if {[have_spec arm_64]} { set arch "arm64" } - - # create image.itb - set uboot_img [run_dir]/image.itb - exec mkimage -f auto -A $arch -O linux -T kernel -C $compress_type -a $load_addr \ - -e $entrypoint -d $bin_img$bin_ext $uboot_img - exec rm -rf $bin_img$bin_ext -} From 83ac80460e4a4169ac6bd161412865aabf17c15d Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 5 Dec 2022 16:37:21 +0100 Subject: [PATCH 0118/1921] depot: update recipe hashes --- repos/base-fiasco/recipes/src/base-fiasco/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash | 2 +- repos/base-foc/recipes/src/base-foc-pbxa9/hash | 2 +- repos/base-foc/recipes/src/base-foc-pc/hash | 2 +- repos/base-foc/recipes/src/base-foc-rpi3/hash | 2 +- repos/base-linux/recipes/src/base-linux/hash | 2 +- repos/base-nova/recipes/src/base-nova/hash | 2 +- repos/base-okl4/recipes/src/base-okl4/hash | 2 +- repos/base-pistachio/recipes/src/base-pistachio/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-x86/hash | 2 +- repos/gems/recipes/pkg/cbe_demo/hash | 2 +- repos/gems/recipes/pkg/cbe_vbox5-nova/hash | 2 +- repos/gems/recipes/pkg/sculpt/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution-pc/hash | 2 +- repos/gems/recipes/src/sculpt_manager/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-capture/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-sculpt/hash | 2 +- repos/ports/recipes/src/tar/hash | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/repos/base-fiasco/recipes/src/base-fiasco/hash b/repos/base-fiasco/recipes/src/base-fiasco/hash index e12e57b43e..52d0f3a12f 100644 --- a/repos/base-fiasco/recipes/src/base-fiasco/hash +++ b/repos/base-fiasco/recipes/src/base-fiasco/hash @@ -1 +1 @@ -2022-11-28 1e6b88f19291c5ea31d5d9aa16b63e7033a5ddfc +2022-12-04 c460223102ff4ca497dc3922c8218599c5abf6ad diff --git a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash index 5f5e102911..38f594e03f 100644 --- a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash +++ b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-11-28 b0df14ef1352c15d64689521c5862846dd4b81a4 +2022-12-04 12e2606c26b1a520c4ba429a363566ced6c9ef22 diff --git a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash index 4de370930a..547b44055b 100644 --- a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash +++ b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash @@ -1 +1 @@ -2022-11-28 65b44578983ce5e6c566e5d9b38774c32c5f7d23 +2022-12-04 1b0f85f8688b2ac616e0f3ff06477b85138b3a39 diff --git a/repos/base-foc/recipes/src/base-foc-pbxa9/hash b/repos/base-foc/recipes/src/base-foc-pbxa9/hash index 49b3cb050d..b4dd2bc318 100644 --- a/repos/base-foc/recipes/src/base-foc-pbxa9/hash +++ b/repos/base-foc/recipes/src/base-foc-pbxa9/hash @@ -1 +1 @@ -2022-11-28 b2b92bface9bf00840bc740c60cee4ff4f253962 +2022-12-04 beba17b0bbe249ec52f8070bf77237d03f0b7ddb diff --git a/repos/base-foc/recipes/src/base-foc-pc/hash b/repos/base-foc/recipes/src/base-foc-pc/hash index 20c597e0cc..740b3664ed 100644 --- a/repos/base-foc/recipes/src/base-foc-pc/hash +++ b/repos/base-foc/recipes/src/base-foc-pc/hash @@ -1 +1 @@ -2022-11-28 cb25553ebce32eda79ab40e29a3fe90ede14a4cc +2022-12-04 f826326965acf2694a79ed89fe6357276a3b08fb diff --git a/repos/base-foc/recipes/src/base-foc-rpi3/hash b/repos/base-foc/recipes/src/base-foc-rpi3/hash index fdee2a6a18..7934d47e6f 100644 --- a/repos/base-foc/recipes/src/base-foc-rpi3/hash +++ b/repos/base-foc/recipes/src/base-foc-rpi3/hash @@ -1 +1 @@ -2022-11-28 e90271cb55b3de3dc64ce3e4d1837b116ce5055d +2022-12-04 e2ad9dc4c5ae4dc1e41cd2ac0618c485ff889e11 diff --git a/repos/base-linux/recipes/src/base-linux/hash b/repos/base-linux/recipes/src/base-linux/hash index 7e3d482548..3d0b23c103 100644 --- a/repos/base-linux/recipes/src/base-linux/hash +++ b/repos/base-linux/recipes/src/base-linux/hash @@ -1 +1 @@ -2022-11-28 d78d2f81477107346595c31af10102c2156cbd9b +2022-12-04 2400c8929ba380ffef2f927567b01e20e1905596 diff --git a/repos/base-nova/recipes/src/base-nova/hash b/repos/base-nova/recipes/src/base-nova/hash index fecbccd4a6..13d0914dae 100644 --- a/repos/base-nova/recipes/src/base-nova/hash +++ b/repos/base-nova/recipes/src/base-nova/hash @@ -1 +1 @@ -2022-11-28 f388f10a62eba224e23b8f19c87d727f621d11d2 +2022-12-04 c12a954f62488628ee805a062264b4410f4a4776 diff --git a/repos/base-okl4/recipes/src/base-okl4/hash b/repos/base-okl4/recipes/src/base-okl4/hash index 5799da9d56..3f3611f471 100644 --- a/repos/base-okl4/recipes/src/base-okl4/hash +++ b/repos/base-okl4/recipes/src/base-okl4/hash @@ -1 +1 @@ -2022-11-28 30ef28067f7ff2cd514855ee57ab07016eb25cfd +2022-12-04 b8b1d6bcf778764af2266a4643a42343a1b2985b diff --git a/repos/base-pistachio/recipes/src/base-pistachio/hash b/repos/base-pistachio/recipes/src/base-pistachio/hash index 9c02cab8eb..9a37bce198 100644 --- a/repos/base-pistachio/recipes/src/base-pistachio/hash +++ b/repos/base-pistachio/recipes/src/base-pistachio/hash @@ -1 +1 @@ -2022-11-28 790b1cf70551a6d848a49d632db81f216e5d726d +2022-12-04 446756851ef62eaeb503c9a7830ca47ffb321a1f diff --git a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash index 7cc3b6596f..a815576d2c 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-11-28 9921532782c7b3fe76c985ec9199ebd2ef8a2b98 +2022-12-04 1423e125429684cf1ce9d1ef5f58ebc1345ea97e diff --git a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash index a2b3baef80..e7e7c3070f 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash @@ -1 +1 @@ -2022-11-28 7ee9377b56e69d827266421737fba55de39ee1e2 +2022-12-04 01c67ea5484e85c45ad86cf6d13afc8d915ea4b9 diff --git a/repos/base-sel4/recipes/src/base-sel4-x86/hash b/repos/base-sel4/recipes/src/base-sel4-x86/hash index cf1d9c6acc..94a436b2cb 100644 --- a/repos/base-sel4/recipes/src/base-sel4-x86/hash +++ b/repos/base-sel4/recipes/src/base-sel4-x86/hash @@ -1 +1 @@ -2022-11-28 a046500de5f9853cc4de0a5e9602bdbc3c7d4e62 +2022-12-04 140ba8760c9a7c30c76dcf8be5e05970ff1bcc79 diff --git a/repos/gems/recipes/pkg/cbe_demo/hash b/repos/gems/recipes/pkg/cbe_demo/hash index b8c3120842..bc356c89a0 100644 --- a/repos/gems/recipes/pkg/cbe_demo/hash +++ b/repos/gems/recipes/pkg/cbe_demo/hash @@ -1 +1 @@ -2022-11-28 a0e5607602730c0e8e25e662561b2673d6d3ff15 +2022-12-04 7bb3afba4392c8a758292616b38f2ef9ca760077 diff --git a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash index f497d3a6bf..17a5014b70 100644 --- a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash +++ b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash @@ -1 +1 @@ -2022-11-28 20722cb85427a061a88ac50b3c3a6184bba059af +2022-12-04 dffe13b5ad290b0822e27655379d14cece73dda3 diff --git a/repos/gems/recipes/pkg/sculpt/hash b/repos/gems/recipes/pkg/sculpt/hash index 6d6a9b2c9d..21f485d406 100644 --- a/repos/gems/recipes/pkg/sculpt/hash +++ b/repos/gems/recipes/pkg/sculpt/hash @@ -1 +1 @@ -2022-11-28 8fb87a439d220a2c2de46b279e22cffe96f3eeaf +2022-12-04 336e36c9780fdc8106b57910fcf8da9655d44b20 diff --git a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash index 35d501c330..7b792814bb 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash @@ -1 +1 @@ -2022-11-28 f3274565245f683fcff0792daa880bc9aa8b63d8 +2022-12-04 eec6608e1861b4217b32b2c418eb41041de40d3a diff --git a/repos/gems/recipes/src/sculpt_manager/hash b/repos/gems/recipes/src/sculpt_manager/hash index 6fd609a782..86b81d7542 100644 --- a/repos/gems/recipes/src/sculpt_manager/hash +++ b/repos/gems/recipes/src/sculpt_manager/hash @@ -1 +1 @@ -2022-11-28 7ac521181bf9719a308aca32a4284648dd54c1bf +2022-12-04 39694aec44b518afb97f720ded84496ca534680f diff --git a/repos/ports/recipes/pkg/vbox5-nova-capture/hash b/repos/ports/recipes/pkg/vbox5-nova-capture/hash index 00549d2eab..4f89ddae73 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-capture/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-capture/hash @@ -1 +1 @@ -2022-11-28 1b04dcdbd1c7ba6796a3082ea82e1f0bb523cd8c +2022-12-04 4c1edfaedecf2c66b3a320b3ff7686523237ea15 diff --git a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash index 41375d4417..03524febb1 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash @@ -1 +1 @@ -2022-11-28 d68191df5bf9a5a0463c42cd2b69aaa9721f80d7 +2022-12-04 ace38cff46ba3063f7b3b94ab7833a797312c486 diff --git a/repos/ports/recipes/src/tar/hash b/repos/ports/recipes/src/tar/hash index bf704cef47..bf3f18d3f4 100644 --- a/repos/ports/recipes/src/tar/hash +++ b/repos/ports/recipes/src/tar/hash @@ -1 +1 @@ -2022-11-29 85985a7e89f9239eb17110b04d22e41ca3f1847f +2022-12-04 c329142ada5234cc7f4542fba0e74e86f4ef0775 From 377f2166a131835cbab90d4fc33998f83b3738e2 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 1 Dec 2022 11:38:03 +0100 Subject: [PATCH 0119/1921] nova: support detection of Intel P & E CPUs Fixes #4694 --- .../base-nova/include/nova/syscall-generic.h | 70 +++++++++++++++---- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- repos/base-nova/src/core/include/platform.h | 4 +- repos/base-nova/src/core/platform.cc | 28 ++++++-- 5 files changed, 80 insertions(+), 26 deletions(-) diff --git a/repos/base-nova/include/nova/syscall-generic.h b/repos/base-nova/include/nova/syscall-generic.h index a9194569c4..1e6a117609 100644 --- a/repos/base-nova/include/nova/syscall-generic.h +++ b/repos/base-nova/include/nova/syscall-generic.h @@ -7,7 +7,7 @@ */ /* - * Copyright (c) 2009 Genode Labs + * Copyright (c) 2009-2022 Genode Labs * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -144,6 +144,9 @@ namespace Nova { uint8_t platform:3; uint8_t reserved:1; uint32_t patch; + + bool p_core() const { return flags & 0x2; } + bool e_core() const { return flags & 0x4; } } __attribute__((packed)); unsigned cpu_max() const { @@ -176,38 +179,75 @@ namespace Nova { /** * Map kernel cpu ids to virtual cpu ids. */ - bool remap_cpu_ids(uint8_t *map_cpus, unsigned const boot_cpu) const { + bool remap_cpu_ids(uint16_t *map_cpus, unsigned const boot_cpu) const + { unsigned const num_cpus = cpus(); unsigned cpu_i = 0; /* assign boot cpu ever the virtual cpu id 0 */ Cpu_desc const * const boot = cpu_desc_of_cpu(boot_cpu); - if (!boot || !is_cpu_enabled(boot_cpu)) + if (!boot || !is_cpu_enabled(boot_cpu) || boot->e_core()) return false; map_cpus[cpu_i++] = (uint8_t)boot_cpu; if (cpu_i >= num_cpus) return true; - /* assign remaining cores and afterwards all threads to the ids */ - for (uint8_t package = 0; package < 255; package++) { - for (uint8_t core = 0; core < 255; core++) { - for (uint8_t thread = 0; thread < 255; thread++) { + /* assign cores + SMT threads first and skip E-cores */ + bool done = for_all_cpus([&](auto const &cpu, auto const kernel_cpu_id) { + if (kernel_cpu_id == boot_cpu) + return false; + + /* handle normal or P-core */ + if (cpu.e_core()) + return false; + + map_cpus[cpu_i++] = (uint8_t)kernel_cpu_id; + return (cpu_i >= num_cpus); + }); + + /* assign remaining E-cores */ + if (!done) { + done = for_all_cpus([&](auto &cpu, auto &kernel_cpu_id) { + if (kernel_cpu_id == boot_cpu) + return false; + + /* handle solely E-core */ + if (!cpu.e_core()) + return false; + + map_cpus[cpu_i++] = (uint16_t)kernel_cpu_id; + return (cpu_i >= num_cpus); + }); + } + + return done; + } + + /** + * Iterate over all CPUs in a _ever_ _consistent_ order. + */ + template + bool for_all_cpus(FUNC const &func) const + { + for (uint16_t package = 0; package <= 255; package++) { + for (uint16_t core = 0; core <= 255; core++) { + for (uint16_t thread = 0; thread <= 255; thread++) { for (unsigned i = 0; i < cpu_max(); i++) { - if (i == boot_cpu || !is_cpu_enabled(i)) + if (!is_cpu_enabled(i)) continue; - Cpu_desc const * const c = cpu_desc_of_cpu(i); - if (!c) + auto const cpu = cpu_desc_of_cpu(i); + if (!cpu) continue; - if (!(c->package == package && c->core == core && - c->thread == thread)) + if (!(cpu->package == package && cpu->core == core && + cpu->thread == thread)) continue; - map_cpus[cpu_i++] = (uint8_t)i; - if (cpu_i >= num_cpus) - return true; + bool done = func(*cpu, i); + if (done) + return done; } } } diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index b4fec77779..f74809600d 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -5e7fa1e56f6ebe1a5c88d7e5278585c543ca3cf3 +39b7b44c4390340ab7b743044ce3fa4301812fd6 diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index 1d8fd79361..8b460f691a 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := 0a54bd120ee15672089a0fcacef3b02cc0db523b +REV(nova) := 1e041c00030120392714ba74ef13b1225ccbc1a2 DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) diff --git a/repos/base-nova/src/core/include/platform.h b/repos/base-nova/src/core/include/platform.h index d992f32b40..615a90aa2e 100644 --- a/repos/base-nova/src/core/include/platform.h +++ b/repos/base-nova/src/core/include/platform.h @@ -6,7 +6,7 @@ */ /* - * Copyright (C) 2009-2017 Genode Labs GmbH + * Copyright (C) 2009-2022 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -49,7 +49,7 @@ namespace Genode { Affinity::Space _cpus; /* map of virtual cpu ids in Genode to kernel cpu ids */ - uint8_t map_cpu_ids[MAX_SUPPORTED_CPUS]; + uint16_t map_cpu_ids[MAX_SUPPORTED_CPUS]; addr_t _map_pages(addr_t phys_page, addr_t pages, bool guard_page = false); diff --git a/repos/base-nova/src/core/platform.cc b/repos/base-nova/src/core/platform.cc index 111edf17de..e3e5a6e258 100644 --- a/repos/base-nova/src/core/platform.cc +++ b/repos/base-nova/src/core/platform.cc @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 2009-2017 Genode Labs GmbH + * Copyright (C) 2009-2022 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -309,7 +309,7 @@ Platform::Platform() { Hip const &hip = *(Hip *)__initial_sp; /* check for right API version */ - if (hip.api_version != 8) + if (hip.api_version != 9) nova_die(); /* determine number of available CPUs */ @@ -732,9 +732,19 @@ Platform::Platform() xml.attribute("freq_khz" , hip.tsc_freq); }); xml.node("cpus", [&] () { - hip.for_each_enabled_cpu([&](Hip::Cpu_desc const &cpu, unsigned i) { + for_each_location([&](Affinity::Location &location) { + unsigned const kernel_cpu_id = Platform::kernel_cpu_id(location); + auto const cpu_ptr = hip.cpu_desc_of_cpu(kernel_cpu_id); + + if (!cpu_ptr) + return; + + auto const &cpu = *cpu_ptr; + xml.node("cpu", [&] () { - xml.attribute("id", i); + xml.attribute("xpos", location.xpos()); + xml.attribute("ypos", location.ypos()); + xml.attribute("id", kernel_cpu_id); xml.attribute("package", cpu.package); xml.attribute("core", cpu.core); xml.attribute("thread", cpu.thread); @@ -743,6 +753,8 @@ Platform::Platform() xml.attribute("stepping", String<5>(Hex(cpu.stepping))); xml.attribute("platform", String<5>(Hex(cpu.platform))); xml.attribute("patch", String<12>(Hex(cpu.patch))); + if (cpu.p_core()) xml.attribute("cpu_type", "P"); + if (cpu.e_core()) xml.attribute("cpu_type", "E"); }); }); }); @@ -780,11 +792,13 @@ Platform::Platform() Genode::String<16> text ("failure"); if (cpu) text = Genode::String<16>(cpu->package, ":", - cpu->core, ":", cpu->thread); + cpu->core, ":", cpu->thread, + cpu->e_core() ? " E" : + cpu->p_core() ? " P" : ""); log(" remap (", location.xpos(), "x", location.ypos(),") -> ", - kernel_cpu_id, " - ", text, ") ", - boot_cpu() == kernel_cpu_id ? "boot cpu" : ""); + kernel_cpu_id, " - ", text, + boot_cpu() == kernel_cpu_id ? " boot cpu" : ""); }); } From 8661936d7de17d645b10a781f0d2330656fe43e3 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 5 Dec 2022 16:21:26 +0100 Subject: [PATCH 0120/1921] base: aquire context mutex in local_submit() Some signal-heavy scenarios (e.g., libc_integration) produced the following warning that hinted a data race on signal data in the context object. Warning: returning signal with num == 0 The cause was the use of Signal_context::local_submit() in the libc introduced in 424ed1b79a4 libc: remove Reconstructible / use local_submit in kernel in combination with a missing context-mutex aquisition resulting in a data race on Signal_context::_curr_signal. Issue #3923 --- repos/base-hw/src/lib/base/signal_receiver.cc | 4 ++-- repos/base/src/lib/base/signal.cc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/repos/base-hw/src/lib/base/signal_receiver.cc b/repos/base-hw/src/lib/base/signal_receiver.cc index 94660af344..a39bec0602 100644 --- a/repos/base-hw/src/lib/base/signal_receiver.cc +++ b/repos/base-hw/src/lib/base/signal_receiver.cc @@ -85,7 +85,7 @@ void Signal_receiver::_platform_begin_dissolve(Signal_context * const c) { Mutex::Guard context_guard(c->_mutex); c->_pending = true; - c->_curr_signal = Signal::Data(nullptr, 0); + c->_curr_signal = Signal::Data(); } Kernel::kill_signal_context(Capability_space::capid(c->_cap)); } @@ -166,7 +166,7 @@ Signal Signal_receiver::pending_signal() _contexts.head(context._next); context._pending = false; result = context._curr_signal; - context._curr_signal = Signal::Data(0, 0); + context._curr_signal = Signal::Data(); Trace::Signal_received trace_event(context, result.num); return true; diff --git a/repos/base/src/lib/base/signal.cc b/repos/base/src/lib/base/signal.cc index 03adbb1f91..2edfcb965f 100644 --- a/repos/base/src/lib/base/signal.cc +++ b/repos/base/src/lib/base/signal.cc @@ -117,6 +117,7 @@ namespace Genode { void Signal_context::local_submit() { if (_receiver) { + Mutex::Guard guard(_mutex); /* construct and locally submit signal object */ Signal::Data signal(this, 1); _receiver->local_submit(signal); @@ -261,7 +262,7 @@ Signal Signal_receiver::pending_signal() _contexts.head(context._next); context._pending = false; result = context._curr_signal; - context._curr_signal = Signal::Data(0, 0); + context._curr_signal = Signal::Data(); Trace::Signal_received trace_event(context, result.num); return true; From 772f89e77f1dd19ddea9c0c490b027c2ece2c3c4 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 6 Dec 2022 07:44:13 +0100 Subject: [PATCH 0121/1921] linux.port: xhci patch to fix "unknown event type 37" Issue #4678 --- .../dde_linux/patches/xhci_fix_event_37.patch | 59 +++++++++++++++++++ repos/dde_linux/ports/linux.hash | 2 +- repos/dde_linux/ports/linux.port | 4 +- 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 repos/dde_linux/patches/xhci_fix_event_37.patch diff --git a/repos/dde_linux/patches/xhci_fix_event_37.patch b/repos/dde_linux/patches/xhci_fix_event_37.patch new file mode 100644 index 0000000000..27198b8c99 --- /dev/null +++ b/repos/dde_linux/patches/xhci_fix_event_37.patch @@ -0,0 +1,59 @@ +From e91ac20889d1a26d077cc511365cd7ff4346a6f3 Mon Sep 17 00:00:00 2001 +From: Weitao Wang +Date: Fri, 8 Apr 2022 16:48:21 +0300 +Subject: [PATCH] USB: Fix xhci event ring dequeue pointer ERDP update issue + +In some situations software handles TRB events slower than adding TRBs. +If the number of TRB events to be processed in a given interrupt is exactly +the same as the event ring size 256, then the local variable +"event_ring_deq" that holds the initial dequeue position is equal to +software_dequeue after handling all 256 interrupts. + +It will cause driver to not update ERDP to hardware, + +Software dequeue pointer is out of sync with ERDP on interrupt exit. +On the next interrupt, the event ring may full but driver will not +update ERDP as software_dequeue is equal to ERDP. + +[ 536.377115] xhci_hcd 0000:00:12.0: ERROR unknown event type 37 +[ 566.933173] sd 8:0:0:0: [sdb] tag#27 uas_eh_abort_handler 0 uas-tag 7 inflight: CMD OUT +[ 566.933181] sd 8:0:0:0: [sdb] tag#27 CDB: Write(10) 2a 00 17 71 e6 78 00 00 08 00 +[ 572.041186] xhci_hcd On some situataions,the0000:00:12.0: xHCI host not responding to stop endpoint command. +[ 572.057193] xhci_hcd 0000:00:12.0: Host halt failed, -110 +[ 572.057196] xhci_hcd 0000:00:12.0: xHCI host controller not responding, assume dead +[ 572.057236] sd 8:0:0:0: [sdb] tag#26 uas_eh_abort_handler 0 uas-tag 6 inflight: CMD +[ 572.057240] sd 8:0:0:0: [sdb] tag#26 CDB: Write(10) 2a 00 38 eb cc d8 00 00 08 00 +[ 572.057244] sd 8:0:0:0: [sdb] tag#25 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD + +Hardware ERDP is updated mid event handling if there are more than 128 +events in an interrupt (half of ring size). +Fix this by updating the software local variable at the same time as +hardware ERDP. + +[commit message rewording -Mathias] + +Fixes: dc0ffbea5729 ("usb: host: xhci: update event ring dequeue pointer on purpose") +Reviewed-by: Peter Chen +Signed-off-by: Weitao Wang +Signed-off-by: Mathias Nyman +Link: https://lore.kernel.org/r/20220408134823.2527272-2-mathias.nyman@linux.intel.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/usb/host/xhci-ring.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c +index d0b6806275e0..f9707997969d 100644 +--- a/drivers/usb/host/xhci-ring.c ++++ b/drivers/usb/host/xhci-ring.c +@@ -3141,6 +3141,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd) + if (event_loop++ < TRBS_PER_SEGMENT / 2) + continue; + xhci_update_erst_dequeue(xhci, event_ring_deq); ++ event_ring_deq = xhci->event_ring->dequeue; + + /* ring is half-full, force isoc trbs to interrupt more often */ + if (xhci->isoc_bei_interval > AVOID_BEI_INTERVAL_MIN) +-- +2.25.1 + diff --git a/repos/dde_linux/ports/linux.hash b/repos/dde_linux/ports/linux.hash index d39912c7bf..c514d17c2d 100644 --- a/repos/dde_linux/ports/linux.hash +++ b/repos/dde_linux/ports/linux.hash @@ -1 +1 @@ -3258c9b6efca7364b55b34139f0f4333c3eab88d +dccfc6e02b4f279be801444242ba5ee37e9b8082 diff --git a/repos/dde_linux/ports/linux.port b/repos/dde_linux/ports/linux.port index 3d8dc55c4c..9815d7a7bb 100644 --- a/repos/dde_linux/ports/linux.port +++ b/repos/dde_linux/ports/linux.port @@ -9,9 +9,11 @@ DIR(linux) := src/linux # # Patches # -PATCH_FILES := i915_irq.patch i915_alderlake.patch xhci_abort_ring.patch iwlwifi_enable_irq_before_pnvm.patch +PATCH_FILES := i915_irq.patch i915_alderlake.patch xhci_fix_event_37.patch \ + xhci_abort_ring.patch iwlwifi_enable_irq_before_pnvm.patch PATCHES += $(addprefix patches/,$(PATCH_FILES)) # i915 PATCH_OPT(patches/i915_irq.patch) := -p1 -d${DIR(linux)} PATCH_OPT(patches/xhci_abort_ring.patch) := -p1 -d${DIR(linux)} +PATCH_OPT(patches/xhci_fix_event_37.patch) := -p1 -d${DIR(linux)} From 9a662249ebe4b34e793d06ba9d0547fe6ff5cce6 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 6 Dec 2022 12:05:50 +0100 Subject: [PATCH 0122/1921] vfs_cbe_init.run: adapt to use of libcrypto --- repos/gems/run/vfs_cbe_init.run | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/repos/gems/run/vfs_cbe_init.run b/repos/gems/run/vfs_cbe_init.run index 8feb899f0f..c126dab84e 100644 --- a/repos/gems/run/vfs_cbe_init.run +++ b/repos/gems/run/vfs_cbe_init.run @@ -34,6 +34,9 @@ append build_components { app/cbe_init_trust_anchor app/cbe_init lib/vfs_cbe_trust_anchor + lib/vfs_jitterentropy + lib/libc + lib/libcrypto } build $build_components @@ -88,6 +91,7 @@ append config {
+ @@ -157,8 +161,8 @@ exec truncate -s [cbe_image_size_mb]M bin/[cbe_image_file] append boot_modules { core init timer lx_block lx_fs sequence - vfs vfs.lib.so - ld.lib.so spark.lib.so libsparkcrypto.lib.so + vfs vfs.lib.so vfs_jitterentropy.lib.so + ld.lib.so spark.lib.so libsparkcrypto.lib.so libcrypto.lib.so libc.lib.so cbe_init_trust_anchor cbe_init cbe_init_cxx.lib.so From 9c57157e44af33b4d111e1396cde64861a0b5a4a Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 1 Dec 2022 16:41:04 +0100 Subject: [PATCH 0123/1921] Audit VFS-plugin improvements - Log read and write operations - Fix leaf_path implementation - Support queue sync Issue #4697 --- repos/gems/src/lib/vfs/audit/vfs_audit.cc | 56 +++++++++++++++++++---- 1 file changed, 47 insertions(+), 9 deletions(-) diff --git a/repos/gems/src/lib/vfs/audit/vfs_audit.cc b/repos/gems/src/lib/vfs/audit/vfs_audit.cc index 36e9885a28..567f657b7b 100644 --- a/repos/gems/src/lib/vfs/audit/vfs_audit.cc +++ b/repos/gems/src/lib/vfs/audit/vfs_audit.cc @@ -64,17 +64,21 @@ class Vfs_audit::File_system : public Vfs::File_system } _audit_log; template - inline void _log(ARGS &&... args) { _audit_log.log(args...); } + void _log(ARGS &&... args) { _audit_log.log(args...); } Vfs::File_system &_root_dir; Absolute_path const _audit_path; + Absolute_path _expanded_path { }; /* buffer for 'leaf_path' return value */ + /** * Expand a path to lay within the audit path */ - inline Absolute_path _expand(char const *path) { - return Absolute_path(path+1, _audit_path.string()); } + Absolute_path _expand(char const *path) + { + return Absolute_path(path+1, _audit_path.string()); + } struct Handle final : Vfs_handle { @@ -208,11 +212,13 @@ class Vfs_audit::File_system : public Vfs::File_system return _root_dir.directory(_expand(path).string()); } - const char* leaf_path(const char *path) override + char const *leaf_path(const char *path) override { - return _root_dir.leaf_path(_expand(path).string()); + _expanded_path = _expand(path); + return _root_dir.leaf_path(_expanded_path.string()); } + /********************** ** File I/O service ** **********************/ @@ -223,13 +229,23 @@ class Vfs_audit::File_system : public Vfs::File_system { Handle &h = *static_cast(vfs_handle); h.sync_state(); - return h.audit->fs().write(h.audit, buf, len, out); + Write_result const result = h.audit->fs().write(h.audit, buf, len, out); + + if (result == WRITE_OK) + _log("wrote to ", h.path, " ", out, " / ", len); + else if (result == WRITE_ERR_WOULD_BLOCK || result == WRITE_ERR_AGAIN) + _log("write stalled for ", h.path); + else + _log("write failed for ", h.path); + + return result; } bool queue_read(Vfs_handle *vfs_handle, file_size len) override { Handle &h = *static_cast(vfs_handle); h.sync_state(); + _log(__func__, " ", h.path, " ", len); return h.audit->fs().queue_read(h.audit, len); } @@ -239,7 +255,17 @@ class Vfs_audit::File_system : public Vfs::File_system { Handle &h = *static_cast(vfs_handle); h.sync_state(); - return h.audit->fs().complete_read(h.audit, buf, len, out); + + Read_result const result = h.audit->fs().complete_read(h.audit, buf, len, out); + + if (result == READ_OK) + _log("completed read from ", h.path, " ", out); + else if (result == READ_QUEUED) + _log("read queued for ", h.path); + else + _log("read error for ", h.path); + + return result; } bool read_ready(Vfs_handle *vfs_handle) override @@ -272,12 +298,24 @@ class Vfs_audit::File_system : public Vfs::File_system return h.audit->fs().register_read_ready_sigh(h.audit, sigh); } - Sync_result complete_sync(Vfs_handle *vfs_handle) override + bool queue_sync(Vfs_handle *vfs_handle) override { Handle &h = *static_cast(vfs_handle); h.sync_state(); _log("sync ", h.path); - return h.audit->fs().complete_sync(h.audit); + return h.audit->fs().queue_sync(h.audit); + } + + Sync_result complete_sync(Vfs_handle *vfs_handle) override + { + Handle &h = *static_cast(vfs_handle); + h.sync_state(); + + Sync_result const result = h.audit->fs().complete_sync(h.audit); + if (result == SYNC_OK) _log("synced ", h.path); + if (result == SYNC_ERR_INVALID) _log("sync failed for ", h.path); + + return result; } }; From a15c8943854f3a21b663a0c431beb5f2ffe4ef59 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 2 Dec 2022 11:29:40 +0100 Subject: [PATCH 0124/1921] file_system_session: increase TX_QUEUE_SIZE to 32 The change of the queue size from 16 to 32 has negligible costs (4 KiB instead of 2 KiB for the packet-stream queues) while facilitating the batching of many small consecutive write operations. Issue #4697 --- repos/os/include/file_system_session/file_system_session.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/os/include/file_system_session/file_system_session.h b/repos/os/include/file_system_session/file_system_session.h index 7e7fca9de5..c8ce36653a 100644 --- a/repos/os/include/file_system_session/file_system_session.h +++ b/repos/os/include/file_system_session/file_system_session.h @@ -317,7 +317,7 @@ struct File_system::Directory_entry struct File_system::Session : public Genode::Session { - enum { TX_QUEUE_SIZE = 16 }; + enum { TX_QUEUE_SIZE = 32 }; typedef Genode::Packet_stream_policy Date: Fri, 2 Dec 2022 15:54:44 +0100 Subject: [PATCH 0125/1921] server/vfs: facilitate batching of requests By replacing the calls of 'acknowledge_packet' and 'get_packet' with 'try_ack_packet' and 'try_get_packet', we avoid the implicit triggering of data-flow signals. Instead, the VFS server now relies on explicit calls of the packet stream's 'wakeup' interface. Issue #4697 --- repos/os/src/server/vfs/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/os/src/server/vfs/main.cc b/repos/os/src/server/vfs/main.cc index 623bf7a588..f0c8c0acee 100644 --- a/repos/os/src/server/vfs/main.cc +++ b/repos/os/src/server/vfs/main.cc @@ -183,7 +183,7 @@ class Vfs_server::Session_component : private Session_resources, auto drop_packet_from_submit_queue = [&] () { - _stream.get_packet(); + _stream.try_get_packet(); overall_progress = true; progress_in_iteration = true; @@ -273,7 +273,7 @@ class Vfs_server::Session_component : private Session_resources, } if (node.acknowledgement_pending()) { - _stream.acknowledge_packet(node.dequeue_acknowledgement()); + _stream.try_ack_packet(node.dequeue_acknowledgement()); progress = true; } From 9421a449ab377bf95484294259ba87155cac2ce1 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 1 Dec 2022 16:41:27 +0100 Subject: [PATCH 0126/1921] test/libc_many_writes for examining write batching This test reveals the patters of the batching of consecutive write operations on a file-system session. It issues 100 writes of one byte each, which should ideally result in large batches of operations submitted to the file-system session at once. The run script performs the write operations through a chain of two VFS servers, thereby exercising the write batching of both the libc and the intermediate VFS server. Issue #4697 --- repos/libports/run/libc_many_writes.run | 86 +++++++++++++++++++ .../libports/src/test/libc_many_writes/main.c | 59 +++++++++++++ .../src/test/libc_many_writes/target.mk | 3 + 3 files changed, 148 insertions(+) create mode 100644 repos/libports/run/libc_many_writes.run create mode 100644 repos/libports/src/test/libc_many_writes/main.c create mode 100644 repos/libports/src/test/libc_many_writes/target.mk diff --git a/repos/libports/run/libc_many_writes.run b/repos/libports/run/libc_many_writes.run new file mode 100644 index 0000000000..b75971b6fe --- /dev/null +++ b/repos/libports/run/libc_many_writes.run @@ -0,0 +1,86 @@ +build { + core lib/ld init timer + lib/vfs lib/vfs_audit server/vfs + lib/libc lib/posix test/libc_many_writes +} + +create_boot_directory + +install_config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +build_boot_image [build_artifacts] + +append qemu_args " -nographic " + +run_genode_until "child .* exited with exit value 0.*\n" 20 + diff --git a/repos/libports/src/test/libc_many_writes/main.c b/repos/libports/src/test/libc_many_writes/main.c new file mode 100644 index 0000000000..378edc780d --- /dev/null +++ b/repos/libports/src/test/libc_many_writes/main.c @@ -0,0 +1,59 @@ +/* + * \brief Libc test stressing the batching of write operations + * \author Norman Feske + * \date 2022-12-01 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include +#include +#include +#include +#include + + +static void print_time(char const *msg) +{ + struct timespec tp; + bzero(&tp, sizeof(tp)); + + int res = clock_gettime(CLOCK_MONOTONIC, &tp); + if (res != 0) { + printf("error: clock_gettime failed (%d)\n", res); + exit(-1); + } + + printf("%s: %ld s %ld ms\n", msg, tp.tv_sec, tp.tv_nsec/1000000); +} + + +int main(int argc, char **argv) +{ + char const * const path = "/rw/data"; + + int const fd = open(path, O_CREAT | O_RDWR); + if (fd < 0) + printf("error: creation of file '%s' failed (%d)\n", path, fd); + + print_time("start"); + + for (int i = 0; i < 100; i++) { + printf("write\n"); + unsigned char c = i & 0xffu; + write(fd, &c, 1); + } + + print_time("end"); + + close(fd); + + printf("exiting\n"); + return 0; +} diff --git a/repos/libports/src/test/libc_many_writes/target.mk b/repos/libports/src/test/libc_many_writes/target.mk new file mode 100644 index 0000000000..a4b1a441e5 --- /dev/null +++ b/repos/libports/src/test/libc_many_writes/target.mk @@ -0,0 +1,3 @@ +TARGET = test-libc_many_writes +SRC_C = main.c +LIBS = posix From 7d8d4f4532545a63aa7609799e309919617152b3 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 2 Dec 2022 09:53:16 +0100 Subject: [PATCH 0127/1921] vfs,libc: deferred wakeup of remote peers This patch facilitates the batching of I/O operations in the VFS library by replacing the implicit wakeup of remote peer (via the traditional packet-stream interface like 'submit_packet') by explicit wakeup signalling. The wakeup signalling is triggered not before the VFS user settles down. E.g., for libc-based applications, this is the case if the libc goes idle, waiting for external I/O. In the case of a busy writer to a non-blocking file descriptor or socket (e.g., lighttpd), the remote peers are woken up once a write operation yields an out-count of 0. The deferring of wakeup signals is accommodated by the new 'Remote_io' mechanism (vfs/remote_io.h) that is designated to be used by all VFS plugins that interact with asynchronous Genode services for I/O. Issue #4697 --- repos/dde_rump/src/include/rump_fs/fs.h | 11 +- repos/dde_rump/src/lib/rump/io.cc | 29 ++++- repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc | 20 +++- repos/gems/src/lib/vfs/import/plugin.cc | 14 +-- repos/libports/src/lib/libc/internal/kernel.h | 12 ++ repos/libports/src/lib/libc/kernel.cc | 2 + repos/libports/src/lib/libc/vfs_plugin.cc | 13 ++- repos/os/include/os/vfs.h | 61 +++++----- repos/os/include/vfs/env.h | 22 +++- repos/os/include/vfs/remote_io.h | 104 ++++++++++++++++++ repos/os/include/vfs/simple_env.h | 29 ++++- repos/os/src/lib/vfs/fs_file_system.h | 104 +++++++++++------- repos/os/src/server/fs_report/main.cc | 16 +-- repos/os/src/server/vfs/main.cc | 19 +++- repos/os/src/server/vfs_block/component.cc | 14 ++- repos/os/src/test/vfs_stress/main.cc | 37 ++++--- 16 files changed, 383 insertions(+), 124 deletions(-) create mode 100644 repos/os/include/vfs/remote_io.h diff --git a/repos/dde_rump/src/include/rump_fs/fs.h b/repos/dde_rump/src/include/rump_fs/fs.h index a84da163e8..6b1c40bb93 100644 --- a/repos/dde_rump/src/include/rump_fs/fs.h +++ b/repos/dde_rump/src/include/rump_fs/fs.h @@ -13,6 +13,9 @@ #ifndef _INCLUDE__RUMP_FS__FS_H_ #define _INCLUDE__RUMP_FS__FS_H_ +#include +#include + /** * File to upon the back-end will open a block session */ @@ -29,7 +32,13 @@ #define GENODE_MOUNT_DIR "/mnt" -void rump_io_backend_init(); +struct Rump_fs_user_wakeup : Genode::Interface, Genode::Noncopyable +{ + virtual void wakeup_rump_fs_user() = 0; +}; + + +void rump_io_backend_init(Rump_fs_user_wakeup &); /** * Sync I/O back-end with underlying Genode subsystems diff --git a/repos/dde_rump/src/lib/rump/io.cc b/repos/dde_rump/src/lib/rump/io.cc index f710df4f5b..12a5b1491e 100644 --- a/repos/dde_rump/src/lib/rump/io.cc +++ b/repos/dde_rump/src/lib/rump/io.cc @@ -108,6 +108,8 @@ class Backend Genode::Allocator_avl _alloc { &Rump::env().heap() }; Genode::Entrypoint &_ep { Rump::env().env().ep() }; + Rump_fs_user_wakeup &_user_wakeup; + /* * The tx_buf_size is chosen such that one I/O request fits into the * I/O buffer at once. The size of NetBSD's I/O requests is bounded by @@ -121,6 +123,15 @@ class Backend Io_signal_blockade _io_signal_blockade { _ep, Genode::Thread::myself() }; + Genode::Io_signal_handler _io_signal_handler { + _ep, *this, &Backend::_handle_io_signal }; + + void _handle_io_signal() + { + _io_signal_blockade.dispatch(1); + _user_wakeup.wakeup_rump_fs_user(); + } + int _blocked_for_synchronous_io = 0; void _update_jobs() @@ -190,9 +201,11 @@ class Backend public: - Backend() + Backend(Rump_fs_user_wakeup &user_wakeup) + : + _user_wakeup(user_wakeup) { - _session.sigh(_io_signal_blockade); + _session.sigh(_io_signal_handler); } uint64_t block_count() const { return _info.block_count; } @@ -230,9 +243,15 @@ class Backend }; +static Rump_fs_user_wakeup *_user_wakeup_ptr = nullptr; + + static Backend &backend() { - static Backend _b; + if (!_user_wakeup_ptr) + Genode::error("rump: missing call of rump_io_backend_init"); + + static Backend _b { *_user_wakeup_ptr }; return _b; } @@ -315,8 +334,10 @@ extern "C" void rumpns_modctor_msdos(void); extern "C" void rumpns_modctor_wapbl(void); -void rump_io_backend_init() +void rump_io_backend_init(Rump_fs_user_wakeup &user_wakeup) { + _user_wakeup_ptr = &user_wakeup; + /* call init/constructor functions of rump_fs.lib.so (order is important!) */ rumpcompctor_RUMP_COMPONENT_KERN_SYSCALL(); rumpns_modctor_wapbl(); diff --git a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc index c59e54f27a..c16ab6534d 100644 --- a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc +++ b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc @@ -845,14 +845,28 @@ class Vfs::Rump_file_system : public File_system class Rump_factory : public Vfs::File_system_factory { + private: + + struct Rump_fs_user : Rump_fs_user_wakeup + { + Vfs::Env::User &_vfs_user; + + void wakeup_rump_fs_user() override { _vfs_user.wakeup_vfs_user(); } + + Rump_fs_user(Vfs::Env::User &vfs_user) : _vfs_user(vfs_user) { } + + } _rump_fs_user; + public: Rump_factory(Genode::Env &env, Genode::Allocator &alloc, - Genode::Xml_node config) + Vfs::Env::User &vfs_user, Genode::Xml_node config) + : + _rump_fs_user(vfs_user) { Rump::construct_env(env); - rump_io_backend_init(); + rump_io_backend_init(_rump_fs_user); /* limit RAM consumption */ if (!config.has_attribute("ram")) { @@ -897,7 +911,7 @@ extern "C" Vfs::File_system_factory *vfs_file_system_factory(void) { Vfs::File_system *create(Vfs::Env &env, Genode::Xml_node node) override { - static Rump_factory factory(env.env(), env.alloc(), node); + static Rump_factory factory(env.env(), env.alloc(), env.user(), node); return factory.create(env, node); } }; diff --git a/repos/gems/src/lib/vfs/import/plugin.cc b/repos/gems/src/lib/vfs/import/plugin.cc index 0309346c21..4bbab35521 100644 --- a/repos/gems/src/lib/vfs/import/plugin.cc +++ b/repos/gems/src/lib/vfs/import/plugin.cc @@ -33,13 +33,13 @@ class Vfs_import::Flush_guard { private: - Genode::Entrypoint &_ep; - Vfs_handle &_handle; + Vfs::Env::Io &_io; + Vfs_handle &_handle; public: - Flush_guard(Vfs::Env &env, Vfs_handle &handle) - : _ep(env.env().ep()), _handle(handle) { } + Flush_guard(Vfs::Env::Io &io, Vfs_handle &handle) + : _io(io), _handle(handle) { } ~Flush_guard() { @@ -48,7 +48,7 @@ class Vfs_import::Flush_guard && (_handle.fs().complete_sync(&_handle) == Vfs::File_io_service::SYNC_OK)) break; - _ep.wait_and_dispatch_one_io_signal(); + _io.commit_and_wait(); } } }; @@ -89,7 +89,7 @@ class Vfs_import::File_system : public Vfs::File_system Vfs_handle::Guard guard(dst_handle); { - Flush_guard flush(env, *dst_handle); + Flush_guard flush(env.io(), *dst_handle); file_size count = target.length(); for (;;) { @@ -142,7 +142,7 @@ class Vfs_import::File_system : public Vfs::File_system char buf[4096]; Vfs_handle::Guard guard { dst_handle }; - Flush_guard flush { env, *dst_handle }; + Flush_guard flush { env.io(), *dst_handle }; Readonly_file::At at { }; while (true) { diff --git a/repos/libports/src/lib/libc/internal/kernel.h b/repos/libports/src/lib/libc/internal/kernel.h index 5729bd27b6..d4d6e1f91a 100644 --- a/repos/libports/src/lib/libc/internal/kernel.h +++ b/repos/libports/src/lib/libc/internal/kernel.h @@ -483,6 +483,8 @@ struct Libc::Kernel final : Vfs::Io_response_handler, while (main_blocked_in_monitor() || main_suspended_for_io()) { + wakeup_remote_peers(); + /* * Block for one I/O signal and process all pending ones * before executing the monitor functions. This avoids @@ -693,6 +695,16 @@ struct Libc::Kernel final : Vfs::Io_response_handler, return *_kernel_ptr; } + + + /****************************** + ** Vfs::Remote_io mechanism ** + ******************************/ + + void wakeup_remote_peers() + { + _libc_env.vfs_env().deferred_wakeups().trigger(); + } }; #endif /* _LIBC__INTERNAL__KERNEL_H_ */ diff --git a/repos/libports/src/lib/libc/kernel.cc b/repos/libports/src/lib/libc/kernel.cc index 2324951b0f..20887a072b 100644 --- a/repos/libports/src/lib/libc/kernel.cc +++ b/repos/libports/src/lib/libc/kernel.cc @@ -404,6 +404,8 @@ void Libc::Kernel::handle_io_progress() if (_execute_monitors_pending == Monitor::Pool::State::JOBS_PENDING) _execute_monitors_pending = _monitors.execute_monitors(); } + + wakeup_remote_peers(); } diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index 89db7eab71..6280d258ff 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -591,8 +591,10 @@ int Libc::Vfs_plugin::close_from_kernel(File_descriptor *fd) /* XXX mtime not updated here */ Sync sync { *handle, Update_mtime::NO, _current_real_time }; - while (!sync.complete()) + while (!sync.complete()) { + Libc::Kernel::kernel().wakeup_remote_peers(); Libc::Kernel::kernel().libc_env().ep().wait_and_dispatch_one_io_signal(); + } } handle->close(); @@ -837,8 +839,10 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, Vfs::file_size out_count = 0; Result out_result = Result::WRITE_OK; + bool const nonblocking = (fd->flags & O_NONBLOCK); + + if (nonblocking) { - if (fd->flags & O_NONBLOCK) { monitor().monitor([&] { try { out_result = handle->fs().write(handle, (char const *)buf, count, out_count); @@ -948,6 +952,11 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, handle->advance_seek(out_count); fd->modified = true; + /* notify remote peers once our VFS' local I/O buffers are saturated */ + bool const nonblocking_write_stalled = nonblocking && count && !out_count; + if (nonblocking_write_stalled) + Libc::Kernel::kernel().wakeup_remote_peers(); + return out_count; } diff --git a/repos/os/include/os/vfs.h b/repos/os/include/os/vfs.h index 59dceef48f..bdcbcde336 100644 --- a/repos/os/include/os/vfs.h +++ b/repos/os/include/os/vfs.h @@ -117,7 +117,7 @@ struct Genode::Directory : Noncopyable, Interface Vfs::File_system &_fs; - Entrypoint &_ep; + Vfs::Env::Io &_io; Allocator &_alloc; @@ -158,8 +158,9 @@ struct Genode::Directory : Noncopyable, Interface * \throw Open_failed */ Directory(Vfs::Env &vfs_env) - : _path(""), _fs(vfs_env.root_dir()), - _ep(vfs_env.env().ep()), _alloc(vfs_env.alloc()) + : + _path(""), _fs(vfs_env.root_dir()), + _io(vfs_env.io()), _alloc(vfs_env.alloc()) { if (_fs.opendir("/", false, &_handle, _alloc) != Vfs::Directory_service::OPENDIR_OK) @@ -172,8 +173,9 @@ struct Genode::Directory : Noncopyable, Interface * \throw Nonexistent_directory */ Directory(Directory const &other, Path const &rel_path) - : _path(join(other._path, rel_path)), _fs(other._fs), _ep(other._ep), - _alloc(other._alloc) + : + _path(join(other._path, rel_path)), _fs(other._fs), _io(other._io), + _alloc(other._alloc) { if (_fs.opendir(_path.string(), false, &_handle, _alloc) != Vfs::Directory_service::OPENDIR_OK) @@ -192,7 +194,7 @@ struct Genode::Directory : Noncopyable, Interface _handle->seek(i * sizeof(entry._dirent)); while (!_handle->fs().queue_read(_handle, sizeof(entry._dirent))) - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); Vfs::File_io_service::Read_result read_result; Vfs::file_size out_count = 0; @@ -207,7 +209,7 @@ struct Genode::Directory : Noncopyable, Interface if (read_result != Vfs::File_io_service::READ_QUEUED) break; - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); } if ((read_result != Vfs::File_io_service::READ_OK) || @@ -296,7 +298,7 @@ struct Genode::Directory : Noncopyable, Interface Vfs::file_size count = sizeof(buf)-1; Vfs::file_size out_count = 0; while (!link_handle->fs().queue_read(link_handle, count)) { - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); } File_io_service::Read_result result; @@ -308,7 +310,7 @@ struct Genode::Directory : Noncopyable, Interface if (result != File_io_service::READ_QUEUED) break; - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); }; if (result != File_io_service::READ_OK) @@ -395,7 +397,7 @@ class Genode::Readonly_file : public File Vfs::Vfs_handle mutable *_handle = nullptr; - Genode::Entrypoint &_ep; + Vfs::Env::Io &_io; void _open(Vfs::File_system &fs, Allocator &alloc, Path const path) { @@ -438,7 +440,8 @@ class Genode::Readonly_file : public File * \throw File::Open_failed */ Readonly_file(Directory const &dir, Path const &rel_path) - : _ep(_mutable(dir)._ep) + : + _io(_mutable(dir)._io) { _open(_mutable(dir)._fs, _mutable(dir)._alloc, Directory::join(dir._path, rel_path)); @@ -460,7 +463,7 @@ class Genode::Readonly_file : public File _handle->seek(at.value); while (!_handle->fs().queue_read(_handle, bytes)) - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); Vfs::File_io_service::Read_result result; @@ -471,7 +474,7 @@ class Genode::Readonly_file : public File if (result != Vfs::File_io_service::READ_QUEUED) break; - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); }; /* @@ -714,10 +717,10 @@ class Genode::Writeable_file : Noncopyable return *handle_ptr; } - static void _sync(Vfs::Vfs_handle &handle, Entrypoint &ep) + static void _sync(Vfs::Vfs_handle &handle, Vfs::Env::Io &io) { while (handle.fs().queue_sync(&handle) == false) - ep.wait_and_dispatch_one_io_signal(); + io.progress(); for (bool sync_done = false; !sync_done; ) { @@ -737,11 +740,11 @@ class Genode::Writeable_file : Noncopyable } if (!sync_done) - ep.wait_and_dispatch_one_io_signal(); + io.progress(); } } - static Append_result _append(Vfs::Vfs_handle &handle, Entrypoint &ep, + static Append_result _append(Vfs::Vfs_handle &handle, Vfs::Env::Io &io, char const *src, size_t size) { bool write_error = false; @@ -783,7 +786,7 @@ class Genode::Writeable_file : Noncopyable stalled = true; } if (stalled) - ep.wait_and_dispatch_one_io_signal(); + io.progress(); } return write_error ? Append_result::WRITE_ERROR : Append_result::OK; @@ -798,7 +801,7 @@ class Genode::Append_file : public Writeable_file { private: - Entrypoint &_ep; + Vfs::Env::Io &_io; Vfs::Vfs_handle &_handle; public: @@ -810,7 +813,7 @@ class Genode::Append_file : public Writeable_file */ Append_file(Directory &dir, Directory::Path const &path) : - _ep(dir._ep), + _io(dir._io), _handle(_init_handle(dir, path)) { Vfs::Directory_service::Stat stat { }; @@ -820,12 +823,12 @@ class Genode::Append_file : public Writeable_file ~Append_file() { - _sync(_handle, _ep); + _sync(_handle, _io); _handle.ds().close(&_handle); } Append_result append(char const *src, size_t size) { - return _append(_handle, _ep, src, size); } + return _append(_handle, _io, src, size); } }; @@ -836,8 +839,8 @@ class Genode::New_file : public Writeable_file { private: - Entrypoint &_ep; - Vfs::Vfs_handle &_handle; + Vfs::Env::Io &_io; + Vfs::Vfs_handle &_handle; public: @@ -851,18 +854,20 @@ class Genode::New_file : public Writeable_file */ New_file(Directory &dir, Directory::Path const &path) : - _ep(dir._ep), + _io(dir._io), _handle(_init_handle(dir, path)) - { _handle.fs().ftruncate(&_handle, 0); } + { + _handle.fs().ftruncate(&_handle, 0); + } ~New_file() { - _sync(_handle, _ep); + _sync(_handle, _io); _handle.ds().close(&_handle); } Append_result append(char const *src, size_t size) { - return _append(_handle, _ep, src, size); } + return _append(_handle, _io, src, size); } }; diff --git a/repos/os/include/vfs/env.h b/repos/os/include/vfs/env.h index 655c9a87dc..57d888cdfc 100644 --- a/repos/os/include/vfs/env.h +++ b/repos/os/include/vfs/env.h @@ -1,6 +1,7 @@ /* * \brief Cross-plugin VFS environment * \author Emery Hemingway + * \author Norman Feske * \date 2018-04-02 */ @@ -15,6 +16,7 @@ #define _INCLUDE__VFS__ENV_H_ #include +#include #include #include @@ -25,15 +27,29 @@ struct Vfs::Env : Interface virtual Genode::Env &env() = 0; /** - * Allocator for creating stuctures shared - * across open VFS handles. + * Allocator for creating stuctures shared across open VFS handles */ virtual Genode::Allocator &alloc() = 0; /** - * VFS root file-system + * VFS root file system */ virtual File_system &root_dir() = 0; + + /** + * Registry of deferred wakeups for plugins interacting with remote peers + */ + virtual Remote_io::Deferred_wakeups &deferred_wakeups() = 0; + + /** + * Interface tailored for triggering and waiting for I/O + */ + struct Io : Interface, Genode::Noncopyable + { + virtual void progress() = 0; + }; + + virtual Io &io() = 0; }; #endif /* _INCLUDE__VFS__ENV_H_ */ diff --git a/repos/os/include/vfs/remote_io.h b/repos/os/include/vfs/remote_io.h new file mode 100644 index 0000000000..36231563df --- /dev/null +++ b/repos/os/include/vfs/remote_io.h @@ -0,0 +1,104 @@ +/* + * \brief Mechanism for waking up remote I/O peers + * \author Norman Feske + * \date 2022-12-01 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _INCLUDE__VFS__REMOTE_IO_H_ +#define _INCLUDE__VFS__REMOTE_IO_H_ + +#include +#include + +namespace Vfs { class Remote_io; } + + +struct Vfs::Remote_io : Interface +{ + virtual void wakeup_remote_peer() = 0; + + class Deferred_wakeups; + class Peer; +}; + + +class Vfs::Remote_io::Peer : Genode::Noncopyable +{ + private: + + struct Deferred_wakeup; + + using Wakeup_registry = Genode::Registry; + + class Deferred_wakeup : Wakeup_registry::Element, Interface + { + private: + + Peer &_peer; + + public: + + Deferred_wakeup(Wakeup_registry ®istry, Peer &peer) + : + Wakeup_registry::Element(registry, *this), _peer(peer) + { } + + void trigger() { _peer._wakeup(); } + }; + + friend class Deferred_wakeups; + + Deferred_wakeups &_deferred_wakeups; + + Remote_io &_remote_io; + + Genode::Constructible _deferred_wakeup { }; + + void _wakeup() + { + _remote_io.wakeup_remote_peer(); + _deferred_wakeup.destruct(); + } + + public: + + Peer(Deferred_wakeups &deferred_wakeups, Remote_io &remote_io) + : + _deferred_wakeups(deferred_wakeups), _remote_io(remote_io) + { } + + inline void schedule_wakeup(); +}; + + +class Vfs::Remote_io::Deferred_wakeups : Genode::Noncopyable +{ + private: + + Peer::Wakeup_registry _registry { }; + + friend class Peer; + + public: + + void trigger() + { + _registry.for_each([&] (Peer::Deferred_wakeup &deferred_wakeup) { + deferred_wakeup.trigger(); }); + } +}; + + +void Vfs::Remote_io::Peer::schedule_wakeup() +{ + _deferred_wakeup.construct(_deferred_wakeups._registry, *this); +} + +#endif /* _INCLUDE__VFS__REMOTE_IO_H_ */ diff --git a/repos/os/include/vfs/simple_env.h b/repos/os/include/vfs/simple_env.h index 5eee5ebc04..2755ef185b 100644 --- a/repos/os/include/vfs/simple_env.h +++ b/repos/os/include/vfs/simple_env.h @@ -1,6 +1,7 @@ /* * \brief Cross-plugin VFS environment * \author Emery Hemingway + * \author Norman Feske * \date 2018-04-04 */ @@ -20,16 +21,21 @@ namespace Vfs { struct Simple_env; } -class Vfs::Simple_env : public Vfs::Env + +class Vfs::Simple_env : public Vfs::Env, private Vfs::Env::Io { private: Genode::Env &_env; Genode::Allocator &_alloc; - Vfs::Global_file_system_factory _fs_factory { _alloc }; + Global_file_system_factory _fs_factory { _alloc }; - Vfs::Dir_file_system _root_dir; + Dir_file_system _root_dir; + + using Deferred_wakeups = Remote_io::Deferred_wakeups; + + Deferred_wakeups _deferred_wakeups { }; public: @@ -45,9 +51,20 @@ class Vfs::Simple_env : public Vfs::Env _root_dir.apply_config(config); } - Genode::Env &env() override { return _env; } - Genode::Allocator &alloc() override { return _alloc; } - Vfs::File_system &root_dir() override { return _root_dir; } + Genode::Env &env() override { return _env; } + Genode::Allocator &alloc() override { return _alloc; } + Vfs::File_system &root_dir() override { return _root_dir; } + Deferred_wakeups &deferred_wakeups() override { return _deferred_wakeups; } + Vfs::Env::Io &io() override { return *this; } + + /** + * Vfs::Env::Io interface + */ + void progress() override + { + _deferred_wakeups.trigger(); + _env.ep().wait_and_dispatch_one_io_signal(); + } }; #endif /* _INCLUDE__VFS__SIMPLE_ENV_H_ */ diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index 8009ed71ae..3df374670d 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -24,7 +24,7 @@ namespace Vfs { class Fs_file_system; } -class Vfs::Fs_file_system : public File_system +class Vfs::Fs_file_system : public File_system, private Remote_io { private: @@ -69,6 +69,33 @@ class Vfs::Fs_file_system : public File_system struct Fs_vfs_handle; typedef Genode::Fifo Fs_vfs_handle_queue; + Remote_io::Peer _peer { _env.deferred_wakeups(), *this }; + + /** + * Remote_io interface + */ + void wakeup_remote_peer() override { _fs.tx()->wakeup(); } + + /* + * Pass packet to server side + * + * The caller is expected to check 'ready_to_submit' before calling + * this function. + */ + void _submit_packet(::File_system::Packet_descriptor const &packet) + { + /* + * The warning should never occur if the precondition above is + * satisfied. + */ + if (!_fs.tx()->ready_to_submit()) + Genode::warning("submit queue of file-system session unexpectedly full"); + else + _fs.tx()->try_submit_packet(packet); + + _peer.schedule_wakeup(); + } + /** * Convert 'File_system::Node_type' to 'Dirent_type' */ @@ -129,14 +156,14 @@ class Vfs::Fs_file_system : public File_system using Handle_state::queued_sync_state; using Handle_state::read_ready_state; - ::File_system::Connection &_fs; + Fs_file_system &_vfs_fs; bool _queue_read(file_size count, file_size const seek_offset) { if (queued_read_state != Handle_state::Queued_state::IDLE) return false; - ::File_system::Session::Tx::Source &source = *_fs.tx(); + ::File_system::Session::Tx::Source &source = *_vfs_fs._fs.tx(); /* if not ready to submit suggest retry */ if (!source.ready_to_submit()) @@ -161,7 +188,7 @@ class Vfs::Fs_file_system : public File_system queued_read_state = Handle_state::Queued_state::QUEUED; /* pass packet to server side */ - source.submit_packet(packet); + _vfs_fs._submit_packet(packet); return true; } @@ -172,7 +199,7 @@ class Vfs::Fs_file_system : public File_system if (queued_read_state != Handle_state::Queued_state::ACK) return READ_QUEUED; - ::File_system::Session::Tx::Source &source = *_fs.tx(); + ::File_system::Session::Tx::Source &source = *_vfs_fs._fs.tx(); /* obtain result packet descriptor with updated status info */ ::File_system::Packet_descriptor const @@ -199,11 +226,11 @@ class Vfs::Fs_file_system : public File_system Fs_vfs_handle(File_system &fs, Allocator &alloc, int status_flags, Handle_space &space, ::File_system::Node_handle node_handle, - ::File_system::Connection &fs_connection) + Fs_file_system &vfs_fs) : Vfs_handle(fs, fs, alloc, status_flags), Handle_space::Element(*this, space, node_handle), - _fs(fs_connection) + _vfs_fs(vfs_fs) { } ::File_system::File_handle file_handle() const @@ -228,7 +255,7 @@ class Vfs::Fs_file_system : public File_system if (queued_sync_state != Handle_state::Queued_state::IDLE) return true; - ::File_system::Session::Tx::Source &source = *_fs.tx(); + ::File_system::Session::Tx::Source &source = *_vfs_fs._fs.tx(); /* if not ready to submit suggest retry */ if (!source.ready_to_submit()) return false; @@ -247,7 +274,7 @@ class Vfs::Fs_file_system : public File_system queued_sync_state = Handle_state::Queued_state::QUEUED; /* pass packet to server side */ - source.submit_packet(packet); + _vfs_fs._submit_packet(packet); return true; } @@ -261,7 +288,7 @@ class Vfs::Fs_file_system : public File_system ::File_system::Packet_descriptor const packet = queued_sync_packet; - ::File_system::Session::Tx::Source &source = *_fs.tx(); + ::File_system::Session::Tx::Source &source = *_vfs_fs._fs.tx(); Sync_result result = packet.succeeded() ? SYNC_OK : SYNC_ERR_INVALID; @@ -276,7 +303,7 @@ class Vfs::Fs_file_system : public File_system bool update_modification_timestamp(Vfs::Timestamp time) { - ::File_system::Session::Tx::Source &source = *_fs.tx(); + ::File_system::Session::Tx::Source &source = *_vfs_fs._fs.tx(); using ::File_system::Packet_descriptor; if (!source.ready_to_submit()) { @@ -289,8 +316,7 @@ class Vfs::Fs_file_system : public File_system Packet_descriptor::WRITE_TIMESTAMP, ::File_system::Timestamp { .value = time.value }); - /* pass packet to server side */ - source.submit_packet(p); + _vfs_fs._submit_packet(p); } catch (::File_system::Session::Tx::Source::Packet_alloc_failed) { return false; } @@ -398,22 +424,17 @@ class Vfs::Fs_file_system : public File_system */ struct Fs_handle_guard : Fs_vfs_handle { - ::File_system::Session &_fs_session; - Fs_handle_guard(File_system &fs, - ::File_system::Session &fs_session, ::File_system::Node_handle fs_handle, Handle_space &space, - ::File_system::Connection &fs_connection) + Fs_file_system &vfs_fs) : - Fs_vfs_handle(fs, *(Allocator*)nullptr, 0, space, fs_handle, - fs_connection), - _fs_session(fs_session) + Fs_vfs_handle(fs, *(Allocator*)nullptr, 0, space, fs_handle, vfs_fs) { } ~Fs_handle_guard() { - _fs_session.close(file_handle()); + _vfs_fs._fs.close(file_handle()); } }; @@ -444,10 +465,13 @@ class Vfs::Fs_file_system : public File_system ::File_system::Session::Tx::Source &source = *_fs.tx(); using ::File_system::Packet_descriptor; + if (!source.ready_to_submit()) + throw ::File_system::Session::Tx::Source::Saturated_submit_queue(); + file_size const max_packet_size = source.bulk_buffer_size() / 2; file_size const clipped_count = min(max_packet_size, count); - /* XXX check if alloc_packet() and submit_packet() will succeed! */ + /* XXX check if alloc_packet() will succeed! */ Packet_descriptor const packet_in(source.alloc_packet((size_t)clipped_count), handle.file_handle(), @@ -458,8 +482,7 @@ class Vfs::Fs_file_system : public File_system /* wait until packet was acknowledged */ handle.queued_read_state = Handle_state::Queued_state::QUEUED; - /* pass packet to server side */ - source.submit_packet(packet_in); + _submit_packet(packet_in); while (handle.queued_read_state != Handle_state::Queued_state::ACK) _env.env().ep().wait_and_dispatch_one_io_signal(); @@ -522,8 +545,7 @@ class Vfs::Fs_file_system : public File_system memcpy(source.packet_content(packet_in), buf, (size_t)count); - /* pass packet to server side */ - source.submit_packet(packet_in); + _submit_packet(packet_in); } catch (::File_system::Session::Tx::Source::Packet_alloc_failed) { if (!handle.enqueued()) _congested_handles.enqueue(handle); @@ -542,7 +564,8 @@ class Vfs::Fs_file_system : public File_system while (source.ack_avail()) { - Packet_descriptor const packet = source.get_acked_packet(); + Packet_descriptor const packet = source.try_get_acked_packet(); + _peer.schedule_wakeup(); Handle_space::Id const id(packet.handle()); @@ -661,7 +684,7 @@ class Vfs::Fs_file_system : public File_system try { ::File_system::Node_handle node = _fs.node(path); - Fs_handle_guard node_guard(*this, _fs, node, _handle_space, _fs); + Fs_handle_guard node_guard(*this, node, _handle_space, *this); status = _fs.status(node); } catch (Genode::Out_of_ram) { @@ -696,7 +719,7 @@ class Vfs::Fs_file_system : public File_system try { ::File_system::Dir_handle dir = _fs.dir(dir_path.base(), false); - Fs_handle_guard dir_guard(*this, _fs, dir, _handle_space, _fs); + Fs_handle_guard dir_guard(*this, dir, _handle_space, *this); _fs.unlink(dir, file_name.base() + 1); } @@ -731,13 +754,12 @@ class Vfs::Fs_file_system : public File_system ::File_system::Dir_handle from_dir = _fs.dir(from_dir_path.base(), false); - Fs_handle_guard from_dir_guard(*this, _fs, from_dir, - _handle_space, _fs); + Fs_handle_guard from_dir_guard(*this, from_dir, _handle_space, *this); ::File_system::Dir_handle to_dir = _fs.dir(to_dir_path.base(), false); Fs_handle_guard to_dir_guard( - *this, _fs, to_dir, _handle_space, _fs); + *this, to_dir, _handle_space, *this); _fs.move(from_dir, from_file_name.base() + 1, to_dir, to_file_name.base() + 1); @@ -755,8 +777,7 @@ class Vfs::Fs_file_system : public File_system try { ::File_system::Dir_handle dir = _fs.dir(path, false); - Fs_handle_guard node_guard(*this, _fs, dir, - _handle_space, _fs); + Fs_handle_guard node_guard(*this, dir, _handle_space, *this); return _fs.num_entries(dir); } @@ -768,7 +789,7 @@ class Vfs::Fs_file_system : public File_system { try { ::File_system::Node_handle node = _fs.node(path); - Fs_handle_guard node_guard(*this, _fs, node, _handle_space, _fs); + Fs_handle_guard node_guard(*this, node, _handle_space, *this); ::File_system::Status status = _fs.status(node); @@ -814,14 +835,14 @@ class Vfs::Fs_file_system : public File_system try { ::File_system::Dir_handle dir = _fs.dir(dir_path.base(), false); - Fs_handle_guard dir_guard(*this, _fs, dir, _handle_space, _fs); + Fs_handle_guard dir_guard(*this, dir, _handle_space, *this); ::File_system::File_handle file = _fs.file(dir, file_name.base() + 1, mode, create); *out_handle = new (alloc) - Fs_vfs_file_handle(*this, alloc, vfs_mode, _handle_space, file, _fs); + Fs_vfs_file_handle(*this, alloc, vfs_mode, _handle_space, file, *this); } catch (::File_system::Lookup_failed) { return OPEN_ERR_UNACCESSIBLE; } catch (::File_system::Permission_denied) { return OPEN_ERR_NO_PERM; } @@ -849,7 +870,7 @@ class Vfs::Fs_file_system : public File_system *out_handle = new (alloc) Fs_vfs_dir_handle(*this, alloc, ::File_system::READ_ONLY, - _handle_space, dir, _fs); + _handle_space, dir, *this); } catch (::File_system::Lookup_failed) { return OPENDIR_ERR_LOOKUP_FAILED; } catch (::File_system::Name_too_long) { return OPENDIR_ERR_NAME_TOO_LONG; } @@ -880,8 +901,7 @@ class Vfs::Fs_file_system : public File_system ::File_system::Dir_handle dir_handle = _fs.dir(abs_path.base(), false); - Fs_handle_guard from_dir_guard(*this, _fs, dir_handle, - _handle_space, _fs); + Fs_handle_guard from_dir_guard(*this, dir_handle, _handle_space, *this); ::File_system::Symlink_handle symlink_handle = _fs.symlink(dir_handle, symlink_name.base() + 1, create); @@ -889,7 +909,7 @@ class Vfs::Fs_file_system : public File_system *out_handle = new (alloc) Fs_vfs_symlink_handle(*this, alloc, ::File_system::READ_ONLY, - _handle_space, symlink_handle, _fs); + _handle_space, symlink_handle, *this); return OPENLINK_OK; } @@ -1030,7 +1050,7 @@ class Vfs::Fs_file_system : public File_system handle->read_ready_state = Handle_state::Read_ready_state::PENDING; - source.submit_packet(packet); + _submit_packet(packet); /* * When the packet is acknowledged the application is notified via diff --git a/repos/os/src/server/fs_report/main.cc b/repos/os/src/server/fs_report/main.cc index 30a588992c..6e76b6a36a 100644 --- a/repos/os/src/server/fs_report/main.cc +++ b/repos/os/src/server/fs_report/main.cc @@ -70,9 +70,9 @@ class Fs_report::Session_component : public Genode::Rpc_object { private: - Genode::Entrypoint &_ep; - Genode::Allocator &_alloc; - Vfs::File_system &_vfs; + Genode::Allocator &_alloc; + Vfs::Env::Io &_io; + Vfs::File_system &_vfs; Attached_ram_dataspace _ds; Path _path { }; @@ -108,10 +108,10 @@ class Fs_report::Session_component : public Genode::Rpc_object /* sync file operations before close */ while (!handle->fs().queue_sync(handle)) - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); while (handle->fs().complete_sync(handle) == Vfs::File_io_service::SYNC_QUEUED) - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); handle->close(); } @@ -126,11 +126,12 @@ class Fs_report::Session_component : public Genode::Rpc_object Session_component(Genode::Env &env, Genode::Allocator &alloc, + Vfs::Env::Io &io, Vfs::File_system &vfs, Genode::Session_label const &label, size_t buffer_size) : - _ep(env.ep()), _alloc(alloc), _vfs(vfs), + _alloc(alloc), _io(io), _vfs(vfs), _ds(env.ram(), env.rm(), buffer_size), _path(path_from_label(label.string())) { @@ -237,7 +238,8 @@ class Fs_report::Root : public Genode::Root_component } return new (md_alloc()) - Session_component(_env, _heap, _vfs_env.root_dir(), label, buffer_size); + Session_component(_env, _heap, _vfs_env.io(), _vfs_env.root_dir(), + label, buffer_size); } public: diff --git a/repos/os/src/server/vfs/main.cc b/repos/os/src/server/vfs/main.cc index f0c8c0acee..b65c9a32d7 100644 --- a/repos/os/src/server/vfs/main.cc +++ b/repos/os/src/server/vfs/main.cc @@ -90,6 +90,10 @@ class Vfs_server::Session_component : private Session_resources, Vfs::File_system &_vfs; + using Deferred_wakeups = Vfs::Remote_io::Deferred_wakeups; + + Deferred_wakeups &_deferred_wakeups; + Genode::Entrypoint &_ep; Io_progress_handler &_io_progress_handler; @@ -193,6 +197,7 @@ class Vfs_server::Session_component : private Session_resources, { drop_packet_from_submit_queue(); packet.succeeded(false); + Genode::log("consume_and_ack_invalid_packet"); _stream.try_ack_packet(packet); overall_progress = true; @@ -273,7 +278,12 @@ class Vfs_server::Session_component : private Session_resources, } if (node.acknowledgement_pending()) { - _stream.try_ack_packet(node.dequeue_acknowledgement()); + auto packet = node.dequeue_acknowledgement(); + + if (!packet.succeeded()) + Genode::warning("_try_acknowledge_jobs failed packet"); + + _stream.try_ack_packet(packet); progress = true; } @@ -378,6 +388,8 @@ class Vfs_server::Session_component : private Session_resources, */ if (progress == Process_packets_result::PROGRESS) _io_progress_handler.handle_io_progress(); + + _deferred_wakeups.trigger(); } /** @@ -442,6 +454,7 @@ class Vfs_server::Session_component : private Session_resources, Genode::Cap_quota cap_quota, size_t tx_buf_size, Vfs::File_system &vfs, + Deferred_wakeups &deferred_wakeups, Session_queue &active_sessions, Io_progress_handler &io_progress_handler, char const *root_path, @@ -450,6 +463,7 @@ class Vfs_server::Session_component : private Session_resources, Session_resources(env.pd(), env.rm(), ram_quota, cap_quota, tx_buf_size), Session_rpc_object(_packet_ds.cap(), env.rm(), env.ep().rpc_ep()), _vfs(vfs), + _deferred_wakeups(deferred_wakeups), _ep(env.ep()), _io_progress_handler(io_progress_handler), _active_sessions(active_sessions), @@ -852,6 +866,8 @@ class Vfs_server::Root : public Genode::Root_component, */ if (yield) Genode::Signal_transmitter(_reactivate_handler).submit(); + + _vfs_env.deferred_wakeups().trigger(); } protected: @@ -936,6 +952,7 @@ class Vfs_server::Root : public Genode::Root_component, Genode::Ram_quota{ram_quota}, Genode::Cap_quota{cap_quota}, tx_buf_size, _vfs_env.root_dir(), + _vfs_env.deferred_wakeups(), _active_sessions, *this, session_root.base(), writeable); diff --git a/repos/os/src/server/vfs_block/component.cc b/repos/os/src/server/vfs_block/component.cc index 240a31d539..b3cc762a07 100644 --- a/repos/os/src/server/vfs_block/component.cc +++ b/repos/os/src/server/vfs_block/component.cc @@ -226,17 +226,22 @@ struct Block_session_component : Rpc_object, using Block::Request_stream::try_acknowledge; using Block::Request_stream::wakeup_client_if_needed; + using Vfs_peers = Vfs::Remote_io::Deferred_wakeups; + Vfs_block::File &_file; + Vfs_peers &_vfs_peers; Block_session_component(Region_map &rm, Entrypoint &ep, Dataspace_capability ds, Signal_context_capability sigh, - Vfs_block::File &file) + Vfs_block::File &file, + Vfs_peers &vfs_peers) : Request_stream { rm, ds, ep, sigh, file.block_info() }, _ep { ep }, - _file { file } + _file { file }, + _vfs_peers { vfs_peers } { _ep.manage(*this); } @@ -303,6 +308,8 @@ struct Block_session_component : Rpc_object, } } + _vfs_peers.trigger(); + wakeup_client_if_needed(); } }; @@ -377,7 +384,8 @@ struct Main : Rpc_object> _request_handler, file_info); _block_session.construct(_env.rm(), _env.ep(), _block_ds->cap(), - _request_handler, *_block_file); + _request_handler, *_block_file, + _vfs_env.deferred_wakeups()); return _block_session->cap(); } catch (...) { diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index a92bc560f8..12e89169e5 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -280,7 +280,7 @@ struct Populate_test : public Stress_test struct Write_test : public Stress_test { - Genode::Entrypoint &_ep; + Vfs::Env::Io &_io; void write(int depth) { @@ -304,7 +304,7 @@ struct Write_test : public Stress_test handle->fs().queue_sync(handle); while (handle->fs().complete_sync(handle) == Vfs::File_io_service::SYNC_QUEUED) - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); count += n; } @@ -328,8 +328,9 @@ struct Write_test : public Stress_test } Write_test(Vfs::File_system &vfs, Genode::Allocator &alloc, - char const *parent, Genode::Entrypoint &ep) - : Stress_test(vfs, alloc, parent), _ep(ep) + char const *parent, Vfs::Env::Io &io) + : + Stress_test(vfs, alloc, parent), _io(io) { size_t path_len = strlen(path.base()); try { @@ -354,7 +355,7 @@ struct Write_test : public Stress_test struct Read_test : public Stress_test { - Genode::Entrypoint &_ep; + Vfs::Env::Io &_io; void read(int depth) { @@ -381,7 +382,7 @@ struct Read_test : public Stress_test while ((read_result = handle->fs().complete_read(handle, tmp, sizeof(tmp), n)) == Vfs::File_io_service::READ_QUEUED) - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); assert_read(read_result); @@ -410,8 +411,9 @@ struct Read_test : public Stress_test } Read_test(Vfs::File_system &vfs, Genode::Allocator &alloc, char const *parent, - Genode::Entrypoint &ep) - : Stress_test(vfs, alloc, parent), _ep(ep) + Vfs::Env::Io &io) + : + Stress_test(vfs, alloc, parent), _io(io) { size_t path_len = strlen(path.base()); try { @@ -436,7 +438,7 @@ struct Read_test : public Stress_test struct Unlink_test : public Stress_test { - Genode::Entrypoint &_ep; + Vfs::Env::Io &_io; void empty_dir(char const *path) { @@ -455,7 +457,7 @@ struct Unlink_test : public Stress_test while (dir_handle->fs().complete_read(dir_handle, (char*)&dirent, sizeof(dirent), out_count) == Vfs::File_io_service::READ_QUEUED) - _ep.wait_and_dispatch_one_io_signal(); + _io.progress(); subpath.append(dirent.name.buf); switch (dirent.type) { @@ -483,8 +485,9 @@ struct Unlink_test : public Stress_test } Unlink_test(Vfs::File_system &vfs, Genode::Allocator &alloc, - char const *parent, Genode::Entrypoint &ep) - : Stress_test(vfs, alloc, parent), _ep(ep) + char const *parent, Vfs::Env::Io &io) + : + Stress_test(vfs, alloc, parent), _io(io) { typedef Vfs::Directory_service::Unlink_result Result; try { @@ -537,11 +540,11 @@ void Component::construct(Genode::Env &env) auto vfs_root_sync = [&] () { while (!vfs_root_handle->fs().queue_sync(vfs_root_handle)) - env.ep().wait_and_dispatch_one_io_signal(); + vfs_env.io().progress(); while (vfs_root_handle->fs().complete_sync(vfs_root_handle) == Vfs::File_io_service::SYNC_QUEUED) - env.ep().wait_and_dispatch_one_io_signal(); + vfs_env.io().progress(); }; char path[Vfs::MAX_PATH_LEN]; @@ -624,7 +627,7 @@ void Component::construct(Genode::Env &env) for (int i = 0; i < ROOT_TREE_COUNT; ++i) { snprintf(path, 3, "/%d", i); - Write_test test(vfs_root, heap, path, env.ep()); + Write_test test(vfs_root, heap, path, vfs_env.io()); count += test.wait(); } @@ -660,7 +663,7 @@ void Component::construct(Genode::Env &env) for (int i = 0; i < ROOT_TREE_COUNT; ++i) { snprintf(path, 3, "/%d", i); - Read_test test(vfs_root, heap, path, env.ep()); + Read_test test(vfs_root, heap, path, vfs_env.io()); count += test.wait(); } @@ -696,7 +699,7 @@ void Component::construct(Genode::Env &env) for (int i = 0; i < ROOT_TREE_COUNT; ++i) { snprintf(path, 3, "/%d", i); - Unlink_test test(vfs_root, heap, path, env.ep()); + Unlink_test test(vfs_root, heap, path, vfs_env.io()); count += test.wait(); } From e9541605ab856c3f4c65afb05414d4d5ae0e62df Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 3 Dec 2022 13:49:53 +0100 Subject: [PATCH 0128/1921] ports: lighttpd_fetchurl.run script This networking scenario is useful for analysing and optimizing the interplay of the VFS, libc, TCP/IP, and the NIC router. It downloads a file via fetchurl from lighttpd, both of which are hosted on a virtual network. Issue #4697 --- repos/ports/run/lighttpd_fetchurl.run | 184 ++++++++++++++++++++++++++ tool/autopilot.list | 1 + 2 files changed, 185 insertions(+) create mode 100644 repos/ports/run/lighttpd_fetchurl.run diff --git a/repos/ports/run/lighttpd_fetchurl.run b/repos/ports/run/lighttpd_fetchurl.run new file mode 100644 index 0000000000..8066319a48 --- /dev/null +++ b/repos/ports/run/lighttpd_fetchurl.run @@ -0,0 +1,184 @@ +# +# \brief Download data via fetchurl from lighttpd over a virtual network +# \author Norman Feske +# \date 2022-12-03 +# + +if {[have_board virt_qemu_riscv]} { + puts "Run script is not supported on this platform (missing curl and libssh)." + exit 0 +} + +proc ip_stack { } { return lwip } +proc download_size { } { return "1M" } +proc audit { } { return 1 } + +build "lib/vfs_[ip_stack] lib/libc app/fetchurl lib/curl" + +create_boot_directory + +import_from_depot [depot_user]/src/[base_src] \ + [depot_user]/src/init \ + [depot_user]/src/nic_router \ + [depot_user]/src/report_rom \ + [depot_user]/src/libc \ + [depot_user]/src/libssh \ + [depot_user]/src/lighttpd \ + [depot_user]/src/fetchurl \ + [depot_user]/src/curl \ + [depot_user]/src/openssl \ + [depot_user]/src/posix \ + [depot_user]/src/vfs \ + [depot_user]/src/vfs_[ip_stack] \ + [depot_user]/src/vfs_audit \ + [depot_user]/src/zlib + +proc lighttpd_config { } { + return { + server.port = 80 + server.document-root = "/website" + server.event-handler = "select" + server.network-backend = "write" + server.upload-dirs = ( "/tmp" ) + } +} + +proc socket_fs_plugin { } { return "<[ip_stack] dhcp=\"yes\"/>" } + +proc socket_path { } { if {[audit]} { return "/audit" } else { return "/socket" } } + +install_config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2000-01-01 00:00 + 0123456789012345678901234567890123456789 + + } [socket_fs_plugin] { + + + + } [lighttpd_config] { + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2000-01-01 00:00 + 01234567890123456789 + + } [socket_fs_plugin] { + + + + + + + +} + +build_boot_image [build_artifacts] + +append qemu_args " -nographic " + +run_genode_until {.*server started.*} 10 + +set download_start_time [clock milliseconds] + +run_genode_until {.*"fetchurl" exited with exit value 0.*\n.*} 60 [output_spawn_id] + +set download_end_time [clock milliseconds] + +set download_duration_ms [expr ($download_end_time - $download_start_time)] + +puts "\ntransferred [download_size] in $download_duration_ms ms" + +if {[audit]} { + + # count switches between fetchurl and lighttpd based on the output of 'audit' + set previous_label "" + set audit_messages 0 + set context_switches 0 + foreach line [split [strip_whitespace $output] "\n"] { + if {[regexp -- {(\[.*-> audit\]).*} $line match label]} { + incr audit_messages + if {$label != $previous_label} { + incr context_switches + set previous_label $label + } + } + } + + puts "\n$audit_messages audit messages" + puts "\n$context_switches context switches between fetchurl and lighttpd" +} diff --git a/tool/autopilot.list b/tool/autopilot.list index 559e9d6954..565b93c1e6 100644 --- a/tool/autopilot.list +++ b/tool/autopilot.list @@ -23,6 +23,7 @@ intel_fb libc_integration libc_vfs_fs_ext2 libc_vfs_fs_fat +lighttpd_fetchurl log_core lwip lx_fs_import From fcf5fcd58c4c846150bdea889bf29ba6831f4018 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 3 Dec 2022 15:38:57 +0100 Subject: [PATCH 0129/1921] libports: remove stand-alone variant of lwIP Since the lwip library is used only by the vfs_lwip plugin, this patch moves the Genode-specific support code local to the VFS plugin, easing further simplification and allowing for a tighter integration with the VFS plugin. The recipes for api/lwip and src/vfs_lwip stay separate as both parts use different licenses. Issue #4697 --- repos/libports/lib/mk/lwip.mk | 7 +------ repos/libports/lib/mk/vfs_lwip.mk | 5 ++++- repos/libports/recipes/api/lwip/content.mk | 2 +- .../{include/lwip => src/lib/lwip/include}/arch/cc.h | 0 .../{include/lwip => src/lib/lwip/include}/arch/perf.h | 0 .../{include/lwip => src/lib/lwip/include}/lwipopts.h | 0 .../genode_init.h => src/lib/vfs/lwip/lwip_genode_init.h} | 0 repos/libports/{include => src/lib/vfs}/lwip/nic_netif.h | 2 +- .../libports/src/lib/{lwip/platform => vfs/lwip}/printf.cc | 0 repos/libports/src/lib/{lwip/platform => vfs/lwip}/rand.cc | 0 .../src/lib/{lwip/platform => vfs/lwip}/sys_arch.cc | 2 +- repos/libports/src/lib/vfs/lwip/vfs.cc | 4 ++-- 12 files changed, 10 insertions(+), 12 deletions(-) rename repos/libports/{include/lwip => src/lib/lwip/include}/arch/cc.h (100%) rename repos/libports/{include/lwip => src/lib/lwip/include}/arch/perf.h (100%) rename repos/libports/{include/lwip => src/lib/lwip/include}/lwipopts.h (100%) rename repos/libports/{include/lwip/genode_init.h => src/lib/vfs/lwip/lwip_genode_init.h} (100%) rename repos/libports/{include => src/lib/vfs}/lwip/nic_netif.h (99%) rename repos/libports/src/lib/{lwip/platform => vfs/lwip}/printf.cc (100%) rename repos/libports/src/lib/{lwip/platform => vfs/lwip}/rand.cc (100%) rename repos/libports/src/lib/{lwip/platform => vfs/lwip}/sys_arch.cc (98%) diff --git a/repos/libports/lib/mk/lwip.mk b/repos/libports/lib/mk/lwip.mk index 3b3e6c7f78..c8838e739b 100644 --- a/repos/libports/lib/mk/lwip.mk +++ b/repos/libports/lib/mk/lwip.mk @@ -9,9 +9,6 @@ LWIPDIR := $(LWIP_PORT_DIR)/src/lib/lwip/src -include $(LWIPDIR)/Filelists.mk -# Genode platform files -SRC_CC = printf.cc rand.cc sys_arch.cc - # Core files SRC_C += $(notdir $(COREFILES)) @@ -24,14 +21,12 @@ SRC_C += $(notdir $(CORE6FILES)) # Network interface files SRC_C += $(notdir $(NETIFFILES)) -INC_DIR += $(REP_DIR)/include/lwip \ - $(LWIP_PORT_DIR)/include/lwip \ +INC_DIR += $(LWIP_PORT_DIR)/include/lwip \ $(LWIPDIR)/include \ $(LWIPDIR)/include/ipv4 \ $(LWIPDIR)/include/api \ $(LWIPDIR)/include/netif \ $(REP_DIR)/src/lib/lwip/include -vpath %.cc $(REP_DIR)/src/lib/lwip/platform vpath %.c $(sort $(dir \ $(COREFILES) $(CORE4FILES) $(CORE6FILES) $(NETIFFILES))) diff --git a/repos/libports/lib/mk/vfs_lwip.mk b/repos/libports/lib/mk/vfs_lwip.mk index b71b7174f6..89354fc379 100644 --- a/repos/libports/lib/mk/vfs_lwip.mk +++ b/repos/libports/lib/mk/vfs_lwip.mk @@ -1,7 +1,10 @@ -SRC_CC = vfs.cc +SRC_CC = vfs.cc printf.cc rand.cc sys_arch.cc VFS_DIR = $(REP_DIR)/src/lib/vfs/lwip INC_DIR += $(VFS_DIR) + +REP_INC_DIR += src/lib/lwip/include + LD_OPT += --version-script=$(VFS_DIR)/symbol.map LIBS += lwip diff --git a/repos/libports/recipes/api/lwip/content.mk b/repos/libports/recipes/api/lwip/content.mk index f83371e43e..c789f04d8d 100644 --- a/repos/libports/recipes/api/lwip/content.mk +++ b/repos/libports/recipes/api/lwip/content.mk @@ -1,5 +1,5 @@ MIRROR_FROM_REP_DIR := \ - $(shell cd $(REP_DIR); find include/lwip src/lib/lwip -type f) \ + $(shell cd $(REP_DIR); find src/lib/lwip -type f) \ lib/import/import-lwip.mk \ lib/mk/lwip.mk \ diff --git a/repos/libports/include/lwip/arch/cc.h b/repos/libports/src/lib/lwip/include/arch/cc.h similarity index 100% rename from repos/libports/include/lwip/arch/cc.h rename to repos/libports/src/lib/lwip/include/arch/cc.h diff --git a/repos/libports/include/lwip/arch/perf.h b/repos/libports/src/lib/lwip/include/arch/perf.h similarity index 100% rename from repos/libports/include/lwip/arch/perf.h rename to repos/libports/src/lib/lwip/include/arch/perf.h diff --git a/repos/libports/include/lwip/lwipopts.h b/repos/libports/src/lib/lwip/include/lwipopts.h similarity index 100% rename from repos/libports/include/lwip/lwipopts.h rename to repos/libports/src/lib/lwip/include/lwipopts.h diff --git a/repos/libports/include/lwip/genode_init.h b/repos/libports/src/lib/vfs/lwip/lwip_genode_init.h similarity index 100% rename from repos/libports/include/lwip/genode_init.h rename to repos/libports/src/lib/vfs/lwip/lwip_genode_init.h diff --git a/repos/libports/include/lwip/nic_netif.h b/repos/libports/src/lib/vfs/lwip/nic_netif.h similarity index 99% rename from repos/libports/include/lwip/nic_netif.h rename to repos/libports/src/lib/vfs/lwip/nic_netif.h index 004ad00a55..13d11dc5fc 100644 --- a/repos/libports/include/lwip/nic_netif.h +++ b/repos/libports/src/lib/vfs/lwip/nic_netif.h @@ -26,7 +26,7 @@ #endif /* Genode includes */ -#include +#include #include #include #include diff --git a/repos/libports/src/lib/lwip/platform/printf.cc b/repos/libports/src/lib/vfs/lwip/printf.cc similarity index 100% rename from repos/libports/src/lib/lwip/platform/printf.cc rename to repos/libports/src/lib/vfs/lwip/printf.cc diff --git a/repos/libports/src/lib/lwip/platform/rand.cc b/repos/libports/src/lib/vfs/lwip/rand.cc similarity index 100% rename from repos/libports/src/lib/lwip/platform/rand.cc rename to repos/libports/src/lib/vfs/lwip/rand.cc diff --git a/repos/libports/src/lib/lwip/platform/sys_arch.cc b/repos/libports/src/lib/vfs/lwip/sys_arch.cc similarity index 98% rename from repos/libports/src/lib/lwip/platform/sys_arch.cc rename to repos/libports/src/lib/vfs/lwip/sys_arch.cc index 39b708bb0c..64bbe009a8 100644 --- a/repos/libports/src/lib/lwip/platform/sys_arch.cc +++ b/repos/libports/src/lib/vfs/lwip/sys_arch.cc @@ -17,7 +17,7 @@ #include #include -#include +#include extern "C" { /* LwIP includes */ diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index f61f936eb0..03b1d5a3aa 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -24,8 +24,8 @@ #include /* LwIP includes */ -#include -#include +#include +#include namespace Lwip { extern "C" { From 5fdacae88b1dd358251cdb2ab9120b0edf671b32 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 3 Dec 2022 16:18:56 +0100 Subject: [PATCH 0130/1921] vfs: remove obsolete mutexes ...and tighten constness in adjacent code parts. The VFS-internal synchronization via mutexes is no longer needed because the access to the VFS is serialized by the VFS client, i.e., the libc. Issue #4697 --- repos/os/include/vfs/types.h | 2 - repos/os/src/lib/vfs/block_file_system.h | 16 +- repos/os/src/lib/vfs/fs_file_system.h | 31 ---- repos/os/src/lib/vfs/ram_file_system.h | 221 ++++++++++------------- repos/os/src/lib/vfs/tar_file_system.h | 11 +- 5 files changed, 102 insertions(+), 179 deletions(-) diff --git a/repos/os/include/vfs/types.h b/repos/os/include/vfs/types.h index d16ff3279d..93dc1c3bcc 100644 --- a/repos/os/include/vfs/types.h +++ b/repos/os/include/vfs/types.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -41,7 +40,6 @@ namespace Vfs { using Genode::memcpy; using Genode::memset; typedef unsigned long long file_size; - using Genode::Mutex; using Genode::List; using Genode::Xml_node; using Genode::Signal_context_capability; diff --git a/repos/os/src/lib/vfs/block_file_system.h b/repos/os/src/lib/vfs/block_file_system.h index 6093c965ea..bc3d0a88ad 100644 --- a/repos/os/src/lib/vfs/block_file_system.h +++ b/repos/os/src/lib/vfs/block_file_system.h @@ -49,13 +49,8 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system Vfs::Env &_env; - /* - * Serialize access to packet stream of the block session - */ - Mutex _mutex { }; - - char *_block_buffer; - unsigned _block_buffer_count; + char *_block_buffer; + unsigned _block_buffer_count; Block::Connection<> &_block; Block::Session::Info const &_info; @@ -69,7 +64,6 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system Genode::Entrypoint &_ep; Genode::Allocator &_alloc; - Mutex &_mutex; char *_block_buffer; unsigned &_block_buffer_count; Block::Connection<> &_block; @@ -107,8 +101,6 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system while (true) { try { - Mutex::Guard guard(_mutex); - packet = _block.alloc_packet(packet_count * _block_size); break; } catch (Block::Session::Tx::Source::Packet_alloc_failed) { @@ -121,7 +113,6 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system } } } - Mutex::Guard guard(_mutex); Block::Packet_descriptor p(packet, op, nr, packet_count); @@ -153,7 +144,6 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system File_io_service &fs, Genode::Entrypoint &ep, Genode::Allocator &alloc, - Mutex &mutex, char *block_buffer, unsigned &block_buffer_count, Block::Connection<> &block, @@ -165,7 +155,6 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system Single_vfs_handle(ds, fs, alloc, 0), _ep(ep), _alloc(alloc), - _mutex(mutex), _block_buffer(block_buffer), _block_buffer_count(block_buffer_count), _block(block), @@ -397,7 +386,6 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system *out_handle = new (alloc) Block_vfs_handle(*this, *this, _env.env().ep(), alloc, - _mutex, _block_buffer, _block_buffer_count, _block, diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index 3df374670d..fa7f00845d 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -28,15 +28,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io { private: - /* - * Mutex used to serialize the interaction with the packet stream of the - * file-system session. - * - * XXX Once, we change the VFS file-system interface to use - * asynchronous read/write operations, we can possibly remove it. - */ - Mutex _mutex { }; - Vfs::Env &_env; Genode::Allocator_avl _fs_packet_alloc { &_env.alloc() }; @@ -622,12 +613,10 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Genode::warning("ack for unknown File_system handle ", id); } if (packet.operation() == Packet_descriptor::WRITE) { - Mutex::Guard guard(_mutex); source.release_packet(packet); } if (packet.operation() == Packet_descriptor::WRITE_TIMESTAMP) { - Mutex::Guard guard(_mutex); source.release_packet(packet); } } @@ -814,8 +803,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Open_result open(char const *path, unsigned vfs_mode, Vfs_handle **out_handle, Genode::Allocator& alloc) override { - Mutex::Guard guard(_mutex); - Absolute_path dir_path(path); dir_path.strip_last_element(); @@ -861,8 +848,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Opendir_result opendir(char const *path, bool create, Vfs_handle **out_handle, Allocator &alloc) override { - Mutex::Guard guard(_mutex); - Absolute_path dir_path(path); try { @@ -886,8 +871,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Openlink_result openlink(char const *path, bool create, Vfs_handle **out_handle, Allocator &alloc) override { - Mutex::Guard guard(_mutex); - /* * Canonicalize path (i.e., path must start with '/') */ @@ -926,8 +909,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io void close(Vfs_handle *vfs_handle) override { - Mutex::Guard guard(_mutex); - Fs_vfs_handle *fs_handle = static_cast(vfs_handle); if (fs_handle->enqueued()) _congested_handles.remove(*fs_handle); @@ -988,8 +969,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Write_result write(Vfs_handle *vfs_handle, char const *buf, file_size buf_size, file_size &out_count) override { - Mutex::Guard guard(_mutex); - Fs_vfs_handle &handle = static_cast(*vfs_handle); out_count = _write(handle, buf, buf_size, handle.seek()); @@ -998,8 +977,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io bool queue_read(Vfs_handle *vfs_handle, file_size count) override { - Mutex::Guard guard(_mutex); - Fs_vfs_handle *handle = static_cast(vfs_handle); bool result = handle->queue_read(count); @@ -1011,8 +988,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Read_result complete_read(Vfs_handle *vfs_handle, char *dst, file_size count, file_size &out_count) override { - Mutex::Guard guard(_mutex); - out_count = 0; Fs_vfs_handle *handle = static_cast(vfs_handle); @@ -1076,8 +1051,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io bool queue_sync(Vfs_handle *vfs_handle) override { - Mutex::Guard guard(_mutex); - Fs_vfs_handle *handle = static_cast(vfs_handle); return handle->queue_sync(); @@ -1085,8 +1058,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Sync_result complete_sync(Vfs_handle *vfs_handle) override { - Mutex::Guard guard(_mutex); - Fs_vfs_handle *handle = static_cast(vfs_handle); return handle->complete_sync(); @@ -1094,8 +1065,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io bool update_modification_timestamp(Vfs_handle *vfs_handle, Vfs::Timestamp time) override { - Mutex::Guard guard(_mutex); - Fs_vfs_handle *handle = static_cast(vfs_handle); return handle->update_modification_timestamp(time); diff --git a/repos/os/src/lib/vfs/ram_file_system.h b/repos/os/src/lib/vfs/ram_file_system.h index 6b735daaec..0f333a26f5 100644 --- a/repos/os/src/lib/vfs/ram_file_system.h +++ b/repos/os/src/lib/vfs/ram_file_system.h @@ -93,7 +93,7 @@ struct Vfs_ram::Watch_handle final : public Vfs_watch_handle, }; -class Vfs_ram::Node : private Genode::Avl_node, private Genode::Mutex +class Vfs_ram::Node : private Genode::Avl_node { private: @@ -123,9 +123,6 @@ class Vfs_ram::Node : private Genode::Avl_node, private Genode::Mutex public: - using Mutex::acquire; - using Mutex::release; - unsigned long inode; Node(char const *node_name) : inode(_unique_inode()) @@ -201,6 +198,7 @@ class Vfs_ram::Node : private Genode::Avl_node, private Genode::Mutex Genode::error("Vfs_ram::Node::truncate() called"); } + /************************ ** Avl node interface ** ************************/ @@ -231,24 +229,14 @@ class Vfs_ram::Node : private Genode::Avl_node, private Genode::Mutex return n; } - Node *sibling(const char *name) + Node *sibling(const char * const name) { if (strcmp(name, _name) == 0) return this; - Node *c = + Node * const c = Avl_node::child(strcmp(name, _name) > 0); return c ? c->sibling(name) : nullptr; } - - struct Guard - { - Node &node; - bool release { true }; - - Guard(Node *guard_node) : node(*guard_node) { node.acquire(); } - - ~Guard() { if (release) node.release(); } - }; }; @@ -266,10 +254,10 @@ class Vfs_ram::File : public Vfs_ram::Node public: - File(char const *name, Allocator &alloc) + File(char const * const name, Allocator &alloc) : Node(name), _chunk(alloc, 0) { } - size_t read(char *dst, size_t len, file_size seek_offset) override + size_t read(char * const dst, size_t len, file_size const seek_offset) override { file_size const chunk_used_size = _chunk.used_size(); @@ -306,7 +294,7 @@ class Vfs_ram::File : public Vfs_ram::Node Vfs::File_io_service::Read_result complete_read(char *dst, file_size count, file_size seek_offset, - file_size &out_count) override + file_size &out_count) override { out_count = read(dst, (size_t)count, (size_t)seek_offset); return Vfs::File_io_service::READ_OK; @@ -408,8 +396,7 @@ class Vfs_ram::Directory : public Vfs_ram::Node public: - Directory(char const *name) - : Node(name) { } + Directory(char const *name) : Node(name) { } void empty(Allocator &alloc) { @@ -433,7 +420,7 @@ class Vfs_ram::Directory : public Vfs_ram::Node Node *child(char const *name) { - Node *node = _entries.first(); + Node * const node = _entries.first(); return node ? node->sibling(name) : nullptr; } @@ -523,7 +510,7 @@ class Vfs::Ram_file_system : public Vfs::File_system if (buf[i] == '/') { buf[i] = '\0'; - Node *node = dir->child(name); + Node * const node = dir->child(name); if (!node) return nullptr; dir = dynamic_cast(node); @@ -545,7 +532,7 @@ class Vfs::Ram_file_system : public Vfs::File_system { using namespace Vfs_ram; - Node *node = lookup(path, true); + Node * const node = lookup(path, true); if (node) return dynamic_cast(node); return nullptr; @@ -555,7 +542,7 @@ class Vfs::Ram_file_system : public Vfs::File_system { using namespace Vfs_ram; - if (File *file = dynamic_cast(node)) { + if (File * const file = dynamic_cast(node)) { if (file->opened()) { file->unlink(); return; @@ -582,20 +569,18 @@ class Vfs::Ram_file_system : public Vfs::File_system { using namespace Vfs_ram; - if (Node *node = lookup(path)) { - Node::Guard guard(node); - if (Directory *dir = dynamic_cast(node)) + if (Node * const node = lookup(path)) + if (Directory * const dir = dynamic_cast(node)) return dir->length(); - } return 0; } - bool directory(char const *path) override + bool directory(char const * const path) override { using namespace Vfs_ram; - Node *node = lookup(path); + Node * const node = lookup(path); return node ? (dynamic_cast(node) != nullptr) : false; @@ -604,22 +589,23 @@ class Vfs::Ram_file_system : public Vfs::File_system char const *leaf_path(char const *path) override { return lookup(path) ? path : nullptr; } - Open_result open(char const *path, unsigned mode, - Vfs_handle **handle, - Allocator &alloc) override + Open_result open(char const * const path, unsigned mode, + Vfs_handle **handle, Allocator &alloc) override { using namespace Vfs_ram; File *file; - char const *name = basename(path); - bool const create = mode & OPEN_MODE_CREATE; + char const * const name = basename(path); + bool const create = mode & OPEN_MODE_CREATE; if (create) { - Directory *parent = lookup_parent(path); - if (!parent) return OPEN_ERR_UNACCESSIBLE; - Node::Guard guard(parent); + Directory * const parent = lookup_parent(path); - if (parent->child(name)) return OPEN_ERR_EXISTS; + if (!parent) + return OPEN_ERR_UNACCESSIBLE; + + if (parent->child(name)) + return OPEN_ERR_EXISTS; if (strlen(name) >= MAX_NAME_LEN) return OPEN_ERR_NAME_TOO_LONG; @@ -629,7 +615,7 @@ class Vfs::Ram_file_system : public Vfs::File_system parent->adopt(file); parent->notify(); } else { - Node *node = lookup(path); + Node * const node = lookup(path); if (!node) return OPEN_ERR_UNACCESSIBLE; file = dynamic_cast(node); @@ -654,17 +640,16 @@ class Vfs::Ram_file_system : public Vfs::File_system } } - Opendir_result opendir(char const *path, bool create, - Vfs_handle **handle, - Allocator &alloc) override + Opendir_result opendir(char const * const path, bool create, + Vfs_handle **handle, Allocator &alloc) override { using namespace Vfs_ram; - Directory *parent = lookup_parent(path); - if (!parent) return OPENDIR_ERR_LOOKUP_FAILED; - Node::Guard guard(parent); + Directory * const parent = lookup_parent(path); + if (!parent) + return OPENDIR_ERR_LOOKUP_FAILED; - char const *name = basename(path); + char const * const name = basename(path); Directory *dir; @@ -685,7 +670,7 @@ class Vfs::Ram_file_system : public Vfs::File_system parent->notify(); } else { - Node *node = lookup(path); + Node * const node = lookup(path); if (!node) return OPENDIR_ERR_LOOKUP_FAILED; dir = dynamic_cast(node); @@ -711,20 +696,20 @@ class Vfs::Ram_file_system : public Vfs::File_system } } - Openlink_result openlink(char const *path, bool create, + Openlink_result openlink(char const * const path, bool create, Vfs_handle **handle, Allocator &alloc) override { using namespace Vfs_ram; - Directory *parent = lookup_parent(path); - if (!parent) return OPENLINK_ERR_LOOKUP_FAILED; - Node::Guard guard(parent); + Directory * const parent = lookup_parent(path); + if (!parent) + return OPENLINK_ERR_LOOKUP_FAILED; - char const *name = basename(path); + char const * const name = basename(path); Symlink *link; - Node *node = parent->child(name); + Node * const node = parent->child(name); if (create) { @@ -737,14 +722,12 @@ class Vfs::Ram_file_system : public Vfs::File_system try { link = new (_env.alloc()) Symlink(name); } catch (Out_of_memory) { return OPENLINK_ERR_NO_SPACE; } - link->acquire(); parent->adopt(link); - link->release(); parent->notify(); } else { - if (!node) return OPENLINK_ERR_LOOKUP_FAILED; - Node::Guard guard(node); + if (!node) + return OPENLINK_ERR_LOOKUP_FAILED; link = dynamic_cast(node); if (!link) return OPENLINK_ERR_LOOKUP_FAILED; @@ -771,7 +754,7 @@ class Vfs::Ram_file_system : public Vfs::File_system void close(Vfs_handle *vfs_handle) override { - Vfs_ram::Io_handle *ram_handle = + Vfs_ram::Io_handle * const ram_handle = static_cast(vfs_handle); Vfs_ram::Node &node = ram_handle->node; @@ -791,10 +774,9 @@ class Vfs::Ram_file_system : public Vfs::File_system { using namespace Vfs_ram; - Node *node_ptr = lookup(path); - if (!node_ptr) return STAT_ERR_NO_ENTRY; - - Node::Guard guard(node_ptr); + Node * const node_ptr = lookup(path); + if (!node_ptr) + return STAT_ERR_NO_ENTRY; Node &node = *node_ptr; @@ -818,41 +800,33 @@ class Vfs::Ram_file_system : public Vfs::File_system return STAT_OK; } - Rename_result rename(char const *from, char const *to) override + Rename_result rename(char const * const from, char const * const to) override { using namespace Vfs_ram; if ((strcmp(from, to) == 0) && lookup(from)) return RENAME_OK; - char const *new_name = basename(to); + char const * const new_name = basename(to); if (strlen(new_name) >= MAX_NAME_LEN) return RENAME_ERR_NO_PERM; - Directory *from_dir = lookup_parent(from); - if (!from_dir) return RENAME_ERR_NO_ENTRY; - Node::Guard from_guard(from_dir); + Directory * const from_dir = lookup_parent(from); + if (!from_dir) + return RENAME_ERR_NO_ENTRY; - Directory *to_dir = lookup_parent(to); - if (!to_dir) return RENAME_ERR_NO_ENTRY; + Directory * const to_dir = lookup_parent(to); + if (!to_dir) + return RENAME_ERR_NO_ENTRY; - /* unlock the node so a second guard can be constructed */ - if (from_dir == to_dir) { - from_dir->Node::release(); - from_guard.release = false; - } + Node * const from_node = from_dir->child(basename(from)); + if (!from_node) + return RENAME_ERR_NO_ENTRY; - Node::Guard to_guard(to_dir); - - Node *from_node = from_dir->child(basename(from)); - if (!from_node) return RENAME_ERR_NO_ENTRY; - Node::Guard guard(from_node); - - Node *to_node = to_dir->child(new_name); + Node * const to_node = to_dir->child(new_name); if (to_node) { - to_node->acquire(); - if (Directory *dir = dynamic_cast(to_node)) + if (Directory * const dir = dynamic_cast(to_node)) if (dir->length() || (!dynamic_cast(from_node))) return RENAME_ERR_NO_PERM; @@ -876,17 +850,17 @@ class Vfs::Ram_file_system : public Vfs::File_system return RENAME_OK; } - Unlink_result unlink(char const *path) override + Unlink_result unlink(char const * const path) override { using namespace Vfs_ram; - Directory *parent = lookup_parent(path); - if (!parent) return UNLINK_ERR_NO_ENTRY; - Node::Guard guard(parent); + Directory * const parent = lookup_parent(path); + if (!parent) + return UNLINK_ERR_NO_ENTRY; - Node *node = parent->child(basename(path)); - if (!node) return UNLINK_ERR_NO_ENTRY; - Node::Guard node_guard(node); + Node * const node = parent->child(basename(path)); + if (!node) + return UNLINK_ERR_NO_ENTRY; parent->release(node); node->notify(); @@ -895,18 +869,19 @@ class Vfs::Ram_file_system : public Vfs::File_system return UNLINK_OK; } - Dataspace_capability dataspace(char const *path) override + Dataspace_capability dataspace(char const * const path) override { using namespace Vfs_ram; Ram_dataspace_capability ds_cap; - Node *node = lookup(path); - if (!node) return ds_cap; - Node::Guard guard(node); + Node * const node = lookup(path); + if (!node) + return ds_cap; - File *file = dynamic_cast(node); - if (!file) return ds_cap; + File * const file = dynamic_cast(node); + if (!file) + return ds_cap; size_t len = (size_t)file->length(); @@ -931,18 +906,17 @@ class Vfs::Ram_file_system : public Vfs::File_system static_cap_cast(ds_cap)); } - Watch_result watch(char const *path, - Vfs_watch_handle **handle, - Allocator &alloc) override + Watch_result watch(char const * const path, Vfs_watch_handle **handle, + Allocator &alloc) override { using namespace Vfs_ram; - Node *node = lookup(path); - if (!node) return WATCH_ERR_UNACCESSIBLE; - Node::Guard guard(node); + Node * const node = lookup(path); + if (!node) + return WATCH_ERR_UNACCESSIBLE; try { - Vfs_ram::Watch_handle *watch_handle = new(alloc) + Vfs_ram::Watch_handle * const watch_handle = new(alloc) Vfs_ram::Watch_handle(*this, alloc, *node); node->open(*watch_handle); *handle = watch_handle; @@ -952,60 +926,56 @@ class Vfs::Ram_file_system : public Vfs::File_system catch (Genode::Out_of_caps) { return WATCH_ERR_OUT_OF_CAPS; } } - void close(Vfs_watch_handle *vfs_handle) override + void close(Vfs_watch_handle * const vfs_handle) override { - Vfs_ram::Watch_handle *watch_handle = + Vfs_ram::Watch_handle * const watch_handle = static_cast(vfs_handle); watch_handle->node.close(*watch_handle); destroy(watch_handle->alloc(), watch_handle); }; + /************************ ** File I/O interface ** ************************/ - Write_result write(Vfs_handle *vfs_handle, - char const *buf, file_size len, + Write_result write(Vfs_handle * const vfs_handle, + char const * const buf, file_size len, Vfs::file_size &out) override { if ((vfs_handle->status_flags() & OPEN_MODE_ACCMODE) == OPEN_MODE_RDONLY) return WRITE_ERR_INVALID; - Vfs_ram::Io_handle *handle = + Vfs_ram::Io_handle * const handle = static_cast(vfs_handle); - Vfs_ram::Node::Guard guard(&handle->node); out = handle->node.write(buf, (size_t)len, handle->seek()); handle->modifying = true; return WRITE_OK; } - Read_result complete_read(Vfs_handle *vfs_handle, char *dst, file_size count, - file_size &out_count) override + Read_result complete_read(Vfs_handle * const vfs_handle, char *dst, + file_size count, file_size &out_count) override { out_count = 0; - Vfs_ram::Io_handle const *handle = + Vfs_ram::Io_handle const * const handle = static_cast(vfs_handle); - Vfs_ram::Node::Guard guard(&handle->node); - return handle->node.complete_read(dst, count, handle->seek(), out_count); } bool read_ready(Vfs_handle *) override { return true; } - Ftruncate_result ftruncate(Vfs_handle *vfs_handle, file_size len) override + Ftruncate_result ftruncate(Vfs_handle * const vfs_handle, file_size len) override { if ((vfs_handle->status_flags() & OPEN_MODE_ACCMODE) == OPEN_MODE_RDONLY) return FTRUNCATE_ERR_NO_PERM; - Vfs_ram::Io_handle const *handle = + Vfs_ram::Io_handle const * const handle = static_cast(vfs_handle); - Vfs_ram::Node::Guard guard(&handle->node); - try { handle->node.truncate(len); } catch (Vfs_ram::Out_of_memory) { return FTRUNCATE_ERR_NO_SPACE; } return FTRUNCATE_OK; @@ -1014,9 +984,9 @@ class Vfs::Ram_file_system : public Vfs::File_system /** * Notify other handles if this handle has modified the node */ - Sync_result complete_sync(Vfs_handle *vfs_handle) override + Sync_result complete_sync(Vfs_handle * const vfs_handle) override { - Vfs_ram::Io_handle *handle = + Vfs_ram::Io_handle * const handle = static_cast(vfs_handle); if (handle->modifying) { handle->modifying = false; @@ -1027,19 +997,20 @@ class Vfs::Ram_file_system : public Vfs::File_system return SYNC_OK; } - bool update_modification_timestamp(Vfs_handle *vfs_handle, Vfs::Timestamp time) override + bool update_modification_timestamp(Vfs_handle * const vfs_handle, + Vfs::Timestamp time) override { if ((vfs_handle->status_flags() & OPEN_MODE_ACCMODE) == OPEN_MODE_RDONLY) return false; - Vfs_ram::Io_handle *handle = + Vfs_ram::Io_handle * const handle = static_cast(vfs_handle); handle->modifying = true; - Vfs_ram::Node::Guard guard(&handle->node); return handle->node.update_modification_timestamp(time); } + /*************************** ** File_system interface ** ***************************/ diff --git a/repos/os/src/lib/vfs/tar_file_system.h b/repos/os/src/lib/vfs/tar_file_system.h index 822022d6b0..12fcbc9dea 100644 --- a/repos/os/src/lib/vfs/tar_file_system.h +++ b/repos/os/src/lib/vfs/tar_file_system.h @@ -484,19 +484,16 @@ class Vfs::Tar_file_system : public File_system struct Num_dirent_cache { - Mutex mutex { }; - Node &root_node; - bool valid; /* true after first lookup */ - char key[256]; /* key used for lookup */ - file_size cached_num_dirent; /* cached value */ + Node &root_node; + bool valid; /* true after first lookup */ + char key[256]; /* key used for lookup */ + file_size cached_num_dirent; /* cached value */ Num_dirent_cache(Node &root_node) : root_node(root_node), valid(false), cached_num_dirent(0) { } file_size num_dirent(char const *path) { - Mutex::Guard guard(mutex); - /* check for cache miss */ if (!valid || strcmp(path, key) != 0) { Node *node = root_node.lookup(path); From 60175631df30c7b205c6f965364f96cbf0e027f8 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 3 Dec 2022 16:25:40 +0100 Subject: [PATCH 0131/1921] vfs/lwip: remove obsolete mutexes Issue #4697 --- .../libports/src/lib/vfs/lwip/lwip_genode_init.h | 2 -- repos/libports/src/lib/vfs/lwip/nic_netif.h | 1 - repos/libports/src/lib/vfs/lwip/sys_arch.cc | 7 ------- repos/libports/src/lib/vfs/lwip/vfs.cc | 15 --------------- 4 files changed, 25 deletions(-) diff --git a/repos/libports/src/lib/vfs/lwip/lwip_genode_init.h b/repos/libports/src/lib/vfs/lwip/lwip_genode_init.h index e89a26099d..caf734ce82 100644 --- a/repos/libports/src/lib/vfs/lwip/lwip_genode_init.h +++ b/repos/libports/src/lib/vfs/lwip/lwip_genode_init.h @@ -19,8 +19,6 @@ namespace Lwip { void genode_init(Genode::Allocator &heap, ::Timer::Connection &timer); - - Genode::Mutex &mutex(); } #endif diff --git a/repos/libports/src/lib/vfs/lwip/nic_netif.h b/repos/libports/src/lib/vfs/lwip/nic_netif.h index 13d11dc5fc..70b1394e19 100644 --- a/repos/libports/src/lib/vfs/lwip/nic_netif.h +++ b/repos/libports/src/lib/vfs/lwip/nic_netif.h @@ -142,7 +142,6 @@ class Lwip::Nic_netif void handle_rx_packets() { - Genode::Mutex::Guard guard { Lwip::mutex() }; auto &rx = *_nic.rx(); while (rx.packet_avail() && rx.ready_to_ack()) { diff --git a/repos/libports/src/lib/vfs/lwip/sys_arch.cc b/repos/libports/src/lib/vfs/lwip/sys_arch.cc index 64bbe009a8..8c29a74e6e 100644 --- a/repos/libports/src/lib/vfs/lwip/sys_arch.cc +++ b/repos/libports/src/lib/vfs/lwip/sys_arch.cc @@ -38,7 +38,6 @@ namespace Lwip { { void check_timeouts(Genode::Duration) { - Genode::Mutex::Guard guard { Lwip::mutex() }; sys_check_timeouts(); } @@ -65,12 +64,6 @@ namespace Lwip { lwip_init(); } - - Genode::Mutex &mutex() - { - static Genode::Mutex _lwip_mutex; - return _lwip_mutex; - } } diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index 03b1d5a3aa..585568f21e 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -906,7 +906,6 @@ class Lwip::Udp_socket_dir final : char *dst, file_size count, file_size &out_count) override { - Genode::Mutex::Guard guard { Lwip::mutex() }; Read_result result = Read_result::READ_ERR_INVALID; switch(handle.kind) { @@ -992,8 +991,6 @@ class Lwip::Udp_socket_dir final : char const *src, file_size count, file_size &out_count) override { - Genode::Mutex::Guard guard { Lwip::mutex() }; - switch (handle.kind) { case Lwip_file_handle::DATA: { @@ -1304,8 +1301,6 @@ class Lwip::Tcp_socket_dir final : char *dst, file_size count, file_size &out_count) override { - Genode::Mutex::Guard g { Lwip::mutex() }; - switch (handle.kind) { case Lwip_file_handle::DATA: @@ -1398,9 +1393,7 @@ class Lwip::Tcp_socket_dir final : handle.kind = Lwip_file_handle::LOCATION; /* read the location of the new socket directory */ - Lwip::mutex().release(); Read_result result = handle.read(dst, count, out_count); - Lwip::mutex().acquire(); return result; } @@ -1464,7 +1457,6 @@ class Lwip::Tcp_socket_dir final : char const *src, file_size count, file_size &out_count) override { - Genode::Mutex::Guard guard { Lwip::mutex() }; if (_pcb == NULL) { /* socket is closed */ return Write_result::WRITE_ERR_IO; @@ -1732,7 +1724,6 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory typedef Genode::Fifo Handle_queue; Handle_queue blocked_handles { }; - Genode::Mutex blocked_handles_mutex { }; Vfs_netif(Vfs::Env &vfs_env, Genode::Xml_node config) @@ -1751,8 +1742,6 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory Handle_element *elem = new (handle.alloc()) Handle_element(handle); - Genode::Mutex::Guard guard(blocked_handles_mutex); - blocked_handles.enqueue(*elem); } @@ -1767,8 +1756,6 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory nameserver_handles.for_each([&] (Lwip_nameserver_handle &h) { h.io_progress_response(); }); - Genode::Mutex::Guard guard(blocked_handles_mutex); - blocked_handles.dequeue_all([] (Handle_element &elem) { Vfs_handle &handle = elem.object(); destroy(elem.object().alloc(), &elem); @@ -1778,8 +1765,6 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory void drop(Vfs_handle &handle) { - Genode::Mutex::Guard guard(blocked_handles_mutex); - blocked_handles.for_each([&] (Handle_element &elem) { if (&elem.object() == &handle) { blocked_handles.remove(elem); From 8a9974b6f9162d61a28b8bd629d63d55b01cd3af Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 3 Dec 2022 18:50:25 +0100 Subject: [PATCH 0132/1921] vfs/lwip: deferred wakeup of NIC server This patch fosters the batching of network packets transferred by the lwIP stack over the NIC connection. It replaces the eager submission of the packet-stream's data-flow signals by explicit wakeup notifications. The commit also increases the NIC session's buffer size from 128 to 1024 packets. Issue #4697 --- repos/gems/src/app/cbe_init/main.cc | 5 +- .../app/cbe_init_trust_anchor/component.cc | 2 + repos/gems/src/app/cbe_tester/main.cc | 1 + repos/gems/src/app/fs_query/main.cc | 17 +---- repos/gems/src/app/fs_tool/main.cc | 17 +---- repos/gems/src/app/menu_view/main.cc | 21 ++----- repos/gems/src/app/vfs_replay/component.cc | 9 ++- repos/libports/include/libc/component.h | 6 +- repos/libports/src/lib/libc/internal/env.h | 7 +-- repos/libports/src/lib/libc/internal/kernel.h | 2 +- .../src/lib/libc/internal/vfs_plugin.h | 2 +- repos/libports/src/lib/vfs/lwip/nic_netif.h | 63 ++++++++++++++++--- repos/libports/src/lib/vfs/lwip/vfs.cc | 44 ++++++++++--- repos/os/include/os/vfs.h | 18 +++--- repos/os/include/vfs/env.h | 12 +++- repos/os/include/vfs/simple_env.h | 7 ++- repos/os/src/server/fs_report/main.cc | 4 +- repos/os/src/server/vfs/main.cc | 23 +++---- repos/os/src/server/vfs_block/component.cc | 16 +++-- repos/os/src/test/vfs_stress/main.cc | 10 +-- 20 files changed, 163 insertions(+), 123 deletions(-) diff --git a/repos/gems/src/app/cbe_init/main.cc b/repos/gems/src/app/cbe_init/main.cc index 08a34bc918..45eac7209f 100644 --- a/repos/gems/src/app/cbe_init/main.cc +++ b/repos/gems/src/app/cbe_init/main.cc @@ -307,13 +307,12 @@ class Main } } _blk.tx()->wakeup(); + _vfs_env.io().commit(); } public: - Main(Env &env) - : - _env { env } + Main(Env &env) : _env { env } { if (_blk_ratio == 0) { error("backend block size not supported"); diff --git a/repos/gems/src/app/cbe_init_trust_anchor/component.cc b/repos/gems/src/app/cbe_init_trust_anchor/component.cc index 3ffc518c05..1527c4436c 100644 --- a/repos/gems/src/app/cbe_init_trust_anchor/component.cc +++ b/repos/gems/src/app/cbe_init_trust_anchor/component.cc @@ -219,6 +219,8 @@ class Main } break; } + + _vfs_env.io().commit(); } Io_response_handler _io_response_handler { _io_handler }; diff --git a/repos/gems/src/app/cbe_tester/main.cc b/repos/gems/src/app/cbe_tester/main.cc index a54065f16e..2344e28a29 100644 --- a/repos/gems/src/app/cbe_tester/main.cc +++ b/repos/gems/src/app/cbe_tester/main.cc @@ -2526,6 +2526,7 @@ class Main _execute_cbe(progress); } } + _vfs_env.io().commit(); } public: diff --git a/repos/gems/src/app/fs_query/main.cc b/repos/gems/src/app/fs_query/main.cc index de9f329075..a1bb409bad 100644 --- a/repos/gems/src/app/fs_query/main.cc +++ b/repos/gems/src/app/fs_query/main.cc @@ -188,20 +188,7 @@ struct Fs_query::Main : Vfs::Watch_response_handler Signal_transmitter(_config_handler).submit(); } - struct Vfs_env : Vfs::Env - { - Main &_main; - - Vfs_env(Main &main) : _main(main) { } - - Genode::Env &env() override { return _main._env; } - Allocator &alloc() override { return _main._heap; } - Vfs::File_system &root_dir() override { return _main._root_dir_fs; } - - } _vfs_env { *this }; - - Vfs::Dir_file_system _root_dir_fs { - _vfs_env, _config.xml().sub_node("vfs"), _fs_factory }; + Vfs::Simple_env _vfs_env { _env, _heap, _config.xml().sub_node("vfs") }; Directory _root_dir { _vfs_env }; @@ -229,7 +216,7 @@ struct Fs_query::Main : Vfs::Watch_response_handler Xml_node const config = _config.xml(); - _root_dir_fs.apply_config(config.sub_node("vfs")); + _vfs_env.root_dir().apply_config(config.sub_node("vfs")); _dirs.for_each([&] (Registered &dir) { destroy(_heap, &dir); }); diff --git a/repos/gems/src/app/fs_tool/main.cc b/repos/gems/src/app/fs_tool/main.cc index 7d952538d9..83e566a620 100644 --- a/repos/gems/src/app/fs_tool/main.cc +++ b/repos/gems/src/app/fs_tool/main.cc @@ -35,20 +35,7 @@ struct Fs_tool::Main Vfs::Global_file_system_factory _fs_factory { _heap }; - struct Vfs_env : Vfs::Env - { - Main &_main; - - Vfs_env(Main &main) : _main(main) { } - - Genode::Env &env() override { return _main._env; } - Allocator &alloc() override { return _main._heap; } - Vfs::File_system &root_dir() override { return _main._root_dir_fs; } - - } _vfs_env { *this }; - - Vfs::Dir_file_system _root_dir_fs { - _vfs_env, _config.xml().sub_node("vfs"), _fs_factory }; + Vfs::Simple_env _vfs_env { _env, _heap, _config.xml().sub_node("vfs") }; Directory _root_dir { _vfs_env }; @@ -71,7 +58,7 @@ struct Fs_tool::Main _verbose = config.attribute_value("verbose", false); - _root_dir_fs.apply_config(config.sub_node("vfs")); + _vfs_env.root_dir().apply_config(config.sub_node("vfs")); config.for_each_sub_node([&] (Xml_node operation) { diff --git a/repos/gems/src/app/menu_view/main.cc b/repos/gems/src/app/menu_view/main.cc index ae04f2f673..eefc9df6c7 100644 --- a/repos/gems/src/app/menu_view/main.cc +++ b/repos/gems/src/app/menu_view/main.cc @@ -96,20 +96,7 @@ struct Menu_view::Main Heap _heap { _env.ram(), _env.rm() }; - struct Vfs_env : Vfs::Env - { - Genode::Env &_env; - Allocator &_alloc; - Vfs::File_system &_vfs; - - Vfs_env(Genode::Env &env, Allocator &alloc, Vfs::File_system &vfs) - : _env(env), _alloc(alloc), _vfs(vfs) { } - - Genode::Env &env() override { return _env; } - Allocator &alloc() override { return _alloc; } - Vfs::File_system &root_dir() override { return _vfs; } - - } _vfs_env; + Vfs::Env &_vfs_env; Directory _root_dir { _vfs_env }; Directory _fonts_dir { _root_dir, "fonts" }; @@ -211,9 +198,9 @@ struct Menu_view::Main */ unsigned _frame_cnt = 0; - Main(Env &env, Vfs::File_system &libc_vfs) + Main(Env &env, Vfs::Env &libc_vfs_env) : - _env(env), _vfs_env(_env, _heap, libc_vfs) + _env(env), _vfs_env(libc_vfs_env) { _dialog_rom.sigh(_dialog_update_handler); _config.sigh(_config_handler); @@ -470,6 +457,6 @@ extern "C" void _sigprocmask() { } void Libc::Component::construct(Libc::Env &env) { - static Menu_view::Main main(env, env.vfs()); + static Menu_view::Main main(env, env.vfs_env()); } diff --git a/repos/gems/src/app/vfs_replay/component.cc b/repos/gems/src/app/vfs_replay/component.cc index 0eb37e595d..fe3225835f 100644 --- a/repos/gems/src/app/vfs_replay/component.cc +++ b/repos/gems/src/app/vfs_replay/component.cc @@ -35,10 +35,10 @@ class Vfs_replay Vfs_replay(const Vfs_replay&) = delete; Vfs_replay& operator=(const Vfs_replay&) = delete; - Env &_env; Vfs::File_system &_vfs; + Vfs::Env::Io &_io; Vfs::Vfs_handle *_vfs_handle; Attached_ram_dataspace _write_buffer; @@ -421,6 +421,8 @@ class Vfs_replay if (_finished) { _env.parent().exit(failed ? 1 : 0); } + + _io.commit(); } struct Io_response_handler : Vfs::Io_response_handler @@ -441,11 +443,12 @@ class Vfs_replay public: - Vfs_replay(Vfs::File_system &vfs, Env &env, + Vfs_replay(Env &env, Vfs::File_system &vfs, Vfs::Env::Io &io, Xml_node const & config) : _env { env }, _vfs { vfs }, + _io { io }, _vfs_handle { nullptr }, _write_buffer { _env.ram(), _env.rm(), config.attribute_value("write_buffer_size", 1u << 20) }, @@ -513,7 +516,7 @@ struct Main : private Genode::Entrypoint::Io_progress_handler Genode::Signal_handler
_reactivate_handler { _env.ep(), *this, &Main::handle_io_progress }; - Vfs_replay _replay { _vfs_env.root_dir(), _env, _config_rom.xml() }; + Vfs_replay _replay { _env, _vfs_env.root_dir(), _vfs_env.io(), _config_rom.xml() }; Main(Genode::Env &env) : _env { env } { diff --git a/repos/libports/include/libc/component.h b/repos/libports/include/libc/component.h index acc6e0d33a..6dd1f65812 100644 --- a/repos/libports/include/libc/component.h +++ b/repos/libports/include/libc/component.h @@ -28,7 +28,7 @@ namespace Libc { class Env; } -namespace Vfs { struct File_system; } +namespace Vfs { struct Env; } /** * Interface to be provided by the component implementation @@ -49,9 +49,9 @@ class Libc::Env : public Genode::Env func(_config_xml()); } /** - * Virtual File System configured for this component + * Virtual file system configured for this component */ - virtual Vfs::File_system &vfs() = 0; + virtual Vfs::Env &vfs_env() = 0; /** * Libc configuration for this component diff --git a/repos/libports/src/lib/libc/internal/env.h b/repos/libports/src/lib/libc/internal/env.h index 245a13c158..53a462e7b1 100644 --- a/repos/libports/src/lib/libc/internal/env.h +++ b/repos/libports/src/lib/libc/internal/env.h @@ -67,16 +67,15 @@ class Libc::Env_implementation : public Libc::Env, public Config_accessor Env_implementation(Genode::Env &env, Genode::Allocator &alloc) : _env(env), _vfs_env(_env, alloc, _vfs_config()) { } - - Vfs::Env &vfs_env() { return _vfs_env; } + Vfs::File_system &vfs() { return _vfs_env.root_dir(); } /************************* ** Libc::Env interface ** *************************/ - Vfs::File_system &vfs() override { - return _vfs_env.root_dir(); } + Vfs::Env &vfs_env() override { + return _vfs_env; } Xml_node libc_config() override { return _libc_config(); } diff --git a/repos/libports/src/lib/libc/internal/kernel.h b/repos/libports/src/lib/libc/internal/kernel.h index d4d6e1f91a..472ceaff22 100644 --- a/repos/libports/src/lib/libc/internal/kernel.h +++ b/repos/libports/src/lib/libc/internal/kernel.h @@ -703,7 +703,7 @@ struct Libc::Kernel final : Vfs::Io_response_handler, void wakeup_remote_peers() { - _libc_env.vfs_env().deferred_wakeups().trigger(); + _libc_env.vfs_env().io().commit(); } }; diff --git a/repos/libports/src/lib/libc/internal/vfs_plugin.h b/repos/libports/src/lib/libc/internal/vfs_plugin.h index b3d7fc5847..0b15b93af8 100644 --- a/repos/libports/src/lib/libc/internal/vfs_plugin.h +++ b/repos/libports/src/lib/libc/internal/vfs_plugin.h @@ -161,7 +161,7 @@ class Libc::Vfs_plugin final : public Plugin Xml_node config) : _alloc(alloc), - _root_fs(env.vfs()), + _root_fs(env.vfs_env().root_dir()), _response_handler(handler), _update_mtime(update_mtime), _current_real_time(current_real_time), diff --git a/repos/libports/src/lib/vfs/lwip/nic_netif.h b/repos/libports/src/lib/vfs/lwip/nic_netif.h index 70b1394e19..773a0c3872 100644 --- a/repos/libports/src/lib/vfs/lwip/nic_netif.h +++ b/repos/libports/src/lib/vfs/lwip/nic_netif.h @@ -75,14 +75,25 @@ extern "C" { class Lwip::Nic_netif { + public: + + struct Wakeup_scheduler : Genode::Noncopyable, Genode::Interface + { + virtual void schedule_nic_server_wakeup() = 0; + }; + private: + Genode::Entrypoint &_ep; + + Wakeup_scheduler &_wakeup_scheduler; + enum { PACKET_SIZE = Nic::Packet_allocator::DEFAULT_PACKET_SIZE, - BUF_SIZE = 128 * PACKET_SIZE, + BUF_SIZE = 1024*PACKET_SIZE, }; - Genode::Tslab _pbuf_alloc; + Genode::Tslab _pbuf_alloc; Nic::Packet_allocator _nic_tx_alloc; Nic::Connection _nic; @@ -103,11 +114,17 @@ class Lwip::Nic_netif void free_pbuf(Nic_netif_pbuf &pbuf) { - if (!_nic.rx()->ready_to_ack()) { - Genode::error("Nic rx acknowledgement queue congested, blocking to free pbuf"); + bool msg_once = true; + while (!_nic.rx()->ready_to_ack()) { + if (msg_once) + Genode::error("Nic rx acknowledgement queue congested, blocking to free pbuf"); + msg_once = false; + _ep.wait_and_dispatch_one_io_signal(); } - _nic.rx()->acknowledge_packet(pbuf.packet); + _nic.rx()->try_ack_packet(pbuf.packet); + _wakeup_scheduler.schedule_nic_server_wakeup(); + destroy(_pbuf_alloc, &pbuf); } @@ -144,9 +161,12 @@ class Lwip::Nic_netif { auto &rx = *_nic.rx(); + bool progress = false; + while (rx.packet_avail() && rx.ready_to_ack()) { - Nic::Packet_descriptor packet = rx.get_packet(); + Nic::Packet_descriptor packet = rx.try_get_packet(); + progress = true; Nic_netif_pbuf *nic_pbuf = new (_pbuf_alloc) Nic_netif_pbuf(*this, packet); @@ -165,6 +185,9 @@ class Lwip::Nic_netif pbuf_free(p); } } + + if (progress) + _wakeup_scheduler.schedule_nic_server_wakeup(); } /** @@ -174,12 +197,19 @@ class Lwip::Nic_netif { auto &tx = *_nic.tx(); + bool progress = false; + /* flush acknowledgements */ - while (tx.ack_avail()) - tx.release_packet(tx.get_acked_packet()); + while (tx.ack_avail()) { + tx.release_packet(tx.try_get_acked_packet()); + progress = true; + } /* notify subclass to resume pending transmissions */ status_callback(); + + if (progress) + _wakeup_scheduler.schedule_nic_server_wakeup(); } void configure(Genode::Xml_node const &config) @@ -240,8 +270,11 @@ class Lwip::Nic_netif Nic_netif(Genode::Env &env, Genode::Allocator &alloc, - Genode::Xml_node config) + Genode::Xml_node config, + Wakeup_scheduler &wakeup_scheduler) : + _ep(env.ep()), + _wakeup_scheduler(wakeup_scheduler), _pbuf_alloc(alloc), _nic_tx_alloc(&alloc), _nic(env, &_nic_tx_alloc, BUF_SIZE, BUF_SIZE, @@ -365,7 +398,8 @@ class Lwip::Nic_netif dst += q->len; } - tx.submit_packet(packet); + tx.try_submit_packet(packet); + _wakeup_scheduler.schedule_nic_server_wakeup(); LINK_STATS_INC(link.xmit); return ERR_OK; } @@ -375,6 +409,15 @@ class Lwip::Nic_netif return netif_is_up(&_netif) && !ip_addr_isany(&_netif.ip_addr); } + + /** + * Trigger submission of deferred packet-stream signals + */ + void wakeup_nic_server() + { + _nic.rx()->wakeup(); + _nic.tx()->wakeup(); + } }; diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index 585568f21e..fc80789ff0 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -1713,8 +1713,12 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory /** * LwIP connection to Nic service */ - struct Vfs_netif : Lwip::Nic_netif + struct Vfs_netif : Lwip::Nic_netif, + private Vfs::Remote_io, + private Lwip::Nic_netif::Wakeup_scheduler { + Remote_io::Peer _peer; + Tcp_proto_dir tcp_dir; Udp_proto_dir udp_dir; @@ -1725,10 +1729,11 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory Handle_queue blocked_handles { }; - Vfs_netif(Vfs::Env &vfs_env, - Genode::Xml_node config) - : Lwip::Nic_netif(vfs_env.env(), vfs_env.alloc(), config), - tcp_dir(vfs_env), udp_dir(vfs_env) + Vfs_netif(Vfs::Env &vfs_env, Genode::Xml_node config) + : + Lwip::Nic_netif(vfs_env.env(), vfs_env.alloc(), config, *this), + _peer(vfs_env.deferred_wakeups(), *this), + tcp_dir(vfs_env), udp_dir(vfs_env) { } ~Vfs_netif() @@ -1737,6 +1742,26 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory status_callback(); } + /** + * Lwip::Nic_netif::Wakeup_scheduler interface + * + * Called from Lwip::Nic_netif. + */ + void schedule_nic_server_wakeup() override + { + _peer.schedule_wakeup(); + } + + /** + * Remote_io interface + * + * Called from VFS user when going idle. + */ + void wakeup_remote_peer() override + { + Lwip::Nic_netif::wakeup_nic_server(); + } + void enqueue(Vfs_handle &handle) { Handle_element *elem = new (handle.alloc()) @@ -1802,14 +1827,17 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory public: File_system(Vfs::Env &vfs_env, Genode::Xml_node config) - : _ep(vfs_env.env().ep()), _netif(vfs_env, config) + : + _ep(vfs_env.env().ep()), _netif(vfs_env, config) { } /** * Reconfigure the LwIP Nic interface with the VFS config hook */ - void apply_config(Genode::Xml_node const &node) override { - _netif.configure(node); } + void apply_config(Genode::Xml_node const &node) override + { + _netif.configure(node); + } /********************* diff --git a/repos/os/include/os/vfs.h b/repos/os/include/os/vfs.h index bdcbcde336..6f3097deba 100644 --- a/repos/os/include/os/vfs.h +++ b/repos/os/include/os/vfs.h @@ -194,7 +194,7 @@ struct Genode::Directory : Noncopyable, Interface _handle->seek(i * sizeof(entry._dirent)); while (!_handle->fs().queue_read(_handle, sizeof(entry._dirent))) - _io.progress(); + _io.commit_and_wait(); Vfs::File_io_service::Read_result read_result; Vfs::file_size out_count = 0; @@ -209,7 +209,7 @@ struct Genode::Directory : Noncopyable, Interface if (read_result != Vfs::File_io_service::READ_QUEUED) break; - _io.progress(); + _io.commit_and_wait(); } if ((read_result != Vfs::File_io_service::READ_OK) || @@ -298,7 +298,7 @@ struct Genode::Directory : Noncopyable, Interface Vfs::file_size count = sizeof(buf)-1; Vfs::file_size out_count = 0; while (!link_handle->fs().queue_read(link_handle, count)) { - _io.progress(); + _io.commit_and_wait(); } File_io_service::Read_result result; @@ -310,7 +310,7 @@ struct Genode::Directory : Noncopyable, Interface if (result != File_io_service::READ_QUEUED) break; - _io.progress(); + _io.commit_and_wait(); }; if (result != File_io_service::READ_OK) @@ -463,7 +463,7 @@ class Genode::Readonly_file : public File _handle->seek(at.value); while (!_handle->fs().queue_read(_handle, bytes)) - _io.progress(); + _io.commit_and_wait(); Vfs::File_io_service::Read_result result; @@ -474,7 +474,7 @@ class Genode::Readonly_file : public File if (result != Vfs::File_io_service::READ_QUEUED) break; - _io.progress(); + _io.commit_and_wait(); }; /* @@ -720,7 +720,7 @@ class Genode::Writeable_file : Noncopyable static void _sync(Vfs::Vfs_handle &handle, Vfs::Env::Io &io) { while (handle.fs().queue_sync(&handle) == false) - io.progress(); + io.commit_and_wait(); for (bool sync_done = false; !sync_done; ) { @@ -740,7 +740,7 @@ class Genode::Writeable_file : Noncopyable } if (!sync_done) - io.progress(); + io.commit_and_wait(); } } @@ -786,7 +786,7 @@ class Genode::Writeable_file : Noncopyable stalled = true; } if (stalled) - io.progress(); + io.commit_and_wait(); } return write_error ? Append_result::WRITE_ERROR : Append_result::OK; diff --git a/repos/os/include/vfs/env.h b/repos/os/include/vfs/env.h index 57d888cdfc..261f328be9 100644 --- a/repos/os/include/vfs/env.h +++ b/repos/os/include/vfs/env.h @@ -46,7 +46,17 @@ struct Vfs::Env : Interface */ struct Io : Interface, Genode::Noncopyable { - virtual void progress() = 0; + /** + * Trigger the deferred wakeup of remote peers + */ + virtual void commit() = 0; + + /** + * Wakeup remote peers and wait for I/O progress + * + * This method is intended for implementing synchronous I/O. + */ + virtual void commit_and_wait() = 0; }; virtual Io &io() = 0; diff --git a/repos/os/include/vfs/simple_env.h b/repos/os/include/vfs/simple_env.h index 2755ef185b..08660cbd6b 100644 --- a/repos/os/include/vfs/simple_env.h +++ b/repos/os/include/vfs/simple_env.h @@ -60,7 +60,12 @@ class Vfs::Simple_env : public Vfs::Env, private Vfs::Env::Io /** * Vfs::Env::Io interface */ - void progress() override + void commit() override { _deferred_wakeups.trigger(); } + + /** + * Vfs::Env::Io interface + */ + void commit_and_wait() override { _deferred_wakeups.trigger(); _env.ep().wait_and_dispatch_one_io_signal(); diff --git a/repos/os/src/server/fs_report/main.cc b/repos/os/src/server/fs_report/main.cc index 6e76b6a36a..ae79e277eb 100644 --- a/repos/os/src/server/fs_report/main.cc +++ b/repos/os/src/server/fs_report/main.cc @@ -108,10 +108,10 @@ class Fs_report::Session_component : public Genode::Rpc_object /* sync file operations before close */ while (!handle->fs().queue_sync(handle)) - _io.progress(); + _io.commit_and_wait(); while (handle->fs().complete_sync(handle) == Vfs::File_io_service::SYNC_QUEUED) - _io.progress(); + _io.commit_and_wait(); handle->close(); } diff --git a/repos/os/src/server/vfs/main.cc b/repos/os/src/server/vfs/main.cc index b65c9a32d7..d7f93feeb7 100644 --- a/repos/os/src/server/vfs/main.cc +++ b/repos/os/src/server/vfs/main.cc @@ -89,10 +89,7 @@ class Vfs_server::Session_component : private Session_resources, private: Vfs::File_system &_vfs; - - using Deferred_wakeups = Vfs::Remote_io::Deferred_wakeups; - - Deferred_wakeups &_deferred_wakeups; + Vfs::Env::Io &_io; Genode::Entrypoint &_ep; @@ -197,7 +194,6 @@ class Vfs_server::Session_component : private Session_resources, { drop_packet_from_submit_queue(); packet.succeeded(false); - Genode::log("consume_and_ack_invalid_packet"); _stream.try_ack_packet(packet); overall_progress = true; @@ -278,12 +274,7 @@ class Vfs_server::Session_component : private Session_resources, } if (node.acknowledgement_pending()) { - auto packet = node.dequeue_acknowledgement(); - - if (!packet.succeeded()) - Genode::warning("_try_acknowledge_jobs failed packet"); - - _stream.try_ack_packet(packet); + _stream.try_ack_packet(node.dequeue_acknowledgement()); progress = true; } @@ -389,7 +380,7 @@ class Vfs_server::Session_component : private Session_resources, if (progress == Process_packets_result::PROGRESS) _io_progress_handler.handle_io_progress(); - _deferred_wakeups.trigger(); + _io.commit(); } /** @@ -454,7 +445,7 @@ class Vfs_server::Session_component : private Session_resources, Genode::Cap_quota cap_quota, size_t tx_buf_size, Vfs::File_system &vfs, - Deferred_wakeups &deferred_wakeups, + Vfs::Env::Io &io, Session_queue &active_sessions, Io_progress_handler &io_progress_handler, char const *root_path, @@ -463,7 +454,7 @@ class Vfs_server::Session_component : private Session_resources, Session_resources(env.pd(), env.rm(), ram_quota, cap_quota, tx_buf_size), Session_rpc_object(_packet_ds.cap(), env.rm(), env.ep().rpc_ep()), _vfs(vfs), - _deferred_wakeups(deferred_wakeups), + _io(io), _ep(env.ep()), _io_progress_handler(io_progress_handler), _active_sessions(active_sessions), @@ -867,7 +858,7 @@ class Vfs_server::Root : public Genode::Root_component, if (yield) Genode::Signal_transmitter(_reactivate_handler).submit(); - _vfs_env.deferred_wakeups().trigger(); + _vfs_env.io().commit(); } protected: @@ -952,7 +943,7 @@ class Vfs_server::Root : public Genode::Root_component, Genode::Ram_quota{ram_quota}, Genode::Cap_quota{cap_quota}, tx_buf_size, _vfs_env.root_dir(), - _vfs_env.deferred_wakeups(), + _vfs_env.io(), _active_sessions, *this, session_root.base(), writeable); diff --git a/repos/os/src/server/vfs_block/component.cc b/repos/os/src/server/vfs_block/component.cc index b3cc762a07..19b32f7e1b 100644 --- a/repos/os/src/server/vfs_block/component.cc +++ b/repos/os/src/server/vfs_block/component.cc @@ -226,22 +226,20 @@ struct Block_session_component : Rpc_object, using Block::Request_stream::try_acknowledge; using Block::Request_stream::wakeup_client_if_needed; - using Vfs_peers = Vfs::Remote_io::Deferred_wakeups; - Vfs_block::File &_file; - Vfs_peers &_vfs_peers; + Vfs::Env::Io &_io; Block_session_component(Region_map &rm, Entrypoint &ep, Dataspace_capability ds, Signal_context_capability sigh, Vfs_block::File &file, - Vfs_peers &vfs_peers) + Vfs::Env::Io &io) : Request_stream { rm, ds, ep, sigh, file.block_info() }, - _ep { ep }, - _file { file }, - _vfs_peers { vfs_peers } + _ep { ep }, + _file { file }, + _io { io } { _ep.manage(*this); } @@ -308,7 +306,7 @@ struct Block_session_component : Rpc_object, } } - _vfs_peers.trigger(); + _io.commit(); wakeup_client_if_needed(); } @@ -385,7 +383,7 @@ struct Main : Rpc_object> _block_session.construct(_env.rm(), _env.ep(), _block_ds->cap(), _request_handler, *_block_file, - _vfs_env.deferred_wakeups()); + _vfs_env.io()); return _block_session->cap(); } catch (...) { diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index 12e89169e5..e419ffd488 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -304,7 +304,7 @@ struct Write_test : public Stress_test handle->fs().queue_sync(handle); while (handle->fs().complete_sync(handle) == Vfs::File_io_service::SYNC_QUEUED) - _io.progress(); + _io.commit_and_wait(); count += n; } @@ -382,7 +382,7 @@ struct Read_test : public Stress_test while ((read_result = handle->fs().complete_read(handle, tmp, sizeof(tmp), n)) == Vfs::File_io_service::READ_QUEUED) - _io.progress(); + _io.commit_and_wait(); assert_read(read_result); @@ -457,7 +457,7 @@ struct Unlink_test : public Stress_test while (dir_handle->fs().complete_read(dir_handle, (char*)&dirent, sizeof(dirent), out_count) == Vfs::File_io_service::READ_QUEUED) - _io.progress(); + _io.commit_and_wait(); subpath.append(dirent.name.buf); switch (dirent.type) { @@ -540,11 +540,11 @@ void Component::construct(Genode::Env &env) auto vfs_root_sync = [&] () { while (!vfs_root_handle->fs().queue_sync(vfs_root_handle)) - vfs_env.io().progress(); + vfs_env.io().commit_and_wait(); while (vfs_root_handle->fs().complete_sync(vfs_root_handle) == Vfs::File_io_service::SYNC_QUEUED) - vfs_env.io().progress(); + vfs_env.io().commit_and_wait(); }; char path[Vfs::MAX_PATH_LEN]; From 0584ac195c6327cb1e6a3c81adb45afc1f11672a Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 3 Dec 2022 20:52:32 +0100 Subject: [PATCH 0133/1921] curl: increase maximum write-buffer size The original size of 16K impedes the batched processing of network packets. Changing the value to 256K reduces the number of context switches when downloading large files and thereby improves the throughput by more than 25% (base-hw on qemu_x86_64, using fetchurl to download a file of 100 MiB via the NIC router from lighttpd). Issue #4697 --- repos/libports/ports/curl.hash | 2 +- repos/libports/ports/curl.port | 2 +- repos/libports/src/lib/curl/max_write_size.patch | 12 ++++++++++++ .../lib/curl/{curl_h.patch => no_socketpair.patch} | 0 4 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 repos/libports/src/lib/curl/max_write_size.patch rename repos/libports/src/lib/curl/{curl_h.patch => no_socketpair.patch} (100%) diff --git a/repos/libports/ports/curl.hash b/repos/libports/ports/curl.hash index 36df052458..20e4b9733f 100644 --- a/repos/libports/ports/curl.hash +++ b/repos/libports/ports/curl.hash @@ -1 +1 @@ -ba3c2049149311d614a70359426f5b0a49ea239f +b2103a900cd655abca670fc02d1574be4785585a diff --git a/repos/libports/ports/curl.port b/repos/libports/ports/curl.port index a54184bddb..7e5f6de90d 100644 --- a/repos/libports/ports/curl.port +++ b/repos/libports/ports/curl.port @@ -8,7 +8,7 @@ SIG(curl) := ${URL(curl)}.asc KEY(curl) := daniel@haxx.se DIR(curl) := src/lib/curl -PATCHES := src/lib/curl/curl_h.patch +PATCHES := $(addprefix src/lib/curl/,no_socketpair.patch max_write_size.patch) DIRS := include DIR_CONTENT(include) = src/lib/curl/include/curl diff --git a/repos/libports/src/lib/curl/max_write_size.patch b/repos/libports/src/lib/curl/max_write_size.patch new file mode 100644 index 0000000000..6c5f80a43f --- /dev/null +++ b/repos/libports/src/lib/curl/max_write_size.patch @@ -0,0 +1,12 @@ ++++ src/lib/curl/include/curl/curl.h +@@ -247,6 +247,10 @@ + #define CURL_MAX_WRITE_SIZE 16384 + #endif + ++/* Genode: override the default to foster the batching of network packets */ ++#undef CURL_MAX_WRITE_SIZE ++#define CURL_MAX_WRITE_SIZE 262144 ++ + #ifndef CURL_MAX_HTTP_HEADER + /* The only reason to have a max limit for this is to avoid the risk of a bad + server feeding libcurl with a never-ending header that will cause reallocs diff --git a/repos/libports/src/lib/curl/curl_h.patch b/repos/libports/src/lib/curl/no_socketpair.patch similarity index 100% rename from repos/libports/src/lib/curl/curl_h.patch rename to repos/libports/src/lib/curl/no_socketpair.patch From d9f5dda322291ea2286d5cd85cf24b225db1feea Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 3 Dec 2022 22:00:59 +0100 Subject: [PATCH 0134/1921] lwip: increase TCP send buffer 32->80 packets Issue #4697 --- repos/libports/run/lwip.run | 2 +- repos/libports/run/nic_router.inc | 4 ++-- repos/libports/run/nic_router_ipv4_fragm.run | 2 +- repos/libports/src/lib/lwip/include/lwipopts.h | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/repos/libports/run/lwip.run b/repos/libports/run/lwip.run index 144db0030c..351445dd59 100644 --- a/repos/libports/run/lwip.run +++ b/repos/libports/run/lwip.run @@ -115,7 +115,7 @@ install_config { - + diff --git a/repos/libports/run/nic_router.inc b/repos/libports/run/nic_router.inc index d7db704bfb..75a0161c9c 100644 --- a/repos/libports/run/nic_router.inc +++ b/repos/libports/run/nic_router.inc @@ -21,7 +21,7 @@ proc client_config { name prot ip_addr gateway netmask nic srv_port srv_ip } { append result { - + @@ -51,7 +51,7 @@ proc server_config { name prot ip_addr gateway netmask nic port } { append result { - + diff --git a/repos/libports/run/nic_router_ipv4_fragm.run b/repos/libports/run/nic_router_ipv4_fragm.run index 8b4205fd6e..e09b9392fd 100644 --- a/repos/libports/run/nic_router_ipv4_fragm.run +++ b/repos/libports/run/nic_router_ipv4_fragm.run @@ -125,7 +125,7 @@ append config { - + diff --git a/repos/libports/src/lib/lwip/include/lwipopts.h b/repos/libports/src/lib/lwip/include/lwipopts.h index bef50f5917..264d5a07e0 100644 --- a/repos/libports/src/lib/lwip/include/lwipopts.h +++ b/repos/libports/src/lib/lwip/include/lwipopts.h @@ -36,13 +36,13 @@ extern "C" { #define LWIP_NETIF_LOOPBACK 1 /* Looping back to same address? */ #define LWIP_STATS 0 /* disable stating */ #define LWIP_TCP_TIMESTAMPS 1 -#define TCP_LISTEN_BACKLOG 1 -#define TCP_MSS 1460 -#define TCP_WND (32 * TCP_MSS) -#define TCP_SND_BUF (32 * TCP_MSS) -#define LWIP_WND_SCALE 3 -#define TCP_RCV_SCALE 2 -#define TCP_SND_QUEUELEN ((8 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) +#define TCP_LISTEN_BACKLOG 1 +#define TCP_MSS 1460 +#define TCP_WND (80 * TCP_MSS) +#define TCP_SND_BUF (80 * TCP_MSS) +#define LWIP_WND_SCALE 3 +#define TCP_RCV_SCALE 2 +#define TCP_SND_QUEUELEN ((8 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) #define LWIP_NETIF_STATUS_CALLBACK 1 /* callback function used for interface changes */ #define LWIP_NETIF_LINK_CALLBACK 1 /* callback function used for link-state changes */ From cf87b0fadb3943df2acb9713d7581cdcb1c4746a Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 6 Dec 2022 17:04:26 +0100 Subject: [PATCH 0135/1921] vfs: simplify File_io_service::write return values This patch removes the 'Insufficient_buffer' exception by returning the WRITE_ERR_WOULD_BLOCK result value instead. It also eliminates the superfluous WRITE_ERR_AGAIN and WRITE_ERR_INTERRUPT codes. Issue #4697 --- repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc | 2 +- repos/gems/include/cbe/vfs/io_job.h | 26 +++---- repos/gems/src/app/cbe_tester/crypto.cc | 69 ++++++++----------- repos/gems/src/app/cbe_tester/main.cc | 18 ++--- repos/gems/src/app/cbe_tester/trust_anchor.cc | 36 +++------- repos/gems/src/app/vfs_replay/component.cc | 29 ++++---- repos/gems/src/lib/vfs/audit/vfs_audit.cc | 2 +- repos/gems/src/lib/vfs/cbe/io_job.h | 30 ++++---- repos/gems/src/lib/vfs/cbe/vfs.cc | 49 +++++++------ repos/gems/src/lib/vfs/import/plugin.cc | 51 ++++++-------- repos/libports/src/lib/libc/vfs_plugin.cc | 33 ++++----- repos/libports/src/lib/vfs/lwip/vfs.cc | 11 ++- repos/libports/src/lib/vfs/oss/vfs_oss.cc | 42 +++++------ repos/os/include/os/vfs.h | 41 +++++------ repos/os/include/vfs/file_io_service.h | 12 +--- repos/os/include/vfs/print.h | 2 - repos/os/src/lib/vfs/fs_file_system.h | 26 +++---- repos/os/src/server/vfs/node.h | 38 ++++------ repos/os/src/server/vfs_block/job.h | 28 +++----- repos/os/src/test/vfs_stress/main.cc | 4 -- 20 files changed, 228 insertions(+), 321 deletions(-) diff --git a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc index c16ab6534d..69783b5c1d 100644 --- a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc +++ b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc @@ -159,7 +159,7 @@ class Vfs::Rump_file_system : public File_system case EWOULDBLOCK: return WRITE_ERR_WOULD_BLOCK; case EINVAL: return WRITE_ERR_INVALID; case EIO: return WRITE_ERR_IO; - case EINTR: return WRITE_ERR_INTERRUPT; + case EINTR: return WRITE_ERR_IO; default: Genode::error(__func__, ": unhandled rump error ", errno); return WRITE_ERR_IO; diff --git a/repos/gems/include/cbe/vfs/io_job.h b/repos/gems/include/cbe/vfs/io_job.h index 9480d6e4d9..f89e5bd64d 100644 --- a/repos/gems/include/cbe/vfs/io_job.h +++ b/repos/gems/include/cbe/vfs/io_job.h @@ -174,31 +174,25 @@ namespace Util { bool completed = false; file_size out = 0; - Result result = Result::WRITE_ERR_INVALID; - try { - result = _handle.fs().write(&_handle, - _data + _current_offset, - _current_count, out); - } catch (Vfs::File_io_service::Insufficient_buffer) { - return progress; - } - if ( result == Result::WRITE_ERR_AGAIN - || result == Result::WRITE_ERR_INTERRUPT - || result == Result::WRITE_ERR_WOULD_BLOCK) { + Result const result = + _handle.fs().write(&_handle, _data + _current_offset, + _current_count, out); + switch (result) { + case Result::WRITE_ERR_WOULD_BLOCK: return progress; - } else - if (result == Result::WRITE_OK) { + case Result::WRITE_OK: _current_offset += out; _current_count -= out; _success = true; - } else + break; - if ( result == Result::WRITE_ERR_IO - || result == Result::WRITE_ERR_INVALID) { + case Result::WRITE_ERR_IO: + case Result::WRITE_ERR_INVALID: _success = false; completed = true; + break; } if (_current_count == 0 || completed || (out == 0 && _allow_partial)) { diff --git a/repos/gems/src/app/cbe_tester/crypto.cc b/repos/gems/src/app/cbe_tester/crypto.cc index 9968efef63..9a676e7bd9 100644 --- a/repos/gems/src/app/cbe_tester/crypto.cc +++ b/repos/gems/src/app/cbe_tester/crypto.cc @@ -70,15 +70,16 @@ Crypto::Result Crypto::add_key(Key const &key) _add_key_handle.seek(0); file_size nr_of_written_bytes { 0 }; - try { - _add_key_handle.fs().write( - &_add_key_handle, buffer, sizeof (buffer), - nr_of_written_bytes); - } catch (File_io_service::Insufficient_buffer) { + using Write_result = Vfs::File_io_service::Write_result; + Write_result const result = + _add_key_handle.fs().write(&_add_key_handle, buffer, sizeof (buffer), + nr_of_written_bytes); + + if (result == Write_result::WRITE_ERR_WOULD_BLOCK) return Result::RETRY_LATER; - } + Key_directory &key_dir { _get_unused_key_dir() }; key_dir.encrypt_handle = &vfs_open_rw( @@ -98,17 +99,17 @@ Crypto::Result Crypto::remove_key(Cbe::Key::Id key_id) { Vfs::file_size written = 0; _remove_key_handle.seek(0); - try { + + using Write_result = Vfs::File_io_service::Write_result; + Write_result const result = _remove_key_handle.fs().write(&_remove_key_handle, (char const*)&key_id.value, sizeof (key_id.value), written); - (void)written; - - } catch (Vfs::File_io_service::Insufficient_buffer) { + if (result == Write_result::WRITE_ERR_WOULD_BLOCK) return Result::RETRY_LATER; - } + Key_directory &key_dir { _lookup_key_dir(key_id.value) }; _env.root_dir().close(key_dir.encrypt_handle); key_dir.encrypt_handle = nullptr; @@ -200,22 +201,17 @@ void Crypto::_execute_decrypt_block(Job &job, { job.handle->seek(job.request.block_number() * Cbe::BLOCK_SIZE); file_size nr_of_written_bytes { 0 }; - try { - job.handle->fs().write( - job.handle, - reinterpret_cast( - &cipher_buf.item(job.cipher_buf_idx)), - file_size(sizeof (Cbe::Block_data)), - nr_of_written_bytes); - job.state = Job_state::OP_WRITTEN_TO_VFS_HANDLE; - progress = true; - return; + job.handle->fs().write( + job.handle, + reinterpret_cast( + &cipher_buf.item(job.cipher_buf_idx)), + file_size(sizeof (Cbe::Block_data)), + nr_of_written_bytes); - } catch (Vfs::File_io_service::Insufficient_buffer) { - - return; - } + job.state = Job_state::OP_WRITTEN_TO_VFS_HANDLE; + progress = true; + return; } case Job_state::OP_WRITTEN_TO_VFS_HANDLE: { @@ -271,22 +267,17 @@ void Crypto::_execute_encrypt_block(Job &job, { job.handle->seek(job.request.block_number() * Cbe::BLOCK_SIZE); file_size nr_of_written_bytes { 0 }; - try { - job.handle->fs().write( - job.handle, - reinterpret_cast( - &plain_buf.item(job.plain_buf_idx)), - file_size(sizeof (Cbe::Block_data)), - nr_of_written_bytes); - job.state = Job_state::OP_WRITTEN_TO_VFS_HANDLE; - progress = true; - return; + job.handle->fs().write( + job.handle, + reinterpret_cast( + &plain_buf.item(job.plain_buf_idx)), + file_size(sizeof (Cbe::Block_data)), + nr_of_written_bytes); - } catch (Vfs::File_io_service::Insufficient_buffer) { - - return; - } + job.state = Job_state::OP_WRITTEN_TO_VFS_HANDLE; + progress = true; + return; } case Job_state::OP_WRITTEN_TO_VFS_HANDLE: { diff --git a/repos/gems/src/app/cbe_tester/main.cc b/repos/gems/src/app/cbe_tester/main.cc index 2344e28a29..a46ec86051 100644 --- a/repos/gems/src/app/cbe_tester/main.cc +++ b/repos/gems/src/app/cbe_tester/main.cc @@ -393,22 +393,14 @@ class Vfs_block_io_job reinterpret_cast( &io_data.item(_cbe_req_io_buf_idx(_cbe_req))) }; - Result result; - try { - result = _handle.fs().write(&_handle, - data + _nr_of_processed_bytes, - _nr_of_remaining_bytes, - nr_of_written_bytes); + Result const result = + _handle.fs().write(&_handle, + data + _nr_of_processed_bytes, + _nr_of_remaining_bytes, + nr_of_written_bytes); - } catch (Vfs::File_io_service::Insufficient_buffer) { - - return; - } switch (result) { - case Result::WRITE_ERR_AGAIN: - case Result::WRITE_ERR_INTERRUPT: case Result::WRITE_ERR_WOULD_BLOCK: - return; case Result::WRITE_OK: diff --git a/repos/gems/src/app/cbe_tester/trust_anchor.cc b/repos/gems/src/app/cbe_tester/trust_anchor.cc index e8bce86a7c..b281370f98 100644 --- a/repos/gems/src/app/cbe_tester/trust_anchor.cc +++ b/repos/gems/src/app/cbe_tester/trust_anchor.cc @@ -37,22 +37,12 @@ void Trust_anchor::_execute_write_read_operation(Vfs_handle &file, case Job_state::WRITE_IN_PROGRESS: { file_size nr_of_written_bytes { 0 }; - Write_result result { Write_result::WRITE_ERR_INVALID }; - try { - result = - file.fs().write( - &file, write_buf + _job.fl_offset, - _job.fl_size, nr_of_written_bytes); - - } catch (Vfs::File_io_service::Insufficient_buffer) { - - return; - } + Write_result const result = + file.fs().write(&file, write_buf + _job.fl_offset, + _job.fl_size, nr_of_written_bytes); switch (result) { - case Write_result::WRITE_ERR_AGAIN: - case Write_result::WRITE_ERR_INTERRUPT: - case Write_result::WRITE_ERR_WOULD_BLOCK: + case Write_result::WRITE_ERR_WOULD_BLOCK: return; case Write_result::WRITE_OK: @@ -155,22 +145,14 @@ void Trust_anchor::_execute_write_operation(Vfs_handle &file, case Job_state::WRITE_IN_PROGRESS: { file_size nr_of_written_bytes { 0 }; - Write_result result { Write_result::WRITE_ERR_INVALID }; - try { - result = - file.fs().write( - &file, write_buf + _job.fl_offset, - _job.fl_size, nr_of_written_bytes); + Write_result const result = + file.fs().write( + &file, write_buf + _job.fl_offset, + _job.fl_size, nr_of_written_bytes); - } catch (Vfs::File_io_service::Insufficient_buffer) { - - return; - } switch (result) { - case Write_result::WRITE_ERR_AGAIN: - case Write_result::WRITE_ERR_INTERRUPT: - case Write_result::WRITE_ERR_WOULD_BLOCK: + case Write_result::WRITE_ERR_WOULD_BLOCK: return; case Write_result::WRITE_OK: diff --git a/repos/gems/src/app/vfs_replay/component.cc b/repos/gems/src/app/vfs_replay/component.cc index fe3225835f..50205300d8 100644 --- a/repos/gems/src/app/vfs_replay/component.cc +++ b/repos/gems/src/app/vfs_replay/component.cc @@ -248,30 +248,27 @@ class Vfs_replay bool completed = false; file_size out = 0; - Result result = Result::WRITE_ERR_INVALID; - try { - result = _vfs_handle->fs().write(_vfs_handle, - _write_buffer.local_addr(), - request.current_count, out); - } catch (Vfs::File_io_service::Insufficient_buffer) { + Result const result = + _vfs_handle->fs().write(_vfs_handle, + _write_buffer.local_addr(), + request.current_count, out); + switch (result) { + case Result::WRITE_ERR_WOULD_BLOCK: return progress; - } - if ( result == Result::WRITE_ERR_AGAIN - || result == Result::WRITE_ERR_INTERRUPT - || result == Result::WRITE_ERR_WOULD_BLOCK) { - return progress; - } - if (result == Result::WRITE_OK) { + + case Result::WRITE_OK: request.current_offset += out; request.current_count -= out; request.success = true; - } + break; - if ( result == Result::WRITE_ERR_IO - || result == Result::WRITE_ERR_INVALID) { + case Result::WRITE_ERR_IO: + case Result::WRITE_ERR_INVALID: request.success = false; completed = true; + break; } + if (request.current_count == 0 || completed) { request.state = Request::State::WRITE_COMPLETE; } else { diff --git a/repos/gems/src/lib/vfs/audit/vfs_audit.cc b/repos/gems/src/lib/vfs/audit/vfs_audit.cc index 567f657b7b..08194f10f3 100644 --- a/repos/gems/src/lib/vfs/audit/vfs_audit.cc +++ b/repos/gems/src/lib/vfs/audit/vfs_audit.cc @@ -233,7 +233,7 @@ class Vfs_audit::File_system : public Vfs::File_system if (result == WRITE_OK) _log("wrote to ", h.path, " ", out, " / ", len); - else if (result == WRITE_ERR_WOULD_BLOCK || result == WRITE_ERR_AGAIN) + else if (result == WRITE_ERR_WOULD_BLOCK) _log("write stalled for ", h.path); else _log("write failed for ", h.path); diff --git a/repos/gems/src/lib/vfs/cbe/io_job.h b/repos/gems/src/lib/vfs/cbe/io_job.h index 8016ca39af..3f93d67e8c 100644 --- a/repos/gems/src/lib/vfs/cbe/io_job.h +++ b/repos/gems/src/lib/vfs/cbe/io_job.h @@ -152,33 +152,27 @@ namespace Vfs_cbe { bool completed = false; file_size out = 0; - Result result = Result::WRITE_ERR_INVALID; - try { - char const * const data = - reinterpret_cast(&io_data.item(_index)); - result = _handle.fs().write(&_handle, - data + _current_offset, - _current_count, out); - } catch (Vfs::File_io_service::Insufficient_buffer) { - return progress; - } + char const * const data = + reinterpret_cast(&io_data.item(_index)); - if ( result == Result::WRITE_ERR_AGAIN - || result == Result::WRITE_ERR_INTERRUPT - || result == Result::WRITE_ERR_WOULD_BLOCK) { + Result const result = + _handle.fs().write(&_handle, data + _current_offset, + _current_count, out); + switch (result) { + case Result::WRITE_ERR_WOULD_BLOCK: return progress; - } else - if (result == Result::WRITE_OK) { + case Result::WRITE_OK: _current_offset += out; _current_count -= out; _success = true; - } else + break; - if ( result == Result::WRITE_ERR_IO - || result == Result::WRITE_ERR_INVALID) { + case Result::WRITE_ERR_IO: + case Result::WRITE_ERR_INVALID: _success = false; completed = true; + break; } if (_current_count == 0 || completed) { diff --git a/repos/gems/src/lib/vfs/cbe/vfs.cc b/repos/gems/src/lib/vfs/cbe/vfs.cc index 590b4a5001..c2853e3e1d 100644 --- a/repos/gems/src/lib/vfs/cbe/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe/vfs.cc @@ -1185,14 +1185,15 @@ class Vfs_cbe::Wrapper file_size written = 0; _add_key_handle->seek(0); - try { + + using Write_result = Vfs::File_io_service::Write_result; + + Write_result const result = _add_key_handle->fs().write(_add_key_handle, buffer, sizeof (buffer), written); - (void)written; - } catch (Vfs::File_io_service::Insufficient_buffer) { - /* try again later */ - break; - } + + if (result == Write_result::WRITE_ERR_WOULD_BLOCK) + break; /* try again later */ /* * Instead of acknowledge the CBE's request before we write @@ -1278,16 +1279,17 @@ class Vfs_cbe::Wrapper file_size written = 0; _remove_key_handle->seek(0); - try { + + using Write_result = Vfs::File_io_service::Write_result; + + Write_result const result = _remove_key_handle->fs().write(_remove_key_handle, (char const*)&key_id.value, sizeof (key_id.value), written); - (void)written; - } catch (Vfs::File_io_service::Insufficient_buffer) { - /* try again later */ - break; - } + + if (result == Write_result::WRITE_ERR_WOULD_BLOCK) + break; /* try again later */ Crypto_file *cf = nullptr; try { @@ -1395,14 +1397,13 @@ class Vfs_cbe::Wrapper case Crypto_job::State::IDLE: break; case Crypto_job::State::SUBMITTED: - try { + { char const *data = nullptr; if (op == Crypto_job::Operation::ENCRYPT) { data = reinterpret_cast(&plain.item(plain_index)); - } else - - if (op == Crypto_job::Operation::DECRYPT) { + } + else if (op == Crypto_job::Operation::DECRYPT) { data = reinterpret_cast(&cipher.item(cipher_index)); } @@ -1413,16 +1414,14 @@ class Vfs_cbe::Wrapper if (op == Crypto_job::Operation::ENCRYPT) { cbe.crypto_cipher_data_requested(plain_index); - } else - - if (op == Crypto_job::Operation::DECRYPT) { + } + else if (op == Crypto_job::Operation::DECRYPT) { cbe.crypto_plain_data_requested(cipher_index); } state = Crypto_job::State::PENDING; result.progress |= true; - } catch (Vfs::File_io_service::Insufficient_buffer) { } - + } [[fallthrough]]; case Crypto_job::State::PENDING: @@ -1939,9 +1938,9 @@ class Vfs_cbe::Data_file_system : public Single_file_system State state = _w.frontend_request().state; if (state == State::NONE) { - if (!_w.client_request_acceptable()) { - throw Insufficient_buffer(); - } + if (!_w.client_request_acceptable()) + return Write_result::WRITE_ERR_WOULD_BLOCK; + using Op = Cbe::Request::Operation; bool const accepted = @@ -1956,7 +1955,7 @@ class Vfs_cbe::Data_file_system : public Single_file_system if ( state == State::PENDING || state == State::IN_PROGRESS) { _w.enqueue_handle(*this); - throw Insufficient_buffer(); + return WRITE_ERR_WOULD_BLOCK; } if (state == State::COMPLETE) { diff --git a/repos/gems/src/lib/vfs/import/plugin.cc b/repos/gems/src/lib/vfs/import/plugin.cc index 4bbab35521..a2223a7149 100644 --- a/repos/gems/src/lib/vfs/import/plugin.cc +++ b/repos/gems/src/lib/vfs/import/plugin.cc @@ -98,7 +98,6 @@ class Vfs_import::File_system : public Vfs::File_system dst_handle, target.string(), count, out_count); switch (wres) { - case WRITE_ERR_AGAIN: case WRITE_ERR_WOULD_BLOCK: break; default: @@ -151,41 +150,35 @@ class Vfs_import::File_system : public Vfs::File_system if (!bytes_from_source) break; - bool stalled { false }; bool write_error { false }; Vfs::file_size remaining_bytes { bytes_from_source }; char const *src { buf }; while (remaining_bytes > 0 && !write_error) { - try { - Vfs::file_size out_count { 0 }; - switch (dst_handle->fs().write(dst_handle, src, - remaining_bytes, - out_count)) { - case WRITE_ERR_AGAIN: - case WRITE_ERR_WOULD_BLOCK: - stalled = true; - break; - case Write_result::WRITE_ERR_INVALID: - case Write_result::WRITE_ERR_IO: - case Write_result::WRITE_ERR_INTERRUPT: - env.root_dir().unlink(path.string()); - write_error = true; - break; - case WRITE_OK: - out_count = min(remaining_bytes, out_count); - remaining_bytes -= out_count; - src += out_count; - at.value += out_count; - dst_handle->advance_seek(out_count); - break; - } - } catch (Vfs::File_io_service::Insufficient_buffer) { - stalled = true; } + Vfs::file_size out_count { 0 }; - if (stalled) - env.env().ep().wait_and_dispatch_one_io_signal(); + switch (dst_handle->fs().write(dst_handle, src, + remaining_bytes, + out_count)) { + case WRITE_ERR_WOULD_BLOCK: + env.io().commit_and_wait(); + break; + + case Write_result::WRITE_ERR_INVALID: + case Write_result::WRITE_ERR_IO: + env.root_dir().unlink(path.string()); + write_error = true; + break; + + case WRITE_OK: + out_count = min(remaining_bytes, out_count); + remaining_bytes -= out_count; + src += out_count; + at.value += out_count; + dst_handle->advance_seek(out_count); + break; + } } if (write_error) break; diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index 6280d258ff..7cb61f6d9d 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -844,9 +844,7 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, if (nonblocking) { monitor().monitor([&] { - try { - out_result = handle->fs().write(handle, (char const *)buf, count, out_count); - } catch (Vfs::File_io_service::Insufficient_buffer) { } + out_result = handle->fs().write(handle, (char const *)buf, count, out_count); return Fn::COMPLETE; }); } else { @@ -886,23 +884,21 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, /* number of bytes written in one iteration */ Vfs::file_size partial_out_count = 0; - try { - char const * const src = (char const *)_buf + _offset; + char const * const src = (char const *)_buf + _offset; + _out_result = _handle->fs().write(_handle, src, _count, partial_out_count); - _out_result = _handle->fs().write(_handle, src, _count, partial_out_count); - } catch (Vfs::File_io_service::Insufficient_buffer) { return Fn::INCOMPLETE; } + if (_out_result == Result::WRITE_ERR_WOULD_BLOCK) + return Fn::INCOMPLETE; - if (_out_result != Result::WRITE_OK) { + if (_out_result != Result::WRITE_OK) return Fn::COMPLETE; - } /* increment byte count reported to caller */ _out_count += partial_out_count; bool const write_complete = (partial_out_count == _count); - if (write_complete) { + if (write_complete) return Fn::COMPLETE; - } /* * If the write has not consumed all bytes, set up @@ -941,11 +937,9 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, Plugin::resume_all(); switch (out_result) { - case Result::WRITE_ERR_AGAIN: return Errno(EAGAIN); case Result::WRITE_ERR_WOULD_BLOCK: return Errno(EWOULDBLOCK); case Result::WRITE_ERR_INVALID: return Errno(EINVAL); case Result::WRITE_ERR_IO: return Errno(EIO); - case Result::WRITE_ERR_INTERRUPT: return Errno(EINTR); case Result::WRITE_OK: break; } @@ -2283,12 +2277,15 @@ int Libc::Vfs_plugin::symlink(const char *target_path, const char *link_path) case Stage::WRITE: { - try { - handle->fs().write(handle, target_path, count, out_count); - } catch (Vfs::File_io_service::Insufficient_buffer) { + typedef Vfs::File_io_service::Write_result Result; + + Result result = handle->fs().write(handle, target_path, + count, out_count); + if (result == Result::WRITE_ERR_WOULD_BLOCK) return Fn::INCOMPLETE; - } - } stage = Stage::SYNC; [[fallthrough]]; + } + stage = Stage::SYNC; + [[fallthrough]]; case Stage::SYNC: { diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index fc80789ff0..d5482689bf 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -2013,16 +2013,15 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory char const *src, file_size count, file_size &out_count) override { - Write_result res = Write_result::WRITE_ERR_INVALID; out_count = 0; if ((vfs_handle->status_flags() & OPEN_MODE_ACCMODE) == OPEN_MODE_RDONLY) return Write_result::WRITE_ERR_INVALID; - if (Lwip_handle *handle = dynamic_cast(vfs_handle)) { - res = handle->write(src, count, out_count); - if (res == WRITE_ERR_WOULD_BLOCK) throw Insufficient_buffer(); - } - return res; + + if (Lwip_handle *handle = dynamic_cast(vfs_handle)) + return handle->write(src, count, out_count); + + return Write_result::WRITE_ERR_INVALID; } Read_result complete_read(Vfs_handle *vfs_handle, diff --git a/repos/libports/src/lib/vfs/oss/vfs_oss.cc b/repos/libports/src/lib/vfs/oss/vfs_oss.cc index 9939e8b338..1f5e2188be 100644 --- a/repos/libports/src/lib/vfs/oss/vfs_oss.cc +++ b/repos/libports/src/lib/vfs/oss/vfs_oss.cc @@ -188,6 +188,8 @@ struct Vfs::Oss_file_system::Audio } }; + using Write_result = Vfs::File_io_service::Write_result; + private: Audio(Audio const &); @@ -509,14 +511,14 @@ struct Vfs::Oss_file_system::Audio return true; } - bool write(char const *buf, file_size buf_size, file_size &out_size) + Write_result write(char const *buf, file_size buf_size, file_size &out_size) { using namespace Genode; out_size = 0; if (_info.ofrag_bytes == 0) - throw Vfs::File_io_service::Insufficient_buffer(); + return Write_result::WRITE_ERR_WOULD_BLOCK; bool block_write = false; @@ -527,10 +529,8 @@ struct Vfs::Oss_file_system::Audio unsigned stream_samples_to_write = buf_size / CHANNELS / sizeof(int16_t); - if (stream_samples_to_write == 0) { - /* invalid argument */ - return false; - } + if (stream_samples_to_write == 0) + return Write_result::WRITE_ERR_INVALID; _start_output(); @@ -554,18 +554,18 @@ struct Vfs::Oss_file_system::Audio _out[0]->stream()->reset(); } } - } else { - /* - * Look up the previously allocated packet. - * The tail pointer got incremented after allocation, - * so we need to decrement by 1. - */ - unsigned const tail = + } else { + /* + * Look up the previously allocated packet. + * The tail pointer got incremented after allocation, + * so we need to decrement by 1. + */ + unsigned const tail = (_out[0]->stream()->tail() + Audio_out::QUEUE_SIZE - 1) % Audio_out::QUEUE_SIZE; lp = _out[0]->stream()->get(tail); - } + } unsigned const pos = _out[0]->stream()->packet_position(lp); Audio_out::Packet *rp = _out[1]->stream()->get(pos); @@ -602,14 +602,15 @@ struct Vfs::Oss_file_system::Audio /* update info */ update_info_ofrag_avail_from_optr_fifo_samples(); - if (block_write) { throw Vfs::File_io_service::Insufficient_buffer(); } + if (block_write) + return Write_result::WRITE_ERR_WOULD_BLOCK; - return true; + return Write_result::WRITE_OK; } } } - return true; + return Write_result::WRITE_OK; } }; @@ -665,12 +666,13 @@ class Vfs::Oss_file_system::Data_file_system : public Single_file_system Write_result write(char const *buf, file_size buf_size, file_size &out_count) override { - try { - return _audio.write(buf, buf_size, out_count) ? WRITE_OK : WRITE_ERR_INVALID; - } catch (Vfs::File_io_service::Insufficient_buffer) { + Write_result const result = _audio.write(buf, buf_size, out_count); + + if (result == Write_result::WRITE_ERR_WOULD_BLOCK) { blocked = true; return WRITE_OK; } + return result; } bool read_ready() override diff --git a/repos/os/include/os/vfs.h b/repos/os/include/os/vfs.h index 6f3097deba..97fccc3340 100644 --- a/repos/os/include/os/vfs.h +++ b/repos/os/include/os/vfs.h @@ -755,35 +755,28 @@ class Genode::Writeable_file : Noncopyable bool stalled = false; - try { - Vfs::file_size out_count = 0; + Vfs::file_size out_count = 0; - using Write_result = Vfs::File_io_service::Write_result; + using Write_result = Vfs::File_io_service::Write_result; - switch (handle.fs().write(&handle, src, remaining_bytes, - out_count)) { + switch (handle.fs().write(&handle, src, remaining_bytes, out_count)) { - case Write_result::WRITE_ERR_AGAIN: - case Write_result::WRITE_ERR_WOULD_BLOCK: - stalled = true; - break; + case Write_result::WRITE_ERR_WOULD_BLOCK: + stalled = true; + break; - case Write_result::WRITE_ERR_INVALID: - case Write_result::WRITE_ERR_IO: - case Write_result::WRITE_ERR_INTERRUPT: - write_error = true; - break; + case Write_result::WRITE_ERR_INVALID: + case Write_result::WRITE_ERR_IO: + write_error = true; + break; - case Write_result::WRITE_OK: - out_count = min((Vfs::file_size)remaining_bytes, out_count); - remaining_bytes -= (size_t)out_count; - src += out_count; - handle.advance_seek(out_count); - break; - }; - } - catch (Vfs::File_io_service::Insufficient_buffer) { - stalled = true; } + case Write_result::WRITE_OK: + out_count = min((Vfs::file_size)remaining_bytes, out_count); + remaining_bytes -= (size_t)out_count; + src += out_count; + handle.advance_seek(out_count); + break; + }; if (stalled) io.commit_and_wait(); diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index 6d54d339e8..e93f0792ae 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -30,16 +30,8 @@ struct Vfs::File_io_service : Interface ** Write ** ***********/ - /* - * Exception, thrown when, for example, 'alloc_packet()' or - * 'submit_packet()' failed in the VFS plugin. The caller can try again - * after a previous VFS request is completed. - */ - struct Insufficient_buffer { }; - - enum Write_result { WRITE_ERR_AGAIN, WRITE_ERR_WOULD_BLOCK, - WRITE_ERR_INVALID, WRITE_ERR_IO, - WRITE_ERR_INTERRUPT, WRITE_OK }; + enum Write_result { WRITE_ERR_WOULD_BLOCK, WRITE_ERR_INVALID, + WRITE_ERR_IO, WRITE_OK }; virtual Write_result write(Vfs_handle *vfs_handle, char const *buf, file_size buf_size, diff --git a/repos/os/include/vfs/print.h b/repos/os/include/vfs/print.h index cb5f80581f..eea316a726 100644 --- a/repos/os/include/vfs/print.h +++ b/repos/os/include/vfs/print.h @@ -133,11 +133,9 @@ static inline void print(Genode::Output &output, Vfs::File_io_service::Write_res switch (r) { CASE_PRINT(WRITE_OK); - CASE_PRINT(WRITE_ERR_AGAIN); CASE_PRINT(WRITE_ERR_WOULD_BLOCK); CASE_PRINT(WRITE_ERR_INVALID); CASE_PRINT(WRITE_ERR_IO); - CASE_PRINT(WRITE_ERR_INTERRUPT); } #undef CASE_PRINT diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index fa7f00845d..1d992c57a9 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -504,8 +504,8 @@ class Vfs::Fs_file_system : public File_system, private Remote_io return read_num_bytes; } - file_size _write(Fs_vfs_handle &handle, - const char *buf, file_size count, file_size seek_offset) + Write_result _write(Fs_vfs_handle &handle, file_size const seek_offset, + const char *buf, file_size count, file_size &out_count) { /* * TODO @@ -524,7 +524,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io if (!source.ready_to_submit()) { if (!handle.enqueued()) _congested_handles.enqueue(handle); - throw Insufficient_buffer(); + return Write_result::WRITE_ERR_WOULD_BLOCK; } try { @@ -537,15 +537,18 @@ class Vfs::Fs_file_system : public File_system, private Remote_io memcpy(source.packet_content(packet_in), buf, (size_t)count); _submit_packet(packet_in); - } catch (::File_system::Session::Tx::Source::Packet_alloc_failed) { + } + catch (::File_system::Session::Tx::Source::Packet_alloc_failed) { if (!handle.enqueued()) _congested_handles.enqueue(handle); - throw Insufficient_buffer(); - } catch (...) { - Genode::error("unhandled exception"); - return 0; + return Write_result::WRITE_ERR_WOULD_BLOCK; } - return count; + catch (...) { + Genode::error("unhandled exception"); + return Write_result::WRITE_ERR_IO; + } + out_count = count; + return Write_result::WRITE_OK; } void _handle_ack() @@ -967,12 +970,11 @@ class Vfs::Fs_file_system : public File_system, private Remote_io ********************************/ Write_result write(Vfs_handle *vfs_handle, char const *buf, - file_size buf_size, file_size &out_count) override + file_size count, file_size &out_count) override { Fs_vfs_handle &handle = static_cast(*vfs_handle); - out_count = _write(handle, buf, buf_size, handle.seek()); - return WRITE_OK; + return _write(handle, handle.seek(), buf, count, out_count); } bool queue_read(Vfs_handle *vfs_handle, file_size count) override diff --git a/repos/os/src/server/vfs/node.h b/repos/os/src/server/vfs/node.h index 80b786e3aa..62fb2be59f 100644 --- a/repos/os/src/server/vfs/node.h +++ b/repos/os/src/server/vfs/node.h @@ -408,25 +408,20 @@ class Vfs_server::Io_node : public Vfs_server::Node, seek_off_t write_pos) { file_size out_count = 0; - try { - _handle.seek(_initial_write_seek_offset + write_pos); + _handle.seek(_initial_write_seek_offset + write_pos); - switch (_handle.fs().write(&_handle, src_ptr, length, out_count)) { - case Write_result::WRITE_ERR_AGAIN: - case Write_result::WRITE_ERR_WOULD_BLOCK: - break; + switch (_handle.fs().write(&_handle, src_ptr, length, out_count)) { + case Write_result::WRITE_ERR_WOULD_BLOCK: + break; - case Write_result::WRITE_ERR_INVALID: - case Write_result::WRITE_ERR_IO: - case Write_result::WRITE_ERR_INTERRUPT: - _acknowledge_as_failure(); - break; + case Write_result::WRITE_ERR_INVALID: + case Write_result::WRITE_ERR_IO: + _acknowledge_as_failure(); + break; - case Write_result::WRITE_OK: - break; - } + case Write_result::WRITE_OK: + break; } - catch (Vfs::File_io_service::Insufficient_buffer) { /* re-execute */ } _modified = true; @@ -452,14 +447,11 @@ class Vfs_server::Io_node : public Vfs_server::Node, void _execute_write_timestamp() { - try { - _packet.with_timestamp([&] (::File_system::Timestamp const time) { - Vfs::Timestamp ts { .value = time.value }; - _handle.fs().update_modification_timestamp(&_handle, ts); - }); - _acknowledge_as_success(0); - } - catch (Vfs::File_io_service::Insufficient_buffer) { } + _packet.with_timestamp([&] (::File_system::Timestamp const time) { + Vfs::Timestamp ts { .value = time.value }; + _handle.fs().update_modification_timestamp(&_handle, ts); + }); + _acknowledge_as_success(0); _modified = true; } diff --git a/repos/os/src/server/vfs_block/job.h b/repos/os/src/server/vfs_block/job.h index 36fa8848cb..e9273fb4cc 100644 --- a/repos/os/src/server/vfs_block/job.h +++ b/repos/os/src/server/vfs_block/job.h @@ -137,6 +137,7 @@ namespace Vfs_block { _handle.seek(base_offset + current_offset); state = State::IN_PROGRESS; progress = true; + [[fallthrough]]; case State::IN_PROGRESS: { @@ -145,31 +146,24 @@ namespace Vfs_block { bool completed = false; file_size out = 0; - Result result = Result::WRITE_ERR_INVALID; - try { - result = _handle.fs().write(&_handle, - data + current_offset, - current_count, out); - } catch (Vfs::File_io_service::Insufficient_buffer) { + Result result = _handle.fs().write(&_handle, + data + current_offset, + current_count, out); + switch (result) { + case Result::WRITE_ERR_WOULD_BLOCK: return progress; - } - if ( result == Result::WRITE_ERR_AGAIN - || result == Result::WRITE_ERR_INTERRUPT - || result == Result::WRITE_ERR_WOULD_BLOCK) { - return progress; - } else - - if (result == Result::WRITE_OK) { + case Result::WRITE_OK: current_offset += out; current_count -= out; success = true; - } else + break; - if ( result == Result::WRITE_ERR_IO - || result == Result::WRITE_ERR_INVALID) { + case Result::WRITE_ERR_IO: + case Result::WRITE_ERR_INVALID: success = false; completed = true; + break; } if (current_count == 0 || completed) { diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index e419ffd488..95458576e9 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -95,16 +95,12 @@ inline void assert_write(Vfs::File_io_service::Write_result r) typedef Vfs::File_io_service::Write_result Result; switch (r) { case Result::WRITE_OK: return; - case Result::WRITE_ERR_AGAIN: - error("WRITE_ERR_AGAIN"); break; case Result::WRITE_ERR_WOULD_BLOCK: error("WRITE_ERR_WOULD_BLOCK"); break; case Result::WRITE_ERR_INVALID: error("WRITE_ERR_INVALID"); break; case Result::WRITE_ERR_IO: error("WRITE_ERR_IO"); break; - case Result::WRITE_ERR_INTERRUPT: - error("WRITE_ERR_INTERRUPT"); break; } throw Exception(); } From 5ad98f2b7c7f9a9aaafe7b2aff68a5773f1726b8 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 7 Dec 2022 14:06:35 +0100 Subject: [PATCH 0136/1921] vfs,libc: introduce Vfs::Env::User interface The new interface is meant to replace the 'Vfs::Io_response_handler'. In contrast to the 'Io_response_handler', which had to be called on a 'Vfs_handle', the new interface does not require any specific 'Vfs_handle'. It is merely meant to prompt the VFS user (like the libc) to re-attempt stalled I/O operations but it does not provide any immediate hint, about which of the handles have become ready for reading/writing. Issue #4697 --- repos/libports/src/lib/libc/internal/env.h | 7 ++++-- repos/libports/src/lib/libc/internal/kernel.h | 22 +++++++++++++++---- repos/os/include/vfs/env.h | 14 ++++++++++++ repos/os/include/vfs/simple_env.h | 22 ++++++++++++++++--- 4 files changed, 56 insertions(+), 9 deletions(-) diff --git a/repos/libports/src/lib/libc/internal/env.h b/repos/libports/src/lib/libc/internal/env.h index 53a462e7b1..815fe23184 100644 --- a/repos/libports/src/lib/libc/internal/env.h +++ b/repos/libports/src/lib/libc/internal/env.h @@ -64,8 +64,11 @@ class Libc::Env_implementation : public Libc::Env, public Config_accessor public: - Env_implementation(Genode::Env &env, Genode::Allocator &alloc) - : _env(env), _vfs_env(_env, alloc, _vfs_config()) { } + Env_implementation(Genode::Env &env, Genode::Allocator &alloc, + Vfs::Env::User &vfs_user) + : + _env(env), _vfs_env(_env, alloc, _vfs_config(), vfs_user) + { } Vfs::File_system &vfs() { return _vfs_env.root_dir(); } diff --git a/repos/libports/src/lib/libc/internal/kernel.h b/repos/libports/src/lib/libc/internal/kernel.h index 472ceaff22..6583d0eb39 100644 --- a/repos/libports/src/lib/libc/internal/kernel.h +++ b/repos/libports/src/lib/libc/internal/kernel.h @@ -151,7 +151,24 @@ struct Libc::Kernel final : Vfs::Io_response_handler, */ void reset_malloc_heap() override; - Env_implementation _libc_env { _env, _heap }; + /* io_progress_handler marker */ + bool _io_progressed = false; + + struct Vfs_user : Vfs::Env::User + { + bool &_io_progressed; + + Vfs_user(bool &io_progressed) : _io_progressed(io_progressed) { } + + void wakeup_vfs_user() override + { + _io_progressed = true; + } + }; + + Vfs_user _vfs_user { _io_progressed }; + + Env_implementation _libc_env { _env, _heap, _vfs_user }; bool const _update_mtime = _libc_env.libc_config().attribute_value("update_mtime", true); @@ -205,9 +222,6 @@ struct Libc::Kernel final : Vfs::Io_response_handler, jmp_buf _user_context; bool _valid_user_context = false; - /* io_progress_handler marker */ - bool _io_progressed { false }; - Thread &_myself { *Thread::myself() }; addr_t _kernel_stack = Thread::mystack().top; diff --git a/repos/os/include/vfs/env.h b/repos/os/include/vfs/env.h index 261f328be9..7f0586931a 100644 --- a/repos/os/include/vfs/env.h +++ b/repos/os/include/vfs/env.h @@ -60,6 +60,20 @@ struct Vfs::Env : Interface }; virtual Io &io() = 0; + + /** + * Interface for notifying the VFS user about possible progress + * + * This interface allows VFS plugins to prompt the potential unblocking of + * the VFS user, e.g., continuing a write operation that was stalled + * because of a saturated I/O buffer. + */ + struct User : Interface, Genode::Noncopyable + { + virtual void wakeup_vfs_user() = 0; + }; + + virtual User &user() = 0; }; #endif /* _INCLUDE__VFS__ENV_H_ */ diff --git a/repos/os/include/vfs/simple_env.h b/repos/os/include/vfs/simple_env.h index 08660cbd6b..9e905e7fff 100644 --- a/repos/os/include/vfs/simple_env.h +++ b/repos/os/include/vfs/simple_env.h @@ -22,12 +22,13 @@ namespace Vfs { struct Simple_env; } -class Vfs::Simple_env : public Vfs::Env, private Vfs::Env::Io +class Vfs::Simple_env : public Vfs::Env, private Vfs::Env::Io, private Vfs::Env::User { private: Genode::Env &_env; Genode::Allocator &_alloc; + Vfs::Env::User &_user; Global_file_system_factory _fs_factory { _alloc }; @@ -41,9 +42,15 @@ class Vfs::Simple_env : public Vfs::Env, private Vfs::Env::Io Simple_env(Genode::Env &env, Genode::Allocator &alloc, - Genode::Xml_node config) + Genode::Xml_node config, + Vfs::Env::User &user) : - _env(env), _alloc(alloc), _root_dir(*this, config, _fs_factory) + _env(env), _alloc(alloc), _user(user), _root_dir(*this, config, _fs_factory) + { } + + Simple_env(Genode::Env &env, Genode::Allocator &alloc, Genode::Xml_node config) + : + Simple_env(env, alloc, config, *this) { } void apply_config(Genode::Xml_node const &config) @@ -56,6 +63,7 @@ class Vfs::Simple_env : public Vfs::Env, private Vfs::Env::Io Vfs::File_system &root_dir() override { return _root_dir; } Deferred_wakeups &deferred_wakeups() override { return _deferred_wakeups; } Vfs::Env::Io &io() override { return *this; } + Vfs::Env::User &user() override { return _user; } /** * Vfs::Env::Io interface @@ -70,6 +78,14 @@ class Vfs::Simple_env : public Vfs::Env, private Vfs::Env::Io _deferred_wakeups.trigger(); _env.ep().wait_and_dispatch_one_io_signal(); } + + /** + * Vfs::Env::User interface + * + * Fallback implementation used if no 'user' is specified at + * construction time. + */ + void wakeup_vfs_user() override { }; }; #endif /* _INCLUDE__VFS__SIMPLE_ENV_H_ */ From ff2176a586cc151209c5bc01977063158f67d927 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 6 Dec 2022 19:11:44 +0100 Subject: [PATCH 0137/1921] vfs,libc: support write fds in select By adding a 'write_ready' interface following the lines of the existing 'read_ready', VFS plugins become able to propagate the (de-)saturation of I/O buffers to the VFS user. This information is important when using a non-blocking file descriptor for writing into a TCP socket. Once the application observes EAGAIN, it expects a subsequent 'select' call to return as soon as new I/O buffer space becomes available. Before this patch, the select call would always return under this condition, causing an unnecessarily busy write loop. Issue #4697 --- repos/dde_linux/src/lib/vfs/lxip/vfs.cc | 6 + repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc | 2 + repos/gems/src/lib/vfs/audit/vfs_audit.cc | 6 + repos/gems/src/lib/vfs/cbe/vfs.cc | 18 ++- repos/gems/src/lib/vfs/cbe_crypto/vfs.cc | 12 ++ .../gems/src/lib/vfs/cbe_trust_anchor/vfs.cc | 10 ++ repos/gems/src/lib/vfs/gpu/vfs.cc | 2 + repos/gems/src/lib/vfs/import/plugin.cc | 3 + repos/gems/src/lib/vfs/pipe/plugin.cc | 24 +++- repos/gems/src/lib/vfs/trace/vfs.cc | 2 + .../gems/src/lib/vfs/ttf/glyphs_file_system.h | 2 + .../libports/src/lib/libc/socket_fs_plugin.cc | 24 +++- repos/libports/src/lib/libc/vfs_plugin.cc | 20 +-- repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc | 8 ++ .../lib/vfs/jitterentropy/vfs_jitterentropy.h | 4 +- .../libports/src/lib/vfs/libusb/vfs_libusb.cc | 5 + repos/libports/src/lib/vfs/lwip/nic_netif.h | 11 +- repos/libports/src/lib/vfs/lwip/vfs.cc | 122 +++++++++++++----- repos/libports/src/lib/vfs/oss/vfs_oss.cc | 11 ++ repos/os/include/vfs/dir_file_system.h | 8 ++ repos/os/include/vfs/file_io_service.h | 5 + .../include/vfs/readonly_value_file_system.h | 2 + repos/os/include/vfs/simple_env.h | 8 +- repos/os/include/vfs/single_file_system.h | 12 ++ repos/os/include/vfs/value_file_system.h | 2 + repos/os/include/vfs/vfs_handle.h | 2 + repos/os/src/lib/vfs/block_file_system.h | 2 + repos/os/src/lib/vfs/capture/plugin.cc | 5 +- repos/os/src/lib/vfs/fs_file_system.h | 12 ++ repos/os/src/lib/vfs/inline_file_system.h | 2 + repos/os/src/lib/vfs/log_file_system.h | 2 + repos/os/src/lib/vfs/null_file_system.h | 6 +- repos/os/src/lib/vfs/ram_file_system.h | 2 + repos/os/src/lib/vfs/rom_file_system.h | 2 + repos/os/src/lib/vfs/rtc_file_system.h | 2 + repos/os/src/lib/vfs/symlink_file_system.h | 2 + repos/os/src/lib/vfs/tap/nic_file_system.h | 6 + repos/os/src/lib/vfs/tap/uplink_file_system.h | 6 + repos/os/src/lib/vfs/tar_file_system.h | 2 + repos/os/src/lib/vfs/terminal_file_system.h | 2 + repos/os/src/lib/vfs/zero_file_system.h | 2 + 41 files changed, 326 insertions(+), 60 deletions(-) diff --git a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc index f46b8ee848..fa11b12d96 100644 --- a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc +++ b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc @@ -2001,6 +2001,12 @@ class Vfs::Lxip_file_system : public Vfs::File_system, return handle.read_ready(); } + bool write_ready(Vfs_handle const &vfs_handle) const override + { + /* wakeup from WRITE_ERR_WOULD_BLOCK not supported */ + return true; + } + Sync_result complete_sync(Vfs_handle *vfs_handle) { Vfs::Lxip_vfs_handle *handle = diff --git a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc index 69783b5c1d..b168fb2d1c 100644 --- a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc +++ b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc @@ -809,6 +809,8 @@ class Vfs::Rump_file_system : public File_system bool read_ready(Vfs_handle *) override { return true; } + bool write_ready(Vfs_handle const &) const override { return true; } + Ftruncate_result ftruncate(Vfs_handle *vfs_handle, file_size len) override { Rump_vfs_file_handle *handle = diff --git a/repos/gems/src/lib/vfs/audit/vfs_audit.cc b/repos/gems/src/lib/vfs/audit/vfs_audit.cc index 08194f10f3..c58cffd7d3 100644 --- a/repos/gems/src/lib/vfs/audit/vfs_audit.cc +++ b/repos/gems/src/lib/vfs/audit/vfs_audit.cc @@ -275,6 +275,12 @@ class Vfs_audit::File_system : public Vfs::File_system return h.audit->fs().read_ready(h.audit); } + bool write_ready(Vfs_handle const &vfs_handle) const override + { + Handle const &h = static_cast(vfs_handle); + return h.audit->fs().write_ready(*h.audit); + } + bool notify_read_ready(Vfs_handle *vfs_handle) override { Handle &h = *static_cast(vfs_handle); diff --git a/repos/gems/src/lib/vfs/cbe/vfs.cc b/repos/gems/src/lib/vfs/cbe/vfs.cc index c2853e3e1d..f657ea7ca8 100644 --- a/repos/gems/src/lib/vfs/cbe/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe/vfs.cc @@ -2021,6 +2021,8 @@ class Vfs_cbe::Data_file_system : public Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; Data_file_system(Wrapper &w, uint32_t snap_id) @@ -2190,6 +2192,8 @@ class Vfs_cbe::Extend_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -2373,6 +2377,8 @@ class Vfs_cbe::Rekey_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -2556,6 +2562,8 @@ class Vfs_cbe::Deinitialize_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -2692,6 +2700,8 @@ class Vfs_cbe::Create_snapshot_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -2790,6 +2800,8 @@ class Vfs_cbe::Discard_snapshot_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -3148,7 +3160,6 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system } bool read_ready() override { return true; } - }; struct Dir_snap_vfs_handle : Vfs::Vfs_handle @@ -3451,6 +3462,11 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system return true; } + bool write_ready(Vfs::Vfs_handle const &) const override + { + return false; + } + Ftruncate_result ftruncate(Vfs::Vfs_handle *vfs_handle, file_size len) override { diff --git a/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc b/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc index ba2d41a45a..cc309ebca0 100644 --- a/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc @@ -124,6 +124,8 @@ class Vfs_cbe_crypto::Encrypt_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -256,6 +258,8 @@ class Vfs_cbe_crypto::Decrypt_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -893,6 +897,12 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system return true; } + bool write_ready(Vfs::Vfs_handle const &) const override + { + /* wakeup from WRITE_ERR_WOULD_BLOCK not supported */ + return true; + } + Ftruncate_result ftruncate(Vfs::Vfs_handle *, file_size ) override { return FTRUNCATE_OK; @@ -997,6 +1007,8 @@ class Vfs_cbe_crypto::Management_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; char const *_type_name; diff --git a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc index ee679186ee..ec92a4356c 100644 --- a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc @@ -1370,6 +1370,8 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -1476,6 +1478,8 @@ class Vfs_cbe_trust_anchor::Generate_key_file_system : public Vfs::Single_file_s } bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; public: @@ -1604,6 +1608,8 @@ class Vfs_cbe_trust_anchor::Encrypt_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -1731,6 +1737,8 @@ class Vfs_cbe_trust_anchor::Decrypt_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: @@ -1851,6 +1859,8 @@ class Vfs_cbe_trust_anchor::Initialize_file_system : public Vfs::Single_file_sys } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: diff --git a/repos/gems/src/lib/vfs/gpu/vfs.cc b/repos/gems/src/lib/vfs/gpu/vfs.cc index 94e2c17024..2d89c17c46 100644 --- a/repos/gems/src/lib/vfs/gpu/vfs.cc +++ b/repos/gems/src/lib/vfs/gpu/vfs.cc @@ -81,6 +81,8 @@ struct Vfs_gpu::File_system : Single_file_system bool read_ready() override { return _complete; } + bool write_ready() const override { return true; } + Id_space::Id id() const { return _elem.id(); } }; diff --git a/repos/gems/src/lib/vfs/import/plugin.cc b/repos/gems/src/lib/vfs/import/plugin.cc index a2223a7149..0bb90e0c18 100644 --- a/repos/gems/src/lib/vfs/import/plugin.cc +++ b/repos/gems/src/lib/vfs/import/plugin.cc @@ -287,6 +287,9 @@ class Vfs_import::File_system : public Vfs::File_system bool read_ready(Vfs_handle*) override { return true; } + bool write_ready(Vfs_handle const &) const override { + return true; } + bool notify_read_ready(Vfs_handle*) override { return false; } diff --git a/repos/gems/src/lib/vfs/pipe/plugin.cc b/repos/gems/src/lib/vfs/pipe/plugin.cc index 8da27acd98..2382e85795 100644 --- a/repos/gems/src/lib/vfs/pipe/plugin.cc +++ b/repos/gems/src/lib/vfs/pipe/plugin.cc @@ -77,6 +77,7 @@ struct Vfs_pipe::Pipe_handle : Vfs::Vfs_handle, private Pipe_handle_registry_ele file_size &out_count); bool read_ready(); + bool write_ready() const; bool notify_read_ready(); }; @@ -280,13 +281,21 @@ Vfs_pipe::Pipe_handle::read(char *buf, return Pipe_handle::pipe.read(*this, buf, count, out_count); } -bool -Vfs_pipe::Pipe_handle::read_ready() { +bool Vfs_pipe::Pipe_handle::read_ready() { return !writer && !pipe.buffer.empty(); } -bool -Vfs_pipe::Pipe_handle::notify_read_ready() +bool Vfs_pipe::Pipe_handle::write_ready() const +{ + /* + * Unconditionally return true for the writer side because + * WRITE_ERR_WOULD_BLOCK is not yet supported. + */ + return writer; +} + + +bool Vfs_pipe::Pipe_handle::notify_read_ready() { if (!writer && !read_ready_elem.enqueued()) pipe.read_ready_waiters.enqueue(read_ready_elem); @@ -597,6 +606,13 @@ class Vfs_pipe::File_system : public Vfs::File_system return true; } + bool write_ready(Vfs_handle const &vfs_handle) const override + { + if (Pipe_handle const *handle = dynamic_cast(&vfs_handle)) + return handle->write_ready(); + return true; + } + bool notify_read_ready(Vfs_handle *vfs_handle) override { if (Pipe_handle *handle = dynamic_cast(vfs_handle)) diff --git a/repos/gems/src/lib/vfs/trace/vfs.cc b/repos/gems/src/lib/vfs/trace/vfs.cc index bb2880eeab..b1c53f2ba4 100644 --- a/repos/gems/src/lib/vfs/trace/vfs.cc +++ b/repos/gems/src/lib/vfs/trace/vfs.cc @@ -148,6 +148,8 @@ class Vfs_trace::Trace_buffer_file_system : public Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; Trace_buffer_file_system(Vfs::Env &env, diff --git a/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h b/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h index e55ac043e6..6dcd327e8a 100644 --- a/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h +++ b/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h @@ -107,6 +107,8 @@ class Vfs::Glyphs_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; typedef Registered Registered_watch_handle; diff --git a/repos/libports/src/lib/libc/socket_fs_plugin.cc b/repos/libports/src/lib/libc/socket_fs_plugin.cc index 24c34726b5..8fee549bc9 100644 --- a/repos/libports/src/lib/libc/socket_fs_plugin.cc +++ b/repos/libports/src/lib/libc/socket_fs_plugin.cc @@ -48,6 +48,7 @@ namespace Libc { extern char const *config_socket(); bool read_ready_from_kernel(File_descriptor *); + bool write_ready_from_kernel(File_descriptor *); } @@ -199,6 +200,14 @@ struct Libc::Socket_fs::Context : Plugin_context return false; } + bool _fd_write_ready(Fd type) + { + if (_fd[type].file) + return Libc::write_ready_from_kernel(_fd[type].file); + else + return false; + } + public: Context(Proto proto, int handle_fd) @@ -260,8 +269,7 @@ struct Libc::Socket_fs::Context : Plugin_context if (_state == CONNECTING) return connect_read_ready(); - /* XXX ask if "data" is writeable */ - return true; + return _fd_write_ready(Fd::DATA); } /* @@ -950,7 +958,13 @@ static ssize_t do_sendto(File_descriptor *fd, break; case Socket_fs::Context::Proto::TCP: - if (out_len == 0) return Errno(EAGAIN); + + /* + * Non-blocking write stalled + */ + if ((out_len == -1) && (errno == EAGAIN)) + return Errno(EAGAIN); + /* * Write errors to TCP-data files are reflected as EPIPE, which * means the connection-mode socket is no longer connected. This @@ -961,7 +975,8 @@ static ssize_t do_sendto(File_descriptor *fd, * TODO If the MSG_NOSIGNAL flag is not set, the SIGPIPE signal is * generated to the calling thread. */ - if (out_len == -1) return Errno(EPIPE); + if (out_len == -1) + return Errno(EPIPE); break; } return out_len; @@ -1358,7 +1373,6 @@ int Socket_fs::Plugin::select(int nfds, if (fd_in_writefds) { try { Socket_fs::Context *context = dynamic_cast(fdo->context); - if (context->write_ready()) { FD_SET(fd, writefds); ++nready; diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index 7cb61f6d9d..a913089cdc 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -221,6 +221,15 @@ namespace Libc { return handle->fs().read_ready(handle); } + + bool write_ready_from_kernel(File_descriptor *fd) + { + Vfs::Vfs_handle const *handle = vfs_handle(fd); + if (!handle) + return false; + + return handle->fs().write_ready(*handle); + } } @@ -839,10 +848,8 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, Vfs::file_size out_count = 0; Result out_result = Result::WRITE_OK; - bool const nonblocking = (fd->flags & O_NONBLOCK); - - if (nonblocking) { + if (fd->flags & O_NONBLOCK) { monitor().monitor([&] { out_result = handle->fs().write(handle, (char const *)buf, count, out_count); return Fn::COMPLETE; @@ -946,11 +953,6 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, handle->advance_seek(out_count); fd->modified = true; - /* notify remote peers once our VFS' local I/O buffers are saturated */ - bool const nonblocking_write_stalled = nonblocking && count && !out_count; - if (nonblocking_write_stalled) - Libc::Kernel::kernel().wakeup_remote_peers(); - return out_count; } @@ -2731,7 +2733,7 @@ int Libc::Vfs_plugin::select(int nfds, } if (fd_in_writefds) { - if (true /* XXX always writeable */) { + if (handle->fs().write_ready(*handle)) { FD_SET(fd, writefds); ++nready; } diff --git a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc index 95033f984e..986cc19e60 100644 --- a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc +++ b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc @@ -779,6 +779,14 @@ class Fatfs::File_system : public Vfs::File_system bool read_ready(Vfs_handle *) override { return true; } + bool write_ready(Vfs_handle const &) const override + { + /* + * Wakeup from WRITE_ERR_WOULD_BLOCK not supported. + */ + return true; + } + /** * Notify other handles if this handle has modified its file. * diff --git a/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h b/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h index a4d0f5a392..54d5ffaa21 100644 --- a/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h +++ b/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h @@ -94,7 +94,9 @@ class Jitterentropy_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - bool read_ready() { return true; } + bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; public: diff --git a/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc b/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc index dde8a44b04..a3c5cf4dc8 100644 --- a/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc +++ b/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc @@ -88,6 +88,11 @@ class Libusb_file_system : public Vfs::Single_file_system return READ_ERR_IO; } + bool write_ready() const override + { + return true; + } + Write_result write(char const *src, Vfs::file_size count, Vfs::file_size &out_count) override { diff --git a/repos/libports/src/lib/vfs/lwip/nic_netif.h b/repos/libports/src/lib/vfs/lwip/nic_netif.h index 773a0c3872..229e784df9 100644 --- a/repos/libports/src/lib/vfs/lwip/nic_netif.h +++ b/repos/libports/src/lib/vfs/lwip/nic_netif.h @@ -88,6 +88,8 @@ class Lwip::Nic_netif Wakeup_scheduler &_wakeup_scheduler; + bool _tx_saturated = false; + enum { PACKET_SIZE = Nic::Packet_allocator::DEFAULT_PACKET_SIZE, BUF_SIZE = 1024*PACKET_SIZE, @@ -202,6 +204,7 @@ class Lwip::Nic_netif /* flush acknowledgements */ while (tx.ack_avail()) { tx.release_packet(tx.try_get_acked_packet()); + _tx_saturated = false; progress = true; } @@ -309,6 +312,8 @@ class Lwip::Nic_netif Lwip::netif& lwip_netif() { return _netif; } + bool tx_saturated() const { return _tx_saturated; } + /** * Status callback to override in subclass */ @@ -372,11 +377,14 @@ class Lwip::Nic_netif auto &tx = *_nic.tx(); /* flush acknowledgements */ - while (tx.ack_avail()) + while (tx.ack_avail()) { tx.release_packet(tx.get_acked_packet()); + _tx_saturated = false; + } if (!tx.ready_to_submit()) { Genode::error("lwIP: Nic packet queue congested, cannot send packet"); + _tx_saturated = true; return ERR_WOULDBLOCK; } @@ -384,6 +392,7 @@ class Lwip::Nic_netif try { packet = tx.alloc_packet(p->tot_len); } catch (...) { Genode::error("lwIP: Nic packet allocation failed, cannot send packet"); + _tx_saturated = true; return ERR_WOULDBLOCK; } diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index d5482689bf..55f939c5ff 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -428,6 +428,8 @@ struct Lwip::Socket_dir : Lwip::Directory virtual bool read_ready(Lwip_file_handle&) = 0; + virtual bool write_ready(Lwip_file_handle const &) const = 0; + /** * Notify handles waiting for this PCB / socket to be ready */ @@ -987,6 +989,11 @@ class Lwip::Udp_socket_dir final : return result; } + bool write_ready(Lwip_file_handle const &) const override + { + return true; + } + Write_result write(Lwip_file_handle &handle, char const *src, file_size count, file_size &out_count) override @@ -1453,6 +1460,30 @@ class Lwip::Tcp_socket_dir final : return Read_result::READ_ERR_INVALID; } + bool write_ready(Lwip_file_handle const &handle) const override + { + switch (handle.kind) { + case Lwip_file_handle::DATA: + + return tcp_sndbuf(_pcb); + + case Lwip_file_handle::PEEK: + case Lwip_file_handle::ACCEPT: + case Lwip_file_handle::PENDING: + case Lwip_file_handle::BIND: + case Lwip_file_handle::REMOTE: + case Lwip_file_handle::CONNECT: + case Lwip_file_handle::LOCATION: + case Lwip_file_handle::LOCAL: + return true; + + case Lwip_file_handle::INVALID: + case Lwip_file_handle::LISTEN: + break; + } + return false; + } + Write_result write(Lwip_file_handle &handle, char const *src, file_size count, file_size &out_count) override @@ -1704,21 +1735,43 @@ void tcp_err_callback(void *arg, err_t) ** VFS file-system ** *********************/ -class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory +class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, + private Vfs::Remote_io { private: Genode::Entrypoint &_ep; + struct Wakeup_scheduler : Lwip::Nic_netif::Wakeup_scheduler + { + Vfs::Env::User &_vfs_user; + + Remote_io::Peer _peer; + + /** + * Lwip::Nic_netif::Wakeup_scheduler interface + * + * Called from Lwip::Nic_netif. + */ + void schedule_nic_server_wakeup() override + { + _vfs_user.wakeup_vfs_user(); + _peer.schedule_wakeup(); + } + + Wakeup_scheduler(Vfs::Env &vfs_env, Remote_io &remote_io) + : + _vfs_user(vfs_env.user()), + _peer(vfs_env.deferred_wakeups(), remote_io) + { } + + } _wakeup_scheduler; + /** * LwIP connection to Nic service */ - struct Vfs_netif : Lwip::Nic_netif, - private Vfs::Remote_io, - private Lwip::Nic_netif::Wakeup_scheduler + struct Vfs_netif : Lwip::Nic_netif { - Remote_io::Peer _peer; - Tcp_proto_dir tcp_dir; Udp_proto_dir udp_dir; @@ -1729,10 +1782,11 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory Handle_queue blocked_handles { }; - Vfs_netif(Vfs::Env &vfs_env, Genode::Xml_node config) + Vfs_netif(Vfs::Env &vfs_env, Genode::Xml_node config, + Lwip::Nic_netif::Wakeup_scheduler &wakeup_scheduler) : - Lwip::Nic_netif(vfs_env.env(), vfs_env.alloc(), config, *this), - _peer(vfs_env.deferred_wakeups(), *this), + Lwip::Nic_netif(vfs_env.env(), vfs_env.alloc(), config, + wakeup_scheduler), tcp_dir(vfs_env), udp_dir(vfs_env) { } @@ -1742,26 +1796,6 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory status_callback(); } - /** - * Lwip::Nic_netif::Wakeup_scheduler interface - * - * Called from Lwip::Nic_netif. - */ - void schedule_nic_server_wakeup() override - { - _peer.schedule_wakeup(); - } - - /** - * Remote_io interface - * - * Called from VFS user when going idle. - */ - void wakeup_remote_peer() override - { - Lwip::Nic_netif::wakeup_nic_server(); - } - void enqueue(Vfs_handle &handle) { Handle_element *elem = new (handle.alloc()) @@ -1797,9 +1831,18 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory } }); } - } _netif; + /** + * Remote_io interface + * + * Called from VFS user when going idle. + */ + void wakeup_remote_peer() override + { + _netif.wakeup_nic_server(); + } + /** * Walk a path to a protocol directory and apply procedure */ @@ -1828,7 +1871,9 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory File_system(Vfs::Env &vfs_env, Genode::Xml_node config) : - _ep(vfs_env.env().ep()), _netif(vfs_env, config) + _ep(vfs_env.env().ep()), + _wakeup_scheduler(vfs_env, *this), + _netif(vfs_env, config, _wakeup_scheduler) { } /** @@ -1850,6 +1895,7 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory return Read_result::READ_ERR_INVALID; }; + /*********************** ** Directory_service ** ***********************/ @@ -2079,6 +2125,20 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory return true; } + bool write_ready(Vfs_handle const &vfs_handle) const override + { + if (_netif.tx_saturated()) + return false; + + Lwip_file_handle const *handle_ptr = + dynamic_cast(&vfs_handle); + + if (handle_ptr && handle_ptr->socket) + return handle_ptr->socket->write_ready(*handle_ptr); + + return false; + } + bool notify_read_ready(Vfs_handle *vfs_handle) override { if (Lwip_file_handle *handle = dynamic_cast(vfs_handle)) diff --git a/repos/libports/src/lib/vfs/oss/vfs_oss.cc b/repos/libports/src/lib/vfs/oss/vfs_oss.cc index 1f5e2188be..00a5edae66 100644 --- a/repos/libports/src/lib/vfs/oss/vfs_oss.cc +++ b/repos/libports/src/lib/vfs/oss/vfs_oss.cc @@ -290,6 +290,12 @@ struct Vfs::Oss_file_system::Audio return _info.ifrag_bytes > 0; } + bool write_ready() const + { + /* wakeup from WRITE_ERR_WOULD_BLOCK not yet supported */ + return true; + } + void update_info_ofrag_avail_from_optr_fifo_samples() { _info.ofrag_bytes = (_info.ofrag_total * _info.ofrag_size) - @@ -679,6 +685,11 @@ class Vfs::Oss_file_system::Data_file_system : public Single_file_system { return _audio.read_ready(); } + + bool write_ready() const override + { + return _audio.write_ready(); + } }; using Registered_handle = Genode::Registered; diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h index 81efc65212..b8bb62a28b 100644 --- a/repos/os/include/vfs/dir_file_system.h +++ b/repos/os/include/vfs/dir_file_system.h @@ -973,6 +973,14 @@ class Vfs::Dir_file_system : public File_system return handle->fs().read_ready(handle); } + bool write_ready(Vfs_handle const &handle) const override + { + if (&handle.fs() == this) + return false; + + return handle.fs().write_ready(handle); + } + bool notify_read_ready(Vfs_handle *handle) override { if (&handle->fs() == this) diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index e93f0792ae..491e00dd7e 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -69,6 +69,11 @@ struct Vfs::File_io_service : Interface */ virtual bool read_ready(Vfs_handle *) = 0; + /** + * Return true if the handle might accept a write operation + */ + virtual bool write_ready(Vfs_handle const &) const = 0; + /** * Explicitly indicate interest in read-ready for a handle * diff --git a/repos/os/include/vfs/readonly_value_file_system.h b/repos/os/include/vfs/readonly_value_file_system.h index 6c15b0bb55..a1ea01c9a8 100644 --- a/repos/os/include/vfs/readonly_value_file_system.h +++ b/repos/os/include/vfs/readonly_value_file_system.h @@ -73,6 +73,8 @@ class Vfs::Readonly_value_file_system : public Vfs::Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; typedef Genode::String<200> Config; diff --git a/repos/os/include/vfs/simple_env.h b/repos/os/include/vfs/simple_env.h index 9e905e7fff..a3f9875113 100644 --- a/repos/os/include/vfs/simple_env.h +++ b/repos/os/include/vfs/simple_env.h @@ -30,14 +30,14 @@ class Vfs::Simple_env : public Vfs::Env, private Vfs::Env::Io, private Vfs::Env: Genode::Allocator &_alloc; Vfs::Env::User &_user; - Global_file_system_factory _fs_factory { _alloc }; - - Dir_file_system _root_dir; - using Deferred_wakeups = Remote_io::Deferred_wakeups; Deferred_wakeups _deferred_wakeups { }; + Global_file_system_factory _fs_factory { _alloc }; + + Dir_file_system _root_dir; + public: Simple_env(Genode::Env &env, diff --git a/repos/os/include/vfs/single_file_system.h b/repos/os/include/vfs/single_file_system.h index 43fec22000..f84ead2d9a 100644 --- a/repos/os/include/vfs/single_file_system.h +++ b/repos/os/include/vfs/single_file_system.h @@ -50,6 +50,8 @@ class Vfs::Single_file_system : public File_system virtual bool read_ready() = 0; + virtual bool write_ready() const = 0; + virtual bool notify_read_ready() { return true; } }; @@ -131,6 +133,8 @@ class Vfs::Single_file_system : public File_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; bool _root(const char *path) @@ -288,6 +292,14 @@ class Vfs::Single_file_system : public File_system return false; } + bool write_ready(Vfs_handle const &vfs_handle) const override + { + Single_vfs_handle const &handle = + static_cast(vfs_handle); + + return handle.write_ready(); + } + bool notify_read_ready(Vfs_handle *vfs_handle) override { Single_vfs_handle *handle = diff --git a/repos/os/include/vfs/value_file_system.h b/repos/os/include/vfs/value_file_system.h index 1dbd453d7d..24875ea792 100644 --- a/repos/os/include/vfs/value_file_system.h +++ b/repos/os/include/vfs/value_file_system.h @@ -86,6 +86,8 @@ class Vfs::Value_file_system : public Vfs::Single_file_system bool read_ready() override { return true; } + bool write_ready() const override { return true; } + private: Vfs_handle(Vfs_handle const &); diff --git a/repos/os/include/vfs/vfs_handle.h b/repos/os/include/vfs/vfs_handle.h index 396185a83f..7b6895dc47 100644 --- a/repos/os/include/vfs/vfs_handle.h +++ b/repos/os/include/vfs/vfs_handle.h @@ -120,6 +120,8 @@ class Vfs::Vfs_handle File_io_service &fs() { return _fs; } Allocator &alloc() { return _alloc; } + File_io_service const &fs() const { return _fs; } + int status_flags() const { return _status_flags; } void status_flags(int flags) { _status_flags = flags; } diff --git a/repos/os/src/lib/vfs/block_file_system.h b/repos/os/src/lib/vfs/block_file_system.h index bc3d0a88ad..28ba455ed2 100644 --- a/repos/os/src/lib/vfs/block_file_system.h +++ b/repos/os/src/lib/vfs/block_file_system.h @@ -338,6 +338,8 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; public: diff --git a/repos/os/src/lib/vfs/capture/plugin.cc b/repos/os/src/lib/vfs/capture/plugin.cc index 0accec57b9..1faa92e4bb 100644 --- a/repos/os/src/lib/vfs/capture/plugin.cc +++ b/repos/os/src/lib/vfs/capture/plugin.cc @@ -67,8 +67,9 @@ class Vfs_capture::Data_file_system : public Single_file_system _capture(capture), _capture_ds(capture_ds) { } - bool read_ready() override { - return true; } + bool read_ready() override { return true; } + + bool write_ready() const override { return true; } Read_result read(char *dst, file_size count, file_size &out_count) override diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index 1d992c57a9..a6f053311e 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -39,6 +39,8 @@ class Vfs::Fs_file_system : public File_system, private Remote_io ::File_system::Connection _fs; + bool _write_would_block = false; + typedef Genode::Id_space<::File_system::Node> Handle_space; Handle_space _handle_space { }; @@ -524,6 +526,8 @@ class Vfs::Fs_file_system : public File_system, private Remote_io if (!source.ready_to_submit()) { if (!handle.enqueued()) _congested_handles.enqueue(handle); + + _write_would_block = true; return Write_result::WRITE_ERR_WOULD_BLOCK; } @@ -541,6 +545,8 @@ class Vfs::Fs_file_system : public File_system, private Remote_io catch (::File_system::Session::Tx::Source::Packet_alloc_failed) { if (!handle.enqueued()) _congested_handles.enqueue(handle); + + _write_would_block = true; return Write_result::WRITE_ERR_WOULD_BLOCK; } catch (...) { @@ -559,6 +565,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io while (source.ack_avail()) { Packet_descriptor const packet = source.try_get_acked_packet(); + _write_would_block = false; _peer.schedule_wakeup(); Handle_space::Id const id(packet.handle()); @@ -1007,6 +1014,11 @@ class Vfs::Fs_file_system : public File_system, private Remote_io return handle->read_ready_state == Handle_state::Read_ready_state::READY; } + bool write_ready(Vfs_handle const &) const override + { + return !_write_would_block; + } + bool notify_read_ready(Vfs_handle *vfs_handle) override { Fs_vfs_handle *handle = static_cast(vfs_handle); diff --git a/repos/os/src/lib/vfs/inline_file_system.h b/repos/os/src/lib/vfs/inline_file_system.h index 03f2e86bed..d60edd1e35 100644 --- a/repos/os/src/lib/vfs/inline_file_system.h +++ b/repos/os/src/lib/vfs/inline_file_system.h @@ -90,6 +90,8 @@ class Vfs::Inline_file_system : public Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; public: diff --git a/repos/os/src/lib/vfs/log_file_system.h b/repos/os/src/lib/vfs/log_file_system.h index c615de8ad9..ffa0aec7f6 100644 --- a/repos/os/src/lib/vfs/log_file_system.h +++ b/repos/os/src/lib/vfs/log_file_system.h @@ -128,6 +128,8 @@ class Vfs::Log_file_system : public Single_file_system bool read_ready() override { return false; } + bool write_ready() const override { return true; } + Sync_result sync() override { if (_line_pos > 0) diff --git a/repos/os/src/lib/vfs/null_file_system.h b/repos/os/src/lib/vfs/null_file_system.h index fd790c214c..89733a6722 100644 --- a/repos/os/src/lib/vfs/null_file_system.h +++ b/repos/os/src/lib/vfs/null_file_system.h @@ -54,6 +54,8 @@ struct Vfs::Null_file_system : Single_file_system } bool read_ready() override { return false; } + + bool write_ready() const override { return true; } }; /********************************* @@ -61,8 +63,8 @@ struct Vfs::Null_file_system : Single_file_system *********************************/ Open_result open(char const *path, unsigned, - Vfs_handle **out_handle, - Allocator &alloc) override + Vfs_handle **out_handle, + Allocator &alloc) override { if (!_single_file(path)) return OPEN_ERR_UNACCESSIBLE; diff --git a/repos/os/src/lib/vfs/ram_file_system.h b/repos/os/src/lib/vfs/ram_file_system.h index 0f333a26f5..b345977b2a 100644 --- a/repos/os/src/lib/vfs/ram_file_system.h +++ b/repos/os/src/lib/vfs/ram_file_system.h @@ -968,6 +968,8 @@ class Vfs::Ram_file_system : public Vfs::File_system bool read_ready(Vfs_handle *) override { return true; } + bool write_ready(Vfs_handle const &) const override { return true; } + Ftruncate_result ftruncate(Vfs_handle * const vfs_handle, file_size len) override { if ((vfs_handle->status_flags() & OPEN_MODE_ACCMODE) == OPEN_MODE_RDONLY) diff --git a/repos/os/src/lib/vfs/rom_file_system.h b/repos/os/src/lib/vfs/rom_file_system.h index 42d98ad050..9c5f28f937 100644 --- a/repos/os/src/lib/vfs/rom_file_system.h +++ b/repos/os/src/lib/vfs/rom_file_system.h @@ -113,6 +113,8 @@ class Vfs::Rom_file_system : public Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; typedef Genode::Registered Registered_watch_handle; diff --git a/repos/os/src/lib/vfs/rtc_file_system.h b/repos/os/src/lib/vfs/rtc_file_system.h index 866e9fb180..8de6ff66c2 100644 --- a/repos/os/src/lib/vfs/rtc_file_system.h +++ b/repos/os/src/lib/vfs/rtc_file_system.h @@ -82,6 +82,8 @@ class Vfs::Rtc_file_system : public Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; typedef Genode::Registered Registered_watch_handle; diff --git a/repos/os/src/lib/vfs/symlink_file_system.h b/repos/os/src/lib/vfs/symlink_file_system.h index 333e9eb706..c42341344e 100644 --- a/repos/os/src/lib/vfs/symlink_file_system.h +++ b/repos/os/src/lib/vfs/symlink_file_system.h @@ -54,6 +54,8 @@ class Vfs::Symlink_file_system : public Single_file_system return WRITE_ERR_INVALID; } bool read_ready() override { return true; } + + bool write_ready() const override { return false; } }; public: diff --git a/repos/os/src/lib/vfs/tap/nic_file_system.h b/repos/os/src/lib/vfs/tap/nic_file_system.h index 77d5841c69..aeea5f262e 100644 --- a/repos/os/src/lib/vfs/tap/nic_file_system.h +++ b/repos/os/src/lib/vfs/tap/nic_file_system.h @@ -134,6 +134,12 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle bool read_ready() override { return _link_state && _nic.rx()->packet_avail() && _nic.rx()->ready_to_ack(); } + bool write_ready() const override + { + /* wakeup from WRITE_ERR_WOULD_BLOCK not supported */ + return _link_state; + } + Read_result read(char *dst, file_size count, file_size &out_count) override { diff --git a/repos/os/src/lib/vfs/tap/uplink_file_system.h b/repos/os/src/lib/vfs/tap/uplink_file_system.h index 1974d3e884..967a3ee01f 100644 --- a/repos/os/src/lib/vfs/tap/uplink_file_system.h +++ b/repos/os/src/lib/vfs/tap/uplink_file_system.h @@ -124,6 +124,12 @@ class Vfs::Uplink_file_system::Uplink_vfs_handle : public Single_vfs_handle, bool read_ready() override { return _drv_link_state && _conn->rx()->packet_avail() && _conn->rx()->ready_to_ack(); } + bool write_ready() const override + { + /* wakeup from WRITE_ERR_WOULD_BLOCK not supported */ + return _drv_link_state; + } + Read_result read(char *dst, file_size count, file_size &out_count) override { diff --git a/repos/os/src/lib/vfs/tar_file_system.h b/repos/os/src/lib/vfs/tar_file_system.h index 12fcbc9dea..ea6c64dcd3 100644 --- a/repos/os/src/lib/vfs/tar_file_system.h +++ b/repos/os/src/lib/vfs/tar_file_system.h @@ -776,6 +776,8 @@ class Vfs::Tar_file_system : public File_system } bool read_ready(Vfs_handle *) override { return true; } + + bool write_ready(Vfs_handle const &) const override { return false; } }; #endif /* _INCLUDE__VFS__TAR_FILE_SYSTEM_H_ */ diff --git a/repos/os/src/lib/vfs/terminal_file_system.h b/repos/os/src/lib/vfs/terminal_file_system.h index 1da78b64df..207c8e3893 100644 --- a/repos/os/src/lib/vfs/terminal_file_system.h +++ b/repos/os/src/lib/vfs/terminal_file_system.h @@ -137,6 +137,8 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system bool read_ready() override { return !_read_buffer.empty(); } + bool write_ready() const override { return true; } + bool notify_read_ready() override { notifying = true; diff --git a/repos/os/src/lib/vfs/zero_file_system.h b/repos/os/src/lib/vfs/zero_file_system.h index b1e6d5d822..da85585320 100644 --- a/repos/os/src/lib/vfs/zero_file_system.h +++ b/repos/os/src/lib/vfs/zero_file_system.h @@ -82,6 +82,8 @@ struct Vfs::Zero_file_system : Single_file_system } bool read_ready() override { return true; } + + bool write_ready() const override { return true; } }; /********************************* From 0ebb572f48603038bcf52d16e737c8af0bbac581 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 8 Dec 2022 14:11:56 +0100 Subject: [PATCH 0138/1921] pkg/test-libc_connect_lwip: increase server RAM --- repos/libports/recipes/pkg/test-libc_connect_lwip/runtime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/libports/recipes/pkg/test-libc_connect_lwip/runtime b/repos/libports/recipes/pkg/test-libc_connect_lwip/runtime index baca0f5ba8..b41bc33ab6 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lwip/runtime +++ b/repos/libports/recipes/pkg/test-libc_connect_lwip/runtime @@ -51,7 +51,7 @@ - + From 2a1240d1e92b8d8642ca90a284fcc2f513e1420b Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 8 Dec 2022 15:09:01 +0100 Subject: [PATCH 0139/1921] base: provide generic cpu/string.h This patch uses the formerly x86-specific cpu/string.h for all architectures if no spec/ variant exists. Issue #4456 --- .../base/include/{spec/x86 => }/cpu/string.h | 7 ++-- repos/base/include/spec/arm_64/cpu/string.h | 31 ------------------ repos/base/include/spec/riscv/cpu/string.h | 32 ------------------- 3 files changed, 4 insertions(+), 66 deletions(-) rename repos/base/include/{spec/x86 => }/cpu/string.h (89%) delete mode 100644 repos/base/include/spec/arm_64/cpu/string.h delete mode 100644 repos/base/include/spec/riscv/cpu/string.h diff --git a/repos/base/include/spec/x86/cpu/string.h b/repos/base/include/cpu/string.h similarity index 89% rename from repos/base/include/spec/x86/cpu/string.h rename to repos/base/include/cpu/string.h index fdb3e50dec..c429da2842 100644 --- a/repos/base/include/spec/x86/cpu/string.h +++ b/repos/base/include/cpu/string.h @@ -1,6 +1,7 @@ /* * \brief CPU-specific memcpy * \author Sebastian Sumpf + * \author Johanned Schlatow * \date 2012-08-02 */ @@ -11,8 +12,8 @@ * under the terms of the GNU Affero General Public License version 3. */ -#ifndef _INCLUDE__SPEC__X86__CPU__STRING_H_ -#define _INCLUDE__SPEC__X86__CPU__STRING_H_ +#ifndef _INCLUDE__CPU__STRING_H_ +#define _INCLUDE__CPU__STRING_H_ namespace Genode { @@ -58,4 +59,4 @@ namespace Genode { } } -#endif /* _INCLUDE__SPEC__X86__CPU__STRING_H_ */ +#endif /* _INCLUDE__CPU__STRING_H_ */ diff --git a/repos/base/include/spec/arm_64/cpu/string.h b/repos/base/include/spec/arm_64/cpu/string.h deleted file mode 100644 index 2c5050e41f..0000000000 --- a/repos/base/include/spec/arm_64/cpu/string.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * \brief CPU-specific memcpy - * \author Stefan Kalkowski - * \date 2012-08-02 - */ - -/* - * Copyright (C) 2019 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__SPEC__ARM_64__CPU__STRING_H_ -#define _INCLUDE__SPEC__ARM_64__CPU__STRING_H_ - -namespace Genode { - - /** - * Copy memory block - * - * \param dst destination memory block - * \param src source memory block - * \param size number of bytes to copy - * - * \return number of bytes not copied - */ - inline size_t memcpy_cpu(void *, const void *, size_t size) { return size; } -} - -#endif /* _INCLUDE__SPEC__ARM_64__CPU__STRING_H_ */ diff --git a/repos/base/include/spec/riscv/cpu/string.h b/repos/base/include/spec/riscv/cpu/string.h deleted file mode 100644 index 9aa9e79ee0..0000000000 --- a/repos/base/include/spec/riscv/cpu/string.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * \brief CPU-specific memcpy - * \author Sebastian Sumpf - * \date 2015-06-01 - */ - -/* - * Copyright (C) 2015-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__RISCV__CPU__STRING_H_ -#define _INCLUDE__RISCV__CPU__STRING_H_ - -namespace Genode { - - /** - * Copy memory block - * - * \param dst destination memory block - * \param src source memory block - * \param size number of bytes to copy - * - * \return number of bytes not copied - */ - inline size_t memcpy_cpu(void *, const void *, size_t size) { - return size; } -} - -#endif /* _INCLUDE__RISCV__CPU__STRING_H_ */ From a16eeeec5dc12951e382f7d977cbd8cc99352482 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 8 Dec 2022 11:49:35 +0100 Subject: [PATCH 0140/1921] nova: set initial TSC after all CPUs are ready Issue #4669 --- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index f74809600d..be5de26a8d 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -39b7b44c4390340ab7b743044ce3fa4301812fd6 +0f97cb27225e09d0a053aeafa84e3e77f78beb05 diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index 8b460f691a..814a78ea1d 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := 1e041c00030120392714ba74ef13b1225ccbc1a2 +REV(nova) := 1b400b4d48729c6119bf9f2cae7cf857cb3371b7 DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) From 916d45b450cb6f2d3e3c31a6177a78b90cf4863c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 6 Dec 2022 14:29:47 +0100 Subject: [PATCH 0141/1921] os: add top pkg recipe --- repos/os/recipes/pkg/top/README | 1 + repos/os/recipes/pkg/top/archives | 1 + repos/os/recipes/pkg/top/hash | 1 + repos/os/recipes/pkg/top/runtime | 11 +++++++++++ 4 files changed, 14 insertions(+) create mode 100644 repos/os/recipes/pkg/top/README create mode 100644 repos/os/recipes/pkg/top/archives create mode 100644 repos/os/recipes/pkg/top/hash create mode 100644 repos/os/recipes/pkg/top/runtime diff --git a/repos/os/recipes/pkg/top/README b/repos/os/recipes/pkg/top/README new file mode 100644 index 0000000000..867e15b9e6 --- /dev/null +++ b/repos/os/recipes/pkg/top/README @@ -0,0 +1 @@ +Utility for dumping component load to LOG diff --git a/repos/os/recipes/pkg/top/archives b/repos/os/recipes/pkg/top/archives new file mode 100644 index 0000000000..3af940f31b --- /dev/null +++ b/repos/os/recipes/pkg/top/archives @@ -0,0 +1 @@ +_/src/top diff --git a/repos/os/recipes/pkg/top/hash b/repos/os/recipes/pkg/top/hash new file mode 100644 index 0000000000..bd942e41a2 --- /dev/null +++ b/repos/os/recipes/pkg/top/hash @@ -0,0 +1 @@ +2022-12-06 dfe80d673e81dee9e9c51e2a3f28c848ff3dc0e8 diff --git a/repos/os/recipes/pkg/top/runtime b/repos/os/recipes/pkg/top/runtime new file mode 100644 index 0000000000..a04e95c3bb --- /dev/null +++ b/repos/os/recipes/pkg/top/runtime @@ -0,0 +1,11 @@ + + + + + + + + + + + From a96c7ebd8dfcaf4da87583115959302953179fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 1 Dec 2022 16:30:47 +0100 Subject: [PATCH 0142/1921] cpu_burner: only use timer when not 100 perecent --- repos/os/src/app/cpu_burner/main.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/repos/os/src/app/cpu_burner/main.cc b/repos/os/src/app/cpu_burner/main.cc index 86a64b934d..7232b65117 100644 --- a/repos/os/src/app/cpu_burner/main.cc +++ b/repos/os/src/app/cpu_burner/main.cc @@ -119,7 +119,8 @@ struct Cpu_burner _start_ms = _timer.elapsed_ms(); } - _timer.trigger_once(next_timer_ms*1000); + if (_percent < 100) + _timer.trigger_once(next_timer_ms*1000); } Signal_handler _period_handler { @@ -131,8 +132,6 @@ struct Cpu_burner _handle_config(); _timer.sigh(_period_handler); - _timer.trigger_once(1000*1000); - Affinity::Space space = env.cpu().affinity_space(); for (unsigned i = 0; i < space.total(); i++) { @@ -142,6 +141,11 @@ struct Cpu_burner _threads.insert(&t->_list_element); } + + if (_percent < 100) + _timer.trigger_once(1000*1000); + else + _handle_period(); } }; From 03165c96cc0a1a477acf0c6c5ac4a1f1a6f1051b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 22 Nov 2022 17:32:49 +0100 Subject: [PATCH 0143/1921] Add cpu_burner pkg recipe --- repos/os/recipes/pkg/cpu_burner/README | 3 +++ repos/os/recipes/pkg/cpu_burner/archives | 1 + repos/os/recipes/pkg/cpu_burner/hash | 1 + repos/os/recipes/pkg/cpu_burner/runtime | 14 ++++++++++++++ 4 files changed, 19 insertions(+) create mode 100644 repos/os/recipes/pkg/cpu_burner/README create mode 100644 repos/os/recipes/pkg/cpu_burner/archives create mode 100644 repos/os/recipes/pkg/cpu_burner/hash create mode 100644 repos/os/recipes/pkg/cpu_burner/runtime diff --git a/repos/os/recipes/pkg/cpu_burner/README b/repos/os/recipes/pkg/cpu_burner/README new file mode 100644 index 0000000000..7563fef70c --- /dev/null +++ b/repos/os/recipes/pkg/cpu_burner/README @@ -0,0 +1,3 @@ + + A dynamic CPU burner component. + diff --git a/repos/os/recipes/pkg/cpu_burner/archives b/repos/os/recipes/pkg/cpu_burner/archives new file mode 100644 index 0000000000..073c392d91 --- /dev/null +++ b/repos/os/recipes/pkg/cpu_burner/archives @@ -0,0 +1 @@ +_/src/cpu_burner diff --git a/repos/os/recipes/pkg/cpu_burner/hash b/repos/os/recipes/pkg/cpu_burner/hash new file mode 100644 index 0000000000..67a757b950 --- /dev/null +++ b/repos/os/recipes/pkg/cpu_burner/hash @@ -0,0 +1 @@ +2022-11-22-a cf3d0528b5688b0b9a48c2ef695c3aae3f7e62c5 diff --git a/repos/os/recipes/pkg/cpu_burner/runtime b/repos/os/recipes/pkg/cpu_burner/runtime new file mode 100644 index 0000000000..e1dd8818bc --- /dev/null +++ b/repos/os/recipes/pkg/cpu_burner/runtime @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + From 14d0b72f52e25afc89aba664e324388dfa6b133e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 15 Nov 2022 15:41:55 +0100 Subject: [PATCH 0144/1921] black_hole: add report session support --- repos/os/recipes/pkg/black_hole/runtime | 1 + repos/os/recipes/src/black_hole/used_apis | 1 + repos/os/src/server/black_hole/main.cc | 6 ++ repos/os/src/server/black_hole/report.h | 93 +++++++++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 repos/os/src/server/black_hole/report.h diff --git a/repos/os/recipes/pkg/black_hole/runtime b/repos/os/recipes/pkg/black_hole/runtime index f4eb3d6cda..dc95b68269 100644 --- a/repos/os/recipes/pkg/black_hole/runtime +++ b/repos/os/recipes/pkg/black_hole/runtime @@ -8,6 +8,7 @@ + diff --git a/repos/os/recipes/src/black_hole/used_apis b/repos/os/recipes/src/black_hole/used_apis index 7a3603f7a3..40f00bdfe6 100644 --- a/repos/os/recipes/src/black_hole/used_apis +++ b/repos/os/recipes/src/black_hole/used_apis @@ -4,6 +4,7 @@ audio_out_session capture_session event_session nic_session +report_session uplink_session gpu_session usb_session diff --git a/repos/os/src/server/black_hole/main.cc b/repos/os/src/server/black_hole/main.cc index 3a06ab2ffa..7ff01c8c8a 100644 --- a/repos/os/src/server/black_hole/main.cc +++ b/repos/os/src/server/black_hole/main.cc @@ -27,6 +27,7 @@ #include "event.h" #include "nic.h" #include "uplink.h" +#include "report.h" #include "rom.h" #include "gpu.h" #include "usb.h" @@ -50,6 +51,7 @@ struct Black_hole::Main Genode::Constructible event_root { }; Genode::Constructible nic_root { }; Genode::Constructible uplink_root { }; + Genode::Constructible report_root { }; Genode::Constructible rom_root { }; Genode::Constructible gpu_root { }; Genode::Constructible usb_root { }; @@ -86,6 +88,10 @@ struct Black_hole::Main rom_root.construct(env, heap); env.parent().announce(env.ep().manage(*rom_root)); } + if (_config_rom.xml().has_sub_node("report")) { + report_root.construct(env, heap); + env.parent().announce(env.ep().manage(*report_root)); + } if (_config_rom.xml().has_sub_node("gpu")) { gpu_root.construct(env, heap); env.parent().announce(env.ep().manage(*gpu_root)); diff --git a/repos/os/src/server/black_hole/report.h b/repos/os/src/server/black_hole/report.h new file mode 100644 index 0000000000..d9734aac1f --- /dev/null +++ b/repos/os/src/server/black_hole/report.h @@ -0,0 +1,93 @@ +/* + * \brief Report session component and root + * \author Josef Soentgen + * \date 2022-11-15 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _REPORT_H_ +#define _REPORT_H_ + +/* base includes */ +#include +#include +#include + +namespace Black_hole { + + using namespace Genode; + + class Report_session; + class Report_root; +} + + +class Black_hole::Report_session : public Session_object +{ + private: + + enum { RAM_DS_SIZE = 16 }; + + Env &_env; + Attached_ram_dataspace _ram_ds { _env.ram(), _env.rm(), RAM_DS_SIZE }; + + public: + + Report_session(Env &env, + Resources const &resources, + Label const &label, + Diag const &diag) + : + Session_object(env.ep(), resources, label, diag), + _env { env } + { + copy_cstring(_ram_ds.local_addr(), "", RAM_DS_SIZE); + } + + Dataspace_capability dataspace() override + { + return static_cap_cast(_ram_ds.cap()); + } + + void submit(size_t /* length */) override { } + + void response_sigh(Signal_context_capability /* sigh */) override { } + + size_t obtain_response() override { return RAM_DS_SIZE; } +}; + + +class Black_hole::Report_root : public Root_component +{ + private: + + Env &_env; + + protected: + + Report_session *_create_session(const char *args) override + { + return new (md_alloc()) + Report_session { + _env, session_resources_from_args(args), + session_label_from_args(args), + session_diag_from_args(args) }; + } + + public: + + Report_root(Env &env, + Allocator &alloc) + : + Root_component { &env.ep().rpc_ep(), &alloc }, + _env { env } + { } +}; + +#endif /* _REPORT_H_ */ From aed3b6c6be4f8119001ff34d6f2c1b0eeef61c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 22 Nov 2022 17:32:22 +0100 Subject: [PATCH 0145/1921] Add test-audio_out pkg recipe --- repos/os/recipes/pkg/test-audio_out/README | 1 + repos/os/recipes/pkg/test-audio_out/archives | 2 ++ repos/os/recipes/pkg/test-audio_out/hash | 1 + repos/os/recipes/pkg/test-audio_out/runtime | 16 ++++++++++++++++ repos/os/recipes/src/test-audio_out/content.mk | 2 ++ repos/os/recipes/src/test-audio_out/hash | 1 + repos/os/recipes/src/test-audio_out/used_apis | 3 +++ 7 files changed, 26 insertions(+) create mode 100644 repos/os/recipes/pkg/test-audio_out/README create mode 100644 repos/os/recipes/pkg/test-audio_out/archives create mode 100644 repos/os/recipes/pkg/test-audio_out/hash create mode 100644 repos/os/recipes/pkg/test-audio_out/runtime create mode 100644 repos/os/recipes/src/test-audio_out/content.mk create mode 100644 repos/os/recipes/src/test-audio_out/hash create mode 100644 repos/os/recipes/src/test-audio_out/used_apis diff --git a/repos/os/recipes/pkg/test-audio_out/README b/repos/os/recipes/pkg/test-audio_out/README new file mode 100644 index 0000000000..b6f5c18d1b --- /dev/null +++ b/repos/os/recipes/pkg/test-audio_out/README @@ -0,0 +1 @@ +Test for the Audio_out session diff --git a/repos/os/recipes/pkg/test-audio_out/archives b/repos/os/recipes/pkg/test-audio_out/archives new file mode 100644 index 0000000000..ba494d335b --- /dev/null +++ b/repos/os/recipes/pkg/test-audio_out/archives @@ -0,0 +1,2 @@ +_/src/test-audio_out +cnuke/raw/test-audio_out/2022-11-21 diff --git a/repos/os/recipes/pkg/test-audio_out/hash b/repos/os/recipes/pkg/test-audio_out/hash new file mode 100644 index 0000000000..f293ca426d --- /dev/null +++ b/repos/os/recipes/pkg/test-audio_out/hash @@ -0,0 +1 @@ +2022-11-22-c d3bc04cf7eb9af89a85330427c069faa55422d70 diff --git a/repos/os/recipes/pkg/test-audio_out/runtime b/repos/os/recipes/pkg/test-audio_out/runtime new file mode 100644 index 0000000000..4c57344397 --- /dev/null +++ b/repos/os/recipes/pkg/test-audio_out/runtime @@ -0,0 +1,16 @@ + + + + + + + + + sample.raw + + + + + + + diff --git a/repos/os/recipes/src/test-audio_out/content.mk b/repos/os/recipes/src/test-audio_out/content.mk new file mode 100644 index 0000000000..0f594b28b6 --- /dev/null +++ b/repos/os/recipes/src/test-audio_out/content.mk @@ -0,0 +1,2 @@ +SRC_DIR = src/test/audio_out +include $(GENODE_DIR)/repos/base/recipes/src/content.inc diff --git a/repos/os/recipes/src/test-audio_out/hash b/repos/os/recipes/src/test-audio_out/hash new file mode 100644 index 0000000000..c27451a4c8 --- /dev/null +++ b/repos/os/recipes/src/test-audio_out/hash @@ -0,0 +1 @@ +2022-11-22-c a739f62ca548c5a6092bc6b6b1309a210afebab0 diff --git a/repos/os/recipes/src/test-audio_out/used_apis b/repos/os/recipes/src/test-audio_out/used_apis new file mode 100644 index 0000000000..fab42edbcf --- /dev/null +++ b/repos/os/recipes/src/test-audio_out/used_apis @@ -0,0 +1,3 @@ +base +os +audio_out_session From 794b019a8a62f46dec119406be0425e7c1de369a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 6 Dec 2022 14:30:05 +0100 Subject: [PATCH 0146/1921] sculpt/launcher: add top launcher --- repos/gems/sculpt/launcher/top | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 repos/gems/sculpt/launcher/top diff --git a/repos/gems/sculpt/launcher/top b/repos/gems/sculpt/launcher/top new file mode 100644 index 0000000000..8bd0ab2601 --- /dev/null +++ b/repos/gems/sculpt/launcher/top @@ -0,0 +1,9 @@ + + + + + + + + + From 8384d7b5edee2d038ba4cd07e550e6318e261d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Fri, 9 Dec 2022 15:53:29 +0100 Subject: [PATCH 0147/1921] run/acpica: fix devices report route Issue #4679. --- repos/libports/run/acpica.run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/libports/run/acpica.run b/repos/libports/run/acpica.run index b48de3165d..8f21613f19 100644 --- a/repos/libports/run/acpica.run +++ b/repos/libports/run/acpica.run @@ -90,7 +90,7 @@ set config { - + From e5272b65a12864f301039f2ba3b78e7f475d6d68 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 12 Dec 2022 16:11:27 +0100 Subject: [PATCH 0148/1921] vfs: remove unused Fs_file_system::_read method --- repos/os/src/lib/vfs/fs_file_system.h | 54 --------------------------- 1 file changed, 54 deletions(-) diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index a6f053311e..d1cbbd8124 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -452,60 +452,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Fs_vfs_handle_queue _congested_handles { }; - file_size _read(Fs_vfs_handle &handle, void *buf, - file_size const count, file_size const seek_offset) - { - ::File_system::Session::Tx::Source &source = *_fs.tx(); - using ::File_system::Packet_descriptor; - - if (!source.ready_to_submit()) - throw ::File_system::Session::Tx::Source::Saturated_submit_queue(); - - file_size const max_packet_size = source.bulk_buffer_size() / 2; - file_size const clipped_count = min(max_packet_size, count); - - /* XXX check if alloc_packet() will succeed! */ - - Packet_descriptor const packet_in(source.alloc_packet((size_t)clipped_count), - handle.file_handle(), - Packet_descriptor::READ, - (size_t)clipped_count, - seek_offset); - - /* wait until packet was acknowledged */ - handle.queued_read_state = Handle_state::Queued_state::QUEUED; - - _submit_packet(packet_in); - - while (handle.queued_read_state != Handle_state::Queued_state::ACK) - _env.env().ep().wait_and_dispatch_one_io_signal(); - - /* obtain result packet descriptor with updated status info */ - Packet_descriptor const packet_out = handle.queued_read_packet; - - handle.queued_read_state = Handle_state::Queued_state::IDLE; - handle.queued_read_packet = Packet_descriptor(); - - if (!packet_out.succeeded()) { - /* could be EOF or a real error */ - try { - ::File_system::Status status = _fs.status(handle.file_handle()); - if (seek_offset < status.size) - Genode::warning("unexpected failure on file-system read"); - } - catch (::File_system::Invalid_handle) { } - catch (::File_system::Unavailable) { } - } - - file_size const read_num_bytes = min((file_size)packet_out.length(), count); - - memcpy(buf, source.packet_content(packet_out), (size_t)read_num_bytes); - - source.release_packet(packet_out); - - return read_num_bytes; - } - Write_result _write(Fs_vfs_handle &handle, file_size const seek_offset, const char *buf, file_size count, file_size &out_count) { From 41d0c89a52ea5631425d2ce46682aac93b51dde1 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 13 Dec 2022 11:31:33 +0100 Subject: [PATCH 0149/1921] libc: remove misleading SNDCTL_DSP_RESET error message Fixes #4676 --- repos/libports/src/lib/libc/vfs_plugin.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index a913089cdc..95d0601ad4 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -1941,11 +1941,8 @@ int Libc::Vfs_plugin::ioctl(File_descriptor *fd, unsigned long request, char *ar break; } - if (result.handled) { - if (result.error) - error("XXXXX error=", result.error, " request=", Hex(request), "/", (request==SNDCTL_DSP_RESET?"":"!"), "SNDCTL_DSP_RESET"); + if (result.handled) return result.error ? Errno(result.error) : 0; - } return _legacy_ioctl(fd, request, argp); } From 2c92fc4b6f31ee8c6277436cdd8e6666e7f1e397 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Thu, 17 Nov 2022 11:30:50 +0100 Subject: [PATCH 0150/1921] vbox6: add null pointer check for clipboard Check 'pv == nullptr' in 'ShClSvcImplWriteData' and return VERR_INVALID_POINTER if invalid (as is done, for example, in the X11 implementation). issue #4666 --- repos/ports/src/virtualbox6/services/sharedclipboard.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/ports/src/virtualbox6/services/sharedclipboard.cc b/repos/ports/src/virtualbox6/services/sharedclipboard.cc index 09b48bed50..0538960bb3 100644 --- a/repos/ports/src/virtualbox6/services/sharedclipboard.cc +++ b/repos/ports/src/virtualbox6/services/sharedclipboard.cc @@ -164,6 +164,9 @@ int ShClSvcImplWriteData(PSHCLCLIENT, PSHCLCLIENTCMDCTX, SHCLFORMAT fFormat, voi if (!(fFormat & VBOX_SHCL_FMT_UNICODETEXT)) return VERR_NOT_IMPLEMENTED; + if (pv == nullptr) + return VERR_INVALID_POINTER; + Clipboard::Guard guard; PCRTUTF16 const utf16_string = (PCRTUTF16)pv; From 16ce6b7acc5894074cc1d29b226da6a57a7395df Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Wed, 14 Dec 2022 09:15:55 +0100 Subject: [PATCH 0151/1921] mesa/lima: don't call 'close()' for non-libc fd Fixes #4702 --- repos/libports/ports/mesa.hash | 2 +- repos/libports/src/lib/mesa/patches/lima.patch | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/repos/libports/ports/mesa.hash b/repos/libports/ports/mesa.hash index 9b2d18690d..cd073a50d5 100644 --- a/repos/libports/ports/mesa.hash +++ b/repos/libports/ports/mesa.hash @@ -1 +1 @@ -5762ad18c4b5d48ad6b8651fc554e65d656e144f +a5a32fe6f44a46ff1eed62bf585a2b445b939e44 diff --git a/repos/libports/src/lib/mesa/patches/lima.patch b/repos/libports/src/lib/mesa/patches/lima.patch index a8cc8a9243..f3ac9b88c6 100644 --- a/repos/libports/src/lib/mesa/patches/lima.patch +++ b/repos/libports/src/lib/mesa/patches/lima.patch @@ -1,3 +1,20 @@ +--- a/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c +--- b/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c +@@ -90,8 +93,14 @@ lima_fence_get_fd(struct pipe_screen *pscreen, + static void + lima_fence_destroy(struct pipe_fence_handle *fence) + { ++#if 0 ++ /* ++ * On Genode the fd is not created by the libc ++ * (see ioctl_lima.cc). ++ */ + if (fence->fd >= 0) + close(fence->fd); ++#endif + FREE(fence); + } + --- a/src/lib/mesa/src/loader/loader.c --- b/src/lib/mesa/src/loader/loader.c @@ -473,6 +473,9 @@ From 68ba648897a4df063d482dd76ddda0b8c37ed1a1 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Wed, 14 Dec 2022 09:38:17 +0100 Subject: [PATCH 0152/1921] libdrm/lima: fix double file descriptor close Fixes #4703 --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index cd50e25ae3..9a68cb3b7d 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -610,7 +610,6 @@ class Lima::Call bool result = false; auto free_ctx = [&] (Gpu_context &ctx) { - ::close(ctx.fd); Genode::destroy(_heap, &ctx); result = true; }; From 7a7cac57d9f4b5523e40f46a28fa858eb08f4e2c Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Tue, 8 Nov 2022 13:58:26 +0100 Subject: [PATCH 0153/1921] nic_router: futile ip config updates on dhcp renew If the IP config does not change on updates to the router IP config of a domain change (a common case on DHCP RENEW), prevent detaching from the old config and attaching to the new one. Because this would not only create unnecessary CPU overhead but also force all clients at all interfaces that are listening to this config (via config attribute 'dns_config_from') to restart their networking (re-do DHCP). Ref #4696 --- repos/os/src/server/nic_router/domain.cc | 13 ++++++++++- repos/os/src/server/nic_router/ipv4_config.cc | 22 ++++++++++++++++++- repos/os/src/server/nic_router/ipv4_config.h | 7 ++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/repos/os/src/server/nic_router/domain.cc b/repos/os/src/server/nic_router/domain.cc index 25b5001c90..e6e966f167 100644 --- a/repos/os/src/server/nic_router/domain.cc +++ b/repos/os/src/server/nic_router/domain.cc @@ -118,8 +118,19 @@ void Domain::discard_ip_config() void Domain::ip_config_from_dhcp_ack(Dhcp_packet &dhcp_ack) { + /* + * If the IP config didn't change (a common case on DHCP RENEW), prevent + * detaching from the old config and attaching to the new one. Because this + * would not only create unnecessary CPU overhead but also force all + * clients at all interfaces that are listening to this config (via config + * attribute 'dns_config_from') to restart their networking (re-do DHCP). + */ + Ipv4_config const new_ip_config { dhcp_ack, _alloc, *this }; + if (*_ip_config == new_ip_config) { + return; + } _reconstruct_ip_config([&] (Reconstructible &ip_config) { - ip_config.construct(dhcp_ack, _alloc, *this); }); + ip_config.construct(new_ip_config); }); } diff --git a/repos/os/src/server/nic_router/ipv4_config.cc b/repos/os/src/server/nic_router/ipv4_config.cc index 8234e3ebff..00a131e807 100644 --- a/repos/os/src/server/nic_router/ipv4_config.cc +++ b/repos/os/src/server/nic_router/ipv4_config.cc @@ -49,7 +49,27 @@ Ipv4_config::Ipv4_config(Ipv4_config const &ip_config, { ip_config.for_each_dns_server([&] (Dns_server const &dns_server) { Dns_server::construct( - alloc, dns_server.ip(), + _alloc, dns_server.ip(), + [&] /* handle_success */ (Dns_server &server) + { + _dns_servers.insert_as_tail(server); + }, + [&] /* handle_failure */ () { } + ); + }); + _dns_domain_name.set_to(ip_config.dns_domain_name()); +} + + +Ipv4_config::Ipv4_config(Ipv4_config const &ip_config) +: + _alloc { ip_config._alloc }, + _interface { ip_config._interface }, + _gateway { ip_config._gateway } +{ + ip_config.for_each_dns_server([&] (Dns_server const &dns_server) { + Dns_server::construct( + _alloc, dns_server.ip(), [&] /* handle_success */ (Dns_server &server) { _dns_servers.insert_as_tail(server); diff --git a/repos/os/src/server/nic_router/ipv4_config.h b/repos/os/src/server/nic_router/ipv4_config.h index a505b11356..2c3ca3d34b 100644 --- a/repos/os/src/server/nic_router/ipv4_config.h +++ b/repos/os/src/server/nic_router/ipv4_config.h @@ -59,6 +59,8 @@ class Net::Ipv4_config Ipv4_config(Ipv4_config const &ip_config, Genode::Allocator &alloc); + Ipv4_config(Ipv4_config const &ip_config); + Ipv4_config(Genode::Allocator &alloc); ~Ipv4_config(); @@ -71,6 +73,11 @@ class Net::Ipv4_config !_dns_domain_name.equal_to(other._dns_domain_name); } + bool operator == (Ipv4_config const &other) const + { + return !(*this != other); + } + template void for_each_dns_server(FUNC && func) const { From 1b1a9ca95c6238d5e94b65eac66dd883f1280373 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Wed, 14 Dec 2022 10:02:42 +0100 Subject: [PATCH 0154/1921] nic_router: fix bad connection states on IP change When a domain receives a new dynamic router IP address and that domain has active connection states (TCP/UDP/ICMP) from another domain with NAT applied, the connection states used to stay active while becoming obsolete. They become obsolete because their identification and their packet processor use the old routers IP address due to NAT. One consequence was that connections became dysfunctional when the server domain received a new dynamic router IP address. Request packets were still routed from client to server, but when entering the server, their source IP address was the outdated router address. Consequently, the server responses used the outdated address as destination and the router dropped the responses because it did not know this address anymore. This commit fixes the problem by letting a domain destroy all its connection states that were initiated from within other domains whenever it detaches from its current IP configuration. Strictly speaking, it is not necessary to destroy all connection states, only those that the domain applies NAT to. However, the Genode AVL tree is not built for removing a selection of nodes and trying to do it anyways is complicated. So, for now, we simply destroy all connection states. Note that the other way around was handled correctly already. When a domain detaches from its IP config, all interfaces of that domain destroy all the connection states they created (towards other domains). Fixes #4696 --- repos/os/src/server/nic_router/domain.cc | 20 ++++++++++++++++++++ repos/os/src/server/nic_router/interface.cc | 6 +++--- repos/os/src/server/nic_router/interface.h | 4 ++-- repos/os/src/server/nic_router/link.h | 9 +++++---- 4 files changed, 30 insertions(+), 9 deletions(-) diff --git a/repos/os/src/server/nic_router/domain.cc b/repos/os/src/server/nic_router/domain.cc index e6e966f167..491c8a1a6c 100644 --- a/repos/os/src/server/nic_router/domain.cc +++ b/repos/os/src/server/nic_router/domain.cc @@ -82,6 +82,26 @@ void Domain::_prepare_reconstructing_ip_config() Arp_waiter &waiter = *_foreign_arp_waiters.first()->object(); waiter.src().cancel_arp_waiting(waiter); } + /* + * Destroy all link states + * + * Strictly speaking, it is not necessary to destroy all link states, + * only those that this domain applies NAT to. However, the Genode AVL + * tree is not built for removing a selection of nodes and trying to do + * it anyways is complicated. So, for now, we simply destroy all links. + */ + while (Link_side *link_side = _icmp_links.first()) { + Link &link { link_side->link() }; + link.client_interface().destroy_link(link); + } + while (Link_side *link_side = _tcp_links.first()) { + Link &link { link_side->link() }; + link.client_interface().destroy_link(link); + } + while (Link_side *link_side = _udp_links.first()) { + Link &link { link_side->link() }; + link.client_interface().destroy_link(link); + } } } diff --git a/repos/os/src/server/nic_router/interface.cc b/repos/os/src/server/nic_router/interface.cc index 3ba439ee81..e4d3f668b7 100644 --- a/repos/os/src/server/nic_router/interface.cc +++ b/repos/os/src/server/nic_router/interface.cc @@ -283,7 +283,7 @@ void Interface_object_stats::report(Genode::Xml_generator &xml) ** Interface ** ***************/ -void Interface::_destroy_link(Link &link) +void Interface::destroy_link(Link &link) { L3_protocol const prot = link.protocol(); switch (prot) { @@ -2050,7 +2050,7 @@ void Interface::_update_udp_tcp_links(L3_protocol prot, ); } catch (Dismiss_link) { } - _destroy_link(link); + destroy_link(link); }); } @@ -2078,7 +2078,7 @@ void Interface::_update_icmp_links(Domain &cln_dom) } } catch (Dismiss_link) { } - _destroy_link(link); + destroy_link(link); }); } diff --git a/repos/os/src/server/nic_router/interface.h b/repos/os/src/server/nic_router/interface.h index d55f9af618..00c22c36fb 100644 --- a/repos/os/src/server/nic_router/interface.h +++ b/repos/os/src/server/nic_router/interface.h @@ -339,8 +339,6 @@ class Net::Interface : private Interface_list::Element void _dismiss_link_log(Link &link, char const *reason); - void _destroy_link(Link &link); - void _update_domain_object(Domain &new_domain); void _detach_from_domain_raw(); @@ -461,6 +459,8 @@ class Net::Interface : private Interface_list::Element void handle_domain_ready_state(bool state); + void destroy_link(Link &link); + /*************** ** Accessors ** diff --git a/repos/os/src/server/nic_router/link.h b/repos/os/src/server/nic_router/link.h index ba5f9cb944..722fcf93d2 100644 --- a/repos/os/src/server/nic_router/link.h +++ b/repos/os/src/server/nic_router/link.h @@ -236,10 +236,11 @@ class Net::Link : public Link_list::Element ** Accessors ** ***************/ - Link_side &client() { return _client; } - Link_side &server() { return _server; } - Configuration &config() { return _config(); } - L3_protocol protocol() const { return _protocol; } + Link_side &client() { return _client; } + Link_side &server() { return _server; } + Configuration &config() { return _config(); } + L3_protocol protocol() const { return _protocol; } + Interface &client_interface() { return _client_interface; }; }; From ca0d3757cc47b280b8fe8354e6819d9726eecfb9 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 7 Dec 2022 17:12:21 +0100 Subject: [PATCH 0155/1921] vfs: make 'File_io_service::read_ready' const ... and replace pointer argument to const reference. Issue #4706 --- repos/dde_linux/src/lib/vfs/lxip/vfs.cc | 15 ++++++------ repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc | 3 +-- repos/gems/src/lib/vfs/audit/vfs_audit.cc | 13 ++++++---- repos/gems/src/lib/vfs/cbe/vfs.cc | 24 +++++++------------ repos/gems/src/lib/vfs/cbe_crypto/vfs.cc | 15 +++++------- .../gems/src/lib/vfs/cbe_trust_anchor/vfs.cc | 15 ++++-------- repos/gems/src/lib/vfs/gpu/vfs.cc | 3 +-- repos/gems/src/lib/vfs/import/plugin.cc | 2 +- repos/gems/src/lib/vfs/pipe/plugin.cc | 20 +++++++++------- repos/gems/src/lib/vfs/trace/vfs.cc | 3 +-- .../gems/src/lib/vfs/ttf/glyphs_file_system.h | 3 +-- repos/libports/src/lib/libc/vfs_plugin.cc | 4 ++-- repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc | 2 +- .../lib/vfs/jitterentropy/vfs_jitterentropy.h | 3 +-- .../libports/src/lib/vfs/libusb/vfs_libusb.cc | 5 ++-- repos/libports/src/lib/vfs/lwip/vfs.cc | 18 +++++++------- repos/libports/src/lib/vfs/oss/vfs_oss.cc | 4 ++-- repos/os/include/vfs/dir_file_system.h | 6 ++--- repos/os/include/vfs/file_io_service.h | 2 +- .../include/vfs/readonly_value_file_system.h | 3 +-- repos/os/include/vfs/single_file_system.h | 16 +++++-------- repos/os/include/vfs/value_file_system.h | 3 +-- repos/os/src/lib/vfs/block_file_system.h | 3 +-- repos/os/src/lib/vfs/capture/plugin.cc | 3 +-- repos/os/src/lib/vfs/fs_file_system.h | 6 ++--- repos/os/src/lib/vfs/inline_file_system.h | 3 +-- repos/os/src/lib/vfs/log_file_system.h | 3 +-- repos/os/src/lib/vfs/null_file_system.h | 3 +-- repos/os/src/lib/vfs/ram_file_system.h | 3 +-- repos/os/src/lib/vfs/rom_file_system.h | 3 +-- repos/os/src/lib/vfs/rtc_file_system.h | 3 +-- repos/os/src/lib/vfs/symlink_file_system.h | 3 +-- repos/os/src/lib/vfs/tap/nic_file_system.h | 9 +++++-- repos/os/src/lib/vfs/tap/uplink_file_system.h | 9 +++++-- repos/os/src/lib/vfs/tar_file_system.h | 3 +-- repos/os/src/lib/vfs/terminal_file_system.h | 2 +- repos/os/src/lib/vfs/zero_file_system.h | 3 +-- repos/os/src/server/vfs/node.h | 2 +- 38 files changed, 113 insertions(+), 130 deletions(-) diff --git a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc index fa11b12d96..24a66f095e 100644 --- a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc +++ b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc @@ -267,7 +267,7 @@ struct Vfs::Lxip_vfs_handle : Vfs::Vfs_handle /** * Check if the file attached to this handle is ready to read */ - virtual bool read_ready() = 0; + virtual bool read_ready() const = 0; virtual Read_result read(char *dst, file_size count, file_size &out_count) = 0; @@ -312,7 +312,7 @@ struct Vfs::Lxip_vfs_file_handle final : Vfs::Lxip_vfs_handle file->handles.remove(&file_le); } - bool read_ready() override { + bool read_ready() const override { return (file) ? file->poll() : false; } Read_result read(char *dst, file_size count, file_size &out_count) override @@ -364,7 +364,7 @@ struct Vfs::Lxip_vfs_dir_handle final : Vfs::Lxip_vfs_handle : Vfs::Lxip_vfs_handle(fs, alloc, status_flags), dir(dir) { } - bool read_ready() override { return true; } + bool read_ready() const override { return true; } Read_result read(char *dst, file_size count, file_size &out_count) override { @@ -1202,7 +1202,7 @@ struct Vfs::Lxip_socket_handle final : Vfs::Lxip_vfs_handle socket_dir(alloc, parent, sock) { } - bool read_ready() override { return true; } + bool read_ready() const override { return true; } Read_result read(char *dst, file_size count, file_size &out_count) override { @@ -1994,10 +1994,11 @@ class Vfs::Lxip_file_system : public Vfs::File_system, return false; } - bool read_ready(Vfs_handle *vfs_handle) override + bool read_ready(Vfs_handle const &vfs_handle) const override { - Lxip_vfs_handle &handle = - *static_cast(vfs_handle); + Lxip_vfs_handle const &handle = + static_cast(vfs_handle); + return handle.read_ready(); } diff --git a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc index b168fb2d1c..82b5e0c8df 100644 --- a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc +++ b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc @@ -807,8 +807,7 @@ class Vfs::Rump_file_system : public File_system return READ_ERR_INVALID; } - bool read_ready(Vfs_handle *) override { return true; } - + bool read_ready (Vfs_handle const &) const override { return true; } bool write_ready(Vfs_handle const &) const override { return true; } Ftruncate_result ftruncate(Vfs_handle *vfs_handle, file_size len) override diff --git a/repos/gems/src/lib/vfs/audit/vfs_audit.cc b/repos/gems/src/lib/vfs/audit/vfs_audit.cc index c58cffd7d3..12c23c6d03 100644 --- a/repos/gems/src/lib/vfs/audit/vfs_audit.cc +++ b/repos/gems/src/lib/vfs/audit/vfs_audit.cc @@ -268,16 +268,21 @@ class Vfs_audit::File_system : public Vfs::File_system return result; } - bool read_ready(Vfs_handle *vfs_handle) override + bool read_ready(Vfs_handle const &vfs_handle) const override { - Handle &h = *static_cast(vfs_handle); - h.sync_state(); - return h.audit->fs().read_ready(h.audit); + Handle const &h = static_cast(vfs_handle); + + const_cast(h).sync_state(); + + return h.audit->fs().read_ready(*h.audit); } bool write_ready(Vfs_handle const &vfs_handle) const override { Handle const &h = static_cast(vfs_handle); + + const_cast(h).sync_state(); + return h.audit->fs().write_ready(*h.audit); } diff --git a/repos/gems/src/lib/vfs/cbe/vfs.cc b/repos/gems/src/lib/vfs/cbe/vfs.cc index f657ea7ca8..2eff57abd0 100644 --- a/repos/gems/src/lib/vfs/cbe/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe/vfs.cc @@ -2020,8 +2020,7 @@ class Vfs_cbe::Data_file_system : public Single_file_system return SYNC_ERR_INVALID; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -2191,8 +2190,7 @@ class Vfs_cbe::Extend_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -2376,8 +2374,7 @@ class Vfs_cbe::Rekey_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -2561,8 +2558,7 @@ class Vfs_cbe::Deinitialize_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -2699,8 +2695,7 @@ class Vfs_cbe::Create_snapshot_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -2799,8 +2794,7 @@ class Vfs_cbe::Discard_snapshot_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -3065,7 +3059,7 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system return SYNC_OK; } - virtual bool read_ready() = 0; + virtual bool read_ready() const = 0; }; @@ -3159,7 +3153,7 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system return WRITE_ERR_INVALID; } - bool read_ready() override { return true; } + bool read_ready() const override { return true; } }; struct Dir_snap_vfs_handle : Vfs::Vfs_handle @@ -3457,7 +3451,7 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system return READ_ERR_IO; } - bool read_ready(Vfs::Vfs_handle *) override + bool read_ready(Vfs::Vfs_handle const &) const override { return true; } diff --git a/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc b/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc index cc309ebca0..832f266233 100644 --- a/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc @@ -123,8 +123,7 @@ class Vfs_cbe_crypto::Encrypt_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -257,8 +256,7 @@ class Vfs_cbe_crypto::Decrypt_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -512,7 +510,7 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system return SYNC_OK; } - virtual bool read_ready() = 0; + virtual bool read_ready() const = 0; }; @@ -606,7 +604,7 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system return WRITE_ERR_INVALID; } - bool read_ready() override { return true; } + bool read_ready() const override { return true; } }; @@ -892,7 +890,7 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system return READ_ERR_IO; } - bool read_ready(Vfs::Vfs_handle *) override + bool read_ready(Vfs::Vfs_handle const &) const override { return true; } @@ -1006,8 +1004,7 @@ class Vfs_cbe_crypto::Management_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; diff --git a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc index ec92a4356c..fb7f163787 100644 --- a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc @@ -1369,8 +1369,7 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -1477,8 +1476,7 @@ class Vfs_cbe_trust_anchor::Generate_key_file_system : public Vfs::Single_file_s return WRITE_ERR_IO; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; @@ -1607,8 +1605,7 @@ class Vfs_cbe_trust_anchor::Encrypt_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -1736,8 +1733,7 @@ class Vfs_cbe_trust_anchor::Decrypt_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -1858,8 +1854,7 @@ class Vfs_cbe_trust_anchor::Initialize_file_system : public Vfs::Single_file_sys return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; diff --git a/repos/gems/src/lib/vfs/gpu/vfs.cc b/repos/gems/src/lib/vfs/gpu/vfs.cc index 2d89c17c46..73a561bd1d 100644 --- a/repos/gems/src/lib/vfs/gpu/vfs.cc +++ b/repos/gems/src/lib/vfs/gpu/vfs.cc @@ -79,8 +79,7 @@ struct Vfs_gpu::File_system : Single_file_system return WRITE_ERR_IO; } - bool read_ready() override { return _complete; } - + bool read_ready() const override { return _complete; } bool write_ready() const override { return true; } Id_space::Id id() const { return _elem.id(); } diff --git a/repos/gems/src/lib/vfs/import/plugin.cc b/repos/gems/src/lib/vfs/import/plugin.cc index 0bb90e0c18..603d320471 100644 --- a/repos/gems/src/lib/vfs/import/plugin.cc +++ b/repos/gems/src/lib/vfs/import/plugin.cc @@ -284,7 +284,7 @@ class Vfs_import::File_system : public Vfs::File_system file_size&) override { return READ_ERR_INVALID; } - bool read_ready(Vfs_handle*) override { + bool read_ready(Vfs_handle const &) const override { return true; } bool write_ready(Vfs_handle const &) const override { diff --git a/repos/gems/src/lib/vfs/pipe/plugin.cc b/repos/gems/src/lib/vfs/pipe/plugin.cc index 2382e85795..86ce8c2cb0 100644 --- a/repos/gems/src/lib/vfs/pipe/plugin.cc +++ b/repos/gems/src/lib/vfs/pipe/plugin.cc @@ -76,7 +76,7 @@ struct Vfs_pipe::Pipe_handle : Vfs::Vfs_handle, private Pipe_handle_registry_ele file_size count, file_size &out_count); - bool read_ready(); + bool read_ready() const; bool write_ready() const; bool notify_read_ready(); }; @@ -275,14 +275,16 @@ Vfs_pipe::Pipe_handle::write(const char *buf, Vfs_pipe::Read_result -Vfs_pipe::Pipe_handle::read(char *buf, - file_size count, - file_size &out_count) { - return Pipe_handle::pipe.read(*this, buf, count, out_count); } +Vfs_pipe::Pipe_handle::read(char *buf, file_size count, file_size &out_count) +{ + return Pipe_handle::pipe.read(*this, buf, count, out_count); +} -bool Vfs_pipe::Pipe_handle::read_ready() { - return !writer && !pipe.buffer.empty(); } +bool Vfs_pipe::Pipe_handle::read_ready() const +{ + return !writer && !pipe.buffer.empty(); +} bool Vfs_pipe::Pipe_handle::write_ready() const @@ -599,9 +601,9 @@ class Vfs_pipe::File_system : public Vfs::File_system return READ_ERR_INVALID; } - bool read_ready(Vfs_handle *vfs_handle) override + bool read_ready(Vfs_handle const &vfs_handle) const override { - if (Pipe_handle *handle = dynamic_cast(vfs_handle)) + if (Pipe_handle const *handle = dynamic_cast(&vfs_handle)) return handle->read_ready(); return true; } diff --git a/repos/gems/src/lib/vfs/trace/vfs.cc b/repos/gems/src/lib/vfs/trace/vfs.cc index b1c53f2ba4..2fa3f88bbb 100644 --- a/repos/gems/src/lib/vfs/trace/vfs.cc +++ b/repos/gems/src/lib/vfs/trace/vfs.cc @@ -147,8 +147,7 @@ class Vfs_trace::Trace_buffer_file_system : public Single_file_system return WRITE_ERR_INVALID; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; diff --git a/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h b/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h index 6dcd327e8a..4ae51b2b32 100644 --- a/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h +++ b/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h @@ -106,8 +106,7 @@ class Vfs::Glyphs_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index 95d0601ad4..56762754ec 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -219,7 +219,7 @@ namespace Libc { handle->fs().notify_read_ready(handle); - return handle->fs().read_ready(handle); + return handle->fs().read_ready(*handle); } bool write_ready_from_kernel(File_descriptor *fd) @@ -2721,7 +2721,7 @@ int Libc::Vfs_plugin::select(int nfds, if (!handle) continue; if (fd_in_readfds) { - if (handle->fs().read_ready(handle)) { + if (handle->fs().read_ready(*handle)) { FD_SET(fd, readfds); ++nready; } else { diff --git a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc index 986cc19e60..a700a529f7 100644 --- a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc +++ b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc @@ -777,7 +777,7 @@ class Fatfs::File_system : public Vfs::File_system FTRUNCATE_OK : FTRUNCATE_ERR_NO_PERM; } - bool read_ready(Vfs_handle *) override { return true; } + bool read_ready(Vfs_handle const &) const override { return true; } bool write_ready(Vfs_handle const &) const override { diff --git a/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h b/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h index 54d5ffaa21..69159eef32 100644 --- a/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h +++ b/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h @@ -94,8 +94,7 @@ class Jitterentropy_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; diff --git a/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc b/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc index a3c5cf4dc8..822390ef19 100644 --- a/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc +++ b/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc @@ -77,9 +77,10 @@ class Libusb_file_system : public Vfs::Single_file_system libusb_genode_usb_connection(&_usb_connection); } - bool read_ready() override + bool read_ready() const override { - return _usb_connection.source()->ack_avail(); + auto &nonconst_this = const_cast(*this); + return nonconst_this._usb_connection.source()->ack_avail(); } Read_result read(char *dst, Vfs::file_size count, diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index 55f939c5ff..b8da2e6e27 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -426,8 +426,7 @@ struct Lwip::Socket_dir : Lwip::Directory char const *src, file_size count, file_size &out_count) = 0; - virtual bool read_ready(Lwip_file_handle&) = 0; - + virtual bool read_ready (Lwip_file_handle const &) const = 0; virtual bool write_ready(Lwip_file_handle const &) const = 0; /** @@ -891,7 +890,7 @@ class Lwip::Udp_socket_dir final : ** Socket_dir interface ** **************************/ - bool read_ready(Lwip_file_handle &handle) override + bool read_ready(Lwip_file_handle const &handle) const override { switch (handle.kind) { case Lwip_file_handle::DATA: @@ -1254,7 +1253,7 @@ class Lwip::Tcp_socket_dir final : ** Socket_dir interface ** **************************/ - bool read_ready(Lwip_file_handle &handle) override + bool read_ready(Lwip_file_handle const &handle) const override { switch (handle.kind) { case Lwip_file_handle::DATA: @@ -2111,12 +2110,13 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, return false; } - bool read_ready(Vfs_handle *vfs_handle) override + bool read_ready(Vfs_handle const &vfs_handle) const override { - if (Lwip_file_handle *handle = dynamic_cast(vfs_handle)) { - if (handle->socket) - return handle->socket->read_ready(*handle); - } + Lwip_file_handle const * const handle_ptr = + dynamic_cast(&vfs_handle); + + if (handle_ptr && handle_ptr->socket) + return handle_ptr->socket->read_ready(*handle_ptr); /* * in this case the polled file is a 'new_socket' diff --git a/repos/libports/src/lib/vfs/oss/vfs_oss.cc b/repos/libports/src/lib/vfs/oss/vfs_oss.cc index 00a5edae66..d4059ca371 100644 --- a/repos/libports/src/lib/vfs/oss/vfs_oss.cc +++ b/repos/libports/src/lib/vfs/oss/vfs_oss.cc @@ -285,7 +285,7 @@ struct Vfs::Oss_file_system::Audio _in->overrun_sigh(sigh); } - bool read_ready() + bool read_ready() const { return _info.ifrag_bytes > 0; } @@ -681,7 +681,7 @@ class Vfs::Oss_file_system::Data_file_system : public Single_file_system return result; } - bool read_ready() override + bool read_ready() const override { return _audio.read_ready(); } diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h index b8bb62a28b..eb203e8686 100644 --- a/repos/os/include/vfs/dir_file_system.h +++ b/repos/os/include/vfs/dir_file_system.h @@ -965,12 +965,12 @@ class Vfs::Dir_file_system : public File_system return FTRUNCATE_ERR_NO_PERM; } - bool read_ready(Vfs_handle *handle) override + bool read_ready(Vfs_handle const &handle) const override { - if (&handle->fs() == this) + if (&handle.fs() == this) return true; - return handle->fs().read_ready(handle); + return handle.fs().read_ready(handle); } bool write_ready(Vfs_handle const &handle) const override diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index 491e00dd7e..eaf8d3e22d 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -67,7 +67,7 @@ struct Vfs::File_io_service : Interface /** * Return true if the handle has readable data */ - virtual bool read_ready(Vfs_handle *) = 0; + virtual bool read_ready(Vfs_handle const &) const = 0; /** * Return true if the handle might accept a write operation diff --git a/repos/os/include/vfs/readonly_value_file_system.h b/repos/os/include/vfs/readonly_value_file_system.h index a1ea01c9a8..9aebe0df5f 100644 --- a/repos/os/include/vfs/readonly_value_file_system.h +++ b/repos/os/include/vfs/readonly_value_file_system.h @@ -72,8 +72,7 @@ class Vfs::Readonly_value_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; diff --git a/repos/os/include/vfs/single_file_system.h b/repos/os/include/vfs/single_file_system.h index f84ead2d9a..868edc5e54 100644 --- a/repos/os/include/vfs/single_file_system.h +++ b/repos/os/include/vfs/single_file_system.h @@ -48,7 +48,7 @@ class Vfs::Single_file_system : public File_system return SYNC_OK; } - virtual bool read_ready() = 0; + virtual bool read_ready() const = 0; virtual bool write_ready() const = 0; @@ -132,8 +132,7 @@ class Vfs::Single_file_system : public File_system return WRITE_ERR_INVALID; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; @@ -281,15 +280,12 @@ class Vfs::Single_file_system : public File_system return WRITE_ERR_INVALID; } - bool read_ready(Vfs_handle *vfs_handle) override + bool read_ready(Vfs_handle const &vfs_handle) const override { - Single_vfs_handle *handle = - static_cast(vfs_handle); + Single_vfs_handle const &handle = + static_cast(vfs_handle); - if (handle) - return handle->read_ready(); - - return false; + return handle.read_ready(); } bool write_ready(Vfs_handle const &vfs_handle) const override diff --git a/repos/os/include/vfs/value_file_system.h b/repos/os/include/vfs/value_file_system.h index 24875ea792..9805147c8f 100644 --- a/repos/os/include/vfs/value_file_system.h +++ b/repos/os/include/vfs/value_file_system.h @@ -84,8 +84,7 @@ class Vfs::Value_file_system : public Vfs::Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } private: diff --git a/repos/os/src/lib/vfs/block_file_system.h b/repos/os/src/lib/vfs/block_file_system.h index 28ba455ed2..ef4f1df033 100644 --- a/repos/os/src/lib/vfs/block_file_system.h +++ b/repos/os/src/lib/vfs/block_file_system.h @@ -337,8 +337,7 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system return SYNC_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; diff --git a/repos/os/src/lib/vfs/capture/plugin.cc b/repos/os/src/lib/vfs/capture/plugin.cc index 1faa92e4bb..ac802c4e86 100644 --- a/repos/os/src/lib/vfs/capture/plugin.cc +++ b/repos/os/src/lib/vfs/capture/plugin.cc @@ -67,8 +67,7 @@ class Vfs_capture::Data_file_system : public Single_file_system _capture(capture), _capture_ds(capture_ds) { } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } Read_result read(char *dst, file_size count, diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index d1cbbd8124..b5715da148 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -953,11 +953,11 @@ class Vfs::Fs_file_system : public File_system, private Remote_io return result; } - bool read_ready(Vfs_handle *vfs_handle) override + bool read_ready(Vfs_handle const &vfs_handle) const override { - Fs_vfs_handle *handle = static_cast(vfs_handle); + Fs_vfs_handle const &handle = static_cast(vfs_handle); - return handle->read_ready_state == Handle_state::Read_ready_state::READY; + return handle.read_ready_state == Handle_state::Read_ready_state::READY; } bool write_ready(Vfs_handle const &) const override diff --git a/repos/os/src/lib/vfs/inline_file_system.h b/repos/os/src/lib/vfs/inline_file_system.h index d60edd1e35..37a6f96ff8 100644 --- a/repos/os/src/lib/vfs/inline_file_system.h +++ b/repos/os/src/lib/vfs/inline_file_system.h @@ -89,8 +89,7 @@ class Vfs::Inline_file_system : public Single_file_system return WRITE_ERR_INVALID; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; diff --git a/repos/os/src/lib/vfs/log_file_system.h b/repos/os/src/lib/vfs/log_file_system.h index ffa0aec7f6..5d494bb497 100644 --- a/repos/os/src/lib/vfs/log_file_system.h +++ b/repos/os/src/lib/vfs/log_file_system.h @@ -126,8 +126,7 @@ class Vfs::Log_file_system : public Single_file_system return WRITE_OK; } - bool read_ready() override { return false; } - + bool read_ready() const override { return false; } bool write_ready() const override { return true; } Sync_result sync() override diff --git a/repos/os/src/lib/vfs/null_file_system.h b/repos/os/src/lib/vfs/null_file_system.h index 89733a6722..655b68148e 100644 --- a/repos/os/src/lib/vfs/null_file_system.h +++ b/repos/os/src/lib/vfs/null_file_system.h @@ -53,8 +53,7 @@ struct Vfs::Null_file_system : Single_file_system return WRITE_OK; } - bool read_ready() override { return false; } - + bool read_ready() const override { return false; } bool write_ready() const override { return true; } }; diff --git a/repos/os/src/lib/vfs/ram_file_system.h b/repos/os/src/lib/vfs/ram_file_system.h index b345977b2a..9354331fd1 100644 --- a/repos/os/src/lib/vfs/ram_file_system.h +++ b/repos/os/src/lib/vfs/ram_file_system.h @@ -966,8 +966,7 @@ class Vfs::Ram_file_system : public Vfs::File_system return handle->node.complete_read(dst, count, handle->seek(), out_count); } - bool read_ready(Vfs_handle *) override { return true; } - + bool read_ready (Vfs_handle const &) const override { return true; } bool write_ready(Vfs_handle const &) const override { return true; } Ftruncate_result ftruncate(Vfs_handle * const vfs_handle, file_size len) override diff --git a/repos/os/src/lib/vfs/rom_file_system.h b/repos/os/src/lib/vfs/rom_file_system.h index 9c5f28f937..b3e720c351 100644 --- a/repos/os/src/lib/vfs/rom_file_system.h +++ b/repos/os/src/lib/vfs/rom_file_system.h @@ -112,8 +112,7 @@ class Vfs::Rom_file_system : public Single_file_system return WRITE_ERR_INVALID; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; diff --git a/repos/os/src/lib/vfs/rtc_file_system.h b/repos/os/src/lib/vfs/rtc_file_system.h index 8de6ff66c2..f1aad5e915 100644 --- a/repos/os/src/lib/vfs/rtc_file_system.h +++ b/repos/os/src/lib/vfs/rtc_file_system.h @@ -81,8 +81,7 @@ class Vfs::Rtc_file_system : public Single_file_system return WRITE_ERR_IO; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; diff --git a/repos/os/src/lib/vfs/symlink_file_system.h b/repos/os/src/lib/vfs/symlink_file_system.h index c42341344e..d6c0b8244e 100644 --- a/repos/os/src/lib/vfs/symlink_file_system.h +++ b/repos/os/src/lib/vfs/symlink_file_system.h @@ -53,8 +53,7 @@ class Vfs::Symlink_file_system : public Single_file_system file_size&) override { return WRITE_ERR_INVALID; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return false; } }; diff --git a/repos/os/src/lib/vfs/tap/nic_file_system.h b/repos/os/src/lib/vfs/tap/nic_file_system.h index aeea5f262e..3da29955ca 100644 --- a/repos/os/src/lib/vfs/tap/nic_file_system.h +++ b/repos/os/src/lib/vfs/tap/nic_file_system.h @@ -131,8 +131,13 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle * Vfs_handle interface * ************************/ - bool read_ready() override { - return _link_state && _nic.rx()->packet_avail() && _nic.rx()->ready_to_ack(); } + bool read_ready() const override + { + auto &nonconst_this = const_cast(*this); + auto &rx = *nonconst_this._nic.rx(); + + return _link_state && rx.packet_avail() && rx.ready_to_ack(); + } bool write_ready() const override { diff --git a/repos/os/src/lib/vfs/tap/uplink_file_system.h b/repos/os/src/lib/vfs/tap/uplink_file_system.h index 967a3ee01f..e921b8ff8a 100644 --- a/repos/os/src/lib/vfs/tap/uplink_file_system.h +++ b/repos/os/src/lib/vfs/tap/uplink_file_system.h @@ -121,8 +121,13 @@ class Vfs::Uplink_file_system::Uplink_vfs_handle : public Single_vfs_handle, * Vfs_handle interface * ************************/ - bool read_ready() override { - return _drv_link_state && _conn->rx()->packet_avail() && _conn->rx()->ready_to_ack(); } + bool read_ready() const override + { + auto &nonconst_this = const_cast(*this); + auto &rx = *nonconst_this._conn->rx(); + + return _drv_link_state && rx.packet_avail() && rx.ready_to_ack(); + } bool write_ready() const override { diff --git a/repos/os/src/lib/vfs/tar_file_system.h b/repos/os/src/lib/vfs/tar_file_system.h index ea6c64dcd3..054e2c8d55 100644 --- a/repos/os/src/lib/vfs/tar_file_system.h +++ b/repos/os/src/lib/vfs/tar_file_system.h @@ -775,8 +775,7 @@ class Vfs::Tar_file_system : public File_system return FTRUNCATE_ERR_NO_PERM; } - bool read_ready(Vfs_handle *) override { return true; } - + bool read_ready (Vfs_handle const &) const override { return true; } bool write_ready(Vfs_handle const &) const override { return false; } }; diff --git a/repos/os/src/lib/vfs/terminal_file_system.h b/repos/os/src/lib/vfs/terminal_file_system.h index 207c8e3893..bd08b2b72f 100644 --- a/repos/os/src/lib/vfs/terminal_file_system.h +++ b/repos/os/src/lib/vfs/terminal_file_system.h @@ -134,7 +134,7 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system _raw(raw) { } - bool read_ready() override { + bool read_ready() const override { return !_read_buffer.empty(); } bool write_ready() const override { return true; } diff --git a/repos/os/src/lib/vfs/zero_file_system.h b/repos/os/src/lib/vfs/zero_file_system.h index da85585320..78bc9de746 100644 --- a/repos/os/src/lib/vfs/zero_file_system.h +++ b/repos/os/src/lib/vfs/zero_file_system.h @@ -81,8 +81,7 @@ struct Vfs::Zero_file_system : Single_file_system return WRITE_OK; } - bool read_ready() override { return true; } - + bool read_ready() const override { return true; } bool write_ready() const override { return true; } }; diff --git a/repos/os/src/server/vfs/node.h b/repos/os/src/server/vfs/node.h index 62fb2be59f..5ccd38c5f9 100644 --- a/repos/os/src/server/vfs/node.h +++ b/repos/os/src/server/vfs/node.h @@ -351,7 +351,7 @@ class Vfs_server::Io_node : public Vfs_server::Node, { _read_ready_state = Read_ready_state::REQUESTED; - if (_handle.fs().read_ready(&_handle)) { + if (_handle.fs().read_ready(_handle)) { /* if the handle is ready, send a packet back immediately */ read_ready_response(); } else { From 0fa683f244a8ba2918d459d319bd5d860ef0cfd8 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 19 Dec 2022 11:01:32 +0100 Subject: [PATCH 0156/1921] vfs/cbe_trust_anchor: add sanity check This patch adds a null-pointer check to the '_close_handle' method, which triggers when using the vfs_cbe.run script in interactive mode. --- repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc index fb7f163787..8ae2ead4ef 100644 --- a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc @@ -544,6 +544,9 @@ class Trust_anchor void _close_handle(Vfs::Vfs_handle **handle) { + if (*handle == nullptr) + return; + (*handle)->close(); (*handle) = nullptr; } From 6d14f5442ec1f006566286c5849ae0ae85abbe2e Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 3 Nov 2022 16:01:59 +0100 Subject: [PATCH 0157/1921] lx_emul: provide more pci functions - pci_dev_present() based on devices on bus - pci_request_regions() as dummy - pci_release_regions() as dummy --- .../src/lib/lx_emul/shadow/drivers/pci/pci.c | 23 +++++++++++++ .../lib/lx_emul/shadow/drivers/pci/search.c | 33 +++++++++++++++++++ .../framebuffer/intel/pc/generated_dummies.c | 8 ----- 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c b/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c index 123d1e16fd..357d79506f 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/pci.c @@ -1,3 +1,17 @@ +/* + * \brief Replaces drivers/pci/pci.c + * \author Stefan Kalkowski + * \author Christian Helmuth + * \date 2021-03-16 + */ + +/* + * Copyright (C) 2021 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + #include #include @@ -40,3 +54,12 @@ u8 pci_find_capability(struct pci_dev * dev,int cap) { return 0; } + + +void pci_release_regions(struct pci_dev *pdev) { } + + +int pci_request_regions(struct pci_dev *pdev, const char *res_name) +{ + return 0; +} diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/search.c b/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/search.c index ea12ef7fab..4a3f7e27f1 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/search.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/drivers/pci/search.c @@ -1,6 +1,22 @@ +/* + * \brief Replaces drivers/pci/search.c + * \author Stefan Kalkowski + * \author Christian Helmuth + * \date 2021-03-16 + */ + +/* + * Copyright (C) 2021 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + #include #include +#include "../drivers/pci/pci.h" + struct pci_dev * pci_get_class(unsigned int class, struct pci_dev *from) { struct pci_dev *dev; @@ -42,3 +58,20 @@ struct pci_dev * pci_get_device(unsigned int vendor,unsigned int device,struct p { return NULL; } + + +int pci_dev_present(const struct pci_device_id *ids) +{ + struct pci_dev *dev; + struct pci_bus *bus = (struct pci_bus *) lx_emul_pci_root_bus(); + + while (ids->vendor || ids->subvendor || ids->class_mask) { + list_for_each_entry(dev, &bus->devices, bus_list) { + if (pci_match_one_device(ids, dev)) + return 1; + } + ids++; + } + + return 0; +} diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c b/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c index cdd1581a77..ed525790de 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/generated_dummies.c @@ -1596,14 +1596,6 @@ int pagecache_write_end(struct file * file,struct address_space * mapping,loff_t enum reboot_mode panic_reboot_mode; -#include - -int pci_dev_present(const struct pci_device_id * ids) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void pci_disable_device(struct pci_dev * dev) From b59ec55d5066c6f61b57fe24e6bffcc1dc69c0d5 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 3 Nov 2022 16:04:28 +0100 Subject: [PATCH 0158/1921] lx_emul: provide irqsave/restore write-lock functions --- .../lx_emul/shadow/kernel/locking/spinlock.c | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/locking/spinlock.c b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/locking/spinlock.c index f9d1d87e1b..4ea14fcc76 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/locking/spinlock.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/locking/spinlock.c @@ -1,6 +1,8 @@ /* * \brief Replaces kernel/locking/spinlock.c * \author Stefan Kalkowski + * \author Johannes Schlatow + * \author Christian Helmuth * \date 2021-03-16 * * We run single-core, cooperatively scheduled. We should never spin. @@ -182,3 +184,23 @@ void __lockfunc _raw_read_lock_bh(rwlock_t * lock) arch_read_lock(&(lock)->raw_lock); } #endif + + +#ifndef CONFIG_INLINE_WRITE_LOCK_IRQSAVE +unsigned long __lockfunc _raw_write_lock_irqsave(rwlock_t *lock) +{ + unsigned long flags; + local_irq_save(flags); + arch_write_lock(&(lock)->raw_lock); + return flags; +} +#endif + + +#ifndef CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE +void __lockfunc _raw_write_unlock_irqrestore(rwlock_t *lock, unsigned long flags) +{ + arch_write_unlock(&(lock)->raw_lock); + local_irq_restore(flags); +} +#endif From 8fe7fa5532af57668194a98aa44fe27947a9e1b2 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 16 Dec 2022 14:33:06 +0100 Subject: [PATCH 0159/1921] hw: don't take the log backend's mutex in kernel To prevent the kernel to deadlock, or call itself with a syscall when using a lock potentially hold by a core thread, the log console's backend for core (hw) gets replaced by a specific variant that checks whether it runs in the kernel context before using the mutex. Fix genodelabs/genode#3280 --- repos/base-hw/lib/mk/base-hw-common.mk | 5 ++ repos/base-hw/lib/mk/base-hw.mk | 1 + repos/base-hw/src/core/core_log_out.cc | 81 +++++++++++++++++++++++++- 3 files changed, 86 insertions(+), 1 deletion(-) diff --git a/repos/base-hw/lib/mk/base-hw-common.mk b/repos/base-hw/lib/mk/base-hw-common.mk index 76b64b739c..58506fd577 100644 --- a/repos/base-hw/lib/mk/base-hw-common.mk +++ b/repos/base-hw/lib/mk/base-hw-common.mk @@ -10,3 +10,8 @@ include $(BASE_DIR)/lib/mk/base-common.inc SRC_CC += rpc_dispatch_loop.cc SRC_CC += thread.cc thread_myself.cc thread_bootstrap.cc SRC_CC += signal_transmitter.cc + +# filter out log.cc from the generic base library +# in core and hw kernel we have to implement it differently +SRC_CC_WITH_LOG_CC := $(SRC_CC) +SRC_CC = $(filter-out log.cc,$(SRC_CC_WITH_LOG_CC)) diff --git a/repos/base-hw/lib/mk/base-hw.mk b/repos/base-hw/lib/mk/base-hw.mk index 8aaf077421..ed1b684450 100644 --- a/repos/base-hw/lib/mk/base-hw.mk +++ b/repos/base-hw/lib/mk/base-hw.mk @@ -1,5 +1,6 @@ include $(BASE_DIR)/lib/mk/base.inc +SRC_CC += log.cc SRC_CC += thread_start.cc SRC_CC += capability.cc SRC_CC += cache.cc diff --git a/repos/base-hw/src/core/core_log_out.cc b/repos/base-hw/src/core/core_log_out.cc index 2d555f12c1..70148f275a 100644 --- a/repos/base-hw/src/core/core_log_out.cc +++ b/repos/base-hw/src/core/core_log_out.cc @@ -12,15 +12,22 @@ * under the terms of the GNU Affero General Public License version 3. */ +/* Genode includes */ +#include +#include + /* base-internal includes */ #include #include #include +#include #include +using namespace Genode; -void Genode::Core_log::out(char const c) { Kernel::log(c); } + +void Core_log::out(char const c) { Kernel::log(c); } void Genode::raw_write_string(char const *str) @@ -28,3 +35,75 @@ void Genode::raw_write_string(char const *str) while (char c = *str++) Kernel::log(c); } + + +/************************************************************ + ** Utility to check whether kernel or core code is active ** + ************************************************************/ + +extern void const * const kernel_stack; + +static inline bool running_in_kernel() +{ + addr_t const stack_base = reinterpret_cast(&kernel_stack); + static constexpr size_t stack_size = + NR_OF_CPUS * Kernel::Cpu::KERNEL_STACK_SIZE; + + /* check stack variable against kernel stack area */ + return ((addr_t)&stack_base) >= stack_base && + ((addr_t)&stack_base) < (stack_base + stack_size); +} + + +/******************************************* + ** Implementation of src/lib/base/log.cc ** + *******************************************/ + +void Log::_acquire(Type type) +{ + if (!running_in_kernel()) _mutex.acquire(); + + /* + * Mark warnings and errors via distinct colors. + */ + switch (type) { + case LOG: break; + case WARNING: _output.out_string("\033[34mWarning: "); break; + case ERROR: _output.out_string("\033[31mError: "); break; + }; +} + + +void Log::_release() +{ + /* + * Reset color and add newline + */ + _output.out_string("\033[0m\n"); + + if (!running_in_kernel()) _mutex.release(); +} + + +void Raw::_acquire() +{ + /* + * Mark raw output with distinct color + */ + _output().out_string("\033[32mKernel: "); +} + + +void Raw::_release() +{ + /* + * Reset color and add newline + */ + _output().out_string("\033[0m\n"); +} + + +void Trace_output::Write_trace_fn::operator () (char const *s) +{ + Thread::trace(s); +} From e8f748cfed5901bc0deb00cba54db8bfd864dad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Wed, 8 Dec 2021 17:15:06 +0100 Subject: [PATCH 0160/1921] base-hw: unprivileged cache maintenance on ARMv8 Set 'Sctlr_el1::Uci' bit to allow for executing cache clean and invalidate instruction from user space. Issue #4339. --- repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc | 1 + repos/base-hw/src/include/hw/spec/arm_64/cpu.h | 1 + 2 files changed, 2 insertions(+) diff --git a/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc b/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc index e0a80d13bf..33c9c43eb4 100644 --- a/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc +++ b/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc @@ -199,6 +199,7 @@ unsigned Bootstrap::Platform::enable_mmu() Cpu::Sctlr::Sa0::set(sctlr, 1); Cpu::Sctlr::Sa::set(sctlr, 0); Cpu::Sctlr::Uct::set(sctlr, 1); + Cpu::Sctlr::Uci::set(sctlr, 1); Cpu::Sctlr_el1::write(sctlr); return cpu_id; diff --git a/repos/base-hw/src/include/hw/spec/arm_64/cpu.h b/repos/base-hw/src/include/hw/spec/arm_64/cpu.h index a3599a8dfd..7d6a6331d2 100644 --- a/repos/base-hw/src/include/hw/spec/arm_64/cpu.h +++ b/repos/base-hw/src/include/hw/spec/arm_64/cpu.h @@ -168,6 +168,7 @@ struct Hw::Arm_64_cpu struct I : Bitfield<12, 1> { }; struct Uct : Bitfield<15, 1> { }; struct Wxn : Bitfield<19, 1> { }; + struct Uci : Bitfield<26, 1> { }; }; SYSTEM_REGISTER(64, Sctlr_el1, sctlr_el1); From 66fd027b962d8f9288c083d50ecdd5944818a180 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 13 Dec 2021 15:32:21 +0100 Subject: [PATCH 0161/1921] base-hw: introduce 'cache_line_size' call This call is used to query the cache line size of the underlying CPU. For now it is only implemented and used by 'arm_v8' platforms. It does not distinguish between D-/I-cache sizes and always uses the smallest size. Furthermore it does not account for any discrepancy in 'big.little' CPUs. Issue #4339. --- repos/base-hw/include/kernel/interface.h | 26 ++++++++++++++----- repos/base-hw/src/core/kernel/thread.cc | 1 + repos/base-hw/src/core/kernel/thread.h | 1 + .../src/core/spec/arm/kernel/thread_caches.cc | 7 +++++ .../src/core/spec/riscv/kernel/thread.cc | 6 +++++ .../src/core/spec/x86_64/kernel/thread.cc | 6 +++++ 6 files changed, 40 insertions(+), 7 deletions(-) diff --git a/repos/base-hw/include/kernel/interface.h b/repos/base-hw/include/kernel/interface.h index af8255b218..f636b60075 100644 --- a/repos/base-hw/include/kernel/interface.h +++ b/repos/base-hw/include/kernel/interface.h @@ -38,13 +38,14 @@ namespace Kernel { constexpr Call_arg call_id_cache_coherent_region() { return 13; } constexpr Call_arg call_id_cache_clean_inv_region() { return 14; } constexpr Call_arg call_id_cache_inv_region() { return 15; } - constexpr Call_arg call_id_ack_cap() { return 16; } - constexpr Call_arg call_id_delete_cap() { return 17; } - constexpr Call_arg call_id_timeout() { return 18; } - constexpr Call_arg call_id_timeout_max_us() { return 19; } - constexpr Call_arg call_id_time() { return 20; } - constexpr Call_arg call_id_run_vm() { return 21; } - constexpr Call_arg call_id_pause_vm() { return 22; } + constexpr Call_arg call_id_cache_line_size() { return 16; } + constexpr Call_arg call_id_ack_cap() { return 17; } + constexpr Call_arg call_id_delete_cap() { return 18; } + constexpr Call_arg call_id_timeout() { return 19; } + constexpr Call_arg call_id_timeout_max_us() { return 20; } + constexpr Call_arg call_id_time() { return 21; } + constexpr Call_arg call_id_run_vm() { return 22; } + constexpr Call_arg call_id_pause_vm() { return 23; } /***************************************************************** @@ -214,6 +215,17 @@ namespace Kernel { } + /** + * Get cache line size + * + * \param vm pointer to vm kernel object + */ + inline size_t cache_line_size() + { + return (size_t)call(call_id_cache_line_size()); + } + + /** * Send request message and await reception of corresponding reply message * diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index a5f3b37593..8feb09c4ce 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -800,6 +800,7 @@ void Thread::_call() case call_id_cache_coherent_region(): _call_cache_coherent_region(); return; case call_id_cache_clean_inv_region(): _call_cache_clean_invalidate_data_region(); return; case call_id_cache_inv_region(): _call_cache_invalidate_data_region(); return; + case call_id_cache_line_size(): _call_cache_line_size(); return; case call_id_stop_thread(): _call_stop_thread(); return; case call_id_restart_thread(): _call_restart_thread(); return; case call_id_yield_thread(): _call_yield_thread(); return; diff --git a/repos/base-hw/src/core/kernel/thread.h b/repos/base-hw/src/core/kernel/thread.h index 93e45c3303..8e9b5aabc6 100644 --- a/repos/base-hw/src/core/kernel/thread.h +++ b/repos/base-hw/src/core/kernel/thread.h @@ -242,6 +242,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout void _call_cache_coherent_region(); void _call_cache_clean_invalidate_data_region(); void _call_cache_invalidate_data_region(); + void _call_cache_line_size(); void _call_print_char(); void _call_await_signal(); void _call_pending_signal(); diff --git a/repos/base-hw/src/core/spec/arm/kernel/thread_caches.cc b/repos/base-hw/src/core/spec/arm/kernel/thread_caches.cc index 2eee9b912b..d73d8848fc 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/thread_caches.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/thread_caches.cc @@ -72,3 +72,10 @@ void Kernel::Thread::_call_cache_invalidate_data_region() [] (addr_t addr, size_t size) { Genode::Cpu::cache_invalidate_data_region(addr, size); }); } + + +void Kernel::Thread::_call_cache_line_size() +{ + size_t const cache_line_size = Genode::Cpu::cache_line_size(); + user_arg_0(cache_line_size); +} diff --git a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc index 10814fde15..a1eb924bed 100644 --- a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc @@ -98,6 +98,12 @@ void Kernel::Thread::_call_cache_clean_invalidate_data_region() { } void Kernel::Thread::_call_cache_invalidate_data_region() { } +void Kernel::Thread::_call_cache_line_size() +{ + user_arg_0(0); +} + + void Kernel::Thread::proceed(Cpu & cpu) { /* diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc index df3332a4de..09fc86c9cb 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc @@ -41,6 +41,12 @@ void Kernel::Thread::_call_cache_clean_invalidate_data_region() { } void Kernel::Thread::_call_cache_invalidate_data_region() { } +void Kernel::Thread::_call_cache_line_size() +{ + user_arg_0(0); +} + + void Kernel::Thread::proceed(Cpu & cpu) { if (!cpu.active(pd().mmu_regs) && type() != CORE) From 08c56e61e16e1b5f6dd12f3469140027e3c83e59 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 19 Dec 2022 11:17:43 +0100 Subject: [PATCH 0162/1921] hw: avoid overhead for cache maintainance When running on x86, and riscv never enter the kernel for cache maintainance, but use the dummy implementation of the generic base library instead. On ARMv8 it is not necessary to enter privileged mode for cache cleaning, and unification of instruction/data cache, but only for invalidating cache lines at all levels, which is necessary for the use cases, where this function it needed (coherency of DMA memory). Fix genodelabs/genode#4339 --- .../lib/mk/{base-hw.mk => base-hw.inc} | 0 repos/base-hw/lib/mk/spec/arm/base-hw.mk | 3 + repos/base-hw/lib/mk/spec/arm_64/base-hw.mk | 3 + repos/base-hw/lib/mk/spec/riscv/base-hw.mk | 1 + repos/base-hw/lib/mk/spec/x86_64/base-hw.mk | 1 + repos/base-hw/recipes/src/base-hw_content.inc | 2 +- repos/base-hw/src/core/spec/arm_v6/cpu.h | 4 ++ .../src/core/spec/arm_v7/cpu_support.h | 5 ++ .../base-hw/src/include/base/internal/cache.h | 54 ++++++++++++++++ repos/base-hw/src/lib/base/arm/cache.cc | 41 ++++++++++++ repos/base-hw/src/lib/base/arm_64/cache.cc | 57 +++++++++++++++++ repos/base-hw/src/lib/base/cache.cc | 62 ------------------- 12 files changed, 170 insertions(+), 63 deletions(-) rename repos/base-hw/lib/mk/{base-hw.mk => base-hw.inc} (100%) create mode 100644 repos/base-hw/lib/mk/spec/arm/base-hw.mk create mode 100644 repos/base-hw/lib/mk/spec/arm_64/base-hw.mk create mode 100644 repos/base-hw/lib/mk/spec/riscv/base-hw.mk create mode 100644 repos/base-hw/lib/mk/spec/x86_64/base-hw.mk create mode 100644 repos/base-hw/src/include/base/internal/cache.h create mode 100644 repos/base-hw/src/lib/base/arm/cache.cc create mode 100644 repos/base-hw/src/lib/base/arm_64/cache.cc delete mode 100644 repos/base-hw/src/lib/base/cache.cc diff --git a/repos/base-hw/lib/mk/base-hw.mk b/repos/base-hw/lib/mk/base-hw.inc similarity index 100% rename from repos/base-hw/lib/mk/base-hw.mk rename to repos/base-hw/lib/mk/base-hw.inc diff --git a/repos/base-hw/lib/mk/spec/arm/base-hw.mk b/repos/base-hw/lib/mk/spec/arm/base-hw.mk new file mode 100644 index 0000000000..2cc9ea1bbe --- /dev/null +++ b/repos/base-hw/lib/mk/spec/arm/base-hw.mk @@ -0,0 +1,3 @@ +vpath cache.cc $(REP_DIR)/src/lib/base/arm + +include $(REP_DIR)/lib/mk/base-hw.inc diff --git a/repos/base-hw/lib/mk/spec/arm_64/base-hw.mk b/repos/base-hw/lib/mk/spec/arm_64/base-hw.mk new file mode 100644 index 0000000000..51e578f490 --- /dev/null +++ b/repos/base-hw/lib/mk/spec/arm_64/base-hw.mk @@ -0,0 +1,3 @@ +vpath cache.cc $(REP_DIR)/src/lib/base/arm_64 + +include $(REP_DIR)/lib/mk/base-hw.inc diff --git a/repos/base-hw/lib/mk/spec/riscv/base-hw.mk b/repos/base-hw/lib/mk/spec/riscv/base-hw.mk new file mode 100644 index 0000000000..38ea05026d --- /dev/null +++ b/repos/base-hw/lib/mk/spec/riscv/base-hw.mk @@ -0,0 +1 @@ +include $(REP_DIR)/lib/mk/base-hw.inc diff --git a/repos/base-hw/lib/mk/spec/x86_64/base-hw.mk b/repos/base-hw/lib/mk/spec/x86_64/base-hw.mk new file mode 100644 index 0000000000..38ea05026d --- /dev/null +++ b/repos/base-hw/lib/mk/spec/x86_64/base-hw.mk @@ -0,0 +1 @@ +include $(REP_DIR)/lib/mk/base-hw.inc diff --git a/repos/base-hw/recipes/src/base-hw_content.inc b/repos/base-hw/recipes/src/base-hw_content.inc index ee1b9ae2f8..38ab511db0 100644 --- a/repos/base-hw/recipes/src/base-hw_content.inc +++ b/repos/base-hw/recipes/src/base-hw_content.inc @@ -133,7 +133,7 @@ SRC_CORE += $(notdir $(wildcard $(BASE_HW_DIR)/src/core/*.cc)) \ # names of the lib/mk/ files to consider for inclusion in the src archive LIB_MK_FILES := base-common.inc base-hw-common.mk \ - base.inc base-hw.mk \ + base.inc base-hw.inc base-hw.mk \ bootstrap-hw.inc bootstrap-hw-$(BOARD).inc bootstrap-hw-$(BOARD).mk \ core-hw.inc core-hw-$(BOARD).inc core-hw-$(BOARD).mk \ startup.inc startup-hw.mk \ diff --git a/repos/base-hw/src/core/spec/arm_v6/cpu.h b/repos/base-hw/src/core/spec/arm_v6/cpu.h index 6a9c6dfeb9..fae5dcc532 100644 --- a/repos/base-hw/src/core/spec/arm_v6/cpu.h +++ b/repos/base-hw/src/core/spec/arm_v6/cpu.h @@ -57,6 +57,10 @@ struct Genode::Cpu : Arm_cpu return instruction_cache_line_size; } + + static inline size_t cache_line_size() { + return Genode::min(data_cache_line_size(), + instruction_cache_line_size()); } }; #endif /* _CORE__SPEC__ARM_V6__CPU_H_ */ diff --git a/repos/base-hw/src/core/spec/arm_v7/cpu_support.h b/repos/base-hw/src/core/spec/arm_v7/cpu_support.h index 4085c7506e..8b0ddf515b 100644 --- a/repos/base-hw/src/core/spec/arm_v7/cpu_support.h +++ b/repos/base-hw/src/core/spec/arm_v7/cpu_support.h @@ -79,6 +79,11 @@ struct Genode::Arm_v7_cpu : Arm_cpu return instruction_cache_line_size; } + + + static inline size_t cache_line_size() { + return Genode::min(data_cache_line_size(), + instruction_cache_line_size()); } }; #endif /* _CORE__SPEC__ARM_V7__CPU_SUPPORT_H_ */ diff --git a/repos/base-hw/src/include/base/internal/cache.h b/repos/base-hw/src/include/base/internal/cache.h new file mode 100644 index 0000000000..327db162d7 --- /dev/null +++ b/repos/base-hw/src/include/base/internal/cache.h @@ -0,0 +1,54 @@ +/* + * \brief Cache maintainance utilities + * \author Stefan Kalkowski + * \date 2022-12-16 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _INCLUDE__BASE__INTERNAL__CACHE_H_ +#define _INCLUDE__BASE__INTERNAL__CACHE_H_ + +#include +#include +#include + +template +static inline void for_each_page(Genode::addr_t addr, + Genode::size_t size, + FN const & fn) +{ + using namespace Genode; + + while (size) { + addr_t next_page = align_addr(addr+1, get_page_size_log2()); + size_t s = min(size, next_page - addr); + touch_read(reinterpret_cast(addr)); + fn(addr, s); + addr += s; + size -= s; + } +} + + +template +static inline void for_each_cache_line(Genode::addr_t addr, + Genode::size_t size, + FN const & fn) +{ + using namespace Genode; + + static size_t cache_line_size = Kernel::cache_line_size(); + + addr_t start = addr; + addr_t const end = addr + size; + for (; start < end; start += cache_line_size) + fn(start); +} + +#endif /* _INCLUDE__BASE__INTERNAL__CACHE_H_ */ diff --git a/repos/base-hw/src/lib/base/arm/cache.cc b/repos/base-hw/src/lib/base/arm/cache.cc new file mode 100644 index 0000000000..40a25c419e --- /dev/null +++ b/repos/base-hw/src/lib/base/arm/cache.cc @@ -0,0 +1,41 @@ +/* + * \brief Implementation of cache operations for ARM + * \author Stefan Kalkowski + * \date 2022-12-16 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include + +#include +#include + +using namespace Genode; + + +void Genode::cache_coherent(addr_t addr, size_t size) +{ + for_each_page(addr, size, [] (addr_t addr, size_t size) { + Kernel::cache_coherent_region(addr, size); }); +} + + +void Genode::cache_clean_invalidate_data(addr_t addr, size_t size) +{ + for_each_page(addr, size, [] (addr_t addr, size_t size) { + Kernel::cache_clean_invalidate_data_region(addr, size); }); +} + + +void Genode::cache_invalidate_data(addr_t addr, size_t size) +{ + for_each_page(addr, size, [] (addr_t addr, size_t size) { + Kernel::cache_invalidate_data_region(addr, size); }); +} + diff --git a/repos/base-hw/src/lib/base/arm_64/cache.cc b/repos/base-hw/src/lib/base/arm_64/cache.cc new file mode 100644 index 0000000000..337bd00019 --- /dev/null +++ b/repos/base-hw/src/lib/base/arm_64/cache.cc @@ -0,0 +1,57 @@ +/* + * \brief Implementation of the cache maintainance on ARMv8 + * \author Stefan Kalkowski + * \date 2022-12-16 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include + +#include +#include +#include + +using namespace Genode; + +void Genode::cache_coherent(addr_t addr, size_t size) +{ + Genode::memory_barrier(); + + for_each_page(addr, size, [] (addr_t addr, size_t size) { + for_each_cache_line(addr, size, [&] (addr_t addr) { + asm volatile("dc cvau, %0" :: "r" (addr)); + asm volatile("dsb ish"); + asm volatile("ic ivau, %0" :: "r" (addr)); + asm volatile("dsb ish"); + asm volatile("isb"); + }); + }); +} + + +void Genode::cache_clean_invalidate_data(addr_t addr, size_t size) +{ + Genode::memory_barrier(); + + for_each_page(addr, size, [&] (addr_t addr, size_t size) { + + for_each_cache_line(addr, size, [&] (addr_t addr) { + asm volatile("dc civac, %0" :: "r" (addr)); }); + }); + + asm volatile("dsb sy"); + asm volatile("isb"); +} + + +void Genode::cache_invalidate_data(addr_t addr, size_t size) +{ + for_each_page(addr, size, [] (addr_t addr, size_t size) { + Kernel::cache_invalidate_data_region(addr, size); }); +} diff --git a/repos/base-hw/src/lib/base/cache.cc b/repos/base-hw/src/lib/base/cache.cc deleted file mode 100644 index b2b1b61160..0000000000 --- a/repos/base-hw/src/lib/base/cache.cc +++ /dev/null @@ -1,62 +0,0 @@ -/* - * \brief Implementation of the cache operations - * \author Christian Prochaska - * \date 2014-05-13 - */ - -/* - * Copyright (C) 2014-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#include - -#include -#include -#include -#include - -using namespace Genode; - - -template -static void for_cachelines(addr_t addr, size_t size, FN const & fn) -{ - /** - * The kernel accepts the cache maintainance calls for one designated - * page only. Otherwise, it just ignores the call to limit the time being - * uninteruppptible in the kernel. Therefore, we have to loop if more than - * one page is affected by the given region. - */ - while (size) { - addr_t next_page = align_addr(addr+1, get_page_size_log2()); - size_t s = min(size, next_page - addr); - touch_read(reinterpret_cast(addr)); - fn(addr, s); - addr += s; - size -= s; - } -} - - -void Genode::cache_coherent(addr_t addr, size_t size) -{ - for_cachelines(addr, size, [] (addr_t addr, size_t size) { - Kernel::cache_coherent_region(addr, size); }); -} - - -void Genode::cache_clean_invalidate_data(addr_t addr, size_t size) -{ - for_cachelines(addr, size, [] (addr_t addr, size_t size) { - Kernel::cache_clean_invalidate_data_region(addr, size); }); -} - - -void Genode::cache_invalidate_data(addr_t addr, size_t size) -{ - for_cachelines(addr, size, [] (addr_t addr, size_t size) { - Kernel::cache_invalidate_data_region(addr, size); }); -} From 0fefee804cd0ab7ff5a6fca9f6c8a6b2c87237e6 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 19 Dec 2022 16:08:20 +0100 Subject: [PATCH 0163/1921] vfs: remove File_io_service::ioctl interface This interface has been obsoleted by the use of pseudo files, implemented in the context of issue #3519. Issue #4706 --- .../src/lib/libc/internal/vfs_plugin.h | 2 - repos/libports/src/lib/libc/vfs_plugin.cc | 153 +----------------- repos/os/include/vfs/file_io_service.h | 42 ----- 3 files changed, 3 insertions(+), 194 deletions(-) diff --git a/repos/libports/src/lib/libc/internal/vfs_plugin.h b/repos/libports/src/lib/libc/internal/vfs_plugin.h index 0b15b93af8..1775979fd2 100644 --- a/repos/libports/src/lib/libc/internal/vfs_plugin.h +++ b/repos/libports/src/lib/libc/internal/vfs_plugin.h @@ -103,8 +103,6 @@ class Libc::Vfs_plugin final : public Plugin */ void _vfs_write_mtime(Vfs::Vfs_handle&); - int _legacy_ioctl(File_descriptor *, unsigned long, char *); - struct Ioctl_result { bool handled; diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index 56762754ec..9d3f6155fa 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -1941,157 +1941,10 @@ int Libc::Vfs_plugin::ioctl(File_descriptor *fd, unsigned long request, char *ar break; } - if (result.handled) - return result.error ? Errno(result.error) : 0; + if (!result.handled) + return Errno(EINVAL); - return _legacy_ioctl(fd, request, argp); -} - - -/** - * Fallback for ioctl operations targeting the deprecated VFS ioctl interface - * - * XXX Remove this method once all ioctl operations are supported via - * regular VFS file accesses. - */ -int Libc::Vfs_plugin::_legacy_ioctl(File_descriptor *fd, unsigned long request, char *argp) -{ - using ::off_t; - - /* - * Marshal ioctl arguments - */ - - typedef Vfs::File_io_service::Ioctl_opcode Opcode; - - Opcode opcode = Opcode::IOCTL_OP_UNDEFINED; - - Vfs::File_io_service::Ioctl_arg arg = 0; - - switch (request) { - - case TIOCGWINSZ: - { - if (!argp) { - errno = EINVAL; - return -1; - } - - opcode = Opcode::IOCTL_OP_TIOCGWINSZ; - break; - } - - case TIOCSETAF: - { - opcode = Opcode::IOCTL_OP_TIOCSETAF; - - ::termios *termios = (::termios *)argp; - - /* - * For now only enabling/disabling of ECHO is supported - */ - if (termios->c_lflag & (ECHO | ECHONL)) { - arg = (Vfs::File_io_service::IOCTL_VAL_ECHO | - Vfs::File_io_service::IOCTL_VAL_ECHONL); - } - else { - arg = Vfs::File_io_service::IOCTL_VAL_NULL; - } - - break; - } - - case TIOCSETAW: - { - opcode = Opcode::IOCTL_OP_TIOCSETAW; - arg = argp ? *(int*)argp : 0; - break; - } - - case FIONBIO: - { - opcode = Opcode::IOCTL_OP_FIONBIO; - arg = argp ? *(int*)argp : 0; - break; - } - - case DIOCGMEDIASIZE: - { - if (!argp) { - errno = EINVAL; - return -1; - } - - opcode = Opcode::IOCTL_OP_DIOCGMEDIASIZE; - arg = 0; - break; - } - - default: - warning("unsupported ioctl (request=", Hex(request), ")"); - break; - } - - if (opcode == Opcode::IOCTL_OP_UNDEFINED) { - errno = ENOTTY; - return -1; - } - - typedef Vfs::File_io_service::Ioctl_result Result; - - Vfs::File_io_service::Ioctl_out out; - Genode::memset(&out, 0, sizeof(out)); - - Vfs::Vfs_handle *handle = vfs_handle(fd); - - bool succeeded = false; - int result_errno = 0; - monitor().monitor([&] { - switch (handle->fs().ioctl(handle, opcode, arg, out)) { - case Result::IOCTL_ERR_INVALID: result_errno = EINVAL; break; - case Result::IOCTL_ERR_NOTTY: result_errno = ENOTTY; break; - case Result::IOCTL_OK: succeeded = true; break; - } - return Fn::COMPLETE; - }); - if (!succeeded) - return Errno(result_errno); - - - /* - * Unmarshal ioctl results - */ - switch (request) { - - case TIOCGWINSZ: - { - ::winsize *winsize = (::winsize *)argp; - winsize->ws_row = out.tiocgwinsz.rows; - winsize->ws_col = out.tiocgwinsz.columns; - return 0; - } - case TIOCSETAF: - case TIOCSETAW: - return 0; - - case FIONBIO: - return 0; - - case DIOCGMEDIASIZE: - { - /* resolve ambiguity with libc type */ - using Genode::int64_t; - - int64_t *disk_size = (int64_t*)argp; - *disk_size = out.diocgmediasize.size; - return 0; - } - - default: - break; - } - - return -1; + return result.error ? Errno(result.error) : 0; } diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index eaf8d3e22d..39b8bd5219 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -96,48 +96,6 @@ struct Vfs::File_io_service : Interface virtual Ftruncate_result ftruncate(Vfs_handle *vfs_handle, file_size len) = 0; - /*********** - ** Ioctl ** - ***********/ - - enum Ioctl_result { IOCTL_ERR_INVALID, IOCTL_ERR_NOTTY, IOCTL_OK }; - - enum Ioctl_opcode { IOCTL_OP_UNDEFINED, IOCTL_OP_TIOCGWINSZ, - IOCTL_OP_TIOCSETAF, IOCTL_OP_TIOCSETAW, - IOCTL_OP_FIONBIO, IOCTL_OP_DIOCGMEDIASIZE }; - - enum Ioctl_value { IOCTL_VAL_NULL, IOCTL_VAL_ECHO, IOCTL_VAL_ECHONL }; - - typedef unsigned long Ioctl_arg; - - struct Ioctl_out - { - union - { - /* if request was 'IOCTL_OP_TIOCGWINSZ' */ - struct { - int rows; - int columns; - } tiocgwinsz; - - /* if request was 'IOCTL_OP_DIOCGMEDIASIZE' */ - struct { - /* disk size rounded up to sector size in bytes*/ - file_size size; - - } diocgmediasize; - }; - }; - - virtual Ioctl_result ioctl(Vfs_handle *, Ioctl_opcode, Ioctl_arg, Ioctl_out &) - { - /* - * This method is only needed in file systems which actually implement a - * device and is therefore false by default. - */ - return IOCTL_ERR_INVALID; - } - virtual void register_read_ready_sigh(Vfs_handle *, Signal_context_capability) { } From b4f6f796d6b06d4f120d08266e439692cdc19c49 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 19 Dec 2022 16:25:47 +0100 Subject: [PATCH 0164/1921] Clear board/pc/devices Information about PS/2 and PIT where moved to app/pci_decode in the following commit. pci_decode: report devices from ACPI info We still provide an empty node as the file itself is used by platform agnostic run scripts. --- repos/base/board/pc/devices | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/repos/base/board/pc/devices b/repos/base/board/pc/devices index b5ca5a1261..4143922c1b 100644 --- a/repos/base/board/pc/devices +++ b/repos/base/board/pc/devices @@ -1,13 +1,3 @@ - - - - - - - - - - - + From 0c465fbb4d530feb30dd40f687dae6b87a1d7d6c Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 20 Dec 2022 11:10:07 +0100 Subject: [PATCH 0165/1921] trace session: fix double quota accounting Fixes #4707. --- repos/base/include/base/trace/types.h | 1 - .../include/trace_session/trace_session.h | 3 +- repos/base/src/core/include/trace/root.h | 2 +- .../src/core/include/trace/subject_registry.h | 59 +++++++------------ .../base/src/core/trace_session_component.cc | 49 ++++----------- repos/os/src/app/trace_logger/main.cc | 1 - 6 files changed, 34 insertions(+), 81 deletions(-) diff --git a/repos/base/include/base/trace/types.h b/repos/base/include/base/trace/types.h index 60f8673337..9da53531d9 100644 --- a/repos/base/include/base/trace/types.h +++ b/repos/base/include/base/trace/types.h @@ -29,7 +29,6 @@ namespace Genode { namespace Trace { struct Policy_too_large : Exception { }; struct Nonexistent_subject : Exception { }; - struct Already_traced : Exception { }; struct Source_is_dead : Exception { }; struct Nonexistent_policy : Exception { }; struct Traced_by_other_session : Exception { }; diff --git a/repos/base/include/trace_session/trace_session.h b/repos/base/include/trace_session/trace_session.h index 3bd61ba442..28dfc2aad5 100644 --- a/repos/base/include/trace_session/trace_session.h +++ b/repos/base/include/trace_session/trace_session.h @@ -56,7 +56,6 @@ struct Genode::Trace::Session : Genode::Session * * \throw Out_of_ram * \throw Out_of_caps - * \throw Already_traced * \throw Source_is_dead * \throw Nonexistent_policy * \throw Nonexistent_subject @@ -113,7 +112,7 @@ struct Genode::Trace::Session : Genode::Session GENODE_RPC_THROW(Rpc_unload_policy, void, unload_policy, GENODE_TYPE_LIST(Nonexistent_policy), Policy_id); GENODE_RPC_THROW(Rpc_trace, void, trace, - GENODE_TYPE_LIST(Out_of_ram, Out_of_caps, Already_traced, + GENODE_TYPE_LIST(Out_of_ram, Out_of_caps, Source_is_dead, Nonexistent_subject, Nonexistent_policy, Traced_by_other_session), diff --git a/repos/base/src/core/include/trace/root.h b/repos/base/src/core/include/trace/root.h index 57bb453bba..7477b8650b 100644 --- a/repos/base/src/core/include/trace/root.h +++ b/repos/base/src/core/include/trace/root.h @@ -41,7 +41,7 @@ class Genode::Trace::Root : public Genode::Root_component unsigned parent_levels = (unsigned)Arg_string::find_arg(args, "parent_levels").ulong_value(0); if (arg_buffer_size > ram_quota) - throw Service_denied(); + throw Insufficient_ram_quota(); return new (md_alloc()) Session_component(*this->ep(), diff --git a/repos/base/src/core/include/trace/subject_registry.h b/repos/base/src/core/include/trace/subject_registry.h index 374aa5d05d..92b17b2e74 100644 --- a/repos/base/src/core/include/trace/subject_registry.h +++ b/repos/base/src/core/include/trace/subject_registry.h @@ -96,18 +96,15 @@ class Genode::Trace::Subject /** * Clone dataspace into newly allocated dataspace */ - bool setup(Ram_allocator &ram, Region_map &local_rm, + void setup(Ram_allocator &ram, Region_map &local_rm, Dataspace_capability &from_ds, size_t size) { - if (!from_ds.valid()) - return false; - if (_size) flush(); + _ds = ram.alloc(size); /* may throw */ _ram_ptr = &ram; _size = size; - _ds = ram.alloc(_size); /* copy content */ void *src = local_rm.attach(from_ds), @@ -117,8 +114,6 @@ class Genode::Trace::Subject local_rm.detach(src); local_rm.detach(dst); - - return true; } /** @@ -146,7 +141,6 @@ class Genode::Trace::Subject Ram_dataspace _buffer { }; Ram_dataspace _policy { }; Policy_id _policy_id { }; - size_t _allocated_memory { 0 }; Subject_info::State _state() { @@ -217,9 +211,6 @@ class Genode::Trace::Subject */ bool has_source_id(unsigned id) const { return id == _source_id; } - size_t allocated_memory() const { return _allocated_memory; } - void reset_allocated_memory() { _allocated_memory = 0; } - /** * Start tracing * @@ -227,7 +218,6 @@ class Genode::Trace::Subject * * \throw Out_of_ram * \throw Out_of_caps - * \throw Already_traced * \throw Source_is_dead * \throw Traced_by_other_session */ @@ -238,26 +228,31 @@ class Genode::Trace::Subject /* check state and throw error in case subject is not traceable */ _traceable_or_throw(); - _buffer.setup(ram, size); - if(!_policy.setup(ram, local_rm, policy_ds, policy_size)) - throw Already_traced(); + _buffer.setup(ram, size); /* may throw */ + + try { + _policy.setup(ram, local_rm, policy_ds, policy_size); + } catch (...) { + _buffer.flush(); + throw; + } /* inform trace source about the new buffer */ Locked_ptr source(_source); - if (!source->try_acquire(*this)) + if (!source->try_acquire(*this)) { + _policy.flush(); + _buffer.flush(); throw Traced_by_other_session(); + } _policy_id = policy_id; - _allocated_memory = policy_size + size; - source->trace(_policy.dataspace(), _buffer.dataspace()); } void pause() { - /* inform trace source about the new buffer */ Locked_ptr source(_source); if (source.valid()) @@ -271,7 +266,6 @@ class Genode::Trace::Subject */ void resume() { - /* inform trace source about the new buffer */ Locked_ptr source(_source); if (!source.valid()) @@ -301,16 +295,16 @@ class Genode::Trace::Subject Dataspace_capability buffer() const { return _buffer.dataspace(); } - size_t release() + void release() { - /* inform trace source about the new buffer */ Locked_ptr source(_source); /* source vanished */ if (!source.valid()) - return 0; + return; - return _buffer.flush() + _policy.flush(); + _buffer.flush(); + _policy.flush(); } }; @@ -375,18 +369,14 @@ class Genode::Trace::Subject_registry /** * Destroy subject, and release policy and trace buffers - * - * \return RAM resources released during destruction */ - size_t _unsynchronized_destroy(Subject &s) + void _unsynchronized_destroy(Subject &s) { _entries.remove(&s); - size_t const released_ram = s.release(); + s.release(); destroy(&_md_alloc, &s); - - return released_ram; }; /** @@ -471,18 +461,13 @@ class Genode::Trace::Subject_registry /** * Remove subject and release resources - * - * \return RAM resources released as a side effect for removing the - * subject (i.e., if the subject held a trace buffer or - * policy dataspace). The value does not account for - * memory allocated from the metadata allocator. */ - size_t release(Subject_id subject_id) + void release(Subject_id subject_id) { Mutex::Guard guard(_mutex); Subject &subject = _unsynchronized_lookup_by_id(subject_id); - return _unsynchronized_destroy(subject); + _unsynchronized_destroy(subject); } Subject &lookup_by_id(Subject_id id) diff --git a/repos/base/src/core/trace_session_component.cc b/repos/base/src/core/trace_session_component.cc index 235da3555e..09f19a0e9f 100644 --- a/repos/base/src/core/trace_session_component.cc +++ b/repos/base/src/core/trace_session_component.cc @@ -59,21 +59,12 @@ Policy_id Session_component::alloc_policy(size_t size) */ Policy_id const id(++_policy_cnt); - Ram_quota const amount { size }; - - /* - * \throw Out_of_ram - */ - withdraw(amount); + Ram_dataspace_capability ds_cap = _ram.alloc(size); /* may throw */ try { - Dataspace_capability ds_cap = _ram.alloc(size); _policies.insert(*this, id, _policies_slab, ds_cap, size); - } catch (...) { - - /* revert withdrawal or quota */ - replenish(amount); + _ram.free(ds_cap); throw; } @@ -89,7 +80,11 @@ Dataspace_capability Session_component::policy(Policy_id id) void Session_component::unload_policy(Policy_id id) { - _policies.remove(*this, id); + try { + Dataspace_capability ds_cap = _policies.dataspace(*this, id); + _policies.remove(*this, id); + _ram.free(static_cap_cast(ds_cap)); + } catch (Nonexistent_policy) { } } @@ -98,32 +93,10 @@ void Session_component::trace(Subject_id subject_id, Policy_id policy_id, { size_t const policy_size = _policies.size(*this, policy_id); - Ram_quota const required_ram { buffer_size + policy_size }; - Trace::Subject &subject = _subjects.lookup_by_id(subject_id); - /* revert quota from previous call to trace */ - if (subject.allocated_memory()) { - replenish(Ram_quota{subject.allocated_memory()}); - subject.reset_allocated_memory(); - } - - /* - * Account RAM needed for trace buffer and policy buffer to the trace - * session. - * - * \throw Out_of_ram - */ - withdraw(required_ram); - - try { - subject.trace(policy_id, _policies.dataspace(*this, policy_id), - policy_size, _ram, _local_rm, buffer_size); - } catch (...) { - /* revert withdrawal or quota */ - replenish(required_ram); - throw; - } + subject.trace(policy_id, _policies.dataspace(*this, policy_id), + policy_size, _ram, _local_rm, buffer_size); } @@ -147,9 +120,7 @@ Dataspace_capability Session_component::buffer(Subject_id subject_id) void Session_component::free(Subject_id subject_id) { - Ram_quota const released_ram { _subjects.release(subject_id) }; - - replenish(released_ram); + _subjects.release(subject_id); } diff --git a/repos/os/src/app/trace_logger/main.cc b/repos/os/src/app/trace_logger/main.cc index c2305aa14d..607265ce78 100644 --- a/repos/os/src/app/trace_logger/main.cc +++ b/repos/os/src/app/trace_logger/main.cc @@ -192,7 +192,6 @@ class Main } monitors.insert(new (_heap) Monitor(_trace, _env.rm(), id)); } - catch (Trace::Already_traced ) { warn_msg("Already_traced" ); return; } catch (Trace::Source_is_dead ) { warn_msg("Source_is_dead" ); return; } catch (Trace::Nonexistent_policy ) { warn_msg("Nonexistent_policy" ); return; } catch (Trace::Traced_by_other_session) { warn_msg("Traced_by_other_session"); return; } From bccc57bb293e8a6b632d85ecdbcf5bbccc5600f8 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 20 Dec 2022 12:06:37 +0100 Subject: [PATCH 0166/1921] Adapt run scripts for Intel Xe GPU --- repos/libports/run/acpi_suspend.run | 1 + repos/pc/run/intel_fb.run | 1 + 2 files changed, 2 insertions(+) diff --git a/repos/libports/run/acpi_suspend.run b/repos/libports/run/acpi_suspend.run index d564adf64b..6c9c6a5a4b 100644 --- a/repos/libports/run/acpi_suspend.run +++ b/repos/libports/run/acpi_suspend.run @@ -71,6 +71,7 @@ proc gpu_config { } { + diff --git a/repos/pc/run/intel_fb.run b/repos/pc/run/intel_fb.run index d7bef2b9d4..0f372fd129 100644 --- a/repos/pc/run/intel_fb.run +++ b/repos/pc/run/intel_fb.run @@ -237,6 +237,7 @@ append_if $use_gpu config { + From 89b0eca3831fdafab5d4e81b304ee9bee4dc2b4c Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 20 Dec 2022 15:51:24 +0100 Subject: [PATCH 0167/1921] wm: ensure eight views fit into slab block Issue #3834 --- repos/gems/src/server/wm/gui.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/gems/src/server/wm/gui.h b/repos/gems/src/server/wm/gui.h index 21a94d90d6..b9f964fa3e 100644 --- a/repos/gems/src/server/wm/gui.h +++ b/repos/gems/src/server/wm/gui.h @@ -488,8 +488,8 @@ class Wm::Gui::Session_component : public Rpc_object, Window_registry &_window_registry; Session_control_fn &_session_control_fn; - Tslab _top_level_view_alloc; - Tslab _child_view_alloc; + Tslab _top_level_view_alloc; + Tslab _child_view_alloc; List _top_level_views { }; List _child_views { }; Input::Session_component _input_session { _env, _ram }; From e483fc2525d0c5e075452189ac3fe3d1e1088704 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 20 Dec 2022 16:04:21 +0100 Subject: [PATCH 0168/1921] nova: remove frame size compiler warnings --- repos/base-nova/src/kernel/nova/target.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/repos/base-nova/src/kernel/nova/target.mk b/repos/base-nova/src/kernel/nova/target.mk index 8f001c462f..1ea1ff9f8d 100644 --- a/repos/base-nova/src/kernel/nova/target.mk +++ b/repos/base-nova/src/kernel/nova/target.mk @@ -31,12 +31,10 @@ CC_OPT += -DCONFIG_MEMORY_DYN_MIN=0x1c00000 \ CC_OPT_PIC := ifeq ($(filter-out $(SPECS),32bit),) override CC_MARCH = -m32 -CC_WARN += -Wframe-larger-than=104 CC_OPT += -mpreferred-stack-boundary=2 -mregparm=3 else ifeq ($(filter-out $(SPECS),64bit),) override CC_MARCH = -m64 -CC_WARN += -Wframe-larger-than=256 CC_OPT += -mpreferred-stack-boundary=4 -mcmodel=kernel -mno-red-zone else $(error Unsupported environment) From a1fb51e05084a11da90f8ea3abe5bcfebb0a4b50 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 20 Dec 2022 11:57:11 +0100 Subject: [PATCH 0169/1921] vfs: remove File_io_service::register_read_ready Issue #4706 --- repos/gems/src/lib/vfs/audit/vfs_audit.cc | 7 ------- repos/os/include/vfs/file_io_service.h | 3 --- 2 files changed, 10 deletions(-) diff --git a/repos/gems/src/lib/vfs/audit/vfs_audit.cc b/repos/gems/src/lib/vfs/audit/vfs_audit.cc index 12c23c6d03..827e00b4b1 100644 --- a/repos/gems/src/lib/vfs/audit/vfs_audit.cc +++ b/repos/gems/src/lib/vfs/audit/vfs_audit.cc @@ -302,13 +302,6 @@ class Vfs_audit::File_system : public Vfs::File_system return h.audit->fs().ftruncate(h.audit, len); } - void register_read_ready_sigh(Vfs_handle *vfs_handle, Signal_context_capability sigh) override - { - Handle &h = *static_cast(vfs_handle); - h.sync_state(); - return h.audit->fs().register_read_ready_sigh(h.audit, sigh); - } - bool queue_sync(Vfs_handle *vfs_handle) override { Handle &h = *static_cast(vfs_handle); diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index 39b8bd5219..c71712eb7c 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -96,9 +96,6 @@ struct Vfs::File_io_service : Interface virtual Ftruncate_result ftruncate(Vfs_handle *vfs_handle, file_size len) = 0; - virtual void register_read_ready_sigh(Vfs_handle *, Signal_context_capability) - { } - /********** ** Sync ** **********/ From 1aba073e32e70c629ab73bc3dbe9a94e50234669 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 20 Dec 2022 12:05:01 +0100 Subject: [PATCH 0170/1921] vfs: remove File_io_service::General_error Issue #4706 --- repos/os/include/vfs/file_io_service.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index c71712eb7c..596cb78343 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -23,9 +23,6 @@ namespace Vfs { struct File_io_service; } struct Vfs::File_io_service : Interface { - enum General_error { ERR_FD_INVALID, NUM_GENERAL_ERRORS }; - - /*********** ** Write ** ***********/ @@ -89,9 +86,8 @@ struct Vfs::File_io_service : Interface ** Ftruncate ** ***************/ - enum Ftruncate_result { FTRUNCATE_ERR_NO_PERM = NUM_GENERAL_ERRORS, - FTRUNCATE_ERR_INTERRUPT, FTRUNCATE_ERR_NO_SPACE, - FTRUNCATE_OK }; + enum Ftruncate_result { FTRUNCATE_ERR_NO_PERM, FTRUNCATE_ERR_INTERRUPT, + FTRUNCATE_ERR_NO_SPACE, FTRUNCATE_OK }; virtual Ftruncate_result ftruncate(Vfs_handle *vfs_handle, file_size len) = 0; From ba78cf72ae9cf0d380a5172da9151a4e76a8ba90 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 20 Dec 2022 12:11:27 +0100 Subject: [PATCH 0171/1921] vfs: remove Read_result::READ_ERR_AGAIN The condition is covered by READ_ERR_WOULD_BLOCK. Issue #4706 --- repos/gems/include/cbe/vfs/io_job.h | 7 +++---- repos/gems/src/app/cbe_tester/crypto.cc | 2 -- repos/gems/src/app/cbe_tester/main.cc | 1 - repos/gems/src/app/cbe_tester/trust_anchor.cc | 3 --- repos/gems/src/app/vfs_replay/component.cc | 7 +++---- repos/gems/src/lib/vfs/cbe/io_job.h | 7 +++---- repos/gems/src/lib/vfs/cbe/vfs.cc | 1 - repos/libports/src/lib/libc/vfs_plugin.cc | 2 -- repos/os/include/os/vfs.h | 2 +- repos/os/include/vfs/file_io_service.h | 7 +++---- repos/os/include/vfs/print.h | 1 - repos/os/src/server/vfs/node.h | 1 - repos/os/src/server/vfs_block/job.h | 7 +++---- repos/os/src/test/vfs_stress/main.cc | 2 -- 14 files changed, 16 insertions(+), 34 deletions(-) diff --git a/repos/gems/include/cbe/vfs/io_job.h b/repos/gems/include/cbe/vfs/io_job.h index f89e5bd64d..54b2fe1ee7 100644 --- a/repos/gems/include/cbe/vfs/io_job.h +++ b/repos/gems/include/cbe/vfs/io_job.h @@ -116,10 +116,9 @@ namespace Util { _handle.fs().complete_read(&_handle, _data + _current_offset, _current_count, out); - if ( result == Result::READ_QUEUED - || result == Result::READ_ERR_INTERRUPT - || result == Result::READ_ERR_AGAIN - || result == Result::READ_ERR_WOULD_BLOCK) { + if (result == Result::READ_QUEUED + || result == Result::READ_ERR_INTERRUPT + || result == Result::READ_ERR_WOULD_BLOCK) { return progress; } else diff --git a/repos/gems/src/app/cbe_tester/crypto.cc b/repos/gems/src/app/cbe_tester/crypto.cc index 9a676e7bd9..889afede86 100644 --- a/repos/gems/src/app/cbe_tester/crypto.cc +++ b/repos/gems/src/app/cbe_tester/crypto.cc @@ -241,7 +241,6 @@ void Crypto::_execute_decrypt_block(Job &job, switch (result) { case Read_result::READ_QUEUED: return; case Read_result::READ_ERR_INTERRUPT: return; - case Read_result::READ_ERR_AGAIN: return; case Read_result::READ_ERR_WOULD_BLOCK: return; default: break; } @@ -307,7 +306,6 @@ void Crypto::_execute_encrypt_block(Job &job, switch (result) { case Read_result::READ_QUEUED: return; case Read_result::READ_ERR_INTERRUPT: return; - case Read_result::READ_ERR_AGAIN: return; case Read_result::READ_ERR_WOULD_BLOCK: return; default: break; } diff --git a/repos/gems/src/app/cbe_tester/main.cc b/repos/gems/src/app/cbe_tester/main.cc index a46ec86051..6d80476ae0 100644 --- a/repos/gems/src/app/cbe_tester/main.cc +++ b/repos/gems/src/app/cbe_tester/main.cc @@ -313,7 +313,6 @@ class Vfs_block_io_job switch (result) { case Result::READ_QUEUED: case Result::READ_ERR_INTERRUPT: - case Result::READ_ERR_AGAIN: case Result::READ_ERR_WOULD_BLOCK: return; diff --git a/repos/gems/src/app/cbe_tester/trust_anchor.cc b/repos/gems/src/app/cbe_tester/trust_anchor.cc index b281370f98..8f90413202 100644 --- a/repos/gems/src/app/cbe_tester/trust_anchor.cc +++ b/repos/gems/src/app/cbe_tester/trust_anchor.cc @@ -93,7 +93,6 @@ void Trust_anchor::_execute_write_read_operation(Vfs_handle &file, switch (result) { case Read_result::READ_QUEUED: case Read_result::READ_ERR_INTERRUPT: - case Read_result::READ_ERR_AGAIN: case Read_result::READ_ERR_WOULD_BLOCK: return; @@ -203,7 +202,6 @@ void Trust_anchor::_execute_write_operation(Vfs_handle &file, switch (result) { case Read_result::READ_QUEUED: case Read_result::READ_ERR_INTERRUPT: - case Read_result::READ_ERR_AGAIN: case Read_result::READ_ERR_WOULD_BLOCK: return; @@ -267,7 +265,6 @@ void Trust_anchor::_execute_read_operation(Vfs_handle &file, switch (result) { case Read_result::READ_QUEUED: case Read_result::READ_ERR_INTERRUPT: - case Read_result::READ_ERR_AGAIN: case Read_result::READ_ERR_WOULD_BLOCK: return; diff --git a/repos/gems/src/app/vfs_replay/component.cc b/repos/gems/src/app/vfs_replay/component.cc index 50205300d8..03e64716a7 100644 --- a/repos/gems/src/app/vfs_replay/component.cc +++ b/repos/gems/src/app/vfs_replay/component.cc @@ -180,10 +180,9 @@ class Vfs_replay _vfs_handle->fs().complete_read(_vfs_handle, _read_buffer.local_addr(), request.current_count, out); - if ( result == Result::READ_QUEUED - || result == Result::READ_ERR_INTERRUPT - || result == Result::READ_ERR_AGAIN - || result == Result::READ_ERR_WOULD_BLOCK) { + if (result == Result::READ_QUEUED + || result == Result::READ_ERR_INTERRUPT + || result == Result::READ_ERR_WOULD_BLOCK) { return progress; } diff --git a/repos/gems/src/lib/vfs/cbe/io_job.h b/repos/gems/src/lib/vfs/cbe/io_job.h index 3f93d67e8c..05ff017f96 100644 --- a/repos/gems/src/lib/vfs/cbe/io_job.h +++ b/repos/gems/src/lib/vfs/cbe/io_job.h @@ -92,10 +92,9 @@ namespace Vfs_cbe { _handle.fs().complete_read(&_handle, data + _current_offset, _current_count, out); - if ( result == Result::READ_QUEUED - || result == Result::READ_ERR_INTERRUPT - || result == Result::READ_ERR_AGAIN - || result == Result::READ_ERR_WOULD_BLOCK) { + if (result == Result::READ_QUEUED + || result == Result::READ_ERR_INTERRUPT + || result == Result::READ_ERR_WOULD_BLOCK) { return progress; } else diff --git a/repos/gems/src/lib/vfs/cbe/vfs.cc b/repos/gems/src/lib/vfs/cbe/vfs.cc index 2eff57abd0..d24684f5f4 100644 --- a/repos/gems/src/lib/vfs/cbe/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe/vfs.cc @@ -1344,7 +1344,6 @@ class Vfs_cbe::Wrapper switch (r) { case Result::READ_QUEUED: [[fallthrough]]; case Result::READ_ERR_INTERRUPT: [[fallthrough]]; - case Result::READ_ERR_AGAIN: [[fallthrough]]; case Result::READ_ERR_WOULD_BLOCK: return true; default: break; } diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index 9d3f6155fa..3a782fe162 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -997,7 +997,6 @@ ssize_t Libc::Vfs_plugin::read(File_descriptor *fd, void *buf, Plugin::resume_all(); switch (out_result) { - case Result::READ_ERR_AGAIN: return Errno(EAGAIN); case Result::READ_ERR_WOULD_BLOCK: return Errno(EWOULDBLOCK); case Result::READ_ERR_INVALID: return Errno(EINVAL); case Result::READ_ERR_IO: return Errno(EIO); @@ -2217,7 +2216,6 @@ ssize_t Libc::Vfs_plugin::readlink(const char *link_path, char *buf, ::size_t bu switch (out_result) { case Result::READ_QUEUED: return Fn::INCOMPLETE;; - case Result::READ_ERR_AGAIN: result_errno = EAGAIN; break; case Result::READ_ERR_WOULD_BLOCK: result_errno = EWOULDBLOCK; break; case Result::READ_ERR_INVALID: result_errno = EINVAL; break; case Result::READ_ERR_IO: result_errno = EIO; break; diff --git a/repos/os/include/os/vfs.h b/repos/os/include/os/vfs.h index 97fccc3340..eae9aea560 100644 --- a/repos/os/include/os/vfs.h +++ b/repos/os/include/os/vfs.h @@ -478,7 +478,7 @@ class Genode::Readonly_file : public File }; /* - * XXX handle READ_ERR_AGAIN, READ_ERR_WOULD_BLOCK, READ_QUEUED + * XXX handle READ_ERR_WOULD_BLOCK, READ_QUEUED */ if (result != Vfs::File_io_service::READ_OK) diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index 596cb78343..1bd997578c 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -39,10 +39,9 @@ struct Vfs::File_io_service : Interface ** Read ** **********/ - enum Read_result { READ_ERR_AGAIN, READ_ERR_WOULD_BLOCK, - READ_ERR_INVALID, READ_ERR_IO, - READ_ERR_INTERRUPT, READ_QUEUED, - READ_OK }; + enum Read_result { READ_ERR_WOULD_BLOCK, READ_ERR_INVALID, + READ_ERR_IO, READ_ERR_INTERRUPT, + READ_QUEUED, READ_OK }; /** * Queue read operation diff --git a/repos/os/include/vfs/print.h b/repos/os/include/vfs/print.h index eea316a726..e9ec0d7f1a 100644 --- a/repos/os/include/vfs/print.h +++ b/repos/os/include/vfs/print.h @@ -149,7 +149,6 @@ static inline void print(Genode::Output &output, Vfs::File_io_service::Read_resu switch (r) { CASE_PRINT(READ_OK); - CASE_PRINT(READ_ERR_AGAIN); CASE_PRINT(READ_ERR_WOULD_BLOCK); CASE_PRINT(READ_ERR_INVALID); CASE_PRINT(READ_ERR_IO); diff --git a/repos/os/src/server/vfs/node.h b/repos/os/src/server/vfs/node.h index 5ccd38c5f9..7b731fe52a 100644 --- a/repos/os/src/server/vfs/node.h +++ b/repos/os/src/server/vfs/node.h @@ -392,7 +392,6 @@ class Vfs_server::Io_node : public Vfs_server::Node, break; case Read_result::READ_ERR_WOULD_BLOCK: - case Read_result::READ_ERR_AGAIN: case Read_result::READ_ERR_INTERRUPT: case Read_result::READ_QUEUED: break; diff --git a/repos/os/src/server/vfs_block/job.h b/repos/os/src/server/vfs_block/job.h index e9273fb4cc..d6a2f57345 100644 --- a/repos/os/src/server/vfs_block/job.h +++ b/repos/os/src/server/vfs_block/job.h @@ -88,10 +88,9 @@ namespace Vfs_block { _handle.fs().complete_read(&_handle, data + current_offset, current_count, out); - if ( result == Result::READ_QUEUED - || result == Result::READ_ERR_INTERRUPT - || result == Result::READ_ERR_AGAIN - || result == Result::READ_ERR_WOULD_BLOCK) { + if (result == Result::READ_QUEUED + || result == Result::READ_ERR_INTERRUPT + || result == Result::READ_ERR_WOULD_BLOCK) { return progress; } else diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index 95458576e9..628488b516 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -112,8 +112,6 @@ inline void assert_read(Vfs::File_io_service::Read_result r) case Result::READ_OK: return; case Result::READ_QUEUED: error("READ_QUEUED"); break; - case Result::READ_ERR_AGAIN: - error("READ_ERR_AGAIN"); break; case Result::READ_ERR_WOULD_BLOCK: error("READ_ERR_WOULD_BLOCK"); break; case Result::READ_ERR_INVALID: From 9a2c03d2c6f0615cb15e2230b74fd9eb5a491eac Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 20 Dec 2022 12:15:14 +0100 Subject: [PATCH 0172/1921] vfs: remove Read_result::READ_ERR_INTERRUPT The error condition was too vague and thereby remained unused in practice. Issue #4706 --- repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc | 2 +- repos/gems/include/cbe/vfs/io_job.h | 1 - repos/gems/src/app/cbe_tester/crypto.cc | 2 -- repos/gems/src/app/cbe_tester/main.cc | 1 - repos/gems/src/app/cbe_tester/trust_anchor.cc | 3 --- repos/gems/src/app/vfs_replay/component.cc | 1 - repos/gems/src/lib/vfs/cbe/io_job.h | 1 - repos/gems/src/lib/vfs/cbe/vfs.cc | 1 - repos/libports/src/lib/libc/vfs_plugin.cc | 4 +--- repos/os/include/vfs/file_io_service.h | 4 ++-- repos/os/include/vfs/print.h | 1 - repos/os/src/server/vfs/node.h | 1 - repos/os/src/server/vfs_block/job.h | 1 - repos/os/src/test/vfs_stress/main.cc | 2 -- 14 files changed, 4 insertions(+), 21 deletions(-) diff --git a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc index 82b5e0c8df..dd6784a4bb 100644 --- a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc +++ b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc @@ -139,7 +139,7 @@ class Vfs::Rump_file_system : public File_system case EWOULDBLOCK: return READ_ERR_WOULD_BLOCK; case EINVAL: return READ_ERR_INVALID; case EIO: return READ_ERR_IO; - case EINTR: return READ_ERR_INTERRUPT; + case EINTR: return READ_ERR_IO; default: Genode::error(__func__, ": unhandled rump error ", errno); return READ_ERR_IO; diff --git a/repos/gems/include/cbe/vfs/io_job.h b/repos/gems/include/cbe/vfs/io_job.h index 54b2fe1ee7..f3bf301376 100644 --- a/repos/gems/include/cbe/vfs/io_job.h +++ b/repos/gems/include/cbe/vfs/io_job.h @@ -117,7 +117,6 @@ namespace Util { _data + _current_offset, _current_count, out); if (result == Result::READ_QUEUED - || result == Result::READ_ERR_INTERRUPT || result == Result::READ_ERR_WOULD_BLOCK) { return progress; } else diff --git a/repos/gems/src/app/cbe_tester/crypto.cc b/repos/gems/src/app/cbe_tester/crypto.cc index 889afede86..c74d861568 100644 --- a/repos/gems/src/app/cbe_tester/crypto.cc +++ b/repos/gems/src/app/cbe_tester/crypto.cc @@ -240,7 +240,6 @@ void Crypto::_execute_decrypt_block(Job &job, switch (result) { case Read_result::READ_QUEUED: return; - case Read_result::READ_ERR_INTERRUPT: return; case Read_result::READ_ERR_WOULD_BLOCK: return; default: break; } @@ -305,7 +304,6 @@ void Crypto::_execute_encrypt_block(Job &job, switch (result) { case Read_result::READ_QUEUED: return; - case Read_result::READ_ERR_INTERRUPT: return; case Read_result::READ_ERR_WOULD_BLOCK: return; default: break; } diff --git a/repos/gems/src/app/cbe_tester/main.cc b/repos/gems/src/app/cbe_tester/main.cc index 6d80476ae0..aa66093742 100644 --- a/repos/gems/src/app/cbe_tester/main.cc +++ b/repos/gems/src/app/cbe_tester/main.cc @@ -312,7 +312,6 @@ class Vfs_block_io_job switch (result) { case Result::READ_QUEUED: - case Result::READ_ERR_INTERRUPT: case Result::READ_ERR_WOULD_BLOCK: return; diff --git a/repos/gems/src/app/cbe_tester/trust_anchor.cc b/repos/gems/src/app/cbe_tester/trust_anchor.cc index 8f90413202..005739a079 100644 --- a/repos/gems/src/app/cbe_tester/trust_anchor.cc +++ b/repos/gems/src/app/cbe_tester/trust_anchor.cc @@ -92,7 +92,6 @@ void Trust_anchor::_execute_write_read_operation(Vfs_handle &file, switch (result) { case Read_result::READ_QUEUED: - case Read_result::READ_ERR_INTERRUPT: case Read_result::READ_ERR_WOULD_BLOCK: return; @@ -201,7 +200,6 @@ void Trust_anchor::_execute_write_operation(Vfs_handle &file, switch (result) { case Read_result::READ_QUEUED: - case Read_result::READ_ERR_INTERRUPT: case Read_result::READ_ERR_WOULD_BLOCK: return; @@ -264,7 +262,6 @@ void Trust_anchor::_execute_read_operation(Vfs_handle &file, switch (result) { case Read_result::READ_QUEUED: - case Read_result::READ_ERR_INTERRUPT: case Read_result::READ_ERR_WOULD_BLOCK: return; diff --git a/repos/gems/src/app/vfs_replay/component.cc b/repos/gems/src/app/vfs_replay/component.cc index 03e64716a7..20b5ed2f31 100644 --- a/repos/gems/src/app/vfs_replay/component.cc +++ b/repos/gems/src/app/vfs_replay/component.cc @@ -181,7 +181,6 @@ class Vfs_replay _read_buffer.local_addr(), request.current_count, out); if (result == Result::READ_QUEUED - || result == Result::READ_ERR_INTERRUPT || result == Result::READ_ERR_WOULD_BLOCK) { return progress; } diff --git a/repos/gems/src/lib/vfs/cbe/io_job.h b/repos/gems/src/lib/vfs/cbe/io_job.h index 05ff017f96..5c6fe7400c 100644 --- a/repos/gems/src/lib/vfs/cbe/io_job.h +++ b/repos/gems/src/lib/vfs/cbe/io_job.h @@ -93,7 +93,6 @@ namespace Vfs_cbe { data + _current_offset, _current_count, out); if (result == Result::READ_QUEUED - || result == Result::READ_ERR_INTERRUPT || result == Result::READ_ERR_WOULD_BLOCK) { return progress; } else diff --git a/repos/gems/src/lib/vfs/cbe/vfs.cc b/repos/gems/src/lib/vfs/cbe/vfs.cc index d24684f5f4..fbb13f1328 100644 --- a/repos/gems/src/lib/vfs/cbe/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe/vfs.cc @@ -1343,7 +1343,6 @@ class Vfs_cbe::Wrapper using Result = Vfs::File_io_service::Read_result; switch (r) { case Result::READ_QUEUED: [[fallthrough]]; - case Result::READ_ERR_INTERRUPT: [[fallthrough]]; case Result::READ_ERR_WOULD_BLOCK: return true; default: break; } diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index 3a782fe162..f1f8d2f43c 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -1000,7 +1000,6 @@ ssize_t Libc::Vfs_plugin::read(File_descriptor *fd, void *buf, case Result::READ_ERR_WOULD_BLOCK: return Errno(EWOULDBLOCK); case Result::READ_ERR_INVALID: return Errno(EINVAL); case Result::READ_ERR_IO: return Errno(EIO); - case Result::READ_ERR_INTERRUPT: return Errno(EINTR); case Result::READ_OK: break; case Result::READ_QUEUED: /* handled above, so never reached */ break; @@ -2219,8 +2218,7 @@ ssize_t Libc::Vfs_plugin::readlink(const char *link_path, char *buf, ::size_t bu case Result::READ_ERR_WOULD_BLOCK: result_errno = EWOULDBLOCK; break; case Result::READ_ERR_INVALID: result_errno = EINVAL; break; case Result::READ_ERR_IO: result_errno = EIO; break; - case Result::READ_ERR_INTERRUPT: result_errno = EINTR; break; - case Result::READ_OK: succeeded = true; break; + case Result::READ_OK: succeeded = true; break; }; handle->close(); } break; diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index 1bd997578c..9da8fa56df 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -40,8 +40,8 @@ struct Vfs::File_io_service : Interface **********/ enum Read_result { READ_ERR_WOULD_BLOCK, READ_ERR_INVALID, - READ_ERR_IO, READ_ERR_INTERRUPT, - READ_QUEUED, READ_OK }; + READ_ERR_IO, READ_QUEUED, + READ_OK }; /** * Queue read operation diff --git a/repos/os/include/vfs/print.h b/repos/os/include/vfs/print.h index e9ec0d7f1a..3a04c35dae 100644 --- a/repos/os/include/vfs/print.h +++ b/repos/os/include/vfs/print.h @@ -152,7 +152,6 @@ static inline void print(Genode::Output &output, Vfs::File_io_service::Read_resu CASE_PRINT(READ_ERR_WOULD_BLOCK); CASE_PRINT(READ_ERR_INVALID); CASE_PRINT(READ_ERR_IO); - CASE_PRINT(READ_ERR_INTERRUPT); CASE_PRINT(READ_QUEUED); } diff --git a/repos/os/src/server/vfs/node.h b/repos/os/src/server/vfs/node.h index 7b731fe52a..beff1ac002 100644 --- a/repos/os/src/server/vfs/node.h +++ b/repos/os/src/server/vfs/node.h @@ -392,7 +392,6 @@ class Vfs_server::Io_node : public Vfs_server::Node, break; case Read_result::READ_ERR_WOULD_BLOCK: - case Read_result::READ_ERR_INTERRUPT: case Read_result::READ_QUEUED: break; } diff --git a/repos/os/src/server/vfs_block/job.h b/repos/os/src/server/vfs_block/job.h index d6a2f57345..3e0d729f74 100644 --- a/repos/os/src/server/vfs_block/job.h +++ b/repos/os/src/server/vfs_block/job.h @@ -89,7 +89,6 @@ namespace Vfs_block { data + current_offset, current_count, out); if (result == Result::READ_QUEUED - || result == Result::READ_ERR_INTERRUPT || result == Result::READ_ERR_WOULD_BLOCK) { return progress; } else diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index 628488b516..a1d14d7453 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -118,8 +118,6 @@ inline void assert_read(Vfs::File_io_service::Read_result r) error("READ_ERR_INVALID"); break; case Result::READ_ERR_IO: error("READ_ERR_IO"); break; - case Result::READ_ERR_INTERRUPT: - error("READ_ERR_INTERRUPT"); break; } throw Exception(); } From 782fad0b418487fa4432227a9c3a2f234a4aa87f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 20 Dec 2022 14:21:08 +0100 Subject: [PATCH 0173/1921] vfs/lwip: remove 'blocked_handles' queue The 'blocked_handles' queue was used to notify the VFS user via the 'io_progress_response' mechanism. This is now covered by the 'wakeup_vfs_user' interface introduced in issue #4697. Issue #4706 --- repos/libports/src/lib/vfs/lwip/vfs.cc | 61 ++++++-------------------- 1 file changed, 14 insertions(+), 47 deletions(-) diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index b8da2e6e27..0a7731179c 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -475,25 +475,19 @@ Lwip::Lwip_file_handle::~Lwip_file_handle() Lwip::Read_result Lwip::Lwip_file_handle::read(char *dst, file_size count, file_size &out_count) { - Lwip::Read_result result = Read_result::READ_ERR_INVALID; - if (socket) { - result = socket->read(*this, dst, count, out_count); - if (result == Read_result::READ_QUEUED && !_io_progress_waiter.enqueued()) - socket->io_progress_queue.enqueue(_io_progress_waiter); - } - return result; + if (!socket) + return Read_result::READ_ERR_INVALID; + + return socket->read(*this, dst, count, out_count); } Lwip::Write_result Lwip::Lwip_file_handle::write(char const *src, file_size count, - file_size &out_count) + file_size &out_count) { - Write_result result = Write_result::WRITE_ERR_INVALID; - if (socket) { - result = socket->write(*this, src, count, out_count); - if (result == Write_result::WRITE_ERR_WOULD_BLOCK && !_io_progress_waiter.enqueued()) - socket->io_progress_queue.enqueue(_io_progress_waiter); - } - return result; + if (!socket) + return Write_result::WRITE_ERR_INVALID; + + return socket->write(*this, src, count, out_count); } bool Lwip::Lwip_file_handle::notify_read_ready() @@ -1771,6 +1765,8 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, */ struct Vfs_netif : Lwip::Nic_netif { + Vfs::Env::User &_vfs_user; + Tcp_proto_dir tcp_dir; Udp_proto_dir udp_dir; @@ -1779,13 +1775,12 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, typedef Genode::Fifo_element Handle_element; typedef Genode::Fifo Handle_queue; - Handle_queue blocked_handles { }; - Vfs_netif(Vfs::Env &vfs_env, Genode::Xml_node config, Lwip::Nic_netif::Wakeup_scheduler &wakeup_scheduler) : Lwip::Nic_netif(vfs_env.env(), vfs_env.alloc(), config, wakeup_scheduler), + _vfs_user(vfs_env.user()), tcp_dir(vfs_env), udp_dir(vfs_env) { } @@ -1795,14 +1790,6 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, status_callback(); } - void enqueue(Vfs_handle &handle) - { - Handle_element *elem = new (handle.alloc()) - Handle_element(handle); - - blocked_handles.enqueue(*elem); - } - /** * Wake the application when the interface changes. */ @@ -1811,25 +1798,9 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, tcp_dir.notify(); udp_dir.notify(); - nameserver_handles.for_each([&] (Lwip_nameserver_handle &h) { - h.io_progress_response(); }); - - blocked_handles.dequeue_all([] (Handle_element &elem) { - Vfs_handle &handle = elem.object(); - destroy(elem.object().alloc(), &elem); - handle.io_progress_response(); - }); + _vfs_user.wakeup_vfs_user(); } - void drop(Vfs_handle &handle) - { - blocked_handles.for_each([&] (Handle_element &elem) { - if (&elem.object() == &handle) { - blocked_handles.remove(elem); - destroy(elem.object().alloc(), &elem); - } - }); - } } _netif; /** @@ -2028,9 +1999,6 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, { Socket_dir *socket = nullptr; - /* if the inteface is down this handle may be queued */ - _netif.drop(*vfs_handle); - if (Lwip_handle *handle = dynamic_cast(vfs_handle)) { if (Lwip_file_handle *file_handle = dynamic_cast(handle)) { socket = file_handle->socket; @@ -2094,7 +2062,7 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, /** * All reads are unavailable while the network is down */ - bool queue_read(Vfs_handle *vfs_handle, file_size) override + bool queue_read(Vfs_handle *, file_size) override { if (_netif.ready()) return true; @@ -2106,7 +2074,6 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, _read_blocked_warning_printed_once = true; } - _netif.enqueue(*vfs_handle); return false; } From 767632e1af41534718c47b74ffb395f9a020ee28 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 3 Jan 2023 09:53:25 +0100 Subject: [PATCH 0174/1921] dde_linux: remove leftovers of legacy fec_nic_drv Some relicts in `repos/dde_linux/lib`. Ref #4651 --- .../lib/import/import-fec_nic_include.mk | 5 --- repos/dde_linux/lib/mk/fec_nic_include.mk | 35 ------------------- 2 files changed, 40 deletions(-) delete mode 100644 repos/dde_linux/lib/import/import-fec_nic_include.mk delete mode 100644 repos/dde_linux/lib/mk/fec_nic_include.mk diff --git a/repos/dde_linux/lib/import/import-fec_nic_include.mk b/repos/dde_linux/lib/import/import-fec_nic_include.mk deleted file mode 100644 index 7c410190c4..0000000000 --- a/repos/dde_linux/lib/import/import-fec_nic_include.mk +++ /dev/null @@ -1,5 +0,0 @@ -LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/nic/fec -SRC_DIR := $(REP_DIR)/src/drivers/nic/fec -INC_DIR += $(LX_CONTRIB_DIR)/drivers/net/ethernet/freescale -INC_DIR += $(LIB_CACHE_DIR)/fec_nic_include/include/include/include -CC_OPT += -U__linux__ -D__KERNEL__ diff --git a/repos/dde_linux/lib/mk/fec_nic_include.mk b/repos/dde_linux/lib/mk/fec_nic_include.mk deleted file mode 100644 index e620915a9a..0000000000 --- a/repos/dde_linux/lib/mk/fec_nic_include.mk +++ /dev/null @@ -1,35 +0,0 @@ -# -# Pseudo library to generate a symlink for each header file included by the -# contrib code. Each symlink points to the same 'lx_emul.h' file, which -# provides our emulation of the Linux kernel API. -# - -ifeq ($(called_from_lib_mk),yes) - -LX_CONTRIB_DIR := $(call select_from_ports,dde_linux)/src/drivers/nic/fec -LX_EMUL_H := $(REP_DIR)/src/drivers/nic/fec/lx_emul.h - -# -# Determine the header files included by the contrib code. For each -# of these header files we create a symlink to 'lx_emul.h'. -# -SCAN_DIRS := $(addprefix $(LX_CONTRIB_DIR)/include/, asm-generic linux net uapi) \ - $(addprefix $(LX_CONTRIB_DIR)/, drivers net) -GEN_INCLUDES := $(shell grep -rIh "^\#include .*" $(SCAN_DIRS) |\ - sed "s/^\#include [^<\"]*[<\"]\([^>\"]*\)[>\"].*/\1/" |\ - sort | uniq) - -# -# Put Linux headers in 'GEN_INC' dir, since some include use "../../" paths use -# three level include hierarchy -# -GEN_INC := $(shell pwd)/include/include/include -GEN_INCLUDES := $(addprefix $(GEN_INC)/,$(GEN_INCLUDES)) - -all: $(GEN_INCLUDES) - -$(GEN_INCLUDES): - $(VERBOSE)mkdir -p $(dir $@) - $(VERBOSE)ln -sf $(LX_EMUL_H) $@ - -endif From bb904b9166075f2380e339251a90a37031631053 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 21 Dec 2022 14:51:48 +0100 Subject: [PATCH 0175/1921] vfs: propagate I/O activity via 'wakeup_vfs_user' This commit supplements the various I/O signal handlers of the VFS plugins with calls of the new 'Vfs::Env::User::wakeup_vfs_user' interface, which will subsequently replace the old 'Io_progress_handler' (issue #4697). Issue #4706 --- repos/os/src/lib/vfs/block_file_system.h | 2 +- repos/os/src/lib/vfs/fs_file_system.h | 1 + repos/os/src/lib/vfs/rom_file_system.h | 6 +++++- repos/os/src/lib/vfs/tap/nic_file_system.h | 3 +++ repos/os/src/lib/vfs/tap/uplink_client_base.h | 9 ++++++++ repos/os/src/lib/vfs/tap/uplink_file_system.h | 3 ++- repos/os/src/lib/vfs/tap/vfs_tap.cc | 13 +++++++----- repos/os/src/lib/vfs/terminal_file_system.h | 21 ++++++++++++++----- 8 files changed, 45 insertions(+), 13 deletions(-) diff --git a/repos/os/src/lib/vfs/block_file_system.h b/repos/os/src/lib/vfs/block_file_system.h index ef4f1df033..f2ec733040 100644 --- a/repos/os/src/lib/vfs/block_file_system.h +++ b/repos/os/src/lib/vfs/block_file_system.h @@ -438,7 +438,7 @@ struct Vfs::Block_file_system::Local_factory : File_system_factory Genode::Io_signal_handler _block_signal_handler { _env.env().ep(), *this, &Local_factory::_handle_block_signal }; - void _handle_block_signal() { } + void _handle_block_signal() { _env.user().wakeup_vfs_user(); } Data_file_system _data_fs; diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index b5715da148..0383288622 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -585,6 +585,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io _congested_handles.dequeue_all([] (Fs_vfs_handle &handle) { handle.io_progress_response(); }); + _env.user().wakeup_vfs_user(); } Genode::Io_signal_handler _signal_handler { diff --git a/repos/os/src/lib/vfs/rom_file_system.h b/repos/os/src/lib/vfs/rom_file_system.h index b3e720c351..69851d0b23 100644 --- a/repos/os/src/lib/vfs/rom_file_system.h +++ b/repos/os/src/lib/vfs/rom_file_system.h @@ -29,6 +29,8 @@ class Vfs::Rom_file_system : public Single_file_system Genode::Env &_env; + Vfs::Env::User &_vfs_user; + typedef String<64> Label; Label const _label; @@ -125,6 +127,8 @@ class Vfs::Rom_file_system : public Single_file_system { _handle_registry.for_each([] (Registered_watch_handle &handle) { handle.watch_response(); }); + + _vfs_user.wakeup_vfs_user(); } Genode::Constructible> @@ -137,7 +141,7 @@ class Vfs::Rom_file_system : public Single_file_system : Single_file_system(Node_type::CONTINUOUS_FILE, name(), Node_rwx::ro(), config), - _env(env.env()), + _env(env.env()), _vfs_user(env.user()), /* use 'label' attribute if present, fall back to 'name' if not */ _label(config.attribute_value("label", diff --git a/repos/os/src/lib/vfs/tap/nic_file_system.h b/repos/os/src/lib/vfs/tap/nic_file_system.h index 3da29955ca..164fc21e86 100644 --- a/repos/os/src/lib/vfs/tap/nic_file_system.h +++ b/repos/os/src/lib/vfs/tap/nic_file_system.h @@ -57,6 +57,7 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle enum { BUF_SIZE = Uplink::Session::QUEUE_SIZE * PKT_SIZE }; Genode::Env &_env; + Vfs::Env::User &_vfs_user; Nic::Packet_allocator _pkt_alloc; Nic::Connection _nic; bool _link_state; @@ -99,6 +100,7 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle public: Nic_vfs_handle(Genode::Env &env, + Vfs::Env::User &vfs_user, Allocator &alloc, Label const &label, Net::Mac_address const &, @@ -107,6 +109,7 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle int flags) : Single_vfs_handle { ds, fs, alloc, flags }, _env(env), + _vfs_user(vfs_user), _pkt_alloc(&alloc), _nic(_env, &_pkt_alloc, BUF_SIZE, BUF_SIZE, label.string()), _link_state(_nic.link_state()) diff --git a/repos/os/src/lib/vfs/tap/uplink_client_base.h b/repos/os/src/lib/vfs/tap/uplink_client_base.h index bcc3809f19..4b2d3224b7 100644 --- a/repos/os/src/lib/vfs/tap/uplink_client_base.h +++ b/repos/os/src/lib/vfs/tap/uplink_client_base.h @@ -41,6 +41,7 @@ class Genode::Uplink_client_base : Noncopyable enum { BUF_SIZE = Uplink::Session::QUEUE_SIZE * PKT_SIZE }; Env &_env; + Vfs::Env::User &_vfs_user; Allocator &_alloc; Label const &_label; Net::Mac_address _drv_mac_addr; @@ -63,6 +64,8 @@ class Genode::Uplink_client_base : Noncopyable if (_custom_conn_rx_ready_to_ack_handler()) _custom_conn_rx_handle_ready_to_ack(); + + _vfs_user.wakeup_vfs_user(); } void _conn_tx_handle_ack_avail() @@ -72,6 +75,8 @@ class Genode::Uplink_client_base : Noncopyable while (_conn->tx()->ack_avail()) { _conn->tx()->release_packet(_conn->tx()->get_acked_packet()); } + + _vfs_user.wakeup_vfs_user(); } void _conn_rx_handle_packet_avail() @@ -81,6 +86,8 @@ class Genode::Uplink_client_base : Noncopyable if (_custom_conn_rx_packet_avail_handler()) _custom_conn_rx_handle_packet_avail(); + + _vfs_user.wakeup_vfs_user(); } @@ -203,11 +210,13 @@ class Genode::Uplink_client_base : Noncopyable public: Uplink_client_base(Env &env, + Vfs::Env::User &vfs_user, Allocator &alloc, Net::Mac_address const &drv_mac_addr, Label const &label) : _env { env }, + _vfs_user { vfs_user }, _alloc { alloc }, _label { label }, _drv_mac_addr { drv_mac_addr } diff --git a/repos/os/src/lib/vfs/tap/uplink_file_system.h b/repos/os/src/lib/vfs/tap/uplink_file_system.h index e921b8ff8a..8654085d40 100644 --- a/repos/os/src/lib/vfs/tap/uplink_file_system.h +++ b/repos/os/src/lib/vfs/tap/uplink_file_system.h @@ -87,6 +87,7 @@ class Vfs::Uplink_file_system::Uplink_vfs_handle : public Single_vfs_handle, public: Uplink_vfs_handle(Genode::Env &env, + Vfs::Env::User &vfs_user, Allocator &alloc, Label const &label, Net::Mac_address const &mac, @@ -94,7 +95,7 @@ class Vfs::Uplink_file_system::Uplink_vfs_handle : public Single_vfs_handle, File_io_service &fs, int flags) : Single_vfs_handle { ds, fs, alloc, flags }, - Uplink_client_base { env, alloc, mac, label } + Uplink_client_base { env, vfs_user, alloc, mac, label } { _drv_handle_link_state(true); } bool notify_read_ready() override diff --git a/repos/os/src/lib/vfs/tap/vfs_tap.cc b/repos/os/src/lib/vfs/tap/vfs_tap.cc index 36f5e73831..f8a0eeb7a2 100644 --- a/repos/os/src/lib/vfs/tap/vfs_tap.cc +++ b/repos/os/src/lib/vfs/tap/vfs_tap.cc @@ -124,12 +124,14 @@ class Vfs::Tap_file_system::Data_file_system : public FS Label const &_label; Net::Mac_address const &_default_mac; Genode::Env &_env; + Vfs::Env::User &_vfs_user; Device_update_handler &_device_update_handler; Handle_registry _handle_registry { }; public: Data_file_system(Genode::Env & env, + Vfs::Env::User & vfs_user, Name const & name, Label const & label, Net::Mac_address const & mac, @@ -137,7 +139,7 @@ class Vfs::Tap_file_system::Data_file_system : public FS : FS(name.string()), _name(name), _label(label), _default_mac(mac), _env(env), - _device_update_handler(handler) + _vfs_user(vfs_user), _device_update_handler(handler) { } /* must only be called if handle has been opened */ @@ -170,7 +172,7 @@ class Vfs::Tap_file_system::Data_file_system : public FS { if (!FS::_single_file(path)) return Open_result::OPEN_ERR_UNACCESSIBLE; - + /* A tap device is exclusive open, thus return error if already opened. */ unsigned handles = 0; _handle_registry.for_each([&handles] (Local_vfs_handle const &) { @@ -180,8 +182,8 @@ class Vfs::Tap_file_system::Data_file_system : public FS try { *out_handle = new (alloc) - Registered_handle(_handle_registry, _env, alloc, _label.string(), - _default_mac, *this, *this, flags); + Registered_handle(_handle_registry, _env, _vfs_user, alloc, + _label.string(), _default_mac, *this, *this, flags); _device_update_handler.device_state_changed(); return Open_result::OPEN_OK; } @@ -206,7 +208,8 @@ struct Vfs::Tap_file_system::Local_factory : File_system_factory, Net::Mac_address const _default_mac; Vfs::Env &_env; - Data_file_system _data_fs { _env.env(), _name, _label, _default_mac, *this }; + Data_file_system _data_fs { _env.env(), _env.user(), _name, _label, + _default_mac, *this }; struct Info { diff --git a/repos/os/src/lib/vfs/terminal_file_system.h b/repos/os/src/lib/vfs/terminal_file_system.h index bd08b2b72f..49574873fa 100644 --- a/repos/os/src/lib/vfs/terminal_file_system.h +++ b/repos/os/src/lib/vfs/terminal_file_system.h @@ -58,6 +58,8 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system Genode::Entrypoint &_ep; + Vfs::Env::User &_vfs_user; + Terminal::Connection &_terminal; Interrupt_handler &_interrupt_handler; @@ -110,6 +112,7 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system struct Terminal_vfs_handle : Single_vfs_handle { Terminal::Connection &_terminal; + Vfs::Env::User &_vfs_user; Read_buffer &_read_buffer; Interrupt_handler &_interrupt_handler; @@ -119,6 +122,7 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system bool blocked = false; Terminal_vfs_handle(Terminal::Connection &terminal, + Vfs::Env::User &vfs_user, Read_buffer &read_buffer, Interrupt_handler &interrupt_handler, Directory_service &ds, @@ -129,6 +133,7 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system : Single_vfs_handle(ds, fs, alloc, flags), _terminal(terminal), + _vfs_user(vfs_user), _read_buffer(read_buffer), _interrupt_handler(interrupt_handler), _raw(raw) @@ -211,11 +216,14 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system handle.read_ready_response(); } }); + + _vfs_user.wakeup_vfs_user(); } public: Data_file_system(Genode::Entrypoint &ep, + Vfs::Env::User &vfs_user, Terminal::Connection &terminal, Name const &name, Interrupt_handler &interrupt_handler, @@ -223,7 +231,7 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system : Single_file_system(Node_type::TRANSACTIONAL_FILE, name.string(), Node_rwx::rw(), Genode::Xml_node("")), - _name(name), _ep(ep), _terminal(terminal), + _name(name), _ep(ep), _vfs_user(vfs_user), _terminal(terminal), _interrupt_handler(interrupt_handler), _raw(raw) { @@ -243,9 +251,9 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system try { *out_handle = new (alloc) - Registered_handle(_handle_registry, _terminal, _read_buffer, - _interrupt_handler, *this, *this, alloc, flags, - _raw); + Registered_handle(_handle_registry, _terminal, _vfs_user, + _read_buffer, _interrupt_handler, + *this, *this, alloc, flags, _raw); return OPEN_OK; } catch (Genode::Out_of_ram) { return OPEN_ERR_OUT_OF_RAM; } @@ -274,11 +282,13 @@ struct Vfs::Terminal_file_system::Local_factory : File_system_factory, Genode::Env &_env; + Vfs::Env::User &_vfs_user; + Terminal::Connection _terminal { _env, _label.string() }; bool const _raw; - Data_file_system _data_fs { _env.ep(), _terminal, _name, *this, _raw }; + Data_file_system _data_fs { _env.ep(), _vfs_user, _terminal, _name, *this, _raw }; struct Info { @@ -336,6 +346,7 @@ struct Vfs::Terminal_file_system::Local_factory : File_system_factory, _label(config.attribute_value("label", Label(""))), _name(name(config)), _env(env.env()), + _vfs_user(env.user()), _raw(config.attribute_value("raw", false)) { _terminal.size_changed_sigh(_size_changed_handler); From f4da21252b0afe233f167264f6f2eef9be057ba9 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 21 Dec 2022 14:57:53 +0100 Subject: [PATCH 0176/1921] cbe_tester: Remove use of Io_response_handler Issue #4706 --- repos/gems/src/app/cbe_tester/crypto.cc | 15 +++----- repos/gems/src/app/cbe_tester/crypto.h | 5 +-- repos/gems/src/app/cbe_tester/main.cc | 35 +++++++++---------- repos/gems/src/app/cbe_tester/trust_anchor.cc | 14 ++------ repos/gems/src/app/cbe_tester/trust_anchor.h | 4 +-- .../gems/src/app/cbe_tester/vfs_utilities.cc | 19 ---------- repos/gems/src/app/cbe_tester/vfs_utilities.h | 20 ----------- 7 files changed, 26 insertions(+), 86 deletions(-) diff --git a/repos/gems/src/app/cbe_tester/crypto.cc b/repos/gems/src/app/cbe_tester/crypto.cc index c74d861568..5162d0ebed 100644 --- a/repos/gems/src/app/cbe_tester/crypto.cc +++ b/repos/gems/src/app/cbe_tester/crypto.cc @@ -43,15 +43,12 @@ Crypto::Key_directory &Crypto::_lookup_key_dir(uint32_t key_id) } -Crypto::Crypto(Vfs::Env &env, - Xml_node const &crypto, - Signal_context_capability sigh) +Crypto::Crypto(Vfs::Env &env, Xml_node const &crypto) : - _env { env }, - _path { crypto.attribute_value("path", String<32>()) }, - _add_key_handle { vfs_open_wo(env, { _path.string(), "/add_key" }) }, - _remove_key_handle { vfs_open_wo(env, { _path.string(), "/remove_key" }) }, - _vfs_io_response_handler { sigh } + _env { env }, + _path { crypto.attribute_value("path", String<32>()) }, + _add_key_handle { vfs_open_wo(env, { _path.string(), "/add_key" }) }, + _remove_key_handle { vfs_open_wo(env, { _path.string(), "/remove_key" }) } { } @@ -89,8 +86,6 @@ Crypto::Result Crypto::add_key(Key const &key) _env, { _path.string(), "/keys/", key.id.value, "/decrypt" }); key_dir.key_id = key.id.value; - key_dir.encrypt_handle->handler(&_vfs_io_response_handler); - key_dir.decrypt_handle->handler(&_vfs_io_response_handler); return Result::SUCCEEDED; } diff --git a/repos/gems/src/app/cbe_tester/crypto.h b/repos/gems/src/app/cbe_tester/crypto.h index 0192fbf426..c3247581c7 100644 --- a/repos/gems/src/app/cbe_tester/crypto.h +++ b/repos/gems/src/app/cbe_tester/crypto.h @@ -72,7 +72,6 @@ class Crypto Genode::String<32> const _path; Vfs::Vfs_handle &_add_key_handle; Vfs::Vfs_handle &_remove_key_handle; - Vfs_io_response_handler _vfs_io_response_handler; Key_directory _key_dirs[2] { { }, { } }; Job _job { }; @@ -92,9 +91,7 @@ class Crypto public: - Crypto(Vfs::Env &env, - Genode::Xml_node const &crypto, - Genode::Signal_context_capability sigh); + Crypto(Vfs::Env &env, Genode::Xml_node const &crypto); bool request_acceptable() const; diff --git a/repos/gems/src/app/cbe_tester/main.cc b/repos/gems/src/app/cbe_tester/main.cc index aa66093742..d4cc9a296c 100644 --- a/repos/gems/src/app/cbe_tester/main.cc +++ b/repos/gems/src/app/cbe_tester/main.cc @@ -571,7 +571,6 @@ class Vfs_block_io : public Block_io String<32> const _path; Vfs::Env &_vfs_env; - Vfs_io_response_handler _vfs_io_response_handler; Vfs::Vfs_handle &_vfs_handle { *_init_vfs_handle(_vfs_env, _path) }; Constructible _job { }; @@ -600,18 +599,13 @@ class Vfs_block_io : public Block_io public: - Vfs_block_io(Vfs::Env &vfs_env, - Xml_node const &block_io, - Signal_context_capability sigh) + Vfs_block_io(Vfs::Env &vfs_env, + Xml_node const &block_io) : - _path { block_io.attribute_value( - "path", String<32> { "" } ) }, - - _vfs_env { vfs_env }, - _vfs_io_response_handler { sigh } - { - _vfs_handle.handler(&_vfs_io_response_handler); - } + _path { block_io.attribute_value( + "path", String<32> { "" } ) }, + _vfs_env { vfs_env } + { } /************** @@ -1602,7 +1596,7 @@ class Command_pool { }; -class Main +class Main : Vfs::Env::User { private: @@ -1610,7 +1604,7 @@ class Main Attached_rom_dataspace _config_rom { _env, "config" }; Verbose_node _verbose_node { _config_rom.xml() }; Heap _heap { _env.ram(), _env.rm() }; - Vfs::Simple_env _vfs_env { _env, _heap, _config_rom.xml().sub_node("vfs") }; + Vfs::Simple_env _vfs_env { _env, _heap, _config_rom.xml().sub_node("vfs"), *this }; Signal_handler
_sigh { _env.ep(), *this, &Main::_execute }; Block_io &_blk_io { _init_blk_io(_config_rom.xml(), _heap, _env, _vfs_env, _sigh) }; Io_buffer _blk_buf { }; @@ -1620,12 +1614,11 @@ class Main Cbe_dump::Library _cbe_dump { }; Cbe_init::Library _cbe_init { }; Benchmark _benchmark { _env }; - Trust_anchor _trust_anchor { _vfs_env, _config_rom.xml().sub_node("trust-anchor"), _sigh }; + Trust_anchor _trust_anchor { _vfs_env, _config_rom.xml().sub_node("trust-anchor") }; Crypto_plain_buffer _crypto_plain_buf { }; Crypto_cipher_buffer _crypto_cipher_buf { }; Crypto _crypto { _vfs_env, - _config_rom.xml().sub_node("crypto"), - _sigh }; + _config_rom.xml().sub_node("crypto") }; Block_io &_init_blk_io(Xml_node const &config, Heap &heap, @@ -1640,13 +1633,17 @@ class Main } if (block_io.attribute("type").has_value("vfs")) { return *new (heap) - Vfs_block_io { - vfs_env, block_io, sigh }; + Vfs_block_io { vfs_env, block_io }; } class Malformed_attribute { }; throw Malformed_attribute { }; } + /** + * Vfs::Env::User interface + */ + void wakeup_vfs_user() override { _sigh.local_submit(); } + template void _handle_pending_blk_io_requests_of_module(MODULE &module, Module_type module_type, diff --git a/repos/gems/src/app/cbe_tester/trust_anchor.cc b/repos/gems/src/app/cbe_tester/trust_anchor.cc index 005739a079..ca7317a851 100644 --- a/repos/gems/src/app/cbe_tester/trust_anchor.cc +++ b/repos/gems/src/app/cbe_tester/trust_anchor.cc @@ -297,20 +297,12 @@ void Trust_anchor::_execute_read_operation(Vfs_handle &file, } -Trust_anchor::Trust_anchor(Vfs::Env &vfs_env, - Xml_node const &xml_node, - Signal_context_capability sigh) +Trust_anchor::Trust_anchor(Vfs::Env &vfs_env, + Xml_node const &xml_node) : _vfs_env { vfs_env }, - _handler { sigh }, _path { xml_node.attribute_value("path", String<128>()) } -{ - _initialize_file.handler(&_handler); - _hashsum_file.handler(&_handler); - _generate_key_file.handler(&_handler); - _encrypt_file.handler(&_handler); - _decrypt_file.handler(&_handler); -} +{ } bool Trust_anchor::request_acceptable() const diff --git a/repos/gems/src/app/cbe_tester/trust_anchor.h b/repos/gems/src/app/cbe_tester/trust_anchor.h index 50bebc4939..4f3e598c52 100644 --- a/repos/gems/src/app/cbe_tester/trust_anchor.h +++ b/repos/gems/src/app/cbe_tester/trust_anchor.h @@ -51,7 +51,6 @@ class Trust_anchor Vfs::Env &_vfs_env; char _read_buf[64]; - Vfs_io_response_handler _handler; Genode::String<128> const _path; Genode::String<128> const _decrypt_path { _path, "/decrypt" }; Vfs::Vfs_handle &_decrypt_file { vfs_open_rw(_vfs_env, { _decrypt_path }) }; @@ -85,8 +84,7 @@ class Trust_anchor public: Trust_anchor(Vfs::Env &vfs_env, - Genode::Xml_node const &xml_node, - Genode::Signal_context_capability sigh); + Genode::Xml_node const &xml_node); bool request_acceptable() const; diff --git a/repos/gems/src/app/cbe_tester/vfs_utilities.cc b/repos/gems/src/app/cbe_tester/vfs_utilities.cc index bddc2e48e5..d75c78e3ec 100644 --- a/repos/gems/src/app/cbe_tester/vfs_utilities.cc +++ b/repos/gems/src/app/cbe_tester/vfs_utilities.cc @@ -18,25 +18,6 @@ using namespace Genode; using namespace Vfs; -/***************************** - ** Vfs_io_response_handler ** - *****************************/ - -Vfs_io_response_handler::Vfs_io_response_handler(Genode::Signal_context_capability sigh) -: - _sigh(sigh) -{ } - - -void Vfs_io_response_handler::read_ready_response() { } - - -void Vfs_io_response_handler::io_progress_response() -{ - Signal_transmitter(_sigh).submit(); -} - - /********************** ** Global functions ** **********************/ diff --git a/repos/gems/src/app/cbe_tester/vfs_utilities.h b/repos/gems/src/app/cbe_tester/vfs_utilities.h index 4f98a48445..25053498d7 100644 --- a/repos/gems/src/app/cbe_tester/vfs_utilities.h +++ b/repos/gems/src/app/cbe_tester/vfs_utilities.h @@ -18,26 +18,6 @@ #include #include -class Vfs_io_response_handler : public Vfs::Io_response_handler -{ - private: - - Genode::Signal_context_capability const _sigh; - - public: - - Vfs_io_response_handler(Genode::Signal_context_capability sigh); - - - /****************************** - ** Vfs::Io_response_handler ** - ******************************/ - - void read_ready_response() override; - - void io_progress_response() override; -}; - Vfs::Vfs_handle &vfs_open(Vfs::Env &vfs_env, Genode::String<128> path, From f56883e238253612e33e7b14def8cdf31d4b1939 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 21 Dec 2022 17:16:09 +0100 Subject: [PATCH 0177/1921] cbe_init_trust_anchor: Remove Io_response_handler Issue #4706 --- .../app/cbe_init_trust_anchor/component.cc | 48 +++++-------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/repos/gems/src/app/cbe_init_trust_anchor/component.cc b/repos/gems/src/app/cbe_init_trust_anchor/component.cc index 1527c4436c..d8272ad1da 100644 --- a/repos/gems/src/app/cbe_init_trust_anchor/component.cc +++ b/repos/gems/src/app/cbe_init_trust_anchor/component.cc @@ -27,7 +27,7 @@ using namespace Genode; -class Main +class Main : Vfs::Env::User { public: @@ -40,8 +40,9 @@ class Main Attached_rom_dataspace _config_rom { _env, "config" }; - Vfs::Simple_env _vfs_env { _env, _heap, _config_rom.xml().sub_node("vfs") }; - Vfs::File_system &_vfs { _vfs_env.root_dir() }; + Vfs::Simple_env _vfs_env { _env, _heap, _config_rom.xml().sub_node("vfs"), *this }; + + Vfs::File_system &_vfs { _vfs_env.root_dir() }; using Passphrase = Genode::String<32 + 1>; @@ -59,23 +60,6 @@ class Main return path; } - struct Io_response_handler : Vfs::Io_response_handler - { - Genode::Signal_context_capability _io_sigh; - - Io_response_handler(Genode::Signal_context_capability io_sigh) - : _io_sigh(io_sigh) { } - - void read_ready_response() override { } - - void io_progress_response() override - { - if (_io_sigh.valid()) { - Genode::Signal_transmitter(_io_sigh).submit(); - } - } - }; - enum class State { WRITE, READ, }; State _state { State::WRITE }; @@ -95,8 +79,6 @@ class Main Vfs::File_system &_vfs; Vfs::Vfs_handle *_vfs_handle; - Io_response_handler &_io_response_handler; - Genode::Constructible _io_job { }; Util::Io_job::Buffer _io_buffer { }; @@ -105,12 +87,10 @@ class Main File(char const *base_path, char const *name, Vfs::File_system &vfs, - Genode::Allocator &alloc, - Io_response_handler &io_response_handler) + Genode::Allocator &alloc) : _vfs { vfs }, - _vfs_handle { nullptr }, - _io_response_handler { io_response_handler } + _vfs_handle { nullptr } { using Result = Vfs::Directory_service::Open_result; @@ -125,8 +105,6 @@ class Main error("could not open '", file_path.string(), "'"); throw Could_not_open_file(); } - - _vfs_handle->handler(&io_response_handler); } ~File() @@ -146,8 +124,6 @@ class Main _io_job.construct(*_vfs_handle, Util::Io_job::Operation::WRITE, _io_buffer, 0); - - _io_response_handler.io_progress_response(); } void queue_read() @@ -159,8 +135,6 @@ class Main _io_job.construct(*_vfs_handle, Util::Io_job::Operation::READ, _io_buffer, 0); - - _io_response_handler.io_progress_response(); } void execute() @@ -223,7 +197,10 @@ class Main _vfs_env.io().commit(); } - Io_response_handler _io_response_handler { _io_handler }; + /** + * Vfs::Env::User interface + */ + void wakeup_vfs_user() override { _io_handler.local_submit(); } public: @@ -243,11 +220,12 @@ class Main String_path ta_dir = _config_ta_dir(_config_rom.xml()); _init_file.construct(ta_dir.string(), "initialize", - _vfs, _vfs_env.alloc(), - _io_response_handler); + _vfs, _vfs_env.alloc()); /* kick-off writing */ _init_file->write_passphrase(passphrase.string()); + + _handle_io(); } }; From 6c79e9505219900ee1166518168f589effc89a29 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 21 Dec 2022 17:31:23 +0100 Subject: [PATCH 0178/1921] vfs_replay: Remove Io_response_handler Note that this change has not been tested as we have no ready-to-use run script stressing this component. Issue #4706 --- repos/gems/src/app/vfs_replay/component.cc | 37 +++++++--------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/repos/gems/src/app/vfs_replay/component.cc b/repos/gems/src/app/vfs_replay/component.cc index 20b5ed2f31..593494749d 100644 --- a/repos/gems/src/app/vfs_replay/component.cc +++ b/repos/gems/src/app/vfs_replay/component.cc @@ -420,22 +420,6 @@ class Vfs_replay _io.commit(); } - struct Io_response_handler : Vfs::Io_response_handler - { - Genode::Signal_context_capability sigh { }; - - void read_ready_response() override { } - - void io_progress_response() override - { - if (sigh.valid()) { - Genode::Signal_transmitter(sigh).submit(); - } - } - }; - - Io_response_handler _io_response_handler { }; - public: Vfs_replay(Env &env, Vfs::File_system &vfs, Vfs::Env::Io &io, @@ -456,8 +440,7 @@ class Vfs_replay _write_buffer.size()); } - void kick_off(Genode::Allocator &alloc, char const *file, - Genode::Signal_context_capability sigh_cap) + void kick_off(Genode::Allocator &alloc, char const *file) { typedef Vfs::Directory_service::Open_result Open_result; @@ -468,10 +451,6 @@ class Vfs_replay throw Genode::Exception(); } - _io_response_handler.sigh = sigh_cap; - - _vfs_handle->handler(&_io_response_handler); - _current_request = { .type = Request::Type::INVALID, .state = Request::State::NONE, @@ -499,20 +478,26 @@ class Vfs_replay }; -struct Main : private Genode::Entrypoint::Io_progress_handler +struct Main : private Genode::Entrypoint::Io_progress_handler, + private Vfs::Env::User { Genode::Env &_env; Genode::Heap _heap { _env.ram(), _env.rm() }; Genode::Attached_rom_dataspace _config_rom { _env, "config" }; - Vfs::Simple_env _vfs_env { _env, _heap, _config_rom.xml().sub_node("vfs") }; + Vfs::Simple_env _vfs_env { _env, _heap, _config_rom.xml().sub_node("vfs"), *this }; Genode::Signal_handler
_reactivate_handler { _env.ep(), *this, &Main::handle_io_progress }; Vfs_replay _replay { _env, _vfs_env.root_dir(), _vfs_env.io(), _config_rom.xml() }; + /** + * Vfs::Env::User interface + */ + void wakeup_vfs_user() override { _reactivate_handler.local_submit(); } + Main(Genode::Env &env) : _env { env } { using File_name = Genode::String<64>; @@ -525,7 +510,9 @@ struct Main : private Genode::Entrypoint::Io_progress_handler _env.ep().register_io_progress_handler(*this); - _replay.kick_off(_heap, file_name.string(), _reactivate_handler); + _replay.kick_off(_heap, file_name.string()); + + handle_io_progress(); } void handle_io_progress() override From 909c3571e38bbfa07f98abdfd500e6a0430a0694 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 21 Dec 2022 17:46:21 +0100 Subject: [PATCH 0179/1921] vfs/cbe: Remove use of Io_response_handler The patch also touches app/cbe_init because it depends on the public cbe/vfs/trust_anchor_vfs.h header. Issue #4706 --- repos/gems/include/cbe/vfs/trust_anchor_vfs.h | 42 +++--------- repos/gems/src/app/cbe_init/main.cc | 12 ++-- repos/gems/src/lib/vfs/cbe/vfs.cc | 65 +------------------ 3 files changed, 18 insertions(+), 101 deletions(-) diff --git a/repos/gems/include/cbe/vfs/trust_anchor_vfs.h b/repos/gems/include/cbe/vfs/trust_anchor_vfs.h index 7e41c9c85f..bd7814c62b 100644 --- a/repos/gems/include/cbe/vfs/trust_anchor_vfs.h +++ b/repos/gems/include/cbe/vfs/trust_anchor_vfs.h @@ -35,25 +35,6 @@ struct Util::Trust_anchor_vfs Vfs::File_system &_vfs; - struct Io_response_handler : Vfs::Io_response_handler - { - Genode::Signal_context_capability _io_sigh; - - Io_response_handler(Genode::Signal_context_capability io_sigh) - : _io_sigh(io_sigh) { } - - void read_ready_response() override { } - - void io_progress_response() override - { - if (_io_sigh.valid()) { - Genode::Signal_transmitter(_io_sigh).submit(); - } - } - }; - - Io_response_handler _io_response_handler; - struct File { struct Could_not_open_file : Genode::Exception { }; @@ -77,8 +58,7 @@ struct Util::Trust_anchor_vfs File(Path const &base_path, char const *name, Vfs::File_system &vfs, - Genode::Allocator &alloc, - Io_response_handler &io_response_handler) + Genode::Allocator &alloc) : _vfs { vfs }, _vfs_handle { nullptr } @@ -96,8 +76,6 @@ struct Util::Trust_anchor_vfs error("could not open '", file_path.string(), "'"); throw Could_not_open_file(); } - - _vfs_handle->handler(&io_response_handler); } ~File() @@ -585,18 +563,16 @@ struct Util::Trust_anchor_vfs Trust_anchor_vfs(Vfs::File_system &vfs, Genode::Allocator &alloc, - Path const &path, - Genode::Signal_context_capability io_sigh) + Path const &path) : - _vfs { vfs }, - _io_response_handler { io_sigh }, - _ta_dir { path } + _vfs { vfs }, + _ta_dir { path } { - _init_file.construct(path, "initialize", _vfs, alloc, _io_response_handler); - _encrypt_file.construct(path, "encrypt", _vfs, alloc, _io_response_handler); - _decrypt_file.construct(path, "decrypt", _vfs, alloc, _io_response_handler); - _generate_key_file.construct(path, "generate_key", _vfs, alloc, _io_response_handler); - _last_hash_file.construct(path, "hashsum", _vfs, alloc, _io_response_handler); + _init_file.construct(path, "initialize", _vfs, alloc); + _encrypt_file.construct(path, "encrypt", _vfs, alloc); + _decrypt_file.construct(path, "decrypt", _vfs, alloc); + _generate_key_file.construct(path, "generate_key", _vfs, alloc); + _last_hash_file.construct(path, "hashsum", _vfs, alloc); } bool request_acceptable() const diff --git a/repos/gems/src/app/cbe_init/main.cc b/repos/gems/src/app/cbe_init/main.cc index 45eac7209f..f707fae6f9 100644 --- a/repos/gems/src/app/cbe_init/main.cc +++ b/repos/gems/src/app/cbe_init/main.cc @@ -31,7 +31,7 @@ enum { VERBOSE = 0 }; using namespace Genode; -class Main +class Main : Vfs::Env::User { private: @@ -52,9 +52,14 @@ class Main Genode::size_t _blk_ratio { Cbe::BLOCK_SIZE / _blk.info().block_size }; - Vfs::Simple_env _vfs_env { _env, _heap, _config_rom.xml().sub_node("vfs") }; + Vfs::Simple_env _vfs_env { _env, _heap, _config_rom.xml().sub_node("vfs"), *this }; Vfs::File_system &_vfs { _vfs_env.root_dir() }; + /** + * Vfs::Env::User interface + */ + void wakeup_vfs_user() override { _blk_handler.local_submit(); } + static Util::Trust_anchor_vfs::Path _config_ta_dir(Xml_node const &node) { using String_path = Genode::String<1024>; @@ -72,8 +77,7 @@ class Main } Util::Trust_anchor_vfs _trust_anchor { - _vfs, _vfs_env.alloc(), _config_ta_dir(_config_rom.xml()), - _blk_handler }; + _vfs, _vfs_env.alloc(), _config_ta_dir(_config_rom.xml()) }; bool _execute_trust_anchor() { diff --git a/repos/gems/src/lib/vfs/cbe/vfs.cc b/repos/gems/src/lib/vfs/cbe/vfs.cc index fbb13f1328..2bc06a2d1a 100644 --- a/repos/gems/src/lib/vfs/cbe/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe/vfs.cc @@ -97,47 +97,6 @@ class Vfs_cbe::Wrapper Vfs_handle *_backend_handle { nullptr }; Constructible _backend_job { }; - friend struct Backend_io_response_handler; - - struct Backend_io_response_handler : Vfs::Io_response_handler - { - Vfs_cbe::Wrapper &_wrapper; - Genode::Signal_context_capability _io_sigh; - - Backend_io_response_handler(Vfs_cbe::Wrapper &wrapper, - Genode::Signal_context_capability io_sigh) - : _wrapper(wrapper), _io_sigh(io_sigh) { } - - void read_ready_response() override { } - - void io_progress_response() override - { - if (_io_sigh.valid()) { - Genode::Signal_transmitter(_io_sigh).submit(); - } - } - }; - - Genode::Io_signal_handler _io_handler { - _env.env().ep(), *this, &Wrapper::_handle_io }; - - void _handle_io() - { - _notify_backend_io_progress(); - } - - void _notify_backend_io_progress() - { - if (_enqueued_vfs_handle) { - _enqueued_vfs_handle->io_progress_response(); - } else { - handle_frontend_request(); - _io_progress_pending = true; - } - } - - Backend_io_response_handler _backend_io_response_handler { *this, _io_handler }; - Vfs_handle *_add_key_handle { nullptr }; Vfs_handle *_remove_key_handle { nullptr }; @@ -324,8 +283,6 @@ class Vfs_cbe::Wrapper throw Could_not_open_block_backend(); } - _backend_handle->handler(&_backend_io_response_handler); - { Genode::String<128> crypto_add_key_file { _crypto_device.string(), "/add_key" }; @@ -355,8 +312,7 @@ class Vfs_cbe::Wrapper } _trust_anchor.construct(_env.root_dir(), _env.alloc(), - _trust_anchor_device.string(), - _io_handler); + _trust_anchor_device.string()); _cbe.construct(); } @@ -552,25 +508,11 @@ class Vfs_cbe::Wrapper return _frontend_request; } - // XXX needs to be a list when snapshots are used - Vfs_handle *_enqueued_vfs_handle { nullptr }; - bool _io_progress_pending { false }; - - void enqueue_handle(Vfs_handle &handle) - { - _enqueued_vfs_handle = &handle; - if (_io_progress_pending) { - _enqueued_vfs_handle->io_progress_response(); - _io_progress_pending = false; - } - } - void ack_frontend_request(Vfs_handle &handle) { // assert current state was *_COMPLETE _frontend_request.state = Frontend_request::State::NONE; _frontend_request.cbe_request = Cbe::Request { }; - _enqueued_vfs_handle = nullptr; } bool submit_frontend_request(Vfs_handle &handle, @@ -1255,8 +1197,6 @@ class Vfs_cbe::Wrapper /* set key id to make file valid */ cf->key_id = key_id_value; - cf->encrypt_handle->handler(&_backend_io_response_handler); - cf->decrypt_handle->handler(&_backend_io_response_handler); request.success(true); _cbe->crypto_add_key_completed(request); @@ -1901,7 +1841,6 @@ class Vfs_cbe::Data_file_system : public Single_file_system if ( state == State::PENDING || state == State::IN_PROGRESS) { - _w.enqueue_handle(*this); return READ_QUEUED; } @@ -1952,7 +1891,6 @@ class Vfs_cbe::Data_file_system : public Single_file_system if ( state == State::PENDING || state == State::IN_PROGRESS) { - _w.enqueue_handle(*this); return WRITE_ERR_WOULD_BLOCK; } @@ -2001,7 +1939,6 @@ class Vfs_cbe::Data_file_system : public Single_file_system if ( state == State::PENDING || state == State::IN_PROGRESS) { - _w.enqueue_handle(*this); return SYNC_QUEUED; } From 53b67810baf83ab31f8cc68b2b0ee90564a48072 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 21 Dec 2022 17:57:36 +0100 Subject: [PATCH 0180/1921] vfs/cbe_trust_anchor: Remove Io_response_handler This patch keeps driving the internal state machines until no progress can be made. This required fixing the return values of several execute functions, which used to report progress while being in complete state. Along the way, the patch removes default switch cases to ensure that all states are covered. Issue #4706 --- .../gems/src/lib/vfs/cbe_trust_anchor/vfs.cc | 99 +++++++------------ 1 file changed, 37 insertions(+), 62 deletions(-) diff --git a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc index 8ae2ead4ef..3efb58846b 100644 --- a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc @@ -151,17 +151,17 @@ class Trust_anchor _job_state = Job_state::COMPLETE; _job_success = true; - [[fallthrough]]; + return true; } case Job_state::COMPLETE: - return true; - - case Job_state::IN_PROGRESS: [[fallthrough]]; - case Job_state::NONE: [[fallthrough]]; - default: return false; + case Job_state::IN_PROGRESS: + case Job_state::NONE: + case Job_state::INIT_READ_JITTERENTROPY_PENDING: + case Job_state::INIT_READ_JITTERENTROPY_IN_PROGRESS: + case Job_state::FINAL_SYNC: + break; } - /* never reached */ return false; } @@ -183,17 +183,17 @@ class Trust_anchor _job_state = Job_state::COMPLETE; _job_success = true; - [[fallthrough]]; + return true; } case Job_state::COMPLETE: - return true; - - case Job_state::IN_PROGRESS: [[fallthrough]]; - case Job_state::NONE: [[fallthrough]]; - default: return false; + case Job_state::IN_PROGRESS: + case Job_state::NONE: + case Job_state::INIT_READ_JITTERENTROPY_PENDING: + case Job_state::INIT_READ_JITTERENTROPY_IN_PROGRESS: + case Job_state::FINAL_SYNC: + break; } - /* never reached */ return false; } @@ -202,6 +202,7 @@ class Trust_anchor bool progress = false; switch (_job_state) { + case Job_state::INIT_READ_JITTERENTROPY_PENDING: case Job_state::PENDING: { if (!_open_jitterentropy_file_and_queue_read()) { @@ -212,6 +213,7 @@ class Trust_anchor } [[fallthrough]]; + case Job_state::INIT_READ_JITTERENTROPY_IN_PROGRESS: case Job_state::IN_PROGRESS: { if (!_read_jitterentropy_file_finished()) { @@ -228,17 +230,15 @@ class Trust_anchor _job_state = Job_state::COMPLETE; _job_success = true; progress = true; + break; } - [[fallthrough]]; case Job_state::COMPLETE: - return true; - - case Job_state::NONE: [[fallthrough]]; - default: break; + case Job_state::FINAL_SYNC: + case Job_state::NONE: + break; } - /* never reached */ return progress; } @@ -484,18 +484,19 @@ class Trust_anchor _job_success = true; progress |= true; - [[fallthrough]]; - case Job_state::COMPLETE: break; - case Job_state::NONE: [[fallthrough]]; - default: break; + case Job_state::COMPLETE: + case Job_state::NONE: + case Job_state::INIT_READ_JITTERENTROPY_PENDING: + case Job_state::INIT_READ_JITTERENTROPY_IN_PROGRESS: + break; } return progress; } - bool _execute() + bool _execute_one_step() { switch (_job) { case Job::DECRYPT: return _execute_decrypt(); @@ -513,35 +514,6 @@ class Trust_anchor return false; } - friend struct Io_response_handler; - - struct Io_response_handler : Vfs::Io_response_handler - { - Genode::Signal_context_capability _io_sigh; - - Io_response_handler(Genode::Signal_context_capability io_sigh) - : _io_sigh(io_sigh) { } - - void read_ready_response() override { } - - void io_progress_response() override - { - if (_io_sigh.valid()) { - Genode::Signal_transmitter(_io_sigh).submit(); - } - } - }; - - void _handle_io() - { - (void)_execute(); - } - - Genode::Io_signal_handler _io_handler { - _vfs_env.env().ep(), *this, &Trust_anchor::_handle_io }; - - Io_response_handler _io_response_handler { _io_handler }; - void _close_handle(Vfs::Vfs_handle **handle) { if (*handle == nullptr) @@ -647,7 +619,6 @@ class Trust_anchor return false; } - _private_key_handle->handler(&_io_response_handler); _private_key_io_job.construct(*_private_key_handle, Util::Io_job::Operation::READ, _private_key_io_job_buffer, 0, Util::Io_job::Partial_result::ALLOW); @@ -676,7 +647,6 @@ class Trust_anchor return false; } - _jitterentropy_handle->handler(&_io_response_handler); _jitterentropy_io_job.construct(*_jitterentropy_handle, Util::Io_job::Operation::READ, _jitterentropy_io_job_buffer, 0, Util::Io_job::Partial_result::ALLOW); @@ -707,7 +677,6 @@ class Trust_anchor return false; } - _key_handle->handler(&_io_response_handler); _key_io_job.construct(*_key_handle, Util::Io_job::Operation::READ, _key_io_job_buffer, 0, Util::Io_job::Partial_result::ALLOW); @@ -795,7 +764,6 @@ class Trust_anchor return false; } - _key_handle->handler(&_io_response_handler); _key_io_job.construct(*_key_handle, Util::Io_job::Operation::WRITE, _key_io_job_buffer, 0); if (_key_io_job->execute() && _key_io_job->completed()) { @@ -840,7 +808,6 @@ class Trust_anchor return false; } - _hash_handle->handler(&_io_response_handler); _hash_io_job.construct(*_hash_handle, Util::Io_job::Operation::READ, _hash_io_job_buffer, 0, Util::Io_job::Partial_result::ALLOW); @@ -907,7 +874,6 @@ class Trust_anchor return false; } - _hash_handle->handler(&_io_response_handler); _hash_io_job.construct(*_hash_handle, Util::Io_job::Operation::WRITE, _hash_io_job_buffer, 0); @@ -986,7 +952,7 @@ class Trust_anchor if (_open_key_file_and_queue_read(_base_path)) { while (!_read_key_file_finished()) { - _vfs_env.env().ep().wait_and_dispatch_one_io_signal(); + _vfs_env.io().commit_and_wait(); } } } @@ -1004,7 +970,12 @@ class Trust_anchor bool execute() { - return _execute(); + bool result = false; + + while (_execute_one_step() == true) + result = true; + + return result; } bool queue_initialize(char const *src, size_t len) @@ -1296,6 +1267,8 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system Read_result read(char *src, file_size count, file_size &out_count) override { + _trust_anchor.execute(); + if (_state == State::NONE) { try { bool const ok = @@ -1352,6 +1325,8 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system Write_result write(char const *src, file_size count, file_size &out_count) override { + _trust_anchor.execute(); + if (_state != State::NONE) { return WRITE_ERR_IO; } From 74e637018758ca404352db5699d4ff05b34a520b Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 21 Dec 2022 18:59:36 +0100 Subject: [PATCH 0181/1921] cbe/vfs/trust_anchor_vfs.h: avoid 'Constructible' --- repos/gems/include/cbe/vfs/trust_anchor_vfs.h | 89 +++++++++---------- 1 file changed, 40 insertions(+), 49 deletions(-) diff --git a/repos/gems/include/cbe/vfs/trust_anchor_vfs.h b/repos/gems/include/cbe/vfs/trust_anchor_vfs.h index bd7814c62b..487d36128f 100644 --- a/repos/gems/include/cbe/vfs/trust_anchor_vfs.h +++ b/repos/gems/include/cbe/vfs/trust_anchor_vfs.h @@ -34,6 +34,7 @@ struct Util::Trust_anchor_vfs using Path = Genode::Path<256>; Vfs::File_system &_vfs; + Allocator &_alloc; struct File { @@ -121,22 +122,19 @@ struct Util::Trust_anchor_vfs } }; - Util::Io_job::Buffer _init_io_buffer { }; - Genode::Constructible _init_file { }; + Path const _ta_dir; - Util::Io_job::Buffer _encrypt_io_buffer { }; - Genode::Constructible _encrypt_file { }; + Util::Io_job::Buffer _init_io_buffer { }; + Util::Io_job::Buffer _encrypt_io_buffer { }; + Util::Io_job::Buffer _decrypt_io_buffer { }; + Util::Io_job::Buffer _generate_key_io_buffer { }; + Util::Io_job::Buffer _last_hash_io_buffer { }; - Util::Io_job::Buffer _decrypt_io_buffer { }; - Genode::Constructible _decrypt_file { }; - - Util::Io_job::Buffer _generate_key_io_buffer { }; - Genode::Constructible _generate_key_file { }; - - Util::Io_job::Buffer _last_hash_io_buffer { }; - Genode::Constructible _last_hash_file { }; - - Path _ta_dir { }; + File _init_file { _ta_dir, "initialize", _vfs, _alloc }; + File _encrypt_file { _ta_dir, "encrypt", _vfs, _alloc }; + File _decrypt_file { _ta_dir, "decrypt", _vfs, _alloc }; + File _generate_key_file { _ta_dir, "generate_key", _vfs, _alloc }; + File _last_hash_file { _ta_dir, "hashsum", _vfs, _alloc }; struct Job { @@ -242,7 +240,7 @@ struct Util::Trust_anchor_vfs using Op = Util::Io_job::Operation; Op const op = write ? Op::WRITE : Op::READ; - if (!_decrypt_file->submit_io_job(_decrypt_io_buffer, op)) { + if (!_decrypt_file.submit_io_job(_decrypt_io_buffer, op)) { break; } job.state = Job::State::IN_PROGRESS; @@ -250,17 +248,17 @@ struct Util::Trust_anchor_vfs } [[fallthrough]]; case Job::State::IN_PROGRESS: - if (!_decrypt_file->execute_io_job()) { + if (!_decrypt_file.execute_io_job()) { break; } progress |= true; - completed_io_job = _decrypt_file->completed_io_job(); + completed_io_job = _decrypt_file.completed_io_job(); if (!completed_io_job.completed) { break; } - _decrypt_file->drop_io_job(); + _decrypt_file.drop_io_job(); /* setup second phase */ if (write) { @@ -306,7 +304,7 @@ struct Util::Trust_anchor_vfs using Op = Util::Io_job::Operation; Op const op = write ? Op::WRITE : Op::READ; - if (!_encrypt_file->submit_io_job(_encrypt_io_buffer, op)) { + if (!_encrypt_file.submit_io_job(_encrypt_io_buffer, op)) { break; } job.state = Job::State::IN_PROGRESS; @@ -314,17 +312,17 @@ struct Util::Trust_anchor_vfs } [[fallthrough]]; case Job::State::IN_PROGRESS: - if (!_encrypt_file->execute_io_job()) { + if (!_encrypt_file.execute_io_job()) { break; } progress |= true; - completed_io_job = _encrypt_file->completed_io_job(); + completed_io_job = _encrypt_file.completed_io_job(); if (!completed_io_job.completed) { break; } - _encrypt_file->drop_io_job(); + _encrypt_file.drop_io_job(); /* setup second phase */ if (write) { @@ -366,25 +364,25 @@ struct Util::Trust_anchor_vfs switch (job.state) { case Job::State::PENDING: - if (!_generate_key_file->submit_io_job(_generate_key_io_buffer, - Util::Io_job::Operation::READ)) { + if (!_generate_key_file.submit_io_job(_generate_key_io_buffer, + Util::Io_job::Operation::READ)) { break; } job.state = Job::State::IN_PROGRESS; progress |= true; [[fallthrough]]; case Job::State::IN_PROGRESS: - if (!_generate_key_file->execute_io_job()) { + if (!_generate_key_file.execute_io_job()) { break; } progress |= true; - completed_io_job = _generate_key_file->completed_io_job(); + completed_io_job = _generate_key_file.completed_io_job(); if (!completed_io_job.completed) { break; } - _generate_key_file->drop_io_job(); + _generate_key_file.drop_io_job(); job.state = Job::State::COMPLETE; job.success = completed_io_job.success; @@ -407,7 +405,7 @@ struct Util::Trust_anchor_vfs using Op = Util::Io_job::Operation; Op const op = write ? Op::WRITE : Op::READ; - if (!_init_file->submit_io_job(_init_io_buffer, op)) { + if (!_init_file.submit_io_job(_init_io_buffer, op)) { break; } job.state = Job::State::IN_PROGRESS; @@ -415,17 +413,17 @@ struct Util::Trust_anchor_vfs } [[fallthrough]]; case Job::State::IN_PROGRESS: - if (!_init_file->execute_io_job()) { + if (!_init_file.execute_io_job()) { break; } progress |= true; - completed_io_job = _init_file->completed_io_job(); + completed_io_job = _init_file.completed_io_job(); if (!completed_io_job.completed) { break; } - _init_file->drop_io_job(); + _init_file.drop_io_job(); /* setup second phase */ if (write) { @@ -467,25 +465,25 @@ struct Util::Trust_anchor_vfs switch (job.state) { case Job::State::PENDING: - if (!_last_hash_file->submit_io_job(_last_hash_io_buffer, - Util::Io_job::Operation::READ)) { + if (!_last_hash_file.submit_io_job(_last_hash_io_buffer, + Util::Io_job::Operation::READ)) { break; } job.state = Job::State::IN_PROGRESS; progress |= true; [[fallthrough]]; case Job::State::IN_PROGRESS: - if (!_last_hash_file->execute_io_job()) { + if (!_last_hash_file.execute_io_job()) { break; } progress |= true; - completed_io_job = _last_hash_file->completed_io_job(); + completed_io_job = _last_hash_file.completed_io_job(); if (!completed_io_job.completed) { break; } - _last_hash_file->drop_io_job(); + _last_hash_file.drop_io_job(); job.state = Job::State::COMPLETE; job.success = completed_io_job.success; @@ -508,7 +506,7 @@ struct Util::Trust_anchor_vfs using Op = Util::Io_job::Operation; Op const op = write ? Op::WRITE : Op::READ; - if (!_last_hash_file->submit_io_job(_last_hash_io_buffer, op)) { + if (!_last_hash_file.submit_io_job(_last_hash_io_buffer, op)) { break; } job.state = Job::State::IN_PROGRESS; @@ -516,17 +514,17 @@ struct Util::Trust_anchor_vfs } [[fallthrough]]; case Job::State::IN_PROGRESS: - if (!_last_hash_file->execute_io_job()) { + if (!_last_hash_file.execute_io_job()) { break; } progress |= true; - completed_io_job = _last_hash_file->completed_io_job(); + completed_io_job = _last_hash_file.completed_io_job(); if (!completed_io_job.completed) { break; } - _last_hash_file->drop_io_job(); + _last_hash_file.drop_io_job(); /* setup second phase */ if (write) { @@ -565,15 +563,8 @@ struct Util::Trust_anchor_vfs Genode::Allocator &alloc, Path const &path) : - _vfs { vfs }, - _ta_dir { path } - { - _init_file.construct(path, "initialize", _vfs, alloc); - _encrypt_file.construct(path, "encrypt", _vfs, alloc); - _decrypt_file.construct(path, "decrypt", _vfs, alloc); - _generate_key_file.construct(path, "generate_key", _vfs, alloc); - _last_hash_file.construct(path, "hashsum", _vfs, alloc); - } + _vfs(vfs), _alloc(alloc), _ta_dir(path) + { } bool request_acceptable() const { From 25e4bcefbff2c8473a69b7c15b3be861bdcee40f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 20 Dec 2022 15:02:22 +0100 Subject: [PATCH 0182/1921] vfs: remove 'Io_response_handler' interface The old 'Io_response_handler::io_progress_response' interface has been replaced by the 'Vfs::Env::User::wakeup_vfs_user' (issue #4697). The remaining 'read_ready_response' method is now hosted in the appropriately named 'Read_ready_response_handler'. Issue #4706 --- repos/dde_linux/src/lib/vfs/lxip/vfs.cc | 50 ++++--------- repos/gems/src/lib/vfs/audit/vfs_audit.cc | 18 ++--- repos/gems/src/lib/vfs/gpu/vfs.cc | 17 ++--- repos/gems/src/lib/vfs/pipe/plugin.cc | 64 +++++++---------- repos/libports/src/lib/libc/internal/kernel.h | 9 ++- .../src/lib/libc/internal/vfs_plugin.h | 30 ++++---- .../libports/src/lib/vfs/libusb/vfs_libusb.cc | 21 +++--- repos/libports/src/lib/vfs/lwip/vfs.cc | 71 +++++++++--------- repos/libports/src/lib/vfs/oss/vfs_oss.cc | 31 +++----- repos/os/include/vfs/dir_file_system.h | 4 +- repos/os/include/vfs/vfs_handle.h | 36 ++++------ repos/os/src/lib/vfs/file_system_factory.cc | 2 +- repos/os/src/lib/vfs/fs_file_system.h | 72 +++++-------------- repos/os/src/lib/vfs/tap/nic_file_system.h | 2 +- repos/os/src/lib/vfs/tap/uplink_file_system.h | 2 +- repos/os/src/lib/vfs/terminal_file_system.h | 10 +-- repos/os/src/server/vfs/node.h | 7 +- repos/os/src/server/vfs_block/component.cc | 40 ++++------- 18 files changed, 180 insertions(+), 306 deletions(-) diff --git a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc index 24a66f095e..55e8f43c60 100644 --- a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc +++ b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc @@ -293,8 +293,7 @@ struct Vfs::Lxip_vfs_file_handle final : Vfs::Lxip_vfs_handle typedef Genode::Fifo_element Fifo_element; typedef Genode::Fifo Fifo; - Fifo_element read_ready_elem { *this }; - Fifo_element io_progress_elem { *this }; + Fifo_element read_ready_elem { *this }; char content_buffer[Lxip::MAX_DATA_LEN]; @@ -346,12 +345,6 @@ struct Vfs::Lxip_vfs_file_handle final : Vfs::Lxip_vfs_handle virtual Sync_result sync() override { return (file) ? file->sync() : Sync_result::SYNC_ERR_INVALID; } - - void io_enqueue(Fifo &fifo) - { - if (!io_progress_elem.enqueued()) - fifo.enqueue(io_progress_elem); - } }; @@ -379,26 +372,14 @@ struct Vfs::Lxip_vfs_dir_handle final : Vfs::Lxip_vfs_handle }; -/** - * Queues of open handles to poll - */ -static Vfs::Lxip_vfs_file_handle::Fifo *_io_progress_waiters_ptr; +static Vfs::Env::User *_vfs_user_ptr; static Vfs::Lxip_vfs_file_handle::Fifo *_read_ready_waiters_ptr; + static void poll_all() { - _io_progress_waiters_ptr->for_each( - [&] (Vfs::Lxip_vfs_file_handle::Fifo_element &elem) { - Vfs::Lxip_vfs_file_handle &handle = elem.object(); - if (handle.file) { - if (handle.file->poll()) { - /* do not notify again until some I/O queues */ - _io_progress_waiters_ptr->remove(elem); - - handle.io_progress_response(); - } - } - }); + if (_vfs_user_ptr) + _vfs_user_ptr->wakeup_vfs_user(); _read_ready_waiters_ptr->for_each( [&] (Vfs::Lxip_vfs_file_handle::Fifo_element &elem) { @@ -513,10 +494,9 @@ class Vfs::Lxip_data_file final : public Vfs::Lxip_file msghdr msg = create_msghdr(nullptr, 0, len, &iov); Lxip::ssize_t ret = _sock.ops->recvmsg(&_sock, &msg, len, MSG_DONTWAIT); - if (ret == -EAGAIN) { - handle.io_enqueue(*_io_progress_waiters_ptr); + if (ret == -EAGAIN) throw Would_block(); - } + return ret; } }; @@ -743,7 +723,6 @@ class Vfs::Lxip_connect_file final : public Vfs::Lxip_file case Lxip::Io_result::LINUX_EINPROGRESS: _connecting = true; _write_err = 0; - handle.io_enqueue(*_io_progress_waiters_ptr); return len; case Lxip::Io_result::LINUX_EALREADY: @@ -892,10 +871,9 @@ class Vfs::Lxip_remote_file final : public Vfs::Lxip_file sizeof(handle.content_buffer), &iov); int const res = _sock.ops->recvmsg(&_sock, &msg, 0, MSG_DONTWAIT|MSG_PEEK); - if (res == -EAGAIN) { - handle.io_enqueue(*_io_progress_waiters_ptr); + if (res == -EAGAIN) throw Would_block(); - } + if (res < 0) return -1; } break; @@ -974,7 +952,6 @@ class Vfs::Lxip_accept_file final : public Vfs::Lxip_file return Genode::strlen(dst); } - handle.io_enqueue(*_io_progress_waiters_ptr); throw Would_block(); } }; @@ -1928,10 +1905,8 @@ class Vfs::Lxip_file_system : public Vfs::File_system, Lxip_vfs_file_handle *file_handle = dynamic_cast(handle); - if (file_handle) { - _io_progress_waiters_ptr->remove(file_handle->io_progress_elem); + if (file_handle) _read_ready_waiters_ptr->remove(file_handle->read_ready_elem); - } Genode::destroy(handle->alloc(), handle); } @@ -2044,6 +2019,7 @@ struct Lxip_factory : Vfs::File_system_factory Vfs::File_system *create(Vfs::Env &env, Genode::Xml_node config) override { + _vfs_user_ptr = &env.user(); static Init inst(env.env(), env.alloc()); return new (env.alloc()) Vfs::Lxip_file_system(env, config); } @@ -2052,11 +2028,9 @@ struct Lxip_factory : Vfs::File_system_factory extern "C" Vfs::File_system_factory *vfs_file_system_factory(void) { - static Vfs::Lxip_vfs_file_handle::Fifo io_progress_waiters; static Vfs::Lxip_vfs_file_handle::Fifo read_ready_waiters; - _io_progress_waiters_ptr = &io_progress_waiters; - _read_ready_waiters_ptr = &read_ready_waiters; + _read_ready_waiters_ptr = &read_ready_waiters; static Lxip_factory factory; return &factory; diff --git a/repos/gems/src/lib/vfs/audit/vfs_audit.cc b/repos/gems/src/lib/vfs/audit/vfs_audit.cc index 827e00b4b1..c417aef88d 100644 --- a/repos/gems/src/lib/vfs/audit/vfs_audit.cc +++ b/repos/gems/src/lib/vfs/audit/vfs_audit.cc @@ -94,17 +94,11 @@ class Vfs_audit::File_system : public Vfs::File_system audit->seek(Vfs_handle::seek()); } - Handle(Vfs_audit::File_system &fs, - Genode::Allocator &alloc, - int flags, - char const *path) - : Vfs_handle(fs, fs, alloc, flags), path(path) { }; - - void handler(Io_response_handler *rh) override - { - Vfs_handle::handler(rh); - if (audit) audit->handler(rh); - } + Handle(Vfs_audit::File_system &fs, Genode::Allocator &alloc, + int flags, char const *path) + : + Vfs_handle(fs, fs, alloc, flags), path(path) + { }; }; public: @@ -113,7 +107,7 @@ class Vfs_audit::File_system : public Vfs::File_system : _audit_log(env.env(), config.attribute_value("label", Genode::String<64>("audit")).string()), _root_dir(env.root_dir()), - _audit_path(config.attribute_value( + _audit_path(config.attribute_value( "path", Genode::String()).string()) { } diff --git a/repos/gems/src/lib/vfs/gpu/vfs.cc b/repos/gems/src/lib/vfs/gpu/vfs.cc index 73a561bd1d..6f04e4df84 100644 --- a/repos/gems/src/lib/vfs/gpu/vfs.cc +++ b/repos/gems/src/lib/vfs/gpu/vfs.cc @@ -36,11 +36,11 @@ struct Vfs_gpu::File_system : Single_file_system struct Gpu_vfs_handle : Single_vfs_handle { bool _complete { false }; - Genode::Env &_env; - Gpu::Connection _gpu_session { _env }; + Vfs::Env &_env; + Gpu::Connection _gpu_session { _env.env() }; Genode::Io_signal_handler _completion_sigh { - _env.ep(), *this, &Gpu_vfs_handle::_handle_completion }; + _env.env().ep(), *this, &Gpu_vfs_handle::_handle_completion }; using Id_space = Genode::Id_space; Id_space::Element const _elem; @@ -48,16 +48,17 @@ struct Vfs_gpu::File_system : Single_file_system void _handle_completion() { _complete = true; - io_progress_response(); + _env.user().wakeup_vfs_user(); } - Gpu_vfs_handle(Genode::Env &env, + Gpu_vfs_handle(Vfs::Env &env, Directory_service &ds, File_io_service &fs, Genode::Allocator &alloc, Id_space &space) - : Single_vfs_handle(ds, fs, alloc, 0), - _env(env), _elem(*this, space) + : + Single_vfs_handle(ds, fs, alloc, 0), + _env(env), _elem(*this, space) { _gpu_session.completion_sigh(_completion_sigh); } @@ -110,7 +111,7 @@ struct Vfs_gpu::File_system : Single_file_system try { Gpu_vfs_handle *handle = new (alloc) - Gpu_vfs_handle(_env.env(), *this, *this, alloc, _handle_space); + Gpu_vfs_handle(_env, *this, *this, alloc, _handle_space); _last_id = handle->id(); *out_handle = handle; diff --git a/repos/gems/src/lib/vfs/pipe/plugin.cc b/repos/gems/src/lib/vfs/pipe/plugin.cc index 86ce8c2cb0..3cc84857aa 100644 --- a/repos/gems/src/lib/vfs/pipe/plugin.cc +++ b/repos/gems/src/lib/vfs/pipe/plugin.cc @@ -84,27 +84,28 @@ struct Vfs_pipe::Pipe_handle : Vfs::Vfs_handle, private Pipe_handle_registry_ele struct Vfs_pipe::Pipe { - Genode::Env &env; + Genode::Env &env; + Vfs::Env::User &vfs_user; Genode::Allocator &alloc; - Pipe_space::Element space_elem; - Pipe_buffer buffer { }; + + Pipe_space::Element space_elem; + Pipe_buffer buffer { }; Pipe_handle_registry registry { }; - Handle_fifo io_progress_waiters { }; + Handle_fifo read_ready_waiters { }; + unsigned num_writers = 0; bool waiting_for_writers = true; Genode::Io_signal_handler _read_notify_handler { env.ep(), *this, &Pipe::notify_read }; - Genode::Io_signal_handler _write_notify_handler - { env.ep(), *this, &Pipe::notify_write }; - bool new_handle_active { true }; - Pipe(Genode::Env &env, Genode::Allocator &alloc, Pipe_space &space) + Pipe(Genode::Env &env, Vfs::Env::User &vfs_user, + Genode::Allocator &alloc, Pipe_space &space) : - env(env), alloc(alloc), space_elem(*this, space) + env(env), vfs_user(vfs_user), alloc(alloc), space_elem(*this, space) { } ~Pipe() = default; @@ -121,12 +122,6 @@ struct Vfs_pipe::Pipe elem.object().read_ready_response(); }); } - void notify_write() - { - io_progress_waiters.dequeue_all([] (Handle_element &elem) { - elem.object().io_progress_response(); }); - } - void submit_read_signal() { _read_notify_handler.local_submit(); @@ -134,7 +129,7 @@ struct Vfs_pipe::Pipe void submit_write_signal() { - _write_notify_handler.local_submit(); + vfs_user.wakeup_vfs_user(); } /** @@ -161,8 +156,6 @@ struct Vfs_pipe::Pipe */ void remove(Pipe_handle &handle) { - if (handle.io_progress_elem.enqueued()) - io_progress_waiters.remove(handle.io_progress_elem); if (handle.read_ready_elem.enqueued()) read_ready_waiters.remove(handle.read_ready_elem); } @@ -183,7 +176,6 @@ struct Vfs_pipe::Pipe Genode::warning("flushing non-empty buffer. capacity=", buffer.avail_capacity()); buffer.reset(); - io_progress_waiters.dequeue_all([] (Handle_element &/*elem*/) { }); } *handle = new (alloc) Pipe_handle(fs, alloc, Directory_service::OPEN_MODE_WRONLY, registry, *this); @@ -205,12 +197,11 @@ struct Vfs_pipe::Pipe return Open_result::OPEN_ERR_UNACCESSIBLE; } - Write_result write(Pipe_handle &handle, + Write_result write(Pipe_handle &, const char *buf, file_size count, file_size &out_count) { file_size out = 0; - bool notify = buffer.empty(); if (buffer.avail_capacity() == 0) { out_count = 0; @@ -223,11 +214,9 @@ struct Vfs_pipe::Pipe } out_count = out; - if (out < count) - io_progress_waiters.enqueue(handle.io_progress_elem); - if (notify) - submit_read_signal(); + if (out > 0) + vfs_user.wakeup_vfs_user(); return Write_result::WRITE_OK; } @@ -236,8 +225,6 @@ struct Vfs_pipe::Pipe char *buf, file_size count, file_size &out_count) { - bool notify = buffer.avail_capacity() == 0; - file_size out = 0; while (out < count && !buffer.empty()) { *(buf++) = buffer.get(); @@ -245,7 +232,8 @@ struct Vfs_pipe::Pipe } out_count = out; - if (!out) { + + if (out == 0) { /* Send only EOF when at least one writer opened the pipe */ if ((num_writers == 0) && !waiting_for_writers) @@ -255,8 +243,9 @@ struct Vfs_pipe::Pipe return Read_result::READ_QUEUED; } - if (notify) - submit_write_signal(); + /* new pipe space may unblock the writer */ + if (out > 0) + vfs_user.wakeup_vfs_user(); return Read_result::READ_OK; } @@ -309,14 +298,15 @@ struct Vfs_pipe::New_pipe_handle : Vfs::Vfs_handle { Pipe &pipe; - New_pipe_handle(Vfs::File_system &fs, - Genode::Env &env, + New_pipe_handle(Vfs::File_system &fs, + Genode::Env &env, + Vfs::Env::User &vfs_user, Genode::Allocator &alloc, - unsigned flags, - Pipe_space &pipe_space) + unsigned flags, + Pipe_space &pipe_space) : Vfs::Vfs_handle(fs, fs, alloc, flags), - pipe(*(new (alloc) Pipe(env, alloc, pipe_space))) + pipe(*(new (alloc) Pipe(env, vfs_user, alloc, pipe_space))) { } ~New_pipe_handle() @@ -677,7 +667,7 @@ class Vfs_pipe::Pipe_file_system : public Vfs_pipe::File_system if ((OPEN_MODE_ACCMODE & mode) == OPEN_MODE_WRONLY) return OPEN_ERR_NO_PERM; *handle = new (alloc) - New_pipe_handle(*this, _env.env(), alloc, mode, _pipe_space); + New_pipe_handle(*this, _env.env(), _env.user(), alloc, mode, _pipe_space); return OPEN_OK; } @@ -823,7 +813,7 @@ class Vfs_pipe::Fifo_file_system : public Vfs_pipe::File_system Path const path { fifo.attribute_value("name", String()) }; Pipe &pipe = *new (env.alloc()) - Pipe(env.env(), env.alloc(), _pipe_space); + Pipe(env.env(), env.user(), env.alloc(), _pipe_space); new (env.alloc()) Fifo_item(_items, path, pipe.space_elem.id()); }); diff --git a/repos/libports/src/lib/libc/internal/kernel.h b/repos/libports/src/lib/libc/internal/kernel.h index 6583d0eb39..c00aab4fa1 100644 --- a/repos/libports/src/lib/libc/internal/kernel.h +++ b/repos/libports/src/lib/libc/internal/kernel.h @@ -100,7 +100,7 @@ class Libc::Main_job : public Monitor::Job * secondary stack for the application task. Context switching uses * setjmp/longjmp. */ -struct Libc::Kernel final : Vfs::Io_response_handler, +struct Libc::Kernel final : Vfs::Read_ready_response_handler, Entrypoint::Io_progress_handler, Reset_malloc_heap, Resume, @@ -681,12 +681,11 @@ struct Libc::Kernel final : Vfs::Io_response_handler, } - /**************************************** - ** Vfs::Io_response_handler interface ** - ****************************************/ + /************************************************ + ** Vfs::Read_ready_response_handler interface ** + ************************************************/ void read_ready_response() override { _io_progressed = true; } - void io_progress_response() override { _io_progressed = true; } /********************************************** diff --git a/repos/libports/src/lib/libc/internal/vfs_plugin.h b/repos/libports/src/lib/libc/internal/vfs_plugin.h index 1775979fd2..554a0c2876 100644 --- a/repos/libports/src/lib/libc/internal/vfs_plugin.h +++ b/repos/libports/src/lib/libc/internal/vfs_plugin.h @@ -84,14 +84,14 @@ class Libc::Vfs_plugin final : public Plugin reference_handle(reference_handle) { } }; - Genode::Allocator &_alloc; - Vfs::File_system &_root_fs; - Constructible _root_dir { }; - Vfs::Io_response_handler &_response_handler; - Update_mtime const _update_mtime; - Current_real_time &_current_real_time; - bool const _pipe_configured; - Registry _mmap_registry; + Genode::Allocator &_alloc; + Vfs::File_system &_root_fs; + Constructible _root_dir { }; + Vfs::Read_ready_response_handler &_response_handler; + Update_mtime const _update_mtime; + Current_real_time &_current_real_time; + bool const _pipe_configured; + Registry _mmap_registry; /** * Sync a handle @@ -150,13 +150,13 @@ class Libc::Vfs_plugin final : public Plugin public: - Vfs_plugin(Libc::Env &env, - Vfs::Env &vfs_env, - Genode::Allocator &alloc, - Vfs::Io_response_handler &handler, - Update_mtime update_mtime, - Current_real_time ¤t_real_time, - Xml_node config) + Vfs_plugin(Libc::Env &env, + Vfs::Env &vfs_env, + Genode::Allocator &alloc, + Vfs::Read_ready_response_handler &handler, + Update_mtime update_mtime, + Current_real_time ¤t_real_time, + Xml_node config) : _alloc(alloc), _root_fs(env.vfs_env().root_dir()), diff --git a/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc b/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc index 822390ef19..f234bf7b88 100644 --- a/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc +++ b/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc @@ -37,6 +37,7 @@ class Libusb_file_system : public Vfs::Single_file_system private: Genode::Env &_env; + Vfs::Env::User &_vfs_user; Genode::Allocator_avl _alloc_avl; Usb::Connection _usb_connection; @@ -57,7 +58,7 @@ class Libusb_file_system : public Vfs::Single_file_system void _handle_ack_avail() { - io_progress_response(); + _vfs_user.wakeup_vfs_user(); } public: @@ -65,13 +66,15 @@ class Libusb_file_system : public Vfs::Single_file_system Libusb_vfs_handle(Directory_service &ds, File_io_service &fs, Genode::Allocator &alloc, - Genode::Env &env) - : Single_vfs_handle(ds, fs, alloc, 0), - _env(env), _alloc_avl(&alloc), - _usb_connection(_env, &_alloc_avl, - "usb_device", - 1024*1024, - _state_changed_handler) + Genode::Env &env, + Vfs::Env::User &vfs_user) + : + Single_vfs_handle(ds, fs, alloc, 0), + _env(env), _vfs_user(vfs_user), _alloc_avl(&alloc), + _usb_connection(_env, &_alloc_avl, + "usb_device", + 1024*1024, + _state_changed_handler) { _usb_connection.tx_channel()->sigh_ack_avail(_ack_avail_handler); libusb_genode_usb_connection(&_usb_connection); @@ -127,7 +130,7 @@ class Libusb_file_system : public Vfs::Single_file_system return OPEN_ERR_UNACCESSIBLE; *out_handle = new (alloc) - Libusb_vfs_handle(*this, *this, alloc, _env.env()); + Libusb_vfs_handle(*this, *this, alloc, _env.env(), _env.user()); return OPEN_OK; } diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index 0a7731179c..b84bcf7e10 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -438,16 +438,6 @@ struct Lwip::Socket_dir : Lwip::Directory read_ready_queue.dequeue_all([] (Lwip_file_handle::Fifo_element &elem) { elem.object().read_ready_response(); }); } - - /** - * Notify handles blocked by operations on this PCB / socket - */ - void process_io() - { - /* invoke all handles waiting for IO progress */ - io_progress_queue.dequeue_all([] (Lwip_file_handle::Fifo_element &elem) { - elem.object().io_progress_response(); }); - } }; @@ -551,6 +541,7 @@ class Lwip::Protocol_dir_impl final : public Protocol_dir Genode::Allocator &_alloc; Genode::Entrypoint &_ep; + Vfs::Env::User &_vfs_user; Genode::List _socket_dirs { }; @@ -562,8 +553,8 @@ class Lwip::Protocol_dir_impl final : public Protocol_dir friend class Tcp_socket_dir; friend class Udp_socket_dir; - Protocol_dir_impl(Vfs::Env &vfs_env) - : _alloc(vfs_env.alloc()), _ep(vfs_env.env().ep()) { } + Protocol_dir_impl(Vfs::Env &env) + : _alloc(env.alloc()), _ep(env.env().ep()), _vfs_user(env.user()) { } SOCKET_DIR *lookup(char const *name) { @@ -684,7 +675,7 @@ class Lwip::Protocol_dir_impl final : public Protocol_dir } SOCKET_DIR *new_socket = new (alloc) - SOCKET_DIR(id, *this, alloc, _ep, pcb); + SOCKET_DIR(id, *this, alloc, _ep, _vfs_user, pcb); _socket_dirs.insert(new_socket); return *new_socket; } @@ -738,11 +729,9 @@ class Lwip::Protocol_dir_impl final : public Protocol_dir return Opendir_result::OPENDIR_ERR_LOOKUP_FAILED; } - void notify() + void wakeup_vfs_user() { - for (SOCKET_DIR *sd = _socket_dirs.first(); sd; sd = sd->next()) { - sd->process_io(); - } + _vfs_user.wakeup_vfs_user(); } }; @@ -762,6 +751,8 @@ class Lwip::Udp_socket_dir final : { private: + Vfs::Env::User &_vfs_user; + /* * Noncopyable */ @@ -840,9 +831,12 @@ class Lwip::Udp_socket_dir final : Udp_socket_dir(unsigned num, Udp_proto_dir &proto_dir, Genode::Allocator &alloc, Genode::Entrypoint &, + Vfs::Env::User &vfs_user, udp_pcb *pcb) - : Socket_dir(num, alloc), - _proto_dir(proto_dir), _pcb(pcb ? pcb : udp_new()) + : + Socket_dir(num, alloc), + _vfs_user(vfs_user), + _proto_dir(proto_dir), _pcb(pcb ? pcb : udp_new()) { ip_addr_set_zero(&_to_addr); @@ -875,7 +869,7 @@ class Lwip::Udp_socket_dir final : pbuf_free(buf); } - process_io(); + _vfs_user.wakeup_vfs_user(); process_read_ready(); } @@ -1110,6 +1104,7 @@ class Lwip::Tcp_socket_dir final : Tcp_proto_dir &_proto_dir; Genode::Entrypoint &_ep; + Vfs::Env::User &_vfs_user; typedef Genode::List Pcb_pending_list; @@ -1141,9 +1136,12 @@ class Lwip::Tcp_socket_dir final : Tcp_socket_dir(unsigned num, Tcp_proto_dir &proto_dir, Genode::Allocator &alloc, Genode::Entrypoint &ep, + Vfs::Env::User &vfs_user, tcp_pcb *pcb) - : Socket_dir(num, alloc), _proto_dir(proto_dir), - _ep(ep), _pcb(pcb ? pcb : tcp_new()), state(pcb ? READY : NEW) + : + Socket_dir(num, alloc), _proto_dir(proto_dir), + _ep(ep), _vfs_user(vfs_user), + _pcb(pcb ? pcb : tcp_new()), state(pcb ? READY : NEW) { /* 'this' will be the argument to LwIP callbacks */ tcp_arg(_pcb, this); @@ -1189,7 +1187,7 @@ class Lwip::Tcp_socket_dir final : tcp_arg(newpcb, elem); tcp_recv(newpcb, tcp_delayed_recv_callback); - process_io(); + _vfs_user.wakeup_vfs_user(); process_read_ready(); return ERR_OK; } @@ -1220,10 +1218,15 @@ class Lwip::Tcp_socket_dir final : _pcb = NULL; /* churn the application */ - process_io(); + wakeup_vfs_user(); process_read_ready(); } + void wakeup_vfs_user() + { + _vfs_user.wakeup_vfs_user(); + } + /** * Close the connection * @@ -1627,7 +1630,7 @@ err_t tcp_connect_callback(void *arg, struct tcp_pcb *pcb, err_t) Lwip::Tcp_socket_dir *socket_dir = static_cast(arg); socket_dir->state = Lwip::Tcp_socket_dir::READY; - socket_dir->process_io(); + socket_dir->wakeup_vfs_user(); socket_dir->process_read_ready(); return ERR_OK; } @@ -1662,7 +1665,7 @@ err_t tcp_recv_callback(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t) socket_dir->recv(p); } - socket_dir->process_io(); + socket_dir->wakeup_vfs_user(); socket_dir->process_read_ready(); return ERR_OK; } @@ -1705,7 +1708,7 @@ err_t tcp_sent_callback(void *arg, struct tcp_pcb *pcb, u16_t) } Lwip::Tcp_socket_dir *socket_dir = static_cast(arg); - socket_dir->process_io(); + socket_dir->wakeup_vfs_user(); return ERR_OK; } @@ -1765,10 +1768,10 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, */ struct Vfs_netif : Lwip::Nic_netif { - Vfs::Env::User &_vfs_user; + Vfs::Env &_vfs_env; - Tcp_proto_dir tcp_dir; - Udp_proto_dir udp_dir; + Tcp_proto_dir tcp_dir { _vfs_env }; + Udp_proto_dir udp_dir { _vfs_env }; Nameserver_registry nameserver_handles { }; @@ -1780,8 +1783,7 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, : Lwip::Nic_netif(vfs_env.env(), vfs_env.alloc(), config, wakeup_scheduler), - _vfs_user(vfs_env.user()), - tcp_dir(vfs_env), udp_dir(vfs_env) + _vfs_env(vfs_env) { } ~Vfs_netif() @@ -1795,10 +1797,7 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, */ void status_callback() override { - tcp_dir.notify(); - udp_dir.notify(); - - _vfs_user.wakeup_vfs_user(); + _vfs_env.user().wakeup_vfs_user(); } } _netif; diff --git a/repos/libports/src/lib/vfs/oss/vfs_oss.cc b/repos/libports/src/lib/vfs/oss/vfs_oss.cc index d4059ca371..e6b7e336b1 100644 --- a/repos/libports/src/lib/vfs/oss/vfs_oss.cc +++ b/repos/libports/src/lib/vfs/oss/vfs_oss.cc @@ -629,6 +629,7 @@ class Vfs::Oss_file_system::Data_file_system : public Single_file_system Data_file_system &operator = (Data_file_system const &); Genode::Entrypoint &_ep; + Vfs::Env::User &_vfs_user; Audio &_audio; struct Oss_vfs_handle : public Single_vfs_handle @@ -705,41 +706,29 @@ class Vfs::Oss_file_system::Data_file_system : public Single_file_system void _handle_audio_out_progress() { - if (_audio.handle_out_progress()) { - /* at least one stream packet is available */ - _handle_registry.for_each([this] (Registered_handle &handle) { - if (handle.blocked) { - handle.blocked = false; - handle.io_progress_response(); - } - }); - } + if (_audio.handle_out_progress()) + _vfs_user.wakeup_vfs_user(); } void _handle_audio_in_progress() { - if (_audio.handle_in_progress()) { - /* at least one stream packet is available */ - _handle_registry.for_each([this] (Registered_handle &handle) { - if (handle.blocked) { - handle.blocked = false; - handle.io_progress_response(); - } - }); - } + if (_audio.handle_in_progress()) + _vfs_user.wakeup_vfs_user(); } public: Data_file_system(Genode::Entrypoint &ep, + Vfs::Env::User &vfs_user, Audio &audio, Name const &name) : Single_file_system { Node_type::CONTINUOUS_FILE, name.string(), Node_rwx::ro(), Genode::Xml_node("") }, - _ep { ep }, - _audio { audio } + _ep { ep }, + _vfs_user { vfs_user }, + _audio { audio } { _audio.out_progress_sigh(_audio_out_progress_sigh); _audio.in_progress_sigh(_audio_in_progress_sigh); @@ -1008,7 +997,7 @@ struct Vfs::Oss_file_system::Local_factory : File_system_factory _label { config.attribute_value("label", Label("")) }, _name { name(config) }, _env { env }, - _data_fs { _env.env().ep(), _audio, name(config) } + _data_fs { _env.env().ep(), env.user(), _audio, name(config) } { } Vfs::File_system *create(Vfs::Env&, Xml_node node) override diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h index eb203e8686..907547f5a0 100644 --- a/repos/os/include/vfs/dir_file_system.h +++ b/repos/os/include/vfs/dir_file_system.h @@ -314,7 +314,7 @@ class Vfs::Dir_file_system : public File_system vfs_handle.seek(index * sizeof(Dirent)); /* forward the response handler */ - dir_vfs_handle->apply_handler([&] (Vfs::Io_response_handler &h) { + dir_vfs_handle->apply_handler([&] (Vfs::Read_ready_response_handler &h) { vfs_handle.handler(&h); }); result = vfs_handle.fs().queue_read(&vfs_handle, sizeof(Dirent)); @@ -998,7 +998,7 @@ class Vfs::Dir_file_system : public File_system auto f = [&result, dir_vfs_handle] (Dir_vfs_handle::Subdir_handle_element &e) { /* forward the response handler */ - dir_vfs_handle->apply_handler([&] (Io_response_handler &h) { + dir_vfs_handle->apply_handler([&] (Read_ready_response_handler &h) { e.vfs_handle.handler(&h); }); e.synced = false; diff --git a/repos/os/include/vfs/vfs_handle.h b/repos/os/include/vfs/vfs_handle.h index 7b6895dc47..6a82aaf1d9 100644 --- a/repos/os/include/vfs/vfs_handle.h +++ b/repos/os/include/vfs/vfs_handle.h @@ -17,7 +17,7 @@ #include namespace Vfs{ - struct Io_response_handler; + struct Read_ready_response_handler; struct Watch_response_handler; class Vfs_handle; class Vfs_watch_handle; @@ -33,17 +33,12 @@ namespace Vfs{ * These responses should be assumed to be called * during I/O signal dispatch. */ -struct Vfs::Io_response_handler : Genode::Interface +struct Vfs::Read_ready_response_handler : Genode::Interface { /** * Respond to a resource becoming readable */ virtual void read_ready_response() = 0; - - /** - * Respond to complete pending I/O - */ - virtual void io_progress_response() = 0; }; @@ -64,12 +59,13 @@ class Vfs::Vfs_handle { private: - Directory_service &_ds; - File_io_service &_fs; - Genode::Allocator &_alloc; - Io_response_handler *_handler = nullptr; - file_size _seek = 0; - int _status_flags; + Directory_service &_ds; + File_io_service &_fs; + Genode::Allocator &_alloc; + file_size _seek = 0; + int _status_flags; + + Read_ready_response_handler *_handler_ptr = nullptr; /* * Noncopyable @@ -143,9 +139,9 @@ class Vfs::Vfs_handle /** * Set response handler, unset with nullptr */ - virtual void handler(Io_response_handler *handler) + virtual void handler(Read_ready_response_handler *handler_ptr) { - _handler = handler; + _handler_ptr = handler_ptr; } /** @@ -155,19 +151,13 @@ class Vfs::Vfs_handle */ template void apply_handler(FUNC const &func) const { - if (_handler) func(*_handler); } + if (_handler_ptr) func(*_handler_ptr); } /** * Notify application through response handler */ void read_ready_response() { - if (_handler) _handler->read_ready_response(); } - - /** - * Notify application through response handler - */ - void io_progress_response() { - if (_handler) _handler->io_progress_response(); } + if (_handler_ptr) _handler_ptr->read_ready_response(); } /** * Close handle at backing file-system. diff --git a/repos/os/src/lib/vfs/file_system_factory.cc b/repos/os/src/lib/vfs/file_system_factory.cc index 5cdf20e8e3..2d86396e94 100644 --- a/repos/os/src/lib/vfs/file_system_factory.cc +++ b/repos/os/src/lib/vfs/file_system_factory.cc @@ -33,7 +33,7 @@ namespace Vfs { - using Vfs::Io_response_handler; + using Vfs::Read_ready_response_handler; template struct Builtin_entry; struct External_entry; diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index 0383288622..34834c2f5b 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -136,12 +136,10 @@ class Vfs::Fs_file_system : public File_system, private Remote_io struct Fs_vfs_handle : Vfs_handle, private ::File_system::Node, private Handle_space::Element, - private Fs_vfs_handle_queue::Element, private Handle_state { friend Genode::Id_space<::File_system::Node>; friend Fs_vfs_handle_queue; - using Fs_vfs_handle_queue::Element::enqueued; using Handle_state::queued_read_state; using Handle_state::queued_read_packet; @@ -450,18 +448,11 @@ class Vfs::Fs_file_system : public File_system, private Remote_io { } }; - Fs_vfs_handle_queue _congested_handles { }; - Write_result _write(Fs_vfs_handle &handle, file_size const seek_offset, const char *buf, file_size count, file_size &out_count) { - /* - * TODO - * a sustained write loop will congest the packet buffer, - * perhaps acks should be processed before submission? - * - * _handle_ack(); - */ + /* reclaim as much space in the packet stream as possible */ + _handle_ack(); ::File_system::Session::Tx::Source &source = *_fs.tx(); using ::File_system::Packet_descriptor; @@ -470,9 +461,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io count = min(max_packet_size, count); if (!source.ready_to_submit()) { - if (!handle.enqueued()) - _congested_handles.enqueue(handle); - _write_would_block = true; return Write_result::WRITE_ERR_WOULD_BLOCK; } @@ -489,9 +477,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io _submit_packet(packet_in); } catch (::File_system::Session::Tx::Source::Packet_alloc_failed) { - if (!handle.enqueued()) - _congested_handles.enqueue(handle); - _write_would_block = true; return Write_result::WRITE_ERR_WOULD_BLOCK; } @@ -508,6 +493,8 @@ class Vfs::Fs_file_system : public File_system, private Remote_io ::File_system::Session::Tx::Source &source = *_fs.tx(); using ::File_system::Packet_descriptor; + bool any_ack_handled = false; + while (source.ack_avail()) { Packet_descriptor const packet = source.try_get_acked_packet(); @@ -516,8 +503,8 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Handle_space::Id const id(packet.handle()); - auto handle_read = [&] (Fs_vfs_handle &handle) { - + auto handle_fn = [&] (Fs_vfs_handle &handle) + { if (!packet.succeeded()) Genode::error("packet operation=", (int)packet.operation(), " failed"); @@ -530,29 +517,22 @@ class Vfs::Fs_file_system : public File_system, private Remote_io case Packet_descriptor::READ: handle.queued_read_packet = packet; handle.queued_read_state = Handle_state::Queued_state::ACK; - handle.io_progress_response(); break; case Packet_descriptor::WRITE: - /* - * Notify anyone who might have failed on - * 'alloc_packet()' - */ - handle.io_progress_response(); + source.release_packet(packet); break; case Packet_descriptor::SYNC: handle.queued_sync_packet = packet; handle.queued_sync_state = Handle_state::Queued_state::ACK; - handle.io_progress_response(); break; case Packet_descriptor::CONTENT_CHANGED: - /* previously handled */ break; case Packet_descriptor::WRITE_TIMESTAMP: - /* previously handled */ + source.release_packet(packet); break; } }; @@ -562,34 +542,22 @@ class Vfs::Fs_file_system : public File_system, private Remote_io _watch_handle_space.apply(id, [&] (Fs_vfs_watch_handle &handle) { handle.watch_response(); }); } else { - _handle_space.apply(id, handle_read); + _handle_space.apply(id, handle_fn); } } catch (Handle_space::Unknown_id) { Genode::warning("ack for unknown File_system handle ", id); } - if (packet.operation() == Packet_descriptor::WRITE) { - source.release_packet(packet); - } - - if (packet.operation() == Packet_descriptor::WRITE_TIMESTAMP) { - source.release_packet(packet); - } + if (packet.succeeded()) + any_ack_handled = true; } - } - void _handle_signal() - { - _handle_ack(); - - _congested_handles.dequeue_all([] (Fs_vfs_handle &handle) { - handle.io_progress_response(); }); - - _env.user().wakeup_vfs_user(); + if (any_ack_handled) + _env.user().wakeup_vfs_user(); } Genode::Io_signal_handler _signal_handler { - _env.env().ep(), *this, &Fs_file_system::_handle_signal }; + _env.env().ep(), *this, &Fs_file_system::_handle_ack }; static size_t buffer_size(Genode::Xml_node const &config) { @@ -867,8 +835,6 @@ class Vfs::Fs_file_system : public File_system, private Remote_io void close(Vfs_handle *vfs_handle) override { Fs_vfs_handle *fs_handle = static_cast(vfs_handle); - if (fs_handle->enqueued()) - _congested_handles.remove(*fs_handle); _fs.close(fs_handle->file_handle()); destroy(fs_handle->alloc(), fs_handle); @@ -935,10 +901,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io { Fs_vfs_handle *handle = static_cast(vfs_handle); - bool result = handle->queue_read(count); - if (!result && !handle->enqueued()) - _congested_handles.enqueue(*handle); - return result; + return handle->queue_read(count); } Read_result complete_read(Vfs_handle *vfs_handle, char *dst, file_size count, @@ -948,10 +911,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Fs_vfs_handle *handle = static_cast(vfs_handle); - Read_result result = handle->complete_read(dst, count, out_count); - if (result == READ_QUEUED && !handle->enqueued()) - _congested_handles.enqueue(*handle); - return result; + return handle->complete_read(dst, count, out_count); } bool read_ready(Vfs_handle const &vfs_handle) const override diff --git a/repos/os/src/lib/vfs/tap/nic_file_system.h b/repos/os/src/lib/vfs/tap/nic_file_system.h index 164fc21e86..4babce42f0 100644 --- a/repos/os/src/lib/vfs/tap/nic_file_system.h +++ b/repos/os/src/lib/vfs/tap/nic_file_system.h @@ -82,7 +82,7 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle if (_blocked) { _blocked = false; - io_progress_response(); + _vfs_user.wakeup_vfs_user(); } if (_notifying) { diff --git a/repos/os/src/lib/vfs/tap/uplink_file_system.h b/repos/os/src/lib/vfs/tap/uplink_file_system.h index 8654085d40..6aaf41da06 100644 --- a/repos/os/src/lib/vfs/tap/uplink_file_system.h +++ b/repos/os/src/lib/vfs/tap/uplink_file_system.h @@ -59,7 +59,7 @@ class Vfs::Uplink_file_system::Uplink_vfs_handle : public Single_vfs_handle, if (_blocked) { _blocked = false; - io_progress_response(); + _vfs_user.wakeup_vfs_user(); } if (_notifying) { diff --git a/repos/os/src/lib/vfs/terminal_file_system.h b/repos/os/src/lib/vfs/terminal_file_system.h index 49574873fa..15d2f86c6c 100644 --- a/repos/os/src/lib/vfs/terminal_file_system.h +++ b/repos/os/src/lib/vfs/terminal_file_system.h @@ -119,7 +119,6 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system bool const _raw; bool notifying = false; - bool blocked = false; Terminal_vfs_handle(Terminal::Connection &terminal, Vfs::Env::User &vfs_user, @@ -157,10 +156,8 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system _fetch_data_from_terminal(_terminal, _read_buffer, _interrupt_handler, _raw); - if (_read_buffer.empty()) { - blocked = true; + if (_read_buffer.empty()) return READ_QUEUED; - } unsigned consumed = 0; for (; consumed < count && !_read_buffer.empty(); consumed++) @@ -206,11 +203,6 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system _raw); _handle_registry.for_each([] (Registered_handle &handle) { - if (handle.blocked) { - handle.blocked = false; - handle.io_progress_response(); - } - if (handle.notifying) { handle.notifying = false; handle.read_ready_response(); diff --git a/repos/os/src/server/vfs/node.h b/repos/os/src/server/vfs/node.h index beff1ac002..cc8003fd5e 100644 --- a/repos/os/src/server/vfs/node.h +++ b/repos/os/src/server/vfs/node.h @@ -228,7 +228,7 @@ class Vfs_server::Node : Node_space::Element, Node_queue::Element * Super-class for nodes that process read/write packets */ class Vfs_server::Io_node : public Vfs_server::Node, - public Vfs::Io_response_handler + public Vfs::Read_ready_response_handler { private: @@ -498,11 +498,6 @@ class Vfs_server::Io_node : public Vfs_server::Node, if (_read_ready_state == Read_ready_state::REQUESTED) _read_ready_state = Read_ready_state::READY; } - - /** - * Called by the VFS plugin of this handle - */ - void io_progress_response() override { } }; diff --git a/repos/os/src/server/vfs_block/component.cc b/repos/os/src/server/vfs_block/component.cc index 19b32f7e1b..47e598c75a 100644 --- a/repos/os/src/server/vfs_block/component.cc +++ b/repos/os/src/server/vfs_block/component.cc @@ -78,29 +78,13 @@ class Vfs_block::File Constructible _job { }; - struct Io_response_handler : Vfs::Io_response_handler - { - Signal_context_capability sigh { }; - - void read_ready_response() override { } - - void io_progress_response() override - { - if (sigh.valid()) { - Signal_transmitter(sigh).submit(); - } - } - }; - Io_response_handler _io_response_handler { }; - Block::Session::Info _block_info { }; public: - File(Genode::Allocator &alloc, - Vfs::File_system &vfs, - Signal_context_capability sigh, - File_info const &info) + File(Genode::Allocator &alloc, + Vfs::File_system &vfs, + File_info const &info) : _vfs { vfs }, _vfs_handle { nullptr } @@ -137,9 +121,6 @@ class Vfs_block::File .align_log2 = log2(info.block_size), .writeable = info.writeable, }; - - _io_response_handler.sigh = sigh; - _vfs_handle->handler(&_io_response_handler); } ~File() @@ -313,7 +294,8 @@ struct Block_session_component : Rpc_object, }; -struct Main : Rpc_object> +struct Main : Rpc_object>, + private Vfs::Env::User { Env &_env; @@ -324,7 +306,7 @@ struct Main : Rpc_object> Attached_rom_dataspace _config_rom { _env, "config" }; Vfs::Simple_env _vfs_env { _env, _heap, - _config_rom.xml().sub_node("vfs") }; + _config_rom.xml().sub_node("vfs"), *this }; Constructible _block_ds { }; Constructible _block_file { }; @@ -339,6 +321,13 @@ struct Main : Rpc_object> _block_session->handle_request(); } + /* + * Vfs::Env::User interface + */ + void wakeup_vfs_user() override + { + _request_handler.local_submit(); + } /* * Root interface @@ -378,8 +367,7 @@ struct Main : Rpc_object> try { _block_ds.construct(_env.ram(), _env.rm(), tx_buf_size); - _block_file.construct(_heap, _vfs_env.root_dir(), - _request_handler, file_info); + _block_file.construct(_heap, _vfs_env.root_dir(), file_info); _block_session.construct(_env.rm(), _env.ep(), _block_ds->cap(), _request_handler, *_block_file, From 09c1a9cfc06804573b6f0e0defd95306990bba90 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 5 Jan 2023 17:25:36 +0100 Subject: [PATCH 0183/1921] qt5: don't pass non-printable unicode values on key repeat Fixes #4716 --- repos/libports/ports/qt5.hash | 2 +- repos/libports/ports/qt5.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/libports/ports/qt5.hash b/repos/libports/ports/qt5.hash index dc393b0f5e..0bf8538cb2 100644 --- a/repos/libports/ports/qt5.hash +++ b/repos/libports/ports/qt5.hash @@ -1 +1 @@ -3d25bb6b12ee2d7e051cbac00de15290c6688932 +271cc31b2f7ebc2b62b00a83477688724630805a diff --git a/repos/libports/ports/qt5.port b/repos/libports/ports/qt5.port index cde8a69699..6d495044d4 100644 --- a/repos/libports/ports/qt5.port +++ b/repos/libports/ports/qt5.port @@ -4,5 +4,5 @@ VERSION := 5.15.2 DOWNLOADS := qt5.git URL(qt5) := https://github.com/cproc/qt5.git -REV(qt5) := issue4692 +REV(qt5) := issue4716 DIR(qt5) := src/lib/qt5 From ddeaccf7283bda90173e7e494c9da0eefdd1eb69 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 6 Jan 2023 15:21:12 +0100 Subject: [PATCH 0184/1921] vfs: documentation of Vfs::Env::User Issue #4706 --- repos/os/include/vfs/env.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/repos/os/include/vfs/env.h b/repos/os/include/vfs/env.h index 7f0586931a..4dbaa4daae 100644 --- a/repos/os/include/vfs/env.h +++ b/repos/os/include/vfs/env.h @@ -70,6 +70,26 @@ struct Vfs::Env : Interface */ struct User : Interface, Genode::Noncopyable { + /** + * Called whenever the VFS observes I/O + * + * Note that this method is usually called from the context of an + * I/O signal handler. Hence, it must never execute application-level + * code. Otherwise, unexpected nesting of application-level code might + * occur, in particular if the application performs synchronous I/O + * via 'wait_and_dispatch_one_io_signal()'. + * + * There are two recommended ways to safely implement this interface: + * + * The first option is to record the occurence of I/O for a later + * application-level response by modifying a state variable. + * + * The second way is reflecting the condition to an application-level + * signal handler by calling 'Signal_handler::local_submit()'. + * This way, the application-level signal handler is executed once + * the component goes idle next time. This handler can then safely + * enter application-level code. + */ virtual void wakeup_vfs_user() = 0; }; From 5a558a64e1eb26c54b9d9a9f4f063f09c474beb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 9 Jan 2023 15:20:47 +0100 Subject: [PATCH 0185/1921] gpt_write: use GPE LBA from header When writing the GPT header, the tool always wrote the GPT entries belonging to the primary header to LBA following the header. Normally this is LBA 2 as the header is located in LBA 1. The GPT allows for up to 128 entries that all in all cover 16 KiB of storage space. However, on some systems, e.g. ARM-based machines, the bootloader can be stored in this region. For this reason the GPT entries may be moved to a different LBA. This commit changes the tool to adhere to then given GPE LBA in header when writing out the modified GPT data. Fixes #4720. --- repos/gems/src/app/gpt_write/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/src/app/gpt_write/main.cc b/repos/gems/src/app/gpt_write/main.cc index 11ca60f12f..d09bd124dc 100644 --- a/repos/gems/src/app/gpt_write/main.cc +++ b/repos/gems/src/app/gpt_write/main.cc @@ -309,7 +309,7 @@ struct Gpt::Writer size_t const len = hdr.gpe_num * hdr.gpe_size; size_t const blocks = len / _block_size; Block::sector_t const entries_lba = primary - ? hdr_lba + 1 + ? hdr.gpe_lba : _block_count - (blocks + 1); Block_io entries_io(_block, _block_size, _ep, entries_lba, blocks, true, entries, len); From fc690f1c47ef316f46e0919b10715648c124a080 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 16 Dec 2022 11:53:27 +0100 Subject: [PATCH 0186/1921] hw: re-work the ipc node's internal state machine * Split the internal state into incoming and outgoing message relations * Avoid fragmenting of one state like formerly '_state' and '_help' * Remove pointer to caller, use incoming FIFO instead This commit fixes at least two bugs that were triggered by tests that destroy threads in many different states, like run/bomb: * The '_help' data member was not reset reliable in each situation where a helping relationship came to an end. However, when we fixed this bug alone in the old state model, the issues remained. The new state model fixes this bug as well. * A thread sometimes referenced an already dead thread as receiver. This caused the kernel IPC code to access the vtable of an object that didn't exist any longer. Note that the two threads were not in direct IPC relationship while the receiver was destroyed, so, there must have been an intermediate node between them. Due to the complexity of this problem, we eventually gave up pin-pointing the exact reason in the kernel IPC code. The issue disappeared with the new state model. Fix genodelabs/genode#4704 --- repos/base-hw/src/core/kernel/ipc_node.cc | 180 +++++++++------------- repos/base-hw/src/core/kernel/ipc_node.h | 105 +++++-------- 2 files changed, 110 insertions(+), 175 deletions(-) diff --git a/repos/base-hw/src/core/kernel/ipc_node.cc b/repos/base-hw/src/core/kernel/ipc_node.cc index ffa2e3abdf..741bbed955 100644 --- a/repos/base-hw/src/core/kernel/ipc_node.cc +++ b/repos/base-hw/src/core/kernel/ipc_node.cc @@ -25,153 +25,107 @@ using namespace Kernel; -void Ipc_node::_receive_request(Ipc_node &caller) +void Ipc_node::_receive_from(Ipc_node &node) { - _thread.ipc_copy_msg(caller._thread); - _caller = &caller; - _state = INACTIVE; + _thread.ipc_copy_msg(node._thread); + _in.state = In::REPLY; } -void Ipc_node::_receive_reply(Ipc_node &callee) +void Ipc_node::_cancel_send() { - _thread.ipc_copy_msg(callee._thread); - _state = INACTIVE; - _thread.ipc_send_request_succeeded(); -} + if (_out.node) { + /* + * If the receiver is already processing our message, + * we have to ensure that he skips sending a reply by + * letting his node state indicate our withdrawal. + */ + if (_out.node->_in.state == In::REPLY) + _out.node->_in.queue.head([&] (Queue_item &item) { + if (&item == &_queue_item) + _out.node->_in.state = In::REPLY_NO_SENDER; + }); -void Ipc_node::_announce_request(Ipc_node &node) -{ - /* directly receive request if we've awaited it */ - if (_state == AWAIT_REQUEST) { - _receive_request(node); - _thread.ipc_await_request_succeeded(); - return; + _out.node->_in.queue.remove(_queue_item); + _out.node = nullptr; } - - /* cannot receive yet, so queue request */ - _request_queue.enqueue(node._request_queue_item); -} - - -void Ipc_node::_cancel_request_queue() -{ - _request_queue.dequeue_all([] (Queue_item &item) { - Ipc_node &node { item.object() }; - node._outbuf_request_cancelled(); - }); -} - - -void Ipc_node::_cancel_outbuf_request() -{ - if (_callee) { - _callee->_announced_request_cancelled(*this); - _callee = nullptr; + if (_out.sending()) { + _thread.ipc_send_request_failed(); + _out.state = Out::READY; } } -void Ipc_node::_cancel_inbuf_request() +bool Ipc_node::_helping() const { - if (_caller) { - _caller->_outbuf_request_cancelled(); - _caller = nullptr; + return _out.state == Out::SEND_HELPING && _out.node; +} + + +bool Ipc_node::can_send_request() const +{ + return _out.state == Out::READY && !_in.waiting(); +} + + +void Ipc_node::send_request(Ipc_node &node, bool help) +{ + node._in.queue.enqueue(_queue_item); + + if (node._in.waiting()) { + node._receive_from(*this); + node._thread.ipc_await_request_succeeded(); } -} - - -void Ipc_node::_announced_request_cancelled(Ipc_node &node) -{ - if (_caller == &node) - _caller = nullptr; - else - _request_queue.remove(node._request_queue_item); -} - - -void Ipc_node::_outbuf_request_cancelled() -{ - if (_callee == nullptr) - return; - - _callee = nullptr; - _state = INACTIVE; - _thread.ipc_send_request_failed(); -} - - -bool Ipc_node::_helps_outbuf_dst() -{ - return (_state == AWAIT_REPLY) && _help; -} - - -bool Ipc_node::can_send_request() -{ - return _state == INACTIVE; -} - - -void Ipc_node::send_request(Ipc_node &callee, bool help) -{ - _state = AWAIT_REPLY; - _callee = &callee; - _help = false; - - /* announce request */ - _callee->_announce_request(*this); - - _help = help; + _out.node = &node; + _out.state = help ? Out::SEND_HELPING : Out::SEND; } Thread &Ipc_node::helping_sink() { - return _helps_outbuf_dst() ? _callee->helping_sink() : _thread; + return _helping() ? _out.node->helping_sink() : _thread; } -bool Ipc_node::can_await_request() +bool Ipc_node::can_await_request() const { - return _state == INACTIVE; + return _in.state == In::READY; } void Ipc_node::await_request() { - _state = AWAIT_REQUEST; - _request_queue.dequeue([&] (Queue_item &item) { - _receive_request(item.object()); + _in.state = In::WAIT; + _in.queue.head([&] (Queue_item &item) { + _receive_from(item.object()); }); } void Ipc_node::send_reply() { - /* reply to the last request if we have to */ - if (_state == INACTIVE && _caller) { - _caller->_receive_reply(*this); - _caller = nullptr; - } + if (_in.state == In::REPLY) + _in.queue.dequeue([&] (Queue_item &item) { + Ipc_node &node { item.object() }; + node._thread.ipc_copy_msg(_thread); + node._out.node = nullptr; + node._out.state = Out::READY; + node._thread.ipc_send_request_succeeded(); + }); + + _in.state = In::READY; } void Ipc_node::cancel_waiting() { - switch (_state) { - case AWAIT_REPLY: - _cancel_outbuf_request(); - _state = INACTIVE; - _thread.ipc_send_request_failed(); - break; - case AWAIT_REQUEST: - _state = INACTIVE; + if (_out.sending()) + _cancel_send(); + + if (_in.waiting()) { + _in.state = In::READY; _thread.ipc_await_request_failed(); - break; - return; - default: return; } } @@ -184,8 +138,12 @@ Ipc_node::Ipc_node(Thread &thread) Ipc_node::~Ipc_node() { - _cancel_request_queue(); - _cancel_inbuf_request(); - _cancel_outbuf_request(); -} + _in.state = In::DESTRUCT; + _out.state = Out::DESTRUCT; + _cancel_send(); + + _in.queue.for_each([&] (Queue_item &item) { + item.object()._cancel_send(); + }); +} diff --git a/repos/base-hw/src/core/kernel/ipc_node.h b/repos/base-hw/src/core/kernel/ipc_node.h index b8e25ea4b7..81e46888b8 100644 --- a/repos/base-hw/src/core/kernel/ipc_node.h +++ b/repos/base-hw/src/core/kernel/ipc_node.h @@ -35,74 +35,56 @@ class Kernel::Ipc_node using Queue_item = Genode::Fifo_element; using Queue = Genode::Fifo; - enum State + struct In { - INACTIVE = 1, - AWAIT_REPLY = 2, - AWAIT_REQUEST = 3, + enum State { READY, WAIT, REPLY, REPLY_NO_SENDER, DESTRUCT }; + + State state { READY }; + Queue queue { }; + + bool waiting() const + { + return state == WAIT; + } + }; + + struct Out + { + enum State { READY, SEND, SEND_HELPING, DESTRUCT }; + + State state { READY }; + Ipc_node *node { nullptr }; + + bool sending() const + { + return state == SEND_HELPING || state == SEND; + } }; Thread &_thread; - Queue_item _request_queue_item { *this }; - State _state { INACTIVE }; - Ipc_node *_caller { nullptr }; - Ipc_node *_callee { nullptr }; - bool _help { false }; - Queue _request_queue { }; + Queue_item _queue_item { *this }; + Out _out { }; + In _in { }; /** - * Buffer next request from request queue in 'r' to handle it + * Receive a message from another IPC node */ - void _receive_request(Ipc_node &caller); + void _receive_from(Ipc_node &node); /** - * Receive a given reply if one is expected + * Cancel an ongoing send operation */ - void _receive_reply(Ipc_node &callee); + void _cancel_send(); /** - * Insert 'r' into request queue, buffer it if we were waiting for it + * Return wether this IPC node is helping another one */ - void _announce_request(Ipc_node &node); + bool _helping() const; /** - * Cancel all requests in request queue - */ - void _cancel_request_queue(); - - /** - * Cancel request in outgoing buffer - */ - void _cancel_outbuf_request(); - - /** - * Cancel request in incoming buffer - */ - void _cancel_inbuf_request(); - - /** - * A request 'r' in inbuf or request queue was cancelled by sender - */ - void _announced_request_cancelled(Ipc_node &node); - - /** - * The request in the outbuf was cancelled by receiver - */ - void _outbuf_request_cancelled(); - - /** - * Return wether we are the source of a helping relationship - */ - bool _helps_outbuf_dst(); - - /** - * Make the class noncopyable because it has pointer members + * Noncopyable */ Ipc_node(const Ipc_node&) = delete; - - /** - * Make the class noncopyable because it has pointer members - */ const Ipc_node& operator=(const Ipc_node&) = delete; public: @@ -120,11 +102,11 @@ class Kernel::Ipc_node /** * Send a request and wait for the according reply * - * \param callee targeted IPC node - * \param help wether the request implies a helping relationship + * \param node targeted IPC node + * \param help wether the request implies a helping relationship */ - bool can_send_request(); - void send_request(Ipc_node &callee, + bool can_send_request() const; + void send_request(Ipc_node &node, bool help); /** @@ -137,15 +119,10 @@ class Kernel::Ipc_node */ template void for_each_helper(F f) { - /* if we have a helper in the receive buffer, call 'f' for it */ - if (_caller && _caller->_help) - f(_caller->_thread); - - /* call 'f' for each helper in our request queue */ - _request_queue.for_each([f] (Queue_item &item) { + _in.queue.for_each([f] (Queue_item &item) { Ipc_node &node { item.object() }; - if (node._help) + if (node._helping()) f(node._thread); }); } @@ -155,7 +132,7 @@ class Kernel::Ipc_node * * \return wether a request could be received already */ - bool can_await_request(); + bool can_await_request() const; void await_request(); /** @@ -168,7 +145,7 @@ class Kernel::Ipc_node */ void cancel_waiting(); - bool awaits_request() const { return _state == AWAIT_REQUEST; } + bool awaits_request() const { return _in.waiting(); } }; #endif /* _CORE__KERNEL__IPC_NODE_H_ */ From fd3c70ec5b697738731ea0c30236784c596dc95c Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 16 Dec 2022 11:59:58 +0100 Subject: [PATCH 0187/1921] hw: mark threads as dead in case of ipc violations The IPC protcol violations are: * Sending to an unknown thread (cap) * Waiting for messages if a reply hasn't happened yet This silents threads that otherwise repeatedly cause kernel messages about the violation. Ref genodelabs/genode#4704 --- repos/base-hw/src/core/kernel/thread.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index 8feb09c4ce..9a46bd1b84 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -488,7 +488,7 @@ void Thread::_call_await_request_msg() } } else { Genode::raw("IPC await request: bad state"); - user_arg_0(0); + _become_inactive(DEAD); } } @@ -533,7 +533,7 @@ void Thread::_call_send_request_msg() if (!dst) { Genode::raw(*this, ": cannot send to unknown recipient ", (unsigned)user_arg_1()); - _become_inactive(AWAITS_IPC); + _become_inactive(DEAD); return; } bool const help = Cpu_job::_helping_possible(*dst); From 115170624343e17a737adb75231868f360248671 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 16 Dec 2022 12:07:47 +0100 Subject: [PATCH 0188/1921] hw: rename functions of Ipc_node class signature * Remove *request* in context of: wait, reply, send to shorten it. * Use ready_to_* instead of can_*, which is regularily used in Genode's APIs * Replace helping_sink with helping_destination, as destination is more common Ref genodelabs/genode#4704 --- repos/base-hw/src/core/kernel/cpu.h | 2 +- repos/base-hw/src/core/kernel/cpu_context.h | 2 +- repos/base-hw/src/core/kernel/ipc_node.cc | 14 +++---- repos/base-hw/src/core/kernel/ipc_node.h | 43 ++++++++++++--------- repos/base-hw/src/core/kernel/thread.cc | 18 ++++----- repos/base-hw/src/core/kernel/thread.h | 6 +-- repos/base-hw/src/core/kernel/vm.h | 6 +-- 7 files changed, 48 insertions(+), 43 deletions(-) diff --git a/repos/base-hw/src/core/kernel/cpu.h b/repos/base-hw/src/core/kernel/cpu.h index 30c2c1635e..e47d1adf73 100644 --- a/repos/base-hw/src/core/kernel/cpu.h +++ b/repos/base-hw/src/core/kernel/cpu.h @@ -172,7 +172,7 @@ class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout * Returns the currently active job */ Job & scheduled_job() const { - return *static_cast(&_scheduler.head())->helping_sink(); } + return *static_cast(&_scheduler.head())->helping_destination(); } unsigned id() const { return _id; } Cpu_scheduler &scheduler() { return _scheduler; } diff --git a/repos/base-hw/src/core/kernel/cpu_context.h b/repos/base-hw/src/core/kernel/cpu_context.h index 472dc12900..cb420ec319 100644 --- a/repos/base-hw/src/core/kernel/cpu_context.h +++ b/repos/base-hw/src/core/kernel/cpu_context.h @@ -88,7 +88,7 @@ class Kernel::Cpu_job : private Cpu_share /** * Return which job currently uses our CPU-share */ - virtual Cpu_job * helping_sink() = 0; + virtual Cpu_job * helping_destination() = 0; /** * Construct a job with scheduling priority 'p' and time quota 'q' diff --git a/repos/base-hw/src/core/kernel/ipc_node.cc b/repos/base-hw/src/core/kernel/ipc_node.cc index 741bbed955..f06b557c36 100644 --- a/repos/base-hw/src/core/kernel/ipc_node.cc +++ b/repos/base-hw/src/core/kernel/ipc_node.cc @@ -63,13 +63,13 @@ bool Ipc_node::_helping() const } -bool Ipc_node::can_send_request() const +bool Ipc_node::ready_to_send() const { return _out.state == Out::READY && !_in.waiting(); } -void Ipc_node::send_request(Ipc_node &node, bool help) +void Ipc_node::send(Ipc_node &node, bool help) { node._in.queue.enqueue(_queue_item); @@ -82,19 +82,19 @@ void Ipc_node::send_request(Ipc_node &node, bool help) } -Thread &Ipc_node::helping_sink() +Thread &Ipc_node::helping_destination() { - return _helping() ? _out.node->helping_sink() : _thread; + return _helping() ? _out.node->helping_destination() : _thread; } -bool Ipc_node::can_await_request() const +bool Ipc_node::ready_to_wait() const { return _in.state == In::READY; } -void Ipc_node::await_request() +void Ipc_node::wait() { _in.state = In::WAIT; _in.queue.head([&] (Queue_item &item) { @@ -103,7 +103,7 @@ void Ipc_node::await_request() } -void Ipc_node::send_reply() +void Ipc_node::reply() { if (_in.state == In::REPLY) _in.queue.dequeue([&] (Queue_item &item) { diff --git a/repos/base-hw/src/core/kernel/ipc_node.h b/repos/base-hw/src/core/kernel/ipc_node.h index 81e46888b8..06eb8ee047 100644 --- a/repos/base-hw/src/core/kernel/ipc_node.h +++ b/repos/base-hw/src/core/kernel/ipc_node.h @@ -89,30 +89,28 @@ class Kernel::Ipc_node public: - /** - * Destructor - */ + Ipc_node(Thread &thread); + ~Ipc_node(); /** - * Constructor + * Return whether this IPC node is ready to send a message */ - Ipc_node(Thread &thread); + bool ready_to_send() const; /** - * Send a request and wait for the according reply + * Send a message and wait for the according reply * * \param node targeted IPC node * \param help wether the request implies a helping relationship */ - bool can_send_request() const; - void send_request(Ipc_node &node, - bool help); + void send(Ipc_node &node, bool help); /** - * Return root destination of the helping-relation tree we are in + * Return final destination of the helping-chain + * this IPC node is part of, or its own thread otherwise */ - Thread &helping_sink(); + Thread &helping_destination(); /** * Call function 'f' of type 'void (Ipc_node *)' for each helper @@ -128,24 +126,31 @@ class Kernel::Ipc_node } /** - * Wait until a request has arrived and load it for handling + * Return whether this IPC node is ready to wait for messages + */ + bool ready_to_wait() const; + + /** + * Wait until a message has arrived, or handle it if one is available * - * \return wether a request could be received already + * \return wether a message could be received already */ - bool can_await_request() const; - void await_request(); + void wait(); /** - * Reply to last request if there's any + * Reply to last message if there's any */ - void send_reply(); + void reply(); /** - * If IPC node waits, cancel '_outbuf' to stop waiting + * If IPC node waits, cancel it */ void cancel_waiting(); - bool awaits_request() const { return _in.waiting(); } + /** + * Return whether this IPC node is waiting for messages + */ + bool waiting() const { return _in.waiting(); } }; #endif /* _CORE__KERNEL__IPC_NODE_H_ */ diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index 9a46bd1b84..13238320e1 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -295,8 +295,8 @@ void Thread::_become_inactive(State const s) void Thread::_die() { _become_inactive(DEAD); } -Cpu_job * Thread::helping_sink() { - return &_ipc_node.helping_sink(); } +Cpu_job * Thread::helping_destination() { + return &_ipc_node.helping_destination(); } size_t Thread::_core_to_kernel_quota(size_t const quota) const @@ -478,16 +478,16 @@ void Thread::_call_delete_pd() void Thread::_call_await_request_msg() { - if (_ipc_node.can_await_request()) { + if (_ipc_node.ready_to_wait()) { _ipc_alloc_recv_caps((unsigned)user_arg_1()); - _ipc_node.await_request(); - if (_ipc_node.awaits_request()) { + _ipc_node.wait(); + if (_ipc_node.waiting()) { _become_inactive(AWAITS_IPC); } else { user_arg_0(0); } } else { - Genode::raw("IPC await request: bad state"); + Genode::raw("IPC await request: bad state, will block"); _become_inactive(DEAD); } } @@ -539,12 +539,12 @@ void Thread::_call_send_request_msg() bool const help = Cpu_job::_helping_possible(*dst); oir = oir->find(dst->pd()); - if (!_ipc_node.can_send_request()) { + if (!_ipc_node.ready_to_send()) { Genode::raw("IPC send request: bad state"); } else { _ipc_alloc_recv_caps((unsigned)user_arg_2()); _ipc_capid = oir ? oir->capid() : cap_id_invalid(); - _ipc_node.send_request(dst->_ipc_node, help); + _ipc_node.send(dst->_ipc_node, help); } _state = AWAITS_IPC; @@ -554,7 +554,7 @@ void Thread::_call_send_request_msg() void Thread::_call_send_reply_msg() { - _ipc_node.send_reply(); + _ipc_node.reply(); bool const await_request_msg = user_arg_2(); if (await_request_msg) { _call_await_request_msg(); } else { user_arg_0(0); } diff --git a/repos/base-hw/src/core/kernel/thread.h b/repos/base-hw/src/core/kernel/thread.h index 8e9b5aabc6..0f3a78bb3b 100644 --- a/repos/base-hw/src/core/kernel/thread.h +++ b/repos/base-hw/src/core/kernel/thread.h @@ -418,9 +418,9 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout ** Cpu_job ** *************/ - void exception(Cpu & cpu) override; - void proceed(Cpu & cpu) override; - Cpu_job * helping_sink() override; + void exception(Cpu & cpu) override; + void proceed(Cpu & cpu) override; + Cpu_job * helping_destination() override; /************* diff --git a/repos/base-hw/src/core/kernel/vm.h b/repos/base-hw/src/core/kernel/vm.h index 06a069a743..040d92f893 100644 --- a/repos/base-hw/src/core/kernel/vm.h +++ b/repos/base-hw/src/core/kernel/vm.h @@ -142,9 +142,9 @@ class Kernel::Vm : private Kernel::Object, public Cpu_job ** Cpu_job ** *************/ - void exception(Cpu & cpu) override; - void proceed(Cpu & cpu) override; - Cpu_job * helping_sink() override { return this; } + void exception(Cpu & cpu) override; + void proceed(Cpu & cpu) override; + Cpu_job * helping_destination() override { return this; } }; #endif /* _CORE__KERNEL__VM_H_ */ From ab298b6337f1c938abccf52b7c8f9867279cfdd7 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 12 Dec 2022 08:19:51 +0100 Subject: [PATCH 0189/1921] base-hw scheduler: fix ready method Setting the _need_to_schedule member in the 'ready' method of the scheduler was not done correctly. At least, the _need_to_schedule was set true in situations were the head was not outdated by the 'ready' operation. Ref #4151 --- .../base-hw/src/core/kernel/cpu_scheduler.cc | 55 ++++++++----------- 1 file changed, 23 insertions(+), 32 deletions(-) diff --git a/repos/base-hw/src/core/kernel/cpu_scheduler.cc b/repos/base-hw/src/core/kernel/cpu_scheduler.cc index b56d771656..62184c2a4a 100644 --- a/repos/base-hw/src/core/kernel/cpu_scheduler.cc +++ b/repos/base-hw/src/core/kernel/cpu_scheduler.cc @@ -196,43 +196,34 @@ void Cpu_scheduler::ready(Share &s) assert(!s._ready && &s != &_idle); s._ready = 1; + if (s._quota) { + + _ucl[s._prio].remove(&s._claim_item); + if (s._claim) { + + _rcl[s._prio].insert_head(&s._claim_item); + if (_head && _head_claims) { + + if (s._prio >= _head->_prio) { + + _need_to_schedule = true; + } + } else { + + _need_to_schedule = true; + } + } else { + + _rcl[s._prio].insert_tail(&s._claim_item);; + } + } + s._fill = _fill; _fills.insert_tail(&s._fill_item); + if (!_head || _head == &_idle) { - if (_head == &_idle) _need_to_schedule = true; - - if (!s._quota) - return; - - _ucl[s._prio].remove(&s._claim_item); - - if (s._claim) - _rcl[s._prio].insert_head(&s._claim_item); - else - _rcl[s._prio].insert_tail(&s._claim_item); - - /* - * Check whether we need to re-schedule - */ - if (_need_to_schedule) - return; - - /* current head has no quota left */ - if (!_head_claims) { - _need_to_schedule = true; - return; } - - /* if current head has different priority */ - if (s._prio != _head->_prio) { - _need_to_schedule = s._prio > _head->_prio; - return; - } - - /* if current head has same priority, the ready share gets active */ - if (s._claim) - _need_to_schedule = true; } From f74962bdad2ed28629b5ec116be6549f455845cf Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 26 Dec 2022 12:48:37 +0100 Subject: [PATCH 0190/1921] base-hw scheduler: fix bug on removing head The scheduler did not consider the consumed quota during a call to "update" if the head that consumed the quota was removed from the scheduler. When this occured, the internal round time did not advance as expected but remained at its previous value untile the next call to "update" (without a removed head) This commit introduces a new flag that is set only when the head gets removed in order to detect and handle the situation correctly on the next call to "update". Ref #4151 Ref #4710 --- repos/base-hw/src/core/kernel/cpu_scheduler.cc | 11 ++++++++++- repos/base-hw/src/core/kernel/cpu_scheduler.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/repos/base-hw/src/core/kernel/cpu_scheduler.cc b/repos/base-hw/src/core/kernel/cpu_scheduler.cc index 62184c2a4a..59b129c097 100644 --- a/repos/base-hw/src/core/kernel/cpu_scheduler.cc +++ b/repos/base-hw/src/core/kernel/cpu_scheduler.cc @@ -179,6 +179,13 @@ void Cpu_scheduler::update(time_t time) _head_filled(r); _consumed(duration); + + } else if (_head_was_removed) { + + _trim_consumption(duration); + _head_was_removed = false; + _head_yields = false; + _consumed(duration); } if (_claim_for_head()) @@ -258,8 +265,10 @@ void Cpu_scheduler::remove(Share &s) if (s._ready) unready(s); - if (&s == _head) + if (&s == _head) { _head = nullptr; + _head_was_removed = true; + } if (!s._quota) return; diff --git a/repos/base-hw/src/core/kernel/cpu_scheduler.h b/repos/base-hw/src/core/kernel/cpu_scheduler.h index 70e921f44c..944ba532f3 100644 --- a/repos/base-hw/src/core/kernel/cpu_scheduler.h +++ b/repos/base-hw/src/core/kernel/cpu_scheduler.h @@ -120,6 +120,7 @@ class Kernel::Cpu_scheduler unsigned _head_quota = 0; bool _head_claims = false; bool _head_yields = false; + bool _head_was_removed = false; unsigned const _quota; unsigned _residual; unsigned const _fill; From 0467b4aaf33be16f298a43481432731021bd97e9 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Wed, 21 Dec 2022 19:33:23 +0100 Subject: [PATCH 0191/1921] base-hw scheduler: optimize quota depletion events This is an optimization for the case that a prioritized scheduling context needs slightly more time during a round than granted via quota. If this is the case, we move the scheduling context to the front of the unprioritized schedule once its quota gets depleted and thereby at least ensure that it does not have to wait for all unprioritized scheduling contexts as well before being scheduled again. Note that this introduces the possibility of undeserved starvation of unprioritized scheduling contexts to the scheduling scheme. If there are enough prioritized contexts that deplete their quota during a round, they may cover up also the rest of the round with their unprioritized time slices. If this happens every round, contexts without a priority/quota may never get a turn. In the previous scheduling scheme, this could not occur as the unprioritized schedule was completely independent from prioritized schedules and rounds. Ref #4151 Ref #4710 --- .../base-hw/src/core/kernel/cpu_scheduler.cc | 13 +++++++- repos/base-hw/src/core/kernel/double_list.h | 33 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/repos/base-hw/src/core/kernel/cpu_scheduler.cc b/repos/base-hw/src/core/kernel/cpu_scheduler.cc index 59b129c097..fd600e73d2 100644 --- a/repos/base-hw/src/core/kernel/cpu_scheduler.cc +++ b/repos/base-hw/src/core/kernel/cpu_scheduler.cc @@ -73,6 +73,17 @@ void Cpu_scheduler::_head_claimed(unsigned const r) return; _rcl[_head->_prio].to_tail(&_head->_claim_item); + + /* + * This is an optimization for the case that a prioritized scheduling + * context needs sligtly more time during a round than granted via quota. + * If this is the case, we move the scheduling context to the front of + * the unprioritized schedule once its quota gets depleted and thereby + * at least ensure that it does not have to wait for all unprioritized + * scheduling contexts as well before being scheduled again. + */ + if (!_head_yields) + _fills.to_head(&_head->_fill_item); } @@ -128,7 +139,6 @@ unsigned Cpu_scheduler::_trim_consumption(unsigned &q) if (!_head_yields) return _head_quota - q; - _head_yields = false; return 0; } @@ -178,6 +188,7 @@ void Cpu_scheduler::update(time_t time) else _head_filled(r); + _head_yields = false; _consumed(duration); } else if (_head_was_removed) { diff --git a/repos/base-hw/src/core/kernel/double_list.h b/repos/base-hw/src/core/kernel/double_list.h index 14b71f2eb8..ec580f9823 100644 --- a/repos/base-hw/src/core/kernel/double_list.h +++ b/repos/base-hw/src/core/kernel/double_list.h @@ -75,6 +75,31 @@ class Kernel::Double_list _tail = i; } + void _to_head(Item * const i) + { + if (i == _head) + return; + + _connect_neighbors(i); + i->_next = _head; + i->_prev = 0; + _head->_prev = i; + _head = i; + } + + void _tail_to_head() + { + if (_tail == 0 || _tail == _head) + return; + + _tail->_next = _head; + _head->_prev = _tail; + _tail = _tail->_prev; + _tail->_next = 0; + _head = _head->_prev; + _head->_prev = 0; + } + public: /** @@ -91,6 +116,14 @@ class Kernel::Double_list else { _to_tail(i); } } + void to_head(Item * const i) + { + if (i == _tail) + _tail_to_head(); + else + _to_head(i); + } + /** * Insert item 'i' as new tail into list */ From 615dd377ddddb0def01c14fa3e94fc6d1c738759 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 8 Dec 2022 21:28:34 +0100 Subject: [PATCH 0192/1921] base-hw scheduler test: clean up * Get rid of preprocessor macros. * Introduce Main as class. * Exit with -1 instead of endless loops on errors. * Don't try to deal with error conditions, just print a message and exit with -1. * Only one operation per line. Ref #4151 Ref #4710 --- repos/base-hw/run/cpu_scheduler.run | 6 +- repos/base-hw/src/test/cpu_scheduler/test.cc | 1049 ++++++++++++------ 2 files changed, 698 insertions(+), 357 deletions(-) diff --git a/repos/base-hw/run/cpu_scheduler.run b/repos/base-hw/run/cpu_scheduler.run index 57d0782bf7..d6f80737e7 100644 --- a/repos/base-hw/run/cpu_scheduler.run +++ b/repos/base-hw/run/cpu_scheduler.run @@ -35,8 +35,8 @@ build_boot_image "core ld.lib.so init test-cpu_scheduler" append qemu_args " -nographic" # execute the test in qemu if the targeted platform is supported -run_genode_until "done.*\n" 10 +run_genode_until "child .test-cpu_scheduler. exited with exit value .*\n" 10 # check the output -grep_output {\[init -> test-cpu_scheduler\]} -compare_output_to { [init -> test-cpu_scheduler] done } +grep_output {child .test-cpu_scheduler. exited with exit value} +compare_output_to { [init] child "test-cpu_scheduler" exited with exit value 0 } diff --git a/repos/base-hw/src/test/cpu_scheduler/test.cc b/repos/base-hw/src/test/cpu_scheduler/test.cc index f26e2924ce..213af0cdcf 100644 --- a/repos/base-hw/src/test/cpu_scheduler/test.cc +++ b/repos/base-hw/src/test/cpu_scheduler/test.cc @@ -21,381 +21,722 @@ using namespace Genode; using namespace Kernel; -struct Main +namespace Cpu_scheduler_test { + + class Main; +} + + +class Cpu_scheduler_test::Main { - enum { MAX_SHARES = 10 }; + private: - Constructible shares[MAX_SHARES] {}; - Cpu_scheduler scheduler; - time_t current_time { 0 }; + enum { MAX_NR_OF_SHARES = 10 }; + enum { IDLE_SHARE_ID = 0 }; + enum { INVALID_SHARE_ID = MAX_NR_OF_SHARES }; - Cpu_share & _idle() - { - if (!shares[0].constructed()) shares[0].construct(0, 0); - return *shares[0]; - } + Env &_env; + Cpu_share _idle_share { 0, 0 }; + Constructible _shares[MAX_NR_OF_SHARES] { }; + time_t _current_time { 0 }; + Cpu_scheduler _scheduler; - Main() : scheduler(_idle(), 1000, 100) { } + unsigned _id_of_share(Cpu_share const &share) const + { + if (&share == &_idle_share) { - void done() - { - Genode::log("done"); - while (1) ; - } + return IDLE_SHARE_ID; + } + unsigned result { INVALID_SHARE_ID }; + for (unsigned id { 1 }; id < sizeof(_shares)/sizeof(_shares[0]); + id++) { - unsigned share_id(Cpu_share & share) - { - for (unsigned i = 0; i < MAX_SHARES; i++) - if (shares[i].constructed() && (&*shares[i] == &share)) - return i; - return ~0U; - } + if (_shares[id].constructed() && + (&*_shares[id] == &share)) { - Cpu_share & share(unsigned const id) - { - return *shares[id]; - } + result = id; + } + } + if (result == INVALID_SHARE_ID) { - void create(unsigned const id) - { - switch (id) { - case 1: shares[id].construct(2, 230); break; - case 2: shares[id].construct(0, 170); break; - case 3: shares[id].construct(3, 110); break; - case 4: shares[id].construct(1, 90); break; - case 5: shares[id].construct(3, 120); break; - case 6: shares[id].construct(3, 0); break; - case 7: shares[id].construct(2, 180); break; - case 8: shares[id].construct(2, 100); break; - case 9: shares[id].construct(2, 0); break; - default: return; + error("failed to determine ID of share"); + _env.parent().exit(-1); + } + return result; } - scheduler.insert(*shares[id]); - } - void destroy(unsigned const id) - { - if (!id || id >= MAX_SHARES) - return; + Cpu_share &_share(unsigned const id) + { + if (id == IDLE_SHARE_ID) { - scheduler.remove(share(id)); - shares[id].destruct(); - } + return _idle_share; + } + if (id >= sizeof(_shares)/sizeof(_shares[0])) { - unsigned time() - { - return scheduler.quota() - scheduler.residual(); - } - - void update_check(unsigned const l, unsigned const c, unsigned const t, - unsigned const s, unsigned const q) - { - current_time += c; - scheduler.update(current_time); - unsigned const st = time(); - if (t != st) { - log("wrong time ", st, " in line ", l); - done(); + error("failed to determine share by ID"); + _env.parent().exit(-1); + } + return *_shares[id]; } - Cpu_share & hs = scheduler.head(); - unsigned const hq = scheduler.head_quota(); - if (&hs != &share(s)) { - log("wrong share ", share_id(hs), " in line ", l); - done(); - } - if (hq != q) { - log("wrong quota ", hq, " in line ", l); - done(); - } - } - void ready_check(unsigned const l, unsigned const s, bool const x) - { - scheduler.ready(share(s)); - if (scheduler.need_to_schedule() != x) { - log("wrong check result ", scheduler.need_to_schedule(), " in line ", l); - done(); - } - } + void _construct_share(unsigned const id, + unsigned const line_nr) + { + if (id == IDLE_SHARE_ID || + id >= sizeof(_shares)/sizeof(_shares[0])) { - void test(); + error("failed to construct share in line ", line_nr); + _env.parent().exit(-1); + } + if (_shares[id].constructed()) { + + error("failed to construct share in line ", line_nr); + _env.parent().exit(-1); + } + unsigned prio { 0 }; + unsigned quota { 0 }; + switch (id) { + case 1: prio = 2; quota = 230; break; + case 2: prio = 0; quota = 170; break; + case 3: prio = 3; quota = 110; break; + case 4: prio = 1; quota = 90; break; + case 5: prio = 3; quota = 120; break; + case 6: prio = 3; quota = 0; break; + case 7: prio = 2; quota = 180; break; + case 8: prio = 2; quota = 100; break; + case 9: prio = 2; quota = 0; break; + default: + + error("failed to construct share in line ", line_nr); + _env.parent().exit(-1); + break; + } + _shares[id].construct(prio, quota); + _scheduler.insert(*_shares[id]); + } + + void _destroy_share(unsigned const id, + unsigned const line_nr) + { + if (id == IDLE_SHARE_ID || + id >= sizeof(_shares)/sizeof(_shares[0])) { + + error("failed to destroy share in line ", line_nr); + _env.parent().exit(-1); + } + if (!_shares[id].constructed()) { + + error("failed to destroy share in line ", line_nr); + _env.parent().exit(-1); + } + _scheduler.remove(_share(id)); + _shares[id].destruct(); + } + + void _update_head_and_check(unsigned const consumed_quota, + unsigned const expected_round_time, + unsigned const expected_head_id, + unsigned const expected_head_quota, + unsigned const line_nr) + { + _current_time += consumed_quota; + _scheduler.update(_current_time); + unsigned const round_time { + _scheduler.quota() - _scheduler.residual() }; + + if (round_time != expected_round_time) { + + error("wrong time ", round_time, " in line ", line_nr); + _env.parent().exit(-1); + } + Cpu_share &head { _scheduler.head() }; + unsigned const head_quota { _scheduler.head_quota() }; + if (&head != &_share(expected_head_id)) { + + error("wrong share ", _id_of_share(head), " in line ", + line_nr); + + _env.parent().exit(-1); + } + if (head_quota != expected_head_quota) { + + error("wrong quota ", head_quota, " in line ", line_nr); + _env.parent().exit(-1); + } + } + + void _set_share_ready_and_check(unsigned const share_id, + bool const expect_head_outdated, + unsigned const line_nr) + { + _scheduler.ready(_share(share_id)); + if (_scheduler.need_to_schedule() != expect_head_outdated) { + + error("wrong check result ", + _scheduler.need_to_schedule(), " in line ", line_nr); + + _env.parent().exit(-1); + } + } + + public: + + Main(Env &env); }; - -/* - * Shortcuts for all basic operations that the test consists of - */ - -#define C(s) create(s); -#define D(s) destroy(s); -#define A(s) scheduler.ready(share(s)); -#define I(s) scheduler.unready(share(s)); -#define Y scheduler.yield(); -#define Q(s, q) scheduler.quota(share(s), q); -#define U(c, t, s, q) update_check(__LINE__, c, t, s, q); -#define O(s) ready_check(__LINE__, s, true); -#define N(s) ready_check(__LINE__, s, false); - - -/** - * Main routine - */ -void Component::construct(Genode::Env &) +Cpu_scheduler_test::Main::Main(Env &env) +: + _env { env }, + _scheduler { _idle_share, 1000, 100 } { - static Main main; - main.test(); + /******************** + ** Round #1: Idle ** + ********************/ + + _update_head_and_check( 10, 10, 0, 100, __LINE__); + _update_head_and_check( 90, 100, 0, 100, __LINE__); + _update_head_and_check(120, 200, 0, 100, __LINE__); + _update_head_and_check(130, 300, 0, 100, __LINE__); + _update_head_and_check(140, 400, 0, 100, __LINE__); + _update_head_and_check(150, 500, 0, 100, __LINE__); + _update_head_and_check(160, 600, 0, 100, __LINE__); + _update_head_and_check(170, 700, 0, 100, __LINE__); + _update_head_and_check(180, 800, 0, 100, __LINE__); + _update_head_and_check(190, 900, 0, 100, __LINE__); + _update_head_and_check(200, 0, 0, 100, __LINE__); + + + /************************************* + ** Round #2: One claim, one filler ** + *************************************/ + + _construct_share(1, __LINE__); + _update_head_and_check(111, 100, 0, 100, __LINE__); + + _scheduler.ready(_share(1)); + _update_head_and_check(123, 200, 1, 230, __LINE__); + + _scheduler.unready(_share(1)); + _update_head_and_check(200, 400, 0, 100, __LINE__); + + _scheduler.ready(_share(1)); + _update_head_and_check( 10, 410, 1, 30, __LINE__); + _update_head_and_check(100, 440, 1, 100, __LINE__); + _update_head_and_check(200, 540, 1, 100, __LINE__); + + _scheduler.unready(_share(1)); + _update_head_and_check(200, 640, 0, 100, __LINE__); + _update_head_and_check(200, 740, 0, 100, __LINE__); + + _scheduler.ready(_share(1)); + _update_head_and_check( 10, 750, 1, 100, __LINE__); + _update_head_and_check( 50, 800, 1, 50, __LINE__); + _update_head_and_check( 20, 820, 1, 30, __LINE__); + _update_head_and_check(100, 850, 1, 100, __LINE__); + _update_head_and_check(200, 950, 1, 50, __LINE__); + _update_head_and_check(200, 0, 1, 230, __LINE__); + + + /************************************** + ** Round #3: One claim per priority ** + **************************************/ + + _construct_share(2, __LINE__); + _scheduler.ready(_share(2)); + _update_head_and_check( 50, 50, 1, 180, __LINE__); + + _scheduler.unready(_share(1)); + _update_head_and_check( 70, 120, 2, 170, __LINE__); + + _scheduler.ready(_share(1)); + _scheduler.unready(_share(2)); + _update_head_and_check(110, 230, 1, 110, __LINE__); + _update_head_and_check( 90, 320, 1, 20, __LINE__); + + _scheduler.ready(_share(2)); + _scheduler.unready(_share(1)); + _update_head_and_check( 10, 330, 2, 60, __LINE__); + + _construct_share(3, __LINE__); + _update_head_and_check( 40, 370, 2, 20, __LINE__); + + _scheduler.ready(_share(3)); + _update_head_and_check( 10, 380, 3, 110, __LINE__); + _update_head_and_check(150, 490, 2, 10, __LINE__); + _update_head_and_check( 10, 500, 2, 100, __LINE__); + _update_head_and_check( 60, 560, 2, 40, __LINE__); + + _construct_share(4, __LINE__); + _update_head_and_check( 60, 600, 3, 100, __LINE__); + + _construct_share(6, __LINE__); + _scheduler.ready(_share(6)); + _update_head_and_check(120, 700, 2, 100, __LINE__); + + _scheduler.ready(_share(4)); + _update_head_and_check( 80, 780, 4, 90, __LINE__); + + _scheduler.unready(_share(4)); + _scheduler.ready(_share(1)); + _update_head_and_check( 50, 830, 1, 10, __LINE__); + _update_head_and_check( 50, 840, 2, 20, __LINE__); + _update_head_and_check( 50, 860, 6, 100, __LINE__); + _update_head_and_check(100, 960, 3, 40, __LINE__); + _update_head_and_check( 60, 0, 3, 110, __LINE__); + + + /******************************************** + ** Round #4: Multiple claims per priority ** + ********************************************/ + + _construct_share(5, __LINE__); + _update_head_and_check( 60, 60, 3, 50, __LINE__); + + _scheduler.ready(_share(4)); + _scheduler.unready(_share(3)); + _update_head_and_check( 40, 100, 1, 230, __LINE__); + + _construct_share(7, __LINE__); + _scheduler.ready(_share(7)); + _update_head_and_check(200, 300, 7, 180, __LINE__); + + _construct_share(8, __LINE__); + _scheduler.ready(_share(5)); + _update_head_and_check(100, 400, 5, 120, __LINE__); + + _scheduler.ready(_share(3)); + _update_head_and_check(100, 500, 3, 10, __LINE__); + _update_head_and_check( 30, 510, 5, 20, __LINE__); + + _construct_share(9, __LINE__); + _scheduler.ready(_share(9)); + _update_head_and_check( 10, 520, 5, 10, __LINE__); + _update_head_and_check( 50, 530, 7, 80, __LINE__); + + _scheduler.ready(_share(8)); + _scheduler.unready(_share(7)); + _update_head_and_check( 10, 540, 8, 100, __LINE__); + + _scheduler.unready(_share(8)); + _update_head_and_check( 80, 620, 1, 30, __LINE__); + _update_head_and_check(200, 650, 4, 90, __LINE__); + _update_head_and_check(100, 740, 2, 170, __LINE__); + + _scheduler.ready(_share(8)); + _scheduler.ready(_share(7)); + _update_head_and_check( 10, 750, 7, 70, __LINE__); + + _scheduler.unready(_share(7)); + _scheduler.unready(_share(3)); + _update_head_and_check( 10, 760, 8, 20, __LINE__); + + _scheduler.unready(_share(8)); + _update_head_and_check( 10, 770, 2, 160, __LINE__); + + _scheduler.unready(_share(2)); + _update_head_and_check( 40, 810, 1, 100, __LINE__); + + _scheduler.ready(_share(3)); + _update_head_and_check( 30, 840, 1, 70, __LINE__); + _update_head_and_check( 80, 910, 6, 90, __LINE__); + + _scheduler.ready(_share(7)); + _scheduler.ready(_share(8)); + _update_head_and_check( 10, 920, 8, 10, __LINE__); + _update_head_and_check( 30, 930, 7, 60, __LINE__); + + _scheduler.ready(_share(2)); + _scheduler.unready(_share(7)); + _update_head_and_check( 10, 940, 2, 60, __LINE__); + + _scheduler.unready(_share(3)); + _scheduler.unready(_share(5)); + _update_head_and_check( 40, 980, 2, 20, __LINE__); + + _scheduler.unready(_share(9)); + _scheduler.unready(_share(4)); + _update_head_and_check( 10, 990, 2, 10, __LINE__); + _update_head_and_check( 40, 0, 1, 230, __LINE__); + + + /************************************ + ** Round #5: Yield, ready & check ** + ************************************/ + + _scheduler.unready(_share(6)); + _update_head_and_check( 30, 30, 1, 200, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 20, 50, 8, 100, __LINE__); + _update_head_and_check(200, 150, 2, 170, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 70, 220, 1, 100, __LINE__); + + _scheduler.unready(_share(8)); + _scheduler.yield(); + _update_head_and_check( 40, 260, 2, 100, __LINE__); + + _scheduler.unready(_share(1)); + _update_head_and_check( 50, 310, 2, 50, __LINE__); + _update_head_and_check( 10, 320, 2, 40, __LINE__); + + _set_share_ready_and_check(1, false, __LINE__); + _update_head_and_check(200, 360, 1, 100, __LINE__); + _update_head_and_check( 10, 370, 1, 90, __LINE__); + + _scheduler.unready(_share(1)); + _update_head_and_check( 10, 380, 2, 100, __LINE__); + + _set_share_ready_and_check(5, true, __LINE__); + _update_head_and_check( 10, 390, 5, 120, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 90, 480, 2, 90, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 10, 490, 5, 100, __LINE__); + + _set_share_ready_and_check(7, true, __LINE__); + _update_head_and_check( 10, 500, 7, 180, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 10, 510, 5, 90, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 10, 520, 2, 100, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 10, 530, 7, 100, __LINE__); + + _scheduler.unready(_share(5)); + _update_head_and_check( 10, 540, 7, 90, __LINE__); + + _scheduler.unready(_share(7)); + _set_share_ready_and_check(5, false, __LINE__); + _update_head_and_check( 10, 550, 2, 100, __LINE__); + + _set_share_ready_and_check(7, false, __LINE__); + _update_head_and_check(200, 650, 5, 100, __LINE__); + + _scheduler.unready(_share(5)); + _scheduler.unready(_share(7)); + _update_head_and_check( 10, 660, 2, 100, __LINE__); + + _scheduler.unready(_share(2)); + _update_head_and_check( 10, 670, 0, 100, __LINE__); + _update_head_and_check( 10, 680, 0, 100, __LINE__); + _update_head_and_check(100, 780, 0, 100, __LINE__); + + _set_share_ready_and_check(9, true, __LINE__); + _update_head_and_check( 10, 790, 9, 100, __LINE__); + + _set_share_ready_and_check(6, false, __LINE__); + _update_head_and_check( 20, 810, 9, 80, __LINE__); + + _set_share_ready_and_check(8, false, __LINE__); + _update_head_and_check( 10, 820, 9, 70, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 10, 830, 6, 100, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 10, 840, 8, 100, __LINE__); + + _set_share_ready_and_check(7, false, __LINE__); + _scheduler.yield(); + _update_head_and_check( 20, 860, 9, 100, __LINE__); + + _scheduler.unready(_share(8)); + _scheduler.unready(_share(9)); + _update_head_and_check( 10, 870, 6, 100, __LINE__); + + _scheduler.unready(_share(6)); + _scheduler.unready(_share(7)); + _update_head_and_check( 10, 880, 0, 100, __LINE__); + + _set_share_ready_and_check(4, true, __LINE__); + _update_head_and_check( 20, 900, 4, 90, __LINE__); + + _set_share_ready_and_check(3, true, __LINE__); + _set_share_ready_and_check(1, false, __LINE__); + _update_head_and_check( 10, 910, 3, 90, __LINE__); + + _set_share_ready_and_check(5, false, __LINE__); + _scheduler.unready(_share(4)); + _update_head_and_check( 10, 920, 3, 80, __LINE__); + + _scheduler.unready(_share(3)); + _update_head_and_check( 10, 930, 1, 70, __LINE__); + + _set_share_ready_and_check(3, true, __LINE__); + _update_head_and_check( 10, 940, 3, 60, __LINE__); + + _set_share_ready_and_check(4, false, __LINE__); + _update_head_and_check( 10, 950, 3, 50, __LINE__); + + _scheduler.unready(_share(4)); + _update_head_and_check( 10, 960, 3, 40, __LINE__); + + _scheduler.unready(_share(3)); + _set_share_ready_and_check(4, false, __LINE__); + _update_head_and_check( 10, 970, 4, 30, __LINE__); + + _scheduler.unready(_share(4)); + _update_head_and_check( 10, 980, 1, 20, __LINE__); + + _set_share_ready_and_check(3, true, __LINE__); + _set_share_ready_and_check(4, true, __LINE__); + _update_head_and_check( 10, 990, 3, 10, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 10, 0, 5, 120, __LINE__); + + + /************************************* + ** Round #6: Destroy and re-create ** + *************************************/ + + _destroy_share(3, __LINE__); + _update_head_and_check( 30, 30, 5, 90, __LINE__); + + _scheduler.unready(_share(5)); + _update_head_and_check( 30, 60, 1, 230, __LINE__); + + _destroy_share(4, __LINE__); + _destroy_share(7, __LINE__); + _update_head_and_check( 20, 80, 1, 210, __LINE__); + + _scheduler.unready(_share(1)); + _set_share_ready_and_check(9, false, __LINE__); + _update_head_and_check( 40, 120, 9, 100, __LINE__); + + _scheduler.ready(_share(5)); + _set_share_ready_and_check(8, true, __LINE__); + _update_head_and_check( 70, 190, 5, 60, __LINE__); + + _destroy_share(8, __LINE__); + _scheduler.unready(_share(5)); + _update_head_and_check( 10, 200, 9, 30, __LINE__); + + _set_share_ready_and_check(6, false, __LINE__); + _construct_share(4, __LINE__); + _update_head_and_check( 10, 210, 9, 20, __LINE__); + + _destroy_share(5, __LINE__); + _set_share_ready_and_check(4, true, __LINE__); + _update_head_and_check( 10, 220, 4, 90, __LINE__); + _update_head_and_check(100, 310, 9, 10, __LINE__); + _update_head_and_check( 10, 320, 6, 100, __LINE__); + + _destroy_share(4, __LINE__); + _update_head_and_check(200, 420, 9, 100, __LINE__); + + _construct_share(5, __LINE__); + _scheduler.ready(_share(5)); + _update_head_and_check( 10, 430, 5, 120, __LINE__); + + _construct_share(4, __LINE__); + _scheduler.yield(); + _update_head_and_check( 10, 440, 9, 90, __LINE__); + + _set_share_ready_and_check(4, true, __LINE__); + _scheduler.yield(); + _update_head_and_check( 50, 490, 4, 90, __LINE__); + + _destroy_share(6, __LINE__); + _scheduler.yield(); + _update_head_and_check( 10, 500, 5, 100, __LINE__); + + _destroy_share(9, __LINE__); + _update_head_and_check(200, 600, 4, 100, __LINE__); + + _construct_share(7, __LINE__); + _construct_share(8, __LINE__); + _update_head_and_check(200, 700, 5, 100, __LINE__); + + _set_share_ready_and_check(1, true, __LINE__); + _set_share_ready_and_check(7, true, __LINE__); + _update_head_and_check( 10, 710, 7, 180, __LINE__); + + _set_share_ready_and_check(8, true, __LINE__); + _update_head_and_check( 40, 750, 8, 100, __LINE__); + + _destroy_share(7, __LINE__); + _update_head_and_check(200, 850, 1, 150, __LINE__); + _update_head_and_check( 50, 900, 1, 100, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 60, 960, 5, 40, __LINE__); + _update_head_and_check(100, 0, 5, 120, __LINE__); + + + /********************************************** + ** Round #7: Re-configure quota, first part ** + **********************************************/ + + _scheduler.quota(_share(5), 100); + _construct_share(6, __LINE__); + _update_head_and_check( 40, 40, 5, 80, __LINE__); + + _scheduler.quota(_share(5), 70); + _scheduler.ready(_share(6)); + _update_head_and_check( 10, 50, 5, 70, __LINE__); + + _scheduler.quota(_share(5), 40); + _construct_share(9, __LINE__); + _update_head_and_check( 10, 60, 5, 40, __LINE__); + + _scheduler.quota(_share(5), 0); + _scheduler.ready(_share(9)); + _update_head_and_check( 20, 80, 8, 100, __LINE__); + + _scheduler.quota(_share(8), 120); + _update_head_and_check( 30, 110, 8, 70, __LINE__); + + _scheduler.quota(_share(9), 40); + _update_head_and_check( 10, 120, 8, 60, __LINE__); + + _scheduler.quota(_share(8), 130); + _update_head_and_check( 10, 130, 8, 50, __LINE__); + + _scheduler.quota(_share(8), 50); + _update_head_and_check( 20, 150, 8, 30, __LINE__); + + _scheduler.quota(_share(6), 60); + _update_head_and_check( 10, 160, 8, 20, __LINE__); + + _scheduler.unready(_share(8)); + _update_head_and_check( 10, 170, 1, 230, __LINE__); + + _scheduler.unready(_share(1)); + _update_head_and_check(100, 270, 4, 90, __LINE__); + _update_head_and_check(100, 360, 5, 50, __LINE__); + + _scheduler.quota(_share(1), 110); + _update_head_and_check( 10, 370, 5, 40, __LINE__); + + _scheduler.quota(_share(1), 120); + _update_head_and_check( 20, 390, 5, 20, __LINE__); + + _scheduler.quota(_share(4), 210); + _update_head_and_check( 10, 400, 5, 10, __LINE__); + + _scheduler.ready(_share(1)); + _update_head_and_check( 20, 410, 1, 110, __LINE__); + + _scheduler.quota(_share(1), 100); + _update_head_and_check( 30, 440, 1, 80, __LINE__); + + _set_share_ready_and_check(8, true, __LINE__); + _update_head_and_check( 10, 450, 8, 10, __LINE__); + + _set_share_ready_and_check(2, false, __LINE__); + _update_head_and_check( 10, 460, 1, 70, __LINE__); + + _scheduler.quota(_share(1), 20); + _update_head_and_check( 30, 490, 1, 20, __LINE__); + + _scheduler.quota(_share(1), 50); + _update_head_and_check( 10, 500, 1, 10, __LINE__); + + _scheduler.quota(_share(1), 0); + _update_head_and_check( 30, 510, 2, 170, __LINE__); + + _scheduler.quota(_share(2), 180); + _update_head_and_check( 50, 560, 2, 120, __LINE__); + + _scheduler.unready(_share(2)); + _scheduler.quota(_share(4), 80); + _update_head_and_check( 70, 630, 4, 100, __LINE__); + _update_head_and_check( 50, 680, 4, 50, __LINE__); + + _scheduler.unready(_share(4)); + _update_head_and_check( 10, 690, 6, 100, __LINE__); + + _construct_share(3, __LINE__); + _update_head_and_check( 30, 720, 6, 70, __LINE__); + + _scheduler.quota(_share(3), 210); + _scheduler.yield(); + _update_head_and_check( 20, 740, 9, 100, __LINE__); + + _scheduler.unready(_share(9)); + _set_share_ready_and_check(4, false, __LINE__); + _update_head_and_check( 50, 790, 1, 100, __LINE__); + + _set_share_ready_and_check(2, true, __LINE__); + _update_head_and_check(170, 890, 2, 50, __LINE__); + + _scheduler.yield(); + _set_share_ready_and_check(9, false, __LINE__); + _update_head_and_check( 60, 940, 5, 60, __LINE__); + + _scheduler.unready(_share(6)); + _update_head_and_check( 20, 960, 5, 40, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 10, 970, 8, 30, __LINE__); + + _scheduler.unready(_share(8)); + _scheduler.yield(); + _update_head_and_check( 10, 980, 4, 20, __LINE__); + + _scheduler.yield(); + _update_head_and_check( 20, 0, 9, 40, __LINE__); + + + /*********************************************** + ** Round #8: Re-configure quota, second part ** + ***********************************************/ + + _scheduler.ready(_share(3)); + _update_head_and_check( 30, 30, 3, 210, __LINE__); + + _scheduler.unready(_share(3)); + _update_head_and_check(110, 140, 9, 10, __LINE__); + _update_head_and_check( 40, 150, 4, 80, __LINE__); + _update_head_and_check(100, 230, 2, 180, __LINE__); + + _scheduler.quota(_share(2), 90); + _update_head_and_check( 40, 270, 2, 90, __LINE__); + + _scheduler.yield(); + _scheduler.quota(_share(8), 130); + _update_head_and_check( 40, 310, 2, 100, __LINE__); + _update_head_and_check(100, 410, 1, 100, __LINE__); + + _scheduler.quota(_share(3), 80); + _set_share_ready_and_check(3, true, __LINE__); + _update_head_and_check( 60, 470, 3, 80, __LINE__); + + _set_share_ready_and_check(8, false, __LINE__); + _scheduler.quota(_share(8), 50); + _update_head_and_check(100, 550, 8, 50, __LINE__); + _update_head_and_check( 20, 570, 8, 30, __LINE__); + + _set_share_ready_and_check(6, true, __LINE__); + _scheduler.quota(_share(6), 50); + _update_head_and_check( 10, 580, 6, 50, __LINE__); + _update_head_and_check( 70, 630, 8, 20, __LINE__); + _update_head_and_check( 40, 650, 1, 40, __LINE__); + _update_head_and_check( 40, 690, 9, 100, __LINE__); + + _destroy_share(6, __LINE__); + _update_head_and_check(200, 790, 5, 100, __LINE__); + + _destroy_share(3, __LINE__); + _update_head_and_check(100, 890, 4, 100, __LINE__); + _update_head_and_check(120, 990, 2, 10, __LINE__); + _update_head_and_check( 80, 0, 9, 40, __LINE__); + + + _env.parent().exit(0); } -void Main::test() +void Component::construct(Env &env) { - /* - * Step-by-step testing - * - * Every line in this test is structured according to the scheme - * ' U(t,c,s,q) ' where the symbols are defined as follows: - * - * ops Operations that affect the schedule but not the head of the - * scheduler (which is a buffer to remember the last scheduling - * choice). These operations are: - * - * C(s) construct the context with ID 's' and insert it - * D(s) remove the context with ID 's' and destruct it - * A(s) set the context with ID 's' active - * I(s) set the context with ID 's' inactive - * O(s) do 'A(s)' and check that this will outdate the head - * N(s) do 'A(s)' and check that this won't outdate the head - * Y annotate that the current head wants to yield - * - * U(c,t,s,q) - * First update the head and time of the scheduler according to - * the new schedule and the fact that the head consumed a - * quantum of 'c'. Then, check the consumed time 't' for the - * actual round and if the new head is the context with ID 's' - * that has a quota of 'q'. - * - * doc Documents the expected schedule for the point after the head - * update in the corresponding line. First it lists all claims - * via their ID followed by a ' (active) or a ° (inactive) and the - * corresponding quota. So 5°120 is the inactive context 5 that - * has a quota of 120 left for the current round. They are sorted - * decurrent by their priorities and the priority bands are - * separated by dashes. After the lowest priority band there is - * an additional dash followed by the current state of the round- - * robin scheduling that has no quota or priority. Only active - * contexts are listed here and only the head is listed together - * with its remaining quota. So 4'50 1 7 means that the active - * context 4 is the round-robin head with quota 50 remaining and - * that he is followed by the active contexts 1 and 7 both with a - * fresh time-slice. - * - * The order of operations is the same as in the operative kernel so each - * line can be seen as one "kernel pass". If any check in a line fails, - * the test prematurely stops and prints out where and why it has stopped. - */ - - /* first round - idle */ - U( 10, 10, 0, 100) /* - */ - U( 90, 100, 0, 100) /* - */ - U(120, 200, 0, 100) /* - */ - U(130, 300, 0, 100) /* - */ - U(140, 400, 0, 100) /* - */ - U(150, 500, 0, 100) /* - */ - U(160, 600, 0, 100) /* - */ - U(170, 700, 0, 100) /* - */ - U(180, 800, 0, 100) /* - */ - U(190, 900, 0, 100) /* - */ - U(200, 0, 0, 100) /* - */ - - /* second round - one claim, one filler */ - C(1) U(111, 100, 0, 100) /* 1°230 - */ - A(1) U(123, 200, 1, 230) /* 1'230 - 1'100 */ - I(1) U(200, 400, 0, 100) /* 1°30 - */ - A(1) U( 10, 410, 1, 30) /* 1'30 - 1'100 */ - U(100, 440, 1, 100) /* 1'0 - 1'100 */ - U(200, 540, 1, 100) /* 1'0 - 1'100 */ - I(1) U(200, 640, 0, 100) /* 1°0 - */ - U(200, 740, 0, 100) /* 1°0 - */ - A(1) U( 10, 750, 1, 100) /* 1'0 - 1'100 */ - U( 50, 800, 1, 50) /* 1'0 - 1'50 */ - U( 20, 820, 1, 30) /* 1'0 - 1'30 */ - U(100, 850, 1, 100) /* 1'0 - 1'100 */ - U(200, 950, 1, 50) /* 1'0 - 1'100 */ - U(200, 0, 1, 230) /* 1'230 - 1'100 */ - - /* third round - one claim per priority */ - C(2) A(2) U( 50, 50, 1, 180) /* 1'180 - 2'170 - 1'100 2 */ - I(1) U( 70, 120, 2, 170) /* 1°110 - 2'170 - 2'100 */ - A(1) I(2) U(110, 230, 1, 110) /* 1'110 - 2°60 - 1'100 */ - U( 90, 320, 1, 20) /* 1'20 - 2°60 - 1'100 */ - A(2) I(1) U( 10, 330, 2, 60) /* 1°10 - 2'60 - 2'100 */ - C(3) U( 40, 370, 2, 20) /* 3°110 - 1°10 - 2'10 - 2'100 */ - A(3) U( 10, 380, 3, 110) /* 3'110 - 1°10 - 2'10 - 2'100 3 */ - U(150, 490, 2, 10) /* 3'0 - 1°10 - 2'10 - 2'100 3 */ - U( 10, 500, 2, 100) /* 3'0 - 1°10 - 2'0 - 2'100 3 */ - U( 60, 560, 2, 40) /* 3'0 - 1°10 - 2'0 - 2'40 3 */ - C(4) U( 60, 600, 3, 100) /* 3'0 - 1°10 - 4°90 - 2'0 - 3'100 2 */ - C(6) A(6) U(120, 700, 2, 100) /* 3'0 - 1°10 - 4°90 - 2'0 - 2'100 6 3*/ - A(4) U( 80, 780, 4, 90) /* 3'0 - 1°10 - 4'90 - 2'0 - 2'20 6 3 4 */ - I(4) A(1) U( 50, 830, 1, 10) /* 3'0 - 1'10 - 4°40 - 2'0 - 2'20 6 3 1 */ - U( 50, 840, 2, 20) /* 3'0 - 1'0 - 4°40 - 2'0 - 2'20 6 3 1 */ - U( 50, 860, 6, 100) /* 3'0 - 1'0 - 4°40 - 2'0 - 6'100 3 1 2 */ - U(100, 960, 3, 40) /* 3'0 - 1'0 - 4°40 - 2'0 - 3'100 1 2 6 */ - U( 60, 0, 3, 110) /* 3'110 - 1'230 - 4°40 - 2'170 - 3'60 1 2 6 */ - - /* fourth round - multiple claims per priority */ - C(5) U( 60, 60, 3, 50) /* 3'50 5°120 - 1'230 - 4°90 - 2'170 - 3'60 1 2 6 */ - A(4) I(3) U( 40, 100, 1, 230) /* 3°10 5°120 - 1'230 - 4'90 - 2'170 - 1'100 2 6 4 */ - C(7) A(7) U(200, 300, 7, 180) /* 3°10 5°120 - 7'180 1'30 - 4'90 - 2'170 - 1'100 2 6 4 7 */ - C(8) A(5) U(100, 400, 5, 120) /* 5'120 3°10 - 7'80 1'30 8°100 - 4'90 - 2'170 - 1'100 2 6 4 7 5 */ - A(3) U(100, 500, 3, 10) /* 3'10 5'20 - 7'80 1'30 8°100 - 4'90 - 2'170 - 1'100 2 6 4 7 5 3 */ - U( 30, 510, 5, 20) /* 5'20 3'0 - 7'80 1'30 8°100 - 4'90 - 2'170 - 1'100 2 6 4 7 5 3 */ - C(9) A(9) U( 10, 520, 5, 10) /* 5'10 3'0 - 7'80 1'30 8°100 - 4'90 - 2'170 - 1'100 2 6 4 7 5 3 9 */ - U( 50, 530, 7, 80) /* 5'0 3'0 - 7'80 1'30 8°100 - 4'90 - 2'170 - 1'100 2 6 4 7 5 3 9 */ - A(8) I(7) U( 10, 540, 8, 100) /* 5'0 3'0 - 8'100 1'30 7°70 - 4'90 - 2'170 - 1'100 2 6 4 5 3 9 8 */ - I(8) U( 80, 620, 1, 30) /* 5'0 3'0 - 1'30 7°70 8°20 - 4'90 - 2'170 - 1'100 2 6 4 5 3 9 */ - U(200, 650, 4, 90) /* 5'0 3'0 - 1'0 7°70 8°20 - 4'90 - 2'170 - 1'100 2 6 4 5 3 9 */ - U(100, 740, 2, 170) /* 5'0 3'0 - 1'0 7°70 8°20 - 4'0 - 2'170 - 1'100 2 6 4 5 3 9 */ - A(8) A(7) U( 10, 750, 7, 70) /* 5'0 3'0 - 7'70 8'20 1'0 - 4'0 - 2'160 - 1'100 2 6 4 5 3 9 8 7 */ - I(7) I(3) U( 10, 760, 8, 20) /* 5'0 3°0 - 8'20 1'0 7°60 - 4'0 - 2'160 - 1'100 2 6 4 5 9 8 */ - I(8) U( 10, 770, 2, 160) /* 5'0 3°0 - 1'0 7°60 8°10 - 4'0 - 2'160 - 1'100 2 6 4 5 9 */ - I(2) U( 40, 810, 1, 100) /* 5'0 3°0 - 1'0 7°60 8°10 - 4'0 - 2°120 - 1'100 6 4 5 9 */ - A(3) U( 30, 840, 1, 70) /* 5'0 3'0 - 1'0 7°60 8°10 - 4'0 - 2°120 - 1'100 6 4 5 9 3 */ - U( 80, 910, 6, 90) /* 5'0 3'0 - 1'0 7°60 8°10 - 4'0 - 2°120 - 6'100 4 5 9 3 1 */ - A(7) A(8) U( 10, 920, 8, 10) /* 5'0 3'0 - 8'10 7'60 1'0 - 4'0 - 2°120 - 6'90 4 5 9 3 1 7 8 */ - U( 30, 930, 7, 60) /* 5'0 3'0 - 7'60 1'0 8'0 - 4°0 - 2°120 - 6'90 4 5 9 3 1 7 8 */ - A(2) I(7) U( 10, 940, 2, 60) /* 5'0 3'0 - 1'0 8'0 7°50 - 4'0 - 2'120 - 6'90 4 5 9 3 1 8 2 */ - I(3) I(5) U( 40, 980, 2, 20) /* 5°0 3°0 - 1'0 8'0 7°50 - 4'0 - 2'80 - 6'90 4 9 1 8 2 */ - I(9) I(4) U( 10, 990, 2, 10) /* 5°0 3°0 - 1'0 8'0 7°50 - 4°0 - 2'70 - 6'90 1 8 2 */ - U( 40, 0, 1, 230) /* 5°120 3°110 - 1'230 8'100 7°180 - 4°90 - 2'170 - 6'90 1 8 2 */ - - /* fifth round - yield, ready & check*/ - I(6) U( 30, 30, 1, 200) /* 5°120 3°110 - 1'200 8'100 7°180 - 4°90 - 2'170 - 1'100 8 2 */ - Y U( 20, 50, 8, 100) /* 5°120 3°110 - 8'100 1'0 7°180 - 4°90 - 2'170 - 1'100 8 2 */ - U(200, 150, 2, 170) /* 5°120 3°110 - 1'0 8'0 7°180 - 4°90 - 2'170 - 1'100 8 2 */ - Y U( 70, 220, 1, 100) /* 5°120 3°110 - 1'0 8'0 7°180 - 4°90 - 2'0 - 1'100 8 2 */ - I(8) Y U( 40, 260, 2, 100) /* 5°120 3°110 - 1'0 7°180 8°0 - 4°90 - 2'0 - 2'100 1 */ - I(1) U( 50, 310, 2, 50) /* 5°120 3°110 - 1°0 7°180 8°0 - 4°90 - 2'0 - 2'50 */ - U( 10, 320, 2, 40) /* 5°120 3°110 - 1°0 7°180 8°0 - 4°90 - 2'0 - 2'40 */ - N(1) U(200, 360, 1, 100) /* 5°120 3°110 - 1°0 7°180 8°0 - 4°90 - 2'0 - 1'100 2 */ - U( 10, 370, 1, 90) /* 5°120 3°110 - 1'0 7°180 8°0 - 4°90 - 2'0 - 1'90 2 */ - I(1) U( 10, 380, 2, 100) /* 5°120 3°110 - 1°0 7°180 8°0 - 4°90 - 2'0 - 2'100 */ - O(5) U( 10, 390, 5, 120) /* 5'120 3°110 - 1°0 7°180 8°0 - 4°90 - 2'0 - 2'90 5 */ - Y U( 90, 480, 2, 90) /* 5'0 3°110 - 1°0 7°180 8°0 - 4°90 - 2'0 - 2'90 5 */ - Y U( 10, 490, 5, 100) /* 5'0 3°110 - 1°0 7°180 8°0 - 4°90 - 2'0 - 5'100 2 */ - O(7) U( 10, 500, 7, 180) /* 5'0 3°110 - 7'180 1°0 8°0 - 4°90 - 2'0 - 5'90 2 7 */ - Y U( 10, 510, 5, 90) /* 5'0 3°110 - 7'0 1°0 8°0 - 4°90 - 2'0 - 5'90 2 7 */ - Y U( 10, 520, 2, 100) /* 5'0 3°110 - 7'0 1°0 8°0 - 4°90 - 2'0 - 2'100 7 5 */ - Y U( 10, 530, 7, 100) /* 5'0 3°110 - 7'0 1°0 8°0 - 4°90 - 2'0 - 7'100 5 2 */ - I(5) U( 10, 540, 7, 90) /* 5°0 3°110 - 7'0 1°0 8°0 - 4°90 - 2'0 - 7'90 2 */ - I(7) N(5) U( 10, 550, 2, 100) /* 5'0 3°110 - 7°0 1°0 8°0 - 4°90 - 2'0 - 2'100 5 */ - N(7) U(200, 650, 5, 100) /* 5'0 3°110 - 7'0 1°0 8°0 - 4°90 - 2'0 - 5'100 7 2 */ - I(5) I(7) U( 10, 660, 2, 100) /* 5°0 3°110 - 7°0 1°0 8°0 - 4°90 - 2'0 - 2'100 */ - I(2) U( 10, 670, 0, 100) /* 5°0 3°110 - 7°0 1°0 8°0 - 4°90 - 2°0 - */ - U( 10, 680, 0, 100) /* 5°0 3°110 - 7°0 1°0 8°0 - 4°90 - 2°0 - */ - U(100, 780, 0, 100) /* 5°0 3°110 - 7°0 1°0 8°0 - 4°90 - 2°0 - */ - O(9) U( 10, 790, 9, 100) /* 5°0 3°110 - 7°0 1°0 8°0 - 4°90 - 2°0 - 9'100 */ - N(6) U( 20, 810, 9, 80) /* 5°0 3°110 - 7°0 1°0 8°0 - 4°90 - 2°0 - 9'80 6 */ - N(8) U( 10, 820, 9, 70) /* 5°0 3°110 - 8'0 7°0 1°0 - 4°90 - 2°0 - 9'70 6 8 */ - Y U( 10, 830, 6, 100) /* 5°0 3°110 - 8'0 7°0 1°0 - 4°90 - 2°0 - 6'100 8 9 */ - Y U( 10, 840, 8, 100) /* 5°0 3°110 - 8'0 7°0 1°0 - 4°90 - 2°0 - 8'100 9 6 */ - N(7) Y U( 20, 860, 9, 100) /* 5°0 3°110 - 8'0 7'0 1°0 - 4°90 - 2°0 - 9'100 6 7 8 */ - I(8) I(9) U( 10, 870, 6, 100) /* 5°0 3°110 - 7'0 8°0 1°0 - 4°90 - 2°0 - 6'100 7 */ - I(6) I(7) U( 10, 880, 0, 100) /* 5°0 3°110 - 7°0 8°0 1°0 - 4°90 - 2°0 - */ - O(4) U( 20, 900, 4, 90) /* 5°0 3°110 - 7°0 8°0 1°0 - 4'90 - 2°0 - 4'100 */ - O(3) N(1) U( 10, 910, 3, 90) /* 3'110 5°0 - 1'0 7°0 8°0 - 4'80 - 2°0 - 4'100 3 1 */ - N(5) I(4) U( 10, 920, 3, 80) /* 3'100 5'0 - 1'0 7°0 8°0 - 4°80 - 2°0 - 3 1 5 */ - I(3) U( 10, 930, 1, 70) /* 5'0 3°90 - 1'0 7°0 8°0 - 4°80 - 2°0 - 1'100 5 */ - O(3) U( 10, 940, 3, 60) /* 3'90 5'0 - 1'0 7°0 8°0 - 4°80 - 2°0 - 1'90 5 3 */ - N(4) U( 10, 950, 3, 50) /* 3'80 5'0 - 1'0 7°0 8°0 - 4'80 - 2°0 - 1'90 5 3 4 */ - I(4) U( 10, 960, 3, 40) /* 3'70 5'0 - 1'0 7°0 8°0 - 4°80 - 2°0 - 1'90 5 3 */ - I(3) N(4) U( 10, 970, 4, 30) /* 5'0 3°60 - 1'0 7°0 8°0 - 4'80 - 2°0 - 1'90 5 4 */ - I(4) U( 10, 980, 1, 20) /* 5'0 3°60 - 1'0 7°0 8°0 - 4°70 - 2°0 - 1'90 5 */ - O(3) O(4) U( 10, 990, 3, 10) /* 3'60 5'0 - 1'0 7°0 8°0 - 4'70 - 2°0 - 1'80 5 3 4 */ - Y U( 10, 0, 5, 120) /* 5'120 3'110 - 1'230 7°180 8°100 - 4'90 - 2°170 - 1'80 5 3 4 */ - - /* sixth round - destroy and re-create */ - D(3) U( 30, 30, 5, 90) /* 5'90 - 1'230 7°180 8°100 - 4'90 - 2°170 - 1'80 5 4 */ - I(5) U( 30, 60, 1, 230) /* 5°60 - 1'230 7°180 8°100 - 4'90 - 2°170 - 1'80 4 */ - D(4) D(7) U( 20, 80, 1, 210) /* 5°60 - 1'210 8°100 - 2°170 - 1'80 4 */ - I(1) N(9) U( 40, 120, 9, 100) /* 5°60 - 1°170 8°100 - 2°170 - 9'100 */ - A(5) O(8) U( 70, 190, 5, 60) /* 5'60 - 1°170 8'100 - 2°170 - 9'30 5 8 */ - D(8) I(5) U( 10, 200, 9, 30) /* 5°60 - 1°170 - 2°170 - 9'30 */ - N(6) C(4) U( 10, 210, 9, 20) /* 5°60 - 1°170 - 4°90 - 2°170 - 9'20 6 */ - D(5) O(4) U( 10, 220, 4, 90) /* 1°170 - 4'90 - 2°170 - 9'10 6 4 */ - U(100, 310, 9, 10) /* 1°170 - 4'0 - 2°170 - 9'10 6 4 */ - U( 10, 320, 6, 100) /* 1°170 - 4'0 - 2°170 - 6'100 4 9 */ - D(4) U(200, 420, 9, 100) /* 1°170 - 2°170 - 9'100 6 */ - C(5) A(5) U( 10, 430, 5, 120) /* 5'120 - 1°210 - 2°170 - 9'90 6 5 */ - C(4) Y U( 10, 440, 9, 90) /* 5'0 - 1°170 - 4°90 - 2°170 - 9'90 6 5 */ - O(4) Y U( 50, 490, 4, 90) /* 5'0 - 1°170 - 4'90 - 2°170 - 6'100 5 4 9 */ - D(6) Y U( 10, 500, 5, 100) /* 5'0 - 1°170 - 4'0 - 2°170 - 5'100 4 9 */ - D(9) U(200, 600, 4, 100) /* 5'0 - 1°170 - 4'0 - 2°170 - 4'100 5 */ - C(7) C(8) U(200, 700, 5, 100) /* 5'0 - 1°170 7°180 8°100 - 4'0 - 2°170 - 5'100 4 */ - O(1) O(7) U( 10, 710, 7, 180) /* 5'0 - 7'180 1'170 8°100 - 4'0 - 2°170 - 5'90 4 1 7 */ - O(8) U( 40, 750, 8, 100) /* 5'0 - 8'100 7'140 1'170 - 4'0 - 2°170 - 5'90 4 1 7 8 */ - D(7) U(200, 850, 1, 150) /* 5'0 - 1'170 8'0 - 4'0 - 2°170 - 5'90 4 1 8 */ - U( 50, 900, 1, 100) /* 5'0 - 1'120 8'0 - 4'0 - 2°170 - 5'90 4 1 8 */ - Y U( 60, 960, 5, 40) /* 5'0 - 8'0 1'0 - 4'0 - 2°170 - 5'90 4 1 8 */ - U(100, 0, 5, 120) /* 5'120 - 8'100 1'230 - 4'90 - 2°170 - 5'50 4 1 8 */ - - /* seventh round - re-configure quota, first part */ - Q(5, 100) C(6) U( 40, 40, 5, 80) /* 5'80 - 8'100 1'230 - 4'90 - 2°170 - 5'50 4 1 8 */ - Q(5, 70) A(6) U( 10, 50, 5, 70) /* 5'70 - 8'100 1'230 - 4'90 - 2°170 - 5'50 4 1 8 6 */ - Q(5, 40) C(9) U( 10, 60, 5, 40) /* 5'40 - 8'100 1'230 - 4'90 - 2°170 - 5'50 4 1 8 6 */ - Q(5, 0) A(9) U( 20, 80, 8, 100) /* 8'100 1'230 - 4'90 - 2°170 - 5'50 4 1 8 6 9 */ - Q(8, 120) U( 30, 110, 8, 70) /* 8'70 1'230 - 4'90 - 2°170 - 5'50 4 1 8 6 9 */ - Q(9, 40) U( 10, 120, 8, 60) /* 8'60 1'230 9'0 - 4'90 - 2°170 - 5'50 4 1 8 6 9 */ - Q(8, 130) U( 10, 130, 8, 50) /* 8'50 1'230 9'0 - 4'90 - 2°170 - 5'50 4 1 8 6 9 */ - Q(8, 50) U( 20, 150, 8, 30) /* 8'30 1'230 9'0 - 4'90 - 2°170 - 5'50 4 1 8 6 9 */ - Q(6, 60) U( 10, 160, 8, 20) /* 6'0 - 8'20 1'230 9'0 - 4'90 - 2°170 - 5'50 4 1 8 6 9 */ - I(8) U( 10, 170, 1, 230) /* 6'0 - 1'230 9'0 8°10 - 4'90 - 2°170 - 5'50 4 1 6 9 */ - I(1) U(100, 270, 4, 90) /* 6'0 - 9'0 8°10 1°130 - 4'90 - 2°170 - 5'50 4 6 9 */ - U(100, 360, 5, 50) /* 6'0 - 9'0 8°10 1°130 - 4'0 - 2°170 - 5'50 4 6 9 */ - Q(1, 110) U( 10, 370, 5, 40) /* 6'0 - 9'0 8°10 1°110 - 4'0 - 2°170 - 5'40 4 6 9 */ - Q(1, 120) U( 20, 390, 5, 20) /* 6'0 - 9'0 8°10 1°110 - 4'0 - 2°170 - 5'20 4 6 9 */ - Q(4, 210) U( 10, 400, 5, 10) /* 6'0 - 9'0 8°10 1°110 - 4'0 - 2°170 - 5'10 4 6 9 */ - A(1) U( 20, 410, 1, 110) /* 6'0 - 1'110 9'0 8°10 - 4'0 - 2°170 - 4'100 6 9 1 5 */ - Q(1, 100) U( 30, 440, 1, 80) /* 6'0 - 1'80 9'0 8°10 - 4'0 - 2°170 - 4'100 6 9 1 5 */ - O(8) U( 10, 450, 8, 10) /* 6'0 - 8'10 1'70 9'0 - 4'0 - 2°170 - 4'100 6 9 1 5 8 */ - N(2) U( 10, 460, 1, 70) /* 6'0 - 1'70 9'0 8'0 - 4'0 - 2'170 - 4'100 6 9 1 5 8 2 */ - Q(1, 20) U( 30, 490, 1, 20) /* 6'0 - 1'20 9'0 8'0 - 4'0 - 2'170 - 4'100 6 9 1 5 8 2 */ - Q(1, 50) U( 10, 500, 1, 10) /* 6'0 - 1'10 9'0 8'0 - 4'0 - 2'170 - 4'100 6 9 1 5 8 2 */ - Q(1, 0) U( 30, 510, 2, 170) /* 6'0 - 9'0 8'0 - 4'0 - 2'170 - 4'100 6 9 1 5 8 2 */ - Q(2, 180) U( 50, 560, 2, 120) /* 6'0 - 9'0 8'0 - 4'0 - 2'120 - 4'100 6 9 1 5 8 2 */ - I(2) Q(4, 80) U( 70, 630, 4, 100) /* 6'0 - 9'0 8'0 - 4'0 - 2°50 - 4'100 6 9 1 5 8 */ - U( 50, 680, 4, 50) /* 6'0 - 9'0 8'0 - 4'0 - 2°50 - 4'100 6 9 1 5 8 */ - I(4) U( 10, 690, 6, 100) /* 6'0 - 9'0 8'0 - 4°0 - 2°50 - 6'100 9 1 5 8 */ - C(3) U( 30, 720, 6, 70) /* 6'0 3°110 - 9'0 8'0 - 4°0 - 2°50 - 6'70 9 1 5 8 */ - Q(3, 210) Y U( 20, 740, 9, 100) /* 6'0 3°110 - 9'0 8'0 - 4°0 - 2°50 - 9'100 1 5 8 6 */ - I(9) N(4) U( 50, 790, 1, 100) /* 6'0 3°110 - 9°0 8'0 - 4'0 - 2°50 - 1'100 5 8 6 4 */ - O(2) U(170, 890, 2, 50) /* 6'0 3°110 - 9°0 8'0 - 4'0 - 2'50 - 5'100 8 6 4 2 1 */ - Y N(9) U( 60, 940, 5, 60) /* 6'0 3°110 - 9'0 8'0 - 4'0 - 2'0 - 5'100 8 6 4 2 1 9 */ - I(6) U( 20, 960, 5, 40) /* 6°0 3°110 - 9'0 8'0 - 4'0 - 2'0 - 5'80 8 4 2 1 9 */ - Y U( 10, 970, 8, 30) /* 6°0 3°110 - 9'0 8'0 - 4'0 - 2'0 - 8'100 4 2 1 9 5 */ - I(8) Y U( 10, 980, 4, 20) /* 6°0 3°110 - 9'0 8°0 - 4'0 - 2'0 - 4'100 2 1 9 5 */ - Y U( 20, 0, 9, 40) /* 6°60 3°210 - 9'40 8°50 - 4'80 - 2'180 - 2'100 1 9 5 4 */ - - /* eighth round - re-configure quota, second part */ - A(3) U( 30, 30, 3, 210) /* 3'210 6°60 - 9'10 8°50 - 4'80 - 2'180 - 2'100 1 9 5 4 3 */ - I(3) U(110, 140, 9, 10) /* 6°60 3°100 - 9'10 8°50 - 4'80 - 2'180 - 2'100 1 9 5 4 */ - U( 40, 150, 4, 80) /* 6°60 3°100 - 9'0 8°50 - 4'80 - 2'180 - 2'100 1 9 5 4 */ - U(100, 230, 2, 180) /* 6°60 3°100 - 9'0 8°50 - 4'0 - 2'180 - 2'100 1 9 5 4 */ - Q(2, 90) U( 40, 270, 2, 90) /* 6°60 3°100 - 9'0 8°50 - 4'0 - 2'90 - 2'100 1 9 5 4 */ - Y Q(8, 130) U( 40, 310, 2, 100) /* 6°60 3°100 - 9'0 8°50 - 4'0 - 2'0 - 2'100 1 9 5 4 */ - U(100, 410, 1, 100) /* 6°60 3°100 - 9'0 8°50 - 4'0 - 2'0 - 1'100 9 5 4 2 */ - Q(3, 80) O(3) U( 60, 470, 3, 80) /* 3'80 6°60 - 9'0 8°50 - 4'0 - 2'0 - 1'40 9 5 4 2 3*/ - N(8) Q(8, 50) U(100, 550, 8, 50) /* 3'0 6°60 - 8'50 9'0 - 4'0 - 2'0 - 1'40 9 5 4 2 3 8 */ - U( 20, 570, 8, 30) /* 3'0 6°60 - 8'30 9'0 - 4'0 - 2'0 - 1'40 9 5 4 2 3 8 */ - O(6) Q(6, 50) U( 10, 580, 6, 50) /* 6'50 3'0 - 8'20 9'0 - 4'0 - 2'0 - 1'40 9 5 4 2 3 8 6 */ - U( 70, 630, 8, 20) /* 6'0 3'0 - 9'0 8'20 - 4'0 - 2'0 - 1'40 9 5 4 2 3 8 6 */ - U( 40, 650, 1, 40) /* 6'0 3'0 - 9'0 8'0 - 4'0 - 2'0 - 1'40 9 5 4 2 3 8 6 */ - U( 40, 690, 9, 100) /* 6'0 3'0 - 9'0 8'0 - 4'0 - 2'0 - 9'100 5 4 2 3 8 6 1 */ - D(6) U(200, 790, 5, 100) /* 3'0 - 9'0 8'0 - 4'0 - 2'0 - 5'100 4 2 3 8 1 9 */ - D(3) U(100, 890, 4, 100) /* 9'0 8'0 - 4'0 - 2'0 - 4'100 2 8 1 9 5 */ - U(120, 990, 2, 10) /* 9'0 8'0 - 4'0 - 2'0 - 2'100 8 1 9 5 4 */ - U( 80, 0, 9, 40) /* 9'40 8'50 - 4'80 - 2'90 - 2'90 8 1 9 5 4 */ - - done(); + static Cpu_scheduler_test::Main main { env }; } From 20fea7fdd29bec34f0f32fe2f4bc35cf3839b570 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 8 Dec 2022 21:34:54 +0100 Subject: [PATCH 0193/1921] base-hw scheduler test: adapt to new behavior This adapts the test to the changes that were applied to the scheduling scheme by the following commits: * base-hw scheduler: optimize quota depletion events * base-hw scheduler: fix bug on removing head * base-hw scheduler: fix ready method * base-hw: optimize & cleanup scheduler Part of that is that the test used to check whether the act of setting a share ready outdates the head or not. However, with the current version of the scheduler, this check is not possible anymore. We can merely check whether the head is outdated after setting the share ready. So, among other adaptions, this commit adapts the expectations of the test to the new semantics of the check. Ref #4151 Ref #4710 --- repos/base-hw/src/test/cpu_scheduler/test.cc | 171 +++++++++---------- 1 file changed, 80 insertions(+), 91 deletions(-) diff --git a/repos/base-hw/src/test/cpu_scheduler/test.cc b/repos/base-hw/src/test/cpu_scheduler/test.cc index 213af0cdcf..1d8f52cecf 100644 --- a/repos/base-hw/src/test/cpu_scheduler/test.cc +++ b/repos/base-hw/src/test/cpu_scheduler/test.cc @@ -280,9 +280,10 @@ Cpu_scheduler_test::Main::Main(Env &env) _scheduler.unready(_share(4)); _scheduler.ready(_share(1)); _update_head_and_check( 50, 830, 1, 10, __LINE__); - _update_head_and_check( 50, 840, 2, 20, __LINE__); - _update_head_and_check( 50, 860, 6, 100, __LINE__); - _update_head_and_check(100, 960, 3, 40, __LINE__); + _update_head_and_check( 50, 840, 1, 100, __LINE__); + _update_head_and_check( 50, 890, 1, 50, __LINE__); + _update_head_and_check(100, 940, 2, 20, __LINE__); + _update_head_and_check( 60, 960, 6, 40, __LINE__); _update_head_and_check( 60, 0, 3, 110, __LINE__); @@ -335,11 +336,11 @@ Cpu_scheduler_test::Main::Main(Env &env) _update_head_and_check( 10, 770, 2, 160, __LINE__); _scheduler.unready(_share(2)); - _update_head_and_check( 40, 810, 1, 100, __LINE__); + _update_head_and_check( 40, 810, 4, 100, __LINE__); _scheduler.ready(_share(3)); - _update_head_and_check( 30, 840, 1, 70, __LINE__); - _update_head_and_check( 80, 910, 6, 90, __LINE__); + _update_head_and_check( 30, 840, 4, 70, __LINE__); + _update_head_and_check( 80, 910, 1, 90, __LINE__); _scheduler.ready(_share(7)); _scheduler.ready(_share(8)); @@ -372,122 +373,105 @@ Cpu_scheduler_test::Main::Main(Env &env) _update_head_and_check(200, 150, 2, 170, __LINE__); _scheduler.yield(); - _update_head_and_check( 70, 220, 1, 100, __LINE__); + _update_head_and_check( 70, 220, 8, 100, __LINE__); _scheduler.unready(_share(8)); _scheduler.yield(); - _update_head_and_check( 40, 260, 2, 100, __LINE__); + _update_head_and_check( 40, 260, 1, 90, __LINE__); _scheduler.unready(_share(1)); - _update_head_and_check( 50, 310, 2, 50, __LINE__); - _update_head_and_check( 10, 320, 2, 40, __LINE__); + _update_head_and_check( 50, 310, 2, 100, __LINE__); + _update_head_and_check( 10, 320, 2, 90, __LINE__); _set_share_ready_and_check(1, false, __LINE__); - _update_head_and_check(200, 360, 1, 100, __LINE__); - _update_head_and_check( 10, 370, 1, 90, __LINE__); + _update_head_and_check(200, 410, 1, 100, __LINE__); + _update_head_and_check( 10, 420, 1, 90, __LINE__); _scheduler.unready(_share(1)); - _update_head_and_check( 10, 380, 2, 100, __LINE__); + _update_head_and_check( 10, 430, 2, 100, __LINE__); _set_share_ready_and_check(5, true, __LINE__); - _update_head_and_check( 10, 390, 5, 120, __LINE__); + _update_head_and_check( 10, 440, 5, 120, __LINE__); _scheduler.yield(); - _update_head_and_check( 90, 480, 2, 90, __LINE__); + _update_head_and_check( 90, 530, 2, 90, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 490, 5, 100, __LINE__); + _update_head_and_check( 10, 540, 5, 100, __LINE__); _set_share_ready_and_check(7, true, __LINE__); - _update_head_and_check( 10, 500, 7, 180, __LINE__); + _update_head_and_check( 10, 550, 7, 180, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 510, 5, 90, __LINE__); + _update_head_and_check( 10, 560, 5, 90, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 520, 2, 100, __LINE__); + _update_head_and_check( 10, 570, 2, 100, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 530, 7, 100, __LINE__); + _update_head_and_check( 10, 580, 7, 100, __LINE__); _scheduler.unready(_share(5)); - _update_head_and_check( 10, 540, 7, 90, __LINE__); + _update_head_and_check( 10, 590, 7, 90, __LINE__); _scheduler.unready(_share(7)); - _set_share_ready_and_check(5, false, __LINE__); - _update_head_and_check( 10, 550, 2, 100, __LINE__); + _set_share_ready_and_check(5, true, __LINE__); + _update_head_and_check( 10, 600, 2, 100, __LINE__); _set_share_ready_and_check(7, false, __LINE__); - _update_head_and_check(200, 650, 5, 100, __LINE__); + _update_head_and_check(200, 700, 5, 100, __LINE__); _scheduler.unready(_share(5)); _scheduler.unready(_share(7)); - _update_head_and_check( 10, 660, 2, 100, __LINE__); + _update_head_and_check( 10, 710, 2, 100, __LINE__); _scheduler.unready(_share(2)); - _update_head_and_check( 10, 670, 0, 100, __LINE__); - _update_head_and_check( 10, 680, 0, 100, __LINE__); - _update_head_and_check(100, 780, 0, 100, __LINE__); + _update_head_and_check( 10, 720, 0, 100, __LINE__); + _update_head_and_check( 10, 730, 0, 100, __LINE__); + _update_head_and_check(100, 830, 0, 100, __LINE__); _set_share_ready_and_check(9, true, __LINE__); - _update_head_and_check( 10, 790, 9, 100, __LINE__); + _update_head_and_check( 10, 840, 9, 100, __LINE__); _set_share_ready_and_check(6, false, __LINE__); - _update_head_and_check( 20, 810, 9, 80, __LINE__); + _update_head_and_check( 20, 860, 9, 80, __LINE__); _set_share_ready_and_check(8, false, __LINE__); - _update_head_and_check( 10, 820, 9, 70, __LINE__); + _update_head_and_check( 10, 870, 9, 70, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 830, 6, 100, __LINE__); + _update_head_and_check( 10, 880, 6, 100, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 840, 8, 100, __LINE__); + _update_head_and_check( 10, 890, 8, 100, __LINE__); _set_share_ready_and_check(7, false, __LINE__); _scheduler.yield(); - _update_head_and_check( 20, 860, 9, 100, __LINE__); + _update_head_and_check( 20, 910, 9, 90, __LINE__); _scheduler.unready(_share(8)); _scheduler.unready(_share(9)); - _update_head_and_check( 10, 870, 6, 100, __LINE__); + _update_head_and_check( 10, 920, 6, 80, __LINE__); _scheduler.unready(_share(6)); _scheduler.unready(_share(7)); - _update_head_and_check( 10, 880, 0, 100, __LINE__); + _update_head_and_check( 10, 930, 0, 70, __LINE__); _set_share_ready_and_check(4, true, __LINE__); - _update_head_and_check( 20, 900, 4, 90, __LINE__); + _update_head_and_check( 20, 950, 4, 50, __LINE__); _set_share_ready_and_check(3, true, __LINE__); - _set_share_ready_and_check(1, false, __LINE__); - _update_head_and_check( 10, 910, 3, 90, __LINE__); + _set_share_ready_and_check(1, true, __LINE__); + _update_head_and_check( 10, 960, 3, 40, __LINE__); _set_share_ready_and_check(5, false, __LINE__); _scheduler.unready(_share(4)); - _update_head_and_check( 10, 920, 3, 80, __LINE__); + _update_head_and_check( 10, 970, 3, 30, __LINE__); _scheduler.unready(_share(3)); - _update_head_and_check( 10, 930, 1, 70, __LINE__); - - _set_share_ready_and_check(3, true, __LINE__); - _update_head_and_check( 10, 940, 3, 60, __LINE__); - - _set_share_ready_and_check(4, false, __LINE__); - _update_head_and_check( 10, 950, 3, 50, __LINE__); - - _scheduler.unready(_share(4)); - _update_head_and_check( 10, 960, 3, 40, __LINE__); - - _scheduler.unready(_share(3)); - _set_share_ready_and_check(4, false, __LINE__); - _update_head_and_check( 10, 970, 4, 30, __LINE__); - - _scheduler.unready(_share(4)); _update_head_and_check( 10, 980, 1, 20, __LINE__); _set_share_ready_and_check(3, true, __LINE__); - _set_share_ready_and_check(4, true, __LINE__); _update_head_and_check( 10, 990, 3, 10, __LINE__); _scheduler.yield(); @@ -509,7 +493,7 @@ Cpu_scheduler_test::Main::Main(Env &env) _update_head_and_check( 20, 80, 1, 210, __LINE__); _scheduler.unready(_share(1)); - _set_share_ready_and_check(9, false, __LINE__); + _set_share_ready_and_check(9, true, __LINE__); _update_head_and_check( 40, 120, 9, 100, __LINE__); _scheduler.ready(_share(5)); @@ -527,27 +511,27 @@ Cpu_scheduler_test::Main::Main(Env &env) _destroy_share(5, __LINE__); _set_share_ready_and_check(4, true, __LINE__); _update_head_and_check( 10, 220, 4, 90, __LINE__); - _update_head_and_check(100, 310, 9, 10, __LINE__); - _update_head_and_check( 10, 320, 6, 100, __LINE__); + _update_head_and_check(100, 310, 4, 100, __LINE__); + _update_head_and_check( 10, 320, 4, 90, __LINE__); _destroy_share(4, __LINE__); - _update_head_and_check(200, 420, 9, 100, __LINE__); + _update_head_and_check(200, 410, 9, 10, __LINE__); _construct_share(5, __LINE__); _scheduler.ready(_share(5)); - _update_head_and_check( 10, 430, 5, 120, __LINE__); + _update_head_and_check( 10, 420, 5, 120, __LINE__); _construct_share(4, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 440, 9, 90, __LINE__); + _update_head_and_check( 10, 430, 6, 100, __LINE__); _set_share_ready_and_check(4, true, __LINE__); _scheduler.yield(); - _update_head_and_check( 50, 490, 4, 90, __LINE__); + _update_head_and_check( 50, 480, 4, 90, __LINE__); _destroy_share(6, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 500, 5, 100, __LINE__); + _update_head_and_check( 20, 500, 5, 100, __LINE__); _destroy_share(9, __LINE__); _update_head_and_check(200, 600, 4, 100, __LINE__); @@ -568,7 +552,7 @@ Cpu_scheduler_test::Main::Main(Env &env) _update_head_and_check( 50, 900, 1, 100, __LINE__); _scheduler.yield(); - _update_head_and_check( 60, 960, 5, 40, __LINE__); + _update_head_and_check( 60, 960, 8, 40, __LINE__); _update_head_and_check(100, 0, 5, 120, __LINE__); @@ -612,19 +596,19 @@ Cpu_scheduler_test::Main::Main(Env &env) _scheduler.unready(_share(1)); _update_head_and_check(100, 270, 4, 90, __LINE__); - _update_head_and_check(100, 360, 5, 50, __LINE__); + _update_head_and_check(100, 360, 4, 100, __LINE__); _scheduler.quota(_share(1), 110); - _update_head_and_check( 10, 370, 5, 40, __LINE__); + _update_head_and_check( 10, 370, 4, 90, __LINE__); _scheduler.quota(_share(1), 120); - _update_head_and_check( 20, 390, 5, 20, __LINE__); + _update_head_and_check( 20, 390, 4, 70, __LINE__); _scheduler.quota(_share(4), 210); - _update_head_and_check( 10, 400, 5, 10, __LINE__); + _update_head_and_check( 10, 400, 4, 60, __LINE__); _scheduler.ready(_share(1)); - _update_head_and_check( 20, 410, 1, 110, __LINE__); + _update_head_and_check( 10, 410, 1, 110, __LINE__); _scheduler.quota(_share(1), 100); _update_head_and_check( 30, 440, 1, 80, __LINE__); @@ -649,39 +633,43 @@ Cpu_scheduler_test::Main::Main(Env &env) _scheduler.unready(_share(2)); _scheduler.quota(_share(4), 80); - _update_head_and_check( 70, 630, 4, 100, __LINE__); - _update_head_and_check( 50, 680, 4, 50, __LINE__); + _update_head_and_check( 70, 630, 8, 100, __LINE__); + _update_head_and_check( 50, 680, 8, 50, __LINE__); - _scheduler.unready(_share(4)); - _update_head_and_check( 10, 690, 6, 100, __LINE__); + _scheduler.unready(_share(8)); + _update_head_and_check( 10, 690, 4, 50, __LINE__); _construct_share(3, __LINE__); - _update_head_and_check( 30, 720, 6, 70, __LINE__); + _update_head_and_check( 30, 720, 4, 20, __LINE__); _scheduler.quota(_share(3), 210); _scheduler.yield(); - _update_head_and_check( 20, 740, 9, 100, __LINE__); + _scheduler.unready(_share(4)); + _update_head_and_check( 20, 740, 5, 90, __LINE__); _scheduler.unready(_share(9)); _set_share_ready_and_check(4, false, __LINE__); - _update_head_and_check( 50, 790, 1, 100, __LINE__); + _update_head_and_check( 50, 790, 5, 40, __LINE__); _set_share_ready_and_check(2, true, __LINE__); - _update_head_and_check(170, 890, 2, 50, __LINE__); + _update_head_and_check( 40, 830, 2, 50, __LINE__); + _update_head_and_check( 60, 880, 2, 100, __LINE__); + _update_head_and_check( 10, 890, 2, 90, __LINE__); _scheduler.yield(); - _set_share_ready_and_check(9, false, __LINE__); - _update_head_and_check( 60, 940, 5, 60, __LINE__); + _set_share_ready_and_check(9, true, __LINE__); + _update_head_and_check( 60, 950, 6, 50, __LINE__); _scheduler.unready(_share(6)); - _update_head_and_check( 20, 960, 5, 40, __LINE__); + _update_head_and_check( 20, 970, 1, 30, __LINE__); _scheduler.yield(); - _update_head_and_check( 10, 970, 8, 30, __LINE__); + _scheduler.ready(_share(8)); + _update_head_and_check( 10, 980, 4, 20, __LINE__); _scheduler.unready(_share(8)); _scheduler.yield(); - _update_head_and_check( 10, 980, 4, 20, __LINE__); + _update_head_and_check( 10, 990, 5, 10, __LINE__); _scheduler.yield(); _update_head_and_check( 20, 0, 9, 40, __LINE__); @@ -704,8 +692,8 @@ Cpu_scheduler_test::Main::Main(Env &env) _scheduler.yield(); _scheduler.quota(_share(8), 130); - _update_head_and_check( 40, 310, 2, 100, __LINE__); - _update_head_and_check(100, 410, 1, 100, __LINE__); + _update_head_and_check( 40, 310, 4, 100, __LINE__); + _update_head_and_check(100, 410, 9, 100, __LINE__); _scheduler.quota(_share(3), 80); _set_share_ready_and_check(3, true, __LINE__); @@ -720,15 +708,16 @@ Cpu_scheduler_test::Main::Main(Env &env) _scheduler.quota(_share(6), 50); _update_head_and_check( 10, 580, 6, 50, __LINE__); _update_head_and_check( 70, 630, 8, 20, __LINE__); - _update_head_and_check( 40, 650, 1, 40, __LINE__); - _update_head_and_check( 40, 690, 9, 100, __LINE__); + _update_head_and_check( 40, 650, 8, 100, __LINE__); + _update_head_and_check( 40, 690, 8, 60, __LINE__); _destroy_share(6, __LINE__); - _update_head_and_check(200, 790, 5, 100, __LINE__); + _update_head_and_check(200, 750, 3, 100, __LINE__); _destroy_share(3, __LINE__); - _update_head_and_check(100, 890, 4, 100, __LINE__); - _update_head_and_check(120, 990, 2, 10, __LINE__); + _update_head_and_check( 90, 840, 9, 40, __LINE__); + _update_head_and_check( 60, 880, 2, 100, __LINE__); + _update_head_and_check(120, 980, 1, 20, __LINE__); _update_head_and_check( 80, 0, 9, 40, __LINE__); From f60a004cff89f29390879241d0db2cf5ffc30ea6 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Tue, 10 Jan 2023 11:42:04 +0100 Subject: [PATCH 0194/1921] base-hw scheduler test: rename test.cc main.cc Ref #4151 Ref #4710 --- repos/base-hw/src/test/cpu_scheduler/{test.cc => main.cc} | 0 repos/base-hw/src/test/cpu_scheduler/target.mk | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename repos/base-hw/src/test/cpu_scheduler/{test.cc => main.cc} (100%) diff --git a/repos/base-hw/src/test/cpu_scheduler/test.cc b/repos/base-hw/src/test/cpu_scheduler/main.cc similarity index 100% rename from repos/base-hw/src/test/cpu_scheduler/test.cc rename to repos/base-hw/src/test/cpu_scheduler/main.cc diff --git a/repos/base-hw/src/test/cpu_scheduler/target.mk b/repos/base-hw/src/test/cpu_scheduler/target.mk index 1aad543c50..f5baeca810 100644 --- a/repos/base-hw/src/test/cpu_scheduler/target.mk +++ b/repos/base-hw/src/test/cpu_scheduler/target.mk @@ -5,9 +5,9 @@ # TARGET = test-cpu_scheduler -SRC_CC = test.cc cpu_scheduler.cc +SRC_CC = main.cc cpu_scheduler.cc INC_DIR += $(REP_DIR)/src/core $(REP_DIR)/src/include $(BASE_DIR)/src/include LIBS = base -vpath test.cc $(PRG_DIR) +vpath main.cc $(PRG_DIR) vpath %.cc $(REP_DIR)/src/core/kernel From 68afbbc0f0a6f7a431b676c3cc9504f05ae4a644 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Tue, 10 Jan 2023 11:59:16 +0100 Subject: [PATCH 0195/1921] base-hw scheduler test: print method Adds befriended test-local wrappers for the classes Cpu_share and Cpu_scheduler and adds a print method to the scheduler wrapper that prints the internal state of the scheduler to the given output. Cpu_shares are referenced in the output via a the IDs that the test uses to organize them. I.e., this corresponds to how the CPU shares are named when calling the atomic steps the test is made of. Ref #4151 Ref #4710 --- repos/base-hw/src/core/kernel/cpu_scheduler.h | 14 ++ repos/base-hw/src/test/cpu_scheduler/main.cc | 198 +++++++++++++++++- 2 files changed, 209 insertions(+), 3 deletions(-) diff --git a/repos/base-hw/src/core/kernel/cpu_scheduler.h b/repos/base-hw/src/core/kernel/cpu_scheduler.h index 944ba532f3..a1e4a0770f 100644 --- a/repos/base-hw/src/core/kernel/cpu_scheduler.h +++ b/repos/base-hw/src/core/kernel/cpu_scheduler.h @@ -39,6 +39,16 @@ namespace Kernel { } +namespace Cpu_scheduler_test { + + /** + * Forward declaration of corresponding unit-test classes for friendship + */ + class Cpu_scheduler; + class Cpu_share; +} + + class Kernel::Cpu_priority { private: @@ -75,6 +85,8 @@ class Kernel::Cpu_priority class Kernel::Cpu_share { friend class Cpu_scheduler; + friend class Cpu_scheduler_test::Cpu_scheduler; + friend class Cpu_scheduler_test::Cpu_share; private: @@ -107,6 +119,8 @@ class Kernel::Cpu_share class Kernel::Cpu_scheduler { + friend class Cpu_scheduler_test::Cpu_scheduler; + private: typedef Cpu_share Share; diff --git a/repos/base-hw/src/test/cpu_scheduler/main.cc b/repos/base-hw/src/test/cpu_scheduler/main.cc index 1d8f52cecf..d6c8e87d00 100644 --- a/repos/base-hw/src/test/cpu_scheduler/main.cc +++ b/repos/base-hw/src/test/cpu_scheduler/main.cc @@ -23,10 +23,62 @@ using namespace Kernel; namespace Cpu_scheduler_test { + class Cpu_share; + class Cpu_scheduler; class Main; + + static Cpu_share &cast(Kernel::Cpu_share &share); + + static Cpu_share const &cast(Kernel::Cpu_share const &share); + + static Double_list &cast(Double_list const &list); } +class Cpu_scheduler_test::Cpu_share : public Kernel::Cpu_share +{ + private: + + using Label = String<32>; + + Label const _label; + + public: + + Cpu_share(Cpu_priority const prio, + unsigned const quota, + Label const &label) + : + Kernel::Cpu_share { prio, quota }, + _label { label } + { } + + Label const &label() const { return _label; } +}; + + +class Cpu_scheduler_test::Cpu_scheduler : public Kernel::Cpu_scheduler +{ + private: + + template void _for_each_prio(F f) const + { + bool cancel_for_each_prio { false }; + for (unsigned p = Prio::max(); p != Prio::min() - 1; p--) { + f(p, cancel_for_each_prio); + if (cancel_for_each_prio) + return; + } + } + + public: + + void print(Output &output) const; + + using Kernel::Cpu_scheduler::Cpu_scheduler; +}; + + class Cpu_scheduler_test::Main { private: @@ -36,7 +88,7 @@ class Cpu_scheduler_test::Main enum { INVALID_SHARE_ID = MAX_NR_OF_SHARES }; Env &_env; - Cpu_share _idle_share { 0, 0 }; + Cpu_share _idle_share { 0, 0, (unsigned)IDLE_SHARE_ID }; Constructible _shares[MAX_NR_OF_SHARES] { }; time_t _current_time { 0 }; Cpu_scheduler _scheduler; @@ -111,7 +163,7 @@ class Cpu_scheduler_test::Main _env.parent().exit(-1); break; } - _shares[id].construct(prio, quota); + _shares[id].construct(prio, quota, id); _scheduler.insert(*_shares[id]); } @@ -149,7 +201,7 @@ class Cpu_scheduler_test::Main error("wrong time ", round_time, " in line ", line_nr); _env.parent().exit(-1); } - Cpu_share &head { _scheduler.head() }; + Cpu_share &head { cast(_scheduler.head()) }; unsigned const head_quota { _scheduler.head_quota() }; if (&head != &_share(expected_head_id)) { @@ -185,6 +237,146 @@ class Cpu_scheduler_test::Main }; +/************************* + ** Utilities functions ** + *************************/ + +static Cpu_scheduler_test::Cpu_share & +Cpu_scheduler_test::cast(Kernel::Cpu_share &share) +{ + return *static_cast(&share); +} + + +static Cpu_scheduler_test::Cpu_share const & +Cpu_scheduler_test::cast(Kernel::Cpu_share const &share) +{ + return *static_cast(&share); +} + + +static Double_list & +Cpu_scheduler_test::cast(Double_list const &list) +{ + return *const_cast *>(&list); +} + + +/*************************************** + ** Cpu_scheduler_test::Cpu_scheduler ** + ***************************************/ + +void Cpu_scheduler_test::Cpu_scheduler::print(Output &output) const +{ + using Genode::print; + + print(output, "(\n"); + print(output, " quota: ", _residual, "/", _quota, ", "); + print(output, "fill: ", _fill, ", "); + print(output, "need to schedule: ", _need_to_schedule ? "true" : "false", ", "); + print(output, "last_time: ", _last_time); + + if (_head != nullptr) { + + print(output, "\n head: ( "); + if (_need_to_schedule) { + print(output, "\033[31m"); + } else { + print(output, "\033[32m"); + } + print(output, "id: ", cast(*_head).label(), ", "); + print(output, "quota: ", _head_quota, ", "); + print(output, "\033[0m"); + print(output, "claims: ", _head_claims ? "true" : "false", ", "); + print(output, "yields: ", _head_yields ? "true" : "false", " "); + print(output, ")"); + } + bool prios_empty { true }; + _for_each_prio([&] (Cpu_priority const prio, bool &) { + if (prios_empty && (_rcl[prio].head() || _ucl[prio].head())) { + prios_empty = false; + } + }); + if (!prios_empty) { + + _for_each_prio([&] (Cpu_priority const prio, bool &) { + + if (_rcl[prio].head() || _ucl[prio].head()) { + + print(output, "\n prio ", (unsigned)prio, ": ("); + if (_rcl[prio].head()) { + + print(output, " ready: "); + bool first_share { true }; + cast(_rcl[prio]).for_each([&] (Kernel::Cpu_share const &share) { + + if (&share == _head && _head_claims) { + if (_need_to_schedule) { + print(output, "\033[31m"); + } else { + print(output, "\033[32m"); + } + } + print( + output, first_share ? "" : ", ", cast(share).label() , "-", + share._claim, "/", share._quota); + + if (&share == _head && _head_claims) { + print(output, "\033[0m"); + } + first_share = false; + }); + } + if (_ucl[prio].head()) { + + print(output, " unready: "); + bool first_share { true }; + cast(_ucl[prio]).for_each([&] (Kernel::Cpu_share const &share) { + + print( + output, first_share ? "" : ", ", cast(share).label() , "-", + share._claim, "/", share._quota); + + first_share = false; + }); + } + print(output, " )"); + } + }); + } + if (_fills.head()) { + + print(output, "\n fills: "); + bool first_share { true }; + cast(_fills).for_each([&] (Kernel::Cpu_share const &share) { + + if (&share == _head && !_head_claims) { + if (_need_to_schedule) { + print(output, "\033[31m"); + } else { + print(output, "\033[32m"); + } + } + print( + output, first_share ? "" : ", ", cast(share).label() , "-", + share._fill); + + first_share = false; + + if (&share == _head && !_head_claims) { + print(output, "\033[0m"); + } + }); + print(output, "\n"); + } + print(output, ")"); +} + + +/****************************** + ** Cpu_scheduler_test::Main ** + ******************************/ + Cpu_scheduler_test::Main::Main(Env &env) : _env { env }, From c665f4e51de32e17ba973f50dd2d5cc6d44a7eea Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Thu, 8 Dec 2022 21:46:37 +0100 Subject: [PATCH 0196/1921] base-hw scheduler test: add to autopilot Fix #4151 Fix #4710 --- tool/autopilot.list | 1 + 1 file changed, 1 insertion(+) diff --git a/tool/autopilot.list b/tool/autopilot.list index 565b93c1e6..66106e20a8 100644 --- a/tool/autopilot.list +++ b/tool/autopilot.list @@ -5,6 +5,7 @@ cpu_balancer cpu_bench cpu_quota cpu_sampler +cpu_scheduler demo depot_autopilot depot_download From 0e311845bf23edf329fce32c50922ca2d87acf1b Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 28 Sep 2022 17:04:50 +0200 Subject: [PATCH 0197/1921] base-hw: don't show ROM modules at boot time On complex scenarios like Sculpt on the phone, this change noticeably reduces the boot time. Issue #4705 --- repos/base-hw/src/core/platform.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/repos/base-hw/src/core/platform.cc b/repos/base-hw/src/core/platform.cc index e51cb2210d..71779a5fe8 100644 --- a/repos/base-hw/src/core/platform.cc +++ b/repos/base-hw/src/core/platform.cc @@ -292,8 +292,6 @@ Platform::Platform() Idle_thread_trace_source( Trace::sources(), Affinity::Location(cpu_idx, 0)); } - - log(_rom_fs); } From be7022dadc1c2e4f036161563cc8dad2c5041595 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 10 Jan 2023 16:46:54 +0100 Subject: [PATCH 0198/1921] util/dictionary.h: alphabetically sorted for_each This patch reverses the AVL-tree criterion to let 'for_each' traverse the elements in alphabetical sorting order. Issue #4610 --- repos/base/include/util/dictionary.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base/include/util/dictionary.h b/repos/base/include/util/dictionary.h index c393b0776c..f7c1ac9be2 100644 --- a/repos/base/include/util/dictionary.h +++ b/repos/base/include/util/dictionary.h @@ -44,7 +44,7 @@ class Genode::Dictionary : Noncopyable Dictionary &_dictionary; - bool higher(T const *other) const { return name > other->This::name; } + bool higher(T const *other) const { return other->This::name > name; } friend class Avl_tree; friend class Avl_node; @@ -52,7 +52,7 @@ class Genode::Dictionary : Noncopyable static T *_matching_sub_tree(T &curr, NAME const &name) { - typename Avl_node::Side side = (curr.This::name > name); + typename Avl_node::Side side = (name > curr.This::name); return curr.Avl_node::child(side); } From 39ca06114bc7582d5ede60053ac784005630856f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 10 Jan 2023 16:22:01 +0100 Subject: [PATCH 0199/1921] sculpt_manager: keep launchers in 'Dictionary' This patch replaces the direct use of an 'Avl_tree' by the modern 'Dictionary' utility. --- .../src/app/sculpt_manager/model/launchers.h | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/model/launchers.h b/repos/gems/src/app/sculpt_manager/model/launchers.h index 36c16682ab..6ef7a13077 100644 --- a/repos/gems/src/app/sculpt_manager/model/launchers.h +++ b/repos/gems/src/app/sculpt_manager/model/launchers.h @@ -16,7 +16,7 @@ /* Genode includes */ #include -#include +#include /* local includes */ #include @@ -39,24 +39,16 @@ class Sculpt::Launchers : public Noncopyable Allocator &_alloc; - struct Launcher : Info, Avl_node, List_model::Element + struct Launcher; + + using Dict = Dictionary; + + struct Launcher : Dict::Element, List_model::Element { - Avl_tree &_avl_tree; - - Launcher(Avl_tree &avl_tree, Path const &path) - : Info(path), _avl_tree(avl_tree) - { _avl_tree.insert(this); } - - ~Launcher() { _avl_tree.remove(this); } - - /** - * Avl_node interface - */ - bool higher(Launcher *l) { - return strcmp(l->path.string(), path.string()) > 0; } + Launcher(Dict &dict, Path const &path) : Dict::Element(dict, path) { } }; - Avl_tree _sorted { }; + Dict _sorted { }; List_model _launchers { }; @@ -64,9 +56,9 @@ class Sculpt::Launchers : public Noncopyable { Allocator &_alloc; - Avl_tree &_sorted; + Dict &_sorted; - Update_policy(Allocator &alloc, Avl_tree &sorted) + Update_policy(Allocator &alloc, Dict &sorted) : _alloc(alloc), _sorted(sorted) { } void destroy_element(Launcher &elem) { destroy(_alloc, &elem); } @@ -81,7 +73,7 @@ class Sculpt::Launchers : public Noncopyable static bool element_matches_xml_node(Launcher const &elem, Xml_node node) { - return node.attribute_value("name", Path()) == elem.path; + return node.attribute_value("name", Path()) == elem.name; } }; @@ -89,14 +81,18 @@ class Sculpt::Launchers : public Noncopyable Launchers(Allocator &alloc) : _alloc(alloc) { } - void update_from_xml(Xml_node node) + void update_from_xml(Xml_node const &node) { Update_policy policy(_alloc, _sorted); _launchers.update_from_xml(policy, node); } template - void for_each(FN const &fn) const { _sorted.for_each(fn); } + void for_each(FN const &fn) const + { + _sorted.for_each([&] (Dict::Element const &e) { + fn(Info(e.name)); }); + } }; #endif /* _MODEL__LAUNCHERS_H_ */ From bf231f7fca3c67bf53986134a46556a31f676541 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 10 Jan 2023 16:52:31 +0100 Subject: [PATCH 0200/1921] sculpt_manager: use update_list_model_from_xml This patch replaces the use of 'List_model::Update_policy' types by simpler 'update_list_model_from_xml' function calls. Issue #4317 --- .../app/sculpt_manager/model/access_point.h | 33 +--- .../app/sculpt_manager/model/block_device.h | 30 +--- .../src/app/sculpt_manager/model/component.h | 26 ++- .../src/app/sculpt_manager/model/launchers.h | 56 +++---- .../src/app/sculpt_manager/model/partition.h | 26 +-- .../gems/src/app/sculpt_manager/model/route.h | 34 +--- .../app/sculpt_manager/model/runtime_config.h | 158 ++++++++---------- .../app/sculpt_manager/model/runtime_state.h | 87 +++++----- .../app/sculpt_manager/model/storage_device.h | 22 ++- .../sculpt_manager/model/storage_devices.h | 58 ++++++- .../sculpt_manager/model/usb_storage_device.h | 59 ++----- repos/gems/src/app/sculpt_manager/network.cc | 27 ++- repos/gems/src/app/sculpt_manager/storage.cc | 14 +- 13 files changed, 287 insertions(+), 343 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/model/access_point.h b/repos/gems/src/app/sculpt_manager/model/access_point.h index 6fde683457..cd0a8f7700 100644 --- a/repos/gems/src/app/sculpt_manager/model/access_point.h +++ b/repos/gems/src/app/sculpt_manager/model/access_point.h @@ -43,40 +43,15 @@ struct Sculpt::Access_point : List_model::Element bool unprotected() const { return protection == UNPROTECTED; } bool wpa_protected() const { return protection == WPA_PSK; } -}; - -/** - * Policy for transforming a 'accesspoints' report into a list model - */ -struct Sculpt::Access_point_update_policy : List_model::Update_policy -{ - Allocator &_alloc; - - Access_point_update_policy(Allocator &alloc) : _alloc(alloc) { } - - void destroy_element(Access_point &elem) { destroy(_alloc, &elem); } - - Access_point &create_element(Xml_node node) + bool matches(Xml_node const &node) const { - auto const protection = node.attribute_value("protection", String<16>()); - bool const use_protection = protection == "WPA" || protection == "WPA2"; - - return *new (_alloc) - Access_point(node.attribute_value("bssid", Access_point::Bssid()), - node.attribute_value("ssid", Access_point::Ssid()), - use_protection ? Access_point::Protection::WPA_PSK - : Access_point::Protection::UNPROTECTED); + return node.attribute_value("ssid", Access_point::Ssid()) == ssid; } - void update_element(Access_point &ap, Xml_node node) + static bool type_matches(Xml_node const &node) { - ap.quality = node.attribute_value("quality", 0U); - } - - static bool element_matches_xml_node(Access_point const &elem, Xml_node node) - { - return node.attribute_value("ssid", Access_point::Ssid()) == elem.ssid; + return node.has_type("accesspoint"); } }; diff --git a/repos/gems/src/app/sculpt_manager/model/block_device.h b/repos/gems/src/app/sculpt_manager/model/block_device.h index dde70c6707..e69e791696 100644 --- a/repos/gems/src/app/sculpt_manager/model/block_device.h +++ b/repos/gems/src/app/sculpt_manager/model/block_device.h @@ -37,37 +37,13 @@ struct Sculpt::Block_device : List_model::Element, : Storage_device(env, alloc, label, capacity, sigh), model(model) { } -}; - -struct Sculpt::Block_device_update_policy : List_model::Update_policy -{ - Env &_env; - Allocator &_alloc; - - Signal_context_capability _sigh; - - Block_device_update_policy(Env &env, Allocator &alloc, Signal_context_capability sigh) - : _env(env), _alloc(alloc), _sigh(sigh) { } - - void destroy_element(Block_device &elem) { destroy(_alloc, &elem); } - - Block_device &create_element(Xml_node node) + bool matches(Xml_node const &node) const { - return *new (_alloc) - Block_device(_env, _alloc, _sigh, - node.attribute_value("label", Block_device::Label()), - node.attribute_value("model", Block_device::Model()), - Capacity { node.attribute_value("block_size", 0ULL) - * node.attribute_value("block_count", 0ULL) }); + return node.attribute_value("label", Block_device::Label()) == label; } - void update_element(Block_device &, Xml_node) { } - - static bool element_matches_xml_node(Block_device const &elem, Xml_node node) - { - return node.attribute_value("label", Block_device::Label()) == elem.label; - } + static bool type_matches(Xml_node const &) { return true; } }; #endif /* _MODEL__BLOCK_DEVICE_H_ */ diff --git a/repos/gems/src/app/sculpt_manager/model/component.h b/repos/gems/src/app/sculpt_manager/model/component.h index dc3eaf0e6b..f857cc7d5e 100644 --- a/repos/gems/src/app/sculpt_manager/model/component.h +++ b/repos/gems/src/app/sculpt_manager/model/component.h @@ -23,13 +23,13 @@ namespace Sculpt { struct Component; } struct Sculpt::Component : Noncopyable { - Route::Update_policy _route_update_policy; - typedef Depot::Archive::Path Path; typedef Depot::Archive::Name Name; typedef String<100> Info; typedef Start_name Service; + Allocator &_alloc; + /* defined at construction time */ Path const path; Info const info; @@ -49,15 +49,31 @@ struct Sculpt::Component : Noncopyable List_model routes { }; Route pd_route { "" }; + void _update_routes_from_xml(Xml_node const &node) + { + update_list_model_from_xml(routes, node, + + /* create */ + [&] (Xml_node const &route) -> Route & { + return *new (_alloc) Route(route); }, + + /* destroy */ + [&] (Route &e) { destroy(_alloc, &e); }, + + /* update */ + [&] (Route &, Xml_node) { } + ); + } + Component(Allocator &alloc, Path const &path, Info const &info, Affinity::Space const space) : - _route_update_policy(alloc), path(path), info(info), affinity_space(space) + _alloc(alloc), path(path), info(info), affinity_space(space) { } ~Component() { - routes.update_from_xml(_route_update_policy, Xml_node("")); + _update_routes_from_xml(Xml_node("")); } void try_apply_blueprint(Xml_node blueprint) @@ -73,7 +89,7 @@ struct Sculpt::Component : Noncopyable caps = runtime.attribute_value("caps", 0UL); runtime.with_optional_sub_node("requires", [&] (Xml_node requires) { - routes.update_from_xml(_route_update_policy, requires); }); + _update_routes_from_xml(requires); }); }); blueprint_known = true; diff --git a/repos/gems/src/app/sculpt_manager/model/launchers.h b/repos/gems/src/app/sculpt_manager/model/launchers.h index 6ef7a13077..196e0d89a3 100644 --- a/repos/gems/src/app/sculpt_manager/model/launchers.h +++ b/repos/gems/src/app/sculpt_manager/model/launchers.h @@ -45,6 +45,16 @@ class Sculpt::Launchers : public Noncopyable struct Launcher : Dict::Element, List_model::Element { + bool matches(Xml_node const &node) const + { + return node.attribute_value("name", Path()) == name; + } + + static bool type_matches(Xml_node const &node) + { + return node.has_type("file"); + } + Launcher(Dict &dict, Path const &path) : Dict::Element(dict, path) { } }; @@ -52,46 +62,32 @@ class Sculpt::Launchers : public Noncopyable List_model _launchers { }; - struct Update_policy : List_model::Update_policy - { - Allocator &_alloc; - - Dict &_sorted; - - Update_policy(Allocator &alloc, Dict &sorted) - : _alloc(alloc), _sorted(sorted) { } - - void destroy_element(Launcher &elem) { destroy(_alloc, &elem); } - - Launcher &create_element(Xml_node node) - { - return *new (_alloc) - Launcher(_sorted, node.attribute_value("name", Path())); - } - - void update_element(Launcher &, Xml_node) { } - - static bool element_matches_xml_node(Launcher const &elem, Xml_node node) - { - return node.attribute_value("name", Path()) == elem.name; - } - }; - public: Launchers(Allocator &alloc) : _alloc(alloc) { } - void update_from_xml(Xml_node const &node) + void update_from_xml(Xml_node const &launchers) { - Update_policy policy(_alloc, _sorted); - _launchers.update_from_xml(policy, node); + update_list_model_from_xml(_launchers, launchers, + + /* create */ + [&] (Xml_node const &node) -> Launcher & { + return *new (_alloc) + Launcher(_sorted, + node.attribute_value("name", Path())); }, + + /* destroy */ + [&] (Launcher &e) { destroy(_alloc, &e); }, + + /* update */ + [&] (Launcher &, Xml_node) { } + ); } template void for_each(FN const &fn) const { - _sorted.for_each([&] (Dict::Element const &e) { - fn(Info(e.name)); }); + _sorted.for_each([&] (Dict::Element const &e) { fn(Info(e.name)); }); } }; diff --git a/repos/gems/src/app/sculpt_manager/model/partition.h b/repos/gems/src/app/sculpt_manager/model/partition.h index 34397d7577..82c91008ae 100644 --- a/repos/gems/src/app/sculpt_manager/model/partition.h +++ b/repos/gems/src/app/sculpt_manager/model/partition.h @@ -133,28 +133,8 @@ struct Sculpt::Partition : List_model::Element { } bool whole_device() const { return !number.valid(); } -}; - -/** - * Policy for transforming a part_block report into a list of partitions - */ -struct Sculpt::Partition_update_policy : List_model::Update_policy -{ - Allocator &_alloc; - - Partition_update_policy(Allocator &alloc) : _alloc(alloc) { } - - void destroy_element(Partition &elem) { destroy(_alloc, &elem); } - - Partition &create_element(Xml_node node) - { - return *new (_alloc) Partition(Partition::Args::from_xml(node)); - } - - void update_element(Partition &, Xml_node) { } - - static bool node_is_element(Xml_node node) + static bool type_matches(Xml_node node) { /* * Partition "0" is a pseudo partition that refers to the whole device @@ -163,9 +143,9 @@ struct Sculpt::Partition_update_policy : List_model::Update_policy return (node.attribute_value("number", Partition::Number()) != "0"); } - static bool element_matches_xml_node(Partition const &elem, Xml_node node) + bool matches(Xml_node node) const { - return node.attribute_value("number", Partition::Number()) == elem.number; + return node.attribute_value("number", Partition::Number()) == number; } }; diff --git a/repos/gems/src/app/sculpt_manager/model/route.h b/repos/gems/src/app/sculpt_manager/model/route.h index 396fc6e22b..404c40220e 100644 --- a/repos/gems/src/app/sculpt_manager/model/route.h +++ b/repos/gems/src/app/sculpt_manager/model/route.h @@ -148,34 +148,16 @@ struct Sculpt::Route : List_model::Element }); } - struct Update_policy + bool matches(Xml_node node) const { - typedef Route Element; + return required == _required(node) + && required_label == node.attribute_value("label", Label()); + } - Allocator &_alloc; - - Update_policy(Allocator &alloc) : _alloc(alloc) { } - - void destroy_element(Route &elem) { destroy(_alloc, &elem); } - - Route &create_element(Xml_node node) - { - return *new (_alloc) Route(node); - } - - void update_element(Route &, Xml_node) { } - - static bool element_matches_xml_node(Route const &elem, Xml_node node) - { - return elem.required == _required(node) - && elem.required_label == node.attribute_value("label", Label()); - } - - static bool node_is_element(Xml_node node) - { - return _required(node) != Service::Type::UNDEFINED; - } - }; + static bool type_matches(Xml_node node) + { + return _required(node) != Service::Type::UNDEFINED; + } }; #endif /* _MODEL__ROUTE_H_ */ diff --git a/repos/gems/src/app/sculpt_manager/model/runtime_config.h b/repos/gems/src/app/sculpt_manager/model/runtime_config.h index fcb1a494da..f1d517927e 100644 --- a/repos/gems/src/app/sculpt_manager/model/runtime_config.h +++ b/repos/gems/src/app/sculpt_manager/model/runtime_config.h @@ -167,35 +167,15 @@ class Sculpt::Runtime_config Child_service(Start_name server, Xml_node provides) : Service(server, type_from_xml(provides), Label()) { } - struct Update_policy + static bool type_matches(Xml_node const &node) { - typedef Child_service Element; + return type_from_xml(node) != Service::Type::UNDEFINED; + } - Start_name _server; - Allocator &_alloc; - - Update_policy(Start_name const &server, Allocator &alloc) - : _server(server), _alloc(alloc) { } - - void destroy_element(Element &elem) { destroy(_alloc, &elem); } - - Element &create_element(Xml_node node) - { - return *new (_alloc) Child_service(_server, node); - } - - void update_element(Element &, Xml_node) { } - - static bool element_matches_xml_node(Element const &elem, Xml_node node) - { - return type_from_xml(node) == elem.type; - } - - static bool node_is_element(Xml_node node) - { - return type_from_xml(node) != Service::Type::UNDEFINED; - } - }; + bool matches(Xml_node const &node) const + { + return type_from_xml(node) == type; + } }; public: @@ -212,33 +192,15 @@ class Sculpt::Runtime_config Dep(Start_name to_name) : to_name(to_name) { } - struct Update_policy + bool matches(Xml_node const &node) const { - typedef Dep Element; + return _to_name(node) == to_name; + } - Allocator &_alloc; - - Update_policy(Allocator &alloc) : _alloc(alloc) { } - - void destroy_element(Dep &elem) { destroy(_alloc, &elem); } - - Dep &create_element(Xml_node node) - { - return *new (_alloc) Dep(_to_name(node)); - } - - void update_element(Dep &, Xml_node) { } - - static bool element_matches_xml_node(Dep const &elem, Xml_node node) - { - return _to_name(node) == elem.to_name; - } - - static bool node_is_element(Xml_node node) - { - return _to_name(node).valid(); - } - }; + static bool type_matches(Xml_node const &node) + { + return _to_name(node).valid(); + } }; /* dependencies on other child components */ @@ -262,55 +224,53 @@ class Sculpt::Runtime_config _child_services.for_each(fn); } - struct Update_policy + void update_from_xml(Allocator &alloc, Xml_node const &node) { - typedef Component Element; + primary_dependency = _primary_dependency(node); - Allocator &_alloc; + node.with_optional_sub_node("route", [&] (Xml_node route) { - Update_policy(Allocator &alloc) : _alloc(alloc) { } + update_list_model_from_xml(deps, route, - void destroy_element(Component &elem) - { - /* flush list models */ - update_element(elem, Xml_node(" ")); + /* create */ + [&] (Xml_node const &node) -> Dep & { + return *new (alloc) Dep(_to_name(node)); }, - destroy(_alloc, &elem); - } + /* destroy */ + [&] (Dep &e) { destroy(alloc, &e); }, - Component &create_element(Xml_node node) - { - return *new (_alloc) - Component(node.attribute_value("name", Start_name())); - } + /* update */ + [&] (Dep &, Xml_node) { } + ); + }); - void update_element(Component &elem, Xml_node node) - { - elem.primary_dependency = _primary_dependency(node); + node.with_optional_sub_node("provides", [&] (Xml_node provides) { - { - Dep::Update_policy policy { _alloc }; + update_list_model_from_xml(_child_services, provides, - node.with_optional_sub_node("route", [&] (Xml_node route) { - elem.deps.update_from_xml(policy, route); }); - } + /* create */ + [&] (Xml_node const &node) -> Child_service & { + return *new (alloc) + Child_service(name, node); }, - { - Child_service::Update_policy policy { elem.name, _alloc }; + /* destroy */ + [&] (Child_service &e) { destroy(alloc, &e); }, - node.with_optional_sub_node("provides", [&] (Xml_node provides) { - elem._child_services.update_from_xml(policy, - provides); }); - } - } + /* update */ + [&] (Child_service &, Xml_node) { } + ); + }); + } - static bool element_matches_xml_node(Component const &elem, Xml_node node) - { - return node.attribute_value("name", Start_name()) == elem.name; - } + bool matches(Xml_node const &node) const + { + return node.attribute_value("name", Start_name()) == name; + } - static bool node_is_element(Xml_node node) { return node.has_type("start"); } - }; + static bool type_matches(Xml_node const &node) + { + return node.has_type("start"); + } }; private: @@ -377,8 +337,26 @@ class Sculpt::Runtime_config void update_from_xml(Xml_node config) { - Component::Update_policy policy(_alloc); - _components.update_from_xml(policy, config); + update_list_model_from_xml(_components, config, + + /* create */ + [&] (Xml_node const &node) -> Component & { + return *new (_alloc) + Component(node.attribute_value("name", Start_name())); }, + + /* destroy */ + [&] (Component &e) { + + /* flush list models */ + e.update_from_xml(_alloc, Xml_node(" ")); + + destroy(_alloc, &e); + }, + + /* update */ + [&] (Component &e, Xml_node const &node) { + e.update_from_xml(_alloc, node); } + ); } template diff --git a/repos/gems/src/app/sculpt_manager/model/runtime_state.h b/repos/gems/src/app/sculpt_manager/model/runtime_state.h index a6c87906a9..3523279d0e 100644 --- a/repos/gems/src/app/sculpt_manager/model/runtime_state.h +++ b/repos/gems/src/app/sculpt_manager/model/runtime_state.h @@ -73,6 +73,33 @@ class Sculpt::Runtime_state : public Runtime_info bool abandoned_by_user = false; Child(Start_name const &name) : name(name) { } + + bool matches(Xml_node const &node) const + { + return node.attribute_value("name", Start_name()) == name; + } + + static bool type_matches(Xml_node const &node) + { + return node.has_type("child"); + } + + void update_from_xml(Xml_node const &node) + { + node.with_optional_sub_node("ram", [&] (Xml_node const &ram) { + info.assigned_ram = max(ram.attribute_value("assigned", Number_of_bytes()), + ram.attribute_value("quota", Number_of_bytes())); + info.avail_ram = ram.attribute_value("avail", Number_of_bytes()); + }); + + node.with_optional_sub_node("caps", [&] (Xml_node const &caps) { + info.assigned_caps = max(caps.attribute_value("assigned", 0UL), + caps.attribute_value("quota", 0UL)); + info.avail_caps = caps.attribute_value("avail", 0UL); + }); + + info.version.value = node.attribute_value("version", 0U); + } }; List_model _children { }; @@ -183,50 +210,6 @@ class Sculpt::Runtime_state : public Runtime_info && _currently_constructed->construction.constructed(); } - struct Update_policy : List_model::Update_policy - { - Allocator &_alloc; - - Update_policy(Allocator &alloc) : _alloc(alloc) { } - - void destroy_element(Child &elem) - { - destroy(_alloc, &elem); - } - - Child &create_element(Xml_node node) - { - return *new (_alloc) - Child(node.attribute_value("name", Start_name())); - } - - void update_element(Child &child, Xml_node node) - { - if (node.has_sub_node("ram")) { - Xml_node const ram = node.sub_node("ram"); - child.info.assigned_ram = max(ram.attribute_value("assigned", Number_of_bytes()), - ram.attribute_value("quota", Number_of_bytes())); - child.info.avail_ram = ram.attribute_value("avail", Number_of_bytes()); - } - - if (node.has_sub_node("caps")) { - Xml_node const caps = node.sub_node("caps"); - child.info.assigned_caps = max(caps.attribute_value("assigned", 0UL), - caps.attribute_value("quota", 0UL)); - child.info.avail_caps = caps.attribute_value("avail", 0UL); - } - - child.info.version.value = node.attribute_value("version", 0U); - } - - static bool element_matches_xml_node(Child const &elem, Xml_node node) - { - return node.attribute_value("name", Start_name()) == elem.name; - } - - static bool node_is_element(Xml_node node) { return node.has_type("child"); } - }; - /* * Noncopyable */ @@ -242,8 +225,20 @@ class Sculpt::Runtime_state : public Runtime_info void update_from_state_report(Xml_node state) { - Update_policy policy(_alloc); - _children.update_from_xml(policy, state); + update_list_model_from_xml(_children, state, + + /* create */ + [&] (Xml_node const &node) -> Child & { + return *new (_alloc) + Child(node.attribute_value("name", Start_name())); }, + + /* destroy */ + [&] (Child &child) { destroy(_alloc, &child); }, + + /* update */ + [&] (Child &child, Xml_node const &node) { + child.update_from_xml(node); } + ); } /** diff --git a/repos/gems/src/app/sculpt_manager/model/storage_device.h b/repos/gems/src/app/sculpt_manager/model/storage_device.h index badb5f5507..cac1f9fee9 100644 --- a/repos/gems/src/app/sculpt_manager/model/storage_device.h +++ b/repos/gems/src/app/sculpt_manager/model/storage_device.h @@ -52,6 +52,22 @@ struct Sculpt::Storage_device unsigned _part_block_version = 0; + void _update_partitions_from_xml(Xml_node const &node) + { + update_list_model_from_xml(partitions, node, + + /* create */ + [&] (Xml_node const &node) -> Partition & { + return *new (_alloc) Partition(Partition::Args::from_xml(node)); }, + + /* destroy */ + [&] (Partition &p) { destroy(_alloc, &p); }, + + /* update */ + [&] (Partition &, Xml_node) { } + ); + } + /** * Trigger the rediscovery of the device, e.g., after partitioning of after * formatting the whole device. @@ -61,8 +77,7 @@ struct Sculpt::Storage_device state = UNKNOWN; _part_block_version++; - Partition_update_policy policy(_alloc); - partitions.update_from_xml(policy, Xml_node("")); + _update_partitions_from_xml(Xml_node("")); } void process_part_block_report() @@ -75,8 +90,7 @@ struct Sculpt::Storage_device whole_device = (report.attribute_value("type", String<16>()) == "disk"); - Partition_update_policy policy(_alloc); - partitions.update_from_xml(policy, report); + _update_partitions_from_xml(report); /* * Import whole-device partition information. diff --git a/repos/gems/src/app/sculpt_manager/model/storage_devices.h b/repos/gems/src/app/sculpt_manager/model/storage_devices.h index 9da1188deb..571197fd0c 100644 --- a/repos/gems/src/app/sculpt_manager/model/storage_devices.h +++ b/repos/gems/src/app/sculpt_manager/model/storage_devices.h @@ -34,10 +34,27 @@ struct Sculpt::Storage_devices /** * Update 'block_devices' from 'block_devices' report */ - template - void update_block_devices_from_xml(POLICY &policy, Xml_node node) + void update_block_devices_from_xml(Env &env, Allocator &alloc, Xml_node node, + Signal_context_capability sigh) { - block_devices.update_from_xml(policy, node); + update_list_model_from_xml(block_devices, node, + + /* create */ + [&] (Xml_node const &node) -> Block_device & { + return *new (alloc) + Block_device(env, alloc, sigh, + node.attribute_value("label", Block_device::Label()), + node.attribute_value("model", Block_device::Model()), + Capacity { node.attribute_value("block_size", 0ULL) + * node.attribute_value("block_count", 0ULL) }); + }, + + /* destroy */ + [&] (Block_device &b) { destroy(alloc, &b); }, + + /* update */ + [&] (Block_device &, Xml_node const &) { } + ); if (node.has_type("block_devices")) _block_devices_report_valid = true; @@ -45,17 +62,46 @@ struct Sculpt::Storage_devices /** * Update 'usb_storage_devices' from 'usb_active_config' report + * + * \return true if USB storage device was added or vanished */ - template - void update_usb_storage_devices_from_xml(POLICY &policy, Xml_node node) + bool update_usb_storage_devices_from_xml(Env &env, Allocator &alloc, Xml_node node, + Signal_context_capability sigh) { - usb_storage_devices.update_from_xml(policy, node); + using Label = Usb_storage_device::Label; + + bool device_added_or_vanished = false; + + update_list_model_from_xml(usb_storage_devices, node, + + /* create */ + [&] (Xml_node const &node) -> Usb_storage_device & + { + device_added_or_vanished = true; + + return *new (alloc) + Usb_storage_device(env, alloc, sigh, + node.attribute_value("label_suffix", Label())); + }, + + /* destroy */ + [&] (Usb_storage_device &elem) + { + device_added_or_vanished = true; + destroy(alloc, &elem); + }, + + /* update */ + [&] (Usb_storage_device &, Xml_node const &) { } + ); _usb_active_config_valid = true; usb_present = false; usb_storage_devices.for_each([&] (Storage_device const &) { usb_present = true; }); + + return device_added_or_vanished; } /** diff --git a/repos/gems/src/app/sculpt_manager/model/usb_storage_device.h b/repos/gems/src/app/sculpt_manager/model/usb_storage_device.h index a8b860b3e1..4af211ff8c 100644 --- a/repos/gems/src/app/sculpt_manager/model/usb_storage_device.h +++ b/repos/gems/src/app/sculpt_manager/model/usb_storage_device.h @@ -116,6 +116,16 @@ struct Sculpt::Usb_storage_device : List_model::Element, } inline void gen_usb_block_drv_start_content(Xml_generator &xml) const; + + static bool type_matches(Xml_node node) + { + return node.attribute_value("class", String<32>()) == "storage"; + } + + bool matches(Xml_node node) const + { + return node.attribute_value("label_suffix", Label()) == label; + } }; @@ -151,53 +161,4 @@ void Sculpt::Usb_storage_device::gen_usb_block_drv_start_content(Xml_generator & }); } - -struct Sculpt::Usb_storage_device_update_policy -: - List_model::Update_policy -{ - Env &_env; - Allocator &_alloc; - - bool device_added_or_vanished = false; - - Signal_context_capability _sigh; - - Usb_storage_device_update_policy(Env &env, Allocator &alloc, - Signal_context_capability sigh) - : - _env(env), _alloc(alloc), _sigh(sigh) - { } - - typedef Usb_storage_device::Label Label; - - void destroy_element(Usb_storage_device &elem) - { - device_added_or_vanished = true; - - destroy(_alloc, &elem); - } - - Usb_storage_device &create_element(Xml_node node) - { - device_added_or_vanished = true; - - return *new (_alloc) - Usb_storage_device(_env, _alloc, _sigh, - node.attribute_value("label_suffix", Label())); - } - - void update_element(Usb_storage_device &, Xml_node) { } - - static bool node_is_element(Xml_node node) - { - return node.attribute_value("class", String<32>()) == "storage"; - }; - - static bool element_matches_xml_node(Usb_storage_device const &elem, Xml_node node) - { - return node.attribute_value("label_suffix", Label()) == elem.label; - } -}; - #endif /* _MODEL__BLOCK_DEVICE_H_ */ diff --git a/repos/gems/src/app/sculpt_manager/network.cc b/repos/gems/src/app/sculpt_manager/network.cc index bca00fe340..90c0bb7b61 100644 --- a/repos/gems/src/app/sculpt_manager/network.cc +++ b/repos/gems/src/app/sculpt_manager/network.cc @@ -125,8 +125,31 @@ void Sculpt::Network::_handle_wlan_accesspoints() if (!initial_scan && dialog.ap_list_hovered()) return; - Access_point_update_policy policy(_alloc); - _access_points.update_from_xml(policy, _wlan_accesspoints_rom.xml()); + update_list_model_from_xml(_access_points, _wlan_accesspoints_rom.xml(), + + /* create */ + [&] (Xml_node const &node) -> Access_point & + { + auto const protection = node.attribute_value("protection", String<16>()); + bool const use_protection = protection == "WPA" || protection == "WPA2"; + + return *new (_alloc) + Access_point(node.attribute_value("bssid", Access_point::Bssid()), + node.attribute_value("ssid", Access_point::Ssid()), + use_protection ? Access_point::Protection::WPA_PSK + : Access_point::Protection::UNPROTECTED); + }, + + /* destroy */ + [&] (Access_point &ap) { destroy(_alloc, &ap); }, + + /* update */ + [&] (Access_point &ap, Xml_node const &node) + { + ap.quality = node.attribute_value("quality", 0U); + } + ); + _action.update_network_dialog(); } diff --git a/repos/gems/src/app/sculpt_manager/storage.cc b/repos/gems/src/app/sculpt_manager/storage.cc index df1c76fb94..dfa00b561e 100644 --- a/repos/gems/src/app/sculpt_manager/storage.cc +++ b/repos/gems/src/app/sculpt_manager/storage.cc @@ -32,8 +32,9 @@ void Sculpt::Storage::handle_storage_devices_update() { _block_devices_rom.update(); - Block_device_update_policy policy(_env, _alloc, _storage_device_update_handler); - _storage_devices.update_block_devices_from_xml(policy, _block_devices_rom.xml()); + + _storage_devices.update_block_devices_from_xml(_env, _alloc, _block_devices_rom.xml(), + _storage_device_update_handler); _storage_devices.block_devices.for_each([&] (Block_device &dev) { process_part_block_report(dev); }); @@ -41,12 +42,13 @@ void Sculpt::Storage::handle_storage_devices_update() { _usb_active_config_rom.update(); - Usb_storage_device_update_policy policy(_env, _alloc, _storage_device_update_handler); - Xml_node const config = _usb_active_config_rom.xml(); - _storage_devices.update_usb_storage_devices_from_xml(policy, config); + bool const usb_storage_added_or_vanished = + _storage_devices.update_usb_storage_devices_from_xml(_env, _alloc, + _usb_active_config_rom.xml(), + _storage_device_update_handler); - if (policy.device_added_or_vanished) + if (usb_storage_added_or_vanished) reconfigure_runtime = true; _storage_devices.usb_storage_devices.for_each([&] (Usb_storage_device &dev) { From 79d8d1d557a26419414fca4779de2a72149b498e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 10 Jan 2023 15:53:00 +0100 Subject: [PATCH 0201/1921] sculpt_manager: Deploy::use_as_deploy_template This patch simplifies the 'Deploy::update_managed_deploy_config' interface by keeping an internal copy of the currently used deploy template inside the 'Deploy' class. The template is updated whenever the config/deploy file is modified. This change weakens the coupling between the '_manual_deploy_rom' and the '_deploy' subsystem, easing the upcoming implementation of the switching between presets. --- repos/gems/src/app/sculpt_manager/deploy.h | 22 +++++++++++++++++++++- repos/gems/src/app/sculpt_manager/main.cc | 11 ++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/deploy.h b/repos/gems/src/app/sculpt_manager/deploy.h index 296ff54834..26aa60fbed 100644 --- a/repos/gems/src/app/sculpt_manager/deploy.h +++ b/repos/gems/src/app/sculpt_manager/deploy.h @@ -78,7 +78,27 @@ struct Sculpt::Deploy /* config obtained from '/config/managed/deploy' */ Attached_rom_dataspace _managed_deploy_rom { _env, "config -> managed/deploy" }; - void update_managed_deploy_config(Xml_node deploy) + Constructible _template { }; + + void use_as_deploy_template(Xml_node const &deploy) + { + _template.construct(_alloc, deploy); + } + + void update_managed_deploy_config() + { + if (!_template.constructed()) + return; + + Xml_node const deploy = _template->xml(); + + if (deploy.type() == "empty") + return; + + _update_managed_deploy_config(deploy); + } + + void _update_managed_deploy_config(Xml_node deploy) { /* * Ignore intermediate states that may occur when manually updating diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index 03dce96546..172631b683 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -397,7 +397,8 @@ struct Sculpt::Main : Input_event_handler, { _runtime_state.reset_abandoned_and_launched_children(); _manual_deploy_rom.update(); - _deploy.update_managed_deploy_config(_manual_deploy_rom.xml()); + _deploy.use_as_deploy_template(_manual_deploy_rom.xml()); + _deploy.update_managed_deploy_config(); } Signal_handler
_manual_deploy_handler { @@ -794,7 +795,7 @@ struct Sculpt::Main : Input_event_handler, _runtime_state.abandon(name); /* update config/managed/deploy with the component 'name' removed */ - _deploy.update_managed_deploy_config(_manual_deploy_rom.xml()); + _deploy.update_managed_deploy_config(); } /* @@ -822,7 +823,7 @@ struct Sculpt::Main : Input_event_handler, _runtime_state.restart(name); /* update config/managed/deploy with the component 'name' removed */ - _deploy.update_managed_deploy_config(_manual_deploy_rom.xml()); + _deploy.update_managed_deploy_config(); } } @@ -1078,7 +1079,7 @@ struct Sculpt::Main : Input_event_handler, _close_popup_dialog(); /* trigger change of the deployment */ - _deploy.update_managed_deploy_config(_manual_deploy_rom.xml()); + _deploy.update_managed_deploy_config(); } Start_name new_construction(Component::Path const &pkg, @@ -1101,7 +1102,7 @@ struct Sculpt::Main : Input_event_handler, _close_popup_dialog(); /* trigger change of the deployment */ - _deploy.update_managed_deploy_config(_manual_deploy_rom.xml()); + _deploy.update_managed_deploy_config(); } void trigger_download(Path const &path) override From 641fadb3e911ffc4c4fc3f9c2177f360f03bc259 Mon Sep 17 00:00:00 2001 From: Benjamin Lamowski Date: Mon, 16 Jan 2023 17:11:35 +0100 Subject: [PATCH 0202/1921] base-hw: remove memory hole in bootstrap page table Tests on qemu would fail when started with RAM sizes from 1025MiB to 2048MiB, because the the mapping hole in the page table from 1GiB to 2GiB would interfere with qemu's mapping addresses for ACPI. Identity-map the complete first 4GiB of memory to catch all early memory accesses during bootstrap. Fixes #4724. --- .../bootstrap/spec/x86_64/crt0_translation_table.s | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/crt0_translation_table.s b/repos/base-hw/src/bootstrap/spec/x86_64/crt0_translation_table.s index 6fbde692ce..9a374a4d28 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/crt0_translation_table.s +++ b/repos/base-hw/src/bootstrap/spec/x86_64/crt0_translation_table.s @@ -18,7 +18,7 @@ .data /******************************************** - ** Identity mapping from 4KiB to 1GiB ** + ** Identity mapping from 4KiB to 4GiB ** ** plus mappings for LAPIC, I/O APIC MMIO ** ** Page 0 containing the Bios Data Area ** ** gets mapped to 2MiB - 4KiB readonly. ** @@ -35,7 +35,7 @@ .p2align MIN_PAGE_SIZE_LOG2 _kernel_pdp: .quad _kernel_pd_0 + 0xf - .fill 1, 8, 0x0 + .quad _kernel_pd_1 + 0xf .quad _kernel_pd_2 + 0xf .quad _kernel_pd_3 + 0xf .fill 508, 8, 0x0 @@ -50,6 +50,15 @@ .set entry, entry + 0x200000 .endr + /* PD [1G-2G) */ + .p2align MIN_PAGE_SIZE_LOG2 + _kernel_pd_1: + .set entry, 0x4000018f + .rept 512 + .quad entry + .set entry, entry + 0x200000 + .endr + /* PD [2G-3G) */ .p2align MIN_PAGE_SIZE_LOG2 _kernel_pd_2: From d86309957e2bc9444cac9217fbd3bf01b02f5c36 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 17 Jan 2023 12:05:13 +0100 Subject: [PATCH 0203/1921] Road map for 2023 --- doc/news.txt | 33 +++++++ doc/road_map.txt | 218 +++++++++++++++++++++++++++-------------------- 2 files changed, 160 insertions(+), 91 deletions(-) diff --git a/doc/news.txt b/doc/news.txt index 642471c122..58c2d90065 100644 --- a/doc/news.txt +++ b/doc/news.txt @@ -4,6 +4,39 @@ =========== +Road Map for 2023 | 2023-01-17 +############################## + +| In 2023, we will make the mobile version of Sculpt OS fit for end users, +| unleash advanced hardware features of Intel platforms, +| switch to C++20 by default, and run the feature-complete PC version +| of Sculpt OS on Genode's custom-tailored microkernel. + +After having enabled all hardware features of the PinePhone that are +fundamental for a mobile phone over the course of the past year, the +project now aims at getting the mobile version of Sculpt OS into the hands of +end users. Throughout the year, there will be multiple rounds of field tests +within the community, allowing us to reach the desired state of maturity and +usefulness in an iterative way. + +On PC platforms, Genode will increasingly address advanced platform features +like the distinction between power-efficient and high-performance cores, the +management of temperatures and frequencies, or the practical use of +suspend/resume. By the end of the year, we envision the PC version of Sculpt +OS running on Genode's custom-tailored microkernel leveraging all those +aspects of modern PC hardware. + +Along the planned timeline of the project, one can spot plenty of additional +topics of interest such as the continued line of work of combining Genode +with FPGAs, applications implemented in Rust, the integration of IPv6, the +use of C++20 by default, or completed driver support for the MNT Reform laptop. +An exciting year lies ahead of us! + +More details including our reflections of the past year, this year's focus, +and a rough schedule are presented at our official +[https:/about/road-map - road-map page]. + + Genode OS Framework release 22.11 | 2022-11-30 ############################################## diff --git a/doc/road_map.txt b/doc/road_map.txt index e190d85aff..556e34cc30 100644 --- a/doc/road_map.txt +++ b/doc/road_map.txt @@ -14,82 +14,90 @@ The road map is not fixed. If there is commercial interest of pushing the Genode technology to a certain direction, we are willing to revisit our plans. -Review of 2021 +Review of 2022 ############## -Genode's year 2021 was defined by three extremely challenging lines of work. +The two main topics of 2022 went hand in hand. First, we reimagined Genode's +driver landscape across x86 and ARM, universally adopting a new method of +reusing Linux drivers to great success, and rigidly applying the framework's +security architecture to driver components. This effort unlocked the second +major achievement, namely the use of Genode as mobile OS on the PinePhone. -First, we conquered the territory of GPU support that was ridden with -uncertainties and seemed almost impenetrable when we started. But at the end -of the year, our custom Intel-GPU multiplexer has landed in Sculpt OS like it -always belonged there. In tandem with the Intel-GPU work, we explored the -Vivante GPU as a representative of an ARM platform. The work required a deep -dive into the respective GPU architectures and the Mesa software stack. It -eventually led us to the design of Genode's device-agnostic GPU interfaces. +Following the introduction of Genode's rigid driver architecture on ARM +platforms in 2021, we took the year 2022 as opportunity to consistently +establish this architecture across all platforms. +We conquered the convoluted world of x86 in greater depth than ever before, +leaving almost no stone unturned. On top of the new architecture, we built an +arsenal of fresh driver components, most of them based on our Linux +device-driver environment. Other drivers had been written from scratch +specifically for Genode, most prominently our custom Intel GPU multiplexer +that covers recent hardware generations like Intel Alderlake and Tigerlake. -The second line of work was concerned with the reuse of Linux drivers as -Genode components. Over the year, the puzzle pieces of our new Linux -device-driver environment come together, replacing former confusion and chaos -with knowledge and order, ultimately uncovering the treasure of Linux drivers -for Genode with very little friction. On the way, we created new methodology -and tooling, as well as extensive documentation in the form of the "Genode -Platforms" document. Thanks to the new drivers ported from the Linux kernel, -we were able to witness interactive Genode scenarios becoming alive on the -PinePhone by the end of the year. +Our intense engagement with the PinePhone was driven by the vision of a +Genode-based smartphone. It entailed the enablement of device hardware ranging +from touch screen, over power management, audio, storage, telephony, camera, +GPU, to mobile-data connectivity. The challenge of getting the hardware to +cooperate was met by the challenge of enabling meaningful application +workloads. The ability to run the Chromium-based morph browser directly on +Genode on the PinePhone is certainly the most prolific result. Moreover, we +haven't merely managed to get it to work, but we gained detailed guidance +material ([https://genode.org/documentation/genode-platforms-22-05.pdf - PDF]) +along the way, lowering the barrier of entry for others who wish to port +Genode to further mobile platforms in the future. -The third major topic was the growing sophistication of Genode-native -workloads, with the media features of the Chromium-based browser on 64-bit ARM -being the most impressive example. Apart from the apparent functional benefits -for Genode and Sculpt OS, this is the long outstanding validation of some bold -design decisions we took years ago, in particular the role and architecture of -the VFS and its interplay with the libc. - -When reviewing the road map for 2021, some items remained uncovered. In -particular the seL4-related topics became stale. At the end of 2020 - when we -assembled the road map for the past year - there was a tangible prospect of -pursuing this topic as funded work. However, those plans were repeatedly -deferred and remained uncertain. Also, there are some items that have seen -healthy doses of progress - like the topics related to Ada/SPARK or Goa - but -received less attention than anticipated. On the other hand, the four releases -([https://genode.org/documentation/release-notes/21.02 - 21.02], -[https://genode.org/documentation/release-notes/21.05 - 21.05], -[https://genode.org/documentation/release-notes/21.08 - 21.08], -[https://genode.org/documentation/release-notes/21.11 - 21.11]) -of 2021 covered quite a few topics not advertised at the road -map, e.g., webcam support, Xilinx Zynq, or RISC-V. - -It is fair to say that the level of technical risks we took in 2021 had been -unprecedented in Genode's development history. We are more than proud of the -outcome, which will hopefully propel Genode to new heights in 2022. +Besides these two main lines of development, 2022 was packed with further +intriguing topics as well. To name a few, we combined Genode with FPGAs for +new hardware-software co-design opportunities, enabled the use of +WireGuard-based virtual private networks, experimented with hardware security +modules, and explored suspend/resume functionality on PC hardware. +The [https://genode.org/documentation/release-notes/index - documentation] of +the four releases of 2022 presents the whole picture. -2022 - Mobile Usability -####################### +2023 - Rocking the platforms we support! +######################################## -After having enabled the first interactive Genode scenarios on the PinePhone -last year, we plan to take Genode on the PinePhone to a level where we can -routinely use it for advanced applications, in particular video chat. This -vision confronts us with a multitude of hard technical nuts to crack such as -power efficiency, UI latency, quality-of-service of audio processing, drivers -for multi-media devices, WebRTC performance, and usability. This grand theme -will not only address the PinePhone specifically. The efficiency gains will -benefit all Genode use cases large and small. +Genode has already come a long way to support a variety of device form factors +ranging from the embedded appliances, over the PinePhone, to PC hardware. +With the term "support", we used to refer to the principle use of fundamental +platform features like storage, networking, display, audio, or USB. The needs +of most real-world scenarios, however, go beyond those functional basics. +Think of suspend/resume, quick boot times, the deliberate management of +energy-efficient versus high-performance CPU cores, prolonged standby, +bounded audio latency, scaling down (towards microcontrollers), and +scaling up (towards edge-computing platforms). -Our theme of the Genode-based video chat on the PinePhone fuels several -ambitions in closely related areas. In particular, we aspire using WireGuard -to secure private communication, and experiment with the operation of -hardware-based trust anchors as the basis for encrypted storage and -communication. +In 2023, we are going to move from making things work to making things rock! -Besides the PinePhone, we will steadily nurture the quality and scope of -driver support on PC hardware, which remains the primary platform for the -day-to-day use of Sculpt OS. So you can expect us to keep up with recent -generations of Intel-based hardware. In this area, we plan to make IOMMU -support available with kernels beyond NOVA, and explore the use of -power-management features like suspend-resume with Sculpt OS. +Specifically, to rock the PinePhone, we will invite the community to +participate in multiple rounds of field tests, allowing us to enable and +refine advanced features, like prolonged standby, in an iterative way. + +Regarding the PC, we aim at leveraging the different power characteristics +of CPU cores found in modern Intel platforms, step up our game regarding GPU +support (peeking at Vulkan), and making suspend/resume a regular feature that +just works. + +These efforts will be flanked by continuous architectural work that will make +the framework ever cleaner and leaner, e.g., by reducing the reliance on +complex C++ features like exceptions, and continuously simplifying the +framework fundamentals and interfaces. On our mission to attain least +complexity of the base system, we strive to host the fully featured PC version +of Sculpt OS on Genode's custom-tailored microkernel by the end of the year. + +In addition to the overarching theme outlined above, the following additional +topics stood out during our yearly brainstorming session on the mailing list. +First, several developers expressed their curiosity in working on AMD graphics +(display and GPU) as a side activity. A second recurring topic was the +usability of Genode as desktop OS, easing the work with files on Sculpt, +supporting Drag'n'Drop, tightening the work-flow integration of app-VMs +using the light-weight Seoul VMM, or the use of Qemu on top of Genode for +cross development. +Even though those topics are absent from the timeline below, we can expect +improvements in these areas throughout the year. -Milestones for 2022 +Milestones for 2023 ################### In the following, we present a rough schedule of the planned work. As usual, @@ -97,45 +105,73 @@ it is not set in stone. If you are interested in a particular line of work, please get in touch. -February - Release 22.02 +February - Release 23.02 ======================== -* OpenGL in VirtualBox 6 -* Sculpt OS as tool kit for special-purpose OS images -* PinePhone - * Modem access - * Touch-screen compatibility of Sculpt OS +* Mobile version of Sculpt OS (PinePhone) + * Ready-to-use system image for first field test + * Quick switch between different system scenarios as presets + * On-target system update + * Boot optimization +* Goa support for porting 3rd-party libraries to Genode +* Improved I/O performance (Intel GPU buffer management, VFS I/O batching, + TCP throughput) +* Custom IP block for DMA protection on Xilinx Zynq +* PC suspend/resume mechanism for the base-hw kernel +* Optimized base-hw multimedia support (kernel scheduling, latency) +* Completed driver support for MNT Reform 2 laptop (i.e., Wifi) +* Interactive graphical VMs on ARM -May - Release 22.05 +May - Release 23.05 =================== -* Annual update of the "Genode Foundations" book -* Second edition of the "Genode Platforms" documentation -* WireGuard VPN -* Updated drivers for PC hardware (Wifi, Intel framebuffer, USB) -* New tracing tool with support for CTF and PCAP -* PinePhone telephony +* Updated "Genode Foundations" book +* Tool-chain update, switch to C++20 by default +* Mobile version of Sculpt OS (PinePhone) + * First system image fit for general use + * Reuse of an existing SDK for building applications + * Integration of file vault and WireGuard + * Prolonged standby mode + * Easy installation of user-supplied applications + * Wifi +* Principle x86 virtualization support for base-hw kernel (on Qemu) +* Base-hw kernel support for the tracing of scheduling events +* Updated DDE-Linux based driver for USB HID and USB network +* Replacing iPXE network driver by DDE-Linux-based driver +* Revision of the consistent block encrypter (CBE) + usability improvements +* Goa support for building simple Rust programs for Genode -August - Release 22.08 +August - Release 23.08 ====================== -* PinePhone - * Morph browser - * Media record and playback capabilities -* FPGA-powered DMA protection for the Zynq-7000 SoC -* Kernel-agnostic IOMMU support for PC hardware -* Optimized GUI latency and synchronization +* Improved PC platform support + * Pre-boot ACPI discovery, sandboxing of ACPICA + * Device & driver restart and/or resume support after ACPI wakeup + * Support for I2C based HID devices in Intel GEN12 (e.g., touchpad) + * Management of efficient/performance cores on Intel GEN12 +* Mobile version of Sculpt OS (PinePhone) + * File-management functionality + * Support for receiving and sending SMS messages +* User-level IPv6 routing (using IPv6 by VMs) +* VirtualBox on Intel hardware running on the base-hw kernel +* DDE-Linux update to kernel version 6.x +* System wind-down protocol (component life-cycle management) +* Exemplary port of non-trivial Rust-based application using Goa +* Revival of GDB monitor (update, making it easier to use) -November - Release 22.11 +November - Release 23.11 ======================== -* PinePhone - * WebRTC-based video chat - * Power management -* Base mechanism for suspend-resume on PC hardware -* Support for hardware-based trust anchor for CBE and WireGuard -* Software-hardware co-design example for the Zynq-7000 SoC +* Feature-complete PC version of Sculpt OS on the base-hw kernel + * IOMMU handled in platform driver +* Suspend/resume for Sculpt OS on the PC +* Mobile version of Sculpt OS (PinePhone) + * GPS, compass + * Open-street-map client +* IPv6 protocol stack (lxIP update, using IPv6 by native applications) +* Revised audio (timing robustness, pluggable drivers, sample-rate conversion) +* Dynamic VFS configuration From 515854a19f9ac3070d254bbac540b05d32fb152e Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Tue, 17 Jan 2023 15:03:22 +0100 Subject: [PATCH 0204/1921] tool/depot: adapt to .NOPARALLEL changes in GNU make 4.4 The semantic of .NOPARALLEL has changed in GNU Make 4.4 Quote: New feature: .NOTPARALLEL accepts prerequisites If the .NOTPARALLEL special target has prerequisites then all prerequisites of those targets will be run serially (as if .WAIT was specified between each prerequisite). This means that only prerequisites are made sequential. Before everything within a Makefile would be done in sequential order. Therefore, we had to add the *.hash target (appears multiple times) to the .NOPARALLEL prerequisites. issue #4725 --- tool/depot/mk/extract_content.inc | 2 +- tool/depot/mk/extract_pkg_archive | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tool/depot/mk/extract_content.inc b/tool/depot/mk/extract_content.inc index 002930c6e0..918f5c9d9a 100644 --- a/tool/depot/mk/extract_content.inc +++ b/tool/depot/mk/extract_content.inc @@ -38,7 +38,7 @@ $(TARGET) $(DEPOT_ARCHIVE_DIR)/$(TAG_FILE): checked_content_mk_exists # triggered as soon as the specific tag file appears but before the entire # sub make is finished with populating the archive directory. # -.NOTPARALLEL: $(DEPOT_ARCHIVE_DIR)/$(TAG_FILE) +.NOTPARALLEL: $(DEPOT_ARCHIVE_DIR)/$(TAG_FILE) $(DEPOT_ARCHIVE_DIR).hash # # Assemble archive content by invoking the recipe's content.mk file diff --git a/tool/depot/mk/extract_pkg_archive b/tool/depot/mk/extract_pkg_archive index 75a1b256c6..398beb6a2e 100755 --- a/tool/depot/mk/extract_pkg_archive +++ b/tool/depot/mk/extract_pkg_archive @@ -77,7 +77,7 @@ ifeq ($(filter $(RECIPE_FILES),runtime),runtime) $(VERBOSE)xmllint --noout $(addprefix $(RECIPE_DIR)/,runtime) endif -.NOTPARALLEL: $(DEPOT_ARCHIVE_DIR)/$(TAG_FILE) +.NOTPARALLEL: $(DEPOT_ARCHIVE_DIR)/$(TAG_FILE) $(DEPOT_ARCHIVE_DIR).hash $(DEPOT_ARCHIVE_DIR)/$(TAG_FILE): checked_readme_exists checked_runtime_valid $(VERBOSE)cp $(addprefix $(RECIPE_DIR)/,$(RECIPE_FILES)) $(DEPOT_ARCHIVE_DIR)/ @@ -85,7 +85,7 @@ $(DEPOT_ARCHIVE_DIR)/$(TAG_FILE): checked_readme_exists checked_runtime_valid # # Replace the '_' marker in the 'archives' list with the actual user name # -$(DEPOT_ARCHIVE_DIR)/archives: $(DEPOT_ARCHIVE_DIR).hash $(DEPOT_ARCHIVE_DIR)/_archives +$(DEPOT_ARCHIVE_DIR)/archives: $(DEPOT_ARCHIVE_DIR).hash $(VERBOSE)sed "s/^_/$(USER)/" $(DEPOT_ARCHIVE_DIR)/_archives > $@ $(VERBOSE)rm -f $(DEPOT_ARCHIVE_DIR)/_archives From 17e4e2497f3813a1c98c589fc0fe038059580807 Mon Sep 17 00:00:00 2001 From: Roman Iten Date: Tue, 10 Jan 2023 11:03:21 +0100 Subject: [PATCH 0205/1921] tool/depot: don't overwrite PATH variable Issue #4725 --- tool/depot/mk/categorize_args.inc | 6 +++--- tool/depot/mk/extract_post_dependencies.inc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tool/depot/mk/categorize_args.inc b/tool/depot/mk/categorize_args.inc index 24913487d5..50cfeaa87a 100644 --- a/tool/depot/mk/categorize_args.inc +++ b/tool/depot/mk/categorize_args.inc @@ -20,9 +20,9 @@ ARCHIVE_TYPES := api src raw bin pkg # # -categorize_archives = $(foreach PATH,$(ARCHIVE_PATHS),\ - $(if $(call archive_has_type,$(PATH),$1),\ - $(eval ARCHIVES($1) += $(PATH)))) +categorize_archives = $(foreach A,$(ARCHIVE_PATHS),\ + $(if $(call archive_has_type,$A,$1),\ + $(eval ARCHIVES($1) += $A))) $(foreach TYPE,$(ARCHIVE_TYPES),$(call categorize_archives,$(TYPE))) diff --git a/tool/depot/mk/extract_post_dependencies.inc b/tool/depot/mk/extract_post_dependencies.inc index 8c43918687..2eadc8fec1 100644 --- a/tool/depot/mk/extract_post_dependencies.inc +++ b/tool/depot/mk/extract_post_dependencies.inc @@ -13,8 +13,8 @@ # $(foreach TYPE,api src raw pkg,\ - $(foreach PATH,${ARCHIVES(${TYPE})},\ - $(eval ARCHIVE_VERSION(${PATH}) := $(call archive_curr_version,$(PATH))))) + $(foreach A,${ARCHIVES(${TYPE})},\ + $(eval ARCHIVE_VERSION($A) := $(call archive_curr_version,$A)))) archive_exists_in_depot = $(wildcard $(DEPOT_DIR)/$1) From 845694bc44573a8af0ce55fbdaa20cf779f3ee5d Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 16 Jan 2023 14:36:16 +0100 Subject: [PATCH 0206/1921] nic_router: fix updating UDP/TCP links This fixes a bug that was introduced by this earlier commit: "nic_router: find forward rules w/o exceptions" The NIC router used to falsely dissolve TCP/UDP connection states when reconfiguring although the connection states were still legal according to the new config. The reason was that the above mention commit nested lambdas but missed to return from the last nesting level when having found a configuration that legitimates the connection state. Ref #4728 --- repos/os/src/server/nic_router/interface.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repos/os/src/server/nic_router/interface.cc b/repos/os/src/server/nic_router/interface.cc index e4d3f668b7..4bf725fc03 100644 --- a/repos/os/src/server/nic_router/interface.cc +++ b/repos/os/src/server/nic_router/interface.cc @@ -1989,6 +1989,7 @@ void Interface::_update_udp_tcp_links(L3_protocol prot, try { /* try to find forward rule that matches the server port */ + bool done { false }; _forward_rules(cln_dom, prot).find_by_port( link.client().dst_port(), [&] /* handle_match */ (Forward_rule const &rule) @@ -2026,7 +2027,6 @@ void Interface::_update_udp_tcp_links(L3_protocol prot, [&] /* handle_no_match */ () { try { /* try to find transport rule that matches the server IP */ - bool done { false }; _transport_rules(cln_dom, prot).find_best_match( link.client().dst_ip(), link.client().dst_port(), @@ -2048,6 +2048,9 @@ void Interface::_update_udp_tcp_links(L3_protocol prot, catch (Dismiss_link) { } } ); + if (done) { + return; + } } catch (Dismiss_link) { } destroy_link(link); From eba22b75514f0f74e03a8f99da147b776e6de526 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Tue, 17 Jan 2023 11:13:46 +0100 Subject: [PATCH 0207/1921] nic_router: rework updating of TCP/UDP links * Update links from forward rules only with forward rules and links from transport-routing rules only with transport-routing rules. Besides raising the performance of the code, this also fixes a former bug that allowed forward-rule links to falsely stay active because of a transport-routing rule that matched the client destination ip and port. * Don't use good-case exceptions for updating TCP/UDP links on re-configuration of the router. * Make conditions when to dismiss a forward rule easier to read. * Introduces != operator to the public Port class in the net library. * Fix unnecessary log message that a link was dismissed when only a potentially matching forward rule turned out to be not matching. * Apply Genode coding style to if statements with a single body statement. Fix #4728 --- repos/os/include/net/port.h | 1 + repos/os/src/server/nic_router/interface.cc | 223 +++++++++----------- repos/os/src/server/nic_router/interface.h | 11 +- repos/os/src/server/nic_router/link.h | 12 +- 4 files changed, 107 insertions(+), 140 deletions(-) diff --git a/repos/os/include/net/port.h b/repos/os/include/net/port.h index 91b5ad17c9..b97ed011a9 100644 --- a/repos/os/include/net/port.h +++ b/repos/os/include/net/port.h @@ -35,6 +35,7 @@ struct Net::Port explicit Port(Genode::uint16_t const value) : value(value) { } bool operator == (Port const &other) const { return value == other.value; } + bool operator != (Port const &other) const { return value != other.value; } void print(Genode::Output &out) const { Genode::print(out, value); } } diff --git a/repos/os/src/server/nic_router/interface.cc b/repos/os/src/server/nic_router/interface.cc index 4bf725fc03..826b5c080b 100644 --- a/repos/os/src/server/nic_router/interface.cc +++ b/repos/os/src/server/nic_router/interface.cc @@ -1920,65 +1920,55 @@ Interface::Interface(Genode::Entrypoint &ep, } -void Interface::_dismiss_link_log(Link &link, - char const *reason) +void Interface::_dismiss_link(Link &link) { - if (!_config().verbose()) { - return; + if (_config().verbose()) { + log("[", link.client().domain(), "] dismiss link client: ", link.client()); + log("[", link.server().domain(), "] dismiss link server: ", link.server()); } - log("[", link.client().domain(), "] dismiss link client: ", link.client(), " (", reason, ")"); - log("[", link.server().domain(), "] dismiss link server: ", link.server(), " (", reason, ")"); + destroy_link(link); } -void Interface::_update_link_check_nat(Link &link, - Domain &new_srv_dom, - L3_protocol prot, - Domain &cln_dom) +bool Interface::_try_update_link(Link &link, + Domain &new_srv_dom, + L3_protocol prot, + Domain &cln_dom) { - /* if server domain or its IP config changed, dismiss link */ - Domain &old_srv_dom = link.server().domain(); + Domain &old_srv_dom { link.server().domain() }; if (old_srv_dom.name() != new_srv_dom.name() || old_srv_dom.ip_config() != new_srv_dom.ip_config()) - { - _dismiss_link_log(link, "rule targets other domain"); - throw Dismiss_link(); - } - Pointer remote_port_alloc_ptr; - if (link.client().src_ip() == link.server().dst_ip()) { - link.handle_config(cln_dom, new_srv_dom, remote_port_alloc_ptr, _config()); - return; - } - try { - if (link.server().dst_ip() != new_srv_dom.ip_config().interface().address) { - _dismiss_link_log(link, "NAT IP"); - throw Dismiss_link(); - } - bool done { false }; - new_srv_dom.nat_rules().find_by_domain( - cln_dom, - [&] /* handle_match */ (Nat_rule &nat) - { - Port_allocator_guard &remote_port_alloc = nat.port_alloc(prot); - remote_port_alloc.alloc(link.server().dst_port()); - remote_port_alloc_ptr = remote_port_alloc; - link.handle_config( - cln_dom, new_srv_dom, remote_port_alloc_ptr, _config()); + return false; - done = true; - }, - [&] /* handle_no_match */ () - { - _dismiss_link_log(link, "no NAT rule"); - } - ); - if (done) { - return; - } + if (link.client().src_ip() == link.server().dst_ip()) { + + link.handle_config( + cln_dom, new_srv_dom, Pointer { }, + _config()); + + return true; } - catch (Port_allocator::Allocation_conflict) { _dismiss_link_log(link, "no NAT-port"); } - catch (Port_allocator_guard::Out_of_indices) { _dismiss_link_log(link, "no NAT-port quota"); } - throw Dismiss_link(); + if (link.server().dst_ip() != new_srv_dom.ip_config().interface().address) + return false; + + bool keep_link { false }; + new_srv_dom.nat_rules().find_by_domain( + cln_dom, + [&] /* handle_match */ (Nat_rule &nat) + { + Port_allocator_guard &remote_port_alloc { nat.port_alloc(prot) }; + try { remote_port_alloc.alloc(link.server().dst_port()); } + catch (Port_allocator::Allocation_conflict) { return; } + catch (Port_allocator_guard::Out_of_indices) { return; } + + link.handle_config( + cln_dom, new_srv_dom, remote_port_alloc, _config()); + + keep_link = true; + }, + [&] /* handle_no_match */ () { } + ); + return keep_link; } @@ -1987,101 +1977,76 @@ void Interface::_update_udp_tcp_links(L3_protocol prot, { links(prot).for_each([&] (Link &link) { - try { - /* try to find forward rule that matches the server port */ - bool done { false }; + bool link_has_been_updated { false }; + + if (link.server().src_ip() != link.client().dst_ip()) { + _forward_rules(cln_dom, prot).find_by_port( link.client().dst_port(), [&] /* handle_match */ (Forward_rule const &rule) { - /* if destination IP of forwarding changed, dismiss link */ - if (rule.to_ip() != link.server().src_ip()) { - _dismiss_link_log(link, "other forward-rule to"); - throw Dismiss_link(); - } - /* - * If destination port of forwarding was set and then was - * modified or unset, dismiss link - */ - if (!(link.server().src_port() == link.client().dst_port())) { - if (!(rule.to_port() == link.server().src_port())) { - _dismiss_link_log(link, "other forward-rule to_port"); - throw Dismiss_link(); - } - } - /* - * If destination port of forwarding was not set and then was - * set, dismiss link - */ - else { - if (!(rule.to_port() == link.server().src_port()) && - !(rule.to_port() == Port(0))) - { - _dismiss_link_log(link, "new forward-rule to_port"); - throw Dismiss_link(); - } - } - _update_link_check_nat(link, rule.domain(), prot, cln_dom); - return; - }, - [&] /* handle_no_match */ () { - try { - /* try to find transport rule that matches the server IP */ - _transport_rules(cln_dom, prot).find_best_match( - link.client().dst_ip(), - link.client().dst_port(), - [&] /* handle_match */ (Transport_rule const &, - Permit_rule const &permit_rule) - { - _update_link_check_nat(link, permit_rule.domain(), prot, cln_dom); - done = true; - }, - [&] /* handle_no_match */ () - { - _dismiss_link_log(link, "no matching transport/permit/forward rule"); - } - ); - if (done) { + if (rule.to_ip() != link.server().src_ip()) + return; + + if (rule.to_port() == Port { 0 }) { + + if (link.server().src_port() != + link.client().dst_port()) + return; + + } else { + + if (rule.to_port() != link.server().src_port()) return; - } } - catch (Dismiss_link) { } - } + link_has_been_updated = + _try_update_link(link, rule.domain(), prot, cln_dom); + }, + [&] /* handle_no_match */ () { } + ); + + } else { + + _transport_rules(cln_dom, prot).find_best_match( + link.client().dst_ip(), + link.client().dst_port(), + [&] /* handle_match */ (Transport_rule const &, + Permit_rule const &rule) + { + link_has_been_updated = + _try_update_link(link, rule.domain(), prot, cln_dom); + }, + [&] /* handle_no_match */ () { } ); - if (done) { - return; - } } - catch (Dismiss_link) { } - destroy_link(link); + if (link_has_been_updated) + return; + + _dismiss_link(link); }); } void Interface::_update_icmp_links(Domain &cln_dom) { - L3_protocol const prot = L3_protocol::ICMP; + L3_protocol const prot { L3_protocol::ICMP }; links(prot).for_each([&] (Link &link) { - try { - bool done { false }; - cln_dom.icmp_rules().find_longest_prefix_match( - link.client().dst_ip(), - [&] /* handle_match */ (Ip_rule const &rule) - { - _update_link_check_nat(link, rule.domain(), prot, cln_dom); - done = true; - }, - [&] /* handle_no_match */ () - { - _dismiss_link_log(link, "no ICMP rule"); - } - ); - if (done) { - return; - } - } - catch (Dismiss_link) { } - destroy_link(link); + + bool link_has_been_updated { false }; + + cln_dom.icmp_rules().find_longest_prefix_match( + link.client().dst_ip(), + [&] /* handle_match */ (Ip_rule const &rule) + { + link_has_been_updated = + _try_update_link(link, rule.domain(), prot, cln_dom); + }, + [&] /* handle_no_match */ () { } + ); + if (link_has_been_updated) + return; + + _dismiss_link(link); }); } diff --git a/repos/os/src/server/nic_router/interface.h b/repos/os/src/server/nic_router/interface.h index 00c22c36fb..99da02c662 100644 --- a/repos/os/src/server/nic_router/interface.h +++ b/repos/os/src/server/nic_router/interface.h @@ -331,13 +331,12 @@ class Net::Interface : private Interface_list::Element void _update_icmp_links(Domain &cln_dom); - void _update_link_check_nat(Link &link, - Domain &new_srv_dom, - L3_protocol prot, - Domain &cln_dom); + bool _try_update_link(Link &link, + Domain &new_srv_dom, + L3_protocol prot, + Domain &cln_dom); - void _dismiss_link_log(Link &link, - char const *reason); + void _dismiss_link(Link &link); void _update_domain_object(Domain &new_domain); diff --git a/repos/os/src/server/nic_router/link.h b/repos/os/src/server/nic_router/link.h index 722fcf93d2..1a999165f0 100644 --- a/repos/os/src/server/nic_router/link.h +++ b/repos/os/src/server/nic_router/link.h @@ -236,11 +236,13 @@ class Net::Link : public Link_list::Element ** Accessors ** ***************/ - Link_side &client() { return _client; } - Link_side &server() { return _server; } - Configuration &config() { return _config(); } - L3_protocol protocol() const { return _protocol; } - Interface &client_interface() { return _client_interface; }; + Link_side &client() { return _client; } + Link_side const &client() const { return _client; } + Link_side &server() { return _server; } + Link_side const &server() const { return _server; } + Configuration &config() { return _config(); } + L3_protocol protocol() const { return _protocol; } + Interface &client_interface() { return _client_interface; }; }; From 41ebf3bd94e5ccf9bacc7b0c42bd5724cbb8350b Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 18 Jan 2023 16:56:28 +0100 Subject: [PATCH 0208/1921] run: remove argument from 'run_image' function The argument is superfluous because only run/image/uboot evaluated it anyway, and the argument is always boot/image.elf. With this change, the official semantics of run_image become: "replace the boot/image.elf file by platform-specific file(s) at boot/ that can actually be booted". Issue #4730 --- tool/run/boot_dir/foc | 2 +- tool/run/boot_dir/hw | 2 +- tool/run/boot_dir/sel4 | 2 +- tool/run/image/disk | 2 +- tool/run/image/iso | 2 +- tool/run/image/uboot | 6 +++--- tool/run/image/uefi | 2 +- tool/run/run | 8 ++++++-- 8 files changed, 15 insertions(+), 11 deletions(-) diff --git a/tool/run/boot_dir/foc b/tool/run/boot_dir/foc index e8a7673b59..eb2cb1746c 100644 --- a/tool/run/boot_dir/foc +++ b/tool/run/boot_dir/foc @@ -187,7 +187,7 @@ proc run_boot_dir_arm { binaries } { exec mkdir -p [run_dir]/boot exec mv [run_dir]/image.elf [run_dir]/boot/core.elf exec cp [l4_bin_dir]/bootstrap.elf [run_dir]/boot/image.elf - run_image [run_dir]/boot/image.elf + run_image puts "\nboot image: [run_dir]/image.elf\n" diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 0768a115cf..1adafa99dd 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -143,7 +143,7 @@ proc run_boot_dir {binaries} { close $fh } - run_image [run_dir]/boot/image.elf + run_image # install image.elf file in TFTP directory for PXE boot if {[expr [have_spec arm] || [have_spec arm_64]] && [have_include "load/tftp"]} { diff --git a/tool/run/boot_dir/sel4 b/tool/run/boot_dir/sel4 index 2787eeb701..4a627131a7 100644 --- a/tool/run/boot_dir/sel4 +++ b/tool/run/boot_dir/sel4 @@ -117,7 +117,7 @@ proc run_boot_dir {binaries} { exec [sel4_elfloader_dir]/gen_boot_image.sh [pwd]/[run_dir]/boot/kernel.elf [pwd]/[run_dir]/boot/genode.elf [pwd]/[run_dir]/boot/image.elf } - run_image [run_dir]/boot/image.elf + run_image # install image.elf file in TFTP directory for PXE boot if {[have_spec arm] && [have_include "load/tftp"]} { diff --git a/tool/run/image/disk b/tool/run/image/disk index 59245d05be..3bbe605ef7 100644 --- a/tool/run/image/disk +++ b/tool/run/image/disk @@ -13,7 +13,7 @@ proc image_disk_size { } { return [get_cmd_arg --image-disk-size 0] } ## # Create disk image with the content of the run directory # -proc run_image { {unused ""} } { +proc run_image { } { set sgdisk [installed_command sgdisk] diff --git a/tool/run/image/iso b/tool/run/image/iso index d0578420fa..44e628fb63 100644 --- a/tool/run/image/iso +++ b/tool/run/image/iso @@ -4,7 +4,7 @@ source [genode_dir]/tool/run/iso.inc ## # Create ISO image with the content of the run directory # -proc run_image { {unused ""} } { +proc run_image { } { puts "creating ISO image..." exec rm -f "[run_dir].iso" diff --git a/tool/run/image/uboot b/tool/run/image/uboot index abc3bf8b0a..7b5248cb4d 100644 --- a/tool/run/image/uboot +++ b/tool/run/image/uboot @@ -35,9 +35,9 @@ proc image_uboot_gzip_opt { } { ## # Build U-boot bootloader specific uImage # -# \param elf_img ELF binary to build uImage from -# -proc run_image {elf_img} { +proc run_image { } { + + set elf_img [file join [run_dir] boot image.elf] # parse ELF entrypoint and load address set entrypoint [exec [cross_dev_prefix]readelf -h $elf_img | \ diff --git a/tool/run/image/uefi b/tool/run/image/uefi index 7b50883558..827a386e52 100644 --- a/tool/run/image/uefi +++ b/tool/run/image/uefi @@ -12,7 +12,7 @@ proc image_uefi_size { } { return [get_cmd_arg --image-uefi_size 0] } ## # Create uefi image # -proc run_image { {unused ""} } { +proc run_image { } { set run_size [expr [regsub {\s.*} [exec du -smL [run_dir]] {}]] diff --git a/tool/run/run b/tool/run/run index 93a4e81690..897eac74fb 100755 --- a/tool/run/run +++ b/tool/run/run @@ -834,9 +834,13 @@ proc run_boot_dir { binaries } { ## -# Dummy image build module +# Bring the boot-directory content into a form that can actually be booted # -proc run_image { {image "" } } { return true; } +# The form suitable for booting depends on the platform and the used boot +# loader. By convention, this function can expect the presence of the boot +# image in the form of an [run_dir]/boot/image.elf file. +# +proc run_image { } { return true; } ## From 5f0ba7d722b5cc57294678e5a86256e8dcc2917d Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 6 Jan 2023 15:15:04 +0100 Subject: [PATCH 0209/1921] intel_fb: handle rapid config change gracefully In case of very rapid config ROM change (<300ms), the linux driver may still be in progress of applying the previous change (e.g. switching connector on/off). During this progress all tasks may become not runnable (waiting for IRQ/timeouts until hardware state settles), the newest config ROM change/signal gets dispatched, which lead to continuing the previous change request, but not to re-starting/re-applying the new config change. To avoid this situation, explicitly track whether a previous config change was finished and track if an interim config change request came in. If so, re-start the lx_user task with the newest config change. Fixes #4721 --- .../drivers/framebuffer/intel/pc/lx_i915.h | 1 + .../drivers/framebuffer/intel/pc/lx_user.c | 3 ++- .../src/drivers/framebuffer/intel/pc/main.cc | 26 +++++++++++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_i915.h b/repos/pc/src/drivers/framebuffer/intel/pc/lx_i915.h index 1eef0726a3..3b67e0338e 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_i915.h +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_i915.h @@ -35,5 +35,6 @@ void lx_emul_i915_report_connector(void * lx_data, void * genode_xml, void lx_emul_i915_iterate_modes(void *lx_data, void * genode_data); void lx_emul_i915_report_modes(void * genode_xml, struct genode_mode *); void lx_emul_i915_connector_config(char * name, struct genode_mode *); +int lx_emul_i915_config_done_and_block(void); #endif /* _LX_I915_H_ */ diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_user.c b/repos/pc/src/drivers/framebuffer/intel/pc/lx_user.c index bbd7fdf984..48dea81997 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_user.c +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_user.c @@ -397,7 +397,8 @@ static int configure_connectors(void * data) retry_count = 0; - lx_emul_task_schedule(true); + if (lx_emul_i915_config_done_and_block()) + lx_emul_task_schedule(true /* block task */); } return 0; diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/main.cc b/repos/pc/src/drivers/framebuffer/intel/pc/main.cc index 154a925269..91c33068e1 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/main.cc +++ b/repos/pc/src/drivers/framebuffer/intel/pc/main.cc @@ -53,6 +53,9 @@ struct Framebuffer::Driver Signal_handler timer_handler { env.ep(), *this, &Driver::handle_timer }; + bool update_in_progress { false }; + bool new_config_rom { false }; + class Fb { private: @@ -148,6 +151,11 @@ void Framebuffer::Driver::config_update() if (!config.valid() || !lx_user_task) return; + if (update_in_progress) + new_config_rom = true; + else + update_in_progress = true; + lx_emul_task_unblock(lx_user_task); Lx_kit::env().scheduler.schedule(); } @@ -178,6 +186,8 @@ void Framebuffer::Driver::generate_report(void *lx_data) { lx_emul_i915_report(lx_data, &xml); }); + + driver(Lx_kit::env().env).report_updated(); } catch (...) { Genode::warning("Failed to generate report"); } @@ -288,8 +298,6 @@ void lx_emul_i915_report_connector(void * lx_data, void * genode_xml, lx_emul_i915_iterate_modes(lx_data, &xml); }); - - driver(Lx_kit::env().env).report_updated(); } @@ -323,6 +331,20 @@ void lx_emul_i915_connector_config(char * name, struct genode_mode * mode) } +int lx_emul_i915_config_done_and_block(void) +{ + auto &state = driver(Lx_kit::env().env); + + bool const new_config = state.new_config_rom; + + state.update_in_progress = false; + state.new_config_rom = false; + + /* true if linux task should block, otherwise continue due to new config */ + return !new_config; +} + + void Component::construct(Genode::Env &env) { driver(env).start(); From 41865e6c30f1723c9bec202ef9012552a3b91619 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 18 Jan 2023 09:56:38 +0100 Subject: [PATCH 0210/1921] nova: avoid oom fault on cross CPU Fixes #4719 --- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index be5de26a8d..b739154d58 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -0f97cb27225e09d0a053aeafa84e3e77f78beb05 +b78ec113c6237766545cb724c92651bfb7a6efa0 diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index 814a78ea1d..58acc9c26a 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := 1b400b4d48729c6119bf9f2cae7cf857cb3371b7 +REV(nova) := 8c8597736682b2f46647d6d5cea97f98dc21011f DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) From c06f5e2661cf357adf24f162f2f8ae04df3d0658 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 18 Jan 2023 10:03:15 +0100 Subject: [PATCH 0211/1921] nova: flush on iommu context change (intel) Fixes #4717 --- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index b739154d58..69875ea18e 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -b78ec113c6237766545cb724c92651bfb7a6efa0 +55bf35a51a039d4fe420fcc310c4271b615913eb diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index 58acc9c26a..81e04de82c 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := 8c8597736682b2f46647d6d5cea97f98dc21011f +REV(nova) := 953b8d36d909f87d8465e43ab35c22b636d04c87 DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) From a7a5c5ce5448d3833181e4618b26416dfa970ac6 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 18 Jan 2023 17:23:14 +0100 Subject: [PATCH 0212/1921] run/image/uboot: move uImage to boot/ This patch changes the 'run_image' function to replace a boot/image.elf file by the corresponding boot/uImage file. Issue #4730 --- tool/run/boot_dir/foc | 4 +++- tool/run/boot_dir/hw | 8 ++++++-- tool/run/boot_dir/sel4 | 4 +++- tool/run/image/uboot | 8 ++++---- tool/run/load/fastboot | 2 +- 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/tool/run/boot_dir/foc b/tool/run/boot_dir/foc index eb2cb1746c..84f909cf67 100644 --- a/tool/run/boot_dir/foc +++ b/tool/run/boot_dir/foc @@ -199,7 +199,9 @@ proc run_boot_dir_arm { binaries } { exec mkdir -p $tftp_base_dir$tftp_offset_dir exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf $tftp_base_dir$tftp_offset_dir if {[have_include "image/uboot"]} { - exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/uImage $tftp_base_dir$tftp_offset_dir/uImage + exec {*}[load_tftp_inst_cmd] \ + [file join [pwd] [run_dir] boot uImage] \ + [file join $tftp_base_dir$tftp_offset_dir uImage] } } } diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 1adafa99dd..52bf937eaf 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -150,11 +150,15 @@ proc run_boot_dir {binaries} { exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf [load_tftp_base_dir][load_tftp_offset_dir] if {[have_include "image/uboot"]} { - exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/uImage [load_tftp_base_dir][load_tftp_offset_dir] + exec {*}[load_tftp_inst_cmd] \ + [file join [pwd] [run_dir] boot uImage] \ + [load_tftp_base_dir][load_tftp_offset_dir] } if {[have_include "image/uboot_fit"]} { - exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/image.itb [load_tftp_base_dir][load_tftp_offset_dir] + exec {*}[load_tftp_inst_cmd] \ + [file join [pwd] [run_dir] boot image.itb] \ + [load_tftp_base_dir][load_tftp_offset_dir] } } diff --git a/tool/run/boot_dir/sel4 b/tool/run/boot_dir/sel4 index 4a627131a7..f30e3f0c4e 100644 --- a/tool/run/boot_dir/sel4 +++ b/tool/run/boot_dir/sel4 @@ -124,7 +124,9 @@ proc run_boot_dir {binaries} { exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/boot/image.elf [load_tftp_base_dir][load_tftp_offset_dir] if {[have_include "image/uboot"]} { - exec {*}[load_tftp_inst_cmd] [pwd]/[run_dir]/uImage [load_tftp_base_dir][load_tftp_offset_dir] + exec {*}[load_tftp_inst_cmd] \ + [file join [pwd] [run_dir] boot uImage] \ + [file join [load_tftp_base_dir][load_tftp_offset_dir]] } } diff --git a/tool/run/image/uboot b/tool/run/image/uboot index 7b5248cb4d..3eda213c84 100644 --- a/tool/run/image/uboot +++ b/tool/run/image/uboot @@ -47,7 +47,7 @@ proc run_image { } { grep -m 1 "LOAD"] set load_addr [lindex [regexp -inline -all -- {\S+} $load_addr] 3] - set bin_img "[run_dir]/image.bin" + set bin_img [file join [run_dir] boot image.bin] exec [cross_dev_prefix]objcopy -O binary $elf_img $bin_img set use_gzip [expr ![image_uboot_use_no_gzip]] @@ -66,14 +66,14 @@ proc run_image { } { if {[image_uboot_use_fit]} { # create image.itb - set uboot_img [run_dir]/image.itb + set uboot_img [file join [run_dir] boot image.itb] exec mkimage -f auto -A $arch -O linux -T kernel -C $compress_type -a $load_addr \ -e $entrypoint -d $bin_img$bin_ext $uboot_img } else { # create uImage - set uboot_img [run_dir]/uImage + set uboot_img [file join [run_dir] boot uImage] exec mkimage -A $arch -O linux -T kernel -C $compress_type -a $load_addr \ -e $entrypoint -d $bin_img$bin_ext $uboot_img } - exec rm -rf $bin_img$bin_ext + exec rm -rf $bin_img$bin_ext $elf_img } diff --git a/tool/run/load/fastboot b/tool/run/load/fastboot index a2639bf2da..f41d99379a 100644 --- a/tool/run/load/fastboot +++ b/tool/run/load/fastboot @@ -32,7 +32,7 @@ proc run_load { } { } set device [load_fastboot_device] - set uimg "[run_dir]/uImage" + set uimg [file join [run_dir] boot uImage] # sleep a bit, board might need some time to come up sleep 8 From 88becbe29d92424ed7edb0233af6cfce40a2ab0c Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 10 Jan 2023 13:42:47 +0100 Subject: [PATCH 0213/1921] sculpt: integration of optional presets With the new 'presets:' tag, .sculpt files can now refer to deploy configurations to be integrated in the presets/ subdirectory of the config file system. Those files can thereby be used as preconfigured system scenarios. Such a preconfigured scenario can be loaded at runtime by copying the preset file to config/deploy. Issue #4731 --- repos/gems/run/sculpt.run | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index c8ddbe5109..0996d4abd9 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -656,6 +656,9 @@ install_config { foreach subdir { launcher depot managed keyboard } { file mkdir [file join [initial_config_dir] $subdir] } +if {[llength [ingredients_of_type presets]] > 0} { + file mkdir [file join [initial_config_dir] presets] } + # configs that are managed by the sculpt manager if absent set optional_configs { fonts @@ -696,16 +699,24 @@ foreach config $required_configs { copy_file $from $to } -# selection of depot users (pubkey and download files) and launchers +# selection of depot users (pubkey and download files), launchers, and presets foreach ingredient [ingredients_of_type launcher] { check_xml_syntax [ingredient_path launcher $ingredient] } +foreach ingredient [ingredients_of_type presets] { + check_xml_syntax [ingredient_path deploy $ingredient] } + foreach type { depot launcher } { foreach ingredient [ingredients_of_type $type] { set from [ingredient_path $type $ingredient] set to [file join [initial_config_dir] $type $ingredient] file copy $from $to } } +foreach ingredient [ingredients_of_type presets] { + set from [ingredient_path deploy $ingredient] + set to [file join [initial_config_dir] presets $ingredient] + file copy $from $to } + copy_file [genode_dir]/repos/gems/recipes/pkg/sculpt/README [initial_config_file README] copy_file [genode_dir]/repos/gems/run/sculpt/vimrc [initial_config_file vimrc] @@ -792,6 +803,12 @@ proc referenced_pkg_values { } { lappend values {*}[pkg_attribute_values $path launcher] } + # scan presets + foreach preset [ingredients_of_type presets] { + set path [file join [initial_config_dir] presets $preset] + lappend values {*}[pkg_attribute_values $path config/start] + } + # scan deploy config lappend values {*}[pkg_attribute_values [initial_config_file deploy] config/start] @@ -863,7 +880,7 @@ proc current_pkg { pkg } { return $pkg/[_current_depot_archive_version pkg $pkg] # # Supplement file with versioned pkg archive paths # -# \path deploy config or launcher to augment +# \path deploy config, or launcher, or preset to augment # \node XML node type containing the 'pkg' attribute to modify # # Each matching XML node is inspected regarding its 'pkg' attribute. If its @@ -884,7 +901,7 @@ proc augment_pkg_versions { path node } { regsub $pattern $content "$head$pkg_path$tail" content } - # write back the filtered launcher snippet + # write back the filtered launcher snippet, deploy config, or preset set fd [open $path w] puts $fd $content close $fd @@ -895,13 +912,21 @@ proc augment_pkg_versions { path node } { foreach launcher [ingredients_of_type launcher] { augment_pkg_versions [file join [initial_config_dir] launcher $launcher] "launcher" } +# presets +foreach preset [ingredients_of_type presets] { + augment_pkg_versions [file join [initial_config_dir] presets $preset] "start" } # deploy config augment_pkg_versions [initial_config_file deploy] "start" +# update arch attribute of deploy config and presets +proc augment_arch_attribute { file } { + exec sed -i "/config/s/arch=\"\"/arch=\"[depot_spec]\"/" $file } -# update arch attribute of deploy config -exec sed -i "/config/s/arch=\"\"/arch=\"[depot_spec]\"/" [initial_config_file deploy] +foreach preset [ingredients_of_type presets] { + augment_arch_attribute [file join [initial_config_dir] presets $preset] } + +augment_arch_attribute [initial_config_file deploy] ## From 114238c248496e0ddf46275b0b86f84343d3c9bb Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 10 Jan 2023 14:35:22 +0100 Subject: [PATCH 0214/1921] sculpt_manager: query presets This patch queries the files at config/presets/ in addition to config/launcher using the existing launcher_query component. Issue #4731 --- repos/gems/src/app/sculpt_manager/main.cc | 26 ++-- .../src/app/sculpt_manager/model/presets.h | 121 ++++++++++++++++++ .../sculpt_manager/runtime/launcher_query.cc | 5 + 3 files changed, 142 insertions(+), 10 deletions(-) create mode 100644 repos/gems/src/app/sculpt_manager/model/presets.h diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index 172631b683..deadc26dad 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -368,21 +369,26 @@ struct Sculpt::Main : Input_event_handler, _env, "report -> /runtime/launcher_query/listing" }; Launchers _launchers { _heap }; + Presets _presets { _heap }; - Signal_handler
_launcher_listing_handler { - _env.ep(), *this, &Main::_handle_launcher_listing }; + Signal_handler
_launcher_and_preset_listing_handler { + _env.ep(), *this, &Main::_handle_launcher_and_preset_listing }; - void _handle_launcher_listing() + void _handle_launcher_and_preset_listing() { _launcher_listing_rom.update(); - Xml_node listing = _launcher_listing_rom.xml(); - if (listing.has_sub_node("dir")) { - Xml_node dir = listing.sub_node("dir"); + Xml_node const listing = _launcher_listing_rom.xml(); + listing.for_each_sub_node("dir", [&] (Xml_node const &dir) { - /* let 'update_from_xml' iterate over nodes */ - _launchers.update_from_xml(dir); - } + Path const dir_path = dir.attribute_value("path", Path()); + + if (dir_path == "/launcher") + _launchers.update_from_xml(dir); /* iterate over nodes */ + + if (dir_path == "/presets") + _presets.update_from_xml(dir); /* iterate over nodes */ + }); _popup_menu_view.generate(); _deploy._handle_managed_deploy(); @@ -1235,7 +1241,7 @@ struct Sculpt::Main : Input_event_handler, _pci_devices .sigh(_pci_devices_handler); _window_list .sigh(_window_list_handler); _decorator_margins .sigh(_decorator_margins_handler); - _launcher_listing_rom.sigh(_launcher_listing_handler); + _launcher_listing_rom.sigh(_launcher_and_preset_listing_handler); _blueprint_rom .sigh(_blueprint_handler); _editor_saved_rom .sigh(_editor_saved_handler); _clicked_rom .sigh(_clicked_handler); diff --git a/repos/gems/src/app/sculpt_manager/model/presets.h b/repos/gems/src/app/sculpt_manager/model/presets.h new file mode 100644 index 0000000000..d5ccbd4f48 --- /dev/null +++ b/repos/gems/src/app/sculpt_manager/model/presets.h @@ -0,0 +1,121 @@ +/* + * \brief Cached information about available deploy presets + * \author Norman Feske + * \date 2022-01-11 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _MODEL__PRESETS_H_ +#define _MODEL__PRESETS_H_ + +/* Genode includes */ +#include +#include + +/* local includes */ +#include + +namespace Sculpt { class Presets; } + + +class Sculpt::Presets : public Noncopyable +{ + public: + + struct Info : Noncopyable + { + using Name = String<64>; + using Text = String<128>; + + Name const name; + Text const text; + + static Text _info_text(Xml_node const &node) + { + Text result { }; + node.with_optional_sub_node("config", [&] (Xml_node const &config) { + result = config.attribute_value("info", Text()); }); + return result; + } + + Info(Xml_node const &node) + : + name(node.attribute_value("name", Path())), + text(_info_text(node)) + { } + }; + + private: + + Allocator &_alloc; + + unsigned _count = 0; + + struct Preset; + + using Dict = Dictionary; + + struct Preset : Dict::Element, List_model::Element + { + Info const info; + + bool matches(Xml_node const &node) const + { + return node.attribute_value("name", Path()) == name; + } + + static bool type_matches(Xml_node const &node) + { + return node.has_type("file"); + } + + Preset(Dict &dict, Xml_node const &node) + : + Dict::Element(dict, node.attribute_value("name", Path())), + info(node) + { } + }; + + Dict _sorted { }; + + List_model _presets { }; + + public: + + Presets(Allocator &alloc) : _alloc(alloc) { } + + void update_from_xml(Xml_node const &presets) + { + update_list_model_from_xml(_presets, presets, + + /* create */ + [&] (Xml_node const &node) -> Preset & { + return *new (_alloc) Preset(_sorted, node); }, + + /* destroy */ + [&] (Preset &e) { destroy(_alloc, &e); }, + + /* update */ + [&] (Preset &, Xml_node) { } + ); + + _count = 0; + _presets.for_each([&] (Preset const &) { _count++; }); + } + + template + void for_each(FN const &fn) const + { + _sorted.for_each([&] (Preset const &preset) { fn(preset.info); }); + } + + bool available() const { return _count > 0; }; +}; + +#endif /* _MODEL__PRESETS_H_ */ diff --git a/repos/gems/src/app/sculpt_manager/runtime/launcher_query.cc b/repos/gems/src/app/sculpt_manager/runtime/launcher_query.cc index 867e6314f7..16ec80401a 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/launcher_query.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/launcher_query.cc @@ -30,6 +30,11 @@ void Sculpt::gen_launcher_query_start_content(Xml_generator &xml) xml.attribute("path", "/launcher"); xml.attribute("content", "yes"); }); + + xml.node("query", [&] () { + xml.attribute("path", "/presets"); + xml.attribute("content", "yes"); + }); }); xml.node("route", [&] () { From d33139c40aa5b93a07fd44b8dafcee735ca4f3e8 Mon Sep 17 00:00:00 2001 From: Tomasz Gajewski Date: Fri, 6 Jan 2023 10:40:26 +0100 Subject: [PATCH 0215/1921] enable ccache for reference Linux kernel Genode build system allows to easily enable 'ccache' for builds. This change allows to enable using 'ccache' also for build of reference Linux kernel used during porting device drivers. To enable 'ccache' it is enough to pass value of 'CC' variable when executing Linux build but this build by default depends on time when it is built which causes 'ccache' misses. To solve this issue additional flags are passed to make build independent from time, current user and host on which build is performed. Issue #4718 --- repos/dde_linux/src/virt_linux/arm_64/target.mk | 4 +++- repos/dde_linux/src/virt_linux/x86_32/target.mk | 4 +++- repos/dde_linux/src/virt_linux/x86_64/target.mk | 4 +++- repos/pc/src/pc_linux/x86_32/target.mk | 4 +++- repos/pc/src/pc_linux/x86_64/target.mk | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/repos/dde_linux/src/virt_linux/arm_64/target.mk b/repos/dde_linux/src/virt_linux/arm_64/target.mk index d1d39ad95c..0fdfa9199a 100644 --- a/repos/dde_linux/src/virt_linux/arm_64/target.mk +++ b/repos/dde_linux/src/virt_linux/arm_64/target.mk @@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony LX_DIR := $(call select_from_ports,linux)/src/linux PWD := $(shell pwd) -LX_MK_ARGS = ARCH=arm64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) +# options for Linux kernel build to not depend on current time, user and host +LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode +LX_MK_ARGS = ARCH=arm64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE) # # Linux kernel configuration diff --git a/repos/dde_linux/src/virt_linux/x86_32/target.mk b/repos/dde_linux/src/virt_linux/x86_32/target.mk index 9428ccc52f..7c0436870e 100644 --- a/repos/dde_linux/src/virt_linux/x86_32/target.mk +++ b/repos/dde_linux/src/virt_linux/x86_32/target.mk @@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony LX_DIR := $(call select_from_ports,linux)/src/linux PWD := $(shell pwd) -LX_MK_ARGS = ARCH=x86 CROSS_COMPILE=$(CROSS_DEV_PREFIX) +# options for Linux kernel build to not depend on current time, user and host +LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode +LX_MK_ARGS = ARCH=x86 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE) # # Linux kernel configuration diff --git a/repos/dde_linux/src/virt_linux/x86_64/target.mk b/repos/dde_linux/src/virt_linux/x86_64/target.mk index 8387212603..c07acd5681 100644 --- a/repos/dde_linux/src/virt_linux/x86_64/target.mk +++ b/repos/dde_linux/src/virt_linux/x86_64/target.mk @@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony LX_DIR := $(call select_from_ports,linux)/src/linux PWD := $(shell pwd) -LX_MK_ARGS = ARCH=x86_64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) +# options for Linux kernel build to not depend on current time, user and host +LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode +LX_MK_ARGS = ARCH=x86_64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE) # # Linux kernel configuration diff --git a/repos/pc/src/pc_linux/x86_32/target.mk b/repos/pc/src/pc_linux/x86_32/target.mk index df1df63e1e..f26c773999 100644 --- a/repos/pc/src/pc_linux/x86_32/target.mk +++ b/repos/pc/src/pc_linux/x86_32/target.mk @@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony LX_DIR := $(call select_from_ports,linux)/src/linux PWD := $(shell pwd) -LX_MK_ARGS = ARCH=x86 CROSS_COMPILE=$(CROSS_DEV_PREFIX) +# options for Linux kernel build to not depend on current time, user and host +LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode +LX_MK_ARGS = ARCH=x86 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE) # # Linux kernel configuration diff --git a/repos/pc/src/pc_linux/x86_64/target.mk b/repos/pc/src/pc_linux/x86_64/target.mk index 399c430628..7e863fd559 100644 --- a/repos/pc/src/pc_linux/x86_64/target.mk +++ b/repos/pc/src/pc_linux/x86_64/target.mk @@ -6,7 +6,9 @@ CUSTOM_TARGET_DEPS := kernel_build.phony LX_DIR := $(call select_from_ports,linux)/src/linux PWD := $(shell pwd) -LX_MK_ARGS = ARCH=x86_64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) +# options for Linux kernel build to not depend on current time, user and host +LX_MK_REPRODUCIBLE = KBUILD_BUILD_TIMESTAMP=no_timestamp KBUILD_BUILD_USER=genode KBUILD_BUILD_HOST=genode +LX_MK_ARGS = ARCH=x86_64 CROSS_COMPILE=$(CROSS_DEV_PREFIX) CC=$(CC) $(LX_MK_REPRODUCIBLE) # # Linux kernel configuration From 437fd21ba00e3407c984d5602b766a3c73caa6d5 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Thu, 19 Jan 2023 15:36:47 +0100 Subject: [PATCH 0216/1921] mk: use _file_content instead of echo | cat Use _file_content function to retrieve port hash instead of 'echo | cat' construct that lead to 'Broken pipe' erros in GNU Make 4.4. issue #4725 --- repos/base/mk/util.inc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/repos/base/mk/util.inc b/repos/base/mk/util.inc index 748c2d6930..c99de8da5c 100644 --- a/repos/base/mk/util.inc +++ b/repos/base/mk/util.inc @@ -20,6 +20,12 @@ $(eval $2 += $1) $1 endef +# +# Utility to read content from a file if it exists and the given file name +# is not empty. +# +_file_content = $(if $(wildcard $1),$(shell cat $1),) + # # Lookup port directory by a given port name # @@ -29,16 +35,13 @@ endef # its contained hash number to construct the path to the corresponding # subdirectory within CONTRIB_DIR. Finally, we check if the path exists. # -# When reading the hash file in the '_hash_of_port' function, we feed stdin -# to 'cat' to prevent 'cat' from blocking if the hash file is missing. -# # As a side effect of calling 'select_from_ports' we log the used hash file # in the 'PORT_HASH_FILES' variable. This enables us incorporate the hash file # as dependency for all object files. # _lookup_port_hash_file = $(wildcard $(addsuffix /ports/$1.hash,$(REPOSITORIES))) _capture_port_hash_file = $(call _capture,$(call _lookup_port_hash_file,$1),PORT_HASH_FILES) -_hash_of_port = $(shell echo | cat $(call _capture_port_hash_file,$1)) +_hash_of_port = $(call _file_content,$(call _capture_port_hash_file,$1)) _port_dir = $(wildcard $(CONTRIB_DIR)/$1-$(call _hash_of_port,$1)) # From 14483f64fdfd829e1f938e22f44dcaeb6004acb1 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 19 Jan 2023 21:56:44 +0100 Subject: [PATCH 0217/1921] qt5: apply fix for QTBUG-83895 Fixes #4732 --- repos/libports/ports/qt5.hash | 2 +- repos/libports/ports/qt5.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/libports/ports/qt5.hash b/repos/libports/ports/qt5.hash index 0bf8538cb2..baf0bb550f 100644 --- a/repos/libports/ports/qt5.hash +++ b/repos/libports/ports/qt5.hash @@ -1 +1 @@ -271cc31b2f7ebc2b62b00a83477688724630805a +485ae506d691184fe66d264b10b9ce6a67e360a5 diff --git a/repos/libports/ports/qt5.port b/repos/libports/ports/qt5.port index 6d495044d4..89dfe816b2 100644 --- a/repos/libports/ports/qt5.port +++ b/repos/libports/ports/qt5.port @@ -4,5 +4,5 @@ VERSION := 5.15.2 DOWNLOADS := qt5.git URL(qt5) := https://github.com/cproc/qt5.git -REV(qt5) := issue4716 +REV(qt5) := issue4732 DIR(qt5) := src/lib/qt5 From ff8f7875f3125c5f304ceff9c8c65a4e8a5c7d37 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Thu, 19 Jan 2023 22:59:56 +0100 Subject: [PATCH 0218/1921] qt5: make physical screen size info configurable Fixes #4733 --- repos/libports/ports/qt5.hash | 2 +- repos/libports/ports/qt5.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/libports/ports/qt5.hash b/repos/libports/ports/qt5.hash index baf0bb550f..954ece4fe1 100644 --- a/repos/libports/ports/qt5.hash +++ b/repos/libports/ports/qt5.hash @@ -1 +1 @@ -485ae506d691184fe66d264b10b9ce6a67e360a5 +bf72b584c821f7b7b47c56b7b450eb4dfeafe806 diff --git a/repos/libports/ports/qt5.port b/repos/libports/ports/qt5.port index 89dfe816b2..55a9370c26 100644 --- a/repos/libports/ports/qt5.port +++ b/repos/libports/ports/qt5.port @@ -4,5 +4,5 @@ VERSION := 5.15.2 DOWNLOADS := qt5.git URL(qt5) := https://github.com/cproc/qt5.git -REV(qt5) := issue4732 +REV(qt5) := issue4733 DIR(qt5) := src/lib/qt5 From ffb8321e571783a0092c3f618007a68744ba5d2b Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 20 Jan 2023 14:02:47 +0100 Subject: [PATCH 0219/1921] sculpt_test.run: add '-boot d' to Qemu args When using '--include image/iso', we want to ensure that the virtual machine boots from CD-ROM. --- repos/gems/run/sculpt_test.run | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repos/gems/run/sculpt_test.run b/repos/gems/run/sculpt_test.run index b3e3268516..d8b964378e 100644 --- a/repos/gems/run/sculpt_test.run +++ b/repos/gems/run/sculpt_test.run @@ -15,6 +15,8 @@ if {![file exists bin/sculpt-ahci.raw]} { append qemu_args " -device ahci,id=ahci " append qemu_args " -drive id=hdd,file=$disk_image,format=raw,if=none -device ide-hd,drive=hdd,bus=ahci.1 " +append_if [have_include image/iso] qemu_args " -boot d " + # attach small NVMe disk to Qemu to experiment with file-system access if {$use_nvme} { set disk_image "bin/sculpt-nvme.raw" From 3561ff90e9da706d76664720ce7efff462483df7 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 20 Jan 2023 15:00:11 +0100 Subject: [PATCH 0220/1921] sculpt_manager: remove unused Storage::dialog This member variable remained unused since we moved the storage dialog into the component graph. --- repos/gems/src/app/sculpt_manager/main.cc | 33 ++++++++------------- repos/gems/src/app/sculpt_manager/storage.h | 5 ---- 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index deadc26dad..e5b4fa502c 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -453,7 +453,7 @@ struct Sculpt::Main : Input_event_handler, /** * Dialog interface */ - Hover_result hover(Xml_node) override; + Hover_result hover(Xml_node) override { return Hover_result::UNMODIFIED; } void reset() override { } @@ -690,7 +690,6 @@ struct Sculpt::Main : Input_event_handler, Input::Seq_number const seq = *_clacked_seq_number; if (_main_menu_view.hovered(seq)) { - _storage.dialog.clack(_storage); _main_menu_view.generate(); _clacked_seq_number.destruct(); } @@ -758,6 +757,11 @@ struct Sculpt::Main : Input_event_handler, void use(Storage_target const &target) override { _storage.use(target); } + void _reset_storage_dialog_operation() + { + _graph.reset_storage_operation(); + } + /* * Storage_dialog::Action interface */ @@ -769,7 +773,7 @@ struct Sculpt::Main : Input_event_handler, void cancel_format(Storage_target const &target) override { _storage.cancel_format(target); - _graph.reset_storage_operation(); + _reset_storage_dialog_operation(); } void expand(Storage_target const &target) override @@ -780,7 +784,7 @@ struct Sculpt::Main : Input_event_handler, void cancel_expand(Storage_target const &target) override { _storage.cancel_expand(target); - _graph.reset_storage_operation(); + _reset_storage_dialog_operation(); } void check(Storage_target const &target) override @@ -1585,12 +1589,6 @@ void Sculpt::Main::_handle_gui_mode() } -Sculpt::Dialog::Hover_result Sculpt::Main::hover(Xml_node hover) -{ - return _storage.dialog.match_sub_dialog(hover, "vbox", "frame", "vbox"); -} - - void Sculpt::Main::_handle_update_state() { _update_state_rom.update(); @@ -1657,8 +1655,7 @@ void Sculpt::Main::_handle_runtime_state() partition.check_in_progress = 0; reconfigure_runtime = true; - _storage.dialog.reset_operation(); - _graph.reset_storage_operation(); + _reset_storage_dialog_operation(); } } @@ -1677,8 +1674,7 @@ void Sculpt::Main::_handle_runtime_state() device.rediscover(); reconfigure_runtime = true; - _storage.dialog.reset_operation(); - _graph.reset_storage_operation(); + _reset_storage_dialog_operation(); } } @@ -1689,8 +1685,7 @@ void Sculpt::Main::_handle_runtime_state() partition.fs_resize_in_progress = false; reconfigure_runtime = true; device.rediscover(); - _storage.dialog.reset_operation(); - _graph.reset_storage_operation(); + _reset_storage_dialog_operation(); } } @@ -1712,8 +1707,7 @@ void Sculpt::Main::_handle_runtime_state() if (exit_state.exited) { device.rediscover(); reconfigure_runtime = true; - _storage.dialog.reset_operation(); - _graph.reset_storage_operation(); + _reset_storage_dialog_operation(); } } @@ -1731,8 +1725,7 @@ void Sculpt::Main::_handle_runtime_state() }); reconfigure_runtime = true; - _storage.dialog.reset_operation(); - _graph.reset_storage_operation(); + _reset_storage_dialog_operation(); } } diff --git a/repos/gems/src/app/sculpt_manager/storage.h b/repos/gems/src/app/sculpt_manager/storage.h index 78e99a0ea0..0e0c0395d4 100644 --- a/repos/gems/src/app/sculpt_manager/storage.h +++ b/repos/gems/src/app/sculpt_manager/storage.h @@ -58,8 +58,6 @@ struct Sculpt::Storage : Storage_dialog::Action, Ram_fs_dialog::Action Inspect_view_version _inspect_view_version { 0 }; - Storage_dialog dialog { _storage_devices, _sculpt_partition }; - void handle_storage_devices_update(); Signal_handler _storage_device_update_handler { @@ -120,7 +118,6 @@ struct Sculpt::Storage : Storage_dialog::Action, Ram_fs_dialog::Action partition.file_system.type = File_system::UNKNOWN; partition.format_in_progress = false; } - dialog.reset_operation(); }); } @@ -139,7 +136,6 @@ struct Sculpt::Storage : Storage_dialog::Action, Ram_fs_dialog::Action partition.gpt_expand_in_progress = false; partition.fs_resize_in_progress = false; } - dialog.reset_operation(); }); } @@ -184,7 +180,6 @@ struct Sculpt::Storage : Storage_dialog::Action, Ram_fs_dialog::Action { _ram_fs_state.trigger_restart(); - dialog.reset_operation(); _runtime_config_generator.generate_runtime_config(); } From 25eac6b9e6fe3d0164e010cabc76a82fa7901601 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 24 Jan 2023 11:08:19 +0100 Subject: [PATCH 0221/1921] depot: update recipe hashes --- repos/base-fiasco/recipes/src/base-fiasco/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash | 2 +- repos/base-foc/recipes/src/base-foc-pbxa9/hash | 2 +- repos/base-foc/recipes/src/base-foc-pc/hash | 2 +- repos/base-foc/recipes/src/base-foc-rpi3/hash | 2 +- repos/base-hw/recipes/api/base-hw/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx53_qsb/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash | 2 +- repos/base-hw/recipes/src/base-hw-nit6_solox/hash | 2 +- repos/base-hw/recipes/src/base-hw-pbxa9/hash | 2 +- repos/base-hw/recipes/src/base-hw-pc/hash | 2 +- repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash | 2 +- repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash | 2 +- repos/base-linux/recipes/api/base-linux/hash | 2 +- repos/base-linux/recipes/src/base-linux/hash | 2 +- repos/base-nova/recipes/api/base-nova/hash | 2 +- repos/base-nova/recipes/src/base-nova/hash | 2 +- repos/base-okl4/recipes/src/base-okl4/hash | 2 +- repos/base-pistachio/recipes/src/base-pistachio/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-x86/hash | 2 +- repos/base/recipes/api/base/hash | 2 +- repos/base/recipes/pkg/test-ds_ownership/hash | 2 +- repos/base/recipes/pkg/test-entrypoint/hash | 2 +- repos/base/recipes/pkg/test-log/hash | 2 +- repos/base/recipes/pkg/test-mmio/hash | 2 +- repos/base/recipes/pkg/test-new_delete/hash | 2 +- repos/base/recipes/pkg/test-reconstructible/hash | 2 +- repos/base/recipes/pkg/test-registry/hash | 2 +- repos/base/recipes/pkg/test-rm_fault/hash | 2 +- repos/base/recipes/pkg/test-rm_fault_no_nox/hash | 2 +- repos/base/recipes/pkg/test-rm_nested/hash | 2 +- repos/base/recipes/pkg/test-rm_stress/hash | 2 +- repos/base/recipes/pkg/test-sanitizer/hash | 2 +- repos/base/recipes/pkg/test-stack_smash/hash | 2 +- repos/base/recipes/pkg/test-synced_interface/hash | 2 +- repos/base/recipes/pkg/test-timer/hash | 2 +- repos/base/recipes/pkg/test-tls/hash | 2 +- repos/base/recipes/pkg/test-token/hash | 2 +- repos/base/recipes/pkg/test-xml_generator/hash | 2 +- repos/base/recipes/pkg/test-xml_node/hash | 2 +- repos/base/recipes/src/test-ds_ownership/hash | 2 +- repos/base/recipes/src/test-entrypoint/hash | 2 +- repos/base/recipes/src/test-log/hash | 2 +- repos/base/recipes/src/test-mmio/hash | 2 +- repos/base/recipes/src/test-new_delete/hash | 2 +- repos/base/recipes/src/test-reconstructible/hash | 2 +- repos/base/recipes/src/test-registry/hash | 2 +- repos/base/recipes/src/test-rm_fault/hash | 2 +- repos/base/recipes/src/test-rm_nested/hash | 2 +- repos/base/recipes/src/test-rm_stress/hash | 2 +- repos/base/recipes/src/test-sanitizer/hash | 2 +- repos/base/recipes/src/test-segfault/hash | 2 +- repos/base/recipes/src/test-stack_smash/hash | 2 +- repos/base/recipes/src/test-synced_interface/hash | 2 +- repos/base/recipes/src/test-timer/hash | 2 +- repos/base/recipes/src/test-tls/hash | 2 +- repos/base/recipes/src/test-token/hash | 2 +- repos/base/recipes/src/test-xml_generator/hash | 2 +- repos/base/recipes/src/test-xml_node/hash | 2 +- repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash | 2 +- repos/dde_bsd/recipes/src/bsd_audio_drv/hash | 2 +- repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash | 2 +- repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash | 2 +- repos/dde_linux/recipes/pkg/usb_modem_drv/hash | 2 +- repos/dde_linux/recipes/pkg/wireguard/hash | 2 +- repos/dde_linux/recipes/src/legacy_usb_host_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_hid_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_modem_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_net_drv/hash | 2 +- repos/dde_linux/recipes/src/vfs_lxip/hash | 2 +- repos/dde_linux/recipes/src/wireguard/hash | 2 +- repos/dde_rump/recipes/pkg/ext2_fs/hash | 2 +- repos/dde_rump/recipes/src/rump/hash | 2 +- repos/demo/recipes/src/demo/hash | 2 +- repos/gems/recipes/pkg/backdrop/hash | 2 +- repos/gems/recipes/pkg/cbe_check/hash | 2 +- repos/gems/recipes/pkg/cbe_demo/hash | 2 +- repos/gems/recipes/pkg/cbe_fs/hash | 2 +- repos/gems/recipes/pkg/cbe_init/hash | 2 +- repos/gems/recipes/pkg/cbe_shell/hash | 2 +- repos/gems/recipes/pkg/cbe_ta_fs/hash | 2 +- repos/gems/recipes/pkg/cbe_ta_vfs/hash | 2 +- repos/gems/recipes/pkg/cbe_vbox5-nova/hash | 2 +- repos/gems/recipes/pkg/cbe_vfs/hash | 2 +- repos/gems/recipes/pkg/cbe_vm_fs/hash | 2 +- repos/gems/recipes/pkg/depot_download/hash | 2 +- repos/gems/recipes/pkg/download_coreplus/hash | 2 +- repos/gems/recipes/pkg/drivers_managed-pc/hash | 2 +- repos/gems/recipes/pkg/drivers_nic-pc/hash | 2 +- repos/gems/recipes/pkg/file_vault/hash | 2 +- repos/gems/recipes/pkg/fonts_fs/hash | 2 +- repos/gems/recipes/pkg/motif_decorator/hash | 2 +- repos/gems/recipes/pkg/motif_wm/hash | 2 +- repos/gems/recipes/pkg/nano3d/hash | 2 +- repos/gems/recipes/pkg/sculpt/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution-pc/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution/hash | 2 +- repos/gems/recipes/pkg/sticks_blue_backdrop/hash | 2 +- repos/gems/recipes/pkg/terminal/hash | 2 +- repos/gems/recipes/pkg/test-depot_query_index/hash | 2 +- repos/gems/recipes/pkg/test-fs_tool/hash | 2 +- repos/gems/recipes/pkg/test-libc_vfs_audit/hash | 2 +- repos/gems/recipes/pkg/themed_decorator/hash | 2 +- repos/gems/recipes/pkg/themed_wm/hash | 2 +- repos/gems/recipes/pkg/touch_keyboard/hash | 2 +- repos/gems/recipes/pkg/trace_fs/hash | 2 +- repos/gems/recipes/pkg/trace_recorder/hash | 2 +- repos/gems/recipes/pkg/window_layouter/hash | 2 +- repos/gems/recipes/pkg/wm/hash | 2 +- repos/gems/recipes/src/backdrop/hash | 2 +- repos/gems/recipes/src/cbe/hash | 2 +- repos/gems/recipes/src/cpu_load_display/hash | 2 +- repos/gems/recipes/src/decorator/hash | 2 +- repos/gems/recipes/src/depot_deploy/hash | 2 +- repos/gems/recipes/src/depot_download_manager/hash | 2 +- repos/gems/recipes/src/depot_query/hash | 2 +- repos/gems/recipes/src/driver_manager/hash | 2 +- repos/gems/recipes/src/file_terminal/hash | 2 +- repos/gems/recipes/src/file_vault/hash | 2 +- repos/gems/recipes/src/fs_query/hash | 2 +- repos/gems/recipes/src/fs_tool/hash | 2 +- repos/gems/recipes/src/gpt_write/hash | 2 +- repos/gems/recipes/src/gui_fader/hash | 2 +- repos/gems/recipes/src/menu_view/hash | 2 +- repos/gems/recipes/src/mixer_gui_qt/hash | 2 +- repos/gems/recipes/src/nano3d/hash | 2 +- repos/gems/recipes/src/sculpt_manager/hash | 2 +- repos/gems/recipes/src/terminal/hash | 2 +- repos/gems/recipes/src/test-tiled_wm/hash | 2 +- repos/gems/recipes/src/text_area/hash | 2 +- repos/gems/recipes/src/themed_decorator/hash | 2 +- repos/gems/recipes/src/touch_keyboard/hash | 2 +- repos/gems/recipes/src/trace_recorder/hash | 2 +- repos/gems/recipes/src/trace_recorder_policy/hash | 2 +- repos/gems/recipes/src/vfs_audit/hash | 2 +- repos/gems/recipes/src/vfs_gpu/hash | 2 +- repos/gems/recipes/src/vfs_import/hash | 2 +- repos/gems/recipes/src/vfs_pipe/hash | 2 +- repos/gems/recipes/src/vfs_trace/hash | 2 +- repos/gems/recipes/src/vfs_ttf/hash | 2 +- repos/gems/recipes/src/window_layouter/hash | 2 +- repos/gems/recipes/src/wm/hash | 2 +- repos/libports/recipes/api/curl/hash | 2 +- repos/libports/recipes/api/libc/hash | 2 +- repos/libports/recipes/api/lwip/hash | 2 +- repos/libports/recipes/api/qt5/hash | 2 +- repos/libports/recipes/pkg/acpica/hash | 2 +- repos/libports/recipes/pkg/gcov/hash | 2 +- repos/libports/recipes/pkg/mesa_gears/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-cpu/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-intel/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-lima/hash | 2 +- repos/libports/recipes/pkg/pdf_view/hash | 2 +- repos/libports/recipes/pkg/qt5_textedit/hash | 2 +- repos/libports/recipes/pkg/sntp_dummy_rtc/hash | 2 +- repos/libports/recipes/pkg/system_clock-dummy/hash | 2 +- repos/libports/recipes/pkg/system_clock-pc/hash | 2 +- repos/libports/recipes/pkg/system_rtc-linux/hash | 2 +- repos/libports/recipes/pkg/system_rtc-pc/hash | 2 +- repos/libports/recipes/pkg/test-expat/hash | 2 +- repos/libports/recipes/pkg/test-ldso/hash | 2 +- repos/libports/recipes/pkg/test-libc/hash | 2 +- repos/libports/recipes/pkg/test-libc_connect_lwip/hash | 2 +- repos/libports/recipes/pkg/test-libc_connect_lxip/hash | 2 +- .../libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash | 2 +- .../libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash | 2 +- repos/libports/recipes/pkg/test-libc_counter/hash | 2 +- repos/libports/recipes/pkg/test-libc_execve/hash | 2 +- repos/libports/recipes/pkg/test-libc_fifo_pipe/hash | 2 +- repos/libports/recipes/pkg/test-libc_fork/hash | 2 +- repos/libports/recipes/pkg/test-libc_getenv/hash | 2 +- repos/libports/recipes/pkg/test-libc_pipe/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_block/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_counter/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_fs/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_ram/hash | 2 +- repos/libports/recipes/pkg/test-pthread/hash | 2 +- repos/libports/recipes/pkg/test-sequence/hash | 2 +- repos/libports/recipes/pkg/test-spark/hash | 2 +- repos/libports/recipes/pkg/test-spark_exception/hash | 2 +- repos/libports/recipes/pkg/test-spark_secondary_stack/hash | 2 +- repos/libports/recipes/pkg/test-stdcxx/hash | 2 +- repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash | 2 +- repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash | 2 +- repos/libports/recipes/pkg/usb_webcam/hash | 2 +- repos/libports/recipes/src/acpica/hash | 2 +- repos/libports/recipes/src/curl/hash | 2 +- repos/libports/recipes/src/expat/hash | 2 +- repos/libports/recipes/src/extract/hash | 2 +- repos/libports/recipes/src/fetchurl/hash | 2 +- repos/libports/recipes/src/ffi/hash | 2 +- repos/libports/recipes/src/freetype/hash | 2 +- repos/libports/recipes/src/fs_utils/hash | 2 +- repos/libports/recipes/src/gcov/hash | 2 +- repos/libports/recipes/src/gmp/hash | 2 +- repos/libports/recipes/src/icu/hash | 2 +- repos/libports/recipes/src/jbig2dec/hash | 2 +- repos/libports/recipes/src/jpeg/hash | 2 +- repos/libports/recipes/src/libarchive/hash | 2 +- repos/libports/recipes/src/libc/hash | 2 +- repos/libports/recipes/src/libdrm/hash | 2 +- repos/libports/recipes/src/libiconv/hash | 2 +- repos/libports/recipes/src/liblzma/hash | 2 +- repos/libports/recipes/src/libpng/hash | 2 +- repos/libports/recipes/src/libqgenodeviewwidget/hash | 2 +- repos/libports/recipes/src/libqpluginwidget/hash | 2 +- repos/libports/recipes/src/libsparkcrypto/hash | 2 +- repos/libports/recipes/src/libssh/hash | 2 +- repos/libports/recipes/src/libusb/hash | 2 +- repos/libports/recipes/src/libuvc/hash | 2 +- repos/libports/recipes/src/libyuv/hash | 2 +- repos/libports/recipes/src/mesa/hash | 2 +- repos/libports/recipes/src/mesa_gears/hash | 2 +- repos/libports/recipes/src/mupdf/hash | 2 +- repos/libports/recipes/src/ncurses/hash | 2 +- repos/libports/recipes/src/openjpeg/hash | 2 +- repos/libports/recipes/src/openssl/hash | 2 +- repos/libports/recipes/src/pcre/hash | 2 +- repos/libports/recipes/src/pcre16/hash | 2 +- repos/libports/recipes/src/pcsc-lite/hash | 2 +- repos/libports/recipes/src/pdf_view/hash | 2 +- repos/libports/recipes/src/posix/hash | 2 +- repos/libports/recipes/src/qt5_base/hash | 2 +- repos/libports/recipes/src/qt5_calculatorform/hash | 2 +- repos/libports/recipes/src/qt5_component/hash | 2 +- repos/libports/recipes/src/qt5_declarative/hash | 2 +- repos/libports/recipes/src/qt5_graphicaleffects/hash | 2 +- repos/libports/recipes/src/qt5_launchpad/hash | 2 +- repos/libports/recipes/src/qt5_openglwindow/hash | 2 +- repos/libports/recipes/src/qt5_quickcontrols/hash | 2 +- repos/libports/recipes/src/qt5_quickcontrols2/hash | 2 +- repos/libports/recipes/src/qt5_samegame/hash | 2 +- repos/libports/recipes/src/qt5_svg/hash | 2 +- repos/libports/recipes/src/qt5_testqstring/hash | 2 +- repos/libports/recipes/src/qt5_tetrix/hash | 2 +- repos/libports/recipes/src/qt5_textedit/hash | 2 +- repos/libports/recipes/src/qt5_virtualkeyboard/hash | 2 +- repos/libports/recipes/src/qt5_virtualkeyboard_example/hash | 2 +- repos/libports/recipes/src/sanitizer/hash | 2 +- repos/libports/recipes/src/sntp_client/hash | 2 +- repos/libports/recipes/src/spark/hash | 2 +- repos/libports/recipes/src/stdcxx/hash | 2 +- repos/libports/recipes/src/stdin2out/hash | 2 +- repos/libports/recipes/src/system_rtc/hash | 2 +- repos/libports/recipes/src/test-expat/hash | 2 +- repos/libports/recipes/src/test-ldso/hash | 2 +- repos/libports/recipes/src/test-libc/hash | 2 +- repos/libports/recipes/src/test-libc_connect/hash | 2 +- repos/libports/recipes/src/test-libc_counter/hash | 2 +- repos/libports/recipes/src/test-libc_execve/hash | 2 +- repos/libports/recipes/src/test-libc_fifo_pipe/hash | 2 +- repos/libports/recipes/src/test-libc_fork/hash | 2 +- repos/libports/recipes/src/test-libc_getenv/hash | 2 +- repos/libports/recipes/src/test-libc_pipe/hash | 2 +- repos/libports/recipes/src/test-libc_vfs/hash | 2 +- repos/libports/recipes/src/test-libc_vfs_block/hash | 2 +- repos/libports/recipes/src/test-netty/hash | 2 +- repos/libports/recipes/src/test-pthread/hash | 2 +- repos/libports/recipes/src/test-qpluginwidget/hash | 2 +- repos/libports/recipes/src/test-qt_core/hash | 2 +- repos/libports/recipes/src/test-qt_core_cmake/hash | 2 +- repos/libports/recipes/src/test-qt_quick/hash | 2 +- repos/libports/recipes/src/test-spark/hash | 2 +- repos/libports/recipes/src/test-spark_exception/hash | 2 +- repos/libports/recipes/src/test-spark_secondary_stack/hash | 2 +- repos/libports/recipes/src/test-stdcxx/hash | 2 +- repos/libports/recipes/src/test-tcp/hash | 2 +- repos/libports/recipes/src/usb_webcam/hash | 2 +- repos/libports/recipes/src/vesa_drv/hash | 2 +- repos/libports/recipes/src/vfs_fatfs/hash | 2 +- repos/libports/recipes/src/vfs_jitterentropy/hash | 2 +- repos/libports/recipes/src/vfs_libusb/hash | 2 +- repos/libports/recipes/src/vfs_lwip/hash | 2 +- repos/libports/recipes/src/vfs_oss/hash | 2 +- repos/libports/recipes/src/zlib/hash | 2 +- repos/os/recipes/api/file_system_session/hash | 2 +- repos/os/recipes/api/net/hash | 2 +- repos/os/recipes/api/nic_session/hash | 2 +- repos/os/recipes/api/os/hash | 2 +- repos/os/recipes/api/uplink_session/hash | 2 +- repos/os/recipes/api/vfs/hash | 2 +- repos/os/recipes/pkg/black_hole/hash | 2 +- repos/os/recipes/pkg/chroot/hash | 2 +- repos/os/recipes/pkg/clipboard/hash | 2 +- repos/os/recipes/pkg/cpu_balancer/hash | 2 +- repos/os/recipes/pkg/cpu_balancer_config/hash | 2 +- repos/os/recipes/pkg/cpu_burner/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-linux/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-pbxa9/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-pc/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash | 2 +- repos/os/recipes/pkg/drivers_nic-linux/hash | 2 +- repos/os/recipes/pkg/drivers_nic-pbxa9/hash | 2 +- repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash | 2 +- repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash | 2 +- repos/os/recipes/pkg/fs_report/hash | 2 +- repos/os/recipes/pkg/fs_rom/hash | 2 +- repos/os/recipes/pkg/mixer/hash | 2 +- repos/os/recipes/pkg/nic_router-nat/hash | 2 +- repos/os/recipes/pkg/nit_focus/hash | 2 +- repos/os/recipes/pkg/part_block/hash | 2 +- repos/os/recipes/pkg/recall_fs/hash | 2 +- repos/os/recipes/pkg/report_rom/hash | 2 +- repos/os/recipes/pkg/rom_filter/hash | 2 +- repos/os/recipes/pkg/rom_reporter/hash | 2 +- repos/os/recipes/pkg/test-audio_out/hash | 2 +- repos/os/recipes/pkg/test-black_hole/hash | 2 +- repos/os/recipes/pkg/test-capture/hash | 2 +- repos/os/recipes/pkg/test-clipboard/hash | 2 +- repos/os/recipes/pkg/test-dynamic_config/hash | 2 +- repos/os/recipes/pkg/test-dynamic_config_loader/hash | 2 +- repos/os/recipes/pkg/test-fault_detection/hash | 2 +- repos/os/recipes/pkg/test-fs_packet/hash | 2 +- repos/os/recipes/pkg/test-fs_report/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update_fs/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update_ram/hash | 2 +- repos/os/recipes/pkg/test-init/hash | 2 +- repos/os/recipes/pkg/test-init_loop/hash | 2 +- repos/os/recipes/pkg/test-lx_block/hash | 2 +- repos/os/recipes/pkg/test-nic_loopback/hash | 2 +- repos/os/recipes/pkg/test-nic_perf/hash | 2 +- repos/os/recipes/pkg/test-nic_perf_router/hash | 2 +- repos/os/recipes/pkg/test-part_block_gpt/hash | 2 +- repos/os/recipes/pkg/test-part_block_mbr/hash | 2 +- repos/os/recipes/pkg/test-ram_fs_chunk/hash | 2 +- repos/os/recipes/pkg/test-read_only_rom/hash | 2 +- repos/os/recipes/pkg/test-report_rom/hash | 2 +- repos/os/recipes/pkg/test-resource_request/hash | 2 +- repos/os/recipes/pkg/test-resource_yield/hash | 2 +- repos/os/recipes/pkg/test-rom_filter/hash | 2 +- repos/os/recipes/pkg/test-rtc/hash | 2 +- repos/os/recipes/pkg/test-sandbox/hash | 2 +- repos/os/recipes/pkg/test-signal/hash | 2 +- repos/os/recipes/pkg/test-slab/hash | 2 +- repos/os/recipes/pkg/test-terminal_crosslink/hash | 2 +- repos/os/recipes/pkg/test-trace/hash | 2 +- repos/os/recipes/pkg/test-trace_buffer/hash | 2 +- repos/os/recipes/pkg/test-trace_logger/hash | 2 +- repos/os/recipes/pkg/test-utf8/hash | 2 +- repos/os/recipes/pkg/test-vfs_block/hash | 2 +- repos/os/recipes/pkg/test-vfs_stress_fs/hash | 2 +- repos/os/recipes/pkg/test-vfs_stress_ram/hash | 2 +- repos/os/recipes/pkg/test-weak_ptr/hash | 2 +- repos/os/recipes/pkg/top/hash | 2 +- repos/os/recipes/pkg/trace_logger/hash | 2 +- repos/os/recipes/pkg/vfs/hash | 2 +- repos/os/recipes/pkg/vfs_block/hash | 2 +- repos/os/recipes/src/acpi_drv/hash | 2 +- repos/os/recipes/src/ahci_drv/hash | 2 +- repos/os/recipes/src/black_hole/hash | 2 +- repos/os/recipes/src/block_tester/hash | 2 +- repos/os/recipes/src/boot_fb_drv/hash | 2 +- repos/os/recipes/src/cached_fs_rom/hash | 2 +- repos/os/recipes/src/chroot/hash | 2 +- repos/os/recipes/src/clipboard/hash | 2 +- repos/os/recipes/src/cpu_balancer/hash | 2 +- repos/os/recipes/src/cpu_burner/hash | 2 +- repos/os/recipes/src/dummy/hash | 2 +- repos/os/recipes/src/dummy_rtc_drv/hash | 2 +- repos/os/recipes/src/dynamic_rom/hash | 2 +- repos/os/recipes/src/event_filter/hash | 2 +- repos/os/recipes/src/fb_sdl/hash | 2 +- repos/os/recipes/src/fs_report/hash | 2 +- repos/os/recipes/src/fs_rom/hash | 2 +- repos/os/recipes/src/global_keys_handler/hash | 2 +- repos/os/recipes/src/gui_fb/hash | 2 +- repos/os/recipes/src/init/hash | 2 +- repos/os/recipes/src/input_event_bridge/hash | 2 +- repos/os/recipes/src/intel_gpu_drv/hash | 2 +- repos/os/recipes/src/lan9118_nic_drv/hash | 2 +- repos/os/recipes/src/linux_nic_drv/hash | 2 +- repos/os/recipes/src/linux_rtc_drv/hash | 2 +- repos/os/recipes/src/loader/hash | 2 +- repos/os/recipes/src/log_core/hash | 2 +- repos/os/recipes/src/log_terminal/hash | 2 +- repos/os/recipes/src/lx_block/hash | 2 +- repos/os/recipes/src/lx_fs/hash | 2 +- repos/os/recipes/src/mixer/hash | 2 +- repos/os/recipes/src/nic_bridge/hash | 2 +- repos/os/recipes/src/nic_loopback/hash | 2 +- repos/os/recipes/src/nic_perf/hash | 2 +- repos/os/recipes/src/nic_router/hash | 2 +- repos/os/recipes/src/nit_focus/hash | 2 +- repos/os/recipes/src/nitpicker/hash | 2 +- repos/os/recipes/src/nvme_drv/hash | 2 +- repos/os/recipes/src/part_block/hash | 2 +- repos/os/recipes/src/pbxa9_drivers/hash | 2 +- repos/os/recipes/src/pci_decode/hash | 2 +- repos/os/recipes/src/platform_drv/hash | 2 +- repos/os/recipes/src/ps2_drv/hash | 2 +- repos/os/recipes/src/report_rom/hash | 2 +- repos/os/recipes/src/rom_filter/hash | 2 +- repos/os/recipes/src/rom_logger/hash | 2 +- repos/os/recipes/src/rom_reporter/hash | 2 +- repos/os/recipes/src/rom_to_file/hash | 2 +- repos/os/recipes/src/rtc_drv/hash | 2 +- repos/os/recipes/src/sandbox/hash | 2 +- repos/os/recipes/src/sequence/hash | 2 +- repos/os/recipes/src/shim/hash | 2 +- repos/os/recipes/src/terminal_crosslink/hash | 2 +- repos/os/recipes/src/terminal_log/hash | 2 +- repos/os/recipes/src/test-audio_out/hash | 2 +- repos/os/recipes/src/test-black_hole/hash | 2 +- repos/os/recipes/src/test-bomb/hash | 2 +- repos/os/recipes/src/test-capture/hash | 2 +- repos/os/recipes/src/test-clipboard/hash | 2 +- repos/os/recipes/src/test-dynamic_config/hash | 2 +- repos/os/recipes/src/test-fault_detection/hash | 2 +- repos/os/recipes/src/test-fs_packet/hash | 2 +- repos/os/recipes/src/test-fs_report/hash | 2 +- repos/os/recipes/src/test-immutable_rom/hash | 2 +- repos/os/recipes/src/test-init/hash | 2 +- repos/os/recipes/src/test-init_loop/hash | 2 +- repos/os/recipes/src/test-nic_loopback/hash | 2 +- repos/os/recipes/src/test-ram_fs_chunk/hash | 2 +- repos/os/recipes/src/test-report_rom/hash | 2 +- repos/os/recipes/src/test-resource_request/hash | 2 +- repos/os/recipes/src/test-resource_yield/hash | 2 +- repos/os/recipes/src/test-rtc/hash | 2 +- repos/os/recipes/src/test-sandbox/hash | 2 +- repos/os/recipes/src/test-signal/hash | 2 +- repos/os/recipes/src/test-slab/hash | 2 +- repos/os/recipes/src/test-terminal_crosslink/hash | 2 +- repos/os/recipes/src/test-trace/hash | 2 +- repos/os/recipes/src/test-trace_buffer/hash | 2 +- repos/os/recipes/src/test-trace_logger/hash | 2 +- repos/os/recipes/src/test-utf8/hash | 2 +- repos/os/recipes/src/test-vfs_capture/hash | 2 +- repos/os/recipes/src/test-vfs_stress/hash | 2 +- repos/os/recipes/src/test-weak_ptr/hash | 2 +- repos/os/recipes/src/top/hash | 2 +- repos/os/recipes/src/trace_logger/hash | 2 +- repos/os/recipes/src/trace_policy/hash | 2 +- repos/os/recipes/src/trace_subject_reporter/hash | 2 +- repos/os/recipes/src/usb_block_drv/hash | 2 +- repos/os/recipes/src/vfs/hash | 2 +- repos/os/recipes/src/vfs_block/hash | 2 +- repos/os/recipes/src/vfs_capture/hash | 2 +- repos/os/recipes/src/vfs_tap/hash | 2 +- repos/os/recipes/src/virt_qemu_drivers/hash | 2 +- repos/os/recipes/src/virtdev_rom/hash | 2 +- repos/os/recipes/src/virtio_fb_drv/hash | 2 +- repos/os/recipes/src/virtio_input_drv/hash | 2 +- repos/os/recipes/src/virtio_nic_drv/hash | 2 +- repos/os/recipes/src/vmm/hash | 2 +- repos/pc/recipes/api/pc_linux/hash | 2 +- repos/pc/recipes/pkg/test_usb_host_drv-pc/hash | 2 +- repos/pc/recipes/pkg/wifi/hash | 2 +- repos/pc/recipes/src/pc_intel_fb_drv/hash | 2 +- repos/pc/recipes/src/pc_platform_drv/hash | 2 +- repos/pc/recipes/src/pc_usb_host_drv/hash | 2 +- repos/pc/recipes/src/pc_wifi_drv/hash | 2 +- repos/ports/recipes/pkg/report_dump/hash | 2 +- repos/ports/recipes/pkg/system_shell/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-capture/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-sculpt/hash | 2 +- repos/ports/recipes/pkg/vbox5/hash | 2 +- repos/ports/recipes/pkg/vbox6-capture/hash | 2 +- repos/ports/recipes/pkg/vbox6/hash | 2 +- repos/ports/recipes/src/bash-minimal/hash | 2 +- repos/ports/recipes/src/bash/hash | 2 +- repos/ports/recipes/src/binutils_x86/hash | 2 +- repos/ports/recipes/src/coreutils-minimal/hash | 2 +- repos/ports/recipes/src/coreutils/hash | 2 +- repos/ports/recipes/src/diffutils/hash | 2 +- repos/ports/recipes/src/e2fsprogs-minimal/hash | 2 +- repos/ports/recipes/src/e2fsprogs/hash | 2 +- repos/ports/recipes/src/findutils/hash | 2 +- repos/ports/recipes/src/gcc_x86/hash | 2 +- repos/ports/recipes/src/gnumake/hash | 2 +- repos/ports/recipes/src/grep/hash | 2 +- repos/ports/recipes/src/less/hash | 2 +- repos/ports/recipes/src/lighttpd/hash | 2 +- repos/ports/recipes/src/sed/hash | 2 +- repos/ports/recipes/src/tar/hash | 2 +- repos/ports/recipes/src/tclsh/hash | 2 +- repos/ports/recipes/src/vbox5-nova/hash | 2 +- repos/ports/recipes/src/vbox5/hash | 2 +- repos/ports/recipes/src/vbox6/hash | 2 +- repos/ports/recipes/src/verify/hash | 2 +- repos/ports/recipes/src/vim-minimal/hash | 2 +- repos/ports/recipes/src/vim/hash | 2 +- repos/ports/recipes/src/which/hash | 2 +- 493 files changed, 493 insertions(+), 493 deletions(-) diff --git a/repos/base-fiasco/recipes/src/base-fiasco/hash b/repos/base-fiasco/recipes/src/base-fiasco/hash index 52d0f3a12f..3101341478 100644 --- a/repos/base-fiasco/recipes/src/base-fiasco/hash +++ b/repos/base-fiasco/recipes/src/base-fiasco/hash @@ -1 +1 @@ -2022-12-04 c460223102ff4ca497dc3922c8218599c5abf6ad +2023-01-23 30cc82133d3c826f76af03e46fd814169bb5034e diff --git a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash index 38f594e03f..e5ac34fba7 100644 --- a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash +++ b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-12-04 12e2606c26b1a520c4ba429a363566ced6c9ef22 +2023-01-23 05a50deac3d3a513612a24d5188361e6a8e29ba0 diff --git a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash index 547b44055b..6d030c9bd2 100644 --- a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash +++ b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash @@ -1 +1 @@ -2022-12-04 1b0f85f8688b2ac616e0f3ff06477b85138b3a39 +2023-01-23 5c5860d880a4c07f0ed724586ce152639e0752e9 diff --git a/repos/base-foc/recipes/src/base-foc-pbxa9/hash b/repos/base-foc/recipes/src/base-foc-pbxa9/hash index b4dd2bc318..f7899730c7 100644 --- a/repos/base-foc/recipes/src/base-foc-pbxa9/hash +++ b/repos/base-foc/recipes/src/base-foc-pbxa9/hash @@ -1 +1 @@ -2022-12-04 beba17b0bbe249ec52f8070bf77237d03f0b7ddb +2023-01-23 2ac38cbe4283d480cbe31154d4c03da9159e9a7f diff --git a/repos/base-foc/recipes/src/base-foc-pc/hash b/repos/base-foc/recipes/src/base-foc-pc/hash index 740b3664ed..a4c5d4bcf6 100644 --- a/repos/base-foc/recipes/src/base-foc-pc/hash +++ b/repos/base-foc/recipes/src/base-foc-pc/hash @@ -1 +1 @@ -2022-12-04 f826326965acf2694a79ed89fe6357276a3b08fb +2023-01-23 a4a266e9b78269789c04efd7490137a48615a23d diff --git a/repos/base-foc/recipes/src/base-foc-rpi3/hash b/repos/base-foc/recipes/src/base-foc-rpi3/hash index 7934d47e6f..3cf1bd486f 100644 --- a/repos/base-foc/recipes/src/base-foc-rpi3/hash +++ b/repos/base-foc/recipes/src/base-foc-rpi3/hash @@ -1 +1 @@ -2022-12-04 e2ad9dc4c5ae4dc1e41cd2ac0618c485ff889e11 +2023-01-23 08d54ffc373ae10327a9f8bf6d668246199a9eb2 diff --git a/repos/base-hw/recipes/api/base-hw/hash b/repos/base-hw/recipes/api/base-hw/hash index 86ffc23cc6..dff6cc6c41 100644 --- a/repos/base-hw/recipes/api/base-hw/hash +++ b/repos/base-hw/recipes/api/base-hw/hash @@ -1 +1 @@ -2022-02-27 86bd429179fd08dcb42e5fe852040d7e2785f4fb +2023-01-23 aa9123863ba8d983f63d396b99ccbc2715f48278 diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash b/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash index aa4d6734a8..3cb6e9d72b 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash @@ -1 +1 @@ -2022-11-28 4b31134918427ba8b6245ebcc7479ca43bc8b576 +2023-01-23 7d86a78342d7c79dd1e896bb637e155da7059ba4 diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash index 8e9bbe620a..aa0dafc5be 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash @@ -1 +1 @@ -2022-11-28 baf012b749fcc3ba5cda6379a653e64b95cc5d20 +2023-01-23 11396abcead04e6f3551d5f3eb73bfe63aacfa66 diff --git a/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash b/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash index 0f6e74aa37..d0ee11ca0c 100644 --- a/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash +++ b/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-11-28 4c713511d0f6ae1f3e97aab663f877bef1834a81 +2023-01-23 84af60ebcdb08c752f8ce8dd2bc6b66cbd9c1890 diff --git a/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash b/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash index 075ad62ee6..553ce30079 100644 --- a/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash +++ b/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash @@ -1 +1 @@ -2022-11-28 9cd1725c9e2855764f149312eb226bc1227bb442 +2023-01-23 c7c2f994254a9160aeda880a15b2ae3b5c122a79 diff --git a/repos/base-hw/recipes/src/base-hw-nit6_solox/hash b/repos/base-hw/recipes/src/base-hw-nit6_solox/hash index c26106e545..8fb2bea210 100644 --- a/repos/base-hw/recipes/src/base-hw-nit6_solox/hash +++ b/repos/base-hw/recipes/src/base-hw-nit6_solox/hash @@ -1 +1 @@ -2022-11-28 4911a05710737556a8a1eceda54183d8f1784131 +2023-01-23 b8f9ab2a33764962bc701e703c99dc87c8bd0844 diff --git a/repos/base-hw/recipes/src/base-hw-pbxa9/hash b/repos/base-hw/recipes/src/base-hw-pbxa9/hash index 54b1372fc5..9daefaa876 100644 --- a/repos/base-hw/recipes/src/base-hw-pbxa9/hash +++ b/repos/base-hw/recipes/src/base-hw-pbxa9/hash @@ -1 +1 @@ -2022-11-28 f8a343c3fd836250ab866caf7f61606ec01c1436 +2023-01-23 3e450c3901a2199a3498fca5d717002972ea8c92 diff --git a/repos/base-hw/recipes/src/base-hw-pc/hash b/repos/base-hw/recipes/src/base-hw-pc/hash index 3823c8127a..2bb8c23383 100644 --- a/repos/base-hw/recipes/src/base-hw-pc/hash +++ b/repos/base-hw/recipes/src/base-hw-pc/hash @@ -1 +1 @@ -2022-11-28 1c7acb0980f1d7329c09723c137828e6341ff831 +2023-01-23 c4615dbd79c45da94a2e0f40e723fe34c407a73c diff --git a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash index 3984b9d6c3..cfb214e044 100644 --- a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash +++ b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-11-28 38601231bb9e1287239fae16a12306654ff5f38e +2023-01-23 4c6b9d6a4859f49a82d935643e9fb847784ebede diff --git a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash index 95ba07ad9d..1382d80d10 100644 --- a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash +++ b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-11-28 949e1a7aa68d315ab3f8a1b0dddc0dc0955f6f0e +2023-01-23 1f83b2faaed39d1b546e611e6bdf522e940d0352 diff --git a/repos/base-linux/recipes/api/base-linux/hash b/repos/base-linux/recipes/api/base-linux/hash index b4672ab145..af6aca2127 100644 --- a/repos/base-linux/recipes/api/base-linux/hash +++ b/repos/base-linux/recipes/api/base-linux/hash @@ -1 +1 @@ -2022-11-16 b2b11b8d5dbe3f064eaf88c8cd5911eb79779968 +2023-01-23 69d25c9d2e13c7bd1da61c825351a5a3c2e95c54 diff --git a/repos/base-linux/recipes/src/base-linux/hash b/repos/base-linux/recipes/src/base-linux/hash index 3d0b23c103..03f8ee2d8e 100644 --- a/repos/base-linux/recipes/src/base-linux/hash +++ b/repos/base-linux/recipes/src/base-linux/hash @@ -1 +1 @@ -2022-12-04 2400c8929ba380ffef2f927567b01e20e1905596 +2023-01-23 efff329b5db07f53fb7cae6f15bc9cf3b71f6415 diff --git a/repos/base-nova/recipes/api/base-nova/hash b/repos/base-nova/recipes/api/base-nova/hash index 7be688e067..9ac54d36e9 100644 --- a/repos/base-nova/recipes/api/base-nova/hash +++ b/repos/base-nova/recipes/api/base-nova/hash @@ -1 +1 @@ -2022-11-28 477ebf1f47ada5b6c1867ffc28696de84589f057 +2023-01-23 79390e122054c3745991b11f9a0dc271742ea2a0 diff --git a/repos/base-nova/recipes/src/base-nova/hash b/repos/base-nova/recipes/src/base-nova/hash index 13d0914dae..4ddebc34b5 100644 --- a/repos/base-nova/recipes/src/base-nova/hash +++ b/repos/base-nova/recipes/src/base-nova/hash @@ -1 +1 @@ -2022-12-04 c12a954f62488628ee805a062264b4410f4a4776 +2023-01-23 ee01458d6e6f55be89e77e2529b45f7836a9ac7b diff --git a/repos/base-okl4/recipes/src/base-okl4/hash b/repos/base-okl4/recipes/src/base-okl4/hash index 3f3611f471..d9bd1ef795 100644 --- a/repos/base-okl4/recipes/src/base-okl4/hash +++ b/repos/base-okl4/recipes/src/base-okl4/hash @@ -1 +1 @@ -2022-12-04 b8b1d6bcf778764af2266a4643a42343a1b2985b +2023-01-23 e319f49fe82e8a5417d64f3f1b3812e9daac11e4 diff --git a/repos/base-pistachio/recipes/src/base-pistachio/hash b/repos/base-pistachio/recipes/src/base-pistachio/hash index 9a37bce198..3b8bc62efe 100644 --- a/repos/base-pistachio/recipes/src/base-pistachio/hash +++ b/repos/base-pistachio/recipes/src/base-pistachio/hash @@ -1 +1 @@ -2022-12-04 446756851ef62eaeb503c9a7830ca47ffb321a1f +2023-01-23 67ca8fb4658605837addbf17b04d4f5968ffe159 diff --git a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash index a815576d2c..0f19a7f2aa 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash @@ -1 +1 @@ -2022-12-04 1423e125429684cf1ce9d1ef5f58ebc1345ea97e +2023-01-23 52bb8165d32cb17cd7aa4a525f2aa4965e654c52 diff --git a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash index e7e7c3070f..1e1137a6ad 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash @@ -1 +1 @@ -2022-12-04 01c67ea5484e85c45ad86cf6d13afc8d915ea4b9 +2023-01-23 df3046a2d160f37bfa2d38b50e250804994cd4e1 diff --git a/repos/base-sel4/recipes/src/base-sel4-x86/hash b/repos/base-sel4/recipes/src/base-sel4-x86/hash index 94a436b2cb..3e8b1d652d 100644 --- a/repos/base-sel4/recipes/src/base-sel4-x86/hash +++ b/repos/base-sel4/recipes/src/base-sel4-x86/hash @@ -1 +1 @@ -2022-12-04 140ba8760c9a7c30c76dcf8be5e05970ff1bcc79 +2023-01-23 1723c32d2dfc3181067d73f17d17626242d12db9 diff --git a/repos/base/recipes/api/base/hash b/repos/base/recipes/api/base/hash index 87fc0ad867..d2dbe6eacf 100644 --- a/repos/base/recipes/api/base/hash +++ b/repos/base/recipes/api/base/hash @@ -1 +1 @@ -2022-11-28 93ef5e12228862b1d6cf4aadf1bc8a29c5ab1da2 +2023-01-23 7fba98cbc810b8314c31e624a2d67be5afefd780 diff --git a/repos/base/recipes/pkg/test-ds_ownership/hash b/repos/base/recipes/pkg/test-ds_ownership/hash index 653e868f34..1e5d8f9210 100644 --- a/repos/base/recipes/pkg/test-ds_ownership/hash +++ b/repos/base/recipes/pkg/test-ds_ownership/hash @@ -1 +1 @@ -2022-11-28 7bbf9712b5652c09448d2d9139ebc39c806edb28 +2023-01-23 e0ecafc9e0e110b1a3ee1175749546379cdffe5c diff --git a/repos/base/recipes/pkg/test-entrypoint/hash b/repos/base/recipes/pkg/test-entrypoint/hash index e6c8f77213..75d9d6816e 100644 --- a/repos/base/recipes/pkg/test-entrypoint/hash +++ b/repos/base/recipes/pkg/test-entrypoint/hash @@ -1 +1 @@ -2022-11-28 368615e64eb70b9343c49ad039c5fdb3a2a79eef +2023-01-23 5ddb14d334785d90a5ed30fe734f1b3d98438fe5 diff --git a/repos/base/recipes/pkg/test-log/hash b/repos/base/recipes/pkg/test-log/hash index d228de8283..f9fa441162 100644 --- a/repos/base/recipes/pkg/test-log/hash +++ b/repos/base/recipes/pkg/test-log/hash @@ -1 +1 @@ -2022-11-28 5dcecf5348e600de43e8d30f2563d15886b06e09 +2023-01-23 510e18e14aefe61c4ace722b658a0843707e5b72 diff --git a/repos/base/recipes/pkg/test-mmio/hash b/repos/base/recipes/pkg/test-mmio/hash index 971cf037e1..57bfa333a5 100644 --- a/repos/base/recipes/pkg/test-mmio/hash +++ b/repos/base/recipes/pkg/test-mmio/hash @@ -1 +1 @@ -2022-11-28 ff91cca72fefce0b666b1a307a77767ac6d970fe +2023-01-23 f3114b6286286f85aa03f4d4613ced13f7e3f0fe diff --git a/repos/base/recipes/pkg/test-new_delete/hash b/repos/base/recipes/pkg/test-new_delete/hash index 9310b4f6eb..e9ef72f798 100644 --- a/repos/base/recipes/pkg/test-new_delete/hash +++ b/repos/base/recipes/pkg/test-new_delete/hash @@ -1 +1 @@ -2022-11-28 5193256955bebd6e8a14fcd4bc5f966948b89342 +2023-01-23 aaafa68e54cd63d54d40f96f6438a762e320a6e2 diff --git a/repos/base/recipes/pkg/test-reconstructible/hash b/repos/base/recipes/pkg/test-reconstructible/hash index 4ebc39aa82..864067d172 100644 --- a/repos/base/recipes/pkg/test-reconstructible/hash +++ b/repos/base/recipes/pkg/test-reconstructible/hash @@ -1 +1 @@ -2022-11-28 07255ef26fc8ff63d164aa017b1062f5fa4f1dad +2023-01-23 c7e63734f6ae6a835e69f07576bf2f200bf73df6 diff --git a/repos/base/recipes/pkg/test-registry/hash b/repos/base/recipes/pkg/test-registry/hash index fe5da8fc1c..c313e1825b 100644 --- a/repos/base/recipes/pkg/test-registry/hash +++ b/repos/base/recipes/pkg/test-registry/hash @@ -1 +1 @@ -2022-11-28 c8b7e7eedc4aba80720e49432424c82eb5eb847b +2023-01-23 8bc654baeaead1ae5158a2cd26884ce043641a31 diff --git a/repos/base/recipes/pkg/test-rm_fault/hash b/repos/base/recipes/pkg/test-rm_fault/hash index f532e7ea3a..30c4034a2b 100644 --- a/repos/base/recipes/pkg/test-rm_fault/hash +++ b/repos/base/recipes/pkg/test-rm_fault/hash @@ -1 +1 @@ -2022-11-28 26cfc5fae062e4e3287b3ae73d111e5b731fd507 +2023-01-23 eb31707b6d962d44a6e0d1940b153e115ea27e0e diff --git a/repos/base/recipes/pkg/test-rm_fault_no_nox/hash b/repos/base/recipes/pkg/test-rm_fault_no_nox/hash index b0e7ca505d..f2e761fda8 100644 --- a/repos/base/recipes/pkg/test-rm_fault_no_nox/hash +++ b/repos/base/recipes/pkg/test-rm_fault_no_nox/hash @@ -1 +1 @@ -2022-11-28 ce526179fb7727a95ce6fd1e12b70d2c8b14f1fd +2023-01-23 89b38605804cf580ef20d20320ac423c8f9bb32a diff --git a/repos/base/recipes/pkg/test-rm_nested/hash b/repos/base/recipes/pkg/test-rm_nested/hash index 3fdc4219f4..9f59619cfa 100644 --- a/repos/base/recipes/pkg/test-rm_nested/hash +++ b/repos/base/recipes/pkg/test-rm_nested/hash @@ -1 +1 @@ -2022-11-28 7bfd7a1754bce62fcb628b4fe4f37d1afeb8aa62 +2023-01-23 31f4c7da63c1e2ae483bd82500cc1b0e148b7a94 diff --git a/repos/base/recipes/pkg/test-rm_stress/hash b/repos/base/recipes/pkg/test-rm_stress/hash index 20fc2476a9..88e13c6117 100644 --- a/repos/base/recipes/pkg/test-rm_stress/hash +++ b/repos/base/recipes/pkg/test-rm_stress/hash @@ -1 +1 @@ -2022-11-28 9a1cf2c7a2a97828b63c6f0ace0e4039f0cd9009 +2023-01-23 29d6989a43f306862f92eaf7d58e04ac987f29f3 diff --git a/repos/base/recipes/pkg/test-sanitizer/hash b/repos/base/recipes/pkg/test-sanitizer/hash index b8efb6a5f9..5eb36c6401 100644 --- a/repos/base/recipes/pkg/test-sanitizer/hash +++ b/repos/base/recipes/pkg/test-sanitizer/hash @@ -1 +1 @@ -2022-11-28 330249a2238707692af8b11950bd3e484ef3d2fb +2023-01-23 f37b15d522f0799fe9efb172f64f19854a02b72e diff --git a/repos/base/recipes/pkg/test-stack_smash/hash b/repos/base/recipes/pkg/test-stack_smash/hash index c79cef8cd1..27adacd91b 100644 --- a/repos/base/recipes/pkg/test-stack_smash/hash +++ b/repos/base/recipes/pkg/test-stack_smash/hash @@ -1 +1 @@ -2022-11-28 4981c2b06dce52d12dfa3ca54b3363a26693a168 +2023-01-23 7029230128f794ba8c8d33205741d42aa185b557 diff --git a/repos/base/recipes/pkg/test-synced_interface/hash b/repos/base/recipes/pkg/test-synced_interface/hash index cb4aee6485..534b408416 100644 --- a/repos/base/recipes/pkg/test-synced_interface/hash +++ b/repos/base/recipes/pkg/test-synced_interface/hash @@ -1 +1 @@ -2022-11-28 9fed19d998788be7ecd7aa55f2781e6979e05b98 +2023-01-23 3fbaa817f9891c0b86bd2e04751ee451781c802e diff --git a/repos/base/recipes/pkg/test-timer/hash b/repos/base/recipes/pkg/test-timer/hash index 474fc290a0..6d7bc149c8 100644 --- a/repos/base/recipes/pkg/test-timer/hash +++ b/repos/base/recipes/pkg/test-timer/hash @@ -1 +1 @@ -2022-11-28 acf0592eb4f536ac2487bee60e5a300e17322ce3 +2023-01-23 2b9a3bd463ce02f6b22024e20b0523f643771491 diff --git a/repos/base/recipes/pkg/test-tls/hash b/repos/base/recipes/pkg/test-tls/hash index 92a3310ada..f220ef9824 100644 --- a/repos/base/recipes/pkg/test-tls/hash +++ b/repos/base/recipes/pkg/test-tls/hash @@ -1 +1 @@ -2022-11-28 81f1719d4c422d52bb72635d67cb696113d05538 +2023-01-23 8811aa4b8dec3653ee913107a036daf215b3249c diff --git a/repos/base/recipes/pkg/test-token/hash b/repos/base/recipes/pkg/test-token/hash index 91ff3527e3..f03add21fe 100644 --- a/repos/base/recipes/pkg/test-token/hash +++ b/repos/base/recipes/pkg/test-token/hash @@ -1 +1 @@ -2022-11-28 a81f65b49dbefcce900e3dc4bb17266d59139f15 +2023-01-23 b64d590b8253f7d7d60d7b9f4c32f5c3af5a99d5 diff --git a/repos/base/recipes/pkg/test-xml_generator/hash b/repos/base/recipes/pkg/test-xml_generator/hash index 0754eedd2e..714a2ae2b6 100644 --- a/repos/base/recipes/pkg/test-xml_generator/hash +++ b/repos/base/recipes/pkg/test-xml_generator/hash @@ -1 +1 @@ -2022-11-28 b5e583a2b8e45cf0e76bd4084c56722c01dbae23 +2023-01-23 023dcd08c338b7f637202de43af1562614cb9964 diff --git a/repos/base/recipes/pkg/test-xml_node/hash b/repos/base/recipes/pkg/test-xml_node/hash index e85dbcaac0..6c09c657b6 100644 --- a/repos/base/recipes/pkg/test-xml_node/hash +++ b/repos/base/recipes/pkg/test-xml_node/hash @@ -1 +1 @@ -2022-11-28 c4322b1cdb3577e2ace0392674463ee3502c6671 +2023-01-23 658ada541c7fce432ae4383aaf8ece280a6f113c diff --git a/repos/base/recipes/src/test-ds_ownership/hash b/repos/base/recipes/src/test-ds_ownership/hash index 3381b8a2cf..3e1c29b709 100644 --- a/repos/base/recipes/src/test-ds_ownership/hash +++ b/repos/base/recipes/src/test-ds_ownership/hash @@ -1 +1 @@ -2022-11-28 a0af185e7e460bc6dabd748910f7fbd4d4f0dfb1 +2023-01-23 e637d76e409f0ad1b7eb0a8994c781441d9dbe44 diff --git a/repos/base/recipes/src/test-entrypoint/hash b/repos/base/recipes/src/test-entrypoint/hash index c0342616e0..9b43c26a59 100644 --- a/repos/base/recipes/src/test-entrypoint/hash +++ b/repos/base/recipes/src/test-entrypoint/hash @@ -1 +1 @@ -2022-11-28 0c907f7d61dc30f19ac6da140ba5f53dca8c1da1 +2023-01-23 d46285e56278284dad7a97bd342000c0baac84d4 diff --git a/repos/base/recipes/src/test-log/hash b/repos/base/recipes/src/test-log/hash index b2294c3711..b168a6a4ae 100644 --- a/repos/base/recipes/src/test-log/hash +++ b/repos/base/recipes/src/test-log/hash @@ -1 +1 @@ -2022-11-28 bbb1a42f32341bcb0e4484d23280d3673dfbc862 +2023-01-23 3e8309d87e93a74297d22d37d42db84d5f7027aa diff --git a/repos/base/recipes/src/test-mmio/hash b/repos/base/recipes/src/test-mmio/hash index 1a580b8804..5c36c48668 100644 --- a/repos/base/recipes/src/test-mmio/hash +++ b/repos/base/recipes/src/test-mmio/hash @@ -1 +1 @@ -2022-11-28 9423125e07ad67440bc5706fac70bcbab989eee1 +2023-01-23 59abbb90696f7beec4c6f4b03f6c921ea7286341 diff --git a/repos/base/recipes/src/test-new_delete/hash b/repos/base/recipes/src/test-new_delete/hash index 389b544a8c..f63a58f38c 100644 --- a/repos/base/recipes/src/test-new_delete/hash +++ b/repos/base/recipes/src/test-new_delete/hash @@ -1 +1 @@ -2022-11-28 0d5e727a64a19468fa712e4e4d09df11dbf5f332 +2023-01-23 41ae49dfef16efb95e9a18ad58640d63d1bbe53c diff --git a/repos/base/recipes/src/test-reconstructible/hash b/repos/base/recipes/src/test-reconstructible/hash index 282806c04b..6eb3ebd449 100644 --- a/repos/base/recipes/src/test-reconstructible/hash +++ b/repos/base/recipes/src/test-reconstructible/hash @@ -1 +1 @@ -2022-11-28 8d03cb6e09ffd09f8da94883b2383f818c3ec2e3 +2023-01-23 d6858c971aa7cd2801a109cb3365ca98a87af776 diff --git a/repos/base/recipes/src/test-registry/hash b/repos/base/recipes/src/test-registry/hash index 8b138830e2..384ddb880a 100644 --- a/repos/base/recipes/src/test-registry/hash +++ b/repos/base/recipes/src/test-registry/hash @@ -1 +1 @@ -2022-11-28 d83f259a57c46362ae5cb99a3db7d227be2e49e6 +2023-01-23 e869752ee8b8806bd3be6f4af6fbaf9f85a09570 diff --git a/repos/base/recipes/src/test-rm_fault/hash b/repos/base/recipes/src/test-rm_fault/hash index 1a2399a1cc..8a8c9751cf 100644 --- a/repos/base/recipes/src/test-rm_fault/hash +++ b/repos/base/recipes/src/test-rm_fault/hash @@ -1 +1 @@ -2022-11-28 c81e23a9289ced085ef20f2f38bdea8ab226a4c4 +2023-01-23 e4640743b1462007c8cfae253caac48fde729ae3 diff --git a/repos/base/recipes/src/test-rm_nested/hash b/repos/base/recipes/src/test-rm_nested/hash index 819ace99c0..1d93651f83 100644 --- a/repos/base/recipes/src/test-rm_nested/hash +++ b/repos/base/recipes/src/test-rm_nested/hash @@ -1 +1 @@ -2022-11-28 df1c0350d79841200c665c84ff1f97503c6d7379 +2023-01-23 7b8491fe0bac42c057779d5f744142a5020c2619 diff --git a/repos/base/recipes/src/test-rm_stress/hash b/repos/base/recipes/src/test-rm_stress/hash index 28b9e478bf..026897143d 100644 --- a/repos/base/recipes/src/test-rm_stress/hash +++ b/repos/base/recipes/src/test-rm_stress/hash @@ -1 +1 @@ -2022-11-28 efcb6e0a65748a77525b8183ee5117abfcbc1d6d +2023-01-23 a88bf1d56ee9e4eb0dd27dec1da33f55be9b1620 diff --git a/repos/base/recipes/src/test-sanitizer/hash b/repos/base/recipes/src/test-sanitizer/hash index 1ccf314013..9d5c166fd3 100644 --- a/repos/base/recipes/src/test-sanitizer/hash +++ b/repos/base/recipes/src/test-sanitizer/hash @@ -1 +1 @@ -2022-11-28 0ed1dbb332f5ccd52a9772beb187c7a132fbcaa0 +2023-01-23 4accf474fbc06fd093b26ac55c83830f93a708c7 diff --git a/repos/base/recipes/src/test-segfault/hash b/repos/base/recipes/src/test-segfault/hash index b69b6acfe2..461522701e 100644 --- a/repos/base/recipes/src/test-segfault/hash +++ b/repos/base/recipes/src/test-segfault/hash @@ -1 +1 @@ -2022-11-28 5cd78fbe34ade935d3731bb14901151abcf92e5e +2023-01-23 c7d5af197db3731538630d4ea142c7ab4a8cc797 diff --git a/repos/base/recipes/src/test-stack_smash/hash b/repos/base/recipes/src/test-stack_smash/hash index 33f32952fb..2960aaff45 100644 --- a/repos/base/recipes/src/test-stack_smash/hash +++ b/repos/base/recipes/src/test-stack_smash/hash @@ -1 +1 @@ -2022-11-28 073290fdbd6dde919173015719f2cccba8fca7e2 +2023-01-23 d240adc1caaf9819eecd1641b4bc6627334882c5 diff --git a/repos/base/recipes/src/test-synced_interface/hash b/repos/base/recipes/src/test-synced_interface/hash index bb6322cecd..9db2be9cdf 100644 --- a/repos/base/recipes/src/test-synced_interface/hash +++ b/repos/base/recipes/src/test-synced_interface/hash @@ -1 +1 @@ -2022-11-28 60d711f6c67c5b1ce5144efe889a32c66dcdcba7 +2023-01-23 dabc5afd92c7fd22fa4d41bf49688dd6020d2e9e diff --git a/repos/base/recipes/src/test-timer/hash b/repos/base/recipes/src/test-timer/hash index 20124199e0..91f90c4b17 100644 --- a/repos/base/recipes/src/test-timer/hash +++ b/repos/base/recipes/src/test-timer/hash @@ -1 +1 @@ -2022-11-28 1a50e1b783758f7f91f510e4479ca8451d35cabd +2023-01-23 10ce60bb1090abbd5ae420a23990666ab4aa2752 diff --git a/repos/base/recipes/src/test-tls/hash b/repos/base/recipes/src/test-tls/hash index 63bf3e4705..c145cb52dc 100644 --- a/repos/base/recipes/src/test-tls/hash +++ b/repos/base/recipes/src/test-tls/hash @@ -1 +1 @@ -2022-11-28 c2089cad10fc9185140641a3f9ebd857b2555715 +2023-01-23 c2dd5e47005ae0ef68d711a9bb8b0f8e032312f0 diff --git a/repos/base/recipes/src/test-token/hash b/repos/base/recipes/src/test-token/hash index 6921af8c09..2cf40e91d2 100644 --- a/repos/base/recipes/src/test-token/hash +++ b/repos/base/recipes/src/test-token/hash @@ -1 +1 @@ -2022-11-28 c65a8dd448678f98235a007aa94b040438bb1ff2 +2023-01-23 c0c2e72f7dabc111730f9f462d1e1ee44181bdd8 diff --git a/repos/base/recipes/src/test-xml_generator/hash b/repos/base/recipes/src/test-xml_generator/hash index 1c0b04afaa..f820c867fb 100644 --- a/repos/base/recipes/src/test-xml_generator/hash +++ b/repos/base/recipes/src/test-xml_generator/hash @@ -1 +1 @@ -2022-11-28 6b579c54c77e056dbd7d35bd1abbf3fe9846d084 +2023-01-23 ccda142b8b6b65af4c4397cbd480ff0bcac54781 diff --git a/repos/base/recipes/src/test-xml_node/hash b/repos/base/recipes/src/test-xml_node/hash index 41d467a040..b9f70d6a4a 100644 --- a/repos/base/recipes/src/test-xml_node/hash +++ b/repos/base/recipes/src/test-xml_node/hash @@ -1 +1 @@ -2022-11-28 f3cbb844e60da53a09571cff6701917c243a22bc +2023-01-23 7974cc716f764c681268ef787cefb3d4cbf4b187 diff --git a/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash b/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash index f2c5c37175..f154efda8f 100644 --- a/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash +++ b/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash @@ -1 +1 @@ -2022-11-28 6848cd66567304a5657be0b4618cb57272d0867c +2023-01-23 766faf24fa7cd8d212720f905ec81b2ead339a67 diff --git a/repos/dde_bsd/recipes/src/bsd_audio_drv/hash b/repos/dde_bsd/recipes/src/bsd_audio_drv/hash index ebdc301a33..6b0fb56a03 100644 --- a/repos/dde_bsd/recipes/src/bsd_audio_drv/hash +++ b/repos/dde_bsd/recipes/src/bsd_audio_drv/hash @@ -1 +1 @@ -2022-11-28 727fa6bfab0cdd85b249d1b40ec83603744e1590 +2023-01-23 e2e3eafe7f4d68e7e2bdd9d83827295473f94402 diff --git a/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash b/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash index 9a0b679c62..791e844af9 100644 --- a/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash +++ b/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash @@ -1 +1 @@ -2022-11-28 8dbebfae082434708a34ad0f7705de729795b750 +2023-01-23 da7b5fc9647d2906e6eea636f56f7e62a9a53c79 diff --git a/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash b/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash index 2ca38f5e9f..cdc56b5bd7 100644 --- a/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash +++ b/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash @@ -1 +1 @@ -2022-11-28 2f79cd0fd3048e40dfe722f03f851d9b9241c2ff +2023-01-23 a5b1a0ed7b48d414a1b4b4d4af143f5b7652bed9 diff --git a/repos/dde_linux/recipes/pkg/usb_modem_drv/hash b/repos/dde_linux/recipes/pkg/usb_modem_drv/hash index 8d674db164..9da11fe6c0 100644 --- a/repos/dde_linux/recipes/pkg/usb_modem_drv/hash +++ b/repos/dde_linux/recipes/pkg/usb_modem_drv/hash @@ -1 +1 @@ -2022-11-28 2736e2fd93e8eff477bf63fde88f9aee5bf2536e +2023-01-23 d40a63819a6ca3a3635b45c5b8d43f6f07e8e94e diff --git a/repos/dde_linux/recipes/pkg/wireguard/hash b/repos/dde_linux/recipes/pkg/wireguard/hash index d8b88bca5c..3893c9791b 100644 --- a/repos/dde_linux/recipes/pkg/wireguard/hash +++ b/repos/dde_linux/recipes/pkg/wireguard/hash @@ -1 +1 @@ -2022-11-28 ab75ee7a8386ce6b3a5ed5e4572affe36aa19853 +2023-01-23 c5e993d7fbe9f68f42dba0b6affa0c9d225696b2 diff --git a/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash b/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash index 564785ee0d..8eba4df533 100644 --- a/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash +++ b/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash @@ -1 +1 @@ -2022-11-28 7802af55e9bd84c2d54c25eea0fa265a95908ed0 +2023-01-23 3ae41e72cedd329295e33727ebf989eb0b922094 diff --git a/repos/dde_linux/recipes/src/usb_hid_drv/hash b/repos/dde_linux/recipes/src/usb_hid_drv/hash index 967679e343..b99eff8080 100644 --- a/repos/dde_linux/recipes/src/usb_hid_drv/hash +++ b/repos/dde_linux/recipes/src/usb_hid_drv/hash @@ -1 +1 @@ -2022-11-28 998c46e9c791486e13a2e1c4d45c99f65962d92b +2023-01-23 fd359222f1f172d72b99fcd17d3b8564e471c4dd diff --git a/repos/dde_linux/recipes/src/usb_modem_drv/hash b/repos/dde_linux/recipes/src/usb_modem_drv/hash index 171042ce63..5046ea1430 100644 --- a/repos/dde_linux/recipes/src/usb_modem_drv/hash +++ b/repos/dde_linux/recipes/src/usb_modem_drv/hash @@ -1 +1 @@ -2022-11-28 9b11a4880e99507fda1d939d3a4b5bda614e3235 +2023-01-23 cd6fd6835a0a1a0f564e3304abb27ca47334629d diff --git a/repos/dde_linux/recipes/src/usb_net_drv/hash b/repos/dde_linux/recipes/src/usb_net_drv/hash index d78d3c80da..4707773afd 100644 --- a/repos/dde_linux/recipes/src/usb_net_drv/hash +++ b/repos/dde_linux/recipes/src/usb_net_drv/hash @@ -1 +1 @@ -2022-11-28 343b8e047ab927555382da64309c8eaad3264d7a +2023-01-23 8156420f2e7ff847fd9097787db9ed0c1d93315d diff --git a/repos/dde_linux/recipes/src/vfs_lxip/hash b/repos/dde_linux/recipes/src/vfs_lxip/hash index ed5d4ea737..9581347e45 100644 --- a/repos/dde_linux/recipes/src/vfs_lxip/hash +++ b/repos/dde_linux/recipes/src/vfs_lxip/hash @@ -1 +1 @@ -2022-11-28 cb8af9269a7b354407e391e86ec3e773dd92570a +2023-01-23 9c7651ee31f05e02e4631c5576c334859b036645 diff --git a/repos/dde_linux/recipes/src/wireguard/hash b/repos/dde_linux/recipes/src/wireguard/hash index fef0123268..f1fc94fe13 100644 --- a/repos/dde_linux/recipes/src/wireguard/hash +++ b/repos/dde_linux/recipes/src/wireguard/hash @@ -1 +1 @@ -2022-11-28 a33c56f7c89c365037c5a6c3f15e021068fd902f +2023-01-23 d6cfcab3019ac92700984700a8a82e566186bd93 diff --git a/repos/dde_rump/recipes/pkg/ext2_fs/hash b/repos/dde_rump/recipes/pkg/ext2_fs/hash index 465fdd6b43..6cfc34baff 100644 --- a/repos/dde_rump/recipes/pkg/ext2_fs/hash +++ b/repos/dde_rump/recipes/pkg/ext2_fs/hash @@ -1 +1 @@ -2022-11-28 52af57263470bd47864d0ac56f7121670f597883 +2023-01-23 943889bcfa6cb13bd220f65869c26625be5a1d50 diff --git a/repos/dde_rump/recipes/src/rump/hash b/repos/dde_rump/recipes/src/rump/hash index a51d75075b..722274c122 100644 --- a/repos/dde_rump/recipes/src/rump/hash +++ b/repos/dde_rump/recipes/src/rump/hash @@ -1 +1 @@ -2022-11-28 f5eed1f6dc5063d82be723feab4ab5150475cf61 +2023-01-23 174522b770e6bb368a73b7b239cd74af3bc728f0 diff --git a/repos/demo/recipes/src/demo/hash b/repos/demo/recipes/src/demo/hash index f4602522bc..c1107e74d7 100644 --- a/repos/demo/recipes/src/demo/hash +++ b/repos/demo/recipes/src/demo/hash @@ -1 +1 @@ -2022-11-28 ab607bcc0b1dd4307ff53bc472bb4b9a3e26d403 +2023-01-23 24e9a60be8aec38923fc1088e61399182e64e8f6 diff --git a/repos/gems/recipes/pkg/backdrop/hash b/repos/gems/recipes/pkg/backdrop/hash index 77c9fb0664..25f5c0d297 100644 --- a/repos/gems/recipes/pkg/backdrop/hash +++ b/repos/gems/recipes/pkg/backdrop/hash @@ -1 +1 @@ -2022-11-28 b10a543f5bbe48410ee3e143b77c54a39e14846d +2023-01-23 d65c1f5be7dc40b832c1666bbcc7f26261e30284 diff --git a/repos/gems/recipes/pkg/cbe_check/hash b/repos/gems/recipes/pkg/cbe_check/hash index 3a023eb8d4..ffcd4eeaeb 100644 --- a/repos/gems/recipes/pkg/cbe_check/hash +++ b/repos/gems/recipes/pkg/cbe_check/hash @@ -1 +1 @@ -2022-11-28 1ee22221264b2c95e4545f6591b532ba3f628fe3 +2023-01-23 a492a465098e1aa07085ebaaa31626e7e416b9f4 diff --git a/repos/gems/recipes/pkg/cbe_demo/hash b/repos/gems/recipes/pkg/cbe_demo/hash index bc356c89a0..e65e16b41a 100644 --- a/repos/gems/recipes/pkg/cbe_demo/hash +++ b/repos/gems/recipes/pkg/cbe_demo/hash @@ -1 +1 @@ -2022-12-04 7bb3afba4392c8a758292616b38f2ef9ca760077 +2023-01-23 8ab645abb7caa047c24116f3779f4b11b72fb477 diff --git a/repos/gems/recipes/pkg/cbe_fs/hash b/repos/gems/recipes/pkg/cbe_fs/hash index 1be0a4c7f0..d5171406a4 100644 --- a/repos/gems/recipes/pkg/cbe_fs/hash +++ b/repos/gems/recipes/pkg/cbe_fs/hash @@ -1 +1 @@ -2022-11-28 e6a50213cd2ba486333425a2b2fa5f27a976697c +2023-01-23 025df13165bdc2bf59b37299735d5e312741720f diff --git a/repos/gems/recipes/pkg/cbe_init/hash b/repos/gems/recipes/pkg/cbe_init/hash index b23bbd7c12..c4a1727ae2 100644 --- a/repos/gems/recipes/pkg/cbe_init/hash +++ b/repos/gems/recipes/pkg/cbe_init/hash @@ -1 +1 @@ -2022-11-28 277306469c87a3c8690fa8399324d55a54248f62 +2023-01-23 9fb373cccdec7065a9d0ec4f95e42e4047a1f68b diff --git a/repos/gems/recipes/pkg/cbe_shell/hash b/repos/gems/recipes/pkg/cbe_shell/hash index c74adb3054..0a3b0e6e77 100644 --- a/repos/gems/recipes/pkg/cbe_shell/hash +++ b/repos/gems/recipes/pkg/cbe_shell/hash @@ -1 +1 @@ -2022-11-28 7f43d3b50bcc6a9ce3fa6faa2fc5f71f8831bb42 +2023-01-23 8385f9477a091b7fef8f2d4222237bbf7307ab2e diff --git a/repos/gems/recipes/pkg/cbe_ta_fs/hash b/repos/gems/recipes/pkg/cbe_ta_fs/hash index 6c901cc28b..71eb8ce8b5 100644 --- a/repos/gems/recipes/pkg/cbe_ta_fs/hash +++ b/repos/gems/recipes/pkg/cbe_ta_fs/hash @@ -1 +1 @@ -2022-11-28 2735b0d3df66fb7edde3d7aa7ac252532653cc45 +2023-01-23 50823dfa69e9e304ead291282eaea0169de9b0b7 diff --git a/repos/gems/recipes/pkg/cbe_ta_vfs/hash b/repos/gems/recipes/pkg/cbe_ta_vfs/hash index 066a373041..6221a7141f 100644 --- a/repos/gems/recipes/pkg/cbe_ta_vfs/hash +++ b/repos/gems/recipes/pkg/cbe_ta_vfs/hash @@ -1 +1 @@ -2022-11-28 17acc493e5d2e87871cbee7a4224b249c7c028fd +2023-01-23 a8da2957360f0842e98eb98bc9aae63f93cbe4a2 diff --git a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash index 17a5014b70..6f66e1f512 100644 --- a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash +++ b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash @@ -1 +1 @@ -2022-12-04 dffe13b5ad290b0822e27655379d14cece73dda3 +2023-01-23 f08d9b9860c5a05ebb3c44e0d28964d0443e0091 diff --git a/repos/gems/recipes/pkg/cbe_vfs/hash b/repos/gems/recipes/pkg/cbe_vfs/hash index 859c004292..28456e5b11 100644 --- a/repos/gems/recipes/pkg/cbe_vfs/hash +++ b/repos/gems/recipes/pkg/cbe_vfs/hash @@ -1 +1 @@ -2022-11-28 b4cf460dd4670bd6690d787d317bf1d79dc861a9 +2023-01-23 4a73b7086673789b1cfe9c1f3fc27eb0c04bab1a diff --git a/repos/gems/recipes/pkg/cbe_vm_fs/hash b/repos/gems/recipes/pkg/cbe_vm_fs/hash index e7a34412d8..ec0b308969 100644 --- a/repos/gems/recipes/pkg/cbe_vm_fs/hash +++ b/repos/gems/recipes/pkg/cbe_vm_fs/hash @@ -1 +1 @@ -2022-11-28 210c41b473a68a8c08f16bb709b6160e127de0ea +2023-01-23 9dda30f60e0ffc1d0a3f100702d521afc1aeb6ee diff --git a/repos/gems/recipes/pkg/depot_download/hash b/repos/gems/recipes/pkg/depot_download/hash index 1901f633be..bc8943c7db 100644 --- a/repos/gems/recipes/pkg/depot_download/hash +++ b/repos/gems/recipes/pkg/depot_download/hash @@ -1 +1 @@ -2022-11-28 e86d94d146a531dff1cd8b46d4f2aa3135d32597 +2023-01-23 eb044aa40c180ff8ef48c54c33bac1a9bdb479a2 diff --git a/repos/gems/recipes/pkg/download_coreplus/hash b/repos/gems/recipes/pkg/download_coreplus/hash index 0265ed9655..9443399f61 100644 --- a/repos/gems/recipes/pkg/download_coreplus/hash +++ b/repos/gems/recipes/pkg/download_coreplus/hash @@ -1 +1 @@ -2022-11-28 5d18299b2a80937cd53a9891567bb0018ce52f52 +2023-01-23 66b2833f86e6cc430d487ece9ea923fd0b92788c diff --git a/repos/gems/recipes/pkg/drivers_managed-pc/hash b/repos/gems/recipes/pkg/drivers_managed-pc/hash index adfd4036ec..d03a0bedb4 100644 --- a/repos/gems/recipes/pkg/drivers_managed-pc/hash +++ b/repos/gems/recipes/pkg/drivers_managed-pc/hash @@ -1 +1 @@ -2022-11-28 836fdc788f8c25a57909ff895fedf6f1db6f655f +2023-01-23 bbf028e2d400c87efc8e3e2b6b297d3a2e535387 diff --git a/repos/gems/recipes/pkg/drivers_nic-pc/hash b/repos/gems/recipes/pkg/drivers_nic-pc/hash index 6f21bec484..040fcf8847 100644 --- a/repos/gems/recipes/pkg/drivers_nic-pc/hash +++ b/repos/gems/recipes/pkg/drivers_nic-pc/hash @@ -1 +1 @@ -2022-11-28 26d587d4f74ba5095b37e5cb454337ca2ba9d327 +2023-01-23 1d2385f8e5d9092592fd9781c38509ca0ff70c21 diff --git a/repos/gems/recipes/pkg/file_vault/hash b/repos/gems/recipes/pkg/file_vault/hash index 54d987c617..23e1bd7308 100644 --- a/repos/gems/recipes/pkg/file_vault/hash +++ b/repos/gems/recipes/pkg/file_vault/hash @@ -1 +1 @@ -2022-11-28 eed4bf9a2df52787ab8f1667038e62734d076536 +2023-01-23 746114b60b537273a8661ba6a77b30ebe45dcd0b diff --git a/repos/gems/recipes/pkg/fonts_fs/hash b/repos/gems/recipes/pkg/fonts_fs/hash index b76a5bbc71..0ca44189c1 100644 --- a/repos/gems/recipes/pkg/fonts_fs/hash +++ b/repos/gems/recipes/pkg/fonts_fs/hash @@ -1 +1 @@ -2022-11-28 b3636e55f1acf66208ea2ef82f38be55e563c251 +2023-01-23 f72f364bd636d16ce48f0412e55ca05a510af33c diff --git a/repos/gems/recipes/pkg/motif_decorator/hash b/repos/gems/recipes/pkg/motif_decorator/hash index 292bebc0b8..7640713b1a 100644 --- a/repos/gems/recipes/pkg/motif_decorator/hash +++ b/repos/gems/recipes/pkg/motif_decorator/hash @@ -1 +1 @@ -2022-11-28 8c8d2a2a1ea5a8c7dbe294fc7be963ab084dee98 +2023-01-23 10faac219d127b3ca435a7f0b3b5279f51c7dc94 diff --git a/repos/gems/recipes/pkg/motif_wm/hash b/repos/gems/recipes/pkg/motif_wm/hash index 69ec5fdc62..b40684c189 100644 --- a/repos/gems/recipes/pkg/motif_wm/hash +++ b/repos/gems/recipes/pkg/motif_wm/hash @@ -1 +1 @@ -2022-11-28 abb82f2cf9672e91b9e33858616f494942d81fb3 +2023-01-23 4a87ccc0385b01866adc8c021efb37d9e98ae5cb diff --git a/repos/gems/recipes/pkg/nano3d/hash b/repos/gems/recipes/pkg/nano3d/hash index a2fd8e3049..071b067206 100644 --- a/repos/gems/recipes/pkg/nano3d/hash +++ b/repos/gems/recipes/pkg/nano3d/hash @@ -1 +1 @@ -2022-11-28 4c644ad993be994acdca966edeee9217e7da85a8 +2023-01-23 5024394daad8f219afc6ae688f1d3f5643bf1aa3 diff --git a/repos/gems/recipes/pkg/sculpt/hash b/repos/gems/recipes/pkg/sculpt/hash index 21f485d406..6d7898922c 100644 --- a/repos/gems/recipes/pkg/sculpt/hash +++ b/repos/gems/recipes/pkg/sculpt/hash @@ -1 +1 @@ -2022-12-04 336e36c9780fdc8106b57910fcf8da9655d44b20 +2023-01-23 b2525190f782d7b475950fcbc8a827c1eb12841c diff --git a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash index 7b792814bb..5be58b4f64 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash @@ -1 +1 @@ -2022-12-04 eec6608e1861b4217b32b2c418eb41041de40d3a +2023-01-23 04a6e6727803cd7acf54dff7ec7eed0c454bd43e diff --git a/repos/gems/recipes/pkg/sculpt_distribution/hash b/repos/gems/recipes/pkg/sculpt_distribution/hash index 2d69f00c22..aec3e51edb 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution/hash @@ -1 +1 @@ -2022-11-28 5c74f6958249c1aff39d470d52f08ead451e49b1 +2023-01-23 6f3f6c8dd1bbbbf4851fa5f56d6ab4f91e5c18f5 diff --git a/repos/gems/recipes/pkg/sticks_blue_backdrop/hash b/repos/gems/recipes/pkg/sticks_blue_backdrop/hash index 8e2ea7e1e6..6ee09e8f45 100644 --- a/repos/gems/recipes/pkg/sticks_blue_backdrop/hash +++ b/repos/gems/recipes/pkg/sticks_blue_backdrop/hash @@ -1 +1 @@ -2022-11-28 e1c565e161b93391a5ae5341ee30c22273eb50c5 +2023-01-23 adb33c5797f3a676176e0dff7047570669c24ca1 diff --git a/repos/gems/recipes/pkg/terminal/hash b/repos/gems/recipes/pkg/terminal/hash index f7cd6735b9..4c4b965727 100644 --- a/repos/gems/recipes/pkg/terminal/hash +++ b/repos/gems/recipes/pkg/terminal/hash @@ -1 +1 @@ -2022-11-28 8778b62968db3468fe15285fe911b15651b9a38e +2023-01-23 cef755f0d455508d5717828e54832649465ecc75 diff --git a/repos/gems/recipes/pkg/test-depot_query_index/hash b/repos/gems/recipes/pkg/test-depot_query_index/hash index 915354fcf1..fac573103b 100644 --- a/repos/gems/recipes/pkg/test-depot_query_index/hash +++ b/repos/gems/recipes/pkg/test-depot_query_index/hash @@ -1 +1 @@ -2022-11-28 7a23dfd000e07f92bf8bafa338e27196eb4585ee +2023-01-23 38104dae4c3e7db9af38213e041541219f29158b diff --git a/repos/gems/recipes/pkg/test-fs_tool/hash b/repos/gems/recipes/pkg/test-fs_tool/hash index 352b083cc1..10f7452b52 100644 --- a/repos/gems/recipes/pkg/test-fs_tool/hash +++ b/repos/gems/recipes/pkg/test-fs_tool/hash @@ -1 +1 @@ -2022-11-28 51301c4dca52400bab9c2a12e29d2d6dc10877c5 +2023-01-23 e6a8e42ab2ec04821421d4857fafb4b4ca44638b diff --git a/repos/gems/recipes/pkg/test-libc_vfs_audit/hash b/repos/gems/recipes/pkg/test-libc_vfs_audit/hash index 7908af4054..30971682c0 100644 --- a/repos/gems/recipes/pkg/test-libc_vfs_audit/hash +++ b/repos/gems/recipes/pkg/test-libc_vfs_audit/hash @@ -1 +1 @@ -2022-11-28 7d42b9a71c956aaf692aaf27820d4839402ef386 +2023-01-23 4eda889fcc61507128cc3118f5762f8f917deab0 diff --git a/repos/gems/recipes/pkg/themed_decorator/hash b/repos/gems/recipes/pkg/themed_decorator/hash index 1f2a012db2..3c4a80b3b8 100644 --- a/repos/gems/recipes/pkg/themed_decorator/hash +++ b/repos/gems/recipes/pkg/themed_decorator/hash @@ -1 +1 @@ -2022-11-28 f9e86fa7343def96db4941bcd8dcf6d475d063d6 +2023-01-23 a39424b03fef0776c395aa06635bd16f21c26e7d diff --git a/repos/gems/recipes/pkg/themed_wm/hash b/repos/gems/recipes/pkg/themed_wm/hash index 109faed0dd..5bf306d0ed 100644 --- a/repos/gems/recipes/pkg/themed_wm/hash +++ b/repos/gems/recipes/pkg/themed_wm/hash @@ -1 +1 @@ -2022-11-28 c98125173a78d7cfc801e64d6a63200b349d34d3 +2023-01-23 54c4efeb97a0ffec7e8736a23f1c99f75db4e31c diff --git a/repos/gems/recipes/pkg/touch_keyboard/hash b/repos/gems/recipes/pkg/touch_keyboard/hash index 67738f565e..042bfc16f6 100644 --- a/repos/gems/recipes/pkg/touch_keyboard/hash +++ b/repos/gems/recipes/pkg/touch_keyboard/hash @@ -1 +1 @@ -2022-11-28 9890a7e5ba89114c69c6161aaa6e10accf59a3f0 +2023-01-23 3c73dbf1fbdc21445250996ff47a3e2f7f5d0d45 diff --git a/repos/gems/recipes/pkg/trace_fs/hash b/repos/gems/recipes/pkg/trace_fs/hash index 1ae19e6a5f..7212af6648 100644 --- a/repos/gems/recipes/pkg/trace_fs/hash +++ b/repos/gems/recipes/pkg/trace_fs/hash @@ -1 +1 @@ -2022-11-28 a6f67fd9b282fc42cf3da058df6114da050f097c +2023-01-23 d629cdbf07cc34df76e1e8f470170fa6f74ffef0 diff --git a/repos/gems/recipes/pkg/trace_recorder/hash b/repos/gems/recipes/pkg/trace_recorder/hash index 4572b3b7b3..7f5d08cb44 100644 --- a/repos/gems/recipes/pkg/trace_recorder/hash +++ b/repos/gems/recipes/pkg/trace_recorder/hash @@ -1 +1 @@ -2022-11-28 a493ba2cf3016770c20731d09c7bc7b5035a8981 +2023-01-23 9b39724c4e5b5b4bba1cdfc8e591d45e65a689ef diff --git a/repos/gems/recipes/pkg/window_layouter/hash b/repos/gems/recipes/pkg/window_layouter/hash index 8e6812206a..d40adc36b3 100644 --- a/repos/gems/recipes/pkg/window_layouter/hash +++ b/repos/gems/recipes/pkg/window_layouter/hash @@ -1 +1 @@ -2022-11-28 e60dcae97ca301fd032b83c570384f7917b125bf +2023-01-23 604e5cb7caf95e874465f5e45fc0acfd12b30430 diff --git a/repos/gems/recipes/pkg/wm/hash b/repos/gems/recipes/pkg/wm/hash index 4986722653..be9419e963 100644 --- a/repos/gems/recipes/pkg/wm/hash +++ b/repos/gems/recipes/pkg/wm/hash @@ -1 +1 @@ -2022-11-28 0dc98e078addeb0c569c9d09c9edcf09f917cd46 +2023-01-23 c1ce4b4468c7a76373fe6e66865457750e5f8b52 diff --git a/repos/gems/recipes/src/backdrop/hash b/repos/gems/recipes/src/backdrop/hash index 6667c51c16..03020e5471 100644 --- a/repos/gems/recipes/src/backdrop/hash +++ b/repos/gems/recipes/src/backdrop/hash @@ -1 +1 @@ -2022-11-28 178a2e1a69d24e103dd9b8338969c27fd4d00d54 +2023-01-23 60d7e935aded36051717ef3db98a4036878e6a27 diff --git a/repos/gems/recipes/src/cbe/hash b/repos/gems/recipes/src/cbe/hash index 7757515f44..c5a8aa3ea7 100644 --- a/repos/gems/recipes/src/cbe/hash +++ b/repos/gems/recipes/src/cbe/hash @@ -1 +1 @@ -2022-11-28 aa78e96f2d33106a20e5e5d4aa5c6065392a6ae8 +2023-01-23 ba4211191c27c4bbb04d63c33847e0b079a89380 diff --git a/repos/gems/recipes/src/cpu_load_display/hash b/repos/gems/recipes/src/cpu_load_display/hash index c75460e538..c9a234e652 100644 --- a/repos/gems/recipes/src/cpu_load_display/hash +++ b/repos/gems/recipes/src/cpu_load_display/hash @@ -1 +1 @@ -2022-11-28 a6a2ee70b1c9ec32badcbdc17b77964888191595 +2023-01-23 a2fe561a8de545a401e7aa374b6c43fae2e71316 diff --git a/repos/gems/recipes/src/decorator/hash b/repos/gems/recipes/src/decorator/hash index e9cf12351d..01fad32045 100644 --- a/repos/gems/recipes/src/decorator/hash +++ b/repos/gems/recipes/src/decorator/hash @@ -1 +1 @@ -2022-11-28 7a7decfc6e089b63be4e15b939eae384a84194de +2023-01-23 0486a77334f81ade97b42a904051d9f7396e41a7 diff --git a/repos/gems/recipes/src/depot_deploy/hash b/repos/gems/recipes/src/depot_deploy/hash index 641693fd4c..7da5d25175 100644 --- a/repos/gems/recipes/src/depot_deploy/hash +++ b/repos/gems/recipes/src/depot_deploy/hash @@ -1 +1 @@ -2022-11-28 dc81f5b3d25af2103255188af2de6995aec04034 +2023-01-23 acc211c5421856e75dba2dbc0d4bca8267e3212c diff --git a/repos/gems/recipes/src/depot_download_manager/hash b/repos/gems/recipes/src/depot_download_manager/hash index 7fbfc2badd..087e83c0c4 100644 --- a/repos/gems/recipes/src/depot_download_manager/hash +++ b/repos/gems/recipes/src/depot_download_manager/hash @@ -1 +1 @@ -2022-11-28 a3a15f17e007bde187a2972709ad064a2a0c601f +2023-01-23 cda04d7ef7fc5096a27a917e7cef108a61b86b0e diff --git a/repos/gems/recipes/src/depot_query/hash b/repos/gems/recipes/src/depot_query/hash index 5f0eedc586..c3a7394d5c 100644 --- a/repos/gems/recipes/src/depot_query/hash +++ b/repos/gems/recipes/src/depot_query/hash @@ -1 +1 @@ -2022-11-28 9aa1162c9d118f8d95c483309fb8dad426805f45 +2023-01-23 8a596a097d06ad69077ae6caf67ff39a25a5f8f8 diff --git a/repos/gems/recipes/src/driver_manager/hash b/repos/gems/recipes/src/driver_manager/hash index 7165908d24..7b1603d392 100644 --- a/repos/gems/recipes/src/driver_manager/hash +++ b/repos/gems/recipes/src/driver_manager/hash @@ -1 +1 @@ -2022-11-28 ec54cf3f63cecb1c74c585c82b3c901b374779ef +2023-01-23 89f0256891a6911c63aa5d1d603bb687053145e6 diff --git a/repos/gems/recipes/src/file_terminal/hash b/repos/gems/recipes/src/file_terminal/hash index 3efda36ff3..fed54a92fb 100644 --- a/repos/gems/recipes/src/file_terminal/hash +++ b/repos/gems/recipes/src/file_terminal/hash @@ -1 +1 @@ -2022-11-28 7b007fbfa82c8ad68cd527facd0984b16228c7d6 +2023-01-23 35aa1e8a86cb39e6a5989a89ec31f84022267806 diff --git a/repos/gems/recipes/src/file_vault/hash b/repos/gems/recipes/src/file_vault/hash index 0a79edd3ca..2a87ce32d2 100644 --- a/repos/gems/recipes/src/file_vault/hash +++ b/repos/gems/recipes/src/file_vault/hash @@ -1 +1 @@ -2022-11-28 646ca249d4aaec8d8a6e12f0eb3adb82964de87a +2023-01-23 80ce8c4da64c49b3daf16de530fd39792e74be92 diff --git a/repos/gems/recipes/src/fs_query/hash b/repos/gems/recipes/src/fs_query/hash index e067b8b3d7..0279bab950 100644 --- a/repos/gems/recipes/src/fs_query/hash +++ b/repos/gems/recipes/src/fs_query/hash @@ -1 +1 @@ -2022-11-28 3610f9f1999e64ad3e6520fa8d1854bcc226333b +2023-01-23 d76271691a453f668877f334fe2e192494a0dca5 diff --git a/repos/gems/recipes/src/fs_tool/hash b/repos/gems/recipes/src/fs_tool/hash index 854130f951..7bf2fd9539 100644 --- a/repos/gems/recipes/src/fs_tool/hash +++ b/repos/gems/recipes/src/fs_tool/hash @@ -1 +1 @@ -2022-11-28 08bae47a5b700efc549195647cbe91314d369760 +2023-01-23 686388dbf4e6f386c14de2d17d84eeec2029cca7 diff --git a/repos/gems/recipes/src/gpt_write/hash b/repos/gems/recipes/src/gpt_write/hash index 69d381dd4f..7b5082db59 100644 --- a/repos/gems/recipes/src/gpt_write/hash +++ b/repos/gems/recipes/src/gpt_write/hash @@ -1 +1 @@ -2022-11-28 0a36d011f8e9b5f95037c2f91a08f2970af80afc +2023-01-23 c01f8864af23a333f0ee731d4338f8a285ab5436 diff --git a/repos/gems/recipes/src/gui_fader/hash b/repos/gems/recipes/src/gui_fader/hash index 181629af0a..af892055dd 100644 --- a/repos/gems/recipes/src/gui_fader/hash +++ b/repos/gems/recipes/src/gui_fader/hash @@ -1 +1 @@ -2022-11-28 ca3b925f90f62a16ffa11fe7506fe2e23774dd29 +2023-01-23 734b35346d1aac7b4e54ce0ba27adf49fded8744 diff --git a/repos/gems/recipes/src/menu_view/hash b/repos/gems/recipes/src/menu_view/hash index 84e7f78ffa..45c6565705 100644 --- a/repos/gems/recipes/src/menu_view/hash +++ b/repos/gems/recipes/src/menu_view/hash @@ -1 +1 @@ -2022-11-28 4e509f07f2dc56490031d58aa8c46a3690bb5b1b +2023-01-23 2430d46a8b572de6f389f956908afda0ddc85f66 diff --git a/repos/gems/recipes/src/mixer_gui_qt/hash b/repos/gems/recipes/src/mixer_gui_qt/hash index 626067f3b4..0a8ba91284 100644 --- a/repos/gems/recipes/src/mixer_gui_qt/hash +++ b/repos/gems/recipes/src/mixer_gui_qt/hash @@ -1 +1 @@ -2022-11-28 891b5c550c0192fc5133c36fbc46233c76cb95e9 +2023-01-23 8f8d49af87837a0ca08a70fc4dac1a09107e1de4 diff --git a/repos/gems/recipes/src/nano3d/hash b/repos/gems/recipes/src/nano3d/hash index 676cb1ec60..ced56ab7cf 100644 --- a/repos/gems/recipes/src/nano3d/hash +++ b/repos/gems/recipes/src/nano3d/hash @@ -1 +1 @@ -2022-11-28 93496d680d49e19469cea914451ad80f18a773c4 +2023-01-23 d6a75d72d81819e9e940bca6508583fbc58fde67 diff --git a/repos/gems/recipes/src/sculpt_manager/hash b/repos/gems/recipes/src/sculpt_manager/hash index 86b81d7542..b79b78248b 100644 --- a/repos/gems/recipes/src/sculpt_manager/hash +++ b/repos/gems/recipes/src/sculpt_manager/hash @@ -1 +1 @@ -2022-12-04 39694aec44b518afb97f720ded84496ca534680f +2023-01-23 afdc4c9e65891916e1bde171ba93bc4850e2f345 diff --git a/repos/gems/recipes/src/terminal/hash b/repos/gems/recipes/src/terminal/hash index 77fefdb651..dd10563b80 100644 --- a/repos/gems/recipes/src/terminal/hash +++ b/repos/gems/recipes/src/terminal/hash @@ -1 +1 @@ -2022-11-28 b4f4b24c4b61ec77d925c539c701a34a0c78995d +2023-01-23 369dee7db2bfad628728fc3d2e88586ecd867b32 diff --git a/repos/gems/recipes/src/test-tiled_wm/hash b/repos/gems/recipes/src/test-tiled_wm/hash index 54e2785004..f1a69425f2 100644 --- a/repos/gems/recipes/src/test-tiled_wm/hash +++ b/repos/gems/recipes/src/test-tiled_wm/hash @@ -1 +1 @@ -2022-11-28 3a73e92e2ab621b350cdb9f1165c988e636fb54c +2023-01-23 2b5f4f6ecb98c3cf22532c05b3d9d06991a687a1 diff --git a/repos/gems/recipes/src/text_area/hash b/repos/gems/recipes/src/text_area/hash index 74cce147c3..7e8012547b 100644 --- a/repos/gems/recipes/src/text_area/hash +++ b/repos/gems/recipes/src/text_area/hash @@ -1 +1 @@ -2022-11-28 d24d4abaf3ad825756cec938986c500c79bf7d6a +2023-01-23 a0bab996627db08419b620d7cc2c74499c75fdba diff --git a/repos/gems/recipes/src/themed_decorator/hash b/repos/gems/recipes/src/themed_decorator/hash index d9b9dcffae..3265c2a6af 100644 --- a/repos/gems/recipes/src/themed_decorator/hash +++ b/repos/gems/recipes/src/themed_decorator/hash @@ -1 +1 @@ -2022-11-28 45f860f93636fafd9c8dfbfd7a3fbd2603ec9df9 +2023-01-23 3be3a45ecd733b370b8046682f18b27df740053c diff --git a/repos/gems/recipes/src/touch_keyboard/hash b/repos/gems/recipes/src/touch_keyboard/hash index 9dd55abda4..684f61414b 100644 --- a/repos/gems/recipes/src/touch_keyboard/hash +++ b/repos/gems/recipes/src/touch_keyboard/hash @@ -1 +1 @@ -2022-11-28 250904babcfa1842a9c0f60e4b5e902debb8d03c +2023-01-23 164aab8ebe0882ab57b40fcb1f8a5e578ba2fd48 diff --git a/repos/gems/recipes/src/trace_recorder/hash b/repos/gems/recipes/src/trace_recorder/hash index 62de01f130..ab60d5383b 100644 --- a/repos/gems/recipes/src/trace_recorder/hash +++ b/repos/gems/recipes/src/trace_recorder/hash @@ -1 +1 @@ -2022-11-28 0b74fcb1e9bc2007686bf284678ecfd74ac01a80 +2023-01-23 20db2efed23348ae95b3b39c134283395e61d901 diff --git a/repos/gems/recipes/src/trace_recorder_policy/hash b/repos/gems/recipes/src/trace_recorder_policy/hash index f80e898ed5..4166793006 100644 --- a/repos/gems/recipes/src/trace_recorder_policy/hash +++ b/repos/gems/recipes/src/trace_recorder_policy/hash @@ -1 +1 @@ -2022-11-28 0f84b459836ca9789288f50fe92d754fd4913c1b +2023-01-23 380566f47ea7b7deddd135a0431456b4b57fe309 diff --git a/repos/gems/recipes/src/vfs_audit/hash b/repos/gems/recipes/src/vfs_audit/hash index 8ca52615fb..a13e32faea 100644 --- a/repos/gems/recipes/src/vfs_audit/hash +++ b/repos/gems/recipes/src/vfs_audit/hash @@ -1 +1 @@ -2022-11-28 1444e5e77be9f2eb28a610674eb57bc38e75afc3 +2023-01-23 b879e3c632630e6b1ac3dad2333dab1f33b25026 diff --git a/repos/gems/recipes/src/vfs_gpu/hash b/repos/gems/recipes/src/vfs_gpu/hash index ac327eb23c..759582fbe0 100644 --- a/repos/gems/recipes/src/vfs_gpu/hash +++ b/repos/gems/recipes/src/vfs_gpu/hash @@ -1 +1 @@ -2022-11-28 67a860c3129099983289117ea962d928c212eb3e +2023-01-23 b4366f355a0d17fa0eaae36c205162590e2fbf65 diff --git a/repos/gems/recipes/src/vfs_import/hash b/repos/gems/recipes/src/vfs_import/hash index d8d3b4c259..80f6d01ccd 100644 --- a/repos/gems/recipes/src/vfs_import/hash +++ b/repos/gems/recipes/src/vfs_import/hash @@ -1 +1 @@ -2022-11-28 898a4182af848e49c887fdd3cb31a93e33bc9b05 +2023-01-23 ec67075b6fd5e725ab34f02d5739d6a5ac22173c diff --git a/repos/gems/recipes/src/vfs_pipe/hash b/repos/gems/recipes/src/vfs_pipe/hash index a98ae4d0e3..2c9836a990 100644 --- a/repos/gems/recipes/src/vfs_pipe/hash +++ b/repos/gems/recipes/src/vfs_pipe/hash @@ -1 +1 @@ -2022-11-28 ea9080ddda1d8b0b9032045088db4bdc77532616 +2023-01-23 c2946412169ba5c30014f45cbe6cb978b0827886 diff --git a/repos/gems/recipes/src/vfs_trace/hash b/repos/gems/recipes/src/vfs_trace/hash index 67e6bbd729..f021055b9a 100644 --- a/repos/gems/recipes/src/vfs_trace/hash +++ b/repos/gems/recipes/src/vfs_trace/hash @@ -1 +1 @@ -2022-11-28 d8f6be91515ccd15edd3cce77ed7ca93d5760c15 +2023-01-23 1a39e04e72b67ccec06b19b49265de5367d45f2a diff --git a/repos/gems/recipes/src/vfs_ttf/hash b/repos/gems/recipes/src/vfs_ttf/hash index 005607a152..99bcb423d0 100644 --- a/repos/gems/recipes/src/vfs_ttf/hash +++ b/repos/gems/recipes/src/vfs_ttf/hash @@ -1 +1 @@ -2022-11-28 1622eabbc307577c3ca01c7c48a5830dcd59bc83 +2023-01-23 7d25516d588e8cb24fd3c16eb38d7255e376a814 diff --git a/repos/gems/recipes/src/window_layouter/hash b/repos/gems/recipes/src/window_layouter/hash index cd29853e8f..5a5a2124b1 100644 --- a/repos/gems/recipes/src/window_layouter/hash +++ b/repos/gems/recipes/src/window_layouter/hash @@ -1 +1 @@ -2022-11-28 3c5816e6936409cb5ee582a5f848cc5373b873c5 +2023-01-23 0ceda18d160593db2d7a49f374dcd5e52d34d9fe diff --git a/repos/gems/recipes/src/wm/hash b/repos/gems/recipes/src/wm/hash index f93749bd28..48887f7029 100644 --- a/repos/gems/recipes/src/wm/hash +++ b/repos/gems/recipes/src/wm/hash @@ -1 +1 @@ -2022-11-28 c48556031030008518d93a409314d50057335013 +2023-01-23 15ebb8f9004430dc1d4f007eaf288a7b80ef53aa diff --git a/repos/libports/recipes/api/curl/hash b/repos/libports/recipes/api/curl/hash index 91b48f948f..3dc075ca75 100644 --- a/repos/libports/recipes/api/curl/hash +++ b/repos/libports/recipes/api/curl/hash @@ -1 +1 @@ -2022-11-16 7c2eed84cd67d82a4b4326f718e9885964abb847 +2023-01-23 1a51152715549e85b656edd43fad09d7fdfe36a1 diff --git a/repos/libports/recipes/api/libc/hash b/repos/libports/recipes/api/libc/hash index 060407a39a..e6a0ba2e37 100644 --- a/repos/libports/recipes/api/libc/hash +++ b/repos/libports/recipes/api/libc/hash @@ -1 +1 @@ -2022-08-30 6943e7821ad6e8c36ce46b109db41ca2e6d730f1 +2023-01-23 bc7fc89ccae82777f8ffb0a498369fa5a0bf650e diff --git a/repos/libports/recipes/api/lwip/hash b/repos/libports/recipes/api/lwip/hash index 175be1edeb..fae7af0059 100644 --- a/repos/libports/recipes/api/lwip/hash +++ b/repos/libports/recipes/api/lwip/hash @@ -1 +1 @@ -2022-11-16 b9b95ee7902032cdb3619d1601d28fb9eab83251 +2023-01-23 78c260b742a14c2b071c4ce04c2ba24a108ec851 diff --git a/repos/libports/recipes/api/qt5/hash b/repos/libports/recipes/api/qt5/hash index 8ff900f2f1..9ed6cfb82f 100644 --- a/repos/libports/recipes/api/qt5/hash +++ b/repos/libports/recipes/api/qt5/hash @@ -1 +1 @@ -2022-11-16 870762f90b93b42bc17f568f7a199f901bac36ec +2023-01-23 f1ecc4853d6772a86c2e0a263a959143d8b54ebb diff --git a/repos/libports/recipes/pkg/acpica/hash b/repos/libports/recipes/pkg/acpica/hash index 0cd84f422c..9b2159ef83 100644 --- a/repos/libports/recipes/pkg/acpica/hash +++ b/repos/libports/recipes/pkg/acpica/hash @@ -1 +1 @@ -2022-11-28 644e11b5e9ccecb07d65d6fddfa83d67a6685395 +2023-01-23 d68437d48888bda0cd84545c8edc79a14b0f6c2a diff --git a/repos/libports/recipes/pkg/gcov/hash b/repos/libports/recipes/pkg/gcov/hash index 0df8d930bd..855d41fc93 100644 --- a/repos/libports/recipes/pkg/gcov/hash +++ b/repos/libports/recipes/pkg/gcov/hash @@ -1 +1 @@ -2022-11-28 11d28d9c926b9fff0b138df0928dd37a19682f14 +2023-01-23 6da78ed7f12d82abd4b4a67b9d71a0d785f1b231 diff --git a/repos/libports/recipes/pkg/mesa_gears/hash b/repos/libports/recipes/pkg/mesa_gears/hash index 6a972640d9..e8d69f3710 100644 --- a/repos/libports/recipes/pkg/mesa_gears/hash +++ b/repos/libports/recipes/pkg/mesa_gears/hash @@ -1 +1 @@ -2022-11-28 4c7c7ffd06022c8ec489dd5b2492b9d4c90f8a70 +2023-01-23 e6d3fff61cfdc1f773ccf85bb25cfa4d479984ec diff --git a/repos/libports/recipes/pkg/mesa_gpu-cpu/hash b/repos/libports/recipes/pkg/mesa_gpu-cpu/hash index 028fcb6275..a5741e675d 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-cpu/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-cpu/hash @@ -1 +1 @@ -2022-11-28 fd39545e7acfd213529fd015f41ddd653d12b8cb +2023-01-23 cfc784f837382258b99328f73dcfd9574d42c0e5 diff --git a/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash b/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash index 793122fc18..b27238ed59 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash @@ -1 +1 @@ -2022-11-28 35eab3625a423dd07b07baac72c8ed99a2f6c1c3 +2023-01-23 778e4b1ff295f24e6d18c4e5e963675be0dc1828 diff --git a/repos/libports/recipes/pkg/mesa_gpu-intel/hash b/repos/libports/recipes/pkg/mesa_gpu-intel/hash index 7dd3a56272..7dc6d22df5 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-intel/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-intel/hash @@ -1 +1 @@ -2022-11-28 82af682ae4296f7e34358c8c063500e0f102765d +2023-01-23 8b91b8759a18da85bd7deeca9b334ca7722f978b diff --git a/repos/libports/recipes/pkg/mesa_gpu-lima/hash b/repos/libports/recipes/pkg/mesa_gpu-lima/hash index 7461b133d8..d4443f8a2f 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-lima/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-lima/hash @@ -1 +1 @@ -2022-11-28 9090cbc5c27834ee3474d14307ac24ed8b490cb4 +2023-01-23 bd8af820001fe165f72c8524e979478d7777b8b1 diff --git a/repos/libports/recipes/pkg/pdf_view/hash b/repos/libports/recipes/pkg/pdf_view/hash index dc67b925ab..ab8ad9f594 100644 --- a/repos/libports/recipes/pkg/pdf_view/hash +++ b/repos/libports/recipes/pkg/pdf_view/hash @@ -1 +1 @@ -2022-11-28 881b4bd84c7d9cb787b4f2a6828589bae58a1c78 +2023-01-23 5eb50d797b02927cc9b831ea160d192ce640b0d1 diff --git a/repos/libports/recipes/pkg/qt5_textedit/hash b/repos/libports/recipes/pkg/qt5_textedit/hash index f4ab1634fa..029fcc5204 100644 --- a/repos/libports/recipes/pkg/qt5_textedit/hash +++ b/repos/libports/recipes/pkg/qt5_textedit/hash @@ -1 +1 @@ -2022-11-28 c7968bf31e3c941ada5720de1a77cf9165b090b2 +2023-01-23 3ed7e9a3bc47e64c7d20cb9ba5f636216a8f8710 diff --git a/repos/libports/recipes/pkg/sntp_dummy_rtc/hash b/repos/libports/recipes/pkg/sntp_dummy_rtc/hash index 93ab7b36d9..7769f93713 100644 --- a/repos/libports/recipes/pkg/sntp_dummy_rtc/hash +++ b/repos/libports/recipes/pkg/sntp_dummy_rtc/hash @@ -1 +1 @@ -2022-11-28 a9ba3616ab64cb80eee6e874d8bb7c4ddce1d2d0 +2023-01-23 189a60f4a32b13c8bcd268ea5199c0a674cf44d1 diff --git a/repos/libports/recipes/pkg/system_clock-dummy/hash b/repos/libports/recipes/pkg/system_clock-dummy/hash index 41efb8bad2..014382552a 100644 --- a/repos/libports/recipes/pkg/system_clock-dummy/hash +++ b/repos/libports/recipes/pkg/system_clock-dummy/hash @@ -1 +1 @@ -2022-11-28 a74b86ce0a26a90c000f64935d44dc1ee2ad1ad2 +2023-01-23 e40eb8ae46bf7cb77cba101bb3935b4f25c4b765 diff --git a/repos/libports/recipes/pkg/system_clock-pc/hash b/repos/libports/recipes/pkg/system_clock-pc/hash index b72de043db..0d7e6a4597 100644 --- a/repos/libports/recipes/pkg/system_clock-pc/hash +++ b/repos/libports/recipes/pkg/system_clock-pc/hash @@ -1 +1 @@ -2022-11-28 a08083f3814bd19aa6cc0bffdde3f6816df2f906 +2023-01-23 c2dad5dc2ecebdc86745d41ec8ed63d94ffb0df4 diff --git a/repos/libports/recipes/pkg/system_rtc-linux/hash b/repos/libports/recipes/pkg/system_rtc-linux/hash index b4dfe30495..3ba1e7a270 100644 --- a/repos/libports/recipes/pkg/system_rtc-linux/hash +++ b/repos/libports/recipes/pkg/system_rtc-linux/hash @@ -1 +1 @@ -2022-11-28 f6e93de47e2bfb349bdbdac00442b5f48ca3d8bb +2023-01-23 c083fff059d62dd50f949a5dc839205a738b3475 diff --git a/repos/libports/recipes/pkg/system_rtc-pc/hash b/repos/libports/recipes/pkg/system_rtc-pc/hash index 42ae9b1b08..0d75bf47e9 100644 --- a/repos/libports/recipes/pkg/system_rtc-pc/hash +++ b/repos/libports/recipes/pkg/system_rtc-pc/hash @@ -1 +1 @@ -2022-11-28 844ad88f6038b55862c166692b18b38e1252f26f +2023-01-23 c041a64a50ace980ae0505e1ebf8318fac52fe24 diff --git a/repos/libports/recipes/pkg/test-expat/hash b/repos/libports/recipes/pkg/test-expat/hash index 7dcc5a5fe6..72a291fe2f 100644 --- a/repos/libports/recipes/pkg/test-expat/hash +++ b/repos/libports/recipes/pkg/test-expat/hash @@ -1 +1 @@ -2022-11-28 f15365a79e3d499dd3cc0250ce71b7343f7f67ef +2023-01-23 e9948e8c23ac51ec259bafe35342b9f68449a24a diff --git a/repos/libports/recipes/pkg/test-ldso/hash b/repos/libports/recipes/pkg/test-ldso/hash index 43cd07222e..3a45564a68 100644 --- a/repos/libports/recipes/pkg/test-ldso/hash +++ b/repos/libports/recipes/pkg/test-ldso/hash @@ -1 +1 @@ -2022-11-28 c6b1cc49b3d235b308bfa920756597ca9a0cde37 +2023-01-23 741600ef76b100c5d2a78c1d162e8d21ffb5596a diff --git a/repos/libports/recipes/pkg/test-libc/hash b/repos/libports/recipes/pkg/test-libc/hash index 4ba0b81b2f..415f05be87 100644 --- a/repos/libports/recipes/pkg/test-libc/hash +++ b/repos/libports/recipes/pkg/test-libc/hash @@ -1 +1 @@ -2022-11-28 c6501d55917dd098ceca85924b4ea7d0306fe54e +2023-01-23 d5a7badf85671ef5df1b608b6df558c40df999fd diff --git a/repos/libports/recipes/pkg/test-libc_connect_lwip/hash b/repos/libports/recipes/pkg/test-libc_connect_lwip/hash index db8037d9bf..75b8a95fdb 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lwip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_lwip/hash @@ -1 +1 @@ -2022-11-28 d6ae8e35e8eeb3dd7750c28115b35f9944d3c7f6 +2023-01-23 9679ccca318d721b108341ffe6b9917a4d79cc29 diff --git a/repos/libports/recipes/pkg/test-libc_connect_lxip/hash b/repos/libports/recipes/pkg/test-libc_connect_lxip/hash index cb1397261c..4dd3d20655 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lxip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_lxip/hash @@ -1 +1 @@ -2022-11-28 982a9e161e5088aaf0107ad9a971d80a7c3f67a9 +2023-01-23 486367584c74848b0ab83f92474bd202f0147a9a diff --git a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash index 13e690140c..cd0a6ebcc1 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash @@ -1 +1 @@ -2022-11-28 077a530bf543d298581de3dca8c6af25b9962dc2 +2023-01-23 a6adae11f0a3bf4de25180c3c95780b671c21141 diff --git a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash index 1e7063d685..cc1627a5c5 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash @@ -1 +1 @@ -2022-11-28 712e3bf834381e41783cf04fd68d4262337ee479 +2023-01-23 9a1a45ef2d568a79c99f90009a84247238569415 diff --git a/repos/libports/recipes/pkg/test-libc_counter/hash b/repos/libports/recipes/pkg/test-libc_counter/hash index f8722d7d06..9f4fecf3a4 100644 --- a/repos/libports/recipes/pkg/test-libc_counter/hash +++ b/repos/libports/recipes/pkg/test-libc_counter/hash @@ -1 +1 @@ -2022-11-28 73f50a7fded3ec2ab679dbe34f58151b205fb239 +2023-01-23 f18f1bdfe762d85e26a9d03016c7456019fe6df7 diff --git a/repos/libports/recipes/pkg/test-libc_execve/hash b/repos/libports/recipes/pkg/test-libc_execve/hash index 27bc61971d..de5df60d8c 100644 --- a/repos/libports/recipes/pkg/test-libc_execve/hash +++ b/repos/libports/recipes/pkg/test-libc_execve/hash @@ -1 +1 @@ -2022-11-28 c5558736c215a0f3c63f01d7c67ffee3e418ef03 +2023-01-23 2111ad49fed033e866ab0a0aa4dbd0e2c3b93b15 diff --git a/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash b/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash index ea7cd1db6d..4ec92251e2 100644 --- a/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash +++ b/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash @@ -1 +1 @@ -2022-11-28 a797b4d88d046e65385e97b698b9022a02434e70 +2023-01-23 fcff982a9e5d586796cdddbe6c56e3218e85c4a4 diff --git a/repos/libports/recipes/pkg/test-libc_fork/hash b/repos/libports/recipes/pkg/test-libc_fork/hash index 082205ac32..50d161a2b5 100644 --- a/repos/libports/recipes/pkg/test-libc_fork/hash +++ b/repos/libports/recipes/pkg/test-libc_fork/hash @@ -1 +1 @@ -2022-11-28 73124d1c5ec5bca09602829c460cac8a998e1799 +2023-01-23 b76e83f87d975d5cd068c16b875a986807cbbc99 diff --git a/repos/libports/recipes/pkg/test-libc_getenv/hash b/repos/libports/recipes/pkg/test-libc_getenv/hash index 200417fc50..40790a1adb 100644 --- a/repos/libports/recipes/pkg/test-libc_getenv/hash +++ b/repos/libports/recipes/pkg/test-libc_getenv/hash @@ -1 +1 @@ -2022-11-28 18636d48c8d70c59af4deee0619c3903c30bea7d +2023-01-23 6ceb895a726058532e338909287ac4d59871f695 diff --git a/repos/libports/recipes/pkg/test-libc_pipe/hash b/repos/libports/recipes/pkg/test-libc_pipe/hash index e22ef521c1..4549e7b4c3 100644 --- a/repos/libports/recipes/pkg/test-libc_pipe/hash +++ b/repos/libports/recipes/pkg/test-libc_pipe/hash @@ -1 +1 @@ -2022-11-28 a630c441aa0c26e938e1b7117181ceba3257fdf6 +2023-01-23 e547d76f391b784c1f022223aa59602f2efded2b diff --git a/repos/libports/recipes/pkg/test-libc_vfs/hash b/repos/libports/recipes/pkg/test-libc_vfs/hash index 34a715aa7f..8ed2c27166 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs/hash @@ -1 +1 @@ -2022-11-28 47bb86f7f831503d5288b435cbf355be889c106d +2023-01-23 d68780e939d260cfa2c6aaaaac4d9af7285a4702 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_block/hash b/repos/libports/recipes/pkg/test-libc_vfs_block/hash index 2609f06067..129e2f9588 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_block/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_block/hash @@ -1 +1 @@ -2022-11-28 d68c9015c93802a7f230b6b29eb56454a494b43b +2023-01-23 d02242d74746a46528b80a73e2fd9c0efaac0e6c diff --git a/repos/libports/recipes/pkg/test-libc_vfs_counter/hash b/repos/libports/recipes/pkg/test-libc_vfs_counter/hash index d65a88f87e..82ecd90e2a 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_counter/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_counter/hash @@ -1 +1 @@ -2022-11-28 9f0e25982153c2693b5f0b525d55a7b21103c734 +2023-01-23 0420a799ed0341b6910a97f1536d9cd62e6bfa0e diff --git a/repos/libports/recipes/pkg/test-libc_vfs_fs/hash b/repos/libports/recipes/pkg/test-libc_vfs_fs/hash index 264c821c33..e10a12e8cd 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_fs/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_fs/hash @@ -1 +1 @@ -2022-11-28 2a8606a48a0d4099d2a81f2f80692c7e71df0f47 +2023-01-23 e8c0fea751c96522d85405e76af4e77fcb89d046 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash b/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash index 843fcd2c03..5f88014084 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash @@ -1 +1 @@ -2022-11-28 82cd2044ed13411539237340f64f007b0f478997 +2023-01-23 4967ee222417f096513bf33f471b731bc48153e5 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_ram/hash b/repos/libports/recipes/pkg/test-libc_vfs_ram/hash index f7522e16e8..5a5db8cad5 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_ram/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_ram/hash @@ -1 +1 @@ -2022-11-28 aa7dced8464072c52e760cf8f8c3aab0a638e3b0 +2023-01-23 dcdcca75b28e8e04fe43781051b5099ac7326670 diff --git a/repos/libports/recipes/pkg/test-pthread/hash b/repos/libports/recipes/pkg/test-pthread/hash index bd947937c0..7760d4b645 100644 --- a/repos/libports/recipes/pkg/test-pthread/hash +++ b/repos/libports/recipes/pkg/test-pthread/hash @@ -1 +1 @@ -2022-11-28 e0032f00cfdb9fcdc3b761930b41b1e72c4e099e +2023-01-23 242e1c3eaf1cfbabe72a091881c132d470136ee1 diff --git a/repos/libports/recipes/pkg/test-sequence/hash b/repos/libports/recipes/pkg/test-sequence/hash index b85ab7375f..3e7d7e9873 100644 --- a/repos/libports/recipes/pkg/test-sequence/hash +++ b/repos/libports/recipes/pkg/test-sequence/hash @@ -1 +1 @@ -2022-11-28 a4f93da86bc76f1f586f205b02cf644aa94cb2cd +2023-01-23 e9bcdbd028296d4daf72520d1863481465ffe566 diff --git a/repos/libports/recipes/pkg/test-spark/hash b/repos/libports/recipes/pkg/test-spark/hash index c083c72b25..e97fdba132 100644 --- a/repos/libports/recipes/pkg/test-spark/hash +++ b/repos/libports/recipes/pkg/test-spark/hash @@ -1 +1 @@ -2022-11-28 3c173e41a71ad2d84807ee6a47bc05b8afcf87ba +2023-01-23 bc07ae97e8416686d1dfffc55b9353e8b7ebf8e9 diff --git a/repos/libports/recipes/pkg/test-spark_exception/hash b/repos/libports/recipes/pkg/test-spark_exception/hash index 85d1c4e6ca..6e477028de 100644 --- a/repos/libports/recipes/pkg/test-spark_exception/hash +++ b/repos/libports/recipes/pkg/test-spark_exception/hash @@ -1 +1 @@ -2022-11-28 5567d3d41fd530c9908acafce53947c26e1bd1ad +2023-01-23 efb973a5ef646a661af83d0f0c5dbe791b1beba0 diff --git a/repos/libports/recipes/pkg/test-spark_secondary_stack/hash b/repos/libports/recipes/pkg/test-spark_secondary_stack/hash index 5459b65f2d..338722e777 100644 --- a/repos/libports/recipes/pkg/test-spark_secondary_stack/hash +++ b/repos/libports/recipes/pkg/test-spark_secondary_stack/hash @@ -1 +1 @@ -2022-11-28 582a04a493514b22fb3ba3798a789c531444d8b7 +2023-01-23 f821c983c9366f9f93eed83eb2e41b4e2ae8f90d diff --git a/repos/libports/recipes/pkg/test-stdcxx/hash b/repos/libports/recipes/pkg/test-stdcxx/hash index 902a12d6a4..957c3bbe35 100644 --- a/repos/libports/recipes/pkg/test-stdcxx/hash +++ b/repos/libports/recipes/pkg/test-stdcxx/hash @@ -1 +1 @@ -2022-11-28 9eb944366f2f15638956a4fbafba2c86858facff +2023-01-23 a69515407de605654f87814509c2c3c7ef35fff9 diff --git a/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash b/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash index 0807bd45f6..fc50708b22 100644 --- a/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash +++ b/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash @@ -1 +1 @@ -2022-11-28 9c62785ef445fb59f89c0d72318c30272e9ac461 +2023-01-23 97100374de2ff11d5af3b2cd40bccc25e9517bd2 diff --git a/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash b/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash index 6d79f26813..0ad1fd0db0 100644 --- a/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash +++ b/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash @@ -1 +1 @@ -2022-11-28 f2b1737f36921127cf9364607d6c6a2f01c38761 +2023-01-23 a9ca030a2b352f911569c0653ec7816573d086a2 diff --git a/repos/libports/recipes/pkg/usb_webcam/hash b/repos/libports/recipes/pkg/usb_webcam/hash index 2c5200670a..65ce4ab52c 100644 --- a/repos/libports/recipes/pkg/usb_webcam/hash +++ b/repos/libports/recipes/pkg/usb_webcam/hash @@ -1 +1 @@ -2022-11-28 9fb8dfb07f8aadde9472d7d40bc046c9bf366894 +2023-01-23 3a7bf70ee160473a0388a08104d2d22b6031b278 diff --git a/repos/libports/recipes/src/acpica/hash b/repos/libports/recipes/src/acpica/hash index 0304269fc7..83426a951f 100644 --- a/repos/libports/recipes/src/acpica/hash +++ b/repos/libports/recipes/src/acpica/hash @@ -1 +1 @@ -2022-11-28 e62feaf32fd421ec4969d3a005c55b7dcaf3c218 +2023-01-23 5d5b848327835d10c28db19bd469023b7fb4f3cf diff --git a/repos/libports/recipes/src/curl/hash b/repos/libports/recipes/src/curl/hash index 1d24918430..4f26eb8c88 100644 --- a/repos/libports/recipes/src/curl/hash +++ b/repos/libports/recipes/src/curl/hash @@ -1 +1 @@ -2022-11-16 a47fb8673e18ea7aaaa9ed31be6fad9dda632901 +2023-01-23 a5f08f1f5217dada8f28fe79382de1ebef6aed8f diff --git a/repos/libports/recipes/src/expat/hash b/repos/libports/recipes/src/expat/hash index 2f3081700e..27cad0e008 100644 --- a/repos/libports/recipes/src/expat/hash +++ b/repos/libports/recipes/src/expat/hash @@ -1 +1 @@ -2022-11-16 73916fa5825ec1452d7672d011a66423165fa5c7 +2023-01-23 308baba8239f6b4929d745a7a358233467a17545 diff --git a/repos/libports/recipes/src/extract/hash b/repos/libports/recipes/src/extract/hash index 6163849a9d..12c6891698 100644 --- a/repos/libports/recipes/src/extract/hash +++ b/repos/libports/recipes/src/extract/hash @@ -1 +1 @@ -2022-11-28 75ad0314354d9804ce5b3b461a155bd46bd7c546 +2023-01-23 73bc8f1988c9f3fc2c8874340f38578f6e1ff77c diff --git a/repos/libports/recipes/src/fetchurl/hash b/repos/libports/recipes/src/fetchurl/hash index 40d59afbb7..9f3ee15dc3 100644 --- a/repos/libports/recipes/src/fetchurl/hash +++ b/repos/libports/recipes/src/fetchurl/hash @@ -1 +1 @@ -2022-11-28 0f2038c0a302471f1d0961c8ec46f1c0d41ffd00 +2023-01-23 5bfc9b071c5e2aa2a1f0cf4f23476a6077fff3a4 diff --git a/repos/libports/recipes/src/ffi/hash b/repos/libports/recipes/src/ffi/hash index e3a2acb86c..0f1837299d 100644 --- a/repos/libports/recipes/src/ffi/hash +++ b/repos/libports/recipes/src/ffi/hash @@ -1 +1 @@ -2022-11-16 2b36627a05a9fecf645208b300040d017ccc2f63 +2023-01-23 367ea3de281271daee4b1091ed440f39f78b316f diff --git a/repos/libports/recipes/src/freetype/hash b/repos/libports/recipes/src/freetype/hash index 6afaa9a40b..e6c5e87bd9 100644 --- a/repos/libports/recipes/src/freetype/hash +++ b/repos/libports/recipes/src/freetype/hash @@ -1 +1 @@ -2022-09-20 679662de62ef840937909e168d687efba4eaeb01 +2023-01-23 158046724dba61b2df1106f22106c000957c488e diff --git a/repos/libports/recipes/src/fs_utils/hash b/repos/libports/recipes/src/fs_utils/hash index a7363d9f71..1369ca6ca2 100644 --- a/repos/libports/recipes/src/fs_utils/hash +++ b/repos/libports/recipes/src/fs_utils/hash @@ -1 +1 @@ -2022-08-30 b2450ad64d1379a400d4cf49f5dcd87e944d515c +2023-01-23 c127ea8b8e945721b1d1410572d4d5af2c297150 diff --git a/repos/libports/recipes/src/gcov/hash b/repos/libports/recipes/src/gcov/hash index 497cb4d17e..daab6075f6 100644 --- a/repos/libports/recipes/src/gcov/hash +++ b/repos/libports/recipes/src/gcov/hash @@ -1 +1 @@ -2022-11-28 4c65451b7bec7b733f96d4a7715ce8dbae9daaf4 +2023-01-23 44f472ed7d1c38c1d064471abfcdf1cac6dc704c diff --git a/repos/libports/recipes/src/gmp/hash b/repos/libports/recipes/src/gmp/hash index 9798c447cf..1e443de12c 100644 --- a/repos/libports/recipes/src/gmp/hash +++ b/repos/libports/recipes/src/gmp/hash @@ -1 +1 @@ -2022-11-16 b205ed8d55dd886f19aa517938c0adaa8065451a +2023-01-23 9d88f09ded0f1afcd2424ad5ac276d7e453082d5 diff --git a/repos/libports/recipes/src/icu/hash b/repos/libports/recipes/src/icu/hash index b63c2831bd..752fe240c3 100644 --- a/repos/libports/recipes/src/icu/hash +++ b/repos/libports/recipes/src/icu/hash @@ -1 +1 @@ -2022-11-16 4d29b286428a01aa9ba0c32a1d76bb059db63c41 +2023-01-23 d198e9f1eebdf29942b16235cc0f89771911a393 diff --git a/repos/libports/recipes/src/jbig2dec/hash b/repos/libports/recipes/src/jbig2dec/hash index 3218b018b5..d94fe6951a 100644 --- a/repos/libports/recipes/src/jbig2dec/hash +++ b/repos/libports/recipes/src/jbig2dec/hash @@ -1 +1 @@ -2022-11-16 77e92d5bf11676fb8de4ed02f3668e23241b997d +2023-01-23 88cca4b002ae884943a5a2515402be1f7c976e82 diff --git a/repos/libports/recipes/src/jpeg/hash b/repos/libports/recipes/src/jpeg/hash index 266435015f..848d0fa2f0 100644 --- a/repos/libports/recipes/src/jpeg/hash +++ b/repos/libports/recipes/src/jpeg/hash @@ -1 +1 @@ -2022-11-16 2d7df3600b4ea6593b59810a41c64419086f346e +2023-01-23 0908a014bb1dd265e0803665772eb256433e1d58 diff --git a/repos/libports/recipes/src/libarchive/hash b/repos/libports/recipes/src/libarchive/hash index ad13746862..4788e3d84b 100644 --- a/repos/libports/recipes/src/libarchive/hash +++ b/repos/libports/recipes/src/libarchive/hash @@ -1 +1 @@ -2022-11-16 87eee45f4126d85cb1626310fadfba8b202f8cdd +2023-01-23 3fb7a5b8522198fe56e11565eb773da49accaa03 diff --git a/repos/libports/recipes/src/libc/hash b/repos/libports/recipes/src/libc/hash index c3bf468d6e..1bc3f9158c 100644 --- a/repos/libports/recipes/src/libc/hash +++ b/repos/libports/recipes/src/libc/hash @@ -1 +1 @@ -2022-11-28 4134da2f9d6aea46b460136381321fdb88c4681a +2023-01-23 3f16a7f91ec51622bab283244cca11c921f904fe diff --git a/repos/libports/recipes/src/libdrm/hash b/repos/libports/recipes/src/libdrm/hash index af4ff50ddb..f30b2a4e3b 100644 --- a/repos/libports/recipes/src/libdrm/hash +++ b/repos/libports/recipes/src/libdrm/hash @@ -1 +1 @@ -2022-11-28 a3a8bcae9dc5b6c981cb2149b09eb4c553dd054a +2023-01-23 566dc92b327c734a470287f0d6218761c57c3029 diff --git a/repos/libports/recipes/src/libiconv/hash b/repos/libports/recipes/src/libiconv/hash index 9d949face1..a53204801b 100644 --- a/repos/libports/recipes/src/libiconv/hash +++ b/repos/libports/recipes/src/libiconv/hash @@ -1 +1 @@ -2022-09-20 b0d0abcfe4bf3cea9cf0f8bad058511692bdb275 +2023-01-23 c0c4593c6ba29c7068c46ffed65f6d0f21d17799 diff --git a/repos/libports/recipes/src/liblzma/hash b/repos/libports/recipes/src/liblzma/hash index 03b777390d..886f7deade 100644 --- a/repos/libports/recipes/src/liblzma/hash +++ b/repos/libports/recipes/src/liblzma/hash @@ -1 +1 @@ -2022-09-20 657a45131c8ce48b2e136eb7f6e3e92eddc8ee6b +2023-01-23 08247ac61c5a5fae3b6606e317fc228e1efe67fa diff --git a/repos/libports/recipes/src/libpng/hash b/repos/libports/recipes/src/libpng/hash index c3d8f83dc4..e061cc7959 100644 --- a/repos/libports/recipes/src/libpng/hash +++ b/repos/libports/recipes/src/libpng/hash @@ -1 +1 @@ -2022-09-20 844606386400336a4f72d4b5a6ddd7db5028da8f +2023-01-23 3d2324499b5de6ab9e58e9d5a8c1a5bcb1d8d97a diff --git a/repos/libports/recipes/src/libqgenodeviewwidget/hash b/repos/libports/recipes/src/libqgenodeviewwidget/hash index 99052a7b5d..3737fc9fc3 100644 --- a/repos/libports/recipes/src/libqgenodeviewwidget/hash +++ b/repos/libports/recipes/src/libqgenodeviewwidget/hash @@ -1 +1 @@ -2022-11-28 9fef470d16823f37e4b1fb17026fb902c6e00f99 +2023-01-23 d4ab934a9ed10a270dd1d91bf0a51fdfaee52feb diff --git a/repos/libports/recipes/src/libqpluginwidget/hash b/repos/libports/recipes/src/libqpluginwidget/hash index 8fa3bada60..a26df4129d 100644 --- a/repos/libports/recipes/src/libqpluginwidget/hash +++ b/repos/libports/recipes/src/libqpluginwidget/hash @@ -1 +1 @@ -2022-11-28 192d0310d2c8066dbe694dd3f1f4ae90f1d17807 +2023-01-23 87092c31044d1aff9a920a0a96146f428880bf1e diff --git a/repos/libports/recipes/src/libsparkcrypto/hash b/repos/libports/recipes/src/libsparkcrypto/hash index 3f65c0a489..9ade17eee9 100644 --- a/repos/libports/recipes/src/libsparkcrypto/hash +++ b/repos/libports/recipes/src/libsparkcrypto/hash @@ -1 +1 @@ -2022-11-28 4a5fae0f25783c228f02d3590429b0d910999ebd +2023-01-23 2fcd498367caa2defad77c3c7214fb30383ac24a diff --git a/repos/libports/recipes/src/libssh/hash b/repos/libports/recipes/src/libssh/hash index c676f346f2..b92b95267a 100644 --- a/repos/libports/recipes/src/libssh/hash +++ b/repos/libports/recipes/src/libssh/hash @@ -1 +1 @@ -2022-11-16 2e976deaab4957a70caf0c984ea14cb9c86aaff9 +2023-01-23 40fee50d997e1c6aed9343f99d58130a135d9080 diff --git a/repos/libports/recipes/src/libusb/hash b/repos/libports/recipes/src/libusb/hash index 39c4d4ae10..c9ffe52f46 100644 --- a/repos/libports/recipes/src/libusb/hash +++ b/repos/libports/recipes/src/libusb/hash @@ -1 +1 @@ -2022-11-28 fb2910024e82d54a4f4e202e54fc9a79f43f26fe +2023-01-23 7246f709ed437d7c81608c50780fda5d87d6e5d5 diff --git a/repos/libports/recipes/src/libuvc/hash b/repos/libports/recipes/src/libuvc/hash index 47aa4d3af0..b6467b719f 100644 --- a/repos/libports/recipes/src/libuvc/hash +++ b/repos/libports/recipes/src/libuvc/hash @@ -1 +1 @@ -2022-11-16 da5e62e764b6789080ea28927711d48826cc6225 +2023-01-23 ace74b473e27f423ec6585ad284eef9b12a5346c diff --git a/repos/libports/recipes/src/libyuv/hash b/repos/libports/recipes/src/libyuv/hash index e9b490e4f5..604bcc89f6 100644 --- a/repos/libports/recipes/src/libyuv/hash +++ b/repos/libports/recipes/src/libyuv/hash @@ -1 +1 @@ -2022-11-16 56d1a14d599a69893a17506e17f34356b3b71814 +2023-01-23 535d4f050601d1bcac9e4c96925f643d635e1366 diff --git a/repos/libports/recipes/src/mesa/hash b/repos/libports/recipes/src/mesa/hash index ea57c46c8d..f8c4aa6ded 100644 --- a/repos/libports/recipes/src/mesa/hash +++ b/repos/libports/recipes/src/mesa/hash @@ -1 +1 @@ -2022-11-28 86b4451216a535ad142e310d8ced068b0c773995 +2023-01-23 a9b09f01809a31359b110277eabbea6a83019bd5 diff --git a/repos/libports/recipes/src/mesa_gears/hash b/repos/libports/recipes/src/mesa_gears/hash index a67650c770..507d0fd654 100644 --- a/repos/libports/recipes/src/mesa_gears/hash +++ b/repos/libports/recipes/src/mesa_gears/hash @@ -1 +1 @@ -2022-11-28 5851598eeb0f07ccce3c6206ad26a6323374db2f +2023-01-23 e7efc198f629ec832d98e8b41075c68987eb449c diff --git a/repos/libports/recipes/src/mupdf/hash b/repos/libports/recipes/src/mupdf/hash index 2af03489ca..a18f311262 100644 --- a/repos/libports/recipes/src/mupdf/hash +++ b/repos/libports/recipes/src/mupdf/hash @@ -1 +1 @@ -2022-09-20 b23e9f4006299c420f3fdfacf841527ac24d63e9 +2023-01-23 b1a2a6c9d3530f5188baaec7563e58ea2515fb73 diff --git a/repos/libports/recipes/src/ncurses/hash b/repos/libports/recipes/src/ncurses/hash index cf7db41134..f489d895b3 100644 --- a/repos/libports/recipes/src/ncurses/hash +++ b/repos/libports/recipes/src/ncurses/hash @@ -1 +1 @@ -2022-09-20 a326fde06a4c3de889c82aafc654d79bb5864d47 +2023-01-23 b43677e221ba5c694032f40244b21b9395c88130 diff --git a/repos/libports/recipes/src/openjpeg/hash b/repos/libports/recipes/src/openjpeg/hash index 44e2e6cef5..75857e9847 100644 --- a/repos/libports/recipes/src/openjpeg/hash +++ b/repos/libports/recipes/src/openjpeg/hash @@ -1 +1 @@ -2022-11-16 111b24c63f1e25a591e2ef47463672f32f9ae29b +2023-01-23 89e000d8d4c29ba2e948e8fac071041d953c7691 diff --git a/repos/libports/recipes/src/openssl/hash b/repos/libports/recipes/src/openssl/hash index f15051d588..750b107399 100644 --- a/repos/libports/recipes/src/openssl/hash +++ b/repos/libports/recipes/src/openssl/hash @@ -1 +1 @@ -2022-11-16 531a60d3de6cc462a69e122011663503f8cb63f8 +2023-01-23 778a066757148e89de95fde123a493b2cb0e8f88 diff --git a/repos/libports/recipes/src/pcre/hash b/repos/libports/recipes/src/pcre/hash index df4ccc6f57..efb3dab5ab 100644 --- a/repos/libports/recipes/src/pcre/hash +++ b/repos/libports/recipes/src/pcre/hash @@ -1 +1 @@ -2022-09-20 c33bc2cf1d617362619763ecdfa47bd3b04ec024 +2023-01-23 6b8c91db2baadce5673c929d4151aa21438e02e6 diff --git a/repos/libports/recipes/src/pcre16/hash b/repos/libports/recipes/src/pcre16/hash index 810ce42284..69193545c2 100644 --- a/repos/libports/recipes/src/pcre16/hash +++ b/repos/libports/recipes/src/pcre16/hash @@ -1 +1 @@ -2022-11-16 5434c284246a909b30aa9e4c34f65d09b57dc491 +2023-01-23 d72c09890a0cd5566370fd7c8a68aefb117dd191 diff --git a/repos/libports/recipes/src/pcsc-lite/hash b/repos/libports/recipes/src/pcsc-lite/hash index 96ac522f6e..50843dab4d 100644 --- a/repos/libports/recipes/src/pcsc-lite/hash +++ b/repos/libports/recipes/src/pcsc-lite/hash @@ -1 +1 @@ -2022-11-28 c01d9efc6082419a254c1baf87e029e5a11f91e4 +2023-01-23 91c9afc1efa91431dc1b4e8875283948d00a9ee9 diff --git a/repos/libports/recipes/src/pdf_view/hash b/repos/libports/recipes/src/pdf_view/hash index 737270e068..2570524f1d 100644 --- a/repos/libports/recipes/src/pdf_view/hash +++ b/repos/libports/recipes/src/pdf_view/hash @@ -1 +1 @@ -2022-11-28 812446fdb5296e4a90e82c05846148c5b48f7949 +2023-01-23 5668387c057fafc6301c414fed3deadf738d751a diff --git a/repos/libports/recipes/src/posix/hash b/repos/libports/recipes/src/posix/hash index aa5ac7eab8..115b08d74f 100644 --- a/repos/libports/recipes/src/posix/hash +++ b/repos/libports/recipes/src/posix/hash @@ -1 +1 @@ -2022-11-28 ce351ff0ccb3df0c71b46e5b9ae997ab0c05ec51 +2023-01-23 0f0778d208a114140a399d9fba53728b12848f3b diff --git a/repos/libports/recipes/src/qt5_base/hash b/repos/libports/recipes/src/qt5_base/hash index e319360596..229326c6cb 100644 --- a/repos/libports/recipes/src/qt5_base/hash +++ b/repos/libports/recipes/src/qt5_base/hash @@ -1 +1 @@ -2022-11-28 f5189ce7b8ca0d74646ead04e4dc435786b18421 +2023-01-23 9cff81fd6a7fd2cef5aa1b022d9708495e3d0d91 diff --git a/repos/libports/recipes/src/qt5_calculatorform/hash b/repos/libports/recipes/src/qt5_calculatorform/hash index af5601455d..7ed276b025 100644 --- a/repos/libports/recipes/src/qt5_calculatorform/hash +++ b/repos/libports/recipes/src/qt5_calculatorform/hash @@ -1 +1 @@ -2022-11-16 6a9f77dfabcf81907cba313be8f3431918a1d59b +2023-01-23 29c3811685c2d2220687ab1548b97ad06565a68e diff --git a/repos/libports/recipes/src/qt5_component/hash b/repos/libports/recipes/src/qt5_component/hash index f0ff24468a..4911301aab 100644 --- a/repos/libports/recipes/src/qt5_component/hash +++ b/repos/libports/recipes/src/qt5_component/hash @@ -1 +1 @@ -2022-11-28 a63b8eb3ebf6bf1853d71cc22b35b94b850bdd95 +2023-01-23 10e9c25efa95ffb6c598fe85cb446d547f801560 diff --git a/repos/libports/recipes/src/qt5_declarative/hash b/repos/libports/recipes/src/qt5_declarative/hash index 92bbf1b50c..a174116d9e 100644 --- a/repos/libports/recipes/src/qt5_declarative/hash +++ b/repos/libports/recipes/src/qt5_declarative/hash @@ -1 +1 @@ -2022-11-16 ab992d4a66a069784ad093b32f3aafe6bffa380e +2023-01-23 f1e1b70692e8784dd351b594d43528e310c7cfae diff --git a/repos/libports/recipes/src/qt5_graphicaleffects/hash b/repos/libports/recipes/src/qt5_graphicaleffects/hash index db9b4a87ed..3761db3c91 100644 --- a/repos/libports/recipes/src/qt5_graphicaleffects/hash +++ b/repos/libports/recipes/src/qt5_graphicaleffects/hash @@ -1 +1 @@ -2022-11-16 addffa484294c1afe1b9eeac584a487d8acde383 +2023-01-23 fd54e6bd637dcf461416d132690b2a37903bc2d2 diff --git a/repos/libports/recipes/src/qt5_launchpad/hash b/repos/libports/recipes/src/qt5_launchpad/hash index 42191307ac..a9f0f32247 100644 --- a/repos/libports/recipes/src/qt5_launchpad/hash +++ b/repos/libports/recipes/src/qt5_launchpad/hash @@ -1 +1 @@ -2022-11-28 3c60ba3664f9bff53378669a40d2c8e86102085c +2023-01-23 7546f1c6d90d5f3b5375f3e8c9f9dc07d82f1ec8 diff --git a/repos/libports/recipes/src/qt5_openglwindow/hash b/repos/libports/recipes/src/qt5_openglwindow/hash index 076c727b3c..979d6855d8 100644 --- a/repos/libports/recipes/src/qt5_openglwindow/hash +++ b/repos/libports/recipes/src/qt5_openglwindow/hash @@ -1 +1 @@ -2022-11-16 ea61729747cb448ad4dd5888357121d93890b2d2 +2023-01-23 b93ab8e0cabc32dad67917d7d1454664e39d8a58 diff --git a/repos/libports/recipes/src/qt5_quickcontrols/hash b/repos/libports/recipes/src/qt5_quickcontrols/hash index 44e5d61738..ca99de3093 100644 --- a/repos/libports/recipes/src/qt5_quickcontrols/hash +++ b/repos/libports/recipes/src/qt5_quickcontrols/hash @@ -1 +1 @@ -2022-11-16 350308788e4399aae4bb14c5705097c04386fb72 +2023-01-23 3e5e47b4914734fef8ac7ffea086d513d744cc61 diff --git a/repos/libports/recipes/src/qt5_quickcontrols2/hash b/repos/libports/recipes/src/qt5_quickcontrols2/hash index 135beb127b..6b071ce3f2 100644 --- a/repos/libports/recipes/src/qt5_quickcontrols2/hash +++ b/repos/libports/recipes/src/qt5_quickcontrols2/hash @@ -1 +1 @@ -2022-11-28 c2b069aeb351afc8731e38c8c53ba45a97144314 +2023-01-23 1f2267826bbdff87c6483bc67d80474d0a585d95 diff --git a/repos/libports/recipes/src/qt5_samegame/hash b/repos/libports/recipes/src/qt5_samegame/hash index bef8e6a521..df5a615de4 100644 --- a/repos/libports/recipes/src/qt5_samegame/hash +++ b/repos/libports/recipes/src/qt5_samegame/hash @@ -1 +1 @@ -2022-11-16 de2dbd71edf3fad37c92cf4fa9ca29d9f8e688b4 +2023-01-23 17332987fdb9a3d301f6bb3d0289e9ab91de3c0a diff --git a/repos/libports/recipes/src/qt5_svg/hash b/repos/libports/recipes/src/qt5_svg/hash index 72c01da4ce..2ce96a5ede 100644 --- a/repos/libports/recipes/src/qt5_svg/hash +++ b/repos/libports/recipes/src/qt5_svg/hash @@ -1 +1 @@ -2022-11-28 0cc57040de5e8d0645fcfb0bba71e0ee625946da +2023-01-23 06f0239e6850aa11a4dcf617da631a1ceb2f7b3a diff --git a/repos/libports/recipes/src/qt5_testqstring/hash b/repos/libports/recipes/src/qt5_testqstring/hash index 867a325f9c..48f1285882 100644 --- a/repos/libports/recipes/src/qt5_testqstring/hash +++ b/repos/libports/recipes/src/qt5_testqstring/hash @@ -1 +1 @@ -2022-11-16 4ba94cd34324a7b5d02574aa02cc709a500cd976 +2023-01-23 230565b09958b2d1d2d8e52e0d429296a64e8de4 diff --git a/repos/libports/recipes/src/qt5_tetrix/hash b/repos/libports/recipes/src/qt5_tetrix/hash index 7c471573c8..d21889a706 100644 --- a/repos/libports/recipes/src/qt5_tetrix/hash +++ b/repos/libports/recipes/src/qt5_tetrix/hash @@ -1 +1 @@ -2022-11-16 8aabe4ff56c2fef17001a0fd54193a02c4369a12 +2023-01-23 67e7428d6cc420d6fddd028d56b5333c54bc4993 diff --git a/repos/libports/recipes/src/qt5_textedit/hash b/repos/libports/recipes/src/qt5_textedit/hash index 33a5d49f30..8506cf9b34 100644 --- a/repos/libports/recipes/src/qt5_textedit/hash +++ b/repos/libports/recipes/src/qt5_textedit/hash @@ -1 +1 @@ -2022-11-16 587ce87520013889ba5b8fe87a0cb3272836a6f1 +2023-01-23 d4f1d73720481509009f9321628a22b8577d177f diff --git a/repos/libports/recipes/src/qt5_virtualkeyboard/hash b/repos/libports/recipes/src/qt5_virtualkeyboard/hash index 36c24a79c9..f658328be8 100644 --- a/repos/libports/recipes/src/qt5_virtualkeyboard/hash +++ b/repos/libports/recipes/src/qt5_virtualkeyboard/hash @@ -1 +1 @@ -2022-11-16 eac0ae066b6cd08b5b7721b5248e6184ef418b96 +2023-01-23 9221d2c6139f1fc2248d3598a1188e5ca6f15543 diff --git a/repos/libports/recipes/src/qt5_virtualkeyboard_example/hash b/repos/libports/recipes/src/qt5_virtualkeyboard_example/hash index 74e7939c46..8d83014513 100644 --- a/repos/libports/recipes/src/qt5_virtualkeyboard_example/hash +++ b/repos/libports/recipes/src/qt5_virtualkeyboard_example/hash @@ -1 +1 @@ -2022-11-16 6ccbcb3bf7b26d53df6c1aab682db10bced558db +2023-01-23 775a0afc8b5430f20b240121fc460a5a42e3a761 diff --git a/repos/libports/recipes/src/sanitizer/hash b/repos/libports/recipes/src/sanitizer/hash index 640fea67b7..7c567148e4 100644 --- a/repos/libports/recipes/src/sanitizer/hash +++ b/repos/libports/recipes/src/sanitizer/hash @@ -1 +1 @@ -2022-11-28 f80af1d52227f86b2c805d5f7e77e06fc842b756 +2023-01-23 2a56627e4c4ed7020847889b43ace0b71ab638c6 diff --git a/repos/libports/recipes/src/sntp_client/hash b/repos/libports/recipes/src/sntp_client/hash index 029415c4f1..ec59ee2162 100644 --- a/repos/libports/recipes/src/sntp_client/hash +++ b/repos/libports/recipes/src/sntp_client/hash @@ -1 +1 @@ -2022-11-28 e4594420932adff726401ad1ac9e1ab6d1673251 +2023-01-23 765f6013a01fe52988209ee9d017b7d189ac01da diff --git a/repos/libports/recipes/src/spark/hash b/repos/libports/recipes/src/spark/hash index 6bbdad7101..9dacab6b27 100644 --- a/repos/libports/recipes/src/spark/hash +++ b/repos/libports/recipes/src/spark/hash @@ -1 +1 @@ -2022-11-28 939e582dcbf729b103c7700d7ddf6eb6ed3c14d1 +2023-01-23 420d3895fd253f40787476dbf0e3085fb3937911 diff --git a/repos/libports/recipes/src/stdcxx/hash b/repos/libports/recipes/src/stdcxx/hash index e90dc7d2b1..3fc882c4ea 100644 --- a/repos/libports/recipes/src/stdcxx/hash +++ b/repos/libports/recipes/src/stdcxx/hash @@ -1 +1 @@ -2022-09-20 824f40cafadc0c65375f7cac6493a7929651d9a7 +2023-01-23 48dec68f88f7523454a2e87ec6257644f74fcaa9 diff --git a/repos/libports/recipes/src/stdin2out/hash b/repos/libports/recipes/src/stdin2out/hash index b95205be2d..2ae06e9e3c 100644 --- a/repos/libports/recipes/src/stdin2out/hash +++ b/repos/libports/recipes/src/stdin2out/hash @@ -1 +1 @@ -2022-08-30 8618b5f910007d008cdf1db4ac5ad610046ffc69 +2023-01-23 2da9b5fa7e3af534083d4dde68cd9723f88fe20e diff --git a/repos/libports/recipes/src/system_rtc/hash b/repos/libports/recipes/src/system_rtc/hash index 6ee389f489..167056af39 100644 --- a/repos/libports/recipes/src/system_rtc/hash +++ b/repos/libports/recipes/src/system_rtc/hash @@ -1 +1 @@ -2022-11-28 9f3efa9b2062f13aab25b23963c38f55cf6a2f82 +2023-01-23 eafd53b975ef51ef3f1c9b1fc8be3721c67208ab diff --git a/repos/libports/recipes/src/test-expat/hash b/repos/libports/recipes/src/test-expat/hash index a40f7f5362..30e342c7d4 100644 --- a/repos/libports/recipes/src/test-expat/hash +++ b/repos/libports/recipes/src/test-expat/hash @@ -1 +1 @@ -2022-11-16 5649353388ab23888d9ef96f793abfcb0213ff0a +2023-01-23 823d68ecf6886bca5ce88871ec9963fdb25a2cd5 diff --git a/repos/libports/recipes/src/test-ldso/hash b/repos/libports/recipes/src/test-ldso/hash index 42cf612749..95bd4d5e77 100644 --- a/repos/libports/recipes/src/test-ldso/hash +++ b/repos/libports/recipes/src/test-ldso/hash @@ -1 +1 @@ -2022-11-28 8645e8425035125533b08dcb9828dd8c9221b220 +2023-01-23 8d0162103879312f84eaa568f7b222c62c691bae diff --git a/repos/libports/recipes/src/test-libc/hash b/repos/libports/recipes/src/test-libc/hash index d37c53f12a..90e7a85a05 100644 --- a/repos/libports/recipes/src/test-libc/hash +++ b/repos/libports/recipes/src/test-libc/hash @@ -1 +1 @@ -2022-09-20 d7e9e58cca32fff50f25f6c4d0e1539c770c2731 +2023-01-23 064f600e5bd0bdeb43370b804ba6d5e631790db7 diff --git a/repos/libports/recipes/src/test-libc_connect/hash b/repos/libports/recipes/src/test-libc_connect/hash index b3c042b80d..b85f8eb144 100644 --- a/repos/libports/recipes/src/test-libc_connect/hash +++ b/repos/libports/recipes/src/test-libc_connect/hash @@ -1 +1 @@ -2022-08-30 721aade6ef3918b7f1678a888dd0e246ce613f6c +2023-01-23 5c0a2775711a7861a86cc5c4b45019e605ca7969 diff --git a/repos/libports/recipes/src/test-libc_counter/hash b/repos/libports/recipes/src/test-libc_counter/hash index 6b24a1fc80..9c7b03d29c 100644 --- a/repos/libports/recipes/src/test-libc_counter/hash +++ b/repos/libports/recipes/src/test-libc_counter/hash @@ -1 +1 @@ -2022-08-30 fc3eb0626f9158e4d16960cad5508f41c84852cd +2023-01-23 dc5c9ac2253d981406eaf258040a0ce3968fce0b diff --git a/repos/libports/recipes/src/test-libc_execve/hash b/repos/libports/recipes/src/test-libc_execve/hash index beea9bf5a3..6155799e42 100644 --- a/repos/libports/recipes/src/test-libc_execve/hash +++ b/repos/libports/recipes/src/test-libc_execve/hash @@ -1 +1 @@ -2022-08-30 604a34bd18457ad5f82c82a1e7c0d12104983c34 +2023-01-23 ce047f046d5d55e2b12f8f50bb0ccba426c9d9cb diff --git a/repos/libports/recipes/src/test-libc_fifo_pipe/hash b/repos/libports/recipes/src/test-libc_fifo_pipe/hash index 64b3c63563..0d574fac03 100644 --- a/repos/libports/recipes/src/test-libc_fifo_pipe/hash +++ b/repos/libports/recipes/src/test-libc_fifo_pipe/hash @@ -1 +1 @@ -2022-11-28 8eda3d9e48fc55c09e5f3e3246b384b19d8369f4 +2023-01-23 9d89ef4670f7855771c73ed66c1b66dd75182359 diff --git a/repos/libports/recipes/src/test-libc_fork/hash b/repos/libports/recipes/src/test-libc_fork/hash index 7bc56ed945..d754f348e3 100644 --- a/repos/libports/recipes/src/test-libc_fork/hash +++ b/repos/libports/recipes/src/test-libc_fork/hash @@ -1 +1 @@ -2022-08-30 2f935eefc09c791fcf107c932145ac47e8d256d8 +2023-01-23 1ec30af86b51cae8f0a105b972629a27078f1ebe diff --git a/repos/libports/recipes/src/test-libc_getenv/hash b/repos/libports/recipes/src/test-libc_getenv/hash index ca372b6f05..0753750cfd 100644 --- a/repos/libports/recipes/src/test-libc_getenv/hash +++ b/repos/libports/recipes/src/test-libc_getenv/hash @@ -1 +1 @@ -2022-08-30 1309024893b556cf4ef8c8cb1bec807cf90ab136 +2023-01-23 2ca23a2bccf4caca78f558629e4a20273e8217c7 diff --git a/repos/libports/recipes/src/test-libc_pipe/hash b/repos/libports/recipes/src/test-libc_pipe/hash index 559d2280ca..969a79c8c7 100644 --- a/repos/libports/recipes/src/test-libc_pipe/hash +++ b/repos/libports/recipes/src/test-libc_pipe/hash @@ -1 +1 @@ -2022-08-30 6b40102c373fd2055891a034e0cce4bf719ba21b +2023-01-23 5f7af6ac277a69f343436258112f3ab693b4b68a diff --git a/repos/libports/recipes/src/test-libc_vfs/hash b/repos/libports/recipes/src/test-libc_vfs/hash index 4f61fdb2f8..713a420100 100644 --- a/repos/libports/recipes/src/test-libc_vfs/hash +++ b/repos/libports/recipes/src/test-libc_vfs/hash @@ -1 +1 @@ -2022-11-28 af8906f1e9d479a8303c608f5477ce511b38d570 +2023-01-23 b3b1c3ffd5dd548f1e17c513c9702a0d209eef61 diff --git a/repos/libports/recipes/src/test-libc_vfs_block/hash b/repos/libports/recipes/src/test-libc_vfs_block/hash index ce764ddc1c..1acc688471 100644 --- a/repos/libports/recipes/src/test-libc_vfs_block/hash +++ b/repos/libports/recipes/src/test-libc_vfs_block/hash @@ -1 +1 @@ -2022-11-28 3bb1e44c6e1c9a21e8a854d711c6f39be99a4ddd +2023-01-23 1431f31b92d8f6e1e20c88111a30b5bc427730f7 diff --git a/repos/libports/recipes/src/test-netty/hash b/repos/libports/recipes/src/test-netty/hash index 2cd00347a8..7e96b9a03b 100644 --- a/repos/libports/recipes/src/test-netty/hash +++ b/repos/libports/recipes/src/test-netty/hash @@ -1 +1 @@ -2022-11-28 6148ad53fc4b417326e4a0e29772e37a1a104c19 +2023-01-23 a83d89626f89372a2f2c54f15db7568a2ff54ce8 diff --git a/repos/libports/recipes/src/test-pthread/hash b/repos/libports/recipes/src/test-pthread/hash index 0ab413e771..abe756d858 100644 --- a/repos/libports/recipes/src/test-pthread/hash +++ b/repos/libports/recipes/src/test-pthread/hash @@ -1 +1 @@ -2022-11-28 b61e0d028e3ac57095b33a00a370b9266c08da0b +2023-01-23 1f385e99ed07247f2eda6fec1f7845f53672173e diff --git a/repos/libports/recipes/src/test-qpluginwidget/hash b/repos/libports/recipes/src/test-qpluginwidget/hash index 676b302a95..89cbbaa90c 100644 --- a/repos/libports/recipes/src/test-qpluginwidget/hash +++ b/repos/libports/recipes/src/test-qpluginwidget/hash @@ -1 +1 @@ -2022-11-28 2e81467bb0823d68d3525cc1c680b0c4cef46c14 +2023-01-23 26c1836f83072bee95fa2cf4d2362f476eef2d62 diff --git a/repos/libports/recipes/src/test-qt_core/hash b/repos/libports/recipes/src/test-qt_core/hash index 5e71b032d9..b2478e3a9c 100644 --- a/repos/libports/recipes/src/test-qt_core/hash +++ b/repos/libports/recipes/src/test-qt_core/hash @@ -1 +1 @@ -2022-11-16 219104176c919a2cb359e419e7cc2db5f2d66476 +2023-01-23 2e1adc62a9d43e88779d428227737eec32798cf1 diff --git a/repos/libports/recipes/src/test-qt_core_cmake/hash b/repos/libports/recipes/src/test-qt_core_cmake/hash index a3120f84f0..bb6932bc05 100644 --- a/repos/libports/recipes/src/test-qt_core_cmake/hash +++ b/repos/libports/recipes/src/test-qt_core_cmake/hash @@ -1 +1 @@ -2022-11-16 48c43e510438426e26b1ef8750f8d166187fae53 +2023-01-23 7dc483b824b2f8559b04f73e2d566d35589c13ed diff --git a/repos/libports/recipes/src/test-qt_quick/hash b/repos/libports/recipes/src/test-qt_quick/hash index b6e376660e..785cc23fc5 100644 --- a/repos/libports/recipes/src/test-qt_quick/hash +++ b/repos/libports/recipes/src/test-qt_quick/hash @@ -1 +1 @@ -2022-11-16 3beaa0b42d07a26a50e15ed2cf66b0fd919d768a +2023-01-23 e77a86e604cbf73da21263a52a4d984ebac812a7 diff --git a/repos/libports/recipes/src/test-spark/hash b/repos/libports/recipes/src/test-spark/hash index a7004bf3f2..29260bf299 100644 --- a/repos/libports/recipes/src/test-spark/hash +++ b/repos/libports/recipes/src/test-spark/hash @@ -1 +1 @@ -2022-11-28 d33ea8426c2640855b7039d79fc06b88db0a88e0 +2023-01-23 fc318b13ffa931e9074491402d54c2a7925a169d diff --git a/repos/libports/recipes/src/test-spark_exception/hash b/repos/libports/recipes/src/test-spark_exception/hash index 2e12474a36..dee5302d45 100644 --- a/repos/libports/recipes/src/test-spark_exception/hash +++ b/repos/libports/recipes/src/test-spark_exception/hash @@ -1 +1 @@ -2022-11-28 fbb738e421b5c0d85f99d83d3c009923e1b483da +2023-01-23 2473d2e6e6e7f1b88dd3d260fbeb1928a5d96e70 diff --git a/repos/libports/recipes/src/test-spark_secondary_stack/hash b/repos/libports/recipes/src/test-spark_secondary_stack/hash index 7252e2922f..d6630f6303 100644 --- a/repos/libports/recipes/src/test-spark_secondary_stack/hash +++ b/repos/libports/recipes/src/test-spark_secondary_stack/hash @@ -1 +1 @@ -2022-11-28 4c3776bc479d79e4218fdd53c8a641ee0e8f0463 +2023-01-23 b7c8c685b14171af6a3f28bbeedc20fda9e33f8d diff --git a/repos/libports/recipes/src/test-stdcxx/hash b/repos/libports/recipes/src/test-stdcxx/hash index 44c0675381..86c62deebf 100644 --- a/repos/libports/recipes/src/test-stdcxx/hash +++ b/repos/libports/recipes/src/test-stdcxx/hash @@ -1 +1 @@ -2022-08-30 635de877f0b8942d45ecf0939ddcfb7b0708c928 +2023-01-23 ff12f68869560c1e42366526cff785241c135358 diff --git a/repos/libports/recipes/src/test-tcp/hash b/repos/libports/recipes/src/test-tcp/hash index ed2cc3b51f..6d18f503bf 100644 --- a/repos/libports/recipes/src/test-tcp/hash +++ b/repos/libports/recipes/src/test-tcp/hash @@ -1 +1 @@ -2022-11-28 3304e65b77951a3837ce33ebcd38ce59c7ba1ccb +2023-01-23 373d7b4dc5e3359b06805c2a42ab96cb27939fbd diff --git a/repos/libports/recipes/src/usb_webcam/hash b/repos/libports/recipes/src/usb_webcam/hash index 84fdd0c543..68b871bece 100644 --- a/repos/libports/recipes/src/usb_webcam/hash +++ b/repos/libports/recipes/src/usb_webcam/hash @@ -1 +1 @@ -2022-11-28 0c51fde93e19e2d25186c84aaae5dac12dd589cf +2023-01-23 4673f8398b8b668d37244a342aeb85d943c9e0a7 diff --git a/repos/libports/recipes/src/vesa_drv/hash b/repos/libports/recipes/src/vesa_drv/hash index 2e7716901e..be3eec8a5e 100644 --- a/repos/libports/recipes/src/vesa_drv/hash +++ b/repos/libports/recipes/src/vesa_drv/hash @@ -1 +1 @@ -2022-11-28 b2c140214ce07c51dd5fe6da30ad720447183c3b +2023-01-23 4a726d4a5bfa473a3bb65128e6fdfc5ccbf6ce91 diff --git a/repos/libports/recipes/src/vfs_fatfs/hash b/repos/libports/recipes/src/vfs_fatfs/hash index 3146816332..640c758dbd 100644 --- a/repos/libports/recipes/src/vfs_fatfs/hash +++ b/repos/libports/recipes/src/vfs_fatfs/hash @@ -1 +1 @@ -2022-11-28 50f01521241a90aee8d40e6af351b715c8347cf6 +2023-01-23 f09b0d9a6cd76fe89b39231930a103d04fc8c397 diff --git a/repos/libports/recipes/src/vfs_jitterentropy/hash b/repos/libports/recipes/src/vfs_jitterentropy/hash index e446110649..025bee557e 100644 --- a/repos/libports/recipes/src/vfs_jitterentropy/hash +++ b/repos/libports/recipes/src/vfs_jitterentropy/hash @@ -1 +1 @@ -2022-11-28 788ca4103d1b15c889747bc2ce5026b774157cbe +2023-01-23 7f866dc66ae6884ee38e872f2bf7685ff0ed834b diff --git a/repos/libports/recipes/src/vfs_libusb/hash b/repos/libports/recipes/src/vfs_libusb/hash index 1b6fce1a43..fdd67115e7 100644 --- a/repos/libports/recipes/src/vfs_libusb/hash +++ b/repos/libports/recipes/src/vfs_libusb/hash @@ -1 +1 @@ -2022-11-28 f5f5728185bd06ed0c94cfcf3c0207d697e8c11d +2023-01-23 e09932c4fa69e2a5a8c0c6d026f96e6cfc204f82 diff --git a/repos/libports/recipes/src/vfs_lwip/hash b/repos/libports/recipes/src/vfs_lwip/hash index 54debcc641..36fe60e9b6 100644 --- a/repos/libports/recipes/src/vfs_lwip/hash +++ b/repos/libports/recipes/src/vfs_lwip/hash @@ -1 +1 @@ -2022-11-28 552c93534c4cab754436bb35b27f5d7a3aaa15fd +2023-01-23 dc73044f61e5b67ff021f131b462b60dbe1785bc diff --git a/repos/libports/recipes/src/vfs_oss/hash b/repos/libports/recipes/src/vfs_oss/hash index 9693dc3124..aca44d0055 100644 --- a/repos/libports/recipes/src/vfs_oss/hash +++ b/repos/libports/recipes/src/vfs_oss/hash @@ -1 +1 @@ -2022-11-28 140f824c7f71a83a1cc83995d75c88b4cdcd73b1 +2023-01-23 7b8aaaad7f80ec0ecbf477f4545bff3714221e84 diff --git a/repos/libports/recipes/src/zlib/hash b/repos/libports/recipes/src/zlib/hash index 6397a56208..92a79f2bf3 100644 --- a/repos/libports/recipes/src/zlib/hash +++ b/repos/libports/recipes/src/zlib/hash @@ -1 +1 @@ -2022-11-16 ff106b57e01f085abfa2e96adcd93ff6766e8eaa +2023-01-23 cba029b4f9ca8076faa80e7d7553ab6f61936e14 diff --git a/repos/os/recipes/api/file_system_session/hash b/repos/os/recipes/api/file_system_session/hash index a004571a1a..2c060d755e 100644 --- a/repos/os/recipes/api/file_system_session/hash +++ b/repos/os/recipes/api/file_system_session/hash @@ -1 +1 @@ -2022-09-20 077fa78b70134123b3b5005eb7bd7d0dcc4d1d6c +2023-01-23 e2d1f3c8739de42a95896d66f28b1821a6939dee diff --git a/repos/os/recipes/api/net/hash b/repos/os/recipes/api/net/hash index ca004de671..9ae246d0f8 100644 --- a/repos/os/recipes/api/net/hash +++ b/repos/os/recipes/api/net/hash @@ -1 +1 @@ -2022-10-13 e9d4eef65b30010955d36fdee8f346c44cae541f +2023-01-23 009d557181280e97aabdd18c048fd6963f0af3ca diff --git a/repos/os/recipes/api/nic_session/hash b/repos/os/recipes/api/nic_session/hash index 2a21572f1c..dbcebf4b0d 100644 --- a/repos/os/recipes/api/nic_session/hash +++ b/repos/os/recipes/api/nic_session/hash @@ -1 +1 @@ -2022-08-30 e1de77019b959b55c45ac857cdc136796e59774c +2023-01-23 82881a0e70fb514e13e11700ffae33292eeabfe5 diff --git a/repos/os/recipes/api/os/hash b/repos/os/recipes/api/os/hash index 62af5995b1..3fd5c580a8 100644 --- a/repos/os/recipes/api/os/hash +++ b/repos/os/recipes/api/os/hash @@ -1 +1 @@ -2022-11-16 8d06c2cccbe00e1eb06d54eac06e2f96627a3fe5 +2023-01-23 b4f74ba5623c9df823a6573222eed8b390c290fd diff --git a/repos/os/recipes/api/uplink_session/hash b/repos/os/recipes/api/uplink_session/hash index 7e6e0348f6..a9e054fdcc 100644 --- a/repos/os/recipes/api/uplink_session/hash +++ b/repos/os/recipes/api/uplink_session/hash @@ -1 +1 @@ -2022-08-30 9b11856ee11375c27b0b647e67bf8797c25369e8 +2023-01-23 6a0f0b05de651cd210fcbdc80d2408b2b3536e58 diff --git a/repos/os/recipes/api/vfs/hash b/repos/os/recipes/api/vfs/hash index 6d903a8798..635d57af0f 100644 --- a/repos/os/recipes/api/vfs/hash +++ b/repos/os/recipes/api/vfs/hash @@ -1 +1 @@ -2022-02-27 26dc3e9449473d72fe3392e59dbaa6b129324158 +2023-01-23 1f10872c74e5e745b0b2546ea5b5cf118c9dd0a0 diff --git a/repos/os/recipes/pkg/black_hole/hash b/repos/os/recipes/pkg/black_hole/hash index 62e3e33b3c..11ce553de1 100644 --- a/repos/os/recipes/pkg/black_hole/hash +++ b/repos/os/recipes/pkg/black_hole/hash @@ -1 +1 @@ -2022-11-28 d56bcd206037174a541f4eddb7db5c9f07350959 +2023-01-23 48ad4809094d960b8ad068d78e9069e72e5d80b4 diff --git a/repos/os/recipes/pkg/chroot/hash b/repos/os/recipes/pkg/chroot/hash index dff7ae5e28..439128e7f8 100644 --- a/repos/os/recipes/pkg/chroot/hash +++ b/repos/os/recipes/pkg/chroot/hash @@ -1 +1 @@ -2022-11-28 99c14ed31c09379216162d2c71b28384585865d5 +2023-01-23 18fa7c4bd983841b2f0ceb3082f982685a777fa8 diff --git a/repos/os/recipes/pkg/clipboard/hash b/repos/os/recipes/pkg/clipboard/hash index 70387a98e9..357840a775 100644 --- a/repos/os/recipes/pkg/clipboard/hash +++ b/repos/os/recipes/pkg/clipboard/hash @@ -1 +1 @@ -2022-11-28 b8f0a19889af4fdca89eb714da13ea9ea91443b7 +2023-01-23 275d0ef5752398c4a22e10d42e9972430befa9da diff --git a/repos/os/recipes/pkg/cpu_balancer/hash b/repos/os/recipes/pkg/cpu_balancer/hash index eb782d77b1..fa5c3d40dd 100644 --- a/repos/os/recipes/pkg/cpu_balancer/hash +++ b/repos/os/recipes/pkg/cpu_balancer/hash @@ -1 +1 @@ -2022-11-28 f747463aee5a3c29ef3c685910d9c4716fcc2743 +2023-01-23 3af7714b0c8e612ef569c33d6e278e3a38c0b2c5 diff --git a/repos/os/recipes/pkg/cpu_balancer_config/hash b/repos/os/recipes/pkg/cpu_balancer_config/hash index 31c9e8fcb8..fc2c4205b3 100644 --- a/repos/os/recipes/pkg/cpu_balancer_config/hash +++ b/repos/os/recipes/pkg/cpu_balancer_config/hash @@ -1 +1 @@ -2022-11-28 9db9805dd58d2c1adc59774aa814ffc88e66b6dd +2023-01-23 2912a29892743b816245a448378b88f8c27c79de diff --git a/repos/os/recipes/pkg/cpu_burner/hash b/repos/os/recipes/pkg/cpu_burner/hash index 67a757b950..550c32bb8d 100644 --- a/repos/os/recipes/pkg/cpu_burner/hash +++ b/repos/os/recipes/pkg/cpu_burner/hash @@ -1 +1 @@ -2022-11-22-a cf3d0528b5688b0b9a48c2ef695c3aae3f7e62c5 +2023-01-23 be4fea8cdda35377c013040954fd9a70fe99e9fb diff --git a/repos/os/recipes/pkg/drivers_interactive-linux/hash b/repos/os/recipes/pkg/drivers_interactive-linux/hash index abd023c439..88ff95694c 100644 --- a/repos/os/recipes/pkg/drivers_interactive-linux/hash +++ b/repos/os/recipes/pkg/drivers_interactive-linux/hash @@ -1 +1 @@ -2022-11-28 626a30929bbdaebfd6bf40a3dc26159d7ae2b6a9 +2023-01-23 0db40cd77de1bfd5445c481a8a1b137c14916665 diff --git a/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash b/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash index 1cd3e8d180..a228bd7c0a 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash +++ b/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash @@ -1 +1 @@ -2022-11-28 60e42d4ca1c3ee70e46e489efc4a6f06a96882be +2023-01-23 c11f22802614ff2ac00722f4dde407628fe67868 diff --git a/repos/os/recipes/pkg/drivers_interactive-pc/hash b/repos/os/recipes/pkg/drivers_interactive-pc/hash index ed4d885a90..21d57dbe39 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pc/hash +++ b/repos/os/recipes/pkg/drivers_interactive-pc/hash @@ -1 +1 @@ -2022-11-28 4ff01e8b21c88bb7ad5b2271c005c4ad255d5cf9 +2023-01-23 20ca462dafbd6a32f586fde3764571ae0539e612 diff --git a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash index 9bc2398aa8..4d8d8edbff 100644 --- a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash +++ b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-11-28 140593babd3a93d22d47bcc2d452d111488e1e76 +2023-01-23 f7659dc01fad4b7bf8e376a01ece07f6fedbc6a1 diff --git a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash index 9bc2398aa8..4d8d8edbff 100644 --- a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash +++ b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-11-28 140593babd3a93d22d47bcc2d452d111488e1e76 +2023-01-23 f7659dc01fad4b7bf8e376a01ece07f6fedbc6a1 diff --git a/repos/os/recipes/pkg/drivers_nic-linux/hash b/repos/os/recipes/pkg/drivers_nic-linux/hash index 75d35918a6..9f6b81e8de 100644 --- a/repos/os/recipes/pkg/drivers_nic-linux/hash +++ b/repos/os/recipes/pkg/drivers_nic-linux/hash @@ -1 +1 @@ -2022-11-28 dc77beeaed76c87597123cc172f778c0f8835726 +2023-01-23 ef958f8b2ec679b9c8cdc123803efe1c281e72a8 diff --git a/repos/os/recipes/pkg/drivers_nic-pbxa9/hash b/repos/os/recipes/pkg/drivers_nic-pbxa9/hash index cddcaf096c..a7088d6087 100644 --- a/repos/os/recipes/pkg/drivers_nic-pbxa9/hash +++ b/repos/os/recipes/pkg/drivers_nic-pbxa9/hash @@ -1 +1 @@ -2022-11-28 376b86adb327190bc78b9220fde1bc69374d1a6c +2023-01-23 5c58d2facf3f3f35b58db81080998747b889d2c5 diff --git a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash index 885b34a133..801ba1bd89 100644 --- a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash +++ b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2022-11-28 8744b0b07a32af21bd8245872b04198445d788bc +2023-01-23 25e10b28cb46df8d83e54d10d054d0761a18bae7 diff --git a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash index 885b34a133..801ba1bd89 100644 --- a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash +++ b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2022-11-28 8744b0b07a32af21bd8245872b04198445d788bc +2023-01-23 25e10b28cb46df8d83e54d10d054d0761a18bae7 diff --git a/repos/os/recipes/pkg/fs_report/hash b/repos/os/recipes/pkg/fs_report/hash index 2ab9b75473..c2b6561bf2 100644 --- a/repos/os/recipes/pkg/fs_report/hash +++ b/repos/os/recipes/pkg/fs_report/hash @@ -1 +1 @@ -2022-11-28 18d76e77d7d2973bf49047dc9d274a2e7b8fb026 +2023-01-23 c450d609697a4b4c0943da158b6d6607604cdab6 diff --git a/repos/os/recipes/pkg/fs_rom/hash b/repos/os/recipes/pkg/fs_rom/hash index 4eecc73599..9574fb5bc6 100644 --- a/repos/os/recipes/pkg/fs_rom/hash +++ b/repos/os/recipes/pkg/fs_rom/hash @@ -1 +1 @@ -2022-11-28 96389106d1242548d3551551b1dbc05c2b0eaad8 +2023-01-23 b8870b63a487ae72ce3ae55b0fb5a3343af8da1b diff --git a/repos/os/recipes/pkg/mixer/hash b/repos/os/recipes/pkg/mixer/hash index 59671e2ab6..5249225afc 100644 --- a/repos/os/recipes/pkg/mixer/hash +++ b/repos/os/recipes/pkg/mixer/hash @@ -1 +1 @@ -2022-11-28 2c17b15681294b6e1f092402a2b25fa2ec8997d8 +2023-01-23 d8b0a6664a5ced3edf34c38f265485763d2460fd diff --git a/repos/os/recipes/pkg/nic_router-nat/hash b/repos/os/recipes/pkg/nic_router-nat/hash index b8f20b05e5..98569d9ce3 100644 --- a/repos/os/recipes/pkg/nic_router-nat/hash +++ b/repos/os/recipes/pkg/nic_router-nat/hash @@ -1 +1 @@ -2022-11-28 c8d61048b1a5e3689150115852364a4ea4c57e5b +2023-01-23 cbb9e66424b45d1dc7e6f47b2141bb0cc4db3f63 diff --git a/repos/os/recipes/pkg/nit_focus/hash b/repos/os/recipes/pkg/nit_focus/hash index 09a1876fe9..aed63135fc 100644 --- a/repos/os/recipes/pkg/nit_focus/hash +++ b/repos/os/recipes/pkg/nit_focus/hash @@ -1 +1 @@ -2022-11-28 4436494fe3bf53a523ef44e0ac04724286fb7dc6 +2023-01-23 1c37f6b3e320a9be3792b01a210b2fbe4366e7a4 diff --git a/repos/os/recipes/pkg/part_block/hash b/repos/os/recipes/pkg/part_block/hash index 6547e6a1d8..890708acb9 100644 --- a/repos/os/recipes/pkg/part_block/hash +++ b/repos/os/recipes/pkg/part_block/hash @@ -1 +1 @@ -2022-11-28 d9cd8c0320d663ce7b4f7dea89db4a69fdfc6ed7 +2023-01-23 6805765befc8afdb1e6707614fa7061b8a357021 diff --git a/repos/os/recipes/pkg/recall_fs/hash b/repos/os/recipes/pkg/recall_fs/hash index 252cf9dfc2..fa308f4095 100644 --- a/repos/os/recipes/pkg/recall_fs/hash +++ b/repos/os/recipes/pkg/recall_fs/hash @@ -1 +1 @@ -2022-11-28 07c55736faad906fed51afcbc45fc01126de03d1 +2023-01-23 30e941f732df9d8f50d9838a8ffa7ae04480fba9 diff --git a/repos/os/recipes/pkg/report_rom/hash b/repos/os/recipes/pkg/report_rom/hash index 33237989de..5668018d7f 100644 --- a/repos/os/recipes/pkg/report_rom/hash +++ b/repos/os/recipes/pkg/report_rom/hash @@ -1 +1 @@ -2022-11-28 78731560c6e848ae2b1fd6f06985daf68b388fb9 +2023-01-23 395f4d9e5f951b1e836abf284d60a13cf692c336 diff --git a/repos/os/recipes/pkg/rom_filter/hash b/repos/os/recipes/pkg/rom_filter/hash index 448acff3fd..b0760f425d 100644 --- a/repos/os/recipes/pkg/rom_filter/hash +++ b/repos/os/recipes/pkg/rom_filter/hash @@ -1 +1 @@ -2022-11-28 db52c15e70b737ebf0a07aeefe42ed313fd94c9c +2023-01-23 8dd3426d6c8a799e28dd8df22559174fa070943b diff --git a/repos/os/recipes/pkg/rom_reporter/hash b/repos/os/recipes/pkg/rom_reporter/hash index 11db03169c..6d4300c2c8 100644 --- a/repos/os/recipes/pkg/rom_reporter/hash +++ b/repos/os/recipes/pkg/rom_reporter/hash @@ -1 +1 @@ -2022-11-28 f027f718caa38813a647718b017a8654900d42cf +2023-01-23 4afdbd1295512532bdcc7308d352dfe2ccf9b08a diff --git a/repos/os/recipes/pkg/test-audio_out/hash b/repos/os/recipes/pkg/test-audio_out/hash index f293ca426d..8ebd1f7467 100644 --- a/repos/os/recipes/pkg/test-audio_out/hash +++ b/repos/os/recipes/pkg/test-audio_out/hash @@ -1 +1 @@ -2022-11-22-c d3bc04cf7eb9af89a85330427c069faa55422d70 +2023-01-23 92504831b96c228a146f277ec1d34e17312a593d diff --git a/repos/os/recipes/pkg/test-black_hole/hash b/repos/os/recipes/pkg/test-black_hole/hash index 9848bd8b48..020e58c289 100644 --- a/repos/os/recipes/pkg/test-black_hole/hash +++ b/repos/os/recipes/pkg/test-black_hole/hash @@ -1 +1 @@ -2022-11-28 0411251efb3e30bb7a5d5c9f142fdf32b4e00fa6 +2023-01-23 8ad84bbc0ac85d60647e3c390ac83718d9d0062d diff --git a/repos/os/recipes/pkg/test-capture/hash b/repos/os/recipes/pkg/test-capture/hash index a688cadf04..fe8372a124 100644 --- a/repos/os/recipes/pkg/test-capture/hash +++ b/repos/os/recipes/pkg/test-capture/hash @@ -1 +1 @@ -2022-11-28 afd1dd7bee4be47f6375f70e7edad3b1e59be196 +2023-01-23 253d377f0f1f0029f26eac913c4be73264051823 diff --git a/repos/os/recipes/pkg/test-clipboard/hash b/repos/os/recipes/pkg/test-clipboard/hash index b7e8a9be6f..2db47c1df4 100644 --- a/repos/os/recipes/pkg/test-clipboard/hash +++ b/repos/os/recipes/pkg/test-clipboard/hash @@ -1 +1 @@ -2022-11-28 27b42b11ae331b2c8240fd2fe72df385a2ce871c +2023-01-23 f691e29db5db7bb90b2405a7f7233ed7354ce3e9 diff --git a/repos/os/recipes/pkg/test-dynamic_config/hash b/repos/os/recipes/pkg/test-dynamic_config/hash index c56159dfe2..3b897a783a 100644 --- a/repos/os/recipes/pkg/test-dynamic_config/hash +++ b/repos/os/recipes/pkg/test-dynamic_config/hash @@ -1 +1 @@ -2022-11-28 f03f62ec59aa7c8745fa1e06c05b34050bb44af6 +2023-01-23 561d093280bc4745bb8cd8b7e00d30f47a45865e diff --git a/repos/os/recipes/pkg/test-dynamic_config_loader/hash b/repos/os/recipes/pkg/test-dynamic_config_loader/hash index 4258889542..1c7dcf0e35 100644 --- a/repos/os/recipes/pkg/test-dynamic_config_loader/hash +++ b/repos/os/recipes/pkg/test-dynamic_config_loader/hash @@ -1 +1 @@ -2022-11-28 6c9dc7fe9fe09ef2f086a3bbfeb676aeda7201bc +2023-01-23 6ba0b2e8802a8116f3ed87254bee379bc456bff7 diff --git a/repos/os/recipes/pkg/test-fault_detection/hash b/repos/os/recipes/pkg/test-fault_detection/hash index f4b187325d..71fe0a2683 100644 --- a/repos/os/recipes/pkg/test-fault_detection/hash +++ b/repos/os/recipes/pkg/test-fault_detection/hash @@ -1 +1 @@ -2022-11-28 65907ee49425ba7fea350d39bfc74c4b8b3dc604 +2023-01-23 366ae704e57c2657e1f9c0944b1fd5f845129aa0 diff --git a/repos/os/recipes/pkg/test-fs_packet/hash b/repos/os/recipes/pkg/test-fs_packet/hash index b0858a41dc..f3446a0fd1 100644 --- a/repos/os/recipes/pkg/test-fs_packet/hash +++ b/repos/os/recipes/pkg/test-fs_packet/hash @@ -1 +1 @@ -2022-11-28 b1a1b48bbc64078fa87a1897fb34bdd224d18cca +2023-01-23 9178e051d426aeb5f0b5ce5c744a2e79034ca63d diff --git a/repos/os/recipes/pkg/test-fs_report/hash b/repos/os/recipes/pkg/test-fs_report/hash index 252e61a5a7..caeda9c907 100644 --- a/repos/os/recipes/pkg/test-fs_report/hash +++ b/repos/os/recipes/pkg/test-fs_report/hash @@ -1 +1 @@ -2022-11-28 201f14ba8b2ec7af751d49308fef66b726f657f4 +2023-01-23 e7d0fe6cd66f2555c0a28f873a216e923a0b2331 diff --git a/repos/os/recipes/pkg/test-fs_rom_update/hash b/repos/os/recipes/pkg/test-fs_rom_update/hash index 18dfdcec5c..cceccfba75 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update/hash @@ -1 +1 @@ -2022-11-28 e35220cb75b5d5fe357e07121f920e8f16e4313a +2023-01-23 b0788e2a55ee41f22d9e80ec26d72b380823eaf2 diff --git a/repos/os/recipes/pkg/test-fs_rom_update_fs/hash b/repos/os/recipes/pkg/test-fs_rom_update_fs/hash index 31c5299c02..a64441dcb7 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update_fs/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update_fs/hash @@ -1 +1 @@ -2022-11-28 f348e0122cf29d3bbb1226b973dde754b5cf7c1d +2023-01-23 03d74e274a841d9e64a84de51459e19edab8a1c9 diff --git a/repos/os/recipes/pkg/test-fs_rom_update_ram/hash b/repos/os/recipes/pkg/test-fs_rom_update_ram/hash index 27ca3b2512..f51e46aa13 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update_ram/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update_ram/hash @@ -1 +1 @@ -2022-11-28 998701c5b149673e4ca3148ddecd16ee80e798aa +2023-01-23 600f7fc7602e600abb4f0d861f1fe74daa75b289 diff --git a/repos/os/recipes/pkg/test-init/hash b/repos/os/recipes/pkg/test-init/hash index 0657025092..a789244352 100644 --- a/repos/os/recipes/pkg/test-init/hash +++ b/repos/os/recipes/pkg/test-init/hash @@ -1 +1 @@ -2022-11-28 ff25195def22208e3d77753885f3991cbddf219c +2023-01-23 5af9880476413b86b238346a1f940e35c349c9ee diff --git a/repos/os/recipes/pkg/test-init_loop/hash b/repos/os/recipes/pkg/test-init_loop/hash index 36f9cd4fbe..34735feada 100644 --- a/repos/os/recipes/pkg/test-init_loop/hash +++ b/repos/os/recipes/pkg/test-init_loop/hash @@ -1 +1 @@ -2022-11-28 e2363470c70b198758cd0b3f44cbd77cfeeae190 +2023-01-23 b9249ce1ddbce2e8daebc361090e649085b2c6ff diff --git a/repos/os/recipes/pkg/test-lx_block/hash b/repos/os/recipes/pkg/test-lx_block/hash index 4830872183..9595d181d5 100644 --- a/repos/os/recipes/pkg/test-lx_block/hash +++ b/repos/os/recipes/pkg/test-lx_block/hash @@ -1 +1 @@ -2022-11-28 1765857fa454b08d85639cb1267f006fbf3fff88 +2023-01-23 b56083ba06bbb49da914d6593551c24431018464 diff --git a/repos/os/recipes/pkg/test-nic_loopback/hash b/repos/os/recipes/pkg/test-nic_loopback/hash index 0281547f21..20029e96b1 100644 --- a/repos/os/recipes/pkg/test-nic_loopback/hash +++ b/repos/os/recipes/pkg/test-nic_loopback/hash @@ -1 +1 @@ -2022-11-28 cf747ebcb6d7589f09e420884deeb96bcbc30f4d +2023-01-23 ccd2c400bb789496dfd3104005ce7ce13abf46fb diff --git a/repos/os/recipes/pkg/test-nic_perf/hash b/repos/os/recipes/pkg/test-nic_perf/hash index 6936773834..455cec87b4 100644 --- a/repos/os/recipes/pkg/test-nic_perf/hash +++ b/repos/os/recipes/pkg/test-nic_perf/hash @@ -1 +1 @@ -2022-11-28 19eb2701bacc5dae5f9c7ca2248cf0a4fde5e20b +2023-01-23 67c99368de1f308f15c83eaedcf5cca0c8a9eb3e diff --git a/repos/os/recipes/pkg/test-nic_perf_router/hash b/repos/os/recipes/pkg/test-nic_perf_router/hash index 639db367b7..58a2dce7e6 100644 --- a/repos/os/recipes/pkg/test-nic_perf_router/hash +++ b/repos/os/recipes/pkg/test-nic_perf_router/hash @@ -1 +1 @@ -2022-11-28 689ba3f308befbb408806ab91155c40b3c52705a +2023-01-23 b480bdaaab0d830a1ad13a8509e78afbb394eea8 diff --git a/repos/os/recipes/pkg/test-part_block_gpt/hash b/repos/os/recipes/pkg/test-part_block_gpt/hash index b4395c074c..aec6a7a017 100644 --- a/repos/os/recipes/pkg/test-part_block_gpt/hash +++ b/repos/os/recipes/pkg/test-part_block_gpt/hash @@ -1 +1 @@ -2022-11-28 144a933973718abdeb95a20f091c8b2e39a710fb +2023-01-23 8649e43b612d09e36ac6f1d7ad15f60d64d48105 diff --git a/repos/os/recipes/pkg/test-part_block_mbr/hash b/repos/os/recipes/pkg/test-part_block_mbr/hash index fe139f9248..9171903ec8 100644 --- a/repos/os/recipes/pkg/test-part_block_mbr/hash +++ b/repos/os/recipes/pkg/test-part_block_mbr/hash @@ -1 +1 @@ -2022-11-28 1b525e092104187461dd47d7e6efa1ef8938e005 +2023-01-23 4548a0dd29165b5ae2cce9fb5fed0dc22cd0793c diff --git a/repos/os/recipes/pkg/test-ram_fs_chunk/hash b/repos/os/recipes/pkg/test-ram_fs_chunk/hash index 9d349aeaad..bd5ca6edfa 100644 --- a/repos/os/recipes/pkg/test-ram_fs_chunk/hash +++ b/repos/os/recipes/pkg/test-ram_fs_chunk/hash @@ -1 +1 @@ -2022-11-28 096e8bd0a5effe423cb8fad4c9f451c3091dde33 +2023-01-23 637b6d711ef58eea34238102f21a58a051833709 diff --git a/repos/os/recipes/pkg/test-read_only_rom/hash b/repos/os/recipes/pkg/test-read_only_rom/hash index d8be2ed7a8..39bb7412ad 100644 --- a/repos/os/recipes/pkg/test-read_only_rom/hash +++ b/repos/os/recipes/pkg/test-read_only_rom/hash @@ -1 +1 @@ -2022-11-28 122128ea2a20bbe898a816d1b1bcf4bfb2432b83 +2023-01-23 be501dbc83a6f4adcd045900a0a3fd58e5b256e9 diff --git a/repos/os/recipes/pkg/test-report_rom/hash b/repos/os/recipes/pkg/test-report_rom/hash index c95cd20de2..328934e518 100644 --- a/repos/os/recipes/pkg/test-report_rom/hash +++ b/repos/os/recipes/pkg/test-report_rom/hash @@ -1 +1 @@ -2022-11-28 402bb41943eccc87cfd1cf7ee81a3d0b8cbba224 +2023-01-23 1dda2c9b2480aa3acc871d27db57d769f9f31ad0 diff --git a/repos/os/recipes/pkg/test-resource_request/hash b/repos/os/recipes/pkg/test-resource_request/hash index 85210fa629..2ba70b7b52 100644 --- a/repos/os/recipes/pkg/test-resource_request/hash +++ b/repos/os/recipes/pkg/test-resource_request/hash @@ -1 +1 @@ -2022-11-28 4f1b9aea7d0293bde70b5158d14e1838d8015dea +2023-01-23 8ea9fc889ad5877f4b7d424a955a7055b8d8a10c diff --git a/repos/os/recipes/pkg/test-resource_yield/hash b/repos/os/recipes/pkg/test-resource_yield/hash index 2b4adcc47c..c77ad6c3e8 100644 --- a/repos/os/recipes/pkg/test-resource_yield/hash +++ b/repos/os/recipes/pkg/test-resource_yield/hash @@ -1 +1 @@ -2022-11-28 7480c32094f0b27a033ffa555b4ab2619b333adc +2023-01-23 b56b754eec83225e3141911a2f068b61766f85fd diff --git a/repos/os/recipes/pkg/test-rom_filter/hash b/repos/os/recipes/pkg/test-rom_filter/hash index 01f1b1948d..615d86b78e 100644 --- a/repos/os/recipes/pkg/test-rom_filter/hash +++ b/repos/os/recipes/pkg/test-rom_filter/hash @@ -1 +1 @@ -2022-11-28 95ba076dda8fde536052024818549816c4c4b2c2 +2023-01-23 0d52d9abf2c8746c616765a5263a175f7171a44a diff --git a/repos/os/recipes/pkg/test-rtc/hash b/repos/os/recipes/pkg/test-rtc/hash index 65e9701ce4..46b84361fc 100644 --- a/repos/os/recipes/pkg/test-rtc/hash +++ b/repos/os/recipes/pkg/test-rtc/hash @@ -1 +1 @@ -2022-11-28 4712d9ee8d4cdad45cf9234825e08b9429e147f2 +2023-01-23 8fcb00aba60ea4c4b26664715e2f997e8fa726c2 diff --git a/repos/os/recipes/pkg/test-sandbox/hash b/repos/os/recipes/pkg/test-sandbox/hash index c0cab5931e..d87342fa50 100644 --- a/repos/os/recipes/pkg/test-sandbox/hash +++ b/repos/os/recipes/pkg/test-sandbox/hash @@ -1 +1 @@ -2022-11-28 c104dd07b6231a39c5731dc25094fae519803103 +2023-01-23 604b9d8341066a18628eefb473450bbf92a837a8 diff --git a/repos/os/recipes/pkg/test-signal/hash b/repos/os/recipes/pkg/test-signal/hash index 0ba15245ee..0d5c75833d 100644 --- a/repos/os/recipes/pkg/test-signal/hash +++ b/repos/os/recipes/pkg/test-signal/hash @@ -1 +1 @@ -2022-11-28 dd32bfc05f8b701b6ff373c3f30f013503aa411b +2023-01-23 07797763a137a7e18af889c67034174f2d7beb98 diff --git a/repos/os/recipes/pkg/test-slab/hash b/repos/os/recipes/pkg/test-slab/hash index 8dde5550eb..bc2b29a2c6 100644 --- a/repos/os/recipes/pkg/test-slab/hash +++ b/repos/os/recipes/pkg/test-slab/hash @@ -1 +1 @@ -2022-11-28 256a36d8b5f936424a8b8b722a34e3c392841f34 +2023-01-23 80f474196189e426034e4397881d6b3467463085 diff --git a/repos/os/recipes/pkg/test-terminal_crosslink/hash b/repos/os/recipes/pkg/test-terminal_crosslink/hash index ea5ec46a12..723dc36272 100644 --- a/repos/os/recipes/pkg/test-terminal_crosslink/hash +++ b/repos/os/recipes/pkg/test-terminal_crosslink/hash @@ -1 +1 @@ -2022-11-28 d837989767a9c064a8fcb70f4ec1ffe5eaa68f9e +2023-01-23 5c31b78d75f9e5863d18af55edd80957b48503db diff --git a/repos/os/recipes/pkg/test-trace/hash b/repos/os/recipes/pkg/test-trace/hash index 8268c2098a..c977841c84 100644 --- a/repos/os/recipes/pkg/test-trace/hash +++ b/repos/os/recipes/pkg/test-trace/hash @@ -1 +1 @@ -2022-11-28 7d5173a490930245f6a337de912df2c1e2eb0f9d +2023-01-23 8551ab8ed51318739a7f86c24f38adad04b851f5 diff --git a/repos/os/recipes/pkg/test-trace_buffer/hash b/repos/os/recipes/pkg/test-trace_buffer/hash index 96b61a57a8..8434af7711 100644 --- a/repos/os/recipes/pkg/test-trace_buffer/hash +++ b/repos/os/recipes/pkg/test-trace_buffer/hash @@ -1 +1 @@ -2022-11-28 73f8875b00baf1b603ba5f323ed0776b335f577f +2023-01-23 e3214876c1db677411f6b9c37bf08cac8dc2acd8 diff --git a/repos/os/recipes/pkg/test-trace_logger/hash b/repos/os/recipes/pkg/test-trace_logger/hash index a56eefddb4..1a0b3d0e78 100644 --- a/repos/os/recipes/pkg/test-trace_logger/hash +++ b/repos/os/recipes/pkg/test-trace_logger/hash @@ -1 +1 @@ -2022-11-28 bfa111a932859761875fc3d7327b07198cb59d70 +2023-01-23 87f8d3ad245a9cb762a6750ba41d87a8d03dc0e2 diff --git a/repos/os/recipes/pkg/test-utf8/hash b/repos/os/recipes/pkg/test-utf8/hash index 6d2690e65b..220cc4cf98 100644 --- a/repos/os/recipes/pkg/test-utf8/hash +++ b/repos/os/recipes/pkg/test-utf8/hash @@ -1 +1 @@ -2022-11-28 7555d3b09b7e62e9c9a6f820bb57e6da69df3ca1 +2023-01-23 25d83d76a350792917f9980c123c1578e7937e10 diff --git a/repos/os/recipes/pkg/test-vfs_block/hash b/repos/os/recipes/pkg/test-vfs_block/hash index 7c2bef3582..34ef886d86 100644 --- a/repos/os/recipes/pkg/test-vfs_block/hash +++ b/repos/os/recipes/pkg/test-vfs_block/hash @@ -1 +1 @@ -2022-11-28 38ecf777af467008a3df8d2c7deb8af974ff7d56 +2023-01-23 4d4a31a2e17b3cdd3deadc09e4e4d4b06628d031 diff --git a/repos/os/recipes/pkg/test-vfs_stress_fs/hash b/repos/os/recipes/pkg/test-vfs_stress_fs/hash index e5eb62328d..60ce75f45f 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_fs/hash +++ b/repos/os/recipes/pkg/test-vfs_stress_fs/hash @@ -1 +1 @@ -2022-11-28 bbdc4f370ccd4a422b67fea47011f3efccb46d5d +2023-01-23 a2189ddd5362b7d84b409e9ee560e0731b9d6687 diff --git a/repos/os/recipes/pkg/test-vfs_stress_ram/hash b/repos/os/recipes/pkg/test-vfs_stress_ram/hash index f0958396a3..48f48ef1f3 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_ram/hash +++ b/repos/os/recipes/pkg/test-vfs_stress_ram/hash @@ -1 +1 @@ -2022-11-28 62eb327427ea898c32e38c96a46308e678a040b7 +2023-01-23 04f06aa72c9b66ca2f738116c388254e32ba8b51 diff --git a/repos/os/recipes/pkg/test-weak_ptr/hash b/repos/os/recipes/pkg/test-weak_ptr/hash index c8cf7aabfe..67ffeeded3 100644 --- a/repos/os/recipes/pkg/test-weak_ptr/hash +++ b/repos/os/recipes/pkg/test-weak_ptr/hash @@ -1 +1 @@ -2022-11-28 935fc19c15ea33fc935e993ebc5a20ab7bd2dd14 +2023-01-23 bab76cfd4ddf2311c0c0df9c8fca14054abcd0fb diff --git a/repos/os/recipes/pkg/top/hash b/repos/os/recipes/pkg/top/hash index bd942e41a2..ce324c3512 100644 --- a/repos/os/recipes/pkg/top/hash +++ b/repos/os/recipes/pkg/top/hash @@ -1 +1 @@ -2022-12-06 dfe80d673e81dee9e9c51e2a3f28c848ff3dc0e8 +2023-01-23 af7a096d325456565d098af95b18de629e2bc094 diff --git a/repos/os/recipes/pkg/trace_logger/hash b/repos/os/recipes/pkg/trace_logger/hash index f3f7efdcbe..42005937d9 100644 --- a/repos/os/recipes/pkg/trace_logger/hash +++ b/repos/os/recipes/pkg/trace_logger/hash @@ -1 +1 @@ -2022-11-28 3629e6b044af7f0d24411d5845a9c8261786ab43 +2023-01-23 6aa1885204571629a3f6dfd23bfd0d36f7cdaa7c diff --git a/repos/os/recipes/pkg/vfs/hash b/repos/os/recipes/pkg/vfs/hash index 3810cdb318..958a96102e 100644 --- a/repos/os/recipes/pkg/vfs/hash +++ b/repos/os/recipes/pkg/vfs/hash @@ -1 +1 @@ -2022-11-28 2e215711da551daff1387fc66916a92d270e143a +2023-01-23 0e745a14660a7c3b697b0d387c613a9e92874dce diff --git a/repos/os/recipes/pkg/vfs_block/hash b/repos/os/recipes/pkg/vfs_block/hash index d1a7b220da..1a69244150 100644 --- a/repos/os/recipes/pkg/vfs_block/hash +++ b/repos/os/recipes/pkg/vfs_block/hash @@ -1 +1 @@ -2022-11-28 d47e32b129b59904cb9a3c773799908c234f6cbe +2023-01-23 cf494cdf954e311367529bc7da0581df6785330c diff --git a/repos/os/recipes/src/acpi_drv/hash b/repos/os/recipes/src/acpi_drv/hash index 7b7821b4a7..48a0154d01 100644 --- a/repos/os/recipes/src/acpi_drv/hash +++ b/repos/os/recipes/src/acpi_drv/hash @@ -1 +1 @@ -2022-11-28 025741266235a6bf83f527095f2b1d260419f08a +2023-01-23 d96c3c085b7c18f75036c5d6f09d9bbbdcfc403f diff --git a/repos/os/recipes/src/ahci_drv/hash b/repos/os/recipes/src/ahci_drv/hash index 3cb0011efa..d8c001b9ce 100644 --- a/repos/os/recipes/src/ahci_drv/hash +++ b/repos/os/recipes/src/ahci_drv/hash @@ -1 +1 @@ -2022-11-28 15147e9b30313af51fafbd7dcfb36a1319949373 +2023-01-23 d1fe2fe5bc46e41a3f95a1a28dfabbfc7dd32414 diff --git a/repos/os/recipes/src/black_hole/hash b/repos/os/recipes/src/black_hole/hash index 3b130b2a79..d49f812f81 100644 --- a/repos/os/recipes/src/black_hole/hash +++ b/repos/os/recipes/src/black_hole/hash @@ -1 +1 @@ -2022-11-28 622f47dfde13c71d0993223438615beaa49a6cc7 +2023-01-23 8e40a062cf9c6ecc7f00458e199d07dde355f789 diff --git a/repos/os/recipes/src/block_tester/hash b/repos/os/recipes/src/block_tester/hash index 2de9ccfeae..3c7d35c386 100644 --- a/repos/os/recipes/src/block_tester/hash +++ b/repos/os/recipes/src/block_tester/hash @@ -1 +1 @@ -2022-11-28 b03ab089beb7fb04f788c7c999d2cb89d312134e +2023-01-23 29ff0bd182b52eb4869010f6121791bd3b0c9e09 diff --git a/repos/os/recipes/src/boot_fb_drv/hash b/repos/os/recipes/src/boot_fb_drv/hash index d4ee30e701..8eecccedd8 100644 --- a/repos/os/recipes/src/boot_fb_drv/hash +++ b/repos/os/recipes/src/boot_fb_drv/hash @@ -1 +1 @@ -2022-11-28 161d87c017034c828eb748758b75215f284d8aff +2023-01-23 54d0057cecd6650506feeffe72b0685dd768b136 diff --git a/repos/os/recipes/src/cached_fs_rom/hash b/repos/os/recipes/src/cached_fs_rom/hash index 98f993e098..ce4cd5b096 100644 --- a/repos/os/recipes/src/cached_fs_rom/hash +++ b/repos/os/recipes/src/cached_fs_rom/hash @@ -1 +1 @@ -2022-11-28 2e5fc01d51e3c057f642673e2e7c34d19be60971 +2023-01-23 43ad841e50e27f67474163caa729c68f8f3dc215 diff --git a/repos/os/recipes/src/chroot/hash b/repos/os/recipes/src/chroot/hash index 8eaac6f3dc..a930e892e0 100644 --- a/repos/os/recipes/src/chroot/hash +++ b/repos/os/recipes/src/chroot/hash @@ -1 +1 @@ -2022-11-28 49f41209a3bb7aa981badff69802c8f1f22d73e0 +2023-01-23 df03446c194991fc8b10277f5eeaff8cdd99c705 diff --git a/repos/os/recipes/src/clipboard/hash b/repos/os/recipes/src/clipboard/hash index 9d28b78c35..6d3d9b4099 100644 --- a/repos/os/recipes/src/clipboard/hash +++ b/repos/os/recipes/src/clipboard/hash @@ -1 +1 @@ -2022-11-28 f3eaa7925290309ba2238b6c1188ff56586999ac +2023-01-23 2843bf3191d59a08f0278f853117eb5d022e841c diff --git a/repos/os/recipes/src/cpu_balancer/hash b/repos/os/recipes/src/cpu_balancer/hash index b6e8a551dd..742d6dc5c2 100644 --- a/repos/os/recipes/src/cpu_balancer/hash +++ b/repos/os/recipes/src/cpu_balancer/hash @@ -1 +1 @@ -2022-11-28 9666528d4811e48eb5dc3e4ea3df14f18ca7bce8 +2023-01-23 fb5c918603a6faaa86629f3f02fa945ce87f3a2a diff --git a/repos/os/recipes/src/cpu_burner/hash b/repos/os/recipes/src/cpu_burner/hash index 6eeda946df..a7a7a3ae62 100644 --- a/repos/os/recipes/src/cpu_burner/hash +++ b/repos/os/recipes/src/cpu_burner/hash @@ -1 +1 @@ -2022-11-28 7c28fc0411f4bcc3f61eaa9961f377fb5f487551 +2023-01-23 1465c5873a9f6bf810f313963ec3c37f5613d5df diff --git a/repos/os/recipes/src/dummy/hash b/repos/os/recipes/src/dummy/hash index 648ac1ccaf..6cbd5bd4a1 100644 --- a/repos/os/recipes/src/dummy/hash +++ b/repos/os/recipes/src/dummy/hash @@ -1 +1 @@ -2022-11-28 410aa3d382c657eed516ddd37b9623edec5f74c0 +2023-01-23 7b2ddc6d3f655d642c7134c3bd425f78573ea77c diff --git a/repos/os/recipes/src/dummy_rtc_drv/hash b/repos/os/recipes/src/dummy_rtc_drv/hash index b2d091c8aa..42535caf9b 100644 --- a/repos/os/recipes/src/dummy_rtc_drv/hash +++ b/repos/os/recipes/src/dummy_rtc_drv/hash @@ -1 +1 @@ -2022-11-28 9935be39ec2e78e1c36997c056bdcb6c6a070e32 +2023-01-23 f9bafb2a7b5b08a64a0a70dbc4300232c0a924f8 diff --git a/repos/os/recipes/src/dynamic_rom/hash b/repos/os/recipes/src/dynamic_rom/hash index 2c54314357..637777c1af 100644 --- a/repos/os/recipes/src/dynamic_rom/hash +++ b/repos/os/recipes/src/dynamic_rom/hash @@ -1 +1 @@ -2022-11-28 484d80dea72ae531ef8a8c9eb03a43c7335356c4 +2023-01-23 e2cfa09d9a350f019344bc9352ec4ad993471d3b diff --git a/repos/os/recipes/src/event_filter/hash b/repos/os/recipes/src/event_filter/hash index b162132a97..03303154cc 100644 --- a/repos/os/recipes/src/event_filter/hash +++ b/repos/os/recipes/src/event_filter/hash @@ -1 +1 @@ -2022-11-28 e6bd1c07ab2ad63ecd98622852f8f033316d6fa5 +2023-01-23 838cb216b76880954c78f803eeee540bbcc58477 diff --git a/repos/os/recipes/src/fb_sdl/hash b/repos/os/recipes/src/fb_sdl/hash index 794eb4d290..28dc1e85c3 100644 --- a/repos/os/recipes/src/fb_sdl/hash +++ b/repos/os/recipes/src/fb_sdl/hash @@ -1 +1 @@ -2022-11-28 68edf47d303c88a1e4c0bdd5940e3562386dd633 +2023-01-23 80d08d2eb59273e1795936bd1a360717e17eba64 diff --git a/repos/os/recipes/src/fs_report/hash b/repos/os/recipes/src/fs_report/hash index 969b8188a0..7e0f3c933f 100644 --- a/repos/os/recipes/src/fs_report/hash +++ b/repos/os/recipes/src/fs_report/hash @@ -1 +1 @@ -2022-11-28 5e1b7f3b8c5962d53122090bdcb0ee1395add5ad +2023-01-23 4ae64776752e4c8f6d3e0a2f17531bcfdbb13003 diff --git a/repos/os/recipes/src/fs_rom/hash b/repos/os/recipes/src/fs_rom/hash index ab922ed8b6..7c501ffb71 100644 --- a/repos/os/recipes/src/fs_rom/hash +++ b/repos/os/recipes/src/fs_rom/hash @@ -1 +1 @@ -2022-11-28 b4e0d5a5d55f4c00a360a7824289eb257a7d3247 +2023-01-23 959dacc9c90a8cfdf17a377cdd4c50c4b133cdb3 diff --git a/repos/os/recipes/src/global_keys_handler/hash b/repos/os/recipes/src/global_keys_handler/hash index b4ccf0ea85..9a7363a6cd 100644 --- a/repos/os/recipes/src/global_keys_handler/hash +++ b/repos/os/recipes/src/global_keys_handler/hash @@ -1 +1 @@ -2022-11-28 8214a36ddc856b8764e145faeb85d1dec794e37c +2023-01-23 530ca0504fd86d62a9a4f05ac6c22a006ccb69c2 diff --git a/repos/os/recipes/src/gui_fb/hash b/repos/os/recipes/src/gui_fb/hash index de2a0f79f6..9fc2fd3c7b 100644 --- a/repos/os/recipes/src/gui_fb/hash +++ b/repos/os/recipes/src/gui_fb/hash @@ -1 +1 @@ -2022-11-28 d67df878a17fd5331ccdbfdbbcd7f4e49c58dc0a +2023-01-23 a3c070038e2995e37d83ededa7c59ba78b0139f3 diff --git a/repos/os/recipes/src/init/hash b/repos/os/recipes/src/init/hash index bedfc0dd85..9a2edf74a2 100644 --- a/repos/os/recipes/src/init/hash +++ b/repos/os/recipes/src/init/hash @@ -1 +1 @@ -2022-11-28 8f77041c5000c8c37f27413791bbdfeb72e1efa4 +2023-01-23 247c67f80a44ae1d953e3a95eb0e8b9f8a77d0e6 diff --git a/repos/os/recipes/src/input_event_bridge/hash b/repos/os/recipes/src/input_event_bridge/hash index c653528e9b..e5a69ac271 100644 --- a/repos/os/recipes/src/input_event_bridge/hash +++ b/repos/os/recipes/src/input_event_bridge/hash @@ -1 +1 @@ -2022-11-28 f8453049de0931646ff9f49ef3de9320bc195370 +2023-01-23 8d2990d998cbbcedc4f88c3dc0cec2a1cf71fcfa diff --git a/repos/os/recipes/src/intel_gpu_drv/hash b/repos/os/recipes/src/intel_gpu_drv/hash index dab9d984e8..160f5d9a2e 100644 --- a/repos/os/recipes/src/intel_gpu_drv/hash +++ b/repos/os/recipes/src/intel_gpu_drv/hash @@ -1 +1 @@ -2022-11-28 5fddfe0fe451f926dd71254b4f65cd29a9f01e4e +2023-01-23 431fef8c77ddee0ab9d677349672c62dda9eeb4f diff --git a/repos/os/recipes/src/lan9118_nic_drv/hash b/repos/os/recipes/src/lan9118_nic_drv/hash index 3577c50455..1f9d5f7b9a 100644 --- a/repos/os/recipes/src/lan9118_nic_drv/hash +++ b/repos/os/recipes/src/lan9118_nic_drv/hash @@ -1 +1 @@ -2022-11-28 dde6aec8e47f38fb0abafb99f39eff970631a23a +2023-01-23 0e897e4bcb78a3d763241f9901757b6f9788d99e diff --git a/repos/os/recipes/src/linux_nic_drv/hash b/repos/os/recipes/src/linux_nic_drv/hash index 514a7a1188..722724be38 100644 --- a/repos/os/recipes/src/linux_nic_drv/hash +++ b/repos/os/recipes/src/linux_nic_drv/hash @@ -1 +1 @@ -2022-11-28 b030396deab1a531a684b10b238bd7db9409aa93 +2023-01-23 aac18c5d7c4fef87ec322bcf00e9ff6e0721ba91 diff --git a/repos/os/recipes/src/linux_rtc_drv/hash b/repos/os/recipes/src/linux_rtc_drv/hash index e9561d0db9..90dfdd5d46 100644 --- a/repos/os/recipes/src/linux_rtc_drv/hash +++ b/repos/os/recipes/src/linux_rtc_drv/hash @@ -1 +1 @@ -2022-11-28 b71ccbbf47d074f563909c905607d8bcdcb7ed29 +2023-01-23 b8a12447aa0061b6838cf70a817463ce3ab9ed35 diff --git a/repos/os/recipes/src/loader/hash b/repos/os/recipes/src/loader/hash index f9d258a7c3..8a1839a0a8 100644 --- a/repos/os/recipes/src/loader/hash +++ b/repos/os/recipes/src/loader/hash @@ -1 +1 @@ -2022-11-28 61275abd691ef544bd6c8ba04f10a59aded9e1cc +2023-01-23 59932bf7d59654f6c186d7fa23fe7c75e01164b9 diff --git a/repos/os/recipes/src/log_core/hash b/repos/os/recipes/src/log_core/hash index 44ab6ef8e4..d777622d87 100644 --- a/repos/os/recipes/src/log_core/hash +++ b/repos/os/recipes/src/log_core/hash @@ -1 +1 @@ -2022-11-28 56fbe756a33fdf18204d31f035286cca6bf56210 +2023-01-23 b5779c766222db1393ce350d8f589bb68ff72c52 diff --git a/repos/os/recipes/src/log_terminal/hash b/repos/os/recipes/src/log_terminal/hash index 181d6f280a..8cdf6ad403 100644 --- a/repos/os/recipes/src/log_terminal/hash +++ b/repos/os/recipes/src/log_terminal/hash @@ -1 +1 @@ -2022-11-28 9170e7d664a1222966f60d1c8691c340d8ecc3d8 +2023-01-23 c1d19a5a090e543c15ac3862baffdb09a7f7e9be diff --git a/repos/os/recipes/src/lx_block/hash b/repos/os/recipes/src/lx_block/hash index 2e37ceedea..c228f0c5cc 100644 --- a/repos/os/recipes/src/lx_block/hash +++ b/repos/os/recipes/src/lx_block/hash @@ -1 +1 @@ -2022-11-28 941a772f04ada4054707256308c0451f531ebb35 +2023-01-23 681ba4c30754df58a1e5f4b8e02af60e4c978a25 diff --git a/repos/os/recipes/src/lx_fs/hash b/repos/os/recipes/src/lx_fs/hash index 6085530512..e7ff6cedad 100644 --- a/repos/os/recipes/src/lx_fs/hash +++ b/repos/os/recipes/src/lx_fs/hash @@ -1 +1 @@ -2022-11-28 66284ed0c4d43eb9eb43a3215181434da83c7988 +2023-01-23 4a00a5f40d853ded2a1c2bf014cc2626949d86a5 diff --git a/repos/os/recipes/src/mixer/hash b/repos/os/recipes/src/mixer/hash index 5dc6159245..cad8d3a4a3 100644 --- a/repos/os/recipes/src/mixer/hash +++ b/repos/os/recipes/src/mixer/hash @@ -1 +1 @@ -2022-11-28 95bec403e652469b6ce20640e11cd9ab38b21c37 +2023-01-23 d3bb363e46a4e4837508d61a73379624a084c504 diff --git a/repos/os/recipes/src/nic_bridge/hash b/repos/os/recipes/src/nic_bridge/hash index 6dcd09321c..d2bdbc00f9 100644 --- a/repos/os/recipes/src/nic_bridge/hash +++ b/repos/os/recipes/src/nic_bridge/hash @@ -1 +1 @@ -2022-11-28 5a889cf9ef7575529ea13cae43834d77219bb7da +2023-01-23 1a04db110357025236767a21e8cb9f80610a63ae diff --git a/repos/os/recipes/src/nic_loopback/hash b/repos/os/recipes/src/nic_loopback/hash index c2b6e34ea8..a25f69fa53 100644 --- a/repos/os/recipes/src/nic_loopback/hash +++ b/repos/os/recipes/src/nic_loopback/hash @@ -1 +1 @@ -2022-11-28 b2d483f644620a457d151fc17a43a7974ea7a454 +2023-01-23 6fb7d3e196b70ac905e0e40f9325e72b51002077 diff --git a/repos/os/recipes/src/nic_perf/hash b/repos/os/recipes/src/nic_perf/hash index c24755ae6a..c530a286e1 100644 --- a/repos/os/recipes/src/nic_perf/hash +++ b/repos/os/recipes/src/nic_perf/hash @@ -1 +1 @@ -2022-11-28 c045dfb88f1445cc93b926b219d5f5b9c987aa1b +2023-01-23 e5740956daa1aefa2b52b3bb9d3a28a991d78881 diff --git a/repos/os/recipes/src/nic_router/hash b/repos/os/recipes/src/nic_router/hash index 04c35e6851..44513cbfcb 100644 --- a/repos/os/recipes/src/nic_router/hash +++ b/repos/os/recipes/src/nic_router/hash @@ -1 +1 @@ -2022-11-28 9786a043569fe1c84c900a18ecd6e1c8cb196fcd +2023-01-23 471b4524ff6c458af43ce604914aff5f2a8e4f04 diff --git a/repos/os/recipes/src/nit_focus/hash b/repos/os/recipes/src/nit_focus/hash index 07298c74e1..8202618684 100644 --- a/repos/os/recipes/src/nit_focus/hash +++ b/repos/os/recipes/src/nit_focus/hash @@ -1 +1 @@ -2022-11-28 06aad8d63d52151c81f73b1a15eb4c570ba027af +2023-01-23 146148d435dd1dfa4fa076a783ecd7475adac6cd diff --git a/repos/os/recipes/src/nitpicker/hash b/repos/os/recipes/src/nitpicker/hash index 510ae33306..5951829941 100644 --- a/repos/os/recipes/src/nitpicker/hash +++ b/repos/os/recipes/src/nitpicker/hash @@ -1 +1 @@ -2022-11-28 eedf2b6ccffcd6c40a08c0f230971ca17eae5f52 +2023-01-23 4c355e73b8e37535af87fbc13e029b879c7f3fd8 diff --git a/repos/os/recipes/src/nvme_drv/hash b/repos/os/recipes/src/nvme_drv/hash index d989e3789b..88ac1603b0 100644 --- a/repos/os/recipes/src/nvme_drv/hash +++ b/repos/os/recipes/src/nvme_drv/hash @@ -1 +1 @@ -2022-11-28 551ba8ea43fd5605c28b59048919388459fcc9f3 +2023-01-23 7e29ecfd7d60756dfc08333bd3f8a9f3f0292171 diff --git a/repos/os/recipes/src/part_block/hash b/repos/os/recipes/src/part_block/hash index c3e12c5f13..027696b347 100644 --- a/repos/os/recipes/src/part_block/hash +++ b/repos/os/recipes/src/part_block/hash @@ -1 +1 @@ -2022-11-28 8762d6bc14fe3c51b763903eb0177e698ee4fadc +2023-01-23 ed891e3e04fa227c5d7c395e113e3fae96f7cd3d diff --git a/repos/os/recipes/src/pbxa9_drivers/hash b/repos/os/recipes/src/pbxa9_drivers/hash index 8f79fef4b7..28d6a6af2e 100644 --- a/repos/os/recipes/src/pbxa9_drivers/hash +++ b/repos/os/recipes/src/pbxa9_drivers/hash @@ -1 +1 @@ -2022-11-28 3b2a089de958f2d3040c27b67156bed1def60d05 +2023-01-23 cf746a84003289d0216c8a4ee36c5c8ced96e5e0 diff --git a/repos/os/recipes/src/pci_decode/hash b/repos/os/recipes/src/pci_decode/hash index 17ad75ec26..22efb870c0 100644 --- a/repos/os/recipes/src/pci_decode/hash +++ b/repos/os/recipes/src/pci_decode/hash @@ -1 +1 @@ -2022-11-28 e3d840f05ebd35536e9b1f1d60aba735a5546085 +2023-01-23 55d6bcd33b13d7fac53e5c7e9336d5d4e556276e diff --git a/repos/os/recipes/src/platform_drv/hash b/repos/os/recipes/src/platform_drv/hash index c88aa0ce81..82e51a6ae0 100644 --- a/repos/os/recipes/src/platform_drv/hash +++ b/repos/os/recipes/src/platform_drv/hash @@ -1 +1 @@ -2022-11-28 53fae319c42ba220f46d56058fd597107e43613d +2023-01-23 36cc783a0482722cb87931bbf2d0decfc20ab0f8 diff --git a/repos/os/recipes/src/ps2_drv/hash b/repos/os/recipes/src/ps2_drv/hash index f05f4e10b5..93366b7412 100644 --- a/repos/os/recipes/src/ps2_drv/hash +++ b/repos/os/recipes/src/ps2_drv/hash @@ -1 +1 @@ -2022-11-28 b57176ef25d9ba9b16dc88b3a97703f32aeff096 +2023-01-23 cc947e53251ee62bdcdd6f06fb1c75d7082e8b60 diff --git a/repos/os/recipes/src/report_rom/hash b/repos/os/recipes/src/report_rom/hash index 3497f5e1fb..a7972f042f 100644 --- a/repos/os/recipes/src/report_rom/hash +++ b/repos/os/recipes/src/report_rom/hash @@ -1 +1 @@ -2022-11-28 22eb520d3c94f25d4a49f5973734d39ecb9b2d3c +2023-01-23 91d76ca94349a7d02680d89afa27b5404ed7424d diff --git a/repos/os/recipes/src/rom_filter/hash b/repos/os/recipes/src/rom_filter/hash index edeeea1b26..b1827d1e08 100644 --- a/repos/os/recipes/src/rom_filter/hash +++ b/repos/os/recipes/src/rom_filter/hash @@ -1 +1 @@ -2022-11-28 f6bf7df82f7d837db4690425d35e9b2fe3e49a2f +2023-01-23 70859f08cee4bf669607201802c3a0e0d46ada70 diff --git a/repos/os/recipes/src/rom_logger/hash b/repos/os/recipes/src/rom_logger/hash index 838084c9f8..2117684811 100644 --- a/repos/os/recipes/src/rom_logger/hash +++ b/repos/os/recipes/src/rom_logger/hash @@ -1 +1 @@ -2022-11-28 8ac932d53147d472f0d8e3a7c0762596e4df7c7e +2023-01-23 96efed6d4d89a1a172c74931736f01cee9b7ab08 diff --git a/repos/os/recipes/src/rom_reporter/hash b/repos/os/recipes/src/rom_reporter/hash index 264a050590..44b3a0fa41 100644 --- a/repos/os/recipes/src/rom_reporter/hash +++ b/repos/os/recipes/src/rom_reporter/hash @@ -1 +1 @@ -2022-11-28 bdfa513e062e668aa37e61243a06d46f6bcb020b +2023-01-23 2acf0036e8f9e1640b6e0e2a2e434d28236adc4d diff --git a/repos/os/recipes/src/rom_to_file/hash b/repos/os/recipes/src/rom_to_file/hash index 51cb8bd781..b9f40e1d6f 100644 --- a/repos/os/recipes/src/rom_to_file/hash +++ b/repos/os/recipes/src/rom_to_file/hash @@ -1 +1 @@ -2022-11-28 5366c008f1cfa5a6e14785cac03cf85e83110c31 +2023-01-23 9b674c50ab03b65b0847788374bb0927467c6b19 diff --git a/repos/os/recipes/src/rtc_drv/hash b/repos/os/recipes/src/rtc_drv/hash index a78975262a..22d2f5d0ac 100644 --- a/repos/os/recipes/src/rtc_drv/hash +++ b/repos/os/recipes/src/rtc_drv/hash @@ -1 +1 @@ -2022-11-28 3d0044f20ad6e8d72c879a23dab4d11a0caf6e00 +2023-01-23 b5e2f5e5f79ee0459ace46c43bf19e190bf49e45 diff --git a/repos/os/recipes/src/sandbox/hash b/repos/os/recipes/src/sandbox/hash index dd0fb8c92b..5fbbc0014f 100644 --- a/repos/os/recipes/src/sandbox/hash +++ b/repos/os/recipes/src/sandbox/hash @@ -1 +1 @@ -2022-11-28 e6cc4053c231b66134b1e7837371dc8a75d659a5 +2023-01-23 22a430cb3942122835cf54dc1027cd3066a155d6 diff --git a/repos/os/recipes/src/sequence/hash b/repos/os/recipes/src/sequence/hash index d68412e80b..cd4c098f52 100644 --- a/repos/os/recipes/src/sequence/hash +++ b/repos/os/recipes/src/sequence/hash @@ -1 +1 @@ -2022-11-28 c9d4ed95e98df821e04b0459b0b41a271da12eda +2023-01-23 1011bfe68ee65ed2d4cb8062bfe1f0ccc1dad4ff diff --git a/repos/os/recipes/src/shim/hash b/repos/os/recipes/src/shim/hash index 5c17cb4d56..1956862e5a 100644 --- a/repos/os/recipes/src/shim/hash +++ b/repos/os/recipes/src/shim/hash @@ -1 +1 @@ -2022-11-28 56924223dec6fa302fdaa984101dd4f21ba2597c +2023-01-23 3a28932017bada6c219bab17f2bfd982b6a890b2 diff --git a/repos/os/recipes/src/terminal_crosslink/hash b/repos/os/recipes/src/terminal_crosslink/hash index b9a035eceb..95bef1a82b 100644 --- a/repos/os/recipes/src/terminal_crosslink/hash +++ b/repos/os/recipes/src/terminal_crosslink/hash @@ -1 +1 @@ -2022-11-28 34a77c1408d73fcd88657e8075449fd2e376b342 +2023-01-23 cac1fd7cb28077b012dcd5795120f1d4592c6191 diff --git a/repos/os/recipes/src/terminal_log/hash b/repos/os/recipes/src/terminal_log/hash index 0fe3ae4e82..b1e39947b1 100644 --- a/repos/os/recipes/src/terminal_log/hash +++ b/repos/os/recipes/src/terminal_log/hash @@ -1 +1 @@ -2022-11-28 bfa0f9f5ef3a86d7c2013d4362c8a5d1a350241a +2023-01-23 5202319b868d6da6fb9ee12fc0e7269d163442d8 diff --git a/repos/os/recipes/src/test-audio_out/hash b/repos/os/recipes/src/test-audio_out/hash index c27451a4c8..b3ebd84ee8 100644 --- a/repos/os/recipes/src/test-audio_out/hash +++ b/repos/os/recipes/src/test-audio_out/hash @@ -1 +1 @@ -2022-11-22-c a739f62ca548c5a6092bc6b6b1309a210afebab0 +2023-01-23 b5b37874df848bd917961c1d1f2030bf5de73dea diff --git a/repos/os/recipes/src/test-black_hole/hash b/repos/os/recipes/src/test-black_hole/hash index 5828a03cc3..b0e07d33d5 100644 --- a/repos/os/recipes/src/test-black_hole/hash +++ b/repos/os/recipes/src/test-black_hole/hash @@ -1 +1 @@ -2022-11-28 d8c17df3d79a61c6f0b0a4f56b8c97f345ffa95d +2023-01-23 31e90df3ac0c2af90aca416526e6f9b735b13bc6 diff --git a/repos/os/recipes/src/test-bomb/hash b/repos/os/recipes/src/test-bomb/hash index 4fef5b6aa2..81e826f8ac 100644 --- a/repos/os/recipes/src/test-bomb/hash +++ b/repos/os/recipes/src/test-bomb/hash @@ -1 +1 @@ -2022-11-28 81fe6404e3160b8683bab4e132fd28081d47be1e +2023-01-23 84a5864231e50c6f392e7ca2d13e5a9e6d00cf96 diff --git a/repos/os/recipes/src/test-capture/hash b/repos/os/recipes/src/test-capture/hash index acce899f3e..a51bd8ffe7 100644 --- a/repos/os/recipes/src/test-capture/hash +++ b/repos/os/recipes/src/test-capture/hash @@ -1 +1 @@ -2022-11-28 241dccca6c5fb64f3d8c250d86e4ecb527ff89a3 +2023-01-23 a981013a40d8e6ba7694c39fdc0d74accefa10c5 diff --git a/repos/os/recipes/src/test-clipboard/hash b/repos/os/recipes/src/test-clipboard/hash index 7e36f415bd..26d457c82f 100644 --- a/repos/os/recipes/src/test-clipboard/hash +++ b/repos/os/recipes/src/test-clipboard/hash @@ -1 +1 @@ -2022-11-28 1df29b71dcf1deda358bb5d44d16e000ed951f49 +2023-01-23 bcc8bb54853c3c2012b05608763d38e3d25a1345 diff --git a/repos/os/recipes/src/test-dynamic_config/hash b/repos/os/recipes/src/test-dynamic_config/hash index ff0c87e3da..fdc3e70abd 100644 --- a/repos/os/recipes/src/test-dynamic_config/hash +++ b/repos/os/recipes/src/test-dynamic_config/hash @@ -1 +1 @@ -2022-11-28 b7f43cb28fc888363b8df925bb90036498ed4adf +2023-01-23 a261d6f452f772cb29694eb44a3462f25102353f diff --git a/repos/os/recipes/src/test-fault_detection/hash b/repos/os/recipes/src/test-fault_detection/hash index 6c17c2e210..d39c3071a9 100644 --- a/repos/os/recipes/src/test-fault_detection/hash +++ b/repos/os/recipes/src/test-fault_detection/hash @@ -1 +1 @@ -2022-11-28 9ad74c62a9e3ac2a9ad0d1dc98f4adb15d7a858b +2023-01-23 76941a8ce6f6fda9ad1519187444bf4836f59b3a diff --git a/repos/os/recipes/src/test-fs_packet/hash b/repos/os/recipes/src/test-fs_packet/hash index 02aa3bf7c9..4818292b46 100644 --- a/repos/os/recipes/src/test-fs_packet/hash +++ b/repos/os/recipes/src/test-fs_packet/hash @@ -1 +1 @@ -2022-11-28 d510376089169dfc2a96694f5285df88ffb249e8 +2023-01-23 12da905adcbdbf97e3ac8d6ff2ee505ffb4e2dfb diff --git a/repos/os/recipes/src/test-fs_report/hash b/repos/os/recipes/src/test-fs_report/hash index 744b271bf5..3bf6edfbed 100644 --- a/repos/os/recipes/src/test-fs_report/hash +++ b/repos/os/recipes/src/test-fs_report/hash @@ -1 +1 @@ -2022-11-28 5deba770c73eed756598e89b56704ab65b76fa88 +2023-01-23 bd50dddf29a32a112b91ca052f3fe7d3a7e0170f diff --git a/repos/os/recipes/src/test-immutable_rom/hash b/repos/os/recipes/src/test-immutable_rom/hash index b41a97a442..fd1a895fd7 100644 --- a/repos/os/recipes/src/test-immutable_rom/hash +++ b/repos/os/recipes/src/test-immutable_rom/hash @@ -1 +1 @@ -2022-11-28 f9e4e2c524da153332107882ab2cd9e8a6b9b8ba +2023-01-23 c536c379c937a83fb8a35f3fba0d90114ee86f70 diff --git a/repos/os/recipes/src/test-init/hash b/repos/os/recipes/src/test-init/hash index 2992b948f9..dcc8fb026b 100644 --- a/repos/os/recipes/src/test-init/hash +++ b/repos/os/recipes/src/test-init/hash @@ -1 +1 @@ -2022-11-28 e368ef50d578fda1b99ab551f7a5b5da3b67f9bf +2023-01-23 f926a2f97bb119a0c51bb96be7f580baccdb4dc3 diff --git a/repos/os/recipes/src/test-init_loop/hash b/repos/os/recipes/src/test-init_loop/hash index 425a69ba28..a6c52229b8 100644 --- a/repos/os/recipes/src/test-init_loop/hash +++ b/repos/os/recipes/src/test-init_loop/hash @@ -1 +1 @@ -2022-11-28 bc3f678595d589e1601ca092c03eb160538f07c6 +2023-01-23 ab5a95cd16007b2385c448de43478c115ed4dbc4 diff --git a/repos/os/recipes/src/test-nic_loopback/hash b/repos/os/recipes/src/test-nic_loopback/hash index 6f3c0ee855..0a398c5959 100644 --- a/repos/os/recipes/src/test-nic_loopback/hash +++ b/repos/os/recipes/src/test-nic_loopback/hash @@ -1 +1 @@ -2022-11-28 fa45adc128a035b6f9875b5b8ad59828cae3fd75 +2023-01-23 2adac6de89353cd7b7bfc64bd07762355c335f8b diff --git a/repos/os/recipes/src/test-ram_fs_chunk/hash b/repos/os/recipes/src/test-ram_fs_chunk/hash index 784ab0d588..97aeb28a24 100644 --- a/repos/os/recipes/src/test-ram_fs_chunk/hash +++ b/repos/os/recipes/src/test-ram_fs_chunk/hash @@ -1 +1 @@ -2022-11-28 c222783eee6696a5ccee65120ba5d12946c92525 +2023-01-23 5452f71aabb3e5f0fbb44517e1a10c98630e6e09 diff --git a/repos/os/recipes/src/test-report_rom/hash b/repos/os/recipes/src/test-report_rom/hash index 5c474c366d..fb745f98b7 100644 --- a/repos/os/recipes/src/test-report_rom/hash +++ b/repos/os/recipes/src/test-report_rom/hash @@ -1 +1 @@ -2022-11-28 0356a56c43ef4fe063d09c0a118fddeba28ad523 +2023-01-23 8ebcfb4da85337c7cd2ce5b5c59f1c824ca8da1c diff --git a/repos/os/recipes/src/test-resource_request/hash b/repos/os/recipes/src/test-resource_request/hash index 1b2240b445..4c1e257ab1 100644 --- a/repos/os/recipes/src/test-resource_request/hash +++ b/repos/os/recipes/src/test-resource_request/hash @@ -1 +1 @@ -2022-11-28 dd0b47fc858d4d8a99fe470ec2a363de6b03d073 +2023-01-23 dd53f32b57be12b6bb6d351cb99b0dbbeeea2622 diff --git a/repos/os/recipes/src/test-resource_yield/hash b/repos/os/recipes/src/test-resource_yield/hash index f126999a38..321c695c48 100644 --- a/repos/os/recipes/src/test-resource_yield/hash +++ b/repos/os/recipes/src/test-resource_yield/hash @@ -1 +1 @@ -2022-11-28 5d4b024ce12be63b1825e0ffbb9c0f6b4ff81c6c +2023-01-23 3d1f361ecbae744172639e73540e0ee95ddd8bba diff --git a/repos/os/recipes/src/test-rtc/hash b/repos/os/recipes/src/test-rtc/hash index 336c986ec0..ff5dafc22a 100644 --- a/repos/os/recipes/src/test-rtc/hash +++ b/repos/os/recipes/src/test-rtc/hash @@ -1 +1 @@ -2022-11-28 2d24ca3c68ee597ca3be4591ab2284b09489710a +2023-01-23 dda8e82cde3790beac94daceb04a041c2d262e90 diff --git a/repos/os/recipes/src/test-sandbox/hash b/repos/os/recipes/src/test-sandbox/hash index 7c466b89ae..18443fdeb5 100644 --- a/repos/os/recipes/src/test-sandbox/hash +++ b/repos/os/recipes/src/test-sandbox/hash @@ -1 +1 @@ -2022-11-28 769863110889c6c5fb7483541e48a5a38b29994a +2023-01-23 fa348b539062b3157cd38dddb4dc1a8e6057bf3e diff --git a/repos/os/recipes/src/test-signal/hash b/repos/os/recipes/src/test-signal/hash index 4568f0f26a..adba6385bc 100644 --- a/repos/os/recipes/src/test-signal/hash +++ b/repos/os/recipes/src/test-signal/hash @@ -1 +1 @@ -2022-11-28 df2cee69eb7d111fa536fed50155a8a46d899fda +2023-01-23 d5e6d725d1f68ebfc57b6e4894ae49dce8ff8bd7 diff --git a/repos/os/recipes/src/test-slab/hash b/repos/os/recipes/src/test-slab/hash index 1e1061a9be..4e65f94cff 100644 --- a/repos/os/recipes/src/test-slab/hash +++ b/repos/os/recipes/src/test-slab/hash @@ -1 +1 @@ -2022-11-28 51bd9f7cbda28dd8c07e28eed13d744353ae3c9e +2023-01-23 7944ccb60cf1372a4aaa3b9d06fea31cc93a88e0 diff --git a/repos/os/recipes/src/test-terminal_crosslink/hash b/repos/os/recipes/src/test-terminal_crosslink/hash index 570962cb8a..43c512f9e1 100644 --- a/repos/os/recipes/src/test-terminal_crosslink/hash +++ b/repos/os/recipes/src/test-terminal_crosslink/hash @@ -1 +1 @@ -2022-11-28 985288493035093bd197407040a08f2e2b9266b2 +2023-01-23 0b8b6e71deb852ecf1f18010d48f90c83863a0de diff --git a/repos/os/recipes/src/test-trace/hash b/repos/os/recipes/src/test-trace/hash index e389a4306b..ac11a8430a 100644 --- a/repos/os/recipes/src/test-trace/hash +++ b/repos/os/recipes/src/test-trace/hash @@ -1 +1 @@ -2022-11-28 b900626ff300571e0f1dd98a93e42728afe50b27 +2023-01-23 818035be6d87a8210ed91ec6fb4a2fe54d4aacca diff --git a/repos/os/recipes/src/test-trace_buffer/hash b/repos/os/recipes/src/test-trace_buffer/hash index bcdf587836..51c5430c8e 100644 --- a/repos/os/recipes/src/test-trace_buffer/hash +++ b/repos/os/recipes/src/test-trace_buffer/hash @@ -1 +1 @@ -2022-11-28 fcde39f7c0c709b68be1f950384831d04c027271 +2023-01-23 461a24d67b74fb295da533b722ec90d21075ddc7 diff --git a/repos/os/recipes/src/test-trace_logger/hash b/repos/os/recipes/src/test-trace_logger/hash index 0e1342861c..5893eff257 100644 --- a/repos/os/recipes/src/test-trace_logger/hash +++ b/repos/os/recipes/src/test-trace_logger/hash @@ -1 +1 @@ -2022-11-28 9c690a961f99d86f6a8955d90de2f0664fc92bae +2023-01-23 2f28a33086e73c1b1fa607882db59923cc55a5ea diff --git a/repos/os/recipes/src/test-utf8/hash b/repos/os/recipes/src/test-utf8/hash index 670b7d305f..a27822d8db 100644 --- a/repos/os/recipes/src/test-utf8/hash +++ b/repos/os/recipes/src/test-utf8/hash @@ -1 +1 @@ -2022-11-28 ee9fbc99a5d7275c1a6426bd0131d632e95e6391 +2023-01-23 46f9f20b9a67cf7ba5b52cf545906d69d364e56a diff --git a/repos/os/recipes/src/test-vfs_capture/hash b/repos/os/recipes/src/test-vfs_capture/hash index b75f60ab68..50ddb96290 100644 --- a/repos/os/recipes/src/test-vfs_capture/hash +++ b/repos/os/recipes/src/test-vfs_capture/hash @@ -1 +1 @@ -2022-11-28 cb8668eb94cdacd6236560188706b621c8b5415a +2023-01-23 691eb5eb2681600b8e2f85892955358b32a470e4 diff --git a/repos/os/recipes/src/test-vfs_stress/hash b/repos/os/recipes/src/test-vfs_stress/hash index 782593ebc9..41a0a0cbb4 100644 --- a/repos/os/recipes/src/test-vfs_stress/hash +++ b/repos/os/recipes/src/test-vfs_stress/hash @@ -1 +1 @@ -2022-11-28 6624d2b50f179eb9e136e5bde045b15176551cf1 +2023-01-23 045f788ffb079852a54614c6d926ef156df8b9a2 diff --git a/repos/os/recipes/src/test-weak_ptr/hash b/repos/os/recipes/src/test-weak_ptr/hash index d7021c0de4..ecbaf9e3b7 100644 --- a/repos/os/recipes/src/test-weak_ptr/hash +++ b/repos/os/recipes/src/test-weak_ptr/hash @@ -1 +1 @@ -2022-11-28 020971de6a9b321599dbe7af566842e7625cae0f +2023-01-23 090a5e31d264fd3fafeb21a84c99894971d1aa79 diff --git a/repos/os/recipes/src/top/hash b/repos/os/recipes/src/top/hash index f900964f7e..27f162e075 100644 --- a/repos/os/recipes/src/top/hash +++ b/repos/os/recipes/src/top/hash @@ -1 +1 @@ -2022-11-28 fbedb8ec16c7b887ae8b5aaac0c8c9df2cb27025 +2023-01-23 cd714e2808c52231c3ccc1559e740da458be46fe diff --git a/repos/os/recipes/src/trace_logger/hash b/repos/os/recipes/src/trace_logger/hash index f530f1b0e4..9463dc9e54 100644 --- a/repos/os/recipes/src/trace_logger/hash +++ b/repos/os/recipes/src/trace_logger/hash @@ -1 +1 @@ -2022-11-28 9fddf43a06772ea9fe2feeaab24c00923add83b9 +2023-01-23 b8ec81b006d5737a85e57f97edf5634dd30f77bf diff --git a/repos/os/recipes/src/trace_policy/hash b/repos/os/recipes/src/trace_policy/hash index 3b07397a52..09a8c58f29 100644 --- a/repos/os/recipes/src/trace_policy/hash +++ b/repos/os/recipes/src/trace_policy/hash @@ -1 +1 @@ -2022-11-28 d4a4ef06475d460364606b205c5c78d5e067ee2a +2023-01-23 85459ad55007a985b60d39dbf9d6e25f652df788 diff --git a/repos/os/recipes/src/trace_subject_reporter/hash b/repos/os/recipes/src/trace_subject_reporter/hash index fe80951e4f..6c042c1517 100644 --- a/repos/os/recipes/src/trace_subject_reporter/hash +++ b/repos/os/recipes/src/trace_subject_reporter/hash @@ -1 +1 @@ -2022-11-28 2a26c7676ff0d0df109489cdc2a3e93167f832a8 +2023-01-23 9078b3fe73830d0bd2bfb2f1ae9a38380cafdc83 diff --git a/repos/os/recipes/src/usb_block_drv/hash b/repos/os/recipes/src/usb_block_drv/hash index 95d51de42f..d31afec0e4 100644 --- a/repos/os/recipes/src/usb_block_drv/hash +++ b/repos/os/recipes/src/usb_block_drv/hash @@ -1 +1 @@ -2022-11-28 165f33762a584ba72df032274b4de2dbacdd942d +2023-01-23 c57255367237926030c617edccbfb01ee3a51680 diff --git a/repos/os/recipes/src/vfs/hash b/repos/os/recipes/src/vfs/hash index b56ed700e5..40e921c105 100644 --- a/repos/os/recipes/src/vfs/hash +++ b/repos/os/recipes/src/vfs/hash @@ -1 +1 @@ -2022-11-28 da93420db82a087d722f8e608babddf57557da76 +2023-01-23 b1e372a38f99e9e2aa3bdb1d7ef41f6516a2cf93 diff --git a/repos/os/recipes/src/vfs_block/hash b/repos/os/recipes/src/vfs_block/hash index 869a083d5d..f198d212aa 100644 --- a/repos/os/recipes/src/vfs_block/hash +++ b/repos/os/recipes/src/vfs_block/hash @@ -1 +1 @@ -2022-11-28 9448a58ff8f80c9120e0e58a0d3bf0d2df75972a +2023-01-23 7a2e4ef073d606224011f33ccaa8ee295702a4e4 diff --git a/repos/os/recipes/src/vfs_capture/hash b/repos/os/recipes/src/vfs_capture/hash index 4844f8dd2c..2d7f4e3acf 100644 --- a/repos/os/recipes/src/vfs_capture/hash +++ b/repos/os/recipes/src/vfs_capture/hash @@ -1 +1 @@ -2022-11-28 f1b8f3e260dd313a2245cca3c7cdabde9e5b0f0f +2023-01-23 c38cca30ffc24b881a2d25fedaf7ce010348b7f5 diff --git a/repos/os/recipes/src/vfs_tap/hash b/repos/os/recipes/src/vfs_tap/hash index b7cf9403cc..70d3c8677b 100644 --- a/repos/os/recipes/src/vfs_tap/hash +++ b/repos/os/recipes/src/vfs_tap/hash @@ -1 +1 @@ -2022-11-28 ba833904139a95727c616900ed19ea2fb8bd8f50 +2023-01-23 e3c1fb86a81151148d1c546d3415b81b2a8e52bd diff --git a/repos/os/recipes/src/virt_qemu_drivers/hash b/repos/os/recipes/src/virt_qemu_drivers/hash index b8d9fdb14f..4d4c9905d9 100644 --- a/repos/os/recipes/src/virt_qemu_drivers/hash +++ b/repos/os/recipes/src/virt_qemu_drivers/hash @@ -1 +1 @@ -2022-11-28 189e5cc49cb620db8ab24619515949caf9ecd8b3 +2023-01-23 6ca7d217c666e5d5ca8f9e9aa534db239f2036a9 diff --git a/repos/os/recipes/src/virtdev_rom/hash b/repos/os/recipes/src/virtdev_rom/hash index f53e83d1a3..617c122fcc 100644 --- a/repos/os/recipes/src/virtdev_rom/hash +++ b/repos/os/recipes/src/virtdev_rom/hash @@ -1 +1 @@ -2022-11-28 b1c3355215d2e230ec5ff120808120ce815a7488 +2023-01-23 ceab65c6a9e23fdce37e0024a06b0b97a5d5f5f6 diff --git a/repos/os/recipes/src/virtio_fb_drv/hash b/repos/os/recipes/src/virtio_fb_drv/hash index ecda29299c..fff2abb542 100644 --- a/repos/os/recipes/src/virtio_fb_drv/hash +++ b/repos/os/recipes/src/virtio_fb_drv/hash @@ -1 +1 @@ -2022-11-28 4be148de32bcc3cdc65ac66fedc730d5dc720d18 +2023-01-23 1bfc3841af0a1a70a3ebf2017d8935b7f4dc7361 diff --git a/repos/os/recipes/src/virtio_input_drv/hash b/repos/os/recipes/src/virtio_input_drv/hash index 1ef6c27b8c..adf91fa3d4 100644 --- a/repos/os/recipes/src/virtio_input_drv/hash +++ b/repos/os/recipes/src/virtio_input_drv/hash @@ -1 +1 @@ -2022-11-28 d871e347655109ae145b645ed269f21a0bb532ad +2023-01-23 602ea23724e3b244090898ae187a403b1e7cbe87 diff --git a/repos/os/recipes/src/virtio_nic_drv/hash b/repos/os/recipes/src/virtio_nic_drv/hash index 97e796a226..113d63a914 100644 --- a/repos/os/recipes/src/virtio_nic_drv/hash +++ b/repos/os/recipes/src/virtio_nic_drv/hash @@ -1 +1 @@ -2022-11-28 8a6a4bfb7916328bc3a9654f4faefa04adb95a12 +2023-01-23 38b63ddef859dd2d34f12cb08ca01c2a11fa8bda diff --git a/repos/os/recipes/src/vmm/hash b/repos/os/recipes/src/vmm/hash index 319687f623..d775e4f6c7 100644 --- a/repos/os/recipes/src/vmm/hash +++ b/repos/os/recipes/src/vmm/hash @@ -1 +1 @@ -2022-11-28 02b2cf34136b24e72d8a12de10451c2755af451b +2023-01-23 e26b137688a41236643005af4ec1c9c827b535b4 diff --git a/repos/pc/recipes/api/pc_linux/hash b/repos/pc/recipes/api/pc_linux/hash index 91ff1c5784..f9d33a1748 100644 --- a/repos/pc/recipes/api/pc_linux/hash +++ b/repos/pc/recipes/api/pc_linux/hash @@ -1 +1 @@ -2022-11-28 059cee301930dbbf236f39af54892e8a28e6de54 +2023-01-23 101fd783dd44b5ba9d4b14c0aa0a8fa71f7e6a26 diff --git a/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash b/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash index 9e1b66fb44..652162e5e6 100644 --- a/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash +++ b/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash @@ -1 +1 @@ -2022-11-28 9da14b94e1d9dfa8fee2ed57106cef151480d0fd +2023-01-23 501fff310b0e75ae2a38bd3326cf7fd5f578af4b diff --git a/repos/pc/recipes/pkg/wifi/hash b/repos/pc/recipes/pkg/wifi/hash index 72263780a4..832aa23b0b 100644 --- a/repos/pc/recipes/pkg/wifi/hash +++ b/repos/pc/recipes/pkg/wifi/hash @@ -1 +1 @@ -2022-11-28 cd6f658b56199af1a1c749ecff9c5b02d2707fcc +2023-01-23 5dc8b498a42122b5b9a984c64e6e67b36ee14871 diff --git a/repos/pc/recipes/src/pc_intel_fb_drv/hash b/repos/pc/recipes/src/pc_intel_fb_drv/hash index 55722638a3..9ffd40bbf0 100644 --- a/repos/pc/recipes/src/pc_intel_fb_drv/hash +++ b/repos/pc/recipes/src/pc_intel_fb_drv/hash @@ -1 +1 @@ -2022-11-28 87bd7cd3522c9e9fe3998637023cce6eab6d0e87 +2023-01-23 b102acfe5203dafefed0c43d039754d0d7936abb diff --git a/repos/pc/recipes/src/pc_platform_drv/hash b/repos/pc/recipes/src/pc_platform_drv/hash index b3b6d4657d..12d7b77e72 100644 --- a/repos/pc/recipes/src/pc_platform_drv/hash +++ b/repos/pc/recipes/src/pc_platform_drv/hash @@ -1 +1 @@ -2022-11-28 262312bbe4d4b929b2da8ca43ecd46691fd2e4fc +2023-01-23 a1e1f1b7d979766ea4c27606de08d0d57a604cea diff --git a/repos/pc/recipes/src/pc_usb_host_drv/hash b/repos/pc/recipes/src/pc_usb_host_drv/hash index 0886928c57..57d214d595 100644 --- a/repos/pc/recipes/src/pc_usb_host_drv/hash +++ b/repos/pc/recipes/src/pc_usb_host_drv/hash @@ -1 +1 @@ -2022-11-28 86e3b997265a1206e5a4107525a7353d6b15ecf0 +2023-01-23 19e4055c9d5f13975c86e0b252f5c429515c8166 diff --git a/repos/pc/recipes/src/pc_wifi_drv/hash b/repos/pc/recipes/src/pc_wifi_drv/hash index 980745fc83..36294fb769 100644 --- a/repos/pc/recipes/src/pc_wifi_drv/hash +++ b/repos/pc/recipes/src/pc_wifi_drv/hash @@ -1 +1 @@ -2022-11-28 dd2d3c3121be1c6de414c7b36bf888989b22306a +2023-01-23 8c546b3d2ab0b1b83e166bfbd88d530590f93d3d diff --git a/repos/ports/recipes/pkg/report_dump/hash b/repos/ports/recipes/pkg/report_dump/hash index b7d5edbc27..5641c1cf59 100644 --- a/repos/ports/recipes/pkg/report_dump/hash +++ b/repos/ports/recipes/pkg/report_dump/hash @@ -1 +1 @@ -2022-11-28 ea0effdb269079ecb795ac6c1af1917dc7f5f0db +2023-01-23 47d6da94c1c19d7944071fe7d3f6d4dc6d79206e diff --git a/repos/ports/recipes/pkg/system_shell/hash b/repos/ports/recipes/pkg/system_shell/hash index 3eff89d686..242d4c7fd6 100644 --- a/repos/ports/recipes/pkg/system_shell/hash +++ b/repos/ports/recipes/pkg/system_shell/hash @@ -1 +1 @@ -2022-11-28 a22cb9b581a21c4f53d0ef4f856a8a8a3cc20454 +2023-01-23 eb3ea26b292c62115e9f309f7d984b441228c9d0 diff --git a/repos/ports/recipes/pkg/vbox5-nova-capture/hash b/repos/ports/recipes/pkg/vbox5-nova-capture/hash index 4f89ddae73..12801e9a6d 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-capture/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-capture/hash @@ -1 +1 @@ -2022-12-04 4c1edfaedecf2c66b3a320b3ff7686523237ea15 +2023-01-23 8e7c3ef1217189dbf59fb9cb85c0e61ec0f241f9 diff --git a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash index 03524febb1..c9cfbf9eed 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash @@ -1 +1 @@ -2022-12-04 ace38cff46ba3063f7b3b94ab7833a797312c486 +2023-01-23 3ccbf7de090f6a4733cda87fc5602548f0d71d93 diff --git a/repos/ports/recipes/pkg/vbox5/hash b/repos/ports/recipes/pkg/vbox5/hash index 7395cc430d..144722aa14 100644 --- a/repos/ports/recipes/pkg/vbox5/hash +++ b/repos/ports/recipes/pkg/vbox5/hash @@ -1 +1 @@ -2022-11-28 a5676bd1efacf99ed787e0a25c765cb87541c4f0 +2023-01-23 0ac58dc477be4f4139bb2739c32c776b8bbc5770 diff --git a/repos/ports/recipes/pkg/vbox6-capture/hash b/repos/ports/recipes/pkg/vbox6-capture/hash index e4559e3591..a629915749 100644 --- a/repos/ports/recipes/pkg/vbox6-capture/hash +++ b/repos/ports/recipes/pkg/vbox6-capture/hash @@ -1 +1 @@ -2022-11-28 70224ab6d960e5456c0147c54bb3b46cb6441bd0 +2023-01-23 3d5cd0397c934ed396425713ea153485f2915a78 diff --git a/repos/ports/recipes/pkg/vbox6/hash b/repos/ports/recipes/pkg/vbox6/hash index 43526518f3..ad5ead343a 100644 --- a/repos/ports/recipes/pkg/vbox6/hash +++ b/repos/ports/recipes/pkg/vbox6/hash @@ -1 +1 @@ -2022-11-28 d87959381855fcb306f3e2b6390e5beaaab1417b +2023-01-23 1fa81c86ee140d1d57c421ab3c3c5bb6ca47581b diff --git a/repos/ports/recipes/src/bash-minimal/hash b/repos/ports/recipes/src/bash-minimal/hash index 7a1e75a84d..4570913acd 100644 --- a/repos/ports/recipes/src/bash-minimal/hash +++ b/repos/ports/recipes/src/bash-minimal/hash @@ -1 +1 @@ -2022-11-16 7353a6e15b52cbbbe83f9dd0eecd34ea4b3473fd +2023-01-23 5e964d2a6d9a8e08e3d6ec97992c634820e9a005 diff --git a/repos/ports/recipes/src/bash/hash b/repos/ports/recipes/src/bash/hash index 7d600c7970..faa1d7cf2a 100644 --- a/repos/ports/recipes/src/bash/hash +++ b/repos/ports/recipes/src/bash/hash @@ -1 +1 @@ -2022-08-30 eca698181c3c952580d72e5a52f7e4785e54559b +2023-01-23 68e7f0247c70dfe89d0dc6aa9bdfd51910896b52 diff --git a/repos/ports/recipes/src/binutils_x86/hash b/repos/ports/recipes/src/binutils_x86/hash index 6813d00905..81c9a1fe96 100644 --- a/repos/ports/recipes/src/binutils_x86/hash +++ b/repos/ports/recipes/src/binutils_x86/hash @@ -1 +1 @@ -2022-11-16 0ff0de7696540adaa5b815926cde7d722597ba01 +2023-01-23 f82ef68a3964cfc01664c3b5c4512e7a14c0f435 diff --git a/repos/ports/recipes/src/coreutils-minimal/hash b/repos/ports/recipes/src/coreutils-minimal/hash index 52d4c864f7..361cd35df8 100644 --- a/repos/ports/recipes/src/coreutils-minimal/hash +++ b/repos/ports/recipes/src/coreutils-minimal/hash @@ -1 +1 @@ -2022-11-16 514ff37dcb1659356e5992de2f1aa9b3a5f9e1de +2023-01-23 22d407cf97d1a1c2bfa405b34602efb3b6cebd35 diff --git a/repos/ports/recipes/src/coreutils/hash b/repos/ports/recipes/src/coreutils/hash index f07e65c05c..7fbba66456 100644 --- a/repos/ports/recipes/src/coreutils/hash +++ b/repos/ports/recipes/src/coreutils/hash @@ -1 +1 @@ -2022-08-30 cb5f3326adf4b009b24bfa18b2bf18448dc88dac +2023-01-23 6c09eeccfc787e290cae04d7958ac066cebdf64b diff --git a/repos/ports/recipes/src/diffutils/hash b/repos/ports/recipes/src/diffutils/hash index 08024486d4..1c4bd9119a 100644 --- a/repos/ports/recipes/src/diffutils/hash +++ b/repos/ports/recipes/src/diffutils/hash @@ -1 +1 @@ -2022-08-30 c685681a37ed3d64f8206df76bfa575d114a92b9 +2023-01-23 4c9e31c2944656ce00c98d6cfa41d2b54ec9c92f diff --git a/repos/ports/recipes/src/e2fsprogs-minimal/hash b/repos/ports/recipes/src/e2fsprogs-minimal/hash index adbb6e5b78..ed5581cbb3 100644 --- a/repos/ports/recipes/src/e2fsprogs-minimal/hash +++ b/repos/ports/recipes/src/e2fsprogs-minimal/hash @@ -1 +1 @@ -2022-11-16 1b1950b38e18f68156902dbbfe51def2c47f64f7 +2023-01-23 3ffb6545c06d8be630a6ab030d7d87485d493589 diff --git a/repos/ports/recipes/src/e2fsprogs/hash b/repos/ports/recipes/src/e2fsprogs/hash index bc49e921fa..be21dca710 100644 --- a/repos/ports/recipes/src/e2fsprogs/hash +++ b/repos/ports/recipes/src/e2fsprogs/hash @@ -1 +1 @@ -2022-08-30 371c401e4c97b0f9696eda87e2f40967c2899f1e +2023-01-23 dbd40bb3f4a4f85f2bb9a870923245c103d72009 diff --git a/repos/ports/recipes/src/findutils/hash b/repos/ports/recipes/src/findutils/hash index ed91dfad77..e20f771d0e 100644 --- a/repos/ports/recipes/src/findutils/hash +++ b/repos/ports/recipes/src/findutils/hash @@ -1 +1 @@ -2022-08-30 1ec546375092620ce72fbccfb2c22e92b478e525 +2023-01-23 f9a1f8d3840ff20a54e272245fdbbd7672050f9f diff --git a/repos/ports/recipes/src/gcc_x86/hash b/repos/ports/recipes/src/gcc_x86/hash index d1e88ddf75..63452ce985 100644 --- a/repos/ports/recipes/src/gcc_x86/hash +++ b/repos/ports/recipes/src/gcc_x86/hash @@ -1 +1 @@ -2022-11-16 a2702c4425df466fd900c98fb5a2915ac33f01d3 +2023-01-23 769c083fcc518ccdee447f380345c789c56be25a diff --git a/repos/ports/recipes/src/gnumake/hash b/repos/ports/recipes/src/gnumake/hash index b5a7abd65a..b185f65dec 100644 --- a/repos/ports/recipes/src/gnumake/hash +++ b/repos/ports/recipes/src/gnumake/hash @@ -1 +1 @@ -2022-08-30 cf84399c1d84934101de86facc16c3c4f729c24e +2023-01-23 8d5034df871bc062b4fb27989ac01dd91986efe2 diff --git a/repos/ports/recipes/src/grep/hash b/repos/ports/recipes/src/grep/hash index 70b0960360..af941cba5f 100644 --- a/repos/ports/recipes/src/grep/hash +++ b/repos/ports/recipes/src/grep/hash @@ -1 +1 @@ -2022-08-30 36fb5dbc8605aebf91e1a2b650748c6ca93ecae2 +2023-01-23 89fe3ea29b15e7420a65492e65c69bae136c50a7 diff --git a/repos/ports/recipes/src/less/hash b/repos/ports/recipes/src/less/hash index c7a41200dc..72f66324e1 100644 --- a/repos/ports/recipes/src/less/hash +++ b/repos/ports/recipes/src/less/hash @@ -1 +1 @@ -2022-08-30 ec1c540b0e235f06c523c36a8484517903662a02 +2023-01-23 5ccef21323725d673763f914a6e9bbfaf0c3e3db diff --git a/repos/ports/recipes/src/lighttpd/hash b/repos/ports/recipes/src/lighttpd/hash index 443e7a6c5e..2b4ab609a4 100644 --- a/repos/ports/recipes/src/lighttpd/hash +++ b/repos/ports/recipes/src/lighttpd/hash @@ -1 +1 @@ -2022-11-16 15b4b1755c9a318af15f8901e0fcb4795622f03f +2023-01-23 de4517d36a6f5ffc8541fbe6619045690f13ccec diff --git a/repos/ports/recipes/src/sed/hash b/repos/ports/recipes/src/sed/hash index 7294bbadcc..d49c7785f2 100644 --- a/repos/ports/recipes/src/sed/hash +++ b/repos/ports/recipes/src/sed/hash @@ -1 +1 @@ -2022-08-30 57c0bca0dad88dbb4cab95d7d324b4b5f6a3dec8 +2023-01-23 99f91131c752d7ca4b6bc167cc84a115c5661eca diff --git a/repos/ports/recipes/src/tar/hash b/repos/ports/recipes/src/tar/hash index bf3f18d3f4..baf4f59cf7 100644 --- a/repos/ports/recipes/src/tar/hash +++ b/repos/ports/recipes/src/tar/hash @@ -1 +1 @@ -2022-12-04 c329142ada5234cc7f4542fba0e74e86f4ef0775 +2023-01-23 a1c85969b702460fb956a3b264bc8680822a17a0 diff --git a/repos/ports/recipes/src/tclsh/hash b/repos/ports/recipes/src/tclsh/hash index 830fd45ad6..2af5ac9524 100644 --- a/repos/ports/recipes/src/tclsh/hash +++ b/repos/ports/recipes/src/tclsh/hash @@ -1 +1 @@ -2022-08-30 24f71a064a8b11d0eb81cd3c9b1e6fe8df089b59 +2023-01-23 d9118f14fec04b8b58935a4aa357756123953c97 diff --git a/repos/ports/recipes/src/vbox5-nova/hash b/repos/ports/recipes/src/vbox5-nova/hash index c34710bfbe..32d92d0ecf 100644 --- a/repos/ports/recipes/src/vbox5-nova/hash +++ b/repos/ports/recipes/src/vbox5-nova/hash @@ -1 +1 @@ -2022-11-28 056083f7d17b13919c714a21073e73828419e29a +2023-01-23 d96eeb50b144c0d7b81e315172fd8b9e740705dd diff --git a/repos/ports/recipes/src/vbox5/hash b/repos/ports/recipes/src/vbox5/hash index aabec301a6..d4d73d9bda 100644 --- a/repos/ports/recipes/src/vbox5/hash +++ b/repos/ports/recipes/src/vbox5/hash @@ -1 +1 @@ -2022-11-28 52a31e5514bf2087621c26ed77f64f6521965b1c +2023-01-23 d0239f951733b10a822227f9a37e7d241104b020 diff --git a/repos/ports/recipes/src/vbox6/hash b/repos/ports/recipes/src/vbox6/hash index 786547a49a..d0262be43f 100644 --- a/repos/ports/recipes/src/vbox6/hash +++ b/repos/ports/recipes/src/vbox6/hash @@ -1 +1 @@ -2022-11-28 b8b9f1547a278a3e5323f9ac0dbe7b9fdd807b90 +2023-01-23 e1733e24fe507849a45ea695084c144c83e2341b diff --git a/repos/ports/recipes/src/verify/hash b/repos/ports/recipes/src/verify/hash index a6caa3f95b..2869c948b4 100644 --- a/repos/ports/recipes/src/verify/hash +++ b/repos/ports/recipes/src/verify/hash @@ -1 +1 @@ -2022-11-28 24211ee2bb1f90f8210ccb326a09c3311415cac9 +2023-01-23 3a089eac8ca30c1ea8d086e62057a599995d7349 diff --git a/repos/ports/recipes/src/vim-minimal/hash b/repos/ports/recipes/src/vim-minimal/hash index 870596c95a..09974c3248 100644 --- a/repos/ports/recipes/src/vim-minimal/hash +++ b/repos/ports/recipes/src/vim-minimal/hash @@ -1 +1 @@ -2022-11-16 2b688dd994ea964e5cd88896fc347f52b0e42fc7 +2023-01-23 7fe292afc27836f9aa67d3169f6a796f1ca03ce6 diff --git a/repos/ports/recipes/src/vim/hash b/repos/ports/recipes/src/vim/hash index 573b0bf1ff..abfe44bc91 100644 --- a/repos/ports/recipes/src/vim/hash +++ b/repos/ports/recipes/src/vim/hash @@ -1 +1 @@ -2022-08-30 ff4a2182cf2f71fbb3fb3f7832ffc71bdfc471d2 +2023-01-23 1dca1ac82795b57fdcc91eb76763fa43a825e69a diff --git a/repos/ports/recipes/src/which/hash b/repos/ports/recipes/src/which/hash index a2bd68950e..fdfc9a10a3 100644 --- a/repos/ports/recipes/src/which/hash +++ b/repos/ports/recipes/src/which/hash @@ -1 +1 @@ -2022-08-30 ddbb4e412291e26c26d235ebfc6203fc9e313dd2 +2023-01-23 66f854e335ccf1375be68efbabbba84d5e7fcc8d From dca71dbad9619616e7780fb815ab4e293dfb84b8 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 12 Dec 2022 15:09:50 +0100 Subject: [PATCH 0222/1921] pci_decode: add acpi device Use it as point to defer clients (e.g. ACPI-CA) until platform driver could claim all resources. Issue #4679 --- repos/os/src/app/pci_decode/main.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/repos/os/src/app/pci_decode/main.cc b/repos/os/src/app/pci_decode/main.cc index 3384b281ac..1bff87b184 100644 --- a/repos/os/src/app/pci_decode/main.cc +++ b/repos/os/src/app/pci_decode/main.cc @@ -303,6 +303,14 @@ void Main::parse_acpi_device_info(Xml_generator & gen) gen.attribute("size", 4U); }); }); + + /* + * ACPI device + */ + gen.node("device", [&] + { + gen.attribute("name", "acpi"); + }); } From 661330a97ac09eace5cb4d3da58b1f1c60a05453 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 12 Dec 2022 15:33:06 +0100 Subject: [PATCH 0223/1921] acpica: add dependency on acpi device Issue #4679 --- repos/gems/sculpt/drivers/pc | 2 +- repos/libports/include/acpica/acpica.h | 3 +-- repos/libports/run/acpi_suspend.run | 1 + repos/libports/run/acpica.run | 3 ++- repos/libports/src/lib/acpica/env.cc | 14 +++----------- 5 files changed, 8 insertions(+), 15 deletions(-) diff --git a/repos/gems/sculpt/drivers/pc b/repos/gems/sculpt/drivers/pc index b1c6cb3f6a..4938145c9b 100644 --- a/repos/gems/sculpt/drivers/pc +++ b/repos/gems/sculpt/drivers/pc @@ -147,7 +147,7 @@ - + diff --git a/repos/libports/include/acpica/acpica.h b/repos/libports/include/acpica/acpica.h index 34bd990bf3..9c38cc3e02 100644 --- a/repos/libports/include/acpica/acpica.h +++ b/repos/libports/include/acpica/acpica.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2016-2017 Genode Labs GmbH + * Copyright (C) 2016-2022 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -22,7 +22,6 @@ namespace Genode { namespace Acpica { void init(Genode::Env &, Genode::Allocator &); - void use_platform_drv(); } #endif /* _INCLUDE__ACPICA__ACPICA_H_ */ diff --git a/repos/libports/run/acpi_suspend.run b/repos/libports/run/acpi_suspend.run index 6c9c6a5a4b..8bd59aaa95 100644 --- a/repos/libports/run/acpi_suspend.run +++ b/repos/libports/run/acpi_suspend.run @@ -195,6 +195,7 @@ append config { + diff --git a/repos/libports/run/acpica.run b/repos/libports/run/acpica.run index 8f21613f19..9fb5e1af72 100644 --- a/repos/libports/run/acpica.run +++ b/repos/libports/run/acpica.run @@ -10,6 +10,7 @@ if { set build_components { core init timer drivers/platform + drivers/acpi server/event_dump app/pci_decode app/acpica @@ -87,7 +88,7 @@ set config { - + diff --git a/repos/libports/src/lib/acpica/env.cc b/repos/libports/src/lib/acpica/env.cc index 3e088229bf..2a83e7e06a 100644 --- a/repos/libports/src/lib/acpica/env.cc +++ b/repos/libports/src/lib/acpica/env.cc @@ -14,7 +14,7 @@ /* Genode includes */ #include #include -#include +#include #include "env.h" @@ -27,7 +27,8 @@ struct Acpica::Env Genode::Env &env; Genode::Allocator &heap; - Genode::Constructible platform; + Platform::Connection platform { env }; + Platform::Device device { platform, "acpi" }; Env(Genode::Env &env, Genode::Allocator &heap) : env(env), heap(heap) { } }; @@ -37,18 +38,9 @@ static Genode::Constructible instance; Genode::Allocator & Acpica::heap() { return instance->heap; } Genode::Env & Acpica::env() { return instance->env; } -Platform::Client & Acpica::platform() -{ - if (!instance->platform.constructed()) - instance->platform.construct(instance->env); - - return *instance->platform; -} void Acpica::init(Genode::Env &env, Genode::Allocator &heap) { instance.construct(env, heap); - - platform(); } From 53c2cff331fbc7ef75715428c3a2b2a2f625333e Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 13 Dec 2022 12:37:05 +0100 Subject: [PATCH 0224/1921] acpi: report ACPI tables and SCI IRQ Issue #4679 --- repos/os/src/drivers/acpi/acpi.cc | 90 ++++++++++++++++++++++++------- 1 file changed, 70 insertions(+), 20 deletions(-) diff --git a/repos/os/src/drivers/acpi/acpi.cc b/repos/os/src/drivers/acpi/acpi.cc index 41670466ad..a62349abda 100644 --- a/repos/os/src/drivers/acpi/acpi.cc +++ b/repos/os/src/drivers/acpi/acpi.cc @@ -20,6 +20,7 @@ /* base includes */ #include #include +#include #include #include @@ -311,6 +312,7 @@ struct Fadt : Genode::Mmio Fadt(addr_t mmio, size_t size) : Genode::Mmio(mmio), size(size) { } struct Dsdt : Register<0x28, 32> { }; + struct Sci_int : Register<0x2e, 16> { }; struct Features : Register<0x70, 32> { /* Table 5-35 Fixed ACPI Description Table Fixed Feature Flags */ struct Reset : Bitfield<10, 1> { }; @@ -327,6 +329,9 @@ struct Fadt : Genode::Mmio bool dsdt_valid() { return size >= Dsdt::OFFSET + Dsdt::ACCESS_WIDTH / 8; } + bool sci_int_valid() { + return size >= Sci_int::OFFSET + Sci_int::ACCESS_WIDTH / 8; } + bool io_reset_supported() { if (size < Reset_value::OFFSET + Reset_value::ACCESS_WIDTH / 8) @@ -511,6 +516,21 @@ class Pci_config_space : public List::Element */ class Table_wrapper { + public: + + struct Info : Registry::Element + { + String<5> name; + addr_t addr; + size_t size; + + Info(Registry ®istry, + char const *name, addr_t addr, size_t size) + : + Registry::Element(registry, *this), + name(name), addr(addr), size(size) { } + }; + private: addr_t _base; /* table base address */ @@ -634,7 +654,8 @@ class Table_wrapper Dmar_entry::list()->insert(new (&alloc) Dmar_entry(head->clone(alloc))); } - Table_wrapper(Acpi::Memory &memory, addr_t base) + Table_wrapper(Acpi::Memory &memory, addr_t base, + Registry ®istry, Allocator &heap) : _base(base), _table(0) { /* make table header accessible */ @@ -646,6 +667,8 @@ class Table_wrapper memset(_name, 0, 5); memcpy(_name, _table->signature, 4); + new (heap) Info(registry, name(), _base, _table->size); + if (verbose) Genode::log("table mapped '", Genode::Cstring(_name), "' at ", _table, " " "(from ", Genode::Hex(_base), ") " @@ -1318,7 +1341,7 @@ class Acpi_table private: Genode::Env &_env; - Genode::Allocator &_alloc; + Genode::Allocator &_heap; Acpi::Memory _memory; struct Reset_info @@ -1328,6 +1351,10 @@ class Acpi_table }; Genode::Constructible _reset_info { }; + unsigned short _sci_int { }; + bool _sci_int_valid { }; + + Registry _table_registry { }; /* BIOS range to scan for RSDP */ enum { BIOS_BASE = 0xe0000, BIOS_SIZE = 0x20000 }; @@ -1380,13 +1407,13 @@ class Acpi_table } template - void _parse_tables(Genode::Allocator &alloc, T * entries, uint32_t const count) + void _parse_tables(T * entries, uint32_t const count) { /* search for SSDT and DSDT tables */ for (uint32_t i = 0; i < count; i++) { uint32_t dsdt = 0; try { - Table_wrapper table(_memory, entries[i]); + Table_wrapper table(_memory, entries[i], _table_registry, _heap); if (!table.valid()) { Genode::error("ignoring table '", table.name(), @@ -1398,7 +1425,7 @@ class Acpi_table log("Found IVRS"); Ivrs ivrs(reinterpret_cast(table->signature)); - ivrs.parse(alloc); + ivrs.parse(_heap); } if (table.is_facp()) { @@ -1414,6 +1441,10 @@ class Acpi_table _reset_info.construct(Reset_info { .io_port = reset_io_port, .value = reset_value }); } + if (fadt.sci_int_valid()) { + _sci_int = fadt.read(); + _sci_int_valid = true; + } } if (table.is_searched()) { @@ -1421,23 +1452,23 @@ class Acpi_table if (verbose) Genode::log("Found ", table.name()); - Element::parse(alloc, table.table()); + Element::parse(_heap, table.table()); } if (table.is_madt()) { Genode::log("Found MADT"); - table.parse_madt(alloc); + table.parse_madt(_heap); } if (table.is_mcfg()) { Genode::log("Found MCFG"); - table.parse_mcfg(alloc); + table.parse_mcfg(_heap); } if (table.is_dmar()) { Genode::log("Found DMAR"); - table.parse_dmar(alloc); + table.parse_dmar(_heap); } } catch (Acpi::Memory::Unsupported_range &) { } @@ -1445,7 +1476,7 @@ class Acpi_table continue; try { - Table_wrapper table(_memory, dsdt); + Table_wrapper table(_memory, dsdt, _table_registry, _heap); if (!table.valid()) { Genode::error("ignoring table '", table.name(), @@ -1456,7 +1487,7 @@ class Acpi_table if (verbose) Genode::log("Found dsdt ", table.name()); - Element::parse(alloc, table.table()); + Element::parse(_heap, table.table()); } } catch (Acpi::Memory::Unsupported_range &) { } } @@ -1465,8 +1496,8 @@ class Acpi_table public: - Acpi_table(Genode::Env &env, Genode::Allocator &alloc) - : _env(env), _alloc(alloc), _memory(_env, _alloc) + Acpi_table(Genode::Env &env, Genode::Allocator &heap) + : _env(env), _heap(heap), _memory(_env, _heap) { addr_t rsdt = 0, xsdt = 0; uint8_t acpi_revision = 0; @@ -1514,33 +1545,43 @@ class Acpi_table if (acpi_revision != 0 && xsdt && sizeof(addr_t) != sizeof(uint32_t)) { /* running 64bit and xsdt is valid */ - Table_wrapper table(_memory, xsdt); + Table_wrapper table(_memory, xsdt, _table_registry, _heap); if (!table.valid()) throw -1; uint64_t * entries = reinterpret_cast(table.table() + 1); - _parse_tables(alloc, entries, table.entry_count(entries)); + _parse_tables(entries, table.entry_count(entries)); Genode::log("XSDT ", *table.table()); } else { /* running (32bit) or (64bit and xsdt isn't valid) */ - Table_wrapper table(_memory, rsdt); + Table_wrapper table(_memory, rsdt, _table_registry, _heap); if (!table.valid()) throw -1; uint32_t * entries = reinterpret_cast(table.table() + 1); - _parse_tables(alloc, entries, table.entry_count(entries)); + _parse_tables(entries, table.entry_count(entries)); Genode::log("RSDT ", *table.table()); } /* free up memory of elements not of any use */ - Element::clean_list(alloc); + Element::clean_list(_heap); /* free up io memory */ _memory.free_io_memory(); } - void generate_reset_info(Xml_generator &xml) const + ~Acpi_table() { + _table_registry.for_each([&] (Table_wrapper::Info &info) { + destroy(_heap, &info); + }); + } + + void generate_info(Xml_generator &xml) const + { + if (_sci_int_valid) + xml.node("sci_int", [&] () { xml.attribute("irq", _sci_int); }); + if (!_reset_info.constructed()) return; @@ -1548,6 +1589,15 @@ class Acpi_table xml.attribute("io_port", String<32>(Hex(_reset_info->io_port))); xml.attribute("value", _reset_info->value); }); + + Registry const ® = _table_registry; + reg.for_each([&] (Table_wrapper::Info const &info) { + xml.node("table", [&] { + xml.attribute("name", info.name); + xml.attribute("addr", String<20>(Hex(info.addr))); + xml.attribute("size", info.size); + }); + }); } }; @@ -1570,7 +1620,7 @@ void Acpi::generate_report(Genode::Env &env, Genode::Allocator &alloc) acpi.generate([&] (Genode::Xml_generator &xml) { - acpi_table.generate_reset_info(xml); + acpi_table.generate_info(xml); if (root_bridge_bdf != INVALID_ROOT_BRIDGE) { xml.node("root_bridge", [&] () { From 2353082bda9acb226b8448b914678a8be786cde2 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 13 Dec 2022 12:36:46 +0100 Subject: [PATCH 0225/1921] pci_decode: report ACPI SCI IRQ in acpi device Issue #4679 --- repos/os/src/app/pci_decode/main.cc | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/repos/os/src/app/pci_decode/main.cc b/repos/os/src/app/pci_decode/main.cc index 1bff87b184..b9c348c128 100644 --- a/repos/os/src/app/pci_decode/main.cc +++ b/repos/os/src/app/pci_decode/main.cc @@ -54,7 +54,7 @@ struct Main void parse_irq_override_rules(Xml_node & xml); void parse_pci_config_spaces(Xml_node & xml, Xml_generator & generator); - void parse_acpi_device_info(Xml_generator & generator); + void parse_acpi_device_info(Xml_node const &xml, Xml_generator & generator); void sys_rom_update(); template @@ -262,13 +262,28 @@ void Main::parse_pci_bus(bus_t bus, } +static void parse_acpica_info(Xml_node const &xml, Xml_generator &gen) +{ + gen.node("device", [&] { + gen.attribute("name", "acpi"); + gen.attribute("type", "acpi"); + + xml.with_optional_sub_node("sci_int", [&] (Xml_node xml) { + gen.node("irq", [&] { + gen.attribute("number", xml.attribute_value("irq", 0xff)); + }); + }); + }); +} + + /* * By now, we do not have the necessary information about non-PCI devices * available from the ACPI tables, therefore we hard-code typical devices * we assume to be found in this function. In the future, this function * shall interpret ACPI tables information. */ -void Main::parse_acpi_device_info(Xml_generator & gen) +void Main::parse_acpi_device_info(Xml_node const &xml, Xml_generator & gen) { /* * PS/2 device @@ -305,12 +320,10 @@ void Main::parse_acpi_device_info(Xml_generator & gen) }); /* - * ACPI device + * ACPI device (if applicable) */ - gen.node("device", [&] - { - gen.attribute("name", "acpi"); - }); + if (xml.has_sub_node("sci_int")) + parse_acpica_info(xml, gen); } @@ -384,7 +397,7 @@ void Main::sys_rom_update() pci_reporter.generate([&] (Xml_generator & generator) { - parse_acpi_device_info(generator); + parse_acpi_device_info(xml, generator); parse_pci_config_spaces(xml, generator); }); } From 4ab52aaf120461a0f62de555950b7423a883dd9a Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 19 Dec 2022 10:27:24 +0100 Subject: [PATCH 0226/1921] acpica: access ACPI IRQ via Platform "acpi" device Issue #4679 --- repos/libports/run/acpica.run | 5 +- repos/libports/src/app/acpica/os.cc | 96 ++++------------------------ repos/libports/src/lib/acpica/env.cc | 4 -- repos/libports/src/lib/acpica/env.h | 2 - 4 files changed, 17 insertions(+), 90 deletions(-) diff --git a/repos/libports/run/acpica.run b/repos/libports/run/acpica.run index 9fb5e1af72..4dbba35fe9 100644 --- a/repos/libports/run/acpica.run +++ b/repos/libports/run/acpica.run @@ -264,12 +264,13 @@ build_boot_image $boot_modules append qemu_args "-nographic " -run_genode_until {\[init -\> acpi.*SCI IRQ:.*\n} 30 - if {![have_include "power_on/qemu"]} { + run_genode_until forever exit 0 } +run_genode_until {\[init -\> acpi_state.*\n} 30 + set spawn_id $qemu_spawn_id sleep 1 diff --git a/repos/libports/src/app/acpica/os.cc b/repos/libports/src/app/acpica/os.cc index 2bd586c766..fd95d0176d 100644 --- a/repos/libports/src/app/acpica/os.cc +++ b/repos/libports/src/app/acpica/os.cc @@ -11,15 +11,15 @@ */ #include +#include #include #include #include #include -#include #include -#include #include +#include #include #include @@ -166,8 +166,11 @@ struct Acpica::Main Attached_rom_dataspace config { env, "config" }; + Platform::Connection platform { env }; + Platform::Device device { platform, "acpi" }; + Platform::Device::Irq irq { device, { 0 } }; + Signal_handler sci_irq; - Constructible sci_conn; Timer::Connection timer { env }; Signal_handler timer_trigger { env.ep(), *this, @@ -179,9 +182,6 @@ struct Acpica::Main unsigned unchanged_state_max; static struct Irq_handler { - UINT32 irq; - Irq_session::Trigger trigger; - Irq_session::Polarity polarity; ACPI_OSD_HANDLER handler; void *context; } irq_handler; @@ -214,24 +214,19 @@ struct Acpica::Main new (heap) Acpica::Statechange(env, enable_reset, enable_poweroff, enable_sleep); + if (periodic_ms) { + timer.sigh(timer_trigger); + timer.trigger_periodic(Microseconds(periodic_ms * 1000).value); + } + /* setup IRQ */ if (!irq_handler.handler) { warning("no IRQ handling available"); return; } - sci_conn.construct(env, irq_handler.irq, irq_handler.trigger, irq_handler.polarity); - - log("SCI IRQ: ", irq_handler.irq, " (", irq_handler.trigger, "-", - irq_handler.polarity, ")"); - - sci_conn->sigh(sci_irq); - sci_conn->ack_irq(); - - if (periodic_ms) { - timer.sigh(timer_trigger); - timer.trigger_periodic(Microseconds(periodic_ms * 1000).value); - } + irq.sigh_omit_initial_signal(sci_irq); + irq.ack(); } @@ -254,7 +249,7 @@ struct Acpica::Main UINT32 res = irq_handler.handler(irq_handler.context); - sci_conn->ack_irq(); + irq.ack(); AcpiOsWaitEventsComplete(); @@ -333,63 +328,6 @@ void Acpica::Main::init_acpica() return; } - { - /* - * ACPI Spec 2.1 General ACPI Terminology - * - * System Control Interrupt (SCI) A system interrupt used by hardware - * to notify the OS of ACPI events. The SCI is an active, low, - * shareable, level interrupt. - */ - irq_handler.irq = AcpiGbl_FADT.SciInterrupt; - irq_handler.trigger = Irq_session::TRIGGER_LEVEL; - irq_handler.polarity = Irq_session::POLARITY_LOW; - - /* apply potential override in MADT */ - ACPI_TABLE_MADT *madt = nullptr; - - ACPI_STATUS status = AcpiGetTable(ACPI_STRING(ACPI_SIG_MADT), 0, (ACPI_TABLE_HEADER **)&madt); - if (status == AE_OK) { - for_each_element(madt, (ACPI_SUBTABLE_HEADER *) nullptr, - [&](ACPI_SUBTABLE_HEADER const * const s) { - - if (s->Type != ACPI_MADT_TYPE_INTERRUPT_OVERRIDE) - return; - - ACPI_MADT_INTERRUPT_OVERRIDE const * const irq = - reinterpret_cast(s); - - auto polarity_from_flags = [] (UINT16 flags) { - switch (flags & 0b11) { - case 0b01: return Irq_session::POLARITY_HIGH; - case 0b11: return Irq_session::POLARITY_LOW; - case 0b00: - default: - return Irq_session::POLARITY_UNCHANGED; - } - }; - - auto trigger_from_flags = [] (UINT16 flags) { - switch ((flags & 0b1100) >> 2) { - case 0b01: return Irq_session::TRIGGER_EDGE; - case 0b11: return Irq_session::TRIGGER_LEVEL; - case 0b00: - default: - return Irq_session::TRIGGER_UNCHANGED; - } - }; - - if (irq->SourceIrq == AcpiGbl_FADT.SciInterrupt) { - irq_handler.irq = irq->GlobalIrq; - irq_handler.trigger = trigger_from_flags(irq->IntiFlags); - irq_handler.polarity = polarity_from_flags(irq->IntiFlags); - - AcpiGbl_FADT.SciInterrupt = irq->GlobalIrq; - } - }, [](ACPI_SUBTABLE_HEADER const * const s) { return s->Length; }); - } - } - status = AcpiEnableSubsystem(ACPI_FULL_INITIALIZATION); if (status != AE_OK) { error("AcpiEnableSubsystem failed, status=", status); @@ -490,12 +428,6 @@ struct Acpica::Main::Irq_handler Acpica::Main::irq_handler; ACPI_STATUS AcpiOsInstallInterruptHandler(UINT32 irq, ACPI_OSD_HANDLER handler, void *context) { - if (irq != Acpica::Main::irq_handler.irq) { - error("SCI interrupt is ", Acpica::Main::irq_handler.irq, - " but library requested ", irq); - return AE_BAD_PARAMETER; - } - Acpica::Main::irq_handler.handler = handler; Acpica::Main::irq_handler.context = context; return AE_OK; diff --git a/repos/libports/src/lib/acpica/env.cc b/repos/libports/src/lib/acpica/env.cc index 2a83e7e06a..4ceba40d6a 100644 --- a/repos/libports/src/lib/acpica/env.cc +++ b/repos/libports/src/lib/acpica/env.cc @@ -14,7 +14,6 @@ /* Genode includes */ #include #include -#include #include "env.h" @@ -27,9 +26,6 @@ struct Acpica::Env Genode::Env &env; Genode::Allocator &heap; - Platform::Connection platform { env }; - Platform::Device device { platform, "acpi" }; - Env(Genode::Env &env, Genode::Allocator &heap) : env(env), heap(heap) { } }; diff --git a/repos/libports/src/lib/acpica/env.h b/repos/libports/src/lib/acpica/env.h index ec92270992..d27867f324 100644 --- a/repos/libports/src/lib/acpica/env.h +++ b/repos/libports/src/lib/acpica/env.h @@ -21,8 +21,6 @@ namespace Acpica { Genode::Env & env(); Genode::Allocator & heap(); - Platform::Client & platform(); - bool platform_drv(); } #endif /* _ACPICA__ENV_H_ */ From 07d02f8d4654956465c29594b55d7549a2d8b26b Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 20 Jan 2023 15:22:12 +0100 Subject: [PATCH 0227/1921] tool/port: access to metadata of ports Fixes #4685 --- tool/ports/metadata | 34 +++++++++++++++++ tool/ports/mk/metadata_single_port.mk | 54 +++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100755 tool/ports/metadata create mode 100644 tool/ports/mk/metadata_single_port.mk diff --git a/tool/ports/metadata b/tool/ports/metadata new file mode 100755 index 0000000000..9bcdb64db7 --- /dev/null +++ b/tool/ports/metadata @@ -0,0 +1,34 @@ +#!/usr/bin/make -f + +# +# \brief Tool for retrieving metadata of port sources +# \author Christian Helmuth +# \date 2023-01-20 +# + +ifndef VERBOSE +MAKEFLAGS += --no-print-directory +endif + +export GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..) + +usage: + @$(ECHO) + @$(ECHO) "Tool for retrieving version information of port sources" + @$(ECHO) + @$(ECHO) "usage:" + @$(ECHO) + @$(ECHO) " $(notdir $(MAKEFILE_LIST)) " + @$(ECHO) + @$(ECHO) " whitespace-separated list of ports" + @$(ECHO) + +TARGETS = $(sort $(MAKECMDGOALS)) + +.PHONY: $(TARGETS) + +.NOTPARALLEL: + +$(TARGETS): + @$(MAKE) -f $(GENODE_DIR)/tool/ports/mk/metadata_single_port.mk $@ + @$(ECHO) diff --git a/tool/ports/mk/metadata_single_port.mk b/tool/ports/mk/metadata_single_port.mk new file mode 100644 index 0000000000..8a00cafa60 --- /dev/null +++ b/tool/ports/mk/metadata_single_port.mk @@ -0,0 +1,54 @@ +# +# \brief Retrieve version information of port source +# \author Christian Helmuth +# \date 2023-01-20 +# + +PORTS_TOOL_DIR ?= $(GENODE_DIR)/tool/ports + +include $(GENODE_DIR)/tool/ports/mk/front_end.inc +include $(GENODE_DIR)/tool/ports/mk/check_port_arg.inc + +# +# Include definitions provided by the port description file +# +include $(PORT) + +.NOTPARALLEL: + +# +# Assertion for the presence of a LICENSE and VERSION declarations in the port +# description +# +ifeq ($(LICENSE),) +$(TARGET): license_undefined +license_undefined: + @$(ECHO) "Error: License undefined"; false +endif + +ifeq ($(VERSION),) +$(TARGET): version_undefined +version_undefined: + @$(ECHO) "Error: Version undefined"; false +endif + +info: + @$(ECHO) "PORT: $(PORT_NAME)" + @$(ECHO) "LICENSE: $(LICENSE)" + @$(ECHO) "VERSION: $(VERSION)" + +%.file: + @$(ECHO) "SOURCE: $(URL($*)) ($*)" + +%.archive: + @$(ECHO) "SOURCE: $(URL($*)) ($*)" + +%.git: + @$(ECHO) "SOURCE: $(URL($*)) git $(REV($*)) ($*)" + +%.svn: + @$(ECHO) "SOURCE: $(URL($*)) svn $(REV($*)) ($*)" + +$(DOWNLOADS): info + +$(TARGET): $(DOWNLOADS) From da673cfad70fee19a1b646340f85b9c78aca1ab7 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 23 Jan 2023 09:01:29 +0100 Subject: [PATCH 0228/1921] tool/depot: replace wget by curl to support file:// URLs File-scheme URLs permit users to host downloadable archives (which may be sync'd by other means beforehand) on the local file system. Fixes #4737 --- tool/depot/mk/downloader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/depot/mk/downloader b/tool/depot/mk/downloader index 19bcbdd924..5051c5e903 100755 --- a/tool/depot/mk/downloader +++ b/tool/depot/mk/downloader @@ -110,7 +110,7 @@ file_url = '${URL($(call archive_user,$1))}/$1' $(PUBLIC_DIR)/%: @$(ECHO) "$(DARK_COL)download$(DEFAULT_COL) $*" $(VERBOSE)mkdir -p $(dir $@) - $(VERBOSE)wget --quiet --no-check-certificate $(call file_url,$*) -O $@ ||\ + $(VERBOSE)curl --silent $(call file_url,$*) -o $@ ||\ (echo "Error: failed to download $(call file_url,$*)"; rm -f $@; false) $(MAKECMDGOALS): $(TARGETS) From 9de81369a7e68f7e7b52e0754034f95262732d75 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 23 Jan 2023 12:07:23 +0100 Subject: [PATCH 0229/1921] libusb: retry configuration-descriptor retrieval Some USB devices (e.g., webcams) fail to deliver their configuration descriptor early after power-up. Testing revealed that retrying the requests usually succeeds on second or third attempt. Fixes #4739 --- repos/libports/run/webcam.inc | 2 +- .../libports/src/lib/libusb/genode_usb_raw.cc | 46 ++++++++++++------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/repos/libports/run/webcam.inc b/repos/libports/run/webcam.inc index 5be683a3ef..c29f13033c 100644 --- a/repos/libports/run/webcam.inc +++ b/repos/libports/run/webcam.inc @@ -138,7 +138,7 @@ append config { - + diff --git a/repos/libports/src/lib/libusb/genode_usb_raw.cc b/repos/libports/src/lib/libusb/genode_usb_raw.cc index 7513f1916b..e7eda6c4ea 100644 --- a/repos/libports/src/lib/libusb/genode_usb_raw.cc +++ b/repos/libports/src/lib/libusb/genode_usb_raw.cc @@ -67,17 +67,9 @@ struct Usb_device Usb::Config_descriptor config_descriptor; char *raw_config_descriptor = nullptr; - Usb_device(Usb::Connection *usb) - : usb_connection(usb) + bool _retrieve_raw_config_descriptor() { - Genode::log("libusb: waiting until device is plugged..."); - while (!usb_connection->plugged()) - genode_env().ep().wait_and_dispatch_one_io_signal(); - Genode::log("libusb: device is plugged"); - - usb_connection->config_descriptor(&device_descriptor, &config_descriptor); - - raw_config_descriptor = (char*)malloc(config_descriptor.total_length); + Genode::log("libusb: retrieve configuration descriptor"); Usb::Packet_descriptor p = usb_connection->alloc_packet(config_descriptor.total_length); @@ -95,19 +87,39 @@ struct Usb_device p = usb_connection->source()->get_acked_packet(); - if (!p.succeded) + bool ret = false; + if (!p.succeded) { Genode::error(__PRETTY_FUNCTION__, ": could not read raw configuration descriptor"); - - if (p.control.actual_size != config_descriptor.total_length) + } else if (p.control.actual_size != config_descriptor.total_length) { Genode::error(__PRETTY_FUNCTION__, ": received configuration descriptor of unexpected size"); - - char *packet_content = usb_connection->source()->packet_content(p); - Genode::memcpy(raw_config_descriptor, packet_content, - config_descriptor.total_length); + } else { + char *packet_content = usb_connection->source()->packet_content(p); + Genode::memcpy(raw_config_descriptor, packet_content, + config_descriptor.total_length); + ret = true; + } usb_connection->source()->release_packet(p); + return ret; + } + + Usb_device(Usb::Connection *usb) + : usb_connection(usb) + { + Genode::log("libusb: waiting until device is plugged..."); + while (!usb_connection->plugged()) + genode_env().ep().wait_and_dispatch_one_io_signal(); + Genode::log("libusb: device is plugged"); + + usb_connection->config_descriptor(&device_descriptor, &config_descriptor); + + raw_config_descriptor = (char*)malloc(config_descriptor.total_length); + + for (unsigned attempt = 0; attempt < 10; ++attempt) + if (_retrieve_raw_config_descriptor()) + break; } ~Usb_device() From f2188bd397f2d24cf50ae0c5a9247a28affc311d Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 9 Dec 2022 11:45:55 +0100 Subject: [PATCH 0230/1921] vmm: silent several VirtIO config accesses Ref genodelabs/genode#4698 --- repos/os/src/server/vmm/virtio_console.h | 17 +++++++++++++++++ repos/os/src/server/vmm/virtio_device.h | 8 ++++++++ repos/os/src/server/vmm/virtio_net.h | 4 +++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/repos/os/src/server/vmm/virtio_console.h b/repos/os/src/server/vmm/virtio_console.h index 2bead217ce..dadb939aa0 100644 --- a/repos/os/src/server/vmm/virtio_console.h +++ b/repos/os/src/server/vmm/virtio_console.h @@ -64,6 +64,23 @@ class Vmm::Virtio_console : public Virtio_device enum Device_id { CONSOLE = 0x3 }; + struct Config_area : Reg + { + Register read(Address_range & range, Cpu&) override + { + switch (range.start) { + case 4: return 1; /* maximum ports */ + default: ; + } + return 0; + } + + void write(Address_range & range, Cpu&, Register v) override {} + + Config_area(Virtio_console & console) + : Reg(console, "ConfigArea", Mmio_register::RW, 0x100, 12) { } + } _config_area { *this }; + public: Virtio_console(const char * const name, diff --git a/repos/os/src/server/vmm/virtio_device.h b/repos/os/src/server/vmm/virtio_device.h index a4b4a52151..40c4276ad0 100644 --- a/repos/os/src/server/vmm/virtio_device.h +++ b/repos/os/src/server/vmm/virtio_device.h @@ -318,6 +318,13 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base Set _device_low { *this, _queue_sel, "QueueDeviceLow", Reg::WO, 0xa0 }; Set _device_high { *this, _queue_sel, "QueueDeviceHigh", Reg::WO, 0xa4 }; + Reg _shm_id { *this, "SHMSel", Reg::WO, 0xac }; + Reg _shm_len_low { *this, "SHMLenLow", Reg::RO, 0xb0, 0xffffffff }; + Reg _shm_len_high { *this, "SHMLenHigh", Reg::RO, 0xb4, 0xffffffff }; + Reg _shm_base_low { *this, "SHMBaseLow", Reg::RO, 0xb8, 0xffffffff }; + Reg _shm_base_high { *this, "SHMBaseHigh", Reg::RO, 0xbc, 0xffffffff }; + Reg _config_gen { *this, "ConfigGeneration", Reg::RW, 0xfc, 0 }; + uint64_t _descriptor_area() const { @@ -432,6 +439,7 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base } Genode::Mutex & mutex() { return _mutex; } + void config_has_changed() { _config_gen.set(_config_gen.get() + 1); } }; #endif /* _VIRTIO_DEVICE_H_ */ diff --git a/repos/os/src/server/vmm/virtio_net.h b/repos/os/src/server/vmm/virtio_net.h index 1d8395bd3e..c2624d1c74 100644 --- a/repos/os/src/server/vmm/virtio_net.h +++ b/repos/os/src/server/vmm/virtio_net.h @@ -130,8 +130,10 @@ class Vmm::Virtio_net : public Virtio_device return mac.addr[range.start]; } + void write(Address_range & range, Cpu&, Register v) override {} + Config_area(Virtio_net & device, Nic::Mac_address & mac) - : Reg(device, "ConfigArea", Mmio_register::RO, 0x100, 8), + : Reg(device, "ConfigArea", Mmio_register::RW, 0x100, 24), mac(mac) { } } _config_area { *this, _mac }; From 85c8bd7d7e9bde1f2e2ae7b384ab0e6ae0f9b355 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 11 Jan 2023 14:36:13 +0100 Subject: [PATCH 0231/1921] vmm: implement VirtIO GPU model Ref genodelabs/genode#4698 --- repos/os/recipes/src/vmm/used_apis | 4 + repos/os/src/server/vmm/README | 5 +- repos/os/src/server/vmm/config.h | 3 +- repos/os/src/server/vmm/target.inc | 3 +- repos/os/src/server/vmm/virtio_device.h | 1 + repos/os/src/server/vmm/virtio_gpu.cc | 265 +++++++++++++ repos/os/src/server/vmm/virtio_gpu.h | 469 ++++++++++++++++++++++++ repos/os/src/server/vmm/vm.cc | 12 +- repos/os/src/server/vmm/vm.h | 4 +- 9 files changed, 758 insertions(+), 8 deletions(-) create mode 100644 repos/os/src/server/vmm/virtio_gpu.cc create mode 100644 repos/os/src/server/vmm/virtio_gpu.h diff --git a/repos/os/recipes/src/vmm/used_apis b/repos/os/recipes/src/vmm/used_apis index 2e642939a5..3d08083134 100644 --- a/repos/os/recipes/src/vmm/used_apis +++ b/repos/os/recipes/src/vmm/used_apis @@ -1,7 +1,11 @@ base-hw base block_session +gui_session +framebuffer_session +input_session nic_session os terminal_session timer_session +blit diff --git a/repos/os/src/server/vmm/README b/repos/os/src/server/vmm/README index 32a65a7a77..49f36b5e2f 100644 --- a/repos/os/src/server/vmm/README +++ b/repos/os/src/server/vmm/README @@ -70,9 +70,10 @@ For each virtio_device node the following attributes need to be set: A unique name denoting the device. :type: - The Virtio type of device. One can decide in between "console", "net", + The Virtio type of device. One can decide in between "console", "net", "gpu", and "block". The "console" type gets mapped to a Genode Terminal session, - "net" is mapped to a Nic session, and "block" to a Block session. + "net" is mapped to a Nic session, "gpu" is mapped to a Gui session, + and "block" to a Block session. Additional devices diff --git a/repos/os/src/server/vmm/config.h b/repos/os/src/server/vmm/config.h index cb188d6299..f9bd1075f4 100644 --- a/repos/os/src/server/vmm/config.h +++ b/repos/os/src/server/vmm/config.h @@ -38,7 +38,7 @@ class Vmm::Config struct Virtio_device : List_model::Element { - enum Type { INVALID, CONSOLE, NET, BLOCK }; + enum Type { INVALID, CONSOLE, NET, BLOCK, GPU }; enum { MMIO_SIZE = 0x200 }; @@ -94,6 +94,7 @@ class Vmm::Config if (type == "console") t = Virtio_device::CONSOLE; if (type == "net") t = Virtio_device::NET; if (type == "block") t = Virtio_device::BLOCK; + if (type == "gpu") t = Virtio_device::GPU; return t; } diff --git a/repos/os/src/server/vmm/target.inc b/repos/os/src/server/vmm/target.inc index 8145ba550e..78bd276483 100644 --- a/repos/os/src/server/vmm/target.inc +++ b/repos/os/src/server/vmm/target.inc @@ -1,6 +1,6 @@ TARGET = vmm REQUIRES = hw -LIBS = base +LIBS = base blit SRC_CC += address_space.cc SRC_CC += cpu_base.cc SRC_CC += config.cc @@ -11,6 +11,7 @@ SRC_CC += main.cc SRC_CC += mmio.cc SRC_CC += pl011.cc SRC_CC += vm.cc +SRC_CC += virtio_gpu.cc INC_DIR += $(PRG_DIR)/../.. $(PRG_DIR) vpath %.cc $(PRG_DIR)/../.. diff --git a/repos/os/src/server/vmm/virtio_device.h b/repos/os/src/server/vmm/virtio_device.h index 40c4276ad0..533c678271 100644 --- a/repos/os/src/server/vmm/virtio_device.h +++ b/repos/os/src/server/vmm/virtio_device.h @@ -19,6 +19,7 @@ #include #include +#include #include #include #include diff --git a/repos/os/src/server/vmm/virtio_gpu.cc b/repos/os/src/server/vmm/virtio_gpu.cc new file mode 100644 index 0000000000..430b7d1971 --- /dev/null +++ b/repos/os/src/server/vmm/virtio_gpu.cc @@ -0,0 +1,265 @@ +/* + * \brief Virtio GPU implementation + * \author Stefan Kalkowski + * \date 2021-02-19 + */ + +/* + * Copyright (C) 2021 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include + + +void Vmm::Virtio_gpu_queue::notify(Virtio_gpu_device & dev) +{ + memory_barrier(); + bool inform = false; + for (Ring_index avail_idx = _avail.current(); + _cur_idx != avail_idx; _cur_idx.inc()) { + try { + Index idx = _avail.get(_cur_idx); + Virtio_gpu_control_request + request(idx, _descriptors, _ram, dev); + _used.add(_cur_idx.idx(), idx, request.size()); + } catch (Exception & e) { + error(e); + } + inform = true; + } + + if (!inform) + return; + + _used.write(_cur_idx.idx()); + memory_barrier(); + if (_avail.inject_irq()) dev.assert_irq(); +} + + +void Vmm::Virtio_gpu_control_request::_get_display_info() +{ + Display_info_response dir { _desc_addr(1) }; + memset((void*)dir.base(), 0, Display_info_response::SIZE); + dir.write(Control_header::Type::OK_DISPLAY_INFO); + + dir.write(0); + dir.write(0); + dir.write(_device._fb_mode.area.w()); + dir.write(_device._fb_mode.area.h()); + dir.write(1); + dir.write(0); +} + + +void Vmm::Virtio_gpu_control_request::_resource_create_2d() +{ + Resource_create_2d c2d { _desc_addr(0) }; + Control_header response { _desc_addr(1) }; + + if (c2d.read() != + Resource_create_2d::Format::B8G8R8X8) { + warning("Unsupported pixel fomat (id=", + c2d.read(), ")!"); + response.write(Control_header::Type::ERR_INVALID_PARAMETER); + return; + } + + using Resource = Virtio_gpu_device::Resource; + + try { + new (_device._heap) + Resource(_device, + c2d.read(), + c2d.read(), + c2d.read()); + response.write(Control_header::Type::OK_NO_DATA); + } catch(...) { + response.write(Control_header::Type::ERR_OUT_OF_MEMORY); + } +} + + +void Vmm::Virtio_gpu_control_request::_resource_delete() +{ + using Resource = Virtio_gpu_device::Resource; + using Scanout = Resource::Scanout; + + Resource_unref rur { _desc_addr(0) }; + Control_header response { _desc_addr(1) }; + + response.write(Control_header::Type::ERR_INVALID_RESOURCE_ID); + uint32_t id = rur.read(); + + _device._resources.for_each([&] (Resource & res) { + if (res.id != id) + return; + + res.scanouts.for_each([&] (Scanout & sc) { + destroy(_device._heap, &sc); }); + destroy(_device._heap, &res); + response.write(Control_header::Type::OK_NO_DATA); + }); +} + + +void Vmm::Virtio_gpu_control_request::_resource_attach_backing() +{ + using Resource = Virtio_gpu_device::Resource; + using Entry = Resource_attach_backing::Memory_entry; + + Resource_attach_backing rab { _desc_addr(0) }; + addr_t entry_base { _desc_addr(1) }; + Control_header response { _desc_addr(2) }; + + response.write(Control_header::Type::ERR_INVALID_RESOURCE_ID); + uint32_t id = rab.read(); + unsigned nr = rab.read(); + + _device._resources.for_each([&] (Resource & res) { + if (res.id != id) + return; + + try { + for (unsigned i = 0; i < nr; i++) { + Entry entry(entry_base+i*Entry::SIZE); + size_t sz = entry.read(); + addr_t off = _device._ram.local_address(entry.read(), sz) + - _device._ram.local(); + res.attach(off, sz); + } + response.write(Control_header::Type::OK_NO_DATA); + } catch (Exception &) { + response.write(Control_header::Type::ERR_INVALID_PARAMETER); + } + }); +} + + +void Vmm::Virtio_gpu_control_request::_set_scanout() +{ + Set_scanout scr { _desc_addr(0) }; + Control_header response { _desc_addr(1) }; + + uint32_t id = scr.read(); + uint32_t sid = scr.read(); + response.write(id ? Control_header::Type::ERR_INVALID_RESOURCE_ID + : Control_header::Type::OK_NO_DATA); + + using Resource = Virtio_gpu_device::Resource; + using Scanout = Resource::Scanout; + _device._resources.for_each([&] (Resource & res) { + if (!id || id == res.id) + res.scanouts.for_each([&] (Scanout & sc) { + if (sc.id == sid) destroy(_device._heap, &sc); }); + + if (res.id != id) + return; + + try { + new (_device._heap) Scanout(res.scanouts, sid, + scr.read(), + scr.read(), + scr.read(), + scr.read()); + response.write(Control_header::Type::OK_NO_DATA); + } catch(...) { + response.write(Control_header::Type::ERR_OUT_OF_MEMORY); + } + }); +} + + +void Vmm::Virtio_gpu_control_request::_resource_flush() +{ + Resource_flush rf { _desc_addr(0) }; + Control_header response { _desc_addr(1) }; + + uint32_t id = rf.read(); + response.write(Control_header::Type::ERR_INVALID_RESOURCE_ID); + + using Resource = Virtio_gpu_device::Resource; + _device._resources.for_each([&] (Resource & res) { + if (res.id != id) + return; + + uint32_t x = rf.read(); + uint32_t y = rf.read(); + uint32_t w = rf.read(); + uint32_t h = rf.read(); + + if (x > res.area.w() || + y > res.area.h() || + w > res.area.w() || + h > res.area.h() || + x + w > res.area.w() || + y + h > res.area.h()) { + response.write(Control_header::Type::ERR_INVALID_PARAMETER); + return; + } + + enum { BYTES_PER_PIXEL = Virtio_gpu_device::BYTES_PER_PIXEL }; + response.write(Control_header::Type::OK_NO_DATA); + + void * src = + (void*)((addr_t)res.dst_ds.local_addr() + + (res.area.w() * y + x) * BYTES_PER_PIXEL); + void * dst = + (void*)((addr_t)_device._fb_ds->local_addr() + + (_device._fb_mode.area.w() * y + x) * BYTES_PER_PIXEL); + size_t line = res.area.w() * BYTES_PER_PIXEL; + + blit(src, line, dst, line, w*BYTES_PER_PIXEL, h); + + _device._gui.framebuffer()->refresh(x, y, w, h); + }); +} + + +void Vmm::Virtio_gpu_control_request::_transfer_to_host_2d() +{ + Transfer_to_host_2d tth { _desc_addr(0) }; + Control_header response { _desc_addr(1) }; + + uint32_t id = tth.read(); + response.write(Control_header::Type::ERR_INVALID_RESOURCE_ID); + + enum { BYTES_PER_PIXEL = Virtio_gpu_device::BYTES_PER_PIXEL }; + + using Resource = Virtio_gpu_device::Resource; + _device._resources.for_each([&] (Resource & res) + { + if (res.id != id) + return; + + uint32_t x = tth.read(); + uint32_t y = tth.read(); + uint32_t w = tth.read(); + uint32_t h = tth.read(); + addr_t off = tth.read(); + + if (x + w > res.area.w() || y + h > res.area.h()) { + response.write(Control_header::Type::ERR_INVALID_PARAMETER); + return; + } + + void * src = (void*)((addr_t)res.src_ds.local_addr() + off); + void * dst = (void*)((addr_t)res.dst_ds.local_addr() + + (y * res.area.w() + x) * BYTES_PER_PIXEL); + size_t line = res.area.w() * BYTES_PER_PIXEL; + + blit(src, line, dst, line, w*BYTES_PER_PIXEL, h); + + response.write(Control_header::Type::OK_NO_DATA); + }); +} + + +void Vmm::Virtio_gpu_control_request::_update_cursor() { } + + +void Vmm::Virtio_gpu_control_request::_move_cursor() { } diff --git a/repos/os/src/server/vmm/virtio_gpu.h b/repos/os/src/server/vmm/virtio_gpu.h new file mode 100644 index 0000000000..444b6e95ab --- /dev/null +++ b/repos/os/src/server/vmm/virtio_gpu.h @@ -0,0 +1,469 @@ +/* + * \brief Virtio GPU implementation + * \author Stefan Kalkowski + * \date 2021-02-19 + */ + +/* + * Copyright (C) 2021 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _VIRTIO_GPU_H_ +#define _VIRTIO_GPU_H_ + +#include +#include +#include +#include + +#include +#include + +namespace Vmm { + class Virtio_gpu_queue; + class Virtio_gpu_control_request; + class Virtio_gpu_device; + using namespace Genode; +} + + +class Vmm::Virtio_gpu_queue : public Virtio_split_queue +{ + private: + + Ring_index _used_idx; + + friend class Virtio_gpu_control_request; + + public: + + enum { CONTROL, CURSOR, QUEUE_COUNT }; + + using Virtio_split_queue::Virtio_split_queue; + + void notify(Virtio_gpu_device &); +}; + + +class Vmm::Virtio_gpu_control_request +{ + private: + + using Index = Virtio_gpu_queue::Descriptor_index; + using Descriptor = Virtio_gpu_queue::Descriptor; + using Descriptor_array = Virtio_gpu_queue::Descriptor_array; + + struct Control_header : Mmio + { + enum { SIZE = 24 }; + + struct Type : Register<0, 32> + { + enum Commands { + /* 2D commands */ + GET_DISPLAY_INFO = 0x0100, + RESOURCE_CREATE_2D, + RESOURCE_UNREF, + SET_SCANOUT, + RESOURCE_FLUSH, + TRANSFER_TO_HOST_2D, + RESOURCE_ATTACH_BACKING, + RESOURCE_DETACH_BACKING, + GET_CAPSET_INFO, + GET_CAPSET, + GET_EDID, + + /* cursor commands */ + UPDATE_CURSOR = 0x0300, + MOVE_CURSOR, + }; + + enum Responses { + OK_NO_DATA = 0x1100, + OK_DISPLAY_INFO, + OK_CAPSET_INFO, + OK_CAPSET, + OK_EDID, + ERR_UNSPEC = 0x1200, + ERR_OUT_OF_MEMORY, + ERR_INVALID_SCANOUT_ID, + ERR_INVALID_RESOURCE_ID, + ERR_INVALID_CONTEXT_ID, + ERR_INVALID_PARAMETER, + }; + }; + struct Flags : Register<0x4, 32> {}; + struct Fence_id : Register<0x8, 64> {}; + struct Ctx_id : Register<0x10, 32> {}; + + using Mmio::Mmio; + }; + + struct Display_info_response : Control_header + { + enum { SIZE = Control_header::SIZE + 24*16 }; + + struct X : Register<0x18, 32> {}; + struct Y : Register<0x1c, 32> {}; + struct Width : Register<0x20, 32> {}; + struct Height : Register<0x24, 32> {}; + struct Enabled : Register<0x28, 32> {}; + struct Flags : Register<0x2c, 32> {}; + + using Control_header::Control_header; + }; + + struct Resource_create_2d : Control_header + { + enum { SIZE = Control_header::SIZE + 16 }; + + struct Resource_id : Register<0x18, 32> {}; + + struct Format : Register<0x1c, 32> + { + enum { + B8G8R8A8 = 1, + B8G8R8X8 = 2, + A8R8G8B8 = 3, + X8R8G8B8 = 4, + R8G8B8A8 = 67, + X8B8G8R8 = 68, + A8B8G8R8 = 121, + R8G8B8X8 = 134, + }; + }; + + struct Width : Register<0x20, 32> {}; + struct Height : Register<0x24, 32> {}; + + using Control_header::Control_header; + }; + + struct Resource_unref : Control_header + { + enum { SIZE = Control_header::SIZE + 8 }; + + struct Resource_id : Register<0x18, 32> {}; + + using Control_header::Control_header; + }; + + struct Resource_attach_backing : Control_header + { + enum { SIZE = Control_header::SIZE + 8 }; + + struct Resource_id : Register<0x18, 32> {}; + struct Nr_entries : Register<0x1c, 32> {}; + + struct Memory_entry : Mmio + { + enum { SIZE = 16 }; + + struct Address : Register<0x0, 64> {}; + struct Length : Register<0x8, 32> {}; + + using Mmio::Mmio; + }; + + using Control_header::Control_header; + }; + + struct Set_scanout : Control_header + { + enum { SIZE = Control_header::SIZE + 24 }; + + struct X : Register<0x18, 32> {}; + struct Y : Register<0x1c, 32> {}; + struct Width : Register<0x20, 32> {}; + struct Height : Register<0x24, 32> {}; + struct Scanout_id : Register<0x28, 32> {}; + struct Resource_id : Register<0x2c, 32> {}; + + using Control_header::Control_header; + }; + + struct Resource_flush : Control_header + { + enum { SIZE = Control_header::SIZE + 24 }; + + struct X : Register<0x18, 32> {}; + struct Y : Register<0x1c, 32> {}; + struct Width : Register<0x20, 32> {}; + struct Height : Register<0x24, 32> {}; + struct Resource_id : Register<0x28, 32> {}; + + using Control_header::Control_header; + }; + + struct Transfer_to_host_2d :Control_header + { + enum { SIZE = Control_header::SIZE + 32 }; + + struct X : Register<0x18, 32> {}; + struct Y : Register<0x1c, 32> {}; + struct Width : Register<0x20, 32> {}; + struct Height : Register<0x24, 32> {}; + struct Offset : Register<0x28, 64> {}; + struct Resource_id : Register<0x30, 32> {}; + + using Control_header::Control_header; + }; + + Descriptor_array & _array; + Ram & _ram; + Virtio_gpu_device & _device; + Index _idx; + + Index _next(Descriptor desc) + { + if (!Descriptor::Flags::Next::get(desc.flags())) + throw Exception("Invalid request, no next descriptor"); + return desc.next(); + } + + Descriptor _desc(unsigned i) + { + Index idx = _idx; + for (; i; i--) + idx = _next(_array.get(idx)); + return _array.get(idx); + } + + addr_t _desc_addr(unsigned i) + { + Descriptor d = _desc(i); + return _ram.local_address(d.address(), d.length()); + } + + Control_header _ctrl_hdr { _desc_addr(0) }; + + void _get_display_info(); + void _resource_create_2d(); + void _resource_delete(); + void _resource_attach_backing(); + void _set_scanout(); + void _resource_flush(); + void _transfer_to_host_2d(); + void _update_cursor(); + void _move_cursor(); + + public: + + Virtio_gpu_control_request(Index id, + Descriptor_array & array, + Ram & ram, + Virtio_gpu_device & device) + : _array(array), _ram(ram), _device(device), _idx(id) + { + switch (_ctrl_hdr.read()) { + case Control_header::Type::GET_DISPLAY_INFO: + _get_display_info(); + break; + case Control_header::Type::RESOURCE_CREATE_2D: + _resource_create_2d(); + break; + case Control_header::Type::RESOURCE_UNREF: + _resource_delete(); + break; + case Control_header::Type::RESOURCE_ATTACH_BACKING: + _resource_attach_backing(); + break; + case Control_header::Type::SET_SCANOUT: + _set_scanout(); + break; + case Control_header::Type::RESOURCE_FLUSH: + _resource_flush(); + break; + case Control_header::Type::TRANSFER_TO_HOST_2D: + _transfer_to_host_2d(); + break; + case Control_header::Type::UPDATE_CURSOR: + _update_cursor(); + break; + case Control_header::Type::MOVE_CURSOR: + _move_cursor(); + break; + default: + error("Unknown control request ", + _ctrl_hdr.read()); + }; + } + + size_t size() { return Control_header::SIZE; } +}; + + +class Vmm::Virtio_gpu_device : public Virtio_device +{ + private: + + friend class Virtio_gpu_control_request; + + Env & _env; + Heap & _heap; + Attached_ram_dataspace & _ram_ds; + Gui::Connection _gui { _env }; + Cpu::Signal_handler _handler; + Constructible _fb_ds { }; + Framebuffer::Mode _fb_mode { _gui.mode() }; + Gui::Session::View_handle _view = _gui.create_view(); + bool _mode_changed { true }; + + using Area = Genode::Area<>; + using Rect = Genode::Rect<>; + + enum { BYTES_PER_PIXEL = 4 }; + + struct Resource : Registry::Element + { + struct Scanout : Registry::Element, Rect + { + uint32_t id; + + Scanout(Registry & registry, + uint32_t id, + uint32_t x, uint32_t y, + uint32_t w, uint32_t h) + : + Registry::Element(registry, *this), + Rect(Point((int)x,(int)y), Area((int)w,(int)h)) { } + + using Rect::Rect; + }; + + Virtio_gpu_device & device; + uint32_t id; + Area area; + + size_t _size() const { + return align_addr(area.w() * area.h() * BYTES_PER_PIXEL, 12); } + + addr_t attach_off { 0UL }; + Rm_connection rm { device._env }; + Region_map_client region_map { rm.create(_size()) }; + Attached_dataspace src_ds { device._env.rm(), + region_map.dataspace() }; + Attached_ram_dataspace dst_ds { device._env.ram(), + device._env.rm(), _size() }; + Registry scanouts; + + Resource(Virtio_gpu_device & dev, + uint32_t id, + uint32_t w, + uint32_t h) + : + Registry::Element(dev._resources, *this), + device(dev), + id(id), + area((int)w, (int)h) {} + + void attach(addr_t off, size_t sz) + { + if (attach_off + sz > _size()) + return; + + retry( + [&] () { + retry( + [&] { + region_map.attach(device._ram_ds.cap(), + sz, off, true, attach_off); + attach_off += sz; + }, + [&] { rm.upgrade_caps(2); }); + }, + [&] () { rm.upgrade_ram(8*1024); }); + } + }; + + Registry _resources {}; + + struct Configuration_area : Mmio_register + { + Virtio_gpu_device & dev; + + enum { + EVENTS_READ = 0, + EVENTS_CLEAR = 4, + SCANOUTS = 8 }; + + Register read(Address_range & range, Cpu&) override + { + if (range.start == EVENTS_READ && range.size == 4) + return dev._mode_changed ? 1 : 0; + + /* we support no multi-head, just return 1 */ + if (range.start == SCANOUTS && range.size == 4) + return 1; + + return 0; + } + + void write(Address_range & range, Cpu&, Register v) override + { + if (range.start == EVENTS_CLEAR && range.size == 4 && v == 1) + dev._mode_changed = false; + } + + Configuration_area(Virtio_gpu_device & device) + : Mmio_register("GPU config area", Mmio_register::RO, 0x100, 16), + dev(device) { device.add(*this); } + } _config_area{ *this }; + + void _mode_change() + { + Genode::Mutex::Guard guard(_mutex); + + _fb_mode = _gui.mode(); + + _gui.buffer(_fb_mode, false); + + if (_fb_mode.area.count() > 0) + _fb_ds.construct(_env.rm(), + _gui.framebuffer()->dataspace()); + + using Command = Gui::Session::Command; + _gui.enqueue(_view, Rect(Point(0, 0), _fb_mode.area)); + _gui.enqueue(_view, Gui::Session::View_handle()); + _gui.execute(); + + _mode_changed = true; + } + + void _notify(unsigned idx) override + { + if (idx < Virtio_gpu_queue::QUEUE_COUNT) + _queue[idx]->notify(*this); + } + + enum Device_id { GPU = 16 }; + + public: + + Virtio_gpu_device(const char * const name, + const uint64_t addr, + const uint64_t size, + unsigned irq, + Cpu & cpu, + Mmio_bus & bus, + Ram & ram, + Env & env, + Heap & heap, + Attached_ram_dataspace & ram_ds) + : + Virtio_device(name, addr, size, + irq, cpu, bus, ram, GPU), + _env(env), _heap(heap), _ram_ds(ram_ds), + _handler(cpu, env.ep(), *this, &Virtio_gpu_device::_mode_change) + { + _gui.mode_sigh(_handler); + _mode_change(); + } + + void assert_irq() { _assert_irq(); } +}; + +#endif /* _VIRTIO_GPU_H_ */ diff --git a/repos/os/src/server/vmm/vm.cc b/repos/os/src/server/vmm/vm.cc index 7d40779c33..5b8ebe9650 100644 --- a/repos/os/src/server/vmm/vm.cc +++ b/repos/os/src/server/vmm/vm.cc @@ -13,6 +13,10 @@ #include #include +#include +#include +#include +#include using Vmm::Vm; @@ -112,12 +116,18 @@ Vm::Vm(Genode::Env & env, Heap & heap, Config & config) Virtio_net(dev.name.string(), (uint64_t)dev.mmio_start, dev.mmio_size, dev.irq, boot_cpu(), _bus, _ram, env)); - return; + return; case Config::Virtio_device::BLOCK: _device_list.insert(new (_heap) Virtio_block_device(dev.name.string(), (uint64_t)dev.mmio_start, dev.mmio_size, dev.irq, boot_cpu(), _bus, _ram, env, heap)); + return; + case Config::Virtio_device::GPU: + _device_list.insert(new (_heap) + Virtio_gpu_device(dev.name.string(), (uint64_t)dev.mmio_start, + dev.mmio_size, dev.irq, boot_cpu(), + _bus, _ram, env, heap, _vm_ram)); default: return; }; diff --git a/repos/os/src/server/vmm/vm.h b/repos/os/src/server/vmm/vm.h index 715debda75..28b4a4368e 100644 --- a/repos/os/src/server/vmm/vm.h +++ b/repos/os/src/server/vmm/vm.h @@ -21,9 +21,7 @@ #include #include #include -#include -#include -#include +#include #include #include From 80687e702c2717d797a2dcfb8a0d0583ec253ef0 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 9 Dec 2022 12:00:41 +0100 Subject: [PATCH 0232/1921] vmm: implement VirtIO input model Fix genodelabs/genode#4698 --- repos/os/src/server/vmm/README | 7 +- repos/os/src/server/vmm/config.h | 3 +- repos/os/src/server/vmm/virtio_gpu.h | 7 +- repos/os/src/server/vmm/virtio_input.h | 310 +++++++++++++++++++++++++ repos/os/src/server/vmm/vm.cc | 11 +- repos/os/src/server/vmm/vm.h | 3 + 6 files changed, 332 insertions(+), 9 deletions(-) create mode 100644 repos/os/src/server/vmm/virtio_input.h diff --git a/repos/os/src/server/vmm/README b/repos/os/src/server/vmm/README index 49f36b5e2f..7bbe0d080c 100644 --- a/repos/os/src/server/vmm/README +++ b/repos/os/src/server/vmm/README @@ -71,10 +71,9 @@ For each virtio_device node the following attributes need to be set: :type: The Virtio type of device. One can decide in between "console", "net", "gpu", - and "block". The "console" type gets mapped to a Genode Terminal session, - "net" is mapped to a Nic session, "gpu" is mapped to a Gui session, - and "block" to a Block session. - + "input", and "block". The "console" type gets mapped to a Genode Terminal + session, "net" is mapped to a Nic session, "gpu" is mapped to a Gui session, + "input" to the event part of the Gui session, and "block" to a Block session. Additional devices ------------------ diff --git a/repos/os/src/server/vmm/config.h b/repos/os/src/server/vmm/config.h index f9bd1075f4..1db2cbfd9f 100644 --- a/repos/os/src/server/vmm/config.h +++ b/repos/os/src/server/vmm/config.h @@ -38,7 +38,7 @@ class Vmm::Config struct Virtio_device : List_model::Element { - enum Type { INVALID, CONSOLE, NET, BLOCK, GPU }; + enum Type { INVALID, CONSOLE, NET, BLOCK, GPU, INPUT }; enum { MMIO_SIZE = 0x200 }; @@ -95,6 +95,7 @@ class Vmm::Config if (type == "net") t = Virtio_device::NET; if (type == "block") t = Virtio_device::BLOCK; if (type == "gpu") t = Virtio_device::GPU; + if (type == "input") t = Virtio_device::INPUT; return t; } diff --git a/repos/os/src/server/vmm/virtio_gpu.h b/repos/os/src/server/vmm/virtio_gpu.h index 444b6e95ab..c85c8bf430 100644 --- a/repos/os/src/server/vmm/virtio_gpu.h +++ b/repos/os/src/server/vmm/virtio_gpu.h @@ -305,7 +305,7 @@ class Vmm::Virtio_gpu_device : public Virtio_device Env & _env; Heap & _heap; Attached_ram_dataspace & _ram_ds; - Gui::Connection _gui { _env }; + Gui::Connection & _gui; Cpu::Signal_handler _handler; Constructible _fb_ds { }; Framebuffer::Mode _fb_mode { _gui.mode() }; @@ -452,11 +452,12 @@ class Vmm::Virtio_gpu_device : public Virtio_device Ram & ram, Env & env, Heap & heap, - Attached_ram_dataspace & ram_ds) + Attached_ram_dataspace & ram_ds, + Gui::Connection & gui) : Virtio_device(name, addr, size, irq, cpu, bus, ram, GPU), - _env(env), _heap(heap), _ram_ds(ram_ds), + _env(env), _heap(heap), _ram_ds(ram_ds), _gui(gui), _handler(cpu, env.ep(), *this, &Virtio_gpu_device::_mode_change) { _gui.mode_sigh(_handler); diff --git a/repos/os/src/server/vmm/virtio_input.h b/repos/os/src/server/vmm/virtio_input.h new file mode 100644 index 0000000000..5cb7ab3857 --- /dev/null +++ b/repos/os/src/server/vmm/virtio_input.h @@ -0,0 +1,310 @@ +/* + * \brief Virtio Input implementation + * \author Stefan Kalkowski + * \date 2022-12-06 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _VIRTIO_INPUT_H_ +#define _VIRTIO_INPUT_H_ + +#include +#include +#include + +namespace Vmm { + class Virtio_input_device; + using namespace Genode; +} + + +namespace Linux_evdev +{ + enum Type { + EV_SYNC = 0x0, + EV_KEY = 0x1, + EV_REL = 0x2, + EV_ABS = 0x3, + EV_REP = 0x14 + }; + + enum Relative { + REL_WHEEL = 8, + EV_REL_FEATURES = 1U << REL_WHEEL + }; + + enum Absolute { + ABS_X = 0, + ABS_Y = 1, + EV_ABS_FEATURES = (1U << ABS_X) | (1U << ABS_Y) + }; +}; + + +class Vmm::Virtio_input_device : public Virtio_device +{ + private: + + Env & _env; + Heap & _heap; + Input::Session_client & _input; + Attached_dataspace _input_ds { _env.rm(), _input.dataspace() }; + Input::Event const * const _events { + _input_ds.local_addr() }; + + enum State { READY, IN_MOTION, SYNC }; + + State _state { READY }; + unsigned _num_events { 0U }; + unsigned _idx_events { 0U }; + int _motion_y { -1 }; + + Cpu::Signal_handler _handler; + + struct Virtio_input_event : Mmio + { + enum { SIZE = 8 }; + + struct Type : Register<0, 16> {}; + struct Code : Register<2, 16> {}; + struct Value : Register<4, 32> {}; + + using Mmio::Mmio; + }; + + struct Configuration_area : Mmio_register + { + Virtio_input_device & dev; + + struct Abs_info + { + enum { SIZE = 20 }; + + uint32_t min; + uint32_t max; + uint32_t fuzz; + uint32_t flat; + }; + + enum Offsets + { + SELECT = 0, + SUB_SELECT = 1, + SIZE = 2, + DATA = 8, + DATA_MAX = DATA + 128, + }; + + enum Select { + UNSET = 0x00, + ID_NAME = 0x01, + ID_SERIAL = 0x02, + ID_DEVIDS = 0x03, + PROP_BITS = 0x10, + EV_BITS = 0x11, + ABS_INFO = 0x12, + }; + + uint8_t _select { 0 }; + uint8_t _sub_select { 0 }; + + String<16> _name { "vinput0" }; + String<16> _serial { "serial0" }; + String<16> _dev_id { "0" }; + + uint8_t _size() + { + using namespace Linux_evdev; + + switch (_select) { + case ID_NAME: return _name.length() - 1; + case ID_SERIAL: return _serial.length() - 1; + case ID_DEVIDS: return _dev_id.length() - 1; + case PROP_BITS: return 0; /* Unsupported */ + case EV_BITS: + switch (_sub_select) { + case EV_KEY: return 36; + case EV_REL: return 2; + case EV_ABS: return 1; + case EV_REP: return 1; + default: return 0; /* Unsupported */ + }; + case ABS_INFO: return 20; + default: break; + }; + + error("Unknown size for ", _select, " ", _sub_select); + return 0; + } + + Register _data(addr_t off) + { + using namespace Linux_evdev; + + switch (_select) { + case ID_NAME: + return (off < (_name.length()-1)) ? _name.string()[off] : 0; + case ID_SERIAL: + return (off < (_serial.length()-1)) ? _serial.string()[off] + : 0; + case ID_DEVIDS: + return (off < (_dev_id.length()-1)) ? _dev_id.string()[off] + : 0; + case EV_BITS: + switch (_sub_select) { + case EV_ABS: return EV_ABS_FEATURES; + case EV_REL: return EV_REL_FEATURES; + case EV_KEY: return 0xffffffff; + default: return 0; + }; + case ABS_INFO: + switch (_sub_select) { + case ABS_X: return (off == 4) ? 1920 : 0; + case ABS_Y: return (off == 4) ? 1050 : 0; + default: return 0; + }; + default: break; + }; + + error("Invalid data offset for selectors ", + _select, " ", _sub_select); + return 0; + } + + Register read(Address_range & range, Cpu&) override + { + if (range.start == SIZE) + return _size(); + + if (range.start >= DATA && range.start < DATA_MAX) + return _data(range.start-DATA); + + error("Reading from virtio input config space ", + "at offset ", range.start, " is not allowed"); + return 0; + } + + void write(Address_range & range, Cpu&, Register v) override + { + switch (range.start) { + case SELECT: _select = v; return; + case SUB_SELECT: _sub_select = v; return; + default: + error("Writing to virtio input config space ", + "at offset ", range.start, " is not allowed"); + } + } + + Configuration_area(Virtio_input_device & device) + : Mmio_register("Input config area", + Mmio_register::RO, 0x100, 0xa4), + dev(device) { device.add(*this); } + } _config_area{ *this }; + + void _handle_input() + { + if (!_queue[0].constructed()) + return; + + bool irq = _queue[0]->notify([&] (addr_t addr, size_t size) { + if (size < Virtio_input_event::SIZE) { + warning("wrong virtioqueue packet size for input ", size); + return 0UL; + } + + Virtio_input_event vie(addr); + + if (_state == IN_MOTION) { + vie.write(Linux_evdev::EV_ABS); + vie.write(Linux_evdev::ABS_Y); + vie.write(_motion_y); + _state = SYNC; + return size; + } + + if (_state == SYNC) { + vie.write(Linux_evdev::EV_SYNC); + vie.write(0); + vie.write(0); + _state = READY; + return size; + } + + if (_num_events == _idx_events) { + _num_events = _input.flush(); + _idx_events = 0; + } + + while (_idx_events < _num_events && + !_events[_idx_events].valid()) + _idx_events++; + + if (_num_events == _idx_events) + return 0UL; + + Input::Event const event = _events[_idx_events++]; + + auto press = [&] (Input::Keycode key, bool press) { + vie.write(Linux_evdev::EV_KEY); + vie.write(key); + vie.write(press); + _state = SYNC; + }; + event.handle_press([&] (Input::Keycode key, Genode::Codepoint) { + press(key, true); }); + event.handle_release([&] (Input::Keycode key) { + press(key, false); }); + event.handle_absolute_motion([&] (int x, int y) + { + vie.write(Linux_evdev::EV_ABS); + vie.write(Linux_evdev::ABS_X); + vie.write(x); + _motion_y = y; + _state = IN_MOTION; + }); + return size; + }); + + if (irq) _assert_irq(); + } + + void _notify(unsigned idx) override + { + if (idx) { + error("VirtIO input queue for status event not implemented"); + return; + } + _handle_input(); + } + + enum Device_id { INPUT = 18 }; + + public: + + Virtio_input_device(const char * const name, + const uint64_t addr, + const uint64_t size, + unsigned irq, + Cpu & cpu, + Mmio_bus & bus, + Ram & ram, + Env & env, + Heap & heap, + Input::Session_client & input) + : + Virtio_device(name, addr, size, + irq, cpu, bus, ram, INPUT), + _env(env), _heap(heap), _input(input), + _handler(cpu, env.ep(), *this, &Virtio_input_device::_handle_input) + { + _input.sigh(_handler); + } +}; + +#endif /* _VIRTIO_INPUT_H_ */ diff --git a/repos/os/src/server/vmm/vm.cc b/repos/os/src/server/vmm/vm.cc index 5b8ebe9650..163ee9101f 100644 --- a/repos/os/src/server/vmm/vm.cc +++ b/repos/os/src/server/vmm/vm.cc @@ -17,6 +17,7 @@ #include #include #include +#include using Vmm::Vm; @@ -124,10 +125,18 @@ Vm::Vm(Genode::Env & env, Heap & heap, Config & config) _bus, _ram, env, heap)); return; case Config::Virtio_device::GPU: + if (!_gui.constructed()) _gui.construct(env); _device_list.insert(new (_heap) Virtio_gpu_device(dev.name.string(), (uint64_t)dev.mmio_start, dev.mmio_size, dev.irq, boot_cpu(), - _bus, _ram, env, heap, _vm_ram)); + _bus, _ram, env, heap, _vm_ram, *_gui)); + return; + case Config::Virtio_device::INPUT: + if (!_gui.constructed()) _gui.construct(env); + _device_list.insert(new (_heap) + Virtio_input_device(dev.name.string(), (uint64_t)dev.mmio_start, + dev.mmio_size, dev.irq, boot_cpu(), + _bus, _ram, env, heap, *_gui->input())); default: return; }; diff --git a/repos/os/src/server/vmm/vm.h b/repos/os/src/server/vmm/vm.h index 28b4a4368e..8c19b155a7 100644 --- a/repos/os/src/server/vmm/vm.h +++ b/repos/os/src/server/vmm/vm.h @@ -25,6 +25,7 @@ #include #include +#include #include namespace Vmm { @@ -64,6 +65,8 @@ class Vmm::Vm List _device_list; Pl011 _uart; + Constructible _gui {}; + addr_t _initrd_offset() const; addr_t _dtb_offset() const; From bfa90ab3e8be7765daeb9f31127c8a38885e1cbf Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 11 Jan 2023 14:17:52 +0100 Subject: [PATCH 0233/1921] vmm: make initramfs an optional feature Fix genodelabs/genode#4723 --- repos/os/src/server/vmm/README | 3 ++- repos/os/src/server/vmm/config.cc | 2 +- repos/os/src/server/vmm/config.h | 2 ++ repos/os/src/server/vmm/fdt.cc | 8 ++++++-- repos/os/src/server/vmm/vm.cc | 17 ++++++++++++++--- repos/os/src/server/vmm/vm.h | 5 +++-- 6 files changed, 28 insertions(+), 9 deletions(-) diff --git a/repos/os/src/server/vmm/README b/repos/os/src/server/vmm/README index 7bbe0d080c..e6534b1b8d 100644 --- a/repos/os/src/server/vmm/README +++ b/repos/os/src/server/vmm/README @@ -26,7 +26,8 @@ Configuration attributes explained in more detail: :initrd_rom: This attribute is optional. It denotes the ROM, which is requested as initramfs - resp. initrd to be loaded. The default name requested will be "initrd". + resp. initrd to be loaded. If no name is given, no initramfs will be provided + to the guest OS. :ram_size: This attribute is mandatory. It defines the size of the VM's memory. diff --git a/repos/os/src/server/vmm/config.cc b/repos/os/src/server/vmm/config.cc index 4c9fd4dca4..31b863099d 100644 --- a/repos/os/src/server/vmm/config.cc +++ b/repos/os/src/server/vmm/config.cc @@ -37,7 +37,7 @@ Config::Virtio_device::~Virtio_device() void Vmm::Config::update(Xml_node node) { _kernel_name = node.attribute_value("kernel_rom", Name("linux")); - _initrd_name = node.attribute_value("initrd_rom", Name("initrd")); + _initrd_name = node.attribute_value("initrd_rom", Name()); _ram_size = node.attribute_value("ram_size", Number_of_bytes()); _cpu_count = node.attribute_value("cpu_count", 0U); _cpu_type = node.attribute_value("cpu_type", Name("arm,cortex-a15")); diff --git a/repos/os/src/server/vmm/config.h b/repos/os/src/server/vmm/config.h index 1db2cbfd9f..5cea0b9b90 100644 --- a/repos/os/src/server/vmm/config.h +++ b/repos/os/src/server/vmm/config.h @@ -130,6 +130,8 @@ class Vmm::Config Config(Heap & heap) : _heap(heap) { _mmio_alloc.add_range(VIRTIO_MMIO_START, VIRTIO_MMIO_SIZE); } + bool initrd() const { return _initrd_name.valid(); } + const char * kernel_name() const { return _kernel_name.string(); } const char * initrd_name() const { return _initrd_name.string(); } const char * cpu_type() const { return _cpu_type.string(); } diff --git a/repos/os/src/server/vmm/fdt.cc b/repos/os/src/server/vmm/fdt.cc index 294c3ba3a0..eb2f916e2e 100644 --- a/repos/os/src/server/vmm/fdt.cc +++ b/repos/os/src/server/vmm/fdt.cc @@ -338,12 +338,16 @@ void Vmm::Fdt_generator::_generate_tree(uint32_t & off, Config const & config, node(Name("chosen"), [&] () { + property(Name("bootargs"), Name(config.bootargs())); + property(Name("stdout-path"), Name("/pl011")); + + if (!initrd_size) + return; + /* we're sure that the initrd start address is wide below 4GB */ uint32_t start = (uint32_t)((addr_t)initrd_start & 0xffffffff); property(Name("linux,initrd-start"), Value(start)); property(Name("linux,initrd-end"), Value(start+initrd_size)); - property(Name("bootargs"), Name(config.bootargs())); - property(Name("stdout-path"), Name("/pl011")); }); config.for_each_virtio_device([&] (Config::Virtio_device const & dev) { diff --git a/repos/os/src/server/vmm/vm.cc b/repos/os/src/server/vmm/vm.cc index 163ee9101f..11ad8a4c9b 100644 --- a/repos/os/src/server/vmm/vm.cc +++ b/repos/os/src/server/vmm/vm.cc @@ -46,9 +46,15 @@ Genode::addr_t Vm::_initrd_offset() const } +Genode::size_t Vm::_initrd_size() const +{ + return _initrd_rom.constructed() ? _initrd_rom->size() : 0UL; +} + + Genode::addr_t Vm::_dtb_offset() const { - return align_addr(_initrd_offset()+_initrd_rom.size(), LOG2_2MB); + return align_addr(_initrd_offset() + _initrd_size(), LOG2_2MB); } @@ -61,15 +67,20 @@ void Vm::_load_kernel() void Vm::_load_initrd() { + if (!_config.initrd()) + return; + + _initrd_rom.construct(_env, _config.initrd_name()); memcpy((void*)(_ram.local() + _initrd_offset()), - _initrd_rom.local_addr(), _initrd_rom.size()); + _initrd_rom->local_addr(), _initrd_size()); } void Vm::_load_dtb() { Fdt_generator fdt(_env, _heap, _ram.local() + _dtb_offset(), 1 << LOG2_2MB); - fdt.generate(_config, (void*)(_ram.base()+_initrd_offset()), _initrd_rom.size()); + fdt.generate(_config, (void*)(_ram.base() + _initrd_offset()), + _initrd_size()); } diff --git a/repos/os/src/server/vmm/vm.h b/repos/os/src/server/vmm/vm.h index 8c19b155a7..ea2a493a90 100644 --- a/repos/os/src/server/vmm/vm.h +++ b/repos/os/src/server/vmm/vm.h @@ -54,7 +54,6 @@ class Vmm::Vm Config & _config; Vm_connection _vm { _env }; Attached_rom_dataspace _kernel_rom { _env, _config.kernel_name() }; - Attached_rom_dataspace _initrd_rom { _env, _config.initrd_name() }; Attached_ram_dataspace _vm_ram { _env.ram(), _env.rm(), _config.ram_size(), CACHED }; Ram _ram { RAM_START, _config.ram_size(), @@ -65,9 +64,11 @@ class Vmm::Vm List _device_list; Pl011 _uart; - Constructible _gui {}; + Constructible _initrd_rom {}; + Constructible _gui {}; addr_t _initrd_offset() const; + size_t _initrd_size() const; addr_t _dtb_offset() const; void _load_kernel(); From 1f8438a6ae8936d2a091ca96b32fdc9ec770db6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Wed, 27 Apr 2022 10:22:54 +0000 Subject: [PATCH 0234/1921] tool_chain: check ncursesw as well Fixes #4699. --- tool/tool_chain | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tool/tool_chain b/tool/tool_chain index ac0ad50f7d..5f13611238 100755 --- a/tool/tool_chain +++ b/tool/tool_chain @@ -121,7 +121,9 @@ PKG_CONFIG_OK = $(call check_nonempty_f,$(shell which pkg-config),\ # CURSES_OK = $(call check_equal_f,\ $(shell pkg-config --exists ncurses && echo ok),ok,\ - Need to have 'libncurses' installed.) + $(call check_equal_f,\ + $(shell pkg-config --exists ncursesw && echo ok),ok,\ + Need to have 'libncurses' installed.)) # # Check if 'texinfo' is installed From faf37b51e7e5758efe33bae6a5c3324606431244 Mon Sep 17 00:00:00 2001 From: Benjamin Lamowski Date: Mon, 23 Jan 2023 19:16:00 +0100 Subject: [PATCH 0235/1921] dde_linux: backport fix for use-after-free reported by GCC 12 On my system, compiling dde_linux fails with `-Werror=use-after-free`. Backport the fix from mainline to get rid of the issue. Fixes #4740 --- .../patches/realloc-fix-gcc-12.patch | 66 +++++++++++++++++++ repos/dde_linux/ports/linux.hash | 2 +- repos/dde_linux/ports/linux.port | 3 +- 3 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 repos/dde_linux/patches/realloc-fix-gcc-12.patch diff --git a/repos/dde_linux/patches/realloc-fix-gcc-12.patch b/repos/dde_linux/patches/realloc-fix-gcc-12.patch new file mode 100644 index 0000000000..cd36028c23 --- /dev/null +++ b/repos/dde_linux/patches/realloc-fix-gcc-12.patch @@ -0,0 +1,66 @@ +From 52a9dab6d892763b2a8334a568bd4e2c1a6fde66 Mon Sep 17 00:00:00 2001 +From: Kees Cook +Date: Sun, 13 Feb 2022 10:24:43 -0800 +Subject: [PATCH] libsubcmd: Fix use-after-free for realloc(..., 0) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 12 correctly reports a potential use-after-free condition in the +xrealloc helper. Fix the warning by avoiding an implicit "free(ptr)" +when size == 0: + +In file included from help.c:12: +In function 'xrealloc', + inlined from 'add_cmdname' at help.c:24:2: subcmd-util.h:56:23: error: pointer may be used after 'realloc' [-Werror=use-after-free] + 56 | ret = realloc(ptr, size); + | ^~~~~~~~~~~~~~~~~~ +subcmd-util.h:52:21: note: call to 'realloc' here + 52 | void *ret = realloc(ptr, size); + | ^~~~~~~~~~~~~~~~~~ +subcmd-util.h:58:31: error: pointer may be used after 'realloc' [-Werror=use-after-free] + 58 | ret = realloc(ptr, 1); + | ^~~~~~~~~~~~~~~ +subcmd-util.h:52:21: note: call to 'realloc' here + 52 | void *ret = realloc(ptr, size); + | ^~~~~~~~~~~~~~~~~~ + +Fixes: 2f4ce5ec1d447beb ("perf tools: Finalize subcmd independence") +Reported-by: Valdis KlÄ“tnieks +Signed-off-by: Kees Kook +Tested-by: Valdis KlÄ“tnieks +Tested-by: Justin M. Forbes +Acked-by: Josh Poimboeuf +Cc: linux-hardening@vger.kernel.org +Cc: Valdis KlÄ“tnieks +Link: http://lore.kernel.org/lkml/20220213182443.4037039-1-keescook@chromium.org +Signed-off-by: Arnaldo Carvalho de Melo +--- + tools/lib/subcmd/subcmd-util.h | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/tools/lib/subcmd/subcmd-util.h b/tools/lib/subcmd/subcmd-util.h +index 794a375dad36..b2aec04fce8f 100644 +--- src/linux/tools/lib/subcmd/subcmd-util.h ++++ src/linux/tools/lib/subcmd/subcmd-util.h +@@ -50,15 +50,8 @@ static NORETURN inline void die(const char *err, ...) + static inline void *xrealloc(void *ptr, size_t size) + { + void *ret = realloc(ptr, size); +- if (!ret && !size) +- ret = realloc(ptr, 1); +- if (!ret) { +- ret = realloc(ptr, size); +- if (!ret && !size) +- ret = realloc(ptr, 1); +- if (!ret) +- die("Out of memory, realloc failed"); +- } ++ if (!ret) ++ die("Out of memory, realloc failed"); + return ret; + } + +-- +2.39.0 + diff --git a/repos/dde_linux/ports/linux.hash b/repos/dde_linux/ports/linux.hash index c514d17c2d..b9daa17cd4 100644 --- a/repos/dde_linux/ports/linux.hash +++ b/repos/dde_linux/ports/linux.hash @@ -1 +1 @@ -dccfc6e02b4f279be801444242ba5ee37e9b8082 +e6468ebf5e274f248bf6c8362fe6b59107ff7122 diff --git a/repos/dde_linux/ports/linux.port b/repos/dde_linux/ports/linux.port index 9815d7a7bb..cfa8253995 100644 --- a/repos/dde_linux/ports/linux.port +++ b/repos/dde_linux/ports/linux.port @@ -10,7 +10,8 @@ DIR(linux) := src/linux # Patches # PATCH_FILES := i915_irq.patch i915_alderlake.patch xhci_fix_event_37.patch \ - xhci_abort_ring.patch iwlwifi_enable_irq_before_pnvm.patch + xhci_abort_ring.patch iwlwifi_enable_irq_before_pnvm.patch \ + realloc-fix-gcc-12.patch PATCHES += $(addprefix patches/,$(PATCH_FILES)) # i915 From 76a99015c1b2cfd77edff69e9afb4df77c62be8f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 24 Jan 2023 11:40:20 +0100 Subject: [PATCH 0236/1921] Mention genodians.org in top-level README --- README | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README b/README index c68e549481..ccfac2e3db 100644 --- a/README +++ b/README @@ -37,7 +37,7 @@ Documentation ############# The primary documentation is the book "Genode Foundations", which is available -on the front page of Genode website: +on the front page of the Genode website: :Download the book "Genode Foundations": @@ -79,11 +79,6 @@ The source tree is composed of the following subdirectories: Source-code management tools and scripts. Please refer to the README file contained in the directory. -:'depot': - - Directory used by Genode's package-management tools. It contains the public - keys and download locations of software providers. - Additional hardware support ########################### @@ -108,6 +103,17 @@ system scenarios. [https://github.com/genodelabs/genode-world] +Community blog +############## + +Genodians.org presents ideas, announcements, experience stories, and tutorials +around Genode, informally written by Genode users and developers. + +:Genodians.org: + + [https://genodians.org] + + Contact ####### From 9f9bed7aa889f61ba165e3b479c22c86f4de8347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 2 Jan 2023 20:39:17 +0000 Subject: [PATCH 0237/1921] nvme_drv: move PRP list helper construction Since the 'Platform::Device' constructor will defer the creation until the content of the devices ROM is valid performing the PRP list helper creation afterwards should be done with valid IOMMU information. Issue #4715. --- repos/os/src/drivers/nvme/main.cc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/repos/os/src/drivers/nvme/main.cc b/repos/os/src/drivers/nvme/main.cc index 3b3d55ac98..a44349065c 100644 --- a/repos/os/src/drivers/nvme/main.cc +++ b/repos/os/src/drivers/nvme/main.cc @@ -1374,19 +1374,6 @@ class Nvme::Driver : Genode::Noncopyable } catch (...) { } } - /********* - ** DMA ** - *********/ - - Constructible _dma_buffer { }; - - /* - * The PRP (Physical Region Pages) page is used to setup - * large requests. - */ - Platform::Dma_buffer _prp_list_helper { _platform, Nvme::PRP_DS_SIZE, - UNCACHED }; - /************** ** Requests ** **************/ @@ -1463,6 +1450,19 @@ class Nvme::Driver : Genode::Noncopyable Signal_context_capability _irq_sigh; Nvme::Controller _nvme_ctrlr { _env, _platform, _delayer, _irq_sigh }; + /********* + ** DMA ** + *********/ + + Constructible _dma_buffer { }; + + /* + * The PRP (Physical Region Pages) page is used to setup + * large requests. + */ + Platform::Dma_buffer _prp_list_helper { _platform, Nvme::PRP_DS_SIZE, + UNCACHED }; + /*********** ** Block ** ***********/ From 00a6d1306c6092e91bcc53efd4f72c8a4f174223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 22 Dec 2022 13:59:59 +0000 Subject: [PATCH 0238/1921] nvme_drv: allow for accessing admin cmd results Up to now it was only checked if an issued admin command was processed in a timely fashion. Otherwise it has been treated as failed. However, the completion-queue entry was not examined and the caller was not able to access the entry itself. Depending on the command, checking the completion-queue entry might be necessary, e.g. GET/SET_FEATURE. Issue #4715. --- repos/os/src/drivers/nvme/main.cc | 70 +++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/repos/os/src/drivers/nvme/main.cc b/repos/os/src/drivers/nvme/main.cc index a44349065c..eeaf138dad 100644 --- a/repos/os/src/drivers/nvme/main.cc +++ b/repos/os/src/drivers/nvme/main.cc @@ -827,34 +827,68 @@ class Nvme::Controller : Platform::Device, } /** - * Wait until admin command has finished + * Wait until admin command has been finished + * + * In case the command was processed the 'fn' function is called + * and it is up to the caller to determine the result. Otherwise + * the 'to' function is called to denote the command was not + * processed in the given amount of time. + * + * This method should only be used in an synchronous fashion as + * batching admin commands could lead to out-of-order completions. + * + * \param num number of attempts + * \param cid command identifier + * \param fn function called when the command has been finished + * \param to function called when the command has not been finished + * within the given number of attempts + */ + template + void _wait_for_admin_cq(uint32_t num, uint16_t cid, + FN const &fn, + TO const &timeout) + { + for (uint32_t i = 0; i < num; i++) { + _delayer.usleep(100 * 1000); + + Cqe b(_admin_cq->next()); + + if (b.read() != cid) + continue; + + _admin_cq->advance_head(); + + /* do not spend too much time here */ + fn(b); + + write(_admin_cq->head); + return; + } + + timeout(); + } + + /** + * Wait until admin command has been finished + * + * A timed-out and an unsuccessful command are treated as the same. * * \param num number of attempts * \param cid command identifier * - * \return returns true if attempt to wait was successfull, otherwise + * \return returns true if the command was successfull, otherwise * false is returned */ bool _wait_for_admin_cq(uint32_t num, uint16_t cid) { bool success = false; - for (uint32_t i = 0; i < num; i++) { - _delayer.usleep(100 * 1000); - - Cqe b(_admin_cq->next()); - - if (b.read() != cid) { - continue; - } - - _admin_cq->advance_head(); - - success = true; - - write(_admin_cq->head); - break; - } + _wait_for_admin_cq(num, cid, + [&] (Cqe const &e) { + success = Cqe::succeeded(e); + }, + [&] () { /* already false */ } + ); return success; } From 25d0dc19d53694d891612953bd386826bb8a887a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Sun, 13 Nov 2022 20:11:16 +0000 Subject: [PATCH 0239/1921] nvme_drv: provide get/set feature command These admin commands are used to configure features of the NVMe device. Issue #4715. --- repos/os/src/drivers/nvme/main.cc | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/repos/os/src/drivers/nvme/main.cc b/repos/os/src/drivers/nvme/main.cc index eeaf138dad..ec2fc4817d 100644 --- a/repos/os/src/drivers/nvme/main.cc +++ b/repos/os/src/drivers/nvme/main.cc @@ -66,6 +66,8 @@ namespace Nvme { struct Sqe_create_cq; struct Sqe_create_sq; struct Sqe_identify; + struct Sqe_get_feature; + struct Sqe_set_feature; struct Sqe_io; struct Queue; @@ -133,6 +135,13 @@ namespace Nvme { WRITE_ZEROS = 0x08, }; + enum Feature_sel { + CURRENT = 0b000, + DEFAULT = 0b001, + SAVED = 0b010, + SUPPORTED = 0b011, + }; + struct Block_session_component; struct Driver; struct Main; @@ -332,6 +341,36 @@ struct Nvme::Sqe_identify : Nvme::Sqe }; +/* + * Get feature command + */ +struct Nvme::Sqe_get_feature : Nvme::Sqe +{ + struct Cdw10 : Register<0x28, 32> + { + struct Fid : Bitfield< 0, 8> { }; /* feature identifier */ + struct Sel : Bitfield< 8, 2> { }; /* select which value is returned */ + }; + + Sqe_get_feature(addr_t const base) : Sqe(base) { } +}; + + +/* + * Set feature command + */ +struct Nvme::Sqe_set_feature : Nvme::Sqe +{ + struct Cdw10 : Register<0x28, 32> + { + struct Fid : Bitfield< 0, 8> { }; /* feature identifier */ + struct Sv : Bitfield<31, 1> { }; /* save */ + }; + + Sqe_set_feature(addr_t const base) : Sqe(base) { } +}; + + /* * Create completion queue command */ From e826095e7148d4c541d9ff5c6c10d22f65610ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 6 Dec 2022 12:52:24 +0100 Subject: [PATCH 0240/1921] legacy/lx_emul/usb: handle saturated submit queue Check if we are able to submit the Usb packet before attempting to allocate it. In case the queue is already full we wait until another pending packet is freed. Fixes #4701. --- .../src/include/legacy/lx_emul/impl/usb.h | 98 ++++++++++++++----- 1 file changed, 75 insertions(+), 23 deletions(-) diff --git a/repos/dde_linux/src/include/legacy/lx_emul/impl/usb.h b/repos/dde_linux/src/include/legacy/lx_emul/impl/usb.h index 2789a9e29c..e8558c46d0 100644 --- a/repos/dde_linux/src/include/legacy/lx_emul/impl/usb.h +++ b/repos/dde_linux/src/include/legacy/lx_emul/impl/usb.h @@ -14,12 +14,35 @@ /* Linux kit includes */ #include +static DECLARE_WAIT_QUEUE_HEAD(lx_emul_urb_wait); + +static int wait_for_free_urb(unsigned int timeout_jiffies) +{ + int ret = 0; + + DECLARE_WAITQUEUE(wait, current); + add_wait_queue(&lx_emul_urb_wait, &wait); + + ret = schedule_timeout(timeout_jiffies); + + remove_wait_queue(&lx_emul_urb_wait, &wait); + + return ret; +} + + int usb_control_msg(struct usb_device *dev, unsigned int pipe, __u8 request, __u8 requesttype, __u16 value, __u16 index, void *data, __u16 size, int timeout) { - usb_ctrlrequest *dr = (usb_ctrlrequest*) - kmalloc(sizeof(usb_ctrlrequest), GFP_KERNEL); + Usb::Connection *usb; + Sync_ctrl_urb *scu; + urb *u; + usb_ctrlrequest *dr; + unsigned int timeout_jiffies; + int ret; + + dr = (usb_ctrlrequest*)kmalloc(sizeof(usb_ctrlrequest), GFP_KERNEL); if (!dr) return -ENOMEM; dr->bRequestType = requesttype; @@ -28,41 +51,59 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, dr->wIndex = cpu_to_le16(index); dr->wLength = cpu_to_le16(size); - urb * u = (urb*) usb_alloc_urb(0, GFP_KERNEL); + u = (urb*) usb_alloc_urb(0, GFP_KERNEL); if (!u) { - kfree(dr); - return -ENOMEM; + ret = -ENOMEM; + goto err_urb; } - Sync_ctrl_urb * scu = (Sync_ctrl_urb *)kzalloc(sizeof(Sync_ctrl_urb), GFP_KERNEL); + scu = (Sync_ctrl_urb *)kzalloc(sizeof(Sync_ctrl_urb), GFP_KERNEL); if (!scu) { - usb_free_urb(u); - kfree(dr); - return -ENOMEM; + ret = -ENOMEM; + goto err_scu; } usb_fill_control_urb(u, dev, pipe, (unsigned char *)dr, data, size, nullptr, nullptr); if (!dev->bus || !dev->bus->controller) { - kfree(scu); - usb_free_urb(u); - kfree(dr); - return -ENODEV; + ret = -ENODEV; + goto err_fill; } - Genode::construct_at(scu, *(Usb::Connection*)(dev->bus->controller), *u); + /* + * If this function is called with a timeout of 0 to wait forever, + * we wait in pieces of 10s each as 'schedule_timeout' might trigger + * immediately otherwise. The intend to wait forever is reflected + * back nonetheless when sending the urb. + */ + timeout_jiffies = timeout ? msecs_to_jiffies(timeout) + : msecs_to_jiffies(10000u); - scu->send(timeout); + usb = (Usb::Connection*)(dev->bus->controller); + for (;;) { + if (usb->source()->ready_to_submit(1)) + try { + Genode::construct_at(scu, *usb, *u); + break; + } catch (...) { } + + timeout_jiffies = wait_for_free_urb(timeout_jiffies); + if (!timeout_jiffies && timeout) { + ret = -ETIMEDOUT; + goto err_fill; + } + } + + scu->send(timeout ? jiffies_to_msecs(timeout_jiffies) : 0); + + ret = u->status >= 0 ? u->actual_length : u->status; + +err_fill: kfree(scu); - - int ret; - if (u->status >= 0) - ret = u->actual_length; - else - ret = u->status; - +err_scu: usb_free_urb(u); +err_urb: kfree(dr); return ret; } @@ -90,7 +131,16 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags) if (!u) return 1; - Genode::construct_at(u, *(Usb::Connection*)(urb->dev->bus->controller), *urb); + Usb::Connection &usb = *(Usb::Connection*)(urb->dev->bus->controller); + for (;;) { + if (usb.source()->ready_to_submit(1)) + try { + Genode::construct_at(u, usb, *urb); + break; + } catch (...) { } + + (void)wait_for_free_urb(msecs_to_jiffies(10000u)); + } /* * Self-destruction of the 'Urb' object in its completion function @@ -129,4 +179,6 @@ void usb_free_urb(struct urb *urb) } kfree(urb); + + wake_up(&lx_emul_urb_wait); } From 578a8c991824de499bb8810b05361b69256322d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Wed, 4 Jan 2023 12:03:27 +0000 Subject: [PATCH 0241/1921] wifi/pc: add rtlwifi driver Due to lacking hardware access the driver was test with one RTL8188EE based device, namely [10ec:8179] (rev 01), only. As the access to the PCI config space is restricted the driver loads the non power-saving FW and the driver port is therefor only tested with that. The accesses are documented should we choose to support them one way or another later on. The 'wifi.run' run script as well as Sculpt served as testing ground where the driver worked fine so far. Fixes #4714. --- repos/dde_linux/ports/linux-firmware.hash | 2 +- repos/dde_linux/ports/linux-firmware.port | 4 +- .../recipes/raw/wifi_firmware/content.mk | 1 + repos/pc/lib/mk/wifi.inc | 2 + repos/pc/lib/mk/wifi_firmware.mk | 4 + repos/pc/run/wifi.run | 2 + repos/pc/src/include/lx_emul/initcall_order.h | 2 + repos/pc/src/lib/wifi/dep.list | 31 +++++++ repos/pc/src/lib/wifi/dummies.c | 14 +++ repos/pc/src/lib/wifi/firmware.cc | 5 ++ repos/pc/src/lib/wifi/lx_emul.c | 87 ++++++++++++++++++- repos/pc/src/lib/wifi/spec/x86_32/source.list | 20 +++++ repos/pc/src/lib/wifi/spec/x86_64/source.list | 20 +++++ repos/pc/src/pc_linux/target.inc | 3 + 14 files changed, 192 insertions(+), 5 deletions(-) diff --git a/repos/dde_linux/ports/linux-firmware.hash b/repos/dde_linux/ports/linux-firmware.hash index 946b3f2507..5f5646e621 100644 --- a/repos/dde_linux/ports/linux-firmware.hash +++ b/repos/dde_linux/ports/linux-firmware.hash @@ -1 +1 @@ -e9fdf82a31f0106cd2604a644685e7c080a12d09 +1e536cdd935a3c4fe906d49533a4762ffffdc6ee diff --git a/repos/dde_linux/ports/linux-firmware.port b/repos/dde_linux/ports/linux-firmware.port index 981d16a09f..5a56c426dd 100644 --- a/repos/dde_linux/ports/linux-firmware.port +++ b/repos/dde_linux/ports/linux-firmware.port @@ -2,7 +2,7 @@ LICENSE := mixed VERSION := 1 DOWNLOADS := fw.archive -FW_REV := cbd51e5ee647ec834c30a3987225cae2341753b0 +FW_REV := 416c8baf3066e4fbf5c6bf610c37a1f50ffb77b9 URL(fw) := https://github.com/cnuke/dde_linux_firmware/archive/$(FW_REV).tar.gz -SHA(fw) := 486e3e4cc3022acca2b134c11feb8d3bbc4bd07a588a7c56e6fc07174bf3d573 +SHA(fw) := 60ed44d326b0f8a007b41ec46a24f8a9a3d807c40b75e3ba9757995f78ae9bcc DIR(fw) := firmware diff --git a/repos/dde_linux/recipes/raw/wifi_firmware/content.mk b/repos/dde_linux/recipes/raw/wifi_firmware/content.mk index e401f3c944..c7a47dc800 100644 --- a/repos/dde_linux/recipes/raw/wifi_firmware/content.mk +++ b/repos/dde_linux/recipes/raw/wifi_firmware/content.mk @@ -5,6 +5,7 @@ content: ucode_files LICENSE.wifi_drv .PHONY: ucode_files ucode_files: + cp $(PORT_DIR)/firmware/*.bin . cp $(PORT_DIR)/firmware/*.ucode . cp $(PORT_DIR)/firmware/*.pnvm . cp $(PORT_DIR)/firmware/regulatory.db . diff --git a/repos/pc/lib/mk/wifi.inc b/repos/pc/lib/mk/wifi.inc index 54583be571..88052e0cfb 100644 --- a/repos/pc/lib/mk/wifi.inc +++ b/repos/pc/lib/mk/wifi.inc @@ -27,6 +27,8 @@ SRC_C += $(notdir $(wildcard $(TARGET_LIB_DIR)/generated_dummies.c)) SRC_C += lx_emul/common_dummies.c CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/intel/iwlwifi +CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/realtek/rtlwifi +CC_C_OPT += -I$(LX_SRC_DIR)/drivers/net/wireless/realtek/rtlwifi/rtl8188ee CC_C_OPT += -I$(LX_SRC_DIR)/include/linux CC_C_OPT += -Wno-address-of-packed-member diff --git a/repos/pc/lib/mk/wifi_firmware.mk b/repos/pc/lib/mk/wifi_firmware.mk index bad533c218..9ce61d4c44 100644 --- a/repos/pc/lib/mk/wifi_firmware.mk +++ b/repos/pc/lib/mk/wifi_firmware.mk @@ -6,6 +6,7 @@ FW_CONTRIB_DIR := $(call select_from_ports,linux-firmware) IMAGES := $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.ucode)) IMAGES += $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.pnvm)) +IMAGES += $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.bin)) IMAGES += $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.db)) IMAGES += $(notdir $(wildcard $(FW_CONTRIB_DIR)/firmware/*.p7s)) BIN_DIR := $(BUILD_BASE_DIR)/bin @@ -13,6 +14,9 @@ FW_DIR := $(FW_CONTRIB_DIR)/firmware CUSTOM_TARGET_DEPS += $(addprefix $(BIN_DIR)/,$(IMAGES)) +$(BIN_DIR)/%.bin: $(FW_DIR)/%.bin + $(VERBOSE)cp $^ $@ + $(BIN_DIR)/%.ucode: $(FW_DIR)/%.ucode $(VERBOSE)cp $^ $@ diff --git a/repos/pc/run/wifi.run b/repos/pc/run/wifi.run index 5b4bd460a1..9088198ee9 100644 --- a/repos/pc/run/wifi.run +++ b/repos/pc/run/wifi.run @@ -314,6 +314,8 @@ set firmware_modules { iwlwifi-9000-pu-b0-jf-b0-34.ucode iwlwifi-9000-pu-b0-jf-b0-46.ucode iwlwifi-QuZ-a0-hr-b0-63.ucode + rtl8192eu_nic.bin + rtl8188efw.bin regulatory.db regulatory.db.p7s } diff --git a/repos/pc/src/include/lx_emul/initcall_order.h b/repos/pc/src/include/lx_emul/initcall_order.h index eff6274450..8d13a2509b 100644 --- a/repos/pc/src/include/lx_emul/initcall_order.h +++ b/repos/pc/src/include/lx_emul/initcall_order.h @@ -205,6 +205,8 @@ static const char * lx_emul_initcall_order[] = { "__initcall_iwl_drv_init6", "__initcall_iwl_init6", "__initcall_iwl_mvm_init6", + "__initcall_rtl_core_module_init6", + "__initcall_rtl88ee_driver_init6", "__initcall_asix_driver_init6", "__initcall_ax88179_178a_driver_init6", "__initcall_cdc_driver_init6", diff --git a/repos/pc/src/lib/wifi/dep.list b/repos/pc/src/lib/wifi/dep.list index 75ff76de22..7a934a2eac 100644 --- a/repos/pc/src/lib/wifi/dep.list +++ b/repos/pc/src/lib/wifi/dep.list @@ -88,6 +88,37 @@ drivers/net/wireless/intel/iwlwifi/mvm/testmode.h drivers/net/wireless/intel/iwlwifi/mvm/time-event.h drivers/net/wireless/intel/iwlwifi/pcie/internal.h drivers/net/wireless/intel/iwlwifi/queue/tx.h +drivers/net/wireless/realtek/rtlwifi/base.h +drivers/net/wireless/realtek/rtlwifi/btcoexist/halbt_precomp.h +drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.h +drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.h +drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.h +drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.h +drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.h +drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.h +drivers/net/wireless/realtek/rtlwifi/btcoexist/rtl_btc.h +drivers/net/wireless/realtek/rtlwifi/cam.h +drivers/net/wireless/realtek/rtlwifi/core.h +drivers/net/wireless/realtek/rtlwifi/debug.h +drivers/net/wireless/realtek/rtlwifi/efuse.h +drivers/net/wireless/realtek/rtlwifi/pci.h +drivers/net/wireless/realtek/rtlwifi/ps.h +drivers/net/wireless/realtek/rtlwifi/pwrseqcmd.h +drivers/net/wireless/realtek/rtlwifi/rc.h +drivers/net/wireless/realtek/rtlwifi/regd.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/def.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/pwrseq.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/reg.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rf.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/table.h +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.h +drivers/net/wireless/realtek/rtlwifi/stats.h +drivers/net/wireless/realtek/rtlwifi/wifi.h include/crypto/acompress.h include/crypto/aead.h include/crypto/aes.h diff --git a/repos/pc/src/lib/wifi/dummies.c b/repos/pc/src/lib/wifi/dummies.c index 5edfb9da31..005fd51c38 100644 --- a/repos/pc/src/lib/wifi/dummies.c +++ b/repos/pc/src/lib/wifi/dummies.c @@ -341,6 +341,8 @@ void synchronize_rcu_expedited(void) } +#include + int pci_enable_msi(struct pci_dev *dev) { lx_emul_trace(__func__); @@ -348,9 +350,21 @@ int pci_enable_msi(struct pci_dev *dev) } +void pci_disable_msi(struct pci_dev *dev) +{ + lx_emul_trace(__func__); +} + + int pci_enable_msix_range(struct pci_dev *dev, struct msix_entry *entries, int minvec, int maxvec) { lx_emul_trace(__func__); return -ENOSYS; } + + +void pci_disable_device(struct pci_dev * dev) +{ + lx_emul_trace(__func__); +} diff --git a/repos/pc/src/lib/wifi/firmware.cc b/repos/pc/src/lib/wifi/firmware.cc index 195cdc56e7..a386257dd0 100644 --- a/repos/pc/src/lib/wifi/firmware.cc +++ b/repos/pc/src/lib/wifi/firmware.cc @@ -48,6 +48,11 @@ Firmware_list fw_list[] = { { "iwlwifi-so-a0-hr-b0-64.ucode", 1427384, nullptr }, { "iwlwifi-so-a0-gf-a0-64.ucode", 1515812, nullptr }, { "iwlwifi-so-a0-gf-a0.pnvm", 41808, nullptr }, + + { "rtl8192eu_nic.bin", 31818, nullptr }, + { "rtlwifi/rtl8192eefw.bin", 31818, "rtl8192eu_nic.bin" }, + { "rtl8188efw.bin", 11216, nullptr }, + { "rtlwifi/rtl8188efw.bin", 11216, "rtl8188efw.bin" }, /* FW Power Save off */ }; diff --git a/repos/pc/src/lib/wifi/lx_emul.c b/repos/pc/src/lib/wifi/lx_emul.c index ae803ea61e..297dec8862 100644 --- a/repos/pc/src/lib/wifi/lx_emul.c +++ b/repos/pc/src/lib/wifi/lx_emul.c @@ -594,8 +594,28 @@ int pci_write_config_byte(const struct pci_dev * dev,int where,u8 val) */ case PCI_CFG_RETRY_TIMEOUT: return 0; + + /* + * rtlwifi: "leave D3 mode" + */ + case 0x44: + case PCI_COMMAND: + return 0; + /* + * rtlwifi: needed for enabling DMA 64bit support + */ + case 0x719: + return 0; + /* + * rtlwifi: below are registers related to ASPM and PCI link + * control that we do not handle (yet). + */ + case 0x81: + case 0x98: + return 0; }; - lx_emul_trace_and_stop(__func__); + + return -1; } @@ -605,6 +625,69 @@ int pci_read_config_word(const struct pci_dev * dev,int where,u16 * val) case PCI_COMMAND: *val = PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY | PCI_COMMAND_IO; return 0; + /* + * rtlwifi: read but ignored + */ + case PCI_INTERRUPT_LINE: + *val = 0; + return 0; }; - lx_emul_trace_and_stop(__func__); + + return -1; +} + + +int pci_read_config_byte(const struct pci_dev * dev,int where,u8 * val) +{ + switch (where) { + /* + * rtlwifi: apparently needed for device distinction + */ + case PCI_REVISION_ID: + *val = dev->revision; + return 0; + /* + * rtlwifi: needed for enabling DMA 64bit support + */ + case 0x719: + *val = 0; + return 0; + /* + * rtlwifi: below are registers related to ASPM and PCI link + * control that we do not handle (yet). + */ + case 0x80: + case 0x81: + case 0x98: + *val = 0; + return 0; + } + + return -1; +} + + +void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) +{ + struct resource *r; + unsigned long phys_addr; + unsigned long size; + + if (!dev || bar > 5) { + printk("%s:%d: invalid request for dev: %p bar: %d\n", + __func__, __LINE__, dev, bar); + return NULL; + } + + printk("pci_iomap: request for dev: %s bar: %d\n", dev_name(&dev->dev), bar); + + r = &dev->resource[bar]; + + phys_addr = r->start; + size = r->end - r->start; + + if (!phys_addr || !size) + return NULL; + + return lx_emul_io_mem_map(phys_addr, size); } diff --git a/repos/pc/src/lib/wifi/spec/x86_32/source.list b/repos/pc/src/lib/wifi/spec/x86_32/source.list index 35f22c35b1..08e2f59251 100644 --- a/repos/pc/src/lib/wifi/spec/x86_32/source.list +++ b/repos/pc/src/lib/wifi/spec/x86_32/source.list @@ -116,6 +116,26 @@ drivers/net/wireless/intel/iwlwifi/pcie/trans.c drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c drivers/net/wireless/intel/iwlwifi/pcie/tx.c drivers/net/wireless/intel/iwlwifi/queue/tx.c +drivers/net/wireless/realtek/rtlwifi/base.c +drivers/net/wireless/realtek/rtlwifi/cam.c +drivers/net/wireless/realtek/rtlwifi/core.c +drivers/net/wireless/realtek/rtlwifi/debug.c +drivers/net/wireless/realtek/rtlwifi/efuse.c +drivers/net/wireless/realtek/rtlwifi/pci.c +drivers/net/wireless/realtek/rtlwifi/ps.c +drivers/net/wireless/realtek/rtlwifi/rc.c +drivers/net/wireless/realtek/rtlwifi/regd.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/pwrseq.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rf.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/table.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c +drivers/net/wireless/realtek/rtlwifi/stats.c drivers/pci/pci-driver.c fs/nls/nls_base.c kernel/irq/chip.c diff --git a/repos/pc/src/lib/wifi/spec/x86_64/source.list b/repos/pc/src/lib/wifi/spec/x86_64/source.list index 40f2646615..e2b8a215f3 100644 --- a/repos/pc/src/lib/wifi/spec/x86_64/source.list +++ b/repos/pc/src/lib/wifi/spec/x86_64/source.list @@ -116,6 +116,26 @@ drivers/net/wireless/intel/iwlwifi/pcie/trans.c drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c drivers/net/wireless/intel/iwlwifi/pcie/tx.c drivers/net/wireless/intel/iwlwifi/queue/tx.c +drivers/net/wireless/realtek/rtlwifi/base.c +drivers/net/wireless/realtek/rtlwifi/cam.c +drivers/net/wireless/realtek/rtlwifi/core.c +drivers/net/wireless/realtek/rtlwifi/debug.c +drivers/net/wireless/realtek/rtlwifi/efuse.c +drivers/net/wireless/realtek/rtlwifi/pci.c +drivers/net/wireless/realtek/rtlwifi/ps.c +drivers/net/wireless/realtek/rtlwifi/rc.c +drivers/net/wireless/realtek/rtlwifi/regd.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/led.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/phy.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/pwrseq.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rf.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/table.c +drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c +drivers/net/wireless/realtek/rtlwifi/stats.c drivers/pci/pci-driver.c fs/nls/nls_base.c kernel/irq/chip.c diff --git a/repos/pc/src/pc_linux/target.inc b/repos/pc/src/pc_linux/target.inc index f282ab6646..ebcaae8d24 100644 --- a/repos/pc/src/pc_linux/target.inc +++ b/repos/pc/src/pc_linux/target.inc @@ -31,6 +31,9 @@ LX_ENABLE += RFKILL # iwlwifi LX_ENABLE += WLAN_VENDOR_INTEL IWLWIFI IWLDVM IWLMVM +# rtlwifi +LX_ENABLE += WLAN_VENDOR_REALTEK RTL_CARDS RTL8188EE + # USB host-controller support LX_ENABLE += USB_SUPPORT USB USB_ARCH_HAS_HCD USB_XHCI_HCD USB_EHCI_HCD USB_OHCI_HCD LX_ENABLE += USB_PCI USB_UHCI_HCD USB_USBNET From 777b093cad9b5fffc8190d254fb8f47fe85290c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Wed, 4 Jan 2023 12:03:55 +0000 Subject: [PATCH 0242/1921] sculpt_manager: add RTL8188EE FW routes Issue #4714. --- repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc b/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc index 073fdf502e..4bfe49caaa 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/wifi_drv.cc @@ -90,6 +90,8 @@ void Sculpt::gen_wifi_drv_start_content(Xml_generator &xml) gen_parent_rom_route(xml, "iwlwifi-so-a0-hr-b0-64.ucode"); gen_parent_rom_route(xml, "iwlwifi-so-a0-gf-a0-64.ucode"); gen_parent_rom_route(xml, "iwlwifi-so-a0-gf-a0.pnvm"); + gen_parent_rom_route(xml, "rtl8192eu_nic.bin"); + gen_parent_rom_route(xml, "rtl8188efw.bin"); gen_parent_rom_route(xml, "regulatory.db"); gen_parent_rom_route(xml, "regulatory.db.p7s"); gen_parent_route (xml); From 4d0cb175da7d7edf48a61925c149da30c40d2601 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Wed, 11 Jan 2023 15:25:25 +0100 Subject: [PATCH 0243/1921] base-hw: use global timer on Cortex A9 genodelabs/genode#4360 --- .../base-hw/lib/mk/spec/cortex_a9/core-hw.inc | 2 +- .../src/core/board/imx6q_sabrelite/board.h | 6 +- .../base-hw/src/core/board/nit6_solox/board.h | 6 +- repos/base-hw/src/core/board/pbxa9/board.h | 2 +- .../base-hw/src/core/board/wand_quad/board.h | 6 +- .../core/spec/arm/cortex_a9_global_timer.cc | 113 +++++++++++++++++ .../core/spec/arm/cortex_a9_global_timer.h | 66 ++++++++++ .../core/spec/arm/cortex_a9_private_timer.cc | 115 ------------------ .../core/spec/arm/cortex_a9_private_timer.h | 60 --------- .../src/include/hw/spec/arm/cortex_a9.h | 6 +- repos/base/include/drivers/defs/pbxa9.h | 4 +- 11 files changed, 195 insertions(+), 191 deletions(-) create mode 100644 repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc create mode 100644 repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h delete mode 100644 repos/base-hw/src/core/spec/arm/cortex_a9_private_timer.cc delete mode 100644 repos/base-hw/src/core/spec/arm/cortex_a9_private_timer.h diff --git a/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc b/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc index f37baa43cf..44d451997d 100644 --- a/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc @@ -7,7 +7,7 @@ # add C++ sources SRC_CC += spec/cortex_a9/board.cc SRC_CC += spec/cortex_a9/cpu.cc -SRC_CC += spec/arm/cortex_a9_private_timer.cc +SRC_CC += spec/arm/cortex_a9_global_timer.cc SRC_CC += spec/arm/gicv2.cc SRC_CC += spec/arm/kernel/lock.cc SRC_CC += kernel/vm_thread_off.cc diff --git a/repos/base-hw/src/core/board/imx6q_sabrelite/board.h b/repos/base-hw/src/core/board/imx6q_sabrelite/board.h index 3e36070a8f..c9128b9346 100644 --- a/repos/base-hw/src/core/board/imx6q_sabrelite/board.h +++ b/repos/base-hw/src/core/board/imx6q_sabrelite/board.h @@ -19,7 +19,7 @@ #include /* base-hw Core includes */ -#include +#include #include namespace Board { @@ -34,8 +34,8 @@ namespace Board { L2_cache & l2_cache(); enum { - CORTEX_A9_PRIVATE_TIMER_CLK = 396000000, /* timer clk runs half the CPU freq */ - CORTEX_A9_PRIVATE_TIMER_DIV = 100, + CORTEX_A9_GLOBAL_TIMER_CLK = 396000000, /* timer clk runs half the CPU freq */ + CORTEX_A9_GLOBAL_TIMER_DIV = 100, }; } diff --git a/repos/base-hw/src/core/board/nit6_solox/board.h b/repos/base-hw/src/core/board/nit6_solox/board.h index f2cff365e8..7ccefd9544 100644 --- a/repos/base-hw/src/core/board/nit6_solox/board.h +++ b/repos/base-hw/src/core/board/nit6_solox/board.h @@ -19,7 +19,7 @@ #include /* base-hw Core includes */ -#include +#include #include namespace Board { @@ -34,8 +34,8 @@ namespace Board { L2_cache & l2_cache(); enum { - CORTEX_A9_PRIVATE_TIMER_CLK = 500000000, /* timer clk runs half the CPU freq */ - CORTEX_A9_PRIVATE_TIMER_DIV = 100, + CORTEX_A9_GLOBAL_TIMER_CLK = 500000000, /* timer clk runs half the CPU freq */ + CORTEX_A9_GLOBAL_TIMER_DIV = 100, }; } diff --git a/repos/base-hw/src/core/board/pbxa9/board.h b/repos/base-hw/src/core/board/pbxa9/board.h index c49d19725e..3b3d914eb1 100644 --- a/repos/base-hw/src/core/board/pbxa9/board.h +++ b/repos/base-hw/src/core/board/pbxa9/board.h @@ -19,7 +19,7 @@ #include /* base-hw Core includes */ -#include +#include #include namespace Board { diff --git a/repos/base-hw/src/core/board/wand_quad/board.h b/repos/base-hw/src/core/board/wand_quad/board.h index 8802e63e08..1689d76fdb 100644 --- a/repos/base-hw/src/core/board/wand_quad/board.h +++ b/repos/base-hw/src/core/board/wand_quad/board.h @@ -20,7 +20,7 @@ #include /* base-hw Core includes */ -#include +#include #include namespace Board { @@ -35,8 +35,8 @@ namespace Board { L2_cache & l2_cache(); enum { - CORTEX_A9_PRIVATE_TIMER_CLK = 500000000, /* timer clk runs half the CPU freq */ - CORTEX_A9_PRIVATE_TIMER_DIV = 100, + CORTEX_A9_GLOBAL_TIMER_CLK = 500000000, /* timer clk runs half the CPU freq */ + CORTEX_A9_GLOBAL_TIMER_DIV = 100, }; } diff --git a/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc new file mode 100644 index 0000000000..909a78bd60 --- /dev/null +++ b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc @@ -0,0 +1,113 @@ +/* + * \brief Global timer implementation specific to Cortex A9 + * \author Johannes Schlatow + * \date 2023-01-11 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +/* Genode includes */ +#include + +/* core includes */ +#include +#include +#include + +using namespace Genode; +using namespace Kernel; + +using Device = Board::Timer; +using counter_t = Board::Timer::Counter::access_t; + + +enum { + TICS_PER_MS = + Board::CORTEX_A9_GLOBAL_TIMER_CLK / + Board::CORTEX_A9_GLOBAL_TIMER_DIV / 1000, +}; + + +Board::Timer::Timer(unsigned cpu_id) +: + Mmio(Platform::mmio_to_virt(Board::Cpu_mmio::GLOBAL_TIMER_MMIO_BASE)) +{ + enum { PRESCALER = Board::CORTEX_A9_GLOBAL_TIMER_DIV - 1 }; + + static_assert((TICS_PER_MS >= 1000), + "Bad TICS_PER_US value"); + + /* primary CPU sets initial timer value */ + if (cpu_id == 0) { + write(0); + write(0, 0); + write(0, 1); + } + + Control::access_t control = 0; + Control::Irq_enable::set(control, 1); + Control::Prescaler::set(control, PRESCALER); + Control::Timer_enable::set(control, 1); + write(control); +} + + +time_t Board::Timer::current_ticks() const +{ + uint32_t upper = read(1); + uint32_t lower = read(0); + uint32_t upper_new = read(1); + + while (upper != upper_new) { + upper = upper_new; + lower = read(0); + upper_new = read(1); + } + + return (time_t)upper << 32 | (time_t)lower; +} + + +void Timer::_start_one_shot(time_t const ticks) +{ + /* + * First unset the interrupt flag, + * otherwise if the tick is small enough, we loose an interrupt + */ + _device.write(1); + + /* Disable comparator before setting a new value */ + _device.write(0); + + time_t end_ticks = _device.current_ticks() + ticks; + _device.write(end_ticks & 0xFFFFFFFF, 0); + _device.write(end_ticks >> 32 , 1); + + /* Enable comparator before setting a new value */ + _device.write(1); +} + + +time_t Timer::ticks_to_us(time_t const ticks) const { + return timer_ticks_to_us(ticks, TICS_PER_MS); } + + +unsigned Timer::interrupt_id() const { + return Board::Cpu_mmio::GLOBAL_TIMER_IRQ; } + + +time_t Timer::us_to_ticks(time_t const us) const { + return (us / 1000) * TICS_PER_MS; } + + +time_t Timer::_duration() const { + return _device.current_ticks() - _time; } + + +time_t Timer::_max_value() const { + return TICS_PER_MS * 5000; } diff --git a/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h new file mode 100644 index 0000000000..d04d4dff4c --- /dev/null +++ b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h @@ -0,0 +1,66 @@ +/* + * \brief Global timer implementation specific to Cortex A9 + * \author Johannes Schlatow + * \date 2023-01-11 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _SRC__CORE__SPEC__ARM__CORTEX_A9_GLOBAL_TIMER_H_ +#define _SRC__CORE__SPEC__ARM__CORTEX_A9_GLOBAL_TIMER_H_ + +/* Genode includes */ +#include + +/* base-hw includes */ +#include + +namespace Board { class Timer; } + + +/** + * Timer driver for core + */ +struct Board::Timer : Genode::Mmio +{ + /** + * Counter value registers + */ + struct Counter : Register_array<0x0, 32, 2, 32> { }; + + /** + * Timer control register + */ + struct Control : Register<0x8, 32> + { + struct Timer_enable : Bitfield<0,1> { }; /* enable counting */ + struct Comp_enable : Bitfield<1,1> { }; + struct Irq_enable : Bitfield<2,1> { }; /* unmask interrupt */ + struct Auto_increment : Bitfield<3,1> { }; + struct Prescaler : Bitfield<8,8> { }; + }; + + /** + * Timer interrupt status register + */ + struct Interrupt_status : Register<0xc, 32> + { + struct Event : Bitfield<0,1> { }; /* if counter hit zero */ + }; + + /** + * Comparator registers + */ + struct Comparator : Register_array<0x10, 32, 2, 32> { }; + + Kernel::time_t current_ticks() const; + + Timer(unsigned); +}; + +#endif /* _SRC__CORE__SPEC__ARM__CORTEX_A9_GLOBAL_TIMER_H_ */ diff --git a/repos/base-hw/src/core/spec/arm/cortex_a9_private_timer.cc b/repos/base-hw/src/core/spec/arm/cortex_a9_private_timer.cc deleted file mode 100644 index d2bf7dc4b4..0000000000 --- a/repos/base-hw/src/core/spec/arm/cortex_a9_private_timer.cc +++ /dev/null @@ -1,115 +0,0 @@ -/* - * \brief Timer implementation specific to Cortex A9 - * \author Stefan Kalkowski - * \author Martin Stein - * \date 2016-01-07 - */ - -/* - * Copyright (C) 2016-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -/* Genode includes */ -#include - -/* core includes */ -#include -#include -#include - -using namespace Genode; -using namespace Kernel; - -using Device = Board::Timer; -using counter_t = Board::Timer::Counter::access_t; - - -enum { - TICS_PER_MS = - Board::CORTEX_A9_PRIVATE_TIMER_CLK / - Board::CORTEX_A9_PRIVATE_TIMER_DIV / 1000, - - MAX_COUNTER_VAL = ~(counter_t)0 -}; - - -Board::Timer::Timer(unsigned) -: - Mmio(Platform::mmio_to_virt(Board::Cpu_mmio::PRIVATE_TIMER_MMIO_BASE)) -{ - enum { PRESCALER = Board::CORTEX_A9_PRIVATE_TIMER_DIV - 1 }; - - static_assert((TICS_PER_MS >= 1000) /*&& - (TICS_PER_US * 1000000 * - Board::CORTEX_A9_PRIVATE_TIMER_DIV) == - Board::CORTEX_A9_PRIVATE_TIMER_CLK*/, - "Bad TICS_PER_US value"); - - write(0xffffffff); - Control::access_t control = 0; - Control::Irq_enable::set(control, 1); - Control::Prescaler::set(control, PRESCALER); - Control::Auto_reload::set(control, 1); - Control::Timer_enable::set(control, 1); - write(control); -} - - -void Timer::_start_one_shot(time_t const ticks) -{ - /* - * First unset the interrupt flag, - * otherwise if the tick is small enough, we loose an interrupt - */ - _device.write(1); - _device.write(ticks); -} - - -time_t Timer::ticks_to_us(time_t const ticks) const { - return timer_ticks_to_us(ticks, TICS_PER_MS); } - - -unsigned Timer::interrupt_id() const { - return Board::Cpu_mmio::PRIVATE_TIMER_IRQ; } - - -time_t Timer::us_to_ticks(time_t const us) const { - return (us / 1000) * TICS_PER_MS; } - - -time_t Timer::_duration() const -{ - counter_t const start_counter_val { (counter_t)_last_timeout_duration }; - counter_t const curr_counter_val { _device.read() }; - - /* - * Calculate result depending on whether the counter already wrapped or - * not. See the comment in the implementation of '_max_value' for an - * explanation why this comparison is done instead of checking the IRQ - * status and why it is sufficient. - */ - if (curr_counter_val > start_counter_val) - return start_counter_val + (MAX_COUNTER_VAL - curr_counter_val); - - return start_counter_val - curr_counter_val; -} - - -time_t Timer::_max_value() const -{ - /* - * We propagate a max timeout value far lower than the one required - * by the hardware. This is because on some platforms (Qemu 4.2.1 PBXA9), - * the IRQ status register is not reliable. Sometimes, it indicates an IRQ - * too early, i.e., shortly before the counter wraps. Therefore we have to - * accomplish wrap detection via counter comparison only. Therefore, we - * have to make sure that we always read out the counter before it hits - * the max timout value again. And, therefore, the max timeout value has - * to be far away from the first value the counter has after wrapping. - */ - return MAX_COUNTER_VAL >> 1; -} diff --git a/repos/base-hw/src/core/spec/arm/cortex_a9_private_timer.h b/repos/base-hw/src/core/spec/arm/cortex_a9_private_timer.h deleted file mode 100644 index 45ca3d4768..0000000000 --- a/repos/base-hw/src/core/spec/arm/cortex_a9_private_timer.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * \brief Private Timer implementation specific to Cortex A9 - * \author Martin stein - * \date 2011-12-13 - */ - -/* - * Copyright (C) 2011-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _SRC__CORE__SPEC__ARM__CORTEX_A9_PRIVATE_TIMER_H_ -#define _SRC__CORE__SPEC__ARM__CORTEX_A9_PRIVATE_TIMER_H_ - -/* Genode includes */ -#include - -namespace Board { class Timer; } - - -/** - * Timer driver for core - */ -struct Board::Timer : Genode::Mmio -{ - /** - * Load value register - */ - struct Load : Register<0x0, 32> { }; - - /** - * Counter value register - */ - struct Counter : Register<0x4, 32> { }; - - /** - * Timer control register - */ - struct Control : Register<0x8, 32> - { - struct Timer_enable : Bitfield<0,1> { }; /* enable counting */ - struct Auto_reload : Bitfield<1,1> { }; - struct Irq_enable : Bitfield<2,1> { }; /* unmask interrupt */ - struct Prescaler : Bitfield<8,8> { }; - }; - - /** - * Timer interrupt status register - */ - struct Interrupt_status : Register<0xc, 32> - { - struct Event : Bitfield<0,1> { }; /* if counter hit zero */ - }; - - Timer(unsigned); -}; - -#endif /* _SRC__CORE__SPEC__ARM__CORTEX_A9_PRIVATE_TIMER_H_ */ diff --git a/repos/base-hw/src/include/hw/spec/arm/cortex_a9.h b/repos/base-hw/src/include/hw/spec/arm/cortex_a9.h index dd2dbd3356..be9099f8c6 100644 --- a/repos/base-hw/src/include/hw/spec/arm/cortex_a9.h +++ b/repos/base-hw/src/include/hw/spec/arm/cortex_a9.h @@ -30,9 +30,9 @@ struct Hw::Cortex_a9_mmio IRQ_CONTROLLER_CPU_BASE = BASE + 0x100, IRQ_CONTROLLER_CPU_SIZE = 0x100, - PRIVATE_TIMER_MMIO_BASE = BASE + 0x600, - PRIVATE_TIMER_MMIO_SIZE = 0x10, - PRIVATE_TIMER_IRQ = 29, + GLOBAL_TIMER_MMIO_BASE = BASE + 0x200, + GLOBAL_TIMER_MMIO_SIZE = 0x18, + GLOBAL_TIMER_IRQ = 27, }; }; diff --git a/repos/base/include/drivers/defs/pbxa9.h b/repos/base/include/drivers/defs/pbxa9.h index 6b5dd30609..0ca1e146e6 100644 --- a/repos/base/include/drivers/defs/pbxa9.h +++ b/repos/base/include/drivers/defs/pbxa9.h @@ -43,8 +43,8 @@ namespace Pbxa9 { SYSTEM_CONTROL_MMIO_BASE = 0x10000000, /* CPU */ - CORTEX_A9_PRIVATE_TIMER_CLK = 100000000, - CORTEX_A9_PRIVATE_TIMER_DIV = 100, + CORTEX_A9_GLOBAL_TIMER_CLK = 100000000, + CORTEX_A9_GLOBAL_TIMER_DIV = 100, CORTEX_A9_PRIVATE_MEM_BASE = 0x1f000000, CORTEX_A9_PRIVATE_MEM_SIZE = 0x2000, From 297947bec7affe7de58984dfc03ce029141ded45 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 5 Jan 2023 13:57:10 +0100 Subject: [PATCH 0244/1921] Cleanup netty network tests Issue #4722 --- repos/libports/run/netty.inc | 148 +++++++++++++++++++++++--- repos/libports/run/netty_lwip.inc | 116 -------------------- repos/libports/run/netty_lwip_tcp.run | 70 ++---------- repos/libports/run/netty_lwip_udp.run | 46 +++----- repos/libports/run/netty_lxip_tcp.run | 72 ++----------- repos/libports/run/netty_lxip_udp.run | 48 +++------ 6 files changed, 179 insertions(+), 321 deletions(-) delete mode 100644 repos/libports/run/netty_lwip.inc diff --git a/repos/libports/run/netty.inc b/repos/libports/run/netty.inc index 0d0e26758f..96c8b795e0 100644 --- a/repos/libports/run/netty.inc +++ b/repos/libports/run/netty.inc @@ -1,4 +1,20 @@ -proc use_dynamic_rom { } { return true } +# Network echo test +# +# uses the following config hooks. +# +# proc ipstack { } name of IP stack (lwip or lxip) +# proc protocol { } test protocol (tcp or udp) +# proc use_dynamic_rom { } dynamically change IP-stack config at runtime + +set build_components { } + +if {[protocol] == "tcp"} { + append build_components { test/netty/tcp } +} else { + append build_components { test/netty/udp } +} + +build $build_components create_boot_directory import_from_depot [depot_user]/src/[base_src] \ @@ -8,11 +24,12 @@ import_from_depot [depot_user]/src/[base_src] \ [depot_user]/src/libc \ [depot_user]/src/nic_router \ [depot_user]/src/vfs_audit \ - [depot_user]/src/vfs_lxip \ + [depot_user]/src/vfs_[ipstack] \ [depot_user]/src/vfs append config { + @@ -23,10 +40,13 @@ append config { + + + @@ -49,8 +69,7 @@ append config { - - + @@ -72,8 +91,8 @@ append config { - + @@ -81,7 +100,6 @@ append config { - } @@ -95,7 +113,7 @@ append_if [use_dynamic_rom] config { - + <} [ipstack] { ip_addr="10.0.3.55" netmask="255.255.255.0" gateway="10.0.3.1" nameserver="8.8.8.8"/> @@ -105,7 +123,7 @@ append_if [use_dynamic_rom] config { - + <} [ipstack] { mtu="400" ip_addr="10.0.3.55" netmask="255.255.255.0" gateway="10.0.3.1" nameserver="8.8.8.8"/> @@ -114,23 +132,23 @@ append_if [use_dynamic_rom] config { - } + +} append config { - - } + } if {[use_dynamic_rom]} { append config { - } + } } else { append config { @@ -139,19 +157,115 @@ if {[use_dynamic_rom]} { append config { - - + + <} [ipstack] { dhcp="yes"/> + + + + - } + } } append config { + +} - } +if {[protocol] == "tcp"} { append config { + + + + + + + + + + + + + + + + + + + + + + + + +} +} else { append config { + + + + + + + + + + + + + + + + + + + + + + + + +} +} + +append config { + +} + +install_config $config +build_boot_image [build_artifacts] append qemu_args " -nographic " -append_qemu_nic_args +append_qemu_nic_args "host=10.0.2.1,dhcpstart=10.0.2.55,hostfwd=tcp::10080-:80,hostfwd=tcp::18080-:8080,hostfwd=udp::10007-:7,hostfwd=udp::17070-:7070" + +# this works only if board/*/qemu_args does not declare "-netdev user,..." +#append qemu_args " -netdev tap,id=net0,ifname=tap0,script=no " + +run_genode_until forever # vi: set ft=tcl : diff --git a/repos/libports/run/netty_lwip.inc b/repos/libports/run/netty_lwip.inc deleted file mode 100644 index 7468c92bb3..0000000000 --- a/repos/libports/run/netty_lwip.inc +++ /dev/null @@ -1,116 +0,0 @@ -create_boot_directory -import_from_depot [depot_user]/src/[base_src] \ - [depot_user]/pkg/[drivers_nic_pkg] \ - [depot_user]/src/init \ - [depot_user]/src/libc \ - [depot_user]/src/nic_router \ - [depot_user]/src/vfs_audit \ - [depot_user]/src/vfs_lwip \ - [depot_user]/src/vfs - -append config { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -append qemu_args " -nographic " -append_qemu_nic_args - -# vi: set ft=tcl : diff --git a/repos/libports/run/netty_lwip_tcp.run b/repos/libports/run/netty_lwip_tcp.run index c11bdf526d..b15cb7985d 100644 --- a/repos/libports/run/netty_lwip_tcp.run +++ b/repos/libports/run/netty_lwip_tcp.run @@ -1,64 +1,14 @@ -source ${genode_dir}/repos/libports/run/netty_lwip.inc +# Network echo test (lwIP, TCP) +# +# Example test command +# +# dd if=/dev/urandom bs=736 count=10 | xxd -plain | tr -d '\n' | nc 10.0.2.55 80 +# -build { test/netty/tcp } +proc ipstack { } { return lwip } +proc protocol { } { return tcp } +proc use_dynamic_rom { } { return false } -append config { - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -install_config $config -build_boot_image { test-netty_tcp } -run_genode_until forever +source ${genode_dir}/repos/libports/run/netty.inc # vi: set ft=tcl : diff --git a/repos/libports/run/netty_lwip_udp.run b/repos/libports/run/netty_lwip_udp.run index a6aed1841a..355e83f4ff 100644 --- a/repos/libports/run/netty_lwip_udp.run +++ b/repos/libports/run/netty_lwip_udp.run @@ -1,37 +1,17 @@ -source ${genode_dir}/repos/libports/run/netty_lwip.inc +# Network echo test (lwIP, UDP) +# +# Example test command +# +# for i in {1..10}; do +# dd if=/dev/urandom bs=736 count=1 | xxd -plain | tr -d '\n' +# sleep 0.1 +# done | nc -u 10.0.2.55 7 +# -build { test/netty/udp } +proc ipstack { } { return lwip } +proc protocol { } { return udp } +proc use_dynamic_rom { } { return false } -append config { - - - - - - - - - - - - - - - - - - - - - - - - - -} - -install_config $config -build_boot_image { test-netty_udp } -run_genode_until forever +source ${genode_dir}/repos/libports/run/netty.inc # vi: set ft=tcl : diff --git a/repos/libports/run/netty_lxip_tcp.run b/repos/libports/run/netty_lxip_tcp.run index 89401504aa..8447f9269b 100644 --- a/repos/libports/run/netty_lxip_tcp.run +++ b/repos/libports/run/netty_lxip_tcp.run @@ -1,64 +1,14 @@ +# Network echo test (lxip, TCP) +# +# Example test command +# +# dd if=/dev/urandom bs=736 count=10 | xxd -plain | tr -d '\n' | nc 10.0.2.55 80 +# + +proc ipstack { } { return lxip } +proc protocol { } { return tcp } +proc use_dynamic_rom { } { return false } + source ${genode_dir}/repos/libports/run/netty.inc -build { test/netty/tcp } - -append config { - - - - - - - - - - - - - - - - - - - - - - - - - - - -} - -install_config $config -build_boot_image { test-netty_tcp } -run_genode_until forever - # vi: set ft=tcl : diff --git a/repos/libports/run/netty_lxip_udp.run b/repos/libports/run/netty_lxip_udp.run index 249137e211..33253aa924 100644 --- a/repos/libports/run/netty_lxip_udp.run +++ b/repos/libports/run/netty_lxip_udp.run @@ -1,37 +1,17 @@ +# Network echo test (lxip, UDP) +# +# Example test command +# +# for i in {1..10}; do +# dd if=/dev/urandom bs=736 count=1 | xxd -plain | tr -d '\n' +# sleep 0.1 +# done | nc -u 10.0.2.55 7 +# + +proc ipstack { } { return lxip } +proc protocol { } { return udp } +proc use_dynamic_rom { } { return false } + source ${genode_dir}/repos/libports/run/netty.inc -build { test/netty/udp } - -append config { - - - - - - - - - - - - - - - - - - - - - - - - - -} - -install_config $config -build_boot_image { test-netty_udp } -run_genode_until forever - # vi: set ft=tcl : From 7858c0053937b1618e6bd40c09bd07040a358c0e Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 11 Jan 2023 09:36:08 +0100 Subject: [PATCH 0245/1921] test/tcp: ascending integer mode Add alternative (statically configurable) mode to fill the test data with ascending integers for increased debugability. Issue #4722 --- repos/libports/src/test/tcp/main.c | 57 +++++++++++++++++++-------- repos/libports/src/test/tcp/target.mk | 2 - 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/repos/libports/src/test/tcp/main.c b/repos/libports/src/test/tcp/main.c index 9e337e7c31..b765e4d657 100644 --- a/repos/libports/src/test/tcp/main.c +++ b/repos/libports/src/test/tcp/main.c @@ -31,6 +31,38 @@ enum { NUM_TEST_INTS = 1<<20, BULK_ITERATIONS = 2 }; static uint32_t data[NUM_TEST_INTS]; +/* fill data array with random numbers (1) or ascending integers (0) */ +static int use_random = 1; +static pcg32_random_t pcg32_rng = PCG32_INITIALIZER; + +static void prepare_data() +{ + for (size_t i = 0; i < NUM_TEST_INTS; ++i) + data[i] = use_random ? pcg32_random_r(&pcg32_rng) : i; +} + +static void check_data() +{ + int bad_offset = -1; + uint32_t expected = 0, actual = 0; + + for (size_t i = 0; i < NUM_TEST_INTS; ++i) { + expected = use_random ? pcg32_random_r(&pcg32_rng) : i; + + if (data[i] != expected) { + bad_offset = i << 2; + actual = data[i]; + break; + } + } + + if (bad_offset != -1) { + fprintf(stderr, "bad data at byte offset %#x expected=%#08x got=%#08x\n", bad_offset, expected, actual); + exit(-1); + } +} + + int test_send(char const *host) { usleep(1000000); @@ -54,15 +86,13 @@ int test_send(char const *host) } } - pcg32_random_t rng = PCG32_INITIALIZER; for (int j = 0; j < BULK_ITERATIONS; ++j) { - for (size_t i = 0; i < NUM_TEST_INTS; ++i) - data[i] = pcg32_random_r(&rng); + prepare_data(); - size_t total = sizeof(data); + size_t const total = sizeof(data); size_t offset = 0; - char *buf = (char *)data; + char const *buf = (char const *)data; while (offset < total) { ssize_t res = send(sock, buf+offset, total-offset, 0); if (res < 1) { @@ -100,9 +130,8 @@ int test_recv() } } - if (listen(sock, 1)) { + if (listen(sock, 1)) perror("listen broke"); - } for (;;) { char string[INET_ADDRSTRLEN]; @@ -116,14 +145,15 @@ int test_recv() } inet_ntop(AF_INET, &(addr.sin_addr), string, super_socket_safety); - fprintf(stderr, "recv from %s\n", string); + fprintf(stderr, "connection from %s\n", string); - pcg32_random_t rng = PCG32_INITIALIZER; for (int j = 0; j < BULK_ITERATIONS; ++j) { - size_t total = sizeof(data); + size_t const total = sizeof(data); size_t offset = 0; char *buf = (char *)data; + + memset(buf, total, 0x55); while (offset < total) { ssize_t res = recv(client, buf+offset, total-offset, 0); if (res < 1) { @@ -133,12 +163,7 @@ int test_recv() offset += res; } - for (size_t i = 0; i < NUM_TEST_INTS; ++i) { - if (data[i] != pcg32_random_r(&rng)) { - fprintf(stderr, "bad data at byte offset %ld\n", i<<2); - return ~0; - } - } + check_data(); } fprintf(stderr, "close client\n"); diff --git a/repos/libports/src/test/tcp/target.mk b/repos/libports/src/test/tcp/target.mk index 9d56b7e1d2..0c055a2017 100644 --- a/repos/libports/src/test/tcp/target.mk +++ b/repos/libports/src/test/tcp/target.mk @@ -1,5 +1,3 @@ TARGET = test-tcp LIBS += posix libc libpcg_random SRC_C += main.c - -CC_CXX_WARN_STRICT = From 84c5a7b0cdb263f5d1cf3abea47957dc53c7c6d0 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 26 Jan 2023 14:44:26 +0100 Subject: [PATCH 0246/1921] vfs_lwip: receive payload without breaking refcount lwip uses a sophisticated reference-counting scheme in chains of pbufs, which the former manual implementation of read() for TCP data broke. Using pbuf_free_header() keeps the chain intact and also relieves our implementation from the burden of "offset" maintenance. Fixes #4722 --- repos/libports/src/lib/vfs/lwip/nic_netif.h | 4 +- repos/libports/src/lib/vfs/lwip/vfs.cc | 43 ++++++++------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/repos/libports/src/lib/vfs/lwip/nic_netif.h b/repos/libports/src/lib/vfs/lwip/nic_netif.h index 229e784df9..a93771de53 100644 --- a/repos/libports/src/lib/vfs/lwip/nic_netif.h +++ b/repos/libports/src/lib/vfs/lwip/nic_netif.h @@ -401,8 +401,8 @@ class Lwip::Nic_netif * pbuf into the packet. */ char *dst = tx.packet_content(packet); - for(struct pbuf *q = p; q != 0; q = q->next) { - char const *src = (char*)q->payload; + for (struct pbuf *q = p; q != nullptr; q = q->next) { + char const *src = (char const *)q->payload; Genode::memcpy(dst, src, q->len); dst += q->len; } diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index b84bcf7e10..ce808a14e9 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -1113,7 +1113,6 @@ class Lwip::Tcp_socket_dir final : /* queue of received data */ pbuf *_recv_pbuf = nullptr; - u16_t _recv_off = 0; Open_result _accept_new_socket(Vfs::File_system &fs, Genode::Allocator &alloc, @@ -1195,13 +1194,17 @@ class Lwip::Tcp_socket_dir final : /** * chain a buffer to the queue */ - void recv(struct pbuf *buf) + err_t recv(struct pbuf *buf) { - if (_recv_pbuf && buf) { + if (!buf) + return ERR_ARG; + + if (_recv_pbuf) pbuf_cat(_recv_pbuf, buf); - } else { + else _recv_pbuf = buf; - } + + return ERR_OK; } /** @@ -1325,24 +1328,10 @@ class Lwip::Tcp_socket_dir final : : Read_result::READ_OK; } - u16_t const ucount = count; - u16_t const n = pbuf_copy_partial(_recv_pbuf, dst, ucount, _recv_off); - _recv_off += n; - { - u16_t new_off; - pbuf *new_head = pbuf_skip(_recv_pbuf, _recv_off, &new_off); - if (new_head != NULL && new_head != _recv_pbuf) { - /* increment the references on the new head */ - pbuf_ref(new_head); - /* free the buffers chained to the old head */ - pbuf_free(_recv_pbuf); - } + u16_t const ucount = min(count, (file_size)0xffff); + u16_t const n = pbuf_copy_partial(_recv_pbuf, dst, ucount, 0); - if (!new_head) - pbuf_free(_recv_pbuf); - _recv_pbuf = new_head; - _recv_off = new_off; - } + _recv_pbuf = pbuf_free_header(_recv_pbuf, n); /* ACK the remote */ if (_pcb) @@ -1358,8 +1347,8 @@ class Lwip::Tcp_socket_dir final : case Lwip_file_handle::PEEK: if (_recv_pbuf != nullptr) { - u16_t const ucount = count; - u16_t const n = pbuf_copy_partial(_recv_pbuf, dst, ucount, _recv_off); + u16_t const ucount = min(count, (file_size)0xffff); + u16_t const n = pbuf_copy_partial(_recv_pbuf, dst, ucount, 0); out_count = n; } return Read_result::READ_OK; @@ -1658,16 +1647,18 @@ err_t tcp_recv_callback(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t) return ERR_ABRT; } + err_t err = ERR_OK; + Lwip::Tcp_socket_dir *socket_dir = static_cast(arg); if (p == NULL) { socket_dir->shutdown(); } else { - socket_dir->recv(p); + err = socket_dir->recv(p); } socket_dir->wakeup_vfs_user(); socket_dir->process_read_ready(); - return ERR_OK; + return err; } From 93e26cae350c0c4602d90b353f2360bb494005cd Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 25 Jan 2023 14:02:16 +0100 Subject: [PATCH 0247/1921] grub2: add small default font Issue #4741 --- repos/base/ports/grub2.hash | 2 +- repos/base/ports/grub2.port | 3 ++- tool/run/boot_dir/nova | 22 +++++++--------------- tool/run/iso.inc | 1 + 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/repos/base/ports/grub2.hash b/repos/base/ports/grub2.hash index f61905c659..698fb7e4db 100644 --- a/repos/base/ports/grub2.hash +++ b/repos/base/ports/grub2.hash @@ -1 +1 @@ -aae6a9ce3485b9fe5c589817e4cfc80b199d8e11 +80d41dfe8a1d8d8a80c51f446553b7d28c3ce395 diff --git a/repos/base/ports/grub2.port b/repos/base/ports/grub2.port index 7b212d5fa1..bcf5e86675 100644 --- a/repos/base/ports/grub2.port +++ b/repos/base/ports/grub2.port @@ -3,9 +3,10 @@ VERSION := git DOWNLOADS := g2fg.git URL(g2fg) := https://github.com/alex-ab/g2fg.git -REV(g2fg) := 7fb21d87623a3e511ec755d9a4024e16728937be +REV(g2fg) := 0d94ee016a3a4f991f502d04ef59e7d0d8e75346 DIR(g2fg) := boot default: $(DOWNLOADS) $(VERBOSE)tar -C boot -xJf boot/grub2.tar.xz $(VERBOSE)unxz -kf boot/grub2-head.img.xz + $(VERBOSE)unxz -kf boot/font.pf2.xz diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 93707a099d..32d446e6f9 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -110,12 +110,9 @@ proc run_boot_dir {binaries} { if {[have_include "image/disk"]} { exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png - if {[file exists /boot/grub/unicode.pf2]} { - # needed in graphical menu with non-scrampled characters - # exec cp /boot/grub/unicode.pf2 [run_dir]/boot/grub/unicode.pf2 - } + exec cp [get_grub2_dir]/boot/font.pf2 [run_dir]/boot/font.pf2 } if {[have_include "image/iso"]} { @@ -123,19 +120,14 @@ proc run_boot_dir {binaries} { } if {[have_include image/uefi]} { - set grub2_path [get_grub2_dir] - exec mkdir -p [run_dir]/efi/boot - exec cp $grub2_path/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi - exec cp $grub2_path/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi + exec cp [get_grub2_dir]/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi + exec cp [get_grub2_dir]/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi exec mkdir -p [run_dir]/boot/grub exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png - if {[file exists /boot/grub/unicode.pf2]} { - # needed in graphical menu with non-scrampled characters - # exec cp /boot/grub/unicode.pf2 [run_dir]/boot/grub/unicode.pf2 - } + exec cp [get_grub2_dir]/boot/font.pf2 [run_dir]/boot/font.pf2 append options_bender " serial_fallback" } @@ -145,8 +137,8 @@ proc run_boot_dir {binaries} { # set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] - # If timeout != 0 is used and gfxterm, enable and add unicode.pf2 (see above) - # puts $fh "loadfont /boot/grub/unicode.pf2" + # If timeout != 0 is used a font is required in graphic mode + puts $fh "loadfont /boot/font.pf2" puts $fh "set timeout=0" # choose best graphic mode diff --git a/tool/run/iso.inc b/tool/run/iso.inc index 1bd59b47f7..fc61855507 100644 --- a/tool/run/iso.inc +++ b/tool/run/iso.inc @@ -20,4 +20,5 @@ proc install_iso_bootloader_to_run_dir { } { } exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + exec cp $grub2_path/boot/font.pf2 [run_dir]/boot/font.pf2 } From d2f27a34f71c3836ccc8b5ffd9991d7edd61fb97 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 26 Jan 2023 14:14:55 +0100 Subject: [PATCH 0248/1921] nova: avoid fault during thread migration triggert by cpu_balancer.run on Qemu Fixes #4742 --- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- repos/os/run/cpu_balancer.run | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index 69875ea18e..6e3b49b5f0 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -55bf35a51a039d4fe420fcc310c4271b615913eb +c7c2e9cf8d1bcd15608da93d5aa152d32aef1a33 diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index 81e04de82c..c7b80e4042 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := 953b8d36d909f87d8465e43ab35c22b636d04c87 +REV(nova) := 0cb9c8abfe9cb9d0992c8dbe048f55610fb54539 DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) diff --git a/repos/os/run/cpu_balancer.run b/repos/os/run/cpu_balancer.run index d96142b1e7..2e13f40d80 100644 --- a/repos/os/run/cpu_balancer.run +++ b/repos/os/run/cpu_balancer.run @@ -127,6 +127,7 @@ append config { + @@ -163,4 +164,4 @@ build_boot_image { core ld.lib.so init timer cpu_balancer cpu_burner top dynamic append qemu_args " -nographic" append qemu_args " -smp [expr $cpu_width * $cpu_height],cores=$cpu_width,threads=$cpu_height" -run_genode_until {.*thread xpos="1" ypos="0" name="signal handler" policy="max-utilize".*\n} 60 +run_genode_until {.*thread xpos="[1-9]" ypos="0" name="signal handler" policy="max-utilize".*\n} 60 From 0724db2d80f1a3b2b052f9152449e3f1e32d7be8 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 27 Jan 2023 10:10:03 +0100 Subject: [PATCH 0249/1921] sel4: avoid out_of* in several run scripts caused by platform_drv and report_rom --- repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config | 4 ++-- repos/pc/run/intel_fb.run | 6 +++--- repos/ports/run/netperf.inc | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config b/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config index a99f43514f..19d8ea36c6 100644 --- a/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config +++ b/repos/pc/recipes/raw/test_usb_host_drv-pc/drivers.config @@ -15,7 +15,7 @@ - + @@ -63,7 +63,7 @@ - + diff --git a/repos/pc/run/intel_fb.run b/repos/pc/run/intel_fb.run index 0f372fd129..dd08569901 100644 --- a/repos/pc/run/intel_fb.run +++ b/repos/pc/run/intel_fb.run @@ -66,8 +66,8 @@ append config { - - + + @@ -115,7 +115,7 @@ append config { - + diff --git a/repos/ports/run/netperf.inc b/repos/ports/run/netperf.inc index d715cba382..71bc085dd3 100644 --- a/repos/ports/run/netperf.inc +++ b/repos/ports/run/netperf.inc @@ -195,8 +195,8 @@ set config { if { $use_wifi_driver } { append config { - - + + @@ -220,7 +220,7 @@ if { $use_wifi_driver } { - + From 9dbaa150d60f8d6a200c6cd4c545146951d6ec89 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Fri, 27 Jan 2023 11:05:28 +0100 Subject: [PATCH 0250/1921] gnu_build.mk: pass static libraries in '-l:' format Fixes #4743 --- repos/ports/mk/gnu_build.mk | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/repos/ports/mk/gnu_build.mk b/repos/ports/mk/gnu_build.mk index 9de02cfc90..4d03b65ea8 100644 --- a/repos/ports/mk/gnu_build.mk +++ b/repos/ports/mk/gnu_build.mk @@ -128,10 +128,19 @@ CXXFLAGS += $(COMMON_CFLAGS_CXXFLAGS) # Unfortunately, the use of '--start-group' and '--end-group' does not suffice # in all cases because 'libtool' strips those arguments from the 'LIBS' variable. # -LDLIBS_A = $(filter %.a, $(sort $(STATIC_LIBS)) $(EXT_OBJECTS) $(LIBGCC)) +# 'STATIC_LIBS', 'EXT_OBJECTS' and 'LIBGCC' contain absolute paths. +# We convert these to '-l:*.a' so libtool does not add these existing static +# libraries (found in 'LIBS') to any new static libraries it creates. +# +LDLIBS_A_ABSOLUTE = $(filter %.a, $(sort $(STATIC_LIBS)) $(EXT_OBJECTS) $(LIBGCC)) +LDLIBS_A = $(addprefix -l:,$(notdir $(LDLIBS_A_ABSOLUTE))) LDLIBS_SO = $(addprefix -l:,$(sort $(SHARED_LIBS))) LDLIBS += -L$(PWD) $(LDLIBS_A) $(LDLIBS_SO) $(LDLIBS_A) +static_libs_symlinks.tag: + $(VERBOSE)for lib in $(LDLIBS_A_ABSOLUTE); do ln -s $$lib; done + $(VERBOSE)touch $@ + # # By default, assume that there exists a 'configure' script in the top-level # of the package. @@ -146,7 +155,7 @@ Makefile reconfigure: $(MAKEFILE_LIST) # # Invoke configure script with the Genode environment # -Makefile reconfigure: env.sh $(SHARED_LIBS) +Makefile reconfigure: env.sh static_libs_symlinks.tag $(SHARED_LIBS) @$(MSG_CONFIG)$(TARGET) $(VERBOSE)source env.sh && $(CONFIGURE_SCRIPT) $(MKENV) $(CONFIGURE_ARGS) $(CONFIGURE_OUTPUT_FILTER) From e17d104c0a6f570e60237333ab5441bf5ca57bba Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 30 Jan 2023 09:55:04 +0100 Subject: [PATCH 0251/1921] mk: restore compatibility to Make 4.1 The leading newline in the _capture function confused _filecontent, which resulted in empty port hashes. Fixes regression introduced in 437fd21ba00e3407c984d5602b766a3c73caa6d5 (issue #4725). --- repos/base/mk/util.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/base/mk/util.inc b/repos/base/mk/util.inc index c99de8da5c..817f60bac5 100644 --- a/repos/base/mk/util.inc +++ b/repos/base/mk/util.inc @@ -13,11 +13,11 @@ _assert = $(if $1,$1,$(error Error: $2)) # # We must not specify an '=' here. Even though the make documentation states # that the omission of '=' should be equivalent to '=', the behaviour is not -# the same. +# the same. Note, the result of the 'eval' function is always the empty string +# and, thus, it can be placed virtually anywhere in a makefile. # define _capture -$(eval $2 += $1) -$1 +$(eval $2 += $1)$1 endef # From f1b048c5953e65e23f49a143dcb2339f7a587849 Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Mon, 30 Jan 2023 08:49:46 +0100 Subject: [PATCH 0252/1921] qt5: up-mix mono audio output data in QtWebEngine OSS backend Fixes #4747 --- repos/libports/ports/qt5.hash | 2 +- repos/libports/ports/qt5.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/libports/ports/qt5.hash b/repos/libports/ports/qt5.hash index 954ece4fe1..e997dc6a99 100644 --- a/repos/libports/ports/qt5.hash +++ b/repos/libports/ports/qt5.hash @@ -1 +1 @@ -bf72b584c821f7b7b47c56b7b450eb4dfeafe806 +6564ede42b425030fc3fb9e1a791bceb030c4ea7 diff --git a/repos/libports/ports/qt5.port b/repos/libports/ports/qt5.port index 55a9370c26..933183477c 100644 --- a/repos/libports/ports/qt5.port +++ b/repos/libports/ports/qt5.port @@ -4,5 +4,5 @@ VERSION := 5.15.2 DOWNLOADS := qt5.git URL(qt5) := https://github.com/cproc/qt5.git -REV(qt5) := issue4733 +REV(qt5) := issue4747 DIR(qt5) := src/lib/qt5 From e8424e19fa1c58493df2b7441c145797ed3db95f Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 31 Jan 2023 09:33:57 +0100 Subject: [PATCH 0253/1921] vbox_share: increase resources for tcp_terminal --- repos/ports/run/vbox_share.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/ports/run/vbox_share.inc b/repos/ports/run/vbox_share.inc index cc8e536207..599fc55d0c 100644 --- a/repos/ports/run/vbox_share.inc +++ b/repos/ports/run/vbox_share.inc @@ -171,7 +171,7 @@ set config_of_app { - + From 3403a91213bc6e33145f88686adfbb458144e71c Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 31 Jan 2023 16:24:46 +0100 Subject: [PATCH 0254/1921] input: provide keycode-by-name lookup The new utility returns a key code for a passed name and is implemented by linear search, which is slow but sufficient in situations like config updates. Issue #4748 --- repos/os/include/input/keycodes.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/repos/os/include/input/keycodes.h b/repos/os/include/input/keycodes.h index 39773b72c5..c61962cf99 100644 --- a/repos/os/include/input/keycodes.h +++ b/repos/os/include/input/keycodes.h @@ -17,6 +17,8 @@ #ifndef _INCLUDE__INPUT__KEYCODES_H_ #define _INCLUDE__INPUT__KEYCODES_H_ +#include + /* * C++ provides no reflection of the names of enum values. So we use the * preprocessor to generate the bodies of both the enum type 'Keycode' and @@ -481,6 +483,21 @@ namespace Input { } return "KEY_UNKNOWN"; } + + typedef Genode::String<22> Key_name; + + /** + * Return key code for name (linear search) + */ + Keycode key_code(Key_name name) + { + for (unsigned i = 0; i < KEY_MAX; ++i) { + Keycode const code = Keycode(i); + if (name == key_name(code)) + return code; + } + return KEY_UNKNOWN; + } } From 264ee999a14ac0c6cf1d005776554cf25af7b2d6 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 31 Jan 2023 16:33:13 +0100 Subject: [PATCH 0255/1921] acpi_event: generalize config for any key Fixes #4748 --- repos/libports/src/app/acpi_event/main.cc | 35 ++++------------------- repos/os/include/input/keycodes.h | 2 +- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/repos/libports/src/app/acpi_event/main.cc b/repos/libports/src/app/acpi_event/main.cc index 1edd981939..a879ca11e9 100644 --- a/repos/libports/src/app/acpi_event/main.cc +++ b/repos/libports/src/app/acpi_event/main.cc @@ -147,7 +147,7 @@ struct Transform::Main uint64_t acpi_value = 0; String<8> acpi_type; String<8> acpi_value_string; - String<32> to_key; + Input::Key_name to_key; String<16> key_type("PRESS_RELEASE"); Keys::Type press_release = Keys::Type::PRESS_RELEASE; @@ -185,24 +185,7 @@ struct Transform::Main } else map_node.attribute("value").value(acpi_value); - Input::Keycode key_code = Input::Keycode::KEY_UNKNOWN; - - if (to_key == "KEY_VENDOR") - key_code = Input::Keycode::KEY_VENDOR; - else if (to_key == "KEY_POWER") - key_code = Input::Keycode::KEY_POWER; - else if (to_key == "KEY_SLEEP") - key_code = Input::Keycode::KEY_SLEEP; - else if (to_key == "KEY_WAKEUP") - key_code = Input::Keycode::KEY_WAKEUP; - else if (to_key == "KEY_BATTERY") - key_code = Input::Keycode::KEY_BATTERY; - else if (to_key == "KEY_BRIGHTNESSUP") - key_code = Input::Keycode::KEY_BRIGHTNESSUP; - else if (to_key == "KEY_BRIGHTNESSDOWN") - key_code = Input::Keycode::KEY_BRIGHTNESSDOWN; - else if (to_key == "KEY_FN_F4") - key_code = Input::Keycode::KEY_FN_F4; + Input::Keycode key_code = Input::key_code(to_key); if (key_code == Input::Keycode::KEY_UNKNOWN) throw 4; @@ -228,17 +211,9 @@ struct Transform::Main throw 5; } catch (...) { - using namespace Genode; - - map_node.with_raw_node([&] (char const *start, size_t length) { - - String<64> invalid_node(Cstring(start, length)); - error("map item : '", invalid_node, "'"); - - /* abort on malformed configuration */ - class Invalid_config { }; - throw Invalid_config(); - }); + /* abort on malformed configuration */ + error("map item '", map_node, "' Aborting..."); + env.parent().exit(1); } }); diff --git a/repos/os/include/input/keycodes.h b/repos/os/include/input/keycodes.h index c61962cf99..1fe9e23229 100644 --- a/repos/os/include/input/keycodes.h +++ b/repos/os/include/input/keycodes.h @@ -489,7 +489,7 @@ namespace Input { /** * Return key code for name (linear search) */ - Keycode key_code(Key_name name) + static inline Keycode key_code(Key_name const &name) { for (unsigned i = 0; i < KEY_MAX; ++i) { Keycode const code = Keycode(i); From eb354be20d4e12e0532daa191f19e3f07217b371 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 27 Jan 2023 07:57:52 +0100 Subject: [PATCH 0256/1921] image/uefi: factor out common boot parts to avoid divergence. Issue #4741 --- tool/run/boot_dir/hw | 9 +-------- tool/run/boot_dir/nova | 10 +--------- tool/run/boot_dir/sel4 | 9 +-------- tool/run/image/uefi | 12 ++++++++++++ 4 files changed, 15 insertions(+), 25 deletions(-) diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 52bf937eaf..1ac2d3582a 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -117,14 +117,7 @@ proc run_boot_dir {binaries} { } if {[have_include image/uefi]} { - set grub2_path [get_grub2_dir] - - exec mkdir -p [run_dir]/efi/boot - exec cp $grub2_path/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi - exec cp $grub2_path/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender - + install_uefi_bootloader_to_run_dir set serial_bender_opt "serial_fallback" } diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 32d446e6f9..14bb5e99c8 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -120,15 +120,7 @@ proc run_boot_dir {binaries} { } if {[have_include image/uefi]} { - exec mkdir -p [run_dir]/efi/boot - exec cp [get_grub2_dir]/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi - exec cp [get_grub2_dir]/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender - - exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png - exec cp [get_grub2_dir]/boot/font.pf2 [run_dir]/boot/font.pf2 - + install_uefi_bootloader_to_run_dir append options_bender " serial_fallback" } diff --git a/tool/run/boot_dir/sel4 b/tool/run/boot_dir/sel4 index f30e3f0c4e..617fac8d66 100644 --- a/tool/run/boot_dir/sel4 +++ b/tool/run/boot_dir/sel4 @@ -67,14 +67,7 @@ proc run_boot_dir {binaries} { } if {[have_include image/uefi]} { - set grub2_path [get_grub2_dir] - - exec mkdir -p [run_dir]/efi/boot - exec cp $grub2_path/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi - exec cp $grub2_path/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender - + install_uefi_bootloader_to_run_dir set serial_bender_opt "serial_fallback" } diff --git a/tool/run/image/uefi b/tool/run/image/uefi index 827a386e52..62d0864226 100644 --- a/tool/run/image/uefi +++ b/tool/run/image/uefi @@ -39,3 +39,15 @@ proc run_image { } { exec rm -f [run_dir].header [run_dir].partition } + + +proc install_uefi_bootloader_to_run_dir { } { + exec mkdir -p [run_dir]/efi/boot + exec cp [get_grub2_dir]/boot/grub2/grub2_32.efi [run_dir]/efi/boot/bootia32.efi + exec cp [get_grub2_dir]/boot/grub2/grub2_64.efi [run_dir]/efi/boot/bootx64.efi + exec mkdir -p [run_dir]/boot/grub + exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + + exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png + exec cp [get_grub2_dir]/boot/font.pf2 [run_dir]/boot/font.pf2 +} From c3843cd0d61a44ea6ab8f78c8db7bdb5514a162e Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 27 Jan 2023 08:05:29 +0100 Subject: [PATCH 0257/1921] image/disk: factor out common boot parts to avoid divergence Issue #4741 --- tool/run/boot_dir/fiasco | 3 +-- tool/run/boot_dir/foc | 3 +-- tool/run/boot_dir/hw | 3 +-- tool/run/boot_dir/nova | 5 +---- tool/run/boot_dir/okl4 | 3 +-- tool/run/boot_dir/pistachio | 3 +-- tool/run/boot_dir/sel4 | 3 +-- tool/run/image/disk | 8 ++++++++ 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/tool/run/boot_dir/fiasco b/tool/run/boot_dir/fiasco index e3f29af063..5194df806a 100644 --- a/tool/run/boot_dir/fiasco +++ b/tool/run/boot_dir/fiasco @@ -49,8 +49,7 @@ proc run_boot_dir {binaries} { if {[have_include "image/iso"] || [have_include "image/disk"]} { if {[have_include "image/disk"]} { - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + install_disk_bootloader_to_run_dir } if {[have_include "image/iso"]} { diff --git a/tool/run/boot_dir/foc b/tool/run/boot_dir/foc index 84f909cf67..a24dd15662 100644 --- a/tool/run/boot_dir/foc +++ b/tool/run/boot_dir/foc @@ -93,8 +93,7 @@ proc run_boot_dir_x86 {binaries} { if {[have_include "image/iso"] || [have_include "image/disk"]} { if {[have_include "image/disk"]} { - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + install_disk_bootloader_to_run_dir } if {[have_include "image/iso"]} { diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 1ac2d3582a..8d44c8dd2c 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -108,8 +108,7 @@ proc run_boot_dir {binaries} { set serial_bender_opt "" if {[have_include "image/disk"]} { - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + install_disk_bootloader_to_run_dir } if {[have_include "image/iso"]} { diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 14bb5e99c8..02eefa8501 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -109,10 +109,7 @@ proc run_boot_dir {binaries} { exec gzip [run_dir]/boot/image.elf if {[have_include "image/disk"]} { - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender - exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png - exec cp [get_grub2_dir]/boot/font.pf2 [run_dir]/boot/font.pf2 + install_disk_bootloader_to_run_dir } if {[have_include "image/iso"]} { diff --git a/tool/run/boot_dir/okl4 b/tool/run/boot_dir/okl4 index fd430acafb..f9b81548a0 100644 --- a/tool/run/boot_dir/okl4 +++ b/tool/run/boot_dir/okl4 @@ -161,8 +161,7 @@ proc run_boot_dir {binaries} { if {[have_include "image/iso"] || [have_include "image/disk"]} { if {[have_include "image/disk"]} { - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + install_disk_bootloader_to_run_dir } if {[have_include "image/iso"]} { diff --git a/tool/run/boot_dir/pistachio b/tool/run/boot_dir/pistachio index f6f5004c5b..ee6f47cc25 100644 --- a/tool/run/boot_dir/pistachio +++ b/tool/run/boot_dir/pistachio @@ -48,8 +48,7 @@ proc run_boot_dir {binaries} { if {[have_include "image/iso"] || [have_include "image/disk"]} { if {[have_include "image/disk"]} { - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + install_disk_bootloader_to_run_dir } if {[have_include "image/iso"]} { diff --git a/tool/run/boot_dir/sel4 b/tool/run/boot_dir/sel4 index 617fac8d66..08ffaebb1f 100644 --- a/tool/run/boot_dir/sel4 +++ b/tool/run/boot_dir/sel4 @@ -58,8 +58,7 @@ proc run_boot_dir {binaries} { set serial_bender_opt "" if {[have_include "image/disk"]} { - exec mkdir -p [run_dir]/boot/grub - exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + install_disk_bootloader_to_run_dir } if {[have_include "image/iso"]} { diff --git a/tool/run/image/disk b/tool/run/image/disk index 3bbe605ef7..9d202e5896 100644 --- a/tool/run/image/disk +++ b/tool/run/image/disk @@ -91,3 +91,11 @@ proc run_image { } { set size_image [expr [regsub {\s.*} [exec du -sk [run_dir].img] {}]] puts "Created image file [run_dir].img (${size_image}kiB)" } + + +proc install_disk_bootloader_to_run_dir { } { + exec mkdir -p [run_dir]/boot/grub + exec cp [genode_dir]/tool/boot/bender [run_dir]/boot/bender + exec cp [genode_dir]/tool/boot/boot.png [run_dir]/boot/boot.png + exec cp [get_grub2_dir]/boot/font.pf2 [run_dir]/boot/font.pf2 +} From 208547e3af5b590a4e23a6b2188910d05d6fffe9 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 27 Jan 2023 08:20:58 +0100 Subject: [PATCH 0258/1921] tool/grub2: factor out common part to avoid divergence Issue #4741 --- tool/run/boot_dir/fiasco | 6 +++--- tool/run/boot_dir/foc | 6 +++--- tool/run/boot_dir/hw | 6 ++---- tool/run/boot_dir/nova | 22 +--------------------- tool/run/boot_dir/okl4 | 6 +++--- tool/run/boot_dir/pistachio | 6 +++--- tool/run/boot_dir/sel4 | 6 ++---- tool/run/grub2.inc | 30 ++++++++++++++++++++++++++++++ 8 files changed, 47 insertions(+), 41 deletions(-) diff --git a/tool/run/boot_dir/fiasco b/tool/run/boot_dir/fiasco index 5194df806a..fd3bfa02f9 100644 --- a/tool/run/boot_dir/fiasco +++ b/tool/run/boot_dir/fiasco @@ -57,13 +57,13 @@ proc run_boot_dir {binaries} { } # - # Generate GRUB config file + # Generate GRUB2 config file # + set fh [create_header_grub2_config] + # The core binary is part of the 'binaries' list but it must # appear right after 'sigma0' as boot module. Hence the special case. # - set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] - puts $fh "set timeout=0" puts $fh "menuentry 'Genode on L4/Fiasco' {" puts $fh " insmod multiboot" puts $fh " multiboot /boot/bender" diff --git a/tool/run/boot_dir/foc b/tool/run/boot_dir/foc index a24dd15662..9c8726e34e 100644 --- a/tool/run/boot_dir/foc +++ b/tool/run/boot_dir/foc @@ -101,13 +101,13 @@ proc run_boot_dir_x86 {binaries} { } # - # Generate grub config file + # Generate GRUB2 config file # + set fh [create_header_grub2_config] + # The core binary is part of the 'binaries' list but it must # appear right after 'sigma0' as boot module. Hence the special case. # - set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] - puts $fh "set timeout=0" puts $fh "menuentry 'Genode on Fiasco.OC' {" puts $fh " insmod multiboot" puts $fh " multiboot /boot/bender" diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 8d44c8dd2c..c65beb5fab 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -123,10 +123,8 @@ proc run_boot_dir {binaries} { # # Generate GRUB2 config file # - set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] - puts $fh "set timeout=0" - # tell grub2 to prefer 32bit framebuffer resolution - puts $fh "set gfxpayload=\"0x0x32\"" + set fh [create_header_grub2_config] + puts $fh "menuentry 'Genode on base-hw' {" puts $fh " insmod multiboot2" puts $fh " multiboot2 /boot/bender $serial_bender_opt" diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 02eefa8501..95b7b81f2b 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -124,27 +124,7 @@ proc run_boot_dir {binaries} { # # Generate GRUB2 config file # - set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] - - # If timeout != 0 is used a font is required in graphic mode - puts $fh "loadfont /boot/font.pf2" - puts $fh "set timeout=0" - - # choose best graphic mode - # uncomment line to get vga console working in hypervisor - puts $fh "set gfxpayload=auto" - - if {[have_include image/uefi]} { - puts $fh "insmod gfxterm" - puts $fh "terminal_output gfxterm" - puts $fh "insmod gfxterm_background" - puts $fh "insmod png" - puts $fh "background_image -m center /boot/boot.png" - } - - # set this to get text console instead of graphical console - # puts $fh "terminal_input console" - # puts $fh "terminal_output console" + set fh [create_header_grub2_config] puts $fh "menuentry 'Genode on NOVA' {" puts $fh " insmod multiboot2" diff --git a/tool/run/boot_dir/okl4 b/tool/run/boot_dir/okl4 index f9b81548a0..bdaa926a59 100644 --- a/tool/run/boot_dir/okl4 +++ b/tool/run/boot_dir/okl4 @@ -169,13 +169,13 @@ proc run_boot_dir {binaries} { } # - # Generate GRUB config file + # Generate GRUB2 config file # + set fh [create_header_grub2_config] + # The core binary is part of the 'binaries' list but it must # appear right after 'sigma0' as boot module. Hence the special case. # - set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] - puts $fh "set timeout=0" puts $fh "menuentry 'Genode on OKL4' {" puts $fh " insmod multiboot" puts $fh " multiboot /boot/bender" diff --git a/tool/run/boot_dir/pistachio b/tool/run/boot_dir/pistachio index ee6f47cc25..5507841eec 100644 --- a/tool/run/boot_dir/pistachio +++ b/tool/run/boot_dir/pistachio @@ -56,13 +56,13 @@ proc run_boot_dir {binaries} { } # - # Generate GRUB config file + # Generate GRUB2 config file # + set fh [create_header_grub2_config] + # The core binary is part of the 'binaries' list but it must # appear right after 'sigma0' as boot module. Hence the special case. # - set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] - puts $fh "set timeout=0" puts $fh "menuentry 'Genode on L4ka::Pistachio' {" puts $fh " insmod multiboot" puts $fh " multiboot /boot/bender" diff --git a/tool/run/boot_dir/sel4 b/tool/run/boot_dir/sel4 index 08ffaebb1f..4b945250e8 100644 --- a/tool/run/boot_dir/sel4 +++ b/tool/run/boot_dir/sel4 @@ -73,10 +73,8 @@ proc run_boot_dir {binaries} { # # Generate GRUB2 config file # - set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] - puts $fh "set timeout=0" - # tell grub2 to prefer 32bit framebuffer resolution - puts $fh "set gfxpayload=\"0x0x32\"" + set fh [create_header_grub2_config] + puts $fh "menuentry 'Genode on seL4' {" puts $fh " insmod multiboot2" puts $fh " multiboot2 /boot/bender phys_max=256M $serial_bender_opt" diff --git a/tool/run/grub2.inc b/tool/run/grub2.inc index 787bf2a530..42d05b74ff 100644 --- a/tool/run/grub2.inc +++ b/tool/run/grub2.inc @@ -18,3 +18,33 @@ proc get_grub2_dir { } { return $grub2_path } + + +proc create_header_grub2_config { } { + # + # Generate GRUB2 config file + # + set fh [open "[run_dir]/boot/grub/grub.cfg" "WRONLY CREAT TRUNC"] + + # If timeout != 0 is used a font is required in graphic mode + puts $fh "loadfont /boot/font.pf2" + puts $fh "set timeout=0" + + # choose best graphic mode + # uncomment line to get vga console working in hypervisor + puts $fh "set gfxpayload=auto" + + if {[have_include image/uefi]} { + puts $fh "insmod gfxterm" + puts $fh "terminal_output gfxterm" + puts $fh "insmod gfxterm_background" + puts $fh "insmod png" + puts $fh "background_image -m center /boot/boot.png" + } + + # set this to get text console instead of graphical console + # puts $fh "terminal_input console" + # puts $fh "terminal_output console" + + return $fh +} From 52fb4eee5f8880e0f115d3be33d086ad8e221ba9 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 7 Feb 2023 16:35:46 +0100 Subject: [PATCH 0259/1921] pc/wifi: restore optional MAC-address reporting Issue #4133 --- repos/pc/src/lib/wifi/socket_call.cc | 8 ++++ repos/pc/src/lib/wifi/wlan.cc | 64 ++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/repos/pc/src/lib/wifi/socket_call.cc b/repos/pc/src/lib/wifi/socket_call.cc index ae7023af59..8cc5746b60 100644 --- a/repos/pc/src/lib/wifi/socket_call.cc +++ b/repos/pc/src/lib/wifi/socket_call.cc @@ -15,6 +15,7 @@ #include #include #include +#include /* DDE Linux includes */ #include @@ -470,13 +471,20 @@ class Lx::Socket static Lx::Socket *_socket; +/* implemented in wlan.cc */ extern Genode::Blockade *wpa_blockade; +/* implemented in wlan.cc */ +void _wifi_report_mac_address(Net::Mac_address const &mac_address); + + extern "C" int socketcall_task_function(void *) { static Lx::Socket inst(Lx_kit::env().env.ep()); _socket = &inst; + _wifi_report_mac_address({ (void *) lx_get_mac_addr() }); + wpa_blockade->wakeup(); while (true) { diff --git a/repos/pc/src/lib/wifi/wlan.cc b/repos/pc/src/lib/wifi/wlan.cc index bac9c19ae7..ea00dde856 100644 --- a/repos/pc/src/lib/wifi/wlan.cc +++ b/repos/pc/src/lib/wifi/wlan.cc @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include /* DDE Linux includes */ @@ -89,6 +91,64 @@ extern "C" char const *wifi_ifname(void) return "wlan0"; } + +struct Mac_address_reporter +{ + bool _enabled = false; + + Net::Mac_address _mac_address { }; + + Constructible _reporter { }; + + Env &_env; + + Signal_context_capability _sigh; + + Mac_address_reporter(Env &env, Signal_context_capability sigh) + : _env(env), _sigh(sigh) + { + Attached_rom_dataspace config { _env, "config" }; + + config.xml().with_optional_sub_node("report", [&] (Xml_node const &xml) { + _enabled = xml.attribute_value("mac_address", false); }); + } + + void mac_address(Net::Mac_address const &mac_address) + { + _mac_address = mac_address; + + Signal_transmitter(_sigh).submit(); + } + + void report() + { + if (!_enabled) + return; + + _reporter.construct(_env, "devices"); + _reporter->enabled(true); + + Reporter::Xml_generator report(*_reporter, [&] () { + report.node("nic", [&] () { + report.attribute("mac_address", String<32>(_mac_address)); + }); + }); + + /* report only once */ + _enabled = false; + } +}; + +Constructible mac_address_reporter; + + +/* used from socket_call.cc */ +void _wifi_report_mac_address(Net::Mac_address const &mac_address) +{ + mac_address_reporter->mac_address(mac_address); +} + + struct Wlan { Env &_env; @@ -103,10 +163,14 @@ struct Wlan } genode_uplink_notify_peers(); + + mac_address_reporter->report(); } Wlan(Env &env) : _env { env } { + mac_address_reporter.construct(_env, _signal_handler); + genode_uplink_init(genode_env_ptr(_env), genode_allocator_ptr(Lx_kit::env().heap), genode_signal_handler_ptr(_signal_handler)); From de9ea4361614879925bad3dd5ef0b1cc6ea95c83 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 7 Feb 2023 16:48:06 +0100 Subject: [PATCH 0260/1921] dde_linux: remove custom lx_backtrace (use lx_emul_backtrace) --- repos/dde_linux/src/lib/lx_emul/pci_bus.c | 3 --- repos/pc/lib/mk/wifi.inc | 1 - repos/pc/src/drivers/usb_host/pc/misc.cc | 20 -------------------- repos/pc/src/lib/wifi/lx_emul.c | 4 ++-- repos/pc/src/lib/wifi/lx_emul.h | 2 -- repos/pc/src/lib/wifi/misc.cc | 20 -------------------- repos/pc/src/lib/wifi/symbol.map | 2 +- 7 files changed, 3 insertions(+), 49 deletions(-) delete mode 100644 repos/pc/src/drivers/usb_host/pc/misc.cc delete mode 100644 repos/pc/src/lib/wifi/misc.cc diff --git a/repos/dde_linux/src/lib/lx_emul/pci_bus.c b/repos/dde_linux/src/lib/lx_emul/pci_bus.c index ec0fe9691d..3ba174d41f 100644 --- a/repos/dde_linux/src/lib/lx_emul/pci_bus.c +++ b/repos/dde_linux/src/lib/lx_emul/pci_bus.c @@ -20,9 +20,6 @@ #include -extern void lx_backtrace(void); - - int arch_probe_nr_irqs(void) { /* needed for 'irq_get_irq_data()' in 'pci_assign_irq()' below */ diff --git a/repos/pc/lib/mk/wifi.inc b/repos/pc/lib/mk/wifi.inc index 88052e0cfb..c032a9fa16 100644 --- a/repos/pc/lib/mk/wifi.inc +++ b/repos/pc/lib/mk/wifi.inc @@ -9,7 +9,6 @@ LD_OPT += --version-script=$(TARGET_LIB_DIR)/symbol.map LIBS += base jitterentropy pc_linux_generated pc_lx_emul INC_DIR := $(TARGET_LIB_DIR) SRC_CC += wlan.cc -SRC_CC += misc.cc SRC_CC += firmware.cc SRC_CC += socket_call.cc SRC_CC += lx_emul/random.cc diff --git a/repos/pc/src/drivers/usb_host/pc/misc.cc b/repos/pc/src/drivers/usb_host/pc/misc.cc deleted file mode 100644 index 73f6e67174..0000000000 --- a/repos/pc/src/drivers/usb_host/pc/misc.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* - * \brief Misc - * \author Josef Soentgen - * \date 2022-01-20 - */ - -/* - * Copyright (C) 2022 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -/* Genode includes */ -#include - -extern "C" void lx_backtrace(void) -{ - Genode::backtrace(); -} diff --git a/repos/pc/src/lib/wifi/lx_emul.c b/repos/pc/src/lib/wifi/lx_emul.c index 297dec8862..499d7a9d75 100644 --- a/repos/pc/src/lib/wifi/lx_emul.c +++ b/repos/pc/src/lib/wifi/lx_emul.c @@ -425,7 +425,7 @@ size_t _copy_to_iter(const void * addr, size_t bytes, struct iov_iter * i) asmlinkage __visible void dump_stack(void) { - lx_backtrace(); + lx_emul_backtrace(); } @@ -479,7 +479,7 @@ void page_frag_free(void * addr) struct page *page = lx_emul_virt_to_pages(addr, 1ul); if (!page) { printk("BUG %s: page for addr: %p not found\n", __func__, addr); - lx_backtrace(); + lx_emul_backtrace(); } __free_pages(page, 0ul); diff --git a/repos/pc/src/lib/wifi/lx_emul.h b/repos/pc/src/lib/wifi/lx_emul.h index 0915c039ac..8d1e9bb67c 100644 --- a/repos/pc/src/lib/wifi/lx_emul.h +++ b/repos/pc/src/lib/wifi/lx_emul.h @@ -24,8 +24,6 @@ extern "C" { #endif -void lx_backtrace(void); - void lx_emul_time_udelay(unsigned long usec); int lx_emul_rfkill_get_any(void); diff --git a/repos/pc/src/lib/wifi/misc.cc b/repos/pc/src/lib/wifi/misc.cc deleted file mode 100644 index 73f6e67174..0000000000 --- a/repos/pc/src/lib/wifi/misc.cc +++ /dev/null @@ -1,20 +0,0 @@ -/* - * \brief Misc - * \author Josef Soentgen - * \date 2022-01-20 - */ - -/* - * Copyright (C) 2022 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -/* Genode includes */ -#include - -extern "C" void lx_backtrace(void) -{ - Genode::backtrace(); -} diff --git a/repos/pc/src/lib/wifi/symbol.map b/repos/pc/src/lib/wifi/symbol.map index df3487a3ba..700ff56011 100644 --- a/repos/pc/src/lib/wifi/symbol.map +++ b/repos/pc/src/lib/wifi/symbol.map @@ -21,7 +21,7 @@ jiffies; /* for general debugging purposes */ - lx_backtrace; + lx_emul_backtrace; local: From 21a95276861db16bdd2dd72c3e351ed0bf910703 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 7 Feb 2023 16:34:32 +0100 Subject: [PATCH 0261/1921] pc/wifi: remove redundant Genode:: prefix --- repos/pc/src/lib/wifi/firmware.cc | 15 ++++++----- repos/pc/src/lib/wifi/socket_call.cc | 40 +++++++++++++++------------- repos/pc/src/lib/wifi/wlan.cc | 11 ++++---- 3 files changed, 36 insertions(+), 30 deletions(-) diff --git a/repos/pc/src/lib/wifi/firmware.cc b/repos/pc/src/lib/wifi/firmware.cc index a386257dd0..a4d4f8c9d7 100644 --- a/repos/pc/src/lib/wifi/firmware.cc +++ b/repos/pc/src/lib/wifi/firmware.cc @@ -20,6 +20,9 @@ #include +using namespace Genode; + + Firmware_list fw_list[] = { { "regulatory.db", 4144, nullptr }, { "regulatory.db.p7s", 1182, nullptr }, @@ -72,7 +75,7 @@ extern "C" int lx_emul_request_firmware_nowait(const char *name, void **dest, /* only try to load known firmware images */ Firmware_list *fwl = 0; for (size_t i = 0; i < fw_list_len; i++) { - if (Genode::strcmp(name, fw_list[i].requested_name) == 0) { + if (strcmp(name, fw_list[i].requested_name) == 0) { fwl = &fw_list[i]; break; } @@ -80,18 +83,18 @@ extern "C" int lx_emul_request_firmware_nowait(const char *name, void **dest, if (!fwl ) { if (warn) - Genode::error("firmware '", name, "' is not in the firmware white list"); + error("firmware '", name, "' is not in the firmware white list"); return -1; } char const *fw_name = fwl->available_name ? fwl->available_name : fwl->requested_name; - Genode::Rom_connection rom(Lx_kit::env().env, fw_name); - Genode::Dataspace_capability ds_cap = rom.dataspace(); + Rom_connection rom(Lx_kit::env().env, fw_name); + Dataspace_capability ds_cap = rom.dataspace(); if (!ds_cap.valid()) { - Genode::error("could not get firmware ROM dataspace"); + error("could not get firmware ROM dataspace"); return -1; } @@ -101,7 +104,7 @@ extern "C" int lx_emul_request_firmware_nowait(const char *name, void **dest, return -1; void const *image = Lx_kit::env().env.rm().attach(ds_cap); - Genode::memcpy(data, image, fwl->size); + memcpy(data, image, fwl->size); Lx_kit::env().env.rm().detach(image); *dest = data; diff --git a/repos/pc/src/lib/wifi/socket_call.cc b/repos/pc/src/lib/wifi/socket_call.cc index 8cc5746b60..8df5b22df9 100644 --- a/repos/pc/src/lib/wifi/socket_call.cc +++ b/repos/pc/src/lib/wifi/socket_call.cc @@ -27,6 +27,10 @@ #include "lx_socket_call.h" #include "libc_errno.h" + +using namespace Genode; + + /* * The values were taken from 'uapi/asm-generic/socket.h', * 'uapi/linux/netlink.h' and 'linux/socket.h' and must be @@ -96,9 +100,9 @@ static int convert_errno_from_linux(int linux_errno) case ENODEV: return -(int)Libc::Errno::BSD_ENODEV; case ENOENT: return -(int)Libc::Errno::BSD_ENOENT; case ENOEXEC: return -(int)Libc::Errno::BSD_ENOEXEC; - case ENOLINK: - Genode::error("ENOLINK (", (int) ENOLINK, ") -> ", (int)Libc::Errno::BSD_ENOLINK); - return -(int)Libc::Errno::BSD_ENOLINK; + case ENOLINK: + error("ENOLINK (", (int) ENOLINK, ") -> ", (int)Libc::Errno::BSD_ENOLINK); + return -(int)Libc::Errno::BSD_ENOLINK; case ENOMEM: return -(int)Libc::Errno::BSD_ENOMEM; case ENOMSG: return -(int)Libc::Errno::BSD_ENOMSG; case ENOPROTOOPT: return -(int)Libc::Errno::BSD_ENOPROTOOPT; @@ -122,7 +126,7 @@ static int convert_errno_from_linux(int linux_errno) case ETIMEDOUT: return -(int)Libc::Errno::BSD_ETIMEDOUT; case EXDEV: return -(int)Libc::Errno::BSD_EXDEV; default: - Genode::error(__func__, ": unhandled errno ", linux_errno); + error(__func__, ": unhandled errno ", linux_errno); return linux_errno; } } @@ -142,7 +146,7 @@ struct Wifi::Socket explicit Socket(void *s) : socket(s) { } - void print(Genode::Output &out) const + void print(Output &out) const { Genode::print(out, "this: ", this, " socket: ", socket, " non_block: ", non_block); } @@ -215,8 +219,8 @@ struct Call int err = 0; }; -static Call _call; -static Genode::Semaphore _block; +static Call _call; +static Semaphore _block; namespace Lx { @@ -235,10 +239,10 @@ class Lx::Socket Socket(const Socket&) = delete; Socket& operator=(const Socket&) = delete; - Genode::Signal_transmitter _sender { }; - Genode::Signal_handler _dispatcher; + Signal_transmitter _sender { }; + Signal_handler _dispatcher; - Genode::Signal_handler _dispatcher_blockade; + Signal_handler _dispatcher_blockade; struct socket *_sock_poll_table[Wifi::MAX_POLL_SOCKETS] { }; @@ -246,7 +250,7 @@ class Lx::Socket { struct socket *sock = static_cast(_call.handle->socket); if (!sock) - Genode::error("BUG: sock is zero"); + error("BUG: sock is zero"); return sock; } @@ -327,11 +331,11 @@ class Lx::Socket if (!addr) return; - Genode::size_t const copy = 6 > _call.get_mac_address.addr_len - ? _call.get_mac_address.addr_len - : 6; + size_t const copy = 6 > _call.get_mac_address.addr_len + ? _call.get_mac_address.addr_len + : 6; - Genode::memcpy(_call.get_mac_address.addr, addr, copy); + memcpy(_call.get_mac_address.addr, addr, copy); } void _do_poll_all() @@ -421,7 +425,7 @@ class Lx::Socket public: - Socket(Genode::Entrypoint &ep) + Socket(Entrypoint &ep) : _dispatcher(ep, *this, &Lx::Socket::_handle), _dispatcher_blockade(ep, *this, &Lx::Socket::_handle_blockade) @@ -472,7 +476,7 @@ static Lx::Socket *_socket; /* implemented in wlan.cc */ -extern Genode::Blockade *wpa_blockade; +extern Blockade *wpa_blockade; /* implemented in wlan.cc */ void _wifi_report_mac_address(Net::Mac_address const &mac_address); @@ -547,7 +551,7 @@ int Socket_call::close(Socket *s) _socket->submit_and_block(); if (_call.err) - Genode::warning("closing socket failed: ", _call.err); + warning("closing socket failed: ", _call.err); destroy(Lx_kit::env().heap, s); return _call.err; diff --git a/repos/pc/src/lib/wifi/wlan.cc b/repos/pc/src/lib/wifi/wlan.cc index ea00dde856..04380f9977 100644 --- a/repos/pc/src/lib/wifi/wlan.cc +++ b/repos/pc/src/lib/wifi/wlan.cc @@ -36,7 +36,7 @@ using namespace Genode; extern "C" int lx_emul_rfkill_get_any(void); extern "C" void lx_emul_rfkill_switch_all(int blocked); -static Genode::Signal_context_capability _rfkill_sigh_cap; +static Signal_context_capability _rfkill_sigh_cap; bool _wifi_get_rfkill(void) @@ -68,7 +68,7 @@ void _wifi_set_rfkill(bool blocked) lx_emul_task_unblock(uplink_task_struct_ptr); Lx_kit::env().scheduler.schedule(); - Genode::Signal_transmitter(_rfkill_sigh_cap).submit(); + Signal_transmitter(_rfkill_sigh_cap).submit(); } @@ -180,11 +180,10 @@ struct Wlan }; -Genode::Blockade *wpa_blockade; +Blockade *wpa_blockade; -void wifi_init(Genode::Env &env, - Genode::Blockade &blockade) +void wifi_init(Env &env, Blockade &blockade) { wpa_blockade = &blockade; @@ -192,7 +191,7 @@ void wifi_init(Genode::Env &env, } -void wifi_set_rfkill_sigh(Genode::Signal_context_capability cap) +void wifi_set_rfkill_sigh(Signal_context_capability cap) { _rfkill_sigh_cap = cap; } From 11ff774f7279f7cea6505be4143c81ac4bfb2635 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 27 Jan 2023 15:32:16 +0100 Subject: [PATCH 0262/1921] tool/run/image/disk: find resize2fs in /usr/sbin This patch adjusts the run/image/disk plugin to search for resize2fs in /usr/sbin, which is not included in the PATH variable on Debian by default. Issue #4746 --- tool/run/image/disk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/run/image/disk b/tool/run/image/disk index 9d202e5896..7b2aec889a 100644 --- a/tool/run/image/disk +++ b/tool/run/image/disk @@ -54,7 +54,7 @@ proc run_image { } { if {[image_disk_size] == 0} { # resize image to only needed size and get size of resized image - exec resize2fs -M [run_dir].partition 2>/dev/null + exec [installed_command resize2fs] -M [run_dir].partition 2>/dev/null set disk_size_b [expr [regsub {\s.*} [exec wc -c [run_dir].partition] {}]] set disk_size_kb [expr $disk_size_b / 1024] } From 3447d0ccb909974f13d9b5c7d48c7ca47a4c2866 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 25 Jan 2023 12:35:12 +0100 Subject: [PATCH 0263/1921] menu_view: avoid flicker when enlarging the view Each time when enlarging the menu view, a new 'Gui_buffer' is constructed with the new size. At its contruction time, the default reset background color is in effect, which is evaluated by 'reset_surface' as part of the construction. A custom reset color takes effect only after the construction. Hence, when the Gui_buffer is flushed to screen immediately at construction time, the gray default becomes visible for a short time. This patch changes the Gui_buffer to accept the reset background color as construction argument so that it takes immediate effect. Related to #4592 --- repos/gems/include/gems/gui_buffer.h | 15 +++++++++++---- repos/gems/src/app/menu_view/main.cc | 12 ++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/repos/gems/include/gems/gui_buffer.h b/repos/gems/include/gems/gui_buffer.h index e2588faaa9..f480b04f83 100644 --- a/repos/gems/include/gems/gui_buffer.h +++ b/repos/gems/include/gems/gui_buffer.h @@ -25,7 +25,7 @@ #include -struct Gui_buffer +struct Gui_buffer : Genode::Noncopyable { typedef Genode::Pixel_rgb888 Pixel_rgb888; typedef Genode::Pixel_alpha8 Pixel_alpha8; @@ -50,7 +50,7 @@ struct Gui_buffer bool const use_alpha; - Pixel_rgb888 reset_color { 127, 127, 127, 255 }; + Pixel_rgb888 const reset_color; /** * Return dataspace capability for virtual framebuffer @@ -80,17 +80,24 @@ struct Gui_buffer enum class Alpha { OPAQUE, ALPHA }; + static Genode::Color default_reset_color() + { + return Genode::Color(127, 127, 127, 255); + } + /** * Constructor */ Gui_buffer(Gui::Connection &gui, Area size, Genode::Ram_allocator &ram, Genode::Region_map &rm, - Alpha alpha = Alpha::ALPHA) + Alpha alpha = Alpha::ALPHA, + Genode::Color reset_color = default_reset_color()) : ram(ram), rm(rm), gui(gui), mode({ .area = { Genode::max(1U, size.w()), Genode::max(1U, size.h()) } }), - use_alpha(alpha == Alpha::ALPHA) + use_alpha(alpha == Alpha::ALPHA), + reset_color(reset_color.r, reset_color.g, reset_color.b, reset_color.a) { reset_surface(); } diff --git a/repos/gems/src/app/menu_view/main.cc b/repos/gems/src/app/menu_view/main.cc index eefc9df6c7..b4ad0a3bf5 100644 --- a/repos/gems/src/app/menu_view/main.cc +++ b/repos/gems/src/app/menu_view/main.cc @@ -386,17 +386,13 @@ void Menu_view::Main::_handle_frame_timer() bool const size_increased = (max_size.w() > buffer_w) || (max_size.h() > buffer_h); - if (!_buffer.constructed() || size_increased) { + if (!_buffer.constructed() || size_increased) _buffer.construct(_gui, max_size, _env.ram(), _env.rm(), _opaque ? Gui_buffer::Alpha::OPAQUE - : Gui_buffer::Alpha::ALPHA); - _buffer->reset_color = { _background_color.r, - _background_color.g, - _background_color.b, - _background_color.a }; - } else { + : Gui_buffer::Alpha::ALPHA, + _background_color); + else _buffer->reset_surface(); - } _root_widget.position(Point(0, 0)); From 345b77cfc91f96fdc6a88d31f76c3a76cc1bd731 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 25 Jan 2023 15:07:50 +0100 Subject: [PATCH 0264/1921] menu_view: use Expanding_reporter for hover report This allows for arbitrary large hover reports. --- repos/gems/src/app/menu_view/main.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/repos/gems/src/app/menu_view/main.cc b/repos/gems/src/app/menu_view/main.cc index b4ad0a3bf5..b15679546e 100644 --- a/repos/gems/src/app/menu_view/main.cc +++ b/repos/gems/src/app/menu_view/main.cc @@ -175,7 +175,7 @@ struct Menu_view::Main Signal_handler
_frame_timer_handler = { _env.ep(), *this, &Main::_handle_frame_timer}; - Genode::Reporter _hover_reporter = { _env, "hover" }; + Constructible _hover_reporter { }; void _update_hover_report(); @@ -217,11 +217,11 @@ struct Menu_view::Main void Menu_view::Main::_update_hover_report() { - if (!_hover_reporter.enabled()) + if (!_hover_reporter.constructed()) return; if (!_dialog_hovered) { - Genode::Reporter::Xml_generator xml(_hover_reporter, [&] () { }); + _hover_reporter->generate([&] (Xml_generator &) { }); return; } @@ -231,7 +231,7 @@ void Menu_view::Main::_update_hover_report() if (hover_changed || _input_seq_number.changed()) { - Genode::Reporter::Xml_generator xml(_hover_reporter, [&] () { + _hover_reporter->generate([&] (Xml_generator &xml) { _input_seq_number.generate(xml); _root_widget.gen_hover_model(xml, _hovered_position); }); @@ -289,12 +289,10 @@ void Menu_view::Main::_handle_config() Xml_node const config = _config.xml(); - try { - _hover_reporter.enabled(config.sub_node("report") - .attribute_value("hover", false)); - } catch (...) { - _hover_reporter.enabled(false); - } + config.with_optional_sub_node("report", [&] (Xml_node const &report) { + _hover_reporter.conditional(report.attribute_value("hover", false), + _env, "hover", "hover"); + }); _opaque = config.attribute_value("opaque", false); From 61a7671de1343de69339f8c32e76e6e829cd0dab Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 27 Jan 2023 20:06:02 +0100 Subject: [PATCH 0265/1921] os/vfs.h: read loop in Readonly_file::read This patch improves the Readonly_file::read method such that the capacity of the specified buffer is used as upper bound for the read operation instead of VFS-internal I/O buffer sizes. This relieves the caller from implementing a read loop in most cases. As a step away from C-ish use of the API, the patch deprecates the old 'read' method that takes the buffer as char *, size_t arguments. Fixes #4745 --- repos/os/include/os/vfs.h | 102 ++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 44 deletions(-) diff --git a/repos/os/include/os/vfs.h b/repos/os/include/os/vfs.h index eae9aea560..d6187822f3 100644 --- a/repos/os/include/os/vfs.h +++ b/repos/os/include/os/vfs.h @@ -289,14 +289,17 @@ struct Genode::Directory : Noncopyable, Interface auto open_res = _nonconst_fs().openlink( join(_path, rel_path).string(), false, &link_handle, _alloc); + if (open_res != Directory_service::OPENLINK_OK) throw Nonexistent_file(); + Vfs_handle::Guard guard(link_handle); char buf[MAX_PATH_LEN]; Vfs::file_size count = sizeof(buf)-1; Vfs::file_size out_count = 0; + while (!link_handle->fs().queue_read(link_handle, count)) { _io.commit_and_wait(); } @@ -452,50 +455,71 @@ class Genode::Readonly_file : public File struct At { Vfs::file_size value; }; /** - * Read number of 'bytes' from file into local memory buffer 'dst' - * - * \throw Truncated_during_read + * Read file content starting at 'at' into byte buffer 'range' */ - size_t read(At at, char *dst, size_t bytes) const + size_t read(At at, Byte_range_ptr const &range) const { - Vfs::file_size out_count = 0; - - _handle->seek(at.value); - - while (!_handle->fs().queue_read(_handle, bytes)) - _io.commit_and_wait(); - - Vfs::File_io_service::Read_result result; + size_t total = 0; for (;;) { - result = _handle->fs().complete_read(_handle, dst, bytes, - out_count); - if (result != Vfs::File_io_service::READ_QUEUED) + _handle->seek(at.value + total); + + while (!_handle->fs().queue_read(_handle, range.num_bytes)) + _io.commit_and_wait(); + + Vfs::File_io_service::Read_result result; + + Vfs::file_size read_bytes { }; /* byte count for this iteration */ + + for (;;) { + result = _handle->fs().complete_read(_handle, + range.start + total, + range.num_bytes - total, + read_bytes); + + if (result != Vfs::File_io_service::READ_QUEUED) + break; + + _io.commit_and_wait(); + }; + + if (read_bytes > range.num_bytes - total) { + error("read beyond buffer size"); + break; + } + + if (read_bytes == 0) break; - _io.commit_and_wait(); - }; + total += size_t(read_bytes); + } - /* - * XXX handle READ_ERR_WOULD_BLOCK, READ_QUEUED - */ + return total; + } - if (result != Vfs::File_io_service::READ_OK) - throw Truncated_during_read(); + /* + * \deprecated use 'Byte_range_ptr' + */ + size_t read(char *dst, size_t bytes) const __attribute__((deprecated)) + { + return read(At{0}, Byte_range_ptr(dst, bytes)); + } - return (size_t)out_count; + /* + * \deprecated use 'Byte_range_ptr' + */ + size_t read(At at, char *dst, size_t bytes) const __attribute__((deprecated)) + { + return read(at, Byte_range_ptr(dst, bytes)); } /** - * Read number of 'bytes' from the start of the file into local memory - * buffer 'dst' - * - * \throw Truncated_during_read + * Read file content into byte buffer 'range' */ - size_t read(char *dst, size_t bytes) const + size_t read(Byte_range_ptr const &range) const { - return read(At{0}, dst, bytes); + return read(At{0}, range); } }; @@ -504,6 +528,8 @@ class Genode::Readonly_file : public File * Call functor 'fn' with the data pointer and size in bytes * * If the buffer has a size of zero, 'fn' is not called. + * + * \throw Truncated_during_read */ template void Genode::with_raw_file_content(Readonly_file const &file, @@ -512,19 +538,7 @@ void Genode::with_raw_file_content(Readonly_file const &file, if (range.num_bytes == 0) return; - size_t total_read = 0; - while (total_read < range.num_bytes) { - size_t read_bytes = file.read(Readonly_file::At{total_read}, - range.start + total_read, - range.num_bytes - total_read); - - if (read_bytes == 0) - break; - - total_read += read_bytes; - } - - if (total_read != range.num_bytes) + if (file.read(range) != range.num_bytes) throw File::Truncated_during_read(); fn(range.start, range.num_bytes); @@ -541,8 +555,8 @@ template void Genode::with_xml_file_content(Readonly_file const &file, Byte_range_ptr const &range, FN const &fn) { - with_raw_file_content(file, range, - [&] (char const *ptr, size_t num_bytes) { + with_raw_file_content(file, range, [&] (char const *ptr, size_t num_bytes) { + try { fn(Xml_node(ptr, num_bytes)); return; From 7ada79b5caba51b63577239100a4cb5e2cd552cf Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 28 Jan 2023 17:07:05 +0100 Subject: [PATCH 0266/1921] Don't use deprecated Readonly_file::read variants Issue #4745 --- repos/gems/include/gems/vfs_font.h | 22 +++++++++++----------- repos/gems/src/lib/vfs/import/plugin.cc | 3 ++- repos/os/src/test/vfs_capture/main.cc | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/repos/gems/include/gems/vfs_font.h b/repos/gems/include/gems/vfs_font.h index ccbac1acb7..5ee2089df3 100644 --- a/repos/gems/include/gems/vfs_font.h +++ b/repos/gems/include/gems/vfs_font.h @@ -79,23 +79,21 @@ class Genode::Vfs_font : public Text_painter::Font Area const _bounding_box; unsigned const _height; - struct Glyph_buffer + struct Glyph_buffer : Byte_range_ptr { Allocator &_alloc; - size_t const num_bytes; + Glyph_header &header { *(Glyph_header *)start }; - Glyph_header &header; + static size_t _bytes(Area size) { return sizeof(Glyph_buffer) + size.count()*4; } Glyph_buffer(Allocator &alloc, Area size) : - _alloc(alloc), num_bytes(sizeof(Glyph_header) + size.count()*4), - header(*(Glyph_header *)alloc.alloc(num_bytes)) + Byte_range_ptr((char *)alloc.alloc(_bytes(size)), _bytes(size)), + _alloc(alloc) { } - ~Glyph_buffer() { _alloc.free(&header, num_bytes); } - - char *ptr() { return (char *)&header; } + ~Glyph_buffer() { _alloc.free(start, num_bytes); } }; Glyph_buffer mutable _buffer; @@ -110,7 +108,7 @@ class Genode::Vfs_font : public Text_painter::Font try { Readonly_file const file(dir, path); char buf[MAX_LEN + 1] { }; - if (file.read(buf, sizeof(buf)) <= MAX_LEN) + if (file.read(Byte_range_ptr { buf, sizeof(buf) }) <= MAX_LEN) if (ascii_to(buf, result)) return result; } @@ -149,14 +147,16 @@ class Genode::Vfs_font : public Text_painter::Font void _apply_glyph(Codepoint c, Apply_fn const &fn) const override { - _glyphs_file.read(_file_pos(c), _buffer.ptr(), _buffer.num_bytes); + _glyphs_file.read(_file_pos(c), _buffer); fn.apply(_buffer.header.glyph()); } Advance_info advance_info(Codepoint c) const override { - _glyphs_file.read(_file_pos(c), _buffer.ptr(), sizeof(Glyph_header)); + Byte_range_ptr header_buffer { _buffer.start, sizeof(Glyph_header) }; + + _glyphs_file.read(_file_pos(c), header_buffer); Glyph const glyph = _buffer.header.glyph(); diff --git a/repos/gems/src/lib/vfs/import/plugin.cc b/repos/gems/src/lib/vfs/import/plugin.cc index 603d320471..311c18890f 100644 --- a/repos/gems/src/lib/vfs/import/plugin.cc +++ b/repos/gems/src/lib/vfs/import/plugin.cc @@ -146,7 +146,8 @@ class Vfs_import::File_system : public Vfs::File_system while (true) { - file_size bytes_from_source { src_file.read(at, buf, sizeof(buf)) }; + file_size const bytes_from_source = + src_file.read(at, Genode::Byte_range_ptr(buf, sizeof(buf))); if (!bytes_from_source) break; diff --git a/repos/os/src/test/vfs_capture/main.cc b/repos/os/src/test/vfs_capture/main.cc index fa6452f8e9..71f77be575 100644 --- a/repos/os/src/test/vfs_capture/main.cc +++ b/repos/os/src/test/vfs_capture/main.cc @@ -168,8 +168,8 @@ struct Test::Main { } Affected_rects capture() { - _capture_file.read(_capture_ds.local_addr(), - _capture_ds_size); + _capture_file.read(Byte_range_ptr(_capture_ds.local_addr(), + _capture_ds_size)); Affected_rects affected { }; affected.rects[0] = Rect(_at, _area); return affected; From 2986d46fd3950f59ed42551ca9507b447b67ec3e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 27 Jan 2023 17:33:41 +0100 Subject: [PATCH 0267/1921] fs_tool: add operation Related to issue #4744 --- repos/gems/src/app/fs_tool/main.cc | 75 ++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/repos/gems/src/app/fs_tool/main.cc b/repos/gems/src/app/fs_tool/main.cc index 83e566a620..4e82304651 100644 --- a/repos/gems/src/app/fs_tool/main.cc +++ b/repos/gems/src/app/fs_tool/main.cc @@ -21,10 +21,22 @@ namespace Fs_tool { using namespace Genode; + struct Byte_buffer; struct Main; } +struct Fs_tool::Byte_buffer : Byte_range_ptr +{ + Allocator &_alloc; + + Byte_buffer(Allocator &alloc, size_t size) + : Byte_range_ptr((char *)alloc.alloc(size), size), _alloc(alloc) { } + + ~Byte_buffer() { _alloc.free(start, num_bytes); } +}; + + struct Fs_tool::Main { Env &_env; @@ -46,9 +58,11 @@ struct Fs_tool::Main typedef Directory::Path Path; - void _remove_file(Xml_node); + void _copy_file(Path const &from, Path const &to, Byte_range_ptr const &); - void _new_file(Xml_node); + void _remove_file (Xml_node const &); + void _new_file (Xml_node const &); + void _copy_all_files (Xml_node const &); void _handle_config() { @@ -67,6 +81,9 @@ struct Fs_tool::Main if (operation.has_type("new-file")) _new_file(operation); + + if (operation.has_type("copy-all-files")) + _copy_all_files(operation); }); if (config.attribute_value("exit", false)) { @@ -83,7 +100,7 @@ struct Fs_tool::Main }; -void Fs_tool::Main::_remove_file(Xml_node operation) +void Fs_tool::Main::_remove_file(Xml_node const &operation) { Path const path = operation.attribute_value("path", Path()); @@ -108,7 +125,7 @@ void Fs_tool::Main::_remove_file(Xml_node operation) } -void Fs_tool::Main::_new_file(Xml_node operation) +void Fs_tool::Main::_new_file(Xml_node const &operation) { Path const path { operation.attribute_value("path", Path()) }; @@ -140,5 +157,55 @@ void Fs_tool::Main::_new_file(Xml_node operation) } +void Fs_tool::Main::_copy_file(Path const &from, Path const &to, + Byte_range_ptr const &buffer) +{ + try { + Readonly_file const src { _root_dir, from }; + New_file dst { _root_dir, to }; + + Readonly_file::At at { 0 }; + + for (;;) { + + size_t const read_bytes = src.read(at, buffer); + + dst.append(buffer.start, read_bytes); + + at.value += read_bytes; + + if (read_bytes < buffer.num_bytes) + break; + } + } + catch (...) { + error("failed to copy ", from, " to ", to); } +} + + +void Fs_tool::Main::_copy_all_files(Xml_node const &operation) +{ + Number_of_bytes const default_buffer { 1024*1024 }; + Byte_buffer buffer(_heap, operation.attribute_value("buffer", default_buffer)); + + Path const from = operation.attribute_value("from", Path()); + Path const to = operation.attribute_value("to", Path()); + + if (!_root_dir.directory_exists(from)) + return; + + Directory(_root_dir, from).for_each_entry([&] (Directory::Entry const &entry) { + + bool const continous_file = + (entry.type() == Vfs::Directory_service::Dirent_type::CONTINUOUS_FILE); + + if (continous_file) + _copy_file(Path(from, "/", entry.name()), + Path(to, "/", entry.name()), + buffer); + }); +} + + void Component::construct(Genode::Env &env) { static Fs_tool::Main main(env); } From 4de71549d4112ec49e056b22b319561de64996e9 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 19 Jan 2023 16:55:08 +0100 Subject: [PATCH 0268/1921] sculpt: supplement build info as boot module This allows us to reflect the information about the running image to the user. Issue #4744 --- repos/gems/run/sculpt.run | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index 0996d4abd9..d0cfcde31f 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -770,6 +770,38 @@ close $fd file copy [initial_config_file VERSION] [run_dir]/genode/VERSION +# +# Generate build info as boot module +# + +proc build_date { } { return [clock format [clock seconds] -format %Y-%m-%d] } + +proc genode_version { } { + + if {[have_installed git] && [file exists [file join [genode_dir] .git]]} { + return [exec [installed_command git] -C [genode_dir] describe \ + {--dirty= } 2> /dev/null] } + + set fh [open [file join [genode_dir] VERSION] "RDONLY"] + set version [read $fh] + close $fh + + regsub -all {\s} $version "" version + return $version +} + +set build_info "" + +set fd [open [run_dir]/genode/build_info w] +puts $fd $build_info +close $fd + + ## # Return list of 'pkg' attribute values found in 'type' nodes in an XML file # From 3355d14b652e1c0c1e58086b96f400a03eb2337d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 24 Jan 2023 15:36:26 +0100 Subject: [PATCH 0269/1921] sculpt_image.run script for creating system images Issue #4744 --- repos/gems/run/sculpt_image.run | 71 +++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 repos/gems/run/sculpt_image.run diff --git a/repos/gems/run/sculpt_image.run b/repos/gems/run/sculpt_image.run new file mode 100644 index 0000000000..0373664ff0 --- /dev/null +++ b/repos/gems/run/sculpt_image.run @@ -0,0 +1,71 @@ +# +# Generates publishable Sculpt system image +# + +proc board_supported { } { + if {[have_board pinephone]} { return true } + if {[have_board pc]} { return true } + return false +} + +if {![board_supported]} { + puts stderr "board is not supported by the run script" + exit 1 +} + +proc assert_include { include } { + if {![have_include $include]} { + puts stderr "missing run-tool argument: --include $include" + exit 1 + } +} + +proc assert_run_arg { arg_name } { + global argv + if {[lsearch $argv $arg_name] == -1} { + puts stderr "missing run-tool argument: $arg" + exit 1 + } +} + +if {[have_board pinephone]} { + assert_include image/uboot + assert_include image/pine_uboot_sdcard + assert_run_arg "--image-uboot-gzip-best" +} + +if {[have_board pc]} { + assert_include image/disk +} + +source ${genode_dir}/repos/gems/run/sculpt.run + +set image_name "sculpt-$board_var-[build_date]" +set depot_image_dir [file join [depot_dir] [depot_user] image] +set depot_image_path [file join $depot_image_dir $image_name] + +# install disk image into depot +exec mkdir -p $depot_image_dir +copy_file [run_dir].img $depot_image_path.img +puts "Disk image: $depot_image_path.img" + +# install content of boot directory into depot +exec rm -rf $depot_image_path +exec cp -r [run_dir]/boot $depot_image_path +puts "Boot directory: $depot_image_path" + +puts "" +puts "Don't forget to extend your [file join $depot_image_dir index] file" +puts "" +puts "" +puts "\t" +puts "\t\t" +puts "\t" +puts "\t..." +puts "" +puts "" +puts "Once updated, publish the image index along with the new image as follows:" +puts "" +puts " [genode_dir]/tool/depot/publish [depot_user]/image/$image_name [depot_user]/image/index" +puts "" + From 06a53abe68954f419944a94b4a010f0f773f2394 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 20 Jan 2023 10:14:43 +0100 Subject: [PATCH 0270/1921] tool/depot/publish: support system images This patch equips the publish tool to handle system images. System images reside at To publish a new version of the index: ./tool/depot/publish /image/index Each system image comes in two forms, a bootable disk image and an archive of the boot directory. The bootable disk image can be used to install a new system from scratch by copying the image directly ot a block device. It contains raw block data. The archive of the boot directory contains the content needed for an on-target system update to this version. Within the depot, this archive a directory - named after the image - that contains the designated content of the boot directory on target. Depending on the board, it may contain only a single file loaded by the boot loader (e.g., uImage), or several boot modules, or even the boot-loader configuration. To publish both forms: ./tool/depot/publish /image/ This results in the following - accompanied by their respective .sig files - in the public directory: /image/.img.gz (disk image) /image/.tar.xz (boot archive) /image/.zip (disk image) The .zip file contains the .img file. It is provided for users who download the image on a system with no support for .gz. Fixes #4735 Issue #4744 --- tool/depot/publish | 52 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/tool/depot/publish b/tool/depot/publish index 67968f7861..e111d4f941 100755 --- a/tool/depot/publish +++ b/tool/depot/publish @@ -68,9 +68,15 @@ TARGETS += $(addsuffix .tar.xz.sig,$(addprefix $(PUBLIC_DIR)/,$(ARCHIVES))) # Determine to-be-published index files from MAKECMDGOALS # +# sculpt index files at /index/ INDEX_FILES := $(foreach A,$(MAKECMDGOALS),\ $(if $(call archive_has_type,$A,index),$A,)) +# image index file at /image/index +INDEX_FILES += $(foreach A,$(MAKECMDGOALS),\ + $(if $(call archive_has_type,$A,image),\ + $(if $(filter $(call path_element,3,$A),index),$A,),)) + INDEX_FILES_MISSING := $(sort $(foreach I, $(INDEX_FILES),\ $(if $(wildcard $(DEPOT_DIR)/$I),,$I))) @@ -84,6 +90,31 @@ index_missing_error: @echo "Error: missing depot content: $(INDEX_FILES_MISSING)"; false +# +# Determine to-be-published system images from MAKECMDGOALS +# + +# system images at /image/ (consider all names other than 'index') +SYSTEM_IMAGES := $(foreach A,$(MAKECMDGOALS),\ + $(if $(call archive_has_type,$A,image),\ + $(if $(filter $(call path_element,3,$A),index),,$A),)) + +SYSTEM_IMAGES_MISSING := $(sort $(foreach I, $(SYSTEM_IMAGES),\ + $(if $(wildcard $(DEPOT_DIR)/$I),,$I) \ + $(if $(wildcard $(DEPOT_DIR)/$I.img),,$I.img))) + +ifneq ($(SYSTEM_IMAGES_MISSING),) +$(MAKECMDGOALS): system_images_missing_error +else +TARGETS += $(addsuffix .tar.xz.sig,$(addprefix $(PUBLIC_DIR)/,$(SYSTEM_IMAGES))) +TARGETS += $(addsuffix .img.xz.sig,$(addprefix $(PUBLIC_DIR)/,$(SYSTEM_IMAGES))) +TARGETS += $(addsuffix .zip.sig, $(addprefix $(PUBLIC_DIR)/,$(SYSTEM_IMAGES))) +endif + +system_images_missing_error: + @echo "Error: missing depot content: $(SYSTEM_IMAGES_MISSING)"; false + + # # Generate compressed and signed archives and index files # @@ -95,12 +126,17 @@ MISSING_PUBKEY_FILES := $(sort \ $(if $(call pubkey_path,$A),,\ $(call pubkey_filename,$A)))) -$(PUBLIC_DIR)/%.xz.sig : $(PUBLIC_DIR)/%.xz - $(VERBOSE)$(GPG) --detach-sign --digest-algo SHA256 --no-tty --use-agent \ - --local-user $(call pubkey_id,$*) - < $< > $@ || \ - ( rm -f $@; false ) +_gpg_sign_target = gpg --detach-sign --digest-algo SHA256 --no-tty --use-agent \ + --local-user $(call pubkey_id,$*) - < $< > $@ || \ + ( rm -f $@; false ) -.PRECIOUS: $(TARGETS:.xz.sig=.xz) +$(PUBLIC_DIR)/%.xz.sig : $(PUBLIC_DIR)/%.xz + $(VERBOSE)$(_gpg_sign_target) + +$(PUBLIC_DIR)/%.zip.sig : $(PUBLIC_DIR)/%.zip + $(VERBOSE)$(_gpg_sign_target) + +.PRECIOUS: $(TARGETS:.xz.sig=.xz) $(TARGETS:.zip.sig=.zip) # archive $(PUBLIC_DIR)/%.tar.xz: $(DEPOT_DIR)/% @@ -115,6 +151,12 @@ $(PUBLIC_DIR)/%.xz: $(DEPOT_DIR)/% $(VERBOSE)test -e $(dir $@) || mkdir -p $(dir $@) $(VERBOSE)xz --threads=$(XZ_THREADS) <$< >$@ +# ZIP archive of system image +$(PUBLIC_DIR)/%.zip: $(DEPOT_DIR)/%.img + @$(ECHO) "$(DARK_COL)publish$(DEFAULT_COL) $@" + $(VERBOSE)test -e $(dir $@) || mkdir -p $(dir $@) + $(VERBOSE)zip -jq $@ $< + ifneq ($(MISSING_PUBKEY_FILES),) $(MAKECMDGOALS) $(TARGETS): missing_pubkey_files endif From 866e84ec491042883fdab247dd0f5a38bd56b7cf Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 25 Jan 2023 13:59:56 +0100 Subject: [PATCH 0271/1921] depot_query: supplement url to scanned user The 'scan' query for depot users used to list the names of depot users. However, the URL and existence of a pubkey is useful to know when assembling a GUI menu from this list. Issue #4744 --- repos/gems/src/app/depot_query/main.cc | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/repos/gems/src/app/depot_query/main.cc b/repos/gems/src/app/depot_query/main.cc index c1455eed2a..4a6b07544b 100644 --- a/repos/gems/src/app/depot_query/main.cc +++ b/repos/gems/src/app/depot_query/main.cc @@ -235,6 +235,8 @@ class Depot_query::Dependencies struct Depot_query::Main { + using Url = String<256>; + Env &_env; Heap _heap { _env.ram(), _env.rm() }; @@ -331,6 +333,7 @@ struct Depot_query::Main void _query_blueprint(Directory::Path const &, Xml_generator &); void _collect_source_dependencies(Archive::Path const &, Dependencies &, Recursion_limit); void _collect_binary_dependencies(Archive::Path const &, Dependencies &, Recursion_limit); + void _scan_user(Archive::User const &, Xml_generator &); void _query_user(Archive::User const &, Xml_generator &); void _gen_index_node_rec(Xml_generator &, Xml_node const &, unsigned) const; void _gen_index_for_arch(Xml_generator &, Xml_node const &) const; @@ -402,8 +405,7 @@ struct Depot_query::Main query.for_each_sub_node("scan", [&] (Xml_node node) { if (node.attribute_value("users", false)) { for_each_subdir_name(_heap, _depot_dir, [&] (auto name) { - xml.node("user", [&] () { - xml.attribute("name", name); }); }); } }); }); + _scan_user(name, xml); }); } }); }); _gen_versioned_report(_blueprint_reporter, version, [&] (Xml_generator &xml) { query.for_each_sub_node("blueprint", [&] (Xml_node node) { @@ -690,6 +692,24 @@ void Depot_query::Main::_collect_binary_dependencies(Archive::Path const &path, } +void Depot_query::Main::_scan_user(Archive::User const &user, Xml_generator &xml) +{ + xml.node("user", [&] () { + + Directory user_dir(_root, Directory::Path("depot/", user)); + + xml.attribute("name", user); + xml.attribute("known_pubkey", user_dir.file_exists("pubkey") ? "yes" : "no"); + + if (user_dir.file_exists("download")) { + File_content download(_heap, user_dir, "download", File_content::Limit{4*1024}); + download.for_each_line([&] (Url const &url) { + xml.node("url", [&] () { xml.append_sanitized(url.string()); }); }); + } + }); +} + + void Depot_query::Main::_query_user(Archive::User const &user, Xml_generator &xml) { xml.attribute("name", user); From b3bcab6c13366213af6ea9f39f2366163877c0b2 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 26 Jan 2023 13:15:56 +0100 Subject: [PATCH 0272/1921] depot_query: split main.h from main.cc This will allow for the implementation of 'Main' methods in .cc files. Issue #4744 --- repos/gems/src/app/depot_query/main.cc | 450 +--------------------- repos/gems/src/app/depot_query/main.h | 465 +++++++++++++++++++++++ repos/gems/src/app/depot_query/target.mk | 2 +- 3 files changed, 468 insertions(+), 449 deletions(-) create mode 100644 repos/gems/src/app/depot_query/main.h diff --git a/repos/gems/src/app/depot_query/main.cc b/repos/gems/src/app/depot_query/main.cc index 4a6b07544b..13b94ecccf 100644 --- a/repos/gems/src/app/depot_query/main.cc +++ b/repos/gems/src/app/depot_query/main.cc @@ -11,453 +11,8 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include -#include -#include -#include -#include -#include -#include - -/* fs_query includes */ -#include - -namespace Depot_query { - - using namespace Depot; - - typedef String<64> Rom_label; - - struct Directory_cache; - struct Recursion_limit; - struct Dependencies; - struct Main; -} - - -struct Depot_query::Directory_cache : Noncopyable -{ - Allocator &_alloc; - - using Name = Directory::Entry::Name; - - struct Listing; - using Listings = Dictionary; - - struct Listing : Listings::Element - { - Allocator &_alloc; - - struct File; - using Files = Dictionary; - - struct File : Files::Element - { - File(Files &files, Name const &name) : Files::Element(files, name) { } - }; - - Files _files { }; - - Listing(Listings &listings, Allocator &alloc, Directory &dir, - Directory::Path const &path) - : - Listings::Element(listings, path), _alloc(alloc) - { - try { - Directory(dir, path).for_each_entry([&] (Directory::Entry const &entry) { - new (_alloc) File(_files, entry.name()); }); - } - catch (Directory::Nonexistent_directory) { - warning("directory '", path, "' does not exist"); - } - } - - ~Listing() - { - auto destroy_fn = [&] (File &f) { destroy(_alloc, &f); }; - - while (_files.with_any_element(destroy_fn)); - } - - bool file_exists(Name const &name) const { return _files.exists(name); } - }; - - Listings mutable _listings { }; - - Directory_cache(Allocator &alloc) : _alloc(alloc) { } - - ~Directory_cache() - { - auto destroy_fn = [&] (Listing &l) { destroy(_alloc, &l); }; - - while (_listings.with_any_element(destroy_fn)); - } - - bool file_exists(Directory &dir, Directory::Path const &path, Name const &name) const - { - bool listing_known = false; - - bool const result = - _listings.with_element(path, - [&] /* match */ (Listing const &listing) { - listing_known = true; - return listing.file_exists(name); - }, - [&] /* no_match */ { return false; }); - - if (listing_known) - return result; - - Listing &new_listing = *new (_alloc) Listing(_listings, _alloc, dir, path); - - return new_listing.file_exists(name); - } -}; - - -class Depot_query::Recursion_limit : Noncopyable -{ - public: - - class Reached : Exception { }; - - private: - - unsigned const _value; - - static unsigned _checked_decr(unsigned value) - { - if (value == 0) - throw Reached(); - - return value - 1; - } - - public: - - /** - * Constructor - */ - explicit Recursion_limit(unsigned value) : _value(value) { } - - /** - * Copy constructor - * - * \throw Recursion_limit::Reached - */ - Recursion_limit(Recursion_limit const &other) - : Noncopyable(), _value(_checked_decr(other._value)) { } -}; - - -/** - * Collection of dependencies - * - * This data structure keeps track of a list of archive paths along with the - * information of whether or not the archive is present in the depot. It also - * ensures that all entries are unique. - */ -class Depot_query::Dependencies -{ - private: - - struct Collection : Noncopyable - { - Allocator &_alloc; - - typedef Registered_no_delete Entry; - - Registry _entries { }; - - Collection(Allocator &alloc) : _alloc(alloc) { } - - ~Collection() - { - _entries.for_each([&] (Entry &e) { destroy(_alloc, &e); }); - } - - bool known(Archive::Path const &path) const - { - bool result = false; - _entries.for_each([&] (Entry const &entry) { - if (path == entry) - result = true; }); - - return result; - } - - void insert(Archive::Path const &path) - { - if (!known(path)) - new (_alloc) Entry(_entries, path); - } - - template - void for_each(FN const &fn) const { _entries.for_each(fn); }; - }; - - Directory const &_depot; - - Collection _present; - Collection _missing; - - public: - - Dependencies(Allocator &alloc, Directory const &depot) - : - _depot(depot), _present(alloc), _missing(alloc) - { } - - bool known(Archive::Path const &path) const - { - return _present.known(path) || _missing.known(path); - } - - void record(Archive::Path const &path) - { - if (_depot.directory_exists(path)) - _present.insert(path); - else - _missing.insert(path); - } - - void xml(Xml_generator &xml) const - { - _present.for_each([&] (Archive::Path const &path) { - xml.node("present", [&] () { xml.attribute("path", path); }); }); - - _missing.for_each([&] (Archive::Path const &path) { - xml.node("missing", [&] () { xml.attribute("path", path); }); }); - } -}; - - -struct Depot_query::Main -{ - using Url = String<256>; - - Env &_env; - - Heap _heap { _env.ram(), _env.rm() }; - - Attached_rom_dataspace _config { _env, "config" }; - - Constructible _query_rom { }; - - Root_directory _root { _env, _heap, _config.xml().sub_node("vfs") }; - - Directory _depot_dir { _root, "depot" }; - - Constructible _directory_cache { }; - - Signal_handler
_config_handler { - _env.ep(), *this, &Main::_handle_config }; - - Signal_handler
_query_handler { - _env.ep(), *this, &Main::_handle_config }; - - typedef Constructible Constructible_reporter; - - Constructible_reporter _scan_reporter { }; - Constructible_reporter _blueprint_reporter { }; - Constructible_reporter _dependencies_reporter { }; - Constructible_reporter _user_reporter { }; - Constructible_reporter _index_reporter { }; - - template - static void _construct_if(bool condition, Constructible &obj, ARGS &&... args) - { - if (condition && !obj.constructed()) - obj.construct(args...); - - if (!condition && obj.constructed()) - obj.destruct(); - } - - typedef String<16> Architecture; - typedef String<32> Version; - - Architecture _architecture { }; - - bool _file_exists(Directory::Path const &path, Rom_label const &file_name) - { - if (!_directory_cache.constructed()) { - error("directory cache is unexpectedly not constructed"); - return false; - } - - return _directory_cache->file_exists(_depot_dir, path, file_name); - } - - template - void _with_file_content(Directory::Path const &path, char const *name, FN const &fn) - { - try { - File_content const content(_heap, Directory(_depot_dir, path), - name, File_content::Limit{16*1024}); - fn(content); - } - catch (File_content::Nonexistent_file) { } - catch (Directory::Nonexistent_directory) { } - catch (File::Truncated_during_read) { } - } - - /** - * Produce report that reflects the query version - * - * The functor 'fn' is called with an 'Xml_generator &' as argument to - * produce the report content. - */ - template - void _gen_versioned_report(Constructible_reporter &reporter, Version const &version, - FN const &fn) - { - if (!reporter.constructed()) - return; - - reporter->generate([&] (Xml_generator &xml) { - - if (version.valid()) - xml.attribute("version", version); - - fn(xml); - }); - } - - Archive::Path _find_rom_in_pkg(File_content const &, Rom_label const &, Recursion_limit); - void _gen_rom_path_nodes(Xml_generator &, Xml_node const &, - Archive::Path const &, Xml_node const &); - void _gen_inherited_rom_path_nodes(Xml_generator &, Xml_node const &, - Archive::Path const &, Recursion_limit); - void _query_blueprint(Directory::Path const &, Xml_generator &); - void _collect_source_dependencies(Archive::Path const &, Dependencies &, Recursion_limit); - void _collect_binary_dependencies(Archive::Path const &, Dependencies &, Recursion_limit); - void _scan_user(Archive::User const &, Xml_generator &); - void _query_user(Archive::User const &, Xml_generator &); - void _gen_index_node_rec(Xml_generator &, Xml_node const &, unsigned) const; - void _gen_index_for_arch(Xml_generator &, Xml_node const &) const; - void _query_index(Archive::User const &, Archive::Version const &, bool, Xml_generator &); - - void _handle_config() - { - _config.update(); - - Xml_node const config = _config.xml(); - - _directory_cache.construct(_heap); - - /* - * Depending of the 'query' config attribute, we obtain the query - * information from a separate ROM session (attribute value "rom") - * or from the depot_querty ''. - */ - bool const query_from_rom = - (config.attribute_value("query", String<5>()) == "rom"); - - if (query_from_rom && !_query_rom.constructed()) { - _query_rom.construct(_env, "query"); - _query_rom->sigh(_query_handler); - } - - if (!query_from_rom && _query_rom.constructed()) - _query_rom.destruct(); - - if (query_from_rom) - _query_rom->update(); - - Xml_node const query = (query_from_rom ? _query_rom->xml() : config); - - _construct_if(query.has_sub_node("scan"), - _scan_reporter, _env, "scan", "scan"); - - /* - * Use 64 KiB as initial report size to avoid the repetitive querying - * when successively expanding the reporter. - */ - _construct_if(query.has_sub_node("blueprint"), - _blueprint_reporter, _env, "blueprint", "blueprint", - Expanding_reporter::Initial_buffer_size { 64*1024 }); - - _construct_if(query.has_sub_node("dependencies"), - _dependencies_reporter, _env, "dependencies", "dependencies"); - - _construct_if(query.has_sub_node("user"), - _user_reporter, _env, "user", "user"); - - _construct_if(query.has_sub_node("index"), - _index_reporter, _env, "index", "index"); - - _root.apply_config(config.sub_node("vfs")); - - /* ignore incomplete queries that may occur at the startup */ - if (query.has_type("empty")) - return; - - if (!query.has_attribute("arch")) - warning("query lacks 'arch' attribute"); - - _architecture = query.attribute_value("arch", Architecture()); - - Version const version = query.attribute_value("version", Version()); - - _gen_versioned_report(_scan_reporter, version, [&] (Xml_generator &xml) { - query.for_each_sub_node("scan", [&] (Xml_node node) { - if (node.attribute_value("users", false)) { - for_each_subdir_name(_heap, _depot_dir, [&] (auto name) { - _scan_user(name, xml); }); } }); }); - - _gen_versioned_report(_blueprint_reporter, version, [&] (Xml_generator &xml) { - query.for_each_sub_node("blueprint", [&] (Xml_node node) { - Archive::Path pkg = node.attribute_value("pkg", Archive::Path()); - try { _query_blueprint(pkg, xml); } - catch (Xml_generator::Buffer_exceeded) { - throw; /* handled by 'generate' */ } - catch (...) { - xml.node("missing", [&] () { - xml.attribute("path", pkg); }); } - }); - }); - - _gen_versioned_report(_dependencies_reporter, version, [&] (Xml_generator &xml) { - Dependencies dependencies(_heap, _depot_dir); - query.for_each_sub_node("dependencies", [&] (Xml_node node) { - - Archive::Path const path = node.attribute_value("path", Archive::Path()); - - if (node.attribute_value("source", false)) - _collect_source_dependencies(path, dependencies, Recursion_limit{8}); - - if (node.attribute_value("binary", false)) - _collect_binary_dependencies(path, dependencies, Recursion_limit{8}); - }); - dependencies.xml(xml); - }); - - _gen_versioned_report(_user_reporter, version, [&] (Xml_generator &xml) { - - /* query one user only */ - bool first = true; - query.for_each_sub_node("user", [&] (Xml_node node) { - if (!first) return; - first = false; - _query_user(node.attribute_value("name", Archive::User()), xml); }); - }); - - _gen_versioned_report(_index_reporter, version, [&] (Xml_generator &xml) { - query.for_each_sub_node("index", [&] (Xml_node node) { - _query_index(node.attribute_value("user", Archive::User()), - node.attribute_value("version", Archive::Version()), - node.attribute_value("content", false), - xml); }); }); - } - - Main(Env &env) : _env(env) - { - _config.sigh(_config_handler); - _handle_config(); - } -}; +/* local includes */ +#include Depot_query::Archive::Path @@ -826,4 +381,3 @@ void Component::construct(Genode::Env &env) { static Depot_query::Main main(env); } - diff --git a/repos/gems/src/app/depot_query/main.h b/repos/gems/src/app/depot_query/main.h new file mode 100644 index 0000000000..c033192725 --- /dev/null +++ b/repos/gems/src/app/depot_query/main.h @@ -0,0 +1,465 @@ +/* + * \brief Tool for querying subsystem information from a depot + * \author Norman Feske + * \date 2017-07-04 + */ + +/* + * Copyright (C) 2017 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _MAIN_H_ +#define _MAIN_H_ + +/* Genode includes */ +#include +#include +#include +#include +#include +#include +#include + +/* fs_query includes */ +#include + +namespace Depot_query { + + using namespace Depot; + + typedef String<64> Rom_label; + + struct Directory_cache; + struct Recursion_limit; + struct Dependencies; + struct Main; +} + + +struct Depot_query::Directory_cache : Noncopyable +{ + Allocator &_alloc; + + using Name = Directory::Entry::Name; + + struct Listing; + using Listings = Dictionary; + + struct Listing : Listings::Element + { + Allocator &_alloc; + + struct File; + using Files = Dictionary; + + struct File : Files::Element + { + File(Files &files, Name const &name) : Files::Element(files, name) { } + }; + + Files _files { }; + + Listing(Listings &listings, Allocator &alloc, Directory &dir, + Directory::Path const &path) + : + Listings::Element(listings, path), _alloc(alloc) + { + try { + Directory(dir, path).for_each_entry([&] (Directory::Entry const &entry) { + new (_alloc) File(_files, entry.name()); }); + } + catch (Directory::Nonexistent_directory) { + warning("directory '", path, "' does not exist"); + } + } + + ~Listing() + { + auto destroy_fn = [&] (File &f) { destroy(_alloc, &f); }; + + while (_files.with_any_element(destroy_fn)); + } + + bool file_exists(Name const &name) const { return _files.exists(name); } + }; + + Listings mutable _listings { }; + + Directory_cache(Allocator &alloc) : _alloc(alloc) { } + + ~Directory_cache() + { + auto destroy_fn = [&] (Listing &l) { destroy(_alloc, &l); }; + + while (_listings.with_any_element(destroy_fn)); + } + + bool file_exists(Directory &dir, Directory::Path const &path, Name const &name) const + { + bool listing_known = false; + + bool const result = + _listings.with_element(path, + [&] /* match */ (Listing const &listing) { + listing_known = true; + return listing.file_exists(name); + }, + [&] /* no_match */ { return false; }); + + if (listing_known) + return result; + + Listing &new_listing = *new (_alloc) Listing(_listings, _alloc, dir, path); + + return new_listing.file_exists(name); + } +}; + + +class Depot_query::Recursion_limit : Noncopyable +{ + public: + + class Reached : Exception { }; + + private: + + unsigned const _value; + + static unsigned _checked_decr(unsigned value) + { + if (value == 0) + throw Reached(); + + return value - 1; + } + + public: + + /** + * Constructor + */ + explicit Recursion_limit(unsigned value) : _value(value) { } + + /** + * Copy constructor + * + * \throw Recursion_limit::Reached + */ + Recursion_limit(Recursion_limit const &other) + : Noncopyable(), _value(_checked_decr(other._value)) { } +}; + + +/** + * Collection of dependencies + * + * This data structure keeps track of a list of archive paths along with the + * information of whether or not the archive is present in the depot. It also + * ensures that all entries are unique. + */ +class Depot_query::Dependencies +{ + private: + + struct Collection : Noncopyable + { + Allocator &_alloc; + + typedef Registered_no_delete Entry; + + Registry _entries { }; + + Collection(Allocator &alloc) : _alloc(alloc) { } + + ~Collection() + { + _entries.for_each([&] (Entry &e) { destroy(_alloc, &e); }); + } + + bool known(Archive::Path const &path) const + { + bool result = false; + _entries.for_each([&] (Entry const &entry) { + if (path == entry) + result = true; }); + + return result; + } + + void insert(Archive::Path const &path) + { + if (!known(path)) + new (_alloc) Entry(_entries, path); + } + + template + void for_each(FN const &fn) const { _entries.for_each(fn); }; + }; + + Directory const &_depot; + + Collection _present; + Collection _missing; + + public: + + Dependencies(Allocator &alloc, Directory const &depot) + : + _depot(depot), _present(alloc), _missing(alloc) + { } + + bool known(Archive::Path const &path) const + { + return _present.known(path) || _missing.known(path); + } + + void record(Archive::Path const &path) + { + if (_depot.directory_exists(path)) + _present.insert(path); + else + _missing.insert(path); + } + + void xml(Xml_generator &xml) const + { + _present.for_each([&] (Archive::Path const &path) { + xml.node("present", [&] () { xml.attribute("path", path); }); }); + + _missing.for_each([&] (Archive::Path const &path) { + xml.node("missing", [&] () { xml.attribute("path", path); }); }); + } +}; + + +struct Depot_query::Main +{ + using Url = String<256>; + + Env &_env; + + Heap _heap { _env.ram(), _env.rm() }; + + Attached_rom_dataspace _config { _env, "config" }; + + Constructible _query_rom { }; + + Root_directory _root { _env, _heap, _config.xml().sub_node("vfs") }; + + Directory _depot_dir { _root, "depot" }; + + Constructible _directory_cache { }; + + Signal_handler
_config_handler { + _env.ep(), *this, &Main::_handle_config }; + + Signal_handler
_query_handler { + _env.ep(), *this, &Main::_handle_config }; + + typedef Constructible Constructible_reporter; + + Constructible_reporter _scan_reporter { }; + Constructible_reporter _blueprint_reporter { }; + Constructible_reporter _dependencies_reporter { }; + Constructible_reporter _user_reporter { }; + Constructible_reporter _index_reporter { }; + + template + static void _construct_if(bool condition, Constructible &obj, ARGS &&... args) + { + if (condition && !obj.constructed()) + obj.construct(args...); + + if (!condition && obj.constructed()) + obj.destruct(); + } + + typedef String<16> Architecture; + typedef String<32> Version; + + Architecture _architecture { }; + + bool _file_exists(Directory::Path const &path, Rom_label const &file_name) + { + if (!_directory_cache.constructed()) { + error("directory cache is unexpectedly not constructed"); + return false; + } + + return _directory_cache->file_exists(_depot_dir, path, file_name); + } + + template + void _with_file_content(Directory::Path const &path, char const *name, FN const &fn) + { + try { + File_content const content(_heap, Directory(_depot_dir, path), + name, File_content::Limit{16*1024}); + fn(content); + } + catch (File_content::Nonexistent_file) { } + catch (Directory::Nonexistent_directory) { } + catch (File::Truncated_during_read) { } + } + + /** + * Produce report that reflects the query version + * + * The functor 'fn' is called with an 'Xml_generator &' as argument to + * produce the report content. + */ + template + void _gen_versioned_report(Constructible_reporter &reporter, Version const &version, + FN const &fn) + { + if (!reporter.constructed()) + return; + + reporter->generate([&] (Xml_generator &xml) { + + if (version.valid()) + xml.attribute("version", version); + + fn(xml); + }); + } + + Archive::Path _find_rom_in_pkg(File_content const &, Rom_label const &, Recursion_limit); + void _gen_rom_path_nodes(Xml_generator &, Xml_node const &, + Archive::Path const &, Xml_node const &); + void _gen_inherited_rom_path_nodes(Xml_generator &, Xml_node const &, + Archive::Path const &, Recursion_limit); + void _query_blueprint(Directory::Path const &, Xml_generator &); + void _collect_source_dependencies(Archive::Path const &, Dependencies &, Recursion_limit); + void _collect_binary_dependencies(Archive::Path const &, Dependencies &, Recursion_limit); + void _scan_user(Archive::User const &, Xml_generator &); + void _query_user(Archive::User const &, Xml_generator &); + void _gen_index_node_rec(Xml_generator &, Xml_node const &, unsigned) const; + void _gen_index_for_arch(Xml_generator &, Xml_node const &) const; + void _query_index(Archive::User const &, Archive::Version const &, bool, Xml_generator &); + + void _handle_config() + { + _config.update(); + + Xml_node const config = _config.xml(); + + _directory_cache.construct(_heap); + + /* + * Depending of the 'query' config attribute, we obtain the query + * information from a separate ROM session (attribute value "rom") + * or from the depot_querty ''. + */ + bool const query_from_rom = + (config.attribute_value("query", String<5>()) == "rom"); + + if (query_from_rom && !_query_rom.constructed()) { + _query_rom.construct(_env, "query"); + _query_rom->sigh(_query_handler); + } + + if (!query_from_rom && _query_rom.constructed()) + _query_rom.destruct(); + + if (query_from_rom) + _query_rom->update(); + + Xml_node const query = (query_from_rom ? _query_rom->xml() : config); + + _construct_if(query.has_sub_node("scan"), + _scan_reporter, _env, "scan", "scan"); + + /* + * Use 64 KiB as initial report size to avoid the repetitive querying + * when successively expanding the reporter. + */ + _construct_if(query.has_sub_node("blueprint"), + _blueprint_reporter, _env, "blueprint", "blueprint", + Expanding_reporter::Initial_buffer_size { 64*1024 }); + + _construct_if(query.has_sub_node("dependencies"), + _dependencies_reporter, _env, "dependencies", "dependencies"); + + _construct_if(query.has_sub_node("user"), + _user_reporter, _env, "user", "user"); + + _construct_if(query.has_sub_node("index"), + _index_reporter, _env, "index", "index"); + + _root.apply_config(config.sub_node("vfs")); + + /* ignore incomplete queries that may occur at the startup */ + if (query.has_type("empty")) + return; + + if (!query.has_attribute("arch")) + warning("query lacks 'arch' attribute"); + + _architecture = query.attribute_value("arch", Architecture()); + + Version const version = query.attribute_value("version", Version()); + + _gen_versioned_report(_scan_reporter, version, [&] (Xml_generator &xml) { + query.for_each_sub_node("scan", [&] (Xml_node node) { + if (node.attribute_value("users", false)) { + for_each_subdir_name(_heap, _depot_dir, [&] (auto name) { + _scan_user(name, xml); }); } }); }); + + _gen_versioned_report(_blueprint_reporter, version, [&] (Xml_generator &xml) { + query.for_each_sub_node("blueprint", [&] (Xml_node node) { + Archive::Path pkg = node.attribute_value("pkg", Archive::Path()); + try { _query_blueprint(pkg, xml); } + catch (Xml_generator::Buffer_exceeded) { + throw; /* handled by 'generate' */ } + catch (...) { + xml.node("missing", [&] () { + xml.attribute("path", pkg); }); } + }); + }); + + _gen_versioned_report(_dependencies_reporter, version, [&] (Xml_generator &xml) { + Dependencies dependencies(_heap, _depot_dir); + query.for_each_sub_node("dependencies", [&] (Xml_node node) { + + Archive::Path const path = node.attribute_value("path", Archive::Path()); + + if (node.attribute_value("source", false)) + _collect_source_dependencies(path, dependencies, Recursion_limit{8}); + + if (node.attribute_value("binary", false)) + _collect_binary_dependencies(path, dependencies, Recursion_limit{8}); + }); + dependencies.xml(xml); + }); + + _gen_versioned_report(_user_reporter, version, [&] (Xml_generator &xml) { + + /* query one user only */ + bool first = true; + query.for_each_sub_node("user", [&] (Xml_node node) { + if (!first) return; + first = false; + _query_user(node.attribute_value("name", Archive::User()), xml); }); + }); + + _gen_versioned_report(_index_reporter, version, [&] (Xml_generator &xml) { + query.for_each_sub_node("index", [&] (Xml_node node) { + _query_index(node.attribute_value("user", Archive::User()), + node.attribute_value("version", Archive::Version()), + node.attribute_value("content", false), + xml); }); }); + } + + Main(Env &env) : _env(env) + { + _config.sigh(_config_handler); + _handle_config(); + } +}; + +#endif /* _MAIN_H_ */ diff --git a/repos/gems/src/app/depot_query/target.mk b/repos/gems/src/app/depot_query/target.mk index 6ad450b03d..9052515dd7 100644 --- a/repos/gems/src/app/depot_query/target.mk +++ b/repos/gems/src/app/depot_query/target.mk @@ -1,4 +1,4 @@ TARGET := depot_query SRC_CC := main.cc LIBS += base vfs -INC_DIR += $(REP_DIR)/src/app/fs_query +INC_DIR += $(REP_DIR)/src/app/fs_query $(PRG_DIR) From 677c8e828cb3d3924d2363d4c061855c050f12e3 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 23 Jan 2023 16:42:46 +0100 Subject: [PATCH 0273/1921] depot_download,depot_query: support system images This patch enhances the depot_download subsystem with support for downloading and querying system images. The installation ROM support the following two now download types: Internally, the depot-download subsystem employs the depot-query component to determine the missing depot content. This component accepts the following two new queries: If present in the query, depot_query generates reports labeled as "images" and "image_index" respectively. The also tracks the completion of each job depending on the depot- query results, so that the final report contains a result for each installation item requested. Prior this patch, the inactivity of the depot-download manager (indicated by an empty state report) was interpreted as success. But that prevents the proper association of results and requested installation items. Issue #4744 --- repos/gems/include/depot/archive.h | 32 +++- .../raw/depot_download/depot_download.config | 6 + .../depot_download_manager/gen_depot_query.cc | 47 +++-- .../app/depot_download_manager/gen_extract.cc | 3 + .../src/app/depot_download_manager/import.h | 87 +++++++-- .../gems/src/app/depot_download_manager/job.h | 1 + .../src/app/depot_download_manager/main.cc | 58 ++++-- repos/gems/src/app/depot_query/main.cc | 21 +++ repos/gems/src/app/depot_query/main.h | 35 +++- .../src/app/depot_query/query_image_index.cc | 171 ++++++++++++++++++ repos/gems/src/app/depot_query/target.mk | 2 +- 11 files changed, 397 insertions(+), 66 deletions(-) create mode 100644 repos/gems/src/app/depot_query/query_image_index.cc diff --git a/repos/gems/include/depot/archive.h b/repos/gems/include/depot/archive.h index f25fcd0fe9..e3ded7b67e 100644 --- a/repos/gems/include/depot/archive.h +++ b/repos/gems/include/depot/archive.h @@ -30,7 +30,7 @@ struct Depot::Archive typedef String<80> Name; typedef String<40> Version; - enum Type { PKG, RAW, SRC }; + enum Type { PKG, RAW, SRC, IMAGE }; struct Unknown_archive_type : Exception { }; @@ -81,9 +81,10 @@ struct Depot::Archive typedef String<8> Name; Name const name = _path_element(path, 1); - if (name == "src") return SRC; - if (name == "pkg") return PKG; - if (name == "raw") return RAW; + if (name == "src") return SRC; + if (name == "pkg") return PKG; + if (name == "raw") return RAW; + if (name == "image") return IMAGE; throw Unknown_archive_type(); } @@ -96,7 +97,23 @@ struct Depot::Archive return _path_element(path, 1) == "index"; } - static Name name (Path const &path) { return _path_element(path, 2); } + /** + * Return true if 'path' refers to a system-image index file + */ + static bool image_index(Path const &path) + { + return _path_element(path, 1) == "image" && name(path) == "index"; + } + + /** + * Return true if 'path' refers to a system image + */ + static bool image(Path const &path) + { + return _path_element(path, 1) == "image" && name(path) != "index"; + } + + static Name name (Path const &path) { return _path_element (path, 2); } static Version version (Path const &path) { return _path_element(path, 3); } static Version index_version(Path const &path) { return _path_element(path, 2); } @@ -108,10 +125,9 @@ struct Depot::Archive */ static Archive::Path download_file_path(Archive::Path path) { - return Archive::index(path) ? Archive::Path(path, ".xz") - : Archive::Path(path, ".tar.xz"); + return (index(path) || image_index(path)) ? Path(path, ".xz") + : Path(path, ".tar.xz"); } - }; #endif /* _INCLUDE__DEPOT__ARCHIVE_H_ */ diff --git a/repos/gems/recipes/raw/depot_download/depot_download.config b/repos/gems/recipes/raw/depot_download/depot_download.config index 1d23799204..ab99cbe0b7 100644 --- a/repos/gems/recipes/raw/depot_download/depot_download.config +++ b/repos/gems/recipes/raw/depot_download/depot_download.config @@ -28,6 +28,10 @@ report="dynamic -> depot_query -> dependencies"/> + + + + diff --git a/repos/gems/src/app/depot_download_manager/gen_depot_query.cc b/repos/gems/src/app/depot_download_manager/gen_depot_query.cc index efe7e56b16..00469e1882 100644 --- a/repos/gems/src/app/depot_download_manager/gen_depot_query.cc +++ b/repos/gems/src/app/depot_download_manager/gen_depot_query.cc @@ -51,11 +51,14 @@ void Depot_download_manager::gen_depot_query_start_content(Xml_generator &xml, return failed; }; - installation.for_each_sub_node("archive", [&] (Xml_node archive) { - - if (job_failed(archive)) - return; + auto for_each_install_sub_node = [&] (auto node_type, auto const &fn) + { + installation.for_each_sub_node(node_type, [&] (Xml_node node) { + if (!job_failed(node)) + fn(node); }); + }; + for_each_install_sub_node("archive", [&] (Xml_node const &archive) { xml.node("dependencies", [&] () { xml.attribute("path", archive.attribute_value("path", Archive::Path())); xml.attribute("source", archive.attribute_value("source", true)); @@ -63,22 +66,40 @@ void Depot_download_manager::gen_depot_query_start_content(Xml_generator &xml, }); }); - installation.for_each_sub_node("index", [&] (Xml_node index) { - - if (job_failed(index)) + for_each_install_sub_node("index", [&] (Xml_node const &index) { + Archive::Path const path = index.attribute_value("path", Archive::Path()); + if (!Archive::index(path)) { + warning("malformed index path '", path, "'"); return; - + } xml.node("index", [&] () { - Archive::Path const path = index.attribute_value("path", Archive::Path()); - if (!Archive::index(path)) { - warning("malformed index path '", path, "'"); - return; - } xml.attribute("user", Archive::user(path)); xml.attribute("version", Archive::_path_element(path, 2)); }); }); + for_each_install_sub_node("image", [&] (Xml_node const &image) { + Archive::Path const path = image.attribute_value("path", Archive::Path()); + if (!Archive::image(path)) { + warning("malformed image path '", path, "'"); + return; + } + xml.node("image", [&] () { + xml.attribute("user", Archive::user(path)); + xml.attribute("name", Archive::name(path)); + }); + }); + + for_each_install_sub_node("image_index", [&] (Xml_node const &image_index) { + Archive::Path const path = image_index.attribute_value("path", Archive::Path()); + if (!Archive::index(path) && Archive::name(path) != "index") { + warning("malformed image-index path '", path, "'"); + return; + } + xml.node("image_index", [&] () { + xml.attribute("user", Archive::user(path)); }); + }); + if (next_user.valid()) xml.node("user", [&] () { xml.attribute("name", next_user); }); }); diff --git a/repos/gems/src/app/depot_download_manager/gen_extract.cc b/repos/gems/src/app/depot_download_manager/gen_extract.cc index f1947730b4..3a5406479c 100644 --- a/repos/gems/src/app/depot_download_manager/gen_extract.cc +++ b/repos/gems/src/app/depot_download_manager/gen_extract.cc @@ -65,6 +65,9 @@ void Depot_download_manager::gen_extract_start_content(Xml_generator &xml, if (Archive::index(path)) xml.attribute("name", Archive::index_version(path)); + + if (Archive::image_index(path)) + xml.attribute("name", "index"); }); }); }); diff --git a/repos/gems/src/app/depot_download_manager/import.h b/repos/gems/src/app/depot_download_manager/import.h index d5c41f85cb..1e16a723e8 100644 --- a/repos/gems/src/app/depot_download_manager/import.h +++ b/repos/gems/src/app/depot_download_manager/import.h @@ -125,8 +125,70 @@ class Depot_download_manager::Import return result; } + static Archive::Path _depdendency_path(Xml_node const &item) + { + return item.attribute_value("path", Archive::Path()); + } + + static Archive::Path _index_path(Xml_node const &item) + { + return Path(item.attribute_value("user", Archive::User()), "/index/", + item.attribute_value("version", Archive::Version())); + } + + static Archive::Path _image_path(Xml_node const &item) + { + return Path(item.attribute_value("user", Archive::User()), "/image/", + item.attribute_value("name", Archive::Name())); + } + + static Archive::Path _image_index_path(Xml_node const &item) + { + return Path(item.attribute_value("user", Archive::User()), "/image/index"); + } + + template + static void _for_each_missing_depot_path(Xml_node const &dependencies, + Xml_node const &index, + Xml_node const &image, + Xml_node const &image_index, + FN const &fn) + { + dependencies.for_each_sub_node("missing", [&] (Xml_node const &item) { + fn(_depdendency_path(item)); }); + + index.for_each_sub_node("missing", [&] (Xml_node const &item) { + fn(_index_path(item)); }); + + image.for_each_sub_node("missing", [&] (Xml_node const &item) { + fn(_image_path(item)); }); + + image_index.for_each_sub_node("missing", [&] (Xml_node const &item) { + fn(_image_index_path(item)); }); + } + public: + template + static void for_each_present_depot_path(Xml_node const &dependencies, + Xml_node const &index, + Xml_node const &image, + Xml_node const &image_index, + FN const &fn) + { + dependencies.for_each_sub_node("present", [&] (Xml_node const &item) { + fn(_depdendency_path(item)); }); + + index.for_each_sub_node("index", [&] (Xml_node const &item) { + fn(_index_path(item)); }); + + image.for_each_sub_node("image", [&] (Xml_node const &item) { + fn(_image_path(item)); }); + + image_index.for_each_sub_node("present", [&] (Xml_node const &item) { + fn(_image_index_path(item)); }); + } + /** * Constructor * @@ -139,26 +201,17 @@ class Depot_download_manager::Import * a future iteration. */ Import(Allocator &alloc, Archive::User const &user, - Xml_node dependencies, Xml_node index) + Xml_node const &dependencies, + Xml_node const &index, + Xml_node const &image, + Xml_node const &image_index) : _alloc(alloc) { - dependencies.for_each_sub_node("missing", [&] (Xml_node item) { - Archive::Path const path = item.attribute_value("path", Archive::Path()); - if (Archive::user(path) == user) - new (alloc) Item(_items, path); - }); - - index.for_each_sub_node("missing", [&] (Xml_node item) { - - Archive::Path const - path(item.attribute_value("user", Archive::User()), - "/index/", - item.attribute_value("version", Archive::Version())); - - if (Archive::user(path) == user) - new (alloc) Item(_items, path); - }); + _for_each_missing_depot_path(dependencies, index, image, image_index, + [&] (Archive::Path const &path) { + if (Archive::user(path) == user) + new (alloc) Item(_items, path); }); } ~Import() diff --git a/repos/gems/src/app/depot_download_manager/job.h b/repos/gems/src/app/depot_download_manager/job.h index 2bda7d64e5..261b2520b7 100644 --- a/repos/gems/src/app/depot_download_manager/job.h +++ b/repos/gems/src/app/depot_download_manager/job.h @@ -30,6 +30,7 @@ struct Depot_download_manager::Job : List_model::Element { bool started = false; bool failed = false; + bool done = false; Archive::Path const path; diff --git a/repos/gems/src/app/depot_download_manager/main.cc b/repos/gems/src/app/depot_download_manager/main.cc index 6c6b1a16ba..ac04270dc2 100644 --- a/repos/gems/src/app/depot_download_manager/main.cc +++ b/repos/gems/src/app/depot_download_manager/main.cc @@ -60,6 +60,8 @@ struct Depot_download_manager::Main : Import::Download_progress Attached_rom_dataspace _installation { _env, "installation" }; Attached_rom_dataspace _dependencies { _env, "dependencies" }; Attached_rom_dataspace _index { _env, "index" }; + Attached_rom_dataspace _image { _env, "image" }; + Attached_rom_dataspace _image_index { _env, "image_index" }; Attached_rom_dataspace _init_state { _env, "init_state" }; Attached_rom_dataspace _fetchurl_progress { _env, "fetchurl_progress" }; @@ -143,15 +145,18 @@ struct Depot_download_manager::Main : Import::Download_progress else { _jobs.for_each([&] (Job const &job) { - if (!job.started) + if (!job.started && !job.done) return; - /* - * If a job has been started and has not failed, it must - * have succeeded at the time when the import is finished. - */ - char const *type = Archive::index(job.path) ? "index" : "archive"; - xml.node(type, [&] () { + auto type = [] (Archive::Path const &path) + { + if (Archive::index(path)) return "index"; + if (Archive::image(path)) return "image"; + if (Archive::image_index(path)) return "image_index"; + return "archive"; + }; + + xml.node(type(job.path), [&] () { xml.attribute("path", job.path); xml.attribute("state", job.failed ? "failed" : "done"); }); @@ -259,6 +264,8 @@ struct Depot_download_manager::Main : Import::Download_progress { _dependencies .sigh(_query_result_handler); _index .sigh(_query_result_handler); + _image .sigh(_query_result_handler); + _image_index .sigh(_query_result_handler); _current_user .sigh(_query_result_handler); _init_state .sigh(_init_state_handler); _verified .sigh(_init_state_handler); @@ -353,6 +360,8 @@ void Depot_download_manager::Main::_handle_query_result() _dependencies.update(); _index.update(); + _image.update(); + _image_index.update(); _current_user.update(); /* validate completeness of depot-user info */ @@ -385,14 +394,21 @@ void Depot_download_manager::Main::_handle_query_result() Xml_node const dependencies = _dependencies.xml(); Xml_node const index = _index.xml(); + Xml_node const image = _image.xml(); + Xml_node const image_index = _image_index.xml(); - if (dependencies.num_sub_nodes() == 0 && index.num_sub_nodes() == 0) - return; + /* mark jobs referring to existing depot content as unneccessary */ + Import::for_each_present_depot_path(dependencies, index, image, image_index, + [&] (Archive::Path const &path) { + _jobs.for_each([&] (Job &job) { + if (job.path == path) + job.done = true; }); }); - bool const missing_dependencies = dependencies.has_sub_node("missing"); - bool const missing_index_files = index.has_sub_node("missing"); - - if (!missing_dependencies && !missing_index_files) { + bool const complete = !dependencies.has_sub_node("missing") + && !index .has_sub_node("missing") + && !image .has_sub_node("missing") + && !image_index .has_sub_node("missing"); + if (complete) { log("installation complete."); _update_state_report(); return; @@ -408,9 +424,16 @@ void Depot_download_manager::Main::_handle_query_result() { Archive::User user { }; - if (missing_index_files) - index.with_optional_sub_node("missing", [&] (Xml_node missing) { - user = missing.attribute_value("user", Archive::User()); }); + auto assign_user_from_missing_xml_sub_node = [&] (Xml_node const node) + { + if (!user.valid()) + node.with_optional_sub_node("missing", [&] (Xml_node missing) { + user = missing.attribute_value("user", Archive::User()); }); + }; + + assign_user_from_missing_xml_sub_node(index); + assign_user_from_missing_xml_sub_node(image); + assign_user_from_missing_xml_sub_node(image_index); if (user.valid()) return user; @@ -435,7 +458,8 @@ void Depot_download_manager::Main::_handle_query_result() } /* start new import */ - _import.construct(_heap, _current_user_name(), dependencies, index); + _import.construct(_heap, _current_user_name(), + dependencies, index, image, image_index); /* mark imported jobs as started */ _import->for_each_download([&] (Archive::Path const &path) { diff --git a/repos/gems/src/app/depot_query/main.cc b/repos/gems/src/app/depot_query/main.cc index 13b94ecccf..d6bc3013cb 100644 --- a/repos/gems/src/app/depot_query/main.cc +++ b/repos/gems/src/app/depot_query/main.cc @@ -64,6 +64,9 @@ Depot_query::Main::_find_rom_in_pkg(File_content const &archives, result = result_from_pkg; }); break; + + case Archive::IMAGE: + break; } }); return result; @@ -208,6 +211,7 @@ void Depot_query::Main::_collect_source_dependencies(Archive::Path const &path, } case Archive::RAW: + case Archive::IMAGE: break; }; } @@ -243,6 +247,9 @@ void Depot_query::Main::_collect_binary_dependencies(Archive::Path const &path, case Archive::RAW: dependencies.record(path); break; + + case Archive::IMAGE: + break; }; } @@ -377,6 +384,20 @@ void Depot_query::Main::_query_index(Archive::User const &user, } +void Depot_query::Main::_query_image(Archive::User const &user, + Archive::Name const &name, + Xml_generator &xml) +{ + Directory::Path const image_path("depot/", user, "/image/", name); + char const *node_type = _root.directory_exists(image_path) + ? "image" : "missing"; + xml.node(node_type, [&] () { + xml.attribute("user", user); + xml.attribute("name", name); + }); +} + + void Component::construct(Genode::Env &env) { static Depot_query::Main main(env); diff --git a/repos/gems/src/app/depot_query/main.h b/repos/gems/src/app/depot_query/main.h index c033192725..f60449a741 100644 --- a/repos/gems/src/app/depot_query/main.h +++ b/repos/gems/src/app/depot_query/main.h @@ -267,6 +267,8 @@ struct Depot_query::Main Constructible_reporter _dependencies_reporter { }; Constructible_reporter _user_reporter { }; Constructible_reporter _index_reporter { }; + Constructible_reporter _image_reporter { }; + Constructible_reporter _image_index_reporter { }; template static void _construct_if(bool condition, Constructible &obj, ARGS &&... args) @@ -341,6 +343,8 @@ struct Depot_query::Main void _gen_index_node_rec(Xml_generator &, Xml_node const &, unsigned) const; void _gen_index_for_arch(Xml_generator &, Xml_node const &) const; void _query_index(Archive::User const &, Archive::Version const &, bool, Xml_generator &); + void _query_image(Archive::User const &, Archive::Name const &, Xml_generator &); + void _query_image_index(Xml_node const &, Xml_generator &); void _handle_config() { @@ -371,9 +375,6 @@ struct Depot_query::Main Xml_node const query = (query_from_rom ? _query_rom->xml() : config); - _construct_if(query.has_sub_node("scan"), - _scan_reporter, _env, "scan", "scan"); - /* * Use 64 KiB as initial report size to avoid the repetitive querying * when successively expanding the reporter. @@ -382,14 +383,18 @@ struct Depot_query::Main _blueprint_reporter, _env, "blueprint", "blueprint", Expanding_reporter::Initial_buffer_size { 64*1024 }); - _construct_if(query.has_sub_node("dependencies"), - _dependencies_reporter, _env, "dependencies", "dependencies"); + auto construct_reporter_if_needed = [&] (auto &reporter, auto query_type) + { + _construct_if(query.has_sub_node(query_type), + reporter, _env, query_type, query_type); + }; - _construct_if(query.has_sub_node("user"), - _user_reporter, _env, "user", "user"); - - _construct_if(query.has_sub_node("index"), - _index_reporter, _env, "index", "index"); + construct_reporter_if_needed(_scan_reporter, "scan"); + construct_reporter_if_needed(_dependencies_reporter, "dependencies"); + construct_reporter_if_needed(_user_reporter, "user"); + construct_reporter_if_needed(_index_reporter, "index"); + construct_reporter_if_needed(_image_reporter, "image"); + construct_reporter_if_needed(_image_index_reporter, "image_index"); _root.apply_config(config.sub_node("vfs")); @@ -453,6 +458,16 @@ struct Depot_query::Main node.attribute_value("version", Archive::Version()), node.attribute_value("content", false), xml); }); }); + + _gen_versioned_report(_image_reporter, version, [&] (Xml_generator &xml) { + query.for_each_sub_node("image", [&] (Xml_node node) { + _query_image(node.attribute_value("user", Archive::User()), + node.attribute_value("name", Archive::Name()), + xml); }); }); + + _gen_versioned_report(_image_index_reporter, version, [&] (Xml_generator &xml) { + query.for_each_sub_node("image_index", [&] (Xml_node node) { + _query_image_index(node, xml); }); }); } Main(Env &env) : _env(env) diff --git a/repos/gems/src/app/depot_query/query_image_index.cc b/repos/gems/src/app/depot_query/query_image_index.cc new file mode 100644 index 0000000000..22cbca80d8 --- /dev/null +++ b/repos/gems/src/app/depot_query/query_image_index.cc @@ -0,0 +1,171 @@ +/* + * \brief Querying system-image information from a depot + * \author Norman Feske + * \date 2023-01-26 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +/* Genode includes */ +#include + +/* local includes */ +#include + + +void Depot_query::Main::_query_image_index(Xml_node const &index_query, + Xml_generator &xml) +{ + using User = Archive::User; + using Version = String<16>; + using Os = String<16>; + using Board = String<32>; + + User const user = index_query.attribute_value("user", User()); + Os const os = index_query.attribute_value("os", Os()); + Board const board = index_query.attribute_value("board", Board()); + + struct Version_reverse : Version + { + using Version::Version; + + bool operator > (Version_reverse const &other) const + { + return strcmp(string(), other.string()) < 0; + } + }; + + struct Image_info; + + using Image_dict = Dictionary; + + struct Image_info : Image_dict::Element + { + Constructible from_index { }; + + enum Presence { PRESENT, ABSENT } const presence; + + Image_info(Image_dict &dict, Version_reverse const &version, Presence presence) + : Image_dict::Element(dict, version), presence(presence) { } + + void generate(Xml_generator &xml) const + { + xml.node("image", [&] { + xml.attribute("version", name); + + if (presence == PRESENT) + xml.attribute("present", "yes"); + + if (!from_index.constructed()) + return; + + from_index->xml().for_each_sub_node("info", [&] (Xml_node const &info) { + using Text = String<160>; + Text const text = info.attribute_value("text", Text()); + if (text.valid()) + xml.node("info", [&] { + xml.attribute("text", text); }); + }); + }); + } + }; + + Image_dict images { }; + + Directory::Path const prefix(os, "-", board, "-"); + + /* return version part of the image-file name */ + auto version_from_name = [&prefix] (auto name) + { + size_t const prefix_chars = prefix.length() - 1; + + if (strcmp(prefix.string(), name.string(), prefix_chars)) + return Version_reverse(); /* prefix mismatch */ + + return Version_reverse(name.string() + prefix_chars); + }; + + Directory::Path const image_path("depot/", user, "/image"); + if (_root.directory_exists(image_path)) { + + Directory(_root, image_path).for_each_entry([&] (Directory::Entry const &entry) { + + Directory::Entry::Name const name = entry.name(); + Version_reverse const version = version_from_name(name); + + if (entry.dir() && version.length() > 1) + new (_heap) Image_info { images, version, Image_info::PRESENT }; + }); + } + + /* + * Supplement information found in the index file, if present + */ + Directory::Path const index_path("depot/", user, "/image/index"); + + bool index_exists = _root.file_exists(index_path); + + if (index_exists) { + try { + File_content const + file(_heap, _root, index_path, File_content::Limit{16*1024}); + + file.xml([&] (Xml_node node) { + + node.for_each_sub_node("image", [&] (Xml_node const &image) { + + bool const os_and_board_match = + (image.attribute_value("os", Os()) == os) && + (image.attribute_value("board", Board()) == board); + + if (!os_and_board_match) + return; + + Version_reverse const version { + image.attribute_value("version", Version()).string() }; + + if (!images.exists(version)) + new (_heap) Image_info(images, version, Image_info::ABSENT); + + images.with_element(version, + [&] (Image_info &info) { + info.from_index.construct(_heap, image); }, + [&] () { } + ); + }); + }); + } + catch (Directory::Nonexistent_file) { + index_exists = false; + } + } + + /* + * Give feedback to depot_download_manager about the absence of the index + * file. + */ + xml.node(index_exists ? "present" : "missing", [&] () { + xml.attribute("user", user); }); + + /* + * Report aggregated image information with the newest version first. + */ + xml.node("user", [&] () { + + xml.attribute("name", user); + xml.attribute("os", os); + xml.attribute("board", board); + + images.for_each([&] (Image_info const &info) { + info.generate(xml); }); + }); + + auto destroy_image_info = [&] (Image_info &info) { destroy(_heap, &info); }; + + while (images.with_any_element(destroy_image_info)); +} diff --git a/repos/gems/src/app/depot_query/target.mk b/repos/gems/src/app/depot_query/target.mk index 9052515dd7..4cd7a53ab7 100644 --- a/repos/gems/src/app/depot_query/target.mk +++ b/repos/gems/src/app/depot_query/target.mk @@ -1,4 +1,4 @@ TARGET := depot_query -SRC_CC := main.cc +SRC_CC := main.cc query_image_index.cc LIBS += base vfs INC_DIR += $(REP_DIR)/src/app/fs_query $(PRG_DIR) From 46eb175b178115bddc9af650f898a70508f705ea Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 25 Jan 2023 11:32:45 +0100 Subject: [PATCH 0274/1921] sculpt_manager: detailed storage progress messages This patch replaces the generic "In progress..." message by slightly more concrete information about the type of operation. This is useful to distinguish the two steps during the expansion of a partition. --- .../sculpt_manager/view/partition_dialog.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/view/partition_dialog.cc b/repos/gems/src/app/sculpt_manager/view/partition_dialog.cc index c5491adf42..4e9dc4598a 100644 --- a/repos/gems/src/app/sculpt_manager/view/partition_dialog.cc +++ b/repos/gems/src/app/sculpt_manager/view/partition_dialog.cc @@ -72,7 +72,7 @@ void Partition_dialog::gen_operations(Xml_generator &xml, xml.attribute("text", "Default"); }); }); if (partition.relabel_in_progress()) - xml.node("label", [&] () { xml.attribute("text", "In progress..."); }); + xml.node("label", [&] () { xml.attribute("text", "Relabeling in progress..."); }); } if (!target_in_use && !partition.format_in_progress && partition.checkable() @@ -88,7 +88,7 @@ void Partition_dialog::gen_operations(Xml_generator &xml, xml.node("label", [&] () { xml.attribute("text", "Check"); }); }); if (partition.check_in_progress) - xml.node("label", [&] () { xml.attribute("text", "In progress..."); }); + xml.node("label", [&] () { xml.attribute("text", "Check in progress..."); }); } } @@ -110,10 +110,6 @@ void Partition_dialog::gen_operations(Xml_generator &xml, && partition.expandable() && !_operation_item.selected("format"); - bool const progress_msg_visible = - (_operation_item.selected("format") && partition.format_in_progress) - || (_operation_item.selected("expand") && partition.expand_in_progress()); - bool const confirm_visible = (_operation_item.selected("format") && !partition.format_in_progress) || (_operation_item.selected("expand") && !partition.expand_in_progress()); @@ -146,8 +142,14 @@ void Partition_dialog::gen_operations(Xml_generator &xml, }); } - if (progress_msg_visible) - xml.node("label", [&] () { xml.attribute("text", "In progress..."); }); + if (partition.format_in_progress) + xml.node("label", [&] () { xml.attribute("text", "Formatting in progress..."); }); + + if (partition.gpt_expand_in_progress) + xml.node("label", [&] () { xml.attribute("text", "Expanding partition..."); }); + + if (partition.fs_resize_in_progress) + xml.node("label", [&] () { xml.attribute("text", "Resizing file system..."); }); if (confirm_visible) { xml.node("button", [&] () { From 1f11e4b8db3d5590a130d4db16fddd54e3468d97 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 24 Jan 2023 17:42:32 +0100 Subject: [PATCH 0275/1921] sculpt_manager: Popup_dialog::_scan_rom -> main This change allows the consumption of the list of depot users by the forthcoming system-update functionality. Issue #4744 --- repos/gems/src/app/sculpt_manager/main.cc | 19 ++++++++++-- .../app/sculpt_manager/view/popup_dialog.cc | 6 ++-- .../app/sculpt_manager/view/popup_dialog.h | 31 ++++++++----------- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/main.cc b/repos/gems/src/app/sculpt_manager/main.cc index e5b4fa502c..10404d134b 100644 --- a/repos/gems/src/app/sculpt_manager/main.cc +++ b/repos/gems/src/app/sculpt_manager/main.cc @@ -303,7 +303,11 @@ struct Sculpt::Main : Input_event_handler, xml.attribute("arch", _deploy._arch); xml.attribute("version", _query_version.value); - _popup_dialog.gen_depot_query(xml); + if (_popup_dialog.depot_query_needs_users()) + xml.node("scan", [&] () { + xml.attribute("users", "yes"); }); + + _popup_dialog.gen_depot_query(xml, _scan_rom.xml()); /* update query for blueprints of all unconfigured start nodes */ _deploy.gen_depot_query(xml); @@ -365,6 +369,16 @@ struct Sculpt::Main : Input_event_handler, Deploy::Prio_levels const _prio_levels { 4 }; + Attached_rom_dataspace _scan_rom { _env, "report -> runtime/depot_query/scan" }; + + Signal_handler
_scan_handler { _env.ep(), *this, &Main::_handle_scan }; + + void _handle_scan() + { + _scan_rom.update(); + _popup_dialog.depot_users_scan_updated(); + } + Attached_rom_dataspace _launcher_listing_rom { _env, "report -> /runtime/launcher_query/listing" }; @@ -1167,7 +1181,7 @@ struct Sculpt::Main : Input_event_handler, Popup_dialog _popup_dialog { _env, *this, _launchers, _network._nic_state, _network._nic_target, _runtime_state, _cached_runtime_config, - _download_queue, *this, *this }; + _download_queue, _scan_rom, *this, *this }; Menu_view _popup_menu_view { _env, _child_states, _popup_dialog, "popup_view", Ram_quota{4*1024*1024}, Cap_quota{150}, @@ -1245,6 +1259,7 @@ struct Sculpt::Main : Input_event_handler, _pci_devices .sigh(_pci_devices_handler); _window_list .sigh(_window_list_handler); _decorator_margins .sigh(_decorator_margins_handler); + _scan_rom .sigh(_scan_handler); _launcher_listing_rom.sigh(_launcher_and_preset_listing_handler); _blueprint_rom .sigh(_blueprint_handler); _editor_saved_rom .sigh(_editor_saved_handler); diff --git a/repos/gems/src/app/sculpt_manager/view/popup_dialog.cc b/repos/gems/src/app/sculpt_manager/view/popup_dialog.cc index ae0b18ad41..cd027cbc48 100644 --- a/repos/gems/src/app/sculpt_manager/view/popup_dialog.cc +++ b/repos/gems/src/app/sculpt_manager/view/popup_dialog.cc @@ -121,7 +121,7 @@ void Popup_dialog::_gen_pkg_elements(Xml_generator &xml, } -void Popup_dialog::_gen_menu_elements(Xml_generator &xml) const +void Popup_dialog::_gen_menu_elements(Xml_generator &xml, Xml_node const &depot_users) const { /* * Lauchers @@ -145,7 +145,7 @@ void Popup_dialog::_gen_menu_elements(Xml_generator &xml) const if (_state == DEPOT_SHOWN || _state == INDEX_REQUESTED) { _gen_sub_menu_title(xml, "back", "Depot"); - _scan_rom.xml().for_each_sub_node("user", [&] (Xml_node user) { + depot_users.for_each_sub_node("user", [&] (Xml_node user) { User const name = user.attribute_value("name", User()); bool const selected = (_selected_user == name); @@ -170,7 +170,7 @@ void Popup_dialog::_gen_menu_elements(Xml_generator &xml) const if (_state == DEPOT_SELECTION) { _gen_sub_menu_title(xml, "back", "Selection"); - _scan_rom.xml().for_each_sub_node("user", [&] (Xml_node user) { + depot_users.for_each_sub_node("user", [&] (Xml_node user) { User const name = user.attribute_value("name", User()); bool const selected = _index_avail(name); diff --git a/repos/gems/src/app/sculpt_manager/view/popup_dialog.h b/repos/gems/src/app/sculpt_manager/view/popup_dialog.h index ebd0c1cee5..55ca146efb 100644 --- a/repos/gems/src/app/sculpt_manager/view/popup_dialog.h +++ b/repos/gems/src/app/sculpt_manager/view/popup_dialog.h @@ -38,6 +38,8 @@ namespace Sculpt { struct Popup_dialog; } struct Sculpt::Popup_dialog : Dialog { + using Depot_users = Attached_rom_dataspace; + Env &_env; Sculpt_version const _sculpt_version { _env }; @@ -51,6 +53,7 @@ struct Sculpt::Popup_dialog : Dialog Runtime_info const &_runtime_info; Runtime_config const &_runtime_config; Download_queue const &_download_queue; + Depot_users const &_depot_users; Depot_query &_depot_query; @@ -214,15 +217,8 @@ struct Sculpt::Popup_dialog : Dialog return hover_result; } - Attached_rom_dataspace _scan_rom { _env, "report -> runtime/depot_query/scan" }; - - Signal_handler _scan_handler { - _env.ep(), *this, &Popup_dialog::_handle_scan }; - - void _handle_scan() + void depot_users_scan_updated() { - _scan_rom.update(); - if (_state == DEPOT_REQUESTED) _state = DEPOT_SHOWN; @@ -375,13 +371,13 @@ struct Sculpt::Popup_dialog : Dialog void _gen_pkg_info (Xml_generator &, Component const &) const; void _gen_pkg_elements (Xml_generator &, Component const &) const; - void _gen_menu_elements(Xml_generator &) const; + void _gen_menu_elements(Xml_generator &, Xml_node const &depot_users) const; void generate(Xml_generator &xml) const override { xml.node("frame", [&] () { xml.node("vbox", [&] () { - _gen_menu_elements(xml); }); }); + _gen_menu_elements(xml, _depot_users.xml()); }); }); } void click(Action &action); @@ -426,27 +422,26 @@ struct Sculpt::Popup_dialog : Dialog Runtime_info const &runtime_info, Runtime_config const &runtime_config, Download_queue const &download_queue, + Depot_users const &depot_users, Depot_query &depot_query, Construction_info const &construction_info) : _env(env), _launchers(launchers), _nic_state(nic_state), _nic_target(nic_target), _runtime_info(runtime_info), _runtime_config(runtime_config), - _download_queue(download_queue), _depot_query(depot_query), + _download_queue(download_queue), _depot_users(depot_users), + _depot_query(depot_query), _refresh(refresh), _construction_info(construction_info) { - _scan_rom.sigh(_scan_handler); _index_rom.sigh(_index_handler); } - void gen_depot_query(Xml_generator &xml) const + bool depot_query_needs_users() const { return _state >= TOP_LEVEL; } + + void gen_depot_query(Xml_generator &xml, Xml_node const &depot_users) const { if (_state >= TOP_LEVEL) - xml.node("scan", [&] () { - xml.attribute("users", "yes"); }); - - if (_state >= TOP_LEVEL) - _scan_rom.xml().for_each_sub_node("user", [&] (Xml_node user) { + depot_users.for_each_sub_node("user", [&] (Xml_node user) { xml.node("index", [&] () { User const name = user.attribute_value("name", User()); xml.attribute("user", name); From 60a089d7954a03176e0d535b8d16930015050ae5 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 26 Jan 2023 16:21:56 +0100 Subject: [PATCH 0276/1921] sculpt_manager: 'Download_queue' enhancements This patch reflects more details such as the percentage value for downloads maintained in the download queue. This makes this information easier to display at the GUI. Issue #4744 --- .../app/sculpt_manager/model/download_queue.h | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/model/download_queue.h b/repos/gems/src/app/sculpt_manager/model/download_queue.h index c7a2d96141..0dc72f4c7d 100644 --- a/repos/gems/src/app/sculpt_manager/model/download_queue.h +++ b/repos/gems/src/app/sculpt_manager/model/download_queue.h @@ -28,6 +28,8 @@ struct Sculpt::Download_queue : Noncopyable enum class State { DOWNLOADING, FAILED, DONE } state; + unsigned percent = 0; + Download(Path const &path) : path(path), state(State::DOWNLOADING) { } void gen_installation_entry(Xml_generator &xml) const @@ -65,13 +67,20 @@ struct Sculpt::Download_queue : Noncopyable new (_alloc) Registered(_downloads, path); } + template + void with_download(Path const &path, FN const &fn) const + { + _downloads.for_each([&] (Download const &download) { + if (download.path == path) + fn(download); }); + } + bool in_progress(Path const &path) const { bool result = false; _downloads.for_each([&] (Download const &download) { if (download.path == path && download.state == Download::State::DOWNLOADING) result = true; }); - return result; } @@ -80,7 +89,10 @@ struct Sculpt::Download_queue : Noncopyable /* 'elem' may be of type 'index' or 'archive' */ state.for_each_sub_node([&] (Xml_node elem) { - Path const path = elem.attribute_value("path", Path()); + Path const path = elem.attribute_value("path", Path()); + size_t const total = elem.attribute_value("total", 0UL); + size_t const now = elem.attribute_value("now", 0UL); + unsigned const percent = unsigned(total ? (now*100)/total : 0UL); _downloads.for_each([&] (Download &download) { @@ -90,6 +102,8 @@ struct Sculpt::Download_queue : Noncopyable typedef String<16> State; State const state = elem.attribute_value("state", State()); + download.percent = percent; + if (state == "done") download.state = Download::State::DONE; if (state == "failed") download.state = Download::State::FAILED; if (state == "unavailable") download.state = Download::State::FAILED; @@ -105,6 +119,13 @@ struct Sculpt::Download_queue : Noncopyable destroy(_alloc, &download); }); } + void remove_completed_downloads() + { + _downloads.for_each([&] (Download &download) { + if (download.state == Download::State::DONE) + destroy(_alloc, &download); }); + } + void gen_installation_entries(Xml_generator &xml) const { _downloads.for_each([&] (Download const &download) { @@ -120,6 +141,16 @@ struct Sculpt::Download_queue : Noncopyable return result; } + + bool any_completed_download() const + { + bool result = false; + _downloads.for_each([&] (Download const &download) { + if (!result && download.state == Download::State::DONE) + result = true; }); + + return result; + } }; #endif /* _MODEL__DOWNLOAD_QUEUE_H_ */ From 6b3c7c9a6c34f11faee76610790fcfbf13c8f023 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 27 Jan 2023 15:46:56 +0100 Subject: [PATCH 0277/1921] sculpt_manager: 'File_operation_queue' enhancement This patch add the support needed for implementing on-target system-update functionality. The new 'empty' method is required for the two-step procedure of updating image-index files - removing the old index, followed by downloading the most current one. It is used to the detect the completion of the first step. Issue #4744 --- .../model/file_operation_queue.h | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/model/file_operation_queue.h b/repos/gems/src/app/sculpt_manager/model/file_operation_queue.h index bbdeca53e7..9a50d2345d 100644 --- a/repos/gems/src/app/sculpt_manager/model/file_operation_queue.h +++ b/repos/gems/src/app/sculpt_manager/model/file_operation_queue.h @@ -32,19 +32,34 @@ struct Sculpt::File_operation_queue : Noncopyable State state { State::PENDING }; - enum class Type { REMOVE_FILE } type; + enum class Type { REMOVE_FILE, COPY_ALL_FILES } type; - Path const path; + Path const from { }; + Path const path; /* destination */ Operation(Type type, Path const &path) : type(type), path(path) { } + Operation(Type type, Path const &from, Path const &to) + : type(type), from(from), path(to) { } + void gen_fs_tool_config(Xml_generator &xml) const { if (state != State::IN_PROGRESS) return; - xml.node("remove-file", [&] () { - xml.attribute("path", path); }); + switch (type) { + + case Type::REMOVE_FILE: + xml.node("remove-file", [&] { + xml.attribute("path", path); }); + break; + + case Type::COPY_ALL_FILES: + xml.node("copy-all-files", [&] { + xml.attribute("from", from); + xml.attribute("to", path); }); + break; + } } }; @@ -64,7 +79,25 @@ struct Sculpt::File_operation_queue : Noncopyable if (already_exists) return; - new (_alloc) Registered(_operations, Operation::Type::REMOVE_FILE, path); + new (_alloc) Registered(_operations, + Operation::Type::REMOVE_FILE, path); + } + + void copy_all_files(Path const &from, Path const &to) + { + new (_alloc) Registered(_operations, + Operation::Type::COPY_ALL_FILES, from, to); + } + + bool copying_to_path(Path const &path) const + { + bool result = false; + _operations.for_each([&] (Operation const &operation) { + if (operation.path == path) + if (operation.type == Operation::Type::COPY_ALL_FILES) + result = true; }); + + return result; } bool any_operation_in_progress() const @@ -77,6 +110,13 @@ struct Sculpt::File_operation_queue : Noncopyable return any_in_progress; } + bool empty() const + { + bool result = true; + _operations.for_each([&] (Operation const &) { result = false; }); + return result; + } + void schedule_next_operations() { /* From 791c389923e69dd134144d7dbcbe1d31ea52e0d6 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 26 Jan 2023 11:08:25 +0100 Subject: [PATCH 0278/1921] sculpt_manager: allow image, image-index download Issue #4744 --- .../gems/src/app/sculpt_manager/model/download_queue.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/model/download_queue.h b/repos/gems/src/app/sculpt_manager/model/download_queue.h index 0dc72f4c7d..0d317b8928 100644 --- a/repos/gems/src/app/sculpt_manager/model/download_queue.h +++ b/repos/gems/src/app/sculpt_manager/model/download_queue.h @@ -37,9 +37,15 @@ struct Sculpt::Download_queue : Noncopyable if (state != State::DOWNLOADING) return; + auto gen_install_node = [&] (auto type, auto path) { + xml.node(type, [&] () { xml.attribute("path", path); }); }; + if (Depot::Archive::index(path)) - xml.node("index", [&] () { - xml.attribute("path", path); }); + gen_install_node("index", path); + if (Depot::Archive::image_index(path)) + gen_install_node("image_index", path); + if (Depot::Archive::image(path)) + gen_install_node("image", path); else xml.node("archive", [&] () { xml.attribute("path", path); From 611efd99217f06971d442b8f157652dacaa00a5d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 27 Jan 2023 20:15:27 +0100 Subject: [PATCH 0279/1921] sculpt_manager: increase fs_tool buffer size This speeds up the use of the fs_tool when installing system images. --- .../gems/src/app/sculpt_manager/runtime/fs_tool.cc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/repos/gems/src/app/sculpt_manager/runtime/fs_tool.cc b/repos/gems/src/app/sculpt_manager/runtime/fs_tool.cc index c9ce3a3f79..e18425edb8 100644 --- a/repos/gems/src/app/sculpt_manager/runtime/fs_tool.cc +++ b/repos/gems/src/app/sculpt_manager/runtime/fs_tool.cc @@ -31,11 +31,16 @@ void Sculpt::gen_fs_tool_start_content(Xml_generator &xml, Fs_tool_version versi xml.node("vfs", [&] () { - gen_named_node(xml, "dir", "rw", [&] () { - xml.node("fs", [&] () { xml.attribute("label", "target"); }); }); + auto gen_fs = [&] (auto name, auto label, auto buffer_size) + { + gen_named_node(xml, "dir", name, [&] () { + xml.node("fs", [&] () { + xml.attribute("label", label); + xml.attribute("buffer_size", buffer_size); }); }); + }; - gen_named_node(xml, "dir", "config", [&] () { - xml.node("fs", [&] () { xml.attribute("label", "config"); }); }); + gen_fs("rw", "target", "1M"); + gen_fs("config", "config", "128K"); }); operations.gen_fs_tool_config(xml); From 4653e2eb3b67898a6aa0d1c8db58d0500f4e60c0 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sat, 28 Jan 2023 21:57:04 +0100 Subject: [PATCH 0280/1921] touch_keyboard: make background configurable The touch-keyboard config accepts the new attributes 'opaque="yes" and 'background=#112233' to control the dialog background. The attributes are passed unmodified to embedded the menu view. --- repos/gems/recipes/pkg/touch_keyboard/runtime | 3 ++- repos/gems/src/app/touch_keyboard/README | 7 ++++++- repos/gems/src/app/touch_keyboard/main.cc | 10 ++++++++++ .../touch_keyboard/touch_keyboard_dialog.cc | 19 +++++++------------ 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/repos/gems/recipes/pkg/touch_keyboard/runtime b/repos/gems/recipes/pkg/touch_keyboard/runtime index 2754ebc584..0ebe3944d8 100644 --- a/repos/gems/recipes/pkg/touch_keyboard/runtime +++ b/repos/gems/recipes/pkg/touch_keyboard/runtime @@ -23,7 +23,8 @@ - + diff --git a/repos/gems/src/app/touch_keyboard/README b/repos/gems/src/app/touch_keyboard/README index b0cedf137f..da4196f280 100644 --- a/repos/gems/src/app/touch_keyboard/README +++ b/repos/gems/src/app/touch_keyboard/README @@ -6,7 +6,12 @@ By default, the keyboard is positioned at the top-left corner of the screen with the smallest possible size, given the used font. Those defaults can be the overridden by the configuration as follows. -! +! + +The 'opaque' and 'background' attributes control the appearance of the +background. When setting opaque to "yes", the alpha channel is disabled +and the color specified via the 'background' attribute is applied. The layout of the virtual keyboard is defined by a ROM module requested via the label "layout". An example can be found at diff --git a/repos/gems/src/app/touch_keyboard/main.cc b/repos/gems/src/app/touch_keyboard/main.cc index 8694744466..1c9f39e721 100644 --- a/repos/gems/src/app/touch_keyboard/main.cc +++ b/repos/gems/src/app/touch_keyboard/main.cc @@ -46,6 +46,9 @@ struct Touch_keyboard::Main : Sandbox::Local_service_base::Wakeup, unsigned _min_width = 0; unsigned _min_height = 0; + bool _opaque = false; + Color _background { }; + Registry _children { }; Child_state _menu_view_child_state { _children, "menu_view", @@ -132,6 +135,9 @@ struct Touch_keyboard::Main : Sandbox::Local_service_base::Wakeup, if (_min_width) xml.attribute("width", _min_width); if (_min_height) xml.attribute("height", _min_height); + if (_opaque) xml.attribute("opaque", "yes"); + xml.attribute("background", String<20>(_background)); + xml.node("report", [&] () { xml.attribute("hover", "yes"); }); @@ -281,6 +287,9 @@ struct Touch_keyboard::Main : Sandbox::Local_service_base::Wakeup, _min_width = config.attribute_value("min_width", 0U); _min_height = config.attribute_value("min_height", 0U); + _opaque = config.attribute_value("opaque", false); + _background = config.attribute_value("background", Color(127, 127, 127, 255)); + _dialog.configure(_layout.xml()); } @@ -304,6 +313,7 @@ struct Touch_keyboard::Main : Sandbox::Local_service_base::Wakeup, _layout.sigh(_config_handler); _handle_config(); _update_sandbox_config(); + log("Customized touch_keyboard_dialog opaque=", _opaque); } }; diff --git a/repos/gems/src/app/touch_keyboard/touch_keyboard_dialog.cc b/repos/gems/src/app/touch_keyboard/touch_keyboard_dialog.cc index 5e772e7f02..3a0c16f9a8 100644 --- a/repos/gems/src/app/touch_keyboard/touch_keyboard_dialog.cc +++ b/repos/gems/src/app/touch_keyboard/touch_keyboard_dialog.cc @@ -79,11 +79,8 @@ void Dialog::produce_xml(Xml_generator &xml) gen_row(row); }); }); }; - xml.node("frame", [&] () { - _maps.for_each([&] (Map const &map) { - gen_map(map); - }); - }); + _maps.for_each([&] (Map const &map) { + gen_map(map); }); } @@ -105,13 +102,11 @@ void Dialog::handle_hover(Input::Seq_number seq, Xml_node const &dialog) Row::Id hovered_row_id { }; Key::Id hovered_key_id { }; - dialog.with_optional_sub_node("frame", [&] (Xml_node const &frame) { - frame.with_optional_sub_node("vbox", [&] (Xml_node const &vbox) { - vbox.with_optional_sub_node("hbox", [&] (Xml_node const &hbox) { - hbox.with_optional_sub_node("vbox", [&] (Xml_node const &button) { - hovered_row_id = hbox .attribute_value("name", Row::Id()); - hovered_key_id = button.attribute_value("name", Key::Id()); - }); + dialog.with_optional_sub_node("vbox", [&] (Xml_node const &vbox) { + vbox.with_optional_sub_node("hbox", [&] (Xml_node const &hbox) { + hbox.with_optional_sub_node("vbox", [&] (Xml_node const &button) { + hovered_row_id = hbox .attribute_value("name", Row::Id()); + hovered_key_id = button.attribute_value("name", Key::Id()); }); }); }); From d26770eb402cc6fe6dd4213db947785bcb56c9c2 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sun, 29 Jan 2023 16:20:06 +0100 Subject: [PATCH 0281/1921] gems/gui_buffer.h: grammar fix in comment --- repos/gems/include/gems/gui_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/include/gems/gui_buffer.h b/repos/gems/include/gems/gui_buffer.h index f480b04f83..2b8c2f6e3d 100644 --- a/repos/gems/include/gems/gui_buffer.h +++ b/repos/gems/include/gems/gui_buffer.h @@ -181,7 +181,7 @@ struct Gui_buffer : Genode::Noncopyable /* * Set input mask for all pixels where the alpha value is above a - * given threshold. The threshold is defines such that typical + * given threshold. The threshold is defined such that typical * drop shadows are below the value. */ unsigned char const threshold = 100; From fa167bcdc4633d216dc65edededb6cc37b29ab7d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sun, 29 Jan 2023 18:01:05 +0100 Subject: [PATCH 0282/1921] gems: screenshot trigger for virtual print button The screenshot trigger displays a little red dot at the upper-left corner of the screen. When touched or clicked-on, it generates an artificial key-press-release sequence for the print key and disappears for one second. In this time, a separate screenshot component can handle the print key by capturing the screen without the red dot appearing in the saved picture. --- .../recipes/pkg/screenshot_trigger/README | 2 + .../recipes/pkg/screenshot_trigger/archives | 1 + .../gems/recipes/pkg/screenshot_trigger/hash | 1 + .../recipes/pkg/screenshot_trigger/runtime | 12 ++ .../recipes/src/screenshot_trigger/content.mk | 2 + .../gems/recipes/src/screenshot_trigger/hash | 1 + .../recipes/src/screenshot_trigger/used_apis | 10 + repos/gems/run/screenshot_trigger.run | 94 +++++++++ repos/gems/sculpt/launcher/screenshot_trigger | 7 + repos/gems/src/app/screenshot_trigger/main.cc | 178 ++++++++++++++++++ .../gems/src/app/screenshot_trigger/target.mk | 3 + 11 files changed, 311 insertions(+) create mode 100644 repos/gems/recipes/pkg/screenshot_trigger/README create mode 100644 repos/gems/recipes/pkg/screenshot_trigger/archives create mode 100644 repos/gems/recipes/pkg/screenshot_trigger/hash create mode 100644 repos/gems/recipes/pkg/screenshot_trigger/runtime create mode 100644 repos/gems/recipes/src/screenshot_trigger/content.mk create mode 100644 repos/gems/recipes/src/screenshot_trigger/hash create mode 100644 repos/gems/recipes/src/screenshot_trigger/used_apis create mode 100644 repos/gems/run/screenshot_trigger.run create mode 100644 repos/gems/sculpt/launcher/screenshot_trigger create mode 100644 repos/gems/src/app/screenshot_trigger/main.cc create mode 100644 repos/gems/src/app/screenshot_trigger/target.mk diff --git a/repos/gems/recipes/pkg/screenshot_trigger/README b/repos/gems/recipes/pkg/screenshot_trigger/README new file mode 100644 index 0000000000..3f9fae42c5 --- /dev/null +++ b/repos/gems/recipes/pkg/screenshot_trigger/README @@ -0,0 +1,2 @@ + + Virtual print button for a touch-screen device diff --git a/repos/gems/recipes/pkg/screenshot_trigger/archives b/repos/gems/recipes/pkg/screenshot_trigger/archives new file mode 100644 index 0000000000..bcf70a4ae6 --- /dev/null +++ b/repos/gems/recipes/pkg/screenshot_trigger/archives @@ -0,0 +1 @@ +_/src/screenshot_trigger diff --git a/repos/gems/recipes/pkg/screenshot_trigger/hash b/repos/gems/recipes/pkg/screenshot_trigger/hash new file mode 100644 index 0000000000..9fc0713931 --- /dev/null +++ b/repos/gems/recipes/pkg/screenshot_trigger/hash @@ -0,0 +1 @@ +2023-01-29 a87e1719fd98401958f47ff3ae9f0c641b4c6094 diff --git a/repos/gems/recipes/pkg/screenshot_trigger/runtime b/repos/gems/recipes/pkg/screenshot_trigger/runtime new file mode 100644 index 0000000000..e57ee6334f --- /dev/null +++ b/repos/gems/recipes/pkg/screenshot_trigger/runtime @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/repos/gems/recipes/src/screenshot_trigger/content.mk b/repos/gems/recipes/src/screenshot_trigger/content.mk new file mode 100644 index 0000000000..06909396ad --- /dev/null +++ b/repos/gems/recipes/src/screenshot_trigger/content.mk @@ -0,0 +1,2 @@ +SRC_DIR = src/app/screenshot_trigger +include $(GENODE_DIR)/repos/base/recipes/src/content.inc diff --git a/repos/gems/recipes/src/screenshot_trigger/hash b/repos/gems/recipes/src/screenshot_trigger/hash new file mode 100644 index 0000000000..f2470cffe5 --- /dev/null +++ b/repos/gems/recipes/src/screenshot_trigger/hash @@ -0,0 +1 @@ +2023-01-29-a a4f24340626a9eb891f8de5061d2e1bb38ba56dc diff --git a/repos/gems/recipes/src/screenshot_trigger/used_apis b/repos/gems/recipes/src/screenshot_trigger/used_apis new file mode 100644 index 0000000000..6e9b9cd67c --- /dev/null +++ b/repos/gems/recipes/src/screenshot_trigger/used_apis @@ -0,0 +1,10 @@ +base +os +blit +gems +framebuffer_session +input_session +gui_session +event_session +timer_session +nitpicker_gfx diff --git a/repos/gems/run/screenshot_trigger.run b/repos/gems/run/screenshot_trigger.run new file mode 100644 index 0000000000..3c1004d7e1 --- /dev/null +++ b/repos/gems/run/screenshot_trigger.run @@ -0,0 +1,94 @@ +create_boot_directory + +import_from_depot [depot_user]/src/[base_src] \ + [depot_user]/pkg/[drivers_interactive_pkg] \ + [depot_user]/src/report_rom \ + [depot_user]/src/nitpicker \ + [depot_user]/src/init + +install_config { + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} + +set fd [open [run_dir]/genode/focus w] +puts $fd " \"/>" +close $fd + +build { app/screenshot_trigger } + +build_boot_image [build_artifacts] + +run_genode_until forever diff --git a/repos/gems/sculpt/launcher/screenshot_trigger b/repos/gems/sculpt/launcher/screenshot_trigger new file mode 100644 index 0000000000..e1ce470041 --- /dev/null +++ b/repos/gems/sculpt/launcher/screenshot_trigger @@ -0,0 +1,7 @@ + + + + + + + diff --git a/repos/gems/src/app/screenshot_trigger/main.cc b/repos/gems/src/app/screenshot_trigger/main.cc new file mode 100644 index 0000000000..5bd6b8b3c0 --- /dev/null +++ b/repos/gems/src/app/screenshot_trigger/main.cc @@ -0,0 +1,178 @@ +/* + * \brief Virtual print button + * \author Norman Feske + * \date 2023-01-29 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Screenshot_trigger { + using namespace Genode; + struct Main; +} + + +struct Screenshot_trigger::Main +{ + Env &_env; + + using Point = Gui_buffer::Point; + using Area = Gui_buffer::Area; + using Rect = Gui_buffer::Rect; + + unsigned _size { }; + Point _position { }; + Area _area { }; + + Color const _color { 200, 0, 0 }; + + Input::Keycode const _keycode = Input::KEY_PRINT; + + uint64_t const _timeout_us = 1*1000*1000; + + Gui ::Connection _gui { _env }; + Event::Connection _event { _env }; + Timer::Connection _timer { _env }; + + Constructible _gui_buffer { }; + + struct View + { + Gui::Connection &_gui; + + Gui::Session::View_handle _handle { _gui.create_view() }; + + View(Gui::Connection &gui, Point position, Area size) : _gui(gui) + { + using Command = Gui::Session::Command; + _gui.enqueue(_handle, Rect(position, size)); + _gui.enqueue(_handle, Gui::Session::View_handle()); + _gui.execute(); + } + + ~View() { _gui.destroy_view(_handle); } + }; + + Constructible _view { }; + + Signal_handler
_timer_handler { _env.ep(), *this, &Main::_handle_timer }; + Signal_handler
_input_handler { _env.ep(), *this, &Main::_handle_input }; + + /* used for hiding the view for a second after triggering */ + bool _visible = true; + + void visible(bool visible) + { + _visible = visible; + _view.conditional(visible, _gui, _position, _area); + } + + void _handle_input() + { + _gui.input()->for_each_event([&] (Input::Event const &ev) { + + if (!_visible) /* ignore events while the view is invisble */ + return; + + bool const triggered = ev.key_release(Input::BTN_LEFT) + || ev.touch_release(); + if (!triggered) + return; + + /* hide trigger for some time */ + visible(false); + _timer.trigger_once(_timeout_us); + + /* generate synthetic key-press-release sequence */ + _event.with_batch([&] (Event::Connection::Batch &batch) { + batch.submit(Input::Press { _keycode }); + batch.submit(Input::Release { _keycode }); + }); + }); + } + + void _handle_timer() + { + if (!_visible) + visible(true); + } + + void _render(Gui_buffer::Pixel_surface &pixel, Gui_buffer::Alpha_surface &alpha) + { + Box_painter::paint(pixel, Rect(Point(0, 0), _area), _color); + + long const half = _size/2; + long const max_sq = half*half; + + auto intensity = [&] (long x, long y) + { + x -= half, + y -= half; + + long const r_sq = x*x + y*y; + + return 255 - min(255l, (r_sq*255)/max_sq); + }; + + /* fill alpha channel */ + Pixel_alpha8 *base = alpha.addr(); + for (unsigned y = 0; y < _area.h(); y++) + for (unsigned x = 0; x < _area.w(); x++) + *base++ = Pixel_alpha8 { 0, 0, 0, int(intensity(x, y)) }; + } + + Attached_rom_dataspace _config { _env, "config" }; + + Signal_handler
_config_handler { _env.ep(), *this, &Main::_handle_config }; + + void _handle_config() + { + _config.update(); + + Xml_node const config = _config.xml(); + + _size = config.attribute_value("size", 50u); + _position = Point::from_xml(config); + _area = Area(_size, _size); + + _gui_buffer.construct(_gui, _area, _env.ram(), _env.rm()); + + _gui_buffer->apply_to_surface([&] (auto &pixel, auto &alpha) { + _render(pixel, alpha); }); + + _gui_buffer->flush_surface(); + } + + Main(Env &env) : _env(env) + { + _config.sigh(_config_handler); + _handle_config(); + + _gui.input()->sigh(_input_handler); + _timer.sigh(_timer_handler); + + visible(true); + } +}; + + +void Component::construct(Genode::Env &env) +{ + static Screenshot_trigger::Main main(env); +} diff --git a/repos/gems/src/app/screenshot_trigger/target.mk b/repos/gems/src/app/screenshot_trigger/target.mk new file mode 100644 index 0000000000..18793b1204 --- /dev/null +++ b/repos/gems/src/app/screenshot_trigger/target.mk @@ -0,0 +1,3 @@ +TARGET = screenshot_trigger +SRC_CC = main.cc +LIBS = base blit From 6e20ffb990a7a2e0b289c6e6553c38e6af87a228 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 31 Jan 2023 09:22:49 +0100 Subject: [PATCH 0283/1921] gems: simple oscilloscope for audio input --- repos/gems/recipes/pkg/osci/README | 2 + repos/gems/recipes/pkg/osci/archives | 1 + repos/gems/recipes/pkg/osci/hash | 1 + repos/gems/recipes/pkg/osci/runtime | 10 ++ repos/gems/recipes/src/osci/content.mk | 2 + repos/gems/recipes/src/osci/hash | 1 + repos/gems/recipes/src/osci/used_apis | 10 ++ repos/gems/src/app/osci/main.cc | 197 +++++++++++++++++++++++++ repos/gems/src/app/osci/target.mk | 3 + 9 files changed, 227 insertions(+) create mode 100644 repos/gems/recipes/pkg/osci/README create mode 100644 repos/gems/recipes/pkg/osci/archives create mode 100644 repos/gems/recipes/pkg/osci/hash create mode 100644 repos/gems/recipes/pkg/osci/runtime create mode 100644 repos/gems/recipes/src/osci/content.mk create mode 100644 repos/gems/recipes/src/osci/hash create mode 100644 repos/gems/recipes/src/osci/used_apis create mode 100644 repos/gems/src/app/osci/main.cc create mode 100644 repos/gems/src/app/osci/target.mk diff --git a/repos/gems/recipes/pkg/osci/README b/repos/gems/recipes/pkg/osci/README new file mode 100644 index 0000000000..3f9fae42c5 --- /dev/null +++ b/repos/gems/recipes/pkg/osci/README @@ -0,0 +1,2 @@ + + Virtual print button for a touch-screen device diff --git a/repos/gems/recipes/pkg/osci/archives b/repos/gems/recipes/pkg/osci/archives new file mode 100644 index 0000000000..47c0e0d066 --- /dev/null +++ b/repos/gems/recipes/pkg/osci/archives @@ -0,0 +1 @@ +_/src/osci diff --git a/repos/gems/recipes/pkg/osci/hash b/repos/gems/recipes/pkg/osci/hash new file mode 100644 index 0000000000..af2bc27260 --- /dev/null +++ b/repos/gems/recipes/pkg/osci/hash @@ -0,0 +1 @@ +2023-01-31 0d3ec33511f8d3c157580a734dfed41504dc34c6 diff --git a/repos/gems/recipes/pkg/osci/runtime b/repos/gems/recipes/pkg/osci/runtime new file mode 100644 index 0000000000..01da299aaa --- /dev/null +++ b/repos/gems/recipes/pkg/osci/runtime @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/repos/gems/recipes/src/osci/content.mk b/repos/gems/recipes/src/osci/content.mk new file mode 100644 index 0000000000..d4b6d53fe0 --- /dev/null +++ b/repos/gems/recipes/src/osci/content.mk @@ -0,0 +1,2 @@ +SRC_DIR = src/app/osci +include $(GENODE_DIR)/repos/base/recipes/src/content.inc diff --git a/repos/gems/recipes/src/osci/hash b/repos/gems/recipes/src/osci/hash new file mode 100644 index 0000000000..5e81b6c093 --- /dev/null +++ b/repos/gems/recipes/src/osci/hash @@ -0,0 +1 @@ +2023-01-31 4b14ae81ac3638c5db44bf52ba6853620c820072 diff --git a/repos/gems/recipes/src/osci/used_apis b/repos/gems/recipes/src/osci/used_apis new file mode 100644 index 0000000000..46a59c18e9 --- /dev/null +++ b/repos/gems/recipes/src/osci/used_apis @@ -0,0 +1,10 @@ +base +os +blit +gems +framebuffer_session +input_session +gui_session +timer_session +audio_in_session +polygon_gfx diff --git a/repos/gems/src/app/osci/main.cc b/repos/gems/src/app/osci/main.cc new file mode 100644 index 0000000000..4ad0c0f92c --- /dev/null +++ b/repos/gems/src/app/osci/main.cc @@ -0,0 +1,197 @@ +/* + * \brief Oscilloscope showing audio input + * \author Norman Feske + * \date 2023-01-29 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Osci { + using namespace Genode; + struct Main; +} + + +struct Osci::Main +{ + Env &_env; + + using Point = Gui_buffer::Point; + using Area = Gui_buffer::Area; + using Rect = Gui_buffer::Rect; + + Area _size { }; + Color _background { }; + Color _color { }; + int _v_scale { }; + + Gui::Connection _gui { _env }; + + Timer::Connection _timer { _env }; + + Audio_in::Connection _audio_in { _env, "left" }; + + Constructible _gui_buffer { }; + + struct View + { + Gui::Connection &_gui; + + Gui::Session::View_handle _handle { _gui.create_view() }; + + View(Gui::Connection &gui, Point position, Area size) : _gui(gui) + { + using Command = Gui::Session::Command; + _gui.enqueue(_handle, Rect(position, size)); + _gui.enqueue(_handle, Gui::Session::View_handle()); + _gui.execute(); + } + + ~View() { _gui.destroy_view(_handle); } + }; + + Constructible _view { }; + + Signal_handler
_timer_handler { _env.ep(), *this, &Main::_handle_timer }; + + Attached_rom_dataspace _config { _env, "config" }; + + Signal_handler
_config_handler { _env.ep(), *this, &Main::_handle_config }; + + struct Captured_audio + { + enum { SIZE_LOG2 = 10, SIZE = 1 << SIZE_LOG2, MASK = SIZE - 1 }; + + float _samples[SIZE] { }; + + unsigned _pos = 0; + + void _insert(float value) + { + _pos = (_pos + 1) & MASK; + _samples[_pos] = value; + } + + float past_value(unsigned past) const + { + return _samples[(_pos - past) & MASK]; + } + + void capture_from_audio_in(Audio_in::Session &audio_in) + { + Audio_in::Stream &stream = *audio_in.stream(); + + while (!stream.empty()) { + + Audio_in::Packet &p = *stream.get(stream.pos()); + + if (p.valid()) { + float *data_ptr = p.content(); + + for (unsigned i = 0; i < Audio_in::PERIOD; i++) + _insert(*data_ptr++); + + p.invalidate(); + p.mark_as_recorded(); + } + + stream.increment_position(); + } + } + } _captured_audio { }; + + void _handle_config() + { + _config.update(); + + Xml_node const config = _config.xml(); + + _size = Area::from_xml(config); + _background = config.attribute_value("background", Color { 0, 0, 0 }); + _color = config.attribute_value("color", Color { 255, 255, 255 }); + _v_scale = config.attribute_value("v_scale", 3000); + + _gui_buffer.construct(_gui, _size, _env.ram(), _env.rm(), + Gui_buffer::Alpha::OPAQUE, _background); + + _view.construct(_gui, Point::from_xml(config), _size); + + _timer.trigger_periodic(1000*config.attribute_value("period_ms", 20)); + } + + Line_painter const _line_painter { }; + + void _render(Gui_buffer::Pixel_surface &pixel, Gui_buffer::Alpha_surface &) + { + /* + * Draw captured audio from right to left. + */ + + Point const centered { 0, int(pixel.size().h()/2) }; + + Point previous_p { }; + + bool first_iteration = true; + + unsigned const w = pixel.size().w(); + + for (unsigned i = 0; i < w; i++) { + + Point p { int(w - i), + int(float(_v_scale)*_captured_audio.past_value(i)) }; + + p = p + centered; + + if (!first_iteration) + _line_painter.paint(pixel, p, previous_p, _color); + + previous_p = p; + first_iteration = false; + } + } + + void _handle_timer() + { + _captured_audio.capture_from_audio_in(_audio_in); + + _gui_buffer->reset_surface(); + _gui_buffer->apply_to_surface([&] (auto &pixel, auto &alpha) { + _render(pixel, alpha); }); + + _gui_buffer->flush_surface(); + + _gui.framebuffer()->refresh(0, 0, _size.w(), _size.h()); + } + + Main(Env &env) : _env(env) + { + _config.sigh(_config_handler); + _handle_config(); + + _timer.sigh(_timer_handler); + + _audio_in.start(); + } +}; + + +void Component::construct(Genode::Env &env) +{ + static Osci::Main main(env); +} diff --git a/repos/gems/src/app/osci/target.mk b/repos/gems/src/app/osci/target.mk new file mode 100644 index 0000000000..120068b254 --- /dev/null +++ b/repos/gems/src/app/osci/target.mk @@ -0,0 +1,3 @@ +TARGET = osci +SRC_CC = main.cc +LIBS = base blit From dbf02ac3c103181892bda558b498f36ce56eb109 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Sun, 29 Jan 2023 21:48:46 +0100 Subject: [PATCH 0284/1921] depot: add runtime pkg for cpu_load_display --- .../gems/recipes/pkg/cpu_load_display/README | 3 + .../recipes/pkg/cpu_load_display/archives | 4 ++ repos/gems/recipes/pkg/cpu_load_display/hash | 1 + .../gems/recipes/pkg/cpu_load_display/runtime | 69 +++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 repos/gems/recipes/pkg/cpu_load_display/README create mode 100644 repos/gems/recipes/pkg/cpu_load_display/archives create mode 100644 repos/gems/recipes/pkg/cpu_load_display/hash create mode 100644 repos/gems/recipes/pkg/cpu_load_display/runtime diff --git a/repos/gems/recipes/pkg/cpu_load_display/README b/repos/gems/recipes/pkg/cpu_load_display/README new file mode 100644 index 0000000000..e1f8b37c84 --- /dev/null +++ b/repos/gems/recipes/pkg/cpu_load_display/README @@ -0,0 +1,3 @@ + + Display the CPU load as a graph + diff --git a/repos/gems/recipes/pkg/cpu_load_display/archives b/repos/gems/recipes/pkg/cpu_load_display/archives new file mode 100644 index 0000000000..e619ad0787 --- /dev/null +++ b/repos/gems/recipes/pkg/cpu_load_display/archives @@ -0,0 +1,4 @@ +_/src/init +_/src/cpu_load_display +_/src/report_rom +_/src/trace_subject_reporter diff --git a/repos/gems/recipes/pkg/cpu_load_display/hash b/repos/gems/recipes/pkg/cpu_load_display/hash new file mode 100644 index 0000000000..5bf306d0ed --- /dev/null +++ b/repos/gems/recipes/pkg/cpu_load_display/hash @@ -0,0 +1 @@ +2023-01-23 54c4efeb97a0ffec7e8736a23f1c99f75db4e31c diff --git a/repos/gems/recipes/pkg/cpu_load_display/runtime b/repos/gems/recipes/pkg/cpu_load_display/runtime new file mode 100644 index 0000000000..145f23b08e --- /dev/null +++ b/repos/gems/recipes/pkg/cpu_load_display/runtime @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 291beb1145845fc6989267f2ab6e7a1a7f551edc Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 30 Jan 2023 14:57:33 +0100 Subject: [PATCH 0285/1921] depot: recipe for pkg/dynamic_rom --- repos/os/recipes/pkg/dynamic_rom/README | 3 +++ repos/os/recipes/pkg/dynamic_rom/archives | 1 + repos/os/recipes/pkg/dynamic_rom/hash | 1 + repos/os/recipes/pkg/dynamic_rom/runtime | 10 ++++++++++ 4 files changed, 15 insertions(+) create mode 100644 repos/os/recipes/pkg/dynamic_rom/README create mode 100755 repos/os/recipes/pkg/dynamic_rom/archives create mode 100644 repos/os/recipes/pkg/dynamic_rom/hash create mode 100755 repos/os/recipes/pkg/dynamic_rom/runtime diff --git a/repos/os/recipes/pkg/dynamic_rom/README b/repos/os/recipes/pkg/dynamic_rom/README new file mode 100644 index 0000000000..91f7b06955 --- /dev/null +++ b/repos/os/recipes/pkg/dynamic_rom/README @@ -0,0 +1,3 @@ + + ROM service that provides ROM modules with time-variant content + diff --git a/repos/os/recipes/pkg/dynamic_rom/archives b/repos/os/recipes/pkg/dynamic_rom/archives new file mode 100755 index 0000000000..84bfc275b4 --- /dev/null +++ b/repos/os/recipes/pkg/dynamic_rom/archives @@ -0,0 +1 @@ +_/src/dynamic_rom diff --git a/repos/os/recipes/pkg/dynamic_rom/hash b/repos/os/recipes/pkg/dynamic_rom/hash new file mode 100644 index 0000000000..22e0d276f7 --- /dev/null +++ b/repos/os/recipes/pkg/dynamic_rom/hash @@ -0,0 +1 @@ +2023-01-30 9d0218db1e8c867d68e023d334fddb02ac92feeb diff --git a/repos/os/recipes/pkg/dynamic_rom/runtime b/repos/os/recipes/pkg/dynamic_rom/runtime new file mode 100755 index 0000000000..d8192730c0 --- /dev/null +++ b/repos/os/recipes/pkg/dynamic_rom/runtime @@ -0,0 +1,10 @@ + + + + + + + + + + From 62af32270baa0220bddf2cd1afdb9e547e5a951a Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 30 Jan 2023 14:56:00 +0100 Subject: [PATCH 0286/1921] depot: remove empty config from pkg/nano3d This allows for routing the nano3d config to a ROM services like dynamic rom. --- repos/gems/recipes/pkg/nano3d/runtime | 2 -- 1 file changed, 2 deletions(-) diff --git a/repos/gems/recipes/pkg/nano3d/runtime b/repos/gems/recipes/pkg/nano3d/runtime index b48fcd3058..b8018d008d 100644 --- a/repos/gems/recipes/pkg/nano3d/runtime +++ b/repos/gems/recipes/pkg/nano3d/runtime @@ -2,8 +2,6 @@ - - From 76828f25c5e7a14f4be7be6c62abe72bffd6ca3d Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 7 Feb 2023 21:36:56 +0100 Subject: [PATCH 0287/1921] tool: bender with optional 'serial' UART discovery By default, bender will not report any serial findings anymore, if not explicitly asked for with the 'serial' option. Without this option, an invalid ioport is reported, so that neither the kernel nor Genode core will make serial output. --- tool/boot/README | 4 ++-- tool/boot/bender | Bin 29272 -> 29016 bytes tool/run/boot_dir/fiasco | 6 ++++-- tool/run/boot_dir/foc | 6 ++++-- tool/run/boot_dir/hw | 14 ++++++++------ tool/run/boot_dir/nova | 11 ++++------- tool/run/boot_dir/okl4 | 5 +++-- tool/run/boot_dir/pistachio | 5 +++-- tool/run/boot_dir/sel4 | 10 ++++++---- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/tool/boot/README b/tool/boot/README index 1a5e037e28..ee231ad752 100644 --- a/tool/boot/README +++ b/tool/boot/README @@ -18,10 +18,10 @@ code respectively the download source of binaries are described below. configured via commandline. The changes are available from - https://github.com/m-stein/morbo.git. + https://github.com/alex-ab/morbo.git. git branch genode_bender - git commit 3645d67dc0643b8aab008eb76a8e056636e5edee + git commit 77a69185981de373905ae7e9c4ae24cd5cb1ac99 :'pulsar': diff --git a/tool/boot/bender b/tool/boot/bender index d365444b249e9d9a142f59a34551c474822713fc..16ad549402dced83733fbdf23e805ee51756248d 100755 GIT binary patch delta 14066 zcmZWw4|r6?wZAu6U_%z}1{U0qKo+<_0s*stkd>ezWRr*qYzPSmD4?+Xk-uTrKm|AH zO_1Swt-ed!_tn-~Yg=DiD;5laBJPryjh1Q%3J5BJqP@$4hCf0K$iCmXyU{$}{l4s- z-<&gN&YYP!b7t=3)CK<3dH#jr{Dv1tjNmihavmC(zF?h|W2aY5nrh`j^*qO^4RL$k z7#BG&q;Z^?@ik|)vxEf4heG%T z$pq5xejts}Ngv`@Q4f)v4y`syOb$xbk%;<6O9*mL_ znk8t*@!<`M`bCs7>IVu6fl{uhT9lF)rI><}jVSmFXDjNRDDi7>lk!CLaa05Vx~==_~Xq^2noG8a9zM-+-V|k~QL_+plGK^xF-qD%sgtiVfSH$P8YF)oslAhLl%{ds z=I}6OM>?7zT{5w2E-g5m8x7;WIVptC*txM50Z48W>f5wM!#J+i@9D4X*o6|Mr4jE1 zSGcdT<5$u0E^RtW+ao9@ZNI>I=DdqR$|=rvmf6LwF=vYwfq>U}PahVP{&OeXR|*=W zNV@k6dqj4&93+j{HSLVrG1%g3(N2KZT^I3Atlr+rd4(IjlEBd4lPFIo-HBqYK1^eU z^E^r{LhVvC=G{(ojIcjQ^|fj@ZK(ej{{!`0u1I|+rodcHM&1J1*}BlB?0B0f+E(QJ zjx6J5x@_q0tG;lq`e>Z{_mr*dI2mmqS-S+xc0W798d*Si6|6N~tJkl1NZ5U(=2qc~ z^`#VTfuoE&ZXBxs+Wi?aq4X9(|aF2gG_p zs8umsL+9|Lthi3IL|NInq*1nrjdCjfCacUk!FYn^N${dmeb>4qE{jub$s=up~QBDr94`F!mh8d?+lHlO1vXp%*zS3h=3vroZD z$rlab>CIRGngnmJ9cxR3pE=na%m z=80CFpgcPiJlYkEICzY6$WM*s52yT3hpDHBQa$ZOHq3Z0p-j3=me3|!R^_IAN?}h3u@$*BoDXj>^65ZBnyA+d#s;hA^Z2GuWgw)pCDXgYNbRfl|{rH4pu9 z$rubA;;dZoNIHHqj%lewsh5m)|Dr}YM{Lv>%-Sn4PyJKs*!~@}tz0jXkkP4ql&YRh zz2|{6=}x>SliYqP7=!tuiS)(WNbm3n%AxsBIpjpbX37y_IcoaQDZaI$?J$|2?G~%) zwOGt$#o|&ZZd0}!sGA(kRa2xpMvvXz#-_54VBu2maqKud7A(xAWU$aiFX2_zr+}3& zXOD`kB%ggB{s#sU9IvHe6{y;G$r#|NVnY>yOEIvKw9?MTkc~iF3_L;Ly%^X)pdkj< z6ZlIExCy)*1FH$V7y~N_)W*R51gc`dMqrH&oMOWYLXXBsI&j5+UhB*lm`-d{2pGfz zm=?5@<|>Oti?SzKePh^9_&=!WX+?R9tMLJZ8qP#Ad%Kv zNS(hEKtQr*W8k8p2J7%|ky{n75d_lJ8$uqm!LXK3lmD!i^Aak{65Fqqq(|n9PNABZ}vvCKHKN@JHg{RCBeb z&9KEY7T)^|*mA*=4;CBJHn51(pe)iN8fU3oj8qXgiXA@ajw&W6AFnK`-iDTXEU)Xg$>EAo8!?X>=X)Tl8N{Xjm3kqk)_8^fr|}w zVC~Xvhi*xenilJ!9u}S!L<%**&oJd_;qetq**shtwcRGvZNRF;-jioo;R!MA0PluM|N9P)6S{Aeo3Sx_ULzkys_p;l;0UBFM%`xn8NL;rn6B%Rxp`*<77G0vM#f--okb4glkcDgs+prw zhi3^=n3`5#k}J&eGZuNaL4HiP6-I+eity^{Q9n<747$0{Dwp;*HDPo%U#sSg7JU?j zvmmxQ)~mD_-k*(ub!oBeH0~@v%AAK}r-?ZmZuBvFdP_bF=N+O*UqKEcW|uZ73A_kV zTOy%R2n%FqL!$GLQ2PvAGF$Q2+BQ!wEgg}7TxezInbR*9TF{X!P;-ukc*X~gk3HrZ zH9UIcfPKnFV-UeSo@Qqg;_VjIHfGrHJ>z&*&?(O_YJVI6F(rF)tG6HJSix;?LUVzE z3vE)Dj2To=FkIK7&M)jPFbH+UsC}37sN8?2vq>(vEj63v@|K9RRjG}mDap4)Cz!J( zL>oETc?jVxG*=If8M&+lA$G+3u~PC`#M|m(o!U$|5VWw?FVuEYr#e5At1Pfeyt93r zvjv+KyWi2_S;+!{bB6d5zg%i?lpozZPv#xYquxm{k|NzAt7~oUcjS8#rO75h8aL+}`QjBNud3Z{NeAm7d;mMJFrwwaO)}a>aFJcM=&y zE@`hhuXo5Xxx9gu>|-VEf%As=az86?k;@P9ALzx)n>>$To6_ovcwf_giI{eQQhouO zjmT3SvQc(6X*FrFZtw!OPIF%H6e`loX#A>wpj*+j6ex;Uv5($bIYczPkqCEP3MJ-Z zK6zi)a*+v{^6U=TOfp6Ca!u&KCh2QrfM8&FxALv%QNk_P57hQ6k-T3XyaW$v_HWXh%rO>w4?@d;u zzjiBYR{uP9=+t(ssi1|8^6bvgJ_NO~eMF;NWKc@`Nas8GRwZ&(3(u?SJ(YdRreeV%S8S9GBHx*GQSwKmwg_CBk+s6TnkwJ4 zw>h>NSZlIY`5Nm8Lo=xD^^sCG;Hs_1uXmK!6St+}>P&W$%$xrK! z$=(JhEu!N%79cuS6iGAQtRiok2?o)D6;r6SqJ+$2zRTNFWv`VPeB!jpx;xq#iHNFoVNZB-B!j z1{WynMTpfxtcfTl)JjBirpu^f3S`CPq=IPmJc%l?Xqxr|>;+tngASMIvjF{8knSou(BDM$#r?4-I`y zaKd%Fk;ybI5i0^aqHnQl+q@GHZ;a!Fy7#}Q*_iO1KG!1N%!oHVGFD$dUD`hpx>8@E zlkv`p4hH*W8VxlXjfUS(P=zcp?$Zy|`?AuE2`|JT@lS`*oMS z{S_%E#`9BkSC-TF4BQK7M&&PyKE#%A3(kdvx`$C52QVJdLVswDO*U)SsT^EGGizlh z6FP)i8}&CuE*-F%Sx(SifISpx4)}D7SzX$$-lVpfc|>#Q4jE=Jgc-G!V3d2Kl+l`T zgs(90t*kfIf-ug;LhuQpe(G}j7=EexoPAio%~6HJ3$gf&Q1{#O?zu`+y~&(##GBM( z-v3cGPaNcX2F?yNeRS6}{S|hL1z!3#UmhY?>fsO?f#}VHxw;K=HAfU`r%`h-nC)lS z2Z%x_I!Z-pYGN+Mr}9+UX8^(IIKgfqBuTBD!LG1d@>)z7Jy?o2i31n=up>o*WSXSrh;%aIxRTtp z`4I@og)lLX4GhlI)nZv}iy`bJsZ>L9SEVDS57K$@nn&Z2V+V z-8E@QmevS0Y65ZNVDn4H$Xjr;kzjzsX@Rx{-7Phl;9D_P4_u(JdSoF{IAZtT2?#&;7m0ik z9HxQu3?5E$>^B7a{x17vnzghQ2|uYwK`6UsHWs*3NZ@sWUfORlAEPVvOX}qN<}T_& zV{83e5AN*~uDAQ^E+ZHxU$1FbLD<80yYYAzynD2TQS}?k?#^N@UoUDbV*$;7o|<|- zUA=tY7+*Q2ygdRtlxaKk{MXZ|O>3bkotfxei3wyD4x3qPU7Jw*EX;uz*OMZ3jS^~C z0Aav?ua(eZffk1zLr%^X;b#@}e$tnm^MohYmnmskISInEGmxpQX$?8>mbA4wriX-Q z=`5Evmd{D^;Me$1Bj<9Kd&Yv;tZ-?(C!MxnNYO#K{g)e1nlZ}J(rvdogt7NO9*)X?Nf@u z(Z#fk4@w+IHk+c`YWgw}{&J4vBjKm_ViXI9`=Can7NL2DMEFa&!XPyp!@pzSlLhs| zRkYk3TBQ&4wYrxZU zGQZcQ*KOYZ*It-hA=misO+99tP$=& zI2@1je51AwoHN5$q$VRqwzf#GWV>F8vHBl5X7$&O6kj%?J$kf<@N?i5{Mg$XxSu6* z+DfFuX|hTj)kg(4s~tf3N*>Q7%9A?hRPE7aYrC)__A)_ob9D|Ve9U)TdkqGhkI7?i zgJPJTes7ZFn5Um`*f3ByoHIBtqjO|9Ojd@k0S9Zn_Gfl#(UL|6M^T*<$9dv&!#5k% z4fl`np)*+{0zMJb>5Eb0Eo`={e)+ij#&Sh7G!x=N+FM2z^@m>#K#CM0mL0aoM`(Roa77|HE zOq&|`(#*ONw1lgn6sq`Q(4f0NWv!SU9s+r+k;8?rsNd&|e}KmTmT?k>g+g&f6sJM^2BDekG_X(6GBR*9M0S!_vMBlc zit)BaL*7kBb?tP~XQgFVc(W5NN@XVl|1l@rq(#5#j67MyRv_oCjFZ^(YT|j!%kmvLu{s zTBU$N9)yU1oDwq}MwS`Nx=~Q3t0@m`_01Dqa7_yW=go=p#Cb4hV!pUIY_R*`G@F*| z{f{}jhU<>{v_E1omzpdXzw9Kr6zLL0g6UY;G7UIeQOtt_-^!?73RlaU2;P#5%#nKZ@fm8;-ZMW>kH!H}%b@+Cfs|yMyp% zoc1@QWpl=z=D2IJS(!hJXGV6VIgfu$Cr3E#d7U9jCMsxuj&KX{b%Q?2qS+tm-)VGr zn(-;Q(}&Z@H7=%=M^P`p?`aRJ2OeCNcoO^2XgF|O&CDI$w_>bZkSe_S3E!bE&i%Y^ z!4!G6O?dM?{)#$t#-Eb(Cec!U;sgopOjRQ@Qqso3tK-98hqeJ@js@W>Ho)9QbUhY5 z?L*a(H(zO2q-(mWO zePQ|Qao%Bj?tHaekB_wvA!?5If+95#+mm1m3sK5GwKMMt+V!#z%h+*@kxMpr(BR^@ zJgLjzP(M@pW|{f)4V+XJL2uYuJ)=YMW{Co ztbN}DH;_}TY~bB&-WHpiWftd!&tZe3Hvp%WxkjZZ!e-%&&})(7(v%{ep$aaTXQWQ2 zXrX!lnrm2uFtl=n-`aWptPwTsdDyfwE__PZ`s`fqL{r@TN-a?>rH_#w!l&>-$#)9LRDLLupCL7jPveyr zs0aycM-BvT^j-=|98N~*q2h*EIw%?SlnvaqGi^wN+vdHxCSFlrfpMZAN~O<`)V_c} zTEi^p-}HhP1C>kE0%af>1)l?#7MJTy5E;NX(eHum5-?dc!mQOfw8`KdN`JTwdASiw0I z3&G|elg+Q9$uHrALSJ@k#mR8xie-Y9x)XUgZ^BGIt^Ed4;SvNy`bNYcZ>f=@d&cTJ z%MU)Hfq#iUgI!9kcBJV`6WI|n*3MN9QOGg z8CNyhOP%!X1=z45Q+dog1k~0urAe6T_@Cx;b zGwlK9YYBu5_=q{lw1f3bI?j5(xY-I>jpcd|;`&iGPJ(KhDvLJ+Zg#JUt3+SVtnWSi4D2H23PtBEQ)3KqR zspK1P=#sVn0TrK@{uZ8u5b_?9BjsAnC@*__kXc|3{dY_qrNW%?9qYh13T+Jvg{qNX z7@C6C*)NBm(rES*ZOJ^6WRj zf-OFrIF4B9jib}6>>5y(j;^SiibuNX@`?8RWoolfR~nNAJ7?Y4%M!|GG>OD^yHJ1Y9YPv1sf*MwB21Y4{cqkrTRB>h9S?K;KQH z7(2!~rE`6bw~usM5s2C%USq^-h#*>QhD1@R{w)SHNle$i3F&hq>wrw6d`AR)*Q8q? z!mH7opfGWlvp>d7j!<7NuttB_Ae|TR6-TH)lW?3N@V0=Mjo9OUDCm7~S9w3sp#UgG zq_U5B$FVL<7)0m0wLpnT^DEcK9rP@OoarknelOIL*x#m*C>}`mn{THEI8$Pk2Qv3$KF$Of#s17tQ zp%qa!9E_MnO=veH&?hIuE+?)C2rjg8SGj|d5C9^baJ9P79Ciu_1%Ob;WTpDsnDMf; zx3N>k$#vZg&ldIAoT0v`;jq)XB209#W4NcKYXPN7Art^Ye^jPhIkWU1VN?g=oCG*C zy?g8!1kvu9rq^H#8!=>YP^S-blhjnKJ1zc*{e1_%z2(LgMZz~&i@ME~__!Wtf7C+m z{0d?yY)0hm21Q*9k=j@2Yb%mC!ykeG3H@TGD<5><)q5dKGZBYR(L;9imC`K! zSL(6S8lT>GD-p1YTkwnP2>2})7p!z+B3M_taSzE&7m$kGjuTadZhITZQ{Aj%r8`)- zlv?g)$KC80!CZoruu(#I6`XzC1^6vrj-N+G{FLOoaX0Dr5DVYqKI|y7s>kNmju^zF zIvhy5S->3#8QnP9a!cR!7Hao%ZmFx6u;aQ~RkkB-{mL7-fnfBw-LZQlD3v3+ag$`F zJJBGjY4gTS9}}SxPYu;sd7(Bf;y!R2-bk3}#vJ}8B4mY35qC|~uc4xQk^3?C68EF- z#?31#S1()3?X8~oO7DqZo{U6pBV_LWtL>5QiqZP@$g4f2&Rul>(25n6n^$jGZ_AqC z82|VR&$6lG@3W6zIWhb3WfPYz-}}y@nz)pWYnOT48!Fe?Rxh`$TfKSRGS3sMGCBRV z_mRi$<>ybGZ{>>3_x+R%SgEIJugr08BR$DXs|ClM(9_ZU{tK+!)5+B%DStfD=y#oe z7}E5#>v?G}E*nY*fImD2?uyQ~V4eE-(&v57N39ei!5mxTk@YRIPyzj>nRDceBT^Ux6 zB2i)(4*UeLHCBKGJU!0JJrkop0Q?>B))>7Axceb_^X|e6@4`>`kl}}k=b;ptc->tL zPXVV+iFPP)`~-MB-C@%oo}==;dSJSx`dSaX6L?4utN?dEq@eE?$e0I{Qa<(BACRa3 zMuT+x)?EekJ#FQf8RX@n(iw9um6jEkrV$nBXagGtlfpL-i2v` zcR!?1FVZ~r5Eg*PIjo!$dDNwYfGt0aAzvJqdRKuFz*DDNIdaHUU@Y*%z*}N?(p~&G zM*ZQT3JZb9&9HKh#P}Bj*8;DP;kCe5foXQd`B1?YWQ@cm#oQRfv%pUP=f&`^fd2rD za}HghzXNwaRN*^!VLG<7EsDycbNJ(T(P>t-S4O*N3ibKfyBNL#PQ|6y?iPG~7yVA0 z+JD6`pAn&y4VI(_bBh}Wd~RYC55N_<$wWu+CxSiz97TjDTRB``(D7p6e9$HIAko(V z=b$`!0m9Y5^udiDGw?28`kxLLFz7z+MPvlCtsMCsDsTdWZagLn^&H_}fgT6R|$;w@bVHDVdx zQ@KKQt}Rx7w|45@Gi%rJrX@?f%U3_OZo~5Bt0$|4>qqacTK`I%YTaas`}tyZ!lq%p zDPnr%F?H^y5xuPNj#hQ+rjfnKPukSqZ5o+C0aE4?^s)M{O(Xm1DSQO(1Jz5_?>D6y ZR&m@1>d?xO*7^+`N4Mv@A2ddP{ufA{qsssQ delta 14307 zcmZX54SW+-*8WVJmb3&WK*Y2J2r^&`1sf>XNYPT7QnAHADMctBt{6~I5fVTbOzX7D zWgM5?(RX+MeyqB_yYA|~;^LNq$Tn?hKv7FUDIYIe6m>#C3n-K?^FC)X#may9H8an> z=bm%!x#ymH?wz6iOTPUizj+wH^0&9#!k>Q6vvWY!3#;uMJF;xR?RGBm3eRzBeZrQ1 zjE;RN4COd0$DJ33T+!y4IIg;J+dXQgZBUR(%30%f4#X96%Cyl`*;I26eotqiO!14( zaG~hna4G9W2kX>s9*IYFbu1QRo$Qk4CiwPSKLEBU(ra`t6fLzEgqka8BhMBsXj4Ce z<7yiMmKN!aB#z@FAEAn!Vx0-vpVV(`w*>2`S*I3=lcj1`MUIOwlBw>9SIvu8rL;(| z6Nl(yiuzH!CjWZPYkEz&q8^ObjEvV_ERiY-Aq=Rzi`olCNgCOY-E;BcE;9TEoWa>urN&e zAy`*84V=z#(&;Q#esD4kNnk*WrqVDhh)3#?h%Jn)J>G@1SC(8NHI>^Vra%1X1G zEOlAd_LsU+*QOT-1}Q~mEn6Kk@aABVNowdNb#(D9(w$tOCF)Ql+mErBblT$8{xJ-q znyvNJ;m8n3SERytUD(rsGR_qGreUyN(HwF|B}OZ%gf}cdOWQtR}UB!+E?V%;jAK#n^Ok2j{9^Uc164McFc`J(G;DmJF`FaLo!ul ztvWY-vE^{wzU+!u`fJUp- zs{^Ua(or3>nr>!C7AZc_krh1e|3oelr53Y1$Enq07^0_TXeO_; z!limk|9(>++uNhls_vW>=&X8*FAJQidMcqXaI)&D#My!4a*;`ydrbQ3Du3R6-2WMP zx!T~y+9Sm33|N`v-w+SCd9~^M=ID1)a~9LChk~-n^%Qco0idpKS}~QTzd0P*$=SJZ zV+MXR_iNRIX@tzKhWSl$o~TCQ(xjgf z{lh7|T0!VKgWzm|{kW*(Lz=<_5zV-0pAQ8Cs{cKBVsO3aWG{$SC}NdjJ}VIygVIbx zgMK)bwI&*~Nhn%1SwaXi`zKQWTy5c^#h~HBMfr4N2iX2_kyC$67T$<~ge9|zC2Wz% z?k!{&qyLm0B0`|8ei>-AJJP}4A=afrkvBi>OqGJBKIa z+SOv`;DR)xM(1WRfNsth=5ySfU~tX=x;4KxfX=O5{j2k~d*4D){rwPy7TQZjz0UJ_ z1L#JmHh|8?-xDk~fX;KCI%3%HffG@r^Nc>a-4AaQ#>sxsqAncf3~~nbI_li{fx4+I zp;IQM;C|_H%GyMwARCGZbq(4VsN96CK>AWZWtCBh8d7vSwS>p$ioRn2UC}=oKv(p4 z2KW_8s|84;=3#3bZHZ>k&aMJa5 z0w|vQrE4j{M8%VB=#*-Zq!RtLn-KS!-@zj$Ev@=+ji&Mnc4&_Fo*7jw??H>QO6hbZ zd}SRbRR-pfA9KxyCLHEn7F#b`8D&M7JgBox!gOPPF?SGVt{{1!EJ`z43dNy%@+9YH zfijQE|=f4_roB${Mmk2q)<#c5JOqEd$yRpT^C;|=74Wb+Q+Nz1X;!h zRESz}5UjOoG^)&UnR({SS>9POI7<*e-ikS~fFl;L!y+Y0Revmpk;$ZVoVK>jU!W_J zCznz$bBLq7fE3Dx=nVcWRL$yE#=Reca#mSgNBPD{r1BB?N7m|%2=VsFH!!liG8=Xl zIrt;r$zYLO^-m)l!*T^FN_>kf@*Jx?!z3>>>y|3AL5_umi`8QzUhF*`x_P0OS39Gw zADPQPqyB58XzV?VEZKUFmdS_Qv`m)B9`nZXJUJ9^6vX=1S8dqCv7)Pi zl$IhB7kLz7WFCsJbMoD$%+O30!p`8;VY*JW4Z;gWCZYCj5N#^oBPVYxZx{P8|zX2d52uSGxVh?vAltmH>1gdnRC3c!24PU^52C@ z`AKT$Arr*bbjpEdxv%yW(nM&5otqikj7gr8{!&HSgkCSB357oOf`+)|(oOqAU*skA z|LBdl{uac}ng#Clngs6HHxR?(PI+Klf>uiru-Ph?cF3M%s8ej_#L|6iU}E_`eh-^t zlII{2w8}Gn(B^{@!a^Vs82lg2M=tOL> zpq}pIU48W8stwJYf5@`WKosu|x?q8caZAT7GM>Dr^q{^Y=v~?>Ke#0@Ao3EZ4abH6 z3;<09MUFIKXfDf~=E71|3QMh(*V?fO+(CI}>|UEvWM$Lra*Qy`^ z;fjVIJ`bVLwx%JFrbvJ2R<=YnHH_!f|IWIHe_uVDwJ9DJD(1K@U}NEk2W?xR64ApZ+qNRA&6L+= z6v@l7Sf0pM=xdm%w?p(Fms4Fw<#l#MHH*B=0eTa{oLRPr{H1=;c*vcE0>nAXs`p$+ z-A|g*qO0CwozVnWgVgNkUOC2HDW`*w?@v)YD#m6_I-LhCurq0hOpC7?ysM3Z93{%M zSew;RWA6{{f*B|_o9Pds*)KX~dbM3CWDRG0Fa8b&K?<2$3dPZ!UW z0?uNg=J(_}x?~GhKuB|-f>s?zZ`}RA#;PX=vNKp$N~ixZ2*KiDCqY=q9a2L~YKzgv zg0)hHvuXy~nNe#||9x9pkQRoxt;k;Z%kA-(f#(db_7L(asX043Pl671EJ$MHAm$O< zqup@@w-ADD?aNf4X|#)HjrzX3rY$fQ3CCzosQvsJ&AK1sZW;?@#R3`eh0~j%_0gF- z^(IntUbhomDR-SAFIcaU7kqx3TAeK>y#0y#*X)cj125^5Gx8<|WO^Vu%;^E-5rk$; zroFXi0(})J!=R~BuV#CKA0VPoNK)Ru?GtPr*GOGRr0zy@oT>Ol8~wp5PT8tmrgjJe zEv%ItO6lw|>Sor61F|2Wt|CnWm2Ne=SNkZLtYgKXS|c2Vfq`UT?PCzi$*{9Ivr%ny z*%C7Ps_m{@`DMQwH>A&^xOUNbSW-r*qsJ8lFOzYattpLxemy4iH%Zt?+7O7g(;)*p z=Or!mN6hbRO{Eivg(EHOtMuwFE|e@wfwiu&se)8yg8 z`51p3HniafxsyYvmFOuH2qN~t!71N$@Gbog!CGca0Sn5^?n{FzgQ8`1B_@kL3rI|6 zOWGm#?z97|CQVwQ&np`_@9Hs3lRl1JY-OQDL=x6D0I|gVX5H;}(s2 zR~;Ikg^@mOj=hJN8ViRw93f}{_`TF@(N7Nau=Vaqa#(YgdUwvl_8`W2BfP;24>Q8j z%<@^kxrzcH*Pq3)xUJwG)HFE-*-aeCF4{B%Ul z$tKP}a9FGBg6j+z!eh+Bwnp46(dCM?6^cJR1FKsz9&l@=o3;JGSW;xxL2M6ap;P(Vwl9rv9B0M_>h045wR>(0$ zXnl~h6?qon*}L#a8`9^bd_+C|@SU*}c}x6bBDbO(G0_^)*N0@~DU+58VbN4se}0w( z|Ky5AV$c(2x2mq&hX+@PPFKw9@jlEwoC<%VXzkE8V@E$vYRJBCqbG(!J^JHrgC^oH z2%iHX0szX*^;q6GM0Y#u!UUncg=N)WqqmVDUQS*+Pd_kIAdZDS!aJ=d>01GZ0>Mqs z4b4I?HkQWN{*+MQD~K`S*vQFF#o#ZQm)(u4E%E(1d0Dih)O}5OIvs8=?DBA0A1XU7 z&oN0Y=IEch&H8VYk|k`BnfjzyaXl&_fKh+2k+o^Ps4i&C81mMKJ80OOZl%-jEr@rV zKa+)UyvuVw`GbF=K&ePN{gyM(_x$D=fzvILP7_UHd)VdgAR+Gg%CbZjs$i$UFJ0%i z8vJ}rqV`*=;*I$4w(#tu@02Ham-?^V;U@AswLN!~?rU>cOPTiae@K-dM`B&jo`)ug z_XE&p>8I2{YCRG`PBQ_{W1aIC>SE{YqIVBv+7i9phiFGRqayiXTCdiiTfthdVGp7` zjE41NiN*7Hnh}T~%7cpN@6vt`O6@L;WPB<#A;<{35^<<)*6s)O)aY5M**sqtS*CRz zCnaaj5V>=^M7aU^Wy`>8eI)lc?q09F+X}yXRSVRM|`%!7jPbb z3v1bwUQon7yL;opSk2KuUsqd!`;fnPOX0v67yY4jZ=j=_J;E)515`+sd7KJNhp2X8 z*QBZJoUm(D0isc|`}@ET(Nne9p@+#gabgq|rwO|ri``KX^IMQ8oSVunZYql{0TIYs zrb0x5>nKapJ-7TriY*nHpRms;7cOI2qU_khE*<#F{e`gY=!SmsiY=y17V*HDlqhp- zDT|( zb5NFtS(%UJyb$rfxVA0u0Iaa0cEFjyT36e}vnYEfpbzvWGLK!3_5lP1!F+Z~-IX_N(7!1dkH%8Yx{9T)m_IdK zSW|)`F50PH${SN~75Sfx+!vum@y3)QlXi+qicIWqcLay(7HoNNvnho;OK^9{PncyM zn`rdJt}dA@25m@aZ0u0zTWfC=3GZs|Yis`_=i#M*oV7jkb9PG3+J(~0Q^K}Wu*StB zENlC{!nU?RhwRQgblpg9zlcV~)M{5^)^^??C*r{A#D3LSY+(IKSrjRMQ$m1g#_Tx^$@Ik7uq?fe%zut;!PBjN`;y8}5Yr`6GOWCu+J?eBP& z6EnYOms+^Po(SD~?@1)87T@(etZz z3QT!Uih`B25Gm?Ogg9-9dg`uay$@o?8qXb0stfW*rWTEo=QxCScjFL9$^YNf8589q zr||A4e5dN4^4FX6sl#^bGhBP_3u65BU^S~?P-^yn&bzL8siht9oGM0_j&q+w;U^uq4 z1>TAG;@=h62YrUN_XbWXQazQeL;I+pC*In>)L~N}$dmSv=Eqz{8qN0akFa9oKT-#;-cnc)M8}jT6A-;zZ3v<>nZ_T*l$OE?+DbCIP2}5! zZHsC1F0+vC_gFS2M2{d5hpgv{exg|l zhZO2wNRDBRV(l7F3ev%13qTG)xH10$J6;1@3c`&$Ax5aPC7|js$X$DxNpznD>kWO` zC!@2(O{P&BO{r6Y(I|h8m02Q>5wkL@Jk>H93iAn4v)ynnitV4e_F^yN^o32u95+R} zWDWeF=->zAiB9~6@I!fJ6E*R%=e$)Y0lSrf)8WPr7}eE4D*`krh^M^;(8LMK z!UAW$)a4BP7;d4#emGH|jp499-siBn{20?CtdG#c{B~jyZrHhaB=#*^Q8Bk=nuD9? z3m4@k@GykF9OKk}3{AK2nl!bhC^HytAo+N6*@`6q&SVMeh9S37UKSguuw8oz%v^ip z^9~abB|A_;o9vq3LZ;M}5I@79gMxHuA-|xv6zU3ip$=m?FA+NzeveQ$Jt6d!nLk{O z11hYOdxTp4v^r+m%;_@hfz`vp+9@3C`TKSrWjm1GkpdjVZ3i|AcBAMFLXZBHgKiR< z5GZWFqVAbCF5%59>eXq3f*PrP6d}XJYwjkcCf*%vj-}VYN;Zkg3*usM)n27ct*f6u zN9yYDpDlG+1Af%%{ng(}3Uz+RP%Rf!iY*bZZHBrJ`0ty_&Th2Wqd$OBC)z=4s5XFz zO2nb;2p?>BxBAByw3zyF(I1Hl$Dmw1YJZ2b41QHf0iB591x9cNzhNtgqkfL%x+{vNfg=e8O;mu zsq520-^woejAp}!c+G-+WR-g;mfvhfaNUBb?FKoz3>(XIM}tZu!Dph zQwzBug)-txD!I)o>*K$Xc<-k~)O(Ht83S(PI}|jjcnuKHBW_3T@whnr=6N zBOTq8Aloq`=9;k^o1oND`hWgS{o@XyHU#D50=rB9zRSJACOlIL|7Smif_MSo*YhWI zujWM}s|1JH;)LzAx?#Mm+V|g~(|CXf*yUsx*CKmtN^y*p+K^PcBi~XhBw!$+##$HX z@zv9s>GBLZEz}E@Lh}WkqxL##k#pBYM`vKA16q=%}4+dPvK%X4dMc$r43wSV1%x|#~RoEoR*_YgEM&WqDVjO zi|gP030817nsI>-qqoL)nl`2CNel?R@Um* zqy_F-bjKG|=h<1HY`wI>(cjL=xvW!oLq8ufBg@VpC1I{CWwyGpq>qojq|u}^WEY|K zT}({kj4{a41CZXMD*a2EMFx%hGfj368vU!9NuWU=FkKmMtWEiSg}QqM zc8E1KL`~8OL8vtQ7H}y+yl#6Hq91Yo96ey z7Y*$2MjR#%MeE%CfoznI!#qTJZe!pUh@v@fLECIO-;{fw1>4J`?l9AEfM~)eN$H?4 z*IrPn^3jvPV13NgC3ubwrWzbdAUmvDNCgRcP%0=}bx~ai?2M5V%bz9?8A-HQ3%$&{63gf(#ZhBce z*|tM~Mn~uL)Ul~d*j6Y`Cmlz0;$7TzEitezcoTU~hW7VwNuV=I)0TF}`fCZPx#W77 zSfFgLqVYXHy1k=~L_}WrG zB%-0}`D#M#^k(y~sKaJf2laWf6d9km4!`*F0KX;T+@(IuOZ!rv5-|CsnAuI$VyKT4?tqW&Czwx=9-QD%>nnOz+=tL7Fv4{_*{kA*Nn%s%+OPr8&W)a>AV(&Z%KnTu+8)-$&}zVre<+%Wqe z@);lGpjD3O!$&zweZ5Vhk6lz(l#QM!#;DPn!8$b(I7iI4{VM!P80Q-ii+vvxvLh)m zUv=}#(9$>Gx6rr9x4_r5^UBSb2MXH(*3vj(9h2ojJlK_Wt$JFf0=iO%eVRe z|2OBsRjVI*>``a-SofG;J?Ovx_Axo`F-s?8=T01#GhyqsdDRI?kKFHnV41pM!OdI$ z--5Ax#a9(}uEaXwX)@oCx%5m)B*)#4=kZor-Z<`Q{W)H~1JA!ss~S$_hw+Tj*XcjP zGhMIUM`c5Qd;f4Gz;q>2rjKj!f^LiuimUxPhJ)hjxQ_K?9dF9J>5~i&IvHo;&gueR zSgp=l^nCDXY@PvvDdf)}X>w!riwO@^U_eEl!0FVdb zi$~lOKtYF_?*sp6;8*Dl&~rT)yn~93J#YhXO%MDjaQ8(5j&=jw37^1ygwxK^D>@Q* z4S4S`JNF7qMwq_s>Ar~G$_F{_WQLu?rye>%ItVTT+l>aqKp1VOm*IN-?WmW5A2;f! z+`zE(23&Rnt^}@vg=d2wS=bl6f#5MS zVJNtoXXj{Ppaz-1*2#A6DFcuDMT4`kNjKmk;Djl5?mmNlKJa{Cmw}f8KL?y|V0tIC z4|po!AOtcL2nBZTxIyqb@EPD027V8?`=TE1ya6`@cg&9qpcfczH`LRtdb!6C9q&;; zk{EuCf($zcEG|a>`oVX@!1X-@9s&MeD11A} zh~H`8-=}x;!&FUxz~%6*8K@uv3-F>sJGTuC2|Ix45Cor}=>jr<`$1tOBYOR9z!cy` zy`JYL0oS63Ym9n)V8#t|b_?XWO5iORSqe}6$W z1|AChCVb>pS}KU35CvS1F`WSXx0|7{F$8x~eGdWm0MqC6Cyn~Kz*om$vKZJ0{9hO% znytkDQQ+fHXo7*)0za!;2ulT-NI?PZ%jlvW{1>nj4De=5XYdN}eN*jRvSFdW0(ZgW zbW!^cfr~&-V@d*>f$0>D7F%-4Y#gHe&j363xuIYy>X%}Ohd{pG;3x{{$g|tYz6Pe# zvTmetIg zZtefj%e=|u%5|&nK3rjPW#>#(do3?g7cBSmUi7QLLo1dn@~?XELG_j8d5Po4jo*5B z`6Ikq_Q;5oMT-KDJho)XL*uuuedP57_2!i~C6q5v$F3ZbOgYoyMe3}Tw Date: Wed, 1 Feb 2023 17:56:26 +0100 Subject: [PATCH 0288/1921] base/ld: only assign .dynamic to the PT_DYNAMIC segment Segment assignment stays valid for all sections following .dynamic, which implies that .got and co also end up in the PT_DYNAMIC segment. This is not intended. Therefore, we move the .dynamic section before bss and assign bss to the rw PT_LOAD segment only. fixes #4750 --- repos/base/src/ld/genode_dyn.ld | 27 +++++++++++++++------------ repos/base/src/ld/genode_rel.ld | 17 ++++++++++------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/repos/base/src/ld/genode_dyn.ld b/repos/base/src/ld/genode_dyn.ld index 57ec92f0f6..a3a77fef1a 100644 --- a/repos/base/src/ld/genode_dyn.ld +++ b/repos/base/src/ld/genode_dyn.ld @@ -212,17 +212,6 @@ SECTIONS } .jcr : { KEEP (*(.jcr)) } .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } - .dynamic : - { - *(.dynamic) - - /* - * Make sure to have a least one entry within the dynamic section, so the - * dynamic sgement point to something valid in case there are no dynamic - * symbols - */ - LONG(0x0); - } : rw : dynamic /* merge .got.plt and .got into .got, since the ARM toolchain for OKL4 * set's * DT_PLTGOT to .got instead of .got.plt */ @@ -247,6 +236,20 @@ SECTIONS LONG(0x0); } .data1 : { *(.data1) } + + .dynamic : + { + *(.dynamic) + + /* + * Make sure to have a least one entry within the dynamic section, so the + * dynamic segment points to something valid in case there are no dynamic + * symbols in a binary. These semi-static binaries are not supported by + * our dynamic linker that depends on the .dynamic section. + */ + LONG(0x0); + } : rw : dynamic + _edata = .; PROVIDE (edata = .); __bss_start = .; .bss : @@ -264,7 +267,7 @@ SECTIONS * pad the .data section. */ . = ALIGN(. != 0 ? 32 / 8 : 1); - } + } : rw . = ALIGN(32 / 8); . = ALIGN(32 / 8); _end = .; PROVIDE (end = .); diff --git a/repos/base/src/ld/genode_rel.ld b/repos/base/src/ld/genode_rel.ld index 9b5add9066..85c44dfb93 100644 --- a/repos/base/src/ld/genode_rel.ld +++ b/repos/base/src/ld/genode_rel.ld @@ -15,10 +15,10 @@ PHDRS { - ro PT_LOAD; - rw PT_LOAD; - dynamic PT_DYNAMIC; - eh_frame PT_GNU_EH_FRAME; + ro PT_LOAD; + rw PT_LOAD; + dynamic PT_DYNAMIC; + eh_frame PT_GNU_EH_FRAME; } SECTIONS @@ -97,7 +97,7 @@ SECTIONS { /* * Leave space for parent capability parameters at start of data - * section. The protection domain creator is reponsible for storing + * section. The protection-domain creator is reponsible for storing * sane values here. */ _parent_cap = .; @@ -130,6 +130,7 @@ SECTIONS .ARM.extab : { *(.ARM.extab*) } + __exidx_start = .; .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) @@ -189,7 +190,6 @@ SECTIONS .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) } .data1 : { *(.data1) } - .dynamic : { *(.dynamic) } : dynamic : rw /* See: genode_dyn.ld */ .got : { *(.got.plt) *(.got) } /* Exception handling */ @@ -199,6 +199,9 @@ SECTIONS KEEP (*(.eh_frame)) LONG(0) } + + .dynamic : { *(.dynamic) } : rw : dynamic + _edata = .; PROVIDE (edata = .); __bss_start = .; .bss : @@ -216,7 +219,7 @@ SECTIONS * pad the .data section. */ . = ALIGN(. != 0 ? 32 / 8 : 1); - } + } : rw . = ALIGN(32 / 8); . = ALIGN(32 / 8); _end = .; PROVIDE (end = .); From d089e80906f18953146d691830a5eca93f4896fe Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 3 Feb 2023 12:11:12 +0100 Subject: [PATCH 0289/1921] sel4: handle non pagefault exceptions by checking for it in core, submitting a signal (if registered) and not replying instantly. Before this commit, an exception (a non page fault) caused and endless "unknown exception" loop between originator and core. This was handled before commit "core: kernel-agnostic 'Mapping' type" by throwing an exception, which was with that commit not working anymore. Fixes #4751 --- repos/base-sel4/src/core/include/ipc_pager.h | 13 ++++--- repos/base-sel4/src/core/pager.cc | 35 +++++++++++-------- .../base-sel4/src/core/spec/arm/fault_info.h | 27 +++++++++++--- .../base-sel4/src/core/spec/x86/fault_info.h | 34 ++++++++++++++---- 4 files changed, 80 insertions(+), 29 deletions(-) diff --git a/repos/base-sel4/src/core/include/ipc_pager.h b/repos/base-sel4/src/core/include/ipc_pager.h index 0f3838a974..c140aac982 100644 --- a/repos/base-sel4/src/core/include/ipc_pager.h +++ b/repos/base-sel4/src/core/include/ipc_pager.h @@ -31,10 +31,10 @@ class Genode::Ipc_pager : public Native_capability addr_t _reply_sel = 0; /* selector to save reply cap */ addr_t _pf_addr = 0; /* page-fault address */ addr_t _pf_ip = 0; /* instruction pointer of faulter */ - addr_t _fault_type = 0; /* type of fault */ - bool _pf_write = false; /* true on write fault */ - bool _pf_exec = false; /* true on exec fault */ - bool _pf_align = false; /* true on unaligned fault */ + bool _exception = false; /* true on non page fault */ + bool _pf_write = false; /* true on write fault */ + bool _pf_exec = false; /* true on exec fault */ + bool _pf_align = false; /* true on unaligned fault */ Mapping _reply_mapping { }; @@ -99,6 +99,11 @@ class Genode::Ipc_pager : public Native_capability * Install memory mapping after pager code executed. */ bool install_mapping(); + + /** + * Return true if last fault was an exception + */ + bool exception() const { return _exception; } }; #endif /* _CORE__INCLUDE__IPC_PAGER_H_ */ diff --git a/repos/base-sel4/src/core/pager.cc b/repos/base-sel4/src/core/pager.cc index ee1f0d6dca..f67c775548 100644 --- a/repos/base-sel4/src/core/pager.cc +++ b/repos/base-sel4/src/core/pager.cc @@ -87,6 +87,8 @@ void Ipc_pager::reply_and_wait_for_fault() addr_t const fault_type = seL4_MessageInfo_get_label(page_fault_msg_info); + _exception = fault_type != seL4_Fault_VMFault; + auto fault_name = [] (addr_t type) { switch (type) { @@ -203,6 +205,22 @@ void Pager_entrypoint::entry() if (!obj) return; + /* on exception (beside page fault) don't reply and submit signal */ + if (_pager.exception()) { + warning("exception ", _pager.fault_addr(), " ", + *obj, " ip=", Hex(_pager.fault_ip())); + obj->submit_exception_signal(); + return; + } + + /* on alignment fault don't reply and submit signal */ + if (_pager.align_fault()) { + warning("alignment fault, addr=", Hex(_pager.fault_addr()), + " ip=", Hex(_pager.fault_ip())); + reply_pending = false; + obj->submit_exception_signal(); + } + /* send reply if page-fault handling succeeded */ reply_pending = !obj->pager(_pager); if (!reply_pending) { @@ -213,20 +231,9 @@ void Pager_entrypoint::entry() return; } - try { - /* install memory mappings */ - if (_pager.install_mapping()) - return; - - /* on alignment fault don't reply and submit signal */ - if (_pager.align_fault()) { - warning("alignment fault, addr=", Hex(_pager.fault_addr()), - " ip=", Hex(_pager.fault_ip())); - throw 1; - } - } catch (...) { - reply_pending = false; - obj->submit_exception_signal(); + /* install memory mappings */ + if (_pager.install_mapping()) { + return; } }); } diff --git a/repos/base-sel4/src/core/spec/arm/fault_info.h b/repos/base-sel4/src/core/spec/arm/fault_info.h index 4a6ceebaa0..29cee4b3d4 100644 --- a/repos/base-sel4/src/core/spec/arm/fault_info.h +++ b/repos/base-sel4/src/core/spec/arm/fault_info.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2017 Genode Labs GmbH + * Copyright (C) 2017-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -26,10 +26,29 @@ struct Fault_info DFSR_WRITE_FAULT = 1UL << 11 }; - Fault_info(seL4_MessageInfo_t) + Genode::addr_t _ip_from_message(seL4_MessageInfo_t &info) const + { + auto const fault_type = seL4_MessageInfo_get_label(info); + + if (fault_type == seL4_Fault_UserException) + return seL4_Fault_UserException_get_FaultIP(seL4_getFault(info)); + else + return seL4_GetMR(0); + } + + Genode::addr_t _pf_from_message(seL4_MessageInfo_t &info) const + { + auto const fault_type = seL4_MessageInfo_get_label(info); + if (fault_type == seL4_Fault_UserException) + return seL4_Fault_UserException_get_Number(seL4_getFault(info)); + else + return seL4_GetMR(1); + } + + Fault_info(seL4_MessageInfo_t info) : - ip(seL4_GetMR(0)), - pf(seL4_GetMR(1)), + ip(_ip_from_message(info)), + pf(_pf_from_message(info)), data_abort(seL4_GetMR(2) != IFSR_FAULT), /* Instruction Fault Status Register (IFSR) resp. Data FSR (DFSR) */ write(data_abort && (seL4_GetMR(3) & DFSR_WRITE_FAULT)), diff --git a/repos/base-sel4/src/core/spec/x86/fault_info.h b/repos/base-sel4/src/core/spec/x86/fault_info.h index 00e7be1822..6c2de35b4c 100644 --- a/repos/base-sel4/src/core/spec/x86/fault_info.h +++ b/repos/base-sel4/src/core/spec/x86/fault_info.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2017 Genode Labs GmbH + * Copyright (C) 2017-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -13,9 +13,9 @@ struct Fault_info { - Genode::addr_t ip = 0; - Genode::addr_t pf = 0; - bool write = 0; + Genode::addr_t const ip; + Genode::addr_t const pf; + bool const write; /* * Intel manual: 6.15 EXCEPTION AND INTERRUPT REFERENCE @@ -29,10 +29,30 @@ struct Fault_info ERR_P = 1 << 0, }; - Fault_info(seL4_MessageInfo_t) + Genode::addr_t _ip_from_message(seL4_MessageInfo_t &info) const + { + auto const fault_type = seL4_MessageInfo_get_label(info); + + if (fault_type == seL4_Fault_UserException) + return seL4_Fault_UserException_get_FaultIP(seL4_getFault(info)); + else + return seL4_GetMR(0); + } + + Genode::addr_t _pf_from_message(seL4_MessageInfo_t &info) const + { + auto const fault_type = seL4_MessageInfo_get_label(info); + + if (fault_type == seL4_Fault_UserException) + return seL4_Fault_UserException_get_Number(seL4_getFault(info)); + else + return seL4_GetMR(1); + } + + Fault_info(seL4_MessageInfo_t info) : - ip(seL4_GetMR(0)), - pf(seL4_GetMR(1)), + ip(_ip_from_message(info)), + pf(_pf_from_message(info)), write(seL4_GetMR(3) & ERR_W) { } From c8cf33a25129cbaa885ab8c9ab7acd7c9a12ff35 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Sat, 4 Feb 2023 19:00:45 +0100 Subject: [PATCH 0290/1921] sel4: flush vm pages on out of index pressure re-create semantic as done before commit "core: kernel-agnostic 'Mapping' type" Issue #4751 --- .../src/core/spec/x86/vm_session_component.cc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/repos/base-sel4/src/core/spec/x86/vm_session_component.cc b/repos/base-sel4/src/core/spec/x86/vm_session_component.cc index b241430fcb..3e29f2dbc8 100644 --- a/repos/base-sel4/src/core/spec/x86/vm_session_component.cc +++ b/repos/base-sel4/src/core/spec/x86/vm_session_component.cc @@ -248,25 +248,31 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc, addr_t const guest_phys, Attach_attr const attribute) { - Vm_space::Map_attr const attr { + Vm_space::Map_attr const attr_noflush { .cached = (dsc.cacheability() == CACHED), .write_combined = (dsc.cacheability() == WRITE_COMBINED), .writeable = dsc.writeable() && attribute.writeable, .executable = attribute.executable, .flush_support = false }; + Vm_space::Map_attr const attr_flush { + .cached = (dsc.cacheability() == CACHED), + .write_combined = (dsc.cacheability() == WRITE_COMBINED), + .writeable = dsc.writeable() && attribute.writeable, + .executable = attribute.executable, + .flush_support = true }; + Flexpage_iterator flex(dsc.phys_addr() + attribute.offset, attribute.size, guest_phys, attribute.size, guest_phys); Flexpage page = flex.page(); while (page.valid()) { - enum { NO_FLUSH = false, FLUSH = true }; try { try { _vm_space.alloc_guest_page_tables(page.hotspot, 1 << page.log2_order); _vm_space.map_guest(page.addr, page.hotspot, - (1 << page.log2_order) / 4096, attr); + (1 << page.log2_order) / 4096, attr_noflush); } catch (Page_table_registry::Mapping_cache_full full) { if (full.reason == Page_table_registry::Mapping_cache_full::MEMORY) { if (_ram_quota_guard().limit().value > 4 * 1024 * 1024) @@ -299,7 +305,7 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc, } _vm_space.map_guest(page.addr, page.hotspot, - (1 << page.log2_order) / 4096, attr); + (1 << page.log2_order) / 4096, attr_flush); } catch (Vm_space::Alloc_page_table_failed) { Genode::error("alloc page table failed"); return; From 5bdc88bf57d66155e45d2da56e1d0f3ccf9f5a96 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Wed, 1 Feb 2023 14:51:54 +0100 Subject: [PATCH 0291/1921] base-hw scheduler: sanitize access to invalid head Issue #4755 --- repos/base-hw/src/core/kernel/cpu.h | 2 +- repos/base-hw/src/core/kernel/cpu_scheduler.cc | 7 +++++-- repos/base-hw/src/core/kernel/cpu_scheduler.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/repos/base-hw/src/core/kernel/cpu.h b/repos/base-hw/src/core/kernel/cpu.h index e47d1adf73..35ab1b0014 100644 --- a/repos/base-hw/src/core/kernel/cpu.h +++ b/repos/base-hw/src/core/kernel/cpu.h @@ -171,7 +171,7 @@ class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout /** * Returns the currently active job */ - Job & scheduled_job() const { + Job & scheduled_job() { return *static_cast(&_scheduler.head())->helping_destination(); } unsigned id() const { return _id; } diff --git a/repos/base-hw/src/core/kernel/cpu_scheduler.cc b/repos/base-hw/src/core/kernel/cpu_scheduler.cc index fd600e73d2..c97d49285d 100644 --- a/repos/base-hw/src/core/kernel/cpu_scheduler.cc +++ b/repos/base-hw/src/core/kernel/cpu_scheduler.cc @@ -313,9 +313,12 @@ void Cpu_scheduler::quota(Share &s, unsigned const q) } -Cpu_share &Cpu_scheduler::head() const +Cpu_share &Cpu_scheduler::head() { - assert(_head); + if (!_head) { + Genode::error("attempt to access invalid scheduler head"); + update(_last_time); + } return *_head; } diff --git a/repos/base-hw/src/core/kernel/cpu_scheduler.h b/repos/base-hw/src/core/kernel/cpu_scheduler.h index a1e4a0770f..4699292f40 100644 --- a/repos/base-hw/src/core/kernel/cpu_scheduler.h +++ b/repos/base-hw/src/core/kernel/cpu_scheduler.h @@ -233,7 +233,7 @@ class Kernel::Cpu_scheduler * Accessors */ - Share &head() const; + Share &head(); unsigned head_quota() const { return Genode::min(_head_quota, _residual); } unsigned quota() const { return _quota; } From c10904967b97dcef84ad845a46e0384945856551 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 8 Feb 2023 16:06:57 +0100 Subject: [PATCH 0292/1921] core: improve coding-style consistency --- repos/base-nova/src/core/include/irq_object.h | 1 + repos/base-nova/src/core/include/pager.h | 736 +++++++++--------- repos/base-nova/src/core/include/platform.h | 210 ++--- .../base-nova/src/core/include/platform_pd.h | 144 ++-- .../src/core/include/platform_thread.h | 381 ++++----- .../src/core/include/vm_session_component.h | 1 + repos/base-sel4/src/core/include/irq_object.h | 1 + .../src/core/include/page_table_registry.h | 1 + .../src/core/include/rpc_cap_factory.h | 1 + .../base-sel4/src/core/include/thread_sel4.h | 47 +- .../src/core/include/untyped_memory.h | 1 + .../src/core/include/vm_session_component.h | 1 + repos/base/src/core/include/address_space.h | 1 + repos/base/src/core/include/boot_modules.h | 1 + .../src/core/include/constrained_core_ram.h | 1 + repos/base/src/core/include/core_log.h | 1 + repos/base/src/core/include/cpu_root.h | 110 +-- .../src/core/include/cpu_thread_allocator.h | 4 +- .../src/core/include/dataspace_component.h | 258 +++--- repos/base/src/core/include/io_mem_root.h | 68 +- .../core/include/io_mem_session_component.h | 204 ++--- repos/base/src/core/include/io_port_root.h | 98 +-- .../core/include/io_port_session_component.h | 90 +-- repos/base/src/core/include/irq_args.h | 1 + repos/base/src/core/include/irq_object.h | 3 +- repos/base/src/core/include/irq_root.h | 1 + .../src/core/include/irq_session_component.h | 1 + repos/base/src/core/include/log_root.h | 48 +- .../src/core/include/log_session_component.h | 90 +-- repos/base/src/core/include/pd_root.h | 4 +- .../base/src/core/include/platform_generic.h | 162 ++-- .../src/core/include/region_map_component.h | 2 +- repos/base/src/core/include/rom_root.h | 53 +- .../src/core/include/rom_session_component.h | 110 +-- repos/base/src/core/include/rpc_cap_factory.h | 1 + repos/base/src/core/include/signal_broker.h | 1 + .../src/core/include/signal_delivery_proxy.h | 158 ++-- repos/base/src/core/include/vm_root.h | 1 + 38 files changed, 1517 insertions(+), 1480 deletions(-) diff --git a/repos/base-nova/src/core/include/irq_object.h b/repos/base-nova/src/core/include/irq_object.h index 869eeed784..fbdce58f78 100644 --- a/repos/base-nova/src/core/include/irq_object.h +++ b/repos/base-nova/src/core/include/irq_object.h @@ -17,6 +17,7 @@ namespace Genode { class Irq_object; class Irq_args; } + class Genode::Irq_object { private: diff --git a/repos/base-nova/src/core/include/pager.h b/repos/base-nova/src/core/include/pager.h index 9b0d350324..f29df601ef 100644 --- a/repos/base-nova/src/core/include/pager.h +++ b/repos/base-nova/src/core/include/pager.h @@ -29,379 +29,381 @@ #include #include - namespace Genode { typedef Cpu_session::Thread_creation_failed Invalid_thread; class Pager_entrypoint; class Pager_object; - - class Exception_handlers - { - private: - - template - __attribute__((regparm(1))) static void _handler(Pager_object &); - - public: - - Exception_handlers(Pager_object &); - - template - void register_handler(Pager_object &, Nova::Mtd, - void (__attribute__((regparm(1)))*)(Pager_object &) = nullptr); - }; - - - class Pager_object : public Object_pool::Entry - { - private: - - unsigned long _badge; /* used for debugging */ - - /** - * User-level signal handler registered for this pager object via - * 'Cpu_session::exception_handler()'. - */ - Signal_context_capability _exception_sigh { }; - - /** - * selectors for - * - cleanup portal - * - semaphore used by caller used to notify paused state - * - semaphore used to block during page fault handling or pausing - */ - addr_t _selectors; - - addr_t _initial_esp = 0; - addr_t _initial_eip = 0; - addr_t _client_exc_pt_sel; - - Mutex _state_lock { }; - - struct - { - struct Thread_state thread; - addr_t sel_client_ec; - enum { - BLOCKED = 0x1U, - DEAD = 0x2U, - SINGLESTEP = 0x4U, - SIGNAL_SM = 0x8U, - DISSOLVED = 0x10U, - SUBMIT_SIGNAL = 0x20U, - BLOCKED_PAUSE_SM = 0x40U, - MIGRATE = 0x80U - }; - uint8_t _status; - bool modified; - - /* convenience function to access pause/recall state */ - inline bool blocked() { return _status & BLOCKED;} - inline void block() { _status |= BLOCKED; } - inline void unblock() { _status &= (uint8_t)(~BLOCKED); } - inline bool blocked_pause_sm() { return _status & BLOCKED_PAUSE_SM;} - inline void block_pause_sm() { _status |= (uint8_t)BLOCKED_PAUSE_SM; } - inline void unblock_pause_sm() { _status &= (uint8_t)(~BLOCKED_PAUSE_SM); } - - inline void mark_dead() { _status |= DEAD; } - inline bool is_dead() { return _status & DEAD; } - - inline bool singlestep() { return _status & SINGLESTEP; } - - inline void mark_signal_sm() { _status |= SIGNAL_SM; } - inline bool has_signal_sm() { return _status & SIGNAL_SM; } - - inline void mark_dissolved() { _status |= DISSOLVED; } - inline bool dissolved() { return _status & DISSOLVED; } - - inline bool to_submit() { return _status & SUBMIT_SIGNAL; } - inline void submit_signal() { _status |= SUBMIT_SIGNAL; } - inline void reset_submit() { _status &= (uint8_t)(~SUBMIT_SIGNAL); } - - bool migrate() const { return _status & MIGRATE; } - void reset_migrate() { _status &= (uint8_t)(~MIGRATE); } - void request_migrate() { _status |= MIGRATE; } - } _state { }; - - Cpu_session_capability _cpu_session_cap; - Thread_capability _thread_cap; - Affinity::Location _location; - Affinity::Location _next_location { }; - Exception_handlers _exceptions; - - addr_t _pd_target; - - void _copy_state_from_utcb(Nova::Utcb const &utcb); - void _copy_state_to_utcb(Nova::Utcb &utcb) const; - - uint8_t _unsynchronized_client_recall(bool get_state_and_block); - - addr_t sel_pt_cleanup() const { return _selectors; } - addr_t sel_sm_block_pause() const { return _selectors + 1; } - addr_t sel_sm_block_oom() const { return _selectors + 2; } - addr_t sel_oom_portal() const { return _selectors + 3; } - - __attribute__((regparm(1))) - static void _page_fault_handler(Pager_object &); - - __attribute__((regparm(1))) - static void _startup_handler(Pager_object &); - - __attribute__((regparm(1))) - static void _invoke_handler(Pager_object &); - - __attribute__((regparm(1))) - static void _recall_handler(Pager_object &); - - __attribute__((regparm(3))) - static void _oom_handler(addr_t, addr_t, addr_t); - - void _construct_pager(); - bool _migrate_thread(); - - public: - - Pager_object(Cpu_session_capability cpu_session_cap, - Thread_capability thread_cap, - unsigned long badge, Affinity::Location location, - Genode::Session_label const &, - Cpu_session::Name const &); - - virtual ~Pager_object(); - - unsigned long badge() const { return _badge; } - void reset_badge() - { - Genode::Mutex::Guard guard(_state_lock); - _badge = 0; - } - - const char * client_thread() const; - const char * client_pd() const; - - virtual int pager(Ipc_pager &ps) = 0; - - /** - * Assign user-level exception handler for the pager object - */ - void exception_handler(Signal_context_capability sigh) - { - _exception_sigh = sigh; - } - - Affinity::Location location() const { return _location; } - - void migrate(Affinity::Location); - - /** - * Assign PD selector to PD - */ - void assign_pd(addr_t pd_sel) { _pd_target = pd_sel; } - addr_t pd_sel() const { return _pd_target; } - - void exception(uint8_t exit_id); - - /** - * Return base of initial portal window - */ - addr_t exc_pt_sel_client() { return _client_exc_pt_sel; } - - /** - * Set initial stack pointer used by the startup handler - */ - addr_t initial_esp() { return _initial_esp; } - void initial_esp(addr_t esp) { _initial_esp = esp; } - - /** - * Set initial instruction pointer used by the startup handler - */ - void initial_eip(addr_t eip) { _initial_eip = eip; } - - /** - * Continue execution of pager object - */ - void wake_up(); - - /** - * Notify exception handler about the occurrence of an exception - */ - bool submit_exception_signal() - { - if (!_exception_sigh.valid()) return false; - - _state.reset_submit(); - - Signal_transmitter transmitter(_exception_sigh); - transmitter.submit(); - - return true; - } - - /** - * Copy thread state of recalled thread. - */ - bool copy_thread_state(Thread_state * state_dst) - { - Mutex::Guard _state_lock_guard(_state_lock); - - if (!state_dst || !_state.blocked()) - return false; - - *state_dst = _state.thread; - - return true; - } - - /* - * Copy thread state to recalled thread. - */ - bool copy_thread_state(Thread_state state_src) - { - Mutex::Guard _state_lock_guard(_state_lock); - - if (!_state.blocked()) - return false; - - _state.thread = state_src; - _state.modified = true; - - return true; - } - - uint8_t client_recall(bool get_state_and_block); - void client_set_ec(addr_t ec) { _state.sel_client_ec = ec; } - - inline void single_step(bool on) - { - _state_lock.acquire(); - - if (_state.is_dead() || !_state.blocked() || - (on && (_state._status & _state.SINGLESTEP)) || - (!on && !(_state._status & _state.SINGLESTEP))) { - _state_lock.release(); - return; - } - - if (on) - _state._status |= _state.SINGLESTEP; - else - _state._status &= (uint8_t)(~_state.SINGLESTEP); - - _state_lock.release(); - - /* force client in exit and thereby apply single_step change */ - client_recall(false); - } - - /** - * Return CPU session that was used to created the thread - */ - Cpu_session_capability cpu_session_cap() const { return _cpu_session_cap; } - - /** - * Return thread capability - * - * This function enables the destructor of the thread's - * address-space region map to kill the thread. - */ - Thread_capability thread_cap() const { return _thread_cap; } - - /** - * Note in the thread state that an unresolved page - * fault occurred. - */ - void unresolved_page_fault_occurred() - { - _state.thread.unresolved_page_fault = true; - } - - /** - * Make sure nobody is in the handler anymore by doing an IPC to a - * local cap pointing to same serving thread (if not running in the - * context of the serving thread). When the call returns - * we know that nobody is handled by this object anymore, because - * all remotely available portals had been revoked beforehand. - */ - void cleanup_call(); - - /** - * Portal called by thread that causes a out of memory in kernel. - */ - addr_t create_oom_portal(); - - enum Policy { - STOP = 1, - UPGRADE_CORE_TO_DST = 2, - UPGRADE_PREFER_SRC_TO_DST = 3, - }; - - enum Oom { - SEND = 1, REPLY = 2, SELF = 4, - SRC_CORE_PD = ~0UL, SRC_PD_UNKNOWN = 0, - NO_NOTIFICATION = 0 - }; - - /** - * Implements policy on how to react on out of memory in kernel. - * - * Used solely inside core. On Genode core creates all the out - * of memory portals per EC. If the PD of a EC runs out of kernel - * memory it causes a OOM portal traversal, which is handled - * by the pager object of the causing thread. - * - * /param pd_sel PD selector from where to transfer kernel memory - * resources. The PD of this pager_object is the - * target PD. - * /param pd debug feature - string of PD (transfer_from) - * /param thread debug feature - string of EC (transfer_from) - */ - uint8_t handle_oom(addr_t pd_sel = SRC_CORE_PD, - const char * pd = "core", - const char * thread = "unknown", - Policy = Policy::UPGRADE_CORE_TO_DST); - static uint8_t handle_oom(addr_t pd_from, addr_t pd_to, - char const * src_pd, - char const * src_thread, - Policy policy, - addr_t sm_notify = NO_NOTIFICATION, - char const * dst_pd = "unknown", - char const * dst_thread = "unknown"); - - void print(Output &out) const; - }; - - /** - * Paging entry point - * - * For a paging entry point can hold only one activation. So, paging is - * strictly serialized for one entry point. - */ - class Pager_entrypoint : public Object_pool - { - public: - - /** - * Constructor - * - * \param cap_factory factory for creating capabilities - * for the pager objects managed by this - * entry point - */ - Pager_entrypoint(Rpc_cap_factory &cap_factory); - - /** - * Associate Pager_object with the entry point - */ - Pager_capability manage(Pager_object &) { - return Pager_capability(); } - - /** - * Dissolve Pager_object from entry point - */ - void dissolve(Pager_object &obj); - }; + class Exception_handlers; } + +class Genode::Exception_handlers +{ + private: + + template + __attribute__((regparm(1))) static void _handler(Pager_object &); + + public: + + Exception_handlers(Pager_object &); + + template + void register_handler(Pager_object &, Nova::Mtd, + void (__attribute__((regparm(1)))*)(Pager_object &) = nullptr); +}; + + +class Genode::Pager_object : public Object_pool::Entry +{ + private: + + unsigned long _badge; /* used for debugging */ + + /** + * User-level signal handler registered for this pager object via + * 'Cpu_session::exception_handler()'. + */ + Signal_context_capability _exception_sigh { }; + + /** + * selectors for + * - cleanup portal + * - semaphore used by caller used to notify paused state + * - semaphore used to block during page fault handling or pausing + */ + addr_t _selectors; + + addr_t _initial_esp = 0; + addr_t _initial_eip = 0; + addr_t _client_exc_pt_sel; + + Mutex _state_lock { }; + + struct + { + struct Thread_state thread; + addr_t sel_client_ec; + enum { + BLOCKED = 0x1U, + DEAD = 0x2U, + SINGLESTEP = 0x4U, + SIGNAL_SM = 0x8U, + DISSOLVED = 0x10U, + SUBMIT_SIGNAL = 0x20U, + BLOCKED_PAUSE_SM = 0x40U, + MIGRATE = 0x80U + }; + uint8_t _status; + bool modified; + + /* convenience function to access pause/recall state */ + inline bool blocked() { return _status & BLOCKED;} + inline void block() { _status |= BLOCKED; } + inline void unblock() { _status &= (uint8_t)(~BLOCKED); } + inline bool blocked_pause_sm() { return _status & BLOCKED_PAUSE_SM;} + inline void block_pause_sm() { _status |= (uint8_t)BLOCKED_PAUSE_SM; } + inline void unblock_pause_sm() { _status &= (uint8_t)(~BLOCKED_PAUSE_SM); } + + inline void mark_dead() { _status |= DEAD; } + inline bool is_dead() { return _status & DEAD; } + + inline bool singlestep() { return _status & SINGLESTEP; } + + inline void mark_signal_sm() { _status |= SIGNAL_SM; } + inline bool has_signal_sm() { return _status & SIGNAL_SM; } + + inline void mark_dissolved() { _status |= DISSOLVED; } + inline bool dissolved() { return _status & DISSOLVED; } + + inline bool to_submit() { return _status & SUBMIT_SIGNAL; } + inline void submit_signal() { _status |= SUBMIT_SIGNAL; } + inline void reset_submit() { _status &= (uint8_t)(~SUBMIT_SIGNAL); } + + bool migrate() const { return _status & MIGRATE; } + void reset_migrate() { _status &= (uint8_t)(~MIGRATE); } + void request_migrate() { _status |= MIGRATE; } + } _state { }; + + Cpu_session_capability _cpu_session_cap; + Thread_capability _thread_cap; + Affinity::Location _location; + Affinity::Location _next_location { }; + Exception_handlers _exceptions; + + addr_t _pd_target; + + void _copy_state_from_utcb(Nova::Utcb const &utcb); + void _copy_state_to_utcb(Nova::Utcb &utcb) const; + + uint8_t _unsynchronized_client_recall(bool get_state_and_block); + + addr_t sel_pt_cleanup() const { return _selectors; } + addr_t sel_sm_block_pause() const { return _selectors + 1; } + addr_t sel_sm_block_oom() const { return _selectors + 2; } + addr_t sel_oom_portal() const { return _selectors + 3; } + + __attribute__((regparm(1))) + static void _page_fault_handler(Pager_object &); + + __attribute__((regparm(1))) + static void _startup_handler(Pager_object &); + + __attribute__((regparm(1))) + static void _invoke_handler(Pager_object &); + + __attribute__((regparm(1))) + static void _recall_handler(Pager_object &); + + __attribute__((regparm(3))) + static void _oom_handler(addr_t, addr_t, addr_t); + + void _construct_pager(); + bool _migrate_thread(); + + public: + + Pager_object(Cpu_session_capability cpu_session_cap, + Thread_capability thread_cap, + unsigned long badge, Affinity::Location location, + Genode::Session_label const &, + Cpu_session::Name const &); + + virtual ~Pager_object(); + + unsigned long badge() const { return _badge; } + void reset_badge() + { + Genode::Mutex::Guard guard(_state_lock); + _badge = 0; + } + + const char * client_thread() const; + const char * client_pd() const; + + virtual int pager(Ipc_pager &ps) = 0; + + /** + * Assign user-level exception handler for the pager object + */ + void exception_handler(Signal_context_capability sigh) + { + _exception_sigh = sigh; + } + + Affinity::Location location() const { return _location; } + + void migrate(Affinity::Location); + + /** + * Assign PD selector to PD + */ + void assign_pd(addr_t pd_sel) { _pd_target = pd_sel; } + addr_t pd_sel() const { return _pd_target; } + + void exception(uint8_t exit_id); + + /** + * Return base of initial portal window + */ + addr_t exc_pt_sel_client() { return _client_exc_pt_sel; } + + /** + * Set initial stack pointer used by the startup handler + */ + addr_t initial_esp() { return _initial_esp; } + void initial_esp(addr_t esp) { _initial_esp = esp; } + + /** + * Set initial instruction pointer used by the startup handler + */ + void initial_eip(addr_t eip) { _initial_eip = eip; } + + /** + * Continue execution of pager object + */ + void wake_up(); + + /** + * Notify exception handler about the occurrence of an exception + */ + bool submit_exception_signal() + { + if (!_exception_sigh.valid()) return false; + + _state.reset_submit(); + + Signal_transmitter transmitter(_exception_sigh); + transmitter.submit(); + + return true; + } + + /** + * Copy thread state of recalled thread. + */ + bool copy_thread_state(Thread_state * state_dst) + { + Mutex::Guard _state_lock_guard(_state_lock); + + if (!state_dst || !_state.blocked()) + return false; + + *state_dst = _state.thread; + + return true; + } + + /* + * Copy thread state to recalled thread. + */ + bool copy_thread_state(Thread_state state_src) + { + Mutex::Guard _state_lock_guard(_state_lock); + + if (!_state.blocked()) + return false; + + _state.thread = state_src; + _state.modified = true; + + return true; + } + + uint8_t client_recall(bool get_state_and_block); + void client_set_ec(addr_t ec) { _state.sel_client_ec = ec; } + + inline void single_step(bool on) + { + _state_lock.acquire(); + + if (_state.is_dead() || !_state.blocked() || + (on && (_state._status & _state.SINGLESTEP)) || + (!on && !(_state._status & _state.SINGLESTEP))) { + _state_lock.release(); + return; + } + + if (on) + _state._status |= _state.SINGLESTEP; + else + _state._status &= (uint8_t)(~_state.SINGLESTEP); + + _state_lock.release(); + + /* force client in exit and thereby apply single_step change */ + client_recall(false); + } + + /** + * Return CPU session that was used to created the thread + */ + Cpu_session_capability cpu_session_cap() const { return _cpu_session_cap; } + + /** + * Return thread capability + * + * This function enables the destructor of the thread's + * address-space region map to kill the thread. + */ + Thread_capability thread_cap() const { return _thread_cap; } + + /** + * Note in the thread state that an unresolved page + * fault occurred. + */ + void unresolved_page_fault_occurred() + { + _state.thread.unresolved_page_fault = true; + } + + /** + * Make sure nobody is in the handler anymore by doing an IPC to a + * local cap pointing to same serving thread (if not running in the + * context of the serving thread). When the call returns + * we know that nobody is handled by this object anymore, because + * all remotely available portals had been revoked beforehand. + */ + void cleanup_call(); + + /** + * Portal called by thread that causes a out of memory in kernel. + */ + addr_t create_oom_portal(); + + enum Policy { + STOP = 1, + UPGRADE_CORE_TO_DST = 2, + UPGRADE_PREFER_SRC_TO_DST = 3, + }; + + enum Oom { + SEND = 1, REPLY = 2, SELF = 4, + SRC_CORE_PD = ~0UL, SRC_PD_UNKNOWN = 0, + NO_NOTIFICATION = 0 + }; + + /** + * Implements policy on how to react on out of memory in kernel. + * + * Used solely inside core. On Genode core creates all the out + * of memory portals per EC. If the PD of a EC runs out of kernel + * memory it causes a OOM portal traversal, which is handled + * by the pager object of the causing thread. + * + * /param pd_sel PD selector from where to transfer kernel memory + * resources. The PD of this pager_object is the + * target PD. + * /param pd debug feature - string of PD (transfer_from) + * /param thread debug feature - string of EC (transfer_from) + */ + uint8_t handle_oom(addr_t pd_sel = SRC_CORE_PD, + const char * pd = "core", + const char * thread = "unknown", + Policy = Policy::UPGRADE_CORE_TO_DST); + static uint8_t handle_oom(addr_t pd_from, addr_t pd_to, + char const * src_pd, + char const * src_thread, + Policy policy, + addr_t sm_notify = NO_NOTIFICATION, + char const * dst_pd = "unknown", + char const * dst_thread = "unknown"); + + void print(Output &out) const; +}; + + +/** + * Paging entry point + * + * For a paging entry point can hold only one activation. So, paging is + * strictly serialized for one entry point. + */ +class Genode::Pager_entrypoint : public Object_pool +{ + public: + + /** + * Constructor + * + * \param cap_factory factory for creating capabilities + * for the pager objects managed by this + * entry point + */ + Pager_entrypoint(Rpc_cap_factory &cap_factory); + + /** + * Associate Pager_object with the entry point + */ + Pager_capability manage(Pager_object &) { + return Pager_capability(); } + + /** + * Dissolve Pager_object from entry point + */ + void dissolve(Pager_object &obj); +}; + #endif /* _CORE__INCLUDE__PAGER_H_ */ diff --git a/repos/base-nova/src/core/include/platform.h b/repos/base-nova/src/core/include/platform.h index 615a90aa2e..c38a3925f0 100644 --- a/repos/base-nova/src/core/include/platform.h +++ b/repos/base-nova/src/core/include/platform.h @@ -20,127 +20,127 @@ #include #include -namespace Genode { - - class Platform : public Platform_generic - { - public: - - enum { MAX_SUPPORTED_CPUS = 64}; - - private: - - Core_mem_allocator _core_mem_alloc { }; /* core-accessible memory */ - Phys_allocator _io_mem_alloc; /* MMIO allocator */ - Phys_allocator _io_port_alloc; /* I/O port allocator */ - Phys_allocator _irq_alloc; /* IRQ allocator */ - Rom_fs _rom_fs { }; /* ROM file system */ - unsigned _gsi_base_sel { 0 }; /* cap selector of 1st IRQ */ - unsigned _core_pd_sel { 0 }; /* cap selector of root PD */ - addr_t _core_phys_start { 0 }; - - /** - * Virtual address range usable by non-core processes - */ - const addr_t _vm_base; - size_t _vm_size; - - /* available CPUs */ - Affinity::Space _cpus; - - /* map of virtual cpu ids in Genode to kernel cpu ids */ - uint16_t map_cpu_ids[MAX_SUPPORTED_CPUS]; - - addr_t _map_pages(addr_t phys_page, addr_t pages, - bool guard_page = false); - - size_t _max_caps = 0; - - void _init_rom_modules(); - - addr_t _rom_module_phys(addr_t virt); - - public: - - /** - * Constructor - */ - Platform(); +namespace Genode { class Platform; } - /******************************** - ** Generic platform interface ** - ********************************/ +class Genode::Platform : public Platform_generic +{ + public: - Range_allocator &ram_alloc() override { return _core_mem_alloc.phys_alloc(); } - Range_allocator &io_mem_alloc() override { return _io_mem_alloc; } - Range_allocator &io_port_alloc() override { return _io_port_alloc; } - Range_allocator &irq_alloc() override { return _irq_alloc; } - Range_allocator ®ion_alloc() override { return _core_mem_alloc.virt_alloc(); } - Range_allocator &core_mem_alloc() override { return _core_mem_alloc; } - addr_t vm_start() const override { return _vm_base; } - size_t vm_size() const override { return _vm_size; } - Rom_fs &rom_fs() override { return _rom_fs; } - size_t max_caps() const override { return _max_caps; } - void wait_for_exit() override; + enum { MAX_SUPPORTED_CPUS = 64}; - bool supports_direct_unmap() const override { return true; } + private: - Address_space &core_pd() { ASSERT_NEVER_CALLED; } + Core_mem_allocator _core_mem_alloc { }; /* core-accessible memory */ + Phys_allocator _io_mem_alloc; /* MMIO allocator */ + Phys_allocator _io_port_alloc; /* I/O port allocator */ + Phys_allocator _irq_alloc; /* IRQ allocator */ + Rom_fs _rom_fs { }; /* ROM file system */ + unsigned _gsi_base_sel { 0 }; /* cap selector of 1st IRQ */ + unsigned _core_pd_sel { 0 }; /* cap selector of root PD */ + addr_t _core_phys_start { 0 }; - Affinity::Space affinity_space() const override { return _cpus; } + /** + * Virtual address range usable by non-core processes + */ + const addr_t _vm_base; + size_t _vm_size; + + /* available CPUs */ + Affinity::Space _cpus; + + /* map of virtual cpu ids in Genode to kernel cpu ids */ + uint16_t map_cpu_ids[MAX_SUPPORTED_CPUS]; + + addr_t _map_pages(addr_t phys_page, addr_t pages, + bool guard_page = false); + + size_t _max_caps = 0; + + void _init_rom_modules(); + + addr_t _rom_module_phys(addr_t virt); + + public: + + /** + * Constructor + */ + Platform(); - /******************* - ** NOVA specific ** - *******************/ + /******************************** + ** Generic platform interface ** + ********************************/ - /** - * Return capability selector of first global system interrupt - */ - int gsi_base_sel() const { return _gsi_base_sel; } + Range_allocator &ram_alloc() override { return _core_mem_alloc.phys_alloc(); } + Range_allocator &io_mem_alloc() override { return _io_mem_alloc; } + Range_allocator &io_port_alloc() override { return _io_port_alloc; } + Range_allocator &irq_alloc() override { return _irq_alloc; } + Range_allocator ®ion_alloc() override { return _core_mem_alloc.virt_alloc(); } + Range_allocator &core_mem_alloc() override { return _core_mem_alloc; } + addr_t vm_start() const override { return _vm_base; } + size_t vm_size() const override { return _vm_size; } + Rom_fs &rom_fs() override { return _rom_fs; } + size_t max_caps() const override { return _max_caps; } + void wait_for_exit() override; - /** - * Determine size of a core local mapping required for a - * core_rm_session detach(). - */ - size_t region_alloc_size_at(void * addr) - { - using Size_at_error = Allocator_avl::Size_at_error; + bool supports_direct_unmap() const override { return true; } - return (_core_mem_alloc.virt_alloc())()->size_at(addr).convert( - [ ] (size_t s) { return s; }, - [ ] (Size_at_error) { return 0U; }); - } + Address_space &core_pd() { ASSERT_NEVER_CALLED; } - /** - * Return kernel CPU ID for given Genode CPU - */ - unsigned pager_index(Affinity::Location location) const; - unsigned kernel_cpu_id(Affinity::Location location) const; + Affinity::Space affinity_space() const override { return _cpus; } - Affinity::Location sanitize(Affinity::Location location) { - return Affinity::Location(location.xpos() % _cpus.width(), - location.ypos() % _cpus.height(), - location.width(), location.height()); - } - /** - * PD kernel capability selector of core - */ - unsigned core_pd_sel() const { return _core_pd_sel; } + /******************* + ** NOVA specific ** + *******************/ - template - void for_each_location(FUNC const &fn) - { - for (unsigned x = 0; x < _cpus.width(); x++) { - for (unsigned y = 0; y < _cpus.height(); y++) { - Affinity::Location location(x, y, 1, 1); - fn(location); - } + /** + * Return capability selector of first global system interrupt + */ + int gsi_base_sel() const { return _gsi_base_sel; } + + /** + * Determine size of a core local mapping required for a + * core_rm_session detach(). + */ + size_t region_alloc_size_at(void * addr) + { + using Size_at_error = Allocator_avl::Size_at_error; + + return (_core_mem_alloc.virt_alloc())()->size_at(addr).convert( + [ ] (size_t s) { return s; }, + [ ] (Size_at_error) { return 0U; }); + } + + /** + * Return kernel CPU ID for given Genode CPU + */ + unsigned pager_index(Affinity::Location location) const; + unsigned kernel_cpu_id(Affinity::Location location) const; + + Affinity::Location sanitize(Affinity::Location location) { + return Affinity::Location(location.xpos() % _cpus.width(), + location.ypos() % _cpus.height(), + location.width(), location.height()); + } + + /** + * PD kernel capability selector of core + */ + unsigned core_pd_sel() const { return _core_pd_sel; } + + template + void for_each_location(FUNC const &fn) + { + for (unsigned x = 0; x < _cpus.width(); x++) { + for (unsigned y = 0; y < _cpus.height(); y++) { + Affinity::Location location(x, y, 1, 1); + fn(location); } } - }; -} + } +}; #endif /* _CORE__INCLUDE__PLATFORM_H_ */ diff --git a/repos/base-nova/src/core/include/platform_pd.h b/repos/base-nova/src/core/include/platform_pd.h index 3525b5de63..179d1157d0 100644 --- a/repos/base-nova/src/core/include/platform_pd.h +++ b/repos/base-nova/src/core/include/platform_pd.h @@ -18,80 +18,82 @@ #include #include - namespace Genode { class Platform_thread; - class Platform_pd : public Address_space - { - private: - - Native_capability _parent { }; - int _thread_cnt; - addr_t const _pd_sel; - const char * _label; - - /* - * Noncopyable - */ - Platform_pd(Platform_pd const &); - Platform_pd &operator = (Platform_pd const &); - - public: - - /** - * Constructors - */ - Platform_pd(Allocator &md_alloc, char const *, - signed pd_id = -1, bool create = true); - - /** - * Destructor - */ - ~Platform_pd(); - - /** - * Bind thread to protection domain - */ - bool bind_thread(Platform_thread &thread); - - /** - * Unbind thread from protection domain - * - * Free the thread's slot and update thread object. - */ - void unbind_thread(Platform_thread &thread); - - /** - * Assign parent interface to protection domain - */ - void assign_parent(Native_capability parent); - - /** - * Return portal capability selector for parent interface - */ - addr_t parent_pt_sel() { return _parent.local_name(); } - - /** - * Capability selector of this task. - * - * \return PD selector - */ - addr_t pd_sel() const { return _pd_sel; } - - /** - * Label of this protection domain - * - * \return name of this protection domain - */ - const char * name() const { return _label; } - - /***************************** - ** Address-space interface ** - *****************************/ - - void flush(addr_t, size_t, Core_local_addr) override; - }; + class Platform_pd; } + +class Genode::Platform_pd : public Address_space +{ + private: + + Native_capability _parent { }; + int _thread_cnt; + addr_t const _pd_sel; + const char * _label; + + /* + * Noncopyable + */ + Platform_pd(Platform_pd const &); + Platform_pd &operator = (Platform_pd const &); + + public: + + /** + * Constructors + */ + Platform_pd(Allocator &md_alloc, char const *, + signed pd_id = -1, bool create = true); + + /** + * Destructor + */ + ~Platform_pd(); + + /** + * Bind thread to protection domain + */ + bool bind_thread(Platform_thread &thread); + + /** + * Unbind thread from protection domain + * + * Free the thread's slot and update thread object. + */ + void unbind_thread(Platform_thread &thread); + + /** + * Assign parent interface to protection domain + */ + void assign_parent(Native_capability parent); + + /** + * Return portal capability selector for parent interface + */ + addr_t parent_pt_sel() { return _parent.local_name(); } + + /** + * Capability selector of this task. + * + * \return PD selector + */ + addr_t pd_sel() const { return _pd_sel; } + + /** + * Label of this protection domain + * + * \return name of this protection domain + */ + const char * name() const { return _label; } + + /***************************** + ** Address-space interface ** + *****************************/ + + void flush(addr_t, size_t, Core_local_addr) override; +}; + #endif /* _CORE__INCLUDE__PLATFORM_PD_H_ */ diff --git a/repos/base-nova/src/core/include/platform_thread.h b/repos/base-nova/src/core/include/platform_thread.h index 7b63fda5d9..102cfe1dcd 100644 --- a/repos/base-nova/src/core/include/platform_thread.h +++ b/repos/base-nova/src/core/include/platform_thread.h @@ -31,195 +31,198 @@ namespace Genode { class Platform_pd; - class Platform_thread - { - private: - - Platform_pd *_pd; - Pager_object *_pager; - addr_t _id_base; - addr_t _sel_exc_base; - Affinity::Location _location; - - enum { - MAIN_THREAD = 0x1U, - VCPU = 0x2U, - WORKER = 0x4U, - SC_CREATED = 0x8U, - REMOTE_PD = 0x10U, - }; - uint8_t _features; - uint8_t _priority; - - Stack::Name _name; - - addr_t _sel_ec() const { return _id_base; } - addr_t _sel_pt_oom() const { return _id_base + 1; } - addr_t _sel_sc() const { return _id_base + 2; } - - /* convenience function to access _feature variable */ - inline bool main_thread() const { return _features & MAIN_THREAD; } - inline bool vcpu() const { return _features & VCPU; } - inline bool worker() const { return _features & WORKER; } - inline bool sc_created() const { return _features & SC_CREATED; } - inline bool remote_pd() const { return _features & REMOTE_PD; } - - /* - * Noncopyable - */ - Platform_thread(Platform_thread const &); - Platform_thread &operator = (Platform_thread const &); - - /** - * Create OOM portal and delegate it - */ - bool _create_and_map_oom_portal(Nova::Utcb &); - - public: - - /* mark as vcpu in remote pd if it is a vcpu */ - addr_t remote_vcpu() { - if (!vcpu()) - return Native_thread::INVALID_INDEX; - - _features |= Platform_thread::REMOTE_PD; - return _sel_exc_base; - } - - /** - * Constructor - */ - Platform_thread(size_t quota, char const *name, - unsigned priority, - Affinity::Location affinity, - addr_t utcb); - - /** - * Destructor - */ - ~Platform_thread(); - - /** - * Start thread - * - * \param ip instruction pointer to start at - * \param sp stack pointer to use - * - * \retval 0 successful - * \retval -1 thread/vCPU could not be started - */ - int start(void *ip, void *sp); - - /** - * Pause this thread - */ - void pause(); - - /** - * Enable/disable single stepping - */ - void single_step(bool); - - /** - * Resume this thread - */ - void resume(); - - /** - * Override thread state with 's' - * - * \throw Cpu_session::State_access_failed - */ - void state(Thread_state s); - - /** - * Read thread state - * - * \throw Cpu_session::State_access_failed - */ - Thread_state state(); - - /************************ - ** Accessor functions ** - ************************/ - - /** - * Set thread type and exception portal base - */ - void thread_type(Cpu_session::Native_cpu::Thread_type thread_type, - Cpu_session::Native_cpu::Exception_base exception_base); - - /** - * Set pager - */ - void pager(Pager_object &pager); - - /** - * Return pager object - */ - Pager_object &pager() - { - if (_pager) - return *_pager; - - ASSERT_NEVER_CALLED; - } - - /** - * Return identification of thread when faulting - */ - unsigned long pager_object_badge() { return (unsigned long)this; } - - /** - * Set the executing CPU for this thread - */ - void affinity(Affinity::Location location); - - /** - * Pager_object starts migration preparation and calls for - * finalization of the migration. - * The method delegates the new exception portals to - * the protection domain and set the new acknowledged location. - */ - void prepare_migration(); - void finalize_migration(Affinity::Location const location) { - _location = location; } - - /** - * Get the executing CPU for this thread - */ - Affinity::Location affinity() const { return _location; } - - /** - * Get thread name - */ - const char *name() const { return _name.string(); } - - /** - * Get pd name - */ - const char *pd_name() const; - - /** - * Associate thread with protection domain - */ - void bind_to_pd(Platform_pd *pd, bool main_thread) - { - _pd = pd; - - if (main_thread) _features |= MAIN_THREAD; - } - - /** - * Set CPU quota of the thread to 'quota' - */ - void quota(size_t const) { /* not supported*/ } - - /** - * Return execution time consumed by the thread - */ - Trace::Execution_time execution_time() const; - }; + class Platform_thread; } + +class Genode::Platform_thread +{ + private: + + Platform_pd *_pd; + Pager_object *_pager; + addr_t _id_base; + addr_t _sel_exc_base; + Affinity::Location _location; + + enum { + MAIN_THREAD = 0x1U, + VCPU = 0x2U, + WORKER = 0x4U, + SC_CREATED = 0x8U, + REMOTE_PD = 0x10U, + }; + uint8_t _features; + uint8_t _priority; + + Stack::Name _name; + + addr_t _sel_ec() const { return _id_base; } + addr_t _sel_pt_oom() const { return _id_base + 1; } + addr_t _sel_sc() const { return _id_base + 2; } + + /* convenience function to access _feature variable */ + inline bool main_thread() const { return _features & MAIN_THREAD; } + inline bool vcpu() const { return _features & VCPU; } + inline bool worker() const { return _features & WORKER; } + inline bool sc_created() const { return _features & SC_CREATED; } + inline bool remote_pd() const { return _features & REMOTE_PD; } + + /* + * Noncopyable + */ + Platform_thread(Platform_thread const &); + Platform_thread &operator = (Platform_thread const &); + + /** + * Create OOM portal and delegate it + */ + bool _create_and_map_oom_portal(Nova::Utcb &); + + public: + + /* mark as vcpu in remote pd if it is a vcpu */ + addr_t remote_vcpu() { + if (!vcpu()) + return Native_thread::INVALID_INDEX; + + _features |= Platform_thread::REMOTE_PD; + return _sel_exc_base; + } + + /** + * Constructor + */ + Platform_thread(size_t quota, char const *name, + unsigned priority, + Affinity::Location affinity, + addr_t utcb); + + /** + * Destructor + */ + ~Platform_thread(); + + /** + * Start thread + * + * \param ip instruction pointer to start at + * \param sp stack pointer to use + * + * \retval 0 successful + * \retval -1 thread/vCPU could not be started + */ + int start(void *ip, void *sp); + + /** + * Pause this thread + */ + void pause(); + + /** + * Enable/disable single stepping + */ + void single_step(bool); + + /** + * Resume this thread + */ + void resume(); + + /** + * Override thread state with 's' + * + * \throw Cpu_session::State_access_failed + */ + void state(Thread_state s); + + /** + * Read thread state + * + * \throw Cpu_session::State_access_failed + */ + Thread_state state(); + + /************************ + ** Accessor functions ** + ************************/ + + /** + * Set thread type and exception portal base + */ + void thread_type(Cpu_session::Native_cpu::Thread_type thread_type, + Cpu_session::Native_cpu::Exception_base exception_base); + + /** + * Set pager + */ + void pager(Pager_object &pager); + + /** + * Return pager object + */ + Pager_object &pager() + { + if (_pager) + return *_pager; + + ASSERT_NEVER_CALLED; + } + + /** + * Return identification of thread when faulting + */ + unsigned long pager_object_badge() { return (unsigned long)this; } + + /** + * Set the executing CPU for this thread + */ + void affinity(Affinity::Location location); + + /** + * Pager_object starts migration preparation and calls for + * finalization of the migration. + * The method delegates the new exception portals to + * the protection domain and set the new acknowledged location. + */ + void prepare_migration(); + void finalize_migration(Affinity::Location const location) { + _location = location; } + + /** + * Get the executing CPU for this thread + */ + Affinity::Location affinity() const { return _location; } + + /** + * Get thread name + */ + const char *name() const { return _name.string(); } + + /** + * Get pd name + */ + const char *pd_name() const; + + /** + * Associate thread with protection domain + */ + void bind_to_pd(Platform_pd *pd, bool main_thread) + { + _pd = pd; + + if (main_thread) _features |= MAIN_THREAD; + } + + /** + * Set CPU quota of the thread to 'quota' + */ + void quota(size_t const) { /* not supported*/ } + + /** + * Return execution time consumed by the thread + */ + Trace::Execution_time execution_time() const; +}; + #endif /* _CORE__INCLUDE__PLATFORM_THREAD_H_ */ diff --git a/repos/base-nova/src/core/include/vm_session_component.h b/repos/base-nova/src/core/include/vm_session_component.h index 363e6a41c2..c0fb988d46 100644 --- a/repos/base-nova/src/core/include/vm_session_component.h +++ b/repos/base-nova/src/core/include/vm_session_component.h @@ -24,6 +24,7 @@ namespace Genode { class Vm_session_component; } + class Genode::Vm_session_component : private Ram_quota_guard, diff --git a/repos/base-sel4/src/core/include/irq_object.h b/repos/base-sel4/src/core/include/irq_object.h index c5ca670c2d..994bb36aab 100644 --- a/repos/base-sel4/src/core/include/irq_object.h +++ b/repos/base-sel4/src/core/include/irq_object.h @@ -20,6 +20,7 @@ namespace Genode { class Irq_object; } + class Genode::Irq_object : public Thread { private: diff --git a/repos/base-sel4/src/core/include/page_table_registry.h b/repos/base-sel4/src/core/include/page_table_registry.h index c6f5b6c3c0..739d132db0 100644 --- a/repos/base-sel4/src/core/include/page_table_registry.h +++ b/repos/base-sel4/src/core/include/page_table_registry.h @@ -27,6 +27,7 @@ namespace Genode { class Page_table_registry; } + class Genode::Page_table_registry { public: diff --git a/repos/base-sel4/src/core/include/rpc_cap_factory.h b/repos/base-sel4/src/core/include/rpc_cap_factory.h index fa0b91035d..8ffc9f7ea6 100644 --- a/repos/base-sel4/src/core/include/rpc_cap_factory.h +++ b/repos/base-sel4/src/core/include/rpc_cap_factory.h @@ -19,6 +19,7 @@ namespace Genode { class Rpc_cap_factory; } + class Genode::Rpc_cap_factory { private: diff --git a/repos/base-sel4/src/core/include/thread_sel4.h b/repos/base-sel4/src/core/include/thread_sel4.h index eae57818f4..e22d998a27 100644 --- a/repos/base-sel4/src/core/include/thread_sel4.h +++ b/repos/base-sel4/src/core/include/thread_sel4.h @@ -27,27 +27,7 @@ namespace Genode { - struct Thread_info - { - Cap_sel tcb_sel { 0 }; - Cap_sel ep_sel { 0 }; - Cap_sel lock_sel { 0 }; - Cap_sel vcpu_sel { 0 }; - - addr_t ipc_buffer_phys { 0 }; - addr_t vcpu_state_phys { 0 }; - - inline void write_thread_info_to_ipc_buffer(Cap_sel pd_ep_sel); - - Thread_info() { } - - inline void init_tcb(Platform &, Range_allocator &, - unsigned const prio, unsigned const cpu); - inline void init(addr_t const utcb_virt_addr, unsigned const prio); - inline void destruct(); - - bool init_vcpu(Platform &, Cap_sel ept); - }; + struct Thread_info; /** * Set register values for the instruction pointer and stack pointer and @@ -55,8 +35,32 @@ namespace Genode { */ void start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, unsigned cpu); void affinity_sel4_thread(Cap_sel const &tcb_sel, unsigned cpu); +} + + +struct Genode::Thread_info +{ + Cap_sel tcb_sel { 0 }; + Cap_sel ep_sel { 0 }; + Cap_sel lock_sel { 0 }; + Cap_sel vcpu_sel { 0 }; + + addr_t ipc_buffer_phys { 0 }; + addr_t vcpu_state_phys { 0 }; + + inline void write_thread_info_to_ipc_buffer(Cap_sel pd_ep_sel); + + Thread_info() { } + + inline void init_tcb(Platform &, Range_allocator &, + unsigned const prio, unsigned const cpu); + inline void init(addr_t const utcb_virt_addr, unsigned const prio); + inline void destruct(); + + bool init_vcpu(Platform &, Cap_sel ept); }; + void Genode::Thread_info::init_tcb(Platform &platform, Range_allocator &phys_alloc, unsigned const prio, unsigned const cpu) @@ -76,6 +80,7 @@ void Genode::Thread_info::init_tcb(Platform &platform, affinity_sel4_thread(tcb_sel, cpu); } + void Genode::Thread_info::init(addr_t const utcb_virt_addr, unsigned const prio) { Platform &platform = platform_specific(); diff --git a/repos/base-sel4/src/core/include/untyped_memory.h b/repos/base-sel4/src/core/include/untyped_memory.h index beed7cfe5f..8a15957b8f 100644 --- a/repos/base-sel4/src/core/include/untyped_memory.h +++ b/repos/base-sel4/src/core/include/untyped_memory.h @@ -26,6 +26,7 @@ namespace Genode { struct Untyped_memory; } + struct Genode::Untyped_memory { class Phys_alloc_failed : Exception { }; diff --git a/repos/base-sel4/src/core/include/vm_session_component.h b/repos/base-sel4/src/core/include/vm_session_component.h index 77a54bb14f..ad3c34362b 100644 --- a/repos/base-sel4/src/core/include/vm_session_component.h +++ b/repos/base-sel4/src/core/include/vm_session_component.h @@ -23,6 +23,7 @@ namespace Genode { class Vm_session_component; } + class Genode::Vm_session_component : private Ram_quota_guard, diff --git a/repos/base/src/core/include/address_space.h b/repos/base/src/core/include/address_space.h index 185e9bede8..0df3ecfa0b 100644 --- a/repos/base/src/core/include/address_space.h +++ b/repos/base/src/core/include/address_space.h @@ -19,6 +19,7 @@ namespace Genode { struct Address_space; } + struct Genode::Address_space : private Weak_object, public Interface { diff --git a/repos/base/src/core/include/boot_modules.h b/repos/base/src/core/include/boot_modules.h index 789ff630a9..b4ea90af33 100644 --- a/repos/base/src/core/include/boot_modules.h +++ b/repos/base/src/core/include/boot_modules.h @@ -16,6 +16,7 @@ namespace Genode { struct Boot_modules_header; } + struct Genode::Boot_modules_header { long name; /* physical address of null-terminated string */ diff --git a/repos/base/src/core/include/constrained_core_ram.h b/repos/base/src/core/include/constrained_core_ram.h index 02ff3fb8ab..a5776bace0 100644 --- a/repos/base/src/core/include/constrained_core_ram.h +++ b/repos/base/src/core/include/constrained_core_ram.h @@ -19,6 +19,7 @@ namespace Genode { class Constrained_core_ram; } + class Genode::Constrained_core_ram : public Allocator { private: diff --git a/repos/base/src/core/include/core_log.h b/repos/base/src/core/include/core_log.h index b298180226..a60d42964f 100644 --- a/repos/base/src/core/include/core_log.h +++ b/repos/base/src/core/include/core_log.h @@ -18,6 +18,7 @@ #include namespace Genode { + struct Core_log; struct Core_log_range { diff --git a/repos/base/src/core/include/cpu_root.h b/repos/base/src/core/include/cpu_root.h index 63241398af..c9136bdd65 100644 --- a/repos/base/src/core/include/cpu_root.h +++ b/repos/base/src/core/include/cpu_root.h @@ -20,71 +20,71 @@ /* Core includes */ #include -namespace Genode { +namespace Genode { class Cpu_root; } - class Cpu_root : public Root_component - { - private: - Ram_allocator &_ram_alloc; - Region_map &_local_rm; - Rpc_entrypoint &_thread_ep; - Pager_entrypoint &_pager_ep; - Trace::Source_registry &_trace_sources; +class Genode::Cpu_root : public Root_component +{ + private: - protected: + Ram_allocator &_ram_alloc; + Region_map &_local_rm; + Rpc_entrypoint &_thread_ep; + Pager_entrypoint &_pager_ep; + Trace::Source_registry &_trace_sources; - Cpu_session_component *_create_session(char const *args, - Affinity const &affinity) override { + protected: - size_t ram_quota = - Arg_string::find_arg(args, "ram_quota").ulong_value(0); + Cpu_session_component *_create_session(char const *args, + Affinity const &affinity) override { - if (ram_quota < Trace::Control_area::SIZE) - throw Insufficient_ram_quota(); + size_t ram_quota = + Arg_string::find_arg(args, "ram_quota").ulong_value(0); - if (!affinity.valid()) - throw Service_denied(); + if (ram_quota < Trace::Control_area::SIZE) + throw Insufficient_ram_quota(); - return new (md_alloc()) - Cpu_session_component(*this->ep(), - session_resources_from_args(args), - session_label_from_args(args), - session_diag_from_args(args), - _ram_alloc, _local_rm, - _thread_ep, _pager_ep, _trace_sources, - args, affinity, 0); - } + if (!affinity.valid()) + throw Service_denied(); - void _upgrade_session(Cpu_session_component *cpu, const char *args) override - { - cpu->upgrade(ram_quota_from_args(args)); - cpu->upgrade(cap_quota_from_args(args)); - } + return new (md_alloc()) + Cpu_session_component(*this->ep(), + session_resources_from_args(args), + session_label_from_args(args), + session_diag_from_args(args), + _ram_alloc, _local_rm, + _thread_ep, _pager_ep, _trace_sources, + args, affinity, 0); + } - public: + void _upgrade_session(Cpu_session_component *cpu, const char *args) override + { + cpu->upgrade(ram_quota_from_args(args)); + cpu->upgrade(cap_quota_from_args(args)); + } - /** - * Constructor - * - * \param session_ep entry point for managing cpu session objects - * \param thread_ep entry point for managing threads - * \param md_alloc meta data allocator to be used by root component - */ - Cpu_root(Ram_allocator &ram_alloc, - Region_map &local_rm, - Rpc_entrypoint &session_ep, - Rpc_entrypoint &thread_ep, - Pager_entrypoint &pager_ep, - Allocator &md_alloc, - Trace::Source_registry &trace_sources) - : - Root_component(&session_ep, &md_alloc), - _ram_alloc(ram_alloc), _local_rm(local_rm), - _thread_ep(thread_ep), _pager_ep(pager_ep), - _trace_sources(trace_sources) - { } - }; -} + public: + + /** + * Constructor + * + * \param session_ep entry point for managing cpu session objects + * \param thread_ep entry point for managing threads + * \param md_alloc meta data allocator to be used by root component + */ + Cpu_root(Ram_allocator &ram_alloc, + Region_map &local_rm, + Rpc_entrypoint &session_ep, + Rpc_entrypoint &thread_ep, + Pager_entrypoint &pager_ep, + Allocator &md_alloc, + Trace::Source_registry &trace_sources) + : + Root_component(&session_ep, &md_alloc), + _ram_alloc(ram_alloc), _local_rm(local_rm), + _thread_ep(thread_ep), _pager_ep(pager_ep), + _trace_sources(trace_sources) + { } +}; #endif /* _CORE__INCLUDE__CPU_ROOT_H_ */ diff --git a/repos/base/src/core/include/cpu_thread_allocator.h b/repos/base/src/core/include/cpu_thread_allocator.h index e845d52325..a54a6724c1 100644 --- a/repos/base/src/core/include/cpu_thread_allocator.h +++ b/repos/base/src/core/include/cpu_thread_allocator.h @@ -21,8 +21,8 @@ /* base-internal includes */ #include -namespace Genode -{ +namespace Genode { + class Cpu_thread_component; /** diff --git a/repos/base/src/core/include/dataspace_component.h b/repos/base/src/core/include/dataspace_component.h index 933638716b..0c97032051 100644 --- a/repos/base/src/core/include/dataspace_component.h +++ b/repos/base/src/core/include/dataspace_component.h @@ -26,139 +26,141 @@ namespace Genode { class Rm_region; + class Dataspace_component; /** * Deriving classes can own a dataspace to implement conditional behavior */ class Dataspace_owner : Interface { }; - - class Dataspace_component : public Rpc_object - { - private: - - addr_t const _phys_addr = 0; /* address of dataspace in physical memory */ - addr_t _core_local_addr = 0; /* address of core-local mapping */ - size_t const _size = 0; /* size of dataspace in bytes */ - bool const _io_mem = false; /* dataspace is I/O mem, not to be touched */ - bool const _writeable = false; /* false if dataspace is read-only */ - - /* - * Access memory cached, write-combined, or uncached respectively - */ - Cache const _cache { CACHED }; - - List _regions { }; /* regions this is attached to */ - Mutex _mutex { }; - - /* - * Holds the dataspace owner if a distinction between owner and - * others is necessary on the dataspace, otherwise it is 0. - */ - Dataspace_owner const * _owner = nullptr; - - /* - * Noncopyable - */ - Dataspace_component(Dataspace_component const &); - Dataspace_component &operator = (Dataspace_component const &); - - protected: - - bool _managed = false; /* true if this is a managed dataspace */ - - public: - - /** - * Default constructor returning an invalid dataspace - */ - Dataspace_component() { } - - /** - * Constructor for non-I/O dataspaces - * - * This constructor is used by RAM and ROM dataspaces. - */ - Dataspace_component(size_t size, addr_t core_local_addr, - Cache cache, bool writeable, - Dataspace_owner *owner) - : - _phys_addr(core_local_addr), _core_local_addr(core_local_addr), - _size(round_page(size)), _io_mem(false), - _writeable(writeable), _cache(cache), - _owner(owner), _managed(false) { } - - /** - * Constructor for dataspaces with different core-local and - * physical addresses - * - * This constructor is used by IO_MEM. Because I/O-memory areas may - * be located at addresses that are populated by data or text in - * Core's virtual address space, we need to map these areas to - * another core-local address. The local mapping in core's address - * space is needed to send a mapping to another address space. - */ - Dataspace_component(size_t size, addr_t core_local_addr, - addr_t phys_addr, Cache cache, - bool writeable, Dataspace_owner *owner) - : - _phys_addr(phys_addr), _core_local_addr(core_local_addr), - _size(size), _io_mem(true), _writeable(writeable), - _cache(cache), _owner(owner), _managed(false) { } - - /** - * Destructor - */ - ~Dataspace_component(); - - /** - * Return region map corresponding to nested dataspace - * - * \retval invalid capability if dataspace is not a nested one - */ - virtual Native_capability sub_rm() { return Dataspace_capability(); } - - addr_t core_local_addr() const { return _core_local_addr; } - bool io_mem() const { return _io_mem; } - Cache cacheability() const { return _cache; } - addr_t phys_addr() const { return _phys_addr; } - bool managed() const { return _managed; } - - /** - * Return dataspace base address to be used for map operations - * - * Depending on the used kernel, this may be a core-local address - * or a physical address. - */ - addr_t map_src_addr() const - { - return Genode::map_src_addr(_core_local_addr, _phys_addr); - } - - void assign_core_local_addr(void *addr) { _core_local_addr = (addr_t)addr; } - - void attached_to(Rm_region ®ion); - void detached_from(Rm_region ®ion); - - /** - * Detach dataspace from all rm sessions. - */ - void detach_from_rm_sessions(); - - /** - * Check if dataspace is owned by a specific owner - */ - bool owner(Dataspace_owner const &o) const { return _owner == &o; } - - List ®ions() { return _regions; } - - - /************************* - ** Dataspace interface ** - *************************/ - - size_t size() override { return _size; } - bool writeable() override { return _writeable; } - }; } + +class Genode::Dataspace_component : public Rpc_object +{ + private: + + addr_t const _phys_addr = 0; /* address of dataspace in physical memory */ + addr_t _core_local_addr = 0; /* address of core-local mapping */ + size_t const _size = 0; /* size of dataspace in bytes */ + bool const _io_mem = false; /* dataspace is I/O mem, not to be touched */ + bool const _writeable = false; /* false if dataspace is read-only */ + + /* + * Access memory cached, write-combined, or uncached respectively + */ + Cache const _cache { CACHED }; + + List _regions { }; /* regions this is attached to */ + Mutex _mutex { }; + + /* + * Holds the dataspace owner if a distinction between owner and + * others is necessary on the dataspace, otherwise it is 0. + */ + Dataspace_owner const * _owner = nullptr; + + /* + * Noncopyable + */ + Dataspace_component(Dataspace_component const &); + Dataspace_component &operator = (Dataspace_component const &); + + protected: + + bool _managed = false; /* true if this is a managed dataspace */ + + public: + + /** + * Default constructor returning an invalid dataspace + */ + Dataspace_component() { } + + /** + * Constructor for non-I/O dataspaces + * + * This constructor is used by RAM and ROM dataspaces. + */ + Dataspace_component(size_t size, addr_t core_local_addr, + Cache cache, bool writeable, + Dataspace_owner *owner) + : + _phys_addr(core_local_addr), _core_local_addr(core_local_addr), + _size(round_page(size)), _io_mem(false), + _writeable(writeable), _cache(cache), + _owner(owner), _managed(false) { } + + /** + * Constructor for dataspaces with different core-local and + * physical addresses + * + * This constructor is used by IO_MEM. Because I/O-memory areas may + * be located at addresses that are populated by data or text in + * Core's virtual address space, we need to map these areas to + * another core-local address. The local mapping in core's address + * space is needed to send a mapping to another address space. + */ + Dataspace_component(size_t size, addr_t core_local_addr, + addr_t phys_addr, Cache cache, + bool writeable, Dataspace_owner *owner) + : + _phys_addr(phys_addr), _core_local_addr(core_local_addr), + _size(size), _io_mem(true), _writeable(writeable), + _cache(cache), _owner(owner), _managed(false) { } + + /** + * Destructor + */ + ~Dataspace_component(); + + /** + * Return region map corresponding to nested dataspace + * + * \retval invalid capability if dataspace is not a nested one + */ + virtual Native_capability sub_rm() { return Dataspace_capability(); } + + addr_t core_local_addr() const { return _core_local_addr; } + bool io_mem() const { return _io_mem; } + Cache cacheability() const { return _cache; } + addr_t phys_addr() const { return _phys_addr; } + bool managed() const { return _managed; } + + /** + * Return dataspace base address to be used for map operations + * + * Depending on the used kernel, this may be a core-local address + * or a physical address. + */ + addr_t map_src_addr() const + { + return Genode::map_src_addr(_core_local_addr, _phys_addr); + } + + void assign_core_local_addr(void *addr) { _core_local_addr = (addr_t)addr; } + + void attached_to(Rm_region ®ion); + void detached_from(Rm_region ®ion); + + /** + * Detach dataspace from all rm sessions. + */ + void detach_from_rm_sessions(); + + /** + * Check if dataspace is owned by a specific owner + */ + bool owner(Dataspace_owner const &o) const { return _owner == &o; } + + List ®ions() { return _regions; } + + + /************************* + ** Dataspace interface ** + *************************/ + + size_t size() override { return _size; } + bool writeable() override { return _writeable; } +}; + #endif /* _CORE__INCLUDE__DATASPACE_COMPONENT_H_ */ diff --git a/repos/base/src/core/include/io_mem_root.h b/repos/base/src/core/include/io_mem_root.h index ad17f12f66..b21b72ae23 100644 --- a/repos/base/src/core/include/io_mem_root.h +++ b/repos/base/src/core/include/io_mem_root.h @@ -18,46 +18,46 @@ #include "io_mem_session_component.h" -namespace Genode { +namespace Genode { class Io_mem_root; } - class Io_mem_root : public Root_component - { - private: +class Genode::Io_mem_root : public Root_component +{ - Range_allocator &_io_mem_alloc; /* MMIO region allocator */ - Range_allocator &_ram_alloc; /* RAM allocator */ - Rpc_entrypoint &_ds_ep; /* entry point for managing io_mem dataspaces */ + private: - protected: + Range_allocator &_io_mem_alloc; /* MMIO region allocator */ + Range_allocator &_ram_alloc; /* RAM allocator */ + Rpc_entrypoint &_ds_ep; /* entry point for managing io_mem dataspaces */ - Io_mem_session_component *_create_session(const char *args) override - { - return new (md_alloc()) - Io_mem_session_component(_io_mem_alloc, _ram_alloc, - _ds_ep, args); - } + protected: - public: + Io_mem_session_component *_create_session(const char *args) override + { + return new (md_alloc()) + Io_mem_session_component(_io_mem_alloc, _ram_alloc, + _ds_ep, args); + } - /** - * Constructor - * - * \param session_ep entry point for managing io_mem session objects - * \param ds_ep entry point for managing dataspaces - * \param io_mem_alloc platform IO_MEM allocator - * \param ram_alloc platform RAM allocator - * \param md_alloc meta-data allocator to be used by root component - */ - Io_mem_root(Rpc_entrypoint &session_ep, - Rpc_entrypoint &ds_ep, - Range_allocator &io_mem_alloc, - Range_allocator &ram_alloc, - Allocator &md_alloc) - : - Root_component(&session_ep, &md_alloc), - _io_mem_alloc(io_mem_alloc), _ram_alloc(ram_alloc), _ds_ep(ds_ep) { } - }; -} + public: + + /** + * Constructor + * + * \param session_ep entry point for managing io_mem session objects + * \param ds_ep entry point for managing dataspaces + * \param io_mem_alloc platform IO_MEM allocator + * \param ram_alloc platform RAM allocator + * \param md_alloc meta-data allocator to be used by root component + */ + Io_mem_root(Rpc_entrypoint &session_ep, + Rpc_entrypoint &ds_ep, + Range_allocator &io_mem_alloc, + Range_allocator &ram_alloc, + Allocator &md_alloc) + : + Root_component(&session_ep, &md_alloc), + _io_mem_alloc(io_mem_alloc), _ram_alloc(ram_alloc), _ds_ep(ds_ep) { } +}; #endif /* _CORE__INCLUDE__IO_MEM_ROOT_H_ */ diff --git a/repos/base/src/core/include/io_mem_session_component.h b/repos/base/src/core/include/io_mem_session_component.h index 77fb30eb9e..617df1300a 100644 --- a/repos/base/src/core/include/io_mem_session_component.h +++ b/repos/base/src/core/include/io_mem_session_component.h @@ -22,128 +22,128 @@ /* core includes */ #include -namespace Genode { - - class Io_mem_session_component : public Rpc_object - { - private: - - /* - * Helper class used to pass the dataspace attributes as - * parameters from the _prepare_io_mem function to the - * constructor of Dataspace_component. - */ - struct Dataspace_attr - { - size_t size { 0 }; - addr_t core_local_addr { 0 }; - addr_t phys_addr { 0 }; - Cache cacheable { UNCACHED }; - - /** - * Base address of request used for freeing mem-ranges - */ - addr_t req_base { 0 }; - - /** - * Default constructor - * - * This constructor enables Dataspace_attr objects to be - * returned from the '_prepare_io_mem' function. - */ - Dataspace_attr() { } - - /** - * Constructor - * - * An invalid dataspace is represented by setting all - * arguments to zero. - */ - Dataspace_attr(size_t s, addr_t cla, addr_t pa, Cache c, - addr_t req_base) - : - size(s), core_local_addr(cla), phys_addr(pa), - cacheable(c), req_base(req_base) { } - }; - - struct Io_dataspace_component : Dataspace_component - { - addr_t req_base; - - /** - * Constructor - */ - Io_dataspace_component(Dataspace_attr da) - : - Dataspace_component(da.size, da.core_local_addr, - da.phys_addr, da.cacheable, - true, 0), - req_base(da.req_base) { } +namespace Genode { class Io_mem_session_component; } - bool valid() { return size() != 0; } - }; +class Genode::Io_mem_session_component : public Rpc_object +{ + private: - Range_allocator &_io_mem_alloc; - Io_dataspace_component _ds; - Rpc_entrypoint &_ds_ep; - Io_mem_dataspace_capability _ds_cap { }; - Cache _cacheable { UNCACHED }; - - Dataspace_attr _prepare_io_mem(const char *args, Range_allocator &ram_alloc); - - - /******************************************** - ** Platform-implemented support functions ** - ********************************************/ - - /* FIXME Could this be merged with Dataspace::unmap() and friends? */ + /* + * Helper class used to pass the dataspace attributes as + * parameters from the _prepare_io_mem function to the + * constructor of Dataspace_component. + */ + struct Dataspace_attr + { + size_t size { 0 }; + addr_t core_local_addr { 0 }; + addr_t phys_addr { 0 }; + Cache cacheable { UNCACHED }; /** - * Map region locally and return local base address - * - * Both parameters - base and size - must be page-aligned. + * Base address of request used for freeing mem-ranges */ - addr_t _map_local(addr_t base, size_t size); + addr_t req_base { 0 }; /** - * Unmap Core-local mapping of region + * Default constructor * - * Both parameters - base and size - must be page-aligned. + * This constructor enables Dataspace_attr objects to be + * returned from the '_prepare_io_mem' function. */ - void _unmap_local(addr_t base, size_t size); - - public: + Dataspace_attr() { } /** * Constructor * - * \param io_mem_alloc MMIO region allocator - * \param ram_alloc RAM allocator that will be checked for - * region collisions - * \param ds_ep entry point to manage the dataspace - * corresponding the io_mem session - * \param args session construction arguments, in - * particular MMIO region base, size and - * caching demands + * An invalid dataspace is represented by setting all + * arguments to zero. */ - Io_mem_session_component(Range_allocator &io_mem_alloc, - Range_allocator &ram_alloc, - Rpc_entrypoint &ds_ep, - const char *args); + Dataspace_attr(size_t s, addr_t cla, addr_t pa, Cache c, + addr_t req_base) + : + size(s), core_local_addr(cla), phys_addr(pa), + cacheable(c), req_base(req_base) { } + }; + + struct Io_dataspace_component : Dataspace_component + { + addr_t req_base; /** - * Destructor + * Constructor */ - ~Io_mem_session_component(); + Io_dataspace_component(Dataspace_attr da) + : + Dataspace_component(da.size, da.core_local_addr, + da.phys_addr, da.cacheable, + true, 0), + req_base(da.req_base) { } - /****************************** - ** Io-mem session interface ** - ******************************/ + bool valid() { return size() != 0; } + }; - Io_mem_dataspace_capability dataspace() override { return _ds_cap; } - }; -} + Range_allocator &_io_mem_alloc; + Io_dataspace_component _ds; + Rpc_entrypoint &_ds_ep; + Io_mem_dataspace_capability _ds_cap { }; + Cache _cacheable { UNCACHED }; + + Dataspace_attr _prepare_io_mem(const char *args, Range_allocator &ram_alloc); + + + /******************************************** + ** Platform-implemented support functions ** + ********************************************/ + + /* FIXME Could this be merged with Dataspace::unmap() and friends? */ + + /** + * Map region locally and return local base address + * + * Both parameters - base and size - must be page-aligned. + */ + addr_t _map_local(addr_t base, size_t size); + + /** + * Unmap Core-local mapping of region + * + * Both parameters - base and size - must be page-aligned. + */ + void _unmap_local(addr_t base, size_t size); + + public: + + /** + * Constructor + * + * \param io_mem_alloc MMIO region allocator + * \param ram_alloc RAM allocator that will be checked for + * region collisions + * \param ds_ep entry point to manage the dataspace + * corresponding the io_mem session + * \param args session construction arguments, in + * particular MMIO region base, size and + * caching demands + */ + Io_mem_session_component(Range_allocator &io_mem_alloc, + Range_allocator &ram_alloc, + Rpc_entrypoint &ds_ep, + const char *args); + + /** + * Destructor + */ + ~Io_mem_session_component(); + + + /****************************** + ** Io-mem session interface ** + ******************************/ + + Io_mem_dataspace_capability dataspace() override { return _ds_cap; } +}; #endif /* _CORE__INCLUDE__IO_MEM_SESSION_COMPONENT_H_ */ diff --git a/repos/base/src/core/include/io_port_root.h b/repos/base/src/core/include/io_port_root.h index b9ae0de144..c95ab573a6 100644 --- a/repos/base/src/core/include/io_port_root.h +++ b/repos/base/src/core/include/io_port_root.h @@ -19,53 +19,57 @@ #include "io_port_session_component.h" namespace Genode { - - struct Io_port_handler - { - private: - - enum { STACK_SIZE = 4096 }; - Rpc_entrypoint _ep; - - public: - - Io_port_handler(Pd_session &pd_session) : - _ep(&pd_session, STACK_SIZE, "ioport", Affinity::Location()) - { } - - Rpc_entrypoint &entrypoint() { return _ep; } - }; - - class Io_port_root : private Io_port_handler, - public Root_component - { - - private: - - Range_allocator &_io_port_alloc; /* I/O port allocator */ - - protected: - - Io_port_session_component *_create_session(const char *args) override { - return new (md_alloc()) Io_port_session_component(_io_port_alloc, args); } - - public: - - /** - * Constructor - * - * \param cap_session capability allocator - * \param io_port_alloc platform IO_PORT allocator - * \param md_alloc meta-data allocator to be used by root component - */ - Io_port_root(Pd_session &pd_session, - Range_allocator &io_port_alloc, - Allocator &md_alloc) - : - Io_port_handler(pd_session), - Root_component(&entrypoint(), &md_alloc), - _io_port_alloc(io_port_alloc) { } - }; + class Io_port_handler; + class Io_port_root; } + +class Genode::Io_port_handler +{ + private: + + enum { STACK_SIZE = 4096 }; + Rpc_entrypoint _ep; + + public: + + Io_port_handler(Pd_session &pd_session) : + _ep(&pd_session, STACK_SIZE, "ioport", Affinity::Location()) + { } + + Rpc_entrypoint &entrypoint() { return _ep; } +}; + + +class Genode::Io_port_root : private Io_port_handler, + public Root_component +{ + + private: + + Range_allocator &_io_port_alloc; /* I/O port allocator */ + + protected: + + Io_port_session_component *_create_session(const char *args) override { + return new (md_alloc()) Io_port_session_component(_io_port_alloc, args); } + + public: + + /** + * Constructor + * + * \param cap_session capability allocator + * \param io_port_alloc platform IO_PORT allocator + * \param md_alloc meta-data allocator to be used by root component + */ + Io_port_root(Pd_session &pd_session, + Range_allocator &io_port_alloc, + Allocator &md_alloc) + : + Io_port_handler(pd_session), + Root_component(&entrypoint(), &md_alloc), + _io_port_alloc(io_port_alloc) { } +}; + #endif /* _CORE__INCLUDE__IO_PORT_ROOT_H_ */ diff --git a/repos/base/src/core/include/io_port_session_component.h b/repos/base/src/core/include/io_port_session_component.h index f2679cb591..2360cab220 100644 --- a/repos/base/src/core/include/io_port_session_component.h +++ b/repos/base/src/core/include/io_port_session_component.h @@ -3,7 +3,7 @@ * \author Christian Helmuth * \date 2007-04-17 * - * We assume Core is running on IOPL3. + * We assume core is running on IOPL3. */ /* @@ -24,53 +24,53 @@ /* core includes */ #include -namespace Genode { - - class Io_port_session_component : public Rpc_object - { - private: - - Range_allocator &_io_port_alloc; - unsigned short _base = 0; - unsigned short _size = 0; - - /** - * Check if access exceeds range - */ - bool _in_bounds(unsigned short address, unsigned width) { - return (address >= _base) && (address + width <= _base + _size); } - - public: - - /** - * Constructor - * - * \param io_port_alloc IO_PORT region allocator - * \param args session construction arguments, in - * particular port base and size - * \throw Service_denied - */ - Io_port_session_component(Range_allocator &io_port_alloc, - const char *args); - - /** - * Destructor - */ - ~Io_port_session_component(); +namespace Genode { class Io_port_session_component; } - /******************************* - ** Io-port session interface ** - *******************************/ +class Genode::Io_port_session_component : public Rpc_object +{ + private: - unsigned char inb(unsigned short) override; - unsigned short inw(unsigned short) override; - unsigned inl(unsigned short) override; + Range_allocator &_io_port_alloc; + unsigned short _base = 0; + unsigned short _size = 0; - void outb(unsigned short, unsigned char) override; - void outw(unsigned short, unsigned short) override; - void outl(unsigned short, unsigned) override; - }; -} + /** + * Check if access exceeds range + */ + bool _in_bounds(unsigned short address, unsigned width) { + return (address >= _base) && (address + width <= _base + _size); } + + public: + + /** + * Constructor + * + * \param io_port_alloc IO_PORT region allocator + * \param args session construction arguments, in + * particular port base and size + * \throw Service_denied + */ + Io_port_session_component(Range_allocator &io_port_alloc, + const char *args); + + /** + * Destructor + */ + ~Io_port_session_component(); + + + /******************************* + ** Io-port session interface ** + *******************************/ + + unsigned char inb(unsigned short) override; + unsigned short inw(unsigned short) override; + unsigned inl(unsigned short) override; + + void outb(unsigned short, unsigned char) override; + void outw(unsigned short, unsigned short) override; + void outl(unsigned short, unsigned) override; +}; #endif /* _CORE__INCLUDE__IO_PORT_SESSION_COMPONENT_H_ */ diff --git a/repos/base/src/core/include/irq_args.h b/repos/base/src/core/include/irq_args.h index 8f26cd46e5..92ceb6f34a 100644 --- a/repos/base/src/core/include/irq_args.h +++ b/repos/base/src/core/include/irq_args.h @@ -20,6 +20,7 @@ namespace Genode { class Irq_args; } + class Genode::Irq_args { private: diff --git a/repos/base/src/core/include/irq_object.h b/repos/base/src/core/include/irq_object.h index 998e03c267..8dc9f9b495 100644 --- a/repos/base/src/core/include/irq_object.h +++ b/repos/base/src/core/include/irq_object.h @@ -18,8 +18,9 @@ namespace Genode { class Irq_object; } -class Genode::Irq_object : public Thread { +class Genode::Irq_object : public Thread +{ private: Signal_context_capability _sig_cap { }; diff --git a/repos/base/src/core/include/irq_root.h b/repos/base/src/core/include/irq_root.h index 9a8815122b..9e909cbcd7 100644 --- a/repos/base/src/core/include/irq_root.h +++ b/repos/base/src/core/include/irq_root.h @@ -20,6 +20,7 @@ namespace Genode { class Irq_root; } + class Genode::Irq_root : public Root_component { diff --git a/repos/base/src/core/include/irq_session_component.h b/repos/base/src/core/include/irq_session_component.h index 085825f03c..0d2efa7f3f 100644 --- a/repos/base/src/core/include/irq_session_component.h +++ b/repos/base/src/core/include/irq_session_component.h @@ -24,6 +24,7 @@ namespace Genode { class Irq_session_component; } + class Genode::Irq_session_component : public Rpc_object, private List::Element { diff --git a/repos/base/src/core/include/log_root.h b/repos/base/src/core/include/log_root.h index 085c6053f9..466b5bb7f2 100644 --- a/repos/base/src/core/include/log_root.h +++ b/repos/base/src/core/include/log_root.h @@ -19,33 +19,33 @@ #include "log_session_component.h" -namespace Genode { +namespace Genode { class Log_root; } - class Log_root : public Root_component - { - protected: - /** - * Root component interface - */ - Log_session_component *_create_session(const char *args) override - { - return new (md_alloc()) Log_session_component(label_from_args(args)); - } +class Genode::Log_root : public Root_component +{ + protected: - public: + /** + * Root component interface + */ + Log_session_component *_create_session(const char *args) override + { + return new (md_alloc()) Log_session_component(label_from_args(args)); + } - /** - * Constructor - * - * \param session_ep entry point for managing cpu session objects - * \param md_alloc meta-data allocator to be used by root component - */ - Log_root(Rpc_entrypoint &session_ep, Allocator &md_alloc) - : - Root_component(&session_ep, &md_alloc) - { } - }; -} + public: + + /** + * Constructor + * + * \param session_ep entry point for managing cpu session objects + * \param md_alloc meta-data allocator to be used by root component + */ + Log_root(Rpc_entrypoint &session_ep, Allocator &md_alloc) + : + Root_component(&session_ep, &md_alloc) + { } +}; #endif /* _CORE__INCLUDE__LOG_ROOT_H_ */ diff --git a/repos/base/src/core/include/log_session_component.h b/repos/base/src/core/include/log_session_component.h index 2271d37ab2..27bad22ed7 100644 --- a/repos/base/src/core/include/log_session_component.h +++ b/repos/base/src/core/include/log_session_component.h @@ -20,58 +20,58 @@ #include #include -namespace Genode { +namespace Genode { class Log_session_component; } - class Log_session_component : public Rpc_object - { - private: - Session_label const _label; +class Genode::Log_session_component : public Rpc_object +{ + private: - static Session_label _expand_label(Session_label const &label) - { - if (label == "init -> unlabeled") - return ""; - else - return Session_label("[", label, "] "); + Session_label const _label; + + static Session_label _expand_label(Session_label const &label) + { + if (label == "init -> unlabeled") + return ""; + else + return Session_label("[", label, "] "); + } + + public: + + /** + * Constructor + */ + Log_session_component(Session_label const &label) + : _label(_expand_label(label)) { } + + + /***************** + ** Log session ** + *****************/ + + void write(String const &string_buf) override + { + if (!(string_buf.valid_string())) { + error("corrupted string"); + return; } - public: + char const * const string = string_buf.string(); + size_t const len = strlen(string); - /** - * Constructor - */ - Log_session_component(Session_label const &label) - : _label(_expand_label(label)) { } - - - /***************** - ** Log session ** - *****************/ - - void write(String const &string_buf) override - { - if (!(string_buf.valid_string())) { - error("corrupted string"); - return; + unsigned from_i = 0; + for (unsigned i = 0; i < len; i++) { + if (string[i] == '\n') { + log(_label, Cstring(string + from_i, i - from_i)); + from_i = i + 1; } - - char const * const string = string_buf.string(); - size_t const len = strlen(string); - - unsigned from_i = 0; - for (unsigned i = 0; i < len; i++) { - if (string[i] == '\n') { - log(_label, Cstring(string + from_i, i - from_i)); - from_i = i + 1; - } - } - - /* if last character of string was not a line break, add one */ - if (from_i < len) - log(_label, Cstring(string + from_i)); } - }; -} + + /* if last character of string was not a line break, add one */ + if (from_i < len) + log(_label, Cstring(string + from_i)); + } +}; #endif /* _CORE__INCLUDE__LOG_SESSION_COMPONENT_H_ */ diff --git a/repos/base/src/core/include/pd_root.h b/repos/base/src/core/include/pd_root.h index 5e92307a05..47b09b0161 100644 --- a/repos/base/src/core/include/pd_root.h +++ b/repos/base/src/core/include/pd_root.h @@ -20,9 +20,7 @@ /* Core */ #include -namespace Genode { - class Pd_root; -} +namespace Genode { class Pd_root; } class Genode::Pd_root : public Genode::Root_component diff --git a/repos/base/src/core/include/platform_generic.h b/repos/base/src/core/include/platform_generic.h index c394c83a77..0f11e90410 100644 --- a/repos/base/src/core/include/platform_generic.h +++ b/repos/base/src/core/include/platform_generic.h @@ -24,87 +24,7 @@ namespace Genode { - /** - * Generic platform interface - */ - class Platform_generic - { - public: - - virtual ~Platform_generic() { } - - /** - * Allocator of core-local mapped virtual memory - */ - virtual Range_allocator &core_mem_alloc() = 0; - - /** - * Allocator of physical memory - */ - virtual Range_allocator &ram_alloc() = 0; - - /** - * Allocator of free address ranges within core - */ - virtual Range_allocator ®ion_alloc() = 0; - - /** - * I/O memory allocator - */ - virtual Range_allocator &io_mem_alloc() = 0; - - /** - * I/O port allocator - */ - virtual Range_allocator &io_port_alloc() = 0; - - /** - * IRQ allocator - */ - virtual Range_allocator &irq_alloc() = 0; - - /** - * Virtual memory configuration accessors - */ - virtual addr_t vm_start() const = 0; - virtual size_t vm_size() const = 0; - - /** - * ROM modules - */ - virtual Rom_fs &rom_fs() = 0; - - /** - * Wait for exit condition - */ - virtual void wait_for_exit() = 0; - - /** - * Return true if platform supports direct unmap (no mapping db) - */ - virtual bool supports_direct_unmap() const { return false; } - - /** - * Return number of physical CPUs present in the platform - * - * The default implementation returns a single CPU. - */ - virtual Affinity::Space affinity_space() const - { - return Affinity::Space(1); - } - - /** - * Return system-wide maximum number of capabilities - */ - virtual size_t max_caps() const = 0; - - /** - * Return true if the core component relies on a 'Platform_pd' object - */ - virtual bool core_needs_platform_pd() const { return true; } - }; - + class Platform_generic; /** * Request pointer to static generic platform interface of core @@ -121,4 +41,84 @@ namespace Genode { extern Platform &platform_specific(); } + +class Genode::Platform_generic +{ + public: + + virtual ~Platform_generic() { } + + /** + * Allocator of core-local mapped virtual memory + */ + virtual Range_allocator &core_mem_alloc() = 0; + + /** + * Allocator of physical memory + */ + virtual Range_allocator &ram_alloc() = 0; + + /** + * Allocator of free address ranges within core + */ + virtual Range_allocator ®ion_alloc() = 0; + + /** + * I/O memory allocator + */ + virtual Range_allocator &io_mem_alloc() = 0; + + /** + * I/O port allocator + */ + virtual Range_allocator &io_port_alloc() = 0; + + /** + * IRQ allocator + */ + virtual Range_allocator &irq_alloc() = 0; + + /** + * Virtual memory configuration accessors + */ + virtual addr_t vm_start() const = 0; + virtual size_t vm_size() const = 0; + + /** + * ROM modules + */ + virtual Rom_fs &rom_fs() = 0; + + /** + * Wait for exit condition + */ + virtual void wait_for_exit() = 0; + + /** + * Return true if platform supports direct unmap (no mapping db) + */ + virtual bool supports_direct_unmap() const { return false; } + + /** + * Return number of physical CPUs present in the platform + * + * The default implementation returns a single CPU. + */ + virtual Affinity::Space affinity_space() const + { + return Affinity::Space(1); + } + + /** + * Return system-wide maximum number of capabilities + */ + virtual size_t max_caps() const = 0; + + /** + * Return true if the core component relies on a 'Platform_pd' object + */ + virtual bool core_needs_platform_pd() const { return true; } +}; + + #endif /* _CORE__INCLUDE__PLATFORM_GENERIC_H_ */ diff --git a/repos/base/src/core/include/region_map_component.h b/repos/base/src/core/include/region_map_component.h index 203aae0fd6..4764eab865 100644 --- a/repos/base/src/core/include/region_map_component.h +++ b/repos/base/src/core/include/region_map_component.h @@ -40,7 +40,6 @@ #include namespace Genode { - class Cpu_thread_component; class Dataspace_component; class Region_map_component; @@ -51,6 +50,7 @@ namespace Genode { class Rm_session_component; } + class Genode::Region_map_detach : Genode::Interface { public: diff --git a/repos/base/src/core/include/rom_root.h b/repos/base/src/core/include/rom_root.h index 2195a2f12a..50260ed821 100644 --- a/repos/base/src/core/include/rom_root.h +++ b/repos/base/src/core/include/rom_root.h @@ -17,39 +17,38 @@ #include #include "rom_session_component.h" -namespace Genode { +namespace Genode { class Rom_root; } - class Rom_root : public Root_component - { - private: +class Genode::Rom_root : public Root_component +{ + private: - Rom_fs &_rom_fs; /* rom file system */ - Rpc_entrypoint &_ds_ep; /* entry point for managing rom dataspaces */ + Rom_fs &_rom_fs; /* rom file system */ + Rpc_entrypoint &_ds_ep; /* entry point for managing rom dataspaces */ - protected: + protected: - Rom_session_component *_create_session(const char *args) override { - return new (md_alloc()) Rom_session_component(_rom_fs, _ds_ep, args); } + Rom_session_component *_create_session(const char *args) override { + return new (md_alloc()) Rom_session_component(_rom_fs, _ds_ep, args); } - public: + public: - /** - * Constructor - * - * \param session_ep entry point for managing ram session objects - * \param ds_ep entry point for managing dataspaces - * \param rom_fs platform ROM file system - * \param md_alloc meta-data allocator to be used by root component - */ - Rom_root(Rpc_entrypoint &session_ep, - Rpc_entrypoint &ds_ep, - Rom_fs &rom_fs, - Allocator &md_alloc) - : - Root_component(&session_ep, &md_alloc), - _rom_fs(rom_fs), _ds_ep(ds_ep) { } - }; -} + /** + * Constructor + * + * \param session_ep entry point for managing ram session objects + * \param ds_ep entry point for managing dataspaces + * \param rom_fs platform ROM file system + * \param md_alloc meta-data allocator to be used by root component + */ + Rom_root(Rpc_entrypoint &session_ep, + Rpc_entrypoint &ds_ep, + Rom_fs &rom_fs, + Allocator &md_alloc) + : + Root_component(&session_ep, &md_alloc), + _rom_fs(rom_fs), _ds_ep(ds_ep) { } +}; #endif /* _CORE__INCLUDE__ROM_ROOT_H_ */ diff --git a/repos/base/src/core/include/rom_session_component.h b/repos/base/src/core/include/rom_session_component.h index c584701f5f..e8ab04d66a 100644 --- a/repos/base/src/core/include/rom_session_component.h +++ b/repos/base/src/core/include/rom_session_component.h @@ -20,63 +20,63 @@ #include #include -namespace Genode { - - class Rom_session_component : public Rpc_object - { - private: - - Rom_module const * const _rom_module = nullptr; - Dataspace_component _ds; - Rpc_entrypoint &_ds_ep; - Rom_dataspace_capability _ds_cap; - - Rom_module const &_find_rom(Rom_fs &rom_fs, const char *args) - { - /* extract label */ - Session_label const label = label_from_args(args); - - /* find ROM module for trailing label element */ - Rom_module const * rom = rom_fs.find(label.last_element().string()); - if (rom) - return *rom; - - throw Service_denied(); - } - - /* - * Noncopyable - */ - Rom_session_component(Rom_session_component const &); - Rom_session_component &operator = (Rom_session_component const &); - - public: - - /** - * Constructor - * - * \param rom_fs ROM filesystem - * \param ds_ep entry point to manage the dataspace - * corresponding the rom session - * \param args session-construction arguments - */ - Rom_session_component(Rom_fs &rom_fs, - Rpc_entrypoint &ds_ep, - const char *args); - - /** - * Destructor - */ - ~Rom_session_component(); +namespace Genode { class Rom_session_component; } - /*************************** - ** Rom session interface ** - ***************************/ +class Genode::Rom_session_component : public Rpc_object +{ + private: - Rom_dataspace_capability dataspace() override { return _ds_cap; } - void sigh(Signal_context_capability) override { } - }; -} + Rom_module const * const _rom_module = nullptr; + Dataspace_component _ds; + Rpc_entrypoint &_ds_ep; + Rom_dataspace_capability _ds_cap; + + Rom_module const &_find_rom(Rom_fs &rom_fs, const char *args) + { + /* extract label */ + Session_label const label = label_from_args(args); + + /* find ROM module for trailing label element */ + Rom_module const * rom = rom_fs.find(label.last_element().string()); + if (rom) + return *rom; + + throw Service_denied(); + } + + /* + * Noncopyable + */ + Rom_session_component(Rom_session_component const &); + Rom_session_component &operator = (Rom_session_component const &); + + public: + + /** + * Constructor + * + * \param rom_fs ROM filesystem + * \param ds_ep entry point to manage the dataspace + * corresponding the rom session + * \param args session-construction arguments + */ + Rom_session_component(Rom_fs &rom_fs, + Rpc_entrypoint &ds_ep, + const char *args); + + /** + * Destructor + */ + ~Rom_session_component(); + + + /*************************** + ** Rom session interface ** + ***************************/ + + Rom_dataspace_capability dataspace() override { return _ds_cap; } + void sigh(Signal_context_capability) override { } +}; #endif /* _CORE__INCLUDE__ROM_SESSION_COMPONENT_H_ */ diff --git a/repos/base/src/core/include/rpc_cap_factory.h b/repos/base/src/core/include/rpc_cap_factory.h index 348bd7d54a..6a28ceaa20 100644 --- a/repos/base/src/core/include/rpc_cap_factory.h +++ b/repos/base/src/core/include/rpc_cap_factory.h @@ -20,6 +20,7 @@ namespace Genode { class Rpc_cap_factory; } + class Genode::Rpc_cap_factory { private: diff --git a/repos/base/src/core/include/signal_broker.h b/repos/base/src/core/include/signal_broker.h index a16e372e33..4496b35b51 100644 --- a/repos/base/src/core/include/signal_broker.h +++ b/repos/base/src/core/include/signal_broker.h @@ -21,6 +21,7 @@ namespace Genode { class Signal_broker; } + class Genode::Signal_broker { private: diff --git a/repos/base/src/core/include/signal_delivery_proxy.h b/repos/base/src/core/include/signal_delivery_proxy.h index 46b4a3c021..e86f61a98e 100644 --- a/repos/base/src/core/include/signal_delivery_proxy.h +++ b/repos/base/src/core/include/signal_delivery_proxy.h @@ -15,83 +15,87 @@ #define _CORE__INCLUDE__SIGNAL_DELIVERY_PROXY_H_ namespace Genode { - - struct Signal_delivery_proxy : Interface - { - GENODE_RPC(Rpc_deliver, void, _deliver_from_ep, Signal_context_capability, unsigned); - GENODE_RPC(Rpc_release, void, _release_from_ep, Genode::addr_t); - GENODE_RPC_INTERFACE(Rpc_deliver, Rpc_release); - }; - - struct Signal_delivery_proxy_component - : - Rpc_object - { - Rpc_entrypoint &_ep; - - Capability _proxy_cap; - - /** - * Constructor - * - * \param ep entrypoint to be used as a proxy for delivering signals - * as IPC-reply messages. - */ - Signal_delivery_proxy_component(Rpc_entrypoint &ep) - : _ep(ep), _proxy_cap(_ep.manage(this)) { } - - ~Signal_delivery_proxy_component() - { - if (_proxy_cap.valid()) - _ep.dissolve(this); - } - - /** - * Signal_delivery_proxy RPC interface - * - * This method is executed in the context of the 'ep'. Hence, it - * can produce legitimate IPC reply messages to 'Signal_source' - * clients. - */ - void _deliver_from_ep(Signal_context_capability cap, unsigned cnt) - { - _ep.apply(cap, [&] (Signal_context_component *context) { - if (context) - context->source().submit(*context, cnt); - else - warning("invalid signal-context capability"); - }); - } - - void _release_from_ep(addr_t const context_addr) - { - Signal_context_component * context = reinterpret_cast(context_addr); - if (context) - context->source().release(*context); - } - - /** - * Deliver signal via the proxy mechanism - * - * Since this method perform an RPC call to the 'ep' specified at the - * constructor, is must never be called from this ep. - * - * Called from threads other than 'ep'. - */ - void submit(Signal_context_capability cap, unsigned cnt) { - _proxy_cap.call(cap, cnt); } - - /** - * Deliver signal via the proxy mechanism - * - * Since this method perform an RPC call to the 'ep' specified at the - * constructor, is must never be called from this ep. - * - * Called from threads other than 'ep'. - */ - void release(Signal_context_component &context) { - _proxy_cap.call(reinterpret_cast(&context)); } - }; + struct Signal_delivery_proxy; + struct Signal_delivery_proxy_component; } + +struct Genode::Signal_delivery_proxy : Interface +{ + GENODE_RPC(Rpc_deliver, void, _deliver_from_ep, Signal_context_capability, unsigned); + GENODE_RPC(Rpc_release, void, _release_from_ep, Genode::addr_t); + GENODE_RPC_INTERFACE(Rpc_deliver, Rpc_release); +}; + + +struct Genode::Signal_delivery_proxy_component +: + Rpc_object +{ + Rpc_entrypoint &_ep; + + Capability _proxy_cap; + + /** + * Constructor + * + * \param ep entrypoint to be used as a proxy for delivering signals + * as IPC-reply messages. + */ + Signal_delivery_proxy_component(Rpc_entrypoint &ep) + : _ep(ep), _proxy_cap(_ep.manage(this)) { } + + ~Signal_delivery_proxy_component() + { + if (_proxy_cap.valid()) + _ep.dissolve(this); + } + + /** + * Signal_delivery_proxy RPC interface + * + * This method is executed in the context of the 'ep'. Hence, it + * can produce legitimate IPC reply messages to 'Signal_source' + * clients. + */ + void _deliver_from_ep(Signal_context_capability cap, unsigned cnt) + { + _ep.apply(cap, [&] (Signal_context_component *context) { + if (context) + context->source().submit(*context, cnt); + else + warning("invalid signal-context capability"); + }); + } + + void _release_from_ep(addr_t const context_addr) + { + Signal_context_component * context = reinterpret_cast(context_addr); + if (context) + context->source().release(*context); + } + + /** + * Deliver signal via the proxy mechanism + * + * Since this method perform an RPC call to the 'ep' specified at the + * constructor, is must never be called from this ep. + * + * Called from threads other than 'ep'. + */ + void submit(Signal_context_capability cap, unsigned cnt) { + _proxy_cap.call(cap, cnt); } + + /** + * Deliver signal via the proxy mechanism + * + * Since this method perform an RPC call to the 'ep' specified at the + * constructor, is must never be called from this ep. + * + * Called from threads other than 'ep'. + */ + void release(Signal_context_component &context) { + _proxy_cap.call(reinterpret_cast(&context)); } +}; + #endif /* _CORE__INCLUDE__SIGNLA_DELIVERY_PROXY_H_ */ diff --git a/repos/base/src/core/include/vm_root.h b/repos/base/src/core/include/vm_root.h index 46bf5c67bd..2ae78bd778 100644 --- a/repos/base/src/core/include/vm_root.h +++ b/repos/base/src/core/include/vm_root.h @@ -23,6 +23,7 @@ namespace Genode { class Vm_root; } + class Genode::Vm_root : public Root_component { private: From 1d5fc3ef60c49ba1aeb23a76018fadad9798157d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 9 Feb 2023 11:04:34 +0100 Subject: [PATCH 0293/1921] sculpt/depot: remove depot user trimpim Fixes #4754 --- repos/gems/sculpt/depot/trimpim/download | 1 - repos/gems/sculpt/depot/trimpim/pubkey | 18 ------------------ 2 files changed, 19 deletions(-) delete mode 100644 repos/gems/sculpt/depot/trimpim/download delete mode 100644 repos/gems/sculpt/depot/trimpim/pubkey diff --git a/repos/gems/sculpt/depot/trimpim/download b/repos/gems/sculpt/depot/trimpim/download deleted file mode 100644 index 4b55eb7dda..0000000000 --- a/repos/gems/sculpt/depot/trimpim/download +++ /dev/null @@ -1 +0,0 @@ -https://s3.eu-central-1.amazonaws.com/dev.depot.gapfruit.com diff --git a/repos/gems/sculpt/depot/trimpim/pubkey b/repos/gems/sculpt/depot/trimpim/pubkey deleted file mode 100644 index d0381c38b1..0000000000 --- a/repos/gems/sculpt/depot/trimpim/pubkey +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQENBFrq0AsBCACyr5B8jH93vUYAspNeiiNd+e71gwA0ftJQJPMp+Fyr+02gI68W -OZmxndHTDIuZkGsgRBkaeeHVbkXi0Br90oZClZKRkhseXgx5gcsvt6FsuakFwf21 -MNLYWNiKZhvntdJl7HYTxQ3rx3wMnYOyFhQRORQdSQS3i53CXoT7l+biJGH2ylnu -AfOL5kOP60wrkP+S8tXZRmvXdhHMEy1sqKZoCuo7mEUmZnA4AL/A8n98jDSXw/bP -xAMRSedqN4VAgTRBtgZTCDOU19Q0aRV/eEUsuZTHEU3qhdbHcrmXB2reiRjL+Ol8 -EY1Alb+p0c1SM1CmEKpSlpsjDJvzOSgPJuxtABEBAAG0MXRyaW1waW0tZ2l0bGFi -LXN0YWdpbmcgPHBpcm1pbi5kdXNzQGdhcGZydWl0LmNvbT6JAU4EEwEIADgWIQRm -OLnH3fFNXDibg3lDqO6DjZnR1QUCWurQCwIbAwULCQgHAgYVCgkICwIEFgIDAQIe -AQIXgAAKCRBDqO6DjZnR1YNiB/45yYuznT9vi4o/NX1excQKA253CRXhPZii+gCn -FIQk8dAO80fymdH51+h4WR2i1Vwgqrpfoss8dnZ/2BCseOlYbTco0NFISOKcwrTM -ia/R8M4hOk3pAr/+5g5jKijQtYW1P156nJkINsHfxS15lfJwZkiP+FsSz4eV3Qrd -RmBNrlZnUgV87O0my1gDoYwtP95D8qTErB28wQeBXSqoLxu1AJl5KqrFi4nAEgmj -ZYk3abmyYV4KNQGzp3ju0BHdcW8dC/arvAfFJQPc24dH7STHC5ZvF6lQS9gDjDpS -dgtpVymFUkxm9E7z34atXfZgtv3eSy5t8sJv8F0+j+qxiNWd -=Wf/A ------END PGP PUBLIC KEY BLOCK----- From 0212f94809fb680bfb3208e101b08af3b2f77f65 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 6 Feb 2023 14:43:20 +0100 Subject: [PATCH 0294/1921] hw: eliminate -DNR_OF_CPUS, use constant instead Fix genodelabs/genode#4752 --- repos/base-hw/lib/mk/bootstrap-hw.inc | 4 ---- repos/base-hw/lib/mk/core-hw.inc | 4 ---- .../arm_v7/bootstrap-hw-imx6q_sabrelite.mk | 2 -- .../spec/arm_v7/bootstrap-hw-imx7d_sabre.mk | 2 -- .../mk/spec/arm_v7/bootstrap-hw-nit6_solox.mk | 2 -- .../arm_v7/bootstrap-hw-virt_qemu_arm_v7a.mk | 2 -- .../mk/spec/arm_v7/bootstrap-hw-wand_quad.mk | 2 -- .../mk/spec/arm_v7/core-hw-imx6q_sabrelite.mk | 2 -- .../lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk | 2 -- .../lib/mk/spec/arm_v7/core-hw-nit6_solox.mk | 2 -- .../lib/mk/spec/arm_v7/core-hw-pbxa9.mk | 2 -- .../spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk | 2 -- .../lib/mk/spec/arm_v7/core-hw-wand_quad.mk | 2 -- .../arm_v8/bootstrap-hw-virt_qemu_arm_v8a.mk | 2 -- .../spec/arm_v8/core-hw-virt_qemu_arm_v8a.mk | 2 -- .../base-hw/lib/mk/spec/cortex_a8/core-hw.inc | 2 -- .../lib/mk/spec/x86_64/bootstrap-hw-pc.mk | 2 -- .../base-hw/lib/mk/spec/x86_64/core-hw-pc.mk | 2 -- .../bootstrap/board/virt_qemu_arm_v7a/board.h | 2 ++ .../board/virt_qemu_arm_v7a/platform.cc | 2 +- .../bootstrap/board/virt_qemu_arm_v8a/board.h | 2 ++ repos/base-hw/src/bootstrap/init.cc | 7 +++++++ repos/base-hw/src/bootstrap/platform.h | 2 +- repos/base-hw/src/bootstrap/spec/arm/crt0.s | 17 +++++++-------- .../bootstrap/spec/arm_64/cortex_a53_mmu.cc | 3 ++- .../base-hw/src/bootstrap/spec/arm_64/crt0.s | 15 ++++--------- .../base-hw/src/bootstrap/spec/x86_64/crt0.s | 21 ++++--------------- .../src/bootstrap/spec/x86_64/platform.cc | 4 ++-- repos/base-hw/src/core/board/pc/board.h | 11 +++++++--- .../src/core/board/virt_qemu_arm_v7a/board.h | 3 ++- .../src/core/board/virt_qemu_arm_v8a/board.h | 1 + repos/base-hw/src/core/core_log_out.cc | 2 +- repos/base-hw/src/core/kernel/cpu.cc | 2 +- repos/base-hw/src/core/kernel/cpu.h | 2 +- .../spec/arm_v7/virtualization/kernel/vm.cc | 2 +- .../spec/arm_v8/virtualization/kernel/vm.cc | 3 ++- repos/base-hw/src/core/spec/x86_64/pic.h | 4 ++-- repos/base-hw/src/include/hw/boot_info.h | 4 ++-- .../src/include/hw/spec/arm/imx53_qsb_board.h | 1 + .../hw/spec/arm/imx6q_sabrelite_board.h | 1 + .../include/hw/spec/arm/imx7d_sabre_board.h | 1 + .../include/hw/spec/arm/nit6_solox_board.h | 1 + .../src/include/hw/spec/arm/pbxa9_board.h | 1 + .../src/include/hw/spec/arm/wand_quad_board.h | 1 + .../src/include/hw/spec/x86_64/pc_board.h | 2 ++ 45 files changed, 62 insertions(+), 95 deletions(-) diff --git a/repos/base-hw/lib/mk/bootstrap-hw.inc b/repos/base-hw/lib/mk/bootstrap-hw.inc index bdd5310976..e7f16a3b18 100644 --- a/repos/base-hw/lib/mk/bootstrap-hw.inc +++ b/repos/base-hw/lib/mk/bootstrap-hw.inc @@ -25,10 +25,6 @@ REP_INC_DIR += src/bootstrap REP_INC_DIR += src/include REP_INC_DIR += src/core/include # for boot_modules.h only -# configure multiprocessor mode -NR_OF_CPUS ?= 1 -CC_OPT += -Wa,--defsym -Wa,NR_OF_CPUS=$(NR_OF_CPUS) -DNR_OF_CPUS=$(NR_OF_CPUS) - TMP := $(call select_from_repositories,lib/mk/bootstrap-hw.inc) BASE_HW_DIR := $(TMP:%/lib/mk/bootstrap-hw.inc=%) diff --git a/repos/base-hw/lib/mk/core-hw.inc b/repos/base-hw/lib/mk/core-hw.inc index 0620bda505..a875b20eb8 100644 --- a/repos/base-hw/lib/mk/core-hw.inc +++ b/repos/base-hw/lib/mk/core-hw.inc @@ -66,10 +66,6 @@ SRC_CC += heartbeat.cc # provide Genode version information include $(BASE_DIR)/src/core/version.inc -# configure multiprocessor mode -NR_OF_CPUS ?= 1 -CC_OPT += -Wa,--defsym -Wa,NR_OF_CPUS=$(NR_OF_CPUS) -DNR_OF_CPUS=$(NR_OF_CPUS) - TMP := $(call select_from_repositories,lib/mk/core-hw.inc) BASE_HW_DIR := $(TMP:%/lib/mk/core-hw.inc=%) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-imx6q_sabrelite.mk b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-imx6q_sabrelite.mk index 4878dd9a36..d1e16e1c87 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-imx6q_sabrelite.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-imx6q_sabrelite.mk @@ -9,6 +9,4 @@ SRC_CC += bootstrap/spec/arm/imx6_platform.cc SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc SRC_CC += hw/spec/32bit/memory_map.cc -NR_OF_CPUS = 4 - include $(call select_from_repositories,lib/mk/bootstrap-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-imx7d_sabre.mk b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-imx7d_sabre.mk index 2a44a29f7f..6d0686bfe1 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-imx7d_sabre.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-imx7d_sabre.mk @@ -7,8 +7,6 @@ SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc SRC_CC += hw/spec/32bit/memory_map.cc SRC_S += bootstrap/spec/arm/crt0.s -NR_OF_CPUS = 2 - # # we need more specific compiler hints for some 'special' assembly code # override -march=armv7-a because it conflicts with -mcpu=cortex-a7 diff --git a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-nit6_solox.mk b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-nit6_solox.mk index d8c5505031..e89221e775 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-nit6_solox.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-nit6_solox.mk @@ -9,6 +9,4 @@ SRC_CC += bootstrap/spec/arm/imx6_platform.cc SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc SRC_CC += hw/spec/32bit/memory_map.cc -NR_OF_CPUS = 1 - include $(call select_from_repositories,lib/mk/bootstrap-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-virt_qemu_arm_v7a.mk b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-virt_qemu_arm_v7a.mk index b26a3dc66e..7cb4f677ef 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-virt_qemu_arm_v7a.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-virt_qemu_arm_v7a.mk @@ -7,8 +7,6 @@ SRC_CC += bootstrap/spec/arm/gicv2.cc SRC_CC += hw/spec/32bit/memory_map.cc SRC_S += bootstrap/spec/arm/crt0.s -NR_OF_CPUS = 2 - CC_MARCH = -march=armv7ve -mtune=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp include $(call select_from_repositories,lib/mk/bootstrap-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-wand_quad.mk b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-wand_quad.mk index f781159d87..c39493e5f9 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-wand_quad.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/bootstrap-hw-wand_quad.mk @@ -9,6 +9,4 @@ SRC_CC += bootstrap/spec/arm/imx6_platform.cc SRC_CC += bootstrap/spec/arm/arm_v7_cpu.cc SRC_CC += hw/spec/32bit/memory_map.cc -NR_OF_CPUS = 4 - include $(call select_from_repositories,lib/mk/bootstrap-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx6q_sabrelite.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx6q_sabrelite.mk index 72fd584dc4..8f8f1f9581 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx6q_sabrelite.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx6q_sabrelite.mk @@ -12,7 +12,5 @@ REP_INC_DIR += src/core/board/imx6q_sabrelite # add C++ sources SRC_CC += platform_services.cc -NR_OF_CPUS = 4 - # include less specific configuration include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk index 03ee443556..3fa2d274de 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx7d_sabre.mk @@ -22,8 +22,6 @@ SRC_CC += vm_session_component.cc # add assembly sources SRC_S += spec/arm_v7/virtualization/exception_vector.s -NR_OF_CPUS = 2 - # # we need more specific compiler hints for some 'special' assembly code # override -march=armv7-a because it conflicts with -mcpu=cortex-a7 diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-nit6_solox.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-nit6_solox.mk index be2dae8788..34c095755c 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-nit6_solox.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-nit6_solox.mk @@ -12,7 +12,5 @@ REP_INC_DIR += src/core/board/nit6_solox # add C++ sources SRC_CC += platform_services.cc -NR_OF_CPUS = 1 - # include less specific configuration include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-pbxa9.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-pbxa9.mk index 5777ac4245..6d5de20eef 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-pbxa9.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-pbxa9.mk @@ -11,7 +11,5 @@ REP_INC_DIR += src/core/board/pbxa9 # add C++ sources SRC_CC += platform_services.cc -NR_OF_CPUS = 1 - # include less specific configuration include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk index e6830f1877..fd4f579d79 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-virt_qemu_arm_v7a.mk @@ -14,8 +14,6 @@ SRC_CC += vm_session_component.cc SRC_S += spec/arm_v7/virtualization/exception_vector.s -NR_OF_CPUS = 2 - CC_MARCH = -march=armv7ve -mtune=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp include $(call select_from_repositories,lib/mk/spec/cortex_a15/core-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-wand_quad.mk b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-wand_quad.mk index 79bb04e4b9..947634bd56 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-wand_quad.mk +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-wand_quad.mk @@ -12,7 +12,5 @@ REP_INC_DIR += src/core/board/wand_quad # add C++ sources SRC_CC += platform_services.cc -NR_OF_CPUS = 4 - # include less specific configuration include $(call select_from_repositories,lib/mk/spec/cortex_a9/core-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v8/bootstrap-hw-virt_qemu_arm_v8a.mk b/repos/base-hw/lib/mk/spec/arm_v8/bootstrap-hw-virt_qemu_arm_v8a.mk index 65ac7ac5cb..e9c640237c 100644 --- a/repos/base-hw/lib/mk/spec/arm_v8/bootstrap-hw-virt_qemu_arm_v8a.mk +++ b/repos/base-hw/lib/mk/spec/arm_v8/bootstrap-hw-virt_qemu_arm_v8a.mk @@ -7,8 +7,6 @@ SRC_CC += lib/base/arm_64/kernel/interface.cc SRC_CC += spec/64bit/memory_map.cc SRC_S += bootstrap/spec/arm_64/crt0.s -NR_OF_CPUS = 4 - vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw) include $(call select_from_repositories,lib/mk/bootstrap-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/arm_v8/core-hw-virt_qemu_arm_v8a.mk b/repos/base-hw/lib/mk/spec/arm_v8/core-hw-virt_qemu_arm_v8a.mk index 41825db29d..faded1350f 100644 --- a/repos/base-hw/lib/mk/spec/arm_v8/core-hw-virt_qemu_arm_v8a.mk +++ b/repos/base-hw/lib/mk/spec/arm_v8/core-hw-virt_qemu_arm_v8a.mk @@ -13,7 +13,5 @@ SRC_CC += vm_session_component.cc #add assembly sources SRC_S += spec/arm_v8/virtualization/exception_vector.s -NR_OF_CPUS = 4 - # include less specific configuration include $(call select_from_repositories,lib/mk/spec/arm_v8/core-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc b/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc index a71386347a..73faf7b9d9 100644 --- a/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc @@ -8,8 +8,6 @@ SRC_CC += kernel/cpu_up.cc SRC_CC += kernel/lock.cc -NR_OF_CPUS = 1 - # include less specific configuration include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/x86_64/bootstrap-hw-pc.mk b/repos/base-hw/lib/mk/spec/x86_64/bootstrap-hw-pc.mk index c5e8b41d22..7ab8d022c4 100644 --- a/repos/base-hw/lib/mk/spec/x86_64/bootstrap-hw-pc.mk +++ b/repos/base-hw/lib/mk/spec/x86_64/bootstrap-hw-pc.mk @@ -6,6 +6,4 @@ SRC_S += bootstrap/spec/x86_64/crt0_translation_table.s SRC_CC += hw/spec/64bit/memory_map.cc -NR_OF_CPUS = 32 - include $(call select_from_repositories,lib/mk/bootstrap-hw.inc) diff --git a/repos/base-hw/lib/mk/spec/x86_64/core-hw-pc.mk b/repos/base-hw/lib/mk/spec/x86_64/core-hw-pc.mk index 0720a4f3f4..318083f6f9 100644 --- a/repos/base-hw/lib/mk/spec/x86_64/core-hw-pc.mk +++ b/repos/base-hw/lib/mk/spec/x86_64/core-hw-pc.mk @@ -39,7 +39,5 @@ SRC_CC += spec/64bit/memory_map.cc vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw) -NR_OF_CPUS = 32 - # include less specific configuration include $(call select_from_repositories,lib/mk/core-hw.inc) diff --git a/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v7a/board.h b/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v7a/board.h index 4956b88bfc..5c1cac0ce6 100644 --- a/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v7a/board.h +++ b/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v7a/board.h @@ -27,6 +27,8 @@ namespace Board { using Psci = Hw::Psci; using Pic = Hw::Gicv2; static constexpr bool NON_SECURE = true; + + enum { NR_OF_CPUS = 2 }; }; #endif /* _SRC__BOOTSTRAP__SPEC__VIRT__QEMU_H_ */ diff --git a/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v7a/platform.cc b/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v7a/platform.cc index cf8e55cc2f..ead6097701 100644 --- a/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v7a/platform.cc +++ b/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v7a/platform.cc @@ -66,7 +66,7 @@ unsigned Bootstrap::Platform::enable_mmu() ::Board::Pic pic { }; /* primary cpu wakes up all others */ - if (primary_cpu && NR_OF_CPUS > 1) { + if (primary_cpu && ::Board::NR_OF_CPUS > 1) { Cpu::invalidate_data_cache(); primary_cpu = false; Cpu::wake_up_all_cpus(&_start_setup_stack); diff --git a/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v8a/board.h b/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v8a/board.h index 62a197fb70..81d127ec41 100644 --- a/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v8a/board.h +++ b/repos/base-hw/src/bootstrap/board/virt_qemu_arm_v8a/board.h @@ -31,6 +31,8 @@ namespace Board { static void wake_up_all_cpus(void*); }; + enum { NR_OF_CPUS = 4 }; + using Hw::Pic; }; diff --git a/repos/base-hw/src/bootstrap/init.cc b/repos/base-hw/src/bootstrap/init.cc index 0cc92720fb..9fcda2fec3 100644 --- a/repos/base-hw/src/bootstrap/init.cc +++ b/repos/base-hw/src/bootstrap/init.cc @@ -18,6 +18,13 @@ #include #include +using namespace Genode; + +static constexpr size_t STACK_SIZE = 0x2000; + +size_t bootstrap_stack_size = STACK_SIZE; +uint8_t bootstrap_stack[Board::NR_OF_CPUS][STACK_SIZE] +__attribute__((aligned(get_page_size()))); Bootstrap::Platform & Bootstrap::platform() { return *unmanaged_singleton(); } diff --git a/repos/base-hw/src/bootstrap/platform.h b/repos/base-hw/src/bootstrap/platform.h index bc6deebe25..54294748a3 100644 --- a/repos/base-hw/src/bootstrap/platform.h +++ b/repos/base-hw/src/bootstrap/platform.h @@ -46,7 +46,7 @@ class Bootstrap::Platform Memory_region_array early_ram_regions { }; Memory_region_array late_ram_regions { }; Mmio_space const core_mmio; - unsigned cpus { NR_OF_CPUS }; + unsigned cpus { ::Board::NR_OF_CPUS }; ::Board::Boot_info info { }; Board(); diff --git a/repos/base-hw/src/bootstrap/spec/arm/crt0.s b/repos/base-hw/src/bootstrap/spec/arm/crt0.s index 32c42286bc..8c9e6d3023 100644 --- a/repos/base-hw/src/bootstrap/spec/arm/crt0.s +++ b/repos/base-hw/src/bootstrap/spec/arm/crt0.s @@ -63,8 +63,10 @@ mrcne p15, 0, sp, c0, c0, 5 /* read multiprocessor affinity register */ andne sp, sp, #0xff /* set cpu id for non-boot cpu */ - adr r0, _start_stack /* load stack address into r0 */ - adr r1, _start_stack_size /* load stack size per cpu into r1 */ + adr r0, _bootstrap_stack_local /* load stack address into r0 */ + adr r1, _bootstrap_stack_size_local /* load stack size per cpu into r1 */ + ldr r0, [r0] + ldr r1, [r1] ldr r1, [r1] add sp, #1 /* calculate stack start for CPU */ @@ -101,11 +103,8 @@ _bss_local_end: .long _bss_end - _start_stack_size: - .long STACK_SIZE + _bootstrap_stack_local: + .long bootstrap_stack - .align 3 - _start_stack: - .rept NR_OF_CPUS - .space STACK_SIZE - .endr + _bootstrap_stack_size_local: + .long bootstrap_stack_size diff --git a/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc b/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc index 33c9c43eb4..92ca7e583d 100644 --- a/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc +++ b/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc @@ -145,7 +145,8 @@ unsigned Bootstrap::Platform::enable_mmu() Cpu::Ttbr::Baddr::masked((Genode::addr_t)core_pd->table_base); /* primary cpu wakes up all others */ - if (primary && NR_OF_CPUS > 1) Cpu::wake_up_all_cpus(&_crt0_start_secondary); + if (primary && ::Board::NR_OF_CPUS > 1) + Cpu::wake_up_all_cpus(&_crt0_start_secondary); while (Cpu::current_privilege_level() > Cpu::Current_el::EL1) { if (Cpu::current_privilege_level() == Cpu::Current_el::EL3) { diff --git a/repos/base-hw/src/bootstrap/spec/arm_64/crt0.s b/repos/base-hw/src/bootstrap/spec/arm_64/crt0.s index 046fc94b03..22e08a95ca 100644 --- a/repos/base-hw/src/bootstrap/spec/arm_64/crt0.s +++ b/repos/base-hw/src/bootstrap/spec/arm_64/crt0.s @@ -114,19 +114,12 @@ ** Initialize stack ** **********************/ - .set STACK_SIZE, 0x2000 - _cpu_number - ldr x1, =_crt0_start_stack - ldr x2, [x1] + ldr x1, =bootstrap_stack + ldr x2, =bootstrap_stack_size + ldr x2, [x2] + add x0, x0, #1 mul x0, x0, x2 add x1, x1, x0 mov sp, x1 bl init - - .p2align 4 - .rept NR_OF_CPUS - .space STACK_SIZE - .endr - _crt0_start_stack: - .quad STACK_SIZE diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/crt0.s b/repos/base-hw/src/bootstrap/spec/x86_64/crt0.s index d158d6d68a..ba927a3f76 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/crt0.s +++ b/repos/base-hw/src/bootstrap/spec/x86_64/crt0.s @@ -143,16 +143,14 @@ __gdt: movq $1, %rcx lock xaddq %rcx, (%rax) - /* if more CPUs started than supported, then stop them */ - cmp $NR_OF_CPUS, %rcx - jge 1f - /* calculate stack depending on CPU counter */ - movq $STACK_SIZE, %rax + leaq bootstrap_stack_size@GOTPCREL(%rip),%rax + movq (%rax), %rax + movq (%rax), %rax inc %rcx mulq %rcx movq %rax, %rcx - leaq __bootstrap_stack@GOTPCREL(%rip),%rax + leaq bootstrap_stack@GOTPCREL(%rip),%rax movq (%rax), %rsp addq %rcx, %rsp @@ -182,10 +180,6 @@ __gdt: jmp 1b - .global bootstrap_stack_size - bootstrap_stack_size: - .quad STACK_SIZE - /****************************************** ** Global Descriptor Table (GDT) ** ** See Intel SDM Vol. 3A, section 3.5.1 ** @@ -236,14 +230,7 @@ __gdt: *********************************/ .bss - - /* stack of the temporary initial environment */ .p2align 12 - .globl __bootstrap_stack - __bootstrap_stack: - .rept NR_OF_CPUS - .space STACK_SIZE - .endr .globl __initial_ax __initial_ax: diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc index 3dace7cf8b..4eeca6dc6f 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc @@ -31,7 +31,7 @@ extern "C" Genode::addr_t __initial_ax; extern "C" Genode::addr_t __initial_bx; /* pointer to stack base */ -extern "C" Genode::addr_t __bootstrap_stack; +extern "C" Genode::addr_t bootstrap_stack; /* number of booted CPUs */ extern "C" Genode::addr_t __cpus_booted; @@ -296,7 +296,7 @@ unsigned Bootstrap::Platform::enable_mmu() Cpu::Cr3::write(Cpu::Cr3::Pdb::masked((addr_t)core_pd->table_base)); - addr_t const stack_base = reinterpret_cast(&__bootstrap_stack); + addr_t const stack_base = reinterpret_cast(&bootstrap_stack); addr_t const this_stack = reinterpret_cast(&stack_base); addr_t const cpu_id = (this_stack - stack_base) / bootstrap_stack_size; diff --git a/repos/base-hw/src/core/board/pc/board.h b/repos/base-hw/src/core/board/pc/board.h index 27ef96c304..ea23d11889 100644 --- a/repos/base-hw/src/core/board/pc/board.h +++ b/repos/base-hw/src/core/board/pc/board.h @@ -17,15 +17,20 @@ /* base-hw internal includes */ #include +/* + * As long as Board::NR_OF_CPUS is used as constant within pic.h + * we sadly have to include Hw::Pc_board into the namespace + * before including pic.h. This will change as soon as the number + * O CPUs is only define per function +*/ +namespace Board { using namespace Hw::Pc_board; }; + /* base-hw Core includes */ #include #include #include namespace Board { - - using namespace Hw::Pc_board; - class Pic : public Local_interrupt_controller { }; enum { diff --git a/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h b/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h index c12a54cc67..1bc91cf43e 100644 --- a/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h +++ b/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h @@ -40,7 +40,8 @@ namespace Board { TIMER_IRQ = 30 /* PPI IRQ 14 */, VT_TIMER_IRQ = 27, VT_MAINTAINANCE_IRQ = 25, - VCPU_MAX = 16 + VCPU_MAX = 16, + NR_OF_CPUS = 2, }; }; diff --git a/repos/base-hw/src/core/board/virt_qemu_arm_v8a/board.h b/repos/base-hw/src/core/board/virt_qemu_arm_v8a/board.h index 0e72f97486..c79aaf5c66 100644 --- a/repos/base-hw/src/core/board/virt_qemu_arm_v8a/board.h +++ b/repos/base-hw/src/core/board/virt_qemu_arm_v8a/board.h @@ -34,6 +34,7 @@ namespace Board { using namespace Hw::Virt_qemu_board; enum { + NR_OF_CPUS = 4, TIMER_IRQ = 30, /* PPI IRQ 14 */ VT_TIMER_IRQ = 11 + 16, VT_MAINTAINANCE_IRQ = 9 + 16, diff --git a/repos/base-hw/src/core/core_log_out.cc b/repos/base-hw/src/core/core_log_out.cc index 70148f275a..bced5302fd 100644 --- a/repos/base-hw/src/core/core_log_out.cc +++ b/repos/base-hw/src/core/core_log_out.cc @@ -47,7 +47,7 @@ static inline bool running_in_kernel() { addr_t const stack_base = reinterpret_cast(&kernel_stack); static constexpr size_t stack_size = - NR_OF_CPUS * Kernel::Cpu::KERNEL_STACK_SIZE; + Board::NR_OF_CPUS * Kernel::Cpu::KERNEL_STACK_SIZE; /* check stack variable against kernel stack area */ return ((addr_t)&stack_base) >= stack_base && diff --git a/repos/base-hw/src/core/kernel/cpu.cc b/repos/base-hw/src/core/kernel/cpu.cc index cd7e57b5b9..91609ed1df 100644 --- a/repos/base-hw/src/core/kernel/cpu.cc +++ b/repos/base-hw/src/core/kernel/cpu.cc @@ -160,7 +160,7 @@ Cpu_job & Cpu::schedule() Genode::size_t kernel_stack_size = Cpu::KERNEL_STACK_SIZE; -Genode::uint8_t kernel_stack[NR_OF_CPUS][Cpu::KERNEL_STACK_SIZE] +Genode::uint8_t kernel_stack[Board::NR_OF_CPUS][Cpu::KERNEL_STACK_SIZE] __attribute__((aligned(Genode::get_page_size()))); diff --git a/repos/base-hw/src/core/kernel/cpu.h b/repos/base-hw/src/core/kernel/cpu.h index 35ab1b0014..cb24468270 100644 --- a/repos/base-hw/src/core/kernel/cpu.h +++ b/repos/base-hw/src/core/kernel/cpu.h @@ -201,7 +201,7 @@ class Kernel::Cpu_pool Inter_processor_work_list _global_work_list {}; unsigned _nr_of_cpus; - Genode::Constructible _cpus[NR_OF_CPUS]; + Genode::Constructible _cpus[Board::NR_OF_CPUS]; public: diff --git a/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc b/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc index 416110121e..65ada78c56 100644 --- a/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc +++ b/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc @@ -65,7 +65,7 @@ struct Hypervisor::Host_context static Hypervisor::Host_context & host_context(Cpu & cpu) { static Genode::Constructible - host_context[NR_OF_CPUS]; + host_context[Board::NR_OF_CPUS]; if (!host_context[cpu.id()].constructed()) { host_context[cpu.id()].construct(); Hypervisor::Host_context & c = *host_context[cpu.id()]; diff --git a/repos/base-hw/src/core/spec/arm_v8/virtualization/kernel/vm.cc b/repos/base-hw/src/core/spec/arm_v8/virtualization/kernel/vm.cc index 30b6962865..cc07859602 100644 --- a/repos/base-hw/src/core/spec/arm_v8/virtualization/kernel/vm.cc +++ b/repos/base-hw/src/core/spec/arm_v8/virtualization/kernel/vm.cc @@ -32,7 +32,8 @@ using Kernel::Vm; static Genode::Vm_state & host_context(Cpu & cpu) { - static Genode::Constructible host_context[NR_OF_CPUS]; + static Genode::Constructible + host_context[Board::NR_OF_CPUS]; if (!host_context[cpu.id()].constructed()) { host_context[cpu.id()].construct(); diff --git a/repos/base-hw/src/core/spec/x86_64/pic.h b/repos/base-hw/src/core/spec/x86_64/pic.h index 3f61994192..f70fa85804 100644 --- a/repos/base-hw/src/core/spec/x86_64/pic.h +++ b/repos/base-hw/src/core/spec/x86_64/pic.h @@ -85,7 +85,7 @@ class Board::Global_interrupt_controller : public Genode::Mmio }; unsigned _irte_count = 0; /* number of redirection table entries */ - uint8_t _lapic_id[NR_OF_CPUS]; /* unique name of the LAPIC of each CPU */ + uint8_t _lapic_id[Board::NR_OF_CPUS]; /* unique name of the LAPIC of each CPU */ Irq_mode _irq_mode[IRQ_COUNT]; /** @@ -221,7 +221,7 @@ class Board::Local_interrupt_controller : public Genode::Mmio void store_apic_id(unsigned const cpu_id) { - if (cpu_id < NR_OF_CPUS) { + if (cpu_id < Board::NR_OF_CPUS) { Id::access_t const lapic_id = read(); _global_irq_ctrl.lapic_id(cpu_id, (unsigned char)((lapic_id >> 24) & 0xff)); } diff --git a/repos/base-hw/src/include/hw/boot_info.h b/repos/base-hw/src/include/hw/boot_info.h index d7c1c50ebb..32edb68adb 100644 --- a/repos/base-hw/src/include/hw/boot_info.h +++ b/repos/base-hw/src/include/hw/boot_info.h @@ -22,8 +22,8 @@ namespace Hw { template struct Boot_info; } template struct Hw::Boot_info { - using Mapping_pool = Genode::Array; - using Kernel_irqs = Genode::Array; + using Mapping_pool = Genode::Array; + using Kernel_irqs = Genode::Array; addr_t const table; addr_t const table_allocator; diff --git a/repos/base-hw/src/include/hw/spec/arm/imx53_qsb_board.h b/repos/base-hw/src/include/hw/spec/arm/imx53_qsb_board.h index 785cdf8012..f2f5144998 100644 --- a/repos/base-hw/src/include/hw/spec/arm/imx53_qsb_board.h +++ b/repos/base-hw/src/include/hw/spec/arm/imx53_qsb_board.h @@ -26,6 +26,7 @@ namespace Hw::Imx53_qsb_board { enum { UART_BASE = UART_1_MMIO_BASE, UART_CLOCK = 0, /* ignored value */ + NR_OF_CPUS = 1, }; } diff --git a/repos/base-hw/src/include/hw/spec/arm/imx6q_sabrelite_board.h b/repos/base-hw/src/include/hw/spec/arm/imx6q_sabrelite_board.h index a45d059c1e..50a6e6b322 100644 --- a/repos/base-hw/src/include/hw/spec/arm/imx6q_sabrelite_board.h +++ b/repos/base-hw/src/include/hw/spec/arm/imx6q_sabrelite_board.h @@ -31,6 +31,7 @@ namespace Hw::Imx6q_sabrelite_board { UART_BASE = UART_2_MMIO_BASE, UART_SIZE = UART_2_MMIO_SIZE, UART_CLOCK = 0, /* dummy value, not used */ + NR_OF_CPUS = 4 }; } diff --git a/repos/base-hw/src/include/hw/spec/arm/imx7d_sabre_board.h b/repos/base-hw/src/include/hw/spec/arm/imx7d_sabre_board.h index 8646c45163..6b0889100c 100644 --- a/repos/base-hw/src/include/hw/spec/arm/imx7d_sabre_board.h +++ b/repos/base-hw/src/include/hw/spec/arm/imx7d_sabre_board.h @@ -29,6 +29,7 @@ namespace Hw::Imx7d_sabre_board { enum { UART_BASE = UART_1_MMIO_BASE, UART_CLOCK = 0, /* unsued value */ + NR_OF_CPUS = 2 }; } diff --git a/repos/base-hw/src/include/hw/spec/arm/nit6_solox_board.h b/repos/base-hw/src/include/hw/spec/arm/nit6_solox_board.h index 3f20ca7074..afb185c0de 100644 --- a/repos/base-hw/src/include/hw/spec/arm/nit6_solox_board.h +++ b/repos/base-hw/src/include/hw/spec/arm/nit6_solox_board.h @@ -31,6 +31,7 @@ namespace Hw::Nit6_solox_board { UART_BASE = UART_1_MMIO_BASE, UART_SIZE = UART_1_MMIO_SIZE, UART_CLOCK = 0, /* dummy value, not used */ + NR_OF_CPUS = 1 }; } diff --git a/repos/base-hw/src/include/hw/spec/arm/pbxa9_board.h b/repos/base-hw/src/include/hw/spec/arm/pbxa9_board.h index 0a9b71d4f8..fef34ee0ff 100644 --- a/repos/base-hw/src/include/hw/spec/arm/pbxa9_board.h +++ b/repos/base-hw/src/include/hw/spec/arm/pbxa9_board.h @@ -31,6 +31,7 @@ namespace Hw::Pbxa9_board { enum { UART_BASE = PL011_0_MMIO_BASE, UART_CLOCK = PL011_0_CLOCK, + NR_OF_CPUS = 1, }; } diff --git a/repos/base-hw/src/include/hw/spec/arm/wand_quad_board.h b/repos/base-hw/src/include/hw/spec/arm/wand_quad_board.h index 23d5b681d6..cd69302bc9 100644 --- a/repos/base-hw/src/include/hw/spec/arm/wand_quad_board.h +++ b/repos/base-hw/src/include/hw/spec/arm/wand_quad_board.h @@ -31,6 +31,7 @@ namespace Hw::Wand_quad_board { UART_BASE = UART_1_MMIO_BASE, UART_SIZE = UART_1_MMIO_SIZE, UART_CLOCK = 0, /* dummy value, not used */ + NR_OF_CPUS = 4 }; } diff --git a/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h b/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h index f450f93f11..352f51ac64 100644 --- a/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h +++ b/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h @@ -23,6 +23,8 @@ namespace Hw::Pc_board { struct Boot_info; struct Serial; enum Dummies { UART_BASE, UART_CLOCK }; + + enum { NR_OF_CPUS = 32 }; } From da0dbd901c172de61bfaf85f4f26acfd74a193c3 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 7 Feb 2023 13:35:41 +0100 Subject: [PATCH 0295/1921] base: fix conversion error in Bitset_2::get() Ref genodelabs/genode#4753 --- repos/base/include/util/register.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/base/include/util/register.h b/repos/base/include/util/register.h index b528e2243f..32e9789b5e 100644 --- a/repos/base/include/util/register.h +++ b/repos/base/include/util/register.h @@ -276,7 +276,8 @@ struct Genode::Bitset_2 template static inline access_t get(T const reg) { - return Bits_0::get(reg) | (Bits_1::get(reg) << Bits_0::WIDTH); + return (access_t) + (Bits_0::get(reg) | (Bits_1::get(reg) << Bits_0::WIDTH)); } }; From 13453e3c68c9940be5a8db67bb2780a952c277ac Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 8 Feb 2023 08:50:11 +0100 Subject: [PATCH 0296/1921] hw: activate strict conversion checking in kernel Fix genodelabs/genode#4753 --- repos/base-hw/lib/mk/bootstrap-hw.inc | 2 -- .../lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc | 2 -- .../lib/mk/spec/cortex_a15/core-hw.inc | 2 -- .../base-hw/lib/mk/spec/cortex_a8/core-hw.inc | 2 -- .../base-hw/lib/mk/spec/cortex_a9/core-hw.inc | 2 -- repos/base-hw/src/core/kernel/thread.cc | 5 ++- repos/base-hw/src/core/kernel/timer.cc | 6 ++++ .../core/spec/arm/cortex_a9_global_timer.cc | 4 +-- repos/base-hw/src/core/spec/arm/imx_epit.cc | 11 ++++--- .../src/core/spec/arm/kernel/thread.cc | 3 +- .../spec/arm_v7/virtualization/hypervisor.h | 4 +-- repos/base-hw/src/core/spec/cortex_a15/cpu.h | 2 +- repos/base-hw/src/include/hw/spec/arm/lpae.h | 31 ++++++++++++++----- .../include/hw/spec/arm/usb_armory_board.h | 1 + 14 files changed, 47 insertions(+), 30 deletions(-) diff --git a/repos/base-hw/lib/mk/bootstrap-hw.inc b/repos/base-hw/lib/mk/bootstrap-hw.inc index e7f16a3b18..2283508362 100644 --- a/repos/base-hw/lib/mk/bootstrap-hw.inc +++ b/repos/base-hw/lib/mk/bootstrap-hw.inc @@ -34,5 +34,3 @@ vpath hw/% $(BASE_HW_DIR)/src/lib vpath lib/base/% $(BASE_HW_DIR)/src vpath lib/base/% $(BASE_DIR)/src vpath lib/startup/% $(BASE_DIR)/src - -CC_CXX_WARN_STRICT_CONVERSION = diff --git a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc index 0f421f9bee..a8d43e3e53 100644 --- a/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc +++ b/repos/base-hw/lib/mk/spec/arm_v7/core-hw-imx53_qsb.inc @@ -4,5 +4,3 @@ SRC_CC += spec/arm/imx_epit.cc SRC_CC += spec/arm/imx_tzic.cc include $(call select_from_repositories,lib/mk/spec/cortex_a8/core-hw.inc) - -CC_CXX_WARN_STRICT_CONVERSION = diff --git a/repos/base-hw/lib/mk/spec/cortex_a15/core-hw.inc b/repos/base-hw/lib/mk/spec/cortex_a15/core-hw.inc index 97daafd4de..0970d6bc43 100644 --- a/repos/base-hw/lib/mk/spec/cortex_a15/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/cortex_a15/core-hw.inc @@ -11,5 +11,3 @@ SRC_CC += spec/arm/kernel/lock.cc # include less specific configuration include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw.inc) - -CC_CXX_WARN_STRICT_CONVERSION = diff --git a/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc b/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc index 73faf7b9d9..3298df19c0 100644 --- a/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/cortex_a8/core-hw.inc @@ -10,5 +10,3 @@ SRC_CC += kernel/lock.cc # include less specific configuration include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw.inc) - -CC_CXX_WARN_STRICT_CONVERSION = diff --git a/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc b/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc index 44d451997d..6002a9f5b1 100644 --- a/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc +++ b/repos/base-hw/lib/mk/spec/cortex_a9/core-hw.inc @@ -15,5 +15,3 @@ SRC_CC += kernel/cpu_mp.cc # include less specific configuration include $(call select_from_repositories,lib/mk/spec/arm_v7/core-hw.inc) - -CC_CXX_WARN_STRICT_CONVERSION = diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index 13238320e1..46dc4dfa37 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -303,7 +303,10 @@ size_t Thread::_core_to_kernel_quota(size_t const quota) const { using Genode::Cpu_session; using Genode::sizet_arithm_t; - size_t const ticks = _cpu->timer().us_to_ticks(Kernel::cpu_quota_us); + + /* we assert at timer construction that cpu_quota_us in ticks fits size_t */ + size_t const ticks = (size_t) + _cpu->timer().us_to_ticks(Kernel::cpu_quota_us); return Cpu_session::quota_lim_downscale(quota, ticks); } diff --git a/repos/base-hw/src/core/kernel/timer.cc b/repos/base-hw/src/core/kernel/timer.cc index 910e6fafd4..9337aca95f 100644 --- a/repos/base-hw/src/core/kernel/timer.cc +++ b/repos/base-hw/src/core/kernel/timer.cc @@ -122,4 +122,10 @@ Timer::Timer(Cpu & cpu) * period). */ assert(ticks_to_us(_max_value()) > 2 * cpu_quota_us); + + /* + * Kernel::cpu_quota_us is used in ticks for quota calculations + * and must fit into its datatype, which is size_t not time_t + */ + assert(us_to_ticks(cpu_quota_us) < ~0UL); } diff --git a/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc index 909a78bd60..3f188d8d7c 100644 --- a/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc +++ b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc @@ -85,8 +85,8 @@ void Timer::_start_one_shot(time_t const ticks) _device.write(0); time_t end_ticks = _device.current_ticks() + ticks; - _device.write(end_ticks & 0xFFFFFFFF, 0); - _device.write(end_ticks >> 32 , 1); + _device.write((uint32_t)end_ticks, 0); + _device.write((uint32_t)(end_ticks >> 32) , 1); /* Enable comparator before setting a new value */ _device.write(1); diff --git a/repos/base-hw/src/core/spec/arm/imx_epit.cc b/repos/base-hw/src/core/spec/arm/imx_epit.cc index e226969be8..aa651394b1 100644 --- a/repos/base-hw/src/core/spec/arm/imx_epit.cc +++ b/repos/base-hw/src/core/spec/arm/imx_epit.cc @@ -54,7 +54,9 @@ void Timer::_start_one_shot(time_t const ticks) * otherwise if the tick is small enough, we loose an interrupt */ _device.write(1); - _device.write(ticks - 1); + + /* maximal ticks are guaranteed via _max_value */ + _device.write((uint32_t)(ticks - 1)); } @@ -73,9 +75,8 @@ time_t Timer::_max_value() const { time_t Timer::_duration() const { using Device = Board::Timer; - Device::Cnt::access_t last = _last_timeout_duration; + Device::Cnt::access_t last = (Device::Cnt::access_t) _last_timeout_duration; Device::Cnt::access_t cnt = _device.read(); - Device::Cnt::access_t ret = (_device.read()) - ? _max_value() - cnt + last : last - cnt; - return ret; + return (_device.read()) ? _max_value() - cnt + last + : last - cnt; } diff --git a/repos/base-hw/src/core/spec/arm/kernel/thread.cc b/repos/base-hw/src/core/spec/arm/kernel/thread.cc index 838a730c79..1453d8a497 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/thread.cc @@ -78,7 +78,8 @@ void Thread::proceed(Cpu & cpu) void Thread::user_ret_time(Kernel::time_t const t) { - regs->r0 = t >> 32UL; + /* split 64-bit time_t value into 2 register */ + regs->r0 = (addr_t) (t >> 32UL); regs->r1 = t & ~0UL; } diff --git a/repos/base-hw/src/core/spec/arm_v7/virtualization/hypervisor.h b/repos/base-hw/src/core/spec/arm_v7/virtualization/hypervisor.h index d9935902d6..0be63044db 100644 --- a/repos/base-hw/src/core/spec/arm_v7/virtualization/hypervisor.h +++ b/repos/base-hw/src/core/spec/arm_v7/virtualization/hypervisor.h @@ -38,8 +38,8 @@ namespace Hypervisor { inline void invalidate_tlb(Genode::uint64_t vttbr) { hypervisor_call(TLB_INVALIDATE, - (vttbr & 0xffffffff), - ((vttbr >> 32U) & 0xffffffff)); + (Call_arg)vttbr, + (Call_arg)(vttbr >> 32U)); } diff --git a/repos/base-hw/src/core/spec/cortex_a15/cpu.h b/repos/base-hw/src/core/spec/cortex_a15/cpu.h index ca1a447ec2..fe49dd58b9 100644 --- a/repos/base-hw/src/core/spec/cortex_a15/cpu.h +++ b/repos/base-hw/src/core/spec/cortex_a15/cpu.h @@ -103,7 +103,7 @@ class Genode::Cpu : public Arm_v7_cpu Genode::uint8_t id() const { - return Ttbr_64bit::Asid::get(ttbr0); + return (uint8_t)Ttbr_64bit::Asid::get(ttbr0); } }; diff --git a/repos/base-hw/src/include/hw/spec/arm/lpae.h b/repos/base-hw/src/include/hw/spec/arm/lpae.h index d898e37404..0ea415d3c7 100644 --- a/repos/base-hw/src/include/hw/spec/arm/lpae.h +++ b/repos/base-hw/src/include/hw/spec/arm/lpae.h @@ -387,7 +387,8 @@ class Hw::Level_3_translation_table : using Block_descriptor = typename Stage_trait::Type; if (!Descriptor::valid(desc)) return; - phys = Block_descriptor::Output_address::masked(desc); + phys = + (addr_t)Block_descriptor::Output_address::masked(desc); typename Block_descriptor::access_t ap = Block_descriptor::Access_permission::get(desc); found = ap == Block_descriptor::Access_permission::PRIVILEGED_RW || @@ -477,8 +478,13 @@ class Hw::Level_x_translation_table : [[fallthrough]]; case Descriptor::TABLE: /* table already available */ { - /* use allocator to retrieve virt address of table */ - E & table = alloc.virt_addr(Nt::masked(desc)); + /** + * Use allocator to retrieve virt address of table + * (we do not have physical memory above 4G on 32bit + * yet, therefore we can downcast here) + */ + E & table = + alloc.virt_addr((addr_t)Nt::masked(desc)); table.insert_translation(vo - (vo & Base::BLOCK_MASK), pa, size, flags, alloc); break; @@ -510,8 +516,12 @@ class Hw::Level_x_translation_table : switch (Descriptor::type(desc)) { case Descriptor::TABLE: { - /* use allocator to retrieve virt address of table */ - E & table = alloc.virt_addr(Nt::masked(desc)); + /** + * Use allocator to retrieve virt address of table + * (we do not have physical memory above 4G on 32bit + * yet, therefore we can downcast here) + */ + E & table = alloc.virt_addr((addr_t)Nt::masked(desc)); table.remove_translation(vo - (vo & Base::BLOCK_MASK), size, alloc); if (!table.empty()) break; @@ -544,7 +554,8 @@ class Hw::Level_x_translation_table : switch (Descriptor::type(desc)) { case Descriptor::BLOCK: { - phys = Block_descriptor::Output_address::masked(desc); + /* downcast: no phys memory above 4G on 32bit yet */ + phys = (addr_t)Block_descriptor::Output_address::masked(desc); typename Block_descriptor::access_t ap = Block_descriptor::Access_permission::get(desc); found = ap == Block_descriptor::Access_permission::PRIVILEGED_RW || @@ -553,8 +564,12 @@ class Hw::Level_x_translation_table : }; case Descriptor::TABLE: { - /* use allocator to retrieve virt address of table */ - E & table = alloc.virt_addr(Nt::masked(desc)); + /* + * Use allocator to retrieve virt address of table + * (we do not have physical memory above 4G on 32bit + * yet, therefore we can downcast here) + */ + E & table = alloc.virt_addr((addr_t)Nt::masked(desc)); found = table.lookup_rw_translation(vo - (vo & Base::BLOCK_MASK), phys, alloc); return; diff --git a/repos/base-hw/src/include/hw/spec/arm/usb_armory_board.h b/repos/base-hw/src/include/hw/spec/arm/usb_armory_board.h index 7ccd8e0adb..a321e8a62f 100644 --- a/repos/base-hw/src/include/hw/spec/arm/usb_armory_board.h +++ b/repos/base-hw/src/include/hw/spec/arm/usb_armory_board.h @@ -27,6 +27,7 @@ namespace Hw::Usb_armory_board { enum { UART_BASE = UART_1_MMIO_BASE, UART_CLOCK = 0, /* ignored value */ + NR_OF_CPUS = 1, }; } From 3260c86d15d8ef046a8fea50be2937582049750c Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 16 Dec 2022 17:51:55 +0100 Subject: [PATCH 0297/1921] gpu_session: VRAM interface Change the abstraction from buffers to video RAM (VRAM). The notion of buffers can be provided at the client side (e.g., Mesa) and multiple buffers can be there be associated to one VRAM area, thus saving resources (meta data overhead) when allocating many buffers. A VRAM area can also be mapped to one single buffer as before for clients or drivers that do not take advantage of this feature. issue #4713 --- repos/os/include/gpu_session/client.h | 47 +++--- repos/os/include/gpu_session/gpu_session.h | 186 +++++++++++---------- 2 files changed, 117 insertions(+), 116 deletions(-) diff --git a/repos/os/include/gpu_session/client.h b/repos/os/include/gpu_session/client.h index 24491bdefa..db9cd2e843 100644 --- a/repos/os/include/gpu_session/client.h +++ b/repos/os/include/gpu_session/client.h @@ -40,47 +40,42 @@ class Gpu::Session_client : public Genode::Rpc_client Genode::Dataspace_capability info_dataspace() const override { return call(); } - Gpu::Sequence_number exec_buffer(Buffer_id id, - Genode::size_t size) override { - return call(id, size); } - bool complete(Sequence_number seqno) override { return call(seqno); } void completion_sigh(Genode::Signal_context_capability sigh) override { call(sigh); } - Genode::Dataspace_capability alloc_buffer(Buffer_id id, Genode::size_t size) override { - return call(id, size); } + Gpu::Sequence_number execute(Vram_id id, Genode::off_t offset) override { + return call(id, offset); } - void free_buffer(Gpu::Buffer_id id) override { - call(id); } + Genode::Dataspace_capability alloc_vram(Vram_id id, Genode::size_t size) override { + return call(id, size); } - Gpu::Buffer_capability export_buffer(Buffer_id id) override { - return call(id); } + void free_vram(Vram_id id) override { + call(id); } - void import_buffer(Buffer_capability cap, Buffer_id id) override { - call(cap, id); } + Vram_capability export_vram(Vram_id id) override { + return call(id); } - Genode::Dataspace_capability map_buffer(Buffer_id id, - bool aperture, - Mapping_attributes attrs) override { - return call(id, aperture, attrs); } + void import_vram(Vram_capability cap, Vram_id id) override { + call(cap, id); } - void unmap_buffer(Buffer_id id) override { - call(id); } + Genode::Dataspace_capability map_cpu(Vram_id id, Mapping_attributes attrs) override { + return call(id, attrs); } - bool map_buffer_ppgtt(Buffer_id id, Gpu::addr_t va) override { - return call(id, va); } + void unmap_cpu(Vram_id id) override { + call(id); } - void unmap_buffer_ppgtt(Buffer_id id, Gpu::addr_t va) override { - call(id, va); } + bool map_gpu(Vram_id id, Genode::size_t size, + Genode::off_t offset, Virtual_address va) override { + return call(id, size, offset, va); } - Gpu::addr_t query_buffer_ppgtt(Gpu::Buffer_id id) override { - return call(id); } + void unmap_gpu(Vram_id id, Genode::off_t offset, Virtual_address va) override { + call(id, offset, va); } - bool set_tiling(Buffer_id id, unsigned mode) override { - return call(id, mode); } + bool set_tiling_gpu(Vram_id id, Genode::off_t offset, unsigned mode) override { + return call(id, offset, mode); } }; #endif /* _INCLUDE__GPU_SESSION__CLIENT_H_ */ diff --git a/repos/os/include/gpu_session/gpu_session.h b/repos/os/include/gpu_session/gpu_session.h index 6fcc1f9b9d..28c64fc0da 100644 --- a/repos/os/include/gpu_session/gpu_session.h +++ b/repos/os/include/gpu_session/gpu_session.h @@ -1,11 +1,12 @@ /* * \brief Gpu session interface. * \author Josef Soentgen + * \author Sebastian Sumpf * \date 2017-04-28 */ /* - * Copyright (C) 2017-2021 Genode Labs GmbH + * Copyright (C) 2017-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -21,9 +22,10 @@ namespace Gpu { using addr_t = Genode::uint64_t; - struct Buffer; - using Buffer_id = Genode::Id_space::Id; - using Buffer_capability = Genode::Capability; + struct Vram; + using Vram_id_space = Genode::Id_space; + using Vram_id = Vram_id_space::Id; + using Vram_capability = Genode::Capability; /* * Attributes for mapping a buffer @@ -51,6 +53,7 @@ namespace Gpu { struct Sequence_number; struct Session; + struct Virtual_address; } /* @@ -62,16 +65,23 @@ struct Gpu::Sequence_number }; +struct Gpu::Virtual_address +{ + Genode::uint64_t va; +}; + + + /* * Gpu session interface */ struct Gpu::Session : public Genode::Session { - struct Out_of_ram : Genode::Exception { }; - struct Out_of_caps : Genode::Exception { }; - struct Invalid_state : Genode::Exception { }; - struct Conflicting_id : Genode::Exception { }; - struct Mapping_buffer_failed : Genode::Exception { }; + struct Out_of_ram : Genode::Exception { }; + struct Out_of_caps : Genode::Exception { }; + struct Invalid_state : Genode::Exception { }; + struct Conflicting_id : Genode::Exception { }; + struct Mapping_vram_failed : Genode::Exception { }; enum { REQUIRED_QUOTA = 1024 * 1024, CAP_QUOTA = 32, }; @@ -89,23 +99,23 @@ struct Gpu::Session : public Genode::Session virtual Genode::Dataspace_capability info_dataspace() const = 0; /** - * Execute commands from given buffer + * Execute commands in vram * - * \param id buffer id - * \param size size of the batch buffer in bytes + * \param id vram id + * \param offset offset in vram to start execution * - * \return execution buffer sequence number for complete checks + * \return execution sequence number for complete checks * - * \throw Invalid_state is thrown if the provided buffer is not valid, e.g not mapped + * \throw Invalid_state is thrown if the provided vram is not valid, e.g not mapped */ - virtual Gpu::Sequence_number exec_buffer(Buffer_id id, Genode::size_t size) = 0; + virtual Gpu::Sequence_number execute(Vram_id id, Genode::off_t offset) = 0; /** - * Check if execution buffer has been completed + * Check if execution has been completed * - * \param seqno sequence number of the execution buffer + * \param seqno sequence number of the execution * - * \return true if execution buffer has been finished, otherwise + * \return true if execution has been finished, otherwise * false is returned */ virtual bool complete(Sequence_number seqno) = 0; @@ -119,141 +129,137 @@ struct Gpu::Session : public Genode::Session virtual void completion_sigh(Genode::Signal_context_capability sigh) = 0; /** - * Allocate buffer dataspace + * Allocate video ram * - * \param id buffer id to be associated with the buffer - * \param size size of buffer in bytes + * \param id id to be associated with the vram + * \param size size of memory in bytes * * \throw Out_of_ram * \throw Out_of_caps * \throw Conflicting_id */ - virtual Genode::Dataspace_capability alloc_buffer(Buffer_id id, Genode::size_t size) = 0; + virtual Genode::Dataspace_capability alloc_vram(Vram_id id, Genode::size_t size) = 0; /** - * Free buffer dataspace + * Free vram * - * \param ds dataspace capability for buffer + * \param id id of vram */ - virtual void free_buffer(Buffer_id id) = 0; + virtual void free_vram(Vram_id id) = 0; /** - * Export buffer dataspace from GPU session + * Export vram dataspace from GPU session * - * \param id buffer id of associated buffer + * \param id id of associated vram + * + * \return cability of exported vram */ - virtual Buffer_capability export_buffer(Buffer_id id) = 0; + virtual Vram_capability export_vram(Vram_id id) = 0; /** - * Import buffer dataspace to GPU session + * Import vram to GPU session * - * \param cap capability of buffer as retrieved bu 'export_buffer' - * \param id buffer id to be associated to this buffer in the session + * \param cap capability of vram as retrieved by 'exportvram' + * \param id vram id to be associated to this vram in the session * * \throw Conflicting_id * \throw Out_of_caps * \throw Out_of_ram * \throw Invalid_state (cap is no longer valid) */ - virtual void import_buffer(Buffer_capability cap, Buffer_id id) = 0; + virtual void import_vram(Vram_capability cap, Vram_id id) = 0; /** - * Map buffer + * Map vram at CPU * - * \param id buffer id - * \param aperture if true create CPU accessible mapping through - * GGTT window, otherwise create PPGTT mapping + * \param id id of vram * \param attrs specify how the buffer is mapped * - * \throw Mapping_buffer_failed + * \throw Mapping_vram_failed * \throw Out_of_caps * \throw Out_of_ram */ - virtual Genode::Dataspace_capability map_buffer(Buffer_id id, - bool aperture, - Mapping_attributes attrs) = 0; + virtual Genode::Dataspace_capability map_cpu(Vram_id id, Mapping_attributes attrs) = 0; /** - * Unmap buffer + * Unmap vram * - * \param id buffer id + * \param id id of vram */ - virtual void unmap_buffer(Buffer_id id) = 0; + virtual void unmap_cpu(Vram_id id) = 0; /** - * Map buffer in PPGTT + * Map vram at GPU * - * \param id buffer id - * \param va virtual address + * \param id vram id + * \param size size of vram to be mapped + * \pram offset offset in vram + * \param va GPU virtual address * - * \throw Mapping_buffer_failed + * \return true on success, false otherwise + + * \throw Mapping_vram_failed * \throw Out_of_caps * \throw Out_of_ram */ - virtual bool map_buffer_ppgtt(Buffer_id id, Gpu::addr_t va) = 0; + virtual bool map_gpu(Vram_id id, Genode::size_t size, + Genode::off_t offset, + Virtual_address va) = 0; /** - * Unmap buffer + * Unmap vram on GPU * - * \param id buffer id + * \param id vram id + * \param offset offset in vram + * \param va GPU virtual address */ - virtual void unmap_buffer_ppgtt(Buffer_id id, Gpu::addr_t va) = 0; + virtual void unmap_gpu(Vram_id id, Genode::off_t offset, + Virtual_address va) = 0; /** - * Get virtual address of buffer in the PPGTT + * Set tiling for vram on GPU * - * \param id buffer id to be associated with the buffer + * \param id vram id + * \param offset offset in vram + * \param mode tiling mode */ - virtual Gpu::addr_t query_buffer_ppgtt(Buffer_id) = 0; - - /** - * Set tiling for buffer - * - * \param id buffer id - * \param mode tiling mode - */ - virtual bool set_tiling(Buffer_id id, unsigned mode) = 0; + virtual bool set_tiling_gpu(Vram_id id, Genode::off_t offset, unsigned mode) = 0; /******************* ** RPC interface ** *******************/ GENODE_RPC(Rpc_info_dataspace, Genode::Dataspace_capability, info_dataspace); - GENODE_RPC_THROW(Rpc_exec_buffer, Gpu::Sequence_number, exec_buffer, - GENODE_TYPE_LIST(Invalid_state), - Gpu::Buffer_id, Genode::size_t); GENODE_RPC(Rpc_complete, bool, complete, Gpu::Sequence_number); GENODE_RPC(Rpc_completion_sigh, void, completion_sigh, Genode::Signal_context_capability); - GENODE_RPC_THROW(Rpc_alloc_buffer, Genode::Dataspace_capability, alloc_buffer, + GENODE_RPC_THROW(Rpc_execute, Gpu::Sequence_number, execute, + GENODE_TYPE_LIST(Invalid_state), + Gpu::Vram_id, Genode::off_t); + GENODE_RPC_THROW(Rpc_alloc_vram, Genode::Dataspace_capability, alloc_vram, GENODE_TYPE_LIST(Out_of_caps, Out_of_ram), - Gpu::Buffer_id, Genode::size_t); - GENODE_RPC(Rpc_free_buffer, void, free_buffer, Gpu::Buffer_id); - GENODE_RPC(Rpc_export_buffer, Gpu::Buffer_capability, export_buffer, Gpu::Buffer_id); - GENODE_RPC_THROW(Rpc_import_buffer, void, import_buffer, + Gpu::Vram_id, Genode::size_t); + GENODE_RPC(Rpc_free_vram, void, free_vram, Gpu::Vram_id); + GENODE_RPC(Rpc_export_vram, Gpu::Vram_capability, export_vram, Gpu::Vram_id); + GENODE_RPC_THROW(Rpc_import_vram, void, import_vram, GENODE_TYPE_LIST(Out_of_caps, Out_of_ram, Conflicting_id, Invalid_state), - Gpu::Buffer_capability, Gpu::Buffer_id); - GENODE_RPC_THROW(Rpc_map_buffer, Genode::Dataspace_capability, map_buffer, - GENODE_TYPE_LIST(Mapping_buffer_failed, Out_of_caps, Out_of_ram), - Gpu::Buffer_id, bool, Gpu::Mapping_attributes); - GENODE_RPC(Rpc_unmap_buffer, void, unmap_buffer, - Gpu::Buffer_id); - GENODE_RPC_THROW(Rpc_map_buffer_ppgtt, bool, map_buffer_ppgtt, - GENODE_TYPE_LIST(Mapping_buffer_failed, Out_of_caps, Out_of_ram), - Gpu::Buffer_id, Gpu::addr_t); - GENODE_RPC(Rpc_unmap_buffer_ppgtt, void, unmap_buffer_ppgtt, - Gpu::Buffer_id, Gpu::addr_t); - GENODE_RPC(Rpc_query_buffer_ppgtt, Gpu::addr_t, query_buffer_ppgtt, Gpu::Buffer_id); - GENODE_RPC(Rpc_set_tiling, bool, set_tiling, - Gpu::Buffer_id, unsigned); + Gpu::Vram_capability, Gpu::Vram_id); + GENODE_RPC_THROW(Rpc_map_cpu, Genode::Dataspace_capability, map_cpu, + GENODE_TYPE_LIST(Mapping_vram_failed, Out_of_caps, Out_of_ram), + Gpu::Vram_id, Gpu::Mapping_attributes); + GENODE_RPC(Rpc_unmap_cpu, void, unmap_cpu, + Gpu::Vram_id); + GENODE_RPC_THROW(Rpc_map_gpu, bool, map_gpu, + GENODE_TYPE_LIST(Mapping_vram_failed, Out_of_caps, Out_of_ram), + Gpu::Vram_id, Genode::size_t, Genode::off_t, Gpu::Virtual_address); + GENODE_RPC(Rpc_unmap_gpu, void, unmap_gpu, + Gpu::Vram_id, Genode::off_t, Gpu::Virtual_address); + GENODE_RPC(Rpc_set_tiling_gpu, bool, set_tiling_gpu, Gpu::Vram_id, Genode::off_t, unsigned); - GENODE_RPC_INTERFACE(Rpc_info_dataspace, Rpc_exec_buffer, - Rpc_complete, Rpc_completion_sigh, Rpc_alloc_buffer, - Rpc_free_buffer, Rpc_export_buffer, Rpc_import_buffer, - Rpc_map_buffer, Rpc_unmap_buffer, - Rpc_map_buffer_ppgtt, Rpc_unmap_buffer_ppgtt, Rpc_query_buffer_ppgtt, - Rpc_set_tiling); + GENODE_RPC_INTERFACE(Rpc_info_dataspace, Rpc_complete, Rpc_completion_sigh, Rpc_execute, + Rpc_alloc_vram, Rpc_free_vram, Rpc_export_vram, Rpc_import_vram, + Rpc_map_cpu, Rpc_unmap_cpu, Rpc_map_gpu, Rpc_unmap_gpu, Rpc_set_tiling_gpu); }; #endif /* _INCLUDE__GPU_SESSION__GPU_SESSION_H_ */ From 23b87929f5e4183c623707f414773784136d5a0f Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 16 Dec 2022 20:41:27 +0100 Subject: [PATCH 0298/1921] libdrm/iris: remove unsused functions * 'map_buffer', GTT mappings are currently not used by Iris * 'set_tiling', tiling is currently not used by Iris because there are no GTT mappings issue #4713 --- repos/libports/src/lib/libdrm/ioctl_iris.cc | 123 ++------------------ 1 file changed, 7 insertions(+), 116 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_iris.cc b/repos/libports/src/lib/libdrm/ioctl_iris.cc index 69f20325f8..4a496528c1 100644 --- a/repos/libports/src/lib/libdrm/ioctl_iris.cc +++ b/repos/libports/src/lib/libdrm/ioctl_iris.cc @@ -188,40 +188,6 @@ struct Gpu::Buffer Constructible buffer_attached { }; - Genode::Dataspace_capability map_cap { }; - Offset map_offset { 0 }; - - struct Tiling - { - bool _valid; - uint32_t mode; - uint32_t stride; - uint32_t swizzle; - - Tiling(uint32_t mode, uint32_t stride, uint32_t swizzle) - : - _valid { true }, - mode { mode }, - stride { stride }, - swizzle { swizzle } - { } - - Tiling() - : - _valid { false }, mode { 0 }, stride { 0 }, swizzle { 0 } - { } - - bool valid() const { return _valid; } - }; - - Tiling tiling { }; - - Gpu_virtual_address gpu_vaddr { }; - Gpu::Sequence_number seqno { }; - - bool gpu_vaddr_valid { false }; - bool busy { false }; - Buffer(Gpu::Connection &gpu, Genode::size_t size, Genode::Id_space &space) @@ -583,57 +549,6 @@ class Drm_call Genode::Id_space _sync_objects { }; - Offset _map_buffer(Buffer &b) - { - Offset offset = 0; - - if (b.map_cap.valid()) { - offset = b.map_offset; - return offset; - } - - _gpu_op([&] () { - b.map_cap = _gpu_session.map_buffer(b.id(), true, Gpu::Mapping_attributes::rw()); - }); - - // XXX attach might faile - b.map_offset = static_cast(_env.rm().attach(b.map_cap)); - offset = b.map_offset; - - _available_gtt_size -= b.size; - - return offset; - } - - Offset _map_buffer(Gpu::Buffer_id const id) - { - Offset offset = 0; - try { - _buffer_space.apply(id, [&] (Buffer &b) { - offset = _map_buffer(b); - }); - } catch (Genode::Id_space::Unknown_id) { - Genode::error(__func__, ": invalid handle ", id.value); - Genode::sleep_forever(); - } - return offset; - } - - void _unmap_buffer(Buffer &buffer) - { - if (!buffer.map_cap.valid()) - return; - - _env.rm().detach(buffer.map_offset); - buffer.map_offset = 0; - - _gpu_session.unmap_buffer(buffer.id()); - - buffer.map_cap = Genode::Dataspace_capability(); - - _available_gtt_size += buffer.size; - } - template void _alloc_buffer(uint64_t const size, FUNC const &fn) { @@ -653,9 +568,6 @@ class Drm_call try { _buffer_space.apply(id, [&] (Buffer &b) { - /* callee checks for mappings */ - _unmap_buffer(b); - _context_space.for_each([&] (Drm::Context &context) { context.free_buffer(b.id()); }); Genode::destroy(&_heap, &b); @@ -903,33 +815,15 @@ class Drm_call int _device_gem_set_tiling(void *arg) { - auto const p = reinterpret_cast(arg); - Gpu::Buffer_id const id { .value = p->handle }; - uint32_t const mode = p->tiling_mode; - uint32_t const stride = p->stride; - uint32_t const swizzle = p->swizzle_mode; + auto const p = reinterpret_cast(arg); + uint32_t const mode = p->tiling_mode; - if (verbose_ioctl) { - Genode::error(__func__, ": ", - "handle: ", id.value, " " - "mode: ", mode, " " - "stride: ", stride , " " - "swizzle: ", swizzle); + if (mode != I915_TILING_NONE) { + Genode::error(__func__, " mode != I915_TILING_NONE (", mode, ") unsupported"); + return 0; } - bool ok = false; - try { - _buffer_space.apply(id, [&] (Buffer &b) { - - b.tiling = Gpu::Buffer::Tiling(mode, stride, swizzle); - ok = true; - - }); - } catch (Genode::Id_space::Unknown_id) { - Genode::error(__func__, ": invalid handle: ", id.value); - } - - return ok ? 0 : -1; + return 0; } int _device_gem_sw_finish(void *) @@ -1007,7 +901,7 @@ class Drm_call try { _buffer_space.apply(id, [&](Buffer const &b) { - p->busy = b.busy; + p->busy = false; }); return 0; } catch (Genode::Id_space::Unknown_id) { @@ -1340,9 +1234,6 @@ class Drm_call return; } - if (b.map_cap.valid()) - _unmap_buffer(b); - b.buffer_attached.destruct(); found = true; }); From f72cb2b69b2af900ef54a6a82a0e4d452db61018 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Sun, 18 Dec 2022 16:49:28 +0100 Subject: [PATCH 0299/1921] ibdrm/iris: add VRAM support Allocate 16MB or larger chunks and implement buffer abstraction for Iris which possible share VRAM. issue #4713 --- repos/libports/src/lib/libdrm/ioctl_iris.cc | 382 ++++++++++++++------ 1 file changed, 273 insertions(+), 109 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_iris.cc b/repos/libports/src/lib/libdrm/ioctl_iris.cc index 4a496528c1..1b84350fe1 100644 --- a/repos/libports/src/lib/libdrm/ioctl_iris.cc +++ b/repos/libports/src/lib/libdrm/ioctl_iris.cc @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -47,15 +48,26 @@ using Genode::Constructible; namespace Drm { + using namespace Gpu; + struct Call; struct Context; + struct Buffer; + + using Buffer_id = Genode::Id_space::Id; + using Buffer_space = Genode::Id_space; } enum { verbose_ioctl = false }; namespace Utils { - uint64_t limit_to_48bit(uint64_t addr) { - return addr & ((1ULL << 48) - 1); } + Gpu::Virtual_address limit_to_48bit(Gpu::Virtual_address addr) { + return Gpu::Virtual_address { addr.va & ((1ULL << 48) - 1) }; } +} + +namespace Gpu +{ + struct Vram_allocator; } @@ -169,78 +181,180 @@ static void dump_ioctl(unsigned long request) namespace { using Offset = unsigned long; - - struct Gpu_virtual_address { - uint64_t addr; - }; - } /* anonymous namespace */ -struct Gpu::Buffer +/* + * GPU graphics memory + */ +struct Gpu::Vram { - Gpu::Connection &_gpu; + Gpu::Vram_id_space::Element const _elem; + Genode::Dataspace_capability const _cap; + Genode::Allocator_avl _alloc; - Genode::Id_space::Element const _elem; + Vram(Gpu::Connection &gpu, + Genode::Allocator &md_alloc, + Gpu::Vram_id_space &space, + Genode::size_t size) + : _elem(*this, space), + _cap(gpu.alloc_vram(_elem.id(), size)), + _alloc(&md_alloc) + { + _alloc.add_range(0, Genode::Dataspace_client(_cap).size()); + } - Genode::Dataspace_capability const cap; - Genode::size_t const size; + struct Allocation + { + Gpu::Vram_id id; + Genode::Dataspace_capability cap; + Genode::off_t offset; + Genode::size_t size { 0 }; - Constructible buffer_attached { }; + bool valid() const { return size > 0; } + }; - Buffer(Gpu::Connection &gpu, - Genode::size_t size, - Genode::Id_space &space) - : - _gpu { gpu }, - _elem { *this, space }, - cap { _gpu.alloc_buffer(_elem.id(), size) }, - size { Genode::Dataspace_client(cap).size() } + Allocation alloc(Genode::size_t size) + { + return _alloc.alloc_aligned(size, 12).convert( + [&] (void *offset) { + return Allocation { _elem.id(), _cap, Genode::off_t(offset), size }; + }, + [&] (Genode::Allocator::Alloc_error err) -> Allocation { + return Allocation(); + }); + } + + void free(Allocation &allocation) { _alloc.free((void *)allocation.offset); }; +}; + + +struct Gpu::Vram_allocator +{ + enum { VRAM_BLOCK_SIZE = 16*1024*1024 }; + Gpu::Connection &_gpu; + Genode::Allocator &_md_alloc; + Gpu::Vram_id_space _vram_space { }; + + Vram_allocator(Gpu::Connection &gpu, Genode::Allocator &md_alloc) + : _gpu(gpu), _md_alloc(md_alloc) { } - virtual ~Buffer() + Vram::Allocation alloc(Genode::size_t size) { - _gpu.free_buffer(_elem.id()); + Vram::Allocation allocation { }; + + if (size <= VRAM_BLOCK_SIZE) + _vram_space.for_each([&] (Vram &vram) { + if (allocation.valid()) return; + allocation = vram.alloc(size); + }); + + if (allocation.valid()) return allocation; + + /* alloc more Vram from session */ + Vram *vram = new (_md_alloc) Vram(_gpu, _md_alloc, _vram_space, + size <= VRAM_BLOCK_SIZE ? VRAM_BLOCK_SIZE : size); + return vram->alloc(size); } - bool mmap(Genode::Env &env) + void free(Vram::Allocation &allocation) { - if (!buffer_attached.constructed()) - buffer_attached.construct(env.rm(), cap); + if (allocation.valid() == false) return; - return buffer_attached.constructed(); - } - - addr_t mmap_addr() { - return reinterpret_cast(buffer_attached->local_addr()); - } - - Gpu::Buffer_id id() const - { - return _elem.id(); + try { + _vram_space.apply(allocation.id, [&](Vram &vram) { + vram.free(allocation); + }); + } catch (Gpu::Vram_id_space::Unknown_id) { + Genode::error(__func__, ": id ", allocation.id, " invalid"); + } } }; +/* + * Buffer object abstraction for Mesa/Iris + */ +struct Drm::Buffer +{ + Genode::Env &_env; + Genode::Id_space::Element const _elem; + + Vram::Allocation _allocation; + Gpu::addr_t _local_addr { 0 }; + + Buffer(Genode::Env &env, + Genode::Id_space &space, + Vram::Allocation allocation) + : + _env { env }, _elem { *this, space }, _allocation { allocation } + { } + + ~Buffer() + { + unmap(); + } + + bool mmap(Genode::Env &env) + { + if (_local_addr) return true; + + _local_addr = Gpu::addr_t(env.rm().attach(_allocation.cap, _allocation.size, + _allocation.offset)); + return true; + } + + void unmap() + { + if (_local_addr) + _env.rm().detach((void *)_local_addr); + + _local_addr = 0; + } + + Gpu::addr_t mmap_addr() const { return _local_addr; } + + Vram::Allocation &vram() { return _allocation; } + + Drm::Buffer_id id() const + { + return Drm::Buffer_id { _elem.id().value }; + } +}; + + +/* + * Used to implement OpenGL contexts. Each context uses a dedictated GPU + * session which provides a separate GPU context (e.g., page tables, exec + * lists, ...) within the intel_gpu_drv. + */ struct Drm::Context { + /* + * A context has to make sure a buffer is mapped in it's address space (i.e., + * it's GPU page tables = PPGTT), a buffer is executed within this GPU + * context. + */ struct Buffer { using Id_space = Genode::Id_space; Id_space::Element const elem; - Gpu_virtual_address gpu_vaddr { }; + Vram::Allocation vram; + Gpu::Virtual_address gpu_vaddr { }; Gpu::Sequence_number seqno { }; bool gpu_vaddr_valid { false }; bool busy { false }; - Buffer(Id_space &space, Gpu::Buffer_id id) - : elem(*this, space, Id_space::Id { .value = id.value }) + Buffer(Id_space &space, Id_space::Id id, Vram::Allocation vram) + : elem(*this, space, id), + vram(vram) { } - Gpu::Buffer_id buffer_id() const + Gpu::Vram_id vram_id() const { - return Gpu::Buffer_id { .value = elem.id().value }; + return Gpu::Vram_id { .value = elem.id().value }; } Id_space::Id id() const @@ -252,6 +366,7 @@ struct Drm::Context Gpu::Connection &_gpu; Gpu::Connection &_gpu_master; Genode::Allocator &_alloc; + Drm::Buffer_space &_drm_buffer_space; Gpu::Info_intel const &_gpu_info { *_gpu.attached_info() }; @@ -263,6 +378,15 @@ struct Drm::Context Genode::Id_space _buffer_space { }; + struct Vram_map : Genode::Dictionary::Element + { + Vram_map(Genode::Dictionary &dict, + Gpu::Vram_id const &id) + : Genode::Dictionary::Element(dict, id.value) { } + }; + + Genode::Dictionary _vram_map { }; + void _wait_for_completion(Gpu::Sequence_number seqno) { while (true) { @@ -307,13 +431,16 @@ struct Drm::Context } } - void _map_buffer_ppgtt(Buffer &buffer, Gpu_virtual_address vaddr) + void _map_buffer_gpu(Buffer &buffer, Gpu::Virtual_address vaddr) { Genode::retry( [&]() { Genode::retry( [&] () { - _gpu.map_buffer_ppgtt(buffer.buffer_id(), Utils::limit_to_48bit(vaddr.addr)); + _gpu.map_gpu(buffer.vram.id, + buffer.vram.size, + buffer.vram.offset, + Utils::limit_to_48bit(vaddr)); buffer.gpu_vaddr = vaddr; buffer.gpu_vaddr_valid = true; }, @@ -326,21 +453,63 @@ struct Drm::Context }); } - void _unmap_buffer_ppgtt(Buffer &buffer) + void _unmap_buffer_gpu(Buffer &buffer) { if (!buffer.gpu_vaddr_valid) return; - _gpu.unmap_buffer_ppgtt(buffer.buffer_id(), buffer.gpu_vaddr.addr); + _gpu.unmap_gpu(buffer.vram.id, + buffer.vram.offset, + buffer.gpu_vaddr); buffer.gpu_vaddr_valid = false; } + void _import_vram(Gpu::Vram_id id) + { + if (_vram_map.exists(id.value)) return; + + Gpu::Vram_capability cap = _gpu_master.export_vram(id); + + Genode::retry( + [&]() { + Genode::retry( + [&] () { + _gpu.import_vram(cap, id); + new (_alloc) Vram_map(_vram_map, id); + }, + [&] () { + _gpu.upgrade_caps(2); + }); + }, + [&] () { + _gpu.upgrade_ram(1024*1024); + }); + } + + void _import_buffer(Buffer::Id_space::Id id, Drm::Buffer &buffer) + { + /* import Vram if not present in this GPU connection */ + _import_vram(buffer.vram().id); + + new (_alloc) Buffer(_buffer_space, id, buffer.vram()); + } + Context(Gpu::Connection &gpu, Gpu::Connection &gpu_master, Genode::Allocator &alloc, int fd, - Genode::Id_space &space) + Genode::Id_space &space, + Drm::Buffer_space &drm_buffer_space) : - _gpu(gpu), _gpu_master(gpu_master), _alloc(alloc), _fd(fd), - _elem (*this, space) { } + _gpu(gpu), _gpu_master(gpu_master), _alloc(alloc), + _drm_buffer_space(drm_buffer_space), _fd(fd), _elem (*this, space) + { } + + ~Context() + { + while (_vram_map.with_any_element([&] (Vram_map &map) { + _gpu.free_vram(Gpu::Vram_id { .value = map.name });; + destroy(_alloc, &map); + })) { } + } unsigned long id() const { @@ -354,52 +523,31 @@ struct Drm::Context int fd() const { return _fd; } - void import_buffer(Gpu::Buffer_capability buffer_cap, - Gpu::Buffer_id id) - { - Genode::retry( - [&]() { - Genode::retry( - [&] () { - _gpu.import_buffer(buffer_cap, id); - new (_alloc) Buffer(_buffer_space, id); - }, - [&] () { - _gpu.upgrade_caps(2); - }); - }, - [&] () { - _gpu.upgrade_ram(1024*1024); - }); - } - - void free_buffer(Gpu::Buffer_id id) + void free_buffer(Drm::Buffer_id id) { try { _buffer_space.apply(Buffer::Id_space::Id { .value = id.value }, [&] (Buffer &buffer) { + _unmap_buffer_gpu(buffer); destroy(_alloc, &buffer); }); } catch (Buffer::Id_space::Unknown_id) { return; } - - _gpu.free_buffer(id); } void free_buffers() { while (_buffer_space.apply_any([&] (Buffer &buffer) { - Gpu::Buffer_id id = buffer.buffer_id(); + _unmap_buffer_gpu(buffer); destroy(_alloc, &buffer); - _gpu.free_buffer(id); })) { } } - void unmap_buffer_ppgtt(Gpu::Buffer_id id) + void unmap_buffer_gpu(Drm::Buffer_id id) { try { _buffer_space.apply(Buffer::Id_space::Id { .value = id.value }, [&] (Buffer &buffer) { - _unmap_buffer_ppgtt(buffer); + _unmap_buffer_gpu(buffer); }); } catch (Buffer::Id_space::Unknown_id) { } } @@ -434,12 +582,12 @@ struct Drm::Context if (b.busy) Genode::warning("handle: ", obj[i].handle, " reused but is busy"); - if (b.gpu_vaddr_valid && b.gpu_vaddr.addr != obj[i].offset) { - _unmap_buffer_ppgtt(b); + if (b.gpu_vaddr_valid && b.gpu_vaddr.va != obj[i].offset) { + _unmap_buffer_gpu(b); } if (!b.gpu_vaddr_valid) - _map_buffer_ppgtt(b, Gpu_virtual_address { .addr = obj[i].offset }); + _map_buffer_gpu(b, Gpu::Virtual_address { .va = obj[i].offset }); if (!b.gpu_vaddr_valid) { Genode::error("handle: ", obj[i].handle, @@ -455,9 +603,10 @@ struct Drm::Context ret = 0; }); } catch (Buffer::Id_space::Unknown_id) { - Gpu::Buffer_id buffer_id { .value = id.value }; - Gpu::Buffer_capability buffer_cap = _gpu_master.export_buffer(buffer_id); - import_buffer(buffer_cap, buffer_id); + Drm::Buffer_id drm_id { .value = id.value }; + _drm_buffer_space.apply(drm_id, [&](Drm::Buffer &buffer) { + _import_buffer(id, buffer); + }); i--; continue; } @@ -471,8 +620,8 @@ struct Drm::Context if (!command_buffer) return -1; - command_buffer->seqno = _gpu.exec_buffer(command_buffer->buffer_id(), - batch_length); + command_buffer->seqno = _gpu.execute(command_buffer->vram.id, + command_buffer->vram.offset); for (uint64_t i = 0; i < count; i++) { Buffer::Id_space::Id const id { .value = obj[i].handle }; @@ -492,7 +641,7 @@ struct Drm::Context }; -class Drm_call +class Drm::Call { private: @@ -506,17 +655,17 @@ class Drm_call Gpu::Info_intel const &_gpu_info { *_gpu_session.attached_info() }; - size_t _available_gtt_size { _gpu_info.aperture_size }; - using Buffer = Gpu::Buffer; - using Buffer_space = Genode::Id_space; + size_t _available_gtt_size { _gpu_info.aperture_size }; + + Vram_allocator _vram_allocator { _gpu_session, _heap }; + Buffer_space _buffer_space { }; using Context_id = Genode::Id_space::Id; using Context_space = Genode::Id_space; Context_space _context_space { }; - template void _gpu_op( FN const &fn) { Genode::retry( @@ -555,21 +704,27 @@ class Drm_call Buffer *buffer { nullptr }; _gpu_op([&] () { - buffer = new (_heap) Buffer(_gpu_session, Genode::align_addr(size, 12), - _buffer_space); + Vram::Allocation vram = _vram_allocator.alloc(Genode::align_addr(size, 12)); + if (vram.valid() == false) { + Genode::error("VRAM allocation of size ", size/1024, "KB failed"); + return; + } + buffer = new (_heap) Buffer(_env, _buffer_space, vram); }); if (buffer) fn(*buffer); } - int _free_buffer(Gpu::Buffer_id const id) + int _free_buffer(Drm::Buffer_id const id) { try { _buffer_space.apply(id, [&] (Buffer &b) { _context_space.for_each([&] (Drm::Context &context) { context.free_buffer(b.id()); }); + + _vram_allocator.free(b.vram()); Genode::destroy(&_heap, &b); }); @@ -616,7 +771,7 @@ class Drm_call int _device_gem_mmap(void *arg) { auto const p = reinterpret_cast(arg); - Gpu::Buffer_id const id { .value = p->handle }; + Drm::Buffer_id const id { .value = p->handle }; bool map_failed { true }; @@ -664,7 +819,7 @@ class Drm_call { /* XXX check read_domains/write_domain */ auto const p = reinterpret_cast(arg); - Gpu::Buffer_id const id { .value = p->handle }; + Gpu::Vram_id const id { .value = p->handle }; uint32_t const rd = p->read_domains; uint32_t const wd = p->write_domain; @@ -761,7 +916,7 @@ class Drm_call } Drm::Context *context = new (_heap) Drm::Context(*gpu, _gpu_session, _heap, - fd, _context_space); + fd, _context_space, _buffer_space); p->ctx_id = context->id(); @@ -776,8 +931,10 @@ class Drm_call try { _context_space.apply(id, [&] (Drm::Context &context) { context.free_buffers(); - Libc::close(context.fd()); + /* GPU session fd */ + int fd = context.fd(); destroy(_heap, &context); + Libc::close(fd); }); } catch (Drm::Context::Id_space::Unknown_id) { } @@ -815,11 +972,18 @@ class Drm_call int _device_gem_set_tiling(void *arg) { + /* + * Tiling is only relevant in case something is mapped through the + * aperture. Iris sets tiling but never seems to establish mappings + * through the GTT, i.e., _device_gem_mmap_gtt which displays a "not + * implemented error"). In case this function is called again, tiling + * becomes also relevant. + */ auto const p = reinterpret_cast(arg); uint32_t const mode = p->tiling_mode; if (mode != I915_TILING_NONE) { - Genode::error(__func__, " mode != I915_TILING_NONE (", mode, ") unsupported"); + if (verbose_ioctl) Genode::warning(__func__, " mode != I915_TILING_NONE (", mode, ") unsupported"); return 0; } @@ -897,7 +1061,7 @@ class Drm_call int _device_gem_busy(void *arg) { auto const p = reinterpret_cast(arg); - Gpu::Buffer_id const id { .value = p->handle }; + Drm::Buffer_id const id { .value = p->handle }; try { _buffer_space.apply(id, [&](Buffer const &b) { @@ -1013,7 +1177,7 @@ class Drm_call int _generic_gem_close(void *arg) { auto const p = reinterpret_cast(arg); - Gpu::Buffer_id const id { .value = p->handle }; + Drm::Buffer_id const id { .value = p->handle }; return _free_buffer(id); } @@ -1114,7 +1278,7 @@ class Drm_call } int const prime_fd { 44 }; - Gpu::Buffer_id prime_handle { }; + Drm::Buffer_id prime_handle { }; int _generic_prime_fd_to_handle(void *arg) { @@ -1131,7 +1295,7 @@ class Drm_call { auto const p = reinterpret_cast(arg); - Gpu::Buffer_id const id { .value = p->handle }; + Drm::Buffer_id const id { .value = p->handle }; try { _buffer_space.apply(id, [&](Buffer const &) { @@ -1181,7 +1345,7 @@ class Drm_call public: - Drm_call() + Call() { /* make handle id 0 unavailable, handled as invalid by iris */ drm_syncobj_create reserve_id_0 { }; @@ -1189,7 +1353,7 @@ class Drm_call Genode::warning("syncobject 0 not reserved"); } - ~Drm_call() + ~Call() { while(_buffer_space.apply_any([&] (Buffer &buffer) { _free_buffer(buffer.id()); @@ -1210,8 +1374,8 @@ class Drm_call return -1; int size = -1; - _buffer_space.apply(prime_handle, [&](Buffer const &b) { - size =(int)b.size; + _buffer_space.apply(prime_handle, [&](Buffer &b) { + size =(int)b.vram().size; }); return size; @@ -1222,19 +1386,19 @@ class Drm_call bool found = false; _buffer_space.for_each([&] (Buffer &b) { - if (found || !b.buffer_attached.constructed()) + if (found) return; if (reinterpret_cast(b.mmap_addr()) != addr) return; - if (b.buffer_attached->size() != length) { + if (b.vram().size != length) { Genode::warning(__func__, " size mismatch"); Genode::sleep_forever(); return; } - b.buffer_attached.destruct(); + b.unmap(); found = true; }); @@ -1247,9 +1411,9 @@ class Drm_call void unmap_buffer_ppgtt(__u32 handle) { - Gpu::Buffer_id const id = { .value = handle }; + Drm::Buffer_id const id = { .value = handle }; _context_space.for_each([&](Drm::Context &context) { - context.unmap_buffer_ppgtt(id); + context.unmap_buffer_gpu(id); }); } @@ -1264,7 +1428,7 @@ class Drm_call }; -static Genode::Constructible _call; +static Genode::Constructible _call; void drm_init() From 47f1eaac2a57cdf8c8192abb81cc773cc658eb78 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Sun, 18 Dec 2022 18:19:08 +0100 Subject: [PATCH 0300/1921] gpu/intel: add VRAM support Remove buffer abstraction and replace it by VRAM objects. issue #4713 --- repos/os/src/drivers/gpu/intel/main.cc | 467 +++++++++++-------------- repos/os/src/drivers/gpu/intel/ppgtt.h | 12 +- 2 files changed, 216 insertions(+), 263 deletions(-) diff --git a/repos/os/src/drivers/gpu/intel/main.cc b/repos/os/src/drivers/gpu/intel/main.cc index 9a4397d1e9..1947d2d16a 100644 --- a/repos/os/src/drivers/gpu/intel/main.cc +++ b/repos/os/src/drivers/gpu/intel/main.cc @@ -22,12 +22,12 @@ #include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -72,7 +72,7 @@ struct Igd::Device struct Unsupported_device : Genode::Exception { }; struct Out_of_caps : Genode::Exception { }; struct Out_of_ram : Genode::Exception { }; - struct Could_not_map_buffer : Genode::Exception { }; + struct Could_not_map_vram : Genode::Exception { }; enum { WATCHDOG_TIMEOUT = 1*1000*1000, }; @@ -112,7 +112,7 @@ struct Igd::Device [&] () { if (_env.pd().avail_caps().value < UPGRADE_CAPS) { - warning("alloc dma buffer: out if caps"); + warning("alloc dma vram: out if caps"); throw Gpu::Session::Out_of_caps(); } @@ -123,7 +123,7 @@ struct Igd::Device [&] () { if (_env.pd().avail_ram().value < size) { - warning("alloc dma buffer: out of ram"); + warning("alloc dma vram: out of ram"); throw Gpu::Session::Out_of_ram(); } _pci.upgrade_ram(size); @@ -379,9 +379,9 @@ struct Igd::Device void schedule(int port) { _scheduled = port; } int scheduled() const { return _scheduled; } - /*************************** - ** Ring buffer interface ** - ***************************/ + /************************* + ** Ring vram interface ** + *************************/ void ring_reset() { _ring.reset(); } Ring_buffer::Index ring_tail() const { return _ring.tail(); } @@ -652,7 +652,7 @@ struct Igd::Device Gpu::Sequence_number { .value = _device.seqno() }; } - bool setup_ring_buffer(Gpu::addr_t const buffer_addr) + bool setup_ring_vram(Gpu::addr_t const vram_addr) { _current_seqno++; @@ -664,7 +664,7 @@ struct Igd::Device Device_info::Stepping::A0, Device_info::Stepping::B0); - size_t const need = 4 /* batchbuffer cmd */ + 6 /* prolog */ + size_t const need = 4 /* batchvram cmd */ + 6 /* prolog */ + ((_device.generation().value == 9) ? 6 : 0) + ((_device.generation().value == 8) ? 20 : 22) /* epilog + w/a */ + (dc_flush_wa ? 12 : 0); @@ -753,7 +753,7 @@ struct Igd::Device /* * gen8_emit_bb_start_noarb, gen8 and render engine * - * batch-buffer commands + * batch-vram commands */ if (_device.generation().value == 8) { @@ -763,8 +763,8 @@ struct Igd::Device cmd[0] = Mi_arb_on_off(false).value; cmd[1] = mi.value; - cmd[2] = buffer_addr & 0xffffffff; - cmd[3] = (buffer_addr >> 32) & 0xffff; + cmd[2] = vram_addr & 0xffffffff; + cmd[3] = (vram_addr >> 32) & 0xffff; for (size_t i = 0; i < CMD_NUM; i++) { advance += el.ring_append(cmd[i]); @@ -774,7 +774,7 @@ struct Igd::Device /* * gen8_emit_bb_start, gen9 * - * batch-buffer commands + * batch-vram commands */ if (_device.generation().value >= 9) { @@ -784,8 +784,8 @@ struct Igd::Device cmd[0] = Mi_arb_on_off(true).value; cmd[1] = mi.value; - cmd[2] = buffer_addr & 0xffffffff; - cmd[3] = (buffer_addr >> 32) & 0xffff; + cmd[2] = vram_addr & 0xffffffff; + cmd[3] = (vram_addr >> 32) & 0xffff; cmd[4] = Mi_arb_on_off(false).value; cmd[5] = Mi_noop().value; @@ -1370,21 +1370,21 @@ struct Igd::Device return result; } - /********************* - ** Buffer handling ** - *********************/ + /******************* + ** Vram handling ** + *******************/ /** - * Allocate DMA buffer + * Allocate DMA vram * * \param guard resource allocator and guard - * \param size size of the DMA buffer + * \param size size of the DMA vram * - * \return DMA buffer capability + * \return DMA vram capability * * \throw Out_of_memory */ - Genode::Ram_dataspace_capability alloc_buffer(Allocator &, + Genode::Ram_dataspace_capability alloc_vram(Allocator &, size_t const size) { return _pci_backend_alloc.alloc(size); @@ -1392,7 +1392,7 @@ struct Igd::Device /** - * Get physical address for DMA buffer + * Get physical address for DMA vram * * \param ds_cap ram dataspace capability * @@ -1404,12 +1404,12 @@ struct Igd::Device } /** - * Free DMA buffer + * Free DMA vram * * \param guard resource allocator and guard - * \param cap DMA buffer capability + * \param cap DMA vram capability */ - void free_buffer(Allocator &, + void free_vram(Allocator &, Dataspace_capability const cap) { if (!cap.valid()) { return; } @@ -1418,23 +1418,23 @@ struct Igd::Device } /** - * Map DMA buffer in the GGTT + * Map DMA vram in the GGTT * * \param guard resource allocator and guard - * \param cap DMA buffer capability + * \param cap DMA vram capability * \param aperture true if mapping should be accessible by CPU * * \return GGTT mapping * - * \throw Could_not_map_buffer + * \throw Could_not_map_vram */ - Ggtt::Mapping const &map_buffer(Genode::Allocator &guard, + Ggtt::Mapping const &map_vram(Genode::Allocator &guard, Genode::Ram_dataspace_capability cap, bool aperture) { if (aperture == false) { error("GGTT mapping outside aperture"); - throw Could_not_map_buffer(); + throw Could_not_map_vram(); } size_t const size = Genode::Dataspace_client(cap).size(); @@ -1444,12 +1444,12 @@ struct Igd::Device } /** - * Unmap DMA buffer from GGTT + * Unmap DMA vram from GGTT * * \param guard resource allocator and guard * \param mapping GGTT mapping */ - void unmap_buffer(Genode::Allocator &guard, Ggtt::Mapping mapping) + void unmap_vram(Genode::Allocator &guard, Ggtt::Mapping mapping) { unmap_dataspace_ggtt(guard, mapping.cap); } @@ -1561,7 +1561,7 @@ namespace Gpu { } -struct Gpu::Buffer : Genode::Interface +struct Gpu::Vram : Genode::Interface { GENODE_RPC_INTERFACE(); }; @@ -1637,9 +1637,9 @@ class Gpu::Session_component : public Genode::Session_object Resource_guard _resource_guard { _cap_quota_guard(), _ram_quota_guard() }; /* - * Buffer managed by session ep + * Vram managed by session ep */ - struct Buffer : Rpc_object + struct Vram : Rpc_object { Ram_dataspace_capability ds_cap; Session_capability owner_cap; @@ -1655,8 +1655,8 @@ class Gpu::Session_component : public Genode::Session_object bool caps_used { false }; size_t ram_used { 0 }; - Buffer(Ram_dataspace_capability ds_cap, Genode::addr_t phys_addr, - Session_capability owner_cap) + Vram(Ram_dataspace_capability ds_cap, Genode::addr_t phys_addr, + Session_capability owner_cap) : ds_cap { ds_cap }, owner_cap { owner_cap }, phys_addr { phys_addr } @@ -1672,75 +1672,95 @@ class Gpu::Session_component : public Genode::Session_object }; /* - * Buffer session/gpu-context local buffer + * Vram session/gpu-context local vram */ - struct Buffer_local + struct Vram_local { - using Id_space = Genode::Id_space; + /* keep track of mappings of different offsets */ + struct Mapping : Dictionary::Element + { + addr_t ppgtt_va { 0 }; + size_t ppgtt_va_size { 0 }; + + Mapping(Dictionary &dict, off_t offset, + addr_t ppgtt_va, size_t ppgtt_va_size) + : + Dictionary::Element(dict, offset), + ppgtt_va(ppgtt_va), ppgtt_va_size(ppgtt_va_size) + { } + }; + + using Id_space = Genode::Id_space; + + Vram_capability const vram_cap; + size_t size; + Id_space::Element const elem; + Dictionary mappings { }; - Buffer_capability const buffer_cap; - size_t size; - Id_space::Element const elem; addr_t ppgtt_va { 0 }; bool ppgtt_va_valid { false }; - Buffer_local(Buffer_capability buffer_cap, size_t size, - Id_space &space, Buffer_id id) - : buffer_cap(buffer_cap), size(size), + Vram_local(Vram_capability vram_cap, size_t size, + Id_space &space, Vram_id id) + : vram_cap(vram_cap), size(size), elem(*this, space, Id_space::Id { .value = id.value }) { } }; - Id_space _buffer_space { }; + Id_space _vram_space { }; template - void _apply_buffer(Buffer_local &buffer_local, FN const &fn) + void _apply_vram(Vram_local &vram_local, FN const &fn) { - Buffer *b = nullptr; - bool free = _env.ep().rpc_ep().apply(buffer_local.buffer_cap, [&] (Buffer *buffer) { - if (buffer) { - b = buffer; - return fn(*buffer); + Vram *v = nullptr; + bool free = _env.ep().rpc_ep().apply(vram_local.vram_cap, [&] (Vram *vram) { + if (vram) { + v = vram; + return fn(*vram); } return false; }); - if (b && free) - destroy(&_heap, b); + if (v && free) + destroy(&_heap, v); } - bool _buffer_valid(Buffer_capability buffer_cap) + bool _vram_valid(Vram_capability vram_cap) { bool valid = false; - _env.ep().rpc_ep().apply(buffer_cap, [&] (Buffer *buffer) { - if (buffer) valid = true; + _env.ep().rpc_ep().apply(vram_cap, [&] (Vram *vram) { + if (vram) valid = true; }); return valid; } template - void _apply_buffer_local(Gpu::Buffer_id id, FN const &fn) + void _apply_vram_local(Gpu::Vram_id id, FN const &fn) { - Buffer_local::Id_space::Id local_id { .value = id.value }; + Vram_local::Id_space::Id local_id { .value = id.value }; try { - _buffer_space.apply(local_id, [&] (Buffer_local &buffer) { - fn(buffer); + _vram_space.apply(local_id, [&] (Vram_local &vram) { + fn(vram); }); - } catch (Buffer_local::Id_space::Unknown_id) { + } catch (Vram_local::Id_space::Unknown_id) { error("Unknown id: ", id.value); } } Genode::uint64_t seqno { 0 }; - void _free_local_buffer(Buffer_local &buffer_local) + void _free_local_vram(Vram_local &vram_local) { - if (buffer_local.ppgtt_va_valid) { - _vgpu.rcs_unmap_ppgtt(buffer_local.ppgtt_va, buffer_local.size); - } + vram_local.mappings.for_each([&] (Vram_local::Mapping const &mapping) { + _vgpu.rcs_unmap_ppgtt(mapping.ppgtt_va, mapping.ppgtt_va_size); + }); - destroy(&_heap, &buffer_local); + while (vram_local.mappings.with_any_element([&] (Vram_local::Mapping &mapping) { + destroy(_heap, &mapping); + })) { } + + destroy(&_heap, &vram_local); } public: @@ -1772,31 +1792,31 @@ class Gpu::Session_component : public Genode::Session_object ~Session_component() { - auto lookup_and_free = [&] (Buffer_local &buffer_local) { + auto lookup_and_free = [&] (Vram_local &vram_local) { - _apply_buffer(buffer_local, [&](Buffer &buffer) { + _apply_vram(vram_local, [&](Vram &vram) { - if (buffer.owner(_session_cap) == false) return false; + if (vram.owner(_session_cap) == false) return false; - if (buffer.map.offset != Igd::Ggtt::Mapping::INVALID_OFFSET) { - _device.unmap_buffer(_heap, buffer.map); + if (vram.map.offset != Igd::Ggtt::Mapping::INVALID_OFFSET) { + _device.unmap_vram(_heap, vram.map); } - if (buffer.fenced != Buffer::INVALID_FENCE) { - _device.clear_tiling(buffer.fenced); + if (vram.fenced != Vram::INVALID_FENCE) { + _device.clear_tiling(vram.fenced); _vgpu.active_fences--; } - _env.ep().dissolve(buffer); - _device.free_buffer(_heap, buffer.ds_cap); + _env.ep().dissolve(vram); + _device.free_vram(_heap, vram.ds_cap); return true; }); - _free_local_buffer(buffer_local); + _free_local_vram(vram_local); }; - while(_buffer_space.apply_any( - [&] (Buffer_local &buffer_local) { lookup_and_free(buffer_local); })); + while(_vram_space.apply_any( + [&] (Vram_local &vram_local) { lookup_and_free(vram_local); })); } /********************************* @@ -1831,25 +1851,31 @@ class Gpu::Session_component : public Genode::Session_object return _vgpu.info_dataspace(); } - Gpu::Sequence_number exec_buffer(Buffer_id id, - Genode::size_t) override + Gpu::Sequence_number execute(Vram_id id, off_t offset) override { bool found = false; - _apply_buffer_local(id, [&] (Buffer_local &buffer_local) { + _apply_vram_local(id, [&] (Vram_local &vram_local) { - if (_buffer_valid(buffer_local.buffer_cap) == false) { - _free_local_buffer(buffer_local); + if (_vram_valid(vram_local.vram_cap) == false) { + _free_local_vram(vram_local); return; } - if (!buffer_local.ppgtt_va_valid) { - Genode::error("Invalid execbuffer"); + addr_t ppgtt_va { 0 }; + + bool ppgtt_va_valid = vram_local.mappings.with_element(offset, + [&] (Vram_local::Mapping const &mapping) { + ppgtt_va = mapping.ppgtt_va; return true; }, + []() { return false; }); + + if (!ppgtt_va_valid) { + Genode::error("Invalid execvram"); Genode::Signal_transmitter(_vgpu.completion_sigh()).submit(); throw Gpu::Session::Invalid_state(); } - found = _vgpu.setup_ring_buffer(buffer_local.ppgtt_va); + found = _vgpu.setup_ring_vram(ppgtt_va); }); if (!found) @@ -1869,8 +1895,8 @@ class Gpu::Session_component : public Genode::Session_object _vgpu.completion_sigh(sigh); } - Genode::Dataspace_capability alloc_buffer(Gpu::Buffer_id id, - Genode::size_t size) override + Genode::Dataspace_capability alloc_vram(Gpu::Vram_id id, + Genode::size_t size) override { /* roundup to next page size */ size = align_addr(size, 12); @@ -1884,80 +1910,80 @@ class Gpu::Session_component : public Genode::Session_object size_t caps_before = _env.pd().avail_caps().value; size_t ram_before = _env.pd().avail_ram().value; - Ram_dataspace_capability ds_cap = _device.alloc_buffer(_heap, size); + Ram_dataspace_capability ds_cap = _device.alloc_vram(_heap, size); addr_t phys_addr = _device.dma_addr(ds_cap); - Buffer *buffer = new (&_heap) Buffer(ds_cap, phys_addr, _session_cap); - _env.ep().manage(*buffer); + Vram *vram = new (&_heap) Vram(ds_cap, phys_addr, _session_cap); + _env.ep().manage(*vram); try { - new (&_heap) Buffer_local(buffer->cap(), size, _buffer_space, id); - } catch (Id_space::Conflicting_id) { - _env.ep().dissolve(*buffer); - destroy(&_heap, buffer); - _device.free_buffer(_heap, ds_cap); + new (&_heap) Vram_local(vram->cap(), size, _vram_space, id); + } catch (Id_space::Conflicting_id) { + _env.ep().dissolve(*vram); + destroy(&_heap, vram); + _device.free_vram(_heap, ds_cap); return Dataspace_capability(); } size_t caps_after = _env.pd().avail_caps().value; size_t ram_after = _env.pd().avail_ram().value; - /* limit to buffer size for replenish */ - buffer->ram_used = min(ram_before > ram_after ? ram_before - ram_after : 0, size); - buffer->caps_used = caps_before > caps_after ? true : false; + /* limit to vram size for replenish */ + vram->ram_used = min(ram_before > ram_after ? ram_before - ram_after : 0, size); + vram->caps_used = caps_before > caps_after ? true : false; _resource_guard.withdraw(caps_before, caps_after, ram_before, ram_after); return ds_cap; } - void free_buffer(Gpu::Buffer_id id) override + void free_vram(Gpu::Vram_id id) override { - auto lookup_and_free = [&] (Buffer_local &buffer_local) { + auto lookup_and_free = [&] (Vram_local &vram_local) { - _apply_buffer(buffer_local, [&](Buffer &buffer) { + _apply_vram(vram_local, [&](Vram &vram) { - if (buffer.owner(_session_cap) == false) return false; + if (vram.owner(_session_cap) == false) return false; - if (buffer.map.offset != Igd::Ggtt::Mapping::INVALID_OFFSET) { - Genode::error("cannot free mapped buffer"); + if (vram.map.offset != Igd::Ggtt::Mapping::INVALID_OFFSET) { + Genode::error("cannot free mapped vram"); /* XXX throw */ return false; } - _env.ep().dissolve(buffer); - _device.free_buffer(_heap, buffer.ds_cap); - _resource_guard.replenish(buffer.caps_used ? 1 : 0, - buffer.ram_used); + _env.ep().dissolve(vram); + _device.free_vram(_heap, vram.ds_cap); + _resource_guard.replenish(vram.caps_used ? 1 : 0, + vram.ram_used); return true; }); - _free_local_buffer(buffer_local); + _free_local_vram(vram_local); }; - _apply_buffer_local(id, lookup_and_free); + _apply_vram_local(id, lookup_and_free); } - Buffer_capability export_buffer(Buffer_id id) override + Vram_capability export_vram(Vram_id id) override { - Buffer_capability cap { }; - _apply_buffer_local(id, [&] (Buffer_local &buffer_local) { - if (_buffer_valid(buffer_local.buffer_cap)) - cap = buffer_local.buffer_cap; + Vram_capability cap { }; + _apply_vram_local(id, [&] (Vram_local &vram_local) { + if (_vram_valid(vram_local.vram_cap)) + cap = vram_local.vram_cap; }); return cap; } - void import_buffer(Buffer_capability cap, Buffer_id id) override + void import_vram(Vram_capability cap, Vram_id id) override { - if (_buffer_valid(cap) == false) + if (_vram_valid(cap) == false) throw Gpu::Session::Invalid_state(); try { - Buffer_local *buffer_local = new (_heap) Buffer_local(cap, 0, _buffer_space, id); + Vram_local *vram_local = new (_heap) Vram_local(cap, 0, _vram_space, id); - _apply_buffer(*buffer_local, [&](Buffer &buffer) { - buffer_local->size = buffer.size; return false; }); + _apply_vram(*vram_local, [&](Vram &vram) { + vram_local->size = vram.size; return false; }); - } catch (Id_space::Conflicting_id) { + } catch (Id_space::Conflicting_id) { throw Gpu::Session::Conflicting_id(); } catch (Cap_quota_guard::Limit_exceeded) { throw Gpu::Session::Out_of_caps(); @@ -1966,107 +1992,50 @@ class Gpu::Session_component : public Genode::Session_object } } - Genode::Dataspace_capability map_buffer(Gpu::Buffer_id id, - bool aperture, - Gpu::Mapping_attributes attrs) override + Genode::Dataspace_capability map_cpu(Gpu::Vram_id, + Gpu::Mapping_attributes) override { - /* treat GGTT mapped buffers as rw */ - if (!(attrs.readable && attrs.writeable)) - return Genode::Dataspace_capability(); - - Genode::Dataspace_capability map_cap; - - auto lookup_and_map = [&] (Buffer &buffer) { - if (buffer.owner(_session_cap) == false) { - Genode::error("GGTT mappings can only be done by buffer owner"); - return false; - } - - if (buffer.map.offset != Igd::Ggtt::Mapping::INVALID_OFFSET) { - Genode::error("buffer already mapped"); - return false; - } - /* GGTT mappings only require the heap */ - if (_resource_guard.avail_caps() == false) - throw Gpu::Session::Out_of_caps(); - - if (_resource_guard.avail_ram() == false) - throw Gpu::Session::Out_of_ram(); - - size_t caps_before = _env.pd().avail_caps().value; - size_t ram_before = _env.pd().avail_ram().value; - - Igd::Ggtt::Mapping const &map = - _device.map_buffer(_heap, buffer.ds_cap, aperture); - buffer.map.cap = map.cap; - buffer.map.offset = map.offset; - map_cap = buffer.map.cap; - - size_t caps_after = _env.pd().avail_caps().value; - size_t ram_after = _env.pd().avail_ram().value; - _resource_guard.withdraw(caps_before, caps_after, - ram_before , ram_after); - return true; - }; - - _apply_buffer_local(id, [&] (Buffer_local &buffer_local) { - _apply_buffer(buffer_local, lookup_and_map); }); - - return map_cap; + error("map_cpu: called not implemented"); + throw Mapping_vram_failed(); } - void unmap_buffer(Gpu::Buffer_id id) override + void unmap_cpu(Vram_id) override { - bool unmapped = false; - - auto lookup_and_unmap = [&] (Buffer &buffer) { - - if (buffer.owner(_session_cap) == false) { - Genode::error("GGTT unmappings can only be done by buffer owner"); - return false; - } - - if (!buffer.map.cap.valid()) { return false; } - - if (buffer.fenced != Buffer::INVALID_FENCE) { - _device.clear_tiling(buffer.fenced); - _vgpu.active_fences--; - } - - _device.unmap_buffer(_heap, buffer.map); - buffer.map.offset = Igd::Ggtt::Mapping::INVALID_OFFSET; - unmapped = true; - - return false; - }; - - _apply_buffer_local(id, [&](Buffer_local &buffer) { - _apply_buffer(buffer, lookup_and_unmap); }); - - if (!unmapped) { Genode::error("buffer not mapped"); } + error("unmap_cpu: called not implemented"); } - bool map_buffer_ppgtt(Gpu::Buffer_id id, Gpu::addr_t va) override + bool map_gpu(Vram_id id, size_t size, off_t offset, Gpu::Virtual_address va) override { - auto lookup_and_map = [&] (Buffer_local &buffer_local) { + auto lookup_and_map = [&] (Vram_local &vram_local) { - if (buffer_local.ppgtt_va_valid) { - Genode::error("buffer already mapped"); + if (vram_local.mappings.exists(offset)) { + Genode::error("vram already mapped at offset: ", Hex(offset)); return; } addr_t phys_addr = 0; - _apply_buffer(buffer_local, [&](Buffer &buffer) { - phys_addr = buffer.phys_addr; return false; }); + _apply_vram(vram_local, [&](Vram &vram) { + phys_addr = vram.phys_addr; return false; }); if (phys_addr == 0) { - _free_local_buffer(buffer_local); + _free_local_vram(vram_local); return; } - _vgpu.rcs_map_ppgtt(va, phys_addr, buffer_local.size); - buffer_local.ppgtt_va = va; - buffer_local.ppgtt_va_valid = true; + try { + _vgpu.rcs_map_ppgtt(va.va, phys_addr + offset, size); + } catch (Level_4_translation_table::Double_insertion) { + error("PPGTT: Double insertion: va: ", Hex(va.va), " offset: ", Hex(offset), + "size: ", Hex(size)); + throw Mapping_vram_failed(); + } catch(...) { + error("PPGTT: invalid address/range/alignment: va: ", Hex(va.va), + " offset: ", Hex(offset), + "size: ", Hex(size)); + throw Mapping_vram_failed(); + } + + new (_heap) Vram_local::Mapping(vram_local.mappings, offset, va.va, size); }; if (_resource_guard.avail_caps() == false) @@ -2078,7 +2047,7 @@ class Gpu::Session_component : public Genode::Session_object size_t caps_before = _env.pd().avail_caps().value; size_t ram_before = _env.pd().avail_ram().value; - _apply_buffer_local(id, lookup_and_map); + _apply_vram_local(id, lookup_and_map); size_t caps_after = _env.pd().avail_caps().value; size_t ram_after = _env.pd().avail_ram().value; @@ -2089,77 +2058,59 @@ class Gpu::Session_component : public Genode::Session_object return true; } - void unmap_buffer_ppgtt(Gpu::Buffer_id id, - Gpu::addr_t va) override + void unmap_gpu(Vram_id id, off_t offset, Gpu::Virtual_address va) override { - auto lookup_and_unmap = [&] (Buffer_local &buffer_local) { + auto lookup_and_unmap = [&] (Vram_local &vram_local) { - if (!buffer_local.ppgtt_va_valid) { - Genode::error("buffer not mapped"); - return; - } + vram_local.mappings.with_element(offset, + [&] (Vram_local::Mapping &mapping) { - if (buffer_local.ppgtt_va != va) { - Genode::error("buffer not mapped at ", Genode::Hex(va)); - return; - } - - _vgpu.rcs_unmap_ppgtt(va, buffer_local.size); - buffer_local.ppgtt_va_valid = false; + if (mapping.ppgtt_va != va.va) { + Genode::error("VRAM: not mapped at ", Hex(va.va), " offset: ", Hex(offset)); + return; + } + _vgpu.rcs_unmap_ppgtt(va.va, mapping.ppgtt_va_size); + destroy(_heap, &mapping); + }, + [&] () { error("VRAM: nothing mapped at offset ", Hex(offset)); } + ); }; - _apply_buffer_local(id, lookup_and_unmap); + _apply_vram_local(id, lookup_and_unmap); } - Gpu::addr_t query_buffer_ppgtt(Gpu::Buffer_id id) override - { - Gpu::addr_t result = (Gpu::addr_t)-1; - - auto lookup_va = [&] (Buffer_local &buffer_local) { - - if (!buffer_local.ppgtt_va_valid) { - Genode::error("buffer not mapped"); - return; - } - - result = buffer_local.ppgtt_va; - }; - _apply_buffer_local(id, lookup_va); - return result; - } - - bool set_tiling(Gpu::Buffer_id id, - Genode::uint32_t const mode) override + bool set_tiling_gpu(Vram_id id, off_t offset, + unsigned mode) override { if (_vgpu.active_fences > Igd::Device::Vgpu::MAX_FENCES) { Genode::error("no free fences left, already active: ", _vgpu.active_fences); return false; } - Buffer *b = nullptr; - auto lookup = [&] (Buffer &buffer) { - if (!buffer.map.cap.valid() || !buffer.owner(_session_cap)) { return false; } - b = &buffer; + Vram *v = nullptr; + auto lookup = [&] (Vram &vram) { + if (!vram.map.cap.valid() || !vram.owner(_session_cap)) { return false; } + v = &vram; return false; }; - _apply_buffer_local(id, [&](Buffer_local &buffer_local) { - _apply_buffer(buffer_local, lookup); + _apply_vram_local(id, [&](Vram_local &vram_local) { + _apply_vram(vram_local, lookup); }); - if (b == nullptr) { - Genode::error("attempt to set tiling for non-mapped or non-owned buffer"); + if (v == nullptr) { + Genode::error("attempt to set tiling for non-mapped or non-owned vram"); return false; } //XXX: support change of already fenced bo's fencing mode - if (b->fenced) return true; + if (v->fenced) return true; - Igd::size_t const size = b->size; - Genode::uint32_t const fenced = _device.set_tiling(b->map.offset, size, mode); + Igd::size_t const size = v->size; + Genode::uint32_t const fenced = _device.set_tiling(v->map.offset + offset, size, mode); - b->fenced = fenced; - if (fenced != Buffer::INVALID_FENCE) { _vgpu.active_fences++; } - return fenced != Buffer::INVALID_FENCE; + v->fenced = fenced; + if (fenced != Vram::INVALID_FENCE) { _vgpu.active_fences++; } + return fenced != Vram::INVALID_FENCE; } }; diff --git a/repos/os/src/drivers/gpu/intel/ppgtt.h b/repos/os/src/drivers/gpu/intel/ppgtt.h index 2012246fd7..09efb39379 100644 --- a/repos/os/src/drivers/gpu/intel/ppgtt.h +++ b/repos/os/src/drivers/gpu/intel/ppgtt.h @@ -215,6 +215,13 @@ namespace Genode class Genode::Level_4_translation_table { + public: + + class Misaligned {}; + class Invalid_address {}; + class Invalid_range {}; + class Double_insertion {}; + private: static constexpr size_t PAGE_SIZE_LOG2 = SIZE_LOG2_4KB; @@ -223,11 +230,6 @@ class Genode::Level_4_translation_table static constexpr size_t PAGE_SIZE = 1UL << PAGE_SIZE_LOG2; static constexpr size_t PAGE_MASK = ~((1UL << PAGE_SIZE_LOG2) - 1); - class Misaligned {}; - class Invalid_address {}; - class Invalid_range {}; - class Double_insertion {}; - struct Descriptor : Common_descriptor { using Common = Common_descriptor; From 56e7e2ad53849e715ecc2dba60fb32f62bb4c65d Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Tue, 3 Jan 2023 10:26:58 +0100 Subject: [PATCH 0301/1921] libdrm/lima+etnaviv: adjust to VRAM GPU session interface Keep buffer abstraction by mapping one buffer to one VRAM object. issue #4713 --- .../libports/src/lib/libdrm/ioctl_etnaviv.cc | 44 +++++----- repos/libports/src/lib/libdrm/ioctl_lima.cc | 80 ++++++++++++++----- 2 files changed, 83 insertions(+), 41 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_etnaviv.cc b/repos/libports/src/lib/libdrm/ioctl_etnaviv.cc index 2a1a44d765..deac4814f7 100644 --- a/repos/libports/src/lib/libdrm/ioctl_etnaviv.cc +++ b/repos/libports/src/lib/libdrm/ioctl_etnaviv.cc @@ -268,33 +268,40 @@ namespace Etnaviv { using namespace Gpu; struct Call; -} /* namespace Gpu */ + struct Buffer; +} /* namespace Etnaviv */ -struct Gpu::Buffer +namespace Gpu { + using Buffer_id = Vram_id; +} + +struct Gpu::Vram { }; + +struct Etnaviv::Buffer : Gpu::Vram { Gpu::Connection &_gpu; - Genode::Id_space::Element const _elem; + Genode::Id_space::Element const _elem; Genode::Dataspace_capability const cap; size_t const size; Genode::Constructible _attached_buffer { }; - Buffer(Gpu::Connection &gpu, - size_t size, - Genode::Id_space &space) + Buffer(Gpu::Connection &gpu, + size_t size, + Vram_id_space &space) : _gpu { gpu }, _elem { *this, space }, - cap { _gpu.alloc_buffer(_elem.id(), size) }, + cap { _gpu.alloc_vram(_elem.id(), size) }, size { size } { } - virtual ~Buffer() + ~Buffer() { - _gpu.free_buffer(_elem.id()); + _gpu.free_vram(_elem.id()); } bool mmap(Genode::Env &env) @@ -306,9 +313,9 @@ struct Gpu::Buffer return _attached_buffer.constructed(); } - Genode::addr_t mmap_addr() + Gpu::addr_t mmap_addr() { - return reinterpret_cast(_attached_buffer->local_addr()); + return reinterpret_cast(_attached_buffer->local_addr()); } Gpu::Buffer_id id() const @@ -339,7 +346,7 @@ class Etnaviv::Call Gpu::Info_etnaviv const &_gpu_info { *_gpu_session.attached_info() }; - Id_space _buffer_space { }; + Gpu::Vram_id_space _buffer_space { }; /* * Play it safe, glmark2 apparently submits araound 110 KiB at @@ -390,7 +397,7 @@ class Etnaviv::Call int _drm_etnaviv_gem_cpu_fini(drm_etnaviv_gem_cpu_fini &arg) { return _apply_handle(arg.handle, [&] (Buffer const &b) { - _gpu_session.unmap_buffer(b.id()); + _gpu_session.unmap_cpu(b.id()); }) ? 0 : -1; } @@ -416,7 +423,7 @@ class Etnaviv::Call if (to) { for (int i = 0; i < 100; i++) { Dataspace_capability const map_cap = - _gpu_session.map_buffer(b.id(), false, attrs); + _gpu_session.map_cpu(b.id(), attrs); if (map_cap.valid()) { res = 0; break; @@ -425,7 +432,7 @@ class Etnaviv::Call } else { Dataspace_capability const map_cap = - _gpu_session.map_buffer(b.id(), false, attrs); + _gpu_session.map_cpu(b.id(), attrs); if (map_cap.valid()) res = 0; } @@ -438,7 +445,7 @@ class Etnaviv::Call [&] (Buffer &b) { if (!b.mmap(_env)) return; - arg.offset = reinterpret_cast<::uint64_t>(b.mmap_addr()); + arg.offset = reinterpret_cast(b.mmap_addr()); }) ? 0 : -1; } @@ -500,8 +507,7 @@ class Etnaviv::Call try { Genode::uint64_t const pending_exec_buffer = - _gpu_session.exec_buffer(_exec_buffer->id(), - EXEC_BUFFER_SIZE).value; + _gpu_session.execute(_exec_buffer->id(), 0).value; arg.fence = pending_exec_buffer & 0xffffffffu; return 0; } catch (Gpu::Session::Invalid_state) { } @@ -593,7 +599,7 @@ class Etnaviv::Call int _drm_gem_close(drm_gem_close const &gem_close) { return _apply_handle(gem_close.handle, - [&] (Gpu::Buffer &b) { + [&] (Etnaviv::Buffer &b) { destroy(_heap, &b); }) ? 0 : -1; } diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 9a68cb3b7d..8408d6558f 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -189,33 +189,47 @@ namespace Lima { using namespace Gpu; struct Call; -} /* namespace Gpu */ + struct Buffer; +} /* namespace Lima */ -struct Gpu::Buffer +namespace Gpu { + using Buffer_id = Vram_id; +} + + +struct Gpu::Vram { }; + +struct Lima::Buffer : Gpu::Vram { Gpu::Connection &_gpu; - Genode::Id_space::Element const _elem; + Vram_id_space::Element const _elem; - Genode::Dataspace_capability const cap; - size_t const size; + size_t const size; + Gpu::Virtual_address va; + Genode::Dataspace_capability cap { }; Genode::Constructible _attached_buffer { }; - Buffer(Gpu::Connection &gpu, - size_t size, - Genode::Id_space &space) + Buffer(Gpu::Connection &gpu, + size_t size, + Gpu::Virtual_address va, + Vram_id_space &space) : _gpu { gpu }, _elem { *this, space }, - cap { _gpu.alloc_buffer(_elem.id(), size) }, - size { size } - { } - - virtual ~Buffer() + size { size }, va { va } { - _gpu.free_buffer(_elem.id()); + if (!_gpu.map_gpu(_elem.id(), size, 0, va)) + throw -1; + + cap = _gpu.map_cpu(_elem.id(), Gpu::Mapping_attributes()); + } + + ~Buffer() + { + _gpu.unmap_gpu(_elem.id(), 0, Virtual_address()); } bool mmap(Genode::Env &env) @@ -229,7 +243,7 @@ struct Gpu::Buffer Genode::addr_t mmap_addr() { - return reinterpret_cast(_attached_buffer->local_addr()); + return reinterpret_cast(_attached_buffer->local_addr()); } Gpu::Buffer_id id() const @@ -251,6 +265,7 @@ class Lima::Call Genode::Env &_env { *vfs_gpu_env() }; Genode::Heap _heap { _env.ram(), _env.rm() }; + Genode::Allocator_avl _va_alloc { &_heap }; /***************** ** Gpu session ** @@ -400,7 +415,7 @@ class Lima::Call Gpu::Info_lima const &_gpu_info { *_gpu.attached_info() }; - Id_space _buffer_space { }; + Gpu::Vram_id_space _buffer_space { }; /* * Play it safe, glmark2 apparently submits araound 110 KiB at @@ -413,7 +428,7 @@ class Lima::Call { Buffer_id const id { .value = handle }; do { - if (_gpu.set_tiling(id, op)) + if (_gpu.set_tiling_gpu(id, 0, op)) break; char buf; @@ -477,10 +492,10 @@ class Lima::Call return; arg.offset = reinterpret_cast<::uint64_t>(b.mmap_addr()); - Gpu::addr_t const va = _gpu.query_buffer_ppgtt(b.id()); - if (va == (Gpu::addr_t)-1) + Gpu::Virtual_address const va = b.va; + if (va.va == (Gpu::addr_t)-1) return; - arg.va = (uint32_t)va; + arg.va = (uint32_t)va.va; result = 0; }); @@ -488,18 +503,32 @@ class Lima::Call return result; } + ::uint64_t _alloc_va(::uint64_t const size) + { + return _va_alloc.alloc_aligned(size, 12).convert<::uint64_t>( + [&] (void *ptr) { return (::uint64_t)ptr; }, + [&] (Range_allocator::Alloc_error) -> ::uint64_t { + error("Could not allocate GPU virtual address for size: ", size); + return 0; + }); + } + template void _alloc_buffer(::uint64_t const size, FUNC const &fn) { size_t donate = size; Buffer *buffer = nullptr; + ::uint64_t va = _alloc_va(size); + if (!va) return; + retry( [&] () { retry( [&] () { buffer = new (&_heap) Buffer(_gpu, size, + Gpu::Virtual_address { va }, _buffer_space); }, [&] () { @@ -558,7 +587,7 @@ class Lima::Call Gpu::Connection &gpu = gc.gpu(); Gpu::Sequence_number const seqno = - gpu.exec_buffer(_exec_buffer->id(), EXEC_BUFFER_SIZE); + gpu.execute(_exec_buffer->id(), 0); sync_obj.adopt(gc, seqno); @@ -653,7 +682,8 @@ class Lima::Call int _drm_gem_close(drm_gem_close const &gem_close) { return _apply_handle(gem_close.handle, - [&] (Gpu::Buffer &b) { + [&] (Lima::Buffer &b) { + _va_alloc.free((void *)b.va.va); destroy(_heap, &b); }) ? 0 : -1; } @@ -743,9 +773,15 @@ class Lima::Call Call() { + _va_alloc.add_range(0x1000, 0xfff00000ul - 0x1000); + + ::uint64_t va = _alloc_va(EXEC_BUFFER_SIZE); + if (!va) throw Gpu::Session::Invalid_state(); + try { _exec_buffer.construct(_gpu, (size_t)EXEC_BUFFER_SIZE, + Gpu::Virtual_address { va }, _buffer_space); } catch (...) { throw Gpu::Session::Invalid_state(); From 8279038da2e7764beca4b798b68b8d99217d2d92 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Thu, 5 Jan 2023 11:18:06 +0100 Subject: [PATCH 0302/1921] lx_emul: provide _raw_read_lock/unlock functions Required by i.MX8's gpu driver. '_raw_read_lock' was already present but not implemented, add it's counter part as well. issue #4713 --- .../src/lib/lx_emul/shadow/kernel/locking/spinlock.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/locking/spinlock.c b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/locking/spinlock.c index 4ea14fcc76..8425567b8b 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/locking/spinlock.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/locking/spinlock.c @@ -105,7 +105,15 @@ void __lockfunc _raw_spin_unlock_irqrestore(raw_spinlock_t * lock, #ifndef CONFIG_INLINE_READ_LOCK void __lockfunc _raw_read_lock(rwlock_t * lock) { - lx_emul_trace_and_stop(__func__); + arch_read_lock(&(lock)->raw_lock); +} +#endif + + +#ifndef CONFIG_INLINE_READ_UNLOCK +void __lockfunc _raw_read_unlock(rwlock_t * lock) +{ + arch_read_unlock(&(lock)->raw_lock); } #endif From d10c7c31a4d2e7f8fad362e52631c0cf0bd228c9 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 6 Jan 2023 14:16:59 +0100 Subject: [PATCH 0303/1921] black_hole: adjust to VRAM GPU session interface issue #4713 --- repos/os/src/server/black_hole/gpu.h | 46 +++++++++++++--------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/repos/os/src/server/black_hole/gpu.h b/repos/os/src/server/black_hole/gpu.h index 7a624c201a..d4c05acffe 100644 --- a/repos/os/src/server/black_hole/gpu.h +++ b/repos/os/src/server/black_hole/gpu.h @@ -62,8 +62,8 @@ class Black_hole::Gpu_session : public Session_object return _info_dataspace.cap(); } - Sequence_number exec_buffer(Buffer_id /* id */, - size_t /* size */) override + Sequence_number execute(Vram_id /* id */, + Genode::off_t /* offset */) override { throw Gpu::Session::Invalid_state(); } @@ -76,50 +76,46 @@ class Black_hole::Gpu_session : public Session_object void completion_sigh(Signal_context_capability /* sigh */) override { } - Dataspace_capability alloc_buffer(Buffer_id /* id */, - size_t /* size */) override + Dataspace_capability alloc_vram(Vram_id /* id */, + size_t /* size */) override { return Dataspace_capability { }; } - void free_buffer(Buffer_id /* id */) override { } + void free_vram(Vram_id /* id */) override { } - Buffer_capability export_buffer(Buffer_id /* id */) override + Vram_capability export_vram(Vram_id /* id */) override { - return Buffer_capability { }; + return Vram_capability { }; } - void import_buffer(Buffer_capability /* cap */, - Buffer_id /* id */) override + void import_vram(Vram_capability /* cap */, Vram_id /* id */) override { } - Dataspace_capability - map_buffer(Buffer_id /* id */, - bool /* aperture */, - Mapping_attributes /* attrs */) override + Dataspace_capability map_cpu(Vram_id /* id */, + Mapping_attributes /* attrs */) override { return Dataspace_capability { }; } - void unmap_buffer(Buffer_id /* id */) override { } + void unmap_cpu(Vram_id /* id */) override { } - bool map_buffer_ppgtt(Buffer_id /* id */, - Gpu::addr_t /* va */) override + bool map_gpu(Vram_id /* id */, + size_t /* size */, + off_t /* offset */, + Virtual_address /* va */) override { return false; } - void unmap_buffer_ppgtt(Buffer_id /* id */, - Gpu::addr_t /* va */) override + void unmap_gpu(Vram_id /* id */, + off_t /* offset */, + Virtual_address /* va */) override { } - Gpu::addr_t query_buffer_ppgtt(Buffer_id /* id */) override - { - return (Gpu::addr_t)-1; - } - - bool set_tiling(Buffer_id /* id */, - uint32_t const /* mode */) override + bool set_tiling_gpu(Vram_id /* id */, + off_t /* offset */, + unsigned /* mode */) override { return false; } From f1bc791c22b7221d19078d3669f4722a3655eced Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 20 Jan 2023 18:36:23 +0100 Subject: [PATCH 0304/1921] gpu_session: rename Gpu::Virtual_address:va rename 'va' into 'value' to stay consistent with other types. issue #4713 --- repos/libports/src/lib/libdrm/ioctl_iris.cc | 6 +++--- repos/libports/src/lib/libdrm/ioctl_lima.cc | 6 +++--- repos/os/include/gpu_session/gpu_session.h | 2 +- repos/os/src/drivers/gpu/intel/main.cc | 14 +++++++------- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_iris.cc b/repos/libports/src/lib/libdrm/ioctl_iris.cc index 1b84350fe1..9d483577c8 100644 --- a/repos/libports/src/lib/libdrm/ioctl_iris.cc +++ b/repos/libports/src/lib/libdrm/ioctl_iris.cc @@ -62,7 +62,7 @@ enum { verbose_ioctl = false }; namespace Utils { Gpu::Virtual_address limit_to_48bit(Gpu::Virtual_address addr) { - return Gpu::Virtual_address { addr.va & ((1ULL << 48) - 1) }; } + return Gpu::Virtual_address { addr.value & ((1ULL << 48) - 1) }; } } namespace Gpu @@ -582,12 +582,12 @@ struct Drm::Context if (b.busy) Genode::warning("handle: ", obj[i].handle, " reused but is busy"); - if (b.gpu_vaddr_valid && b.gpu_vaddr.va != obj[i].offset) { + if (b.gpu_vaddr_valid && b.gpu_vaddr.value != obj[i].offset) { _unmap_buffer_gpu(b); } if (!b.gpu_vaddr_valid) - _map_buffer_gpu(b, Gpu::Virtual_address { .va = obj[i].offset }); + _map_buffer_gpu(b, Gpu::Virtual_address { .value = obj[i].offset }); if (!b.gpu_vaddr_valid) { Genode::error("handle: ", obj[i].handle, diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 8408d6558f..2a617a924f 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -493,9 +493,9 @@ class Lima::Call arg.offset = reinterpret_cast<::uint64_t>(b.mmap_addr()); Gpu::Virtual_address const va = b.va; - if (va.va == (Gpu::addr_t)-1) + if (va.value == (Gpu::addr_t)-1) return; - arg.va = (uint32_t)va.va; + arg.va = (uint32_t)va.value; result = 0; }); @@ -683,7 +683,7 @@ class Lima::Call { return _apply_handle(gem_close.handle, [&] (Lima::Buffer &b) { - _va_alloc.free((void *)b.va.va); + _va_alloc.free((void *)b.va.value); destroy(_heap, &b); }) ? 0 : -1; } diff --git a/repos/os/include/gpu_session/gpu_session.h b/repos/os/include/gpu_session/gpu_session.h index 28c64fc0da..1a5903baf1 100644 --- a/repos/os/include/gpu_session/gpu_session.h +++ b/repos/os/include/gpu_session/gpu_session.h @@ -67,7 +67,7 @@ struct Gpu::Sequence_number struct Gpu::Virtual_address { - Genode::uint64_t va; + Genode::uint64_t value; }; diff --git a/repos/os/src/drivers/gpu/intel/main.cc b/repos/os/src/drivers/gpu/intel/main.cc index 1947d2d16a..0bbbe51ded 100644 --- a/repos/os/src/drivers/gpu/intel/main.cc +++ b/repos/os/src/drivers/gpu/intel/main.cc @@ -2023,19 +2023,19 @@ class Gpu::Session_component : public Genode::Session_object } try { - _vgpu.rcs_map_ppgtt(va.va, phys_addr + offset, size); + _vgpu.rcs_map_ppgtt(va.value, phys_addr + offset, size); } catch (Level_4_translation_table::Double_insertion) { - error("PPGTT: Double insertion: va: ", Hex(va.va), " offset: ", Hex(offset), + error("PPGTT: Double insertion: va: ", Hex(va.value), " offset: ", Hex(offset), "size: ", Hex(size)); throw Mapping_vram_failed(); } catch(...) { - error("PPGTT: invalid address/range/alignment: va: ", Hex(va.va), + error("PPGTT: invalid address/range/alignment: va: ", Hex(va.value), " offset: ", Hex(offset), "size: ", Hex(size)); throw Mapping_vram_failed(); } - new (_heap) Vram_local::Mapping(vram_local.mappings, offset, va.va, size); + new (_heap) Vram_local::Mapping(vram_local.mappings, offset, va.value, size); }; if (_resource_guard.avail_caps() == false) @@ -2065,11 +2065,11 @@ class Gpu::Session_component : public Genode::Session_object vram_local.mappings.with_element(offset, [&] (Vram_local::Mapping &mapping) { - if (mapping.ppgtt_va != va.va) { - Genode::error("VRAM: not mapped at ", Hex(va.va), " offset: ", Hex(offset)); + if (mapping.ppgtt_va != va.value) { + Genode::error("VRAM: not mapped at ", Hex(va.value), " offset: ", Hex(offset)); return; } - _vgpu.rcs_unmap_ppgtt(va.va, mapping.ppgtt_va_size); + _vgpu.rcs_unmap_ppgtt(va.value, mapping.ppgtt_va_size); destroy(_heap, &mapping); }, [&] () { error("VRAM: nothing mapped at offset ", Hex(offset)); } From 34b2a83b84eb863b1b4c29efb5a32420dba88e86 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 20 Jan 2023 18:56:16 +0100 Subject: [PATCH 0305/1921] gpu_session: add notes to interface Describe differences for Intel and Lima (Mali) based GPUs. issue #4713 --- repos/os/include/gpu_session/gpu_session.h | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/repos/os/include/gpu_session/gpu_session.h b/repos/os/include/gpu_session/gpu_session.h index 1a5903baf1..86a39050b6 100644 --- a/repos/os/include/gpu_session/gpu_session.h +++ b/repos/os/include/gpu_session/gpu_session.h @@ -3,6 +3,47 @@ * \author Josef Soentgen * \author Sebastian Sumpf * \date 2017-04-28 + * + * Notes: + * + * Because of different GPU driver architectures, functions here may have + * different semantics. In short, libdrm or any other client must be aware of + * the semantics of the respective GPU driver. + * + * Here a short explanation of the difference of Intel and Lima. + * + * Intel: + * + * 'alloc_vram' is used by Iris to create an internal buffer object cache on the + * internal Mesa side. Because the allocated memory is RAM, Iris 'mmap's it + * directly into the clients address space (Genode::attach) Iris assigns Gpu + * virtual addresses to buffers, these addresses may change when buffers are + * reused later. On DRM side, Iris calls DRM_MAP_PPGTT, which we implement + * through 'map_gpu' (establish a GPU mapping) on the client and multiplexer + * side. Graphics memory can be also mapped through the aperture (for example, + * when tiling/untiling buffers, which we currently do not see, but have seen in + * the past). This is what 'map_cpu' is used for on Intel. It adds a GTT mapping + * into the aperture (IOMEM) and returns a dataspace with the physical address + * within the aperture. This dataspace has a different physical address than the + * one returned by 'alloc_vram' but in the end points to the same RAM through + * the GTT. This is now a nop because it is not used, which may change in newer + * Mesa versions again. + * + * Lima: + * + * The ported Lima driver assigns a GPU virtual address during buffer + * allocation. We found a way to at least tell the driver what virtual address + * to use, because on default it will use an arbitrary fitting GPU virtual + * address, which means unlike Iris, the GPU driver manages the virtual address + * space on Lima. So on Lima the semantic is as follows now: + * + * 'alloc_vram' is a nop because we cannot hand a GPU virtual address over, + * instead 'map_gpu' will actually allocate a buffer of given size at a given + * Gpu::Virtual_address in the GPU page tables. On the Mesa side, we implemented + * a virtual address-allocator, and therefore, handle the GPU address space + * ourselves as Iris does in contrib Mesa code. 'map_cpu' will return the + * Dataspace_capability of the allocated buffer that then can be directly + * attached by Mesa because the GPU memory is again ordinary RAM. */ /* From 0a8ac9fe4d0d0cf86da8eaa4c9d995873dd191ef Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Wed, 1 Feb 2023 17:27:46 +0100 Subject: [PATCH 0306/1921] gpu/intel: don't copy sesion cap for onwership check We determine the owner of a Vram object by the session cap of the session that created the object. We should not copy this cap to other places because this increases reference counting, that can become very large with many objects. Therefore, we pass a wrapper 'Owner' object containing the cap by reference. issue #4713 --- repos/os/src/drivers/gpu/intel/main.cc | 89 ++++++++++++++------------ 1 file changed, 49 insertions(+), 40 deletions(-) diff --git a/repos/os/src/drivers/gpu/intel/main.cc b/repos/os/src/drivers/gpu/intel/main.cc index 0bbbe51ded..044b86b4b1 100644 --- a/repos/os/src/drivers/gpu/intel/main.cc +++ b/repos/os/src/drivers/gpu/intel/main.cc @@ -1571,12 +1571,56 @@ class Gpu::Session_component : public Genode::Session_object { private: + /* + * Vram managed by session ep + */ + struct Vram : Rpc_object + { + /* + * Do not copy session cap, since this increases the session-cap reference + * count for each Vram object. + */ + struct Owner { + Capability cap; + }; + + Ram_dataspace_capability ds_cap; + Owner const &owning_session; + + enum { INVALID_FENCE = 0xff }; + Genode::uint32_t fenced { INVALID_FENCE }; + + Igd::Ggtt::Mapping map { }; + + addr_t phys_addr { 0 }; + size_t size { 0 }; + + bool caps_used { false }; + size_t ram_used { 0 }; + + Vram(Ram_dataspace_capability ds_cap, Genode::addr_t phys_addr, + Owner const &owner) + : + ds_cap { ds_cap }, owning_session { owner }, + phys_addr { phys_addr } + { + Dataspace_client buf(ds_cap); + size = buf.size(); + } + + bool owner(Capability const other) + { + return owning_session.cap == other; + } + }; + Genode::Env &_env; Genode::Region_map &_rm; Constrained_ram_allocator _ram; Igd::Device &_device; Heap _heap { _device._pci_backend_alloc, _rm }; - Capability _session_cap { cap() }; + /* used to mark ownership of an allocated VRAM object */ + Vram::Owner _owner { cap() }; Igd::Device::Vgpu _vgpu; @@ -1636,41 +1680,6 @@ class Gpu::Session_component : public Genode::Session_object Resource_guard _resource_guard { _cap_quota_guard(), _ram_quota_guard() }; - /* - * Vram managed by session ep - */ - struct Vram : Rpc_object - { - Ram_dataspace_capability ds_cap; - Session_capability owner_cap; - - enum { INVALID_FENCE = 0xff }; - Genode::uint32_t fenced { INVALID_FENCE }; - - Igd::Ggtt::Mapping map { }; - - addr_t phys_addr { 0 }; - size_t size { 0 }; - - bool caps_used { false }; - size_t ram_used { 0 }; - - Vram(Ram_dataspace_capability ds_cap, Genode::addr_t phys_addr, - Session_capability owner_cap) - : - ds_cap { ds_cap }, owner_cap { owner_cap }, - phys_addr { phys_addr } - { - Dataspace_client buf(ds_cap); - size = buf.size(); - } - - bool owner(Capability other) - { - return owner_cap == other; - } - }; - /* * Vram session/gpu-context local vram */ @@ -1796,7 +1805,7 @@ class Gpu::Session_component : public Genode::Session_object _apply_vram(vram_local, [&](Vram &vram) { - if (vram.owner(_session_cap) == false) return false; + if (vram.owner(cap()) == false) return false; if (vram.map.offset != Igd::Ggtt::Mapping::INVALID_OFFSET) { _device.unmap_vram(_heap, vram.map); @@ -1912,7 +1921,7 @@ class Gpu::Session_component : public Genode::Session_object Ram_dataspace_capability ds_cap = _device.alloc_vram(_heap, size); addr_t phys_addr = _device.dma_addr(ds_cap); - Vram *vram = new (&_heap) Vram(ds_cap, phys_addr, _session_cap); + Vram *vram = new (&_heap) Vram(ds_cap, phys_addr, _owner); _env.ep().manage(*vram); try { @@ -1942,7 +1951,7 @@ class Gpu::Session_component : public Genode::Session_object _apply_vram(vram_local, [&](Vram &vram) { - if (vram.owner(_session_cap) == false) return false; + if (vram.owner(cap()) == false) return false; if (vram.map.offset != Igd::Ggtt::Mapping::INVALID_OFFSET) { Genode::error("cannot free mapped vram"); @@ -2088,7 +2097,7 @@ class Gpu::Session_component : public Genode::Session_object Vram *v = nullptr; auto lookup = [&] (Vram &vram) { - if (!vram.map.cap.valid() || !vram.owner(_session_cap)) { return false; } + if (!vram.map.cap.valid() || !vram.owner(cap())) { return false; } v = &vram; return false; }; From 73f7f8aef6f3255ec0829f2201261564d60052a6 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 9 Feb 2023 16:40:00 +0100 Subject: [PATCH 0307/1921] dde_linux: generalize kmalloc_order() implementation --- repos/dde_linux/src/app/wireguard/lx_emul.c | 8 ------- .../src/lib/lx_emul/shadow/mm/slab_common.c | 11 ++++++++++ repos/pc/lib/import/import-pc_lx_emul.mk | 1 - repos/pc/src/lib/pc/lx_emul/slab_common.c | 22 ------------------- repos/pc/src/pc_linux/target.inc | 1 + 5 files changed, 12 insertions(+), 31 deletions(-) delete mode 100644 repos/pc/src/lib/pc/lx_emul/slab_common.c diff --git a/repos/dde_linux/src/app/wireguard/lx_emul.c b/repos/dde_linux/src/app/wireguard/lx_emul.c index f2a4a1517b..a32acb80eb 100644 --- a/repos/dde_linux/src/app/wireguard/lx_emul.c +++ b/repos/dde_linux/src/app/wireguard/lx_emul.c @@ -70,14 +70,6 @@ int __must_check get_random_bytes_arch(void * buf, int nbytes) } -#include - -void * kmalloc_order(size_t size,gfp_t flags,unsigned int order) -{ - return kmalloc(size, flags); -} - - #include void * kvmalloc_node(size_t size,gfp_t flags,int node) diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/mm/slab_common.c b/repos/dde_linux/src/lib/lx_emul/shadow/mm/slab_common.c index 0054b70677..78bae4588f 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/mm/slab_common.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/mm/slab_common.c @@ -14,6 +14,7 @@ #include #include #include <../mm/slab.h> +#include <../mm/internal.h> #include #include @@ -48,3 +49,13 @@ size_t ksize(const void * objp) return __ksize(objp); } + + +/* + * We can use our __kmalloc() implementation here as it supports large + * allocations well. + */ +void * kmalloc_order(size_t size, gfp_t flags, unsigned int order) +{ + return __kmalloc(size, flags); +} diff --git a/repos/pc/lib/import/import-pc_lx_emul.mk b/repos/pc/lib/import/import-pc_lx_emul.mk index 55ab8d47ea..d67b81aee7 100644 --- a/repos/pc/lib/import/import-pc_lx_emul.mk +++ b/repos/pc/lib/import/import-pc_lx_emul.mk @@ -47,7 +47,6 @@ SRC_C += lx_emul/shadow/fs/sysfs/symlink.c SRC_C += lx_emul/mapping.c SRC_C += lx_emul/page_alloc.c SRC_C += lx_emul/sched_core.c -SRC_C += lx_emul/slab_common.c SRC_C += lx_emul/vmalloc.c SRC_C += lx_emul/delay.c diff --git a/repos/pc/src/lib/pc/lx_emul/slab_common.c b/repos/pc/src/lib/pc/lx_emul/slab_common.c deleted file mode 100644 index dfda36bf31..0000000000 --- a/repos/pc/src/lib/pc/lx_emul/slab_common.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * \brief Supplement for emulation of mm/slab_common.c - * \author Josef Soentgen - * \date 2022-04-05 - */ - -/* - * Copyright (C) 2022 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - - -#include - -void * kmalloc_order(size_t size, gfp_t flags, unsigned int order) -{ - return kmalloc(size, flags); -} - - diff --git a/repos/pc/src/pc_linux/target.inc b/repos/pc/src/pc_linux/target.inc index ebcaae8d24..cf5793d16d 100644 --- a/repos/pc/src/pc_linux/target.inc +++ b/repos/pc/src/pc_linux/target.inc @@ -47,6 +47,7 @@ LX_ENABLE += FB # mandatory fs support LX_ENABLE += PROC_FS SYSFS +# disable optimization not possible in PIC code under Genode LX_DISABLE += CC_HAS_ASM_GOTO # slim down kernel by removing superfluous drivers From 07e3e09652427fe35f2e1726b681151d85c73d44 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 9 Feb 2023 11:26:57 +0100 Subject: [PATCH 0308/1921] util/string.h: add 'Const_byte_range_ptr' The new 'Const_byte_range_ptr' type is suitable as argument type that refers to a read-only byte buffer, e.g., the source buffer of a write operation. --- repos/base/include/util/string.h | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/repos/base/include/util/string.h b/repos/base/include/util/string.h index 5eb4eb2162..8228e4ab25 100644 --- a/repos/base/include/util/string.h +++ b/repos/base/include/util/string.h @@ -18,12 +18,14 @@ #include #include #include +#include #include namespace Genode { class Number_of_bytes; class Byte_range_ptr; + class Const_byte_range_ptr; class Cstring; template class String; } @@ -69,21 +71,37 @@ class Genode::Number_of_bytes /** - * Data structure for describing a byte buffer + * Data structure for describing a mutable byte buffer * * The type is intended to be used as 'Byte_range_ptr const &' argument. - * It is deliberately non-copyable. */ -struct Genode::Byte_range_ptr +struct Genode::Byte_range_ptr : Noncopyable { - char * const start; - size_t const num_bytes; + struct { + char * const start; + size_t const num_bytes; + }; Byte_range_ptr(char *start, size_t num_bytes) : start(start), num_bytes(num_bytes) { } }; +/** + * Data structure for describing a constant byte buffer + */ +struct Genode::Const_byte_range_ptr : Noncopyable +{ + struct { + char const * const start; + size_t const num_bytes; + }; + + Const_byte_range_ptr(char const *start, size_t num_bytes) + : start(start), num_bytes(num_bytes) { } +}; + + /*********************** ** Utility functions ** ***********************/ From b88951345f4ddc2e2ddf1779ea1714bf70462bed Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 10 Feb 2023 08:53:08 +0100 Subject: [PATCH 0309/1921] depot: recipe for pkg/stdin2out --- repos/libports/recipes/pkg/stdin2out/README | 3 +++ repos/libports/recipes/pkg/stdin2out/archives | 4 ++++ repos/libports/recipes/pkg/stdin2out/hash | 1 + repos/libports/recipes/pkg/stdin2out/runtime | 12 ++++++++++++ 4 files changed, 20 insertions(+) create mode 100644 repos/libports/recipes/pkg/stdin2out/README create mode 100644 repos/libports/recipes/pkg/stdin2out/archives create mode 100644 repos/libports/recipes/pkg/stdin2out/hash create mode 100644 repos/libports/recipes/pkg/stdin2out/runtime diff --git a/repos/libports/recipes/pkg/stdin2out/README b/repos/libports/recipes/pkg/stdin2out/README new file mode 100644 index 0000000000..7d952e48a6 --- /dev/null +++ b/repos/libports/recipes/pkg/stdin2out/README @@ -0,0 +1,3 @@ + + Utility to redirect file content to another file + diff --git a/repos/libports/recipes/pkg/stdin2out/archives b/repos/libports/recipes/pkg/stdin2out/archives new file mode 100644 index 0000000000..c473806bc5 --- /dev/null +++ b/repos/libports/recipes/pkg/stdin2out/archives @@ -0,0 +1,4 @@ +_/src/stdin2out +_/src/libc +_/src/vfs +_/src/posix diff --git a/repos/libports/recipes/pkg/stdin2out/hash b/repos/libports/recipes/pkg/stdin2out/hash new file mode 100644 index 0000000000..437b8bbed2 --- /dev/null +++ b/repos/libports/recipes/pkg/stdin2out/hash @@ -0,0 +1 @@ +2023-01-31 b3ddb9062413d40ee5b1b48948a8c4a51e8cdbf7 diff --git a/repos/libports/recipes/pkg/stdin2out/runtime b/repos/libports/recipes/pkg/stdin2out/runtime new file mode 100644 index 0000000000..860af34dba --- /dev/null +++ b/repos/libports/recipes/pkg/stdin2out/runtime @@ -0,0 +1,12 @@ + + + + + + + + + + + + From e6c64290faeb9cc912f83fa8d9aa1ec7a39c9a60 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 10 Feb 2023 13:40:14 +0100 Subject: [PATCH 0310/1921] libpng_static: silent strncpy warnings Ref genodelabs/genode#4344 --- repos/demo/lib/mk/libpng_static.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/demo/lib/mk/libpng_static.mk b/repos/demo/lib/mk/libpng_static.mk index 313e23bada..e0ab647a57 100644 --- a/repos/demo/lib/mk/libpng_static.mk +++ b/repos/demo/lib/mk/libpng_static.mk @@ -7,6 +7,9 @@ LIBS = mini_c libz_static CC_WARN = -Wall -Wno-address -Wno-misleading-indentation +# silent strncpy warnings in the PNG contrib code +CC_C_OPT += -Wno-stringop-truncation + vpath % $(REP_DIR)/src/lib/libpng/contrib include $(REP_DIR)/lib/import/import-libpng_static.mk From c0e98f4481cdac834a653b775af41e310c543d65 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 10 Feb 2023 13:59:20 +0100 Subject: [PATCH 0311/1921] base: fix conversion errors of smp timeout test The cpu affinity index is an int no unsigned long within the interface definition. Ref genodelabs/genode#4344 --- repos/base/src/test/timeout_smp/main.cc | 6 +++--- repos/base/src/test/timeout_smp/target.mk | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/repos/base/src/test/timeout_smp/main.cc b/repos/base/src/test/timeout_smp/main.cc index 70d7a1dfea..8946f7da1d 100644 --- a/repos/base/src/test/timeout_smp/main.cc +++ b/repos/base/src/test/timeout_smp/main.cc @@ -42,7 +42,7 @@ class Test_thread Env &env, TYPE &object, Method method, - unsigned long cpu_idx, + int cpu_idx, Affinity::Space affinity_space) : Thread { @@ -80,7 +80,7 @@ class Test_smp_2 unsigned long _count_3 { 0 }; unsigned long _count_4 { 0 }; unsigned long _count_5 { 0 }; - unsigned long _cpu_idx { 1 }; + int _cpu_idx { 1 }; bool volatile _timeouts_discarded { false }; bool _done_called { false }; Mutex _done_mutex { }; @@ -211,7 +211,7 @@ class Test_smp_1 Env &_env; unsigned long &_nr_of_errors; - unsigned long _cpu_idx { 1 }; + int _cpu_idx { 1 }; bool _max_nr_of_handle_calls_reached { false }; Timer::Connection _timeout_timer { _env }; Timer::Connection _sleep_timer { _env }; diff --git a/repos/base/src/test/timeout_smp/target.mk b/repos/base/src/test/timeout_smp/target.mk index e7820bfbd8..e8f4eaf79e 100644 --- a/repos/base/src/test/timeout_smp/target.mk +++ b/repos/base/src/test/timeout_smp/target.mk @@ -1,5 +1,3 @@ TARGET = test-timeout_smp SRC_CC = main.cc LIBS = base - -CC_CXX_WARN_STRICT_CONVERSION = From b8d8ff6d4dd1891e81d05965d774f42ef877ce81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Wed, 14 Dec 2022 14:09:24 +0100 Subject: [PATCH 0312/1921] libdrm/lima: use sync-fd range beyond libc's reach Sync file-descriptors a purely virtual and are not known by the libc and should be only accessed by 'drm_poll'. To prevent accidental access move them to range never used by the libc fd allocator. Issue #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 2a617a924f..1634dc8351 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -769,7 +769,8 @@ class Lima::Call public: - static constexpr int const SYNC_FD { 384 }; + /* arbitrary start value out of the libc's FD alloc range */ + static constexpr int const SYNC_FD { 10000 }; Call() { From 401da72a86f84a0a8efe9504e35e347c22af77e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 9 Feb 2023 17:31:34 +0100 Subject: [PATCH 0313/1921] libdrm/lima: remove try-catch from ioctl call Remove the exception handling as at this point all exceptions should have been handled internally already. Issue #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 1634dc8351..a4255a83a8 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -874,20 +874,14 @@ int lima_drm_ioctl(unsigned long request, void *arg) if (verbose_ioctl) dump_ioctl(request); - try { - int ret = _drm->ioctl(request, arg); + int const ret = _drm->ioctl(request, arg); - if (verbose_ioctl) - Genode::log("returned ", ret); - - pthread_mutex_unlock(&ioctl_mutex); - - return ret; - } catch (...) { } + if (verbose_ioctl) + Genode::log("returned ", ret); pthread_mutex_unlock(&ioctl_mutex); - return -1; + return ret; } From da32849ac235a0b5f5a81eb1defc6bb30f0d9d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 20 Dec 2022 15:14:23 +0000 Subject: [PATCH 0314/1921] libdrm/lima: move sync fd handling into DRM object Converting from the sync-fd to the actual handle is internal implementation detail. Issue #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 26 +++++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index a4255a83a8..8c010021e8 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -436,8 +436,14 @@ class Lima::Call } while (true); } - void _wait_for_syncobj(unsigned int handle) + int _wait_for_syncobj(int fd) { + if (fd < SYNC_FD) { + Genode::warning("ignore invalid sync fd: ", fd); + return -1; + } + + unsigned const handle = fd - SYNC_FD; Syncobj::Id_space::Id syncobj_id { .value = handle }; try { @@ -453,7 +459,12 @@ class Lima::Call } while (true); }; _syncobj_space.apply(syncobj_id, wait); - } catch (Genode::Id_space::Unknown_id) { } + } catch (Genode::Id_space::Unknown_id) { + Genode::warning("ignore unknown sync fd: ", fd); + return -1; + } + + return 0; } template @@ -807,6 +818,11 @@ class Lima::Call : _generic_ioctl(command_number(request), arg); } + int wait_for_syncobj(int fd) + { + return _wait_for_syncobj(fd); + } + void *mmap(unsigned long offset, unsigned long /* size */) { /* @@ -907,8 +923,8 @@ int lima_drm_poll(int fd) return -1; } - int const handle = fd - Lima::Call::SYNC_FD; - _drm->wait_for_syncobj((unsigned)handle); + int const ret = _drm->wait_for_syncobj(fd); + pthread_mutex_unlock(&poll_mutex); - return 0; + return ret; } From 909b25db57f8e0a9d9f7af0745ecbf38d837bca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 20 Dec 2022 16:10:16 +0000 Subject: [PATCH 0315/1921] libdrm/lima: refactor session and context handling Merge 'Gpu_session' and 'Gpu_context' and create the main session as context. Issue #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 156 +++++++++----------- 1 file changed, 68 insertions(+), 88 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 8c010021e8..8ceaf8a2f6 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -273,58 +273,75 @@ class Lima::Call struct Gpu_context { - int const fd; - unsigned long const _gpu_id; + private: - Gpu::Connection &_gpu { *vfs_gpu_connection(_gpu_id) }; + /* + * Noncopyable + */ + Gpu_context(Gpu_context const &) = delete; + Gpu_context &operator=(Gpu_context const &) = delete; - using Id_space = Genode::Id_space; - Id_space::Element const _elem; + static int _open_gpu() + { + int const fd = ::open("/dev/gpu", 0); + if (fd < 0) { + Genode::error("Failed to open '/dev/gpu': ", + "try configure '' in 'dev' directory of VFS'"); + throw Gpu::Session::Invalid_state(); + } + return fd; + } - Gpu_context(int fd, unsigned long gpu, - Genode::Id_space &space) - : fd { fd }, _gpu_id { gpu }, _elem { *this, space } { } + static unsigned long _stat_gpu(int fd) + { + struct ::stat buf; + if (::fstat(fd, &buf) < 0) { + Genode::error("Could not stat '/dev/gpu'"); + ::close(fd); + throw Gpu::Session::Invalid_state(); + } + return buf.st_ino; + } - virtual ~Gpu_context() - { - ::close(fd); - } + int const _fd; + unsigned long const _id; - unsigned long id() const - { - return _elem.id().value; - } + Genode::Id_space::Element const _elem; - Gpu::Connection& gpu() - { - return _gpu; - } + + public: + + Gpu_context(Genode::Id_space &space) + : + _fd { _open_gpu() }, + _id { _stat_gpu(_fd) }, + _elem { *this, space } + { } + + ~Gpu_context() + { + ::close(_fd); + } + + unsigned long id() const + { + return _elem.id().value; + } + + Gpu::Connection& gpu() + { + return *vfs_gpu_connection(_id); + } + + int fd() const + { + return _fd; + } }; using Gpu_context_space = Genode::Id_space; Gpu_context_space _gpu_context_space { }; - Gpu_context &_create_ctx() - { - int const fd = ::open("/dev/gpu", 0); - if (fd < 0) { - Genode::error("Failed to open '/dev/gpu': ", - "try configure '' in 'dev' directory of VFS'"); - throw Gpu::Session::Invalid_state(); - } - - struct ::stat buf; - if (::fstat(fd, &buf) < 0) { - Genode::error("Could not stat '/dev/gpu'"); - ::close(fd); - throw Gpu::Session::Invalid_state(); - } - Gpu_context * context = - new (_heap) Gpu_context(fd, buf.st_ino, _gpu_context_space); - - return *context; - } - struct Syncobj { /* @@ -371,47 +388,9 @@ class Lima::Call }; Genode::Id_space _syncobj_space { }; - struct Gpu_session - { - int const fd; - unsigned long const id; + Gpu_context _main_ctx { _gpu_context_space }; - Gpu_session(int fd, unsigned long id) - : fd { fd }, id { id } { } - - virtual ~Gpu_session() - { - ::close(fd); - } - - Gpu::Connection &gpu() - { - return *vfs_gpu_connection(id); - } - }; - - Gpu_session _open_gpu() - { - int const fd = ::open("/dev/gpu", 0); - if (fd < 0) { - Genode::error("Failed to open '/dev/gpu': ", - "try configure '' in 'dev' directory of VFS'"); - throw Gpu::Session::Invalid_state(); - } - - struct ::stat buf; - if (::fstat(fd, &buf) < 0) { - Genode::error("Could not stat '/dev/gpu'"); - ::close(fd); - throw Gpu::Session::Invalid_state(); - } - - return Gpu_session { fd, buf.st_ino }; - } - - Gpu_session _gpu_session { _open_gpu() }; - - Gpu::Connection &_gpu { _gpu_session.gpu() }; + Gpu::Connection &_gpu { _main_ctx.gpu() }; Gpu::Info_lima const &_gpu_info { *_gpu.attached_info() }; @@ -428,11 +407,11 @@ class Lima::Call { Buffer_id const id { .value = handle }; do { - if (_gpu.set_tiling_gpu(id, 0, op)) + if (_main_ctx.gpu().set_tiling(id, 0, op)) break; char buf; - (void)::read(_gpu_session.fd, &buf, sizeof(buf)); + (void)::read(_main_ctx.fd(), &buf, sizeof(buf)); } while (true); } @@ -455,7 +434,7 @@ class Lima::Call break; char buf; - (void)::read(gc.fd, &buf, sizeof(buf)); + (void)::read(gc.fd(), &buf, sizeof(buf)); } while (true); }; _syncobj_space.apply(syncobj_id, wait); @@ -570,7 +549,7 @@ class Lima::Call int _drm_lima_gem_submit(drm_lima_gem_submit &arg) { - Gpu_context::Id_space::Id ctx_id { .value = arg.ctx }; + Gpu_context_space::Id ctx_id { .value = arg.ctx }; Syncobj::Id_space::Id syncobj_id { .value = arg.out_sync }; @@ -634,9 +613,10 @@ class Lima::Call int _drm_lima_ctx_create(drm_lima_ctx_create &arg) { try { - Gpu_context &ctx = _create_ctx(); + Gpu_context * ctx = + new (_heap) Gpu_context(_gpu_context_space); - arg.id = ctx.id(); + arg.id = ctx->id(); return 0; } catch (... /* intentional catch-all ... */) { /* ... as the lima GPU driver will not throw */ @@ -646,7 +626,7 @@ class Lima::Call int _drm_lima_ctx_free(drm_lima_ctx_free &arg) { - Gpu_context::Id_space::Id id { .value = arg.id }; + Gpu_context_space::Id id { .value = arg.id }; bool result = false; auto free_ctx = [&] (Gpu_context &ctx) { From 46fc41ba50f137edb09a57eaea135afa7566b511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 20 Dec 2022 16:16:14 +0000 Subject: [PATCH 0316/1921] libdrm/lima: rename Syncobj_space Align the naming with the 'Gpu_context_space'. Issue #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 8ceaf8a2f6..269aeed035 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -354,10 +354,9 @@ class Lima::Call Gpu_context *_gc { nullptr }; Gpu::Sequence_number _seqno { 0 }; - using Id_space = Genode::Id_space; - Id_space::Element const _elem; + Genode::Id_space::Element const _elem; - Syncobj(Id_space &space) + Syncobj(Genode::Id_space &space) : _elem { *this, space } { } unsigned long id() const @@ -386,7 +385,8 @@ class Lima::Call return _seqno; } }; - Genode::Id_space _syncobj_space { }; + using Syncobj_space = Genode::Id_space; + Syncobj_space _syncobj_space { }; Gpu_context _main_ctx { _gpu_context_space }; @@ -423,7 +423,7 @@ class Lima::Call } unsigned const handle = fd - SYNC_FD; - Syncobj::Id_space::Id syncobj_id { .value = handle }; + Syncobj_space::Id syncobj_id { .value = handle }; try { auto wait = [&] (Syncobj &sync_obj) { @@ -551,7 +551,7 @@ class Lima::Call { Gpu_context_space::Id ctx_id { .value = arg.ctx }; - Syncobj::Id_space::Id syncobj_id { .value = arg.out_sync }; + Syncobj_space::Id syncobj_id { .value = arg.out_sync }; bool result = false; _syncobj_space.apply(syncobj_id, [&] (Syncobj &sync_obj) { @@ -715,7 +715,7 @@ class Lima::Call int _drm_syncobj_destroy(drm_syncobj_destroy &arg) { - Syncobj::Id_space::Id id { .value = arg.handle }; + Syncobj_space::Id id { .value = arg.handle }; bool result = false; _syncobj_space.apply(id, [&] (Syncobj &obj) { From 66fedecf347ff1b9d7623fe94ba95449812e8463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 20 Dec 2022 17:35:47 +0000 Subject: [PATCH 0317/1921] libdrm/lima: handle unknown buffer ids gracefully Issue #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 269aeed035..628c913038 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -452,10 +452,12 @@ class Lima::Call Buffer_id const id { .value = handle }; bool found = false; - _buffer_space.apply(id, [&] (Buffer &b) { - fn(b); - found = true; - }); + try { + _buffer_space.apply(id, [&] (Buffer &b) { + fn(b); + found = true; + }); + } catch (Genode::Id_space::Unknown_id) { } return found; } From 89f99df44d3f71f847b1f440fe50a271649b09bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 20 Dec 2022 17:34:01 +0000 Subject: [PATCH 0318/1921] libdrm/lima: check buffer id in WAIT Issue #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 47 +++++++++++---------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 628c913038..2636ba7950 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -396,6 +396,22 @@ class Lima::Call Gpu::Vram_id_space _buffer_space { }; + template + bool _apply_handle(uint32_t handle, FN const &fn) + { + Buffer_id const id { .value = handle }; + + bool found = false; + try { + _buffer_space.apply(id, [&] (Buffer &b) { + fn(b); + found = true; + }); + } catch (Genode::Id_space::Unknown_id) { } + + return found; + } + /* * Play it safe, glmark2 apparently submits araound 110 KiB at * some point. @@ -405,14 +421,15 @@ class Lima::Call void _wait_for_mapping(uint32_t handle, unsigned op) { - Buffer_id const id { .value = handle }; - do { - if (_main_ctx.gpu().set_tiling(id, 0, op)) - break; + (void)_apply_handle(handle, [&] (Buffer &b) { + do { + if (_main_ctx.gpu().set_tiling(b.id(), 0, op)) + break; - char buf; - (void)::read(_main_ctx.fd(), &buf, sizeof(buf)); - } while (true); + char buf; + (void)::read(_main_ctx.fd(), &buf, sizeof(buf)); + } while (true); + }); } int _wait_for_syncobj(int fd) @@ -446,22 +463,6 @@ class Lima::Call return 0; } - template - bool _apply_handle(uint32_t handle, FN const &fn) - { - Buffer_id const id { .value = handle }; - - bool found = false; - try { - _buffer_space.apply(id, [&] (Buffer &b) { - fn(b); - found = true; - }); - } catch (Genode::Id_space::Unknown_id) { } - - return found; - } - Dataspace_capability _lookup_cap_from_handle(uint32_t handle) { Dataspace_capability cap { }; From 6e1517ca3c6759cb41cb33c165a48f11cefc7737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 10 Jan 2023 18:16:00 +0100 Subject: [PATCH 0319/1921] libdrm/lima: introduce disjunct contexts Prior to this change the libdrm Lima implementation supported the creation of multiple contexts where each context, however, was treated as the same client like it was done in the Lima driver itself. With this commit each context becomes its own client while the main context always performs all buffer object related allocation and the other context import each needed BO before submitting. Fixes #4760. --- repos/libports/src/lib/libdrm/ioctl_lima.cc | 592 +++++++++++++++----- 1 file changed, 444 insertions(+), 148 deletions(-) diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 2636ba7950..2415914b76 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -38,7 +38,7 @@ extern "C" { } -enum { verbose_ioctl = false }; +static constexpr bool verbose_ioctl = false; /** @@ -122,6 +122,17 @@ namespace Lima { void serialize(drm_lima_gem_submit *submit, char *content); + template + void for_each_submit_bo(drm_lima_gem_submit const &submit, FN const &fn) + { + auto access_bo = [&] (drm_lima_gem_submit_bo const *bo) { + fn(*bo); + }; + + for_each_object((drm_lima_gem_submit_bo*)submit.bos, + submit.nr_bos, access_bo); + } + size_t get_payload_size(drm_version const &version); } /* anonymous namespace */ @@ -189,19 +200,16 @@ namespace Lima { using namespace Gpu; struct Call; - struct Buffer; } /* namespace Lima */ -namespace Gpu { - using Buffer_id = Vram_id; -} - - -struct Gpu::Vram { }; - -struct Lima::Buffer : Gpu::Vram +/* + * Gpu::Vram encapsulates a buffer object allocation + */ +struct Gpu::Vram { + struct Allocation_failed : Genode::Exception { }; + Gpu::Connection &_gpu; Vram_id_space::Element const _elem; @@ -212,22 +220,31 @@ struct Lima::Buffer : Gpu::Vram Genode::Constructible _attached_buffer { }; - Buffer(Gpu::Connection &gpu, - size_t size, - Gpu::Virtual_address va, - Vram_id_space &space) + Vram(Gpu::Connection &gpu, + size_t size, + Gpu::Virtual_address va, + Vram_id_space &space) : _gpu { gpu }, _elem { *this, space }, - size { size }, va { va } + size { size }, + va { va } { + /* + * As we cannot easily enforce an GPU virtual-address after the + * fact when using the DRM Lima API we instead use 'map_gpu' to + * create the buffer object. + * + * A valid virtual-address needs to be enforced before attempting + * the allocation. + */ if (!_gpu.map_gpu(_elem.id(), size, 0, va)) - throw -1; + throw Allocation_failed(); cap = _gpu.map_cpu(_elem.id(), Gpu::Mapping_attributes()); } - ~Buffer() + ~Vram() { _gpu.unmap_gpu(_elem.id(), 0, Virtual_address()); } @@ -246,7 +263,7 @@ struct Lima::Buffer : Gpu::Vram return reinterpret_cast(_attached_buffer->local_addr()); } - Gpu::Buffer_id id() const + Gpu::Vram_id id() const { return _elem.id(); } @@ -265,12 +282,75 @@ class Lima::Call Genode::Env &_env { *vfs_gpu_env() }; Genode::Heap _heap { _env.ram(), _env.rm() }; - Genode::Allocator_avl _va_alloc { &_heap }; + + /* + * The virtual-address allocator manages all GPU virtual + * addresses, which are shared by all contexts. + */ + struct Va_allocator + { + Genode::Allocator_avl _alloc; + + Va_allocator(Genode::Allocator &alloc) + : + _alloc { &alloc } + { + /* + * The end of range correspondes to LIMA_VA_RESERVE_START + * in Linux minus the page we omit at the start. + */ + _alloc.add_range(0x1000, 0xfff00000ul - 0x1000); + } + + Gpu::Virtual_address alloc(uint32_t size) + { + return Gpu::Virtual_address { _alloc.alloc_aligned(size, 12).convert<::uint64_t>( + [&] (void *ptr) { return (::uint64_t)ptr; }, + [&] (Range_allocator::Alloc_error) -> ::uint64_t { + error("Could not allocate GPU virtual address for size: ", size); + return 0; + }) }; + } + + void free(Gpu::Virtual_address va) + { + _alloc.free((void*)va.value); + } + }; + + Va_allocator _va_alloc { _heap }; /***************** ** Gpu session ** *****************/ + /* + * A Buffer wraps the actual Vram object and is used + * locally in each Gpu_context. + */ + struct Buffer + { + Genode::Id_space::Element const _elem; + + Gpu::Vram const &_vram; + + Buffer(Genode::Id_space &space, + Gpu::Vram const &vram) + : + _elem { *this, space, + Genode::Id_space::Id { .value = vram.id().value } }, + _vram { vram }, + + busy { false } + { } + + ~Buffer() { } + + bool busy; + }; + + using Buffer_space = Genode::Id_space; + struct Gpu_context { private: @@ -281,12 +361,14 @@ class Lima::Call Gpu_context(Gpu_context const &) = delete; Gpu_context &operator=(Gpu_context const &) = delete; + Genode::Allocator &_alloc; + static int _open_gpu() { int const fd = ::open("/dev/gpu", 0); if (fd < 0) { - Genode::error("Failed to open '/dev/gpu': ", - "try configure '' in 'dev' directory of VFS'"); + error("Failed to open '/dev/gpu': ", + "try configure '' in 'dev' directory of VFS'"); throw Gpu::Session::Invalid_state(); } return fd; @@ -296,7 +378,7 @@ class Lima::Call { struct ::stat buf; if (::fstat(fd, &buf) < 0) { - Genode::error("Could not stat '/dev/gpu'"); + error("Could not stat '/dev/gpu'"); ::close(fd); throw Gpu::Session::Invalid_state(); } @@ -306,33 +388,184 @@ class Lima::Call int const _fd; unsigned long const _id; + Gpu::Connection &_gpu { *vfs_gpu_connection(_id) }; + Genode::Id_space::Element const _elem; + /* + * The virtual-address allocator is solely used for + * the construction of the context-local exec buffer + * as the Gpu session requires a valid Vram object + * for it. + */ + Va_allocator &_va_alloc; + + /* + * The vram space is used for actual memory allocations. + * Each and every Gpu_context is able to allocate memory + * at the Gpu session although normally the main context + * is going to alloc memory for buffer objects. + */ + Gpu::Vram_id_space _vram_space { }; + + template + void _try_apply(Gpu::Vram_id id, FN const &fn) + { + try { + _vram_space.apply(id, fn); + } catch (Vram_id_space::Unknown_id) { } + } + + + /* + * The buffer space is used to attach a given buffer + * object backed by an vram allocation - normally from the + * main context - to the given context, i.e., it is mapped + * when SUBMIT is executed. + */ + Buffer_space _buffer_space { }; + + template + void _try_apply(Buffer_space::Id id, FN const &fn) + { + try { + _buffer_space.apply(id, fn); + } catch (Buffer_space::Unknown_id) { } + } + + /* + * Each context contains its on exec buffer object that is + * required by the Gpu session to pass on driver specific + * command buffer. + */ + Gpu::Vram *_exec_buffer; + public: - Gpu_context(Genode::Id_space &space) + bool defer_destruction { false }; + + static constexpr size_t _exec_buffer_size = { 256u << 10 }; + + Gpu_context(Genode::Allocator &alloc, + Genode::Id_space &space, + Va_allocator &va_alloc) : + _alloc { alloc }, _fd { _open_gpu() }, _id { _stat_gpu(_fd) }, - _elem { *this, space } + _elem { *this, space }, + _va_alloc { va_alloc }, + _exec_buffer { new (alloc) Gpu::Vram(_gpu, _exec_buffer_size, + _va_alloc.alloc(_exec_buffer_size), + _vram_space) } { } ~Gpu_context() { + while (_buffer_space.apply_any([&] (Buffer &b) { + Genode::destroy(_alloc, &b); + })) { ; } + + /* + * 'close' below will destroy the Gpu session belonging + * to this context so free the exec buffer beforehand. + */ + while (_vram_space.apply_any([&] (Vram &v) { + Genode::destroy(_alloc, &v); + })) { ; } + ::close(_fd); } + Gpu::Connection& gpu() + { + return _gpu; + } + + Gpu::Vram_capability export_vram(Gpu::Vram_id id) + { + Gpu::Vram_capability cap { }; + _try_apply(id, [&] (Gpu::Vram const &b) { + cap = _gpu.export_vram(b.id()); + }); + return cap; + } + + Buffer *import_vram(Gpu::Vram_capability cap, Gpu::Vram const &v) + { + Buffer *b = nullptr; + + try { _gpu.import_vram(cap, v.id()); } + catch (... /* should only throw Invalid_state*/) { + return nullptr; } + + try { b = new (_alloc) Buffer(_buffer_space, v); } + catch (... /* either conflicting id or alloc failure */) { + return nullptr; } + + return b; + } + + void free_buffer(Buffer_space::Id id) + { + _try_apply(id, [&] (Buffer &b) { + + /* + * We have to invalidate any imported buffer as otherwise + * the object stays ref-counted in the driver and the + * VA occupied by the object is not freed. + * + * For that we repurpose 'unmap_cpu' that otherwise is + * not used. + */ + _gpu.unmap_cpu(Gpu::Vram_id { .value = id.value }); + Genode::destroy(_alloc, &b); + }); + } + + bool buffer_space_contains(Buffer_space::Id id) + { + bool found = false; + _try_apply(id, [&] (Buffer const &) { found = true; }); + return found; + } + + Gpu::Vram_id_space &vram_space() + { + return _vram_space; + } + + template + void with_vram_space(Gpu::Vram_id id, FN const &fn) + { + _try_apply(id, fn); + } + + template + void access_exec_buffer(Genode::Env &env, FN const &fn) + { + /* + * 'env' is solely needed for mapping the exec buffer + * and is therefor used here locally. + */ + if (_exec_buffer->mmap(env)) { + char *ptr = (char*)_exec_buffer->mmap_addr(); + if (ptr) + fn(ptr, _exec_buffer_size); + } + } + + Gpu::Vram_id exec_buffer_id() const + { + return _exec_buffer->id(); + } + unsigned long id() const { return _elem.id().value; } - Gpu::Connection& gpu() - { - return *vfs_gpu_connection(_id); - } - int fd() const { return _fd; @@ -351,33 +584,33 @@ class Lima::Call Syncobj &operator=(Syncobj const &) = delete; - Gpu_context *_gc { nullptr }; + Gpu_context_space::Id _gc_id { .value = ~0u }; + Gpu::Sequence_number _seqno { 0 }; Genode::Id_space::Element const _elem; + + bool sync_fd { false }; + bool defer_destruction { false }; + Syncobj(Genode::Id_space &space) : _elem { *this, space } { } - unsigned long id() const + void adopt(Gpu_context_space::Id id, Gpu::Sequence_number seqno) { - return _elem.id().value; - } - - void adopt(Gpu_context &gc, Gpu::Sequence_number seqno) - { - _gc = &gc; + _gc_id = id; _seqno = seqno; } - Gpu_context &gpu_context() + Genode::Id_space::Id id() const { - if (!_gc) { - struct Invalid_gpu_context { }; - throw Invalid_gpu_context(); - } + return _elem.id(); + } - return *_gc; + Gpu_context_space::Id ctx_id() const + { + return _gc_id; } Gpu::Sequence_number seqno() const @@ -388,46 +621,35 @@ class Lima::Call using Syncobj_space = Genode::Id_space; Syncobj_space _syncobj_space { }; - Gpu_context _main_ctx { _gpu_context_space }; + Gpu_context *_main_ctx { + new (_heap) Gpu_context(_heap, _gpu_context_space, _va_alloc) }; - Gpu::Connection &_gpu { _main_ctx.gpu() }; Gpu::Info_lima const &_gpu_info { - *_gpu.attached_info() }; - - Gpu::Vram_id_space _buffer_space { }; + *_main_ctx->gpu().attached_info() }; template bool _apply_handle(uint32_t handle, FN const &fn) { - Buffer_id const id { .value = handle }; + Vram_id const id { .value = handle }; bool found = false; - try { - _buffer_space.apply(id, [&] (Buffer &b) { - fn(b); - found = true; - }); - } catch (Genode::Id_space::Unknown_id) { } + _main_ctx->with_vram_space(id, [&] (Vram &b) { + fn(b); + found = true; + }); return found; } - /* - * Play it safe, glmark2 apparently submits araound 110 KiB at - * some point. - */ - enum { EXEC_BUFFER_SIZE = 256u << 10 }; - Constructible _exec_buffer { }; - void _wait_for_mapping(uint32_t handle, unsigned op) { - (void)_apply_handle(handle, [&] (Buffer &b) { + (void)_apply_handle(handle, [&] (Vram &b) { do { - if (_main_ctx.gpu().set_tiling(b.id(), 0, op)) + if (_main_ctx->gpu().set_tiling_gpu(b.id(), 0, op)) break; char buf; - (void)::read(_main_ctx.fd(), &buf, sizeof(buf)); + (void)::read(_main_ctx->fd(), &buf, sizeof(buf)); } while (true); }); } @@ -445,18 +667,39 @@ class Lima::Call try { auto wait = [&] (Syncobj &sync_obj) { - Gpu_context &gc = sync_obj.gpu_context(); - do { - if (gc.gpu().complete(sync_obj.seqno())) - break; + auto poll_completion = [&] (Gpu_context &gc) { + do { + if (gc.gpu().complete(sync_obj.seqno())) + break; - char buf; - (void)::read(gc.fd(), &buf, sizeof(buf)); - } while (true); + char buf; + (void)::read(gc.fd(), &buf, sizeof(buf)); + } while (true); + + if (gc.defer_destruction) + Genode::destroy(_heap, &gc); + }; + _gpu_context_space.apply(sync_obj.ctx_id(), + poll_completion); + + if (sync_obj.defer_destruction) + Genode::destroy(_heap, &sync_obj); }; _syncobj_space.apply(syncobj_id, wait); - } catch (Genode::Id_space::Unknown_id) { - Genode::warning("ignore unknown sync fd: ", fd); + + } catch (Syncobj_space::Unknown_id) { + /* + * We could end up here on the last wait when Mesa already + * destroyed the syncobj. For that reason we deferred the + * destruction of the syncobj as well as the referenced ctx. + */ + return -1; + } catch (Gpu_context_space::Unknown_id) { + /* + * We will end up here in case the GP or PP job could not + * be submitted as Mesa does not check for successful + * submission. + */ return -1; } @@ -466,7 +709,7 @@ class Lima::Call Dataspace_capability _lookup_cap_from_handle(uint32_t handle) { Dataspace_capability cap { }; - auto lookup_cap = [&] (Buffer const &b) { + auto lookup_cap = [&] (Vram const &b) { cap = b.cap; }; (void)_apply_handle(handle, lookup_cap); @@ -480,7 +723,7 @@ class Lima::Call int _drm_lima_gem_info(drm_lima_gem_info &arg) { int result = -1; - (void)_apply_handle(arg.handle, [&] (Buffer &b) { + (void)_apply_handle(arg.handle, [&] (Vram &b) { if (!b.mmap(_env)) return; arg.offset = reinterpret_cast<::uint64_t>(b.mmap_addr()); @@ -496,41 +739,35 @@ class Lima::Call return result; } - ::uint64_t _alloc_va(::uint64_t const size) - { - return _va_alloc.alloc_aligned(size, 12).convert<::uint64_t>( - [&] (void *ptr) { return (::uint64_t)ptr; }, - [&] (Range_allocator::Alloc_error) -> ::uint64_t { - error("Could not allocate GPU virtual address for size: ", size); - return 0; - }); - } - template void _alloc_buffer(::uint64_t const size, FUNC const &fn) { size_t donate = size; - Buffer *buffer = nullptr; + Vram *buffer = nullptr; - ::uint64_t va = _alloc_va(size); - if (!va) return; + Gpu::Virtual_address const va = _va_alloc.alloc(size); + if (!va.value) + return; - retry( - [&] () { - retry( + try { + retry( [&] () { - buffer = - new (&_heap) Buffer(_gpu, size, - Gpu::Virtual_address { va }, - _buffer_space); + retry( + [&] () { + buffer = + new (&_heap) Vram(_main_ctx->gpu(), size, va, + _main_ctx->vram_space()); + }, + [&] () { + _main_ctx->gpu().upgrade_caps(2); + }); }, [&] () { - _gpu.upgrade_caps(2); + _main_ctx->gpu().upgrade_ram(donate); }); - }, - [&] () { - _gpu.upgrade_ram(donate); - }); + } catch (Gpu::Vram::Allocation_failed) { + return; + } if (buffer) fn(*buffer); @@ -541,7 +778,7 @@ class Lima::Call ::uint64_t const size = arg.size; try { - _alloc_buffer(size, [&](Buffer const &b) { + _alloc_buffer(size, [&](Vram const &b) { arg.handle = b.id().value; }); return 0; @@ -561,31 +798,71 @@ class Lima::Call _gpu_context_space.apply(ctx_id, [&] (Gpu_context &gc) { - size_t const payload_size = Lima::get_payload_size(arg); - if (payload_size > EXEC_BUFFER_SIZE) { - Genode::error(__func__, ": exec buffer too small (", - (unsigned)EXEC_BUFFER_SIZE, ") needed ", payload_size); - return; - } - /* - * Copy each array flat to the exec buffer and adjust the - * addresses in the submit object. + * Check if we have access to all needed buffer objects and + * if not import them from the main context that normaly performs + * all allocations. */ - char *local_exec_buffer = (char*)_exec_buffer->mmap_addr(); - Genode::memset(local_exec_buffer, 0, EXEC_BUFFER_SIZE); - Lima::serialize(&arg, local_exec_buffer); + + bool all_buffer_mapped = true; + Lima::for_each_submit_bo(arg, [&] (drm_lima_gem_submit_bo const &bo) { + Buffer_space::Id const id = { .value = bo.handle }; + if (!gc.buffer_space_contains(id)) { + + bool imported = false; + (void)_apply_handle(bo.handle, [&] (Gpu::Vram const &v) { + Gpu::Vram_capability cap = _main_ctx->export_vram(v.id()); + if (gc.import_vram(cap, v) == nullptr) + return; + + imported = true; + }); + + if (!imported) + all_buffer_mapped = false; + } + }); + + if (!all_buffer_mapped) + return; + + bool serialized = false; + gc.access_exec_buffer(_env, [&] (char *ptr, size_t size) { + + size_t const payload_size = Lima::get_payload_size(arg); + if (payload_size > size) { + error("exec buffer for context ", ctx_id.value, + " too small, got ", size, " but needed ", + payload_size); + return; + } + + /* + * Copy each array flat to the exec buffer and adjust the + * addresses in the submit object. + */ + Genode::memset(ptr, 0, size); + Lima::serialize(&arg, ptr); + + serialized = true; + }); + + if (!serialized) + return; try { Gpu::Connection &gpu = gc.gpu(); Gpu::Sequence_number const seqno = - gpu.execute(_exec_buffer->id(), 0); + gpu.execute(gc.exec_buffer_id(), 0); - sync_obj.adopt(gc, seqno); + sync_obj.adopt(Gpu_context_space::Id { .value = gc.id() }, + seqno); result = true; - } catch (Gpu::Session::Invalid_state) { } + } catch (Gpu::Session::Invalid_state) { + warning(": could not execute: ", gc.exec_buffer_id().value); + } }); }); @@ -617,7 +894,7 @@ class Lima::Call { try { Gpu_context * ctx = - new (_heap) Gpu_context(_gpu_context_space); + new (_heap) Gpu_context(_heap, _gpu_context_space, _va_alloc); arg.id = ctx->id(); return 0; @@ -633,8 +910,21 @@ class Lima::Call bool result = false; auto free_ctx = [&] (Gpu_context &ctx) { - Genode::destroy(_heap, &ctx); + result = true; + + /* + * If the ctx is currently referenced by a syncobj its + * destruction gets deferred until the final wait-for-syncobj + * call. + */ + _syncobj_space.for_each([&] (Syncobj &obj) { + if (obj.ctx_id().value == ctx.id()) + ctx.defer_destruction = true; + }); + + if (!ctx.defer_destruction) + Genode::destroy(_heap, &ctx); }; _gpu_context_space.apply(id, free_ctx); @@ -675,9 +965,15 @@ class Lima::Call int _drm_gem_close(drm_gem_close const &gem_close) { + auto free_buffer = [&] (Gpu_context &ctx) { + Buffer_space::Id const id { .value = gem_close.handle }; + ctx.free_buffer(id); + }; + _gpu_context_space.for_each(free_buffer); + return _apply_handle(gem_close.handle, - [&] (Lima::Buffer &b) { - _va_alloc.free((void *)b.va.value); + [&] (Gpu::Vram &b) { + _va_alloc.free(b.va); destroy(_heap, &b); }) ? 0 : -1; } @@ -710,7 +1006,7 @@ class Lima::Call { try { Syncobj *obj = new (_heap) Syncobj(_syncobj_space); - arg.handle = (uint32_t)obj->id(); + arg.handle = (uint32_t)obj->id().value; return 0; } catch (... /* XXX which exceptions can occur? */) { } return -1; @@ -722,16 +1018,34 @@ class Lima::Call bool result = false; _syncobj_space.apply(id, [&] (Syncobj &obj) { - Genode::destroy(_heap, &obj); result = true; + + /* + * In case the syncobj was once exported destruction + * gets deferred until the final wait-for-syncobj call. + */ + if (obj.sync_fd) { + obj.defer_destruction = true; + return; + } + + Genode::destroy(_heap, &obj); }); return result ? 0 : -1; } int _drm_syncobj_handle_to_fd(drm_syncobj_handle &arg) { - arg.fd = arg.handle + SYNC_FD; - return 0; + arg.fd = -1; + + Syncobj_space::Id id { .value = arg.handle }; + _syncobj_space.apply(id, [&] (Syncobj &obj) { + obj.sync_fd = true; + + arg.fd = arg.handle + SYNC_FD; + }); + + return arg.fd != -1 ? 0 : -1; } int _generic_ioctl(unsigned cmd, void *arg) @@ -766,32 +1080,15 @@ class Lima::Call /* arbitrary start value out of the libc's FD alloc range */ static constexpr int const SYNC_FD { 10000 }; - Call() - { - _va_alloc.add_range(0x1000, 0xfff00000ul - 0x1000); - - ::uint64_t va = _alloc_va(EXEC_BUFFER_SIZE); - if (!va) throw Gpu::Session::Invalid_state(); - - try { - _exec_buffer.construct(_gpu, - (size_t)EXEC_BUFFER_SIZE, - Gpu::Virtual_address { va }, - _buffer_space); - } catch (...) { - throw Gpu::Session::Invalid_state(); - } - if (!_exec_buffer->mmap(_env)) - throw Gpu::Session::Invalid_state(); - } + Call() { } ~Call() { - while (_gpu_context_space.apply_any([&] (Gpu_context &ctx) { - Genode::destroy(_heap, &ctx); })) { ; } - while (_syncobj_space.apply_any([&] (Syncobj &obj) { Genode::destroy(_heap, &obj); })) { ; } + + while (_gpu_context_space.apply_any([&] (Gpu_context &ctx) { + Genode::destroy(_heap, &ctx); })) { ; } } int ioctl(unsigned long request, void *arg) @@ -840,7 +1137,7 @@ void lima_drm_init() struct ::stat buf; if (stat("/dev/gpu", &buf) < 0) { Genode::error("'/dev/gpu' not accessible: ", - "try configure '' in 'dev' directory of VFS'"); + "try configure '' in 'dev' directory of VFS'"); return; } @@ -879,7 +1176,6 @@ int lima_drm_ioctl(unsigned long request, void *arg) Genode::log("returned ", ret); pthread_mutex_unlock(&ioctl_mutex); - return ret; } From bdf47785b89ed126d7287e1589d18a1f94809d2f Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Thu, 9 Feb 2023 15:07:24 +0100 Subject: [PATCH 0320/1921] vfs: remove 'file_size' from read/write interfaces The 'file_size' type denotes the size of files on disk in bytes. On 32-bit architectures it is larger than the size_t, which refers to in-memory object sizes. Whereas the use of 'file_size' is appropriate for ftruncate and seek, it is not a suitable type for the parameters of read/write operations because those operations refer to in-memory buffers. This patch replaces the use of 'file_size' by size_t. However, since it affects all sites where the read/write interface is uses, it takes the opportunity to replace the C-style (pointer, size) arguments by 'Byte_range_ptr' and 'Const_byte_range_ptr'. Issue #4706 --- repos/dde_linux/src/lib/vfs/lxip/vfs.cc | 204 +++++++-------- repos/dde_rump/src/lib/rump/io.cc | 2 +- repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc | 63 +++-- repos/gems/include/cbe/crypto/interface.h | 18 +- repos/gems/include/cbe/vfs/io_job.h | 29 ++- repos/gems/src/app/cbe_tester/crypto.cc | 73 +++--- repos/gems/src/app/cbe_tester/main.cc | 30 +-- repos/gems/src/app/cbe_tester/trust_anchor.cc | 70 ++--- repos/gems/src/app/vfs_replay/component.cc | 29 ++- repos/gems/src/lib/vfs/audit/vfs_audit.cc | 14 +- repos/gems/src/lib/vfs/cbe/io_job.h | 26 +- repos/gems/src/lib/vfs/cbe/vfs.cc | 174 +++++++------ .../src/lib/vfs/cbe_crypto/aes_cbc/aes_cbc.cc | 27 +- .../src/lib/vfs/cbe_crypto/memcopy/memcopy.cc | 31 +-- repos/gems/src/lib/vfs/cbe_crypto/vfs.cc | 96 ++++--- .../gems/src/lib/vfs/cbe_trust_anchor/vfs.cc | 140 +++++----- repos/gems/src/lib/vfs/gpu/vfs.cc | 11 +- repos/gems/src/lib/vfs/import/plugin.cc | 42 +-- repos/gems/src/lib/vfs/pipe/plugin.cc | 70 +++-- repos/gems/src/lib/vfs/trace/vfs.cc | 12 +- .../gems/src/lib/vfs/ttf/glyphs_file_system.h | 22 +- repos/libports/src/lib/libc/vfs_plugin.cc | 70 +++-- repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc | 37 ++- .../lib/vfs/jitterentropy/vfs_jitterentropy.h | 12 +- .../libports/src/lib/vfs/libusb/vfs_libusb.cc | 6 +- repos/libports/src/lib/vfs/lwip/vfs.cc | 240 +++++++++--------- repos/libports/src/lib/vfs/oss/vfs_oss.cc | 25 +- repos/os/include/os/vfs.h | 52 ++-- repos/os/include/ram_fs/chunk.h | 123 ++++----- repos/os/include/vfs/dir_file_system.h | 26 +- repos/os/include/vfs/file_io_service.h | 12 +- .../include/vfs/readonly_value_file_system.h | 9 +- repos/os/include/vfs/single_file_system.h | 28 +- repos/os/include/vfs/types.h | 2 + repos/os/include/vfs/value_file_system.h | 17 +- repos/os/src/lib/vfs/block_file_system.h | 52 ++-- repos/os/src/lib/vfs/capture/plugin.cc | 11 +- repos/os/src/lib/vfs/fs_file_system.h | 78 +++--- repos/os/src/lib/vfs/inline_file_system.h | 107 ++++---- repos/os/src/lib/vfs/log_file_system.h | 21 +- repos/os/src/lib/vfs/null_file_system.h | 11 +- repos/os/src/lib/vfs/ram_file_system.h | 211 +++++++-------- repos/os/src/lib/vfs/rom_file_system.h | 26 +- repos/os/src/lib/vfs/rtc_file_system.h | 15 +- repos/os/src/lib/vfs/symlink_file_system.h | 13 +- repos/os/src/lib/vfs/tap/nic_file_system.h | 18 +- repos/os/src/lib/vfs/tap/uplink_file_system.h | 16 +- repos/os/src/lib/vfs/tar_file_system.h | 38 ++- repos/os/src/lib/vfs/terminal_file_system.h | 12 +- repos/os/src/lib/vfs/zero_file_system.h | 18 +- repos/os/src/server/fs_report/main.cc | 12 +- repos/os/src/server/vfs/node.h | 39 +-- repos/os/src/server/vfs_block/job.h | 28 +- repos/os/src/test/ram_fs_chunk/main.cc | 31 ++- repos/os/src/test/vfs_stress/main.cc | 17 +- 55 files changed, 1295 insertions(+), 1321 deletions(-) diff --git a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc index 55e8f43c60..07364917f9 100644 --- a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc +++ b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc @@ -183,16 +183,14 @@ struct Vfs::File : Vfs::Node virtual bool poll() { return true; } virtual Lxip::ssize_t write(Lxip_vfs_file_handle &, - char const *src, Genode::size_t len, - file_size) + Const_byte_range_ptr const &, file_size) { Genode::error(name(), " not writeable"); return -1; } - virtual Lxip::ssize_t read(Lxip_vfs_file_handle &, - char *dst, Genode::size_t len, - file_size) + virtual Lxip::ssize_t read(Lxip_vfs_file_handle &, + Byte_range_ptr const &, file_size) { Genode::error(name(), " not readable"); return -1; @@ -217,8 +215,7 @@ struct Vfs::Directory : Vfs::Node Genode::Allocator &alloc, char const*, unsigned, Vfs::Vfs_handle**) = 0; - virtual Lxip::ssize_t read(char *dst, Genode::size_t len, - file_size seek_offset) = 0; + virtual Lxip::ssize_t read(Byte_range_ptr const &, file_size seek_offset) = 0; }; @@ -269,10 +266,8 @@ struct Vfs::Lxip_vfs_handle : Vfs::Vfs_handle */ virtual bool read_ready() const = 0; - virtual Read_result read(char *dst, - file_size count, file_size &out_count) = 0; - virtual Write_result write(char const *src, - file_size count, file_size &out_count) = 0; + virtual Read_result read(Byte_range_ptr const &dst, size_t &out_count) = 0; + virtual Write_result write(Const_byte_range_ptr const &src, size_t &out_count) = 0; virtual Sync_result sync() { return Sync_result::SYNC_OK; } @@ -314,32 +309,32 @@ struct Vfs::Lxip_vfs_file_handle final : Vfs::Lxip_vfs_handle bool read_ready() const override { return (file) ? file->poll() : false; } - Read_result read(char *dst, file_size count, file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (!file) return Read_result::READ_ERR_INVALID; - Lxip::ssize_t res = file->read(*this, dst, count, seek()); + Lxip::ssize_t res = file->read(*this, dst, seek()); if (res < 0) return Read_result::READ_ERR_IO; out_count = res; return Read_result::READ_OK; } - Write_result write(char const *src, file_size count, file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { if (!file) return Write_result::WRITE_ERR_INVALID; - Lxip::ssize_t res = file->write(*this, src, count, seek()); + Lxip::ssize_t res = file->write(*this, src, seek()); if (res < 0) return Write_result::WRITE_ERR_IO; out_count = res; return Write_result::WRITE_OK; } - bool write_content_line(char const *buf, Genode::size_t len) + bool write_content_line(Const_byte_range_ptr const &src) { - if (len > sizeof(content_buffer) - 2) + if (src.num_bytes > sizeof(content_buffer) - 2) return false; - Genode::memcpy(content_buffer, buf, len); - content_buffer[len+0] = '\n'; - content_buffer[len+1] = '\0'; + Genode::memcpy(content_buffer, src.start, src.num_bytes); + content_buffer[src.num_bytes + 0] = '\n'; + content_buffer[src.num_bytes + 1] = '\0'; return true; } @@ -359,15 +354,15 @@ struct Vfs::Lxip_vfs_dir_handle final : Vfs::Lxip_vfs_handle bool read_ready() const override { return true; } - Read_result read(char *dst, file_size count, file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { - Lxip::ssize_t res = dir.read(dst, count, seek()); + Lxip::ssize_t res = dir.read(dst, seek()); if (res < 0) return Read_result::READ_ERR_IO; out_count = res; return Read_result::READ_OK; } - Write_result write(char const*, file_size, file_size &) override { + Write_result write(Const_byte_range_ptr const &, size_t &) override { return Write_result::WRITE_ERR_INVALID; } }; @@ -462,19 +457,19 @@ class Vfs::Lxip_data_file final : public Vfs::Lxip_file } Lxip::ssize_t write(Lxip_vfs_file_handle &, - char const *src, Genode::size_t len, + Const_byte_range_ptr const &src, file_size /* ignored */) override { using namespace Linux; if (!_sock_valid()) return -1; - iovec iov { const_cast(src), len }; + iovec iov { (void *)src.start, src.num_bytes }; msghdr msg = create_msghdr(&_parent.remote_addr(), - sizeof(sockaddr_in), len, &iov); + sizeof(sockaddr_in), src.num_bytes, &iov); - Lxip::ssize_t res = _sock.ops->sendmsg(&_sock, &msg, len); + Lxip::ssize_t res = _sock.ops->sendmsg(&_sock, &msg, src.num_bytes); if (res < 0) _write_err = res; @@ -482,18 +477,18 @@ class Vfs::Lxip_data_file final : public Vfs::Lxip_file } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { using namespace Linux; if (!_sock_valid()) return -1; - iovec iov { dst, len }; + iovec iov { dst.start, dst.num_bytes }; - msghdr msg = create_msghdr(nullptr, 0, len, &iov); + msghdr msg = create_msghdr(nullptr, 0, dst.num_bytes, &iov); - Lxip::ssize_t ret = _sock.ops->recvmsg(&_sock, &msg, len, MSG_DONTWAIT); + Lxip::ssize_t ret = _sock.ops->recvmsg(&_sock, &msg, dst.num_bytes, MSG_DONTWAIT); if (ret == -EAGAIN) throw Would_block(); @@ -519,27 +514,26 @@ class Vfs::Lxip_peek_file final : public Vfs::Lxip_file return true; } - Lxip::ssize_t write(Lxip_vfs_file_handle&, - char const *, Genode::size_t, - file_size) override + Lxip::ssize_t write(Lxip_vfs_file_handle &, + Const_byte_range_ptr const &, file_size) override { return -1; } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { using namespace Linux; if (!_sock_valid()) return -1; - iovec iov { dst, len }; + iovec iov { dst.start, dst.num_bytes }; - msghdr msg = create_msghdr(nullptr, 0, len, &iov); - - Lxip::ssize_t ret = _sock.ops->recvmsg(&_sock, &msg, len, MSG_DONTWAIT|MSG_PEEK); + msghdr msg = create_msghdr(nullptr, 0, dst.num_bytes, &iov); + Lxip::ssize_t ret = _sock.ops->recvmsg(&_sock, &msg, dst.num_bytes, + MSG_DONTWAIT|MSG_PEEK); if (ret == -EAGAIN) return 0; @@ -566,7 +560,7 @@ class Vfs::Lxip_bind_file final : public Vfs::Lxip_file ********************/ Lxip::ssize_t write(Lxip_vfs_file_handle &handle, - char const *src, Genode::size_t len, + Const_byte_range_ptr const &src, file_size /* ignored */) override { using namespace Linux; @@ -576,7 +570,7 @@ class Vfs::Lxip_bind_file final : public Vfs::Lxip_file /* already bound to port */ if (_port >= 0) return -1; - if (!handle.write_content_line(src, len)) return -1; + if (!handle.write_content_line(src)) return -1; /* check if port is already used by other socket */ long port = get_port(handle.content_buffer); @@ -598,18 +592,18 @@ class Vfs::Lxip_bind_file final : public Vfs::Lxip_file _parent.bind(true); - return len; + return src.num_bytes; } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { - if (len < sizeof(handle.content_buffer)) + if (dst.num_bytes < sizeof(handle.content_buffer)) return -1; Genode::size_t const n = Genode::strlen(handle.content_buffer); - Genode::memcpy(dst, handle.content_buffer, n); + Genode::memcpy(dst.start, handle.content_buffer, n); return n; } @@ -632,7 +626,7 @@ class Vfs::Lxip_listen_file final : public Vfs::Lxip_file ********************/ Lxip::ssize_t write(Lxip_vfs_file_handle &handle, - char const *src, Genode::size_t len, + Const_byte_range_ptr const &src, file_size /* ignored */) override { if (!_sock_valid()) return -1; @@ -640,7 +634,7 @@ class Vfs::Lxip_listen_file final : public Vfs::Lxip_file /* write-once */ if (_backlog != ~0UL) return -1; - if (!handle.write_content_line(src, len)) return -1; + if (!handle.write_content_line(src)) return -1; Genode::ascii_to_unsigned( handle.content_buffer, _backlog, sizeof(handle.content_buffer)); @@ -649,20 +643,20 @@ class Vfs::Lxip_listen_file final : public Vfs::Lxip_file _write_err = _sock.ops->listen(&_sock, _backlog); if (_write_err != 0) { - handle.write_content_line("", 0); + handle.write_content_line(Const_byte_range_ptr("", 0)); return -1; } _parent.listen(true); - return len; + return src.num_bytes; } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { - return Genode::snprintf(dst, len, "%lu\n", _backlog); + return Genode::snprintf(dst.start, dst.num_bytes, "%lu\n", _backlog); } }; @@ -698,14 +692,14 @@ class Vfs::Lxip_connect_file final : public Vfs::Lxip_file } Lxip::ssize_t write(Lxip_vfs_file_handle &handle, - char const *src, Genode::size_t len, + Const_byte_range_ptr const &src, file_size /* ignored */) override { using namespace Linux; if (!_sock_valid()) return -1; - if (!handle.write_content_line(src, len)) return -1; + if (!handle.write_content_line(src)) return -1; long const port = get_port(handle.content_buffer); if (port == -1) return -1; @@ -723,7 +717,7 @@ class Vfs::Lxip_connect_file final : public Vfs::Lxip_file case Lxip::Io_result::LINUX_EINPROGRESS: _connecting = true; _write_err = 0; - return len; + return src.num_bytes; case Lxip::Io_result::LINUX_EALREADY: return -1; @@ -752,11 +746,11 @@ class Vfs::Lxip_connect_file final : public Vfs::Lxip_file _parent.connect(true); - return len; + return src.num_bytes; } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { int so_error = 0; @@ -770,11 +764,11 @@ class Vfs::Lxip_connect_file final : public Vfs::Lxip_file switch (so_error) { case 0: - return Genode::snprintf(dst, len, "connected"); + return Genode::snprintf(dst.start, dst.num_bytes, "connected"); case Linux::ECONNREFUSED: - return Genode::snprintf(dst, len, "connection refused"); + return Genode::snprintf(dst.start, dst.num_bytes, "connection refused"); default: - return Genode::snprintf(dst, len, "unknown error"); + return Genode::snprintf(dst.start, dst.num_bytes, "unknown error"); } } }; @@ -792,14 +786,14 @@ class Vfs::Lxip_local_file final : public Vfs::Lxip_file ********************/ Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { using namespace Linux; if (!_sock_valid()) return -1; - if (len < sizeof(handle.content_buffer)) + if (dst.num_bytes < sizeof(handle.content_buffer)) return -1; sockaddr_storage addr_storage; @@ -812,7 +806,7 @@ class Vfs::Lxip_local_file final : public Vfs::Lxip_file in_addr const i_addr = addr->sin_addr; unsigned char const *a = (unsigned char *)&i_addr.s_addr; unsigned char const *p = (unsigned char *)&addr->sin_port; - return Genode::snprintf(dst, len, + return Genode::snprintf(dst.start, dst.num_bytes, "%d.%d.%d.%d:%u\n", a[0], a[1], a[2], a[3], (p[0]<<8)|(p[1]<<0)); } @@ -849,7 +843,7 @@ class Vfs::Lxip_remote_file final : public Vfs::Lxip_file } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { using namespace Linux; @@ -889,18 +883,18 @@ class Vfs::Lxip_remote_file final : public Vfs::Lxip_file in_addr const i_addr = addr->sin_addr; unsigned char const *a = (unsigned char *)&i_addr.s_addr; unsigned char const *p = (unsigned char *)&addr->sin_port; - return Genode::snprintf(dst, len, + return Genode::snprintf(dst.start, dst.num_bytes, "%d.%d.%d.%d:%u\n", a[0], a[1], a[2], a[3], (p[0]<<8)|(p[1]<<0)); } Lxip::ssize_t write(Lxip_vfs_file_handle &handle, - char const *src, Genode::size_t len, + Const_byte_range_ptr const &src, file_size /* ignored */) override { using namespace Linux; - if (!handle.write_content_line(src, len)) return -1; + if (!handle.write_content_line(src)) return -1; long const port = get_port(handle.content_buffer); if (port == -1) return -1; @@ -910,7 +904,7 @@ class Vfs::Lxip_remote_file final : public Vfs::Lxip_file remote_addr->sin_addr.s_addr = get_addr(handle.content_buffer); remote_addr->sin_family = AF_INET; - return len; + return src.num_bytes; } }; @@ -937,7 +931,7 @@ class Vfs::Lxip_accept_file final : public Vfs::Lxip_file } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { using namespace Linux; @@ -948,8 +942,8 @@ class Vfs::Lxip_accept_file final : public Vfs::Lxip_file f.f_flags = 0; if (_sock.ops->poll(&f, &_sock, nullptr) & (POLLIN)) { - copy_cstring(dst, "1\n", len); - return Genode::strlen(dst); + copy_cstring(dst.start, "1\n", dst.num_bytes); + return Genode::strlen(dst.start); } throw Would_block(); @@ -1123,17 +1117,17 @@ class Vfs::Lxip_socket_dir final : public Lxip::Socket_dir file_size num_dirent() override { return _num_nodes(); } - Lxip::ssize_t read(char *dst, Genode::size_t len, + Lxip::ssize_t read(Byte_range_ptr const &dst, file_size seek_offset) override { typedef Vfs::Directory_service::Dirent Dirent; - if (len < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return -1; - Vfs::file_size index = seek_offset / sizeof(Dirent); + size_t index = size_t(seek_offset / sizeof(Dirent)); - Dirent &out = *(Dirent*)dst; + Dirent &out = *(Dirent*)dst.start; Vfs::Node *node = nullptr; for (Vfs::File *n : _files) { @@ -1181,14 +1175,14 @@ struct Vfs::Lxip_socket_handle final : Vfs::Lxip_vfs_handle bool read_ready() const override { return true; } - Read_result read(char *dst, file_size count, file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { out_count = Genode::snprintf( - dst, count, "%s/%s\n", socket_dir.parent().name(), socket_dir.name()); + dst.start, dst.num_bytes, "%s/%s\n", socket_dir.parent().name(), socket_dir.name()); return Read_result::READ_OK; } - Write_result write(char const *src, file_size count, file_size &out_count) override { + Write_result write(Const_byte_range_ptr const &, size_t &) override { return Write_result::WRITE_ERR_INVALID; } }; @@ -1457,17 +1451,17 @@ class Lxip::Protocol_dir_impl : public Protocol_dir Vfs::file_size num_dirent() override { return _num_nodes(); } - Lxip::ssize_t read(char *dst, Genode::size_t len, + Lxip::ssize_t read(Vfs::Byte_range_ptr const &dst, Vfs::file_size seek_offset) override { typedef Vfs::Directory_service::Dirent Dirent; - if (len < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return -1; - Vfs::file_size index = seek_offset / sizeof(Dirent); + size_t index = size_t(seek_offset / sizeof(Dirent)); - Dirent &out = *(Dirent*)dst; + Dirent &out = *(Dirent*)dst.start; Vfs::Node *node = nullptr; for (Vfs::Node *n : _nodes) { @@ -1525,7 +1519,7 @@ class Vfs::Lxip_address_file final : public Vfs::File : Vfs::File(name), _numeric_address(numeric_address) { } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { enum { @@ -1536,10 +1530,10 @@ class Vfs::Lxip_address_file final : public Vfs::File Net::Ipv4_address(&_numeric_address) }; - Lxip::size_t n = min(len, strlen(address.string())); - memcpy(dst, address.string(), n); - if (n < len) - dst[n++] = '\n'; + Lxip::size_t n = min(dst.num_bytes, strlen(address.string())); + memcpy(dst.start, address.string(), n); + if (n < dst.num_bytes) + dst.start[n++] = '\n'; return n; } @@ -1558,7 +1552,7 @@ class Vfs::Lxip_link_state_file final : public Vfs::File : Vfs::File(name), _numeric_link_state(numeric_link_state) { } Lxip::ssize_t read(Lxip_vfs_file_handle &handle, - char *dst, Genode::size_t len, + Byte_range_ptr const &dst, file_size /* ignored */) override { enum { @@ -1569,10 +1563,10 @@ class Vfs::Lxip_link_state_file final : public Vfs::File _numeric_link_state ? "up" : "down" }; - Lxip::size_t n = min(len, strlen(link_state.string())); - memcpy(dst, link_state.string(), n); - if (n < len) - dst[n++] = '\n'; + Lxip::size_t n = min(dst.num_bytes, strlen(link_state.string())); + memcpy(dst.start, link_state.string(), n); + if (n < dst.num_bytes) + dst.start[n++] = '\n'; return n; } @@ -1649,14 +1643,13 @@ class Vfs::Lxip_file_system : public Vfs::File_system, return (strcmp(path, "") == 0) || (strcmp(path, "/") == 0); } - Read_result _read(Vfs::Vfs_handle *vfs_handle, char *dst, - Vfs::file_size count, - Vfs::file_size &out_count) + Read_result _read(Vfs::Vfs_handle *vfs_handle, Byte_range_ptr const &dst, + size_t &out_count) { Vfs::Lxip_vfs_handle *handle = static_cast(vfs_handle); - return handle->read(dst, count, out_count); + return handle->read(dst, out_count); } public: @@ -1731,10 +1724,9 @@ class Vfs::Lxip_file_system : public Vfs::File_system, char const*, unsigned, Vfs::Vfs_handle**) override { return Vfs::Directory::Open_result::OPEN_ERR_UNACCESSIBLE; } - Lxip::ssize_t read(char *dst, Genode::size_t len, - file_size seek_offset) override + Lxip::ssize_t read(Byte_range_ptr const &dst, file_size seek_offset) override { - if (len < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return -1; file_size const index = seek_offset / sizeof(Dirent); @@ -1760,7 +1752,7 @@ class Vfs::Lxip_file_system : public Vfs::File_system, Entry const &entry = entries[min(index, NUM_ENTRIES - 1U)]; - Dirent &out = *(Dirent*)dst; + Dirent &out = *(Dirent*)dst.start; out = { .fileno = (Genode::addr_t)entry.fileno, @@ -1929,23 +1921,23 @@ class Vfs::Lxip_file_system : public Vfs::File_system, ** Lxip_file I/O service interface ** *************************************/ - Write_result write(Vfs_handle *vfs_handle, char const *src, - file_size count, - file_size &out_count) override + Write_result write(Vfs_handle *vfs_handle, + Vfs::Const_byte_range_ptr const &src, + size_t &out_count) override { Vfs::Lxip_vfs_handle *handle = static_cast(vfs_handle); - try { return handle->write(src, count, out_count); } + try { return handle->write(src, out_count); } catch (File::Would_block) { return WRITE_ERR_WOULD_BLOCK; } } Read_result complete_read(Vfs_handle *vfs_handle, - char *dst, file_size count, - file_size &out_count) override + Vfs::Byte_range_ptr const &dst, + size_t &out_count) override { - try { return _read(vfs_handle, dst, count, out_count); } + try { return _read(vfs_handle, dst, out_count); } catch (File::Would_block) { return READ_QUEUED; } } diff --git a/repos/dde_rump/src/lib/rump/io.cc b/repos/dde_rump/src/lib/rump/io.cc index 12a5b1491e..2c74adf094 100644 --- a/repos/dde_rump/src/lib/rump/io.cc +++ b/repos/dde_rump/src/lib/rump/io.cc @@ -227,7 +227,7 @@ class Backend .type = (op & RUMPUSER_BIO_WRITE) ? Block::Operation::Type::WRITE : Block::Operation::Type::READ, - .block_number = offset / _info.block_size, + .block_number = block_number_t(offset / _info.block_size), .count = length / _info.block_size }; bool const success = _synchronous_io(data, operation); diff --git a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc index dd6784a4bb..c6ef6cb4a6 100644 --- a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc +++ b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc @@ -80,16 +80,16 @@ class Vfs::Rump_file_system : public File_system { using Vfs_handle::Vfs_handle; - virtual Read_result read(char *buf, file_size buf_size, - file_size seek_offset, file_size &out_count) + virtual Read_result read(Byte_range_ptr const &dst, + file_size seek_offset, size_t &out_count) { Genode::error("Rump_vfs_handle::read() called"); return READ_ERR_INVALID; } - virtual Write_result write(char const *buf, file_size buf_size, + virtual Write_result write(Const_byte_range_ptr const &src, file_size seek_offset, - file_size &out_count) + size_t &out_count) { Genode::error("Rump_vfs_handle::write() called"); return WRITE_ERR_INVALID; @@ -131,10 +131,10 @@ class Vfs::Rump_file_system : public File_system return FTRUNCATE_OK; } - Read_result read(char *buf, file_size buf_size, - file_size seek_offset, file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, + file_size seek_offset, size_t &out_count) override { - ssize_t n = rump_sys_pread(_fd, buf, buf_size, seek_offset); + ssize_t n = rump_sys_pread(_fd, dst.start, dst.num_bytes, seek_offset); if (n == -1) switch (errno) { case EWOULDBLOCK: return READ_ERR_WOULD_BLOCK; case EINVAL: return READ_ERR_INVALID; @@ -148,13 +148,12 @@ class Vfs::Rump_file_system : public File_system return READ_OK; } - Write_result write(char const *buf, file_size buf_size, - file_size seek_offset, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, + file_size seek_offset, size_t &out_count) override { out_count = 0; - ssize_t n = rump_sys_pwrite(_fd, buf, buf_size, seek_offset); + ssize_t n = rump_sys_pwrite(_fd, src.start, src.num_bytes, seek_offset); if (n == -1) switch (errno) { case EWOULDBLOCK: return WRITE_ERR_WOULD_BLOCK; case EINVAL: return WRITE_ERR_INVALID; @@ -234,18 +233,17 @@ class Vfs::Rump_file_system : public File_system ~Rump_vfs_dir_handle() { rump_sys_close(_fd); } - Read_result read(char *dst, file_size count, - file_size seek_offset, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, + file_size seek_offset, size_t &out_count) override { out_count = 0; - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; - file_size index = seek_offset / sizeof(Dirent); + size_t const index = size_t(seek_offset / sizeof(Dirent)); - Dirent *vfs_dir = (Dirent*)dst; + Dirent *vfs_dir = (Dirent*)dst.start; out_count = sizeof(Dirent); @@ -289,9 +287,8 @@ class Vfs::Rump_file_system : public File_system int status_flags, char const *path) : Rump_vfs_handle(fs, fs, alloc, status_flags), _path(path) { } - Read_result read(char *buf, file_size buf_size, - file_size seek_offset, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, + file_size seek_offset, size_t &out_count) override { out_count = 0; @@ -300,7 +297,7 @@ class Vfs::Rump_file_system : public File_system return READ_ERR_INVALID; } - ssize_t n = rump_sys_readlink(_path.base(), buf, buf_size); + ssize_t n = rump_sys_readlink(_path.base(), dst.start, dst.num_bytes); if (n == -1) return READ_ERR_IO; @@ -309,18 +306,17 @@ class Vfs::Rump_file_system : public File_system return READ_OK; } - Write_result write(char const *buf, file_size buf_size, - file_size seek_offset, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, + file_size seek_offset, size_t &out_count) override { rump_sys_unlink(_path.base()); - if (rump_sys_symlink(buf, _path.base()) != 0) { + if (rump_sys_symlink(src.start, _path.base()) != 0) { out_count = 0; return WRITE_OK; } - out_count = buf_size; + out_count = src.num_bytes; return WRITE_OK; } }; @@ -781,28 +777,27 @@ class Vfs::Rump_file_system : public File_system ** File io service interface ** *******************************/ - Write_result write(Vfs_handle *vfs_handle, - char const *buf, file_size buf_size, - file_size &out_count) override + Write_result write(Vfs_handle *vfs_handle, Const_byte_range_ptr const &src, + size_t &out_count) override { Rump_vfs_handle *handle = static_cast(vfs_handle); if (handle) - return handle->write(buf, buf_size, handle->seek(), out_count); + return handle->write(src, handle->seek(), out_count); return WRITE_ERR_INVALID; } - Read_result complete_read(Vfs_handle *vfs_handle, char *buf, - file_size buf_size, - file_size &out_count) override + Read_result complete_read(Vfs_handle *vfs_handle, + Byte_range_ptr const &dst, + size_t &out_count) override { Rump_vfs_handle *handle = static_cast(vfs_handle); if (handle) - return handle->read(buf, buf_size, handle->seek(), out_count); + return handle->read(dst, handle->seek(), out_count); return READ_ERR_INVALID; } diff --git a/repos/gems/include/cbe/crypto/interface.h b/repos/gems/include/cbe/crypto/interface.h index 40675dd7da..e0fe70037a 100644 --- a/repos/gems/include/cbe/crypto/interface.h +++ b/repos/gems/include/cbe/crypto/interface.h @@ -22,9 +22,11 @@ namespace Cbe_crypto { - using uint32_t = Genode::uint32_t; - using uint64_t = Genode::uint64_t; - using size_t = Genode::size_t; + using uint32_t = Genode::uint32_t; + using uint64_t = Genode::uint64_t; + using size_t = Genode::size_t; + using Byte_range_ptr = Genode::Byte_range_ptr; + using Const_byte_range_ptr = Genode::Const_byte_range_ptr; struct Interface; @@ -103,17 +105,15 @@ struct Cbe_crypto::Interface virtual bool submit_encryption_request(uint64_t const block_number, uint32_t const key_id, - char const *src, - size_t const src_len) = 0; + Const_byte_range_ptr const &src) = 0; - virtual Complete_request encryption_request_complete(char *dst, size_t const dst_len) = 0; + virtual Complete_request encryption_request_complete(Byte_range_ptr const &dst) = 0; virtual bool submit_decryption_request(uint64_t const block_number, uint32_t const key_id, - char const *src, - size_t const src_len) = 0; + Const_byte_range_ptr const &src) = 0; - virtual Complete_request decryption_request_complete(char *dst, size_t dst_len) = 0; + virtual Complete_request decryption_request_complete(Byte_range_ptr const &dst) = 0; }; #endif /* _INCLUDE__CBE__CRYPTO__INTERFACE_H_ */ diff --git a/repos/gems/include/cbe/vfs/io_job.h b/repos/gems/include/cbe/vfs/io_job.h index f3bf301376..aded1f7e30 100644 --- a/repos/gems/include/cbe/vfs/io_job.h +++ b/repos/gems/include/cbe/vfs/io_job.h @@ -21,15 +21,18 @@ namespace Util { - using file_size = Vfs::file_size; - using file_offset = Vfs::file_offset; + using file_size = Vfs::file_size; + using file_offset = Vfs::file_offset; + using Byte_range_ptr = Vfs::Byte_range_ptr; + using Const_byte_range_ptr = Vfs::Const_byte_range_ptr; + using size_t = Genode::size_t; struct Io_job { struct Buffer { - char *base; - file_size size; + char *base; + size_t size; }; enum class Operation { INVALID, READ, WRITE, SYNC }; @@ -83,7 +86,7 @@ namespace Util { char *_data; file_offset const _base_offset; file_offset _current_offset; - file_size _current_count; + size_t _current_count; bool const _allow_partial; @@ -110,12 +113,11 @@ namespace Util { using Result = Vfs::File_io_service::Read_result; bool completed = false; - file_size out = 0; + size_t out = 0; + + Byte_range_ptr const dst { _data + _current_offset, _current_count }; + Result const result = _handle.fs().complete_read(&_handle, dst, out); - Result const result = - _handle.fs().complete_read(&_handle, - _data + _current_offset, - _current_count, out); if (result == Result::READ_QUEUED || result == Result::READ_ERR_WOULD_BLOCK) { return progress; @@ -170,12 +172,11 @@ namespace Util { using Result = Vfs::File_io_service::Write_result; bool completed = false; - file_size out = 0; + size_t out = 0; + Const_byte_range_ptr const src { _data + _current_offset, _current_count }; + Result const result = _handle.fs().write(&_handle, src, out); - Result const result = - _handle.fs().write(&_handle, _data + _current_offset, - _current_count, out); switch (result) { case Result::WRITE_ERR_WOULD_BLOCK: return progress; diff --git a/repos/gems/src/app/cbe_tester/crypto.cc b/repos/gems/src/app/cbe_tester/crypto.cc index 5162d0ebed..764c31bbac 100644 --- a/repos/gems/src/app/cbe_tester/crypto.cc +++ b/repos/gems/src/app/cbe_tester/crypto.cc @@ -66,13 +66,15 @@ Crypto::Result Crypto::add_key(Key const &key) key.value, sizeof (key.value)); _add_key_handle.seek(0); - file_size nr_of_written_bytes { 0 }; + + size_t written_bytes = 0; using Write_result = Vfs::File_io_service::Write_result; + Const_byte_range_ptr const src(buffer, sizeof(buffer)); + Write_result const result = - _add_key_handle.fs().write(&_add_key_handle, buffer, sizeof (buffer), - nr_of_written_bytes); + _add_key_handle.fs().write(&_add_key_handle, src, written_bytes); if (result == Write_result::WRITE_ERR_WOULD_BLOCK) return Result::RETRY_LATER; @@ -92,15 +94,15 @@ Crypto::Result Crypto::add_key(Key const &key) Crypto::Result Crypto::remove_key(Cbe::Key::Id key_id) { - Vfs::file_size written = 0; + size_t written_bytes = 0; _remove_key_handle.seek(0); + Const_byte_range_ptr const src((char *)&key_id.value, sizeof(key_id.value)); + using Write_result = Vfs::File_io_service::Write_result; + Write_result const result = - _remove_key_handle.fs().write(&_remove_key_handle, - (char const*)&key_id.value, - sizeof (key_id.value), - written); + _remove_key_handle.fs().write(&_remove_key_handle, src, written_bytes); if (result == Write_result::WRITE_ERR_WOULD_BLOCK) return Result::RETRY_LATER; @@ -195,14 +197,14 @@ void Crypto::_execute_decrypt_block(Job &job, case Job_state::SUBMITTED: { job.handle->seek(job.request.block_number() * Cbe::BLOCK_SIZE); - file_size nr_of_written_bytes { 0 }; - job.handle->fs().write( - job.handle, - reinterpret_cast( - &cipher_buf.item(job.cipher_buf_idx)), - file_size(sizeof (Cbe::Block_data)), - nr_of_written_bytes); + size_t written_bytes = 0; + + Const_byte_range_ptr const src( + reinterpret_cast(&cipher_buf.item(job.cipher_buf_idx)), + sizeof(Cbe::Block_data)); + + job.handle->fs().write( job.handle, src, written_bytes); job.state = Job_state::OP_WRITTEN_TO_VFS_HANDLE; progress = true; @@ -224,14 +226,14 @@ void Crypto::_execute_decrypt_block(Job &job, } case Job_state::READING_VFS_HANDLE_SUCCEEDED: { - file_size nr_of_read_bytes { 0 }; + size_t read_bytes = 0; + + Byte_range_ptr const dst( + reinterpret_cast(&plain_buf.item(job.plain_buf_idx)), + sizeof(Cbe::Block_data)); + Read_result const result = - job.handle->fs().complete_read( - job.handle, - reinterpret_cast( - &plain_buf.item(job.plain_buf_idx)), - sizeof (Cbe::Block_data), - nr_of_read_bytes); + job.handle->fs().complete_read(job.handle, dst, read_bytes); switch (result) { case Read_result::READ_QUEUED: return; @@ -259,14 +261,15 @@ void Crypto::_execute_encrypt_block(Job &job, case Job_state::SUBMITTED: { job.handle->seek(job.request.block_number() * Cbe::BLOCK_SIZE); - file_size nr_of_written_bytes { 0 }; - job.handle->fs().write( - job.handle, + size_t written_bytes = 0; + + Const_byte_range_ptr const src( reinterpret_cast( &plain_buf.item(job.plain_buf_idx)), - file_size(sizeof (Cbe::Block_data)), - nr_of_written_bytes); + sizeof(Cbe::Block_data)); + + job.handle->fs().write(job.handle, src, written_bytes); job.state = Job_state::OP_WRITTEN_TO_VFS_HANDLE; progress = true; @@ -288,14 +291,14 @@ void Crypto::_execute_encrypt_block(Job &job, } case Job_state::READING_VFS_HANDLE_SUCCEEDED: { - file_size nr_of_read_bytes { 0 }; - Read_result const result { - job.handle->fs().complete_read( - job.handle, - reinterpret_cast( - &cipher_buf.item(job.cipher_buf_idx)), - sizeof (Cbe::Block_data), - nr_of_read_bytes) }; + size_t read_bytes = 0; + + Byte_range_ptr const dst( + reinterpret_cast(&cipher_buf.item(job.cipher_buf_idx)), + sizeof (Cbe::Block_data)); + + Read_result const result = + job.handle->fs().complete_read(job.handle, dst, read_bytes); switch (result) { case Read_result::READ_QUEUED: return; diff --git a/repos/gems/src/app/cbe_tester/main.cc b/repos/gems/src/app/cbe_tester/main.cc index d4cc9a296c..e6b5069827 100644 --- a/repos/gems/src/app/cbe_tester/main.cc +++ b/repos/gems/src/app/cbe_tester/main.cc @@ -298,17 +298,17 @@ class Vfs_block_io_job case State::IN_PROGRESS: { - file_size nr_of_read_bytes { 0 }; + size_t read_bytes = 0; char *const data { reinterpret_cast( &io_data.item(_cbe_req_io_buf_idx(_cbe_req))) }; - Result const result { - _handle.fs().complete_read(&_handle, - data + _nr_of_processed_bytes, - _nr_of_remaining_bytes, - nr_of_read_bytes) }; + Byte_range_ptr const dst(data + _nr_of_processed_bytes, + _nr_of_remaining_bytes); + + Result const result = + _handle.fs().complete_read(&_handle, dst, read_bytes); switch (result) { case Result::READ_QUEUED: @@ -318,8 +318,8 @@ class Vfs_block_io_job case Result::READ_OK: - _nr_of_processed_bytes += nr_of_read_bytes; - _nr_of_remaining_bytes -= nr_of_read_bytes; + _nr_of_processed_bytes += read_bytes; + _nr_of_remaining_bytes -= read_bytes; if (_nr_of_remaining_bytes == 0) { @@ -385,17 +385,17 @@ class Vfs_block_io_job case State::IN_PROGRESS: { - file_size nr_of_written_bytes { 0 }; + size_t written_bytes = 0; char const *const data { reinterpret_cast( &io_data.item(_cbe_req_io_buf_idx(_cbe_req))) }; + Const_byte_range_ptr const src(data + _nr_of_processed_bytes, + _nr_of_remaining_bytes); + Result const result = - _handle.fs().write(&_handle, - data + _nr_of_processed_bytes, - _nr_of_remaining_bytes, - nr_of_written_bytes); + _handle.fs().write(&_handle, src, written_bytes); switch (result) { case Result::WRITE_ERR_WOULD_BLOCK: @@ -403,8 +403,8 @@ class Vfs_block_io_job case Result::WRITE_OK: - _nr_of_processed_bytes += nr_of_written_bytes; - _nr_of_remaining_bytes -= nr_of_written_bytes; + _nr_of_processed_bytes += written_bytes; + _nr_of_remaining_bytes -= written_bytes; if (_nr_of_remaining_bytes == 0) { diff --git a/repos/gems/src/app/cbe_tester/trust_anchor.cc b/repos/gems/src/app/cbe_tester/trust_anchor.cc index ca7317a851..260096cc80 100644 --- a/repos/gems/src/app/cbe_tester/trust_anchor.cc +++ b/repos/gems/src/app/cbe_tester/trust_anchor.cc @@ -36,10 +36,12 @@ void Trust_anchor::_execute_write_read_operation(Vfs_handle &file, case Job_state::WRITE_IN_PROGRESS: { - file_size nr_of_written_bytes { 0 }; - Write_result const result = - file.fs().write(&file, write_buf + _job.fl_offset, - _job.fl_size, nr_of_written_bytes); + size_t written_bytes { 0 }; + + Const_byte_range_ptr const src(write_buf + _job.fl_offset, _job.fl_size); + + Write_result const result = file.fs().write(&file, src, written_bytes); + switch (result) { case Write_result::WRITE_ERR_WOULD_BLOCK: @@ -47,8 +49,8 @@ void Trust_anchor::_execute_write_read_operation(Vfs_handle &file, case Write_result::WRITE_OK: - _job.fl_offset += nr_of_written_bytes; - _job.fl_size -= nr_of_written_bytes; + _job.fl_offset += written_bytes; + _job.fl_size -= written_bytes; if (_job.fl_size > 0) { @@ -84,11 +86,11 @@ void Trust_anchor::_execute_write_read_operation(Vfs_handle &file, case Job_state::READ_IN_PROGRESS: { - file_size nr_of_read_bytes { 0 }; - Read_result const result { - file.fs().complete_read( - &file, read_buf + _job.fl_offset, _job.fl_size, - nr_of_read_bytes) }; + size_t read_bytes = 0; + + Byte_range_ptr const dst(read_buf + _job.fl_offset, _job.fl_size); + + Read_result const result = file.fs().complete_read( &file, dst, read_bytes); switch (result) { case Read_result::READ_QUEUED: @@ -98,8 +100,8 @@ void Trust_anchor::_execute_write_read_operation(Vfs_handle &file, case Read_result::READ_OK: - _job.fl_offset += nr_of_read_bytes; - _job.fl_size -= nr_of_read_bytes; + _job.fl_offset += read_bytes; + _job.fl_size -= read_bytes; _job.request.success(true); if (_job.fl_size > 0) { @@ -142,11 +144,11 @@ void Trust_anchor::_execute_write_operation(Vfs_handle &file, case Job_state::WRITE_IN_PROGRESS: { - file_size nr_of_written_bytes { 0 }; - Write_result const result = - file.fs().write( - &file, write_buf + _job.fl_offset, - _job.fl_size, nr_of_written_bytes); + size_t written_bytes = 0; + + Const_byte_range_ptr const src(write_buf + _job.fl_offset, _job.fl_size); + + Write_result const result = file.fs().write( &file, src, written_bytes); switch (result) { @@ -155,8 +157,8 @@ void Trust_anchor::_execute_write_operation(Vfs_handle &file, case Write_result::WRITE_OK: - _job.fl_offset += nr_of_written_bytes; - _job.fl_size -= nr_of_written_bytes; + _job.fl_offset += written_bytes; + _job.fl_size -= written_bytes; if (_job.fl_size > 0) { @@ -192,11 +194,11 @@ void Trust_anchor::_execute_write_operation(Vfs_handle &file, case Job_state::READ_IN_PROGRESS: { - file_size nr_of_read_bytes { 0 }; - Read_result const result { - file.fs().complete_read( - &file, _read_buf + _job.fl_offset, _job.fl_size, - nr_of_read_bytes) }; + size_t read_bytes = 0; + + Byte_range_ptr const dst(_read_buf + _job.fl_offset, _job.fl_size); + + Read_result const result = file.fs().complete_read(&file, dst, read_bytes); switch (result) { case Read_result::READ_QUEUED: @@ -206,8 +208,8 @@ void Trust_anchor::_execute_write_operation(Vfs_handle &file, case Read_result::READ_OK: - _job.fl_offset += nr_of_read_bytes; - _job.fl_size -= nr_of_read_bytes; + _job.fl_offset += read_bytes; + _job.fl_size -= read_bytes; _job.request.success(true); if (_job.fl_size > 0) { @@ -254,11 +256,11 @@ void Trust_anchor::_execute_read_operation(Vfs_handle &file, case Job_state::READ_IN_PROGRESS: { - file_size nr_of_read_bytes { 0 }; - Read_result const result { - file.fs().complete_read( - &file, read_buf + _job.fl_offset, _job.fl_size, - nr_of_read_bytes) }; + size_t read_bytes = 0; + + Byte_range_ptr const dst(read_buf + _job.fl_offset, _job.fl_size); + + Read_result const result = file.fs().complete_read(&file, dst, read_bytes); switch (result) { case Read_result::READ_QUEUED: @@ -268,8 +270,8 @@ void Trust_anchor::_execute_read_operation(Vfs_handle &file, case Read_result::READ_OK: - _job.fl_offset += nr_of_read_bytes; - _job.fl_size -= nr_of_read_bytes; + _job.fl_offset += read_bytes; + _job.fl_size -= read_bytes; _job.request.success(true); if (_job.fl_size > 0) { diff --git a/repos/gems/src/app/vfs_replay/component.cc b/repos/gems/src/app/vfs_replay/component.cc index 593494749d..f5a3dab4ef 100644 --- a/repos/gems/src/app/vfs_replay/component.cc +++ b/repos/gems/src/app/vfs_replay/component.cc @@ -97,11 +97,11 @@ class Vfs_replay Type type; State state; file_offset offset; - file_size count; - file_size out_count; + size_t count; + size_t out_count; file_offset current_offset; - file_size current_count; + size_t current_count; bool success; bool complete; @@ -174,12 +174,14 @@ class Vfs_replay using Result = Vfs::File_io_service::Read_result; bool completed = false; - file_size out = 0; + size_t out = 0; + + Byte_range_ptr const dst(_read_buffer.local_addr(), + request.current_count); Result const result = - _vfs_handle->fs().complete_read(_vfs_handle, - _read_buffer.local_addr(), - request.current_count, out); + _vfs_handle->fs().complete_read(_vfs_handle, dst, out); + if (result == Result::READ_QUEUED || result == Result::READ_ERR_WOULD_BLOCK) { return progress; @@ -244,12 +246,13 @@ class Vfs_replay using Result = Vfs::File_io_service::Write_result; bool completed = false; - file_size out = 0; + size_t out = 0; + + Const_byte_range_ptr const src(_write_buffer.local_addr(), + request.current_count); + + Result const result = _vfs_handle->fs().write(_vfs_handle, src, out); - Result const result = - _vfs_handle->fs().write(_vfs_handle, - _write_buffer.local_addr(), - request.current_count, out); switch (result) { case Result::WRITE_ERR_WOULD_BLOCK: return progress; @@ -342,7 +345,7 @@ class Vfs_replay if (!_current_request.pending()) { file_offset const offset = node.attribute_value("offset", file_size(~0llu)); - file_size const count = node.attribute_value("count", file_size(~0llu)); + size_t const count = node.attribute_value("count", ~0lu); using Type_String = String<16>; Type_String const type_string = node.attribute_value("type", Type_String()); diff --git a/repos/gems/src/lib/vfs/audit/vfs_audit.cc b/repos/gems/src/lib/vfs/audit/vfs_audit.cc index c417aef88d..62c738d71f 100644 --- a/repos/gems/src/lib/vfs/audit/vfs_audit.cc +++ b/repos/gems/src/lib/vfs/audit/vfs_audit.cc @@ -218,15 +218,14 @@ class Vfs_audit::File_system : public Vfs::File_system **********************/ Write_result write(Vfs_handle *vfs_handle, - const char *buf, file_size len, - file_size &out) override + Const_byte_range_ptr const &src, size_t &out) override { Handle &h = *static_cast(vfs_handle); h.sync_state(); - Write_result const result = h.audit->fs().write(h.audit, buf, len, out); + Write_result const result = h.audit->fs().write(h.audit, src, out); if (result == WRITE_OK) - _log("wrote to ", h.path, " ", out, " / ", len); + _log("wrote to ", h.path, " ", out, " / ", src.num_bytes); else if (result == WRITE_ERR_WOULD_BLOCK) _log("write stalled for ", h.path); else @@ -235,7 +234,7 @@ class Vfs_audit::File_system : public Vfs::File_system return result; } - bool queue_read(Vfs_handle *vfs_handle, file_size len) override + bool queue_read(Vfs_handle *vfs_handle, size_t len) override { Handle &h = *static_cast(vfs_handle); h.sync_state(); @@ -244,13 +243,12 @@ class Vfs_audit::File_system : public Vfs::File_system } Read_result complete_read(Vfs_handle *vfs_handle, - char *buf, file_size len, - file_size &out) override + Byte_range_ptr const &dst, size_t &out) override { Handle &h = *static_cast(vfs_handle); h.sync_state(); - Read_result const result = h.audit->fs().complete_read(h.audit, buf, len, out); + Read_result const result = h.audit->fs().complete_read(h.audit, dst, out); if (result == READ_OK) _log("completed read from ", h.path, " ", out); diff --git a/repos/gems/src/lib/vfs/cbe/io_job.h b/repos/gems/src/lib/vfs/cbe/io_job.h index 5c6fe7400c..c010120688 100644 --- a/repos/gems/src/lib/vfs/cbe/io_job.h +++ b/repos/gems/src/lib/vfs/cbe/io_job.h @@ -17,8 +17,11 @@ namespace Vfs_cbe { - using file_size = Vfs::file_size; - using file_offset = Vfs::file_offset; + using file_size = Vfs::file_size; + using file_offset = Vfs::file_offset; + using Byte_range_ptr = Vfs::Byte_range_ptr; + using Const_byte_range_ptr = Vfs::Const_byte_range_ptr; + using size_t = Genode::size_t; struct Io_job { @@ -84,14 +87,14 @@ namespace Vfs_cbe { using Result = Vfs::File_io_service::Read_result; bool completed = false; - file_size out = 0; + size_t out = 0; char * const data = reinterpret_cast(&io_data.item(_index)); - Result const result = - _handle.fs().complete_read(&_handle, - data + _current_offset, - _current_count, out); + Byte_range_ptr const dst(data + _current_offset, _current_count); + + Result const result = _handle.fs().complete_read(&_handle, dst, out); + if (result == Result::READ_QUEUED || result == Result::READ_ERR_WOULD_BLOCK) { return progress; @@ -148,14 +151,15 @@ namespace Vfs_cbe { using Result = Vfs::File_io_service::Write_result; bool completed = false; - file_size out = 0; + size_t out = 0; char const * const data = reinterpret_cast(&io_data.item(_index)); - Result const result = - _handle.fs().write(&_handle, data + _current_offset, - _current_count, out); + Const_byte_range_ptr const src(data + _current_offset, _current_count); + + Result const result = _handle.fs().write(&_handle, src, out); + switch (result) { case Result::WRITE_ERR_WOULD_BLOCK: return progress; diff --git a/repos/gems/src/lib/vfs/cbe/vfs.cc b/repos/gems/src/lib/vfs/cbe/vfs.cc index 2bc06a2d1a..a0dca924bd 100644 --- a/repos/gems/src/lib/vfs/cbe/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe/vfs.cc @@ -516,8 +516,7 @@ class Vfs_cbe::Wrapper } bool submit_frontend_request(Vfs_handle &handle, - char *data, - file_size count, + Byte_range_ptr const &data, Cbe::Request::Operation op, uint32_t snap_id) { @@ -550,7 +549,9 @@ class Vfs_cbe::Wrapper /* unaligned request if any condition is true */ unaligned_request |= (offset % Cbe::BLOCK_SIZE) != 0; - unaligned_request |= (count < Cbe::BLOCK_SIZE); + unaligned_request |= (data.num_bytes < Cbe::BLOCK_SIZE); + + size_t count = data.num_bytes; if ((count % Cbe::BLOCK_SIZE) != 0 && !unaligned_request) @@ -589,7 +590,7 @@ class Vfs_cbe::Wrapper op, false, offset / Cbe::BLOCK_SIZE, - (uint64_t)data, + (uint64_t)data.start, (uint32_t)(count / Cbe::BLOCK_SIZE), 0, 0); @@ -1125,14 +1126,15 @@ class Vfs_cbe::Wrapper memcpy(buffer, &key.id.value, sizeof (key.id.value)); memcpy(buffer + sizeof (key.id.value), key.value, sizeof (key.value)); - file_size written = 0; + size_t written = 0; _add_key_handle->seek(0); using Write_result = Vfs::File_io_service::Write_result; + Const_byte_range_ptr const src(buffer, sizeof(buffer)); + Write_result const result = - _add_key_handle->fs().write(_add_key_handle, - buffer, sizeof (buffer), written); + _add_key_handle->fs().write(_add_key_handle, src, written); if (result == Write_result::WRITE_ERR_WOULD_BLOCK) break; /* try again later */ @@ -1217,16 +1219,16 @@ class Vfs_cbe::Wrapper break; } - file_size written = 0; + size_t written = 0; _remove_key_handle->seek(0); + Const_byte_range_ptr const src((char *)&key_id.value, + sizeof(key_id.value)); + using Write_result = Vfs::File_io_service::Write_result; Write_result const result = - _remove_key_handle->fs().write(_remove_key_handle, - (char const*)&key_id.value, - sizeof (key_id.value), - written); + _remove_key_handle->fs().write(_remove_key_handle, src, written); if (result == Write_result::WRITE_ERR_WOULD_BLOCK) break; /* try again later */ @@ -1345,10 +1347,12 @@ class Vfs_cbe::Wrapper data = reinterpret_cast(&cipher.item(cipher_index)); } - file_size out = 0; + size_t out = 0; _handle->seek(offset); - _handle->fs().write(_handle, data, - file_size(sizeof (Cbe::Block_data)), out); + + Const_byte_range_ptr const src(data, sizeof(Cbe::Block_data)); + + _handle->fs().write(_handle, src, out); if (op == Crypto_job::Operation::ENCRYPT) { cbe.crypto_cipher_data_requested(plain_index); @@ -1377,7 +1381,7 @@ class Vfs_cbe::Wrapper { using Result = Vfs::File_io_service::Read_result; - file_size out = 0; + size_t out = 0; char *data = nullptr; if (op == Crypto_job::Operation::ENCRYPT) { @@ -1388,9 +1392,10 @@ class Vfs_cbe::Wrapper data = reinterpret_cast(&plain.item(plain_index)); } - Result const res = - _handle->fs().complete_read(_handle, data, - sizeof (Cbe::Block_data), out); + Byte_range_ptr const dst(data, sizeof (Cbe::Block_data)); + + Result const res = _handle->fs().complete_read(_handle, dst, out); + if (_read_queued(res)) { break; } @@ -1815,8 +1820,7 @@ class Vfs_cbe::Data_file_system : public Single_file_system _w(w), _snap_id(snap_id) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { Genode::Mutex::Guard guard { _w.frontend_mtx() }; @@ -1831,8 +1835,7 @@ class Vfs_cbe::Data_file_system : public Single_file_system using Op = Cbe::Request::Operation; bool const accepted = - _w.submit_frontend_request(*this, dst, count, - Op::READ, _snap_id); + _w.submit_frontend_request(*this, dst, Op::READ, _snap_id); if (!accepted) { return READ_ERR_IO; } } @@ -1865,8 +1868,8 @@ class Vfs_cbe::Data_file_system : public Single_file_system return READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, + size_t &out_count) override { Genode::Mutex::Guard guard { _w.frontend_mtx() }; @@ -1881,8 +1884,11 @@ class Vfs_cbe::Data_file_system : public Single_file_system using Op = Cbe::Request::Operation; bool const accepted = - _w.submit_frontend_request(*this, const_cast(src), - count, Op::WRITE, _snap_id); + _w.submit_frontend_request(*this, + Byte_range_ptr( + const_cast(src.start), + src.num_bytes), + Op::WRITE, _snap_id); if (!accepted) { return WRITE_ERR_IO; } } @@ -1930,7 +1936,8 @@ class Vfs_cbe::Data_file_system : public Single_file_system using Op = Cbe::Request::Operation; bool const accepted = - _w.submit_frontend_request(*this, nullptr, 0, Op::SYNC, 0); + _w.submit_frontend_request(*this, Byte_range_ptr(nullptr, 0), + Op::SYNC, 0); if (!accepted) { return SYNC_ERR_INVALID; } } @@ -2080,23 +2087,22 @@ class Vfs_cbe::Extend_file_system : public Vfs::Single_file_system _w(w) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (seek() != 0) { out_count = 0; return READ_OK; } Content_string const result { content_string(_w) }; - copy_cstring(dst, result.string(), count); + copy_cstring(dst.start, result.string(), dst.num_bytes); size_t const length_without_nul = result.length() - 1; - out_count = count > length_without_nul - 1 ? - length_without_nul : count; + out_count = dst.num_bytes > length_without_nul - 1 ? + length_without_nul : dst.num_bytes; return READ_OK; } - Write_result write(char const *src, file_size count, file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { using Type = Wrapper::Extending::Type; using State = Wrapper::Extending::State; @@ -2105,13 +2111,13 @@ class Vfs_cbe::Extend_file_system : public Vfs::Single_file_system } char tree[16]; - Arg_string::find_arg(src, "tree").string(tree, sizeof (tree), "-"); + Arg_string::find_arg(src.start, "tree").string(tree, sizeof (tree), "-"); Type type = Wrapper::Extending::string_to_type(tree); if (type == Type::INVALID) { return WRITE_ERR_IO; } - unsigned long blocks = Arg_string::find_arg(src, "blocks").ulong_value(0); + unsigned long blocks = Arg_string::find_arg(src.start, "blocks").ulong_value(0); if (blocks == 0) { return WRITE_ERR_IO; } @@ -2121,7 +2127,7 @@ class Vfs_cbe::Extend_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -2271,23 +2277,22 @@ class Vfs_cbe::Rekey_file_system : public Vfs::Single_file_system _w(w) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (seek() != 0) { out_count = 0; return READ_OK; } Content_string const result { content_string(_w) }; - copy_cstring(dst, result.string(), count); + copy_cstring(dst.start, result.string(), dst.num_bytes); size_t const length_without_nul = result.length() - 1; - out_count = count > length_without_nul - 1 ? - length_without_nul : count; + out_count = dst.num_bytes > length_without_nul - 1 ? + length_without_nul : dst.num_bytes; return READ_OK; } - Write_result write(char const *src, file_size count, file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { using State = Wrapper::Rekeying::State; if (_w.rekeying_progress().state != State::IDLE) { @@ -2295,7 +2300,7 @@ class Vfs_cbe::Rekey_file_system : public Vfs::Single_file_system } bool start_rekeying { false }; - Genode::ascii_to(src, start_rekeying); + Genode::ascii_to(src.start, start_rekeying); if (!start_rekeying) { return WRITE_ERR_IO; @@ -2305,7 +2310,7 @@ class Vfs_cbe::Rekey_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -2455,23 +2460,22 @@ class Vfs_cbe::Deinitialize_file_system : public Vfs::Single_file_system _w(w) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (seek() != 0) { out_count = 0; return READ_OK; } Content_string const result { content_string(_w) }; - copy_cstring(dst, result.string(), count); + copy_cstring(dst.start, result.string(), dst.num_bytes); size_t const length_without_nul = result.length() - 1; - out_count = count > length_without_nul - 1 ? - length_without_nul : count; + out_count = dst.num_bytes > length_without_nul - 1 ? + length_without_nul : dst.num_bytes; return READ_OK; } - Write_result write(char const *src, file_size count, file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { using State = Wrapper::Deinitialize::State; if (_w.deinitialize_progress().state != State::IDLE) { @@ -2479,7 +2483,7 @@ class Vfs_cbe::Deinitialize_file_system : public Vfs::Single_file_system } bool start_deinitialize { false }; - Genode::ascii_to(src, start_deinitialize); + Genode::ascii_to(src.start, start_deinitialize); if (!start_deinitialize) { return WRITE_ERR_IO; @@ -2489,7 +2493,7 @@ class Vfs_cbe::Deinitialize_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -2605,17 +2609,16 @@ class Vfs_cbe::Create_snapshot_file_system : public Vfs::Single_file_system _w(w) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &, size_t &) override { return READ_ERR_IO; } - Write_result write(char const *src, file_size count, file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { bool create_snapshot { false }; - Genode::ascii_to(src, create_snapshot); - Genode::String<64> str(Genode::Cstring(src, count)); + Genode::ascii_to(src.start, create_snapshot); + Genode::String<64> str(Genode::Cstring(src.start, src.num_bytes)); if (!create_snapshot) { return WRITE_ERR_IO; @@ -2626,7 +2629,7 @@ class Vfs_cbe::Create_snapshot_file_system : public Vfs::Single_file_system return WRITE_OK; } - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -2705,18 +2708,18 @@ class Vfs_cbe::Discard_snapshot_file_system : public Vfs::Single_file_system _w(w) { } - Read_result read(char *, file_size, file_size &) override + Read_result read(Byte_range_ptr const &, size_t &) override { return READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, + size_t &out_count) override { out_count = 0; Genode::uint64_t id { 0 }; - Genode::ascii_to(src, id); + Genode::ascii_to(src.start, id); if (id == 0) { return WRITE_ERR_IO; } @@ -2983,11 +2986,9 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system { using Vfs_handle::Vfs_handle; - virtual Read_result read(char *dst, file_size count, - file_size &out_count) = 0; + virtual Read_result read(Byte_range_ptr const &, size_t &out_count) = 0; - virtual Write_result write(char const *src, file_size count, - file_size &out_count) = 0; + virtual Write_result write(Const_byte_range_ptr const &, size_t &out_count) = 0; virtual Sync_result sync() { @@ -3004,9 +3005,9 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system bool const _root_dir { false }; - Read_result _query_snapshots(file_size index, - file_size &out_count, - Dirent &out) + Read_result _query_snapshots(size_t index, + size_t &out_count, + Dirent &out) { if (index >= _snap_reg.number_of_snapshots()) { out_count = sizeof(Dirent); @@ -3031,9 +3032,9 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system } } - Read_result _query_root(file_size index, - file_size &out_count, - Dirent &out) + Read_result _query_root(size_t index, + size_t &out_count, + Dirent &out) { if (index == 0) { out = { @@ -3060,17 +3061,16 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system _snap_reg(snap_reg), _root_dir(root_dir) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { out_count = 0; - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; - file_size index = seek() / sizeof(Dirent); + size_t index = size_t(seek() / sizeof(Dirent)); - Dirent &out = *(Dirent*)dst; + Dirent &out = *(Dirent*)dst.start; if (!_root_dir) { @@ -3083,7 +3083,7 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system } } - Write_result write(char const *, file_size, file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_INVALID; } @@ -3347,32 +3347,30 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system ********************************/ Write_result write(Vfs::Vfs_handle *vfs_handle, - char const *buf, file_size buf_size, - file_size &out_count) override + Const_byte_range_ptr const &, size_t &out_count) override { return WRITE_ERR_IO; } - bool queue_read(Vfs::Vfs_handle *vfs_handle, file_size size) override + bool queue_read(Vfs::Vfs_handle *vfs_handle, size_t size) override { Dir_snap_vfs_handle *dh = dynamic_cast(vfs_handle); if (dh) { - return dh->vfs_handle.fs().queue_read(&dh->vfs_handle, - size); + return dh->vfs_handle.fs().queue_read(&dh->vfs_handle, size); } return true; } Read_result complete_read(Vfs::Vfs_handle *vfs_handle, - char *dst, file_size count, - file_size & out_count) override + Byte_range_ptr const &dst, + size_t & out_count) override { Snap_vfs_handle *sh = dynamic_cast(vfs_handle); if (sh) { - Read_result const res = sh->read(dst, count, out_count); + Read_result const res = sh->read(dst, out_count); return res; } @@ -3380,7 +3378,7 @@ class Vfs_cbe::Snapshots_file_system : public Vfs::File_system dynamic_cast(vfs_handle); if (dh) { return dh->vfs_handle.fs().complete_read(&dh->vfs_handle, - dst, count, out_count); + dst, out_count); } return READ_ERR_IO; diff --git a/repos/gems/src/lib/vfs/cbe_crypto/aes_cbc/aes_cbc.cc b/repos/gems/src/lib/vfs/cbe_crypto/aes_cbc/aes_cbc.cc index 02203db2ac..4c3cc704fe 100644 --- a/repos/gems/src/lib/vfs/cbe_crypto/aes_cbc/aes_cbc.cc +++ b/repos/gems/src/lib/vfs/cbe_crypto/aes_cbc/aes_cbc.cc @@ -160,10 +160,9 @@ struct Crypto : Cbe_crypto::Interface bool submit_encryption_request(uint64_t const block_number, uint32_t const key_id, - char const *src, - size_t const src_len) override + Const_byte_range_ptr const &src) override { - if (!src || src_len != sizeof (Cbe::Block_data)) { + if (!src.start || src.num_bytes != sizeof (Cbe::Block_data)) { error("buffer has wrong size"); throw Buffer_size_mismatch(); } @@ -179,7 +178,7 @@ struct Crypto : Cbe_crypto::Interface uint64_t block_id = job.request.block_number(); Aes_cbc_4k::Block_number block_number { block_id }; - Aes_cbc_4k::Plaintext const &plaintext = *reinterpret_cast(src); + Aes_cbc_4k::Plaintext const &plaintext = *reinterpret_cast(src.start); Aes_cbc_4k::Ciphertext &ciphertext = *reinterpret_cast(&job.data); /* paranoia */ @@ -190,13 +189,12 @@ struct Crypto : Cbe_crypto::Interface }); } - Complete_request encryption_request_complete(char * const dst, - size_t const dst_len) override + Complete_request encryption_request_complete(Byte_range_ptr const &dst) override { static_assert(sizeof(Cbe::Block_data) == sizeof(Aes_cbc_4k::Ciphertext), "size mismatch"); static_assert(sizeof(Cbe::Block_data) == sizeof(Aes_cbc_4k::Plaintext), "size mismatch"); - if (dst_len != sizeof (Cbe::Block_data)) { + if (dst.num_bytes != sizeof (Cbe::Block_data)) { error("buffer has wrong size"); throw Buffer_size_mismatch(); } @@ -204,7 +202,7 @@ struct Crypto : Cbe_crypto::Interface uint64_t block_id = 0; bool const valid = jobs.apply_encrypt([&](auto const &job) { - Genode::memcpy(dst, &job.data, sizeof(job.data)); + Genode::memcpy(dst.start, &job.data, sizeof(job.data)); block_id = job.request.block_number(); @@ -217,10 +215,9 @@ struct Crypto : Cbe_crypto::Interface bool submit_decryption_request(uint64_t const block_number, uint32_t const key_id, - char const *src, - size_t const src_len) override + Const_byte_range_ptr const &src) override { - if (src_len != sizeof (Cbe::Block_data)) { + if (src.num_bytes != sizeof (Cbe::Block_data)) { error("buffer has wrong size"); throw Buffer_size_mismatch(); } @@ -233,17 +230,17 @@ struct Crypto : Cbe_crypto::Interface return jobs.queue_decrypt([&] (auto &job) { job.request = Cbe::Request(Cbe::Request::Operation::READ, false, block_number, 0, 1, key_id, 0); - Genode::memcpy(&job.data, src, sizeof(job.data)); + Genode::memcpy(&job.data, src.start, sizeof(job.data)); }); }); } - Complete_request decryption_request_complete(char *dst, size_t dst_len) override + Complete_request decryption_request_complete(Byte_range_ptr const &dst) override { static_assert(sizeof(Cbe::Block_data) == sizeof(Aes_cbc_4k::Ciphertext), "size mismatch"); static_assert(sizeof(Cbe::Block_data) == sizeof(Aes_cbc_4k::Plaintext), "size mismatch"); - if (dst_len != sizeof (Cbe::Block_data)) { + if (dst.num_bytes != sizeof (Cbe::Block_data)) { error("buffer has wrong size"); throw Buffer_size_mismatch(); } @@ -256,7 +253,7 @@ struct Crypto : Cbe_crypto::Interface Aes_cbc_4k::Block_number block_number { block_id }; Aes_cbc_4k::Ciphertext const &ciphertext = *reinterpret_cast(&job.data); - Aes_cbc_4k::Plaintext &plaintext = *reinterpret_cast(dst); + Aes_cbc_4k::Plaintext &plaintext = *reinterpret_cast(dst.start); /* paranoia */ static_assert(sizeof(ciphertext) == sizeof(job.data), "size mismatch"); diff --git a/repos/gems/src/lib/vfs/cbe_crypto/memcopy/memcopy.cc b/repos/gems/src/lib/vfs/cbe_crypto/memcopy/memcopy.cc index ac18e01d3b..6ede129b0d 100644 --- a/repos/gems/src/lib/vfs/cbe_crypto/memcopy/memcopy.cc +++ b/repos/gems/src/lib/vfs/cbe_crypto/memcopy/memcopy.cc @@ -65,14 +65,13 @@ struct Crypto : Cbe_crypto::Interface bool _submit_request(uint64_t const block_number, uint32_t const /* key_id */, - char const *src, - size_t const src_len) + Const_byte_range_ptr const &src) { if (_request.pending) { return false; } - if (src_len < sizeof (_internal_buffer)) { + if (src.num_bytes < sizeof (_internal_buffer)) { error("buffer too small"); throw Buffer_too_small(); } @@ -80,30 +79,29 @@ struct Crypto : Cbe_crypto::Interface _request.pending = true; _request.block_number = block_number; - Genode::memcpy(_internal_buffer, src, sizeof (_internal_buffer)); + Genode::memcpy(_internal_buffer, src.start, sizeof (_internal_buffer)); return true; } bool submit_encryption_request(uint64_t const block_number, uint32_t const key_id, - char const *src, - size_t const src_len) override + Const_byte_range_ptr const &src) override { - return _submit_request(block_number, key_id, src, src_len); + return _submit_request(block_number, key_id, src); } - Complete_request _request_complete(char *dst, size_t const dst_len) + Complete_request _request_complete(Byte_range_ptr const &dst) { if (!_request.pending) { return Complete_request { .valid = false, .block_number = 0 }; } - if (dst_len < sizeof (_internal_buffer)) { + if (dst.num_bytes < sizeof (_internal_buffer)) { error("buffer too small"); throw Buffer_too_small(); } - Genode::memcpy(dst, _internal_buffer, sizeof (_internal_buffer)); + Genode::memcpy(dst.start, _internal_buffer, sizeof (_internal_buffer)); _request.pending = false; @@ -112,22 +110,21 @@ struct Crypto : Cbe_crypto::Interface .block_number = _request.block_number }; } - Complete_request encryption_request_complete(char *dst, size_t const dst_len) override + Complete_request encryption_request_complete(Byte_range_ptr const &dst) override { - return _request_complete(dst, dst_len); + return _request_complete(dst); } bool submit_decryption_request(uint64_t const block_number, uint32_t const key_id, - char const *src, - size_t const src_len) override + Const_byte_range_ptr const &src) override { - return _submit_request(block_number, key_id, src, src_len); + return _submit_request(block_number, key_id, src); } - Complete_request decryption_request_complete(char *dst, size_t dst_len) override + Complete_request decryption_request_complete(Byte_range_ptr const &dst) override { - return _request_complete(dst, dst_len); + return _request_complete(dst); } }; diff --git a/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc b/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc index 832f266233..2c9ed69984 100644 --- a/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_crypto/vfs.cc @@ -71,8 +71,7 @@ class Vfs_cbe_crypto::Encrypt_file_system : public Vfs::Single_file_system _state { State::NONE } { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (_state != State::PENDING) { return READ_ERR_IO; @@ -82,14 +81,14 @@ class Vfs_cbe_crypto::Encrypt_file_system : public Vfs::Single_file_system try { Cbe_crypto::Interface::Complete_request const cr = - _crypto.encryption_request_complete(dst, count); + _crypto.encryption_request_complete(dst); if (!cr.valid) { return READ_ERR_INVALID; } _state = State::NONE; - out_count = count; + out_count = dst.num_bytes; return READ_OK; } catch (Cbe_crypto::Interface::Buffer_too_small) { return READ_ERR_INVALID; @@ -98,8 +97,8 @@ class Vfs_cbe_crypto::Encrypt_file_system : public Vfs::Single_file_system return READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, + size_t &out_count) override { if (_state != State::NONE) { return WRITE_ERR_IO; @@ -108,7 +107,7 @@ class Vfs_cbe_crypto::Encrypt_file_system : public Vfs::Single_file_system try { uint64_t const block_number = seek() / Cbe_crypto::BLOCK_SIZE; bool const ok = - _crypto.submit_encryption_request(block_number, _key_id, src, count); + _crypto.submit_encryption_request(block_number, _key_id, src); if (!ok) { out_count = 0; return WRITE_OK; @@ -119,7 +118,7 @@ class Vfs_cbe_crypto::Encrypt_file_system : public Vfs::Single_file_system } _crypto.execute(); - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -206,8 +205,7 @@ class Vfs_cbe_crypto::Decrypt_file_system : public Vfs::Single_file_system _state { State::NONE } { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (_state != State::PENDING) { return READ_ERR_IO; @@ -217,12 +215,12 @@ class Vfs_cbe_crypto::Decrypt_file_system : public Vfs::Single_file_system try { Cbe_crypto::Interface::Complete_request const cr = - _crypto.decryption_request_complete(dst, count); + _crypto.decryption_request_complete(dst); if (cr.valid) { } _state = State::NONE; - out_count = count; + out_count = dst.num_bytes; return READ_OK; } catch (Cbe_crypto::Interface::Buffer_too_small) { return READ_ERR_INVALID; @@ -231,8 +229,7 @@ class Vfs_cbe_crypto::Decrypt_file_system : public Vfs::Single_file_system return READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { if (_state != State::NONE) { return WRITE_ERR_IO; @@ -241,7 +238,7 @@ class Vfs_cbe_crypto::Decrypt_file_system : public Vfs::Single_file_system try { uint64_t const block_number = seek() / Cbe_crypto::BLOCK_SIZE; bool const ok = - _crypto.submit_decryption_request(block_number, _key_id, src, count); + _crypto.submit_decryption_request(block_number, _key_id, src); if (!ok) { out_count = 0; return WRITE_OK; @@ -252,7 +249,7 @@ class Vfs_cbe_crypto::Decrypt_file_system : public Vfs::Single_file_system } _crypto.execute(); - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -499,11 +496,11 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system { using Vfs_handle::Vfs_handle; - virtual Read_result read(char *dst, file_size count, - file_size &out_count) = 0; + virtual Read_result read(Byte_range_ptr const &dst, + size_t &out_count) = 0; - virtual Write_result write(char const *src, file_size count, - file_size &out_count) = 0; + virtual Write_result write(Const_byte_range_ptr const &src, + size_t &out_count) = 0; virtual Sync_result sync() { @@ -520,9 +517,9 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system bool const _root_dir { false }; - Read_result _query_keys(file_size index, - file_size &out_count, - Dirent &out) + Read_result _query_keys(size_t index, + size_t &out_count, + Dirent &out) { if (index >= _key_reg.number_of_keys()) { out_count = sizeof(Dirent); @@ -547,9 +544,9 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system } } - Read_result _query_root(file_size index, - file_size &out_count, - Dirent &out) + Read_result _query_root(size_t index, + size_t &out_count, + Dirent &out) { if (index == 0) { out = { @@ -576,17 +573,16 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system _key_reg(key_reg), _root_dir(root_dir) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { out_count = 0; - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; - file_size index = seek() / sizeof(Dirent); + size_t const index = size_t(seek() / sizeof(Dirent)); - Dirent &out = *(Dirent*)dst; + Dirent &out = *(Dirent*)dst.start; if (!_root_dir) { @@ -599,7 +595,7 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system } } - Write_result write(char const *, file_size, file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_INVALID; } @@ -851,13 +847,13 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system ** File I/O service interface ** ********************************/ - Write_result write(Vfs::Vfs_handle *, char const *, - file_size, file_size &) override + Write_result write(Vfs::Vfs_handle *, + Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_IO; } - bool queue_read(Vfs::Vfs_handle *vfs_handle, file_size size) override + bool queue_read(Vfs::Vfs_handle *vfs_handle, size_t size) override { Dir_snap_vfs_handle *dh = dynamic_cast(vfs_handle); @@ -870,13 +866,13 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system } Read_result complete_read(Vfs::Vfs_handle *vfs_handle, - char *dst, file_size count, - file_size & out_count) override + Byte_range_ptr const &dst, + size_t &out_count) override { Local_vfs_handle *lh = dynamic_cast(vfs_handle); if (lh) { - Read_result const res = lh->read(dst, count, out_count); + Read_result const res = lh->read(dst, out_count); return res; } @@ -884,7 +880,7 @@ class Vfs_cbe_crypto::Keys_file_system : public Vfs::File_system dynamic_cast(vfs_handle); if (dh) { return dh->vfs_handle.fs().complete_read(&dh->vfs_handle, - dst, count, out_count); + dst, out_count); } return READ_ERR_IO; @@ -949,13 +945,13 @@ class Vfs_cbe_crypto::Management_file_system : public Vfs::Single_file_system _crypto { crypto } { } - Read_result read(char *, file_size, file_size &) override + Read_result read(Byte_range_ptr const &, size_t &) override { return READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, + size_t &out_count) override { out_count = 0; @@ -963,26 +959,26 @@ class Vfs_cbe_crypto::Management_file_system : public Vfs::Single_file_system return WRITE_ERR_IO; } - if (src == nullptr || count < sizeof (uint32_t)) { + if (src.start == nullptr || src.num_bytes < sizeof (uint32_t)) { return WRITE_ERR_INVALID; } - uint32_t id = *reinterpret_cast(src); + uint32_t id = *reinterpret_cast(src.start); if (id == 0) { return WRITE_ERR_INVALID; } if (_type == Type::ADD_KEY) { - if (count != sizeof (uint32_t) + 32 /* XXX Cbe::Key::value*/) { + if (src.num_bytes != sizeof (uint32_t) + 32 /* XXX Cbe::Key::value*/) { return WRITE_ERR_INVALID; } try { - char const * value = src + sizeof (uint32_t); - size_t const value_len = count - sizeof (uint32_t); + char const * value = src.start + sizeof (uint32_t); + size_t const value_len = src.num_bytes - sizeof (uint32_t); if (_crypto.add_key(id, value, value_len)) { - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } } catch (...) { } @@ -991,12 +987,12 @@ class Vfs_cbe_crypto::Management_file_system : public Vfs::Single_file_system if (_type == Type::REMOVE_KEY) { - if (count != sizeof (uint32_t)) { + if (src.num_bytes != sizeof (uint32_t)) { return WRITE_ERR_INVALID; } if (_crypto.remove_key(id)) { - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } } diff --git a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc index 3efb58846b..0de045feb2 100644 --- a/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc +++ b/repos/gems/src/lib/vfs/cbe_trust_anchor/vfs.cc @@ -68,7 +68,9 @@ class Trust_anchor Trust_anchor(Trust_anchor const &) = delete; Trust_anchor &operator=(Trust_anchor const&) = delete; - using size_t = Genode::size_t; + using size_t = Genode::size_t; + using Byte_range_ptr = Genode::Byte_range_ptr; + using Const_byte_range_ptr = Genode::Const_byte_range_ptr; Vfs::Env &_vfs_env; @@ -978,7 +980,7 @@ class Trust_anchor return result; } - bool queue_initialize(char const *src, size_t len) + bool queue_initialize(Const_byte_range_ptr const &src) { if (_job != Job::NONE) { return false; @@ -987,7 +989,7 @@ class Trust_anchor if (_state != State::UNINITIALIZED) { return false; } - SHA256((unsigned char const *)src, len, + SHA256((unsigned char const *)src.start, src.num_bytes, (unsigned char *)_passphrase_hash_buffer.base); _passphrase_hash_buffer.size = SHA256_DIGEST_LENGTH; @@ -1010,7 +1012,7 @@ class Trust_anchor return { true, _job_success }; } - bool queue_unlock(char const *src, size_t len) + bool queue_unlock(Const_byte_range_ptr const &src) { if (_job != Job::NONE) { return false; @@ -1027,7 +1029,7 @@ class Trust_anchor return true; } - SHA256((unsigned char const *)src, len, + SHA256((unsigned char const *)src.start, src.num_bytes, (unsigned char *)_passphrase_hash_buffer.base); _passphrase_hash_buffer.size = SHA256_DIGEST_LENGTH; @@ -1065,24 +1067,24 @@ class Trust_anchor return true; } - Complete_request complete_read_last_hash(char *dst, size_t len) + Complete_request complete_read_last_hash(Vfs::Byte_range_ptr const &dst) { if (_job != Job::READ_HASH || _job_state != Job_state::COMPLETE) { return { false, false }; } - if (len < _last_hash.length) { + if (dst.num_bytes < _last_hash.length) { Genode::warning("truncate hash"); } - Genode::memcpy(dst, _last_hash.value, len); + Genode::memcpy(dst.start, _last_hash.value, dst.num_bytes); _job = Job::NONE; _job_state = Job_state::NONE; return { true, _job_success }; } - bool queue_update_last_hash(char const *src, size_t len) + bool queue_update_last_hash(Vfs::Const_byte_range_ptr const &src) { if (_job != Job::NONE) { return false; @@ -1092,20 +1094,17 @@ class Trust_anchor return false; } - if (len != _last_hash.length) { + if (src.num_bytes != _last_hash.length) { return false; } - if (len > _hash_io_job_buffer.size) { - len = _hash_io_job_buffer.size; - } + size_t const len = Genode::min(src.num_bytes, _hash_io_job_buffer.size); _hash_io_job_buffer.size = len; - Genode::memcpy(_hash_io_job_buffer.buffer, src, - _hash_io_job_buffer.size); + Genode::memcpy(_hash_io_job_buffer.buffer, src.start, len); - Genode::memcpy(_last_hash.value, src, len); + Genode::memcpy(_last_hash.value, src.start, len); _job = Job::UPDATE_HASH; _job_state = Job_state::PENDING; @@ -1123,7 +1122,7 @@ class Trust_anchor return { true, _job_success }; } - bool queue_encrypt_key(char const *src, size_t len) + bool queue_encrypt_key(Const_byte_range_ptr const &src) { if (_job != Job::NONE) { return false; @@ -1133,39 +1132,39 @@ class Trust_anchor return false; } - if (len != _encrypt_key.length) { + if (src.num_bytes != _encrypt_key.length) { Genode::error(__func__, ": key length mismatch, expected: ", - _encrypt_key.length, " got: ", len); + _encrypt_key.length, " got: ", src.num_bytes); return false; } - Genode::memcpy(_encrypt_key.value, src, len); + Genode::memcpy(_encrypt_key.value, src.start, src.num_bytes); _job = Job::ENCRYPT; _job_state = Job_state::PENDING; return true; } - Complete_request complete_encrypt_key(char *dst, size_t len) + Complete_request complete_encrypt_key(Byte_range_ptr const &dst) { if (_job != Job::ENCRYPT || _job_state != Job_state::COMPLETE) { return { false, false }; } - if (len != _encrypt_key.length) { + if (dst.num_bytes != _encrypt_key.length) { Genode::error(__func__, ": key length mismatch, expected: ", - _encrypt_key.length, " got: ", len); + _encrypt_key.length, " got: ", dst.num_bytes); return { true, false }; } - Genode::memcpy(dst, _encrypt_key.value, _encrypt_key.length); + Genode::memcpy(dst.start, _encrypt_key.value, _encrypt_key.length); _job = Job::NONE; _job_state = Job_state::NONE; return { true, _job_success }; } - bool queue_decrypt_key(char const *src, size_t len) + bool queue_decrypt_key(Const_byte_range_ptr const &src) { if (_job != Job::NONE) { return false; @@ -1175,32 +1174,32 @@ class Trust_anchor return false; } - if (len != _decrypt_key.length) { + if (src.num_bytes != _decrypt_key.length) { Genode::error(__func__, ": key length mismatch, expected: ", - _decrypt_key.length, " got: ", len); + _decrypt_key.length, " got: ", src.num_bytes); return false; } - Genode::memcpy(_decrypt_key.value, src, len); + Genode::memcpy(_decrypt_key.value, src.start, src.num_bytes); _job = Job::DECRYPT; _job_state = Job_state::PENDING; return true; } - Complete_request complete_decrypt_key(char *dst, size_t len) + Complete_request complete_decrypt_key(Byte_range_ptr const &dst) { if (_job != Job::DECRYPT || _job_state != Job_state::COMPLETE) { return { false, false }; } - if (len != _decrypt_key.length) { + if (dst.num_bytes != _decrypt_key.length) { Genode::error(__func__, ": key length mismatch, expected: ", - _decrypt_key.length, " got: ", len); + _decrypt_key.length, " got: ", dst.num_bytes); return { true, false }; } - Genode::memcpy(dst, _decrypt_key.value, _decrypt_key.length); + Genode::memcpy(dst.start, _decrypt_key.value, _decrypt_key.length); _job = Job::NONE; _job_state = Job_state::NONE; @@ -1218,21 +1217,21 @@ class Trust_anchor return true; } - Complete_request complete_generate_key(char *dst, size_t len) + Complete_request complete_generate_key(Vfs::Byte_range_ptr const &dst) { if (_job != Job::GENERATE || _job_state != Job_state::COMPLETE) { return { false, false }; } + size_t len = dst.num_bytes; + if (len < _generated_key.length) { Genode::warning("truncate generated key"); - } else - - if (len > _generated_key.length) { - len = _generated_key.length; + } else { + len = Genode::min(len, _generated_key.length); } - Genode::memcpy(dst, _generated_key.value, len); + Genode::memcpy(dst.start, _generated_key.value, len); Genode::memset(_generated_key.value, 0, sizeof (_generated_key.value)); _job = Job::NONE; @@ -1264,8 +1263,7 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system _trust_anchor { ta } { } - Read_result read(char *src, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &src, size_t &out_count) override { _trust_anchor.execute(); @@ -1288,14 +1286,14 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system if (_state == State::PENDING_READ) { try { Trust_anchor::Complete_request const cr = - _trust_anchor.complete_read_last_hash(src, count); + _trust_anchor.complete_read_last_hash(src); if (!cr.valid) { _trust_anchor.execute(); return READ_QUEUED; } _state = State::NONE; - out_count = count; + out_count = src.num_bytes; return cr.success ? READ_OK : READ_ERR_IO; } catch (...) { return READ_ERR_INVALID; @@ -1312,7 +1310,7 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system } _state = State::NONE; - out_count = count; + out_count = src.num_bytes; return cr.success ? READ_OK : READ_ERR_IO; } catch (...) { return READ_ERR_INVALID; @@ -1322,8 +1320,7 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system return READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { _trust_anchor.execute(); @@ -1332,8 +1329,7 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system } try { - bool const ok = - _trust_anchor.queue_update_last_hash(src, count); + bool const ok = _trust_anchor.queue_update_last_hash(src); if (!ok) { return WRITE_ERR_IO; } @@ -1343,7 +1339,7 @@ class Vfs_cbe_trust_anchor::Hashsum_file_system : public Vfs::Single_file_system } _trust_anchor.execute(); - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -1425,8 +1421,7 @@ class Vfs_cbe_trust_anchor::Generate_key_file_system : public Vfs::Single_file_s _trust_anchor { ta } { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (_state == State::NONE) { @@ -1439,17 +1434,17 @@ class Vfs_cbe_trust_anchor::Generate_key_file_system : public Vfs::Single_file_s (void)_trust_anchor.execute(); Trust_anchor::Complete_request const cr = - _trust_anchor.complete_generate_key(dst, count); + _trust_anchor.complete_generate_key(dst); if (!cr.valid) { return READ_QUEUED; } _state = State::NONE; - out_count = count; + out_count = dst.num_bytes; return cr.success ? READ_OK : READ_ERR_IO; } - Write_result write(char const *, file_size , file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_IO; } @@ -1533,8 +1528,7 @@ class Vfs_cbe_trust_anchor::Encrypt_file_system : public Vfs::Single_file_system _state { State::NONE } { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (_state != State::PENDING) { return READ_ERR_IO; @@ -1544,14 +1538,14 @@ class Vfs_cbe_trust_anchor::Encrypt_file_system : public Vfs::Single_file_system try { Trust_anchor::Complete_request const cr = - _trust_anchor.complete_encrypt_key(dst, count); + _trust_anchor.complete_encrypt_key(dst); if (!cr.valid) { return READ_QUEUED; } _state = State::NONE; - out_count = count; + out_count = dst.num_bytes; return cr.success ? READ_OK : READ_ERR_IO; } catch (...) { return READ_ERR_INVALID; @@ -1560,8 +1554,7 @@ class Vfs_cbe_trust_anchor::Encrypt_file_system : public Vfs::Single_file_system return READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { if (_state != State::NONE) { return WRITE_ERR_IO; @@ -1569,7 +1562,7 @@ class Vfs_cbe_trust_anchor::Encrypt_file_system : public Vfs::Single_file_system try { bool const ok = - _trust_anchor.queue_encrypt_key(src, count); + _trust_anchor.queue_encrypt_key(src); if (!ok) { return WRITE_ERR_IO; } @@ -1579,7 +1572,7 @@ class Vfs_cbe_trust_anchor::Encrypt_file_system : public Vfs::Single_file_system } _trust_anchor.execute(); - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -1661,8 +1654,7 @@ class Vfs_cbe_trust_anchor::Decrypt_file_system : public Vfs::Single_file_system _state { State::NONE } { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (_state != State::PENDING) { return READ_ERR_IO; @@ -1672,14 +1664,14 @@ class Vfs_cbe_trust_anchor::Decrypt_file_system : public Vfs::Single_file_system try { Trust_anchor::Complete_request const cr = - _trust_anchor.complete_decrypt_key(dst, count); + _trust_anchor.complete_decrypt_key(dst); if (!cr.valid) { return READ_QUEUED; } _state = State::NONE; - out_count = count; + out_count = dst.num_bytes; return cr.success ? READ_OK : READ_ERR_IO; } catch (...) { return READ_ERR_INVALID; @@ -1688,8 +1680,7 @@ class Vfs_cbe_trust_anchor::Decrypt_file_system : public Vfs::Single_file_system return READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { if (_state != State::NONE) { return WRITE_ERR_IO; @@ -1697,7 +1688,7 @@ class Vfs_cbe_trust_anchor::Decrypt_file_system : public Vfs::Single_file_system try { bool const ok = - _trust_anchor.queue_decrypt_key(src, count); + _trust_anchor.queue_decrypt_key(src); if (!ok) { return WRITE_ERR_IO; } @@ -1707,7 +1698,7 @@ class Vfs_cbe_trust_anchor::Decrypt_file_system : public Vfs::Single_file_system } _trust_anchor.execute(); - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } @@ -1790,7 +1781,7 @@ class Vfs_cbe_trust_anchor::Initialize_file_system : public Vfs::Single_file_sys _trust_anchor { ta } { } - Read_result read(char *, file_size, file_size &) override + Read_result read(Byte_range_ptr const &, size_t &) override { if (_state != State::PENDING) { return READ_ERR_INVALID; @@ -1811,8 +1802,7 @@ class Vfs_cbe_trust_anchor::Initialize_file_system : public Vfs::Single_file_sys return cr.success ? READ_OK : READ_ERR_IO; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { if (_state != State::NONE) { return WRITE_ERR_INVALID; @@ -1820,15 +1810,15 @@ class Vfs_cbe_trust_anchor::Initialize_file_system : public Vfs::Single_file_sys _init_pending = _trust_anchor.initialized(); - bool const res = _init_pending ? _trust_anchor.queue_unlock(src, count) - : _trust_anchor.queue_initialize(src, count); + bool const res = _init_pending ? _trust_anchor.queue_unlock(src) + : _trust_anchor.queue_initialize(src); if (!res) { return WRITE_ERR_IO; } _state = State::PENDING; - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } diff --git a/repos/gems/src/lib/vfs/gpu/vfs.cc b/repos/gems/src/lib/vfs/gpu/vfs.cc index 6f04e4df84..aa8339df12 100644 --- a/repos/gems/src/lib/vfs/gpu/vfs.cc +++ b/repos/gems/src/lib/vfs/gpu/vfs.cc @@ -63,19 +63,18 @@ struct Vfs_gpu::File_system : Single_file_system _gpu_session.completion_sigh(_completion_sigh); } - Read_result read(char *dst, file_size /* count */, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (!_complete) return READ_QUEUED; - _complete = false; - dst[0] = 1; - out_count = 1; + _complete = false; + dst.start[0] = 1; + out_count = 1; return READ_OK; } - Write_result write(char const *, file_size, file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_IO; } diff --git a/repos/gems/src/lib/vfs/import/plugin.cc b/repos/gems/src/lib/vfs/import/plugin.cc index 311c18890f..ec067033eb 100644 --- a/repos/gems/src/lib/vfs/import/plugin.cc +++ b/repos/gems/src/lib/vfs/import/plugin.cc @@ -91,17 +91,17 @@ class Vfs_import::File_system : public Vfs::File_system { Flush_guard flush(env.io(), *dst_handle); - file_size count = target.length(); + Const_byte_range_ptr const src { target.string(), target.length() }; + for (;;) { - file_size out_count = 0; - auto wres = dst_handle->fs().write( - dst_handle, target.string(), count, out_count); + size_t out_count = 0; + auto wres = dst_handle->fs().write(dst_handle, src, out_count); switch (wres) { case WRITE_ERR_WOULD_BLOCK: break; default: - if (out_count < count) { + if (out_count < src.num_bytes) { Genode::error("failed to write symlink ", path, ", ", wres); env.root_dir().unlink(path.string()); } @@ -146,22 +146,26 @@ class Vfs_import::File_system : public Vfs::File_system while (true) { - file_size const bytes_from_source = + size_t const bytes_from_source = src_file.read(at, Genode::Byte_range_ptr(buf, sizeof(buf))); - if (!bytes_from_source) break; + if (!bytes_from_source) + break; - bool write_error { false }; - Vfs::file_size remaining_bytes { bytes_from_source }; - char const *src { buf }; + bool write_error = false; + + size_t remaining_bytes = bytes_from_source; + + char const *src_ptr = buf; while (remaining_bytes > 0 && !write_error) { - Vfs::file_size out_count { 0 }; + size_t out_count = 0; + + Const_byte_range_ptr const src { src_ptr, remaining_bytes }; + + switch (dst_handle->fs().write(dst_handle, src, out_count)) { - switch (dst_handle->fs().write(dst_handle, src, - remaining_bytes, - out_count)) { case WRITE_ERR_WOULD_BLOCK: env.io().commit_and_wait(); break; @@ -175,7 +179,7 @@ class Vfs_import::File_system : public Vfs::File_system case WRITE_OK: out_count = min(remaining_bytes, out_count); remaining_bytes -= out_count; - src += out_count; + src_ptr += out_count; at.value += out_count; dst_handle->advance_seek(out_count); break; @@ -275,14 +279,10 @@ class Vfs_import::File_system : public Vfs::File_system ** File I/O service ** **********************/ - Write_result write(Vfs_handle*, - const char *, file_size, - file_size &) override { + Write_result write(Vfs_handle*, Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_INVALID; } - Read_result complete_read(Vfs_handle*, - char*, file_size, - file_size&) override { + Read_result complete_read(Vfs_handle*, Byte_range_ptr const &, size_t &) override { return READ_ERR_INVALID; } bool read_ready(Vfs_handle const &) const override { diff --git a/repos/gems/src/lib/vfs/pipe/plugin.cc b/repos/gems/src/lib/vfs/pipe/plugin.cc index 3cc84857aa..f9952e7470 100644 --- a/repos/gems/src/lib/vfs/pipe/plugin.cc +++ b/repos/gems/src/lib/vfs/pipe/plugin.cc @@ -68,13 +68,8 @@ struct Vfs_pipe::Pipe_handle : Vfs::Vfs_handle, private Pipe_handle_registry_ele virtual ~Pipe_handle(); - Write_result write(const char *buf, - file_size count, - file_size &out_count); - - Read_result read(char *buf, - file_size count, - file_size &out_count); + Write_result write(Const_byte_range_ptr const &, size_t &out_count); + Read_result read (Byte_range_ptr const &, size_t &out_count); bool read_ready() const; bool write_ready() const; @@ -197,19 +192,18 @@ struct Vfs_pipe::Pipe return Open_result::OPEN_ERR_UNACCESSIBLE; } - Write_result write(Pipe_handle &, - const char *buf, file_size count, - file_size &out_count) + Write_result write(Pipe_handle &, Const_byte_range_ptr const &src, size_t &out_count) { - file_size out = 0; + size_t out = 0; if (buffer.avail_capacity() == 0) { out_count = 0; return Write_result::WRITE_OK; } - while (out < count && 0 < buffer.avail_capacity()) { - buffer.add(*(buf++)); + char const *buf_ptr = src.start; + while (out < src.num_bytes && 0 < buffer.avail_capacity()) { + buffer.add(*(buf_ptr++)); ++out; } @@ -221,13 +215,13 @@ struct Vfs_pipe::Pipe return Write_result::WRITE_OK; } - Read_result read(Pipe_handle &handle, - char *buf, file_size count, - file_size &out_count) + Read_result read(Pipe_handle &handle, Byte_range_ptr const &dst, size_t &out_count) { - file_size out = 0; - while (out < count && !buffer.empty()) { - *(buf++) = buffer.get(); + size_t out = 0; + + char *buf_ptr = dst.start; + while (out < dst.num_bytes && !buffer.empty()) { + *(buf_ptr++) = buffer.get(); ++out; } @@ -252,21 +246,23 @@ struct Vfs_pipe::Pipe }; -Vfs_pipe::Pipe_handle::~Pipe_handle() { - pipe.remove(*this); } +Vfs_pipe::Pipe_handle::~Pipe_handle() +{ + pipe.remove(*this); +} Vfs_pipe::Write_result -Vfs_pipe::Pipe_handle::write(const char *buf, - file_size count, - file_size &out_count) { - return Pipe_handle::pipe.write(*this, buf, count, out_count); } +Vfs_pipe::Pipe_handle::write(Const_byte_range_ptr const &src, size_t &out_count) +{ + return Pipe_handle::pipe.write(*this, src, out_count); +} Vfs_pipe::Read_result -Vfs_pipe::Pipe_handle::read(char *buf, file_size count, file_size &out_count) +Vfs_pipe::Pipe_handle::read(Byte_range_ptr const &dst, size_t &out_count) { - return Pipe_handle::pipe.read(*this, buf, count, out_count); + return Pipe_handle::pipe.read(*this, dst, out_count); } @@ -314,13 +310,11 @@ struct Vfs_pipe::New_pipe_handle : Vfs::Vfs_handle pipe.remove_new_handle(); } - Read_result read(char *buf, - file_size count, - file_size &out_count) + Read_result read(Byte_range_ptr const &dst, size_t &out_count) { auto name = pipe.name(); - if (name.length() < count) { - memcpy(buf, name.string(), name.length()); + if (name.length() < dst.num_bytes) { + memcpy(dst.start, name.string(), name.length()); out_count = name.length(); return Read_result::READ_OK; } @@ -569,24 +563,22 @@ class Vfs_pipe::File_system : public Vfs::File_system **********************/ Write_result write(Vfs_handle *vfs_handle, - const char *src, file_size count, - file_size &out_count) override + Const_byte_range_ptr const &src, size_t &out_count) override { if (Pipe_handle *handle = dynamic_cast(vfs_handle)) - return handle->write(src, count, out_count); + return handle->write(src, out_count); return WRITE_ERR_INVALID; } Read_result complete_read(Vfs_handle *vfs_handle, - char *dst, file_size count, - file_size &out_count) override + Byte_range_ptr const &dst, size_t &out_count) override { if (Pipe_handle *handle = dynamic_cast(vfs_handle)) - return handle->read(dst, count, out_count); + return handle->read(dst, out_count); if (New_pipe_handle *handle = dynamic_cast(vfs_handle)) - return handle->read(dst, count, out_count); + return handle->read(dst, out_count); return READ_ERR_INVALID; } diff --git a/repos/gems/src/lib/vfs/trace/vfs.cc b/repos/gems/src/lib/vfs/trace/vfs.cc index 2fa3f88bbb..a857a34bd3 100644 --- a/repos/gems/src/lib/vfs/trace/vfs.cc +++ b/repos/gems/src/lib/vfs/trace/vfs.cc @@ -122,16 +122,15 @@ class Vfs_trace::Trace_buffer_file_system : public Single_file_system : Single_vfs_handle(ds, fs, alloc, 0), _entries(entries) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { out_count = 0; _entries.for_each_new_entry([&](Trace::Buffer::Entry entry) { - file_size size = min(count - out_count, entry.length()); - memcpy(dst + out_count, entry.data(), (size_t)size); + size_t const size = min(dst.num_bytes - out_count, entry.length()); + memcpy(dst.start + out_count, entry.data(), size); out_count += size; - if (out_count == count) + if (out_count == dst.num_bytes) return false; return true; @@ -140,8 +139,7 @@ class Vfs_trace::Trace_buffer_file_system : public Single_file_system return READ_OK; } - Write_result write(char const *, file_size, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &, size_t &out_count) override { out_count = 0; return WRITE_ERR_INVALID; diff --git a/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h b/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h index 4ae51b2b32..62e6c0fb5d 100644 --- a/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h +++ b/repos/gems/src/lib/vfs/ttf/glyphs_file_system.h @@ -54,17 +54,19 @@ class Vfs::Glyphs_file_system : public Vfs::Single_file_system Single_vfs_handle(ds, fs, alloc, 0), _font(font) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { out_count = 0; if (seek() > FILE_SIZE) return READ_ERR_INVALID; - Codepoint const codepoint { (uint32_t)(seek() / Vfs_font::GLYPH_SLOT_BYTES) }; + Codepoint const codepoint { uint32_t(seek() / Vfs_font::GLYPH_SLOT_BYTES) }; - file_size byte_offset = seek() % Vfs_font::GLYPH_SLOT_BYTES; + size_t byte_offset = size_t(seek() % Vfs_font::GLYPH_SLOT_BYTES); + + char *dst_ptr = dst.start; + size_t count = dst.num_bytes; _font.apply_glyph(codepoint, [&] (Glyph_painter::Glyph const &glyph) { @@ -73,10 +75,10 @@ class Vfs::Glyphs_file_system : public Vfs::Single_file_system Glyph_header const header(glyph); char const * const src = (char const *)&header + byte_offset; - size_t const len = min(sizeof(header) - (size_t)byte_offset, (size_t)count); - memcpy(dst, src, len); + size_t const len = min(sizeof(header) - byte_offset, count); + memcpy(dst_ptr, src, len); - dst += len; + dst_ptr += len; byte_offset += len; count -= len; out_count += len; @@ -92,8 +94,8 @@ class Vfs::Glyphs_file_system : public Vfs::Single_file_system if (alpha_offset < alpha_values_len) { char const * const src = (char const *)glyph.values + alpha_offset; - size_t const len = min(alpha_values_len - alpha_offset, (size_t)count); - memcpy(dst, src, len); + size_t const len = min(alpha_values_len - alpha_offset, count); + memcpy(dst_ptr, src, len); out_count += len; } }); @@ -101,7 +103,7 @@ class Vfs::Glyphs_file_system : public Vfs::Single_file_system return READ_OK; } - Write_result write(char const *, file_size, file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_IO; } diff --git a/repos/libports/src/lib/libc/vfs_plugin.cc b/repos/libports/src/lib/libc/vfs_plugin.cc index f1f8d2f43c..4de7ed811c 100644 --- a/repos/libports/src/lib/libc/vfs_plugin.cc +++ b/repos/libports/src/lib/libc/vfs_plugin.cc @@ -846,12 +846,14 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, Vfs::Vfs_handle *handle = vfs_handle(fd); - Vfs::file_size out_count = 0; - Result out_result = Result::WRITE_OK; + ::size_t out_count = 0; + Result out_result = Result::WRITE_OK; + + Const_byte_range_ptr const src { (char const *)buf, count }; if (fd->flags & O_NONBLOCK) { monitor().monitor([&] { - out_result = handle->fs().write(handle, (char const *)buf, count, out_count); + out_result = handle->fs().write(handle, src, out_count); return Fn::COMPLETE; }); } else { @@ -862,7 +864,7 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, Vfs::Vfs_handle *_handle { handle }; void const *_buf { buf }; ::size_t _count { count }; - Vfs::file_size &_out_count { out_count }; + ::size_t &_out_count { out_count }; Result &_out_result { out_result }; ::off_t _offset { 0 }; unsigned _iteration { 0 }; @@ -889,10 +891,12 @@ ssize_t Libc::Vfs_plugin::write(File_descriptor *fd, const void *buf, for (;;) { /* number of bytes written in one iteration */ - Vfs::file_size partial_out_count = 0; + ::size_t partial_out_count = 0; - char const * const src = (char const *)_buf + _offset; - _out_result = _handle->fs().write(_handle, src, _count, partial_out_count); + Const_byte_range_ptr const src { (char const *)_buf + _offset, + _count }; + + _out_result = _handle->fs().write(_handle, src, partial_out_count); if (_out_result == Result::WRITE_ERR_WOULD_BLOCK) return Fn::INCOMPLETE; @@ -986,11 +990,12 @@ ssize_t Libc::Vfs_plugin::read(File_descriptor *fd, void *buf, if (!succeeded) return Errno(result_errno); - Vfs::file_size out_count = 0; - Result out_result; + ::size_t out_count = 0; + Result out_result; monitor().monitor([&] { - out_result = handle->fs().complete_read(handle, (char *)buf, count, out_count); + Byte_range_ptr const dst { (char *)buf, count }; + out_result = handle->fs().complete_read(handle, dst, out_count); return out_result != Result::READ_QUEUED ? Fn::COMPLETE : Fn::INCOMPLETE; }); @@ -1033,11 +1038,12 @@ ssize_t Libc::Vfs_plugin::getdirentries(File_descriptor *fd, char *buf, return handle->fs().queue_read(handle, sizeof(Dirent)) ? Fn::COMPLETE : Fn::INCOMPLETE; }); - Result out_result; - Vfs::file_size out_count; + Result out_result; + ::size_t out_count; monitor().monitor([&] { - out_result = handle->fs().complete_read(handle, (char *)&dirent_out, sizeof(Dirent), out_count); + Byte_range_ptr const dst { (char *)&dirent_out, sizeof(Dirent) }; + out_result = handle->fs().complete_read(handle, dst, out_count); return out_result != Result::READ_QUEUED ? Fn::COMPLETE : Fn::INCOMPLETE; }); @@ -2070,10 +2076,12 @@ int Libc::Vfs_plugin::fsync(File_descriptor *fd) int Libc::Vfs_plugin::symlink(const char *target_path, const char *link_path) { - Vfs::Vfs_handle *handle { nullptr }; - Constructible sync; - Vfs::file_size const count { ::strlen(target_path) + 1 }; - Vfs::file_size out_count { 0 }; + Vfs::Vfs_handle *handle { nullptr }; + Constructible sync; + + size_t const count = ::strlen(target_path) + 1; + + size_t out_count = 0; { bool succeeded { false }; @@ -2127,10 +2135,12 @@ int Libc::Vfs_plugin::symlink(const char *target_path, const char *link_path) case Stage::WRITE: { - typedef Vfs::File_io_service::Write_result Result; + using Result = Vfs::File_io_service::Write_result; + + Const_byte_range_ptr const src { target_path, count }; + + Result result = handle->fs().write(handle, src, out_count); - Result result = handle->fs().write(handle, target_path, - count, out_count); if (result == Result::WRITE_ERR_WOULD_BLOCK) return Fn::INCOMPLETE; } @@ -2164,12 +2174,14 @@ ssize_t Libc::Vfs_plugin::readlink(const char *link_path, char *buf, ::size_t bu { enum class Stage { OPEN, QUEUE_READ, COMPLETE_READ }; - Stage stage { Stage::OPEN }; - Vfs::Vfs_handle *handle { nullptr }; - Vfs::file_size out_len { 0 }; + Stage stage { Stage::OPEN }; + + Vfs::Vfs_handle *handle = nullptr; + + ::size_t out_count = 0; + bool succeeded = false; + int result_errno = 0; - bool succeeded { false }; - int result_errno { 0 }; monitor().monitor([&] { switch (stage) { @@ -2207,10 +2219,12 @@ ssize_t Libc::Vfs_plugin::readlink(const char *link_path, char *buf, ::size_t bu case Stage::COMPLETE_READ: { - typedef Vfs::File_io_service::Read_result Result; + using Result = Vfs::File_io_service::Read_result; + + Byte_range_ptr const dst { buf, buf_size }; Result out_result = - handle->fs().complete_read(handle, buf, buf_size, out_len); + handle->fs().complete_read(handle, dst, out_count); switch (out_result) { case Result::READ_QUEUED: return Fn::INCOMPLETE;; @@ -2230,7 +2244,7 @@ ssize_t Libc::Vfs_plugin::readlink(const char *link_path, char *buf, ::size_t bu if (!succeeded) return Errno(result_errno); - return out_len; + return out_count; } diff --git a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc index a700a529f7..04c2e80724 100644 --- a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc +++ b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc @@ -88,9 +88,8 @@ class Fatfs::File_system : public Vfs::File_system { using Vfs_handle::Vfs_handle; - virtual Read_result complete_read(char *buf, - file_size buf_size, - file_size &out_count) = 0; + virtual Read_result complete_read(Byte_range_ptr const &dst, + size_t &out_count) = 0; }; struct Fatfs_file_watch_handle : Vfs_watch_handle, Fatfs_watch_handles::Element @@ -121,9 +120,8 @@ class Fatfs::File_system : public Vfs::File_system Fatfs_file_handle(File_system &fs, Allocator &alloc, int status_flags) : Fatfs_handle(fs, fs, alloc, status_flags) { } - Read_result complete_read(char *buf, - file_size buf_size, - file_size &out_count) override + Read_result complete_read(Byte_range_ptr const &dst, + size_t &out_count) override { if (!file) { Genode::error("READ_ERR_INVALID"); @@ -138,7 +136,7 @@ class Fatfs::File_system : public Vfs::File_system fres = f_lseek(fil, seek()); if (fres == FR_OK) { UINT bw = 0; - fres = f_read(fil, buf, buf_size, &bw); + fres = f_read(fil, dst.start, dst.num_bytes, &bw); out_count = bw; } @@ -163,25 +161,24 @@ class Fatfs::File_system : public Vfs::File_system Fatfs_dir_handle(File_system &fs, Allocator &alloc, char const *path) : Fatfs_handle(fs, fs, alloc, 0), path(path) { } - Read_result complete_read(char *buf, - file_size buf_size, - file_size &out_count) override + Read_result complete_read(Byte_range_ptr const &dst, + size_t &out_count) override { /* not very efficient, just N calls to f_readdir */ out_count = 0; - if (buf_size < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; - file_size dir_index = seek() / sizeof(Dirent); + size_t dir_index = size_t(seek() / sizeof(Dirent)); if (dir_index < cur_index) { /* reset the seek position */ f_readdir(&dir, nullptr); cur_index = 0; } - Dirent &vfs_dirent = *(Dirent*)buf; + Dirent &vfs_dirent = *(Dirent*)dst.start; FILINFO info; FRESULT res; @@ -692,9 +689,8 @@ class Fatfs::File_system : public Vfs::File_system ** File io service interface ** *******************************/ - Write_result write(Vfs_handle *vfs_handle, - char const *buf, file_size buf_size, - file_size &out_count) override + Write_result write(Vfs_handle *vfs_handle, Const_byte_range_ptr const &src, + size_t &out_count) override { Fatfs_file_handle *handle = static_cast(vfs_handle); if (!handle->file) @@ -723,7 +719,7 @@ class Fatfs::File_system : public Vfs::File_system if (fres == FR_OK) { UINT bw = 0; - fres = f_write(fil, buf, buf_size, &bw); + fres = f_write(fil, src.start, src.num_bytes, &bw); f_sync(fil); handle->modifying = true; out_count = bw; @@ -738,12 +734,11 @@ class Fatfs::File_system : public Vfs::File_system } } - Read_result complete_read(Vfs_handle *vfs_handle, char *buf, - file_size buf_size, - file_size &out_count) override + Read_result complete_read(Vfs_handle *vfs_handle, Byte_range_ptr const &dst, + size_t &out_count) override { Fatfs_file_handle *handle = static_cast(vfs_handle); - return handle->complete_read(buf, buf_size, out_count); + return handle->complete_read(dst, out_count); } Ftruncate_result ftruncate(Vfs_handle *vfs_handle, file_size len) override diff --git a/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h b/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h index 69159eef32..2f07c5f5d7 100644 --- a/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h +++ b/repos/libports/src/lib/vfs/jitterentropy/vfs_jitterentropy.h @@ -67,29 +67,27 @@ class Jitterentropy_file_system : public Vfs::Single_file_system _ec_stir(ec_stir), _initialized(initialized) { } - Read_result read(char *dst, Vfs::file_size count, - Vfs::file_size &out_count) override + Read_result read(Genode::Byte_range_ptr const &dst, size_t &out_count) override { if (!_initialized) return READ_ERR_IO; - enum { MAX_BUF_LEN = 256 }; + enum { MAX_BUF_LEN = 256UL }; char buf[MAX_BUF_LEN]; - size_t len = count > MAX_BUF_LEN ? MAX_BUF_LEN : count; + size_t const len = Genode::min(dst.num_bytes, MAX_BUF_LEN); if (jent_read_entropy(_ec_stir, buf, len) < 0) return READ_ERR_IO; - Genode::memcpy(dst, buf, len); + Genode::memcpy(dst.start, buf, len); out_count = len; return READ_OK; } - Write_result write(char const *src, Vfs::file_size count, - Vfs::file_size &out_count) override + Write_result write(Genode::Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_IO; } diff --git a/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc b/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc index f234bf7b88..5d84e59387 100644 --- a/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc +++ b/repos/libports/src/lib/vfs/libusb/vfs_libusb.cc @@ -86,8 +86,7 @@ class Libusb_file_system : public Vfs::Single_file_system return nonconst_this._usb_connection.source()->ack_avail(); } - Read_result read(char *dst, Vfs::file_size count, - Vfs::file_size &out_count) override + Read_result read(Genode::Byte_range_ptr const &, Genode::size_t &) override { return READ_ERR_IO; } @@ -97,8 +96,7 @@ class Libusb_file_system : public Vfs::Single_file_system return true; } - Write_result write(char const *src, Vfs::file_size count, - Vfs::file_size &out_count) override + Write_result write(Genode::Const_byte_range_ptr const &, Genode::size_t &) override { return WRITE_ERR_IO; } diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index ce808a14e9..96be050d20 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -130,8 +130,7 @@ struct Lwip::Directory { virtual ~Directory() { } - virtual Read_result readdir(char *dst, file_size count, - file_size &out_count) = 0; + virtual Read_result readdir(Byte_range_ptr const &dst, size_t &out_count) = 0; virtual bool directory(char const *path) = 0; }; @@ -142,11 +141,9 @@ struct Lwip::Lwip_handle : Vfs::Vfs_handle Lwip_handle(Vfs::File_system &fs, Allocator &alloc, int status_flags) : Vfs_handle(fs, fs, alloc, status_flags) { } - virtual Read_result read(char *dst, file_size count, - file_size &out_count) = 0; + virtual Read_result read(Byte_range_ptr const &dst, size_t &out_count) = 0; - virtual Write_result write(char const *, file_size, - file_size &) { + virtual Write_result write(Const_byte_range_ptr const &, size_t &) { return Write_result::WRITE_ERR_INVALID; } }; @@ -166,11 +163,10 @@ struct Lwip::Lwip_dir_handle final : Lwip_handle Lwip_dir_handle(Vfs::File_system &fs, Allocator &alloc, Directory &dir) : Lwip_handle(fs, alloc, 0), dir(&dir) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { return (dir) - ? dir->readdir(dst, count, out_count) + ? dir->readdir(dst, out_count) : Read_result::READ_ERR_INVALID; } }; @@ -182,15 +178,14 @@ struct Lwip::Lwip_nameserver_handle final : Lwip_handle, private Nameserver_regi : Lwip_handle(fs, alloc, Vfs::Directory_service::OPEN_MODE_RDONLY), Nameserver_registry::Element(registry, *this) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { - memset(dst, 0x00, min(file_size(IPADDR_STRLEN_MAX), count)); - ipaddr_ntoa_r(dns_getserver(0), dst, count); + memset(dst.start, 0x00, min(file_size(IPADDR_STRLEN_MAX), dst.num_bytes)); + ipaddr_ntoa_r(dns_getserver(0), dst.start, dst.num_bytes); - auto n = strlen(dst); - if (n < count) - dst[n] = '\n'; + auto n = strlen(dst.start); + if (n < dst.num_bytes) + dst.start[n] = '\n'; out_count = n+1; return Read_result::READ_OK; @@ -208,8 +203,7 @@ struct Lwip::Lwip_address_handle final : Lwip_handle , netif(netif) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { using namespace Genode; @@ -220,8 +214,8 @@ struct Lwip::Lwip_address_handle final : Lwip_handle Genode::String line((char const *)address, "\n"); - size_t n = min(line.length(), count); - memcpy(dst, line.string(), n); + size_t n = min(line.length(), dst.num_bytes); + memcpy(dst.start, line.string(), n); out_count = n; return Read_result::READ_OK; } @@ -238,8 +232,7 @@ struct Lwip::Lwip_netmask_handle final : Lwip_handle , netif(netif) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { using namespace Genode; @@ -250,8 +243,8 @@ struct Lwip::Lwip_netmask_handle final : Lwip_handle Genode::String line((char const *)netmask, "\n"); - size_t n = min(line.length(), count); - memcpy(dst, line.string(), n); + size_t n = min(line.length(), dst.num_bytes); + memcpy(dst.start, line.string(), n); out_count = n; return Read_result::READ_OK; } @@ -318,11 +311,9 @@ struct Lwip::Lwip_file_handle final : Lwip_handle, private Lwip_handle_list::Ele ~Lwip_file_handle(); - Read_result read(char *dst, file_size count, - file_size &out_count) override; + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override; - Write_result write(char const *src, file_size count, - file_size &out_count) override; + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override; bool notify_read_ready(); }; @@ -406,7 +397,7 @@ struct Lwip::Socket_dir : Lwip::Directory return Open_result::OPEN_OK; } - Read_result readdir(char *, file_size, file_size &) override + Read_result readdir(Byte_range_ptr const &, size_t &) override { Genode::warning(__func__, " NOT_IMPLEMENTED"); return Read_result::READ_ERR_INVALID; @@ -418,13 +409,13 @@ struct Lwip::Socket_dir : Lwip::Directory return (!*path); } - virtual Read_result read(Lwip_file_handle&, - char *dst, file_size count, - file_size &out_count) = 0; + virtual Read_result read(Lwip_file_handle &, + Byte_range_ptr const &dst, + size_t &out_count) = 0; - virtual Write_result write(Lwip_file_handle&, - char const *src, file_size count, - file_size &out_count) = 0; + virtual Write_result write(Lwip_file_handle &, + Const_byte_range_ptr const &src, + size_t &out_count) = 0; virtual bool read_ready (Lwip_file_handle const &) const = 0; virtual bool write_ready(Lwip_file_handle const &) const = 0; @@ -444,11 +435,13 @@ struct Lwip::Socket_dir : Lwip::Directory Lwip::Lwip_file_handle::Lwip_file_handle(Vfs::File_system &fs, Allocator &alloc, int status_flags, Socket_dir &s, Lwip_file_handle::Kind k) -: Lwip_handle(fs, alloc, status_flags), socket(&s), kind(k) +: + Lwip_handle(fs, alloc, status_flags), socket(&s), kind(k) { socket->handles.insert(this); } + Lwip::Lwip_file_handle::~Lwip_file_handle() { if (socket) { @@ -462,24 +455,27 @@ Lwip::Lwip_file_handle::~Lwip_file_handle() } } -Lwip::Read_result Lwip::Lwip_file_handle::read(char *dst, file_size count, - file_size &out_count) + +Lwip::Read_result Lwip::Lwip_file_handle::read(Byte_range_ptr const &dst, + size_t &out_count) { if (!socket) return Read_result::READ_ERR_INVALID; - return socket->read(*this, dst, count, out_count); + return socket->read(*this, dst, out_count); } -Lwip::Write_result Lwip::Lwip_file_handle::write(char const *src, file_size count, - file_size &out_count) + +Lwip::Write_result Lwip::Lwip_file_handle::write(Const_byte_range_ptr const &src, + size_t &out_count) { if (!socket) return Write_result::WRITE_ERR_INVALID; - return socket->write(*this, src, count, out_count); + return socket->write(*this, src, out_count); } + bool Lwip::Lwip_file_handle::notify_read_ready() { if (socket) { @@ -644,7 +640,7 @@ class Lwip::Protocol_dir_impl final : public Protocol_dir return Directory_service::STAT_ERR_NO_ENTRY; } - Read_result readdir(char *, file_size, file_size &) override + Read_result readdir(Byte_range_ptr const &, size_t &) override { Genode::warning(__func__, " NOT_IMPLEMENTED"); return Read_result::READ_ERR_INVALID; @@ -891,9 +887,8 @@ class Lwip::Udp_socket_dir final : return true; } - Read_result read(Lwip_file_handle &handle, - char *dst, file_size count, - file_size &out_count) override + Read_result read(Lwip_file_handle &handle, Byte_range_ptr const &dst, + size_t &out_count) override { Read_result result = Read_result::READ_ERR_INVALID; @@ -902,7 +897,7 @@ class Lwip::Udp_socket_dir final : case Lwip_file_handle::DATA: { result = Read_result::READ_QUEUED; _packet_queue.head([&] (Packet &pkt) { - out_count = pkt.read(dst, count); + out_count = pkt.read(dst.start, dst.num_bytes); if (pkt.empty()) { _packet_queue.remove(pkt); destroy(_packet_slab, &pkt); @@ -914,18 +909,18 @@ class Lwip::Udp_socket_dir final : case Lwip_file_handle::PEEK: _packet_queue.head([&] (Packet const &pkt) { - out_count = pkt.peek(dst, count); + out_count = pkt.peek(dst.start, dst.num_bytes); result = Read_result::READ_OK; }); break; case Lwip_file_handle::LOCAL: case Lwip_file_handle::BIND: { - if (count < ENDPOINT_STRLEN_MAX) + if (dst.num_bytes < ENDPOINT_STRLEN_MAX) return Read_result::READ_ERR_INVALID; char const *ip_str = ipaddr_ntoa(&_pcb->local_ip); /* TODO: [IPv6]:port */ - out_count = Genode::snprintf(dst, count, "%s:%d\n", + out_count = Genode::snprintf(dst.start, dst.num_bytes, "%s:%d\n", ip_str, _pcb->local_port); return Read_result::READ_OK; } @@ -933,14 +928,14 @@ class Lwip::Udp_socket_dir final : case Lwip_file_handle::CONNECT: { /* check if the PCB was connected */ if (!ip_addr_isany(&_pcb->remote_ip)) - out_count = Genode::snprintf(dst, count, "connected"); + out_count = Genode::snprintf(dst.start, dst.num_bytes, "connected"); else - out_count = Genode::snprintf(dst, count, "not connected"); + out_count = Genode::snprintf(dst.start, dst.num_bytes, "not connected"); return Read_result::READ_OK; } case Lwip_file_handle::REMOTE: - if (count < ENDPOINT_STRLEN_MAX) { + if (dst.num_bytes < ENDPOINT_STRLEN_MAX) { Genode::error("VFS LwIP: accept file read buffer is too small"); result = Read_result::READ_ERR_INVALID; } else @@ -948,14 +943,14 @@ class Lwip::Udp_socket_dir final : _packet_queue.head([&] (Packet &pkt) { char const *ip_str = ipaddr_ntoa(&pkt.addr); /* TODO: IPv6 */ - out_count = Genode::snprintf(dst, count, "%s:%d\n", + out_count = Genode::snprintf(dst.start, dst.num_bytes, "%s:%d\n", ip_str, pkt.port); result = Read_result::READ_OK; }); } else { char const *ip_str = ipaddr_ntoa(&_pcb->remote_ip); /* TODO: [IPv6]:port */ - out_count = Genode::snprintf(dst, count, "%s:%d\n", + out_count = Genode::snprintf(dst.start, dst.num_bytes, "%s:%d\n", ip_str, _pcb->remote_port); result = Read_result::READ_OK; } @@ -965,8 +960,8 @@ class Lwip::Udp_socket_dir final : /* * Print the location of this socket directory */ - out_count = Genode::snprintf( - dst, count, "udp/%s\n", name().string()); + out_count = Genode::snprintf(dst.start, dst.num_bytes, "udp/%s\n", + name().string()); return Read_result::READ_OK; break; @@ -982,18 +977,20 @@ class Lwip::Udp_socket_dir final : } Write_result write(Lwip_file_handle &handle, - char const *src, file_size count, - file_size &out_count) override + Const_byte_range_ptr const &src, + size_t &out_count) override { switch (handle.kind) { case Lwip_file_handle::DATA: { if (ip_addr_isany(&_to_addr)) break; - file_size remain = count; + char const *src_ptr = src.start; + size_t remain = src.num_bytes; + while (remain) { - pbuf *buf = pbuf_alloc(PBUF_RAW, remain, PBUF_RAM); - pbuf_take(buf, src, buf->tot_len); + pbuf * const buf = pbuf_alloc(PBUF_RAW, remain, PBUF_RAM); + pbuf_take(buf, src_ptr, buf->tot_len); err_t err = udp_sendto(_pcb, buf, &_to_addr, _to_port); pbuf_free(buf); @@ -1001,10 +998,10 @@ class Lwip::Udp_socket_dir final : return Write_result::WRITE_ERR_WOULD_BLOCK; else if (err != ERR_OK) return Write_result::WRITE_ERR_IO; - remain -= buf->tot_len; - src += buf->tot_len; + remain -= buf->tot_len; + src_ptr += buf->tot_len; } - out_count = count; + out_count = src.num_bytes; return Write_result::WRITE_OK; } @@ -1013,12 +1010,11 @@ class Lwip::Udp_socket_dir final : return Write_result::WRITE_ERR_INVALID; } else { char buf[ENDPOINT_STRLEN_MAX]; - copy_cstring(buf, src, min(count+1, sizeof(buf))); + copy_cstring(buf, src.start, min(src.num_bytes + 1, sizeof(buf))); _to_port = remove_port(buf); - out_count = count; if (ipaddr_aton(buf, &_to_addr)) { - out_count = count; + out_count = src.num_bytes; return Write_result::WRITE_OK; } } @@ -1026,19 +1022,19 @@ class Lwip::Udp_socket_dir final : } case Lwip_file_handle::BIND: { - if (count < ENDPOINT_STRLEN_MAX) { + if (src.num_bytes < ENDPOINT_STRLEN_MAX) { char buf[ENDPOINT_STRLEN_MAX]; ip_addr_t addr; u16_t port; - copy_cstring(buf, src, min(count+1, sizeof(buf))); + copy_cstring(buf, src.start, min(src.num_bytes + 1, sizeof(buf))); port = remove_port(buf); if (!ipaddr_aton(buf, &addr)) break; err_t err = udp_bind(_pcb, &addr, port); if (err == ERR_OK) { - out_count = count; + out_count = src.num_bytes; return Write_result::WRITE_OK; } return Write_result::WRITE_ERR_IO; @@ -1047,10 +1043,10 @@ class Lwip::Udp_socket_dir final : } case Lwip_file_handle::CONNECT: { - if (count < ENDPOINT_STRLEN_MAX) { + if (src.num_bytes < ENDPOINT_STRLEN_MAX) { char buf[ENDPOINT_STRLEN_MAX]; - copy_cstring(buf, src, min(count+1, sizeof(buf))); + copy_cstring(buf, src.start, min(src.num_bytes + 1, sizeof(buf))); _to_port = remove_port(buf); if (!ipaddr_aton(buf, &_to_addr)) @@ -1062,7 +1058,7 @@ class Lwip::Udp_socket_dir final : return Write_result::WRITE_ERR_IO; } - out_count = count; + out_count = src.num_bytes; return Write_result::WRITE_OK; } break; @@ -1303,9 +1299,8 @@ class Lwip::Tcp_socket_dir final : return false; } - Read_result read(Lwip_file_handle &handle, - char *dst, file_size count, - file_size &out_count) override + Read_result read(Lwip_file_handle &handle, Byte_range_ptr const &dst, + size_t &out_count) override { switch (handle.kind) { @@ -1328,8 +1323,8 @@ class Lwip::Tcp_socket_dir final : : Read_result::READ_OK; } - u16_t const ucount = min(count, (file_size)0xffff); - u16_t const n = pbuf_copy_partial(_recv_pbuf, dst, ucount, 0); + u16_t const ucount = min(dst.num_bytes, (file_size)0xffff); + u16_t const n = pbuf_copy_partial(_recv_pbuf, dst.start, ucount, 0); _recv_pbuf = pbuf_free_header(_recv_pbuf, n); @@ -1347,19 +1342,19 @@ class Lwip::Tcp_socket_dir final : case Lwip_file_handle::PEEK: if (_recv_pbuf != nullptr) { - u16_t const ucount = min(count, (file_size)0xffff); - u16_t const n = pbuf_copy_partial(_recv_pbuf, dst, ucount, 0); + u16_t const ucount = min(dst.num_bytes, 0xffffUL); + u16_t const n = pbuf_copy_partial(_recv_pbuf, dst.start, ucount, 0); out_count = n; } return Read_result::READ_OK; case Lwip_file_handle::REMOTE: if (state == READY) { - if (count < ENDPOINT_STRLEN_MAX) + if (dst.num_bytes < ENDPOINT_STRLEN_MAX) return Read_result::READ_ERR_INVALID; char const *ip_str = ipaddr_ntoa(&_pcb->remote_ip); /* TODO: [IPv6]:port */ - out_count = Genode::snprintf(dst, count, "%s:%d\n", + out_count = Genode::snprintf(dst.start, dst.num_bytes, "%s:%d\n", ip_str, _pcb->remote_port); return Read_result::READ_OK; } else { @@ -1385,7 +1380,7 @@ class Lwip::Tcp_socket_dir final : handle.kind = Lwip_file_handle::LOCATION; /* read the location of the new socket directory */ - Read_result result = handle.read(dst, count, out_count); + Read_result result = handle.read(dst, out_count); return result; } @@ -1397,8 +1392,8 @@ class Lwip::Tcp_socket_dir final : /* * Print the location of this socket directory */ - out_count = Genode::snprintf( - dst, count, "tcp/%s\n", name().string()); + out_count = Genode::snprintf(dst.start, dst.num_bytes, "tcp/%s\n", + name().string()); return Read_result::READ_OK; break; @@ -1410,20 +1405,19 @@ class Lwip::Tcp_socket_dir final : for (Pcb_pending *p = _pcb_pending.first(); p; p = p->next()) ++pending_count; - out_count = Genode::snprintf( - dst, count, "%d\n", pending_count); + out_count = Genode::snprintf(dst.start, dst.num_bytes, "%d\n", pending_count); return Read_result::READ_OK; } case Lwip_file_handle::LOCAL: case Lwip_file_handle::BIND: if (state != CLOSED) { - if (count < ENDPOINT_STRLEN_MAX) + if (dst.num_bytes < ENDPOINT_STRLEN_MAX) return Read_result::READ_ERR_INVALID; char const *ip_str = ipaddr_ntoa(&_pcb->local_ip); /* TODO: [IPv6]:port */ - out_count = Genode::snprintf( - dst, count, "%s:%d\n", ip_str, _pcb->local_port); + out_count = Genode::snprintf(dst.start, dst.num_bytes, + "%s:%d\n", ip_str, _pcb->local_port); return Read_result::READ_OK; } break; @@ -1431,10 +1425,10 @@ class Lwip::Tcp_socket_dir final : case Lwip_file_handle::CONNECT: switch (state) { case READY: - out_count = Genode::snprintf(dst, count, "connected"); + out_count = Genode::snprintf(dst.start, dst.num_bytes, "connected"); break; default: - out_count = Genode::snprintf(dst, count, "connection refused"); + out_count = Genode::snprintf(dst.start, dst.num_bytes, "connection refused"); break; } return Read_result::READ_OK; @@ -1469,9 +1463,8 @@ class Lwip::Tcp_socket_dir final : return false; } - Write_result write(Lwip_file_handle &handle, - char const *src, file_size count, - file_size &out_count) override + Write_result write(Lwip_file_handle &handle, Const_byte_range_ptr const &src, + size_t &out_count) override { if (_pcb == NULL) { /* socket is closed */ @@ -1481,8 +1474,11 @@ class Lwip::Tcp_socket_dir final : switch (handle.kind) { case Lwip_file_handle::DATA: if (state == READY) { - Write_result res = Write_result::WRITE_ERR_WOULD_BLOCK; - file_size out = 0; + Write_result res = Write_result::WRITE_ERR_WOULD_BLOCK; + size_t out = 0; + size_t count = src.num_bytes; + char const *src_ptr = src.start; + /* * write in a loop to account for LwIP chunking * and the availability of send buffer @@ -1491,16 +1487,17 @@ class Lwip::Tcp_socket_dir final : u16_t n = min(count, tcp_sndbuf(_pcb)); /* queue data to outgoing TCP buffer */ - err_t err = tcp_write(_pcb, src, n, TCP_WRITE_FLAG_COPY); + err_t err = tcp_write(_pcb, src_ptr, n, TCP_WRITE_FLAG_COPY); if (err != ERR_OK) { Genode::error("lwIP: tcp_write failed, error ", (int)-err); res = Write_result::WRITE_ERR_IO; break; } - count -= n; - src += n; - out += n; + count -= n; + src_ptr += n; + out += n; + /* pending_ack += n; */ res = Write_result::WRITE_OK; } @@ -1520,12 +1517,12 @@ class Lwip::Tcp_socket_dir final : break; case Lwip_file_handle::BIND: - if ((state == NEW) && (count < ENDPOINT_STRLEN_MAX)) { + if ((state == NEW) && (src.num_bytes < ENDPOINT_STRLEN_MAX)) { char buf[ENDPOINT_STRLEN_MAX]; ip_addr_t addr; u16_t port = 0; - Genode::copy_cstring(buf, src, min(count+1, sizeof(buf))); + Genode::copy_cstring(buf, src.start, min(src.num_bytes + 1, sizeof(buf))); port = remove_port(buf); if (!ipaddr_aton(buf, &addr)) @@ -1534,19 +1531,19 @@ class Lwip::Tcp_socket_dir final : err_t err = tcp_bind(_pcb, &addr, port); if (err == ERR_OK) { state = BOUND; - out_count = count; + out_count = src.num_bytes; return Write_result::WRITE_OK; } } break; case Lwip_file_handle::CONNECT: - if (((state == NEW) || (state == BOUND)) && (count < ENDPOINT_STRLEN_MAX-1)) { + if (((state == NEW) || (state == BOUND)) && (src.num_bytes < ENDPOINT_STRLEN_MAX-1)) { char buf[ENDPOINT_STRLEN_MAX]; ip_addr_t addr; u16_t port = 0; - copy_cstring(buf, src, min(count+1, sizeof(buf))); + copy_cstring(buf, src.start, min(src.num_bytes + 1, sizeof(buf))); port = remove_port(buf); if (!ipaddr_aton(buf, &addr)) break; @@ -1557,17 +1554,17 @@ class Lwip::Tcp_socket_dir final : return Write_result::WRITE_ERR_IO; } state = CONNECT; - out_count = count; + out_count = src.num_bytes; return Write_result::WRITE_OK; } break; case Lwip_file_handle::LISTEN: - if ((state == BOUND) && (count < 11)) { + if ((state == BOUND) && (src.num_bytes < 11)) { unsigned long backlog = TCP_DEFAULT_LISTEN_BACKLOG; char buf[12]; - copy_cstring(buf, src, min(count+1, sizeof(buf))); + copy_cstring(buf, src.start, min(src.num_bytes + 1, sizeof(buf))); Genode::ascii_to_unsigned(buf, backlog, 10); /* this replaces the PCB so set the callbacks again */ @@ -1575,7 +1572,7 @@ class Lwip::Tcp_socket_dir final : tcp_arg(_pcb, this); tcp_accept(_pcb, tcp_accept_callback); state = LISTEN; - out_count = count; + out_count = src.num_bytes; return Write_result::WRITE_OK; } break; @@ -1849,7 +1846,7 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, ** Lwip::Directory ** *********************/ - Read_result readdir(char *, file_size, file_size &) override + Read_result readdir(Byte_range_ptr const &, size_t &) override { Genode::warning(__func__, " NOT_IMPLEMENTED"); return Read_result::READ_ERR_INVALID; @@ -2012,9 +2009,8 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, ** File I/O service interface ** ********************************/ - Write_result write(Vfs_handle *vfs_handle, - char const *src, file_size count, - file_size &out_count) override + Write_result write(Vfs_handle *vfs_handle, Const_byte_range_ptr const &src, + size_t &out_count) override { out_count = 0; @@ -2022,20 +2018,20 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, return Write_result::WRITE_ERR_INVALID; if (Lwip_handle *handle = dynamic_cast(vfs_handle)) - return handle->write(src, count, out_count); + return handle->write(src, out_count); return Write_result::WRITE_ERR_INVALID; } - Read_result complete_read(Vfs_handle *vfs_handle, - char *dst, file_size count, - file_size &out_count) override + Read_result complete_read(Vfs_handle *vfs_handle, Byte_range_ptr const &dst, + size_t &out_count) override { /* * LwIP buffer operations are limited to sizes that * can be expressed in sixteen bits */ - count = Genode::min(count, 0xffffU); + Byte_range_ptr const + clipped_dst { dst.start, Genode::min(dst.num_bytes, 0xffffU) }; out_count = 0; @@ -2045,14 +2041,14 @@ class Lwip::File_system final : public Vfs::File_system, public Lwip::Directory, } if (Lwip_handle *handle = dynamic_cast(vfs_handle)) - return handle->read(dst, count, out_count); + return handle->read(clipped_dst, out_count); return Read_result::READ_ERR_INVALID; } /** * All reads are unavailable while the network is down */ - bool queue_read(Vfs_handle *, file_size) override + bool queue_read(Vfs_handle *, size_t) override { if (_netif.ready()) return true; diff --git a/repos/libports/src/lib/vfs/oss/vfs_oss.cc b/repos/libports/src/lib/vfs/oss/vfs_oss.cc index e6b7e336b1..fe0874b3d2 100644 --- a/repos/libports/src/lib/vfs/oss/vfs_oss.cc +++ b/repos/libports/src/lib/vfs/oss/vfs_oss.cc @@ -450,7 +450,7 @@ struct Vfs::Oss_file_system::Audio return false; } - bool read(char *buf, file_size buf_size, file_size &out_size) + bool read(Byte_range_ptr const &dst, size_t &out_size) { out_size = 0; @@ -461,7 +461,7 @@ struct Vfs::Oss_file_system::Audio return true; } - buf_size = min(buf_size, _info.ifrag_bytes); + size_t const buf_size = min(dst.num_bytes, _info.ifrag_bytes); unsigned samples_to_read = buf_size / CHANNELS / sizeof(int16_t); @@ -497,7 +497,7 @@ struct Vfs::Oss_file_system::Audio for (unsigned c = 0; c < CHANNELS; c++) { unsigned const buf_index = out_size / sizeof(int16_t); - ((int16_t*)buf)[buf_index] = p->content()[_read_sample_offset] * 32768; + ((int16_t*)dst.start)[buf_index] = p->content()[_read_sample_offset] * 32768; out_size += sizeof(int16_t); } @@ -517,7 +517,7 @@ struct Vfs::Oss_file_system::Audio return true; } - Write_result write(char const *buf, file_size buf_size, file_size &out_size) + Write_result write(Const_byte_range_ptr const &src, size_t &out_size) { using namespace Genode; @@ -528,6 +528,8 @@ struct Vfs::Oss_file_system::Audio bool block_write = false; + size_t buf_size = src.num_bytes; + if (buf_size > _info.ofrag_bytes) { buf_size = _info.ofrag_bytes; block_write = true; @@ -584,7 +586,7 @@ struct Vfs::Oss_file_system::Audio for (unsigned c = 0; c < CHANNELS; c++) { unsigned const buf_index = out_size / sizeof(int16_t); - int16_t src_sample = ((int16_t const*)buf)[buf_index]; + int16_t src_sample = ((int16_t const*)src.start)[buf_index]; dest[c][_write_sample_offset] = ((float)src_sample) / 32768.0f; out_size += sizeof(int16_t); } @@ -648,17 +650,17 @@ class Vfs::Oss_file_system::Data_file_system : public Single_file_system _audio { audio } { } - Read_result read(char *buf, file_size buf_size, file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { - if (!buf) + if (!dst.start) return READ_ERR_INVALID; - if (buf_size == 0) { + if (dst.num_bytes == 0) { out_count = 0; return READ_OK; } - bool success = _audio.read(buf, buf_size, out_count); + bool success = _audio.read(dst, out_count); if (success) { if (out_count == 0) { @@ -670,10 +672,9 @@ class Vfs::Oss_file_system::Data_file_system : public Single_file_system return READ_ERR_INVALID; } - Write_result write(char const *buf, file_size buf_size, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { - Write_result const result = _audio.write(buf, buf_size, out_count); + Write_result const result = _audio.write(src, out_count); if (result == Write_result::WRITE_ERR_WOULD_BLOCK) { blocked = true; diff --git a/repos/os/include/os/vfs.h b/repos/os/include/os/vfs.h index d6187822f3..544655b2f2 100644 --- a/repos/os/include/os/vfs.h +++ b/repos/os/include/os/vfs.h @@ -197,13 +197,15 @@ struct Genode::Directory : Noncopyable, Interface _io.commit_and_wait(); Vfs::File_io_service::Read_result read_result; - Vfs::file_size out_count = 0; + + size_t out_count = 0; for (;;) { - read_result = _handle->fs().complete_read(_handle, - (char*)&entry._dirent, - sizeof(entry._dirent), + Byte_range_ptr const dst { (char*)&entry._dirent, + sizeof(entry._dirent) }; + + read_result = _handle->fs().complete_read(_handle, dst, out_count); if (read_result != Vfs::File_io_service::READ_QUEUED) @@ -297,8 +299,8 @@ struct Genode::Directory : Noncopyable, Interface char buf[MAX_PATH_LEN]; - Vfs::file_size count = sizeof(buf)-1; - Vfs::file_size out_count = 0; + size_t count = sizeof(buf)-1; + size_t out_count = 0; while (!link_handle->fs().queue_read(link_handle, count)) { _io.commit_and_wait(); @@ -308,7 +310,7 @@ struct Genode::Directory : Noncopyable, Interface for (;;) { result = link_handle->fs().complete_read( - link_handle, buf, count, out_count); + link_handle, Byte_range_ptr(buf, count), out_count); if (result != File_io_service::READ_QUEUED) break; @@ -470,12 +472,14 @@ class Genode::Readonly_file : public File Vfs::File_io_service::Read_result result; - Vfs::file_size read_bytes { }; /* byte count for this iteration */ + size_t read_bytes = 0; /* byte count for this iteration */ for (;;) { - result = _handle->fs().complete_read(_handle, - range.start + total, - range.num_bytes - total, + + Byte_range_ptr const partial_range { range.start + total, + range.num_bytes - total }; + + result = _handle->fs().complete_read(_handle, partial_range, read_bytes); if (result != Vfs::File_io_service::READ_QUEUED) @@ -759,21 +763,25 @@ class Genode::Writeable_file : Noncopyable } static Append_result _append(Vfs::Vfs_handle &handle, Vfs::Env::Io &io, - char const *src, size_t size) + Const_byte_range_ptr const &src) { bool write_error = false; - size_t remaining_bytes = size; + size_t remaining_bytes = src.num_bytes; + + char const * src_ptr = src.start; while (remaining_bytes > 0 && !write_error) { bool stalled = false; - Vfs::file_size out_count = 0; + size_t out_count = 0; using Write_result = Vfs::File_io_service::Write_result; - switch (handle.fs().write(&handle, src, remaining_bytes, out_count)) { + Const_byte_range_ptr const partial_src { src_ptr, remaining_bytes }; + + switch (handle.fs().write(&handle, partial_src, out_count)) { case Write_result::WRITE_ERR_WOULD_BLOCK: stalled = true; @@ -785,9 +793,9 @@ class Genode::Writeable_file : Noncopyable break; case Write_result::WRITE_OK: - out_count = min((Vfs::file_size)remaining_bytes, out_count); + out_count = min(remaining_bytes, out_count); remaining_bytes -= (size_t)out_count; - src += out_count; + src_ptr += out_count; handle.advance_seek(out_count); break; }; @@ -834,8 +842,11 @@ class Genode::Append_file : public Writeable_file _handle.ds().close(&_handle); } + Append_result append(Const_byte_range_ptr const &src) { + return _append(_handle, _io, src); } + Append_result append(char const *src, size_t size) { - return _append(_handle, _io, src, size); } + return _append(_handle, _io, Const_byte_range_ptr(src, size)); } }; @@ -873,8 +884,11 @@ class Genode::New_file : public Writeable_file _handle.ds().close(&_handle); } + Append_result append(Const_byte_range_ptr const &src) { + return _append(_handle, _io, src); } + Append_result append(char const *src, size_t size) { - return _append(_handle, _io, src, size); } + return _append(_handle, _io, Const_byte_range_ptr(src, size)); } }; diff --git a/repos/os/include/ram_fs/chunk.h b/repos/os/include/ram_fs/chunk.h index 214e92693e..acbcd65e90 100644 --- a/repos/os/include/ram_fs/chunk.h +++ b/repos/os/include/ram_fs/chunk.h @@ -42,28 +42,34 @@ class File_system::Chunk_base : Noncopyable class Index_out_of_range { }; + /* + * Use 'size_t' instead of 'seek_off_t' because we can never seek + * outside the addressable RAM + */ + struct Seek { size_t value; }; + protected: - seek_off_t const _base_offset; - size_t _num_entries; /* corresponds to last used entry */ + Seek const _base_offset { ~0UL }; + + size_t _num_entries = 0; /* corresponds to last used entry */ /** * Test if specified range lies within the chunk */ - void assert_valid_range(seek_off_t start, size_t len, - file_size_t chunk_size) const + void assert_valid_range(Seek start, size_t len, + size_t chunk_size) const { if (zero()) return; - if (start < _base_offset) + if (start.value < _base_offset.value) throw Index_out_of_range(); - if (start + len > _base_offset + chunk_size) + if (start.value + len > _base_offset.value + chunk_size) throw Index_out_of_range(); } - Chunk_base(seek_off_t base_offset) - : _base_offset(base_offset), _num_entries(0) { } + Chunk_base(Seek base_offset) : _base_offset(base_offset) { } /** * Construct zero chunk @@ -73,19 +79,19 @@ class File_system::Chunk_base : Noncopyable * for each chunk type, the base offset is meaningless. We use a * base offset of ~0 as marker to identify zero chunks. */ - Chunk_base() : _base_offset(~0L), _num_entries(0) { } + Chunk_base() { } public: /** * Return absolute base offset of chunk in bytes */ - seek_off_t base_offset() const { return _base_offset; } + Seek base_offset() const { return _base_offset; } /** * Return true if chunk is a read-only zero chunk */ - bool zero() const { return _base_offset == (seek_off_t)(~0L); } + bool zero() const { return _base_offset.value == ~0UL; } /** * Return true if chunk has no allocated sub chunks @@ -117,7 +123,7 @@ class File_system::Chunk : public Chunk_base * signature of the constructor compatible to the constructor * of 'Chunk_index'. */ - Chunk(Allocator &, seek_off_t base_offset) + Chunk(Allocator &, Seek base_offset) : Chunk_base(base_offset) { @@ -136,43 +142,43 @@ class File_system::Chunk : public Chunk_base * entry + 1. It does not correlate to the number of actually * allocated entries (there may be ranges of zero blocks). */ - file_size_t used_size() const { return _num_entries; } + size_t used_size() const { return _num_entries; } - void write(char const *src, size_t len, seek_off_t seek_offset) + void write(Const_byte_range_ptr const &src, Seek at) { - assert_valid_range(seek_offset, len, SIZE); + assert_valid_range(at, src.num_bytes, SIZE); /* offset relative to this chunk */ - seek_off_t const local_offset = seek_offset - base_offset(); + size_t const local_offset = at.value - base_offset().value; - memcpy(&_data[local_offset], src, len); + memcpy(&_data[local_offset], src.start, src.num_bytes); - _num_entries = max(_num_entries, (size_t)(local_offset + len)); + _num_entries = max(_num_entries, local_offset + src.num_bytes); } - void read(char *dst, size_t len, seek_off_t seek_offset) const + void read(Byte_range_ptr const &dst, Seek at) const { - assert_valid_range(seek_offset, len, SIZE); + assert_valid_range(at, dst.num_bytes, SIZE); - memcpy(dst, &_data[seek_offset - base_offset()], len); + memcpy(dst.start, &_data[at.value - base_offset().value], dst.num_bytes); } - void truncate(file_size_t size) + void truncate(Seek at) { - assert_valid_range(size, 0, SIZE); + assert_valid_range(at, 0, SIZE); /* * Offset of the first free position (relative to the beginning * this chunk). */ - seek_off_t const local_offset = size - base_offset(); + size_t const local_offset = at.value - base_offset().value; if (local_offset >= _num_entries) return; - memset(&_data[local_offset], 0, (size_t)(_num_entries - local_offset)); + memset(&_data[local_offset], 0, _num_entries - local_offset); - _num_entries = (size_t)local_offset; + _num_entries = local_offset; } }; @@ -223,7 +229,7 @@ class File_system::Chunk_index : public Chunk_base if (_entries[index]) return *_entries[index]; - seek_off_t entry_offset = base_offset() + index*ENTRY_SIZE; + Seek const entry_offset { base_offset().value + index*ENTRY_SIZE }; _entries[index] = new (&_alloc) Entry(_alloc, entry_offset); @@ -255,17 +261,17 @@ class File_system::Chunk_index : public Chunk_base * The caller of this function must make sure that the offset * parameter is within the bounds of the chunk. */ - unsigned _index_by_offset(seek_off_t offset) const + unsigned _index_by_offset(Seek offset) const { - return (unsigned)((offset - base_offset()) / ENTRY_SIZE); + return (unsigned)((offset.value - base_offset().value) / ENTRY_SIZE); } /** * Apply operation 'func' to a range of entries */ - template - static void _range_op(THIS &obj, DATA *data, size_t len, - seek_off_t seek_offset, FUNC const &func) + template + static void _range_op(THIS &obj, RANGE_PTR const &range_ptr, + Seek at, FUNC const &func) { /* * Depending on whether this function is called for reading @@ -275,11 +281,14 @@ class File_system::Chunk_index : public Chunk_base */ typedef typename FUNC::Entry Const_qualified_entry; - obj.assert_valid_range(seek_offset, len, SIZE); + auto data_ptr = range_ptr.start; + size_t len = range_ptr.num_bytes; + + obj.assert_valid_range(at, len, SIZE); while (len > 0) { - unsigned const index = obj._index_by_offset(seek_offset); + unsigned const index = obj._index_by_offset(at); Const_qualified_entry &entry = FUNC::lookup(obj, index); @@ -291,20 +300,20 @@ class File_system::Chunk_index : public Chunk_base * zero chunk, which has no defined base offset. Therefore, * we calculate the base offset via index*ENTRY_SIZE. */ - seek_off_t const local_seek_offset = - seek_offset - obj.base_offset() - index*ENTRY_SIZE; + size_t const local_seek_offset = + at.value - obj.base_offset().value - index*ENTRY_SIZE; /* available capacity at 'entry' starting at seek offset */ - size_t const capacity = ENTRY_SIZE - (size_t)local_seek_offset; + size_t const capacity = ENTRY_SIZE - local_seek_offset; size_t const curr_len = min(len, capacity); /* apply functor (read or write) to entry */ - func(entry, data, (size_t)curr_len, seek_offset); + func(entry, RANGE_PTR(data_ptr, curr_len), at); /* advance to next entry */ - len -= curr_len; - data += curr_len; - seek_offset += curr_len; + len -= curr_len; + data_ptr += curr_len; + at.value += curr_len; } } @@ -315,10 +324,9 @@ class File_system::Chunk_index : public Chunk_base static Entry &lookup(Chunk_index &chunk, unsigned i) { return chunk._entry_for_writing(i); } - void operator () (Entry &entry, char const *src, size_t len, - seek_off_t seek_offset) const + void operator () (Entry &entry, Const_byte_range_ptr const &src, Seek at) const { - entry.write(src, len, seek_offset); + entry.write(src, at); } }; @@ -329,13 +337,12 @@ class File_system::Chunk_index : public Chunk_base static Entry &lookup(Chunk_index const &chunk, unsigned i) { return chunk._entry_for_reading(i); } - void operator () (Entry &entry, char *dst, size_t len, - seek_off_t seek_offset) const + void operator () (Entry &entry, Byte_range_ptr const &dst, Seek at) const { if (entry.zero()) - memset(dst, 0, len); + memset(dst.start, 0, dst.num_bytes); else - entry.read(dst, len, seek_offset); + entry.read(dst, at); } }; @@ -362,7 +369,7 @@ class File_system::Chunk_index : public Chunk_base * indices and chunks * \param base_offset absolute offset of the chunk in bytes */ - Chunk_index(Allocator &alloc, seek_off_t base_offset) + Chunk_index(Allocator &alloc, Seek base_offset) : Chunk_base(base_offset), _alloc(alloc) { _init_entries(); } /** @@ -385,13 +392,13 @@ class File_system::Chunk_index : public Chunk_base * The returned value corresponds to the position after the highest * offset that was written to. */ - file_size_t used_size() const + size_t used_size() const { if (_num_entries == 0) return 0; /* size of entries that lie completely within the used range */ - file_size_t const size_whole_entries = ENTRY_SIZE*(_num_entries - 1); + size_t const size_whole_entries = ENTRY_SIZE*(_num_entries - 1); Entry *last_entry = _entries[_num_entries - 1]; if (!last_entry) @@ -403,17 +410,17 @@ class File_system::Chunk_index : public Chunk_base /** * Write data to chunk */ - void write(char const *src, size_t len, seek_off_t seek_offset) + void write(Const_byte_range_ptr const &src, Seek at) { - _range_op(*this, src, len, seek_offset, Write_func()); + _range_op(*this, src, at, Write_func()); } /** * Read data from chunk */ - void read(char *dst, size_t len, seek_off_t seek_offset) const + void read(Byte_range_ptr const &dst, Seek at) const { - _range_op(*this, dst, len, seek_offset, Read_func()); + _range_op(*this, dst, at, Read_func()); } /** @@ -424,9 +431,9 @@ class File_system::Chunk_index : public Chunk_base * by 'used_size' refers always to the position of the last byte * written to the chunk. */ - void truncate(file_size_t size) + void truncate(Seek at) { - unsigned const trunc_index = _index_by_offset(size); + unsigned const trunc_index = _index_by_offset(at); if (trunc_index >= _num_entries) return; @@ -436,7 +443,7 @@ class File_system::Chunk_index : public Chunk_base /* traverse into sub chunks */ if (_entries[trunc_index]) - _entries[trunc_index]->truncate(size); + _entries[trunc_index]->truncate(at); _num_entries = trunc_index + 1; diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h index 907547f5a0..67ed604118 100644 --- a/repos/os/include/vfs/dir_file_system.h +++ b/repos/os/include/vfs/dir_file_system.h @@ -330,8 +330,8 @@ class Vfs::Dir_file_system : public File_system } Read_result _complete_read_of_file_systems(Dir_vfs_handle *dir_vfs_handle, - char *dst, file_size count, - file_size &out_count) + Byte_range_ptr const &dst, + size_t &out_count) { if (!dir_vfs_handle->queued_read_handle) { @@ -340,10 +340,10 @@ class Vfs::Dir_file_system : public File_system * fs->opendir() failed */ - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; - Dirent &dirent = *(Dirent*)dst; + Dirent &dirent = *(Dirent*)dst.start; dirent = Dirent { }; out_count = sizeof(Dirent); @@ -353,7 +353,7 @@ class Vfs::Dir_file_system : public File_system Read_result result = dir_vfs_handle->queued_read_handle->fs(). complete_read(dir_vfs_handle->queued_read_handle, - dst, count, out_count); + dst, out_count); if (result == READ_QUEUED) return result; @@ -893,12 +893,12 @@ class Vfs::Dir_file_system : public File_system ** File I/O service interface ** ********************************/ - Write_result write(Vfs_handle *, char const *, file_size, file_size &) override + Write_result write(Vfs_handle *, Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_INVALID; } - bool queue_read(Vfs_handle *vfs_handle, file_size) override + bool queue_read(Vfs_handle *vfs_handle, size_t) override { Dir_vfs_handle *dir_vfs_handle = static_cast(vfs_handle); @@ -913,23 +913,23 @@ class Vfs::Dir_file_system : public File_system } Read_result complete_read(Vfs_handle *vfs_handle, - char *dst, file_size count, - file_size &out_count) override + Byte_range_ptr const &dst, + size_t &out_count) override { out_count = 0; - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; Dir_vfs_handle *dir_vfs_handle = static_cast(vfs_handle); if (_vfs_root) - return _complete_read_of_file_systems(dir_vfs_handle, dst, count, out_count); + return _complete_read_of_file_systems(dir_vfs_handle, dst, out_count); if (_top_dir(dir_vfs_handle->path.base())) { - Dirent &dirent = *(Dirent*)dst; + Dirent &dirent = *(Dirent*)dst.start; file_offset const index = vfs_handle->seek() / sizeof(Dirent); @@ -957,7 +957,7 @@ class Vfs::Dir_file_system : public File_system return READ_OK; } - return _complete_read_of_file_systems(dir_vfs_handle, dst, count, out_count); + return _complete_read_of_file_systems(dir_vfs_handle, dst, out_count); } Ftruncate_result ftruncate(Vfs_handle *, file_size) override diff --git a/repos/os/include/vfs/file_io_service.h b/repos/os/include/vfs/file_io_service.h index 9da8fa56df..d34c5ce30e 100644 --- a/repos/os/include/vfs/file_io_service.h +++ b/repos/os/include/vfs/file_io_service.h @@ -30,9 +30,8 @@ struct Vfs::File_io_service : Interface enum Write_result { WRITE_ERR_WOULD_BLOCK, WRITE_ERR_INVALID, WRITE_ERR_IO, WRITE_OK }; - virtual Write_result write(Vfs_handle *vfs_handle, - char const *buf, file_size buf_size, - file_size &out_count) = 0; + virtual Write_result write(Vfs_handle *vfs_handle, Const_byte_range_ptr const &, + size_t &out_count) = 0; /********** @@ -51,14 +50,13 @@ struct Vfs::File_io_service : Interface * If the queue is full, the caller can try again after a previous VFS * request is completed. */ - virtual bool queue_read(Vfs_handle *, file_size) + virtual bool queue_read(Vfs_handle *, size_t) { return true; } - virtual Read_result complete_read(Vfs_handle *, char * /* dst */, - file_size /* in count */, - file_size & /* out count */) = 0; + virtual Read_result complete_read(Vfs_handle *, Byte_range_ptr const &dst, + size_t &out_count) = 0; /** * Return true if the handle has readable data diff --git a/repos/os/include/vfs/readonly_value_file_system.h b/repos/os/include/vfs/readonly_value_file_system.h index 9aebe0df5f..2b8fb5b8f7 100644 --- a/repos/os/include/vfs/readonly_value_file_system.h +++ b/repos/os/include/vfs/readonly_value_file_system.h @@ -51,8 +51,7 @@ class Vfs::Readonly_value_file_system : public Vfs::Single_file_system Single_vfs_handle(ds, fs, alloc, 0), _buffer(buffer) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { out_count = 0; @@ -60,14 +59,14 @@ class Vfs::Readonly_value_file_system : public Vfs::Single_file_system return READ_ERR_INVALID; char const * const src = _buffer.string() + seek(); - size_t const len = min((size_t)(_buffer.length() - seek()), (size_t)count); - Genode::memcpy(dst, src, len); + size_t const len = min(size_t(_buffer.length() - seek()), dst.num_bytes); + Genode::memcpy(dst.start, src, len); out_count = len; return READ_OK; } - Write_result write(char const *, file_size, file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_IO; } diff --git a/repos/os/include/vfs/single_file_system.h b/repos/os/include/vfs/single_file_system.h index 868edc5e54..57fff74c9e 100644 --- a/repos/os/include/vfs/single_file_system.h +++ b/repos/os/include/vfs/single_file_system.h @@ -37,11 +37,9 @@ class Vfs::Single_file_system : public File_system { using Vfs_handle::Vfs_handle; - virtual Read_result read(char *dst, file_size count, - file_size &out_count) = 0; + virtual Read_result read(Byte_range_ptr const &, size_t &out_count) = 0; - virtual Write_result write(char const *src, file_size count, - file_size &out_count) = 0; + virtual Write_result write(Const_byte_range_ptr const &, size_t &out_count) = 0; virtual Sync_result sync() { @@ -83,17 +81,16 @@ class Vfs::Single_file_system : public File_system _type(type), _rwx(rwx), _filename(filename) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { out_count = 0; - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; file_size index = seek() / sizeof(Dirent); - Dirent &out = *(Dirent*)dst; + Dirent &out = *(Dirent*)dst.start; auto dirent_type = [&] () { @@ -127,7 +124,7 @@ class Vfs::Single_file_system : public File_system return READ_OK; } - Write_result write(char const *, file_size, file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_INVALID; } @@ -255,27 +252,26 @@ class Vfs::Single_file_system : public File_system ** File I/O service interface ** ********************************/ - Read_result complete_read(Vfs_handle *vfs_handle, char *dst, - file_size count, - file_size &out_count) override + Read_result complete_read(Vfs_handle *vfs_handle, Byte_range_ptr const &dst, + size_t &out_count) override { Single_vfs_handle *handle = static_cast(vfs_handle); if (handle) - return handle->read(dst, count, out_count); + return handle->read(dst, out_count); return READ_ERR_INVALID; } - Write_result write(Vfs_handle *vfs_handle, char const *src, file_size count, - file_size &out_count) override + Write_result write(Vfs_handle *vfs_handle, Const_byte_range_ptr const &src, + size_t &out_count) override { Single_vfs_handle *handle = static_cast(vfs_handle); if (handle) - return handle->write(src, count, out_count); + return handle->write(src, out_count); return WRITE_ERR_INVALID; } diff --git a/repos/os/include/vfs/types.h b/repos/os/include/vfs/types.h index 93dc1c3bcc..9f9037c106 100644 --- a/repos/os/include/vfs/types.h +++ b/repos/os/include/vfs/types.h @@ -47,6 +47,8 @@ namespace Vfs { using Genode::Interface; using Genode::String; using Genode::size_t; + using Genode::Byte_range_ptr; + using Genode::Const_byte_range_ptr; struct Timestamp { diff --git a/repos/os/include/vfs/value_file_system.h b/repos/os/include/vfs/value_file_system.h index 9805147c8f..ba75f0c72a 100644 --- a/repos/os/include/vfs/value_file_system.h +++ b/repos/os/include/vfs/value_file_system.h @@ -52,30 +52,31 @@ class Vfs::Value_file_system : public Vfs::Single_file_system _value_fs(value_fs) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { out_count = 0; if (seek() > _buffer.length()) return READ_ERR_INVALID; - char const * const src = _buffer.string() + seek(); - Genode::size_t const len = min((size_t)(_buffer.length() - seek()), (size_t)count); - Genode::memcpy(dst, src, len); + char const * const src = _buffer.string() + seek(); + size_t const len = min((size_t)(_buffer.length() - seek()), dst.num_bytes); + + memcpy(dst.start, src, len); out_count = len; return READ_OK; } - Write_result write(char const *src, file_size count, file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { out_count = 0; if (seek() > BUF_SIZE) return WRITE_ERR_INVALID; - Genode::size_t const len = min((size_t)(BUF_SIZE- seek()), (size_t)count); - _buffer = Buffer(Genode::Cstring(src, len)); + size_t const len = min(size_t(BUF_SIZE- seek()), src.num_bytes); + + _buffer = Buffer(Genode::Cstring(src.start, len)); out_count = len; /* inform watchers */ diff --git a/repos/os/src/lib/vfs/block_file_system.h b/repos/os/src/lib/vfs/block_file_system.h index f2ec733040..0cd108068a 100644 --- a/repos/os/src/lib/vfs/block_file_system.h +++ b/repos/os/src/lib/vfs/block_file_system.h @@ -84,8 +84,8 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system Block_vfs_handle(Block_vfs_handle const &); Block_vfs_handle &operator = (Block_vfs_handle const &); - file_size _block_io(file_size nr, void *buf, file_size sz, - bool write, bool bulk = false) + size_t _block_io(file_size nr, void *buf, file_size sz, + bool write, bool bulk = false) { Block::Packet_descriptor::Opcode op; op = write ? Block::Packet_descriptor::WRITE : Block::Packet_descriptor::READ; @@ -164,22 +164,23 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system _writeable(writeable) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { file_size seek_offset = seek(); - file_size read = 0; + size_t count = dst.num_bytes; + size_t read = 0; + while (count > 0) { file_size displ = 0; - file_size length = 0; - file_size nbytes = 0; file_size blk_nr = seek_offset / _block_size; + size_t length = 0; + displ = seek_offset % _block_size; if ((displ + count) > _block_size) - length = (_block_size - displ); + length = size_t(_block_size - displ); else length = count; @@ -195,7 +196,7 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system if (displ == 0 && !(count < _block_size)) { file_size bytes_left = count - (count % _block_size); - nbytes = _block_io(blk_nr, dst + read, bytes_left, false, true); + size_t const nbytes = _block_io(blk_nr, dst.start + read, bytes_left, false, true); if (nbytes == 0) { Genode::error("error while reading block:", blk_nr, " from block device"); return READ_ERR_INVALID; @@ -208,13 +209,13 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system continue; } - nbytes = _block_io(blk_nr, _block_buffer, _block_size, false); - if ((unsigned)nbytes != _block_size) { + size_t const nbytes = _block_io(blk_nr, _block_buffer, _block_size, false); + if (nbytes != _block_size) { Genode::error("error while reading block:", blk_nr, " from block device"); return READ_ERR_INVALID; } - Genode::memcpy(dst + read, _block_buffer + displ, (size_t)length); + Genode::memcpy(dst.start + read, _block_buffer + displ, length); read += length; count -= length; @@ -227,8 +228,7 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system } - Write_result write(char const *buf, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { if (!_writeable) { Genode::error("block device is not writeable"); @@ -237,17 +237,19 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system file_size seek_offset = seek(); - file_size written = 0; + size_t written = 0; + size_t count = src.num_bytes; + while (count > 0) { - file_size displ = 0; - file_size length = 0; - file_size nbytes = 0; - file_size blk_nr = seek_offset / _block_size; + file_size displ = 0; + file_size blk_nr = seek_offset / _block_size; + + size_t length = 0; displ = seek_offset % _block_size; if ((displ + count) > _block_size) - length = (_block_size - displ); + length = size_t(_block_size - displ); else length = count; @@ -263,8 +265,8 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system if (displ == 0 && !(count < _block_size)) { file_size bytes_left = count - (count % _block_size); - nbytes = _block_io(blk_nr, (void*)(buf + written), - bytes_left, true, true); + size_t const nbytes = _block_io(blk_nr, (void*)(src.start + written), + bytes_left, true, true); if (nbytes == 0) { Genode::error("error while write block:", blk_nr, " to block device"); return WRITE_ERR_INVALID; @@ -287,10 +289,10 @@ class Vfs::Block_file_system::Data_file_system : public Single_file_system if (displ > 0 || length < _block_size) _block_io(blk_nr, _block_buffer, _block_size, false); - Genode::memcpy(_block_buffer + displ, buf + written, (size_t)length); + Genode::memcpy(_block_buffer + displ, src.start + written, length); - nbytes = _block_io(blk_nr, _block_buffer, _block_size, true); - if ((unsigned)nbytes != _block_size) { + size_t const nbytes = _block_io(blk_nr, _block_buffer, _block_size, true); + if (nbytes != _block_size) { Genode::error("error while writing block:", blk_nr, " to block_device"); return WRITE_ERR_INVALID; } diff --git a/repos/os/src/lib/vfs/capture/plugin.cc b/repos/os/src/lib/vfs/capture/plugin.cc index ac802c4e86..ce32769a3b 100644 --- a/repos/os/src/lib/vfs/capture/plugin.cc +++ b/repos/os/src/lib/vfs/capture/plugin.cc @@ -70,19 +70,20 @@ class Vfs_capture::Data_file_system : public Single_file_system bool read_ready() const override { return true; } bool write_ready() const override { return true; } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { _capture->capture_at(Point(0, 0)); - Genode::memcpy(dst, _capture_ds->local_addr(), (size_t)count); + size_t const len = min(dst.num_bytes, _capture_ds->size()); - out_count = count; + Genode::memcpy(dst.start, _capture_ds->local_addr(), len); + + out_count = len; return READ_OK; } - Write_result write(char const *, file_size, file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_IO; } diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h index 34834c2f5b..b0440fcb1b 100644 --- a/repos/os/src/lib/vfs/fs_file_system.h +++ b/repos/os/src/lib/vfs/fs_file_system.h @@ -149,7 +149,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Fs_file_system &_vfs_fs; - bool _queue_read(file_size count, file_size const seek_offset) + bool _queue_read(size_t count, file_size const seek_offset) { if (queued_read_state != Handle_state::Queued_state::IDLE) return false; @@ -160,8 +160,8 @@ class Vfs::Fs_file_system : public File_system, private Remote_io if (!source.ready_to_submit()) return false; - file_size const max_packet_size = source.bulk_buffer_size() / 2; - file_size const clipped_count = min(max_packet_size, count); + size_t const max_packet_size = source.bulk_buffer_size() / 2; + size_t const clipped_count = min(max_packet_size, count); ::File_system::Packet_descriptor p; try { @@ -184,8 +184,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io return true; } - Read_result _complete_read(void *dst, file_size count, - file_size &out_count) + Read_result _complete_read(Byte_range_ptr const &dst, size_t &out_count) { if (queued_read_state != Handle_state::Queued_state::ACK) return READ_QUEUED; @@ -199,11 +198,11 @@ class Vfs::Fs_file_system : public File_system, private Remote_io Read_result result = packet.succeeded() ? READ_OK : READ_ERR_IO; if (result == READ_OK) { - file_size const read_num_bytes = min((file_size)packet.length(), count); + size_t const read_num_bytes = min(packet.length(), dst.num_bytes); - memcpy(dst, source.packet_content(packet), (size_t)read_num_bytes); + memcpy(dst.start, source.packet_content(packet), (size_t)read_num_bytes); - out_count = read_num_bytes; + out_count = read_num_bytes; } queued_read_state = Handle_state::Queued_state::IDLE; @@ -227,15 +226,14 @@ class Vfs::Fs_file_system : public File_system, private Remote_io ::File_system::File_handle file_handle() const { return ::File_system::File_handle { id().value }; } - virtual bool queue_read(file_size /* count */) + virtual bool queue_read(size_t /* count */) { Genode::error("Fs_vfs_handle::queue_read() called"); return true; } - virtual Read_result complete_read(char *, - file_size /* in count */, - file_size & /* out count */) + virtual Read_result complete_read(Byte_range_ptr const &, + size_t & /* out count */) { Genode::error("Fs_vfs_handle::complete_read() called"); return READ_ERR_INVALID; @@ -320,15 +318,14 @@ class Vfs::Fs_file_system : public File_system, private Remote_io { using Fs_vfs_handle::Fs_vfs_handle; - bool queue_read(file_size count) override + bool queue_read(size_t count) override { return _queue_read(count, seek()); } - Read_result complete_read(char *dst, file_size count, - file_size &out_count) override + Read_result complete_read(Byte_range_ptr const &dst, size_t &out_count) override { - return _complete_read(dst, count, out_count); + return _complete_read(dst, out_count); } }; @@ -338,7 +335,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io using Fs_vfs_handle::Fs_vfs_handle; - bool queue_read(file_size count) override + bool queue_read(size_t count) override { if (count < sizeof(Dirent)) return true; @@ -347,26 +344,27 @@ class Vfs::Fs_file_system : public File_system, private Remote_io (seek() / sizeof(Dirent) * DIRENT_SIZE)); } - Read_result complete_read(char *dst, file_size count, - file_size &out_count) override + Read_result complete_read(Byte_range_ptr const &dst, size_t &out_count) override { - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; using ::File_system::Directory_entry; Directory_entry entry { }; - file_size entry_out_count = 0; + + size_t entry_out_count = 0; Read_result const read_result = - _complete_read(&entry, DIRENT_SIZE, entry_out_count); + _complete_read(Byte_range_ptr((char *)(&entry), DIRENT_SIZE), + entry_out_count); if (read_result != READ_OK) return read_result; entry.sanitize(); - Dirent &dirent = *(Dirent*)dst; + Dirent &dirent = *(Dirent*)dst.start; if (entry_out_count < DIRENT_SIZE) { @@ -398,15 +396,15 @@ class Vfs::Fs_file_system : public File_system, private Remote_io { using Fs_vfs_handle::Fs_vfs_handle; - bool queue_read(file_size count) override + bool queue_read(size_t count) override { return _queue_read(count, seek()); } - Read_result complete_read(char *dst, file_size count, - file_size &out_count) override + Read_result complete_read(Byte_range_ptr const &dst, + size_t &out_count) override { - return _complete_read(dst, count, out_count); + return _complete_read(dst, out_count); } }; @@ -449,7 +447,7 @@ class Vfs::Fs_file_system : public File_system, private Remote_io }; Write_result _write(Fs_vfs_handle &handle, file_size const seek_offset, - const char *buf, file_size count, file_size &out_count) + Const_byte_range_ptr const &src, size_t &out_count) { /* reclaim as much space in the packet stream as possible */ _handle_ack(); @@ -457,8 +455,8 @@ class Vfs::Fs_file_system : public File_system, private Remote_io ::File_system::Session::Tx::Source &source = *_fs.tx(); using ::File_system::Packet_descriptor; - file_size const max_packet_size = source.bulk_buffer_size() / 2; - count = min(max_packet_size, count); + size_t const max_packet_size = source.bulk_buffer_size() / 2; + size_t const count = min(max_packet_size, src.num_bytes); if (!source.ready_to_submit()) { _write_would_block = true; @@ -466,13 +464,13 @@ class Vfs::Fs_file_system : public File_system, private Remote_io } try { - Packet_descriptor packet_in(source.alloc_packet((size_t)count), + Packet_descriptor packet_in(source.alloc_packet(count), handle.file_handle(), Packet_descriptor::WRITE, - (size_t)count, + count, seek_offset); - memcpy(source.packet_content(packet_in), buf, (size_t)count); + memcpy(source.packet_content(packet_in), src.start, count); _submit_packet(packet_in); } @@ -889,29 +887,29 @@ class Vfs::Fs_file_system : public File_system, private Remote_io ** File I/O service interface ** ********************************/ - Write_result write(Vfs_handle *vfs_handle, char const *buf, - file_size count, file_size &out_count) override + Write_result write(Vfs_handle *vfs_handle, Const_byte_range_ptr const &src, + size_t &out_count) override { Fs_vfs_handle &handle = static_cast(*vfs_handle); - return _write(handle, handle.seek(), buf, count, out_count); + return _write(handle, handle.seek(), src, out_count); } - bool queue_read(Vfs_handle *vfs_handle, file_size count) override + bool queue_read(Vfs_handle *vfs_handle, size_t count) override { Fs_vfs_handle *handle = static_cast(vfs_handle); return handle->queue_read(count); } - Read_result complete_read(Vfs_handle *vfs_handle, char *dst, file_size count, - file_size &out_count) override + Read_result complete_read(Vfs_handle *vfs_handle, Byte_range_ptr const &dst, + size_t &out_count) override { out_count = 0; Fs_vfs_handle *handle = static_cast(vfs_handle); - return handle->complete_read(dst, count, out_count); + return handle->complete_read(dst, out_count); } bool read_ready(Vfs_handle const &vfs_handle) const override diff --git a/repos/os/src/lib/vfs/inline_file_system.h b/repos/os/src/lib/vfs/inline_file_system.h index 37a6f96ff8..5064d809e8 100644 --- a/repos/os/src/lib/vfs/inline_file_system.h +++ b/repos/os/src/lib/vfs/inline_file_system.h @@ -28,62 +28,26 @@ class Vfs::Inline_file_system : public Single_file_system Xml_node _node; - class Inline_vfs_handle : public Single_vfs_handle + class Handle : public Single_vfs_handle { private: - char const * const _base; - file_size const _size; - - /* - * Noncopyable - */ - Inline_vfs_handle(Inline_vfs_handle const &); - Inline_vfs_handle &operator = (Inline_vfs_handle const &); + Inline_file_system const &_fs; public: - Inline_vfs_handle(Directory_service &ds, - File_io_service &fs, - Genode::Allocator &alloc, - char const * const base, - file_size const size) - : Single_vfs_handle(ds, fs, alloc, 0), - _base(base), _size(size) + Handle(Directory_service &ds, + File_io_service &fs, + Allocator &alloc, + Inline_file_system const &inline_fs) + : + Single_vfs_handle(ds, fs, alloc, 0), _fs(inline_fs) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override - { - /* file read limit is the size of the dataspace */ - file_size const max_size = _size; + inline Read_result read(Byte_range_ptr const &, size_t &) override; - /* current read offset */ - file_size const read_offset = seek(); - - /* maximum read offset, clamped to dataspace size */ - file_size const end_offset = min(count + read_offset, max_size); - - /* source address within the dataspace */ - char const *src = _base + read_offset; - - /* check if end of file is reached */ - if (read_offset >= end_offset) { - out_count = 0; - return READ_OK; - } - - /* copy-out bytes from ROM dataspace */ - size_t const num_bytes = (size_t)(end_offset - read_offset); - - memcpy(dst, src, num_bytes); - - out_count = num_bytes; - return READ_OK; - } - - Write_result write(char const *, file_size, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &, + size_t &out_count) override { out_count = 0; return WRITE_ERR_INVALID; @@ -123,22 +87,13 @@ class Vfs::Inline_file_system : public Single_file_system if (!_single_file(path)) return OPEN_ERR_UNACCESSIBLE; - /* empty node */ - if (_node.content_size() == 0) { - *out_handle = new (alloc) - Inline_vfs_handle(*this, *this, alloc, nullptr, 0); - return OPEN_OK; - } - try { - _node.with_raw_content([&] (char const *base, size_t size) { - *out_handle = new (alloc) - Inline_vfs_handle(*this, *this, alloc, base, size); - }); - return OPEN_OK; + *out_handle = new (alloc) Handle(*this, *this, alloc, *this); } catch (Genode::Out_of_ram) { return OPEN_ERR_OUT_OF_RAM; } catch (Genode::Out_of_caps) { return OPEN_ERR_OUT_OF_CAPS; } + + return OPEN_OK; } Stat_result stat(char const *path, Stat &out) override @@ -152,4 +107,38 @@ class Vfs::Inline_file_system : public Single_file_system } }; + +Vfs::File_io_service::Read_result +Vfs::Inline_file_system::Handle::read(Byte_range_ptr const &dst, size_t &out_count) +{ + _fs._node.with_raw_content([&] (char const *start, size_t const len) { + + /* file read limit is the size of the XML-node content */ + size_t const max_size = len; + + /* current read offset */ + size_t const read_offset = size_t(seek()); + + /* maximum read offset, clamped to dataspace size */ + size_t const end_offset = min(dst.num_bytes + read_offset, max_size); + + /* source address within the XML content */ + char const * const src = start + read_offset; + + /* check if end of file is reached */ + if (read_offset >= end_offset) { + out_count = 0; + return; + } + + /* copy-out bytes from ROM dataspace */ + size_t const num_bytes = end_offset - read_offset; + + memcpy(dst.start, src, num_bytes); + out_count = num_bytes; + }); + + return READ_OK; +} + #endif /* _INCLUDE__VFS__INLINE_FILE_SYSTEM_H_ */ diff --git a/repos/os/src/lib/vfs/log_file_system.h b/repos/os/src/lib/vfs/log_file_system.h index 5d494bb497..7de2f76563 100644 --- a/repos/os/src/lib/vfs/log_file_system.h +++ b/repos/os/src/lib/vfs/log_file_system.h @@ -52,7 +52,7 @@ class Vfs::Log_file_system : public Single_file_system char _line_buf[Genode::Log_session::MAX_STRING_LEN]; - file_offset _line_pos = 0; + size_t _line_pos = 0; Genode::Log_session &_log; @@ -83,37 +83,40 @@ class Vfs::Log_file_system : public Single_file_system File_io_service &fs, Genode::Allocator &alloc, Genode::Log_session &log) - : Single_vfs_handle(ds, fs, alloc, 0), - _log(log) { } + : + Single_vfs_handle(ds, fs, alloc, 0), _log(log) + { } ~Log_vfs_handle() { if (_line_pos > 0) _flush(); } - Read_result read(char *, file_size, file_size &) override + Read_result read(Byte_range_ptr const &, size_t &) override { /* block indefinitely - mimics stdout resp. stdin w/o input */ return READ_QUEUED; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &buf, size_t &out_count) override { + size_t count = buf.num_bytes; + char const * src = buf.start; + out_count = count; /* count does not include the trailing '\0' */ while (count > 0) { - file_size curr_count = min(count, (file_size)((sizeof(_line_buf) - 1) - _line_pos)); + size_t curr_count = min(count, sizeof(_line_buf) - 1 - _line_pos); - for (file_size i = 0; i < curr_count; ++i) { + for (size_t i = 0; i < curr_count; ++i) { if (src[i] == '\n') { curr_count = i + 1; break; } } - memcpy(_line_buf + _line_pos, src, (size_t)curr_count); + memcpy(_line_buf + _line_pos, src, curr_count); _line_pos += curr_count; if ((_line_pos == sizeof(_line_buf) - 1) || diff --git a/repos/os/src/lib/vfs/null_file_system.h b/repos/os/src/lib/vfs/null_file_system.h index 655b68148e..6160f84a65 100644 --- a/repos/os/src/lib/vfs/null_file_system.h +++ b/repos/os/src/lib/vfs/null_file_system.h @@ -36,19 +36,20 @@ struct Vfs::Null_file_system : Single_file_system Null_vfs_handle(Directory_service &ds, File_io_service &fs, Genode::Allocator &alloc) - : Single_vfs_handle(ds, fs, alloc, 0) { } + : + Single_vfs_handle(ds, fs, alloc, 0) + { } - Read_result read(char *, file_size, file_size &out_count) override + Read_result read(Byte_range_ptr const &, size_t &out_count) override { out_count = 0; return READ_OK; } - Write_result write(char const *, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } diff --git a/repos/os/src/lib/vfs/ram_file_system.h b/repos/os/src/lib/vfs/ram_file_system.h index 9354331fd1..cc6ae4101e 100644 --- a/repos/os/src/lib/vfs/ram_file_system.h +++ b/repos/os/src/lib/vfs/ram_file_system.h @@ -56,6 +56,7 @@ namespace Vfs_ram { return start; } + using Seek = File_system::Chunk_base::Seek; } @@ -135,7 +136,7 @@ class Vfs_ram::Node : private Genode::Avl_node char const *name() { return _name; } void name(char const *name) { copy_cstring(_name, name, MAX_NAME_LEN); } - virtual Vfs::file_size length() = 0; + virtual size_t length() = 0; void open(Io_handle &handle) { _io_handles.insert(&handle); } void open(Watch_handle &handle) { _watch_handles.insert(&handle); } @@ -172,28 +173,27 @@ class Vfs_ram::Node : private Genode::Avl_node .executable = true }; } - virtual size_t read(char*, size_t, file_size) + virtual size_t read(Byte_range_ptr const &, Seek) { Genode::error("Vfs_ram::Node::read() called"); return 0; } - virtual Vfs::File_io_service::Read_result complete_read(char *, - file_size, - file_size, - file_size &) + virtual Vfs::File_io_service::Read_result complete_read(Byte_range_ptr const &, + Seek, + size_t & /* out count */) { Genode::error("Vfs_ram::Node::complete_read() called"); return Vfs::File_io_service::READ_ERR_INVALID; } - virtual size_t write(char const *, size_t, file_size) + virtual size_t write(Const_byte_range_ptr const &, Seek) { Genode::error("Vfs_ram::Node::write() called"); return 0; } - virtual void truncate(file_size) + virtual void truncate(Seek) { Genode::error("Vfs_ram::Node::truncate() called"); } @@ -209,7 +209,7 @@ class Vfs_ram::Node : private Genode::Avl_node * Find index N by walking down the tree N times, * not the most efficient way to do this. */ - Node *index(file_offset &i) + Node *index(size_t &i) { if (i-- == 0) return this; @@ -250,18 +250,19 @@ class Vfs_ram::File : public Vfs_ram::Node typedef Chunk_index Chunk_level_0; Chunk_level_0 _chunk; - file_size _length = 0; + + size_t _length = 0; public: File(char const * const name, Allocator &alloc) - : Node(name), _chunk(alloc, 0) { } + : Node(name), _chunk(alloc, Seek{0}) { } - size_t read(char * const dst, size_t len, file_size const seek_offset) override + size_t read(Byte_range_ptr const &dst, Seek seek) override { - file_size const chunk_used_size = _chunk.used_size(); + size_t const chunk_used_size = _chunk.used_size(); - if (seek_offset >= _length) + if (seek.value >= _length) return 0; /* @@ -270,45 +271,46 @@ class Vfs_ram::File : public Vfs_ram::Node * Note that 'chunk_used_size' may be lower than '_length' * because 'Chunk' may have truncated tailing zeros. */ - if (seek_offset + len >= _length) - len = (size_t)(_length - seek_offset); - file_size read_len = len; + size_t const len = (seek.value + dst.num_bytes >= _length) + ? _length - min(_length, seek.value) + : dst.num_bytes; - if (seek_offset + read_len > chunk_used_size) { - if (chunk_used_size >= seek_offset) - read_len = chunk_used_size - seek_offset; + size_t read_len = len; + + if (seek.value + read_len > chunk_used_size) { + if (chunk_used_size >= seek.value) + read_len = chunk_used_size - seek.value; else read_len = 0; } - _chunk.read(dst, (size_t)read_len, (size_t)seek_offset); + _chunk.read(Byte_range_ptr(dst.start, read_len), seek); /* add zero padding if needed */ - if (read_len < len) - memset(dst + read_len, 0, (size_t)(len - read_len)); + if (read_len < dst.num_bytes) + memset(dst.start + read_len, 0, len - read_len); return len; } - Vfs::File_io_service::Read_result complete_read(char *dst, - file_size count, - file_size seek_offset, - file_size &out_count) override + Vfs::File_io_service::Read_result complete_read(Byte_range_ptr const &dst, + Seek seek, size_t &out_count) override { - out_count = read(dst, (size_t)count, (size_t)seek_offset); + out_count = read(dst, seek); return Vfs::File_io_service::READ_OK; } - size_t write(char const *src, size_t len, file_size seek_offset) override + size_t write(Const_byte_range_ptr const &src, Seek const seek) override { - if (seek_offset == (file_size)(~0)) - seek_offset = _chunk.used_size(); + size_t const at = (seek.value == ~0UL) ? _chunk.used_size() : seek.value; - if (seek_offset + len >= Chunk_level_0::SIZE) - len = Chunk_level_0::SIZE - (size_t)(seek_offset + len); + size_t len = src.num_bytes; - try { _chunk.write(src, len, (size_t)seek_offset); } + if (at + src.num_bytes >= Chunk_level_0::SIZE) + len = Chunk_level_0::SIZE - at + src.num_bytes; + + try { _chunk.write(src, Seek{at}); } catch (Out_of_memory) { return 0; } /* @@ -316,19 +318,19 @@ class Vfs_ram::File : public Vfs_ram::Node * as file length because trailing zeros may by represented * by zero chunks, which do not contribute to 'used_size()'. */ - _length = max(_length, seek_offset + len); + _length = max(_length, at + len); return len; } - file_size length() override { return _length; } + size_t length() override { return _length; } - void truncate(file_size size) override + void truncate(Seek size) override { - if (size < _chunk.used_size()) + if (size.value < _chunk.used_size()) _chunk.truncate(size); - _length = size; + _length = size.value; } }; @@ -344,43 +346,34 @@ class Vfs_ram::Symlink : public Vfs_ram::Node Symlink(char const *name) : Node(name) { } - file_size length() override { return _len; } + size_t length() override { return _len; } - void set(char const *target, size_t len) + Vfs::File_io_service::Read_result complete_read(Byte_range_ptr const &dst, Seek, + size_t &out_count) override { + out_count = min(dst.num_bytes, _len); + + memcpy(dst.start, _target, out_count); + + return Vfs::File_io_service::READ_OK; + } + + size_t write(Const_byte_range_ptr const &src, Seek) override + { + if (src.num_bytes > MAX_PATH_LEN) + return 0; + + size_t len = src.num_bytes; + for (size_t i = 0; i < len; ++i) { - if (target[i] == '\0') { - len = i; + if (src.start[i] == '\0') { + len = i + 1; /* number of characters + terminating zero */ break; } } _len = len; - memcpy(_target, target, _len); - } - - size_t get(char *buf, size_t len) - { - size_t out = min(len, _len); - memcpy(buf, _target, out); - return out; - } - - Vfs::File_io_service::Read_result complete_read(char *dst, - file_size count, - file_size, - file_size &out_count) override - { - out_count = get(dst, (size_t)count); - return Vfs::File_io_service::READ_OK; - } - - size_t write(char const *src, size_t len, file_size) override - { - if (len > MAX_PATH_LEN) - return 0; - - set(src, len); + memcpy(_target, src.start, _len); return len; } @@ -391,8 +384,9 @@ class Vfs_ram::Directory : public Vfs_ram::Node { private: - Avl_tree _entries { }; - file_size _count = 0; + Avl_tree _entries { }; + + size_t _count = 0; public: @@ -430,21 +424,20 @@ class Vfs_ram::Directory : public Vfs_ram::Node --_count; } - file_size length() override { return _count; } + size_t length() override { return _count; } - Vfs::File_io_service::Read_result complete_read(char *dst, - file_size count, - file_size seek_offset, - file_size &out_count) override + Vfs::File_io_service::Read_result complete_read(Byte_range_ptr const &dst, + Seek const seek, + size_t &out_count) override { typedef Vfs::Directory_service::Dirent Dirent; - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return Vfs::File_io_service::READ_ERR_INVALID; - file_offset index = seek_offset / sizeof(Dirent); + size_t index = seek.value / sizeof(Dirent); - Dirent &dirent = *(Dirent*)dst; + Dirent &dirent = *(Dirent*)dst.start; using Dirent_type = Vfs::Directory_service::Dirent_type; @@ -883,14 +876,14 @@ class Vfs::Ram_file_system : public Vfs::File_system if (!file) return ds_cap; - size_t len = (size_t)file->length(); + size_t len = file->length(); char *local_addr = nullptr; try { ds_cap = _env.env().ram().alloc(len); local_addr = _env.env().rm().attach(ds_cap); - file->read(local_addr, (size_t)file->length(), 0); + file->read(Byte_range_ptr(local_addr, file->length()), Seek{0}); _env.env().rm().detach(local_addr); } catch(...) { @@ -940,30 +933,34 @@ class Vfs::Ram_file_system : public Vfs::File_system ************************/ Write_result write(Vfs_handle * const vfs_handle, - char const * const buf, file_size len, - Vfs::file_size &out) override + Const_byte_range_ptr const &buf, + size_t &out) override { if ((vfs_handle->status_flags() & OPEN_MODE_ACCMODE) == OPEN_MODE_RDONLY) return WRITE_ERR_INVALID; - Vfs_ram::Io_handle * const handle = - static_cast(vfs_handle); + Vfs_ram::Io_handle &handle = + *static_cast(vfs_handle); - out = handle->node.write(buf, (size_t)len, handle->seek()); - handle->modifying = true; + Vfs_ram::Seek const seek { size_t(handle.seek()) }; + + out = handle.node.write(buf, seek); + handle.modifying = true; return WRITE_OK; } - Read_result complete_read(Vfs_handle * const vfs_handle, char *dst, - file_size count, file_size &out_count) override + Read_result complete_read(Vfs_handle * const vfs_handle, + Byte_range_ptr const &dst, size_t &out_count) override { out_count = 0; - Vfs_ram::Io_handle const * const handle = - static_cast(vfs_handle); + Vfs_ram::Io_handle const &handle = + *static_cast(vfs_handle); - return handle->node.complete_read(dst, count, handle->seek(), out_count); + Vfs_ram::Seek const seek { size_t(handle.seek()) }; + + return handle.node.complete_read(dst, seek, out_count); } bool read_ready (Vfs_handle const &) const override { return true; } @@ -974,10 +971,12 @@ class Vfs::Ram_file_system : public Vfs::File_system if ((vfs_handle->status_flags() & OPEN_MODE_ACCMODE) == OPEN_MODE_RDONLY) return FTRUNCATE_ERR_NO_PERM; - Vfs_ram::Io_handle const * const handle = - static_cast(vfs_handle); + Vfs_ram::Io_handle const &handle = + *static_cast(vfs_handle); - try { handle->node.truncate(len); } + Vfs_ram::Seek const at { size_t(len) }; + + try { handle.node.truncate(at); } catch (Vfs_ram::Out_of_memory) { return FTRUNCATE_ERR_NO_SPACE; } return FTRUNCATE_OK; } @@ -987,13 +986,14 @@ class Vfs::Ram_file_system : public Vfs::File_system */ Sync_result complete_sync(Vfs_handle * const vfs_handle) override { - Vfs_ram::Io_handle * const handle = - static_cast(vfs_handle); - if (handle->modifying) { - handle->modifying = false; - handle->node.close(*handle); - handle->node.notify(); - handle->node.open(*handle); + Vfs_ram::Io_handle &handle = + *static_cast(vfs_handle); + + if (handle.modifying) { + handle.modifying = false; + handle.node.close(handle); + handle.node.notify(); + handle.node.open(handle); } return SYNC_OK; } @@ -1004,11 +1004,12 @@ class Vfs::Ram_file_system : public Vfs::File_system if ((vfs_handle->status_flags() & OPEN_MODE_ACCMODE) == OPEN_MODE_RDONLY) return false; - Vfs_ram::Io_handle * const handle = - static_cast(vfs_handle); - handle->modifying = true; + Vfs_ram::Io_handle &handle = + *static_cast(vfs_handle); - return handle->node.update_modification_timestamp(time); + handle.modifying = true; + + return handle.node.update_modification_timestamp(time); } diff --git a/repos/os/src/lib/vfs/rom_file_system.h b/repos/os/src/lib/vfs/rom_file_system.h index 69851d0b23..dc69dce776 100644 --- a/repos/os/src/lib/vfs/rom_file_system.h +++ b/repos/os/src/lib/vfs/rom_file_system.h @@ -39,17 +39,17 @@ class Vfs::Rom_file_system : public Single_file_system Genode::Attached_rom_dataspace _rom { _env, _label.string() }; - file_size _init_content_size() + size_t _init_content_size() { if (!_binary) - for (file_size pos = 0; pos < _rom.size(); pos++) + for (size_t pos = 0; pos < _rom.size(); pos++) if (_rom.local_addr()[pos] == 0x00) return pos; return _rom.size(); } - file_size _content_size = _init_content_size(); + size_t _content_size = _init_content_size(); void _update() { @@ -63,7 +63,7 @@ class Vfs::Rom_file_system : public Single_file_system Genode::Attached_rom_dataspace &_rom; - file_size const &_content_size; + size_t const &_content_size; public: @@ -71,23 +71,22 @@ class Vfs::Rom_file_system : public Single_file_system File_io_service &fs, Genode::Allocator &alloc, Genode::Attached_rom_dataspace &rom, - file_size const &content_size) + size_t const &content_size) : Single_vfs_handle(ds, fs, alloc, 0), _rom(rom), _content_size(content_size) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { /* file read limit is the size of the dataspace */ - file_size const max_size = _content_size; + size_t const max_size = _content_size; /* current read offset */ - file_size const read_offset = seek(); + size_t const read_offset = size_t(seek()); /* maximum read offset, clamped to dataspace size */ - file_size const end_offset = min(count + read_offset, max_size); + size_t const end_offset = min(dst.num_bytes + read_offset, max_size); /* check if end of file is reached */ if (read_offset >= end_offset) { @@ -99,16 +98,15 @@ class Vfs::Rom_file_system : public Single_file_system char const *src = _rom.local_addr() + read_offset; /* copy-out bytes from ROM dataspace */ - file_size const num_bytes = end_offset - read_offset; + size_t const num_bytes = end_offset - read_offset; - memcpy(dst, src, (size_t)num_bytes); + memcpy(dst.start, src, num_bytes); out_count = num_bytes; return READ_OK; } - Write_result write(char const *, file_size, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &, size_t &out_count) override { out_count = 0; return WRITE_ERR_INVALID; diff --git a/repos/os/src/lib/vfs/rtc_file_system.h b/repos/os/src/lib/vfs/rtc_file_system.h index f1aad5e915..a3a656f6d2 100644 --- a/repos/os/src/lib/vfs/rtc_file_system.h +++ b/repos/os/src/lib/vfs/rtc_file_system.h @@ -51,8 +51,7 @@ class Vfs::Rtc_file_system : public Single_file_system * On each read the current time is queried and afterwards formated * as '%Y-%m-%d %H:%M:%S\n' resp. '%F %T\n'. */ - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (seek() >= TIMESTAMP_LEN) { out_count = 0; @@ -63,20 +62,20 @@ class Vfs::Rtc_file_system : public Single_file_system char buf[TIMESTAMP_LEN+1]; char *b = buf; - Genode::size_t n = Genode::snprintf(buf, sizeof(buf), "%04u-%02u-%02u %02u:%02u:%02u\n", - ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second); - n -= (size_t)seek(); + size_t n = Genode::snprintf(buf, sizeof(buf), "%04u-%02u-%02u %02u:%02u:%02u\n", + ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second); + n -= size_t(seek()); b += seek(); - file_size len = count > n ? n : count; - Genode::memcpy(dst, b, (size_t)len); + size_t const len = min(n, dst.num_bytes); + memcpy(dst.start, b, len); out_count = len; return READ_OK; } - Write_result write(char const *, file_size, file_size &) override + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_IO; } diff --git a/repos/os/src/lib/vfs/symlink_file_system.h b/repos/os/src/lib/vfs/symlink_file_system.h index d6c0b8244e..31e7a4a7e7 100644 --- a/repos/os/src/lib/vfs/symlink_file_system.h +++ b/repos/os/src/lib/vfs/symlink_file_system.h @@ -39,18 +39,15 @@ class Vfs::Symlink_file_system : public Single_file_system : Single_vfs_handle(ds, fs, alloc, 0), _target(target) { } - - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { - auto n = min(count, _target.length()); - copy_cstring(dst, _target.string(), (size_t)n); - out_count = n - 1; + size_t const n = min(dst.num_bytes, _target.length()); + copy_cstring(dst.start, _target.string(), n); + out_count = (n > 0) ? n - 1 : 0; return READ_OK; } - Write_result write(char const*, file_size, - file_size&) override { + Write_result write(Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_INVALID; } bool read_ready() const override { return true; } diff --git a/repos/os/src/lib/vfs/tap/nic_file_system.h b/repos/os/src/lib/vfs/tap/nic_file_system.h index 4babce42f0..43af74ac3c 100644 --- a/repos/os/src/lib/vfs/tap/nic_file_system.h +++ b/repos/os/src/lib/vfs/tap/nic_file_system.h @@ -148,8 +148,7 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle return _link_state; } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (!read_ready()) { _blocked = true; @@ -167,8 +166,8 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle const char *const rx_pkt_base { _nic.rx()->packet_content(rx_pkt) }; - out_count = static_cast(min(rx_pkt.size(), static_cast(count))); - memcpy(dst, rx_pkt_base, static_cast(out_count)); + out_count = min(rx_pkt.size(), dst.num_bytes); + memcpy(dst.start, rx_pkt_base, out_count); _nic.rx()->acknowledge_packet(rx_pkt); } @@ -176,8 +175,7 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle return Read_result::READ_OK; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { out_count = 0; @@ -187,18 +185,16 @@ class Vfs::Nic_file_system::Nic_vfs_handle : public Single_vfs_handle return Write_result::WRITE_ERR_WOULD_BLOCK; } try { - size_t tx_pkt_size { static_cast(count) }; - Packet_descriptor tx_pkt { - _nic.tx()->alloc_packet(tx_pkt_size) }; + _nic.tx()->alloc_packet(src.num_bytes) }; void *tx_pkt_base { _nic.tx()->packet_content(tx_pkt) }; - memcpy(tx_pkt_base, src, tx_pkt_size); + memcpy(tx_pkt_base, src.start, src.num_bytes); _nic.tx()->submit_packet(tx_pkt); - out_count = tx_pkt_size; + out_count = src.num_bytes; return Write_result::WRITE_OK; } catch (...) { diff --git a/repos/os/src/lib/vfs/tap/uplink_file_system.h b/repos/os/src/lib/vfs/tap/uplink_file_system.h index 6aaf41da06..a3c1ae97e5 100644 --- a/repos/os/src/lib/vfs/tap/uplink_file_system.h +++ b/repos/os/src/lib/vfs/tap/uplink_file_system.h @@ -136,8 +136,7 @@ class Vfs::Uplink_file_system::Uplink_vfs_handle : public Single_vfs_handle, return _drv_link_state; } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (!_conn.constructed()) return Read_result::READ_ERR_INVALID; @@ -158,8 +157,8 @@ class Vfs::Uplink_file_system::Uplink_vfs_handle : public Single_vfs_handle, const char *const conn_rx_pkt_base { _conn->rx()->packet_content(conn_rx_pkt) }; - out_count = static_cast(min(conn_rx_pkt.size(), static_cast(count))); - memcpy(dst, conn_rx_pkt_base, static_cast(out_count)); + out_count = min(conn_rx_pkt.size(), dst.num_bytes); + memcpy(dst.start, conn_rx_pkt_base, out_count); _conn->rx()->acknowledge_packet(conn_rx_pkt); } @@ -167,20 +166,19 @@ class Vfs::Uplink_file_system::Uplink_vfs_handle : public Single_vfs_handle, return Read_result::READ_OK; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { if (!_conn.constructed()) return Write_result::WRITE_ERR_INVALID; out_count = 0; - _drv_rx_handle_pkt(static_cast(count), [&] (void * dst, size_t dst_size) { + _drv_rx_handle_pkt(src.num_bytes, [&] (void * dst, size_t dst_size) { out_count = dst_size; - memcpy(dst, src, dst_size); + memcpy(dst, src.start, dst_size); return Uplink_client_base::Write_result::WRITE_SUCCEEDED; }); - if (out_count == count) + if (out_count == src.num_bytes) return Write_result::WRITE_OK; else return Write_result::WRITE_ERR_WOULD_BLOCK; diff --git a/repos/os/src/lib/vfs/tar_file_system.h b/repos/os/src/lib/vfs/tar_file_system.h index 054e2c8d55..2424b36968 100644 --- a/repos/os/src/lib/vfs/tar_file_system.h +++ b/repos/os/src/lib/vfs/tar_file_system.h @@ -165,8 +165,7 @@ class Vfs::Tar_file_system : public File_system : Vfs_handle(fs, fs, alloc, status_flags), _node(node) { } - virtual Read_result read(char *dst, file_size count, - file_size &out_count) = 0; + virtual Read_result read(Byte_range_ptr const &dst, size_t &out_count) = 0; }; @@ -174,19 +173,18 @@ class Vfs::Tar_file_system : public File_system { using Tar_vfs_handle::Tar_vfs_handle; - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { file_size const record_size = _node->record->size(); file_size const record_bytes_left = record_size >= seek() ? record_size - seek() : 0; - count = min(record_bytes_left, count); + size_t const count = min(size_t(record_bytes_left), dst.num_bytes); char const *data = (char *)_node->record->data() + seek(); - memcpy(dst, data, (size_t)count); + memcpy(dst.start, data, count); out_count = count; return READ_OK; @@ -197,13 +195,12 @@ class Vfs::Tar_file_system : public File_system { using Tar_vfs_handle::Tar_vfs_handle; - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { - if (count < sizeof(Dirent)) + if (dst.num_bytes < sizeof(Dirent)) return READ_ERR_INVALID; - Dirent &dirent = *(Dirent*)dst; + Dirent &dirent = *(Dirent*)dst.start; unsigned const index = (unsigned)(seek() / sizeof(Dirent)); @@ -272,14 +269,13 @@ class Vfs::Tar_file_system : public File_system { using Tar_vfs_handle::Tar_vfs_handle; - Read_result read(char *buf, file_size buf_size, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { Record const *record = _node->record; - file_size const count = min(buf_size, 100ULL); + size_t const count = min(dst.num_bytes, 100UL); - memcpy(buf, record->linked_name(), (size_t)count); + memcpy(dst.start, record->linked_name(), count); out_count = count; @@ -751,23 +747,19 @@ class Vfs::Tar_file_system : public File_system ** File I/O service interface ** ********************************/ - Write_result write(Vfs_handle *, char const *, file_size, - file_size &) override + Write_result write(Vfs_handle *, Const_byte_range_ptr const &, size_t &) override { return WRITE_ERR_INVALID; } - Read_result complete_read(Vfs_handle *vfs_handle, char *dst, - file_size count, file_size &out_count) override + Read_result complete_read(Vfs_handle *vfs_handle, Byte_range_ptr const &dst, + size_t &out_count) override { out_count = 0; - Tar_vfs_handle *handle = static_cast(vfs_handle); + Tar_vfs_handle &handle = *static_cast(vfs_handle); - if (!handle) - return READ_ERR_INVALID; - - return handle->read(dst, count, out_count); + return handle.read(dst, out_count); } Ftruncate_result ftruncate(Vfs_handle *, file_size) override diff --git a/repos/os/src/lib/vfs/terminal_file_system.h b/repos/os/src/lib/vfs/terminal_file_system.h index 15d2f86c6c..7c7c23748d 100644 --- a/repos/os/src/lib/vfs/terminal_file_system.h +++ b/repos/os/src/lib/vfs/terminal_file_system.h @@ -149,8 +149,7 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system return true; } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { if (_read_buffer.empty()) _fetch_data_from_terminal(_terminal, _read_buffer, @@ -160,18 +159,17 @@ class Vfs::Terminal_file_system::Data_file_system : public Single_file_system return READ_QUEUED; unsigned consumed = 0; - for (; consumed < count && !_read_buffer.empty(); consumed++) - dst[consumed] = _read_buffer.get(); + for (; consumed < dst.num_bytes && !_read_buffer.empty(); consumed++) + dst.start[consumed] = _read_buffer.get(); out_count = consumed; return READ_OK; } - Write_result write(char const *src, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { - out_count = _terminal.write(src, (size_t)count); + out_count = _terminal.write(src.start, src.num_bytes); return WRITE_OK; } }; diff --git a/repos/os/src/lib/vfs/zero_file_system.h b/repos/os/src/lib/vfs/zero_file_system.h index 78bc9de746..acaa35e3a6 100644 --- a/repos/os/src/lib/vfs/zero_file_system.h +++ b/repos/os/src/lib/vfs/zero_file_system.h @@ -48,35 +48,35 @@ struct Vfs::Zero_file_system : Single_file_system _size(size) { } - Read_result read(char *dst, file_size count, - file_size &out_count) override + Read_result read(Byte_range_ptr const &dst, size_t &out_count) override { + size_t count = dst.num_bytes; + if (_size) { /* current read offset */ file_size const read_offset = seek(); /* maximum read offset */ - file_size const end_offset = min(count + read_offset, _size); + file_size const end_offset = min(dst.num_bytes + read_offset, _size); if (read_offset >= end_offset) { out_count = 0; return READ_OK; } - - count = end_offset - read_offset; + count = size_t(end_offset - read_offset); } - memset(dst, 0, (size_t)count); + memset(dst.start, 0, count); + out_count = count; return READ_OK; } - Write_result write(char const *, file_size count, - file_size &out_count) override + Write_result write(Const_byte_range_ptr const &src, size_t &out_count) override { - out_count = count; + out_count = src.num_bytes; return WRITE_OK; } diff --git a/repos/os/src/server/fs_report/main.cc b/repos/os/src/server/fs_report/main.cc index ae79e277eb..26d640d4c5 100644 --- a/repos/os/src/server/fs_report/main.cc +++ b/repos/os/src/server/fs_report/main.cc @@ -153,12 +153,14 @@ class Fs_report::Session_component : public Genode::Rpc_object size_t offset = 0; while (offset < length) { - file_size n = 0; + size_t n = 0; handle->seek(offset); - Write_result res = handle->fs().write( - handle, _ds.local_addr() + offset, - length - offset, n); + + Const_byte_range_ptr const src(_ds.local_addr() + offset, + length - offset); + + Write_result res = handle->fs().write(handle, src, n); if (res != Write_result::WRITE_OK) { /* do not spam the log */ @@ -169,7 +171,7 @@ class Fs_report::Session_component : public Genode::Rpc_object return; } - offset += (size_t)n; + offset += n; } _file_size = length; diff --git a/repos/os/src/server/vfs/node.h b/repos/os/src/server/vfs/node.h index cc8003fd5e..cb6f972d73 100644 --- a/repos/os/src/server/vfs/node.h +++ b/repos/os/src/server/vfs/node.h @@ -378,10 +378,12 @@ class Vfs_server::Io_node : public Vfs_server::Node, void _execute_read() { - file_size out_count = 0; + size_t out_count = 0; + + Byte_range_ptr dst { _payload_ptr.ptr, _packet.length() }; + + switch (_handle.fs().complete_read(&_handle, dst, out_count)) { - switch (_handle.fs().complete_read(&_handle, _payload_ptr.ptr, - _packet.length(), out_count)) { case Read_result::READ_OK: _acknowledge_as_success((size_t)out_count); break; @@ -402,13 +404,13 @@ class Vfs_server::Io_node : public Vfs_server::Node, * * \return number of consumed bytes */ - size_t _execute_write(char const *src_ptr, size_t length, - seek_off_t write_pos) + size_t _execute_write(Const_byte_range_ptr const &src, seek_off_t write_pos) { - file_size out_count = 0; + size_t out_count = 0; _handle.seek(_initial_write_seek_offset + write_pos); - switch (_handle.fs().write(&_handle, src_ptr, length, out_count)) { + switch (_handle.fs().write(&_handle, src, out_count)) { + case Write_result::WRITE_ERR_WOULD_BLOCK: break; @@ -423,7 +425,7 @@ class Vfs_server::Io_node : public Vfs_server::Node, _modified = true; - return (size_t)out_count; + return out_count; } void _execute_sync() @@ -669,10 +671,11 @@ struct Vfs_server::Symlink : Io_node */ case Packet_descriptor::WRITE: { - size_t const count = _write_buffer.length(); + Const_byte_range_ptr const src { _write_buffer.string(), + _write_buffer.length() }; - if (_execute_write(_write_buffer.string(), count, 0) == count) - _acknowledge_as_success(count); + if (_execute_write(src, 0) == src.num_bytes) + _acknowledge_as_success(src.num_bytes); else _acknowledge_as_failure(); break; @@ -736,7 +739,7 @@ class Vfs_server::File : public Io_node * * Used for the incremental write to continuous files. */ - seek_off_t _write_pos = 0; + size_t _write_pos = 0; bool _watch_read_ready = false; @@ -800,13 +803,13 @@ class Vfs_server::File : public Io_node case Packet_descriptor::WRITE: { - size_t const count = (size_t)(_packet.length() - _write_pos); - char const * const src_ptr = _payload_ptr.ptr + _write_pos; - size_t const consumed = _execute_write(src_ptr, count, - _write_pos); + Const_byte_range_ptr const src { _payload_ptr.ptr + _write_pos, + _packet.length() - _write_pos }; - if (consumed == count) { - _acknowledge_as_success(count); + size_t const consumed = _execute_write(src, _write_pos); + + if (consumed == src.num_bytes) { + _acknowledge_as_success(src.num_bytes); break; } diff --git a/repos/os/src/server/vfs_block/job.h b/repos/os/src/server/vfs_block/job.h index 3e0d729f74..1c8b25fa6a 100644 --- a/repos/os/src/server/vfs_block/job.h +++ b/repos/os/src/server/vfs_block/job.h @@ -16,8 +16,9 @@ namespace Vfs_block { - using file_size = Vfs::file_size; + using file_size = Vfs::file_size; using file_offset = Vfs::file_offset; + using size_t = Genode::size_t; struct Job { @@ -57,7 +58,7 @@ namespace Vfs_block { State state; file_offset const base_offset; file_offset current_offset; - file_size current_count; + size_t current_count; bool success; bool complete; @@ -82,12 +83,13 @@ namespace Vfs_block { using Result = Vfs::File_io_service::Read_result; bool completed = false; - file_size out = 0; + size_t out = 0; + + Genode::Byte_range_ptr const dst { data + current_offset, + current_count }; + + Result const result = _handle.fs().complete_read(&_handle, dst, out); - Result const result = - _handle.fs().complete_read(&_handle, - data + current_offset, - current_count, out); if (result == Result::READ_QUEUED || result == Result::READ_ERR_WOULD_BLOCK) { return progress; @@ -142,11 +144,13 @@ namespace Vfs_block { using Result = Vfs::File_io_service::Write_result; bool completed = false; - file_size out = 0; + size_t out = 0; + + Genode::Const_byte_range_ptr const src { data + current_offset, + current_count }; + + Result result = _handle.fs().write(&_handle, src, out); - Result result = _handle.fs().write(&_handle, - data + current_offset, - current_count, out); switch (result) { case Result::WRITE_ERR_WOULD_BLOCK: return progress; @@ -243,7 +247,7 @@ namespace Vfs_block { Block::Request request, file_offset base_offset, char *data, - file_size length) + size_t length) : _handle { handle }, request { request }, diff --git a/repos/os/src/test/ram_fs_chunk/main.cc b/repos/os/src/test/ram_fs_chunk/main.cc index 09db62f93b..ce6baf5428 100644 --- a/repos/os/src/test/ram_fs_chunk/main.cc +++ b/repos/os/src/test/ram_fs_chunk/main.cc @@ -26,7 +26,7 @@ using Chunk_level_1 = Chunk_index<4, Chunk_level_2>; struct Chunk_level_0 : Chunk_index<5, Chunk_level_1> { - Chunk_level_0(Allocator &alloc, seek_off_t off) : Chunk_index(alloc, off) { } + Chunk_level_0(Allocator &alloc, Seek off) : Chunk_index(alloc, off) { } void print(Output &out) const { @@ -34,7 +34,7 @@ struct Chunk_level_0 : Chunk_index<5, Chunk_level_1> if (used_size() > Chunk_level_0::SIZE) { throw Index_out_of_range(); } - read(read_buf, (size_t)used_size(), 0); + read(Byte_range_ptr(read_buf, (size_t)used_size()), Seek { 0 }); Genode::print(out, "content (size=", used_size(), "): "); Genode::print(out, "\""); for (unsigned i = 0; i < used_size(); i++) { @@ -98,6 +98,8 @@ struct Allocator_tracer : Allocator struct Main { + using Seek = Chunk_base::Seek; + Env &env; Heap heap { env.ram(), env.rm() }; Allocator_tracer alloc { heap }; @@ -111,34 +113,35 @@ struct Main log(" level 2: payload=", (int)Chunk_level_2::SIZE, " sizeof=", sizeof(Chunk_level_2)); log(" level 3: payload=", (int)Chunk_level_3::SIZE, " sizeof=", sizeof(Chunk_level_3)); { - Chunk_level_0 chunk(alloc, 0); - write(chunk, "five-o-one", 0); + Chunk_level_0 chunk(alloc, Seek { 0 }); + write(chunk, "five-o-one", Seek { 0 }); /* overwrite part of the file */ - write(chunk, "five", 7); + write(chunk, "five", Seek { 7 }); /* write to position beyond current file length */ - write(chunk, "Nuance", 17); - write(chunk, "YM-2149", 35); + write(chunk, "Nuance", Seek { 17 }); + write(chunk, "YM-2149", Seek { 35 }); - truncate(chunk, 30); + truncate(chunk, Seek { 30 }); for (unsigned i = 29; i > 0; i--) - truncate(chunk, i); + truncate(chunk, Seek { i }); } log("allocator: sum=", alloc.sum); log("--- RAM filesystem chunk test finished ---"); } - void write(Chunk_level_0 &chunk, char const *str, off_t seek_offset) + void write(Chunk_level_0 &chunk, char const *str, Seek seek) { - chunk.write(str, strlen(str), seek_offset); - log("write \"", str, "\" at offset ", seek_offset, " -> ", chunk); + chunk.write(Const_byte_range_ptr(str, strlen(str)), seek); + + log("write \"", str, "\" at offset ", seek.value, " -> ", chunk); } - void truncate(Chunk_level_0 &chunk, file_size_t size) + void truncate(Chunk_level_0 &chunk, Seek size) { chunk.truncate(size); - log("trunc(", size, ") -> ", chunk); + log("trunc(", size.value, ") -> ", chunk); } }; diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index a1d14d7453..c208fa4bee 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -290,9 +290,9 @@ struct Write_test : public Stress_test path.base(), Directory_service::OPEN_MODE_WRONLY, &handle, alloc)); Vfs_handle::Guard guard(handle); - file_size n; + size_t n; assert_write(handle->fs().write( - handle, path.base(), path_len, n)); + handle, Const_byte_range_ptr(path.base(), path_len), n)); handle->fs().queue_sync(handle); while (handle->fs().complete_sync(handle) == Vfs::File_io_service::SYNC_QUEUED) @@ -366,13 +366,15 @@ struct Read_test : public Stress_test Vfs_handle::Guard guard(handle); char tmp[MAX_PATH_LEN]; - file_size n; + size_t n; handle->fs().queue_read(handle, sizeof(tmp)); Vfs::File_io_service::Read_result read_result; + Byte_range_ptr const dst { tmp, sizeof(tmp) }; + while ((read_result = - handle->fs().complete_read(handle, tmp, sizeof(tmp), n)) == + handle->fs().complete_read(handle, dst, n)) == Vfs::File_io_service::READ_QUEUED) _io.commit_and_wait(); @@ -444,10 +446,11 @@ struct Unlink_test : public Stress_test for (Vfs::file_size i = vfs.num_dirent(path); i;) { dir_handle->seek(--i * sizeof(dirent)); dir_handle->fs().queue_read(dir_handle, sizeof(dirent)); - Vfs::file_size out_count; - while (dir_handle->fs().complete_read(dir_handle, (char*)&dirent, - sizeof(dirent), out_count) == + Byte_range_ptr const dst { (char*)&dirent, sizeof(dirent) }; + size_t out_count; + + while (dir_handle->fs().complete_read(dir_handle, dst, out_count) == Vfs::File_io_service::READ_QUEUED) _io.commit_and_wait(); From e09941f310435fd318a5e7d6e6e3cacc313bdb34 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 21 Feb 2023 14:15:08 +0100 Subject: [PATCH 0321/1921] Remove base/debug.h Fixes #4765 --- repos/base/include/base/debug.h | 24 ------------------- .../libports/src/lib/libdrm/ioctl_etnaviv.cc | 1 - repos/libports/src/lib/libdrm/ioctl_lima.cc | 1 - repos/libports/src/lib/qemu-usb/host.cc | 1 - .../src/test/mesa_demo/eglut/eglut_genode.cc | 5 ++-- 5 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 repos/base/include/base/debug.h diff --git a/repos/base/include/base/debug.h b/repos/base/include/base/debug.h deleted file mode 100644 index d17086c3c7..0000000000 --- a/repos/base/include/base/debug.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * \brief Debugging output function - * \author Emery Hemingway - * \date 2016-10-13 - */ - -/* - * Copyright (C) 2016-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__BASE__DEBUG_H_ -#define _INCLUDE__BASE__DEBUG_H_ -#ifndef GENODE_RELEASE - -#include - -#define PDBG(...) \ - Genode::log("\033[33m", __PRETTY_FUNCTION__, "\033[0m ", ##__VA_ARGS__) - -#endif /* GENODE_RELEASE */ -#endif /* _INCLUDE__BASE__DEBUG_H_ */ diff --git a/repos/libports/src/lib/libdrm/ioctl_etnaviv.cc b/repos/libports/src/lib/libdrm/ioctl_etnaviv.cc index deac4814f7..e565b34ade 100644 --- a/repos/libports/src/lib/libdrm/ioctl_etnaviv.cc +++ b/repos/libports/src/lib/libdrm/ioctl_etnaviv.cc @@ -14,7 +14,6 @@ /* Genode includes */ #include -#include #include #include #include diff --git a/repos/libports/src/lib/libdrm/ioctl_lima.cc b/repos/libports/src/lib/libdrm/ioctl_lima.cc index 2415914b76..5b3624de1c 100644 --- a/repos/libports/src/lib/libdrm/ioctl_lima.cc +++ b/repos/libports/src/lib/libdrm/ioctl_lima.cc @@ -14,7 +14,6 @@ /* Genode includes */ #include -#include #include #include #include diff --git a/repos/libports/src/lib/qemu-usb/host.cc b/repos/libports/src/lib/qemu-usb/host.cc index e042f31214..0ef3c6b219 100644 --- a/repos/libports/src/lib/qemu-usb/host.cc +++ b/repos/libports/src/lib/qemu-usb/host.cc @@ -17,7 +17,6 @@ #include #include #include -#include using namespace Genode; diff --git a/repos/libports/src/test/mesa_demo/eglut/eglut_genode.cc b/repos/libports/src/test/mesa_demo/eglut/eglut_genode.cc index 86a8e51407..12ba462152 100644 --- a/repos/libports/src/test/mesa_demo/eglut/eglut_genode.cc +++ b/repos/libports/src/test/mesa_demo/eglut/eglut_genode.cc @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -106,7 +105,7 @@ void _eglutNativeInitDisplay() void _eglutNativeFiniDisplay(void) { - PDBG("not implemented"); + Genode::warning(__PRETTY_FUNCTION__, " not implemented"); } @@ -123,7 +122,7 @@ void _eglutNativeInitWindow(struct eglut_window *win, const char *title, void _eglutNativeFiniWindow(struct eglut_window *win) { - PDBG("not implemented"); + Genode::warning(__PRETTY_FUNCTION__, " not implemented"); } From b0e52ba7d43bd90cd17e2493f49d8d05762189b2 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 21 Feb 2023 14:42:07 +0100 Subject: [PATCH 0322/1921] util/misc_math.h: remove abs function Fixes #4766 --- repos/base/include/util/misc_math.h | 3 --- repos/base/src/lib/base/avl_tree.cc | 2 ++ repos/gems/include/polygon_gfx/line_painter.h | 2 ++ repos/gems/src/app/menu_view/depgraph_widget.h | 2 ++ repos/os/include/util/geometry.h | 2 ++ 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/repos/base/include/util/misc_math.h b/repos/base/include/util/misc_math.h index 3f9162b778..31d079d7f2 100644 --- a/repos/base/include/util/misc_math.h +++ b/repos/base/include/util/misc_math.h @@ -22,9 +22,6 @@ namespace Genode { template static constexpr T1 min(T1 v1, T2 v2) { return v1 < v2 ? v1 : v2; } - template - static constexpr T abs(T value) { return value >= 0 ? value : -value; } - /* * Alignment to the power of two diff --git a/repos/base/src/lib/base/avl_tree.cc b/repos/base/src/lib/base/avl_tree.cc index 42d4b35c65..d890ecb763 100644 --- a/repos/base/src/lib/base/avl_tree.cc +++ b/repos/base/src/lib/base/avl_tree.cc @@ -84,6 +84,8 @@ void Avl_node_base::_rebalance_subtree(Avl_node_base *node, Policy &policy) { int v = node->_child_depth(RIGHT) - node->_child_depth(LEFT); + auto abs = [] (auto v) { return v >= 0 ? v : -v; }; + /* return if subtree is in balance */ if (abs(v) < 2) return; diff --git a/repos/gems/include/polygon_gfx/line_painter.h b/repos/gems/include/polygon_gfx/line_painter.h index fed44197a3..9f2e9f1982 100644 --- a/repos/gems/include/polygon_gfx/line_painter.h +++ b/repos/gems/include/polygon_gfx/line_painter.h @@ -139,6 +139,8 @@ struct Line_painter long const dx_f = x2.value - x1.value, dy_f = y2.value - y1.value; + auto abs = [] (auto v) { return v >= 0 ? v : -v; }; + long const num_steps = max(abs(dx_f) + 127, abs(dy_f) + 127) >> 8; if (num_steps == 0) diff --git a/repos/gems/src/app/menu_view/depgraph_widget.h b/repos/gems/src/app/menu_view/depgraph_widget.h index dfdd0bb801..41013b097c 100644 --- a/repos/gems/src/app/menu_view/depgraph_widget.h +++ b/repos/gems/src/app/menu_view/depgraph_widget.h @@ -672,6 +672,8 @@ struct Menu_view::Depgraph_widget : Widget x4 = p2.x(), y4 = p2.y(); + auto abs = [] (auto v) { return v >= 0 ? v : -v; }; + /* subdivide the curve depending on the size of its bounding box */ unsigned const levels = (unsigned)max(log2(max(abs(x4 - x1), abs(y4 - y1)) >> 2), 3); diff --git a/repos/os/include/util/geometry.h b/repos/os/include/util/geometry.h index a4080cc936..4e23bea507 100644 --- a/repos/os/include/util/geometry.h +++ b/repos/os/include/util/geometry.h @@ -66,6 +66,8 @@ class Genode::Point void print(Output &out) const { + auto abs = [] (auto v) { return v >= 0 ? v : -v; }; + Genode::print(out, _x >= 0 ? "+" : "-", abs(_x), _y >= 0 ? "+" : "-", abs(_y)); } From 32f9d1fcebb87e7a7f11b8f02019d5ed33eafd37 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 21 Feb 2023 14:45:26 +0100 Subject: [PATCH 0323/1921] os: remove server/input_event_bridge This component was solely used during the transition of the input-session to the event-session interface. Fixes #4767 --- .../recipes/src/input_event_bridge/content.mk | 2 - repos/os/recipes/src/input_event_bridge/hash | 1 - .../recipes/src/input_event_bridge/used_apis | 4 - .../os/src/server/input_event_bridge/main.cc | 96 ------------------- .../src/server/input_event_bridge/target.mk | 3 - 5 files changed, 106 deletions(-) delete mode 100644 repos/os/recipes/src/input_event_bridge/content.mk delete mode 100644 repos/os/recipes/src/input_event_bridge/hash delete mode 100644 repos/os/recipes/src/input_event_bridge/used_apis delete mode 100644 repos/os/src/server/input_event_bridge/main.cc delete mode 100644 repos/os/src/server/input_event_bridge/target.mk diff --git a/repos/os/recipes/src/input_event_bridge/content.mk b/repos/os/recipes/src/input_event_bridge/content.mk deleted file mode 100644 index a55b5a0699..0000000000 --- a/repos/os/recipes/src/input_event_bridge/content.mk +++ /dev/null @@ -1,2 +0,0 @@ -SRC_DIR = src/server/input_event_bridge -include $(GENODE_DIR)/repos/base/recipes/src/content.inc diff --git a/repos/os/recipes/src/input_event_bridge/hash b/repos/os/recipes/src/input_event_bridge/hash deleted file mode 100644 index e5a69ac271..0000000000 --- a/repos/os/recipes/src/input_event_bridge/hash +++ /dev/null @@ -1 +0,0 @@ -2023-01-23 8d2990d998cbbcedc4f88c3dc0cec2a1cf71fcfa diff --git a/repos/os/recipes/src/input_event_bridge/used_apis b/repos/os/recipes/src/input_event_bridge/used_apis deleted file mode 100644 index a2645a0156..0000000000 --- a/repos/os/recipes/src/input_event_bridge/used_apis +++ /dev/null @@ -1,4 +0,0 @@ -base -os -event_session -input_session diff --git a/repos/os/src/server/input_event_bridge/main.cc b/repos/os/src/server/input_event_bridge/main.cc deleted file mode 100644 index f562001366..0000000000 --- a/repos/os/src/server/input_event_bridge/main.cc +++ /dev/null @@ -1,96 +0,0 @@ -/* - * \brief Service for connecting an input client with an event client - * \author Norman Feske - * \date 2020-07-02 - */ - -/* - * Copyright (C) 2020 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -/* Genode includes */ -#include -#include -#include -#include -#include -#include - -namespace Input_event_bridge { - - using namespace Genode; - - struct Event_session; - struct Main; -} - - -struct Input_event_bridge::Event_session : Rpc_object -{ - Attached_ram_dataspace _ds; - - Input::Session_component &_input_session; - - Dataspace_capability dataspace() { return _ds.cap(); } - - void submit_batch(unsigned count) - { - unsigned const max_events = (unsigned)(_ds.size() / sizeof(Input::Event)); - - if (count > max_events) - warning("number of events exceeds dataspace capacity"); - - count = min(count, max_events); - - Input::Event const * const events = _ds.local_addr(); - - for (unsigned i = 0; i < count; i++) - _input_session.submit(events[i]); - } - - Event_session(Env &env, Input::Session_component &input_session) - : - _ds(env.ram(), env.rm(), 4096), _input_session(input_session) - { } -}; - - -/****************** - ** Main program ** - ******************/ - -struct Input_event_bridge::Main -{ - Env &_env; - - Attached_ram_dataspace _ds { _env.ram(), _env.rm(), 4096 }; - - Input::Session_component _input_session { _env, _env.ram() }; - Event_session _event_session { _env, _input_session }; - - /* - * Attach root interfaces to the entry point - */ - Static_root _input_root { _env.ep().manage(_input_session) }; - Static_root _event_root { _env.ep().manage(_event_session) }; - - /** - * Constructor - */ - Main(Env &env) : _env(env) - { - _input_session.event_queue().enabled(true); - - _env.parent().announce(env.ep().manage(_input_root)); - _env.parent().announce(env.ep().manage(_event_root)); - } -}; - - -void Component::construct(Genode::Env &env) -{ - static Input_event_bridge::Main inst(env); -} diff --git a/repos/os/src/server/input_event_bridge/target.mk b/repos/os/src/server/input_event_bridge/target.mk deleted file mode 100644 index 8eca320bd8..0000000000 --- a/repos/os/src/server/input_event_bridge/target.mk +++ /dev/null @@ -1,3 +0,0 @@ -TARGET = input_event_bridge -SRC_CC = main.cc -LIBS = base From 356506a67a97eb56bd5d1bc5ddc86616e76ee098 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 21 Feb 2023 15:33:12 +0100 Subject: [PATCH 0324/1921] base: remove base/blocking.h This patch removes the obsolete exception type 'Blocking_canceled'. Issue #4768 --- repos/base-fiasco/src/lib/base/ipc.cc | 5 --- repos/base-foc/src/lib/base/ipc.cc | 11 +++---- repos/base-hw/src/lib/base/ipc.cc | 5 +-- repos/base-linux/src/lib/base/ipc.cc | 20 +++++++----- .../base-linux/src/timer/linux/time_source.cc | 3 +- .../base-nova/src/lib/base/rpc_entrypoint.cc | 6 ++-- repos/base-okl4/src/lib/base/ipc.cc | 10 ++---- repos/base-pistachio/src/lib/base/ipc.cc | 13 ++------ repos/base-sel4/src/lib/base/ipc.cc | 1 - repos/base/include/base/blocking.h | 31 ------------------- repos/base/include/base/ipc.h | 1 - repos/base/include/base/lock.h | 1 - repos/base/src/lib/base/entrypoint.cc | 10 ++---- repos/base/src/lib/base/rpc_dispatch_loop.cc | 5 ++- repos/base/src/lib/base/rpc_entrypoint.cc | 1 - repos/base/src/timer/periodic/time_source.cc | 3 +- 16 files changed, 33 insertions(+), 93 deletions(-) delete mode 100644 repos/base/include/base/blocking.h diff --git a/repos/base-fiasco/src/lib/base/ipc.cc b/repos/base-fiasco/src/lib/base/ipc.cc index ada92f9397..613c8d9875 100644 --- a/repos/base-fiasco/src/lib/base/ipc.cc +++ b/repos/base-fiasco/src/lib/base/ipc.cc @@ -14,7 +14,6 @@ /* Genode includes */ #include #include -#include /* base-internal includes */ #include @@ -166,10 +165,6 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst, rcv_header.extract_caps(rcv_msg); if (L4_IPC_IS_ERROR(ipc_result)) { - - if (L4_IPC_ERROR(ipc_result) == L4_IPC_RECANCELED) - throw Genode::Blocking_canceled(); - error("ipc_call error ", Hex(L4_IPC_ERROR(ipc_result))); throw Genode::Ipc_error(); } diff --git a/repos/base-foc/src/lib/base/ipc.cc b/repos/base-foc/src/lib/base/ipc.cc index c674f4535f..1b6985d9c6 100644 --- a/repos/base-foc/src/lib/base/ipc.cc +++ b/repos/base-foc/src/lib/base/ipc.cc @@ -21,10 +21,10 @@ */ /* Genode includes */ -#include #include #include #include +#include /* base-internal includes */ #include /* for 'thread_get_my_native_id()' */ @@ -279,11 +279,10 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst, l4_msgtag_t const reply_tag = l4_ipc_call(dst.data()->kcap(), l4_utcb(), call_tag, L4_IPC_NEVER); - if (l4_ipc_error(reply_tag, l4_utcb()) == L4_IPC_RECANCELED) - throw Genode::Blocking_canceled(); - - if (ipc_error(reply_tag, DEBUG_MSG)) - throw Genode::Ipc_error(); + if (ipc_error(reply_tag, DEBUG_MSG)) { + raw("L4 IPC error"); + sleep_forever(); + } return Rpc_exception_code(extract_msg_from_utcb(reply_tag, rcv_window, rcv_msg)); } diff --git a/repos/base-hw/src/lib/base/ipc.cc b/repos/base-hw/src/lib/base/ipc.cc index 4990f6eccc..0bd382cb04 100644 --- a/repos/base-hw/src/lib/base/ipc.cc +++ b/repos/base-hw/src/lib/base/ipc.cc @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -106,7 +107,7 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst, switch (Kernel::send_request_msg(Capability_space::capid(dst), (unsigned)rcv_caps)) { - case -1: throw Blocking_canceled(); + case -1: sleep_forever(); case -2: upgrade_capability_slab(); break; default: done = true; break; } @@ -152,7 +153,7 @@ Genode::Rpc_request Genode::ipc_reply_wait(Reply_capability const &, } switch (ret) { - case -1: throw Blocking_canceled(); + case -1: sleep_forever(); case -2: upgrade_capability_slab(); break; default: done = true; break; } diff --git a/repos/base-linux/src/lib/base/ipc.cc b/repos/base-linux/src/lib/base/ipc.cc index 543b0db58a..6365642dd9 100644 --- a/repos/base-linux/src/lib/base/ipc.cc +++ b/repos/base-linux/src/lib/base/ipc.cc @@ -17,7 +17,6 @@ /* Genode includes */ #include #include -#include #include #include #include @@ -326,7 +325,7 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst, int const send_ret = lx_sendmsg(dst_socket, snd_msg.msg(), 0); if (send_ret < 0) { error(lx_getpid(), ":", lx_gettid(), " lx_sendmsg to sd ", dst_socket, - " failed with ", send_ret, " in lx_call()"); + " failed with ", send_ret, " in lx_call()"); sleep_forever(); } @@ -339,14 +338,19 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst, rcv_msg.accept_sockets(Message::MAX_SDS_PER_MSG); rcv_msgbuf.reset(); - int const recv_ret = lx_recvmsg(reply_channel.local, rcv_msg.msg(), 0); - /* system call got interrupted by a signal */ - if (recv_ret == -LX_EINTR) - throw Genode::Blocking_canceled(); + for (;;) { + int const recv_ret = lx_recvmsg(reply_channel.local, rcv_msg.msg(), 0); - if (recv_ret < 0) { - error(lx_getpid(), ":", lx_gettid(), " ipc_call failed to receive result (", recv_ret, ")"); + /* system call got interrupted by a signal */ + if (recv_ret == -LX_EINTR) + continue; + + if (recv_ret >= 0) + break; + + error(lx_getpid(), ":", lx_gettid(), + " ipc_call failed to receive result (", recv_ret, ")"); sleep_forever(); } diff --git a/repos/base-linux/src/timer/linux/time_source.cc b/repos/base-linux/src/timer/linux/time_source.cc index 7aa076ac17..80979e981a 100644 --- a/repos/base-linux/src/timer/linux/time_source.cc +++ b/repos/base-linux/src/timer/linux/time_source.cc @@ -47,6 +47,5 @@ void Timer::Time_source::_usleep(uint64_t us) ts.tv_sec = (long)us / (1000 * 1000); ts.tv_nsec = ((long)us % (1000 * 1000)) * 1000; - if (lx_nanosleep(&ts, &ts) != 0) - throw Blocking_canceled(); + lx_nanosleep(&ts, &ts); } diff --git a/repos/base-nova/src/lib/base/rpc_entrypoint.cc b/repos/base-nova/src/lib/base/rpc_entrypoint.cc index 408798f3ee..727d64469e 100644 --- a/repos/base-nova/src/lib/base/rpc_entrypoint.cc +++ b/repos/base-nova/src/lib/base/rpc_entrypoint.cc @@ -157,7 +157,8 @@ void Rpc_entrypoint::_activation_entry() } /* atomically lookup and lock referenced object */ - auto lambda = [&] (Rpc_object_base *obj) { + auto lambda = [&] (Rpc_object_base *obj) + { if (!obj) { error("could not look up server object, return from call id_pt=", id_pt); return; @@ -165,8 +166,7 @@ void Rpc_entrypoint::_activation_entry() /* dispatch request */ ep._snd_buf.reset(); - try { exc = obj->dispatch(opcode, unmarshaller, ep._snd_buf); } - catch (Blocking_canceled) { } + exc = obj->dispatch(opcode, unmarshaller, ep._snd_buf); }; ep.apply(id_pt, lambda); diff --git a/repos/base-okl4/src/lib/base/ipc.cc b/repos/base-okl4/src/lib/base/ipc.cc index f2f6b0ef08..7402df1e6d 100644 --- a/repos/base-okl4/src/lib/base/ipc.cc +++ b/repos/base-okl4/src/lib/base/ipc.cc @@ -14,7 +14,7 @@ /* Genode includes */ #include #include -#include +#include /* base-internal includes */ #include @@ -162,15 +162,9 @@ Rpc_exception_code Genode::ipc_call(Native_capability dst, L4_MsgTag_t rcv_tag = L4_Call(dst_data.dst); - enum { ERROR_MASK = 0xe, ERROR_CANCELED = 3 << 1 }; - if (L4_IpcFailed(rcv_tag) && - ((L4_ErrorCode() & ERROR_MASK) == ERROR_CANCELED)) - throw Genode::Blocking_canceled(); - if (L4_IpcFailed(rcv_tag)) { raw("Ipc failed"); - - return Rpc_exception_code(Rpc_exception_code::INVALID_OBJECT); + sleep_forever(); } return Rpc_exception_code(extract_msg_from_utcb(rcv_tag, rcv_msg)); diff --git a/repos/base-pistachio/src/lib/base/ipc.cc b/repos/base-pistachio/src/lib/base/ipc.cc index ac04cbea76..66d14d9fa0 100644 --- a/repos/base-pistachio/src/lib/base/ipc.cc +++ b/repos/base-pistachio/src/lib/base/ipc.cc @@ -15,7 +15,6 @@ /* Genode includes */ #include #include -#include #include /* base-internal includes */ @@ -32,26 +31,18 @@ using namespace Pistachio; */ static inline void check_ipc_result(L4_MsgTag_t result, L4_Word_t error_code) { - /* - * Test for IPC cancellation via Core's cancel-blocking mechanism - */ - enum { ERROR_MASK = 0xe, ERROR_CANCELED = 3 << 1 }; - if (L4_IpcFailed(result) && - ((L4_ErrorCode() & ERROR_MASK) == ERROR_CANCELED)) - throw Genode::Blocking_canceled(); - /* * Provide diagnostic information on unexpected conditions */ if (L4_IpcFailed(result)) { raw("Error in thread ", Hex(L4_Myself().raw), ". IPC failed."); - throw Genode::Ipc_error(); + throw Ipc_error(); } if (L4_UntypedWords(result) < 2) { raw("Error in thread ", Hex(L4_Myself().raw), ". " "Expected at leat two untyped words, but got ", L4_UntypedWords(result), ".\n"); - throw Genode::Ipc_error(); + throw Ipc_error(); } } diff --git a/repos/base-sel4/src/lib/base/ipc.cc b/repos/base-sel4/src/lib/base/ipc.cc index fe1a4b1580..f4c79cf5a1 100644 --- a/repos/base-sel4/src/lib/base/ipc.cc +++ b/repos/base-sel4/src/lib/base/ipc.cc @@ -12,7 +12,6 @@ */ /* Genode includes */ -#include #include #include #include diff --git a/repos/base/include/base/blocking.h b/repos/base/include/base/blocking.h deleted file mode 100644 index 6c2c6335b2..0000000000 --- a/repos/base/include/base/blocking.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * \brief Support for blocking operations - * \author Norman Feske - * \date 2007-09-06 - */ - -/* - * Copyright (C) 2007-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__BASE__BLOCKING_H_ -#define _INCLUDE__BASE__BLOCKING_H_ - -#include - -namespace Genode { class Blocking_canceled; } - -/** - * Blocking-canceled exception - * - * Two operations may block a thread, waiting at a lock or performing an RPC - * call. Both operations may be canceled when the thread is destructed. In this - * case, the thread unblocks and throws an exception, and therefore, is able to - * clean up the thread state before exiting. - */ -class Genode::Blocking_canceled : public Exception { }; - -#endif /* _INCLUDE__BASE__BLOCKING_H_ */ diff --git a/repos/base/include/base/ipc.h b/repos/base/include/base/ipc.h index 6838d2f703..84920fd36b 100644 --- a/repos/base/include/base/ipc.h +++ b/repos/base/include/base/ipc.h @@ -30,7 +30,6 @@ namespace Genode { * Invoke capability to call an RPC function * * \param rcv_caps number of capabilities expected as result - * \throw Blocking_canceled * * \noapi * diff --git a/repos/base/include/base/lock.h b/repos/base/include/base/lock.h index dedc334669..003ab0dce6 100644 --- a/repos/base/include/base/lock.h +++ b/repos/base/include/base/lock.h @@ -15,7 +15,6 @@ #define _INCLUDE__BASE__LOCK_H_ #include -#include namespace Genode { class Lock; diff --git a/repos/base/src/lib/base/entrypoint.cc b/repos/base/src/lib/base/entrypoint.cc index 827f304009..879a89fb93 100644 --- a/repos/base/src/lib/base/entrypoint.cc +++ b/repos/base/src/lib/base/entrypoint.cc @@ -134,9 +134,7 @@ void Entrypoint::_process_incoming_signals() * as result, which has to be caught. */ try { - retry( - [&] () { _signal_proxy_cap.call(); }, - [] () { warning("blocking canceled during signal processing"); }); + _signal_proxy_cap.call(); } catch (Genode::Ipc_error) { /* ignore - context got destroyed in meantime */ } /* entrypoint destructor requested to stop signal handling */ @@ -345,11 +343,7 @@ Entrypoint::Entrypoint(Env &env) _env.ep().manage(constructor); - try { - invoke_constructor_at_entrypoint(constructor.cap()); - } catch (Blocking_canceled) { - warning("blocking canceled in entrypoint constructor"); - } + invoke_constructor_at_entrypoint(constructor.cap()); _env.ep().dissolve(constructor); diff --git a/repos/base/src/lib/base/rpc_dispatch_loop.cc b/repos/base/src/lib/base/rpc_dispatch_loop.cc index 5fc801983d..50f21b37a2 100644 --- a/repos/base/src/lib/base/rpc_dispatch_loop.cc +++ b/repos/base/src/lib/base/rpc_dispatch_loop.cc @@ -67,9 +67,8 @@ void Rpc_entrypoint::entry() apply(request.badge, [&] (Rpc_object_base *obj) { - if (!obj) { return;} - try { exc = obj->dispatch(opcode, unmarshaller, _snd_buf); } - catch(Blocking_canceled&) { } + if (obj) + exc = obj->dispatch(opcode, unmarshaller, _snd_buf); }); } diff --git a/repos/base/src/lib/base/rpc_entrypoint.cc b/repos/base/src/lib/base/rpc_entrypoint.cc index 8ad8cceedb..57c6ae4758 100644 --- a/repos/base/src/lib/base/rpc_entrypoint.cc +++ b/repos/base/src/lib/base/rpc_entrypoint.cc @@ -14,7 +14,6 @@ /* Genode includes */ #include #include -#include #include /* base-internal includes */ diff --git a/repos/base/src/timer/periodic/time_source.cc b/repos/base/src/timer/periodic/time_source.cc index 46deb0ed45..327fffd774 100644 --- a/repos/base/src/timer/periodic/time_source.cc +++ b/repos/base/src/timer/periodic/time_source.cc @@ -36,8 +36,7 @@ Timer::Time_source::_wait_for_irq() while (_next_timeout_us > 0) { _mutex.release(); - try { _usleep(SLEEP_GRANULARITY_US); } - catch (Blocking_canceled) { } + _usleep(SLEEP_GRANULARITY_US); uint64_t curr_time_us = curr_time().trunc_to_plain_us().value; uint64_t sleep_duration_us = curr_time_us - last_time_us; From 6d25ffc70bb16aa4fe5a2e83e4b271c96115632b Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 21 Feb 2023 16:35:23 +0100 Subject: [PATCH 0325/1921] Remove base/lock_guard.h For Genode API users, the 'Mutex::Guard' is the way to go. Special lock implementations can bring their own 'Guard' utilities. Fixes #4769 --- repos/base-foc/src/core/rpc_cap_factory.cc | 2 +- .../src/include/base/internal/cap_alloc.h | 6 +-- .../src/include/base/internal/cap_map.h | 10 ++++- repos/base-foc/src/lib/base/cap_map.cc | 8 ++-- repos/base-foc/src/lib/base/cap_map_remove.cc | 2 +- repos/base-hw/src/core/kernel/lock.h | 12 +++-- repos/base-okl4/src/core/platform_pd.cc | 3 -- repos/base-pistachio/src/core/platform_pd.cc | 1 - repos/base/include/base/lock.h | 2 - repos/base/include/base/lock_guard.h | 45 ------------------- 10 files changed, 25 insertions(+), 66 deletions(-) delete mode 100644 repos/base/include/base/lock_guard.h diff --git a/repos/base-foc/src/core/rpc_cap_factory.cc b/repos/base-foc/src/core/rpc_cap_factory.cc index 1474fe9407..afcb7b0dab 100644 --- a/repos/base-foc/src/core/rpc_cap_factory.cc +++ b/repos/base-foc/src/core/rpc_cap_factory.cc @@ -221,7 +221,7 @@ void Capability_map::remove(Cap_index *i) { using namespace Foc; - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); if (i) { Core_cap_index* e = static_cast(_tree.first() diff --git a/repos/base-foc/src/include/base/internal/cap_alloc.h b/repos/base-foc/src/include/base/internal/cap_alloc.h index e45ef07224..076daa0134 100644 --- a/repos/base-foc/src/include/base/internal/cap_alloc.h +++ b/repos/base-foc/src/include/base/internal/cap_alloc.h @@ -73,7 +73,7 @@ class Genode::Cap_index_allocator_tpl : public Cap_index_allocator Cap_index* alloc_range(size_t cnt) override { - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); /* * iterate through array and find unused, consecutive entries @@ -96,7 +96,7 @@ class Genode::Cap_index_allocator_tpl : public Cap_index_allocator Cap_index* alloc(addr_t addr) override { - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); /* * construct the Cap_index pointer from the given @@ -114,7 +114,7 @@ class Genode::Cap_index_allocator_tpl : public Cap_index_allocator void free(Cap_index* idx, size_t cnt) override { - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); T *obj = static_cast(idx); for (size_t i = 0; i < cnt; obj++, i++) { diff --git a/repos/base-foc/src/include/base/internal/cap_map.h b/repos/base-foc/src/include/base/internal/cap_map.h index 4653717f14..8c374cec6e 100644 --- a/repos/base-foc/src/include/base/internal/cap_map.h +++ b/repos/base-foc/src/include/base/internal/cap_map.h @@ -30,7 +30,6 @@ /* Genode includes */ #include #include -#include #include #include #include @@ -162,7 +161,14 @@ class Genode::Spin_lock /** * Lock guard */ - typedef Genode::Lock_guard Guard; + struct Guard : Noncopyable + { + Spin_lock &_lock; + + explicit Guard(Spin_lock &lock) : _lock(lock) { _lock.lock(); } + + ~Guard() { _lock.unlock(); } + }; }; diff --git a/repos/base-foc/src/lib/base/cap_map.cc b/repos/base-foc/src/lib/base/cap_map.cc index 9f79ed3534..f97b45766a 100644 --- a/repos/base-foc/src/lib/base/cap_map.cc +++ b/repos/base-foc/src/lib/base/cap_map.cc @@ -106,7 +106,7 @@ uint8_t Cap_index::dec() Cap_index* Capability_map::find(Cap_index::id_t id) { - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); return _tree.first() ? _tree.first()->find_by_id(id) : 0; } @@ -114,7 +114,7 @@ Cap_index* Capability_map::find(Cap_index::id_t id) Cap_index* Capability_map::insert(Cap_index::id_t id) { - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); ASSERT(!_tree.first() || !_tree.first()->find_by_id(id), "Double insertion in cap_map()!"); @@ -130,7 +130,7 @@ Cap_index* Capability_map::insert(Cap_index::id_t id) Cap_index* Capability_map::insert(Cap_index::id_t id, addr_t kcap) { - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); /* remove potentially existent entry */ Cap_index *i = _tree.first() ? _tree.first()->find_by_id(id) : 0; @@ -150,7 +150,7 @@ Cap_index* Capability_map::insert_map(Cap_index::id_t id, addr_t kcap) { using namespace Foc; - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); /* check whether capability id exists */ Cap_index *i = _tree.first() ? _tree.first()->find_by_id(id) : 0; diff --git a/repos/base-foc/src/lib/base/cap_map_remove.cc b/repos/base-foc/src/lib/base/cap_map_remove.cc index 6f404913f8..b7dc20ba8e 100644 --- a/repos/base-foc/src/lib/base/cap_map_remove.cc +++ b/repos/base-foc/src/lib/base/cap_map_remove.cc @@ -20,7 +20,7 @@ using namespace Genode; void Capability_map::remove(Genode::Cap_index* i) { - Lock_guard guard(_lock); + Spin_lock::Guard guard(_lock); if (i) { Cap_index *e = _tree.first() ? _tree.first()->find_by_id(i->id()) : 0; diff --git a/repos/base-hw/src/core/kernel/lock.h b/repos/base-hw/src/core/kernel/lock.h index 1befd37bac..60b542166b 100644 --- a/repos/base-hw/src/core/kernel/lock.h +++ b/repos/base-hw/src/core/kernel/lock.h @@ -15,9 +15,6 @@ #ifndef _CORE__SPEC__SMP__KERNEL__LOCK_H_ #define _CORE__SPEC__SMP__KERNEL__LOCK_H_ -/* Genode includes */ -#include - namespace Kernel { class Lock; } @@ -37,7 +34,14 @@ class Kernel::Lock void lock(); void unlock(); - using Guard = Genode::Lock_guard; + struct Guard + { + Lock &_lock; + + explicit Guard(Lock &lock) : _lock(lock) { _lock.lock(); } + + ~Guard() { _lock.unlock(); } + }; }; #endif /* _CORE__SPEC__SMP__KERNEL__LOCK_H_ */ diff --git a/repos/base-okl4/src/core/platform_pd.cc b/repos/base-okl4/src/core/platform_pd.cc index e7b6af7260..29928f31c4 100644 --- a/repos/base-okl4/src/core/platform_pd.cc +++ b/repos/base-okl4/src/core/platform_pd.cc @@ -11,9 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include diff --git a/repos/base-pistachio/src/core/platform_pd.cc b/repos/base-pistachio/src/core/platform_pd.cc index 21e91ea481..1305083880 100644 --- a/repos/base-pistachio/src/core/platform_pd.cc +++ b/repos/base-pistachio/src/core/platform_pd.cc @@ -13,7 +13,6 @@ */ /* Genode includes */ -#include #include #include diff --git a/repos/base/include/base/lock.h b/repos/base/include/base/lock.h index 003ab0dce6..10b1ff8688 100644 --- a/repos/base/include/base/lock.h +++ b/repos/base/include/base/lock.h @@ -14,8 +14,6 @@ #ifndef _INCLUDE__BASE__LOCK_H_ #define _INCLUDE__BASE__LOCK_H_ -#include - namespace Genode { class Lock; class Thread; diff --git a/repos/base/include/base/lock_guard.h b/repos/base/include/base/lock_guard.h deleted file mode 100644 index 364b0e1117..0000000000 --- a/repos/base/include/base/lock_guard.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * \brief Lock guard - * \author Norman Feske - * \date 2006-07-26 - */ - -/* - * Copyright (C) 2006-2017 Genode Labs GmbH - * - * This file is part of the Genode OS framework, which is distributed - * under the terms of the GNU Affero General Public License version 3. - */ - -#ifndef _INCLUDE__BASE__LOCK_GUARD_H_ -#define _INCLUDE__BASE__LOCK_GUARD_H_ - -namespace Genode { template class Lock_guard; } - - -/** - * Lock guard template - * - * \param LT lock type - * - * A lock guard is instantiated as a local variable. When a lock guard is - * constructed, it acquires the lock that is specified as constructor argument. - * When the control flow leaves the scope of the lock-guard variable via a - * return statement or an exception, the lock guard's destructor gets called, - * freeing the lock. - */ -template -class Genode::Lock_guard -{ - private: - - LT &_lock; - - public: - - explicit Lock_guard(LT &lock) : _lock(lock) { _lock.lock(); } - - ~Lock_guard() { _lock.unlock(); } -}; - -#endif /* _INCLUDE__BASE__LOCK_GUARD_H_ */ From 78b85339b0c2cf69f11f8d0279ba24ad552de477 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 21 Feb 2023 17:33:47 +0100 Subject: [PATCH 0326/1921] vfs: buffer XML in file system The use of 'Buffered_xml' removes the risk of the XML node's underlying data to change during a component-config update. Related to #4285 --- repos/os/src/lib/vfs/inline_file_system.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/repos/os/src/lib/vfs/inline_file_system.h b/repos/os/src/lib/vfs/inline_file_system.h index 5064d809e8..4fecd92e69 100644 --- a/repos/os/src/lib/vfs/inline_file_system.h +++ b/repos/os/src/lib/vfs/inline_file_system.h @@ -17,6 +17,7 @@ #ifndef _INCLUDE__VFS__INLINE_FILE_SYSTEM_H_ #define _INCLUDE__VFS__INLINE_FILE_SYSTEM_H_ +#include #include namespace Vfs { class Inline_file_system; } @@ -26,7 +27,7 @@ class Vfs::Inline_file_system : public Single_file_system { private: - Xml_node _node; + Genode::Buffered_xml const _node; class Handle : public Single_vfs_handle { @@ -66,11 +67,11 @@ class Vfs::Inline_file_system : public Single_file_system * the object after construction time. The underlying backing store * must be kept in tact during the lifefile of the object. */ - Inline_file_system(Vfs::Env&, Genode::Xml_node config) + Inline_file_system(Vfs::Env &env, Genode::Xml_node config) : Single_file_system(Node_type::CONTINUOUS_FILE, name(), Node_rwx::rx(), config), - _node(config) + _node(env.alloc(), config) { } static char const *name() { return "inline"; } @@ -100,7 +101,7 @@ class Vfs::Inline_file_system : public Single_file_system { Stat_result const result = Single_file_system::stat(path, out); - _node.with_raw_content([&] (char const *, size_t size) { + _node.xml().with_raw_content([&] (char const *, size_t size) { out.size = size; }); return result; @@ -111,7 +112,7 @@ class Vfs::Inline_file_system : public Single_file_system Vfs::File_io_service::Read_result Vfs::Inline_file_system::Handle::read(Byte_range_ptr const &dst, size_t &out_count) { - _fs._node.with_raw_content([&] (char const *start, size_t const len) { + _fs._node.xml().with_raw_content([&] (char const *start, size_t const len) { /* file read limit is the size of the XML-node content */ size_t const max_size = len; From b04452034404c8be0144cb1f12eef8871f40d72e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 22 Feb 2023 10:06:26 +0100 Subject: [PATCH 0327/1921] Add missing includes of base/exception.h This header used to be included implicitly by base/blocking.h, which does no longer exist. Issue #4768 --- repos/base/include/base/id_space.h | 1 + repos/base/include/base/quota_guard.h | 1 + repos/base/include/base/signal.h | 1 + repos/base/include/base/weak_ptr.h | 1 + repos/base/include/util/list_model.h | 1 + repos/ports/src/virtualbox6/sup_vm.h | 3 +++ 6 files changed, 8 insertions(+) diff --git a/repos/base/include/base/id_space.h b/repos/base/include/base/id_space.h index 95b69c0ab9..73e87bccba 100644 --- a/repos/base/include/base/id_space.h +++ b/repos/base/include/base/id_space.h @@ -18,6 +18,7 @@ #include #include #include +#include #include namespace Genode { template class Id_space; } diff --git a/repos/base/include/base/quota_guard.h b/repos/base/include/base/quota_guard.h index f12105e631..e9c7022926 100644 --- a/repos/base/include/base/quota_guard.h +++ b/repos/base/include/base/quota_guard.h @@ -16,6 +16,7 @@ #include #include +#include namespace Genode { diff --git a/repos/base/include/base/signal.h b/repos/base/include/base/signal.h index 73efca52f9..4ee1e0085c 100644 --- a/repos/base/include/base/signal.h +++ b/repos/base/include/base/signal.h @@ -21,6 +21,7 @@ #include #include #include +#include /* only needed for base-hw */ namespace Kernel { struct Signal_receiver; } diff --git a/repos/base/include/base/weak_ptr.h b/repos/base/include/base/weak_ptr.h index 297a1674f4..ee48b6db83 100644 --- a/repos/base/include/base/weak_ptr.h +++ b/repos/base/include/base/weak_ptr.h @@ -17,6 +17,7 @@ #include #include #include +#include #include namespace Genode { diff --git a/repos/base/include/util/list_model.h b/repos/base/include/util/list_model.h index 5334f60228..b17a9fb5a4 100644 --- a/repos/base/include/util/list_model.h +++ b/repos/base/include/util/list_model.h @@ -23,6 +23,7 @@ #include #include #include +#include namespace Genode { diff --git a/repos/ports/src/virtualbox6/sup_vm.h b/repos/ports/src/virtualbox6/sup_vm.h index d12d6425e7..bafcde4bb3 100644 --- a/repos/ports/src/virtualbox6/sup_vm.h +++ b/repos/ports/src/virtualbox6/sup_vm.h @@ -15,6 +15,9 @@ #ifndef _SUP_VM_H_ #define _SUP_VM_H_ +/* Genode includes */ +#include + /* VirtualBox includes */ #include #include From ac69189e23191499fa3f40cd8dedb5dc598736a9 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 22 Feb 2023 09:55:19 +0100 Subject: [PATCH 0328/1921] nova: support to re-enable IOMMU after ACPI resume Issue #4669 --- repos/base-nova/ports/nova.hash | 2 +- repos/base-nova/ports/nova.port | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index 6e3b49b5f0..82a925166e 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -c7c2e9cf8d1bcd15608da93d5aa152d32aef1a33 +64f3a4dec87959333e6e6baf83dac5e7606464fb diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index c7b80e4042..ee8ddc1f9f 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r10 branch URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := 0cb9c8abfe9cb9d0992c8dbe048f55610fb54539 +REV(nova) := 44e0d2de3e9351481c20f07c66c5eca5f870e345 DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) From adc594a7e6ac097249b8133f25b949fb14c23700 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 20 Feb 2023 15:58:24 +0100 Subject: [PATCH 0329/1921] os: remove conversion warnings/errors from virtio The read_config and write_config functions in the generic virtio headers used by all drivers lead to compiler warnings resp. errors if effective-c++ switch is enabled. Moreover, the functions require to define the access width as parameter. We can better turn them into template functions using the value type to read resp. write to derive the access width. Ref genodelabs/genode#4344 --- repos/os/include/virtio/mmio_device.h | 27 ++++++------- repos/os/include/virtio/pci_device.h | 39 +++++++------------ repos/os/include/virtio/queue.h | 2 +- .../drivers/framebuffer/virtio/component.h | 9 ++--- repos/os/src/drivers/input/virtio/component.h | 24 ++++++------ repos/os/src/drivers/nic/virtio/component.h | 11 +++--- .../src/drivers/nic/virtio/spec/x86/target.mk | 2 - .../os/src/drivers/nic/virtio/target_mmio.inc | 2 - 8 files changed, 45 insertions(+), 71 deletions(-) diff --git a/repos/os/include/virtio/mmio_device.h b/repos/os/include/virtio/mmio_device.h index 0a630fe47d..25c1ce78cf 100644 --- a/repos/os/include/virtio/mmio_device.h +++ b/repos/os/include/virtio/mmio_device.h @@ -86,9 +86,9 @@ class Virtio::Device : Platform::Device::Mmio * VIRTIO 1.0 spec 64 bit wide registers are supposed to be read as * two 32 bit values. */ - struct Config_8 : Register_array<0x100, 8, 256, 8> { }; - struct Config_16 : Register_array<0x100, 16, 128, 16> { }; - struct Config_32 : Register_array<0x100, 32, 64, 32> { }; + template class Config : + public Register_array<0x100, sizeof(T)*8, + 256/sizeof(T), sizeof(T)*8> {}; /* * Noncopyable @@ -141,23 +141,18 @@ class Virtio::Device : Platform::Device::Mmio return (uint16_t)read(); } - uint32_t read_config(uint8_t offset, Access_size size) + template + T read_config(const uint8_t offset) { - switch (size) { - case ACCESS_8BIT: return read(offset); - case ACCESS_16BIT: return read(offset >> 1); - case ACCESS_32BIT: return read(offset >> 2); - } - return 0; + static_assert(sizeof(T) <= 4); + return read>(offset >> log2(sizeof(T))); } - void write_config(uint8_t offset, Access_size size, uint32_t value) + template + void write_config(const uint8_t offset, const T value) { - switch (size) { - case ACCESS_8BIT: write ((uint8_t) value, offset); break; - case ACCESS_16BIT: write((uint16_t)value, (offset >> 1)); break; - case ACCESS_32BIT: write(value, (offset >> 2)); break; - } + static_assert(sizeof(T) <= 4); + write>(value, (offset >> log2(sizeof(T)))); } bool configure_queue(uint16_t queue_index, diff --git a/repos/os/include/virtio/pci_device.h b/repos/os/include/virtio/pci_device.h index 088e494ace..bfa54e2273 100644 --- a/repos/os/include/virtio/pci_device.h +++ b/repos/os/include/virtio/pci_device.h @@ -45,11 +45,11 @@ struct Virtio::Device_mmio : public Genode::Mmio struct QueueUsedLow : Register<0x30, 32> { }; struct QueueUsedHigh : Register<0x34, 32> { }; - struct Config_8 : Register_array<0x0, 8, 256, 8> { }; - struct Config_16 : Register_array<0x0, 16, 128, 16> { }; - struct Config_32 : Register_array<0x0, 32, 64, 32> { }; + template class Config : + public Register_array<0x0, sizeof(T)*8, + 256/sizeof(T), sizeof(T)*8> {}; - struct IrqReason : Register<0x0, 32> { }; + struct IrqReason : Register<0x0, 32> { }; using Mmio::Mmio; }; @@ -184,32 +184,19 @@ class Virtio::Device return _cfg_common.read(); } - uint32_t read_config(uint8_t offset, Access_size size) + template + T read_config(const uint8_t offset) { - switch (size) { - case Device::ACCESS_8BIT: - return _dev_config.read(offset); - case Device::ACCESS_16BIT: - return _dev_config.read(offset >> 1); - case Device::ACCESS_32BIT: - return _dev_config.read(offset >> 2); - } - return 0; + static_assert(sizeof(T) <= 4); + return _dev_config.read>(offset >> log2(sizeof(T))); } - void write_config(uint8_t offset, Access_size size, uint32_t value) + template + void write_config(const uint8_t offset, const T value) { - switch (size) { - case Device::ACCESS_8BIT: - _dev_config.write(value, offset); - break; - case Device::ACCESS_16BIT: - _dev_config.write(value, offset >> 1); - break; - case Device::ACCESS_32BIT: - _dev_config.write(value, offset >> 2); - break; - } + static_assert(sizeof(T) <= 4); + _dev_config.write>(value, + (offset >> log2(sizeof(T)))); } bool configure_queue(uint16_t queue_index, Virtio::Queue_description desc) diff --git a/repos/os/include/virtio/queue.h b/repos/os/include/virtio/queue.h index 529dee2ddf..d7253e205e 100644 --- a/repos/os/include/virtio/queue.h +++ b/repos/os/include/virtio/queue.h @@ -413,7 +413,7 @@ class Virtio::Queue static_assert(!TRAITS::device_write_only); static_assert(TRAITS::has_data_payload); - int const req_desc_count = 1 + (sizeof(header) + data_size) / _buffers.buffer_size(); + size_t const req_desc_count = 1UL + (sizeof(header) + data_size) / _buffers.buffer_size(); if (req_desc_count > _descriptors.available_capacity()) return false; diff --git a/repos/os/src/drivers/framebuffer/virtio/component.h b/repos/os/src/drivers/framebuffer/virtio/component.h index 93194bf005..ddf88ee843 100644 --- a/repos/os/src/drivers/framebuffer/virtio/component.h +++ b/repos/os/src/drivers/framebuffer/virtio/component.h @@ -226,8 +226,7 @@ class Virtio_fb::Driver uint32_t num_scanouts; uint32_t before = 0, after = 0; do { - num_scanouts = device.read_config( - Config::NUM_SCANOUTS, Virtio::Device::ACCESS_32BIT); + num_scanouts = device.read_config(Config::NUM_SCANOUTS); } while (after != before); return num_scanouts; } @@ -237,12 +236,10 @@ class Virtio_fb::Driver uint32_t events; uint32_t before = 0, after = 0; do { - events = _device.read_config( - Config::EVENTS_READ, Virtio::Device::ACCESS_32BIT); + events = _device.read_config(Config::EVENTS_READ); } while (after != before); do { - _device.write_config( - Config::EVENTS_CLEAR, Virtio::Device::ACCESS_32BIT, events); + _device.write_config(Config::EVENTS_CLEAR, events); } while (after != before); return events; } diff --git a/repos/os/src/drivers/input/virtio/component.h b/repos/os/src/drivers/input/virtio/component.h index d799733d29..9c90fd4f00 100644 --- a/repos/os/src/drivers/input/virtio/component.h +++ b/repos/os/src/drivers/input/virtio/component.h @@ -252,9 +252,9 @@ class Virtio_input::Driver static size_t _cfg_select(Virtio::Device &device, Config_id sel, uint8_t subsel) { - device.write_config(Config::SelectID, Virtio::Device::ACCESS_8BIT, sel); - device.write_config(Config::SelectSubID, Virtio::Device::ACCESS_8BIT, subsel); - return device.read_config(Config::Data_size, Virtio::Device::ACCESS_8BIT); + device.write_config(Config::SelectID, sel); + device.write_config(Config::SelectSubID, subsel); + return device.read_config(Config::Data_size); } @@ -265,14 +265,14 @@ class Virtio_input::Driver auto size = _cfg_select(device, Config_id::Abs_info, Event::Code::Abs_x); if (size >= sizeof(cfg.x)) { - cfg.x.min = device.read_config(Config::Data, Virtio::Device::ACCESS_32BIT); - cfg.x.max = device.read_config(Config::Data + 4, Virtio::Device::ACCESS_32BIT); + cfg.x.min = device.read_config(Config::Data); + cfg.x.max = device.read_config(Config::Data + 4); } size = _cfg_select(device, Config_id::Abs_info, Event::Code::Abs_y); if (size >= sizeof(cfg.y)) { - cfg.y.min = device.read_config(Config::Data, Virtio::Device::ACCESS_32BIT); - cfg.y.max = device.read_config(Config::Data + 4, Virtio::Device::ACCESS_32BIT); + cfg.y.min = device.read_config(Config::Data); + cfg.y.max = device.read_config(Config::Data + 4); } cfg.width = config.attribute_value("width", cfg.x.max); @@ -292,10 +292,10 @@ class Virtio_input::Driver throw Device_init_failed(); } - device_id.bus_type = (uint16_t)device.read_config(Config::Data + 0, Virtio::Device::ACCESS_16BIT); - device_id.vendor = (uint16_t)device.read_config(Config::Data + 2, Virtio::Device::ACCESS_16BIT); - device_id.product = (uint16_t)device.read_config(Config::Data + 4, Virtio::Device::ACCESS_16BIT); - device_id.version = (uint16_t)device.read_config(Config::Data + 6, Virtio::Device::ACCESS_16BIT); + device_id.bus_type = device.read_config(Config::Data + 0); + device_id.vendor = device.read_config(Config::Data + 2); + device_id.product = device.read_config(Config::Data + 4); + device_id.version = device.read_config(Config::Data + 6); return device_id; } @@ -311,7 +311,7 @@ class Virtio_input::Driver memset(buf, 0, sizeof(buf)); for (unsigned i = 0; i < size; ++i) - buf[i] = (uint8_t)device.read_config((uint8_t)(Config::Data + i), Virtio::Device::ACCESS_8BIT); + buf[i] = device.read_config((uint8_t)(Config::Data + i)); return String(buf); } diff --git a/repos/os/src/drivers/nic/virtio/component.h b/repos/os/src/drivers/nic/virtio/component.h index 003ae5dc54..d0c96a8364 100644 --- a/repos/os/src/drivers/nic/virtio/component.h +++ b/repos/os/src/drivers/nic/virtio/component.h @@ -112,7 +112,7 @@ class Virtio_nic::Device : Noncopyable /** * See section 5.1.4 of VirtIO 1.0 specification. */ - enum { CONFIG_MAC_BASE = 0, CONFIG_STATUS = 6 }; + enum Config : uint8_t { CONFIG_MAC_BASE = 0, CONFIG_STATUS = 6 }; enum { STATUS_LINK_UP = 1 << 0 }; /** @@ -181,10 +181,9 @@ class Virtio_nic::Device : Noncopyable uint32_t before = 0, after = 0; do { before = device.get_config_generation(); - for (size_t idx = 0; idx < sizeof(mac.addr); ++idx) { - mac.addr[idx] = device.read_config( - CONFIG_MAC_BASE + idx, Virtio::Device::ACCESS_8BIT); - } + for (uint8_t idx = 0; idx < sizeof(mac.addr); ++idx) + mac.addr[idx] = + device.read_config(CONFIG_MAC_BASE + idx); after = device.get_config_generation(); } while (after != before); @@ -398,7 +397,7 @@ class Virtio_nic::Device : Noncopyable uint8_t status = 0; do { before = _device.get_config_generation(); - status = _device.read_config(CONFIG_STATUS, Virtio::Device::ACCESS_8BIT); + status = _device.read_config(CONFIG_STATUS); after = _device.get_config_generation(); } while (after != before); diff --git a/repos/os/src/drivers/nic/virtio/spec/x86/target.mk b/repos/os/src/drivers/nic/virtio/spec/x86/target.mk index 65e45566ac..da2d995713 100644 --- a/repos/os/src/drivers/nic/virtio/spec/x86/target.mk +++ b/repos/os/src/drivers/nic/virtio/spec/x86/target.mk @@ -6,5 +6,3 @@ INC_DIR = $(REP_DIR)/src/drivers/nic/virtio CONFIG_XSD = ../../config.xsd vpath % $(REP_DIR)/src/drivers/nic/virtio - -CC_CXX_WARN_STRICT_CONVERSION = diff --git a/repos/os/src/drivers/nic/virtio/target_mmio.inc b/repos/os/src/drivers/nic/virtio/target_mmio.inc index 29d9e53f6c..5731bfc7b4 100644 --- a/repos/os/src/drivers/nic/virtio/target_mmio.inc +++ b/repos/os/src/drivers/nic/virtio/target_mmio.inc @@ -5,5 +5,3 @@ INC_DIR = $(REP_DIR)/src/drivers/nic/virtio CONFIG_XSD = ../../config.xsd vpath % $(REP_DIR)/src/drivers/nic/virtio - -CC_CXX_WARN_STRICT_CONVERSION = From c5b9cabd89dde4680e994c7e7551678671bcf753 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 23 Feb 2023 11:21:33 +0100 Subject: [PATCH 0330/1921] vmm: enable effective C++ error switch Several explicit casts could not be avoided yet, due to the missing differentiation in between virtual and physical addresses that leads to casting problems when using 32-bit ARM, and because the MMIO register framework does not allow to return narrowed types of bitfields. Apart from that, this commit fixes a switch-case fallthrough error in Mmio_register::write. Fix genodelabs/genode#4770 --- repos/os/src/server/vmm/address_space.cc | 4 +- repos/os/src/server/vmm/address_space.h | 65 ++-- repos/os/src/server/vmm/config.h | 43 ++- repos/os/src/server/vmm/cpu_base.cc | 2 +- repos/os/src/server/vmm/cpu_base.h | 37 +- repos/os/src/server/vmm/fdt.cc | 44 ++- repos/os/src/server/vmm/gic.cc | 64 ++-- repos/os/src/server/vmm/gic.h | 424 ++++++++++++--------- repos/os/src/server/vmm/mmio.cc | 46 ++- repos/os/src/server/vmm/mmio.h | 52 ++- repos/os/src/server/vmm/pl011.cc | 17 +- repos/os/src/server/vmm/pl011.h | 89 +++-- repos/os/src/server/vmm/spec/arm_v7/cpu.cc | 39 +- repos/os/src/server/vmm/spec/arm_v7/cpu.h | 2 +- repos/os/src/server/vmm/spec/arm_v8/cpu.cc | 55 +-- repos/os/src/server/vmm/spec/arm_v8/cpu.h | 6 +- repos/os/src/server/vmm/target.inc | 2 - repos/os/src/server/vmm/virtio_block.h | 41 +- repos/os/src/server/vmm/virtio_console.h | 25 +- repos/os/src/server/vmm/virtio_device.h | 70 ++-- repos/os/src/server/vmm/virtio_gpu.cc | 10 +- repos/os/src/server/vmm/virtio_gpu.h | 27 +- repos/os/src/server/vmm/virtio_input.h | 42 +- repos/os/src/server/vmm/virtio_net.h | 27 +- repos/os/src/server/vmm/vm.cc | 22 +- repos/os/src/server/vmm/vm.h | 6 +- 26 files changed, 701 insertions(+), 560 deletions(-) diff --git a/repos/os/src/server/vmm/address_space.cc b/repos/os/src/server/vmm/address_space.cc index 2c866b03df..4034759ba3 100644 --- a/repos/os/src/server/vmm/address_space.cc +++ b/repos/os/src/server/vmm/address_space.cc @@ -17,7 +17,7 @@ using Vmm::Address_range; Address_range::Address_range(Genode::uint64_t start, Genode::uint64_t size) -: start(start), size(size) { } +: _start(start), _size(size) { } Address_range & Address_range::find(Address_range & bus_addr) @@ -26,7 +26,7 @@ Address_range & Address_range::find(Address_range & bus_addr) return *this; Address_range * ar = - Avl_node::child(bus_addr.start > start); + Avl_node::child(bus_addr._start > _start); if (!ar) throw Not_found(bus_addr); return ar->find(bus_addr); } diff --git a/repos/os/src/server/vmm/address_space.h b/repos/os/src/server/vmm/address_space.h index 4be408d893..5a9c33c7a6 100644 --- a/repos/os/src/server/vmm/address_space.h +++ b/repos/os/src/server/vmm/address_space.h @@ -18,44 +18,57 @@ #include namespace Vmm { + using namespace Genode; + struct Address_range; - class Address_space; + class Address_space; } -struct Vmm::Address_range : Genode::Avl_node +class Vmm::Address_range : private Genode::Avl_node { - Genode::uint64_t const start; - Genode::uint64_t const size; + private: - Address_range(Genode::uint64_t start, - Genode::uint64_t size); + uint64_t const _start; + uint64_t const _size; - Genode::uint64_t end() const { return start + size; } + friend class Avl_node; + friend class Avl_tree; + friend class Address_space; - bool match(Address_range & other) const { - return other.start >= start && other.end() <= end(); } + public: - Address_range & find(Address_range & bus_addr); + Address_range(uint64_t start, + uint64_t size); + virtual ~Address_range() {} - struct Not_found : Exception - { - Not_found(Address_range & access) - : Exception("Could not find ", access) {} - }; + uint64_t start() const { return _start; } + uint64_t size() const { return _size; } + uint64_t end() const { return _start + _size; } - void print(Genode::Output & out) const - { - Genode::print(out, "address=", Genode::Hex(start), - " width=", Genode::Hex(size)); - } + bool match(Address_range & other) const { + return other._start >= _start && other.end() <= end(); } - /************************ - ** Avl_node interface ** - ************************/ + Address_range & find(Address_range & bus_addr); - bool higher(Address_range * range) { - return range->start > start; } + struct Not_found : Exception + { + Not_found(Address_range & access) + : Exception("Could not find ", access) {} + }; + + void print(Genode::Output & out) const + { + Genode::print(out, "address=", Hex(_start), + " width=", Hex(_size)); + } + + /************************ + ** Avl_node interface ** + ************************/ + + bool higher(Address_range * range) { + return range->_start > _start; } }; @@ -63,7 +76,7 @@ class Vmm::Address_space { private: - Genode::Avl_tree _tree; + Avl_tree _tree {}; public: diff --git a/repos/os/src/server/vmm/config.h b/repos/os/src/server/vmm/config.h index 5cea0b9b90..ac1ef8c670 100644 --- a/repos/os/src/server/vmm/config.h +++ b/repos/os/src/server/vmm/config.h @@ -36,22 +36,32 @@ class Vmm::Config using Name = String<128>; using Arguments = String<512>; - struct Virtio_device : List_model::Element + class Virtio_device : public List_model::Element { - enum Type { INVALID, CONSOLE, NET, BLOCK, GPU, INPUT }; + private: - enum { MMIO_SIZE = 0x200 }; + Config & _config; - Config & _config; + /** + * Noncopyable + */ + Virtio_device(Virtio_device const &); + Virtio_device &operator = (Virtio_device const &); - Virtio_device(Name & name, Type type, Config & config); - ~Virtio_device(); + public: - Name const name; - Type const type; - void * const mmio_start; - size_t const mmio_size; - unsigned const irq; + enum Type { INVALID, CONSOLE, NET, BLOCK, GPU, INPUT }; + + enum { MMIO_SIZE = 0x200 }; + + Virtio_device(Name & name, Type type, Config & config); + ~Virtio_device(); + + Name const name; + Type const type; + void * const mmio_start; + size_t const mmio_size; + unsigned const irq; }; private: @@ -60,8 +70,13 @@ class Vmm::Config { Bit_allocator _alloc {}; - unsigned alloc() { - return VIRTIO_IRQ_START + _alloc.alloc(); } + unsigned alloc() + { + /* we assume that the max number of IRQs does fit unsigned */ + static_assert(VIRTIO_IRQ_COUNT < ~0U); + return VIRTIO_IRQ_START + (unsigned)_alloc.alloc(); + } + void free(unsigned irq) { _alloc.free(VIRTIO_IRQ_START+irq); } }; @@ -77,7 +92,7 @@ class Vmm::Config unsigned _gic_version { 0 }; Arguments _bootargs { }; - List_model _model; + List_model _model {}; struct Virtio_device_update_policy : List_model::Update_policy diff --git a/repos/os/src/server/vmm/cpu_base.cc b/repos/os/src/server/vmm/cpu_base.cc index 8b51d608b7..c1dd528d51 100644 --- a/repos/os/src/server/vmm/cpu_base.cc +++ b/repos/os/src/server/vmm/cpu_base.cc @@ -190,7 +190,7 @@ Cpu_base::Cpu_base(Vm & vm, Genode::Env & env, Genode::Heap & heap, Genode::Entrypoint & ep, - short const id) + unsigned id) : _vcpu_id(id), _vm(vm), _vm_session(vm_session), diff --git a/repos/os/src/server/vmm/cpu_base.h b/repos/os/src/server/vmm/cpu_base.h index 6cadc181c7..49656f80a9 100644 --- a/repos/os/src/server/vmm/cpu_base.h +++ b/repos/os/src/server/vmm/cpu_base.h @@ -35,11 +35,11 @@ class Vmm::Cpu_base struct State : Genode::Vm_state { - Genode::uint64_t reg(unsigned idx) const; - void reg(unsigned idx, Genode::uint64_t v); + addr_t reg(addr_t idx) const; + void reg(addr_t idx, addr_t v); }; - struct Esr : Genode::Register<32> + struct Esr : Genode::Register { struct Ec : Bitfield<26, 6> { @@ -62,7 +62,7 @@ class Vmm::Cpu_base Genode::Env & env, Genode::Heap & heap, Genode::Entrypoint & ep, - short const cpu_id); + unsigned cpu_id); unsigned cpu_id() const; void run(); @@ -118,14 +118,23 @@ class Vmm::Cpu_base protected: - class System_register : public Genode::Avl_node + class System_register : protected Genode::Avl_node { private: - const Esr::access_t _encoding; - const char *_name; - const bool _writeable; - Genode::uint64_t _value; + const Esr::access_t _encoding; + const char * _name; + const bool _writeable; + uint64_t _value; + + friend class Avl_node; + friend class Avl_tree; + + /* + * Noncopyable + */ + System_register(System_register const &); + System_register &operator = (System_register const &); public: @@ -169,8 +178,10 @@ class Vmm::Cpu_base : System_register(0, crn, op1, crm, op2, name, writeable, v, tree) {} - const char * name() const { return _name; } - const bool writeable() const { return _writeable; } + virtual ~System_register() {} + + const char * name() const { return _name; } + bool writeable() const { return _writeable; } System_register * find_by_encoding(Iss::access_t e) { @@ -196,7 +207,7 @@ class Vmm::Cpu_base return (r->_encoding > _encoding); } }; - short _vcpu_id; + unsigned _vcpu_id; bool _active { true }; Vm & _vm; Genode::Vm_connection & _vm_session; @@ -205,7 +216,7 @@ class Vmm::Cpu_base Genode::Vm_connection::Exit_config _exit_config { }; Genode::Vm_connection::Vcpu _vm_vcpu; State & _state; - Genode::Avl_tree _reg_tree; + Genode::Avl_tree _reg_tree {}; /*********************** diff --git a/repos/os/src/server/vmm/fdt.cc b/repos/os/src/server/vmm/fdt.cc index eb2f916e2e..b95009386f 100644 --- a/repos/os/src/server/vmm/fdt.cc +++ b/repos/os/src/server/vmm/fdt.cc @@ -275,12 +275,12 @@ void Vmm::Fdt_generator::_generate_tree(uint32_t & off, Config const & config, node(Name("timer"), [&] () { property(Name("compatible"), - ::Array("arm,armv8-timer", "arm,armv7-timer")); + ::Array("arm,armv8-timer", "arm,armv7-timer")); property(Name("interrupts"), - ::Array(GIC_PPI, 0xd, IRQ_TYPE_LEVEL_HIGH, - GIC_PPI, 0xe, IRQ_TYPE_LEVEL_HIGH, - GIC_PPI, 0xb, IRQ_TYPE_LEVEL_HIGH, - GIC_PPI, 0xa, IRQ_TYPE_LEVEL_HIGH)); + ::Array(GIC_PPI, 0xd, IRQ_TYPE_LEVEL_HIGH, + GIC_PPI, 0xe, IRQ_TYPE_LEVEL_HIGH, + GIC_PPI, 0xb, IRQ_TYPE_LEVEL_HIGH, + GIC_PPI, 0xa, IRQ_TYPE_LEVEL_HIGH)); }); node(Name("gic"), [&] () @@ -289,16 +289,16 @@ void Vmm::Fdt_generator::_generate_tree(uint32_t & off, Config const & config, property(Name("phandle"), Value(GIC)); property(Name("compatible"), (gicv2) ? Name("arm,gic-400") : Name("arm,gic-v3")); - property(Name("ranges"), ::Array()); - property(Name("interrupt-controller"), ::Array()); + property(Name("ranges"), ::Array()); + property(Name("interrupt-controller"), ::Array()); property(Name("#address-cells"), Value(2)); property(Name("#redistributor-regions"), Value(1)); property(Name("#interrupt-cells"), Value(3)); property(Name("#size-cells"), Value(2)); property(Name("reg"), - ::Array(0, GICD_MMIO_START, 0, GICD_MMIO_SIZE, - 0, (gicv2) ? GICC_MMIO_START : GICR_MMIO_START, - 0, (gicv2) ? GICC_MMIO_SIZE : GICR_MMIO_SIZE)); + ::Array(0, GICD_MMIO_START, 0, GICD_MMIO_SIZE, + 0, (gicv2) ? GICC_MMIO_START : GICR_MMIO_START, + 0, (gicv2) ? GICC_MMIO_SIZE : GICR_MMIO_SIZE)); }); node(Name("clocks"), [&] () @@ -320,19 +320,20 @@ void Vmm::Fdt_generator::_generate_tree(uint32_t & off, Config const & config, node(Name("pl011"), [&] () { property(Name("compatible"), - ::Array("arm,pl011", "arm,primecell")); + ::Array("arm,pl011", "arm,primecell")); property(Name("interrupts"), ::Array(GIC_SPI, PL011_IRQ-32, IRQ_TYPE_LEVEL_HIGH)); - property(Name("reg"), ::Array(0, PL011_MMIO_START, - 0, PL011_MMIO_SIZE)); + property(Name("reg"), ::Array(0, PL011_MMIO_START, + 0, PL011_MMIO_SIZE)); property(Name("clock-names"), - ::Array("uartclk", "apb_pclk")); - property(Name("clocks"), ::Array(CLK, CLK)); + ::Array("uartclk", "apb_pclk")); + property(Name("clocks"), ::Array(CLK, CLK)); }); node(Name("memory"), [&] () { - property(Name("reg"), ::Array(0, RAM_START, 0, config.ram_size())); + property(Name("reg"), ::Array(0, RAM_START, 0, + (uint32_t)config.ram_size())); property(Name("device_type"), Name("memory")); }); @@ -347,19 +348,20 @@ void Vmm::Fdt_generator::_generate_tree(uint32_t & off, Config const & config, /* we're sure that the initrd start address is wide below 4GB */ uint32_t start = (uint32_t)((addr_t)initrd_start & 0xffffffff); property(Name("linux,initrd-start"), Value(start)); - property(Name("linux,initrd-end"), Value(start+initrd_size)); + property(Name("linux,initrd-end"), Value(start+(uint32_t)initrd_size)); }); config.for_each_virtio_device([&] (Config::Virtio_device const & dev) { node(Name("virtio@", dev.mmio_start), [&] () { property(Name("interrupts"), - ::Array(GIC_SPI, dev.irq-32, IRQ_TYPE_EDGE_RISING)); + ::Array(GIC_SPI, dev.irq-32U, + IRQ_TYPE_EDGE_RISING)); property(Name("compatible"), Name("virtio,mmio")); - property(Name("dma-coherent"), ::Array()); + property(Name("dma-coherent"), ::Array()); property(Name("reg"), - ::Array(0, (uint32_t)((addr_t)dev.mmio_start & 0xffffffff), - 0, (uint32_t)dev.mmio_size)); + ::Array(0U, (uint32_t)((addr_t)dev.mmio_start & 0xffffffff), + 0U, (uint32_t)dev.mmio_size)); }); }); }); diff --git a/repos/os/src/server/vmm/gic.cc b/repos/os/src/server/vmm/gic.cc index e3a9a465b0..7517ff1a3f 100644 --- a/repos/os/src/server/vmm/gic.cc +++ b/repos/os/src/server/vmm/gic.cc @@ -205,10 +205,9 @@ Gic::Gicd_banked::Gicd_banked(Cpu_base & cpu, Gic & gic, Mmio_bus & bus) if (gic.version() >= 3) { _rdist.construct(GICR_MMIO_START + - (cpu.cpu_id()*0x20000), 0x20000, + (cpu.cpu_id()*0x20000), 0x20000, bus, cpu.cpu_id(), (_gic._cpu_cnt-1) == cpu.cpu_id()); - bus.add(*_rdist); } } @@ -219,10 +218,9 @@ Register Gic::Irq_reg::read(Address_range & access, Cpu & cpu) Register ret = 0; - Register bits_per_irq = size * 8 / irq_count; - for (unsigned i = (access.start * 8) / bits_per_irq; - i < ((access.start+access.size) * 8) / bits_per_irq; i++) - ret |= read(cpu.gic().irq(i)) << ((i % (32/bits_per_irq) * bits_per_irq)); + for_range(access, [&] (unsigned i, Register bits_per_irq) { + ret |= read(cpu.gic().irq((unsigned)i)) + << ((i % (32/bits_per_irq) * bits_per_irq)); }); return ret; } @@ -231,12 +229,10 @@ void Gic::Irq_reg::write(Address_range & access, Cpu & cpu, Register value) { Genode::Mutex::Guard guard(big_gic_lock()); - Register bits_per_irq = size * 8 / irq_count; - Register irq_value_mask = (1<> ((i % (32/bits_per_irq))*bits_per_irq)) - & irq_value_mask); + for_range(access, [&] (unsigned i, Register bits_per_irq) { + write(cpu.gic().irq((unsigned)i), + (value >> ((i % (32/bits_per_irq))*bits_per_irq)) + & ((1<= 0x20) { Irq_reg::write(access, cpu, value); } + if (access.start() >= 0x20) { Irq_reg::write(access, cpu, value); } } @@ -294,33 +292,15 @@ Gic::Gic(const char * const name, unsigned cpus, unsigned version, Genode::Vm_connection & vm, - Mmio_bus & bus, - Genode::Env & env) -: Mmio_device(name, addr, size), _cpu_cnt(cpus), _version(version) + Space & bus, + Genode::Env &) +: + Mmio_device(name, addr, size, bus), + _cpu_cnt(cpus), + _version(version) { - add(_ctrl); - add(_typer); - add(_iidr); - add(_igroupr); - add(_isenabler); - add(_csenabler); - add(_ispendr); - add(_icpendr); - add(_isactiver); - add(_icactiver); - add(_ipriorityr); - add(_itargetr); - add(_icfgr); - add(_irouter); - add(_sgir); - - for (unsigned i = 0; i < (sizeof(Dummy::regs) / sizeof(Mmio_register)); i++) - add(_reg_container.regs[i]); - for (unsigned i = 0; i < MAX_SPI; i++) _spi[i].construct(i+MAX_SGI+MAX_PPI, Irq::SPI, _pending_list); - bus.add(*this); - if (version < 3) vm.attach_pic(GICC_MMIO_START); } diff --git a/repos/os/src/server/vmm/gic.h b/repos/os/src/server/vmm/gic.h index 44f06ba17c..a514aea9f5 100644 --- a/repos/os/src/server/vmm/gic.h +++ b/repos/os/src/server/vmm/gic.h @@ -50,10 +50,12 @@ class Vmm::Gic : public Vmm::Mmio_device Irq * highest_enabled(unsigned cpu_id = ~0U); }; - struct Irq_handler { + struct Irq_handler + { virtual void eoi() {}; virtual void enabled() {}; virtual void disabled() {}; + virtual ~Irq_handler() {}; }; enum Type { SGI, PPI, SPI }; @@ -101,8 +103,8 @@ class Vmm::Gic : public Vmm::Mmio_device { unsigned const irq_count; - virtual Register read(Irq & irq) { return 0; } - virtual void write(Irq & irq, Register reg) { } + virtual Register read(Irq &) { return 0; } + virtual void write(Irq &, Register) { } Register read(Address_range & access, Cpu&) override; void write(Address_range & access, Cpu&, Register value) override; @@ -111,9 +113,21 @@ class Vmm::Gic : public Vmm::Mmio_device Mmio_register::Type type, Genode::uint64_t start, unsigned bits_per_irq, - unsigned irq_count) - : Mmio_register(name, type, start, bits_per_irq*irq_count/8), + unsigned irq_count, + Space & device) + : Mmio_register(name, type, start, bits_per_irq*irq_count/8, device), irq_count(irq_count) {} + + template + void for_range(Address_range & access, FN const & fn) + { + Register bits_per_irq = size() * 8 / irq_count; + for (Register i = (access.start() * 8) / bits_per_irq; + i < ((access.start()+access.size()) * 8) / bits_per_irq; i++) { + static_assert(MAX_IRQ < ~0U); + if (i < MAX_IRQ) fn((unsigned)i, bits_per_irq); + } + } }; class Gicd_banked @@ -132,120 +146,140 @@ class Vmm::Gic : public Vmm::Mmio_device Gic & _gic; Genode::Constructible _sgi[MAX_SGI]; Genode::Constructible _ppi[MAX_PPI]; - Irq::List _pending_list; + Irq::List _pending_list {}; struct Redistributor : Mmio_device, Genode::Interface { unsigned cpu_id; bool last; Mmio_register gicr_ctlr { "GICR_CTLR", Mmio_register::RO, - 0x0, 4, 0b10010 }; + 0x0, 4, registers(), 0b10010 }; Mmio_register gicr_typer { "GICR_TYPER", Mmio_register::RO, - 0x8, 8, + 0x8, 8, registers(), (Genode::uint64_t)cpu_id<<32 | cpu_id<<8 | (last ? 1<<4 : 0) }; Mmio_register gicr_waker { "GICR_WAKER", Mmio_register::RO, - 0x14, 4, 0 }; + 0x14, 4, registers(), 0 }; Mmio_register gicr_pidr2 { "GICR_PIDR2", Mmio_register::RO, - 0xffe8, 4, (3<<4) }; + 0xffe8, 4, registers(), (3<<4) }; Mmio_register gicr_igroupr0 { "GICR_IGROUPR0", Mmio_register::RO, - 0x10080, 4, 0 }; + 0x10080, 4, registers(), 0 }; struct Gicr_isenabler0 : Irq_reg { - Register read(Irq & irq) { return irq.enabled(); } - void write(Irq & irq, Register v) { if (v) irq.enable(); } + Register read(Irq & irq) override { + return irq.enabled(); } - Gicr_isenabler0() - : Irq_reg("GICR_ISENABLER0", Mmio_register::RW, 0x10100, 1, 32) {} - } gicr_isenabler0; + void write(Irq & irq, Register v) override { + if (v) irq.enable(); } + + Gicr_isenabler0(Space & device) + : Irq_reg("GICR_ISENABLER0", Mmio_register::RW, + 0x10100, 1, 32, device) {} + } gicr_isenabler0 { registers() }; struct Gicr_icenabler0 : Irq_reg { - Register read(Irq & irq) { return irq.enabled(); } - void write(Irq & irq, Register v) { if (v) irq.disable(); } + Register read(Irq & irq) override { + return irq.enabled(); } - Gicr_icenabler0() - : Irq_reg("GICR_ICENABLER0", Mmio_register::RW, 0x10180, 1, 32) {} - } gicr_icenabler0; + void write(Irq & irq, Register v) override { + if (v) irq.disable(); } + + Gicr_icenabler0(Space & device) + : Irq_reg("GICR_ICENABLER0", Mmio_register::RW, + 0x10180, 1, 32, device) {} + } gicr_icenabler0 { registers() }; struct Gicr_ispendr0 : Irq_reg { - Register read(Irq & irq) { return irq.pending(); } - void write(Irq & irq, Register v) { if (v) irq.assert(); } + Register read(Irq & irq) override { + return irq.pending(); } - Gicr_ispendr0() - : Irq_reg("GICR_ISPENDR0", Mmio_register::RW, 0x10200, 1, 32) {} - } gicr_ispendr0; + void write(Irq & irq, Register v) override { + if (v) irq.assert(); } + + Gicr_ispendr0(Space & device) + : Irq_reg("GICR_ISPENDR0", Mmio_register::RW, + 0x10200, 1, 32, device) {} + } gicr_ispendr0 { registers() }; struct Gicr_icpendr0 : Irq_reg { - Register read(Irq & irq) { return irq.pending(); } - void write(Irq & irq, Register v) { if (v) irq.deassert(); } + Register read(Irq & irq) override { + return irq.pending(); } - Gicr_icpendr0() - : Irq_reg("GICR_ICPENDR0", Mmio_register::RW, 0x10280, 1, 32) {} - } gicr_icpendr0; + void write(Irq & irq, Register v) override { + if (v) irq.deassert(); } + + Gicr_icpendr0(Space & device) + : Irq_reg("GICR_ICPENDR0", Mmio_register::RW, + 0x10280, 1, 32, device) {} + } gicr_icpendr0 { registers() }; struct Gicr_isactiver0 : Irq_reg { - Register read(Irq & irq) { return irq.active(); } - void write(Irq & irq, Register v) { if (v) irq.activate(); } + Register read(Irq & irq) override { + return irq.active(); } - Gicr_isactiver0() - : Irq_reg("GICR_ISACTIVER0", Mmio_register::RW, 0x10300, 1, 32) {} - } gicr_isactiver0; + void write(Irq & irq, Register v) override { + if (v) irq.activate(); } + + Gicr_isactiver0(Space & device) + : Irq_reg("GICR_ISACTIVER0", Mmio_register::RW, + 0x10300, 1, 32, device) {} + } gicr_isactiver0 { registers() }; struct Gicr_icactiver0 : Irq_reg { - Register read(Irq & irq) { return irq.active(); } - void write(Irq & irq, Register v) { if (v) irq.deactivate(); } + Register read(Irq & irq) override { + return irq.active(); } - Gicr_icactiver0() - : Irq_reg("GICR_ICACTIVER0", Mmio_register::RW, 0x10380, 1, 32) {} - } gicr_icactiver0; + void write(Irq & irq, Register v) override { + if (v) irq.deactivate(); } + + Gicr_icactiver0(Space & device) + : Irq_reg("GICR_ICACTIVER0", Mmio_register::RW, + 0x10380, 1, 32, device) {} + } gicr_icactiver0 { registers() }; struct Gicr_ipriorityr : Irq_reg { - Register read(Irq & irq) { return irq.priority(); } - void write(Irq & irq, Register v) { irq.priority(v); } + Register read(Irq & irq) override { + return irq.priority(); } - Gicr_ipriorityr() - : Irq_reg("GICR_IPRIORITYR", Mmio_register::RW, 0x10400, 8, 32) {} - } gicr_ipriorityr; + void write(Irq & irq, Register v) override { + irq.priority((uint8_t)v); } + + Gicr_ipriorityr(Space & device) + : Irq_reg("GICR_IPRIORITYR", Mmio_register::RW, + 0x10400, 8, 32, device) {} + } gicr_ipriorityr { registers() }; struct Gicr_icfgr : Irq_reg { - Register read(Irq & irq) { return irq.level() ? 0 : 1; } - void write(Irq & irq, Register v) { irq.level(!v); } + Register read(Irq & irq) override { + return irq.level() ? 0 : 1; } + void write(Irq & irq, Register v) override { + irq.level(!v); } - Gicr_icfgr() - : Irq_reg("GICR_ICFGR", Mmio_register::RW, 0x10c00, 8, 32) {} - } gicr_icfgr; + Gicr_icfgr(Space & device) + : Irq_reg("GICR_ICFGR", Mmio_register::RW, + 0x10c00, 8, 32, device) {} + } gicr_icfgr { registers() }; Redistributor(const Genode::uint64_t addr, const Genode::uint64_t size, + Space & bus, unsigned cpu_id, bool last) - : Mmio_device("GICR", addr, size), cpu_id(cpu_id), last(last) - { - add(gicr_ctlr); - add(gicr_typer); - add(gicr_waker); - add(gicr_pidr2); - add(gicr_igroupr0); - add(gicr_isenabler0); - add(gicr_icenabler0); - add(gicr_ispendr0); - add(gicr_icpendr0); - add(gicr_isactiver0); - add(gicr_icactiver0); - add(gicr_ipriorityr); - add(gicr_icfgr); - } + : + Mmio_device("GICR", addr, size, bus), + cpu_id(cpu_id), + last(last) { } }; - Genode::Constructible _rdist; + Genode::Constructible _rdist {}; }; unsigned version(); @@ -256,7 +290,7 @@ class Vmm::Gic : public Vmm::Mmio_device unsigned cpus, unsigned version, Genode::Vm_connection & vm, - Mmio_bus & bus, + Space & bus, Genode::Env & env); private: @@ -264,167 +298,221 @@ class Vmm::Gic : public Vmm::Mmio_device friend struct Gicd_banked; Genode::Constructible _spi[MAX_SPI]; - Irq::List _pending_list; + Irq::List _pending_list {}; unsigned _cpu_cnt; unsigned _version; - struct Gicd_ctlr : Genode::Register<32>, Mmio_register + struct Gicd_ctlr : Mmio_register { - struct Enable : Bitfield<0, 1> {}; - struct Disable : Bitfield<6, 1> {}; + struct Reg : Genode::Register<32> + { + struct Enable : Bitfield<0, 1> {}; + struct Disable : Bitfield<6, 1> {}; + }; void write(Address_range & access, Cpu & cpu, Mmio_register::Register value) override { - access_t v = value; - Disable::set(v, 0); + Reg::access_t v = (Reg::access_t)value; + Reg::Disable::set(v, 0); Mmio_register::write(access, cpu, v); } - Gicd_ctlr() - : Mmio_register("GICD_CTLR", Mmio_register::RW, 0, 4, 0) {} - } _ctrl; + Gicd_ctlr(Space & device) + : Mmio_register("GICD_CTLR", Mmio_register::RW, 0, 4, device, 0) {} + } _ctrl { registers() }; - struct Gicd_typer : Genode::Register<32>, Mmio_register + struct Gicd_typer : Mmio_register { - struct It_lines_number : Bitfield<0, 5> {}; - struct Cpu_number : Bitfield<5, 3> {}; - struct Id_bits : Bitfield<19, 5> {}; + struct Reg : Genode::Register<32> + { + struct It_lines_number : Bitfield<0, 5> {}; + struct Cpu_number : Bitfield<5, 3> {}; + struct Id_bits : Bitfield<19, 5> {}; + }; - Gicd_typer(unsigned cpus) - : Mmio_register("GICD_TYPER", Mmio_register::RO, 0x4, 4, - It_lines_number::bits(31) | - Cpu_number::bits(cpus-1) | Id_bits::bits(9)) {} - } _typer { _cpu_cnt }; + Gicd_typer(Space & device, unsigned cpus) + : Mmio_register("GICD_TYPER", Mmio_register::RO, 0x4, 4, device, + Reg::It_lines_number::bits(31) | + Reg::Cpu_number::bits(cpus-1) | + Reg::Id_bits::bits(9)) {} + } _typer { registers(), _cpu_cnt }; - struct Gicd_iidr : Genode::Register<32>, Mmio_register + struct Gicd_iidr : Mmio_register { - struct Implementer : Bitfield<0, 12> {}; - struct Revision : Bitfield<12, 4> {}; - struct Variant : Bitfield<16, 4> {}; - struct Product_id : Bitfield<24, 8> {}; + struct Reg : Genode::Register<32> + { + struct Implementer : Bitfield<0, 12> {}; + struct Revision : Bitfield<12, 4> {}; + struct Variant : Bitfield<16, 4> {}; + struct Product_id : Bitfield<24, 8> {}; + }; - Gicd_iidr() - : Mmio_register("GICD_IIDR", Mmio_register::RO, 0x8, 4, 0x123) {} - } _iidr; + Gicd_iidr(Space & device) + : Mmio_register("GICD_IIDR", Mmio_register::RO, 0x8, 4, + device, 0x123) {} + } _iidr { registers() }; struct Gicd_igroupr : Irq_reg { - Gicd_igroupr() - : Irq_reg("GICD_IGROUPR", Mmio_register::RW, 0x80, 1, 1024) {} - } _igroupr; + Gicd_igroupr(Space & device) + : Irq_reg("GICD_IGROUPR", Mmio_register::RW, 0x80, 1, + 1024, device) {} + } _igroupr { registers() }; struct Gicd_isenabler : Irq_reg { - Register read(Irq & irq) { return irq.enabled(); } - void write(Irq & irq, Register v) { if (v) irq.enable(); } + Register read(Irq & irq) override { + return irq.enabled(); } - Gicd_isenabler() - : Irq_reg("GICD_ISENABLER", Mmio_register::RW, 0x100, 1, 1024) {} - } _isenabler; + void write(Irq & irq, Register v) override { + if (v) irq.enable(); } + + Gicd_isenabler(Space & device) + : Irq_reg("GICD_ISENABLER", Mmio_register::RW, 0x100, 1, + 1024, device) {} + } _isenabler { registers() }; struct Gicd_icenabler : Irq_reg { - Register read(Irq & irq) { return irq.enabled(); } - void write(Irq & irq, Register v) { if (v) irq.disable(); } + Register read(Irq & irq) override { + return irq.enabled(); } - Gicd_icenabler() - : Irq_reg("GICD_ICENABLER", Mmio_register::RW, 0x180, 1, 1024) {} - } _csenabler; + void write(Irq & irq, Register v) override { + if (v) irq.disable(); } + + Gicd_icenabler(Space & device) + : Irq_reg("GICD_ICENABLER", Mmio_register::RW, 0x180, 1, + 1024, device) {} + } _csenabler { registers() }; struct Gicd_ispendr : Irq_reg { - Register read(Irq & irq) { return irq.pending(); } - void write(Irq & irq, Register v) { if (v) irq.assert(); } + Register read(Irq & irq) override { + return irq.pending(); } - Gicd_ispendr() - : Irq_reg("GICD_ISPENDR", Mmio_register::RW, 0x200, 1, 1024) {} - } _ispendr; + void write(Irq & irq, Register v) override { + if (v) irq.assert(); } + + Gicd_ispendr(Space & device) + : Irq_reg("GICD_ISPENDR", Mmio_register::RW, 0x200, 1, + 1024, device) {} + } _ispendr { registers() }; struct Gicd_icpendr : Irq_reg { - Register read(Irq & irq) { return irq.pending(); } - void write(Irq & irq, Register v) { if (v) irq.deassert(); } + Register read(Irq & irq) override { + return irq.pending(); } - Gicd_icpendr() - : Irq_reg("GICD_ICPENDR", Mmio_register::RW, 0x280, 1, 1024) {} - } _icpendr; + void write(Irq & irq, Register v) override { + if (v) irq.deassert(); } + + Gicd_icpendr(Space & device) + : Irq_reg("GICD_ICPENDR", Mmio_register::RW, 0x280, 1, + 1024, device) {} + } _icpendr { registers() }; struct Gicd_isactiver : Irq_reg { - Register read(Irq & irq) { return irq.active(); } - void write(Irq & irq, Register v) { if (v) irq.activate(); } + Register read(Irq & irq) override { + return irq.active(); } - Gicd_isactiver() - : Irq_reg("GICD_ISACTIVER", Mmio_register::RW, 0x300, 1, 1024) {} - } _isactiver; + void write(Irq & irq, Register v) override { + if (v) irq.activate(); } + + Gicd_isactiver(Space & device) + : Irq_reg("GICD_ISACTIVER", Mmio_register::RW, 0x300, 1, + 1024, device) {} + } _isactiver { registers() }; struct Gicd_icactiver : Irq_reg { - Register read(Irq & irq) { return irq.active(); } - void write(Irq & irq, Register v) { if (v) irq.deactivate(); } + Register read(Irq & irq) override { + return irq.active(); } - Gicd_icactiver() - : Irq_reg("GICD_ICACTIVER", Mmio_register::RW, 0x380, 1, 1024) {} - } _icactiver; + void write(Irq & irq, Register v) override { + if (v) irq.deactivate(); } + + Gicd_icactiver(Space & device) + : Irq_reg("GICD_ICACTIVER", Mmio_register::RW, 0x380, 1, + 1024, device) {} + } _icactiver { registers() }; struct Gicd_ipriorityr : Irq_reg { - Register read(Irq & irq) { return irq.priority(); } - void write(Irq & irq, Register v) { irq.priority(v); } + Register read(Irq & irq) override { + return irq.priority(); } - Gicd_ipriorityr() - : Irq_reg("GICD_IPRIORITYR", Mmio_register::RW, 0x400, 8, 1024) {} - } _ipriorityr; + void write(Irq & irq, Register v) override { + irq.priority((uint8_t)v); } + + Gicd_ipriorityr(Space & device) + : Irq_reg("GICD_IPRIORITYR", Mmio_register::RW, 0x400, 8, + 1024, device) {} + } _ipriorityr { registers() }; struct Gicd_itargetr : Irq_reg { - Register read(Irq & irq) { return irq.target(); } - void write(Irq & irq, Register v) { irq.target(v); } + Register read(Irq & irq) override { + return irq.target(); } + + void write(Irq & irq, Register v) override { + irq.target((uint8_t)v); } Register read(Address_range & access, Cpu&) override; void write(Address_range & access, Cpu&, Register value) override; - Gicd_itargetr() - : Irq_reg("GICD_ITARGETSR", Mmio_register::RW, 0x800, 8, 1024) {} - } _itargetr; + Gicd_itargetr(Space & device) + : Irq_reg("GICD_ITARGETSR", Mmio_register::RW, 0x800, 8, + 1024, device) {} + } _itargetr { registers() }; struct Gicd_icfgr : Irq_reg { - Register read(Irq & irq) { return irq.level() ? 0 : 2; } - void write(Irq & irq, Register v) { irq.level(!v); } + Register read(Irq & irq) override { + return irq.level() ? 0 : 2; } - Gicd_icfgr() - : Irq_reg("GICD_ICFGR", Mmio_register::RW, 0xc00, 2, 1024) {} - } _icfgr; + void write(Irq & irq, Register v) override { + irq.level(!v); } - struct Gicd_sgir : Genode::Register<32>, Mmio_register + Gicd_icfgr(Space & device) + : Irq_reg("GICD_ICFGR", Mmio_register::RW, 0xc00, 2, + 1024, device) {} + } _icfgr { registers() }; + + struct Gicd_sgir : Mmio_register { - struct Int_id : Bitfield<0, 4> {}; - struct Target_list : Bitfield<16, 8> {}; - struct Target_filter : Bitfield<24, 2> { - enum Target_type { LIST, ALL, MYSELF, INVALID }; + struct Reg : Genode::Register<32> + { + struct Int_id : Bitfield<0, 4> {}; + struct Target_list : Bitfield<16, 8> {}; + struct Target_filter : Bitfield<24, 2> { + enum Target_type { LIST, ALL, MYSELF, INVALID }; + }; }; void write(Address_range & access, Cpu & cpu, Mmio_register::Register value) override; - Gicd_sgir() - : Mmio_register("GICD_SGIR", Mmio_register::WO, 0xf00, 4, 0) {} - } _sgir; + Gicd_sgir(Space & device) + : Mmio_register("GICD_SGIR", Mmio_register::WO, 0xf00, 4, + device, 0) {} + } _sgir { registers() }; struct Gicd_irouter : Irq_reg { - Register read(Irq &) { return 0x0; } /* FIXME affinity routing support */ + Register read(Irq &) override { + return 0x0; } /* FIXME affinity routing support */ - void write(Irq & i, Register v) { + void write(Irq & i, Register v) override { if (v) Genode::error("Affinity routing not supported ", i.number()); } - Gicd_irouter() - : Irq_reg("GICD_IROUTER", Mmio_register::RW, 0x6100, 64, 1024) {} - } _irouter; + Gicd_irouter(Space & device) + : Irq_reg("GICD_IROUTER", Mmio_register::RW, 0x6100, 64, + 1024, device) {} + } _irouter { registers() }; /** * FIXME: missing registers: @@ -436,22 +524,14 @@ class Vmm::Gic : public Vmm::Mmio_device * GICD identification registers 0xfd0... */ - /** - * Dummy container for holding array of noncopyable objects - * Workaround for gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70395 - */ - struct Dummy { - Mmio_register regs[8]; - } _reg_container { .regs = { - { "GICD_PIDR4", Mmio_register::RO, 0xffd0, 4, 0x0 }, - { "GICD_PIDR5", Mmio_register::RO, 0xffd4, 4, 0x0 }, - { "GICD_PIDR6", Mmio_register::RO, 0xffd8, 4, 0x0 }, - { "GICD_PIDR7", Mmio_register::RO, 0xffdc, 4, 0x0 }, - { "GICD_PIDR0", Mmio_register::RO, 0xffe0, 4, 0x492 }, - { "GICD_PIDR1", Mmio_register::RO, 0xffe4, 4, 0xb0 }, - { "GICD_PIDR2", Mmio_register::RO, 0xffe8, 4, (_version<<4) | 0xb }, - { "GICD_PIDR3", Mmio_register::RO, 0xffec, 4, 0x44 } - }}; + Mmio_register _pidr0 { "GICD_PIDR0", Mmio_register::RO, 0xffe0, 4, registers(), 0x492 }; + Mmio_register _pidr1 { "GICD_PIDR1", Mmio_register::RO, 0xffe4, 4, registers(), 0xb0 }; + Mmio_register _pidr2 { "GICD_PIDR2", Mmio_register::RO, 0xffe8, 4, registers(), (_version<<4) | 0xb }; + Mmio_register _pidr3 { "GICD_PIDR3", Mmio_register::RO, 0xffec, 4, registers(), 0x44 }; + Mmio_register _pidr4 { "GICD_PIDR4", Mmio_register::RO, 0xffd0, 4, registers(), 0x0 }; + Mmio_register _pidr5 { "GICD_PIDR5", Mmio_register::RO, 0xffd4, 4, registers(), 0x0 }; + Mmio_register _pidr6 { "GICD_PIDR6", Mmio_register::RO, 0xffd8, 4, registers(), 0x0 }; + Mmio_register _pidr7 { "GICD_PIDR7", Mmio_register::RO, 0xffdc, 4, registers(), 0x0 }; }; #endif /* _SRC__SERVER__VMM__GIC_H_ */ diff --git a/repos/os/src/server/vmm/mmio.cc b/repos/os/src/server/vmm/mmio.cc index 14f625f5d6..dd3cf8570c 100644 --- a/repos/os/src/server/vmm/mmio.cc +++ b/repos/os/src/server/vmm/mmio.cc @@ -16,7 +16,7 @@ using namespace Vmm; -Mmio_register::Register Mmio_register::read(Address_range & access, Cpu & cpu) +Mmio_register::Register Mmio_register::read(Address_range & access, Cpu &) { if (_type == WO) throw Exception("Invalid read access to register ", @@ -24,17 +24,17 @@ Mmio_register::Register Mmio_register::read(Address_range & access, Cpu & cpu) using namespace Genode; - switch (access.size) { - case 1: return *(uint8_t*) ((addr_t)&_value + access.start); - case 2: return *(uint16_t*) ((addr_t)&_value + access.start); - case 4: return *(uint32_t*) ((addr_t)&_value + access.start); + switch (access.size()) { + case 1: return *(uint8_t*) ((addr_t)&_value + access.start()); + case 2: return *(uint16_t*) ((addr_t)&_value + access.start()); + case 4: return *(uint32_t*) ((addr_t)&_value + access.start()); case 8: return _value; default: return 0; } } -void Mmio_register::write(Address_range & access, Cpu & cpu, Register value) +void Mmio_register::write(Address_range & access, Cpu &, Register value) { if (_type == RO) throw Exception("Invalid write access to register ", @@ -42,10 +42,13 @@ void Mmio_register::write(Address_range & access, Cpu & cpu, Register value) using namespace Genode; - switch (access.size) { - case 1: *((uint8_t*) ((addr_t)&_value + access.start)) = value; - case 2: *((uint16_t*) ((addr_t)&_value + access.start)) = value; - case 4: *((uint32_t*) ((addr_t)&_value + access.start)) = value; + switch (access.size()) { + case 1: *((uint8_t*) ((addr_t)&_value + access.start())) = (uint8_t) value; + break; + case 2: *((uint16_t*) ((addr_t)&_value + access.start())) = (uint16_t)value; + break; + case 4: *((uint32_t*) ((addr_t)&_value + access.start())) = (uint32_t)value; + break; case 8: _value = value; } } @@ -60,7 +63,7 @@ void Mmio_register::set(Register value) { _value = value; } Mmio_device::Register Mmio_device::read(Address_range & access, Cpu & cpu) { Mmio_register & reg = _registers.get(access); - Address_range ar(access.start - reg.start, access.size); + Address_range ar(access.start() - reg.start(), access.size()); return reg.read(ar, cpu); } @@ -68,7 +71,7 @@ Mmio_device::Register Mmio_device::read(Address_range & access, Cpu & cpu) void Mmio_device::write(Address_range & access, Cpu & cpu, Register value) { Mmio_register & reg = _registers.get(access); - Address_range ar(access.start - reg.start, access.size); + Address_range ar(access.start() - reg.start(), access.size()); reg.write(ar, cpu, value); } @@ -94,27 +97,30 @@ void Vmm::Mmio_bus::handle_memory_access(Vmm::Cpu & cpu) static bool valid(access_t v) { return Valid::get(v) && !Sign_extend::get(v); } - static bool write(access_t v) { return Write::get(v); } - static unsigned r(access_t v) { return Register::get(v); } + static bool write(access_t v) { return Write::get(v); } + static addr_t r(access_t v) { return Register::get(v); } }; - if (!Iss::valid(state.esr_el2)) + Iss::access_t iss = state.esr_el2; + + if (!Iss::valid(iss)) throw Exception("Mmio_bus: unknown ESR=", Genode::Hex(state.esr_el2)); - bool wr = Iss::Write::get(state.esr_el2); - unsigned idx = Iss::Register::get(state.esr_el2); + bool wr = Iss::Write::get(iss); + unsigned idx = (unsigned)Iss::Register::get(iss); uint64_t ipa = ((uint64_t)state.hpfar_el2 << 8) + (state.far_el2 & ((1 << 12) - 1)); - uint64_t width = 1 << Iss::Access_size::get(state.esr_el2); + uint64_t width = 1 << Iss::Access_size::get(iss); try { Address_range bus_range(ipa, width); Mmio_device & dev = get(bus_range); - Address_range dev_range(ipa - dev.start,width); + Address_range dev_range(ipa - dev.start(), width); if (wr) { dev.write(dev_range, cpu, state.reg(idx)); } else { - state.reg(idx, dev.read(dev_range, cpu)); + /* on 32-bit ARM we do not support 64-bit data access */ + state.reg(idx, (addr_t)dev.read(dev_range, cpu)); } } catch(Exception & e) { Genode::warning(e); diff --git a/repos/os/src/server/vmm/mmio.h b/repos/os/src/server/vmm/mmio.h index e26d4969bc..4187d392fe 100644 --- a/repos/os/src/server/vmm/mmio.h +++ b/repos/os/src/server/vmm/mmio.h @@ -30,23 +30,28 @@ class Vmm::Mmio_register : public Vmm::Address_range enum Type { RO, WO, RW }; - using Name = Genode::String<64>; - using Register = Genode::uint64_t; + using Name = String<64>; + using Register = uint64_t; + using Space = Address_space; virtual Register read(Address_range & access, Cpu&); virtual void write(Address_range & access, Cpu&, Register value); virtual void set(Register value); virtual Register value() const; - Mmio_register(Name name, - Type type, - Genode::uint64_t start, - Genode::uint64_t size, - Register reset_value = 0) + Mmio_register(Name name, + Type type, + uint64_t start, + uint64_t size, + Space & device, + Register reset_value = 0) : Address_range(start, size), _name(name), _type(type), - _value(reset_value) { } + _value(reset_value) + { + device.add(*this); + } protected: @@ -62,23 +67,32 @@ class Vmm::Mmio_device : public Vmm::Address_range { public: - using Name = Genode::String<64>; - using Register = Genode::uint64_t; + using Name = String<64>; + using Register = uint64_t; + using Space = Address_space; + + private: + + Name const _name; + Address_space _registers {}; + + public: + + Space & registers() { return _registers; } virtual Register read(Address_range & access, Cpu&); virtual void write(Address_range & access, Cpu&, Register value); void add(Mmio_register & reg); - Mmio_device(Name name, - Genode::uint64_t start, - Genode::uint64_t size) - : Address_range(start, size), _name(name) { } - - private: - - Name const _name; - Address_space _registers; + Mmio_device(Name name, + uint64_t start, + uint64_t size, + Space & bus) + : Address_range(start, size), _name(name) + { + bus.add(*this); + } }; diff --git a/repos/os/src/server/vmm/pl011.cc b/repos/os/src/server/vmm/pl011.cc index 68defd9f5c..abcc196048 100644 --- a/repos/os/src/server/vmm/pl011.cc +++ b/repos/os/src/server/vmm/pl011.cc @@ -54,7 +54,7 @@ Register Pl011::Uartmis::read(Address_range&, Cpu&) } -void Pl011::Uarticr::write(Address_range & ar, Cpu &, Register value) +void Pl011::Uarticr::write(Address_range &, Cpu &, Register value) { ris.set(ris.value() & ~value); } @@ -80,23 +80,12 @@ Pl011::Pl011(const char * const name, const Genode::uint64_t size, unsigned irq, Cpu & cpu, - Mmio_bus & bus, + Space & bus, Genode::Env & env) -: Mmio_device(name, addr, size), +: Mmio_device(name, addr, size, bus), _terminal(env, "earlycon"), _handler(cpu, env.ep(), *this, &Pl011::_read), _irq(cpu.gic().irq(irq)) { - for (unsigned i = 0; i < (sizeof(Dummy::regs) / sizeof(Mmio_register)); i++) - add(_reg_container.regs[i]); - add(_uart_ris); - add(_uart_dr); - add(_uart_fr); - add(_uart_imsc); - add(_uart_mis); - add(_uart_icr); - _terminal.read_avail_sigh(_handler); - - bus.add(*this); } diff --git a/repos/os/src/server/vmm/pl011.h b/repos/os/src/server/vmm/pl011.h index abd1f9b50c..3caa15b1c4 100644 --- a/repos/os/src/server/vmm/pl011.h +++ b/repos/os/src/server/vmm/pl011.h @@ -40,9 +40,9 @@ class Vmm::Pl011 : public Vmm::Mmio_device Terminal::Connection _terminal; Cpu::Signal_handler _handler; Gic::Irq & _irq; - Ring_buffer _rx_buf; + Ring_buffer _rx_buf {}; Mmio_register _uart_ris { "UARTRIS", Mmio_register::RO, - 0x3c, 2 }; + 0x3c, 2, registers() }; /** * Dummy container for holding array of noncopyable objects @@ -51,19 +51,19 @@ class Vmm::Pl011 : public Vmm::Mmio_device struct Dummy { Mmio_register regs[13]; } _reg_container { .regs = { - { "UARTIBRD", Mmio_register::RW, 0x24, 2, 0 }, - { "UARTFBRD", Mmio_register::RW, 0x28, 2, 0 }, - { "UARTLCR_H", Mmio_register::RW, 0x2c, 2, 0 }, - { "UARTCR", Mmio_register::RW, 0x30, 2, 0x300 }, - { "UARTIFLS", Mmio_register::RW, 0x34, 2, 0x12 }, - { "UARTPERIPHID0", Mmio_register::RO, 0xfe0, 4, 0x11 }, - { "UARTPERIPHID1", Mmio_register::RO, 0xfe4, 4, 0x10 }, - { "UARTPERIPHID2", Mmio_register::RO, 0xfe8, 4, 0x14 }, - { "UARTPERIPHID3", Mmio_register::RO, 0xfec, 4, 0x0 }, - { "UARTPCELLID0", Mmio_register::RO, 0xff0, 4, 0xd }, - { "UARTPCELLID1", Mmio_register::RO, 0xff4, 4, 0xf0 }, - { "UARTPCELLID2", Mmio_register::RO, 0xff8, 4, 0x5 }, - { "UARTPCELLID3", Mmio_register::RO, 0xffc, 4, 0xb1 } + { "UARTIBRD", Mmio_register::RW, 0x24, 2, registers(), 0 }, + { "UARTFBRD", Mmio_register::RW, 0x28, 2, registers(), 0 }, + { "UARTLCR_H", Mmio_register::RW, 0x2c, 2, registers(), 0 }, + { "UARTCR", Mmio_register::RW, 0x30, 2, registers(), 0x300 }, + { "UARTIFLS", Mmio_register::RW, 0x34, 2, registers(), 0x12 }, + { "UARTPERIPHID0", Mmio_register::RO, 0xfe0, 4, registers(), 0x11 }, + { "UARTPERIPHID1", Mmio_register::RO, 0xfe4, 4, registers(), 0x10 }, + { "UARTPERIPHID2", Mmio_register::RO, 0xfe8, 4, registers(), 0x14 }, + { "UARTPERIPHID3", Mmio_register::RO, 0xfec, 4, registers(), 0x0 }, + { "UARTPCELLID0", Mmio_register::RO, 0xff0, 4, registers(), 0xd }, + { "UARTPCELLID1", Mmio_register::RO, 0xff4, 4, registers(), 0xf0 }, + { "UARTPCELLID2", Mmio_register::RO, 0xff8, 4, registers(), 0x5 }, + { "UARTPCELLID3", Mmio_register::RO, 0xffc, 4, registers(), 0xb1 } }}; struct Uartdr : Mmio_register @@ -75,25 +75,31 @@ class Vmm::Pl011 : public Vmm::Mmio_device Register read(Address_range&, Cpu&) override; void write(Address_range&, Cpu&, Register) override; - Uartdr(Terminal::Connection & terminal, + Uartdr(Space & device, + Terminal::Connection & terminal, Ring_buffer & rx, Mmio_register & ris) - : Mmio_register("UARTDR", Mmio_register::RW, 0x0, 2), - terminal(terminal), rx(rx), ris(ris) {} - } _uart_dr { _terminal, _rx_buf, _uart_ris }; + : + Mmio_register("UARTDR", Mmio_register::RW, 0x0, 2, device), + terminal(terminal), rx(rx), ris(ris) {} + } _uart_dr { registers(), _terminal, _rx_buf, _uart_ris }; - struct Uartfr : Mmio_register, Genode::Register<32> + class Uartfr : public Mmio_register, protected Genode::Register<32> { - struct Rx_empty : Bitfield<4, 1> {}; - struct Rx_full : Bitfield<6, 1> {}; + public: - Ring_buffer & rx; + struct Rx_empty : Bitfield<4, 1> {}; + struct Rx_full : Bitfield<6, 1> {}; - Mmio_register::Register read(Address_range&, Cpu&) override; + Ring_buffer & rx; - Uartfr(Ring_buffer & rx) - : Mmio_register("UARTFR", Mmio_register::RO, 0x18, 4), rx(rx) {} - } _uart_fr { _rx_buf }; + Mmio_register::Register read(Address_range&, Cpu&) override; + + Uartfr(Space & device, Ring_buffer & rx) + : + Mmio_register("UARTFR", Mmio_register::RO, 0x18, 4, device), + rx(rx) {} + } _uart_fr { registers(), _rx_buf }; struct Uartimsc : Mmio_register { @@ -102,10 +108,12 @@ class Vmm::Pl011 : public Vmm::Mmio_device void write(Address_range&, Cpu&, Register) override; - Uartimsc(Gic::Irq & irq, Mmio_register & ris) - : Mmio_register("UARTIMSC", Mmio_register::RW, 0x38, 2, 0xf), - irq(irq), ris(ris) {} - } _uart_imsc { _irq, _uart_ris }; + Uartimsc(Space & device, Gic::Irq & irq, Mmio_register & ris) + : + Mmio_register("UARTIMSC", Mmio_register::RW, 0x38, 2, + device, 0xf), + irq(irq), ris(ris) {} + } _uart_imsc { registers(), _irq, _uart_ris }; struct Uartmis : Mmio_register { @@ -114,10 +122,11 @@ class Vmm::Pl011 : public Vmm::Mmio_device Register read(Address_range&, Cpu&) override; - Uartmis(Mmio_register & ris, Uartimsc & imsc) - : Mmio_register("UARTMIS", Mmio_register::RO, 0x40, 2), - ris(ris), imsc(imsc) {} - } _uart_mis { _uart_ris, _uart_imsc }; + Uartmis(Space & device, Mmio_register & ris, Uartimsc & imsc) + : + Mmio_register("UARTMIS", Mmio_register::RO, 0x40, 2, device), + ris(ris), imsc(imsc) {} + } _uart_mis { registers(), _uart_ris, _uart_imsc }; struct Uarticr : Mmio_register { @@ -125,9 +134,11 @@ class Vmm::Pl011 : public Vmm::Mmio_device void write(Address_range&, Cpu&, Register) override; - Uarticr(Mmio_register & ris) - : Mmio_register("UARTICR", Mmio_register::WO, 0x44, 2), ris(ris) {} - } _uart_icr { _uart_ris }; + Uarticr(Space & device, Mmio_register & ris) + : + Mmio_register("UARTICR", Mmio_register::WO, 0x44, 2, device), + ris(ris) {} + } _uart_icr { registers(), _uart_ris }; void _read(); @@ -138,7 +149,7 @@ class Vmm::Pl011 : public Vmm::Mmio_device const Genode::uint64_t size, unsigned irq, Cpu & cpu, - Mmio_bus & bus, + Space & bus, Genode::Env & env); }; diff --git a/repos/os/src/server/vmm/spec/arm_v7/cpu.cc b/repos/os/src/server/vmm/spec/arm_v7/cpu.cc index d280583e3c..b46da70b18 100644 --- a/repos/os/src/server/vmm/spec/arm_v7/cpu.cc +++ b/repos/os/src/server/vmm/spec/arm_v7/cpu.cc @@ -17,29 +17,30 @@ using Vmm::Cpu_base; using Vmm::Cpu; using Vmm::Gic; +using namespace Genode; -Genode::uint64_t Cpu_base::State::reg(unsigned idx) const +addr_t Cpu_base::State::reg(addr_t idx) const { if (idx > 15) return 0; - Genode::uint32_t * r = (Genode::uint32_t*)this; + addr_t * r = (addr_t*)this; r += idx; return *r; } -void Cpu_base::State::reg(unsigned idx, Genode::uint64_t v) +void Cpu_base::State::reg(addr_t idx, addr_t v) { if (idx > 15) return; - Genode::uint32_t * r = (Genode::uint32_t*)this; + addr_t * r = (addr_t*)this; r += idx; *r = v; } Cpu_base::System_register::Iss::access_t -Cpu_base::System_register::Iss::value(unsigned op0, unsigned crn, unsigned op1, +Cpu_base::System_register::Iss::value(unsigned, unsigned crn, unsigned op1, unsigned crm, unsigned op2) { access_t v = 0; @@ -63,7 +64,7 @@ Cpu_base::System_register::Iss::mask_encoding(access_t v) void Cpu_base::_handle_brk() { - Genode::error(__func__, " not implemented yet"); + error(__func__, " not implemented yet"); } @@ -85,8 +86,6 @@ void Cpu_base::handle_exception() void Cpu_base::dump() { - using namespace Genode; - auto lambda = [] (unsigned i) { switch (i) { case 0: return "und"; @@ -127,7 +126,7 @@ void Cpu_base::dump() } -void Cpu_base::initialize_boot(Genode::addr_t ip, Genode::addr_t dtb) +void Cpu_base::initialize_boot(addr_t ip, addr_t dtb) { state().reg(1, 0xffffffff); /* invalid machine type */ state().reg(2, dtb); @@ -135,9 +134,9 @@ void Cpu_base::initialize_boot(Genode::addr_t ip, Genode::addr_t dtb) } -Genode::addr_t Cpu::Ccsidr::read() const +addr_t Cpu::Ccsidr::read() const { - struct Csselr : Genode::Register<32> + struct Csselr : Register<32> { struct Level : Bitfield<1, 4> {}; }; @@ -147,7 +146,7 @@ Genode::addr_t Cpu::Ccsidr::read() const unsigned level = Csselr::Level::get(csselr.read()); if (level > 6) { - Genode::warning("Invalid Csselr value!"); + warning("Invalid Csselr value!"); return INVALID; } @@ -155,14 +154,14 @@ Genode::addr_t Cpu::Ccsidr::read() const } -Cpu::Cpu(Vm & vm, - Genode::Vm_connection & vm_session, - Mmio_bus & bus, - Gic & gic, - Genode::Env & env, - Genode::Heap & heap, - Genode::Entrypoint & ep, - short const id) +Cpu::Cpu(Vm & vm, + Vm_connection & vm_session, + Mmio_bus & bus, + Gic & gic, + Env & env, + Heap & heap, + Entrypoint & ep, + unsigned id) : Cpu_base(vm, vm_session, bus, gic, env, heap, ep, id), _sr_midr (0, 0, 0, 0, "MIDR", false, 0x412fc0f1, _reg_tree), _sr_mpidr (0, 0, 0, 5, "MPIDR", false, 1<<31|cpu_id(), _reg_tree), diff --git a/repos/os/src/server/vmm/spec/arm_v7/cpu.h b/repos/os/src/server/vmm/spec/arm_v7/cpu.h index 58a2d1abc4..19f348104c 100644 --- a/repos/os/src/server/vmm/spec/arm_v7/cpu.h +++ b/repos/os/src/server/vmm/spec/arm_v7/cpu.h @@ -29,7 +29,7 @@ class Vmm::Cpu : public Vmm::Cpu_base Genode::Env & env, Genode::Heap & heap, Genode::Entrypoint & ep, - short cpu_id); + unsigned cpu_id); enum Exception_type { NO_EXCEPTION, diff --git a/repos/os/src/server/vmm/spec/arm_v8/cpu.cc b/repos/os/src/server/vmm/spec/arm_v8/cpu.cc index 96d202de40..2c0e7ab7ab 100644 --- a/repos/os/src/server/vmm/spec/arm_v8/cpu.cc +++ b/repos/os/src/server/vmm/spec/arm_v8/cpu.cc @@ -17,15 +17,16 @@ using Vmm::Cpu_base; using Vmm::Cpu; using Vmm::Gic; +using namespace Genode; -Genode::uint64_t Cpu_base::State::reg(unsigned idx) const +addr_t Cpu_base::State::reg(addr_t idx) const { if (idx > 30) return 0; return r[idx]; } -void Cpu_base::State::reg(unsigned idx, Genode::uint64_t v) +void Cpu_base::State::reg(addr_t idx, addr_t v) { if (idx > 30) return; r[idx] = v; @@ -59,14 +60,16 @@ Cpu_base::System_register::Iss::mask_encoding(access_t v) void Cpu_base::_handle_brk() { - Genode::uint64_t offset = 0x0; + addr_t offset = 0x0; if (!(_state.pstate & 0b100)) { offset = 0x400; } else if (_state.pstate & 0b1) { offset = 0x200; } - _state.esr_el1 = _state.esr_el2; - _state.spsr_el1 = _state.pstate; + + /* only the below 32-bit of system register ESR_EL2 and PSTATE are used */ + _state.esr_el1 = (uint32_t)_state.esr_el2; + _state.spsr_el1 = (uint32_t)_state.pstate; _state.elr_el1 = _state.ip; _state.ip = _state.vbar_el1 + offset; _state.pstate = 0b1111000101; @@ -90,8 +93,6 @@ void Cpu_base::handle_exception() void Cpu_base::dump() { - using namespace Genode; - auto lambda = [] (addr_t exc) { switch (exc) { case Cpu::AARCH64_SYNC: return "aarch64 sync"; @@ -123,7 +124,7 @@ void Cpu_base::dump() } -Genode::addr_t Cpu::Ccsidr::read() const +addr_t Cpu::Ccsidr::read() const { struct Clidr : Genode::Register<32> { @@ -147,42 +148,42 @@ Genode::addr_t Cpu::Ccsidr::read() const enum { INVALID = 0xffffffff }; - unsigned level = Csselr::Level::get(csselr.read()); - bool instr = Csselr::Instr::get(csselr.read()); + unsigned level = Csselr::Level::get((Csselr::access_t)csselr.read()); + bool instr = Csselr::Instr::get((Csselr::access_t)csselr.read()); if (level > 6) { - Genode::warning("Invalid Csselr value!"); + warning("Invalid Csselr value!"); return INVALID; } - unsigned ce = Clidr::level(level, state.clidr_el1); + unsigned ce = Clidr::level(level, (Clidr::access_t)state.clidr_el1); if (ce == Clidr::NO_CACHE || (ce == Clidr::DATA_CACHE_ONLY && instr)) { - Genode::warning("Invalid Csselr value!"); + warning("Invalid Csselr value!"); return INVALID; } if (ce == Clidr::INSTRUCTION_CACHE_ONLY || (ce == Clidr::SEPARATE_CACHE && instr)) { - Genode::log("Return Ccsidr instr value ", state.ccsidr_inst_el1[level]); + log("Return Ccsidr instr value ", state.ccsidr_inst_el1[level]); return state.ccsidr_inst_el1[level]; } - Genode::log("Return Ccsidr value ", state.ccsidr_data_el1[level]); + log("Return Ccsidr value ", state.ccsidr_data_el1[level]); return state.ccsidr_data_el1[level]; } -Genode::addr_t Cpu::Ctr_el0::read() const +addr_t Cpu::Ctr_el0::read() const { - Genode::addr_t ret; + addr_t ret; asm volatile("mrs %0, ctr_el0" : "=r" (ret)); return ret; } -void Cpu::Icc_sgi1r_el1::write(Genode::addr_t v) +void Cpu::Icc_sgi1r_el1::write(addr_t v) { unsigned target_list = v & 0xffff; @@ -197,21 +198,21 @@ void Cpu::Icc_sgi1r_el1::write(Genode::addr_t v) }; -void Cpu_base::initialize_boot(Genode::addr_t ip, Genode::addr_t dtb) +void Cpu_base::initialize_boot(addr_t ip, addr_t dtb) { state().reg(0, dtb); state().ip = ip; } -Cpu::Cpu(Vm & vm, - Genode::Vm_connection & vm_session, - Mmio_bus & bus, - Gic & gic, - Genode::Env & env, - Genode::Heap & heap, - Genode::Entrypoint & ep, - short const id) +Cpu::Cpu(Vm & vm, + Vm_connection & vm_session, + Mmio_bus & bus, + Gic & gic, + Env & env, + Heap & heap, + Entrypoint & ep, + unsigned id) : Cpu_base(vm, vm_session, bus, gic, env, heap, ep, id), _sr_id_aa64afr0_el1 (3, 0, 0, 5, 4, "ID_AA64AFR0_EL1", false, 0x0, _reg_tree), _sr_id_aa64afr1_el1 (3, 0, 0, 5, 5, "ID_AA64AFR1_EL1", false, 0x0, _reg_tree), diff --git a/repos/os/src/server/vmm/spec/arm_v8/cpu.h b/repos/os/src/server/vmm/spec/arm_v8/cpu.h index 72ab1caaf1..626dac9e21 100644 --- a/repos/os/src/server/vmm/spec/arm_v8/cpu.h +++ b/repos/os/src/server/vmm/spec/arm_v8/cpu.h @@ -29,7 +29,7 @@ class Vmm::Cpu : public Vmm::Cpu_base Genode::Env & env, Genode::Heap & heap, Genode::Entrypoint & ep, - short cpu_id); + unsigned cpu_id); enum Exception_type { AARCH64_SYNC = 0x400, @@ -45,8 +45,8 @@ class Vmm::Cpu : public Vmm::Cpu_base private: - class Id_aa64pfr0 : public System_register, - public Genode::Register<64> + class Id_aa64pfr0 : public System_register, + protected Genode::Register<64> { private: diff --git a/repos/os/src/server/vmm/target.inc b/repos/os/src/server/vmm/target.inc index 78bd276483..48a8fc469a 100644 --- a/repos/os/src/server/vmm/target.inc +++ b/repos/os/src/server/vmm/target.inc @@ -15,5 +15,3 @@ SRC_CC += virtio_gpu.cc INC_DIR += $(PRG_DIR)/../.. $(PRG_DIR) vpath %.cc $(PRG_DIR)/../.. - -CC_CXX_WARN_STRICT := diff --git a/repos/os/src/server/vmm/virtio_block.h b/repos/os/src/server/vmm/virtio_block.h index d4c82cacf3..5fc67dff3d 100644 --- a/repos/os/src/server/vmm/virtio_block.h +++ b/repos/os/src/server/vmm/virtio_block.h @@ -33,7 +33,7 @@ class Vmm::Virtio_block_queue : public Virtio_split_queue { private: - Ring_index _used_idx; + Ring_index _used_idx {}; friend class Virtio_block_request; friend class Virtio_block_device; @@ -103,7 +103,7 @@ class Vmm::Virtio_block_request template T * _desc_addr(Descriptor const & desc) const { - return (T*) _ram.local_address(desc.address(), + return (T*) _ram.local_address((addr_t)desc.address(), desc.length()); } Index _request_idx; @@ -193,7 +193,7 @@ class Vmm::Virtio_block_device _block.update_jobs(*this); } - void _notify(unsigned idx) override + void _notify(unsigned) override { auto lambda = [&] (Index id, Descriptor_array & array, @@ -219,10 +219,10 @@ class Vmm::Virtio_block_device Register read(Address_range& range, Cpu&) override { - if (range.start == 0 && range.size == 4) + if (range.start() == 0 && range.size() == 4) return capacity & 0xffffffff; - if (range.start == 4 && range.size == 4) + if (range.start() == 4 && range.size() == 4) return capacity >> 32; throw Exception("Invalid read access of configuration area ", @@ -230,24 +230,27 @@ class Vmm::Virtio_block_device } Configuration_area(Virtio_block_device & device, uint64_t capacity) - : Mmio_register("Configuration_area", Mmio_register::RO, 0x100, 8), - capacity(capacity) { device.add(*this); } + : + Mmio_register("Configuration_area", Mmio_register::RO, + 0x100, 8, device.registers()), + capacity(capacity) { } } _config_area{ *this, _block_info.block_count * (_block_info.block_size / 512) }; public: - Virtio_block_device(const char * const name, - const uint64_t addr, - const uint64_t size, - unsigned irq, - Cpu & cpu, - Mmio_bus & bus, - Ram & ram, - Env & env, - Heap & heap) - : Virtio_device(name, addr, size, - irq, cpu, bus, ram, BLOCK), + Virtio_block_device(const char * const name, + const uint64_t addr, + const uint64_t size, + unsigned irq, + Cpu & cpu, + Mmio_bus & bus, + Ram & ram, + Virtio_device_list & list, + Env & env, + Heap & heap) + : Virtio_device(name, addr, size, irq, + cpu, bus, ram, list, BLOCK), _heap(heap), _block(env, &_block_alloc, BLOCK_BUFFER_SIZE), _handler(cpu, env.ep(), *this, &Virtio_block_device::_block_signal) { @@ -273,7 +276,7 @@ class Vmm::Virtio_block_device memcpy((char *)job.address() + offset, src, sz); } - void completed(Job &job, bool success) + void completed(Job &job, bool) { job.done(*_queue[REQUEST]); _assert_irq(); diff --git a/repos/os/src/server/vmm/virtio_console.h b/repos/os/src/server/vmm/virtio_console.h index dadb939aa0..6a034c6de7 100644 --- a/repos/os/src/server/vmm/virtio_console.h +++ b/repos/os/src/server/vmm/virtio_console.h @@ -68,14 +68,14 @@ class Vmm::Virtio_console : public Virtio_device { Register read(Address_range & range, Cpu&) override { - switch (range.start) { + switch (range.start()) { case 4: return 1; /* maximum ports */ default: ; } return 0; } - void write(Address_range & range, Cpu&, Register v) override {} + void write(Address_range &, Cpu &, Register) override {} Config_area(Virtio_console & console) : Reg(console, "ConfigArea", Mmio_register::RW, 0x100, 12) { } @@ -83,17 +83,18 @@ class Vmm::Virtio_console : public Virtio_device public: - Virtio_console(const char * const name, - const uint64_t addr, - const uint64_t size, - unsigned irq, - Cpu & cpu, - Mmio_bus & bus, - Ram & ram, - Genode::Env & env) + Virtio_console(const char * const name, + const uint64_t addr, + const uint64_t size, + unsigned irq, + Cpu & cpu, + Mmio_bus & bus, + Ram & ram, + Virtio_device_list & list, + Genode::Env & env) : - Virtio_device(name, addr, size, - irq, cpu, bus, ram, CONSOLE), + Virtio_device(name, addr, size, irq, + cpu, bus, ram, list, CONSOLE), _terminal(env, "console"), _handler(cpu, env.ep(), *this, &Virtio_console::_read) { diff --git a/repos/os/src/server/vmm/virtio_device.h b/repos/os/src/server/vmm/virtio_device.h index 533c678271..b1688aa849 100644 --- a/repos/os/src/server/vmm/virtio_device.h +++ b/repos/os/src/server/vmm/virtio_device.h @@ -26,9 +26,11 @@ namespace Vmm { class Virtio_split_queue; - class Virtio_device_base; + struct Virtio_device_base; template class Virtio_device; + using Virtio_device_list = List; + using namespace Genode; } @@ -45,7 +47,7 @@ class Vmm::Virtio_split_queue protected: - template + template class Index { private: @@ -56,12 +58,12 @@ class Vmm::Virtio_split_queue public: - Index(unsigned idx = 0) : _idx(idx % (1 << LOG2)) {} + Index(uint16_t idx = 0) : _idx(idx % (1 << LOG2)) {} void inc() { - _idx = ((_idx + 1) % (1 << LOG2)); } + _idx = ((_idx + 1U) % (1U << LOG2)); } - unsigned idx() const { return _idx; } + uint16_t idx() const { return _idx; } bool operator != (Index const & o) const { return _idx != o._idx; } @@ -73,9 +75,9 @@ class Vmm::Virtio_split_queue struct Queue_base : Mmio { - unsigned const max; + uint16_t const max; - Queue_base(addr_t base, unsigned max) + Queue_base(addr_t base, uint16_t max) : Mmio(base), max(max) {} struct Flags : Register<0x0, 16> { }; @@ -95,7 +97,7 @@ class Vmm::Virtio_split_queue Descriptor_index get(Ring_index id) { - unsigned v = read(id.idx() % max); + uint16_t v = read(id.idx() % max); if (v >= max) { throw Exception("Descriptor_index out of bounds"); } return Descriptor_index(v); @@ -170,14 +172,14 @@ class Vmm::Virtio_split_queue Ram & _ram; - Ring_index _cur_idx; + Ring_index _cur_idx {}; public: Virtio_split_queue(addr_t const descriptor_area, addr_t const device_area, addr_t const driver_area, - unsigned const queue_num, + uint16_t const queue_num, Ram & ram) : _avail(ram.local_address(driver_area, 6+2*queue_num), queue_num), @@ -203,7 +205,7 @@ class Vmm::Virtio_split_queue if (!address || !size) { break; } try { - addr_t data = _ram.local_address(address, size); + addr_t data = _ram.local_address((addr_t)address, size); size_t consumed = func(data, size); if (!consumed) { break; } _used.add(_cur_idx, id, consumed); @@ -221,23 +223,18 @@ class Vmm::Virtio_split_queue }; -class Vmm::Virtio_device_base : public List::Element -{ - public: - - virtual ~Virtio_device_base() {} -}; +struct Vmm::Virtio_device_base : public List::Element { }; template -class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base +class Vmm::Virtio_device : public Vmm::Mmio_device, private Virtio_device_base { protected: Gic::Irq & _irq; Ram & _ram; - Genode::Mutex _mutex; - Genode::Constructible _queue[NUM]; + Genode::Mutex _mutex {}; + Genode::Constructible _queue[NUM] {}; virtual void _notify(unsigned idx) = 0; @@ -259,8 +256,10 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base Mmio_register::Type type, Genode::uint64_t start, uint32_t value = 0) - : Mmio_register(name, type, start, 4, value), _dev(dev) { - _dev.add(*this); } + : + Mmio_register(name, type, start, 4, + dev.registers(), value), + _dev(dev) { } Virtio_device & device() { return _dev; } }; @@ -285,7 +284,7 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base Register read(Address_range &, Cpu &) override { return _regs[_selector.value()]; } - void write(Address_range & a, Cpu &, Register reg) override { + void write(Address_range &, Cpu &, Register reg) override { _regs[_selector.value()] = reg; } void set(Register value) override { @@ -358,12 +357,14 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base { Genode::Mutex::Guard guard(mutex()); - unsigned num = _queue_sel.value(); + unsigned num = (unsigned)_queue_sel.value(); - if (_queue[num].constructed()) { return; } + if (num >= NUM || _queue[num].constructed()) + return; - _queue[num].construct(_descriptor_area(), _device_area(), - _driver_area(), _queue_num.value(), _ram); + _queue[num].construct((addr_t)_descriptor_area(), (addr_t)_device_area(), + (addr_t)_driver_area(), (uint16_t)_queue_num.value(), + _ram); } struct Queue_ready : Reg @@ -392,7 +393,7 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base return; } - Reg::device()._notify(reg); + Reg::device()._notify((unsigned)reg); } Queue_notify(Virtio_device & device) @@ -402,7 +403,7 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base struct Interrupt_ack : Reg { - void write(Address_range&, Cpu&, Register reg) override + void write(Address_range&, Cpu&, Register) override { Genode::Mutex::Guard guard(Reg::device().mutex()); Reg::device()._deassert_irq(); @@ -418,12 +419,13 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base const Genode::uint64_t addr, const Genode::uint64_t size, unsigned irq, - Cpu &cpu, - Mmio_bus &bus, - Ram &ram, + Cpu & cpu, + Space & bus, + Ram & ram, + Virtio_device_list & dev_list, uint32_t dev_id) : - Mmio_device(name, addr, size), + Mmio_device(name, addr, size, bus), _irq(cpu.gic().irq(irq)), _ram(ram) { @@ -436,7 +438,7 @@ class Vmm::Virtio_device : public Vmm::Mmio_device, public Virtio_device_base _dev_feature.set(VIRTIO_F_VERSION_1); _dev_sel.set(0); /* set to 0...31 feature bits */ - bus.add(*this); + dev_list.insert(this); } Genode::Mutex & mutex() { return _mutex; } diff --git a/repos/os/src/server/vmm/virtio_gpu.cc b/repos/os/src/server/vmm/virtio_gpu.cc index 430b7d1971..a81c4cca0c 100644 --- a/repos/os/src/server/vmm/virtio_gpu.cc +++ b/repos/os/src/server/vmm/virtio_gpu.cc @@ -35,7 +35,7 @@ void Vmm::Virtio_gpu_queue::notify(Virtio_gpu_device & dev) if (!inform) return; - _used.write(_cur_idx.idx()); + _used.write((uint16_t)_cur_idx.idx()); memory_barrier(); if (_avail.inject_irq()) dev.assert_irq(); } @@ -128,7 +128,7 @@ void Vmm::Virtio_gpu_control_request::_resource_attach_backing() for (unsigned i = 0; i < nr; i++) { Entry entry(entry_base+i*Entry::SIZE); size_t sz = entry.read(); - addr_t off = _device._ram.local_address(entry.read(), sz) + addr_t off = _device._ram.local_address((addr_t)entry.read(), sz) - _device._ram.local(); res.attach(off, sz); } @@ -211,7 +211,7 @@ void Vmm::Virtio_gpu_control_request::_resource_flush() void * dst = (void*)((addr_t)_device._fb_ds->local_addr() + (_device._fb_mode.area.w() * y + x) * BYTES_PER_PIXEL); - size_t line = res.area.w() * BYTES_PER_PIXEL; + uint32_t line = res.area.w() * BYTES_PER_PIXEL; blit(src, line, dst, line, w*BYTES_PER_PIXEL, h); @@ -240,7 +240,7 @@ void Vmm::Virtio_gpu_control_request::_transfer_to_host_2d() uint32_t y = tth.read(); uint32_t w = tth.read(); uint32_t h = tth.read(); - addr_t off = tth.read(); + addr_t off = (addr_t)tth.read(); if (x + w > res.area.w() || y + h > res.area.h()) { response.write(Control_header::Type::ERR_INVALID_PARAMETER); @@ -250,7 +250,7 @@ void Vmm::Virtio_gpu_control_request::_transfer_to_host_2d() void * src = (void*)((addr_t)res.src_ds.local_addr() + off); void * dst = (void*)((addr_t)res.dst_ds.local_addr() + (y * res.area.w() + x) * BYTES_PER_PIXEL); - size_t line = res.area.w() * BYTES_PER_PIXEL; + uint32_t line = res.area.w() * BYTES_PER_PIXEL; blit(src, line, dst, line, w*BYTES_PER_PIXEL, h); diff --git a/repos/os/src/server/vmm/virtio_gpu.h b/repos/os/src/server/vmm/virtio_gpu.h index c85c8bf430..d7d5cdb930 100644 --- a/repos/os/src/server/vmm/virtio_gpu.h +++ b/repos/os/src/server/vmm/virtio_gpu.h @@ -34,7 +34,7 @@ class Vmm::Virtio_gpu_queue : public Virtio_split_queue { private: - Ring_index _used_idx; + Ring_index _used_idx {}; friend class Virtio_gpu_control_request; @@ -235,7 +235,8 @@ class Vmm::Virtio_gpu_control_request addr_t _desc_addr(unsigned i) { Descriptor d = _desc(i); - return _ram.local_address(d.address(), d.length()); + /* we only support 32-bit ram addresses by now */ + return _ram.local_address((addr_t)d.address(), d.length()); } Control_header _ctrl_hdr { _desc_addr(0) }; @@ -329,7 +330,8 @@ class Vmm::Virtio_gpu_device : public Virtio_device uint32_t w, uint32_t h) : Registry::Element(registry, *this), - Rect(Point((int)x,(int)y), Area((int)w,(int)h)) { } + Rect(Point((int)x,(int)y), Area((int)w,(int)h)), + id(id) { } using Rect::Rect; }; @@ -348,7 +350,7 @@ class Vmm::Virtio_gpu_device : public Virtio_device region_map.dataspace() }; Attached_ram_dataspace dst_ds { device._env.ram(), device._env.rm(), _size() }; - Registry scanouts; + Registry scanouts {}; Resource(Virtio_gpu_device & dev, uint32_t id, @@ -392,11 +394,11 @@ class Vmm::Virtio_gpu_device : public Virtio_device Register read(Address_range & range, Cpu&) override { - if (range.start == EVENTS_READ && range.size == 4) + if (range.start() == EVENTS_READ && range.size() == 4) return dev._mode_changed ? 1 : 0; /* we support no multi-head, just return 1 */ - if (range.start == SCANOUTS && range.size == 4) + if (range.start() == SCANOUTS && range.size() == 4) return 1; return 0; @@ -404,13 +406,15 @@ class Vmm::Virtio_gpu_device : public Virtio_device void write(Address_range & range, Cpu&, Register v) override { - if (range.start == EVENTS_CLEAR && range.size == 4 && v == 1) + if (range.start() == EVENTS_CLEAR && range.size() == 4 && v == 1) dev._mode_changed = false; } Configuration_area(Virtio_gpu_device & device) - : Mmio_register("GPU config area", Mmio_register::RO, 0x100, 16), - dev(device) { device.add(*this); } + : + Mmio_register("GPU config area", Mmio_register::RO, + 0x100, 16, device.registers()), + dev(device) { } } _config_area{ *this }; void _mode_change() @@ -448,15 +452,16 @@ class Vmm::Virtio_gpu_device : public Virtio_device const uint64_t size, unsigned irq, Cpu & cpu, - Mmio_bus & bus, + Space & bus, Ram & ram, + Virtio_device_list & list, Env & env, Heap & heap, Attached_ram_dataspace & ram_ds, Gui::Connection & gui) : Virtio_device(name, addr, size, - irq, cpu, bus, ram, GPU), + irq, cpu, bus, ram, list, GPU), _env(env), _heap(heap), _ram_ds(ram_ds), _gui(gui), _handler(cpu, env.ep(), *this, &Virtio_gpu_device::_mode_change) { diff --git a/repos/os/src/server/vmm/virtio_input.h b/repos/os/src/server/vmm/virtio_input.h index 5cb7ab3857..20d0e058aa 100644 --- a/repos/os/src/server/vmm/virtio_input.h +++ b/repos/os/src/server/vmm/virtio_input.h @@ -123,9 +123,9 @@ class Vmm::Virtio_input_device : public Virtio_device using namespace Linux_evdev; switch (_select) { - case ID_NAME: return _name.length() - 1; - case ID_SERIAL: return _serial.length() - 1; - case ID_DEVIDS: return _dev_id.length() - 1; + case ID_NAME: return (uint8_t)(_name.length() - 1); + case ID_SERIAL: return (uint8_t)(_serial.length() - 1); + case ID_DEVIDS: return (uint8_t)(_dev_id.length() - 1); case PROP_BITS: return 0; /* Unsupported */ case EV_BITS: switch (_sub_select) { @@ -143,7 +143,7 @@ class Vmm::Virtio_input_device : public Virtio_device return 0; } - Register _data(addr_t off) + Register _data(Register off) { using namespace Linux_evdev; @@ -179,32 +179,33 @@ class Vmm::Virtio_input_device : public Virtio_device Register read(Address_range & range, Cpu&) override { - if (range.start == SIZE) + if (range.start() == SIZE) return _size(); - if (range.start >= DATA && range.start < DATA_MAX) - return _data(range.start-DATA); + if (range.start() >= DATA && range.start() < DATA_MAX) + return _data(range.start()-DATA); error("Reading from virtio input config space ", - "at offset ", range.start, " is not allowed"); + "at offset ", range.start(), " is not allowed"); return 0; } void write(Address_range & range, Cpu&, Register v) override { - switch (range.start) { - case SELECT: _select = v; return; - case SUB_SELECT: _sub_select = v; return; + switch (range.start()) { + case SELECT: _select = (uint8_t)v; return; + case SUB_SELECT: _sub_select = (uint8_t)v; return; default: error("Writing to virtio input config space ", - "at offset ", range.start, " is not allowed"); + "at offset ", range.start(), " is not allowed"); } } Configuration_area(Virtio_input_device & device) - : Mmio_register("Input config area", - Mmio_register::RO, 0x100, 0xa4), - dev(device) { device.add(*this); } + : + Mmio_register("Input config area", Mmio_register::RO, + 0x100, 0xa4, device.registers()), + dev(device) { } } _config_area{ *this }; void _handle_input() @@ -285,6 +286,12 @@ class Vmm::Virtio_input_device : public Virtio_device enum Device_id { INPUT = 18 }; + /* + * Noncopyable + */ + Virtio_input_device(Virtio_input_device const &); + Virtio_input_device &operator = (Virtio_input_device const &); + public: Virtio_input_device(const char * const name, @@ -294,12 +301,13 @@ class Vmm::Virtio_input_device : public Virtio_device Cpu & cpu, Mmio_bus & bus, Ram & ram, + Virtio_device_list & list, Env & env, Heap & heap, Input::Session_client & input) : - Virtio_device(name, addr, size, - irq, cpu, bus, ram, INPUT), + Virtio_device(name, addr, size, irq, + cpu, bus, ram, list, INPUT), _env(env), _heap(heap), _input(input), _handler(cpu, env.ep(), *this, &Virtio_input_device::_handle_input) { diff --git a/repos/os/src/server/vmm/virtio_net.h b/repos/os/src/server/vmm/virtio_net.h index c2624d1c74..3b8405b63f 100644 --- a/repos/os/src/server/vmm/virtio_net.h +++ b/repos/os/src/server/vmm/virtio_net.h @@ -125,12 +125,12 @@ class Vmm::Virtio_net : public Virtio_device Register read(Address_range & range, Cpu&) override { - if (range.start > 5) return 0; + if (range.start() > 5) return 0; - return mac.addr[range.start]; + return mac.addr[range.start()]; } - void write(Address_range & range, Cpu&, Register v) override {} + void write(Address_range &, Cpu &, Register) override {} Config_area(Virtio_net & device, Nic::Mac_address & mac) : Reg(device, "ConfigArea", Mmio_register::RW, 0x100, 24), @@ -140,17 +140,18 @@ class Vmm::Virtio_net : public Virtio_device public: - Virtio_net(const char * const name, - const uint64_t addr, - const uint64_t size, - unsigned irq, - Cpu &cpu, - Mmio_bus &bus, - Ram &ram, - Genode::Env &env) + Virtio_net(const char * const name, + const uint64_t addr, + const uint64_t size, + unsigned irq, + Cpu & cpu, + Mmio_bus & bus, + Ram & ram, + Virtio_device_list & list, + Genode::Env & env) : - Virtio_device(name, addr, size, - irq, cpu, bus, ram, NIC), + Virtio_device(name, addr, size, irq, + cpu, bus, ram, list, NIC), _env(env), _handler(cpu, _env.ep(), *this, &Virtio_net::_handle) { diff --git a/repos/os/src/server/vmm/vm.cc b/repos/os/src/server/vmm/vm.cc index 11ad8a4c9b..e9ca4668df 100644 --- a/repos/os/src/server/vmm/vm.cc +++ b/repos/os/src/server/vmm/vm.cc @@ -118,36 +118,38 @@ Vm::Vm(Genode::Env & env, Heap & heap, Config & config) _config.for_each_virtio_device([&] (Config::Virtio_device const & dev) { switch (dev.type) { case Config::Virtio_device::CONSOLE: - _device_list.insert(new (_heap) + new (_heap) Virtio_console(dev.name.string(), (uint64_t)dev.mmio_start, dev.mmio_size, dev.irq, boot_cpu(), - _bus, _ram, env)); + _bus, _ram, _device_list, env); return; case Config::Virtio_device::NET: - _device_list.insert(new (_heap) + new (_heap) Virtio_net(dev.name.string(), (uint64_t)dev.mmio_start, dev.mmio_size, dev.irq, boot_cpu(), _bus, _ram, - env)); + _device_list, env); return; case Config::Virtio_device::BLOCK: - _device_list.insert(new (_heap) + new (_heap) Virtio_block_device(dev.name.string(), (uint64_t)dev.mmio_start, dev.mmio_size, dev.irq, boot_cpu(), - _bus, _ram, env, heap)); + _bus, _ram, _device_list, env, heap); return; case Config::Virtio_device::GPU: if (!_gui.constructed()) _gui.construct(env); - _device_list.insert(new (_heap) + new (_heap) Virtio_gpu_device(dev.name.string(), (uint64_t)dev.mmio_start, dev.mmio_size, dev.irq, boot_cpu(), - _bus, _ram, env, heap, _vm_ram, *_gui)); + _bus, _ram, _device_list, env, + heap, _vm_ram, *_gui); return; case Config::Virtio_device::INPUT: if (!_gui.constructed()) _gui.construct(env); - _device_list.insert(new (_heap) + new (_heap) Virtio_input_device(dev.name.string(), (uint64_t)dev.mmio_start, dev.mmio_size, dev.irq, boot_cpu(), - _bus, _ram, env, heap, *_gui->input())); + _bus, _ram, _device_list, env, + heap, *_gui->input()); default: return; }; diff --git a/repos/os/src/server/vmm/vm.h b/repos/os/src/server/vmm/vm.h index ea2a493a90..19e1f3965c 100644 --- a/repos/os/src/server/vmm/vm.h +++ b/repos/os/src/server/vmm/vm.h @@ -58,10 +58,10 @@ class Vmm::Vm _config.ram_size(), CACHED }; Ram _ram { RAM_START, _config.ram_size(), (addr_t)_vm_ram.local_addr()}; - Mmio_bus _bus; + Mmio_bus _bus {}; Gic _gic; - List _cpu_list; - List _device_list; + List _cpu_list {}; + List _device_list {}; Pl011 _uart; Constructible _initrd_rom {}; From 80453236c4631da59e29bd6a514088e6720374d5 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Fri, 10 Feb 2023 11:15:47 +0100 Subject: [PATCH 0331/1921] hw: don't depend on ARMv8 HCR, CPTR EL2 reg values Instead of re-using the register values found in HCR_EL2 and CPTR_EL2 and setting single bits within them, define the complete content to prevent inconsistent hardware/hypervisor state. Ref genodelabs/genode#4759 --- repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc b/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc index 92ca7e583d..5324a5a803 100644 --- a/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc +++ b/repos/base-hw/src/bootstrap/spec/arm_64/cortex_a53_mmu.cc @@ -64,7 +64,7 @@ static inline void prepare_hypervisor(Cpu::Ttbr::access_t const ttbr, using namespace Hw::Mm; /* forbid trace access */ - Cpu::Cptr_el2::access_t cptr = Cpu::Cptr_el2::read(); + Cpu::Cptr_el2::access_t cptr = 0; Cpu::Cptr_el2::Tta::set(cptr, 1); Cpu::Cptr_el2::write(cptr); @@ -74,7 +74,7 @@ static inline void prepare_hypervisor(Cpu::Ttbr::access_t const ttbr, /* forbid any 32bit access to coprocessor/sysregs */ Cpu::Hstr_el2::write(0xffff); - Cpu::Hcr_el2::access_t hcr = Cpu::Hcr_el2::read(); + Cpu::Hcr_el2::access_t hcr = 0; Cpu::Hcr_el2::Rw::set(hcr, 1); /* exec in aarch64 */ Cpu::Hcr_el2::write(hcr); From a20a26b41b9647857bcb72a8437835d2e0985e10 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 10 Feb 2023 14:14:51 +0100 Subject: [PATCH 0332/1921] hw: add IPI type to flush and stop CPUs as preparation before powering off the CPU Issue #4669 --- repos/base-hw/src/core/kernel/cpu_mp.cc | 4 +- .../src/core/kernel/inter_processor_work.h | 2 +- repos/base-hw/src/core/kernel/thread.cc | 2 +- repos/base-hw/src/core/kernel/thread.h | 42 ++++++++++++++++--- .../src/core/spec/arm/kernel/thread.cc | 5 ++- .../src/core/spec/arm_v8/kernel/thread.cc | 5 ++- .../src/core/spec/riscv/kernel/thread.cc | 5 ++- .../src/core/spec/x86_64/kernel/thread.cc | 5 ++- repos/base-hw/src/include/hw/spec/arm/cpu.h | 5 ++- .../base-hw/src/include/hw/spec/arm_64/cpu.h | 5 ++- repos/base-hw/src/include/hw/spec/riscv/cpu.h | 5 ++- .../base-hw/src/include/hw/spec/x86_64/cpu.h | 16 ++++++- 12 files changed, 83 insertions(+), 18 deletions(-) diff --git a/repos/base-hw/src/core/kernel/cpu_mp.cc b/repos/base-hw/src/core/kernel/cpu_mp.cc index 514a2a05c0..60889f4a81 100644 --- a/repos/base-hw/src/core/kernel/cpu_mp.cc +++ b/repos/base-hw/src/core/kernel/cpu_mp.cc @@ -19,12 +19,12 @@ using namespace Kernel; void Cpu::Ipi::occurred() { /* lambda to iterate over a work-list and execute all work items */ - auto iterate = [] (Genode::List> & li) { + auto iterate = [&] (Genode::List> & li) { Genode::List_element const *e = li.first(); Genode::List_element const *next = nullptr; for ( ; e; e = next) { next = e->next(); - e->object()->execute(); + e->object()->execute(cpu); } }; diff --git a/repos/base-hw/src/core/kernel/inter_processor_work.h b/repos/base-hw/src/core/kernel/inter_processor_work.h index b6a4f2fdc6..f2791ccac7 100644 --- a/repos/base-hw/src/core/kernel/inter_processor_work.h +++ b/repos/base-hw/src/core/kernel/inter_processor_work.h @@ -32,7 +32,7 @@ class Kernel::Inter_processor_work : Genode::Interface { public: - virtual void execute() = 0; + virtual void execute(Cpu &) = 0; protected: diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index 46dc4dfa37..4b375ab691 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -169,7 +169,7 @@ Thread::Destroy::Destroy(Thread & caller, Genode::Kernel_object & to_del void -Thread::Destroy::execute() +Thread::Destroy::execute(Cpu &) { thread_to_destroy->_cpu->work_list().remove(&_le); thread_to_destroy.destruct(); diff --git a/repos/base-hw/src/core/kernel/thread.h b/repos/base-hw/src/core/kernel/thread.h index 0f3a78bb3b..926f434db4 100644 --- a/repos/base-hw/src/core/kernel/thread.h +++ b/repos/base-hw/src/core/kernel/thread.h @@ -92,7 +92,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout ** Inter_processor_work interface ** ************************************/ - void execute() override; + void execute(Cpu &) override; }; /** @@ -112,11 +112,40 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout ** Inter_processor_work interface ** ************************************/ - void execute() override; + void execute(Cpu &) override; }; - friend void Tlb_invalidation::execute(); - friend void Destroy::execute(); + /** + * Flush and stop CPU, e.g. before suspending or powering off the CPU + */ + struct Flush_and_stop_cpu : Inter_processor_work + { + Inter_processor_work_list &global_work_list; + unsigned cpus_left; + Hw::Suspend_type suspend; + + Flush_and_stop_cpu(Inter_processor_work_list &global_work_list, + unsigned cpus, Hw::Suspend_type suspend) + : + global_work_list(global_work_list), + cpus_left(cpus), + suspend(suspend) + { + global_work_list.insert(&_le); + } + + ~Flush_and_stop_cpu() { global_work_list.remove(&_le); } + + /************************************ + ** Inter_processor_work interface ** + ************************************/ + + void execute(Cpu &) override; + }; + + friend void Tlb_invalidation::execute(Cpu &); + friend void Destroy::execute(Cpu &); + friend void Flush_and_stop_cpu::execute(Cpu &); protected: @@ -155,8 +184,9 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout bool _cancel_next_await_signal { false }; Type const _type; - Genode::Constructible _tlb_invalidation {}; - Genode::Constructible _destroy {}; + Genode::Constructible _tlb_invalidation {}; + Genode::Constructible _destroy {}; + Genode::Constructible _stop_cpu {}; /** * Notice that another thread yielded the CPU to this thread diff --git a/repos/base-hw/src/core/spec/arm/kernel/thread.cc b/repos/base-hw/src/core/spec/arm/kernel/thread.cc index 1453d8a497..48c154ffcc 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/thread.cc @@ -62,7 +62,10 @@ void Thread::exception(Cpu & cpu) * coprocessor registers (there might be ARM SoCs where this is not valid, * with several shareability domains, but until now we do not support them) */ -void Kernel::Thread::Tlb_invalidation::execute() { }; +void Kernel::Thread::Tlb_invalidation::execute(Cpu &) { } + + +void Thread::Flush_and_stop_cpu::execute(Cpu &) { } void Thread::proceed(Cpu & cpu) diff --git a/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc b/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc index 17e431043c..4879814fd4 100644 --- a/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc @@ -82,7 +82,10 @@ void Thread::exception(Cpu & cpu) * coprocessor registers (there might be ARM SoCs where this is not valid, * with several shareability domains, but until now we do not support them) */ -void Kernel::Thread::Tlb_invalidation::execute() { }; +void Kernel::Thread::Tlb_invalidation::execute(Cpu &) { } + + +void Thread::Flush_and_stop_cpu::execute(Cpu &) { } bool Kernel::Pd::invalidate_tlb(Cpu & cpu, addr_t addr, size_t size) diff --git a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc index a1eb924bed..21be01c2b2 100644 --- a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc @@ -19,7 +19,10 @@ using namespace Kernel; -void Thread::Tlb_invalidation::execute() {} +void Thread::Tlb_invalidation::execute(Cpu &) { } + + +void Thread::Flush_and_stop_cpu::execute(Cpu &) { } void Thread::exception(Cpu & cpu) diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc index 09fc86c9cb..1c1b041196 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc @@ -19,7 +19,7 @@ #include -void Kernel::Thread::Tlb_invalidation::execute() +void Kernel::Thread::Tlb_invalidation::execute(Cpu &) { /* invalidate cpu-local TLB */ Cpu::invalidate_tlb(); @@ -32,6 +32,9 @@ void Kernel::Thread::Tlb_invalidation::execute() }; +void Kernel::Thread::Flush_and_stop_cpu::execute(Cpu &) { } + + void Kernel::Thread::_call_cache_coherent_region() { } diff --git a/repos/base-hw/src/include/hw/spec/arm/cpu.h b/repos/base-hw/src/include/hw/spec/arm/cpu.h index 404ddc814b..ec02cbdbd9 100644 --- a/repos/base-hw/src/include/hw/spec/arm/cpu.h +++ b/repos/base-hw/src/include/hw/spec/arm/cpu.h @@ -16,7 +16,10 @@ #include -namespace Hw { struct Arm_cpu; } +namespace Hw { struct Arm_cpu; struct Suspend_type; } + + +struct Hw::Suspend_type { }; struct Hw::Arm_cpu diff --git a/repos/base-hw/src/include/hw/spec/arm_64/cpu.h b/repos/base-hw/src/include/hw/spec/arm_64/cpu.h index 7d6a6331d2..353ef18ce4 100644 --- a/repos/base-hw/src/include/hw/spec/arm_64/cpu.h +++ b/repos/base-hw/src/include/hw/spec/arm_64/cpu.h @@ -31,7 +31,10 @@ }; -namespace Hw { struct Arm_64_cpu; } +namespace Hw { struct Arm_64_cpu; struct Suspend_type; } + + +struct Hw::Suspend_type { }; struct Hw::Arm_64_cpu diff --git a/repos/base-hw/src/include/hw/spec/riscv/cpu.h b/repos/base-hw/src/include/hw/spec/riscv/cpu.h index 49970a1d2f..73f6390dd9 100644 --- a/repos/base-hw/src/include/hw/spec/riscv/cpu.h +++ b/repos/base-hw/src/include/hw/spec/riscv/cpu.h @@ -16,7 +16,10 @@ #include -namespace Hw { struct Riscv_cpu; } +namespace Hw { struct Riscv_cpu; struct Suspend_type; } + + +struct Hw::Suspend_type { }; struct Hw::Riscv_cpu diff --git a/repos/base-hw/src/include/hw/spec/x86_64/cpu.h b/repos/base-hw/src/include/hw/spec/x86_64/cpu.h index 68cf5b8e5b..130adf1079 100644 --- a/repos/base-hw/src/include/hw/spec/x86_64/cpu.h +++ b/repos/base-hw/src/include/hw/spec/x86_64/cpu.h @@ -16,7 +16,19 @@ #include -namespace Hw { struct X86_64_cpu; } +namespace Hw { struct X86_64_cpu; struct Suspend_type; } + + +/* + * The intended sleep state S0 ... S5. The values are read out by an + * ACPI AML component and are of type TYP_SLPx as described in the + * ACPI specification, e.g. TYP_SLPa and TYP_SLPb. The values differ + * between different PC systems/boards. + */ +struct Hw::Suspend_type { + Genode::uint8_t typ_a; + Genode::uint8_t typ_b; +}; struct Hw::X86_64_cpu @@ -95,6 +107,8 @@ struct Hw::X86_64_cpu X86_64_CPUID_REGISTER(Cpuid_1_edx, 1, edx, struct Pat : Bitfield<16, 1> { }; ); + + Suspend_type suspend; }; #endif /* _SRC__LIB__HW__SPEC__X86_64__CPU_H_ */ From 1b5bfec8f992dcacf4642b5ddc75011f5f781ef2 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 8 Dec 2022 13:47:52 +0100 Subject: [PATCH 0333/1921] hw: add CPU re-init/resume support On resume the CPU state must be re-initialized, since all CPUs have been potentially off (depending on sleep form) and lost state. Handle the halt and suspend state explicitly by an extra Job implementation which can be executed without holding the global kernel lock. Issue #4669 --- repos/base-hw/src/core/kernel/cpu.cc | 3 ++ repos/base-hw/src/core/kernel/cpu.h | 30 +++++++++++++++++++ repos/base-hw/src/core/kernel/main.cc | 27 +++++++++++++++++ .../src/core/spec/arm/kernel/thread.cc | 3 ++ .../src/core/spec/arm_v8/kernel/thread.cc | 3 ++ .../src/core/spec/riscv/kernel/thread.cc | 3 ++ .../src/core/spec/x86_64/kernel/thread.cc | 3 ++ 7 files changed, 72 insertions(+) diff --git a/repos/base-hw/src/core/kernel/cpu.cc b/repos/base-hw/src/core/kernel/cpu.cc index 91609ed1df..0f752a3c98 100644 --- a/repos/base-hw/src/core/kernel/cpu.cc +++ b/repos/base-hw/src/core/kernel/cpu.cc @@ -145,6 +145,9 @@ Cpu_job & Cpu::schedule() Job & old_job = scheduled_job(); old_job.exception(*this); + if (_state == SUSPEND || _state == HALT) + return _halt_job; + if (_scheduler.need_to_schedule()) { _timer.process_timeouts(); _scheduler.update(_timer.time()); diff --git a/repos/base-hw/src/core/kernel/cpu.h b/repos/base-hw/src/core/kernel/cpu.h index cb24468270..833af3819d 100644 --- a/repos/base-hw/src/core/kernel/cpu.h +++ b/repos/base-hw/src/core/kernel/cpu.h @@ -109,7 +109,20 @@ class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout Pd &core_pd); }; + struct Halt_job : Job + { + Halt_job() : Job (0, 0) { } + void exception(Kernel::Cpu &) override { } + + void proceed(Kernel::Cpu &) override; + + Kernel::Cpu_job* helping_destination() override { return this; } + } _halt_job { }; + + enum State { RUN, HALT, SUSPEND }; + + State _state { RUN }; unsigned const _id; Board::Pic _pic; Timer _timer; @@ -126,6 +139,11 @@ class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout public: + void next_state_halt() { _state = HALT; }; + void next_state_suspend() { _state = SUSPEND; }; + + State state() { return _state; } + enum { KERNEL_STACK_SIZE = 16 * 1024 * sizeof(Genode::addr_t) }; /** @@ -186,6 +204,12 @@ class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout * Return CPU's idle thread object */ Kernel::Thread &idle_thread() { return _idle; } + + void reinit_cpu() + { + _arch_init(); + _state = RUN; + } }; @@ -213,6 +237,12 @@ class Kernel::Cpu_pool Pd &core_pd, Board::Global_interrupt_controller &global_irq_ctrl); + /** + * Return whether CPU object is valid and is constructed. + */ + bool cpu_valid(unsigned const id) const { + return id < _nr_of_cpus && _cpus[id].constructed(); } + /** * Return object of CPU 'id' */ diff --git a/repos/base-hw/src/core/kernel/main.cc b/repos/base-hw/src/core/kernel/main.cc index 855d6dbb7c..f4beb07755 100644 --- a/repos/base-hw/src/core/kernel/main.cc +++ b/repos/base-hw/src/core/kernel/main.cc @@ -134,6 +134,33 @@ void Kernel::main_initialize_and_handle_kernel_entry() while (!instance_initialized) { } } + if (Main::_instance->_cpu_pool.cpu_valid(Cpu::executing_id())) { + /* the CPU resumed since the cpu object is already valid */ + { + Lock::Guard guard(Main::_instance->_data_lock); + + if (kernel_initialized) { + nr_of_initialized_cpus = 0; + kernel_initialized = false; + } + + nr_of_initialized_cpus ++; + + Main::_instance->_cpu_pool.cpu(Cpu::executing_id()).reinit_cpu(); + + if (nr_of_initialized_cpus == nr_of_cpus) { + kernel_initialized = true; + Genode::raw("kernel resumed"); + } + } + + while (!kernel_initialized) { } + + Main::_instance->_handle_kernel_entry(); + /* never reached */ + return; + } + { /** * Let each CPU initialize its corresponding CPU object in the diff --git a/repos/base-hw/src/core/spec/arm/kernel/thread.cc b/repos/base-hw/src/core/spec/arm/kernel/thread.cc index 48c154ffcc..0a63aac23b 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/thread.cc @@ -68,6 +68,9 @@ void Kernel::Thread::Tlb_invalidation::execute(Cpu &) { } void Thread::Flush_and_stop_cpu::execute(Cpu &) { } +void Cpu::Halt_job::proceed(Kernel::Cpu &) { } + + void Thread::proceed(Cpu & cpu) { if (!cpu.active(pd().mmu_regs) && type() != CORE) diff --git a/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc b/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc index 4879814fd4..34946b1183 100644 --- a/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc @@ -88,6 +88,9 @@ void Kernel::Thread::Tlb_invalidation::execute(Cpu &) { } void Thread::Flush_and_stop_cpu::execute(Cpu &) { } +void Cpu::Halt_job::proceed(Kernel::Cpu &) { } + + bool Kernel::Pd::invalidate_tlb(Cpu & cpu, addr_t addr, size_t size) { using namespace Genode; diff --git a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc index 21be01c2b2..6ab3c3004d 100644 --- a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc @@ -25,6 +25,9 @@ void Thread::Tlb_invalidation::execute(Cpu &) { } void Thread::Flush_and_stop_cpu::execute(Cpu &) { } +void Cpu::Halt_job::proceed(Kernel::Cpu &) { } + + void Thread::exception(Cpu & cpu) { using Context = Genode::Cpu::Context; diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc index 1c1b041196..3ed9b75986 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc @@ -35,6 +35,9 @@ void Kernel::Thread::Tlb_invalidation::execute(Cpu &) void Kernel::Thread::Flush_and_stop_cpu::execute(Cpu &) { } +void Kernel::Cpu::Halt_job::proceed(Kernel::Cpu &) { } + + void Kernel::Thread::_call_cache_coherent_region() { } From 5587476b4e1449609159ba2dd23c4dbde0c2a2f4 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 23 Jan 2023 14:56:28 +0100 Subject: [PATCH 0334/1921] hw: add Timer re-init/resume support Add explicit init() to Timer infrastructure to re-initialize the hardware based on the parameters given during constructing time of the timer object. Issue #4669 --- repos/base-hw/src/core/kernel/cpu.h | 3 +++ repos/base-hw/src/core/kernel/cpu_mp.cc | 7 +++++++ repos/base-hw/src/core/kernel/timer.h | 3 +++ repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h | 2 ++ repos/base-hw/src/core/spec/arm/generic_timer.cc | 6 ++++++ repos/base-hw/src/core/spec/arm/generic_timer.h | 2 ++ repos/base-hw/src/core/spec/arm/imx_epit.cc | 6 ++++++ repos/base-hw/src/core/spec/arm/imx_epit.h | 2 ++ repos/base-hw/src/core/spec/riscv/timer.cc | 6 ++++++ repos/base-hw/src/core/spec/riscv/timer.h | 2 ++ repos/base-hw/src/core/spec/x86_64/pit.cc | 6 ++++++ repos/base-hw/src/core/spec/x86_64/pit.h | 2 ++ 12 files changed, 47 insertions(+) diff --git a/repos/base-hw/src/core/kernel/cpu.h b/repos/base-hw/src/core/kernel/cpu.h index 833af3819d..3040aa6e2b 100644 --- a/repos/base-hw/src/core/kernel/cpu.h +++ b/repos/base-hw/src/core/kernel/cpu.h @@ -88,6 +88,9 @@ class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout Ipi(Cpu & cpu); + void init(); + + /********************* ** Irq interface ** *********************/ diff --git a/repos/base-hw/src/core/kernel/cpu_mp.cc b/repos/base-hw/src/core/kernel/cpu_mp.cc index 60889f4a81..8b2eca8fef 100644 --- a/repos/base-hw/src/core/kernel/cpu_mp.cc +++ b/repos/base-hw/src/core/kernel/cpu_mp.cc @@ -52,5 +52,12 @@ Cpu::Ipi::Ipi(Cpu & cpu) : Irq(Board::Pic::IPI, cpu, cpu.pic()), cpu(cpu) { + init(); +} + + +void Cpu::Ipi::init() +{ + pending = false; cpu.pic().unmask(Board::Pic::IPI, cpu.id()); } diff --git a/repos/base-hw/src/core/kernel/timer.h b/repos/base-hw/src/core/kernel/timer.h index 50ed898b11..920847803c 100644 --- a/repos/base-hw/src/core/kernel/timer.h +++ b/repos/base-hw/src/core/kernel/timer.h @@ -110,6 +110,9 @@ class Kernel::Timer unsigned interrupt_id() const; time_t time() const { return _time + _duration(); } + + void init() { _device.init(); } + }; #endif /* _CORE__KERNEL__TIMER_H_ */ diff --git a/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h index d04d4dff4c..441dac8d7f 100644 --- a/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h +++ b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.h @@ -61,6 +61,8 @@ struct Board::Timer : Genode::Mmio Kernel::time_t current_ticks() const; Timer(unsigned); + + void init(); }; #endif /* _SRC__CORE__SPEC__ARM__CORTEX_A9_GLOBAL_TIMER_H_ */ diff --git a/repos/base-hw/src/core/spec/arm/generic_timer.cc b/repos/base-hw/src/core/spec/arm/generic_timer.cc index 659e28b145..18695b6306 100644 --- a/repos/base-hw/src/core/spec/arm/generic_timer.cc +++ b/repos/base-hw/src/core/spec/arm/generic_timer.cc @@ -25,6 +25,12 @@ unsigned long Board::Timer::_freq() { return Genode::Cpu::Cntfrq::read(); } Board::Timer::Timer(unsigned) : ticks_per_ms((unsigned)(_freq() / 1000)) +{ + init(); +} + + +void Board::Timer::init() { Cpu::Cntp_ctl::access_t ctl = 0; Cpu::Cntp_ctl::Enable::set(ctl, 1); diff --git a/repos/base-hw/src/core/spec/arm/generic_timer.h b/repos/base-hw/src/core/spec/arm/generic_timer.h index a047670ac1..8ec27c1dc3 100644 --- a/repos/base-hw/src/core/spec/arm/generic_timer.h +++ b/repos/base-hw/src/core/spec/arm/generic_timer.h @@ -27,6 +27,8 @@ struct Board::Timer unsigned const ticks_per_ms; Timer(unsigned); + + void init(); }; #endif /* _SRC__CORE__SPEC__ARM__GENERIC_TIMER_H_ */ diff --git a/repos/base-hw/src/core/spec/arm/imx_epit.cc b/repos/base-hw/src/core/spec/arm/imx_epit.cc index aa651394b1..34e3b126ac 100644 --- a/repos/base-hw/src/core/spec/arm/imx_epit.cc +++ b/repos/base-hw/src/core/spec/arm/imx_epit.cc @@ -29,6 +29,12 @@ unsigned Timer::interrupt_id() const { return Board::EPIT_1_IRQ; } Board::Timer::Timer(unsigned) : Mmio(Platform::mmio_to_virt(Board::EPIT_1_MMIO_BASE)) +{ + init(); +} + + +void Board::Timer::init() { reset(); diff --git a/repos/base-hw/src/core/spec/arm/imx_epit.h b/repos/base-hw/src/core/spec/arm/imx_epit.h index 8a901dd29d..6b47cb4187 100644 --- a/repos/base-hw/src/core/spec/arm/imx_epit.h +++ b/repos/base-hw/src/core/spec/arm/imx_epit.h @@ -88,6 +88,8 @@ struct Board::Timer : Genode::Mmio } Timer(unsigned); + + void init(); }; #endif /* _SRC__CORE__SPEC__ARM__IMX_EPIT_H_ */ diff --git a/repos/base-hw/src/core/spec/riscv/timer.cc b/repos/base-hw/src/core/spec/riscv/timer.cc index 1747414ba5..5a8c84b6c1 100644 --- a/repos/base-hw/src/core/spec/riscv/timer.cc +++ b/repos/base-hw/src/core/spec/riscv/timer.cc @@ -21,6 +21,12 @@ using namespace Kernel; Board::Timer::Timer(unsigned) +{ + init(); +} + + +void Board::Timer::init() { /* enable timer interrupt */ enum { STIE = 0x20 }; diff --git a/repos/base-hw/src/core/spec/riscv/timer.h b/repos/base-hw/src/core/spec/riscv/timer.h index a1d30a1d90..b1d4c37aab 100644 --- a/repos/base-hw/src/core/spec/riscv/timer.h +++ b/repos/base-hw/src/core/spec/riscv/timer.h @@ -34,6 +34,8 @@ struct Board::Timer Kernel::time_t stime() const; Timer(unsigned); + + void init(); }; #endif /* _SRC__CORE__SPEC__RISCV__TIMER_H_ */ diff --git a/repos/base-hw/src/core/spec/x86_64/pit.cc b/repos/base-hw/src/core/spec/x86_64/pit.cc index a2f00feddd..119c4930a1 100644 --- a/repos/base-hw/src/core/spec/x86_64/pit.cc +++ b/repos/base-hw/src/core/spec/x86_64/pit.cc @@ -56,6 +56,12 @@ uint32_t Board::Timer::pit_calc_timer_freq(void) Board::Timer::Timer(unsigned) : Mmio(Platform::mmio_to_virt(Hw::Cpu_memory_map::lapic_phys_base())) +{ + init(); +} + + +void Board::Timer::init() { /* enable LAPIC timer in one-shot mode */ write(Board::TIMER_VECTOR_KERNEL); diff --git a/repos/base-hw/src/core/spec/x86_64/pit.h b/repos/base-hw/src/core/spec/x86_64/pit.h index 8b8d6cc124..562a63533c 100644 --- a/repos/base-hw/src/core/spec/x86_64/pit.h +++ b/repos/base-hw/src/core/spec/x86_64/pit.h @@ -72,6 +72,8 @@ struct Board::Timer: Genode::Mmio Genode::uint32_t pit_calc_timer_freq(void); Timer(unsigned); + + void init(); }; #endif /* _SRC__CORE__SPEC__ARM__PIT_H_ */ From 1da71afbf3de1f365743feebe7dbffa7accf28f3 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 21 Feb 2023 15:25:13 +0100 Subject: [PATCH 0335/1921] hw: add Serial re-init/resume support Issue #4669 --- repos/base-hw/src/core/kernel/main.cc | 2 ++ repos/base-hw/src/include/hw/spec/riscv/sbi.h | 2 ++ repos/base/include/drivers/uart/imx.h | 5 +++ repos/base/include/drivers/uart/pl011.h | 2 ++ repos/base/include/drivers/uart/x86_pc.h | 31 +++++++++++-------- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/repos/base-hw/src/core/kernel/main.cc b/repos/base-hw/src/core/kernel/main.cc index f4beb07755..a3b4ccadd4 100644 --- a/repos/base-hw/src/core/kernel/main.cc +++ b/repos/base-hw/src/core/kernel/main.cc @@ -142,6 +142,8 @@ void Kernel::main_initialize_and_handle_kernel_entry() if (kernel_initialized) { nr_of_initialized_cpus = 0; kernel_initialized = false; + + Main::_instance->_serial.init(); } nr_of_initialized_cpus ++; diff --git a/repos/base-hw/src/include/hw/spec/riscv/sbi.h b/repos/base-hw/src/include/hw/spec/riscv/sbi.h index 1e839b3533..deac2b92d7 100644 --- a/repos/base-hw/src/include/hw/spec/riscv/sbi.h +++ b/repos/base-hw/src/include/hw/spec/riscv/sbi.h @@ -47,6 +47,8 @@ struct Hw::Riscv_uart { Sbi::console_put_char(c); } + + void init() { } }; #endif /* _SRC__LIB__HW__SPEC__RISCV__SBI_H_ */ diff --git a/repos/base/include/drivers/uart/imx.h b/repos/base/include/drivers/uart/imx.h index bcb6f102ce..0b88152c0b 100644 --- a/repos/base/include/drivers/uart/imx.h +++ b/repos/base/include/drivers/uart/imx.h @@ -247,6 +247,11 @@ class Genode::Imx_uart: Mmio * \param base device MMIO base */ Imx_uart(addr_t base, uint32_t, uint32_t) : Mmio(base) + { + init(); + } + + void init() { write(Cr1::init_value()); write(Cr2::init_value()); diff --git a/repos/base/include/drivers/uart/pl011.h b/repos/base/include/drivers/uart/pl011.h index 0fe1201852..2d25cc5a1b 100644 --- a/repos/base/include/drivers/uart/pl011.h +++ b/repos/base/include/drivers/uart/pl011.h @@ -126,6 +126,8 @@ class Genode::Pl011_uart : Mmio * Send ASCII char 'c' over the UART interface */ inline void put_char(char const c); + + void init() { } }; diff --git a/repos/base/include/drivers/uart/x86_pc.h b/repos/base/include/drivers/uart/x86_pc.h index 2d6719c423..3f509144ce 100644 --- a/repos/base/include/drivers/uart/x86_pc.h +++ b/repos/base/include/drivers/uart/x86_pc.h @@ -24,7 +24,8 @@ class Genode::X86_uart { private: - uint16_t _port; + uint16_t const _port; + unsigned const _baud_rate; enum { COMPORT_DATA_OFFSET = 0, @@ -59,32 +60,36 @@ class Genode::X86_uart X86_uart(uint16_t const port, unsigned /* clock */, unsigned const baud_rate) : - _port(port) + _port(port), _baud_rate(baud_rate) { + init(); + } + void init() + { /** * Initialize serial port * * Based on 'init_serial' of L4ka::Pistachio's 'kdb/platform/pc99/io.cc' */ - if (!port) + if (!_port) return; uint16_t const - IER = (uint16_t)(port + 1), - EIR = (uint16_t)(port + 2), - LCR = (uint16_t)(port + 3), - MCR = (uint16_t)(port + 4), - LSR = (uint16_t)(port + 5), - MSR = (uint16_t)(port + 6), - DLLO = (uint16_t)(port + 0), - DLHI = (uint16_t)(port + 1); + IER = (uint16_t)(_port + 1), + EIR = (uint16_t)(_port + 2), + LCR = (uint16_t)(_port + 3), + MCR = (uint16_t)(_port + 4), + LSR = (uint16_t)(_port + 5), + MSR = (uint16_t)(_port + 6), + DLLO = (uint16_t)(_port + 0), + DLHI = (uint16_t)(_port + 1); _outb(LCR, 0x80); /* select bank 1 */ for (volatile int i = 10000000; i--; ); - _outb(DLLO, (uint8_t)((115200/baud_rate) >> 0)); - _outb(DLHI, (uint8_t)((115200/baud_rate) >> 8)); + _outb(DLLO, (uint8_t)((115200/_baud_rate) >> 0)); + _outb(DLHI, (uint8_t)((115200/_baud_rate) >> 8)); _outb(LCR, 0x03); /* set 8,N,1 */ _outb(IER, 0x00); /* disable interrupts */ _outb(EIR, 0x07); /* enable FIFOs */ From dc1996d2890a032e1f77c8d02e93e8f406adb867 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 11 Jan 2023 10:17:28 +0100 Subject: [PATCH 0336/1921] hw/x86: add interrupt controller re-init support Issue #4669 --- .../src/core/board/imx6q_sabrelite/board.h | 2 +- .../base-hw/src/core/board/nit6_solox/board.h | 2 +- repos/base-hw/src/core/board/pbxa9/board.h | 2 +- .../base-hw/src/core/board/wand_quad/board.h | 2 +- repos/base-hw/src/core/kernel/main.cc | 1 + .../src/core/spec/arm/trustzone_board.h | 2 +- .../src/core/spec/arm/virtualization/gicv2.h | 2 +- .../src/core/spec/arm/virtualization/gicv3.h | 2 +- repos/base-hw/src/core/spec/riscv/pic.h | 2 +- repos/base-hw/src/core/spec/x86_64/pic.cc | 27 ++++++++++++------- repos/base-hw/src/core/spec/x86_64/pic.h | 2 ++ 11 files changed, 28 insertions(+), 18 deletions(-) diff --git a/repos/base-hw/src/core/board/imx6q_sabrelite/board.h b/repos/base-hw/src/core/board/imx6q_sabrelite/board.h index c9128b9346..f9aff439c5 100644 --- a/repos/base-hw/src/core/board/imx6q_sabrelite/board.h +++ b/repos/base-hw/src/core/board/imx6q_sabrelite/board.h @@ -26,7 +26,7 @@ namespace Board { using namespace Hw::Imx6q_sabrelite_board; - class Global_interrupt_controller { }; + class Global_interrupt_controller { public: void init() {} }; class Pic : public Hw::Gicv2 { public: Pic(Global_interrupt_controller &) { } }; using L2_cache = Hw::Pl310; diff --git a/repos/base-hw/src/core/board/nit6_solox/board.h b/repos/base-hw/src/core/board/nit6_solox/board.h index 7ccefd9544..54594b30f8 100644 --- a/repos/base-hw/src/core/board/nit6_solox/board.h +++ b/repos/base-hw/src/core/board/nit6_solox/board.h @@ -26,7 +26,7 @@ namespace Board { using namespace Hw::Nit6_solox_board; - class Global_interrupt_controller { }; + class Global_interrupt_controller { public: void init() {} }; class Pic : public Hw::Gicv2 { public: Pic(Global_interrupt_controller &) { } }; using L2_cache = Hw::Pl310; diff --git a/repos/base-hw/src/core/board/pbxa9/board.h b/repos/base-hw/src/core/board/pbxa9/board.h index 3b3d914eb1..2bd2291d4f 100644 --- a/repos/base-hw/src/core/board/pbxa9/board.h +++ b/repos/base-hw/src/core/board/pbxa9/board.h @@ -26,7 +26,7 @@ namespace Board { using namespace Hw::Pbxa9_board; - class Global_interrupt_controller { }; + class Global_interrupt_controller { public: void init() {} }; class Pic : public Hw::Gicv2 { public: Pic(Global_interrupt_controller &) { } }; L2_cache & l2_cache(); diff --git a/repos/base-hw/src/core/board/wand_quad/board.h b/repos/base-hw/src/core/board/wand_quad/board.h index 1689d76fdb..288b9b0bc8 100644 --- a/repos/base-hw/src/core/board/wand_quad/board.h +++ b/repos/base-hw/src/core/board/wand_quad/board.h @@ -29,7 +29,7 @@ namespace Board { using L2_cache = Hw::Pl310; - class Global_interrupt_controller { }; + class Global_interrupt_controller { public: void init() {} }; class Pic : public Hw::Gicv2 { public: Pic(Global_interrupt_controller &) { } }; L2_cache & l2_cache(); diff --git a/repos/base-hw/src/core/kernel/main.cc b/repos/base-hw/src/core/kernel/main.cc index a3b4ccadd4..c9b371a0d1 100644 --- a/repos/base-hw/src/core/kernel/main.cc +++ b/repos/base-hw/src/core/kernel/main.cc @@ -144,6 +144,7 @@ void Kernel::main_initialize_and_handle_kernel_entry() kernel_initialized = false; Main::_instance->_serial.init(); + Main::_instance->_global_irq_ctrl.init(); } nr_of_initialized_cpus ++; diff --git a/repos/base-hw/src/core/spec/arm/trustzone_board.h b/repos/base-hw/src/core/spec/arm/trustzone_board.h index 28f7a616e0..a40e3e791f 100644 --- a/repos/base-hw/src/core/spec/arm/trustzone_board.h +++ b/repos/base-hw/src/core/spec/arm/trustzone_board.h @@ -27,7 +27,7 @@ namespace Board { struct Vm_page_table {}; struct Vm_page_table_array {}; - class Global_interrupt_controller { }; + class Global_interrupt_controller { public: void init() {} }; struct Pic : Hw::Pic { struct Virtual_context {}; Pic(Global_interrupt_controller &) { } }; struct Vcpu_context { Vcpu_context(Kernel::Cpu &) {} }; } diff --git a/repos/base-hw/src/core/spec/arm/virtualization/gicv2.h b/repos/base-hw/src/core/spec/arm/virtualization/gicv2.h index e8500dadb1..3044f69789 100644 --- a/repos/base-hw/src/core/spec/arm/virtualization/gicv2.h +++ b/repos/base-hw/src/core/spec/arm/virtualization/gicv2.h @@ -18,7 +18,7 @@ namespace Board { - class Global_interrupt_controller { }; + class Global_interrupt_controller { public: void init() {} }; class Pic; }; diff --git a/repos/base-hw/src/core/spec/arm/virtualization/gicv3.h b/repos/base-hw/src/core/spec/arm/virtualization/gicv3.h index c79ce3ba8b..459ff18f5d 100644 --- a/repos/base-hw/src/core/spec/arm/virtualization/gicv3.h +++ b/repos/base-hw/src/core/spec/arm/virtualization/gicv3.h @@ -18,7 +18,7 @@ namespace Board { - class Global_interrupt_controller { }; + class Global_interrupt_controller { public: void init() {} }; class Pic; }; diff --git a/repos/base-hw/src/core/spec/riscv/pic.h b/repos/base-hw/src/core/spec/riscv/pic.h index d85ec9751f..39ac46cb18 100644 --- a/repos/base-hw/src/core/spec/riscv/pic.h +++ b/repos/base-hw/src/core/spec/riscv/pic.h @@ -22,7 +22,7 @@ namespace Board { - class Global_interrupt_controller { }; + class Global_interrupt_controller { public: void init() {} }; class Pic; } diff --git a/repos/base-hw/src/core/spec/x86_64/pic.cc b/repos/base-hw/src/core/spec/x86_64/pic.cc index b267faa870..e3a85aa2d5 100644 --- a/repos/base-hw/src/core/spec/x86_64/pic.cc +++ b/repos/base-hw/src/core/spec/x86_64/pic.cc @@ -246,17 +246,24 @@ Global_interrupt_controller::Global_interrupt_controller() _irq_mode[i].trigger_mode = TRIGGER_LEVEL; _irq_mode[i].polarity = POLARITY_LOW; } - - /* remap all IRQs managed by I/O APIC */ - if (i < _irte_count) { - Irte::access_t irte = _create_irt_entry(i); - write(IOREDTBL + 2 * i + 1); - write((Iowin::access_t)(irte >> Iowin::ACCESS_WIDTH)); - write(IOREDTBL + 2 * i); - write((Iowin::access_t)(irte)); - } } -}; + + init(); +} + + +void Global_interrupt_controller::init() +{ + /* remap all IRQs managed by I/O APIC */ + for (unsigned i = 0; i < _irte_count; i++) + { + Irte::access_t irte = _create_irt_entry(i); + write(IOREDTBL + 2 * i + 1); + write((Iowin::access_t)(irte >> Iowin::ACCESS_WIDTH)); + write(IOREDTBL + 2 * i); + write((Iowin::access_t)(irte)); + } +} void Global_interrupt_controller::toggle_mask(unsigned const vector, diff --git a/repos/base-hw/src/core/spec/x86_64/pic.h b/repos/base-hw/src/core/spec/x86_64/pic.h index f70fa85804..37620200dd 100644 --- a/repos/base-hw/src/core/spec/x86_64/pic.h +++ b/repos/base-hw/src/core/spec/x86_64/pic.h @@ -114,6 +114,8 @@ class Board::Global_interrupt_controller : public Genode::Mmio Global_interrupt_controller(); + void init(); + /** * Set/unset mask bit of IRTE for given vector * From 32b1aa605a82e291af38f8db1b247002885e9c75 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 3 Nov 2022 15:31:01 +0100 Subject: [PATCH 0337/1921] hw/x86: add ACPI tables for resume The ACPI table FACS and FADT are required to support ACPI suspend/resume. The commits add the lookup of the ACPI table in bootstrap and the general usage of the ACPI registers via the MMIO framework. Issue #4669 --- repos/base-hw/src/bootstrap/platform.h | 2 +- .../src/bootstrap/spec/x86_64/platform.cc | 64 ++-- .../base-hw/src/include/hw/spec/x86_64/acpi.h | 290 +++++++++++++++++- .../src/include/hw/spec/x86_64/pc_board.h | 1 + 4 files changed, 320 insertions(+), 37 deletions(-) diff --git a/repos/base-hw/src/bootstrap/platform.h b/repos/base-hw/src/bootstrap/platform.h index 54294748a3..5ec4a4e58f 100644 --- a/repos/base-hw/src/bootstrap/platform.h +++ b/repos/base-hw/src/bootstrap/platform.h @@ -45,7 +45,7 @@ class Bootstrap::Platform { Memory_region_array early_ram_regions { }; Memory_region_array late_ram_regions { }; - Mmio_space const core_mmio; + Mmio_space core_mmio; unsigned cpus { ::Board::NR_OF_CPUS }; ::Board::Boot_info info { }; diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc index 4eeca6dc6f..1b64e643e3 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc @@ -170,43 +170,37 @@ Bootstrap::Platform::Board::Board() uint64_t const table_addr = acpi_rsdp.xsdt ? acpi_rsdp.xsdt : acpi_rsdp.rsdt; if (table_addr) { - Hw::Acpi_generic * table = reinterpret_cast(table_addr); + auto rsdt_xsdt_lambda = [&](auto paddr_table) { + addr_t const table_virt_addr = paddr_table; + Hw::Acpi_generic * table = reinterpret_cast(table_virt_addr); + + if (!memcmp(table->signature, "FACP", 4)) { + info.acpi_fadt = addr_t(table); + + auto mem_aligned = paddr_table & _align_mask(12); + auto mem_size = align_addr(paddr_table + table->size, 12) - mem_aligned; + core_mmio.add({ mem_aligned, mem_size }); + } + + if (memcmp(table->signature, "APIC", 4)) + return; + + Hw::for_each_apic_struct(*table,[&](Hw::Apic_madt const *e){ + if (e->type == Hw::Apic_madt::LAPIC) { + Hw::Apic_madt::Lapic lapic(e); + + /* check if APIC is enabled in hardware */ + if (lapic.valid()) + cpus ++; + } + }); + }; + + auto table = reinterpret_cast(table_addr); if (!memcmp(table->signature, "RSDT", 4)) { - Hw::for_each_rsdt_entry(*table, [&](uint32_t paddr_table) { - addr_t const table_virt_addr = paddr_table; - Hw::Acpi_generic * table = reinterpret_cast(table_virt_addr); - - if (memcmp(table->signature, "APIC", 4)) - return; - - Hw::for_each_apic_struct(*table,[&](Hw::Apic_madt const *e){ - if (e->type == Hw::Apic_madt::LAPIC) { - Hw::Apic_madt::Lapic lapic(e); - - /* check if APIC is enabled in hardware */ - if (lapic.valid()) - cpus ++; - } - }); - }); + Hw::for_each_rsdt_entry(*table, rsdt_xsdt_lambda); } else if (!memcmp(table->signature, "XSDT", 4)) { - Hw::for_each_xsdt_entry(*table, [&](uint64_t paddr_table) { - addr_t const table_virt_addr = paddr_table; - Hw::Acpi_generic * table = reinterpret_cast(table_virt_addr); - - if (memcmp(table->signature, "APIC", 4)) - return; - - Hw::for_each_apic_struct(*table,[&](Hw::Apic_madt const *e){ - if (e->type == Hw::Apic_madt::LAPIC) { - Hw::Apic_madt::Lapic lapic(e); - - /* check if APIC is enabled in hardware */ - if (lapic.valid()) - cpus ++; - } - }); - }); + Hw::for_each_xsdt_entry(*table, rsdt_xsdt_lambda); } } } diff --git a/repos/base-hw/src/include/hw/spec/x86_64/acpi.h b/repos/base-hw/src/include/hw/spec/x86_64/acpi.h index 42c188c332..ee61623f5b 100644 --- a/repos/base-hw/src/include/hw/spec/x86_64/acpi.h +++ b/repos/base-hw/src/include/hw/spec/x86_64/acpi.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2018 Genode Labs GmbH + * Copyright (C) 2018-2022 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -20,6 +20,8 @@ namespace Hw { struct Acpi_generic; struct Apic_madt; + struct Acpi_fadt; + struct Acpi_facs; template void for_each_rsdt_entry(Hw::Acpi_generic &, FUNC); @@ -78,6 +80,292 @@ struct Hw::Apic_madt } __attribute__((packed)); +/* ACPI spec 5.2.9 and ACPI GAS 5.2.3.2 */ +struct Hw::Acpi_fadt : Genode::Mmio +{ + enum Addressspace { IO = 0x1 }; + + enum { FW_OFFSET_EXT = 0x84, SLEEP_CONTROL_REG = 236 }; + + struct Size : Register < 0x04, 32> { }; + struct Fw_ctrl : Register < 0x24, 32> { }; + struct Fw_ctrl_ext : Register { }; + + struct Pm1a_cnt_blk : Register < 64, 32> { + struct Slp_typ : Bitfield < 10, 3> { }; + struct Slp_ena : Bitfield < 13, 1> { }; + }; + struct Pm1b_cnt_blk : Register < 68, 32> { + struct Slp_typ : Bitfield < 10, 3> { }; + struct Slp_ena : Bitfield < 13, 1> { }; + }; + + struct Gpe0_blk : Register < 80, 32> { }; + struct Gpe1_blk : Register < 84, 32> { }; + + struct Gpe0_blk_len : Register < 92, 8> { }; + struct Gpe1_blk_len : Register < 93, 8> { }; + + struct Pm1_cnt_len : Register < 89, 8> { }; + + struct Pm1a_cnt_blk_ext : Register < 172, 32> { + struct Addressspace : Bitfield < 0, 8> { }; + struct Width : Bitfield < 8, 8> { }; + }; + struct Pm1a_cnt_blk_ext_addr : Register < 172 + 4, 64> { }; + + struct Pm1b_cnt_blk_ext : Register < 184, 32> { + struct Addressspace : Bitfield < 0, 8> { }; + struct Width : Bitfield < 8, 8> { }; + }; + struct Pm1b_cnt_blk_ext_addr : Register < 184 + 4, 64> { }; + + struct Gpe0_blk_ext : Register < 220, 32> { + struct Addressspace : Bitfield < 0, 8> { }; + struct Width : Bitfield < 8, 8> { }; + }; + struct Gpe0_blk_ext_addr : Register < 220 + 4, 64> { }; + + struct Gpe1_blk_ext : Register < 232, 32> { + struct Addressspace : Bitfield < 0, 8> { }; + struct Width : Bitfield < 8, 8> { }; + }; + struct Gpe1_blk_ext_addr : Register < 232 + 4, 64> { }; + + /** + * Read from I/O port + */ + Genode::uint8_t inb(Genode::uint16_t port) + { + Genode::uint8_t res; + asm volatile ("inb %w1, %0" : "=a"(res) : "Nd"(port)); + return res; + } + + Genode::uint16_t inw(Genode::uint16_t port) + { + Genode::uint16_t res; + asm volatile ("inw %w1, %0" : "=a"(res) : "Nd"(port)); + return res; + } + + Genode::uint32_t inl(Genode::uint16_t port) + { + Genode::uint32_t res; + asm volatile ("inl %w1, %0" : "=a"(res) : "Nd"(port)); + return res; + } + + /** + * Write to I/O port + */ + inline void outb(Genode::uint16_t port, Genode::uint8_t val) + { + asm volatile ("outb %0, %w1" : : "a"(val), "Nd"(port)); + } + + inline void outw(Genode::uint16_t port, Genode::uint16_t val) + { + asm volatile ("outw %0, %w1" : : "a"(val), "Nd"(port)); + } + + inline void outl(Genode::uint16_t port, Genode::uint32_t val) + { + asm volatile ("outl %0, %w1" : : "a"(val), "Nd"(port)); + } + + Acpi_fadt(Acpi_generic const * a) : Mmio(Genode::addr_t(a)) { } + + addr_t facs() const + { + addr_t facs { }; + + if (read() >= FW_OFFSET_EXT + 8) + facs = read(); + + if (!facs) + facs = read(); + + return facs; + } + + void clear_gpe0_status() + { + auto constexpr half_register = true; + + return _write(~0ULL, + half_register); + } + + void clear_gpe1_status() + { + auto constexpr half_register = true; + + return _write(~0ULL, + half_register); + } + + unsigned read_cnt_blk() + { + auto const pm1_a = _read(); + auto const pm1_b = _read(); + return pm1_a | pm1_b; + } + + void write_cnt_blk(unsigned value_a, unsigned value_b) + { + _write(value_a); + _write(value_b); + } + + void suspend(Genode::uint8_t typ_slp_a, Genode::uint8_t typ_slp_b) + { + auto cnt = read_cnt_blk(); + auto value_a = cnt, value_b = cnt; + + Pm1a_cnt_blk::Slp_typ::set(value_a, typ_slp_a); + Pm1a_cnt_blk::Slp_ena::set(value_a, 1); + + Pm1b_cnt_blk::Slp_typ::set(value_b, typ_slp_b); + Pm1b_cnt_blk::Slp_ena::set(value_b, 1); + + write_cnt_blk(value_a, value_b); + } + + template + unsigned _access(bool hw_read, T value, bool half_register = false, + bool half_offset = false) + { + unsigned long long raw_io_addr = 0ull; + unsigned width_bits = 0u; + + auto const register_len = read(); + auto const reg_size = read(); + + if (reg_size >= SLEEP_CONTROL_REG && read() != 0ull) { + if (register_len) + width_bits = register_len * 8; + else { + width_bits = read(); + } + + auto const as = read(); + if (as != Addressspace::IO) { + Genode::error("unsupported address space access method ", as); + return 0; + } + + raw_io_addr = read(); + } else if (read() != 0 && register_len != 0) { + width_bits = register_len * 8; + raw_io_addr = read(); + } + + if (!width_bits || !raw_io_addr) + return 0u; + + /* I/O address has to be 16 bit */ + if (raw_io_addr >= (1ull << 16) || width_bits >= (1ull << 16)) { + Genode::error("too large I/O address ", raw_io_addr, " ", width_bits); + return 0u; + } + + Genode::uint16_t io_addr = Genode::uint16_t(raw_io_addr); + + if (half_register) + width_bits /= 2; + + if (half_offset) + io_addr += Genode::uint16_t(width_bits) / 2 / 8; + + if (hw_read) { + switch (width_bits) { + case 8: + return inb(io_addr); + case 16: + return inw(io_addr); + case 32: + return inl(io_addr); + default: + Genode::error("unsupported width for I/O IN : ", width_bits); + } + } else { + switch (width_bits) { + case 8: + outb(io_addr, Genode::uint8_t(value)); + break; + case 16: + outw(io_addr, Genode::uint16_t(value)); + break; + case 32: + outl(io_addr, Genode::uint32_t(value)); + break; + case 64: + outl(io_addr, Genode::uint32_t(value)); + if (sizeof(value) == 8) + outl(io_addr + 4, Genode::uint32_t(value >> 32)); + break; + default: + Genode::error("unsupported width for I/O OUT : ", width_bits); + } + } + return 0u; + } + + template + unsigned _read(bool half_register = false, bool half_offset = false) + { + enum { READ = true }; + unsigned value = 0; + + return _access(READ, value, half_register, half_offset); + } + + template + void _write(T value, bool half_register = false, bool half_offset = false) + { + enum { WRITE = false }; + + _access(WRITE, value, half_register, half_offset); + } +}; + + +struct Hw::Acpi_facs : Genode::Mmio +{ + struct Length : Register < 0x04, 32> { }; + struct Fw_wake_vector : Register < 0x0c, 32> { }; + struct Fw_wake_vector_ext : Register < 0x18, 64> { }; + + void wakeup_vector(addr_t const entry) + { + auto len = read(); + if (len >= 0x0c + 4) + write(unsigned(entry)); + + if (len >= 0x18 + 8) + write(0); + } + + Acpi_facs(addr_t const mmio) : Mmio(mmio) { } +}; + + template void Hw::for_each_rsdt_entry(Hw::Acpi_generic &rsdt, FUNC fn) { diff --git a/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h b/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h index 352f51ac64..e254faac64 100644 --- a/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h +++ b/repos/base-hw/src/include/hw/spec/x86_64/pc_board.h @@ -39,6 +39,7 @@ struct Hw::Pc_board::Boot_info Acpi_rsdp acpi_rsdp { }; Framebuffer framebuffer { }; Genode::addr_t efi_system_table { 0 }; + Genode::addr_t acpi_fadt { 0 }; Boot_info() {} Boot_info(Acpi_rsdp const &acpi_rsdp, From faf54244c418bdfb4c6835d3c50d7d59a76aa5fd Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Fri, 9 Dec 2022 15:19:44 +0100 Subject: [PATCH 0338/1921] hw/x86: keep cpu id after resume The CPUs are woken all at once and up to now the IDs are assigned depending on the arrival order, which is unfortunate for the resume case. Keep track of once assigned IDs for CPUs, so that on resume the very same CPU id is given. The APIC id is guaranteed to be fixed per CPU on suspend, but unfortunately not dense packed. Issue #4669 --- .../src/bootstrap/spec/x86_64/platform.cc | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc index 1b64e643e3..45ffeefa66 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 2015-2018 Genode Labs GmbH + * Copyright (C) 2015-2022 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -64,6 +64,31 @@ static Hw::Acpi_rsdp search_rsdp(addr_t area, addr_t area_size) } +static Genode::uint8_t apic_id() +{ + X86_64_CPUID_REGISTER(Cpuid_1_ebx, 1, ebx, + struct Apic_id : Bitfield<24, 8> { }; + ); + + return uint8_t(Cpuid_1_ebx::Apic_id::get(Cpuid_1_ebx::read())); +} + + +unsigned apic_to_cpu_id(Genode::uint8_t apic_id, Genode::uint8_t dense_id) +{ + static Genode::uint8_t cpu_id[256] { }; + static bool valid [256] { }; + + /* if apic_id is valid, return stored cpu_id and ignore new dense_id */ + if (!valid[apic_id]) { + cpu_id[apic_id] = dense_id; + valid [apic_id] = true; + } + + return cpu_id[apic_id]; +} + + Bootstrap::Platform::Board::Board() : core_mmio(Memory_region { 0, 0x1000 }, @@ -292,7 +317,10 @@ unsigned Bootstrap::Platform::enable_mmu() addr_t const stack_base = reinterpret_cast(&bootstrap_stack); addr_t const this_stack = reinterpret_cast(&stack_base); - addr_t const cpu_id = (this_stack - stack_base) / bootstrap_stack_size; + addr_t const stack_id = (this_stack - stack_base) / bootstrap_stack_size; + + /* determine dense packed cpu_id based on apic_id */ + auto const cpu_id = apic_to_cpu_id(apic_id(), uint8_t(stack_id)); /* we like to use local APIC */ Cpu::IA32_apic_base::access_t lapic_msr = Cpu::IA32_apic_base::read(); From 1ea6708d84c476db01a7a8f13ceedad12a93294a Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 6 Dec 2022 12:55:39 +0100 Subject: [PATCH 0339/1921] hw/x86: prepare ACPI resume entry Set wakeup pointer in FADT/FACS tables and prepare/place ACPI resume code at application processors (AP) 16-bit entry. Exclude memory used for AP resume from RAM range to avoid usage by Genode core in allocators. Issue #4669 --- .../src/bootstrap/spec/x86_64/platform.cc | 51 +++++++++++++++---- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc index 45ffeefa66..dee7aeb52f 100644 --- a/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc +++ b/repos/base-hw/src/bootstrap/spec/x86_64/platform.cc @@ -34,7 +34,7 @@ extern "C" Genode::addr_t __initial_bx; extern "C" Genode::addr_t bootstrap_stack; /* number of booted CPUs */ -extern "C" Genode::addr_t __cpus_booted; +extern "C" Genode::addr_t volatile __cpus_booted; /* stack size per CPU */ extern "C" Genode::addr_t const bootstrap_stack_size; @@ -112,6 +112,31 @@ Bootstrap::Platform::Board::Board() size -= get_page_size(); } + /* exclude AP boot code page from normal RAM allocator */ + if (base <= AP_BOOT_CODE_PAGE && AP_BOOT_CODE_PAGE < base + size) { + if (AP_BOOT_CODE_PAGE - base) + early_ram_regions.add(Memory_region { base, + AP_BOOT_CODE_PAGE - base }); + + size -= AP_BOOT_CODE_PAGE - base; + size -= (get_page_size() > size) ? size : get_page_size(); + base = AP_BOOT_CODE_PAGE + get_page_size(); + } + + /* skip partial 4k pages (seen with Qemu with ahci model enabled) */ + if (!aligned(base, 12)) { + auto new_base = align_addr(base, 12); + size -= (new_base - base > size) ? size : new_base - base; + base = new_base; + } + + /* remove partial 4k pages */ + if (!aligned(size, 12)) + size -= size & 0xffful; + + if (!size) + return; + if (base >= initial_map_max) { late_ram_regions.add(Memory_region { base, size }); return; @@ -202,6 +227,10 @@ Bootstrap::Platform::Board::Board() if (!memcmp(table->signature, "FACP", 4)) { info.acpi_fadt = addr_t(table); + Hw::Acpi_fadt fadt(table); + Hw::Acpi_facs facs(fadt.facs()); + facs.wakeup_vector(AP_BOOT_CODE_PAGE); + auto mem_aligned = paddr_table & _align_mask(12); auto mem_size = align_addr(paddr_table + table->size, 12) - mem_aligned; core_mmio.add({ mem_aligned, mem_size }); @@ -237,11 +266,9 @@ Bootstrap::Platform::Board::Board() cpus = !cpus ? 1 : max_cpus; } - if (cpus > 1) { - /* copy 16 bit boot code for AP CPUs */ - addr_t ap_code_size = (addr_t)&_start - (addr_t)&_ap; - memcpy((void *)AP_BOOT_CODE_PAGE, &_ap, ap_code_size); - } + /* copy 16 bit boot code for AP CPUs and for ACPI resume */ + addr_t ap_code_size = (addr_t)&_start - (addr_t)&_ap; + memcpy((void *)AP_BOOT_CODE_PAGE, &_ap, ap_code_size); } @@ -327,16 +354,20 @@ unsigned Bootstrap::Platform::enable_mmu() Cpu::IA32_apic_base::Lapic::set(lapic_msr); Cpu::IA32_apic_base::write(lapic_msr); - /* skip the SMP when ACPI parsing did not reveal the number of CPUs */ - if (board.cpus <= 1) - return (unsigned)cpu_id; - Lapic lapic(board.core_mmio.virt_addr(Hw::Cpu_memory_map::lapic_phys_base())); /* enable local APIC if required */ if (!lapic.read()) lapic.write(true); + /* reset assembly counter (crt0.s) by last booted CPU, required for resume */ + if (__cpus_booted >= board.cpus) + __cpus_booted = 0; + + /* skip wakeup IPI for non SMP setups */ + if (board.cpus <= 1) + return (unsigned)cpu_id; + if (!Cpu::IA32_apic_base::Bsp::get(lapic_msr)) /* AP - done */ return (unsigned)cpu_id; From 30c6feb86ecc98c928485d487e140db1fa6b2026 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 23 Jan 2023 14:56:45 +0100 Subject: [PATCH 0340/1921] hw/x86: re-init devices on resume Issue #4669 --- repos/base-hw/src/core/spec/x86_64/kernel/cpu.cc | 4 ++++ repos/base-hw/src/core/spec/x86_64/pic.cc | 5 +++++ repos/base-hw/src/core/spec/x86_64/pic.h | 2 ++ repos/base-hw/src/core/spec/x86_64/pit.cc | 7 +++++++ repos/base-hw/src/core/spec/x86_64/pit.h | 3 ++- 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/cpu.cc b/repos/base-hw/src/core/spec/x86_64/kernel/cpu.cc index 7c1798df62..5dcc44a2bd 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/cpu.cc +++ b/repos/base-hw/src/core/spec/x86_64/kernel/cpu.cc @@ -22,6 +22,10 @@ void Kernel::Cpu::_arch_init() Idt::init(); Tss::init(); + _pic.init(); + _timer.init(); + _ipi_irq.init(); + /* enable timer interrupt */ _pic.store_apic_id(id()); _pic.unmask(_timer.interrupt_id(), id()); diff --git a/repos/base-hw/src/core/spec/x86_64/pic.cc b/repos/base-hw/src/core/spec/x86_64/pic.cc index e3a85aa2d5..a151b1482a 100644 --- a/repos/base-hw/src/core/spec/x86_64/pic.cc +++ b/repos/base-hw/src/core/spec/x86_64/pic.cc @@ -42,6 +42,11 @@ Local_interrupt_controller(Global_interrupt_controller &global_irq_ctrl) : Mmio { Platform::mmio_to_virt(Hw::Cpu_memory_map::lapic_phys_base()) }, _global_irq_ctrl { global_irq_ctrl } +{ + init(); +} + +void Local_interrupt_controller::init() { /* Start initialization sequence in cascade mode */ outb(PIC_CMD_MASTER, 0x11); diff --git a/repos/base-hw/src/core/spec/x86_64/pic.h b/repos/base-hw/src/core/spec/x86_64/pic.h index 37620200dd..d8243e9aca 100644 --- a/repos/base-hw/src/core/spec/x86_64/pic.h +++ b/repos/base-hw/src/core/spec/x86_64/pic.h @@ -230,6 +230,8 @@ class Board::Local_interrupt_controller : public Genode::Mmio } void send_ipi(unsigned const); + + void init(); }; #endif /* _CORE__SPEC__X86_64__PIC_H_ */ diff --git a/repos/base-hw/src/core/spec/x86_64/pit.cc b/repos/base-hw/src/core/spec/x86_64/pit.cc index 119c4930a1..bb07ae6f77 100644 --- a/repos/base-hw/src/core/spec/x86_64/pit.cc +++ b/repos/base-hw/src/core/spec/x86_64/pit.cc @@ -69,6 +69,12 @@ void Board::Timer::init() write(0); write(0); + /* use very same divider after ACPI resume as used during initial boot */ + if (divider) { + write((uint8_t)divider); + return; + } + /* calibrate LAPIC frequency to fullfill our requirements */ for (Divide_configuration::access_t div = Divide_configuration::Divide_value::MAX; div && ticks_per_ms < TIMER_MIN_TICKS_PER_MS; div--) @@ -81,6 +87,7 @@ void Board::Timer::init() /* Calculate timer frequency */ ticks_per_ms = pit_calc_timer_freq(); + divider = div; } /** diff --git a/repos/base-hw/src/core/spec/x86_64/pit.h b/repos/base-hw/src/core/spec/x86_64/pit.h index 562a63533c..0d6bad1785 100644 --- a/repos/base-hw/src/core/spec/x86_64/pit.h +++ b/repos/base-hw/src/core/spec/x86_64/pit.h @@ -66,7 +66,8 @@ struct Board::Timer: Genode::Mmio struct Calibration_failed : Genode::Exception { }; - Genode::uint32_t ticks_per_ms = 0; + Divide_configuration::access_t divider = 0; + Genode::uint32_t ticks_per_ms = 0; /* Measure LAPIC timer frequency using PIT channel 2 */ Genode::uint32_t pit_calc_timer_freq(void); From df27cc87b5abb1d6974ee85f5d09e0e8dcb3e7b2 Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Mon, 5 Dec 2022 15:25:12 +0100 Subject: [PATCH 0341/1921] hw/x86: add suspend kernel syscall using the ACPI mechanism. The syscall can be triggered solely via core's RPC managing_system call. Issue #4669 --- repos/base-hw/include/kernel/interface.h | 16 +++ .../base-hw/lib/mk/spec/x86_64/core-hw-pc.mk | 4 + repos/base-hw/src/core/kernel/thread.cc | 1 + repos/base-hw/src/core/kernel/thread.h | 1 + repos/base-hw/src/core/platform.h | 6 + .../src/core/spec/arm/kernel/thread.cc | 3 + .../src/core/spec/arm_v8/kernel/thread.cc | 3 + .../src/core/spec/riscv/kernel/thread.cc | 3 + .../src/core/spec/x86_64/kernel/thread.cc | 132 +++++++++++++++++- .../core/spec/x86_64/pd_session_support.cc | 60 ++++++++ repos/libports/run/acpi_suspend.run | 9 +- 11 files changed, 233 insertions(+), 5 deletions(-) create mode 100644 repos/base-hw/src/core/spec/x86_64/pd_session_support.cc diff --git a/repos/base-hw/include/kernel/interface.h b/repos/base-hw/include/kernel/interface.h index f636b60075..0925f0c6dc 100644 --- a/repos/base-hw/include/kernel/interface.h +++ b/repos/base-hw/include/kernel/interface.h @@ -46,6 +46,7 @@ namespace Kernel { constexpr Call_arg call_id_time() { return 21; } constexpr Call_arg call_id_run_vm() { return 22; } constexpr Call_arg call_id_pause_vm() { return 23; } + constexpr Call_arg call_id_suspend() { return 24; } /***************************************************************** @@ -431,6 +432,21 @@ namespace Kernel { { call(call_id_pause_vm(), cap); } + + + /** + * Suspend hardware + * + * \param sleep_type The intended sleep state S0 ... S5. The values are + * read out by an ACPI AML component and are of type + * TYP_SLPx as described in the ACPI specification, + * e.g. TYP_SLPa and TYP_SLPb. The values differ + * between different PC systems/boards. + */ + inline bool suspend(unsigned const sleep_type) + { + return bool(call(call_id_suspend(), sleep_type)); + } } #endif /* _INCLUDE__KERNEL__INTERFACE_H_ */ diff --git a/repos/base-hw/lib/mk/spec/x86_64/core-hw-pc.mk b/repos/base-hw/lib/mk/spec/x86_64/core-hw-pc.mk index 318083f6f9..bf44809ada 100644 --- a/repos/base-hw/lib/mk/spec/x86_64/core-hw-pc.mk +++ b/repos/base-hw/lib/mk/spec/x86_64/core-hw-pc.mk @@ -37,6 +37,10 @@ SRC_CC += spec/x86_64/platform_support_common.cc SRC_CC += spec/64bit/memory_map.cc +PD_SESSION_SUPPORT_CC_PATH := \ + $(call select_from_repositories,src/core/spec/x86_64/pd_session_support.cc) + +vpath pd_session_support.cc $(dir $(PD_SESSION_SUPPORT_CC_PATH)) vpath spec/64bit/memory_map.cc $(call select_from_repositories,src/lib/hw) # include less specific configuration diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index 4b375ab691..b11ce7deca 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -870,6 +870,7 @@ void Thread::_call() case call_id_ack_irq(): _call_ack_irq(); return; case call_id_new_obj(): _call_new_obj(); return; case call_id_delete_obj(): _call_delete_obj(); return; + case call_id_suspend(): _call_suspend(); return; default: Genode::raw(*this, ": unknown kernel call"); _die(); diff --git a/repos/base-hw/src/core/kernel/thread.h b/repos/base-hw/src/core/kernel/thread.h index 926f434db4..604deba6bd 100644 --- a/repos/base-hw/src/core/kernel/thread.h +++ b/repos/base-hw/src/core/kernel/thread.h @@ -295,6 +295,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout void _call_timeout(); void _call_timeout_max_us(); void _call_time(); + void _call_suspend(); template void _call_new(ARGS &&... args) diff --git a/repos/base-hw/src/core/platform.h b/repos/base-hw/src/core/platform.h index 8924242887..acbf059d0e 100644 --- a/repos/base-hw/src/core/platform.h +++ b/repos/base-hw/src/core/platform.h @@ -150,6 +150,12 @@ class Genode::Platform : public Genode::Platform_generic size_t max_caps() const override { return Kernel::Pd::max_cap_ids; } static addr_t core_main_thread_phys_utcb(); + + template + static void apply_with_boot_info(T const &fn) + { + fn(_boot_info()); + } }; #endif /* _CORE__PLATFORM_H_ */ diff --git a/repos/base-hw/src/core/spec/arm/kernel/thread.cc b/repos/base-hw/src/core/spec/arm/kernel/thread.cc index 0a63aac23b..9628aedff3 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/thread.cc @@ -26,6 +26,9 @@ using namespace Kernel; extern "C" void kernel_to_user_context_switch(Cpu::Context*, Cpu::Fpu_context*); +void Thread::_call_suspend() { } + + void Thread::exception(Cpu & cpu) { switch (regs->cpu_exception) { diff --git a/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc b/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc index 34946b1183..7a6486a64d 100644 --- a/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/arm_v8/kernel/thread.cc @@ -24,6 +24,9 @@ extern "C" void kernel_to_user_context_switch(void *, void *); using namespace Kernel; +void Thread::_call_suspend() { } + + void Thread::exception(Cpu & cpu) { switch (regs->exception_type) { diff --git a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc index 6ab3c3004d..4f95ff17e7 100644 --- a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc @@ -95,6 +95,9 @@ void Thread::exception(Cpu & cpu) } +void Thread::_call_suspend() { } + + void Thread::_call_cache_coherent_region() { } diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc index 3ed9b75986..3d0c2c61ea 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc @@ -7,7 +7,7 @@ */ /* - * Copyright (C) 2013-2017 Genode Labs GmbH + * Copyright (C) 2013-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -18,6 +18,11 @@ #include #include +#include +#include + +#include + void Kernel::Thread::Tlb_invalidation::execute(Cpu &) { @@ -29,13 +34,132 @@ void Kernel::Thread::Tlb_invalidation::execute(Cpu &) global_work_list.remove(&_le); caller._restart(); } -}; +} -void Kernel::Thread::Flush_and_stop_cpu::execute(Cpu &) { } +void Kernel::Thread::Flush_and_stop_cpu::execute(Cpu &cpu) +{ + if (--cpus_left == 0) { + /* last CPU triggers final ACPI suspend outside kernel lock */ + cpu.suspend.typ_a = suspend.typ_a; + cpu.suspend.typ_b = suspend.typ_b; + cpu.next_state_suspend(); + return; + } + + /* halt CPU outside kernel lock */ + cpu.next_state_halt(); + + /* adhere to ACPI specification */ + asm volatile ("wbinvd" : : : "memory"); +} -void Kernel::Cpu::Halt_job::proceed(Kernel::Cpu &) { } +void Kernel::Cpu::Halt_job::Halt_job::proceed(Kernel::Cpu &cpu) +{ + switch (cpu.state()) { + case HALT: + while (true) { + asm volatile ("hlt"); } + break; + case SUSPEND: + using Genode::Platform; + + Platform::apply_with_boot_info([&](auto const &boot_info) { + auto table = boot_info.plat_info.acpi_fadt; + auto acpi_fadt_table = reinterpret_cast(Platform::mmio_to_virt(table)); + + /* paranoia */ + if (!acpi_fadt_table) + return; + + /* all CPUs signaled that they are stopped, trigger ACPI suspend */ + Hw::Acpi_fadt fadt(acpi_fadt_table); + + /* ack all GPEs, otherwise we may wakeup immediately */ + fadt.clear_gpe0_status(); + fadt.clear_gpe1_status(); + + /* adhere to ACPI specification */ + asm volatile ("wbinvd" : : : "memory"); + + fadt.suspend(cpu.suspend.typ_a, cpu.suspend.typ_b); + + Genode::raw("kernel: unexpected resume"); + }); + break; + default: + break; + } + + Genode::raw("unknown cpu state"); + while (true) { + asm volatile ("hlt"); + } +} + + +void Kernel::Thread::_call_suspend() +{ + using Genode::uint8_t; + using Genode::Platform; + + Hw::Acpi_generic * acpi_fadt_table { }; + unsigned cpu_count { }; + + Platform::apply_with_boot_info([&](auto const &boot_info) { + auto table = boot_info.plat_info.acpi_fadt; + if (table) + acpi_fadt_table = reinterpret_cast(Platform::mmio_to_virt(table)); + + cpu_count = boot_info.cpus; + }); + + if (!acpi_fadt_table || !cpu_count) { + user_arg_0(0 /* fail */); + return; + } + + if (_stop_cpu.constructed()) { + if (_stop_cpu->cpus_left) { + Genode::raw("kernel: resume still ongoing"); + user_arg_0(0 /* fail */); + return; + } + + /* remove & destruct Flush_and_stop_cpu object */ + _stop_cpu.destruct(); + user_arg_0(1 /* success */); + + return; + } + + auto const sleep_typ_a = uint8_t(user_arg_1()); + auto const sleep_typ_b = uint8_t(user_arg_1() >> 8); + + _stop_cpu.construct(_cpu_pool.work_list(), cpu_count - 1, + Hw::Suspend_type { sleep_typ_a, sleep_typ_b }); + + /* single core CPU case */ + if (cpu_count == 1) { + auto &cpu = _cpu_pool.executing_cpu(); + /* this CPU triggers final ACPI suspend outside kernel lock */ + cpu.next_state_suspend(); + return; + } + + /* trigger IPIs to all beside current CPU */ + _cpu_pool.for_each_cpu([&] (Cpu &cpu) { + + if (cpu.id() == Cpu::executing_id()) { + /* halt CPU outside kernel lock */ + cpu.next_state_halt(); + return; + } + + cpu.trigger_ip_interrupt(); + }); +} void Kernel::Thread::_call_cache_coherent_region() { } diff --git a/repos/base-hw/src/core/spec/x86_64/pd_session_support.cc b/repos/base-hw/src/core/spec/x86_64/pd_session_support.cc new file mode 100644 index 0000000000..d3b32ff266 --- /dev/null +++ b/repos/base-hw/src/core/spec/x86_64/pd_session_support.cc @@ -0,0 +1,60 @@ +/* + * \brief Core implementation of the PD session interface + * \author Alexander Boettcher + * \date 2022-12-02 + */ + +/* + * Copyright (C) 2022 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include +#include + +using namespace Genode; +using State = Genode::Pd_session::Managing_system_state; + + +State Pd_session_component::managing_system(State const &request) +{ + bool const suspend = (_managing_system == Managing_system::PERMITTED) && + (request.trapno == State::ACPI_SUSPEND_REQUEST); + State respond { }; + + if (!suspend) { + /* report failed attempt */ + respond.trapno = 0; + return respond; + } + + /* + * The trapno/ip/sp registers used below are just convention to transfer + * the intended sleep state S0 ... S5. The values are read out by an + * ACPI AML component and are of type TYP_SLPx as described in the + * ACPI specification, e.g. TYP_SLPa and TYP_SLPb. The values differ + * between different PC systems/boards. + * + * \note trapno/ip/sp registers are chosen because they exist in + * Managing_system_state for x86_32 and x86_64. + */ + unsigned const sleep_type_a = request.ip & 0xffu; + unsigned const sleep_type_b = request.sp & 0xffu; + + respond.trapno = Kernel::suspend((sleep_type_b << 8) | sleep_type_a); + + return respond; +} + + +/*************************** + ** Dummy implementations ** + ***************************/ + +bool Pd_session_component::assign_pci(addr_t, uint16_t) { return true; } + + +void Pd_session_component::map(addr_t, addr_t) { } + diff --git a/repos/libports/run/acpi_suspend.run b/repos/libports/run/acpi_suspend.run index 8bd59aaa95..2f04f2e122 100644 --- a/repos/libports/run/acpi_suspend.run +++ b/repos/libports/run/acpi_suspend.run @@ -10,7 +10,14 @@ # assert_spec x86 -assert_spec nova + +if { + ![have_spec hw] && + ![have_spec nova] +} { + puts "Platform is unsupported." + exit 0 +} # non Intel machines has no GPU support, e.g. Qemu and AMD set board_non_intel [expr [have_include "power_on/qemu"]] From e2c334d6e4df76e4db7d901d49c56b2d2c7506e4 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Mon, 13 Feb 2023 10:13:18 +0100 Subject: [PATCH 0342/1921] linux: allow more workers when scheduling works Workers are only summoned by the manager or when there are no workers on a work queue. In case a work in front of a work queue depends on a work behind it, a deadlock may occur. To solve this Linux spawns a rescue worker using timers. Timing of Linux based drivers is currently reworked and not reliable. Therefore, we increase the number of workers that are spawned from 1 to 3 per work queue in order to resolve possible deadlocks. Fixes #4762 --- .../patches/workqueue_deadlock.patch | 20 +++++++++++++++++++ repos/dde_linux/ports/linux.hash | 2 +- repos/dde_linux/ports/linux.port | 4 +++- 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 repos/dde_linux/patches/workqueue_deadlock.patch diff --git a/repos/dde_linux/patches/workqueue_deadlock.patch b/repos/dde_linux/patches/workqueue_deadlock.patch new file mode 100644 index 0000000000..bffdd0fb5e --- /dev/null +++ b/repos/dde_linux/patches/workqueue_deadlock.patch @@ -0,0 +1,20 @@ +This patch increases the amount of worker that will be spawned upon a work queue +when a work is submitted. The patch implies that three workers will be used for +three works (before it was one). The fourth work will be queued. + +diff --git a/kernel/workqueue.c b/kernel/workqueue.c +index ccad28b..ed16e05 100644 +--- a/kernel/workqueue.c ++++ b/kernel/workqueue.c +@@ -763,7 +763,10 @@ static bool work_is_canceling(struct work_struct *work) + + static bool __need_more_worker(struct worker_pool *pool) + { +- return !atomic_read(&pool->nr_running); ++ /* ++ * Assume two works can deadlock and make a third available ++ */ ++ return atomic_read(&pool->nr_running) < 3; + } + + /* diff --git a/repos/dde_linux/ports/linux.hash b/repos/dde_linux/ports/linux.hash index b9daa17cd4..03391f4c34 100644 --- a/repos/dde_linux/ports/linux.hash +++ b/repos/dde_linux/ports/linux.hash @@ -1 +1 @@ -e6468ebf5e274f248bf6c8362fe6b59107ff7122 +04e5e6e790ae0a41343fec197667cc94a1bc3f25 diff --git a/repos/dde_linux/ports/linux.port b/repos/dde_linux/ports/linux.port index cfa8253995..e60c8a6874 100644 --- a/repos/dde_linux/ports/linux.port +++ b/repos/dde_linux/ports/linux.port @@ -11,10 +11,12 @@ DIR(linux) := src/linux # PATCH_FILES := i915_irq.patch i915_alderlake.patch xhci_fix_event_37.patch \ xhci_abort_ring.patch iwlwifi_enable_irq_before_pnvm.patch \ - realloc-fix-gcc-12.patch + realloc-fix-gcc-12.patch \ + workqueue_deadlock.patch PATCHES += $(addprefix patches/,$(PATCH_FILES)) # i915 PATCH_OPT(patches/i915_irq.patch) := -p1 -d${DIR(linux)} PATCH_OPT(patches/xhci_abort_ring.patch) := -p1 -d${DIR(linux)} PATCH_OPT(patches/xhci_fix_event_37.patch) := -p1 -d${DIR(linux)} +PATCH_OPT(patches/workqueue_deadlock.patch) := -p1 -d${DIR(linux)} From 8145ff63037870c548702cbf256bf4e7cb197b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 13 Feb 2023 11:10:23 +0100 Subject: [PATCH 0343/1921] qemu-usb: only copy data when packet succeeded In case the packet is erronous the value of 'actual_size' can be invalid and using it may lead to a page-fault due to out-of-bounce access. With this commit access is only performed on successful packets. Fixes #4763. --- repos/libports/src/lib/qemu-usb/host.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/repos/libports/src/lib/qemu-usb/host.cc b/repos/libports/src/lib/qemu-usb/host.cc index 0ef3c6b219..023d9f1dc8 100644 --- a/repos/libports/src/lib/qemu-usb/host.cc +++ b/repos/libports/src/lib/qemu-usb/host.cc @@ -162,15 +162,16 @@ struct Completion : Usb::Completion p->actual_length = 0; - if (p->pid == USB_TOKEN_IN && actual_size > 0) { - if (data) Genode::memcpy(data, content, actual_size); - else usb_packet_copy(p, content, actual_size); - } + if (packet.succeded) { - p->actual_length = actual_size; + if (p->pid == USB_TOKEN_IN && actual_size > 0) { + if (data) Genode::memcpy(data, content, actual_size); + else usb_packet_copy(p, content, actual_size); + } - if (packet.succeded) + p->actual_length = actual_size; p->status = USB_RET_SUCCESS; + } else { if (packet.error == Packet_error::STALL_ERROR) p->status = USB_RET_STALL; From a4d45921c6a819107f9d17e44f0734f5616cefb2 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 24 Feb 2023 14:03:58 +0100 Subject: [PATCH 0344/1921] Document event handling in acpi_event --- repos/libports/src/app/acpi_event/README | 79 ++++++++++++++++++++++++ repos/libports/src/app/acpica/README | 8 +++ 2 files changed, 87 insertions(+) create mode 100644 repos/libports/src/app/acpi_event/README diff --git a/repos/libports/src/app/acpi_event/README b/repos/libports/src/app/acpi_event/README new file mode 100644 index 0000000000..5dfe90d49d --- /dev/null +++ b/repos/libports/src/app/acpi_event/README @@ -0,0 +1,79 @@ +This component maps ACPI events from ROMs to key events of an Event session. + +The _acpica_ component uses the Intel ACPICA library to parse and interpret +ACPI tables and AML code. One designated feature is the monitoring of +several ACPI event sources incl. optionally reporting of information about +state changes. The _acpi_event_ component maps the reported ACPI events to +key events of a requested Event session based on configuration. So, ACPI +state changes can be processed like ordinary key press-release events via, +for example, the _event_filter_. + +Configuration +------------- + +A mapping node consists of the event type in the 'acpi' attribute, a +type-specific 'value', and a key name that should be generated in 'to_key'. + +! + +The following mapping node types are supported. + +:acpi="lid": lid events with value 'CLOSED' or 'OPEN' + +:acpi="battery": battery events + +:acpi="fixed": currently power-button presses only + +:acpi="ac": AC-dapter plug/unplug with value 'ONLINE' or 'OFFLINE' + +:acpi="ec": embedded controller events with value representing the data byte + read from the controller + +:acpi="hid": vendor-specific events, currently Fujitsu FUJ02E3 + +Example configuration +--------------------- + +For a complete scenario please look into repos/libports/run/acpica.run. + +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! diff --git a/repos/libports/src/app/acpica/README b/repos/libports/src/app/acpica/README index 7ac6a4cfa9..340dfd58f3 100644 --- a/repos/libports/src/app/acpica/README +++ b/repos/libports/src/app/acpica/README @@ -14,6 +14,7 @@ sources: - ACPI fixed events - e.g. power button - ACPI AC adapters - power cable plugged/un-plugged - ACPI Embedded controller - some Fn-* keys and on some machines also Lid, AC, SB changes +- Vendor-specific hardware - currently Fujitsu FUJ02E3 key events Whenever a state change is detected, a Genode report is generated, if a config attribute "report" is set to "yes". The reports are named @@ -134,3 +135,10 @@ Report 'acpi_battery' - smart battery status changes ! battery not present ! ... ! + +! +! +! triggered +! +! +! From 470f07d462fef27afbc0ffbf33bff3d16260f04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20B=C3=A4r?= Date: Fri, 24 Feb 2023 11:20:47 +0100 Subject: [PATCH 0345/1921] Some documentation tweaks/cleanups Fixes #4773 --- repos/gems/src/server/file_terminal/README | 15 +++++++-------- repos/os/src/server/vfs_block/README | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/repos/gems/src/server/file_terminal/README b/repos/gems/src/server/file_terminal/README index 443e4cf324..ec232e09f2 100644 --- a/repos/gems/src/server/file_terminal/README +++ b/repos/gems/src/server/file_terminal/README @@ -2,14 +2,13 @@ File terminal is a service that provides a terminal-session interface and redirects the terminal input and output to a file. ! -! -! h -! -! -! -! -! -! +! +! +! +! +! +! +! ! To keep things simple, a client can only open one file at the moment. diff --git a/repos/os/src/server/vfs_block/README b/repos/os/src/server/vfs_block/README index c2e2ee3892..0eb8b80cd3 100644 --- a/repos/os/src/server/vfs_block/README +++ b/repos/os/src/server/vfs_block/README @@ -22,7 +22,7 @@ component: ! file="/vfs_block.img" block_size="512" writeable="yes"/> ! ! -! ! ! ! From e265cf6d49de99343172315b9ad6c94b804937ca Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 27 Feb 2023 08:05:18 +0100 Subject: [PATCH 0346/1921] depot: update recipe hashes --- repos/base-fiasco/recipes/src/base-fiasco/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash | 2 +- repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash | 2 +- repos/base-foc/recipes/src/base-foc-pbxa9/hash | 2 +- repos/base-foc/recipes/src/base-foc-pc/hash | 2 +- repos/base-foc/recipes/src/base-foc-rpi3/hash | 2 +- repos/base-hw/recipes/api/base-hw/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx53_qsb/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash | 2 +- repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash | 2 +- repos/base-hw/recipes/src/base-hw-nit6_solox/hash | 2 +- repos/base-hw/recipes/src/base-hw-pbxa9/hash | 2 +- repos/base-hw/recipes/src/base-hw-pc/hash | 2 +- repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash | 2 +- repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash | 2 +- repos/base-linux/recipes/api/base-linux/hash | 2 +- repos/base-linux/recipes/src/base-linux/hash | 2 +- repos/base-nova/recipes/src/base-nova/hash | 2 +- repos/base-okl4/recipes/src/base-okl4/hash | 2 +- repos/base-pistachio/recipes/src/base-pistachio/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash | 2 +- repos/base-sel4/recipes/src/base-sel4-x86/hash | 2 +- repos/base/recipes/api/base/hash | 2 +- repos/base/recipes/pkg/test-ds_ownership/hash | 2 +- repos/base/recipes/pkg/test-entrypoint/hash | 2 +- repos/base/recipes/pkg/test-log/hash | 2 +- repos/base/recipes/pkg/test-mmio/hash | 2 +- repos/base/recipes/pkg/test-new_delete/hash | 2 +- repos/base/recipes/pkg/test-reconstructible/hash | 2 +- repos/base/recipes/pkg/test-registry/hash | 2 +- repos/base/recipes/pkg/test-rm_fault/hash | 2 +- repos/base/recipes/pkg/test-rm_fault_no_nox/hash | 2 +- repos/base/recipes/pkg/test-rm_nested/hash | 2 +- repos/base/recipes/pkg/test-rm_stress/hash | 2 +- repos/base/recipes/pkg/test-sanitizer/hash | 2 +- repos/base/recipes/pkg/test-stack_smash/hash | 2 +- repos/base/recipes/pkg/test-synced_interface/hash | 2 +- repos/base/recipes/pkg/test-timer/hash | 2 +- repos/base/recipes/pkg/test-tls/hash | 2 +- repos/base/recipes/pkg/test-token/hash | 2 +- repos/base/recipes/pkg/test-xml_generator/hash | 2 +- repos/base/recipes/pkg/test-xml_node/hash | 2 +- repos/base/recipes/src/test-ds_ownership/hash | 2 +- repos/base/recipes/src/test-entrypoint/hash | 2 +- repos/base/recipes/src/test-log/hash | 2 +- repos/base/recipes/src/test-mmio/hash | 2 +- repos/base/recipes/src/test-new_delete/hash | 2 +- repos/base/recipes/src/test-reconstructible/hash | 2 +- repos/base/recipes/src/test-registry/hash | 2 +- repos/base/recipes/src/test-rm_fault/hash | 2 +- repos/base/recipes/src/test-rm_nested/hash | 2 +- repos/base/recipes/src/test-rm_stress/hash | 2 +- repos/base/recipes/src/test-sanitizer/hash | 2 +- repos/base/recipes/src/test-segfault/hash | 2 +- repos/base/recipes/src/test-stack_smash/hash | 2 +- repos/base/recipes/src/test-synced_interface/hash | 2 +- repos/base/recipes/src/test-timer/hash | 2 +- repos/base/recipes/src/test-tls/hash | 2 +- repos/base/recipes/src/test-token/hash | 2 +- repos/base/recipes/src/test-xml_generator/hash | 2 +- repos/base/recipes/src/test-xml_node/hash | 2 +- repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash | 2 +- repos/dde_bsd/recipes/src/bsd_audio_drv/hash | 2 +- repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash | 2 +- repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash | 2 +- repos/dde_linux/recipes/pkg/usb_modem_drv/hash | 2 +- repos/dde_linux/recipes/pkg/wireguard/hash | 2 +- repos/dde_linux/recipes/raw/wifi_firmware/hash | 2 +- repos/dde_linux/recipes/src/legacy_usb_host_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_hid_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_modem_drv/hash | 2 +- repos/dde_linux/recipes/src/usb_net_drv/hash | 2 +- repos/dde_linux/recipes/src/vfs_lxip/hash | 2 +- repos/dde_linux/recipes/src/wireguard/hash | 2 +- repos/dde_rump/recipes/pkg/ext2_fs/hash | 2 +- repos/dde_rump/recipes/src/rump/hash | 2 +- repos/demo/recipes/src/demo/hash | 2 +- repos/gems/recipes/api/gems/hash | 2 +- repos/gems/recipes/api/polygon_gfx/hash | 2 +- repos/gems/recipes/pkg/backdrop/hash | 2 +- repos/gems/recipes/pkg/cbe_check/hash | 2 +- repos/gems/recipes/pkg/cbe_demo/hash | 2 +- repos/gems/recipes/pkg/cbe_fs/hash | 2 +- repos/gems/recipes/pkg/cbe_init/hash | 2 +- repos/gems/recipes/pkg/cbe_shell/hash | 2 +- repos/gems/recipes/pkg/cbe_ta_fs/hash | 2 +- repos/gems/recipes/pkg/cbe_ta_vfs/hash | 2 +- repos/gems/recipes/pkg/cbe_vbox5-nova/hash | 2 +- repos/gems/recipes/pkg/cbe_vfs/hash | 2 +- repos/gems/recipes/pkg/cbe_vm_fs/hash | 2 +- repos/gems/recipes/pkg/cpu_load_display/hash | 2 +- repos/gems/recipes/pkg/depot_download/hash | 2 +- repos/gems/recipes/pkg/download_coreplus/hash | 2 +- repos/gems/recipes/pkg/drivers_managed-pc/hash | 2 +- repos/gems/recipes/pkg/drivers_nic-pc/hash | 2 +- repos/gems/recipes/pkg/file_vault/hash | 2 +- repos/gems/recipes/pkg/fonts_fs/hash | 2 +- repos/gems/recipes/pkg/motif_decorator/hash | 2 +- repos/gems/recipes/pkg/motif_wm/hash | 2 +- repos/gems/recipes/pkg/nano3d/hash | 2 +- repos/gems/recipes/pkg/osci/hash | 2 +- repos/gems/recipes/pkg/screenshot_trigger/hash | 2 +- repos/gems/recipes/pkg/sculpt/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution-pc/hash | 2 +- repos/gems/recipes/pkg/sculpt_distribution/hash | 2 +- repos/gems/recipes/pkg/sticks_blue_backdrop/hash | 2 +- repos/gems/recipes/pkg/terminal/hash | 2 +- repos/gems/recipes/pkg/test-depot_query_index/hash | 2 +- repos/gems/recipes/pkg/test-fs_tool/hash | 2 +- repos/gems/recipes/pkg/test-libc_vfs_audit/hash | 2 +- repos/gems/recipes/pkg/themed_decorator/hash | 2 +- repos/gems/recipes/pkg/themed_wm/hash | 2 +- repos/gems/recipes/pkg/touch_keyboard/hash | 2 +- repos/gems/recipes/pkg/trace_fs/hash | 2 +- repos/gems/recipes/pkg/trace_recorder/hash | 2 +- repos/gems/recipes/pkg/window_layouter/hash | 2 +- repos/gems/recipes/pkg/wm/hash | 2 +- repos/gems/recipes/raw/depot_download/hash | 2 +- repos/gems/recipes/raw/drivers_managed-pc/hash | 2 +- repos/gems/recipes/src/backdrop/hash | 2 +- repos/gems/recipes/src/cbe/hash | 2 +- repos/gems/recipes/src/cpu_load_display/hash | 2 +- repos/gems/recipes/src/decorator/hash | 2 +- repos/gems/recipes/src/depot_deploy/hash | 2 +- repos/gems/recipes/src/depot_download_manager/hash | 2 +- repos/gems/recipes/src/depot_query/hash | 2 +- repos/gems/recipes/src/driver_manager/hash | 2 +- repos/gems/recipes/src/file_terminal/hash | 2 +- repos/gems/recipes/src/file_vault/hash | 2 +- repos/gems/recipes/src/fs_query/hash | 2 +- repos/gems/recipes/src/fs_tool/hash | 2 +- repos/gems/recipes/src/gpt_write/hash | 2 +- repos/gems/recipes/src/gui_fader/hash | 2 +- repos/gems/recipes/src/menu_view/hash | 2 +- repos/gems/recipes/src/mixer_gui_qt/hash | 2 +- repos/gems/recipes/src/nano3d/hash | 2 +- repos/gems/recipes/src/osci/hash | 2 +- repos/gems/recipes/src/screenshot_trigger/hash | 2 +- repos/gems/recipes/src/sculpt_manager/hash | 2 +- repos/gems/recipes/src/terminal/hash | 2 +- repos/gems/recipes/src/test-tiled_wm/hash | 2 +- repos/gems/recipes/src/text_area/hash | 2 +- repos/gems/recipes/src/themed_decorator/hash | 2 +- repos/gems/recipes/src/touch_keyboard/hash | 2 +- repos/gems/recipes/src/trace_recorder/hash | 2 +- repos/gems/recipes/src/trace_recorder_policy/hash | 2 +- repos/gems/recipes/src/vfs_audit/hash | 2 +- repos/gems/recipes/src/vfs_gpu/hash | 2 +- repos/gems/recipes/src/vfs_import/hash | 2 +- repos/gems/recipes/src/vfs_pipe/hash | 2 +- repos/gems/recipes/src/vfs_trace/hash | 2 +- repos/gems/recipes/src/vfs_ttf/hash | 2 +- repos/gems/recipes/src/window_layouter/hash | 2 +- repos/gems/recipes/src/wm/hash | 2 +- repos/libports/recipes/pkg/acpica/hash | 2 +- repos/libports/recipes/pkg/gcov/hash | 2 +- repos/libports/recipes/pkg/mesa_gears/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-cpu/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-intel/hash | 2 +- repos/libports/recipes/pkg/mesa_gpu-lima/hash | 2 +- repos/libports/recipes/pkg/pdf_view/hash | 2 +- repos/libports/recipes/pkg/qt5_textedit/hash | 2 +- repos/libports/recipes/pkg/sntp_dummy_rtc/hash | 2 +- repos/libports/recipes/pkg/stdin2out/hash | 2 +- repos/libports/recipes/pkg/system_clock-dummy/hash | 2 +- repos/libports/recipes/pkg/system_clock-pc/hash | 2 +- repos/libports/recipes/pkg/system_rtc-linux/hash | 2 +- repos/libports/recipes/pkg/system_rtc-pc/hash | 2 +- repos/libports/recipes/pkg/test-expat/hash | 2 +- repos/libports/recipes/pkg/test-ldso/hash | 2 +- repos/libports/recipes/pkg/test-libc/hash | 2 +- repos/libports/recipes/pkg/test-libc_connect_lwip/hash | 2 +- repos/libports/recipes/pkg/test-libc_connect_lxip/hash | 2 +- .../libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash | 2 +- .../libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash | 2 +- repos/libports/recipes/pkg/test-libc_counter/hash | 2 +- repos/libports/recipes/pkg/test-libc_execve/hash | 2 +- repos/libports/recipes/pkg/test-libc_fifo_pipe/hash | 2 +- repos/libports/recipes/pkg/test-libc_fork/hash | 2 +- repos/libports/recipes/pkg/test-libc_getenv/hash | 2 +- repos/libports/recipes/pkg/test-libc_pipe/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_block/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_counter/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_fs/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash | 2 +- repos/libports/recipes/pkg/test-libc_vfs_ram/hash | 2 +- repos/libports/recipes/pkg/test-pthread/hash | 2 +- repos/libports/recipes/pkg/test-sequence/hash | 2 +- repos/libports/recipes/pkg/test-spark/hash | 2 +- repos/libports/recipes/pkg/test-spark_exception/hash | 2 +- repos/libports/recipes/pkg/test-spark_secondary_stack/hash | 2 +- repos/libports/recipes/pkg/test-stdcxx/hash | 2 +- repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash | 2 +- repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash | 2 +- repos/libports/recipes/pkg/usb_webcam/hash | 2 +- repos/libports/recipes/src/acpica/hash | 2 +- repos/libports/recipes/src/extract/hash | 2 +- repos/libports/recipes/src/fetchurl/hash | 2 +- repos/libports/recipes/src/gcov/hash | 2 +- repos/libports/recipes/src/libc/hash | 2 +- repos/libports/recipes/src/libdrm/hash | 2 +- repos/libports/recipes/src/libqgenodeviewwidget/hash | 2 +- repos/libports/recipes/src/libqpluginwidget/hash | 2 +- repos/libports/recipes/src/libsparkcrypto/hash | 2 +- repos/libports/recipes/src/libusb/hash | 2 +- repos/libports/recipes/src/mesa/hash | 2 +- repos/libports/recipes/src/mesa_gears/hash | 2 +- repos/libports/recipes/src/pcsc-lite/hash | 2 +- repos/libports/recipes/src/pdf_view/hash | 2 +- repos/libports/recipes/src/posix/hash | 2 +- repos/libports/recipes/src/qt5_base/hash | 2 +- repos/libports/recipes/src/qt5_component/hash | 2 +- repos/libports/recipes/src/qt5_launchpad/hash | 2 +- repos/libports/recipes/src/qt5_quickcontrols2/hash | 2 +- repos/libports/recipes/src/qt5_svg/hash | 2 +- repos/libports/recipes/src/sanitizer/hash | 2 +- repos/libports/recipes/src/sntp_client/hash | 2 +- repos/libports/recipes/src/spark/hash | 2 +- repos/libports/recipes/src/system_rtc/hash | 2 +- repos/libports/recipes/src/test-ldso/hash | 2 +- repos/libports/recipes/src/test-libc_fifo_pipe/hash | 2 +- repos/libports/recipes/src/test-libc_vfs/hash | 2 +- repos/libports/recipes/src/test-libc_vfs_block/hash | 2 +- repos/libports/recipes/src/test-netty/hash | 2 +- repos/libports/recipes/src/test-pthread/hash | 2 +- repos/libports/recipes/src/test-qpluginwidget/hash | 2 +- repos/libports/recipes/src/test-spark/hash | 2 +- repos/libports/recipes/src/test-spark_exception/hash | 2 +- repos/libports/recipes/src/test-spark_secondary_stack/hash | 2 +- repos/libports/recipes/src/test-tcp/hash | 2 +- repos/libports/recipes/src/usb_webcam/hash | 2 +- repos/libports/recipes/src/vesa_drv/hash | 2 +- repos/libports/recipes/src/vfs_fatfs/hash | 2 +- repos/libports/recipes/src/vfs_jitterentropy/hash | 2 +- repos/libports/recipes/src/vfs_libusb/hash | 2 +- repos/libports/recipes/src/vfs_lwip/hash | 2 +- repos/libports/recipes/src/vfs_oss/hash | 2 +- repos/os/recipes/api/event_session/hash | 2 +- repos/os/recipes/api/gpu_session/hash | 2 +- repos/os/recipes/api/input_session/hash | 2 +- repos/os/recipes/api/os/hash | 2 +- repos/os/recipes/api/vfs/hash | 2 +- repos/os/recipes/api/virtio/hash | 2 +- repos/os/recipes/pkg/black_hole/hash | 2 +- repos/os/recipes/pkg/chroot/hash | 2 +- repos/os/recipes/pkg/clipboard/hash | 2 +- repos/os/recipes/pkg/cpu_balancer/hash | 2 +- repos/os/recipes/pkg/cpu_balancer_config/hash | 2 +- repos/os/recipes/pkg/cpu_burner/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-linux/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-pbxa9/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-pc/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash | 2 +- repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash | 2 +- repos/os/recipes/pkg/drivers_nic-linux/hash | 2 +- repos/os/recipes/pkg/drivers_nic-pbxa9/hash | 2 +- repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash | 2 +- repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash | 2 +- repos/os/recipes/pkg/dynamic_rom/hash | 2 +- repos/os/recipes/pkg/fs_report/hash | 2 +- repos/os/recipes/pkg/fs_rom/hash | 2 +- repos/os/recipes/pkg/mixer/hash | 2 +- repos/os/recipes/pkg/nic_router-nat/hash | 2 +- repos/os/recipes/pkg/nit_focus/hash | 2 +- repos/os/recipes/pkg/part_block/hash | 2 +- repos/os/recipes/pkg/recall_fs/hash | 2 +- repos/os/recipes/pkg/report_rom/hash | 2 +- repos/os/recipes/pkg/rom_filter/hash | 2 +- repos/os/recipes/pkg/rom_reporter/hash | 2 +- repos/os/recipes/pkg/test-audio_out/hash | 2 +- repos/os/recipes/pkg/test-black_hole/hash | 2 +- repos/os/recipes/pkg/test-capture/hash | 2 +- repos/os/recipes/pkg/test-clipboard/hash | 2 +- repos/os/recipes/pkg/test-dynamic_config/hash | 2 +- repos/os/recipes/pkg/test-dynamic_config_loader/hash | 2 +- repos/os/recipes/pkg/test-fault_detection/hash | 2 +- repos/os/recipes/pkg/test-fs_packet/hash | 2 +- repos/os/recipes/pkg/test-fs_report/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update_fs/hash | 2 +- repos/os/recipes/pkg/test-fs_rom_update_ram/hash | 2 +- repos/os/recipes/pkg/test-init/hash | 2 +- repos/os/recipes/pkg/test-init_loop/hash | 2 +- repos/os/recipes/pkg/test-lx_block/hash | 2 +- repos/os/recipes/pkg/test-nic_loopback/hash | 2 +- repos/os/recipes/pkg/test-nic_perf/hash | 2 +- repos/os/recipes/pkg/test-nic_perf_router/hash | 2 +- repos/os/recipes/pkg/test-part_block_gpt/hash | 2 +- repos/os/recipes/pkg/test-part_block_mbr/hash | 2 +- repos/os/recipes/pkg/test-ram_fs_chunk/hash | 2 +- repos/os/recipes/pkg/test-read_only_rom/hash | 2 +- repos/os/recipes/pkg/test-report_rom/hash | 2 +- repos/os/recipes/pkg/test-resource_request/hash | 2 +- repos/os/recipes/pkg/test-resource_yield/hash | 2 +- repos/os/recipes/pkg/test-rom_filter/hash | 2 +- repos/os/recipes/pkg/test-rtc/hash | 2 +- repos/os/recipes/pkg/test-sandbox/hash | 2 +- repos/os/recipes/pkg/test-signal/hash | 2 +- repos/os/recipes/pkg/test-slab/hash | 2 +- repos/os/recipes/pkg/test-terminal_crosslink/hash | 2 +- repos/os/recipes/pkg/test-trace/hash | 2 +- repos/os/recipes/pkg/test-trace_buffer/hash | 2 +- repos/os/recipes/pkg/test-trace_logger/hash | 2 +- repos/os/recipes/pkg/test-utf8/hash | 2 +- repos/os/recipes/pkg/test-vfs_block/hash | 2 +- repos/os/recipes/pkg/test-vfs_stress_fs/hash | 2 +- repos/os/recipes/pkg/test-vfs_stress_ram/hash | 2 +- repos/os/recipes/pkg/test-weak_ptr/hash | 2 +- repos/os/recipes/pkg/top/hash | 2 +- repos/os/recipes/pkg/trace_logger/hash | 2 +- repos/os/recipes/pkg/vfs/hash | 2 +- repos/os/recipes/pkg/vfs_block/hash | 2 +- repos/os/recipes/src/acpi_drv/hash | 2 +- repos/os/recipes/src/ahci_drv/hash | 2 +- repos/os/recipes/src/black_hole/hash | 2 +- repos/os/recipes/src/block_tester/hash | 2 +- repos/os/recipes/src/boot_fb_drv/hash | 2 +- repos/os/recipes/src/cached_fs_rom/hash | 2 +- repos/os/recipes/src/chroot/hash | 2 +- repos/os/recipes/src/clipboard/hash | 2 +- repos/os/recipes/src/cpu_balancer/hash | 2 +- repos/os/recipes/src/cpu_burner/hash | 2 +- repos/os/recipes/src/dummy/hash | 2 +- repos/os/recipes/src/dummy_rtc_drv/hash | 2 +- repos/os/recipes/src/dynamic_rom/hash | 2 +- repos/os/recipes/src/event_filter/hash | 2 +- repos/os/recipes/src/fb_sdl/hash | 2 +- repos/os/recipes/src/fs_report/hash | 2 +- repos/os/recipes/src/fs_rom/hash | 2 +- repos/os/recipes/src/global_keys_handler/hash | 2 +- repos/os/recipes/src/gui_fb/hash | 2 +- repos/os/recipes/src/init/hash | 2 +- repos/os/recipes/src/intel_gpu_drv/hash | 2 +- repos/os/recipes/src/lan9118_nic_drv/hash | 2 +- repos/os/recipes/src/linux_nic_drv/hash | 2 +- repos/os/recipes/src/linux_rtc_drv/hash | 2 +- repos/os/recipes/src/loader/hash | 2 +- repos/os/recipes/src/log_core/hash | 2 +- repos/os/recipes/src/log_terminal/hash | 2 +- repos/os/recipes/src/lx_block/hash | 2 +- repos/os/recipes/src/lx_fs/hash | 2 +- repos/os/recipes/src/mixer/hash | 2 +- repos/os/recipes/src/nic_bridge/hash | 2 +- repos/os/recipes/src/nic_loopback/hash | 2 +- repos/os/recipes/src/nic_perf/hash | 2 +- repos/os/recipes/src/nic_router/hash | 2 +- repos/os/recipes/src/nit_focus/hash | 2 +- repos/os/recipes/src/nitpicker/hash | 2 +- repos/os/recipes/src/nvme_drv/hash | 2 +- repos/os/recipes/src/part_block/hash | 2 +- repos/os/recipes/src/pbxa9_drivers/hash | 2 +- repos/os/recipes/src/pci_decode/hash | 2 +- repos/os/recipes/src/platform_drv/hash | 2 +- repos/os/recipes/src/ps2_drv/hash | 2 +- repos/os/recipes/src/report_rom/hash | 2 +- repos/os/recipes/src/rom_filter/hash | 2 +- repos/os/recipes/src/rom_logger/hash | 2 +- repos/os/recipes/src/rom_reporter/hash | 2 +- repos/os/recipes/src/rom_to_file/hash | 2 +- repos/os/recipes/src/rtc_drv/hash | 2 +- repos/os/recipes/src/sandbox/hash | 2 +- repos/os/recipes/src/sequence/hash | 2 +- repos/os/recipes/src/shim/hash | 2 +- repos/os/recipes/src/terminal_crosslink/hash | 2 +- repos/os/recipes/src/terminal_log/hash | 2 +- repos/os/recipes/src/test-audio_out/hash | 2 +- repos/os/recipes/src/test-black_hole/hash | 2 +- repos/os/recipes/src/test-bomb/hash | 2 +- repos/os/recipes/src/test-capture/hash | 2 +- repos/os/recipes/src/test-clipboard/hash | 2 +- repos/os/recipes/src/test-dynamic_config/hash | 2 +- repos/os/recipes/src/test-fault_detection/hash | 2 +- repos/os/recipes/src/test-fs_packet/hash | 2 +- repos/os/recipes/src/test-fs_report/hash | 2 +- repos/os/recipes/src/test-immutable_rom/hash | 2 +- repos/os/recipes/src/test-init/hash | 2 +- repos/os/recipes/src/test-init_loop/hash | 2 +- repos/os/recipes/src/test-nic_loopback/hash | 2 +- repos/os/recipes/src/test-ram_fs_chunk/hash | 2 +- repos/os/recipes/src/test-report_rom/hash | 2 +- repos/os/recipes/src/test-resource_request/hash | 2 +- repos/os/recipes/src/test-resource_yield/hash | 2 +- repos/os/recipes/src/test-rtc/hash | 2 +- repos/os/recipes/src/test-sandbox/hash | 2 +- repos/os/recipes/src/test-signal/hash | 2 +- repos/os/recipes/src/test-slab/hash | 2 +- repos/os/recipes/src/test-terminal_crosslink/hash | 2 +- repos/os/recipes/src/test-trace/hash | 2 +- repos/os/recipes/src/test-trace_buffer/hash | 2 +- repos/os/recipes/src/test-trace_logger/hash | 2 +- repos/os/recipes/src/test-utf8/hash | 2 +- repos/os/recipes/src/test-vfs_capture/hash | 2 +- repos/os/recipes/src/test-vfs_stress/hash | 2 +- repos/os/recipes/src/test-weak_ptr/hash | 2 +- repos/os/recipes/src/top/hash | 2 +- repos/os/recipes/src/trace_logger/hash | 2 +- repos/os/recipes/src/trace_policy/hash | 2 +- repos/os/recipes/src/trace_subject_reporter/hash | 2 +- repos/os/recipes/src/usb_block_drv/hash | 2 +- repos/os/recipes/src/vfs/hash | 2 +- repos/os/recipes/src/vfs_block/hash | 2 +- repos/os/recipes/src/vfs_capture/hash | 2 +- repos/os/recipes/src/vfs_tap/hash | 2 +- repos/os/recipes/src/virt_qemu_drivers/hash | 2 +- repos/os/recipes/src/virtdev_rom/hash | 2 +- repos/os/recipes/src/virtio_fb_drv/hash | 2 +- repos/os/recipes/src/virtio_input_drv/hash | 2 +- repos/os/recipes/src/virtio_nic_drv/hash | 2 +- repos/os/recipes/src/vmm/hash | 2 +- repos/pc/recipes/api/pc_linux/hash | 2 +- repos/pc/recipes/pkg/test_usb_host_drv-pc/hash | 2 +- repos/pc/recipes/pkg/wifi/hash | 2 +- repos/pc/recipes/raw/test_usb_host_drv-pc/hash | 2 +- repos/pc/recipes/src/pc_intel_fb_drv/hash | 2 +- repos/pc/recipes/src/pc_platform_drv/hash | 2 +- repos/pc/recipes/src/pc_usb_host_drv/hash | 2 +- repos/pc/recipes/src/pc_wifi_drv/hash | 2 +- repos/ports/recipes/api/noux/hash | 2 +- repos/ports/recipes/pkg/report_dump/hash | 2 +- repos/ports/recipes/pkg/system_shell/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-capture/hash | 2 +- repos/ports/recipes/pkg/vbox5-nova-sculpt/hash | 2 +- repos/ports/recipes/pkg/vbox5/hash | 2 +- repos/ports/recipes/pkg/vbox6-capture/hash | 2 +- repos/ports/recipes/pkg/vbox6/hash | 2 +- repos/ports/recipes/src/bash-minimal/hash | 2 +- repos/ports/recipes/src/bash/hash | 2 +- repos/ports/recipes/src/binutils_x86/hash | 2 +- repos/ports/recipes/src/coreutils-minimal/hash | 2 +- repos/ports/recipes/src/coreutils/hash | 2 +- repos/ports/recipes/src/diffutils/hash | 2 +- repos/ports/recipes/src/e2fsprogs-minimal/hash | 2 +- repos/ports/recipes/src/e2fsprogs/hash | 2 +- repos/ports/recipes/src/findutils/hash | 2 +- repos/ports/recipes/src/gcc_x86/hash | 2 +- repos/ports/recipes/src/gnumake/hash | 2 +- repos/ports/recipes/src/grep/hash | 2 +- repos/ports/recipes/src/less/hash | 2 +- repos/ports/recipes/src/sed/hash | 2 +- repos/ports/recipes/src/tar/hash | 2 +- repos/ports/recipes/src/tclsh/hash | 2 +- repos/ports/recipes/src/vbox5-nova/hash | 2 +- repos/ports/recipes/src/vbox5/hash | 2 +- repos/ports/recipes/src/vbox6/hash | 2 +- repos/ports/recipes/src/verify/hash | 2 +- repos/ports/recipes/src/vim-minimal/hash | 2 +- repos/ports/recipes/src/vim/hash | 2 +- repos/ports/recipes/src/which/hash | 2 +- 452 files changed, 452 insertions(+), 452 deletions(-) diff --git a/repos/base-fiasco/recipes/src/base-fiasco/hash b/repos/base-fiasco/recipes/src/base-fiasco/hash index 3101341478..493a865106 100644 --- a/repos/base-fiasco/recipes/src/base-fiasco/hash +++ b/repos/base-fiasco/recipes/src/base-fiasco/hash @@ -1 +1 @@ -2023-01-23 30cc82133d3c826f76af03e46fd814169bb5034e +2023-02-26 0b3ad087e8d2f2a0c8f75be4c1b4dc0db33e89f5 diff --git a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash index e5ac34fba7..e5a62f5060 100644 --- a/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash +++ b/repos/base-foc/recipes/src/base-foc-imx6q_sabrelite/hash @@ -1 +1 @@ -2023-01-23 05a50deac3d3a513612a24d5188361e6a8e29ba0 +2023-02-26 421ac091f367c1d3f062555571e626144bc9bef7 diff --git a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash index 6d030c9bd2..d89c1e6a8c 100644 --- a/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash +++ b/repos/base-foc/recipes/src/base-foc-imx7d_sabre/hash @@ -1 +1 @@ -2023-01-23 5c5860d880a4c07f0ed724586ce152639e0752e9 +2023-02-26 b295c4987f625fc92d7b0fb806ef66367c5baa01 diff --git a/repos/base-foc/recipes/src/base-foc-pbxa9/hash b/repos/base-foc/recipes/src/base-foc-pbxa9/hash index f7899730c7..83ffd28ab2 100644 --- a/repos/base-foc/recipes/src/base-foc-pbxa9/hash +++ b/repos/base-foc/recipes/src/base-foc-pbxa9/hash @@ -1 +1 @@ -2023-01-23 2ac38cbe4283d480cbe31154d4c03da9159e9a7f +2023-02-26 b0f0da242e106ad340ba6fdb041f8767bb53cc0e diff --git a/repos/base-foc/recipes/src/base-foc-pc/hash b/repos/base-foc/recipes/src/base-foc-pc/hash index a4c5d4bcf6..eb5e080235 100644 --- a/repos/base-foc/recipes/src/base-foc-pc/hash +++ b/repos/base-foc/recipes/src/base-foc-pc/hash @@ -1 +1 @@ -2023-01-23 a4a266e9b78269789c04efd7490137a48615a23d +2023-02-26 44afa539ac79f213da15d7650b0918b864385af4 diff --git a/repos/base-foc/recipes/src/base-foc-rpi3/hash b/repos/base-foc/recipes/src/base-foc-rpi3/hash index 3cf1bd486f..46c3007a11 100644 --- a/repos/base-foc/recipes/src/base-foc-rpi3/hash +++ b/repos/base-foc/recipes/src/base-foc-rpi3/hash @@ -1 +1 @@ -2023-01-23 08d54ffc373ae10327a9f8bf6d668246199a9eb2 +2023-02-26 7459b205ffdbb68360b32c0b2611ec30982e80e4 diff --git a/repos/base-hw/recipes/api/base-hw/hash b/repos/base-hw/recipes/api/base-hw/hash index dff6cc6c41..2a6b412f05 100644 --- a/repos/base-hw/recipes/api/base-hw/hash +++ b/repos/base-hw/recipes/api/base-hw/hash @@ -1 +1 @@ -2023-01-23 aa9123863ba8d983f63d396b99ccbc2715f48278 +2023-02-26 36a786f7e10eab1b97b9e0186de4699fbe7a50e5 diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash b/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash index 3cb6e9d72b..b61bcef2cb 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb/hash @@ -1 +1 @@ -2023-01-23 7d86a78342d7c79dd1e896bb637e155da7059ba4 +2023-02-26 e504d7478cb2504223a7247c524d72639d9194f9 diff --git a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash index aa0dafc5be..d000dc783e 100644 --- a/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash +++ b/repos/base-hw/recipes/src/base-hw-imx53_qsb_tz/hash @@ -1 +1 @@ -2023-01-23 11396abcead04e6f3551d5f3eb73bfe63aacfa66 +2023-02-26 336d5de14c14949f7decb73b5d7d815517bd0370 diff --git a/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash b/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash index d0ee11ca0c..5bfdb4c5fe 100644 --- a/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash +++ b/repos/base-hw/recipes/src/base-hw-imx6q_sabrelite/hash @@ -1 +1 @@ -2023-01-23 84af60ebcdb08c752f8ce8dd2bc6b66cbd9c1890 +2023-02-26 09c5c05a44a69aeba7be64185eb005887165eb4a diff --git a/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash b/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash index 553ce30079..ee04e785cd 100644 --- a/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash +++ b/repos/base-hw/recipes/src/base-hw-imx7d_sabre/hash @@ -1 +1 @@ -2023-01-23 c7c2f994254a9160aeda880a15b2ae3b5c122a79 +2023-02-26 c99d0c1f74b2b8fe142b4312cf49213a29e51743 diff --git a/repos/base-hw/recipes/src/base-hw-nit6_solox/hash b/repos/base-hw/recipes/src/base-hw-nit6_solox/hash index 8fb2bea210..1a207b09cd 100644 --- a/repos/base-hw/recipes/src/base-hw-nit6_solox/hash +++ b/repos/base-hw/recipes/src/base-hw-nit6_solox/hash @@ -1 +1 @@ -2023-01-23 b8f9ab2a33764962bc701e703c99dc87c8bd0844 +2023-02-26 dd729a39ab772fe9d88aa89eafc2948a79110a75 diff --git a/repos/base-hw/recipes/src/base-hw-pbxa9/hash b/repos/base-hw/recipes/src/base-hw-pbxa9/hash index 9daefaa876..0a3761341c 100644 --- a/repos/base-hw/recipes/src/base-hw-pbxa9/hash +++ b/repos/base-hw/recipes/src/base-hw-pbxa9/hash @@ -1 +1 @@ -2023-01-23 3e450c3901a2199a3498fca5d717002972ea8c92 +2023-02-26 93318f3dbc11f0746ecbf4e496f0b2c05c6e9966 diff --git a/repos/base-hw/recipes/src/base-hw-pc/hash b/repos/base-hw/recipes/src/base-hw-pc/hash index 2bb8c23383..ec14ac6c9c 100644 --- a/repos/base-hw/recipes/src/base-hw-pc/hash +++ b/repos/base-hw/recipes/src/base-hw-pc/hash @@ -1 +1 @@ -2023-01-23 c4615dbd79c45da94a2e0f40e723fe34c407a73c +2023-02-26 16bbaa092534213f2c24054a33b3c21c37d28299 diff --git a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash index cfb214e044..d075d078bd 100644 --- a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash +++ b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2023-01-23 4c6b9d6a4859f49a82d935643e9fb847784ebede +2023-02-26 525b769cbd29d822da4c84af790d1b7c971ea2da diff --git a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash index 1382d80d10..f8c47301c0 100644 --- a/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash +++ b/repos/base-hw/recipes/src/base-hw-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2023-01-23 1f83b2faaed39d1b546e611e6bdf522e940d0352 +2023-02-26 a19e9b0873d3d032d48f3a942e95e9ef55f0d5c8 diff --git a/repos/base-linux/recipes/api/base-linux/hash b/repos/base-linux/recipes/api/base-linux/hash index af6aca2127..3136ba1f9b 100644 --- a/repos/base-linux/recipes/api/base-linux/hash +++ b/repos/base-linux/recipes/api/base-linux/hash @@ -1 +1 @@ -2023-01-23 69d25c9d2e13c7bd1da61c825351a5a3c2e95c54 +2023-02-26 c971fa2d31c0813c0a228c0c100cf69a7232623f diff --git a/repos/base-linux/recipes/src/base-linux/hash b/repos/base-linux/recipes/src/base-linux/hash index 03f8ee2d8e..59ed940ff4 100644 --- a/repos/base-linux/recipes/src/base-linux/hash +++ b/repos/base-linux/recipes/src/base-linux/hash @@ -1 +1 @@ -2023-01-23 efff329b5db07f53fb7cae6f15bc9cf3b71f6415 +2023-02-26 79b3949e3702aa94d6db8471426c0ba2a2b15a19 diff --git a/repos/base-nova/recipes/src/base-nova/hash b/repos/base-nova/recipes/src/base-nova/hash index 4ddebc34b5..da19a8cd64 100644 --- a/repos/base-nova/recipes/src/base-nova/hash +++ b/repos/base-nova/recipes/src/base-nova/hash @@ -1 +1 @@ -2023-01-23 ee01458d6e6f55be89e77e2529b45f7836a9ac7b +2023-02-26 3b8995fa0439d08d920a35cb65a4afa6148fdfcf diff --git a/repos/base-okl4/recipes/src/base-okl4/hash b/repos/base-okl4/recipes/src/base-okl4/hash index d9bd1ef795..985861d7ae 100644 --- a/repos/base-okl4/recipes/src/base-okl4/hash +++ b/repos/base-okl4/recipes/src/base-okl4/hash @@ -1 +1 @@ -2023-01-23 e319f49fe82e8a5417d64f3f1b3812e9daac11e4 +2023-02-26 a761d1d18fcd0eede77c9337b681ff5ec6fec262 diff --git a/repos/base-pistachio/recipes/src/base-pistachio/hash b/repos/base-pistachio/recipes/src/base-pistachio/hash index 3b8bc62efe..7fd2fe4da9 100644 --- a/repos/base-pistachio/recipes/src/base-pistachio/hash +++ b/repos/base-pistachio/recipes/src/base-pistachio/hash @@ -1 +1 @@ -2023-01-23 67ca8fb4658605837addbf17b04d4f5968ffe159 +2023-02-26 b704ef8e3e4769b6e8373d4befdbbfa336417e97 diff --git a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash index 0f19a7f2aa..b9fd92ef26 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx6q_sabrelite/hash @@ -1 +1 @@ -2023-01-23 52bb8165d32cb17cd7aa4a525f2aa4965e654c52 +2023-02-26 e9ee22e3cc647968c292477f8e8db54037306d94 diff --git a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash index 1e1137a6ad..bd91c6195d 100644 --- a/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash +++ b/repos/base-sel4/recipes/src/base-sel4-imx7d_sabre/hash @@ -1 +1 @@ -2023-01-23 df3046a2d160f37bfa2d38b50e250804994cd4e1 +2023-02-26 512ff4fea8362d9443383f5762f3917ad8a80edc diff --git a/repos/base-sel4/recipes/src/base-sel4-x86/hash b/repos/base-sel4/recipes/src/base-sel4-x86/hash index 3e8b1d652d..07202561db 100644 --- a/repos/base-sel4/recipes/src/base-sel4-x86/hash +++ b/repos/base-sel4/recipes/src/base-sel4-x86/hash @@ -1 +1 @@ -2023-01-23 1723c32d2dfc3181067d73f17d17626242d12db9 +2023-02-26 ad90b3900677562843078aa89e2d48a647c08063 diff --git a/repos/base/recipes/api/base/hash b/repos/base/recipes/api/base/hash index d2dbe6eacf..9c18a1f0ad 100644 --- a/repos/base/recipes/api/base/hash +++ b/repos/base/recipes/api/base/hash @@ -1 +1 @@ -2023-01-23 7fba98cbc810b8314c31e624a2d67be5afefd780 +2023-02-26 019b20833912041a798b4f9c73e618e471b73250 diff --git a/repos/base/recipes/pkg/test-ds_ownership/hash b/repos/base/recipes/pkg/test-ds_ownership/hash index 1e5d8f9210..1b7e5fdcd9 100644 --- a/repos/base/recipes/pkg/test-ds_ownership/hash +++ b/repos/base/recipes/pkg/test-ds_ownership/hash @@ -1 +1 @@ -2023-01-23 e0ecafc9e0e110b1a3ee1175749546379cdffe5c +2023-02-26 fb7352096162d082a2ad1a1cbae48f6c88440a47 diff --git a/repos/base/recipes/pkg/test-entrypoint/hash b/repos/base/recipes/pkg/test-entrypoint/hash index 75d9d6816e..d8cbf48840 100644 --- a/repos/base/recipes/pkg/test-entrypoint/hash +++ b/repos/base/recipes/pkg/test-entrypoint/hash @@ -1 +1 @@ -2023-01-23 5ddb14d334785d90a5ed30fe734f1b3d98438fe5 +2023-02-26 05f13d43a629c1901959f8cdd07b775b77154a61 diff --git a/repos/base/recipes/pkg/test-log/hash b/repos/base/recipes/pkg/test-log/hash index f9fa441162..eb5df28718 100644 --- a/repos/base/recipes/pkg/test-log/hash +++ b/repos/base/recipes/pkg/test-log/hash @@ -1 +1 @@ -2023-01-23 510e18e14aefe61c4ace722b658a0843707e5b72 +2023-02-26 bda53beec8d53c3b261a4065a37feeb74c1a3e9d diff --git a/repos/base/recipes/pkg/test-mmio/hash b/repos/base/recipes/pkg/test-mmio/hash index 57bfa333a5..07e21e57d3 100644 --- a/repos/base/recipes/pkg/test-mmio/hash +++ b/repos/base/recipes/pkg/test-mmio/hash @@ -1 +1 @@ -2023-01-23 f3114b6286286f85aa03f4d4613ced13f7e3f0fe +2023-02-26 380d480ca2391e6c061d4b60d057d1bd96f05f5e diff --git a/repos/base/recipes/pkg/test-new_delete/hash b/repos/base/recipes/pkg/test-new_delete/hash index e9ef72f798..11d4e62758 100644 --- a/repos/base/recipes/pkg/test-new_delete/hash +++ b/repos/base/recipes/pkg/test-new_delete/hash @@ -1 +1 @@ -2023-01-23 aaafa68e54cd63d54d40f96f6438a762e320a6e2 +2023-02-26 1e9d79270681a8107f56b79e4fd9707a00fafe9a diff --git a/repos/base/recipes/pkg/test-reconstructible/hash b/repos/base/recipes/pkg/test-reconstructible/hash index 864067d172..a39ad5df46 100644 --- a/repos/base/recipes/pkg/test-reconstructible/hash +++ b/repos/base/recipes/pkg/test-reconstructible/hash @@ -1 +1 @@ -2023-01-23 c7e63734f6ae6a835e69f07576bf2f200bf73df6 +2023-02-26 0c4f4180cb60c7baeeed24bfd6e3c20d6ab94392 diff --git a/repos/base/recipes/pkg/test-registry/hash b/repos/base/recipes/pkg/test-registry/hash index c313e1825b..f6337abe83 100644 --- a/repos/base/recipes/pkg/test-registry/hash +++ b/repos/base/recipes/pkg/test-registry/hash @@ -1 +1 @@ -2023-01-23 8bc654baeaead1ae5158a2cd26884ce043641a31 +2023-02-26 42a574e293c7dc57cb5e78a55e9ee7fe0c47766d diff --git a/repos/base/recipes/pkg/test-rm_fault/hash b/repos/base/recipes/pkg/test-rm_fault/hash index 30c4034a2b..f739b8a198 100644 --- a/repos/base/recipes/pkg/test-rm_fault/hash +++ b/repos/base/recipes/pkg/test-rm_fault/hash @@ -1 +1 @@ -2023-01-23 eb31707b6d962d44a6e0d1940b153e115ea27e0e +2023-02-26 7d4319262b8a85ea684ed8d9589d244b1e34f9dd diff --git a/repos/base/recipes/pkg/test-rm_fault_no_nox/hash b/repos/base/recipes/pkg/test-rm_fault_no_nox/hash index f2e761fda8..3a2f257e13 100644 --- a/repos/base/recipes/pkg/test-rm_fault_no_nox/hash +++ b/repos/base/recipes/pkg/test-rm_fault_no_nox/hash @@ -1 +1 @@ -2023-01-23 89b38605804cf580ef20d20320ac423c8f9bb32a +2023-02-26 413db23643f2a433e1ee836059455cec7465d5be diff --git a/repos/base/recipes/pkg/test-rm_nested/hash b/repos/base/recipes/pkg/test-rm_nested/hash index 9f59619cfa..e358b64870 100644 --- a/repos/base/recipes/pkg/test-rm_nested/hash +++ b/repos/base/recipes/pkg/test-rm_nested/hash @@ -1 +1 @@ -2023-01-23 31f4c7da63c1e2ae483bd82500cc1b0e148b7a94 +2023-02-26 f464d2399e526c1359c70fabf9b1f6885db6fa1b diff --git a/repos/base/recipes/pkg/test-rm_stress/hash b/repos/base/recipes/pkg/test-rm_stress/hash index 88e13c6117..b59d6d4331 100644 --- a/repos/base/recipes/pkg/test-rm_stress/hash +++ b/repos/base/recipes/pkg/test-rm_stress/hash @@ -1 +1 @@ -2023-01-23 29d6989a43f306862f92eaf7d58e04ac987f29f3 +2023-02-26 c3222a84211876e39fb44f2c3abea41f13f93365 diff --git a/repos/base/recipes/pkg/test-sanitizer/hash b/repos/base/recipes/pkg/test-sanitizer/hash index 5eb36c6401..63a18f7539 100644 --- a/repos/base/recipes/pkg/test-sanitizer/hash +++ b/repos/base/recipes/pkg/test-sanitizer/hash @@ -1 +1 @@ -2023-01-23 f37b15d522f0799fe9efb172f64f19854a02b72e +2023-02-26 2daf7ed07b40e094fe933d020236fcfd271d037e diff --git a/repos/base/recipes/pkg/test-stack_smash/hash b/repos/base/recipes/pkg/test-stack_smash/hash index 27adacd91b..b378b68a34 100644 --- a/repos/base/recipes/pkg/test-stack_smash/hash +++ b/repos/base/recipes/pkg/test-stack_smash/hash @@ -1 +1 @@ -2023-01-23 7029230128f794ba8c8d33205741d42aa185b557 +2023-02-26 a24af207e1cc293281e4e3ea1f8d8e91d6ceb7e6 diff --git a/repos/base/recipes/pkg/test-synced_interface/hash b/repos/base/recipes/pkg/test-synced_interface/hash index 534b408416..c8aaa499cc 100644 --- a/repos/base/recipes/pkg/test-synced_interface/hash +++ b/repos/base/recipes/pkg/test-synced_interface/hash @@ -1 +1 @@ -2023-01-23 3fbaa817f9891c0b86bd2e04751ee451781c802e +2023-02-26 548dbf6f5efaf4612922eec8743b0ab3c03f4f6b diff --git a/repos/base/recipes/pkg/test-timer/hash b/repos/base/recipes/pkg/test-timer/hash index 6d7bc149c8..c33e166c55 100644 --- a/repos/base/recipes/pkg/test-timer/hash +++ b/repos/base/recipes/pkg/test-timer/hash @@ -1 +1 @@ -2023-01-23 2b9a3bd463ce02f6b22024e20b0523f643771491 +2023-02-26 9fdf389c983674c2c71d7a2b6a438b5b5dc735b8 diff --git a/repos/base/recipes/pkg/test-tls/hash b/repos/base/recipes/pkg/test-tls/hash index f220ef9824..df9635c300 100644 --- a/repos/base/recipes/pkg/test-tls/hash +++ b/repos/base/recipes/pkg/test-tls/hash @@ -1 +1 @@ -2023-01-23 8811aa4b8dec3653ee913107a036daf215b3249c +2023-02-26 cfbf0020748d5a923b490feea6223b438d4205a4 diff --git a/repos/base/recipes/pkg/test-token/hash b/repos/base/recipes/pkg/test-token/hash index f03add21fe..bc10fffaf2 100644 --- a/repos/base/recipes/pkg/test-token/hash +++ b/repos/base/recipes/pkg/test-token/hash @@ -1 +1 @@ -2023-01-23 b64d590b8253f7d7d60d7b9f4c32f5c3af5a99d5 +2023-02-26 d0e15cc8b3088858c408084ebff19391b89d73de diff --git a/repos/base/recipes/pkg/test-xml_generator/hash b/repos/base/recipes/pkg/test-xml_generator/hash index 714a2ae2b6..13da3c90cc 100644 --- a/repos/base/recipes/pkg/test-xml_generator/hash +++ b/repos/base/recipes/pkg/test-xml_generator/hash @@ -1 +1 @@ -2023-01-23 023dcd08c338b7f637202de43af1562614cb9964 +2023-02-26 ab9ca2159aea0fcfdd89c48dddd2bcdd5dafca27 diff --git a/repos/base/recipes/pkg/test-xml_node/hash b/repos/base/recipes/pkg/test-xml_node/hash index 6c09c657b6..4bb39445d8 100644 --- a/repos/base/recipes/pkg/test-xml_node/hash +++ b/repos/base/recipes/pkg/test-xml_node/hash @@ -1 +1 @@ -2023-01-23 658ada541c7fce432ae4383aaf8ece280a6f113c +2023-02-26 2e23368229c88da3d0b76497ee10911eef8416b0 diff --git a/repos/base/recipes/src/test-ds_ownership/hash b/repos/base/recipes/src/test-ds_ownership/hash index 3e1c29b709..788cc4d799 100644 --- a/repos/base/recipes/src/test-ds_ownership/hash +++ b/repos/base/recipes/src/test-ds_ownership/hash @@ -1 +1 @@ -2023-01-23 e637d76e409f0ad1b7eb0a8994c781441d9dbe44 +2023-02-26 20e893fbb255abd4bdea56fca0221c85def3ae92 diff --git a/repos/base/recipes/src/test-entrypoint/hash b/repos/base/recipes/src/test-entrypoint/hash index 9b43c26a59..250653832d 100644 --- a/repos/base/recipes/src/test-entrypoint/hash +++ b/repos/base/recipes/src/test-entrypoint/hash @@ -1 +1 @@ -2023-01-23 d46285e56278284dad7a97bd342000c0baac84d4 +2023-02-26 a9f9f05ade1a690fb02beea5829fe008ef6c51c8 diff --git a/repos/base/recipes/src/test-log/hash b/repos/base/recipes/src/test-log/hash index b168a6a4ae..d4a4be29cb 100644 --- a/repos/base/recipes/src/test-log/hash +++ b/repos/base/recipes/src/test-log/hash @@ -1 +1 @@ -2023-01-23 3e8309d87e93a74297d22d37d42db84d5f7027aa +2023-02-26 4362c900a539d5af56312cf64fd6009b1437574c diff --git a/repos/base/recipes/src/test-mmio/hash b/repos/base/recipes/src/test-mmio/hash index 5c36c48668..2c173ddcb3 100644 --- a/repos/base/recipes/src/test-mmio/hash +++ b/repos/base/recipes/src/test-mmio/hash @@ -1 +1 @@ -2023-01-23 59abbb90696f7beec4c6f4b03f6c921ea7286341 +2023-02-26 ea145b58fa775080f91aa6734a3a1cedc2638b8f diff --git a/repos/base/recipes/src/test-new_delete/hash b/repos/base/recipes/src/test-new_delete/hash index f63a58f38c..04968cdbdf 100644 --- a/repos/base/recipes/src/test-new_delete/hash +++ b/repos/base/recipes/src/test-new_delete/hash @@ -1 +1 @@ -2023-01-23 41ae49dfef16efb95e9a18ad58640d63d1bbe53c +2023-02-26 05fbb213ee3d6c89fd3b1478100b022d8bb4c983 diff --git a/repos/base/recipes/src/test-reconstructible/hash b/repos/base/recipes/src/test-reconstructible/hash index 6eb3ebd449..29653e1e36 100644 --- a/repos/base/recipes/src/test-reconstructible/hash +++ b/repos/base/recipes/src/test-reconstructible/hash @@ -1 +1 @@ -2023-01-23 d6858c971aa7cd2801a109cb3365ca98a87af776 +2023-02-26 962ca4ae0a0c8bc6f1c9d67ba5bb803cd61e2434 diff --git a/repos/base/recipes/src/test-registry/hash b/repos/base/recipes/src/test-registry/hash index 384ddb880a..6c503d66aa 100644 --- a/repos/base/recipes/src/test-registry/hash +++ b/repos/base/recipes/src/test-registry/hash @@ -1 +1 @@ -2023-01-23 e869752ee8b8806bd3be6f4af6fbaf9f85a09570 +2023-02-26 2a058f80fc9bb03d4ff440ecd8057d582fa5cc0c diff --git a/repos/base/recipes/src/test-rm_fault/hash b/repos/base/recipes/src/test-rm_fault/hash index 8a8c9751cf..b8c4dc1cd1 100644 --- a/repos/base/recipes/src/test-rm_fault/hash +++ b/repos/base/recipes/src/test-rm_fault/hash @@ -1 +1 @@ -2023-01-23 e4640743b1462007c8cfae253caac48fde729ae3 +2023-02-26 c665268156bcbd6fe5c3c51dbd786769374bbb76 diff --git a/repos/base/recipes/src/test-rm_nested/hash b/repos/base/recipes/src/test-rm_nested/hash index 1d93651f83..6bfee9c255 100644 --- a/repos/base/recipes/src/test-rm_nested/hash +++ b/repos/base/recipes/src/test-rm_nested/hash @@ -1 +1 @@ -2023-01-23 7b8491fe0bac42c057779d5f744142a5020c2619 +2023-02-26 4cc786aef74c438724e77bc68b58994c507678f1 diff --git a/repos/base/recipes/src/test-rm_stress/hash b/repos/base/recipes/src/test-rm_stress/hash index 026897143d..c45f758408 100644 --- a/repos/base/recipes/src/test-rm_stress/hash +++ b/repos/base/recipes/src/test-rm_stress/hash @@ -1 +1 @@ -2023-01-23 a88bf1d56ee9e4eb0dd27dec1da33f55be9b1620 +2023-02-26 6c6e1e9e654e6af8a3682e40634c18bbc9d3e08e diff --git a/repos/base/recipes/src/test-sanitizer/hash b/repos/base/recipes/src/test-sanitizer/hash index 9d5c166fd3..68f33d6243 100644 --- a/repos/base/recipes/src/test-sanitizer/hash +++ b/repos/base/recipes/src/test-sanitizer/hash @@ -1 +1 @@ -2023-01-23 4accf474fbc06fd093b26ac55c83830f93a708c7 +2023-02-26 3b37d692b8a9c4763e9799cfe6dc6b64f0a579c1 diff --git a/repos/base/recipes/src/test-segfault/hash b/repos/base/recipes/src/test-segfault/hash index 461522701e..aad07b6922 100644 --- a/repos/base/recipes/src/test-segfault/hash +++ b/repos/base/recipes/src/test-segfault/hash @@ -1 +1 @@ -2023-01-23 c7d5af197db3731538630d4ea142c7ab4a8cc797 +2023-02-26 48529f363e139608ff8144ee8c0bddd6766fd5b8 diff --git a/repos/base/recipes/src/test-stack_smash/hash b/repos/base/recipes/src/test-stack_smash/hash index 2960aaff45..7d3c0f4ab9 100644 --- a/repos/base/recipes/src/test-stack_smash/hash +++ b/repos/base/recipes/src/test-stack_smash/hash @@ -1 +1 @@ -2023-01-23 d240adc1caaf9819eecd1641b4bc6627334882c5 +2023-02-26 7422300211f45b18e4ddf31b4f6583a9cb2305f4 diff --git a/repos/base/recipes/src/test-synced_interface/hash b/repos/base/recipes/src/test-synced_interface/hash index 9db2be9cdf..087efa23cf 100644 --- a/repos/base/recipes/src/test-synced_interface/hash +++ b/repos/base/recipes/src/test-synced_interface/hash @@ -1 +1 @@ -2023-01-23 dabc5afd92c7fd22fa4d41bf49688dd6020d2e9e +2023-02-26 5e95059883d4bcdd9941e9957177b5d1822801ba diff --git a/repos/base/recipes/src/test-timer/hash b/repos/base/recipes/src/test-timer/hash index 91f90c4b17..432f8e22ba 100644 --- a/repos/base/recipes/src/test-timer/hash +++ b/repos/base/recipes/src/test-timer/hash @@ -1 +1 @@ -2023-01-23 10ce60bb1090abbd5ae420a23990666ab4aa2752 +2023-02-26 bd3c362eb6d59d9b28acbc7fe8f508e7dcd2f8c3 diff --git a/repos/base/recipes/src/test-tls/hash b/repos/base/recipes/src/test-tls/hash index c145cb52dc..18444020dd 100644 --- a/repos/base/recipes/src/test-tls/hash +++ b/repos/base/recipes/src/test-tls/hash @@ -1 +1 @@ -2023-01-23 c2dd5e47005ae0ef68d711a9bb8b0f8e032312f0 +2023-02-26 4fde8f14061c12a05cd5ed2d7d6d19b2c1dc1aa5 diff --git a/repos/base/recipes/src/test-token/hash b/repos/base/recipes/src/test-token/hash index 2cf40e91d2..b206497d9e 100644 --- a/repos/base/recipes/src/test-token/hash +++ b/repos/base/recipes/src/test-token/hash @@ -1 +1 @@ -2023-01-23 c0c2e72f7dabc111730f9f462d1e1ee44181bdd8 +2023-02-26 c7bccd95ce29a71c4815a4787cf93a9712db757c diff --git a/repos/base/recipes/src/test-xml_generator/hash b/repos/base/recipes/src/test-xml_generator/hash index f820c867fb..0c0dc22940 100644 --- a/repos/base/recipes/src/test-xml_generator/hash +++ b/repos/base/recipes/src/test-xml_generator/hash @@ -1 +1 @@ -2023-01-23 ccda142b8b6b65af4c4397cbd480ff0bcac54781 +2023-02-26 b4cf61fc0540aa6253e1d2572c19e7b2d46a1f03 diff --git a/repos/base/recipes/src/test-xml_node/hash b/repos/base/recipes/src/test-xml_node/hash index b9f70d6a4a..c336a2cf78 100644 --- a/repos/base/recipes/src/test-xml_node/hash +++ b/repos/base/recipes/src/test-xml_node/hash @@ -1 +1 @@ -2023-01-23 7974cc716f764c681268ef787cefb3d4cbf4b187 +2023-02-26 9058da3a0d4dd5969179ff67d8b9085b16387476 diff --git a/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash b/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash index f154efda8f..8c4b749beb 100644 --- a/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash +++ b/repos/dde_bsd/recipes/pkg/bsd_audio_drv/hash @@ -1 +1 @@ -2023-01-23 766faf24fa7cd8d212720f905ec81b2ead339a67 +2023-02-26 fa3ddbfd29826bcb6899046d9a652a6cfa73ce1b diff --git a/repos/dde_bsd/recipes/src/bsd_audio_drv/hash b/repos/dde_bsd/recipes/src/bsd_audio_drv/hash index 6b0fb56a03..23b33cfaab 100644 --- a/repos/dde_bsd/recipes/src/bsd_audio_drv/hash +++ b/repos/dde_bsd/recipes/src/bsd_audio_drv/hash @@ -1 +1 @@ -2023-01-23 e2e3eafe7f4d68e7e2bdd9d83827295473f94402 +2023-02-26 996259063c05a84bcc63b5e3c84de0d05fea1f97 diff --git a/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash b/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash index 791e844af9..750af9ea0f 100644 --- a/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash +++ b/repos/dde_ipxe/recipes/pkg/ipxe_nic_drv/hash @@ -1 +1 @@ -2023-01-23 da7b5fc9647d2906e6eea636f56f7e62a9a53c79 +2023-02-26 44280e94fdd577be56d9baa1a263252113c4b466 diff --git a/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash b/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash index cdc56b5bd7..7422d65587 100644 --- a/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash +++ b/repos/dde_ipxe/recipes/src/ipxe_nic_drv/hash @@ -1 +1 @@ -2023-01-23 a5b1a0ed7b48d414a1b4b4d4af143f5b7652bed9 +2023-02-26 cfba9abcdbc99df91fa9b282eb027da69c02901b diff --git a/repos/dde_linux/recipes/pkg/usb_modem_drv/hash b/repos/dde_linux/recipes/pkg/usb_modem_drv/hash index 9da11fe6c0..2e0074b263 100644 --- a/repos/dde_linux/recipes/pkg/usb_modem_drv/hash +++ b/repos/dde_linux/recipes/pkg/usb_modem_drv/hash @@ -1 +1 @@ -2023-01-23 d40a63819a6ca3a3635b45c5b8d43f6f07e8e94e +2023-02-26 bf2ce48fa5ea752cf84da286146659b8902d1320 diff --git a/repos/dde_linux/recipes/pkg/wireguard/hash b/repos/dde_linux/recipes/pkg/wireguard/hash index 3893c9791b..19d2c4a912 100644 --- a/repos/dde_linux/recipes/pkg/wireguard/hash +++ b/repos/dde_linux/recipes/pkg/wireguard/hash @@ -1 +1 @@ -2023-01-23 c5e993d7fbe9f68f42dba0b6affa0c9d225696b2 +2023-02-26 44710e282641c6f3d357897437484136a0f5a96c diff --git a/repos/dde_linux/recipes/raw/wifi_firmware/hash b/repos/dde_linux/recipes/raw/wifi_firmware/hash index 2bcef7a636..02ac251f6d 100644 --- a/repos/dde_linux/recipes/raw/wifi_firmware/hash +++ b/repos/dde_linux/recipes/raw/wifi_firmware/hash @@ -1 +1 @@ -2022-11-16 d3bbcc86f0716c6bf922357a75a64d6dd082cdbb +2023-02-26 4fcc0aa2bf099e30464208b34f991892bd528173 diff --git a/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash b/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash index 8eba4df533..ea9e9b9bcd 100644 --- a/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash +++ b/repos/dde_linux/recipes/src/legacy_usb_host_drv/hash @@ -1 +1 @@ -2023-01-23 3ae41e72cedd329295e33727ebf989eb0b922094 +2023-02-26 31a7941368ae14c49472aa6e1ba2ba0a3f3b1199 diff --git a/repos/dde_linux/recipes/src/usb_hid_drv/hash b/repos/dde_linux/recipes/src/usb_hid_drv/hash index b99eff8080..ff691167a0 100644 --- a/repos/dde_linux/recipes/src/usb_hid_drv/hash +++ b/repos/dde_linux/recipes/src/usb_hid_drv/hash @@ -1 +1 @@ -2023-01-23 fd359222f1f172d72b99fcd17d3b8564e471c4dd +2023-02-26 05b624d6a9803557c19eb22e6619c08f305577e6 diff --git a/repos/dde_linux/recipes/src/usb_modem_drv/hash b/repos/dde_linux/recipes/src/usb_modem_drv/hash index 5046ea1430..9685731750 100644 --- a/repos/dde_linux/recipes/src/usb_modem_drv/hash +++ b/repos/dde_linux/recipes/src/usb_modem_drv/hash @@ -1 +1 @@ -2023-01-23 cd6fd6835a0a1a0f564e3304abb27ca47334629d +2023-02-26 49d72391b16890253e8518757bc67144bbaa696c diff --git a/repos/dde_linux/recipes/src/usb_net_drv/hash b/repos/dde_linux/recipes/src/usb_net_drv/hash index 4707773afd..ecaa940de0 100644 --- a/repos/dde_linux/recipes/src/usb_net_drv/hash +++ b/repos/dde_linux/recipes/src/usb_net_drv/hash @@ -1 +1 @@ -2023-01-23 8156420f2e7ff847fd9097787db9ed0c1d93315d +2023-02-26 d53a4f30bfd5648d95d3ac7fe2a518795ab1e6d2 diff --git a/repos/dde_linux/recipes/src/vfs_lxip/hash b/repos/dde_linux/recipes/src/vfs_lxip/hash index 9581347e45..7e0ece163d 100644 --- a/repos/dde_linux/recipes/src/vfs_lxip/hash +++ b/repos/dde_linux/recipes/src/vfs_lxip/hash @@ -1 +1 @@ -2023-01-23 9c7651ee31f05e02e4631c5576c334859b036645 +2023-02-26 ce8a2211f3716b54271f34c91dbf54bff07f6fe3 diff --git a/repos/dde_linux/recipes/src/wireguard/hash b/repos/dde_linux/recipes/src/wireguard/hash index f1fc94fe13..5acd85e572 100644 --- a/repos/dde_linux/recipes/src/wireguard/hash +++ b/repos/dde_linux/recipes/src/wireguard/hash @@ -1 +1 @@ -2023-01-23 d6cfcab3019ac92700984700a8a82e566186bd93 +2023-02-26 68a94ffbfc512bd6fcae79b8624dbf65df8feab9 diff --git a/repos/dde_rump/recipes/pkg/ext2_fs/hash b/repos/dde_rump/recipes/pkg/ext2_fs/hash index 6cfc34baff..170384a720 100644 --- a/repos/dde_rump/recipes/pkg/ext2_fs/hash +++ b/repos/dde_rump/recipes/pkg/ext2_fs/hash @@ -1 +1 @@ -2023-01-23 943889bcfa6cb13bd220f65869c26625be5a1d50 +2023-02-26 d88d90458d67664d173386f06c3fb796f90c9410 diff --git a/repos/dde_rump/recipes/src/rump/hash b/repos/dde_rump/recipes/src/rump/hash index 722274c122..827066bb53 100644 --- a/repos/dde_rump/recipes/src/rump/hash +++ b/repos/dde_rump/recipes/src/rump/hash @@ -1 +1 @@ -2023-01-23 174522b770e6bb368a73b7b239cd74af3bc728f0 +2023-02-26 5a5da3c73da51a5108ea2a7c8d83db58fa053b8e diff --git a/repos/demo/recipes/src/demo/hash b/repos/demo/recipes/src/demo/hash index c1107e74d7..cd6441be0f 100644 --- a/repos/demo/recipes/src/demo/hash +++ b/repos/demo/recipes/src/demo/hash @@ -1 +1 @@ -2023-01-23 24e9a60be8aec38923fc1088e61399182e64e8f6 +2023-02-26 00bb17042a727dc160901d631a000a9c20043d94 diff --git a/repos/gems/recipes/api/gems/hash b/repos/gems/recipes/api/gems/hash index c540520406..80bc3e60a7 100644 --- a/repos/gems/recipes/api/gems/hash +++ b/repos/gems/recipes/api/gems/hash @@ -1 +1 @@ -2022-09-20 5fea0ab5512d6ddb9ed2020475cdba1daa60b1eb +2023-02-26 9a6d9f7ab7118ad4a6600348a2fd2b4ec1e49e43 diff --git a/repos/gems/recipes/api/polygon_gfx/hash b/repos/gems/recipes/api/polygon_gfx/hash index 86d195765b..0c91940572 100644 --- a/repos/gems/recipes/api/polygon_gfx/hash +++ b/repos/gems/recipes/api/polygon_gfx/hash @@ -1 +1 @@ -2022-09-20 14c0f9db7671c38dee03df8dae9fd1ada7f9e3de +2023-02-26 db65323f3b5b616282bc75d79efe47edab5481fa diff --git a/repos/gems/recipes/pkg/backdrop/hash b/repos/gems/recipes/pkg/backdrop/hash index 25f5c0d297..b3afa4e469 100644 --- a/repos/gems/recipes/pkg/backdrop/hash +++ b/repos/gems/recipes/pkg/backdrop/hash @@ -1 +1 @@ -2023-01-23 d65c1f5be7dc40b832c1666bbcc7f26261e30284 +2023-02-26 de81d0d7faf3bea3c4a9fe5031af4e6c693b3c5e diff --git a/repos/gems/recipes/pkg/cbe_check/hash b/repos/gems/recipes/pkg/cbe_check/hash index ffcd4eeaeb..f4fbafcae7 100644 --- a/repos/gems/recipes/pkg/cbe_check/hash +++ b/repos/gems/recipes/pkg/cbe_check/hash @@ -1 +1 @@ -2023-01-23 a492a465098e1aa07085ebaaa31626e7e416b9f4 +2023-02-26 df2b934a49b99c0ee53667f51534cbc0ad3497ea diff --git a/repos/gems/recipes/pkg/cbe_demo/hash b/repos/gems/recipes/pkg/cbe_demo/hash index e65e16b41a..69c9bfb6b1 100644 --- a/repos/gems/recipes/pkg/cbe_demo/hash +++ b/repos/gems/recipes/pkg/cbe_demo/hash @@ -1 +1 @@ -2023-01-23 8ab645abb7caa047c24116f3779f4b11b72fb477 +2023-02-26 80b240ce51fcd40633b262e36521880636b04dda diff --git a/repos/gems/recipes/pkg/cbe_fs/hash b/repos/gems/recipes/pkg/cbe_fs/hash index d5171406a4..df7a7f7294 100644 --- a/repos/gems/recipes/pkg/cbe_fs/hash +++ b/repos/gems/recipes/pkg/cbe_fs/hash @@ -1 +1 @@ -2023-01-23 025df13165bdc2bf59b37299735d5e312741720f +2023-02-26 7bed5c6fd4f4526f60f1cca6c765703d06bbb324 diff --git a/repos/gems/recipes/pkg/cbe_init/hash b/repos/gems/recipes/pkg/cbe_init/hash index c4a1727ae2..f5eff008ec 100644 --- a/repos/gems/recipes/pkg/cbe_init/hash +++ b/repos/gems/recipes/pkg/cbe_init/hash @@ -1 +1 @@ -2023-01-23 9fb373cccdec7065a9d0ec4f95e42e4047a1f68b +2023-02-26 ed7cdad33285c31d7a79e1b8aa627817b81ac683 diff --git a/repos/gems/recipes/pkg/cbe_shell/hash b/repos/gems/recipes/pkg/cbe_shell/hash index 0a3b0e6e77..0bd3fcb6aa 100644 --- a/repos/gems/recipes/pkg/cbe_shell/hash +++ b/repos/gems/recipes/pkg/cbe_shell/hash @@ -1 +1 @@ -2023-01-23 8385f9477a091b7fef8f2d4222237bbf7307ab2e +2023-02-26 61e87c1c27b4a59082350ea0fe7a8622cc18a795 diff --git a/repos/gems/recipes/pkg/cbe_ta_fs/hash b/repos/gems/recipes/pkg/cbe_ta_fs/hash index 71eb8ce8b5..3c531f5c6c 100644 --- a/repos/gems/recipes/pkg/cbe_ta_fs/hash +++ b/repos/gems/recipes/pkg/cbe_ta_fs/hash @@ -1 +1 @@ -2023-01-23 50823dfa69e9e304ead291282eaea0169de9b0b7 +2023-02-26 a8801d56a86f29947575be59a613feed6a044783 diff --git a/repos/gems/recipes/pkg/cbe_ta_vfs/hash b/repos/gems/recipes/pkg/cbe_ta_vfs/hash index 6221a7141f..e4f36163ae 100644 --- a/repos/gems/recipes/pkg/cbe_ta_vfs/hash +++ b/repos/gems/recipes/pkg/cbe_ta_vfs/hash @@ -1 +1 @@ -2023-01-23 a8da2957360f0842e98eb98bc9aae63f93cbe4a2 +2023-02-26 818e1febfcca319017ba0a45a87b28ea20d34df2 diff --git a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash index 6f66e1f512..a7a04fcf6b 100644 --- a/repos/gems/recipes/pkg/cbe_vbox5-nova/hash +++ b/repos/gems/recipes/pkg/cbe_vbox5-nova/hash @@ -1 +1 @@ -2023-01-23 f08d9b9860c5a05ebb3c44e0d28964d0443e0091 +2023-02-26 4a40f77d0a7cf8c04740819cd47f7edbec83d20b diff --git a/repos/gems/recipes/pkg/cbe_vfs/hash b/repos/gems/recipes/pkg/cbe_vfs/hash index 28456e5b11..c36b7e7223 100644 --- a/repos/gems/recipes/pkg/cbe_vfs/hash +++ b/repos/gems/recipes/pkg/cbe_vfs/hash @@ -1 +1 @@ -2023-01-23 4a73b7086673789b1cfe9c1f3fc27eb0c04bab1a +2023-02-26 60e7c7676f7024972efebf854d7aefc9d804d0fa diff --git a/repos/gems/recipes/pkg/cbe_vm_fs/hash b/repos/gems/recipes/pkg/cbe_vm_fs/hash index ec0b308969..2d67b70943 100644 --- a/repos/gems/recipes/pkg/cbe_vm_fs/hash +++ b/repos/gems/recipes/pkg/cbe_vm_fs/hash @@ -1 +1 @@ -2023-01-23 9dda30f60e0ffc1d0a3f100702d521afc1aeb6ee +2023-02-26 f0f1368e5c9e7a18050ff32affd1d425f05997f7 diff --git a/repos/gems/recipes/pkg/cpu_load_display/hash b/repos/gems/recipes/pkg/cpu_load_display/hash index 5bf306d0ed..7adc6fd3d0 100644 --- a/repos/gems/recipes/pkg/cpu_load_display/hash +++ b/repos/gems/recipes/pkg/cpu_load_display/hash @@ -1 +1 @@ -2023-01-23 54c4efeb97a0ffec7e8736a23f1c99f75db4e31c +2023-02-26 ea8b74510bc79de97ddb7c53c5d9afe5e58f5eeb diff --git a/repos/gems/recipes/pkg/depot_download/hash b/repos/gems/recipes/pkg/depot_download/hash index bc8943c7db..2ef44c5084 100644 --- a/repos/gems/recipes/pkg/depot_download/hash +++ b/repos/gems/recipes/pkg/depot_download/hash @@ -1 +1 @@ -2023-01-23 eb044aa40c180ff8ef48c54c33bac1a9bdb479a2 +2023-02-26 29f11d62f15313ded9730ba97bd414e1e200e363 diff --git a/repos/gems/recipes/pkg/download_coreplus/hash b/repos/gems/recipes/pkg/download_coreplus/hash index 9443399f61..1abf8857e3 100644 --- a/repos/gems/recipes/pkg/download_coreplus/hash +++ b/repos/gems/recipes/pkg/download_coreplus/hash @@ -1 +1 @@ -2023-01-23 66b2833f86e6cc430d487ece9ea923fd0b92788c +2023-02-26 fc2db1cf6b14ab6189260cf4d597a9ee97db9f74 diff --git a/repos/gems/recipes/pkg/drivers_managed-pc/hash b/repos/gems/recipes/pkg/drivers_managed-pc/hash index d03a0bedb4..7d910d9caa 100644 --- a/repos/gems/recipes/pkg/drivers_managed-pc/hash +++ b/repos/gems/recipes/pkg/drivers_managed-pc/hash @@ -1 +1 @@ -2023-01-23 bbf028e2d400c87efc8e3e2b6b297d3a2e535387 +2023-02-26 f721b3a65826d2f29100ddbeb853a75d4df13922 diff --git a/repos/gems/recipes/pkg/drivers_nic-pc/hash b/repos/gems/recipes/pkg/drivers_nic-pc/hash index 040fcf8847..cc8068ce7c 100644 --- a/repos/gems/recipes/pkg/drivers_nic-pc/hash +++ b/repos/gems/recipes/pkg/drivers_nic-pc/hash @@ -1 +1 @@ -2023-01-23 1d2385f8e5d9092592fd9781c38509ca0ff70c21 +2023-02-26 426d749055e7b6a47e954a6b6a3dc0837ef354f4 diff --git a/repos/gems/recipes/pkg/file_vault/hash b/repos/gems/recipes/pkg/file_vault/hash index 23e1bd7308..cdc15b1179 100644 --- a/repos/gems/recipes/pkg/file_vault/hash +++ b/repos/gems/recipes/pkg/file_vault/hash @@ -1 +1 @@ -2023-01-23 746114b60b537273a8661ba6a77b30ebe45dcd0b +2023-02-26 ffef80e4619fd48fa14018eeba5c8971b229fab9 diff --git a/repos/gems/recipes/pkg/fonts_fs/hash b/repos/gems/recipes/pkg/fonts_fs/hash index 0ca44189c1..978037c7cb 100644 --- a/repos/gems/recipes/pkg/fonts_fs/hash +++ b/repos/gems/recipes/pkg/fonts_fs/hash @@ -1 +1 @@ -2023-01-23 f72f364bd636d16ce48f0412e55ca05a510af33c +2023-02-26 d6ff82f03621e788b832140d45dca0990054d255 diff --git a/repos/gems/recipes/pkg/motif_decorator/hash b/repos/gems/recipes/pkg/motif_decorator/hash index 7640713b1a..79bd40c15a 100644 --- a/repos/gems/recipes/pkg/motif_decorator/hash +++ b/repos/gems/recipes/pkg/motif_decorator/hash @@ -1 +1 @@ -2023-01-23 10faac219d127b3ca435a7f0b3b5279f51c7dc94 +2023-02-26 cf672b30a9ab5fbc63856453c7b44a07b5bc69be diff --git a/repos/gems/recipes/pkg/motif_wm/hash b/repos/gems/recipes/pkg/motif_wm/hash index b40684c189..0ea573ab9b 100644 --- a/repos/gems/recipes/pkg/motif_wm/hash +++ b/repos/gems/recipes/pkg/motif_wm/hash @@ -1 +1 @@ -2023-01-23 4a87ccc0385b01866adc8c021efb37d9e98ae5cb +2023-02-26 d4a40b73bfa3a545905326a471f02de57722a526 diff --git a/repos/gems/recipes/pkg/nano3d/hash b/repos/gems/recipes/pkg/nano3d/hash index 071b067206..6fc2ece87b 100644 --- a/repos/gems/recipes/pkg/nano3d/hash +++ b/repos/gems/recipes/pkg/nano3d/hash @@ -1 +1 @@ -2023-01-23 5024394daad8f219afc6ae688f1d3f5643bf1aa3 +2023-02-26 dfd872a5af242661e83ec0b6b63f89dd6b8f0006 diff --git a/repos/gems/recipes/pkg/osci/hash b/repos/gems/recipes/pkg/osci/hash index af2bc27260..b2c90ef266 100644 --- a/repos/gems/recipes/pkg/osci/hash +++ b/repos/gems/recipes/pkg/osci/hash @@ -1 +1 @@ -2023-01-31 0d3ec33511f8d3c157580a734dfed41504dc34c6 +2023-02-26 1e8c994b61cdd0a8e8da313a6d66a772f1961f88 diff --git a/repos/gems/recipes/pkg/screenshot_trigger/hash b/repos/gems/recipes/pkg/screenshot_trigger/hash index 9fc0713931..18788026ae 100644 --- a/repos/gems/recipes/pkg/screenshot_trigger/hash +++ b/repos/gems/recipes/pkg/screenshot_trigger/hash @@ -1 +1 @@ -2023-01-29 a87e1719fd98401958f47ff3ae9f0c641b4c6094 +2023-02-26 a9238b649a615d68a9ffaf97aaed32eacf408c52 diff --git a/repos/gems/recipes/pkg/sculpt/hash b/repos/gems/recipes/pkg/sculpt/hash index 6d7898922c..a243434911 100644 --- a/repos/gems/recipes/pkg/sculpt/hash +++ b/repos/gems/recipes/pkg/sculpt/hash @@ -1 +1 @@ -2023-01-23 b2525190f782d7b475950fcbc8a827c1eb12841c +2023-02-26 ad5a5e9e4b6b9c883087e45d6e13b4cc0080d20d diff --git a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash index 5be58b4f64..46499df5de 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution-pc/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution-pc/hash @@ -1 +1 @@ -2023-01-23 04a6e6727803cd7acf54dff7ec7eed0c454bd43e +2023-02-26 f9462c22858adbef10a7a5203b6dd59fdff47d24 diff --git a/repos/gems/recipes/pkg/sculpt_distribution/hash b/repos/gems/recipes/pkg/sculpt_distribution/hash index aec3e51edb..c5c6f8eae2 100644 --- a/repos/gems/recipes/pkg/sculpt_distribution/hash +++ b/repos/gems/recipes/pkg/sculpt_distribution/hash @@ -1 +1 @@ -2023-01-23 6f3f6c8dd1bbbbf4851fa5f56d6ab4f91e5c18f5 +2023-02-26 b65afd13e82259b01e40caf9a2e718e800f897d4 diff --git a/repos/gems/recipes/pkg/sticks_blue_backdrop/hash b/repos/gems/recipes/pkg/sticks_blue_backdrop/hash index 6ee09e8f45..441c7a5015 100644 --- a/repos/gems/recipes/pkg/sticks_blue_backdrop/hash +++ b/repos/gems/recipes/pkg/sticks_blue_backdrop/hash @@ -1 +1 @@ -2023-01-23 adb33c5797f3a676176e0dff7047570669c24ca1 +2023-02-26 df96b4e4f0dc77923f0054518539c04c7cbadd16 diff --git a/repos/gems/recipes/pkg/terminal/hash b/repos/gems/recipes/pkg/terminal/hash index 4c4b965727..a14bb8c2bc 100644 --- a/repos/gems/recipes/pkg/terminal/hash +++ b/repos/gems/recipes/pkg/terminal/hash @@ -1 +1 @@ -2023-01-23 cef755f0d455508d5717828e54832649465ecc75 +2023-02-26 d5da9679d2c0b130f6482b0bd0332420541ff421 diff --git a/repos/gems/recipes/pkg/test-depot_query_index/hash b/repos/gems/recipes/pkg/test-depot_query_index/hash index fac573103b..b5bf342b22 100644 --- a/repos/gems/recipes/pkg/test-depot_query_index/hash +++ b/repos/gems/recipes/pkg/test-depot_query_index/hash @@ -1 +1 @@ -2023-01-23 38104dae4c3e7db9af38213e041541219f29158b +2023-02-26 95b3d381383de3a7088d8a618fdf5d75778dcc2e diff --git a/repos/gems/recipes/pkg/test-fs_tool/hash b/repos/gems/recipes/pkg/test-fs_tool/hash index 10f7452b52..7307a157c5 100644 --- a/repos/gems/recipes/pkg/test-fs_tool/hash +++ b/repos/gems/recipes/pkg/test-fs_tool/hash @@ -1 +1 @@ -2023-01-23 e6a8e42ab2ec04821421d4857fafb4b4ca44638b +2023-02-26 d6b63379b0a15ae9066a69f8990143f4f5d4782e diff --git a/repos/gems/recipes/pkg/test-libc_vfs_audit/hash b/repos/gems/recipes/pkg/test-libc_vfs_audit/hash index 30971682c0..68612891a8 100644 --- a/repos/gems/recipes/pkg/test-libc_vfs_audit/hash +++ b/repos/gems/recipes/pkg/test-libc_vfs_audit/hash @@ -1 +1 @@ -2023-01-23 4eda889fcc61507128cc3118f5762f8f917deab0 +2023-02-26 34bd6e6d300cd85c35fba9fad58500306a102e5d diff --git a/repos/gems/recipes/pkg/themed_decorator/hash b/repos/gems/recipes/pkg/themed_decorator/hash index 3c4a80b3b8..a90cf8b2b7 100644 --- a/repos/gems/recipes/pkg/themed_decorator/hash +++ b/repos/gems/recipes/pkg/themed_decorator/hash @@ -1 +1 @@ -2023-01-23 a39424b03fef0776c395aa06635bd16f21c26e7d +2023-02-26 dc5c0b328d1bfb5ef82b1ba5015475956947e066 diff --git a/repos/gems/recipes/pkg/themed_wm/hash b/repos/gems/recipes/pkg/themed_wm/hash index 5bf306d0ed..763c1cafa1 100644 --- a/repos/gems/recipes/pkg/themed_wm/hash +++ b/repos/gems/recipes/pkg/themed_wm/hash @@ -1 +1 @@ -2023-01-23 54c4efeb97a0ffec7e8736a23f1c99f75db4e31c +2023-02-26 d14bf7efafa42e0ad121e96bf8e18e7cf7756f58 diff --git a/repos/gems/recipes/pkg/touch_keyboard/hash b/repos/gems/recipes/pkg/touch_keyboard/hash index 042bfc16f6..bf48755572 100644 --- a/repos/gems/recipes/pkg/touch_keyboard/hash +++ b/repos/gems/recipes/pkg/touch_keyboard/hash @@ -1 +1 @@ -2023-01-23 3c73dbf1fbdc21445250996ff47a3e2f7f5d0d45 +2023-02-26 e6abe0720c4bdbc3ed431db32584f71bcb42034d diff --git a/repos/gems/recipes/pkg/trace_fs/hash b/repos/gems/recipes/pkg/trace_fs/hash index 7212af6648..e75d118923 100644 --- a/repos/gems/recipes/pkg/trace_fs/hash +++ b/repos/gems/recipes/pkg/trace_fs/hash @@ -1 +1 @@ -2023-01-23 d629cdbf07cc34df76e1e8f470170fa6f74ffef0 +2023-02-26 38e9bb175ad1b5c48ed9542965fb3e24f9a12eb7 diff --git a/repos/gems/recipes/pkg/trace_recorder/hash b/repos/gems/recipes/pkg/trace_recorder/hash index 7f5d08cb44..26039d32a4 100644 --- a/repos/gems/recipes/pkg/trace_recorder/hash +++ b/repos/gems/recipes/pkg/trace_recorder/hash @@ -1 +1 @@ -2023-01-23 9b39724c4e5b5b4bba1cdfc8e591d45e65a689ef +2023-02-26 cc4f4c6cb23fa691e6eb50c3cd291ea6a5c745b6 diff --git a/repos/gems/recipes/pkg/window_layouter/hash b/repos/gems/recipes/pkg/window_layouter/hash index d40adc36b3..21ff45738c 100644 --- a/repos/gems/recipes/pkg/window_layouter/hash +++ b/repos/gems/recipes/pkg/window_layouter/hash @@ -1 +1 @@ -2023-01-23 604e5cb7caf95e874465f5e45fc0acfd12b30430 +2023-02-26 297c47c62978053b1aaf1d433a85ad2033a47727 diff --git a/repos/gems/recipes/pkg/wm/hash b/repos/gems/recipes/pkg/wm/hash index be9419e963..cbae5dc152 100644 --- a/repos/gems/recipes/pkg/wm/hash +++ b/repos/gems/recipes/pkg/wm/hash @@ -1 +1 @@ -2023-01-23 c1ce4b4468c7a76373fe6e66865457750e5f8b52 +2023-02-26 f28cd8f49bbc6b0531ee8b8a0d04f488715d42ed diff --git a/repos/gems/recipes/raw/depot_download/hash b/repos/gems/recipes/raw/depot_download/hash index f2f4457e54..a6b4c48e0e 100644 --- a/repos/gems/recipes/raw/depot_download/hash +++ b/repos/gems/recipes/raw/depot_download/hash @@ -1 +1 @@ -2019-02-26 77808cf3b17e2ff495ccb474d31391b98f03b58d +2023-02-26 f05400f4090af64d5576978abe74900ed3b85bda diff --git a/repos/gems/recipes/raw/drivers_managed-pc/hash b/repos/gems/recipes/raw/drivers_managed-pc/hash index df3bad9546..6ffeba7758 100644 --- a/repos/gems/recipes/raw/drivers_managed-pc/hash +++ b/repos/gems/recipes/raw/drivers_managed-pc/hash @@ -1 +1 @@ -2022-11-28 617e573bfe0b992a9ae6bc4917173dbbf4e0e151 +2023-02-26 5af6d3ace246cfb4fd4c982cf1aa3b6f7e2f7293 diff --git a/repos/gems/recipes/src/backdrop/hash b/repos/gems/recipes/src/backdrop/hash index 03020e5471..c31ddd6e89 100644 --- a/repos/gems/recipes/src/backdrop/hash +++ b/repos/gems/recipes/src/backdrop/hash @@ -1 +1 @@ -2023-01-23 60d7e935aded36051717ef3db98a4036878e6a27 +2023-02-26 1cc2b3ce483ba126aaa2f151f6559273f0e5d833 diff --git a/repos/gems/recipes/src/cbe/hash b/repos/gems/recipes/src/cbe/hash index c5a8aa3ea7..c3f7a32bdb 100644 --- a/repos/gems/recipes/src/cbe/hash +++ b/repos/gems/recipes/src/cbe/hash @@ -1 +1 @@ -2023-01-23 ba4211191c27c4bbb04d63c33847e0b079a89380 +2023-02-26 5616bd30a5e0e1246e4681cfeba267aa604ffe21 diff --git a/repos/gems/recipes/src/cpu_load_display/hash b/repos/gems/recipes/src/cpu_load_display/hash index c9a234e652..d0d5b449ac 100644 --- a/repos/gems/recipes/src/cpu_load_display/hash +++ b/repos/gems/recipes/src/cpu_load_display/hash @@ -1 +1 @@ -2023-01-23 a2fe561a8de545a401e7aa374b6c43fae2e71316 +2023-02-26 deb4996eb326d6599372d5fc377dab535c77eee9 diff --git a/repos/gems/recipes/src/decorator/hash b/repos/gems/recipes/src/decorator/hash index 01fad32045..9ee0e39ff0 100644 --- a/repos/gems/recipes/src/decorator/hash +++ b/repos/gems/recipes/src/decorator/hash @@ -1 +1 @@ -2023-01-23 0486a77334f81ade97b42a904051d9f7396e41a7 +2023-02-26 1d123001ef89e560fe66bb67a6ae8be1b6a0e298 diff --git a/repos/gems/recipes/src/depot_deploy/hash b/repos/gems/recipes/src/depot_deploy/hash index 7da5d25175..c8de5ee97f 100644 --- a/repos/gems/recipes/src/depot_deploy/hash +++ b/repos/gems/recipes/src/depot_deploy/hash @@ -1 +1 @@ -2023-01-23 acc211c5421856e75dba2dbc0d4bca8267e3212c +2023-02-26 f429071712beec48f5c29fd10022210c76505ac7 diff --git a/repos/gems/recipes/src/depot_download_manager/hash b/repos/gems/recipes/src/depot_download_manager/hash index 087e83c0c4..5dcdda8013 100644 --- a/repos/gems/recipes/src/depot_download_manager/hash +++ b/repos/gems/recipes/src/depot_download_manager/hash @@ -1 +1 @@ -2023-01-23 cda04d7ef7fc5096a27a917e7cef108a61b86b0e +2023-02-26 c8c584ee0bac9a9e1746965fe4ffb6d9afffac5f diff --git a/repos/gems/recipes/src/depot_query/hash b/repos/gems/recipes/src/depot_query/hash index c3a7394d5c..7315bd53a4 100644 --- a/repos/gems/recipes/src/depot_query/hash +++ b/repos/gems/recipes/src/depot_query/hash @@ -1 +1 @@ -2023-01-23 8a596a097d06ad69077ae6caf67ff39a25a5f8f8 +2023-02-26 1d0764cfdbee9d93a56fb2c20510a457365329f1 diff --git a/repos/gems/recipes/src/driver_manager/hash b/repos/gems/recipes/src/driver_manager/hash index 7b1603d392..a077eec394 100644 --- a/repos/gems/recipes/src/driver_manager/hash +++ b/repos/gems/recipes/src/driver_manager/hash @@ -1 +1 @@ -2023-01-23 89f0256891a6911c63aa5d1d603bb687053145e6 +2023-02-26 1aa41cf73806b45840d3111fcee739fdd674540d diff --git a/repos/gems/recipes/src/file_terminal/hash b/repos/gems/recipes/src/file_terminal/hash index fed54a92fb..c680549e02 100644 --- a/repos/gems/recipes/src/file_terminal/hash +++ b/repos/gems/recipes/src/file_terminal/hash @@ -1 +1 @@ -2023-01-23 35aa1e8a86cb39e6a5989a89ec31f84022267806 +2023-02-26 bcf6c90d960e9d706f85a0f223abdfd54f4fb428 diff --git a/repos/gems/recipes/src/file_vault/hash b/repos/gems/recipes/src/file_vault/hash index 2a87ce32d2..11753c5f50 100644 --- a/repos/gems/recipes/src/file_vault/hash +++ b/repos/gems/recipes/src/file_vault/hash @@ -1 +1 @@ -2023-01-23 80ce8c4da64c49b3daf16de530fd39792e74be92 +2023-02-26 1caa9882057ae18158f77c8b0c8c0644fba31c56 diff --git a/repos/gems/recipes/src/fs_query/hash b/repos/gems/recipes/src/fs_query/hash index 0279bab950..a49ee88867 100644 --- a/repos/gems/recipes/src/fs_query/hash +++ b/repos/gems/recipes/src/fs_query/hash @@ -1 +1 @@ -2023-01-23 d76271691a453f668877f334fe2e192494a0dca5 +2023-02-26 8a87f32ae5e62dcfae5ed2eeccd6d94ff89132ff diff --git a/repos/gems/recipes/src/fs_tool/hash b/repos/gems/recipes/src/fs_tool/hash index 7bf2fd9539..e2ee9fe17b 100644 --- a/repos/gems/recipes/src/fs_tool/hash +++ b/repos/gems/recipes/src/fs_tool/hash @@ -1 +1 @@ -2023-01-23 686388dbf4e6f386c14de2d17d84eeec2029cca7 +2023-02-26 28e9368d7097b0ca453cc9e8c6cac3c3f8544e8e diff --git a/repos/gems/recipes/src/gpt_write/hash b/repos/gems/recipes/src/gpt_write/hash index 7b5082db59..ede3834f67 100644 --- a/repos/gems/recipes/src/gpt_write/hash +++ b/repos/gems/recipes/src/gpt_write/hash @@ -1 +1 @@ -2023-01-23 c01f8864af23a333f0ee731d4338f8a285ab5436 +2023-02-26 b282cba5a7652c274e6557ec55c82921301d3b9f diff --git a/repos/gems/recipes/src/gui_fader/hash b/repos/gems/recipes/src/gui_fader/hash index af892055dd..4e5d5ba52b 100644 --- a/repos/gems/recipes/src/gui_fader/hash +++ b/repos/gems/recipes/src/gui_fader/hash @@ -1 +1 @@ -2023-01-23 734b35346d1aac7b4e54ce0ba27adf49fded8744 +2023-02-26 159badcd239111fe62d5aa72cbd1bda9334e3d75 diff --git a/repos/gems/recipes/src/menu_view/hash b/repos/gems/recipes/src/menu_view/hash index 45c6565705..1991dd748a 100644 --- a/repos/gems/recipes/src/menu_view/hash +++ b/repos/gems/recipes/src/menu_view/hash @@ -1 +1 @@ -2023-01-23 2430d46a8b572de6f389f956908afda0ddc85f66 +2023-02-26 79d45e4d33b81e356133772681f3bd294cc56ca2 diff --git a/repos/gems/recipes/src/mixer_gui_qt/hash b/repos/gems/recipes/src/mixer_gui_qt/hash index 0a8ba91284..42e6d1db3f 100644 --- a/repos/gems/recipes/src/mixer_gui_qt/hash +++ b/repos/gems/recipes/src/mixer_gui_qt/hash @@ -1 +1 @@ -2023-01-23 8f8d49af87837a0ca08a70fc4dac1a09107e1de4 +2023-02-26 1a468d9d8c75354c51457b027cf0007eafac49bc diff --git a/repos/gems/recipes/src/nano3d/hash b/repos/gems/recipes/src/nano3d/hash index ced56ab7cf..f189a6cf4a 100644 --- a/repos/gems/recipes/src/nano3d/hash +++ b/repos/gems/recipes/src/nano3d/hash @@ -1 +1 @@ -2023-01-23 d6a75d72d81819e9e940bca6508583fbc58fde67 +2023-02-26 397cb9bc4961903ad005f4d351c92b5296bda5d7 diff --git a/repos/gems/recipes/src/osci/hash b/repos/gems/recipes/src/osci/hash index 5e81b6c093..3c9dfaa677 100644 --- a/repos/gems/recipes/src/osci/hash +++ b/repos/gems/recipes/src/osci/hash @@ -1 +1 @@ -2023-01-31 4b14ae81ac3638c5db44bf52ba6853620c820072 +2023-02-26 9865417d0bae13e5bbd968d5ed88a973a1ebdea2 diff --git a/repos/gems/recipes/src/screenshot_trigger/hash b/repos/gems/recipes/src/screenshot_trigger/hash index f2470cffe5..7c9bbd3222 100644 --- a/repos/gems/recipes/src/screenshot_trigger/hash +++ b/repos/gems/recipes/src/screenshot_trigger/hash @@ -1 +1 @@ -2023-01-29-a a4f24340626a9eb891f8de5061d2e1bb38ba56dc +2023-02-26 52571058944ff91a7d1066ca7361c71e85973317 diff --git a/repos/gems/recipes/src/sculpt_manager/hash b/repos/gems/recipes/src/sculpt_manager/hash index b79b78248b..c233b6ea72 100644 --- a/repos/gems/recipes/src/sculpt_manager/hash +++ b/repos/gems/recipes/src/sculpt_manager/hash @@ -1 +1 @@ -2023-01-23 afdc4c9e65891916e1bde171ba93bc4850e2f345 +2023-02-26 144f6da299d5f82ad477685d7f3fa5a98e81d491 diff --git a/repos/gems/recipes/src/terminal/hash b/repos/gems/recipes/src/terminal/hash index dd10563b80..8dbfefc4ff 100644 --- a/repos/gems/recipes/src/terminal/hash +++ b/repos/gems/recipes/src/terminal/hash @@ -1 +1 @@ -2023-01-23 369dee7db2bfad628728fc3d2e88586ecd867b32 +2023-02-26 f6d640d2566e0040e58d6ad96312dd0fb5bbc4df diff --git a/repos/gems/recipes/src/test-tiled_wm/hash b/repos/gems/recipes/src/test-tiled_wm/hash index f1a69425f2..899650873c 100644 --- a/repos/gems/recipes/src/test-tiled_wm/hash +++ b/repos/gems/recipes/src/test-tiled_wm/hash @@ -1 +1 @@ -2023-01-23 2b5f4f6ecb98c3cf22532c05b3d9d06991a687a1 +2023-02-26 9b3c04e7fdd2ec2d2fa1971cea7e5ac2ee1b2c28 diff --git a/repos/gems/recipes/src/text_area/hash b/repos/gems/recipes/src/text_area/hash index 7e8012547b..99cb61817c 100644 --- a/repos/gems/recipes/src/text_area/hash +++ b/repos/gems/recipes/src/text_area/hash @@ -1 +1 @@ -2023-01-23 a0bab996627db08419b620d7cc2c74499c75fdba +2023-02-26 26bd5bb0f4772cae699f4bfea69d60c8c43a72e0 diff --git a/repos/gems/recipes/src/themed_decorator/hash b/repos/gems/recipes/src/themed_decorator/hash index 3265c2a6af..85801bbda7 100644 --- a/repos/gems/recipes/src/themed_decorator/hash +++ b/repos/gems/recipes/src/themed_decorator/hash @@ -1 +1 @@ -2023-01-23 3be3a45ecd733b370b8046682f18b27df740053c +2023-02-26 1e1f2dd5436a2a0e2f2d251b5bc3ded5c01913dd diff --git a/repos/gems/recipes/src/touch_keyboard/hash b/repos/gems/recipes/src/touch_keyboard/hash index 684f61414b..278c790f54 100644 --- a/repos/gems/recipes/src/touch_keyboard/hash +++ b/repos/gems/recipes/src/touch_keyboard/hash @@ -1 +1 @@ -2023-01-23 164aab8ebe0882ab57b40fcb1f8a5e578ba2fd48 +2023-02-26 b7e745d3461b983540c16425e92fa9f6dffde4dc diff --git a/repos/gems/recipes/src/trace_recorder/hash b/repos/gems/recipes/src/trace_recorder/hash index ab60d5383b..3237a8822c 100644 --- a/repos/gems/recipes/src/trace_recorder/hash +++ b/repos/gems/recipes/src/trace_recorder/hash @@ -1 +1 @@ -2023-01-23 20db2efed23348ae95b3b39c134283395e61d901 +2023-02-26 88026719977b744fb01a9da53a82eec5b8b1bac9 diff --git a/repos/gems/recipes/src/trace_recorder_policy/hash b/repos/gems/recipes/src/trace_recorder_policy/hash index 4166793006..218e72604f 100644 --- a/repos/gems/recipes/src/trace_recorder_policy/hash +++ b/repos/gems/recipes/src/trace_recorder_policy/hash @@ -1 +1 @@ -2023-01-23 380566f47ea7b7deddd135a0431456b4b57fe309 +2023-02-26 3545c0c2498abded379c8bc300e04bedef94bc94 diff --git a/repos/gems/recipes/src/vfs_audit/hash b/repos/gems/recipes/src/vfs_audit/hash index a13e32faea..28f871487a 100644 --- a/repos/gems/recipes/src/vfs_audit/hash +++ b/repos/gems/recipes/src/vfs_audit/hash @@ -1 +1 @@ -2023-01-23 b879e3c632630e6b1ac3dad2333dab1f33b25026 +2023-02-26 2dbfa33906044f6a72856d92aafbb9ecb2eef26a diff --git a/repos/gems/recipes/src/vfs_gpu/hash b/repos/gems/recipes/src/vfs_gpu/hash index 759582fbe0..ad6c73088f 100644 --- a/repos/gems/recipes/src/vfs_gpu/hash +++ b/repos/gems/recipes/src/vfs_gpu/hash @@ -1 +1 @@ -2023-01-23 b4366f355a0d17fa0eaae36c205162590e2fbf65 +2023-02-26 44eb0e98691465e9d972dd5e15e355d4a22bfd1e diff --git a/repos/gems/recipes/src/vfs_import/hash b/repos/gems/recipes/src/vfs_import/hash index 80f6d01ccd..cffb93669d 100644 --- a/repos/gems/recipes/src/vfs_import/hash +++ b/repos/gems/recipes/src/vfs_import/hash @@ -1 +1 @@ -2023-01-23 ec67075b6fd5e725ab34f02d5739d6a5ac22173c +2023-02-26 df2c45d5110d27084278f440ee2f85eeedfc2e64 diff --git a/repos/gems/recipes/src/vfs_pipe/hash b/repos/gems/recipes/src/vfs_pipe/hash index 2c9836a990..d26ecc4468 100644 --- a/repos/gems/recipes/src/vfs_pipe/hash +++ b/repos/gems/recipes/src/vfs_pipe/hash @@ -1 +1 @@ -2023-01-23 c2946412169ba5c30014f45cbe6cb978b0827886 +2023-02-26 321f7e18d51290a8ff1e9fdf4923c24b6e5efca8 diff --git a/repos/gems/recipes/src/vfs_trace/hash b/repos/gems/recipes/src/vfs_trace/hash index f021055b9a..165910d833 100644 --- a/repos/gems/recipes/src/vfs_trace/hash +++ b/repos/gems/recipes/src/vfs_trace/hash @@ -1 +1 @@ -2023-01-23 1a39e04e72b67ccec06b19b49265de5367d45f2a +2023-02-26 bfb24cadbf8a3f05fa1b440e4f4dbe7ea9c737ff diff --git a/repos/gems/recipes/src/vfs_ttf/hash b/repos/gems/recipes/src/vfs_ttf/hash index 99bcb423d0..8008f42639 100644 --- a/repos/gems/recipes/src/vfs_ttf/hash +++ b/repos/gems/recipes/src/vfs_ttf/hash @@ -1 +1 @@ -2023-01-23 7d25516d588e8cb24fd3c16eb38d7255e376a814 +2023-02-26 5964f4c79f677f87bff193cf5fce8fed09b24754 diff --git a/repos/gems/recipes/src/window_layouter/hash b/repos/gems/recipes/src/window_layouter/hash index 5a5a2124b1..81ef75c6c3 100644 --- a/repos/gems/recipes/src/window_layouter/hash +++ b/repos/gems/recipes/src/window_layouter/hash @@ -1 +1 @@ -2023-01-23 0ceda18d160593db2d7a49f374dcd5e52d34d9fe +2023-02-26 ba80b1f82bc663e559bc225b028122aeda61791c diff --git a/repos/gems/recipes/src/wm/hash b/repos/gems/recipes/src/wm/hash index 48887f7029..19a070badd 100644 --- a/repos/gems/recipes/src/wm/hash +++ b/repos/gems/recipes/src/wm/hash @@ -1 +1 @@ -2023-01-23 15ebb8f9004430dc1d4f007eaf288a7b80ef53aa +2023-02-26 b62e61079166401c2d323f33a53e678077121e4a diff --git a/repos/libports/recipes/pkg/acpica/hash b/repos/libports/recipes/pkg/acpica/hash index 9b2159ef83..6658b2a715 100644 --- a/repos/libports/recipes/pkg/acpica/hash +++ b/repos/libports/recipes/pkg/acpica/hash @@ -1 +1 @@ -2023-01-23 d68437d48888bda0cd84545c8edc79a14b0f6c2a +2023-02-26 cfef91255b9d2f66d5a1dbb5a0ba665090ec9457 diff --git a/repos/libports/recipes/pkg/gcov/hash b/repos/libports/recipes/pkg/gcov/hash index 855d41fc93..29dfaf7263 100644 --- a/repos/libports/recipes/pkg/gcov/hash +++ b/repos/libports/recipes/pkg/gcov/hash @@ -1 +1 @@ -2023-01-23 6da78ed7f12d82abd4b4a67b9d71a0d785f1b231 +2023-02-26 a73c157d69594deac281640e5c1218b19e53ec70 diff --git a/repos/libports/recipes/pkg/mesa_gears/hash b/repos/libports/recipes/pkg/mesa_gears/hash index e8d69f3710..d555f830a2 100644 --- a/repos/libports/recipes/pkg/mesa_gears/hash +++ b/repos/libports/recipes/pkg/mesa_gears/hash @@ -1 +1 @@ -2023-01-23 e6d3fff61cfdc1f773ccf85bb25cfa4d479984ec +2023-02-26 56b0efc8cdc8e61141f5e389b6fa33e110523610 diff --git a/repos/libports/recipes/pkg/mesa_gpu-cpu/hash b/repos/libports/recipes/pkg/mesa_gpu-cpu/hash index a5741e675d..8c219e198b 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-cpu/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-cpu/hash @@ -1 +1 @@ -2023-01-23 cfc784f837382258b99328f73dcfd9574d42c0e5 +2023-02-26 bc977bf98fa8e2991741d71af799f30bb9c5d678 diff --git a/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash b/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash index b27238ed59..187cd48f95 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-etnaviv/hash @@ -1 +1 @@ -2023-01-23 778e4b1ff295f24e6d18c4e5e963675be0dc1828 +2023-02-26 59ea8f42fda78d4b0a2049fff1f530c05de99357 diff --git a/repos/libports/recipes/pkg/mesa_gpu-intel/hash b/repos/libports/recipes/pkg/mesa_gpu-intel/hash index 7dc6d22df5..4a2295e40c 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-intel/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-intel/hash @@ -1 +1 @@ -2023-01-23 8b91b8759a18da85bd7deeca9b334ca7722f978b +2023-02-26 81841acdfe0748836bfb272d1666980dc368d906 diff --git a/repos/libports/recipes/pkg/mesa_gpu-lima/hash b/repos/libports/recipes/pkg/mesa_gpu-lima/hash index d4443f8a2f..314fa7e9ac 100644 --- a/repos/libports/recipes/pkg/mesa_gpu-lima/hash +++ b/repos/libports/recipes/pkg/mesa_gpu-lima/hash @@ -1 +1 @@ -2023-01-23 bd8af820001fe165f72c8524e979478d7777b8b1 +2023-02-26 3a4071830293ee709d307ce1950c82bbb3d3632e diff --git a/repos/libports/recipes/pkg/pdf_view/hash b/repos/libports/recipes/pkg/pdf_view/hash index ab8ad9f594..1518d0bdd7 100644 --- a/repos/libports/recipes/pkg/pdf_view/hash +++ b/repos/libports/recipes/pkg/pdf_view/hash @@ -1 +1 @@ -2023-01-23 5eb50d797b02927cc9b831ea160d192ce640b0d1 +2023-02-26 e579dbbde047732099758096d79476f57156de15 diff --git a/repos/libports/recipes/pkg/qt5_textedit/hash b/repos/libports/recipes/pkg/qt5_textedit/hash index 029fcc5204..2d18ffd17b 100644 --- a/repos/libports/recipes/pkg/qt5_textedit/hash +++ b/repos/libports/recipes/pkg/qt5_textedit/hash @@ -1 +1 @@ -2023-01-23 3ed7e9a3bc47e64c7d20cb9ba5f636216a8f8710 +2023-02-26 d9948eca4a7d7248601792999a7a5c40d17e2402 diff --git a/repos/libports/recipes/pkg/sntp_dummy_rtc/hash b/repos/libports/recipes/pkg/sntp_dummy_rtc/hash index 7769f93713..3805848cdb 100644 --- a/repos/libports/recipes/pkg/sntp_dummy_rtc/hash +++ b/repos/libports/recipes/pkg/sntp_dummy_rtc/hash @@ -1 +1 @@ -2023-01-23 189a60f4a32b13c8bcd268ea5199c0a674cf44d1 +2023-02-26 a631320c186a2472f7808764c5a32447b3dfd199 diff --git a/repos/libports/recipes/pkg/stdin2out/hash b/repos/libports/recipes/pkg/stdin2out/hash index 437b8bbed2..50cbdf6d81 100644 --- a/repos/libports/recipes/pkg/stdin2out/hash +++ b/repos/libports/recipes/pkg/stdin2out/hash @@ -1 +1 @@ -2023-01-31 b3ddb9062413d40ee5b1b48948a8c4a51e8cdbf7 +2023-02-26 4a73d89274cdb5b84bf4e7b6de0143e6539872a3 diff --git a/repos/libports/recipes/pkg/system_clock-dummy/hash b/repos/libports/recipes/pkg/system_clock-dummy/hash index 014382552a..7d52dad60c 100644 --- a/repos/libports/recipes/pkg/system_clock-dummy/hash +++ b/repos/libports/recipes/pkg/system_clock-dummy/hash @@ -1 +1 @@ -2023-01-23 e40eb8ae46bf7cb77cba101bb3935b4f25c4b765 +2023-02-26 092900f8b2b232d7d59c2a9be0d497a9aff711b5 diff --git a/repos/libports/recipes/pkg/system_clock-pc/hash b/repos/libports/recipes/pkg/system_clock-pc/hash index 0d7e6a4597..97d5009ffa 100644 --- a/repos/libports/recipes/pkg/system_clock-pc/hash +++ b/repos/libports/recipes/pkg/system_clock-pc/hash @@ -1 +1 @@ -2023-01-23 c2dad5dc2ecebdc86745d41ec8ed63d94ffb0df4 +2023-02-26 7f950cbc772e06f9c3819275523bfae9259dd904 diff --git a/repos/libports/recipes/pkg/system_rtc-linux/hash b/repos/libports/recipes/pkg/system_rtc-linux/hash index 3ba1e7a270..d2bf4ab8a2 100644 --- a/repos/libports/recipes/pkg/system_rtc-linux/hash +++ b/repos/libports/recipes/pkg/system_rtc-linux/hash @@ -1 +1 @@ -2023-01-23 c083fff059d62dd50f949a5dc839205a738b3475 +2023-02-26 8d9f49ab974a4c2913b268c1766c4c748aa9e30a diff --git a/repos/libports/recipes/pkg/system_rtc-pc/hash b/repos/libports/recipes/pkg/system_rtc-pc/hash index 0d75bf47e9..41223f620c 100644 --- a/repos/libports/recipes/pkg/system_rtc-pc/hash +++ b/repos/libports/recipes/pkg/system_rtc-pc/hash @@ -1 +1 @@ -2023-01-23 c041a64a50ace980ae0505e1ebf8318fac52fe24 +2023-02-26 ae86ccbf2308fe753040a2050bda1f13d659cad6 diff --git a/repos/libports/recipes/pkg/test-expat/hash b/repos/libports/recipes/pkg/test-expat/hash index 72a291fe2f..39bc4c1630 100644 --- a/repos/libports/recipes/pkg/test-expat/hash +++ b/repos/libports/recipes/pkg/test-expat/hash @@ -1 +1 @@ -2023-01-23 e9948e8c23ac51ec259bafe35342b9f68449a24a +2023-02-26 fcf503eb3b839820592e2fcfea214696a5f8f353 diff --git a/repos/libports/recipes/pkg/test-ldso/hash b/repos/libports/recipes/pkg/test-ldso/hash index 3a45564a68..8f6f2ee1f8 100644 --- a/repos/libports/recipes/pkg/test-ldso/hash +++ b/repos/libports/recipes/pkg/test-ldso/hash @@ -1 +1 @@ -2023-01-23 741600ef76b100c5d2a78c1d162e8d21ffb5596a +2023-02-26 584e97a8e8800b5f91ff0f82fdbf78390c0e0461 diff --git a/repos/libports/recipes/pkg/test-libc/hash b/repos/libports/recipes/pkg/test-libc/hash index 415f05be87..d850688439 100644 --- a/repos/libports/recipes/pkg/test-libc/hash +++ b/repos/libports/recipes/pkg/test-libc/hash @@ -1 +1 @@ -2023-01-23 d5a7badf85671ef5df1b608b6df558c40df999fd +2023-02-26 54bfc335b16046781e61070fa7458dc0efa2f59f diff --git a/repos/libports/recipes/pkg/test-libc_connect_lwip/hash b/repos/libports/recipes/pkg/test-libc_connect_lwip/hash index 75b8a95fdb..92fbdca643 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lwip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_lwip/hash @@ -1 +1 @@ -2023-01-23 9679ccca318d721b108341ffe6b9917a4d79cc29 +2023-02-26 e950e9501c06ddd4b48918a1772d4ab911d18755 diff --git a/repos/libports/recipes/pkg/test-libc_connect_lxip/hash b/repos/libports/recipes/pkg/test-libc_connect_lxip/hash index 4dd3d20655..e24c04cb4d 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_lxip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_lxip/hash @@ -1 +1 @@ -2023-01-23 486367584c74848b0ab83f92474bd202f0147a9a +2023-02-26 e01883bfa123e757e7a3f8d48d37ea5de8b4d12f diff --git a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash index cd0a6ebcc1..8de26df7ca 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lwip/hash @@ -1 +1 @@ -2023-01-23 a6adae11f0a3bf4de25180c3c95780b671c21141 +2023-02-26 70fbed40063c927a75ad6fa305ae93685d2532eb diff --git a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash index cc1627a5c5..5914435d8f 100644 --- a/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash +++ b/repos/libports/recipes/pkg/test-libc_connect_vfs_server_lxip/hash @@ -1 +1 @@ -2023-01-23 9a1a45ef2d568a79c99f90009a84247238569415 +2023-02-26 415d412d341c537aafdaeddc3d379eeea152befd diff --git a/repos/libports/recipes/pkg/test-libc_counter/hash b/repos/libports/recipes/pkg/test-libc_counter/hash index 9f4fecf3a4..30e7646d77 100644 --- a/repos/libports/recipes/pkg/test-libc_counter/hash +++ b/repos/libports/recipes/pkg/test-libc_counter/hash @@ -1 +1 @@ -2023-01-23 f18f1bdfe762d85e26a9d03016c7456019fe6df7 +2023-02-26 60a97b26474a79fd21e4c728657c0a8a4bd94ffb diff --git a/repos/libports/recipes/pkg/test-libc_execve/hash b/repos/libports/recipes/pkg/test-libc_execve/hash index de5df60d8c..8410035565 100644 --- a/repos/libports/recipes/pkg/test-libc_execve/hash +++ b/repos/libports/recipes/pkg/test-libc_execve/hash @@ -1 +1 @@ -2023-01-23 2111ad49fed033e866ab0a0aa4dbd0e2c3b93b15 +2023-02-26 46af9d88c6d1fa42bd43eec735d47a1eebf2173f diff --git a/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash b/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash index 4ec92251e2..c0d3bce6de 100644 --- a/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash +++ b/repos/libports/recipes/pkg/test-libc_fifo_pipe/hash @@ -1 +1 @@ -2023-01-23 fcff982a9e5d586796cdddbe6c56e3218e85c4a4 +2023-02-26 c61322a1cb57dcb0646136931153c7faad6c7a09 diff --git a/repos/libports/recipes/pkg/test-libc_fork/hash b/repos/libports/recipes/pkg/test-libc_fork/hash index 50d161a2b5..803d907ba4 100644 --- a/repos/libports/recipes/pkg/test-libc_fork/hash +++ b/repos/libports/recipes/pkg/test-libc_fork/hash @@ -1 +1 @@ -2023-01-23 b76e83f87d975d5cd068c16b875a986807cbbc99 +2023-02-26 e9b81fb1c58563b461f6589ea021a5f1ef924585 diff --git a/repos/libports/recipes/pkg/test-libc_getenv/hash b/repos/libports/recipes/pkg/test-libc_getenv/hash index 40790a1adb..ace0fe3e11 100644 --- a/repos/libports/recipes/pkg/test-libc_getenv/hash +++ b/repos/libports/recipes/pkg/test-libc_getenv/hash @@ -1 +1 @@ -2023-01-23 6ceb895a726058532e338909287ac4d59871f695 +2023-02-26 6df009476df35b513d5a6cf8f2339ad7df2ab7ea diff --git a/repos/libports/recipes/pkg/test-libc_pipe/hash b/repos/libports/recipes/pkg/test-libc_pipe/hash index 4549e7b4c3..8c4d1402f0 100644 --- a/repos/libports/recipes/pkg/test-libc_pipe/hash +++ b/repos/libports/recipes/pkg/test-libc_pipe/hash @@ -1 +1 @@ -2023-01-23 e547d76f391b784c1f022223aa59602f2efded2b +2023-02-26 7938dd83ea9a587053e98179faff242248325c21 diff --git a/repos/libports/recipes/pkg/test-libc_vfs/hash b/repos/libports/recipes/pkg/test-libc_vfs/hash index 8ed2c27166..d3c79ea03c 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs/hash @@ -1 +1 @@ -2023-01-23 d68780e939d260cfa2c6aaaaac4d9af7285a4702 +2023-02-26 b48de1d74a11e4ae6fcd41158d2429103f128dd4 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_block/hash b/repos/libports/recipes/pkg/test-libc_vfs_block/hash index 129e2f9588..5a166b67e8 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_block/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_block/hash @@ -1 +1 @@ -2023-01-23 d02242d74746a46528b80a73e2fd9c0efaac0e6c +2023-02-26 c5454fe4ff1ffc01e44174a2a0c79cd3912db657 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_counter/hash b/repos/libports/recipes/pkg/test-libc_vfs_counter/hash index 82ecd90e2a..e4f58b5496 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_counter/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_counter/hash @@ -1 +1 @@ -2023-01-23 0420a799ed0341b6910a97f1536d9cd62e6bfa0e +2023-02-26 eacb50b204ff144ee8a61ef18032b79073a45a15 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_fs/hash b/repos/libports/recipes/pkg/test-libc_vfs_fs/hash index e10a12e8cd..cabf115ed0 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_fs/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_fs/hash @@ -1 +1 @@ -2023-01-23 e8c0fea751c96522d85405e76af4e77fcb89d046 +2023-02-26 dd241b7022a1b80b30ce6d2e31d738668baa4a4d diff --git a/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash b/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash index 5f88014084..7705481305 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_fs_chained/hash @@ -1 +1 @@ -2023-01-23 4967ee222417f096513bf33f471b731bc48153e5 +2023-02-26 58c0cd52f48f288060f01079855fbf4241ac21a7 diff --git a/repos/libports/recipes/pkg/test-libc_vfs_ram/hash b/repos/libports/recipes/pkg/test-libc_vfs_ram/hash index 5a5db8cad5..8d9f58a981 100644 --- a/repos/libports/recipes/pkg/test-libc_vfs_ram/hash +++ b/repos/libports/recipes/pkg/test-libc_vfs_ram/hash @@ -1 +1 @@ -2023-01-23 dcdcca75b28e8e04fe43781051b5099ac7326670 +2023-02-26 e89f572c30f1ee53c5998b6b9eb5435db9dcb563 diff --git a/repos/libports/recipes/pkg/test-pthread/hash b/repos/libports/recipes/pkg/test-pthread/hash index 7760d4b645..770d6ab5f2 100644 --- a/repos/libports/recipes/pkg/test-pthread/hash +++ b/repos/libports/recipes/pkg/test-pthread/hash @@ -1 +1 @@ -2023-01-23 242e1c3eaf1cfbabe72a091881c132d470136ee1 +2023-02-26 ad8bc8752a45d3d5664eba3890cfeed9fb80ac15 diff --git a/repos/libports/recipes/pkg/test-sequence/hash b/repos/libports/recipes/pkg/test-sequence/hash index 3e7d7e9873..b03545e7a2 100644 --- a/repos/libports/recipes/pkg/test-sequence/hash +++ b/repos/libports/recipes/pkg/test-sequence/hash @@ -1 +1 @@ -2023-01-23 e9bcdbd028296d4daf72520d1863481465ffe566 +2023-02-26 cfc4780bb331538306c3e245a6b9e1ca77153a32 diff --git a/repos/libports/recipes/pkg/test-spark/hash b/repos/libports/recipes/pkg/test-spark/hash index e97fdba132..b2d53f0b87 100644 --- a/repos/libports/recipes/pkg/test-spark/hash +++ b/repos/libports/recipes/pkg/test-spark/hash @@ -1 +1 @@ -2023-01-23 bc07ae97e8416686d1dfffc55b9353e8b7ebf8e9 +2023-02-26 06cee75ff9bc8a93448575f383a42f4cd8aac3b9 diff --git a/repos/libports/recipes/pkg/test-spark_exception/hash b/repos/libports/recipes/pkg/test-spark_exception/hash index 6e477028de..6e6de2f12c 100644 --- a/repos/libports/recipes/pkg/test-spark_exception/hash +++ b/repos/libports/recipes/pkg/test-spark_exception/hash @@ -1 +1 @@ -2023-01-23 efb973a5ef646a661af83d0f0c5dbe791b1beba0 +2023-02-26 7d4fb513fe67bbc7b89218a13d07e36b7e3b1514 diff --git a/repos/libports/recipes/pkg/test-spark_secondary_stack/hash b/repos/libports/recipes/pkg/test-spark_secondary_stack/hash index 338722e777..c51b8a53de 100644 --- a/repos/libports/recipes/pkg/test-spark_secondary_stack/hash +++ b/repos/libports/recipes/pkg/test-spark_secondary_stack/hash @@ -1 +1 @@ -2023-01-23 f821c983c9366f9f93eed83eb2e41b4e2ae8f90d +2023-02-26 1ee61710667061fdf90838019813ab234103b03f diff --git a/repos/libports/recipes/pkg/test-stdcxx/hash b/repos/libports/recipes/pkg/test-stdcxx/hash index 957c3bbe35..b0bee10206 100644 --- a/repos/libports/recipes/pkg/test-stdcxx/hash +++ b/repos/libports/recipes/pkg/test-stdcxx/hash @@ -1 +1 @@ -2023-01-23 a69515407de605654f87814509c2c3c7ef35fff9 +2023-02-26 1b4d8aec860f01c271c9adec74c0220f6a87b31a diff --git a/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash b/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash index fc50708b22..b577ca4336 100644 --- a/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash +++ b/repos/libports/recipes/pkg/test-tcp_bulk_lwip/hash @@ -1 +1 @@ -2023-01-23 97100374de2ff11d5af3b2cd40bccc25e9517bd2 +2023-02-26 b59b288096f6ba9a8e0745a8563a44f693839865 diff --git a/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash b/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash index 0ad1fd0db0..61f61ae091 100644 --- a/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash +++ b/repos/libports/recipes/pkg/test-tcp_bulk_lxip/hash @@ -1 +1 @@ -2023-01-23 a9ca030a2b352f911569c0653ec7816573d086a2 +2023-02-26 5bde636c17842be03a30b33f66f29b62c780e85f diff --git a/repos/libports/recipes/pkg/usb_webcam/hash b/repos/libports/recipes/pkg/usb_webcam/hash index 65ce4ab52c..f5db42abee 100644 --- a/repos/libports/recipes/pkg/usb_webcam/hash +++ b/repos/libports/recipes/pkg/usb_webcam/hash @@ -1 +1 @@ -2023-01-23 3a7bf70ee160473a0388a08104d2d22b6031b278 +2023-02-26 1031d1e2308896e5d50878603d694423b0c2583e diff --git a/repos/libports/recipes/src/acpica/hash b/repos/libports/recipes/src/acpica/hash index 83426a951f..df68d5107c 100644 --- a/repos/libports/recipes/src/acpica/hash +++ b/repos/libports/recipes/src/acpica/hash @@ -1 +1 @@ -2023-01-23 5d5b848327835d10c28db19bd469023b7fb4f3cf +2023-02-26 b96bb5677d72decc9e0e57d809a0c5ee50b6161e diff --git a/repos/libports/recipes/src/extract/hash b/repos/libports/recipes/src/extract/hash index 12c6891698..286aea8630 100644 --- a/repos/libports/recipes/src/extract/hash +++ b/repos/libports/recipes/src/extract/hash @@ -1 +1 @@ -2023-01-23 73bc8f1988c9f3fc2c8874340f38578f6e1ff77c +2023-02-26 c8dbbd347f6c8174514d8609dd458e6a266ddfb8 diff --git a/repos/libports/recipes/src/fetchurl/hash b/repos/libports/recipes/src/fetchurl/hash index 9f3ee15dc3..c71e4e24bd 100644 --- a/repos/libports/recipes/src/fetchurl/hash +++ b/repos/libports/recipes/src/fetchurl/hash @@ -1 +1 @@ -2023-01-23 5bfc9b071c5e2aa2a1f0cf4f23476a6077fff3a4 +2023-02-26 82dd27acd36c8fa8299d4aebba8948e066943867 diff --git a/repos/libports/recipes/src/gcov/hash b/repos/libports/recipes/src/gcov/hash index daab6075f6..8344a5b667 100644 --- a/repos/libports/recipes/src/gcov/hash +++ b/repos/libports/recipes/src/gcov/hash @@ -1 +1 @@ -2023-01-23 44f472ed7d1c38c1d064471abfcdf1cac6dc704c +2023-02-26 94837df61910c08192fc581b244ad2b654314f1d diff --git a/repos/libports/recipes/src/libc/hash b/repos/libports/recipes/src/libc/hash index 1bc3f9158c..eaac0c5bcd 100644 --- a/repos/libports/recipes/src/libc/hash +++ b/repos/libports/recipes/src/libc/hash @@ -1 +1 @@ -2023-01-23 3f16a7f91ec51622bab283244cca11c921f904fe +2023-02-26 07c76ae1d65023581e41cc2a1c752082b0fe46c0 diff --git a/repos/libports/recipes/src/libdrm/hash b/repos/libports/recipes/src/libdrm/hash index f30b2a4e3b..df79d45fe4 100644 --- a/repos/libports/recipes/src/libdrm/hash +++ b/repos/libports/recipes/src/libdrm/hash @@ -1 +1 @@ -2023-01-23 566dc92b327c734a470287f0d6218761c57c3029 +2023-02-26 6728a429f8891d59712c8d509b33b56b21fbdf2e diff --git a/repos/libports/recipes/src/libqgenodeviewwidget/hash b/repos/libports/recipes/src/libqgenodeviewwidget/hash index 3737fc9fc3..2f3e87cc24 100644 --- a/repos/libports/recipes/src/libqgenodeviewwidget/hash +++ b/repos/libports/recipes/src/libqgenodeviewwidget/hash @@ -1 +1 @@ -2023-01-23 d4ab934a9ed10a270dd1d91bf0a51fdfaee52feb +2023-02-26 37234cf997cf6922652489175b21772192b38e75 diff --git a/repos/libports/recipes/src/libqpluginwidget/hash b/repos/libports/recipes/src/libqpluginwidget/hash index a26df4129d..3149a08b70 100644 --- a/repos/libports/recipes/src/libqpluginwidget/hash +++ b/repos/libports/recipes/src/libqpluginwidget/hash @@ -1 +1 @@ -2023-01-23 87092c31044d1aff9a920a0a96146f428880bf1e +2023-02-26 663f062c9169d1b72d5189eaedb542b8b2a7823f diff --git a/repos/libports/recipes/src/libsparkcrypto/hash b/repos/libports/recipes/src/libsparkcrypto/hash index 9ade17eee9..e31d6e1605 100644 --- a/repos/libports/recipes/src/libsparkcrypto/hash +++ b/repos/libports/recipes/src/libsparkcrypto/hash @@ -1 +1 @@ -2023-01-23 2fcd498367caa2defad77c3c7214fb30383ac24a +2023-02-26 69c4c8a210a4955f49ce3f373d27a90277ac2101 diff --git a/repos/libports/recipes/src/libusb/hash b/repos/libports/recipes/src/libusb/hash index c9ffe52f46..5b82c4fb3f 100644 --- a/repos/libports/recipes/src/libusb/hash +++ b/repos/libports/recipes/src/libusb/hash @@ -1 +1 @@ -2023-01-23 7246f709ed437d7c81608c50780fda5d87d6e5d5 +2023-02-26 36587e645ca07af1a12cb70e3868d2cb94eb0316 diff --git a/repos/libports/recipes/src/mesa/hash b/repos/libports/recipes/src/mesa/hash index f8c4aa6ded..4dfd799d90 100644 --- a/repos/libports/recipes/src/mesa/hash +++ b/repos/libports/recipes/src/mesa/hash @@ -1 +1 @@ -2023-01-23 a9b09f01809a31359b110277eabbea6a83019bd5 +2023-02-26 b5ced6175da41155ebefe79cafc26fbffda72e6b diff --git a/repos/libports/recipes/src/mesa_gears/hash b/repos/libports/recipes/src/mesa_gears/hash index 507d0fd654..346856799c 100644 --- a/repos/libports/recipes/src/mesa_gears/hash +++ b/repos/libports/recipes/src/mesa_gears/hash @@ -1 +1 @@ -2023-01-23 e7efc198f629ec832d98e8b41075c68987eb449c +2023-02-26 39194ac6209393b9b6e95e3555184d9c1bce6ead diff --git a/repos/libports/recipes/src/pcsc-lite/hash b/repos/libports/recipes/src/pcsc-lite/hash index 50843dab4d..c13147622b 100644 --- a/repos/libports/recipes/src/pcsc-lite/hash +++ b/repos/libports/recipes/src/pcsc-lite/hash @@ -1 +1 @@ -2023-01-23 91c9afc1efa91431dc1b4e8875283948d00a9ee9 +2023-02-26 19608f06f055c30101bb14dc8c1f01eb9e7e3379 diff --git a/repos/libports/recipes/src/pdf_view/hash b/repos/libports/recipes/src/pdf_view/hash index 2570524f1d..d5fa3b1c6a 100644 --- a/repos/libports/recipes/src/pdf_view/hash +++ b/repos/libports/recipes/src/pdf_view/hash @@ -1 +1 @@ -2023-01-23 5668387c057fafc6301c414fed3deadf738d751a +2023-02-26 5d41cb11f586b0b1b617358ed2b7662d728adbbe diff --git a/repos/libports/recipes/src/posix/hash b/repos/libports/recipes/src/posix/hash index 115b08d74f..983b5c6740 100644 --- a/repos/libports/recipes/src/posix/hash +++ b/repos/libports/recipes/src/posix/hash @@ -1 +1 @@ -2023-01-23 0f0778d208a114140a399d9fba53728b12848f3b +2023-02-26 4c313edf4ab3fd7aaccca7ef65609b31262b727f diff --git a/repos/libports/recipes/src/qt5_base/hash b/repos/libports/recipes/src/qt5_base/hash index 229326c6cb..45fdf6e61b 100644 --- a/repos/libports/recipes/src/qt5_base/hash +++ b/repos/libports/recipes/src/qt5_base/hash @@ -1 +1 @@ -2023-01-23 9cff81fd6a7fd2cef5aa1b022d9708495e3d0d91 +2023-02-26 dc597eb0e339d9e2275e1d71662dd15d06f52b42 diff --git a/repos/libports/recipes/src/qt5_component/hash b/repos/libports/recipes/src/qt5_component/hash index 4911301aab..1c44455e16 100644 --- a/repos/libports/recipes/src/qt5_component/hash +++ b/repos/libports/recipes/src/qt5_component/hash @@ -1 +1 @@ -2023-01-23 10e9c25efa95ffb6c598fe85cb446d547f801560 +2023-02-26 113c4d025978dab60933ef956e25ad966a8b5a69 diff --git a/repos/libports/recipes/src/qt5_launchpad/hash b/repos/libports/recipes/src/qt5_launchpad/hash index a9f0f32247..814e04ce82 100644 --- a/repos/libports/recipes/src/qt5_launchpad/hash +++ b/repos/libports/recipes/src/qt5_launchpad/hash @@ -1 +1 @@ -2023-01-23 7546f1c6d90d5f3b5375f3e8c9f9dc07d82f1ec8 +2023-02-26 9b0b6d207fe603144cccc887717d8d0d7653138d diff --git a/repos/libports/recipes/src/qt5_quickcontrols2/hash b/repos/libports/recipes/src/qt5_quickcontrols2/hash index 6b071ce3f2..88e0d8861c 100644 --- a/repos/libports/recipes/src/qt5_quickcontrols2/hash +++ b/repos/libports/recipes/src/qt5_quickcontrols2/hash @@ -1 +1 @@ -2023-01-23 1f2267826bbdff87c6483bc67d80474d0a585d95 +2023-02-26 8ba7e55c290d55123cbc0260a0509d9455716b55 diff --git a/repos/libports/recipes/src/qt5_svg/hash b/repos/libports/recipes/src/qt5_svg/hash index 2ce96a5ede..363a7aac4f 100644 --- a/repos/libports/recipes/src/qt5_svg/hash +++ b/repos/libports/recipes/src/qt5_svg/hash @@ -1 +1 @@ -2023-01-23 06f0239e6850aa11a4dcf617da631a1ceb2f7b3a +2023-02-26 0641cb9d7acaedd55e42bae2fb0a453be859efc3 diff --git a/repos/libports/recipes/src/sanitizer/hash b/repos/libports/recipes/src/sanitizer/hash index 7c567148e4..208671ef87 100644 --- a/repos/libports/recipes/src/sanitizer/hash +++ b/repos/libports/recipes/src/sanitizer/hash @@ -1 +1 @@ -2023-01-23 2a56627e4c4ed7020847889b43ace0b71ab638c6 +2023-02-26 12fe84eedcef85e5033890b7bf81e9bb0ea0adaa diff --git a/repos/libports/recipes/src/sntp_client/hash b/repos/libports/recipes/src/sntp_client/hash index ec59ee2162..8c3b8d97bc 100644 --- a/repos/libports/recipes/src/sntp_client/hash +++ b/repos/libports/recipes/src/sntp_client/hash @@ -1 +1 @@ -2023-01-23 765f6013a01fe52988209ee9d017b7d189ac01da +2023-02-26 59484b798f79e770df918bcc6c0ab2135dfc12d6 diff --git a/repos/libports/recipes/src/spark/hash b/repos/libports/recipes/src/spark/hash index 9dacab6b27..c00f45cde3 100644 --- a/repos/libports/recipes/src/spark/hash +++ b/repos/libports/recipes/src/spark/hash @@ -1 +1 @@ -2023-01-23 420d3895fd253f40787476dbf0e3085fb3937911 +2023-02-26 2f8753c8863456e02aadb308889541534220c5de diff --git a/repos/libports/recipes/src/system_rtc/hash b/repos/libports/recipes/src/system_rtc/hash index 167056af39..23ff9d0e44 100644 --- a/repos/libports/recipes/src/system_rtc/hash +++ b/repos/libports/recipes/src/system_rtc/hash @@ -1 +1 @@ -2023-01-23 eafd53b975ef51ef3f1c9b1fc8be3721c67208ab +2023-02-26 dd7380269e9735b69435593586e82c6689e8415a diff --git a/repos/libports/recipes/src/test-ldso/hash b/repos/libports/recipes/src/test-ldso/hash index 95bd4d5e77..5dfe838569 100644 --- a/repos/libports/recipes/src/test-ldso/hash +++ b/repos/libports/recipes/src/test-ldso/hash @@ -1 +1 @@ -2023-01-23 8d0162103879312f84eaa568f7b222c62c691bae +2023-02-26 35914b2899736ab596cf656d17596d1a0a3319d6 diff --git a/repos/libports/recipes/src/test-libc_fifo_pipe/hash b/repos/libports/recipes/src/test-libc_fifo_pipe/hash index 0d574fac03..b3fcea8b08 100644 --- a/repos/libports/recipes/src/test-libc_fifo_pipe/hash +++ b/repos/libports/recipes/src/test-libc_fifo_pipe/hash @@ -1 +1 @@ -2023-01-23 9d89ef4670f7855771c73ed66c1b66dd75182359 +2023-02-26 322040d32f200a73fcd35e71216bb879a66e9c98 diff --git a/repos/libports/recipes/src/test-libc_vfs/hash b/repos/libports/recipes/src/test-libc_vfs/hash index 713a420100..dca233c664 100644 --- a/repos/libports/recipes/src/test-libc_vfs/hash +++ b/repos/libports/recipes/src/test-libc_vfs/hash @@ -1 +1 @@ -2023-01-23 b3b1c3ffd5dd548f1e17c513c9702a0d209eef61 +2023-02-26 764fb8ddd05807ff8059845c4502ca32da87fe1f diff --git a/repos/libports/recipes/src/test-libc_vfs_block/hash b/repos/libports/recipes/src/test-libc_vfs_block/hash index 1acc688471..5b0f8c015e 100644 --- a/repos/libports/recipes/src/test-libc_vfs_block/hash +++ b/repos/libports/recipes/src/test-libc_vfs_block/hash @@ -1 +1 @@ -2023-01-23 1431f31b92d8f6e1e20c88111a30b5bc427730f7 +2023-02-26 d7fb31a7beeb0e7d6b3b59cc5b1f2959a84ad9ee diff --git a/repos/libports/recipes/src/test-netty/hash b/repos/libports/recipes/src/test-netty/hash index 7e96b9a03b..2649ca568e 100644 --- a/repos/libports/recipes/src/test-netty/hash +++ b/repos/libports/recipes/src/test-netty/hash @@ -1 +1 @@ -2023-01-23 a83d89626f89372a2f2c54f15db7568a2ff54ce8 +2023-02-26 3c904cc5d704e8520ee9e265095731eebd02b87f diff --git a/repos/libports/recipes/src/test-pthread/hash b/repos/libports/recipes/src/test-pthread/hash index abe756d858..663b711f97 100644 --- a/repos/libports/recipes/src/test-pthread/hash +++ b/repos/libports/recipes/src/test-pthread/hash @@ -1 +1 @@ -2023-01-23 1f385e99ed07247f2eda6fec1f7845f53672173e +2023-02-26 24b5ce01ef455353843a70b6caecb14ed86baa6a diff --git a/repos/libports/recipes/src/test-qpluginwidget/hash b/repos/libports/recipes/src/test-qpluginwidget/hash index 89cbbaa90c..d881bc53b0 100644 --- a/repos/libports/recipes/src/test-qpluginwidget/hash +++ b/repos/libports/recipes/src/test-qpluginwidget/hash @@ -1 +1 @@ -2023-01-23 26c1836f83072bee95fa2cf4d2362f476eef2d62 +2023-02-26 413e4cb104100fd7c8b8e15a847770c0043bd3fb diff --git a/repos/libports/recipes/src/test-spark/hash b/repos/libports/recipes/src/test-spark/hash index 29260bf299..e6f5532a55 100644 --- a/repos/libports/recipes/src/test-spark/hash +++ b/repos/libports/recipes/src/test-spark/hash @@ -1 +1 @@ -2023-01-23 fc318b13ffa931e9074491402d54c2a7925a169d +2023-02-26 18b81738169e7a6e25b44dd2556976142e135760 diff --git a/repos/libports/recipes/src/test-spark_exception/hash b/repos/libports/recipes/src/test-spark_exception/hash index dee5302d45..fa018d3aa7 100644 --- a/repos/libports/recipes/src/test-spark_exception/hash +++ b/repos/libports/recipes/src/test-spark_exception/hash @@ -1 +1 @@ -2023-01-23 2473d2e6e6e7f1b88dd3d260fbeb1928a5d96e70 +2023-02-26 2c7f11400e54a9ea38d4f30558331af951c4bfb1 diff --git a/repos/libports/recipes/src/test-spark_secondary_stack/hash b/repos/libports/recipes/src/test-spark_secondary_stack/hash index d6630f6303..54e7ba625d 100644 --- a/repos/libports/recipes/src/test-spark_secondary_stack/hash +++ b/repos/libports/recipes/src/test-spark_secondary_stack/hash @@ -1 +1 @@ -2023-01-23 b7c8c685b14171af6a3f28bbeedc20fda9e33f8d +2023-02-26 008ea76f909cf8c7307afc891e25136f27ae4603 diff --git a/repos/libports/recipes/src/test-tcp/hash b/repos/libports/recipes/src/test-tcp/hash index 6d18f503bf..120bffb770 100644 --- a/repos/libports/recipes/src/test-tcp/hash +++ b/repos/libports/recipes/src/test-tcp/hash @@ -1 +1 @@ -2023-01-23 373d7b4dc5e3359b06805c2a42ab96cb27939fbd +2023-02-26 cb24eada700bad8eeb9c55651ae7e4708cc6229a diff --git a/repos/libports/recipes/src/usb_webcam/hash b/repos/libports/recipes/src/usb_webcam/hash index 68b871bece..db5fec8859 100644 --- a/repos/libports/recipes/src/usb_webcam/hash +++ b/repos/libports/recipes/src/usb_webcam/hash @@ -1 +1 @@ -2023-01-23 4673f8398b8b668d37244a342aeb85d943c9e0a7 +2023-02-26 c57f4d91c39792318d83d4a3a91a3043b8a446a8 diff --git a/repos/libports/recipes/src/vesa_drv/hash b/repos/libports/recipes/src/vesa_drv/hash index be3eec8a5e..21a506748c 100644 --- a/repos/libports/recipes/src/vesa_drv/hash +++ b/repos/libports/recipes/src/vesa_drv/hash @@ -1 +1 @@ -2023-01-23 4a726d4a5bfa473a3bb65128e6fdfc5ccbf6ce91 +2023-02-26 88f9f28b41e103cc61265b13200219e3f43f37ce diff --git a/repos/libports/recipes/src/vfs_fatfs/hash b/repos/libports/recipes/src/vfs_fatfs/hash index 640c758dbd..8ed85f94d9 100644 --- a/repos/libports/recipes/src/vfs_fatfs/hash +++ b/repos/libports/recipes/src/vfs_fatfs/hash @@ -1 +1 @@ -2023-01-23 f09b0d9a6cd76fe89b39231930a103d04fc8c397 +2023-02-26 d8902f4702bf4d4c1638431f60d8e1831170741c diff --git a/repos/libports/recipes/src/vfs_jitterentropy/hash b/repos/libports/recipes/src/vfs_jitterentropy/hash index 025bee557e..da88ed87f1 100644 --- a/repos/libports/recipes/src/vfs_jitterentropy/hash +++ b/repos/libports/recipes/src/vfs_jitterentropy/hash @@ -1 +1 @@ -2023-01-23 7f866dc66ae6884ee38e872f2bf7685ff0ed834b +2023-02-26 5a789664b447f6118336328f2f47d327e8a433b5 diff --git a/repos/libports/recipes/src/vfs_libusb/hash b/repos/libports/recipes/src/vfs_libusb/hash index fdd67115e7..8e50c0a29a 100644 --- a/repos/libports/recipes/src/vfs_libusb/hash +++ b/repos/libports/recipes/src/vfs_libusb/hash @@ -1 +1 @@ -2023-01-23 e09932c4fa69e2a5a8c0c6d026f96e6cfc204f82 +2023-02-26 3c8cfeff028df535b134c64c3fdb161693e75bdd diff --git a/repos/libports/recipes/src/vfs_lwip/hash b/repos/libports/recipes/src/vfs_lwip/hash index 36fe60e9b6..6c15f05396 100644 --- a/repos/libports/recipes/src/vfs_lwip/hash +++ b/repos/libports/recipes/src/vfs_lwip/hash @@ -1 +1 @@ -2023-01-23 dc73044f61e5b67ff021f131b462b60dbe1785bc +2023-02-26 6b58bc6a9b40b89dcb266dbf8b891608bdac4a4c diff --git a/repos/libports/recipes/src/vfs_oss/hash b/repos/libports/recipes/src/vfs_oss/hash index aca44d0055..5f11d31118 100644 --- a/repos/libports/recipes/src/vfs_oss/hash +++ b/repos/libports/recipes/src/vfs_oss/hash @@ -1 +1 @@ -2023-01-23 7b8aaaad7f80ec0ecbf477f4545bff3714221e84 +2023-02-26 d4041bc2b101e198d39e34e424bc2ae30dd39a34 diff --git a/repos/os/recipes/api/event_session/hash b/repos/os/recipes/api/event_session/hash index 56c59dd6bb..422633b724 100644 --- a/repos/os/recipes/api/event_session/hash +++ b/repos/os/recipes/api/event_session/hash @@ -1 +1 @@ -2022-02-14 2cc52e1bd1e59a1a79217e96aed15d63602646d1 +2023-02-26 ee5dbe84dbf571f432e4ab5b06a3de60b9a57b18 diff --git a/repos/os/recipes/api/gpu_session/hash b/repos/os/recipes/api/gpu_session/hash index b2f5180b2c..10087565c6 100644 --- a/repos/os/recipes/api/gpu_session/hash +++ b/repos/os/recipes/api/gpu_session/hash @@ -1 +1 @@ -2022-11-16 8e451e360360150401526aaa41468041ee78bce6 +2023-02-26 be38bcebbb332ff7c1746ccbab5cbecf9c3ba57e diff --git a/repos/os/recipes/api/input_session/hash b/repos/os/recipes/api/input_session/hash index b2cf14e7b1..6a67f7fb5e 100644 --- a/repos/os/recipes/api/input_session/hash +++ b/repos/os/recipes/api/input_session/hash @@ -1 +1 @@ -2022-02-14 002714192f50f48f7da1911985826cdc3345a75d +2023-02-26 3c48717bc61e5924a1b956db224f8d245722598b diff --git a/repos/os/recipes/api/os/hash b/repos/os/recipes/api/os/hash index 3fd5c580a8..7684b78e88 100644 --- a/repos/os/recipes/api/os/hash +++ b/repos/os/recipes/api/os/hash @@ -1 +1 @@ -2023-01-23 b4f74ba5623c9df823a6573222eed8b390c290fd +2023-02-26 e0a9d6c89d433954b434cf97378a9b97407afb00 diff --git a/repos/os/recipes/api/vfs/hash b/repos/os/recipes/api/vfs/hash index 635d57af0f..77f27c1b71 100644 --- a/repos/os/recipes/api/vfs/hash +++ b/repos/os/recipes/api/vfs/hash @@ -1 +1 @@ -2023-01-23 1f10872c74e5e745b0b2546ea5b5cf118c9dd0a0 +2023-02-26 49cc91cfda11786f94e1eba91eceb622ba415a5b diff --git a/repos/os/recipes/api/virtio/hash b/repos/os/recipes/api/virtio/hash index fd48445dee..c40b21b6e4 100644 --- a/repos/os/recipes/api/virtio/hash +++ b/repos/os/recipes/api/virtio/hash @@ -1 +1 @@ -2022-10-11 f07f668b4d84d0343a706aa296c2026a6a97736e +2023-02-26 a7bd5e3b3df40b1ae780932dd1203ecb5dd0f6e8 diff --git a/repos/os/recipes/pkg/black_hole/hash b/repos/os/recipes/pkg/black_hole/hash index 11ce553de1..dce2e2dd19 100644 --- a/repos/os/recipes/pkg/black_hole/hash +++ b/repos/os/recipes/pkg/black_hole/hash @@ -1 +1 @@ -2023-01-23 48ad4809094d960b8ad068d78e9069e72e5d80b4 +2023-02-26 4aed9d726068aa60a15811c1ce8d3270c86b2f46 diff --git a/repos/os/recipes/pkg/chroot/hash b/repos/os/recipes/pkg/chroot/hash index 439128e7f8..9d5b7c3505 100644 --- a/repos/os/recipes/pkg/chroot/hash +++ b/repos/os/recipes/pkg/chroot/hash @@ -1 +1 @@ -2023-01-23 18fa7c4bd983841b2f0ceb3082f982685a777fa8 +2023-02-26 457d6cb887782e467f140355e1d71df1a23c1707 diff --git a/repos/os/recipes/pkg/clipboard/hash b/repos/os/recipes/pkg/clipboard/hash index 357840a775..2774be7c91 100644 --- a/repos/os/recipes/pkg/clipboard/hash +++ b/repos/os/recipes/pkg/clipboard/hash @@ -1 +1 @@ -2023-01-23 275d0ef5752398c4a22e10d42e9972430befa9da +2023-02-26 a95de63360a65912a6b94491b183607e27262e43 diff --git a/repos/os/recipes/pkg/cpu_balancer/hash b/repos/os/recipes/pkg/cpu_balancer/hash index fa5c3d40dd..e5a1bc21ca 100644 --- a/repos/os/recipes/pkg/cpu_balancer/hash +++ b/repos/os/recipes/pkg/cpu_balancer/hash @@ -1 +1 @@ -2023-01-23 3af7714b0c8e612ef569c33d6e278e3a38c0b2c5 +2023-02-26 0f9f782beeee746181e6d0118f26da310e189247 diff --git a/repos/os/recipes/pkg/cpu_balancer_config/hash b/repos/os/recipes/pkg/cpu_balancer_config/hash index fc2c4205b3..500d077c4b 100644 --- a/repos/os/recipes/pkg/cpu_balancer_config/hash +++ b/repos/os/recipes/pkg/cpu_balancer_config/hash @@ -1 +1 @@ -2023-01-23 2912a29892743b816245a448378b88f8c27c79de +2023-02-26 50b3e0f19417c5b0890408a0520d5d1a46fc2444 diff --git a/repos/os/recipes/pkg/cpu_burner/hash b/repos/os/recipes/pkg/cpu_burner/hash index 550c32bb8d..09ae0919b8 100644 --- a/repos/os/recipes/pkg/cpu_burner/hash +++ b/repos/os/recipes/pkg/cpu_burner/hash @@ -1 +1 @@ -2023-01-23 be4fea8cdda35377c013040954fd9a70fe99e9fb +2023-02-26 fcb4891d5e595e635ab548d8bca8f3af3c5ce647 diff --git a/repos/os/recipes/pkg/drivers_interactive-linux/hash b/repos/os/recipes/pkg/drivers_interactive-linux/hash index 88ff95694c..3ab912f1db 100644 --- a/repos/os/recipes/pkg/drivers_interactive-linux/hash +++ b/repos/os/recipes/pkg/drivers_interactive-linux/hash @@ -1 +1 @@ -2023-01-23 0db40cd77de1bfd5445c481a8a1b137c14916665 +2023-02-26 f39367119884bca64fc8c315cd96c6bea99d4951 diff --git a/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash b/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash index a228bd7c0a..cfc1e514a6 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash +++ b/repos/os/recipes/pkg/drivers_interactive-pbxa9/hash @@ -1 +1 @@ -2023-01-23 c11f22802614ff2ac00722f4dde407628fe67868 +2023-02-26 599fd80ec56d0177426e722b301eb8089cb9e68b diff --git a/repos/os/recipes/pkg/drivers_interactive-pc/hash b/repos/os/recipes/pkg/drivers_interactive-pc/hash index 21d57dbe39..e6f9f606f2 100644 --- a/repos/os/recipes/pkg/drivers_interactive-pc/hash +++ b/repos/os/recipes/pkg/drivers_interactive-pc/hash @@ -1 +1 @@ -2023-01-23 20ca462dafbd6a32f586fde3764571ae0539e612 +2023-02-26 5b90d15cd2942d166aa11ba1bbaacbf8f666426c diff --git a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash index 4d8d8edbff..c13f80ce38 100644 --- a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash +++ b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2023-01-23 f7659dc01fad4b7bf8e376a01ece07f6fedbc6a1 +2023-02-26 b41df2e8e77b24ef5d64d0913d1d7aa8fc960878 diff --git a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash index 4d8d8edbff..c13f80ce38 100644 --- a/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash +++ b/repos/os/recipes/pkg/drivers_interactive-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2023-01-23 f7659dc01fad4b7bf8e376a01ece07f6fedbc6a1 +2023-02-26 b41df2e8e77b24ef5d64d0913d1d7aa8fc960878 diff --git a/repos/os/recipes/pkg/drivers_nic-linux/hash b/repos/os/recipes/pkg/drivers_nic-linux/hash index 9f6b81e8de..b0bf789305 100644 --- a/repos/os/recipes/pkg/drivers_nic-linux/hash +++ b/repos/os/recipes/pkg/drivers_nic-linux/hash @@ -1 +1 @@ -2023-01-23 ef958f8b2ec679b9c8cdc123803efe1c281e72a8 +2023-02-26 4ae3612210b8972d400f0e0fa71fd5429e1f61d5 diff --git a/repos/os/recipes/pkg/drivers_nic-pbxa9/hash b/repos/os/recipes/pkg/drivers_nic-pbxa9/hash index a7088d6087..07a85e1ae9 100644 --- a/repos/os/recipes/pkg/drivers_nic-pbxa9/hash +++ b/repos/os/recipes/pkg/drivers_nic-pbxa9/hash @@ -1 +1 @@ -2023-01-23 5c58d2facf3f3f35b58db81080998747b889d2c5 +2023-02-26 0154605092c13f0c3b33f78d4907e44a0fcb9096 diff --git a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash index 801ba1bd89..206ddf3311 100644 --- a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash +++ b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v7a/hash @@ -1 +1 @@ -2023-01-23 25e10b28cb46df8d83e54d10d054d0761a18bae7 +2023-02-26 4a0ecb6b021f59c1dcbe38ac14cf1cf17f9ac793 diff --git a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash index 801ba1bd89..206ddf3311 100644 --- a/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash +++ b/repos/os/recipes/pkg/drivers_nic-virt_qemu_arm_v8a/hash @@ -1 +1 @@ -2023-01-23 25e10b28cb46df8d83e54d10d054d0761a18bae7 +2023-02-26 4a0ecb6b021f59c1dcbe38ac14cf1cf17f9ac793 diff --git a/repos/os/recipes/pkg/dynamic_rom/hash b/repos/os/recipes/pkg/dynamic_rom/hash index 22e0d276f7..7e79050cc2 100644 --- a/repos/os/recipes/pkg/dynamic_rom/hash +++ b/repos/os/recipes/pkg/dynamic_rom/hash @@ -1 +1 @@ -2023-01-30 9d0218db1e8c867d68e023d334fddb02ac92feeb +2023-02-26 23705ae2711f82e9c355f7b2cd72bc53d2a74573 diff --git a/repos/os/recipes/pkg/fs_report/hash b/repos/os/recipes/pkg/fs_report/hash index c2b6561bf2..f5a2405d99 100644 --- a/repos/os/recipes/pkg/fs_report/hash +++ b/repos/os/recipes/pkg/fs_report/hash @@ -1 +1 @@ -2023-01-23 c450d609697a4b4c0943da158b6d6607604cdab6 +2023-02-26 6dbf7ffae2497df2ca851f67fe5406bad1712682 diff --git a/repos/os/recipes/pkg/fs_rom/hash b/repos/os/recipes/pkg/fs_rom/hash index 9574fb5bc6..989d64ffc4 100644 --- a/repos/os/recipes/pkg/fs_rom/hash +++ b/repos/os/recipes/pkg/fs_rom/hash @@ -1 +1 @@ -2023-01-23 b8870b63a487ae72ce3ae55b0fb5a3343af8da1b +2023-02-26 5b7014eea37915b6de30a54b3f430cea5be215f3 diff --git a/repos/os/recipes/pkg/mixer/hash b/repos/os/recipes/pkg/mixer/hash index 5249225afc..c19a70433f 100644 --- a/repos/os/recipes/pkg/mixer/hash +++ b/repos/os/recipes/pkg/mixer/hash @@ -1 +1 @@ -2023-01-23 d8b0a6664a5ced3edf34c38f265485763d2460fd +2023-02-26 2a5096fdb9e67ab87f6643f8c0625452d34e6393 diff --git a/repos/os/recipes/pkg/nic_router-nat/hash b/repos/os/recipes/pkg/nic_router-nat/hash index 98569d9ce3..3eb15207ec 100644 --- a/repos/os/recipes/pkg/nic_router-nat/hash +++ b/repos/os/recipes/pkg/nic_router-nat/hash @@ -1 +1 @@ -2023-01-23 cbb9e66424b45d1dc7e6f47b2141bb0cc4db3f63 +2023-02-26 f70ac243d1e6d86e17031905c230a4dffde5a01f diff --git a/repos/os/recipes/pkg/nit_focus/hash b/repos/os/recipes/pkg/nit_focus/hash index aed63135fc..b187ba3177 100644 --- a/repos/os/recipes/pkg/nit_focus/hash +++ b/repos/os/recipes/pkg/nit_focus/hash @@ -1 +1 @@ -2023-01-23 1c37f6b3e320a9be3792b01a210b2fbe4366e7a4 +2023-02-26 443f62f2248c8d6d02ab963b67012b660c5d331b diff --git a/repos/os/recipes/pkg/part_block/hash b/repos/os/recipes/pkg/part_block/hash index 890708acb9..29ccd9ad6f 100644 --- a/repos/os/recipes/pkg/part_block/hash +++ b/repos/os/recipes/pkg/part_block/hash @@ -1 +1 @@ -2023-01-23 6805765befc8afdb1e6707614fa7061b8a357021 +2023-02-26 30cedb878445791dcd2f14ddedad67cc4aacb193 diff --git a/repos/os/recipes/pkg/recall_fs/hash b/repos/os/recipes/pkg/recall_fs/hash index fa308f4095..31a4360a7f 100644 --- a/repos/os/recipes/pkg/recall_fs/hash +++ b/repos/os/recipes/pkg/recall_fs/hash @@ -1 +1 @@ -2023-01-23 30e941f732df9d8f50d9838a8ffa7ae04480fba9 +2023-02-26 69d577eef95b77f1b7c6b4c17a8da747a65e8526 diff --git a/repos/os/recipes/pkg/report_rom/hash b/repos/os/recipes/pkg/report_rom/hash index 5668018d7f..a43628d503 100644 --- a/repos/os/recipes/pkg/report_rom/hash +++ b/repos/os/recipes/pkg/report_rom/hash @@ -1 +1 @@ -2023-01-23 395f4d9e5f951b1e836abf284d60a13cf692c336 +2023-02-26 229654bfe024b6a3ab7a495291707ea6fc4e7688 diff --git a/repos/os/recipes/pkg/rom_filter/hash b/repos/os/recipes/pkg/rom_filter/hash index b0760f425d..df2de1d7fa 100644 --- a/repos/os/recipes/pkg/rom_filter/hash +++ b/repos/os/recipes/pkg/rom_filter/hash @@ -1 +1 @@ -2023-01-23 8dd3426d6c8a799e28dd8df22559174fa070943b +2023-02-26 1b331f978ca6beb387393b29664b79345134e2e2 diff --git a/repos/os/recipes/pkg/rom_reporter/hash b/repos/os/recipes/pkg/rom_reporter/hash index 6d4300c2c8..3d1f08d859 100644 --- a/repos/os/recipes/pkg/rom_reporter/hash +++ b/repos/os/recipes/pkg/rom_reporter/hash @@ -1 +1 @@ -2023-01-23 4afdbd1295512532bdcc7308d352dfe2ccf9b08a +2023-02-26 29ad9da77103fc399fe4702c268cbd1446ff7d26 diff --git a/repos/os/recipes/pkg/test-audio_out/hash b/repos/os/recipes/pkg/test-audio_out/hash index 8ebd1f7467..d927168897 100644 --- a/repos/os/recipes/pkg/test-audio_out/hash +++ b/repos/os/recipes/pkg/test-audio_out/hash @@ -1 +1 @@ -2023-01-23 92504831b96c228a146f277ec1d34e17312a593d +2023-02-26 d6cf0dbf59692426a1173dfd38f1386ad51b3968 diff --git a/repos/os/recipes/pkg/test-black_hole/hash b/repos/os/recipes/pkg/test-black_hole/hash index 020e58c289..354453c255 100644 --- a/repos/os/recipes/pkg/test-black_hole/hash +++ b/repos/os/recipes/pkg/test-black_hole/hash @@ -1 +1 @@ -2023-01-23 8ad84bbc0ac85d60647e3c390ac83718d9d0062d +2023-02-26 e119450d0182c56ed0975966fd62997416ae1549 diff --git a/repos/os/recipes/pkg/test-capture/hash b/repos/os/recipes/pkg/test-capture/hash index fe8372a124..a1eb133619 100644 --- a/repos/os/recipes/pkg/test-capture/hash +++ b/repos/os/recipes/pkg/test-capture/hash @@ -1 +1 @@ -2023-01-23 253d377f0f1f0029f26eac913c4be73264051823 +2023-02-26 bf53075b3a9a1c110fac063a0d236bdd7fbff3cf diff --git a/repos/os/recipes/pkg/test-clipboard/hash b/repos/os/recipes/pkg/test-clipboard/hash index 2db47c1df4..ff66d392e7 100644 --- a/repos/os/recipes/pkg/test-clipboard/hash +++ b/repos/os/recipes/pkg/test-clipboard/hash @@ -1 +1 @@ -2023-01-23 f691e29db5db7bb90b2405a7f7233ed7354ce3e9 +2023-02-26 63c6c9492235bcb8ad56e60e593b0e6bc60ebb4a diff --git a/repos/os/recipes/pkg/test-dynamic_config/hash b/repos/os/recipes/pkg/test-dynamic_config/hash index 3b897a783a..d109ea5103 100644 --- a/repos/os/recipes/pkg/test-dynamic_config/hash +++ b/repos/os/recipes/pkg/test-dynamic_config/hash @@ -1 +1 @@ -2023-01-23 561d093280bc4745bb8cd8b7e00d30f47a45865e +2023-02-26 d61dcc808bed77924f93641ee3988ce82d7b4437 diff --git a/repos/os/recipes/pkg/test-dynamic_config_loader/hash b/repos/os/recipes/pkg/test-dynamic_config_loader/hash index 1c7dcf0e35..d6a7b9aae8 100644 --- a/repos/os/recipes/pkg/test-dynamic_config_loader/hash +++ b/repos/os/recipes/pkg/test-dynamic_config_loader/hash @@ -1 +1 @@ -2023-01-23 6ba0b2e8802a8116f3ed87254bee379bc456bff7 +2023-02-26 711d527431a7a0b4bde19c1b0cfd92f846ddd678 diff --git a/repos/os/recipes/pkg/test-fault_detection/hash b/repos/os/recipes/pkg/test-fault_detection/hash index 71fe0a2683..81d45b3c07 100644 --- a/repos/os/recipes/pkg/test-fault_detection/hash +++ b/repos/os/recipes/pkg/test-fault_detection/hash @@ -1 +1 @@ -2023-01-23 366ae704e57c2657e1f9c0944b1fd5f845129aa0 +2023-02-26 07c795e584bb1cfe30648d84e3a284a6f4462bca diff --git a/repos/os/recipes/pkg/test-fs_packet/hash b/repos/os/recipes/pkg/test-fs_packet/hash index f3446a0fd1..4307913a69 100644 --- a/repos/os/recipes/pkg/test-fs_packet/hash +++ b/repos/os/recipes/pkg/test-fs_packet/hash @@ -1 +1 @@ -2023-01-23 9178e051d426aeb5f0b5ce5c744a2e79034ca63d +2023-02-26 9400d56800e0db985fce84acf98905a670d65e63 diff --git a/repos/os/recipes/pkg/test-fs_report/hash b/repos/os/recipes/pkg/test-fs_report/hash index caeda9c907..ec4d988829 100644 --- a/repos/os/recipes/pkg/test-fs_report/hash +++ b/repos/os/recipes/pkg/test-fs_report/hash @@ -1 +1 @@ -2023-01-23 e7d0fe6cd66f2555c0a28f873a216e923a0b2331 +2023-02-26 02181a8bc16de68faf71cd9aec4fbcedfc193f7e diff --git a/repos/os/recipes/pkg/test-fs_rom_update/hash b/repos/os/recipes/pkg/test-fs_rom_update/hash index cceccfba75..8fc48ee129 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update/hash @@ -1 +1 @@ -2023-01-23 b0788e2a55ee41f22d9e80ec26d72b380823eaf2 +2023-02-26 e73ddfba374b7acdddba3f7e933c110e94696fe6 diff --git a/repos/os/recipes/pkg/test-fs_rom_update_fs/hash b/repos/os/recipes/pkg/test-fs_rom_update_fs/hash index a64441dcb7..57fa5ca169 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update_fs/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update_fs/hash @@ -1 +1 @@ -2023-01-23 03d74e274a841d9e64a84de51459e19edab8a1c9 +2023-02-26 7758f0edf5be198ff178cbba1604bc872f906569 diff --git a/repos/os/recipes/pkg/test-fs_rom_update_ram/hash b/repos/os/recipes/pkg/test-fs_rom_update_ram/hash index f51e46aa13..b72b33e198 100644 --- a/repos/os/recipes/pkg/test-fs_rom_update_ram/hash +++ b/repos/os/recipes/pkg/test-fs_rom_update_ram/hash @@ -1 +1 @@ -2023-01-23 600f7fc7602e600abb4f0d861f1fe74daa75b289 +2023-02-26 66485f060592ddae76791e598abb134001525af8 diff --git a/repos/os/recipes/pkg/test-init/hash b/repos/os/recipes/pkg/test-init/hash index a789244352..4b871a2fdd 100644 --- a/repos/os/recipes/pkg/test-init/hash +++ b/repos/os/recipes/pkg/test-init/hash @@ -1 +1 @@ -2023-01-23 5af9880476413b86b238346a1f940e35c349c9ee +2023-02-26 7ee4478bb94cd90360fd2d9ef038f3bf1b35d191 diff --git a/repos/os/recipes/pkg/test-init_loop/hash b/repos/os/recipes/pkg/test-init_loop/hash index 34735feada..fd439412c4 100644 --- a/repos/os/recipes/pkg/test-init_loop/hash +++ b/repos/os/recipes/pkg/test-init_loop/hash @@ -1 +1 @@ -2023-01-23 b9249ce1ddbce2e8daebc361090e649085b2c6ff +2023-02-26 568aa6756c72f13a5bd0633e75ec4277d5227c2d diff --git a/repos/os/recipes/pkg/test-lx_block/hash b/repos/os/recipes/pkg/test-lx_block/hash index 9595d181d5..8f11ab2a7a 100644 --- a/repos/os/recipes/pkg/test-lx_block/hash +++ b/repos/os/recipes/pkg/test-lx_block/hash @@ -1 +1 @@ -2023-01-23 b56083ba06bbb49da914d6593551c24431018464 +2023-02-26 3e56ccddf9d3bdda7a9536e0b28a50486d716d59 diff --git a/repos/os/recipes/pkg/test-nic_loopback/hash b/repos/os/recipes/pkg/test-nic_loopback/hash index 20029e96b1..0c1bbc5808 100644 --- a/repos/os/recipes/pkg/test-nic_loopback/hash +++ b/repos/os/recipes/pkg/test-nic_loopback/hash @@ -1 +1 @@ -2023-01-23 ccd2c400bb789496dfd3104005ce7ce13abf46fb +2023-02-26 49e405c4173434beeb3015736c9b9fb55a239d2e diff --git a/repos/os/recipes/pkg/test-nic_perf/hash b/repos/os/recipes/pkg/test-nic_perf/hash index 455cec87b4..96a45b8b9f 100644 --- a/repos/os/recipes/pkg/test-nic_perf/hash +++ b/repos/os/recipes/pkg/test-nic_perf/hash @@ -1 +1 @@ -2023-01-23 67c99368de1f308f15c83eaedcf5cca0c8a9eb3e +2023-02-26 d8a9b7d304db5105effe0457e9f61f1d9ad937d9 diff --git a/repos/os/recipes/pkg/test-nic_perf_router/hash b/repos/os/recipes/pkg/test-nic_perf_router/hash index 58a2dce7e6..7c43681dd5 100644 --- a/repos/os/recipes/pkg/test-nic_perf_router/hash +++ b/repos/os/recipes/pkg/test-nic_perf_router/hash @@ -1 +1 @@ -2023-01-23 b480bdaaab0d830a1ad13a8509e78afbb394eea8 +2023-02-26 028d8d1d5aabf2a74d50d3b2bdd2fb75e7c3eb90 diff --git a/repos/os/recipes/pkg/test-part_block_gpt/hash b/repos/os/recipes/pkg/test-part_block_gpt/hash index aec6a7a017..8f3e36e73c 100644 --- a/repos/os/recipes/pkg/test-part_block_gpt/hash +++ b/repos/os/recipes/pkg/test-part_block_gpt/hash @@ -1 +1 @@ -2023-01-23 8649e43b612d09e36ac6f1d7ad15f60d64d48105 +2023-02-26 7b99aac298f894915690dd77601a3c7be1156d1b diff --git a/repos/os/recipes/pkg/test-part_block_mbr/hash b/repos/os/recipes/pkg/test-part_block_mbr/hash index 9171903ec8..4298552df1 100644 --- a/repos/os/recipes/pkg/test-part_block_mbr/hash +++ b/repos/os/recipes/pkg/test-part_block_mbr/hash @@ -1 +1 @@ -2023-01-23 4548a0dd29165b5ae2cce9fb5fed0dc22cd0793c +2023-02-26 5facf3c04d24825ad4aa81c0c590732f6d0c1aa1 diff --git a/repos/os/recipes/pkg/test-ram_fs_chunk/hash b/repos/os/recipes/pkg/test-ram_fs_chunk/hash index bd5ca6edfa..38212caf6f 100644 --- a/repos/os/recipes/pkg/test-ram_fs_chunk/hash +++ b/repos/os/recipes/pkg/test-ram_fs_chunk/hash @@ -1 +1 @@ -2023-01-23 637b6d711ef58eea34238102f21a58a051833709 +2023-02-26 3e624053f14ea63b9a1dbbf258fe892a854e2e21 diff --git a/repos/os/recipes/pkg/test-read_only_rom/hash b/repos/os/recipes/pkg/test-read_only_rom/hash index 39bb7412ad..e46223b067 100644 --- a/repos/os/recipes/pkg/test-read_only_rom/hash +++ b/repos/os/recipes/pkg/test-read_only_rom/hash @@ -1 +1 @@ -2023-01-23 be501dbc83a6f4adcd045900a0a3fd58e5b256e9 +2023-02-26 3edb100b873376f7a820309db310a865b38ea1e6 diff --git a/repos/os/recipes/pkg/test-report_rom/hash b/repos/os/recipes/pkg/test-report_rom/hash index 328934e518..663688d0f3 100644 --- a/repos/os/recipes/pkg/test-report_rom/hash +++ b/repos/os/recipes/pkg/test-report_rom/hash @@ -1 +1 @@ -2023-01-23 1dda2c9b2480aa3acc871d27db57d769f9f31ad0 +2023-02-26 0e2e227f6cabfb40dd1f0cbd4016444d4fc041ff diff --git a/repos/os/recipes/pkg/test-resource_request/hash b/repos/os/recipes/pkg/test-resource_request/hash index 2ba70b7b52..74f8740258 100644 --- a/repos/os/recipes/pkg/test-resource_request/hash +++ b/repos/os/recipes/pkg/test-resource_request/hash @@ -1 +1 @@ -2023-01-23 8ea9fc889ad5877f4b7d424a955a7055b8d8a10c +2023-02-26 0326c1ed1c6f8fa8a50a70f7036f4db1d570040a diff --git a/repos/os/recipes/pkg/test-resource_yield/hash b/repos/os/recipes/pkg/test-resource_yield/hash index c77ad6c3e8..a55a0d6ce4 100644 --- a/repos/os/recipes/pkg/test-resource_yield/hash +++ b/repos/os/recipes/pkg/test-resource_yield/hash @@ -1 +1 @@ -2023-01-23 b56b754eec83225e3141911a2f068b61766f85fd +2023-02-26 e849aecbcd316dd342b55bf7596f0cbf173ee9aa diff --git a/repos/os/recipes/pkg/test-rom_filter/hash b/repos/os/recipes/pkg/test-rom_filter/hash index 615d86b78e..ec2ed14fdd 100644 --- a/repos/os/recipes/pkg/test-rom_filter/hash +++ b/repos/os/recipes/pkg/test-rom_filter/hash @@ -1 +1 @@ -2023-01-23 0d52d9abf2c8746c616765a5263a175f7171a44a +2023-02-26 9586c837d87cdec1c4a3b5c89d04eccfede9f00f diff --git a/repos/os/recipes/pkg/test-rtc/hash b/repos/os/recipes/pkg/test-rtc/hash index 46b84361fc..fe0504ca53 100644 --- a/repos/os/recipes/pkg/test-rtc/hash +++ b/repos/os/recipes/pkg/test-rtc/hash @@ -1 +1 @@ -2023-01-23 8fcb00aba60ea4c4b26664715e2f997e8fa726c2 +2023-02-26 b47131584821f750f74dbddab9ce522215e05155 diff --git a/repos/os/recipes/pkg/test-sandbox/hash b/repos/os/recipes/pkg/test-sandbox/hash index d87342fa50..99b550cb9e 100644 --- a/repos/os/recipes/pkg/test-sandbox/hash +++ b/repos/os/recipes/pkg/test-sandbox/hash @@ -1 +1 @@ -2023-01-23 604b9d8341066a18628eefb473450bbf92a837a8 +2023-02-26 7377b78cf6659b61070b7dc42d76de3f17122d64 diff --git a/repos/os/recipes/pkg/test-signal/hash b/repos/os/recipes/pkg/test-signal/hash index 0d5c75833d..041e45e50e 100644 --- a/repos/os/recipes/pkg/test-signal/hash +++ b/repos/os/recipes/pkg/test-signal/hash @@ -1 +1 @@ -2023-01-23 07797763a137a7e18af889c67034174f2d7beb98 +2023-02-26 e0ac4c7488da5398db80895b4acbbb659b9d670b diff --git a/repos/os/recipes/pkg/test-slab/hash b/repos/os/recipes/pkg/test-slab/hash index bc2b29a2c6..7b13e2e240 100644 --- a/repos/os/recipes/pkg/test-slab/hash +++ b/repos/os/recipes/pkg/test-slab/hash @@ -1 +1 @@ -2023-01-23 80f474196189e426034e4397881d6b3467463085 +2023-02-26 775905d4cded7028c81f409efcd7c3b7c1098b2a diff --git a/repos/os/recipes/pkg/test-terminal_crosslink/hash b/repos/os/recipes/pkg/test-terminal_crosslink/hash index 723dc36272..5c16f0063c 100644 --- a/repos/os/recipes/pkg/test-terminal_crosslink/hash +++ b/repos/os/recipes/pkg/test-terminal_crosslink/hash @@ -1 +1 @@ -2023-01-23 5c31b78d75f9e5863d18af55edd80957b48503db +2023-02-26 cb686debdb72d65f0f353cd34e13c88af4ef07c3 diff --git a/repos/os/recipes/pkg/test-trace/hash b/repos/os/recipes/pkg/test-trace/hash index c977841c84..1fa0d4a35b 100644 --- a/repos/os/recipes/pkg/test-trace/hash +++ b/repos/os/recipes/pkg/test-trace/hash @@ -1 +1 @@ -2023-01-23 8551ab8ed51318739a7f86c24f38adad04b851f5 +2023-02-26 70de690df7f49585c4fbd2d3fb77f2d727afa286 diff --git a/repos/os/recipes/pkg/test-trace_buffer/hash b/repos/os/recipes/pkg/test-trace_buffer/hash index 8434af7711..48dfad96e6 100644 --- a/repos/os/recipes/pkg/test-trace_buffer/hash +++ b/repos/os/recipes/pkg/test-trace_buffer/hash @@ -1 +1 @@ -2023-01-23 e3214876c1db677411f6b9c37bf08cac8dc2acd8 +2023-02-26 b5c8eec91385cdc5c786808aaec6029f5164c8c2 diff --git a/repos/os/recipes/pkg/test-trace_logger/hash b/repos/os/recipes/pkg/test-trace_logger/hash index 1a0b3d0e78..0b8dc3a52a 100644 --- a/repos/os/recipes/pkg/test-trace_logger/hash +++ b/repos/os/recipes/pkg/test-trace_logger/hash @@ -1 +1 @@ -2023-01-23 87f8d3ad245a9cb762a6750ba41d87a8d03dc0e2 +2023-02-26 3311f88b686d3a3baae8c81e34e0d4e1e3edb45f diff --git a/repos/os/recipes/pkg/test-utf8/hash b/repos/os/recipes/pkg/test-utf8/hash index 220cc4cf98..e2602b4856 100644 --- a/repos/os/recipes/pkg/test-utf8/hash +++ b/repos/os/recipes/pkg/test-utf8/hash @@ -1 +1 @@ -2023-01-23 25d83d76a350792917f9980c123c1578e7937e10 +2023-02-26 4ea6223b69dbcdc889c9c0620238a014d87f9d6c diff --git a/repos/os/recipes/pkg/test-vfs_block/hash b/repos/os/recipes/pkg/test-vfs_block/hash index 34ef886d86..463cfa6eef 100644 --- a/repos/os/recipes/pkg/test-vfs_block/hash +++ b/repos/os/recipes/pkg/test-vfs_block/hash @@ -1 +1 @@ -2023-01-23 4d4a31a2e17b3cdd3deadc09e4e4d4b06628d031 +2023-02-26 3bc07c80d6fe3f114ba38a592e9bb83c9549aac8 diff --git a/repos/os/recipes/pkg/test-vfs_stress_fs/hash b/repos/os/recipes/pkg/test-vfs_stress_fs/hash index 60ce75f45f..1e45a5a962 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_fs/hash +++ b/repos/os/recipes/pkg/test-vfs_stress_fs/hash @@ -1 +1 @@ -2023-01-23 a2189ddd5362b7d84b409e9ee560e0731b9d6687 +2023-02-26 dd8ed6485ead0f56055fbb3ff577b296cba06dad diff --git a/repos/os/recipes/pkg/test-vfs_stress_ram/hash b/repos/os/recipes/pkg/test-vfs_stress_ram/hash index 48f48ef1f3..04d3de104a 100644 --- a/repos/os/recipes/pkg/test-vfs_stress_ram/hash +++ b/repos/os/recipes/pkg/test-vfs_stress_ram/hash @@ -1 +1 @@ -2023-01-23 04f06aa72c9b66ca2f738116c388254e32ba8b51 +2023-02-26 b4bca509d2272da9172ce82c6abfd37674d2f928 diff --git a/repos/os/recipes/pkg/test-weak_ptr/hash b/repos/os/recipes/pkg/test-weak_ptr/hash index 67ffeeded3..b00a159936 100644 --- a/repos/os/recipes/pkg/test-weak_ptr/hash +++ b/repos/os/recipes/pkg/test-weak_ptr/hash @@ -1 +1 @@ -2023-01-23 bab76cfd4ddf2311c0c0df9c8fca14054abcd0fb +2023-02-26 0bbb2876f790312f26c61e793854d07f5ac617d0 diff --git a/repos/os/recipes/pkg/top/hash b/repos/os/recipes/pkg/top/hash index ce324c3512..bfeb228b59 100644 --- a/repos/os/recipes/pkg/top/hash +++ b/repos/os/recipes/pkg/top/hash @@ -1 +1 @@ -2023-01-23 af7a096d325456565d098af95b18de629e2bc094 +2023-02-26 a0a062cb9b49ba10609d1e44372f16e8f4b03be0 diff --git a/repos/os/recipes/pkg/trace_logger/hash b/repos/os/recipes/pkg/trace_logger/hash index 42005937d9..22407fe80e 100644 --- a/repos/os/recipes/pkg/trace_logger/hash +++ b/repos/os/recipes/pkg/trace_logger/hash @@ -1 +1 @@ -2023-01-23 6aa1885204571629a3f6dfd23bfd0d36f7cdaa7c +2023-02-26 b69c5290b2c0e539c3097528dcd942c66718250d diff --git a/repos/os/recipes/pkg/vfs/hash b/repos/os/recipes/pkg/vfs/hash index 958a96102e..f36f0a0623 100644 --- a/repos/os/recipes/pkg/vfs/hash +++ b/repos/os/recipes/pkg/vfs/hash @@ -1 +1 @@ -2023-01-23 0e745a14660a7c3b697b0d387c613a9e92874dce +2023-02-26 d35044ea6755fc56a087a519503f49564a31b8c9 diff --git a/repos/os/recipes/pkg/vfs_block/hash b/repos/os/recipes/pkg/vfs_block/hash index 1a69244150..eb2bce9f07 100644 --- a/repos/os/recipes/pkg/vfs_block/hash +++ b/repos/os/recipes/pkg/vfs_block/hash @@ -1 +1 @@ -2023-01-23 cf494cdf954e311367529bc7da0581df6785330c +2023-02-26 d083823a7801e103489fe3f22319ed60d0df99d5 diff --git a/repos/os/recipes/src/acpi_drv/hash b/repos/os/recipes/src/acpi_drv/hash index 48a0154d01..2072a7b67a 100644 --- a/repos/os/recipes/src/acpi_drv/hash +++ b/repos/os/recipes/src/acpi_drv/hash @@ -1 +1 @@ -2023-01-23 d96c3c085b7c18f75036c5d6f09d9bbbdcfc403f +2023-02-26 dc920a5e9181e09f9cd0df4ac82425fe661b28d6 diff --git a/repos/os/recipes/src/ahci_drv/hash b/repos/os/recipes/src/ahci_drv/hash index d8c001b9ce..a53988a3db 100644 --- a/repos/os/recipes/src/ahci_drv/hash +++ b/repos/os/recipes/src/ahci_drv/hash @@ -1 +1 @@ -2023-01-23 d1fe2fe5bc46e41a3f95a1a28dfabbfc7dd32414 +2023-02-26 6b57d1cd6b829698bd47c8071602efb987af35bd diff --git a/repos/os/recipes/src/black_hole/hash b/repos/os/recipes/src/black_hole/hash index d49f812f81..852293386c 100644 --- a/repos/os/recipes/src/black_hole/hash +++ b/repos/os/recipes/src/black_hole/hash @@ -1 +1 @@ -2023-01-23 8e40a062cf9c6ecc7f00458e199d07dde355f789 +2023-02-26 257bcc99bb5e85f754cf9df5624036a3b25344aa diff --git a/repos/os/recipes/src/block_tester/hash b/repos/os/recipes/src/block_tester/hash index 3c7d35c386..addcf514c0 100644 --- a/repos/os/recipes/src/block_tester/hash +++ b/repos/os/recipes/src/block_tester/hash @@ -1 +1 @@ -2023-01-23 29ff0bd182b52eb4869010f6121791bd3b0c9e09 +2023-02-26 8642f6f2a4b5037959067cedff1f8bbec4279dc4 diff --git a/repos/os/recipes/src/boot_fb_drv/hash b/repos/os/recipes/src/boot_fb_drv/hash index 8eecccedd8..ae47844a72 100644 --- a/repos/os/recipes/src/boot_fb_drv/hash +++ b/repos/os/recipes/src/boot_fb_drv/hash @@ -1 +1 @@ -2023-01-23 54d0057cecd6650506feeffe72b0685dd768b136 +2023-02-26 2ee6ef5288be281a2a24c5fd9ee1620f1c71d41a diff --git a/repos/os/recipes/src/cached_fs_rom/hash b/repos/os/recipes/src/cached_fs_rom/hash index ce4cd5b096..56a1734f44 100644 --- a/repos/os/recipes/src/cached_fs_rom/hash +++ b/repos/os/recipes/src/cached_fs_rom/hash @@ -1 +1 @@ -2023-01-23 43ad841e50e27f67474163caa729c68f8f3dc215 +2023-02-26 906580047226c07fbf4dd38556b568a120069193 diff --git a/repos/os/recipes/src/chroot/hash b/repos/os/recipes/src/chroot/hash index a930e892e0..afa23fed2d 100644 --- a/repos/os/recipes/src/chroot/hash +++ b/repos/os/recipes/src/chroot/hash @@ -1 +1 @@ -2023-01-23 df03446c194991fc8b10277f5eeaff8cdd99c705 +2023-02-26 b279e831b599c1dfce1be58a22cc10bae148bac8 diff --git a/repos/os/recipes/src/clipboard/hash b/repos/os/recipes/src/clipboard/hash index 6d3d9b4099..52d59d32d6 100644 --- a/repos/os/recipes/src/clipboard/hash +++ b/repos/os/recipes/src/clipboard/hash @@ -1 +1 @@ -2023-01-23 2843bf3191d59a08f0278f853117eb5d022e841c +2023-02-26 52665a588ff3b663cd87b632b070477d15013f7e diff --git a/repos/os/recipes/src/cpu_balancer/hash b/repos/os/recipes/src/cpu_balancer/hash index 742d6dc5c2..e0f74138fa 100644 --- a/repos/os/recipes/src/cpu_balancer/hash +++ b/repos/os/recipes/src/cpu_balancer/hash @@ -1 +1 @@ -2023-01-23 fb5c918603a6faaa86629f3f02fa945ce87f3a2a +2023-02-26 68e5e22b5587b027196565076d9b32f495f4d59f diff --git a/repos/os/recipes/src/cpu_burner/hash b/repos/os/recipes/src/cpu_burner/hash index a7a7a3ae62..082c1d4658 100644 --- a/repos/os/recipes/src/cpu_burner/hash +++ b/repos/os/recipes/src/cpu_burner/hash @@ -1 +1 @@ -2023-01-23 1465c5873a9f6bf810f313963ec3c37f5613d5df +2023-02-26 100e691ef3f52ed2593929fe4452c5eecdb4daea diff --git a/repos/os/recipes/src/dummy/hash b/repos/os/recipes/src/dummy/hash index 6cbd5bd4a1..96a3ca837d 100644 --- a/repos/os/recipes/src/dummy/hash +++ b/repos/os/recipes/src/dummy/hash @@ -1 +1 @@ -2023-01-23 7b2ddc6d3f655d642c7134c3bd425f78573ea77c +2023-02-26 f6bdab58471839eebf4e18457067aa324311dbb9 diff --git a/repos/os/recipes/src/dummy_rtc_drv/hash b/repos/os/recipes/src/dummy_rtc_drv/hash index 42535caf9b..8bb23d089c 100644 --- a/repos/os/recipes/src/dummy_rtc_drv/hash +++ b/repos/os/recipes/src/dummy_rtc_drv/hash @@ -1 +1 @@ -2023-01-23 f9bafb2a7b5b08a64a0a70dbc4300232c0a924f8 +2023-02-26 2d4e2cef009566414330d27d73023407f894e46e diff --git a/repos/os/recipes/src/dynamic_rom/hash b/repos/os/recipes/src/dynamic_rom/hash index 637777c1af..9b2f118d65 100644 --- a/repos/os/recipes/src/dynamic_rom/hash +++ b/repos/os/recipes/src/dynamic_rom/hash @@ -1 +1 @@ -2023-01-23 e2cfa09d9a350f019344bc9352ec4ad993471d3b +2023-02-26 0814afb1667618039755866ca4c86926ec95e075 diff --git a/repos/os/recipes/src/event_filter/hash b/repos/os/recipes/src/event_filter/hash index 03303154cc..8c971a4e18 100644 --- a/repos/os/recipes/src/event_filter/hash +++ b/repos/os/recipes/src/event_filter/hash @@ -1 +1 @@ -2023-01-23 838cb216b76880954c78f803eeee540bbcc58477 +2023-02-26 d0e300fc75fb78dae7cc766b0e308ba1a29c36d8 diff --git a/repos/os/recipes/src/fb_sdl/hash b/repos/os/recipes/src/fb_sdl/hash index 28dc1e85c3..3a72217cf7 100644 --- a/repos/os/recipes/src/fb_sdl/hash +++ b/repos/os/recipes/src/fb_sdl/hash @@ -1 +1 @@ -2023-01-23 80d08d2eb59273e1795936bd1a360717e17eba64 +2023-02-26 bba1bcf2ac1b99263596cf29fb59750c203b7b70 diff --git a/repos/os/recipes/src/fs_report/hash b/repos/os/recipes/src/fs_report/hash index 7e0f3c933f..2b27adaff7 100644 --- a/repos/os/recipes/src/fs_report/hash +++ b/repos/os/recipes/src/fs_report/hash @@ -1 +1 @@ -2023-01-23 4ae64776752e4c8f6d3e0a2f17531bcfdbb13003 +2023-02-26 594892cfa2b0c7db0f6e9fce33ca5ed8b4fd7a61 diff --git a/repos/os/recipes/src/fs_rom/hash b/repos/os/recipes/src/fs_rom/hash index 7c501ffb71..c88a0cc109 100644 --- a/repos/os/recipes/src/fs_rom/hash +++ b/repos/os/recipes/src/fs_rom/hash @@ -1 +1 @@ -2023-01-23 959dacc9c90a8cfdf17a377cdd4c50c4b133cdb3 +2023-02-26 2f8ffa1576704439f05c4d43a6e4dcc23c35c1be diff --git a/repos/os/recipes/src/global_keys_handler/hash b/repos/os/recipes/src/global_keys_handler/hash index 9a7363a6cd..e4d19fbec4 100644 --- a/repos/os/recipes/src/global_keys_handler/hash +++ b/repos/os/recipes/src/global_keys_handler/hash @@ -1 +1 @@ -2023-01-23 530ca0504fd86d62a9a4f05ac6c22a006ccb69c2 +2023-02-26 b283ca2616d9ec4a5db148363e6f8a540bb8c5cc diff --git a/repos/os/recipes/src/gui_fb/hash b/repos/os/recipes/src/gui_fb/hash index 9fc2fd3c7b..e081ef48df 100644 --- a/repos/os/recipes/src/gui_fb/hash +++ b/repos/os/recipes/src/gui_fb/hash @@ -1 +1 @@ -2023-01-23 a3c070038e2995e37d83ededa7c59ba78b0139f3 +2023-02-26 bbfe32f059e3ba5f2f3cfbdbb560c718db9f007f diff --git a/repos/os/recipes/src/init/hash b/repos/os/recipes/src/init/hash index 9a2edf74a2..b660d43732 100644 --- a/repos/os/recipes/src/init/hash +++ b/repos/os/recipes/src/init/hash @@ -1 +1 @@ -2023-01-23 247c67f80a44ae1d953e3a95eb0e8b9f8a77d0e6 +2023-02-26 d5825fab59be444bb4f27c361d5c739612f5a232 diff --git a/repos/os/recipes/src/intel_gpu_drv/hash b/repos/os/recipes/src/intel_gpu_drv/hash index 160f5d9a2e..e27f7159b9 100644 --- a/repos/os/recipes/src/intel_gpu_drv/hash +++ b/repos/os/recipes/src/intel_gpu_drv/hash @@ -1 +1 @@ -2023-01-23 431fef8c77ddee0ab9d677349672c62dda9eeb4f +2023-02-26 3e6cd3fa024d123a025c1980aaf1db79e79423f0 diff --git a/repos/os/recipes/src/lan9118_nic_drv/hash b/repos/os/recipes/src/lan9118_nic_drv/hash index 1f9d5f7b9a..4dd6e7c66b 100644 --- a/repos/os/recipes/src/lan9118_nic_drv/hash +++ b/repos/os/recipes/src/lan9118_nic_drv/hash @@ -1 +1 @@ -2023-01-23 0e897e4bcb78a3d763241f9901757b6f9788d99e +2023-02-26 33526e3a475768f65d995a8951378831985a5628 diff --git a/repos/os/recipes/src/linux_nic_drv/hash b/repos/os/recipes/src/linux_nic_drv/hash index 722724be38..385a0b1ec8 100644 --- a/repos/os/recipes/src/linux_nic_drv/hash +++ b/repos/os/recipes/src/linux_nic_drv/hash @@ -1 +1 @@ -2023-01-23 aac18c5d7c4fef87ec322bcf00e9ff6e0721ba91 +2023-02-26 58eb326b1b5c51fad2e656277a4ca7e29760763b diff --git a/repos/os/recipes/src/linux_rtc_drv/hash b/repos/os/recipes/src/linux_rtc_drv/hash index 90dfdd5d46..6f64575774 100644 --- a/repos/os/recipes/src/linux_rtc_drv/hash +++ b/repos/os/recipes/src/linux_rtc_drv/hash @@ -1 +1 @@ -2023-01-23 b8a12447aa0061b6838cf70a817463ce3ab9ed35 +2023-02-26 f8e30ce92a3edd0011efc7c230287778f984bd35 diff --git a/repos/os/recipes/src/loader/hash b/repos/os/recipes/src/loader/hash index 8a1839a0a8..afa6688244 100644 --- a/repos/os/recipes/src/loader/hash +++ b/repos/os/recipes/src/loader/hash @@ -1 +1 @@ -2023-01-23 59932bf7d59654f6c186d7fa23fe7c75e01164b9 +2023-02-26 de20be24ed130e1d69a5a4b347c1a95a4828ca5a diff --git a/repos/os/recipes/src/log_core/hash b/repos/os/recipes/src/log_core/hash index d777622d87..0f1ddcd1fc 100644 --- a/repos/os/recipes/src/log_core/hash +++ b/repos/os/recipes/src/log_core/hash @@ -1 +1 @@ -2023-01-23 b5779c766222db1393ce350d8f589bb68ff72c52 +2023-02-26 d2591fd9cc3c4c163aef47d9e955b86f2cdb7b9b diff --git a/repos/os/recipes/src/log_terminal/hash b/repos/os/recipes/src/log_terminal/hash index 8cdf6ad403..debe066d18 100644 --- a/repos/os/recipes/src/log_terminal/hash +++ b/repos/os/recipes/src/log_terminal/hash @@ -1 +1 @@ -2023-01-23 c1d19a5a090e543c15ac3862baffdb09a7f7e9be +2023-02-26 7226b505ce39f1b1a7140a633976d54fff93664a diff --git a/repos/os/recipes/src/lx_block/hash b/repos/os/recipes/src/lx_block/hash index c228f0c5cc..8f0625bfa7 100644 --- a/repos/os/recipes/src/lx_block/hash +++ b/repos/os/recipes/src/lx_block/hash @@ -1 +1 @@ -2023-01-23 681ba4c30754df58a1e5f4b8e02af60e4c978a25 +2023-02-26 732b0672b8dfb9e46016af2348ab57f62783c651 diff --git a/repos/os/recipes/src/lx_fs/hash b/repos/os/recipes/src/lx_fs/hash index e7ff6cedad..db3f0edb7a 100644 --- a/repos/os/recipes/src/lx_fs/hash +++ b/repos/os/recipes/src/lx_fs/hash @@ -1 +1 @@ -2023-01-23 4a00a5f40d853ded2a1c2bf014cc2626949d86a5 +2023-02-26 669158649e879a9646bce0f8f1bfc7874bf1f069 diff --git a/repos/os/recipes/src/mixer/hash b/repos/os/recipes/src/mixer/hash index cad8d3a4a3..c1fa859ab3 100644 --- a/repos/os/recipes/src/mixer/hash +++ b/repos/os/recipes/src/mixer/hash @@ -1 +1 @@ -2023-01-23 d3bb363e46a4e4837508d61a73379624a084c504 +2023-02-26 c0b69d71043a0b9d81073ba935905c5d81bacc78 diff --git a/repos/os/recipes/src/nic_bridge/hash b/repos/os/recipes/src/nic_bridge/hash index d2bdbc00f9..fbaf6ccee6 100644 --- a/repos/os/recipes/src/nic_bridge/hash +++ b/repos/os/recipes/src/nic_bridge/hash @@ -1 +1 @@ -2023-01-23 1a04db110357025236767a21e8cb9f80610a63ae +2023-02-26 625f3d7a06fb9f9280663e0694aea403bb663864 diff --git a/repos/os/recipes/src/nic_loopback/hash b/repos/os/recipes/src/nic_loopback/hash index a25f69fa53..9706faadcc 100644 --- a/repos/os/recipes/src/nic_loopback/hash +++ b/repos/os/recipes/src/nic_loopback/hash @@ -1 +1 @@ -2023-01-23 6fb7d3e196b70ac905e0e40f9325e72b51002077 +2023-02-26 56c6a3a87918ffbac658f93cf98b9bc7f2d8854f diff --git a/repos/os/recipes/src/nic_perf/hash b/repos/os/recipes/src/nic_perf/hash index c530a286e1..fcb238fd80 100644 --- a/repos/os/recipes/src/nic_perf/hash +++ b/repos/os/recipes/src/nic_perf/hash @@ -1 +1 @@ -2023-01-23 e5740956daa1aefa2b52b3bb9d3a28a991d78881 +2023-02-26 cf30c79444163ce440049dd06fe27d6ff80a1394 diff --git a/repos/os/recipes/src/nic_router/hash b/repos/os/recipes/src/nic_router/hash index 44513cbfcb..b6ae4ea246 100644 --- a/repos/os/recipes/src/nic_router/hash +++ b/repos/os/recipes/src/nic_router/hash @@ -1 +1 @@ -2023-01-23 471b4524ff6c458af43ce604914aff5f2a8e4f04 +2023-02-26 a964bd84b1819c0cb31fe7b9a7e4d3e716ced5ab diff --git a/repos/os/recipes/src/nit_focus/hash b/repos/os/recipes/src/nit_focus/hash index 8202618684..fa495c04da 100644 --- a/repos/os/recipes/src/nit_focus/hash +++ b/repos/os/recipes/src/nit_focus/hash @@ -1 +1 @@ -2023-01-23 146148d435dd1dfa4fa076a783ecd7475adac6cd +2023-02-26 75169f8b723292a881c65ca96b900057134df0e0 diff --git a/repos/os/recipes/src/nitpicker/hash b/repos/os/recipes/src/nitpicker/hash index 5951829941..16b00fd0b3 100644 --- a/repos/os/recipes/src/nitpicker/hash +++ b/repos/os/recipes/src/nitpicker/hash @@ -1 +1 @@ -2023-01-23 4c355e73b8e37535af87fbc13e029b879c7f3fd8 +2023-02-26 5706be150c692965e569172821c593f52c67ac9a diff --git a/repos/os/recipes/src/nvme_drv/hash b/repos/os/recipes/src/nvme_drv/hash index 88ac1603b0..a4d1f1ba27 100644 --- a/repos/os/recipes/src/nvme_drv/hash +++ b/repos/os/recipes/src/nvme_drv/hash @@ -1 +1 @@ -2023-01-23 7e29ecfd7d60756dfc08333bd3f8a9f3f0292171 +2023-02-26 1825f22fb06f6cbb26e7f0eeab22c5f40888543d diff --git a/repos/os/recipes/src/part_block/hash b/repos/os/recipes/src/part_block/hash index 027696b347..fdd8c0a03c 100644 --- a/repos/os/recipes/src/part_block/hash +++ b/repos/os/recipes/src/part_block/hash @@ -1 +1 @@ -2023-01-23 ed891e3e04fa227c5d7c395e113e3fae96f7cd3d +2023-02-26 7c9468362766d3a54745b79efd9af29366847c96 diff --git a/repos/os/recipes/src/pbxa9_drivers/hash b/repos/os/recipes/src/pbxa9_drivers/hash index 28d6a6af2e..a1a21ac6ca 100644 --- a/repos/os/recipes/src/pbxa9_drivers/hash +++ b/repos/os/recipes/src/pbxa9_drivers/hash @@ -1 +1 @@ -2023-01-23 cf746a84003289d0216c8a4ee36c5c8ced96e5e0 +2023-02-26 35b26fcb1422add9df1a58cb6e441e0deb1d1ab1 diff --git a/repos/os/recipes/src/pci_decode/hash b/repos/os/recipes/src/pci_decode/hash index 22efb870c0..bcf619b4bf 100644 --- a/repos/os/recipes/src/pci_decode/hash +++ b/repos/os/recipes/src/pci_decode/hash @@ -1 +1 @@ -2023-01-23 55d6bcd33b13d7fac53e5c7e9336d5d4e556276e +2023-02-26 d8df39ecda7b9432af7975e833a343accd75f6a8 diff --git a/repos/os/recipes/src/platform_drv/hash b/repos/os/recipes/src/platform_drv/hash index 82e51a6ae0..04ef0c1f62 100644 --- a/repos/os/recipes/src/platform_drv/hash +++ b/repos/os/recipes/src/platform_drv/hash @@ -1 +1 @@ -2023-01-23 36cc783a0482722cb87931bbf2d0decfc20ab0f8 +2023-02-26 319ad89a71a8e779324ef3ef6879a35bb5a67dfe diff --git a/repos/os/recipes/src/ps2_drv/hash b/repos/os/recipes/src/ps2_drv/hash index 93366b7412..af1e02023e 100644 --- a/repos/os/recipes/src/ps2_drv/hash +++ b/repos/os/recipes/src/ps2_drv/hash @@ -1 +1 @@ -2023-01-23 cc947e53251ee62bdcdd6f06fb1c75d7082e8b60 +2023-02-26 b8231659129854091a16b71b6c936ac46cf69435 diff --git a/repos/os/recipes/src/report_rom/hash b/repos/os/recipes/src/report_rom/hash index a7972f042f..3558d06b30 100644 --- a/repos/os/recipes/src/report_rom/hash +++ b/repos/os/recipes/src/report_rom/hash @@ -1 +1 @@ -2023-01-23 91d76ca94349a7d02680d89afa27b5404ed7424d +2023-02-26 58d021a9fc6f88d3b882fae5eb29fbe5db71798a diff --git a/repos/os/recipes/src/rom_filter/hash b/repos/os/recipes/src/rom_filter/hash index b1827d1e08..37ed006cef 100644 --- a/repos/os/recipes/src/rom_filter/hash +++ b/repos/os/recipes/src/rom_filter/hash @@ -1 +1 @@ -2023-01-23 70859f08cee4bf669607201802c3a0e0d46ada70 +2023-02-26 1082ef84a7dc1fd7a88b2700792c6ab43a0d1235 diff --git a/repos/os/recipes/src/rom_logger/hash b/repos/os/recipes/src/rom_logger/hash index 2117684811..b41c10376f 100644 --- a/repos/os/recipes/src/rom_logger/hash +++ b/repos/os/recipes/src/rom_logger/hash @@ -1 +1 @@ -2023-01-23 96efed6d4d89a1a172c74931736f01cee9b7ab08 +2023-02-26 9cb08f6eef6ad9d0aa0f7be391c70812893bc37c diff --git a/repos/os/recipes/src/rom_reporter/hash b/repos/os/recipes/src/rom_reporter/hash index 44b3a0fa41..acc9cc6c99 100644 --- a/repos/os/recipes/src/rom_reporter/hash +++ b/repos/os/recipes/src/rom_reporter/hash @@ -1 +1 @@ -2023-01-23 2acf0036e8f9e1640b6e0e2a2e434d28236adc4d +2023-02-26 c31958c38a20b9899088975d09ad7ffb4a4624bf diff --git a/repos/os/recipes/src/rom_to_file/hash b/repos/os/recipes/src/rom_to_file/hash index b9f40e1d6f..6ee3721c1f 100644 --- a/repos/os/recipes/src/rom_to_file/hash +++ b/repos/os/recipes/src/rom_to_file/hash @@ -1 +1 @@ -2023-01-23 9b674c50ab03b65b0847788374bb0927467c6b19 +2023-02-26 643fedd3147410a811c90bcac8c0ae57e2601011 diff --git a/repos/os/recipes/src/rtc_drv/hash b/repos/os/recipes/src/rtc_drv/hash index 22d2f5d0ac..db90a1fa21 100644 --- a/repos/os/recipes/src/rtc_drv/hash +++ b/repos/os/recipes/src/rtc_drv/hash @@ -1 +1 @@ -2023-01-23 b5e2f5e5f79ee0459ace46c43bf19e190bf49e45 +2023-02-26 4e5ffee1aa17f651817ddc67bcee37d996946fd5 diff --git a/repos/os/recipes/src/sandbox/hash b/repos/os/recipes/src/sandbox/hash index 5fbbc0014f..af51cbb319 100644 --- a/repos/os/recipes/src/sandbox/hash +++ b/repos/os/recipes/src/sandbox/hash @@ -1 +1 @@ -2023-01-23 22a430cb3942122835cf54dc1027cd3066a155d6 +2023-02-26 8ec910520c925be660144f4e085eb21a9f2ffe2f diff --git a/repos/os/recipes/src/sequence/hash b/repos/os/recipes/src/sequence/hash index cd4c098f52..6e8405fc52 100644 --- a/repos/os/recipes/src/sequence/hash +++ b/repos/os/recipes/src/sequence/hash @@ -1 +1 @@ -2023-01-23 1011bfe68ee65ed2d4cb8062bfe1f0ccc1dad4ff +2023-02-26 e5db16093d75323d05ddc496638e5840d5a8d85d diff --git a/repos/os/recipes/src/shim/hash b/repos/os/recipes/src/shim/hash index 1956862e5a..754ca1db5e 100644 --- a/repos/os/recipes/src/shim/hash +++ b/repos/os/recipes/src/shim/hash @@ -1 +1 @@ -2023-01-23 3a28932017bada6c219bab17f2bfd982b6a890b2 +2023-02-26 30e7292ba2344627e75fd59ff38bb1cc6f3e7151 diff --git a/repos/os/recipes/src/terminal_crosslink/hash b/repos/os/recipes/src/terminal_crosslink/hash index 95bef1a82b..a3eb30ffe6 100644 --- a/repos/os/recipes/src/terminal_crosslink/hash +++ b/repos/os/recipes/src/terminal_crosslink/hash @@ -1 +1 @@ -2023-01-23 cac1fd7cb28077b012dcd5795120f1d4592c6191 +2023-02-26 dbb11aa45ed40133c9b851f94c7fcaad895d0a60 diff --git a/repos/os/recipes/src/terminal_log/hash b/repos/os/recipes/src/terminal_log/hash index b1e39947b1..856ee20e58 100644 --- a/repos/os/recipes/src/terminal_log/hash +++ b/repos/os/recipes/src/terminal_log/hash @@ -1 +1 @@ -2023-01-23 5202319b868d6da6fb9ee12fc0e7269d163442d8 +2023-02-26 5cce31c39e07614d87d65cc462c2981afbdd6c36 diff --git a/repos/os/recipes/src/test-audio_out/hash b/repos/os/recipes/src/test-audio_out/hash index b3ebd84ee8..9221458c2c 100644 --- a/repos/os/recipes/src/test-audio_out/hash +++ b/repos/os/recipes/src/test-audio_out/hash @@ -1 +1 @@ -2023-01-23 b5b37874df848bd917961c1d1f2030bf5de73dea +2023-02-26 2c7084e94776a95d5b4a7fe95fc38ce84f710d5a diff --git a/repos/os/recipes/src/test-black_hole/hash b/repos/os/recipes/src/test-black_hole/hash index b0e07d33d5..18f0eb754a 100644 --- a/repos/os/recipes/src/test-black_hole/hash +++ b/repos/os/recipes/src/test-black_hole/hash @@ -1 +1 @@ -2023-01-23 31e90df3ac0c2af90aca416526e6f9b735b13bc6 +2023-02-26 2e39fc25f966bf8f353c2d1766b8029a4a9a2977 diff --git a/repos/os/recipes/src/test-bomb/hash b/repos/os/recipes/src/test-bomb/hash index 81e826f8ac..cd8e634d43 100644 --- a/repos/os/recipes/src/test-bomb/hash +++ b/repos/os/recipes/src/test-bomb/hash @@ -1 +1 @@ -2023-01-23 84a5864231e50c6f392e7ca2d13e5a9e6d00cf96 +2023-02-26 1412829787f7483102ce5d425fd066da6652198e diff --git a/repos/os/recipes/src/test-capture/hash b/repos/os/recipes/src/test-capture/hash index a51bd8ffe7..1ba498487a 100644 --- a/repos/os/recipes/src/test-capture/hash +++ b/repos/os/recipes/src/test-capture/hash @@ -1 +1 @@ -2023-01-23 a981013a40d8e6ba7694c39fdc0d74accefa10c5 +2023-02-26 b819eb2e89ee26c2dd8e56aad4d9c2fdcac42cc7 diff --git a/repos/os/recipes/src/test-clipboard/hash b/repos/os/recipes/src/test-clipboard/hash index 26d457c82f..5374688174 100644 --- a/repos/os/recipes/src/test-clipboard/hash +++ b/repos/os/recipes/src/test-clipboard/hash @@ -1 +1 @@ -2023-01-23 bcc8bb54853c3c2012b05608763d38e3d25a1345 +2023-02-26 b6b4ed46778bec4139423357b553b6c78f91209c diff --git a/repos/os/recipes/src/test-dynamic_config/hash b/repos/os/recipes/src/test-dynamic_config/hash index fdc3e70abd..ea01da4782 100644 --- a/repos/os/recipes/src/test-dynamic_config/hash +++ b/repos/os/recipes/src/test-dynamic_config/hash @@ -1 +1 @@ -2023-01-23 a261d6f452f772cb29694eb44a3462f25102353f +2023-02-26 22fa22a30df5a230d71c03fb26835df0304c629f diff --git a/repos/os/recipes/src/test-fault_detection/hash b/repos/os/recipes/src/test-fault_detection/hash index d39c3071a9..0e11765837 100644 --- a/repos/os/recipes/src/test-fault_detection/hash +++ b/repos/os/recipes/src/test-fault_detection/hash @@ -1 +1 @@ -2023-01-23 76941a8ce6f6fda9ad1519187444bf4836f59b3a +2023-02-26 e2122dc3b11df2b735cf7bf83c1d4ca392b5f99c diff --git a/repos/os/recipes/src/test-fs_packet/hash b/repos/os/recipes/src/test-fs_packet/hash index 4818292b46..2d9b821b17 100644 --- a/repos/os/recipes/src/test-fs_packet/hash +++ b/repos/os/recipes/src/test-fs_packet/hash @@ -1 +1 @@ -2023-01-23 12da905adcbdbf97e3ac8d6ff2ee505ffb4e2dfb +2023-02-26 1ee6d56faa1199451d6803a1f33d73020847662c diff --git a/repos/os/recipes/src/test-fs_report/hash b/repos/os/recipes/src/test-fs_report/hash index 3bf6edfbed..19ac590fc5 100644 --- a/repos/os/recipes/src/test-fs_report/hash +++ b/repos/os/recipes/src/test-fs_report/hash @@ -1 +1 @@ -2023-01-23 bd50dddf29a32a112b91ca052f3fe7d3a7e0170f +2023-02-26 5581f5ebd4a11e44c4fb2d1a61d896e1c9490c6c diff --git a/repos/os/recipes/src/test-immutable_rom/hash b/repos/os/recipes/src/test-immutable_rom/hash index fd1a895fd7..da4a4bbb91 100644 --- a/repos/os/recipes/src/test-immutable_rom/hash +++ b/repos/os/recipes/src/test-immutable_rom/hash @@ -1 +1 @@ -2023-01-23 c536c379c937a83fb8a35f3fba0d90114ee86f70 +2023-02-26 b42c3b6556c2d65e56bef8811f86b0bf8e74369d diff --git a/repos/os/recipes/src/test-init/hash b/repos/os/recipes/src/test-init/hash index dcc8fb026b..805edd93ab 100644 --- a/repos/os/recipes/src/test-init/hash +++ b/repos/os/recipes/src/test-init/hash @@ -1 +1 @@ -2023-01-23 f926a2f97bb119a0c51bb96be7f580baccdb4dc3 +2023-02-26 29631ba2eae2c6bc5e743e56f0e025401a0bf578 diff --git a/repos/os/recipes/src/test-init_loop/hash b/repos/os/recipes/src/test-init_loop/hash index a6c52229b8..ee9818f069 100644 --- a/repos/os/recipes/src/test-init_loop/hash +++ b/repos/os/recipes/src/test-init_loop/hash @@ -1 +1 @@ -2023-01-23 ab5a95cd16007b2385c448de43478c115ed4dbc4 +2023-02-26 83e878121d9f6193188e113db517b65653d09e73 diff --git a/repos/os/recipes/src/test-nic_loopback/hash b/repos/os/recipes/src/test-nic_loopback/hash index 0a398c5959..46ba5a54b4 100644 --- a/repos/os/recipes/src/test-nic_loopback/hash +++ b/repos/os/recipes/src/test-nic_loopback/hash @@ -1 +1 @@ -2023-01-23 2adac6de89353cd7b7bfc64bd07762355c335f8b +2023-02-26 1ee65e95f8135c289777a6ec6fc0248bb4905bbe diff --git a/repos/os/recipes/src/test-ram_fs_chunk/hash b/repos/os/recipes/src/test-ram_fs_chunk/hash index 97aeb28a24..e2da261f33 100644 --- a/repos/os/recipes/src/test-ram_fs_chunk/hash +++ b/repos/os/recipes/src/test-ram_fs_chunk/hash @@ -1 +1 @@ -2023-01-23 5452f71aabb3e5f0fbb44517e1a10c98630e6e09 +2023-02-26 4755394f80027aa4dd0ddcae91b231d4be25e762 diff --git a/repos/os/recipes/src/test-report_rom/hash b/repos/os/recipes/src/test-report_rom/hash index fb745f98b7..b2bc0b716b 100644 --- a/repos/os/recipes/src/test-report_rom/hash +++ b/repos/os/recipes/src/test-report_rom/hash @@ -1 +1 @@ -2023-01-23 8ebcfb4da85337c7cd2ce5b5c59f1c824ca8da1c +2023-02-26 102c93a866df9ebded0ff0bf09dfd48ce4624ac9 diff --git a/repos/os/recipes/src/test-resource_request/hash b/repos/os/recipes/src/test-resource_request/hash index 4c1e257ab1..20a6e49be9 100644 --- a/repos/os/recipes/src/test-resource_request/hash +++ b/repos/os/recipes/src/test-resource_request/hash @@ -1 +1 @@ -2023-01-23 dd53f32b57be12b6bb6d351cb99b0dbbeeea2622 +2023-02-26 17d75e3a9bb8690e3fad2067aa627ed64be1e1d8 diff --git a/repos/os/recipes/src/test-resource_yield/hash b/repos/os/recipes/src/test-resource_yield/hash index 321c695c48..b327efd49d 100644 --- a/repos/os/recipes/src/test-resource_yield/hash +++ b/repos/os/recipes/src/test-resource_yield/hash @@ -1 +1 @@ -2023-01-23 3d1f361ecbae744172639e73540e0ee95ddd8bba +2023-02-26 4ecd3f2580332d7e395df707838457bae1afa989 diff --git a/repos/os/recipes/src/test-rtc/hash b/repos/os/recipes/src/test-rtc/hash index ff5dafc22a..e9444b76a1 100644 --- a/repos/os/recipes/src/test-rtc/hash +++ b/repos/os/recipes/src/test-rtc/hash @@ -1 +1 @@ -2023-01-23 dda8e82cde3790beac94daceb04a041c2d262e90 +2023-02-26 093dd245a2ccbed92071e7e2749d43cd443a4dff diff --git a/repos/os/recipes/src/test-sandbox/hash b/repos/os/recipes/src/test-sandbox/hash index 18443fdeb5..0b585f9dda 100644 --- a/repos/os/recipes/src/test-sandbox/hash +++ b/repos/os/recipes/src/test-sandbox/hash @@ -1 +1 @@ -2023-01-23 fa348b539062b3157cd38dddb4dc1a8e6057bf3e +2023-02-26 cc4eca1edee918b40f2a66cd203f4fb9dfc6950c diff --git a/repos/os/recipes/src/test-signal/hash b/repos/os/recipes/src/test-signal/hash index adba6385bc..576f98a6c9 100644 --- a/repos/os/recipes/src/test-signal/hash +++ b/repos/os/recipes/src/test-signal/hash @@ -1 +1 @@ -2023-01-23 d5e6d725d1f68ebfc57b6e4894ae49dce8ff8bd7 +2023-02-26 5fce7dcafa279318e6dcc653d54635d6c446efb8 diff --git a/repos/os/recipes/src/test-slab/hash b/repos/os/recipes/src/test-slab/hash index 4e65f94cff..dd4304179b 100644 --- a/repos/os/recipes/src/test-slab/hash +++ b/repos/os/recipes/src/test-slab/hash @@ -1 +1 @@ -2023-01-23 7944ccb60cf1372a4aaa3b9d06fea31cc93a88e0 +2023-02-26 b9014d076612c06c116a6040fb84b8f88bc03a40 diff --git a/repos/os/recipes/src/test-terminal_crosslink/hash b/repos/os/recipes/src/test-terminal_crosslink/hash index 43c512f9e1..4792ba4540 100644 --- a/repos/os/recipes/src/test-terminal_crosslink/hash +++ b/repos/os/recipes/src/test-terminal_crosslink/hash @@ -1 +1 @@ -2023-01-23 0b8b6e71deb852ecf1f18010d48f90c83863a0de +2023-02-26 d79aa6b58a0c636b997d0711f6b735c15fe71fc1 diff --git a/repos/os/recipes/src/test-trace/hash b/repos/os/recipes/src/test-trace/hash index ac11a8430a..64dd5cad89 100644 --- a/repos/os/recipes/src/test-trace/hash +++ b/repos/os/recipes/src/test-trace/hash @@ -1 +1 @@ -2023-01-23 818035be6d87a8210ed91ec6fb4a2fe54d4aacca +2023-02-26 cd8a50b46c17278692ea883f97aafaf79b2ee929 diff --git a/repos/os/recipes/src/test-trace_buffer/hash b/repos/os/recipes/src/test-trace_buffer/hash index 51c5430c8e..718f4f8835 100644 --- a/repos/os/recipes/src/test-trace_buffer/hash +++ b/repos/os/recipes/src/test-trace_buffer/hash @@ -1 +1 @@ -2023-01-23 461a24d67b74fb295da533b722ec90d21075ddc7 +2023-02-26 0969b0862081990321624cec0809a6f12c7e7f80 diff --git a/repos/os/recipes/src/test-trace_logger/hash b/repos/os/recipes/src/test-trace_logger/hash index 5893eff257..59440c7766 100644 --- a/repos/os/recipes/src/test-trace_logger/hash +++ b/repos/os/recipes/src/test-trace_logger/hash @@ -1 +1 @@ -2023-01-23 2f28a33086e73c1b1fa607882db59923cc55a5ea +2023-02-26 16d8ebc3a2fb5d9d8e3fc424c00888e1c035fc09 diff --git a/repos/os/recipes/src/test-utf8/hash b/repos/os/recipes/src/test-utf8/hash index a27822d8db..58fe5173e9 100644 --- a/repos/os/recipes/src/test-utf8/hash +++ b/repos/os/recipes/src/test-utf8/hash @@ -1 +1 @@ -2023-01-23 46f9f20b9a67cf7ba5b52cf545906d69d364e56a +2023-02-26 e54a869abe2cce1a598fc2ad0ec51fbd70d54f42 diff --git a/repos/os/recipes/src/test-vfs_capture/hash b/repos/os/recipes/src/test-vfs_capture/hash index 50ddb96290..6c39f8e50d 100644 --- a/repos/os/recipes/src/test-vfs_capture/hash +++ b/repos/os/recipes/src/test-vfs_capture/hash @@ -1 +1 @@ -2023-01-23 691eb5eb2681600b8e2f85892955358b32a470e4 +2023-02-26 bb5d81b6240471614a43f86181a14231e9591fbe diff --git a/repos/os/recipes/src/test-vfs_stress/hash b/repos/os/recipes/src/test-vfs_stress/hash index 41a0a0cbb4..4912cbb591 100644 --- a/repos/os/recipes/src/test-vfs_stress/hash +++ b/repos/os/recipes/src/test-vfs_stress/hash @@ -1 +1 @@ -2023-01-23 045f788ffb079852a54614c6d926ef156df8b9a2 +2023-02-26 dd194417e35d0fa189fa458e9b4d688a94db0b8f diff --git a/repos/os/recipes/src/test-weak_ptr/hash b/repos/os/recipes/src/test-weak_ptr/hash index ecbaf9e3b7..43ed9a3c14 100644 --- a/repos/os/recipes/src/test-weak_ptr/hash +++ b/repos/os/recipes/src/test-weak_ptr/hash @@ -1 +1 @@ -2023-01-23 090a5e31d264fd3fafeb21a84c99894971d1aa79 +2023-02-26 8053bfb505dfd9bb164acdf041fbf88569f88e2c diff --git a/repos/os/recipes/src/top/hash b/repos/os/recipes/src/top/hash index 27f162e075..f8a277539e 100644 --- a/repos/os/recipes/src/top/hash +++ b/repos/os/recipes/src/top/hash @@ -1 +1 @@ -2023-01-23 cd714e2808c52231c3ccc1559e740da458be46fe +2023-02-26 d5f7e19d41ab1efccc1b919e00bed54c82bb41ff diff --git a/repos/os/recipes/src/trace_logger/hash b/repos/os/recipes/src/trace_logger/hash index 9463dc9e54..2c6e712984 100644 --- a/repos/os/recipes/src/trace_logger/hash +++ b/repos/os/recipes/src/trace_logger/hash @@ -1 +1 @@ -2023-01-23 b8ec81b006d5737a85e57f97edf5634dd30f77bf +2023-02-26 e65440da8057c9a4abceae688b2ed3841fc6fd50 diff --git a/repos/os/recipes/src/trace_policy/hash b/repos/os/recipes/src/trace_policy/hash index 09a8c58f29..e1986fd13d 100644 --- a/repos/os/recipes/src/trace_policy/hash +++ b/repos/os/recipes/src/trace_policy/hash @@ -1 +1 @@ -2023-01-23 85459ad55007a985b60d39dbf9d6e25f652df788 +2023-02-26 b71be6de840340df58a6b091f3c38ebb2e7d8bcd diff --git a/repos/os/recipes/src/trace_subject_reporter/hash b/repos/os/recipes/src/trace_subject_reporter/hash index 6c042c1517..e98811e78f 100644 --- a/repos/os/recipes/src/trace_subject_reporter/hash +++ b/repos/os/recipes/src/trace_subject_reporter/hash @@ -1 +1 @@ -2023-01-23 9078b3fe73830d0bd2bfb2f1ae9a38380cafdc83 +2023-02-26 591fe5f0b086042ba04ddf5d32774baeda97f778 diff --git a/repos/os/recipes/src/usb_block_drv/hash b/repos/os/recipes/src/usb_block_drv/hash index d31afec0e4..7c660e7b5e 100644 --- a/repos/os/recipes/src/usb_block_drv/hash +++ b/repos/os/recipes/src/usb_block_drv/hash @@ -1 +1 @@ -2023-01-23 c57255367237926030c617edccbfb01ee3a51680 +2023-02-26 fdebd2877fe8391a204a72483cf54a2a82116ff7 diff --git a/repos/os/recipes/src/vfs/hash b/repos/os/recipes/src/vfs/hash index 40e921c105..5286b3054e 100644 --- a/repos/os/recipes/src/vfs/hash +++ b/repos/os/recipes/src/vfs/hash @@ -1 +1 @@ -2023-01-23 b1e372a38f99e9e2aa3bdb1d7ef41f6516a2cf93 +2023-02-26 980a8c3f7d1b412fa8924a908f3062a72ed699a5 diff --git a/repos/os/recipes/src/vfs_block/hash b/repos/os/recipes/src/vfs_block/hash index f198d212aa..03d2ff9438 100644 --- a/repos/os/recipes/src/vfs_block/hash +++ b/repos/os/recipes/src/vfs_block/hash @@ -1 +1 @@ -2023-01-23 7a2e4ef073d606224011f33ccaa8ee295702a4e4 +2023-02-26 56ed6201c78269f017e6ead7f90a54bb772aa352 diff --git a/repos/os/recipes/src/vfs_capture/hash b/repos/os/recipes/src/vfs_capture/hash index 2d7f4e3acf..3562ea7af3 100644 --- a/repos/os/recipes/src/vfs_capture/hash +++ b/repos/os/recipes/src/vfs_capture/hash @@ -1 +1 @@ -2023-01-23 c38cca30ffc24b881a2d25fedaf7ce010348b7f5 +2023-02-26 c29d6983266305cb8f3fa152b09744892b79ace3 diff --git a/repos/os/recipes/src/vfs_tap/hash b/repos/os/recipes/src/vfs_tap/hash index 70d3c8677b..72acea6d4f 100644 --- a/repos/os/recipes/src/vfs_tap/hash +++ b/repos/os/recipes/src/vfs_tap/hash @@ -1 +1 @@ -2023-01-23 e3c1fb86a81151148d1c546d3415b81b2a8e52bd +2023-02-26 e60a81601cea8888b44496b88b707359e545159d diff --git a/repos/os/recipes/src/virt_qemu_drivers/hash b/repos/os/recipes/src/virt_qemu_drivers/hash index 4d4c9905d9..76bd2bf6c3 100644 --- a/repos/os/recipes/src/virt_qemu_drivers/hash +++ b/repos/os/recipes/src/virt_qemu_drivers/hash @@ -1 +1 @@ -2023-01-23 6ca7d217c666e5d5ca8f9e9aa534db239f2036a9 +2023-02-26 cb7d0e00a185385917b9f3c4728954aa285cdb2f diff --git a/repos/os/recipes/src/virtdev_rom/hash b/repos/os/recipes/src/virtdev_rom/hash index 617c122fcc..eac21501a3 100644 --- a/repos/os/recipes/src/virtdev_rom/hash +++ b/repos/os/recipes/src/virtdev_rom/hash @@ -1 +1 @@ -2023-01-23 ceab65c6a9e23fdce37e0024a06b0b97a5d5f5f6 +2023-02-26 7a65e0f4065ce3b29a3cdc7d5f7ca01fb51072fb diff --git a/repos/os/recipes/src/virtio_fb_drv/hash b/repos/os/recipes/src/virtio_fb_drv/hash index fff2abb542..ae507b94ce 100644 --- a/repos/os/recipes/src/virtio_fb_drv/hash +++ b/repos/os/recipes/src/virtio_fb_drv/hash @@ -1 +1 @@ -2023-01-23 1bfc3841af0a1a70a3ebf2017d8935b7f4dc7361 +2023-02-26 1642f16ff2a2aaae5fe97786bf341fb0c02d6c3e diff --git a/repos/os/recipes/src/virtio_input_drv/hash b/repos/os/recipes/src/virtio_input_drv/hash index adf91fa3d4..4e5fa489ab 100644 --- a/repos/os/recipes/src/virtio_input_drv/hash +++ b/repos/os/recipes/src/virtio_input_drv/hash @@ -1 +1 @@ -2023-01-23 602ea23724e3b244090898ae187a403b1e7cbe87 +2023-02-26 d4ffb9f4cfe6029525ee8a5892a4576fe02a740c diff --git a/repos/os/recipes/src/virtio_nic_drv/hash b/repos/os/recipes/src/virtio_nic_drv/hash index 113d63a914..a6faa1cf2d 100644 --- a/repos/os/recipes/src/virtio_nic_drv/hash +++ b/repos/os/recipes/src/virtio_nic_drv/hash @@ -1 +1 @@ -2023-01-23 38b63ddef859dd2d34f12cb08ca01c2a11fa8bda +2023-02-26 5472bdbd7ca63cc500c596926d08cdc301e253df diff --git a/repos/os/recipes/src/vmm/hash b/repos/os/recipes/src/vmm/hash index d775e4f6c7..8f783eb024 100644 --- a/repos/os/recipes/src/vmm/hash +++ b/repos/os/recipes/src/vmm/hash @@ -1 +1 @@ -2023-01-23 e26b137688a41236643005af4ec1c9c827b535b4 +2023-02-26 e523d23bcf6033d71bf88190b28d6a4ec52172d0 diff --git a/repos/pc/recipes/api/pc_linux/hash b/repos/pc/recipes/api/pc_linux/hash index f9d33a1748..0aec8c2b30 100644 --- a/repos/pc/recipes/api/pc_linux/hash +++ b/repos/pc/recipes/api/pc_linux/hash @@ -1 +1 @@ -2023-01-23 101fd783dd44b5ba9d4b14c0aa0a8fa71f7e6a26 +2023-02-26 10e2410cd41a585cf6e323c442816015d55e1330 diff --git a/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash b/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash index 652162e5e6..e32480298f 100644 --- a/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash +++ b/repos/pc/recipes/pkg/test_usb_host_drv-pc/hash @@ -1 +1 @@ -2023-01-23 501fff310b0e75ae2a38bd3326cf7fd5f578af4b +2023-02-26 0c68c37d23b530b23bec88d79c778209dd51e281 diff --git a/repos/pc/recipes/pkg/wifi/hash b/repos/pc/recipes/pkg/wifi/hash index 832aa23b0b..8e5dd12535 100644 --- a/repos/pc/recipes/pkg/wifi/hash +++ b/repos/pc/recipes/pkg/wifi/hash @@ -1 +1 @@ -2023-01-23 5dc8b498a42122b5b9a984c64e6e67b36ee14871 +2023-02-26 6d09b5b5ffa559cd269594827db6c5a7fcfaef81 diff --git a/repos/pc/recipes/raw/test_usb_host_drv-pc/hash b/repos/pc/recipes/raw/test_usb_host_drv-pc/hash index bd4076041d..34e44bf619 100644 --- a/repos/pc/recipes/raw/test_usb_host_drv-pc/hash +++ b/repos/pc/recipes/raw/test_usb_host_drv-pc/hash @@ -1 +1 @@ -2022-11-28 fa01946bfc921e0b9af4122266c772ff1ef8f48f +2023-02-26 3a13386d239920d1ec75988d99354c3f418d0223 diff --git a/repos/pc/recipes/src/pc_intel_fb_drv/hash b/repos/pc/recipes/src/pc_intel_fb_drv/hash index 9ffd40bbf0..47441dab38 100644 --- a/repos/pc/recipes/src/pc_intel_fb_drv/hash +++ b/repos/pc/recipes/src/pc_intel_fb_drv/hash @@ -1 +1 @@ -2023-01-23 b102acfe5203dafefed0c43d039754d0d7936abb +2023-02-26 39154aef53b3b08d985bed86d95391552e5dccc8 diff --git a/repos/pc/recipes/src/pc_platform_drv/hash b/repos/pc/recipes/src/pc_platform_drv/hash index 12d7b77e72..f2137ca303 100644 --- a/repos/pc/recipes/src/pc_platform_drv/hash +++ b/repos/pc/recipes/src/pc_platform_drv/hash @@ -1 +1 @@ -2023-01-23 a1e1f1b7d979766ea4c27606de08d0d57a604cea +2023-02-26 9eb71d9d3764a3c96a0a501c18490a6f7d85e253 diff --git a/repos/pc/recipes/src/pc_usb_host_drv/hash b/repos/pc/recipes/src/pc_usb_host_drv/hash index 57d214d595..63119b60ef 100644 --- a/repos/pc/recipes/src/pc_usb_host_drv/hash +++ b/repos/pc/recipes/src/pc_usb_host_drv/hash @@ -1 +1 @@ -2023-01-23 19e4055c9d5f13975c86e0b252f5c429515c8166 +2023-02-26 b4f7208e5cc8d73b84300dc6d19b7e6e28d19af8 diff --git a/repos/pc/recipes/src/pc_wifi_drv/hash b/repos/pc/recipes/src/pc_wifi_drv/hash index 36294fb769..f4f2bfca3c 100644 --- a/repos/pc/recipes/src/pc_wifi_drv/hash +++ b/repos/pc/recipes/src/pc_wifi_drv/hash @@ -1 +1 @@ -2023-01-23 8c546b3d2ab0b1b83e166bfbd88d530590f93d3d +2023-02-26 b0d8cf66b45301f0d4a8783ab5d04a8f28dd1e9d diff --git a/repos/ports/recipes/api/noux/hash b/repos/ports/recipes/api/noux/hash index c64c026648..8b61b1c3f9 100644 --- a/repos/ports/recipes/api/noux/hash +++ b/repos/ports/recipes/api/noux/hash @@ -1 +1 @@ -2021-12-16 26332d7dfeb6d32bfafad387690fe38fb8340d35 +2023-02-26 455a9ba75998fe6cdb0c1cc18f2d43ff8e5c1c83 diff --git a/repos/ports/recipes/pkg/report_dump/hash b/repos/ports/recipes/pkg/report_dump/hash index 5641c1cf59..bc5d2da065 100644 --- a/repos/ports/recipes/pkg/report_dump/hash +++ b/repos/ports/recipes/pkg/report_dump/hash @@ -1 +1 @@ -2023-01-23 47d6da94c1c19d7944071fe7d3f6d4dc6d79206e +2023-02-26 bb14849680eef80e63db164a5d024e486a314182 diff --git a/repos/ports/recipes/pkg/system_shell/hash b/repos/ports/recipes/pkg/system_shell/hash index 242d4c7fd6..d03ee4e9af 100644 --- a/repos/ports/recipes/pkg/system_shell/hash +++ b/repos/ports/recipes/pkg/system_shell/hash @@ -1 +1 @@ -2023-01-23 eb3ea26b292c62115e9f309f7d984b441228c9d0 +2023-02-26 2d31a658af281921faa50a63e71c5afcfbca607a diff --git a/repos/ports/recipes/pkg/vbox5-nova-capture/hash b/repos/ports/recipes/pkg/vbox5-nova-capture/hash index 12801e9a6d..2f61eac669 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-capture/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-capture/hash @@ -1 +1 @@ -2023-01-23 8e7c3ef1217189dbf59fb9cb85c0e61ec0f241f9 +2023-02-26 646833e8907d389f7a25a2f5088a8f444404ae8e diff --git a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash index c9cfbf9eed..5b16692fbc 100644 --- a/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash +++ b/repos/ports/recipes/pkg/vbox5-nova-sculpt/hash @@ -1 +1 @@ -2023-01-23 3ccbf7de090f6a4733cda87fc5602548f0d71d93 +2023-02-26 e76e3b15a442e137e7b62b7708999cd3bd1f88a7 diff --git a/repos/ports/recipes/pkg/vbox5/hash b/repos/ports/recipes/pkg/vbox5/hash index 144722aa14..64d4552cdd 100644 --- a/repos/ports/recipes/pkg/vbox5/hash +++ b/repos/ports/recipes/pkg/vbox5/hash @@ -1 +1 @@ -2023-01-23 0ac58dc477be4f4139bb2739c32c776b8bbc5770 +2023-02-26 583cc255633ef281b007d9b8164791e5682b2a4d diff --git a/repos/ports/recipes/pkg/vbox6-capture/hash b/repos/ports/recipes/pkg/vbox6-capture/hash index a629915749..c3dfbd6f3f 100644 --- a/repos/ports/recipes/pkg/vbox6-capture/hash +++ b/repos/ports/recipes/pkg/vbox6-capture/hash @@ -1 +1 @@ -2023-01-23 3d5cd0397c934ed396425713ea153485f2915a78 +2023-02-26 99e44a96c15f69d6c88e7626a21feadbc5e48bfe diff --git a/repos/ports/recipes/pkg/vbox6/hash b/repos/ports/recipes/pkg/vbox6/hash index ad5ead343a..5b0c3d314e 100644 --- a/repos/ports/recipes/pkg/vbox6/hash +++ b/repos/ports/recipes/pkg/vbox6/hash @@ -1 +1 @@ -2023-01-23 1fa81c86ee140d1d57c421ab3c3c5bb6ca47581b +2023-02-26 b8d57cef77e3fdfb887b0f9ea4246fd7c7f4ebb5 diff --git a/repos/ports/recipes/src/bash-minimal/hash b/repos/ports/recipes/src/bash-minimal/hash index 4570913acd..f370d4924c 100644 --- a/repos/ports/recipes/src/bash-minimal/hash +++ b/repos/ports/recipes/src/bash-minimal/hash @@ -1 +1 @@ -2023-01-23 5e964d2a6d9a8e08e3d6ec97992c634820e9a005 +2023-02-26 40eb274b04dd6774b7e2d01497793d93ccd1f7f6 diff --git a/repos/ports/recipes/src/bash/hash b/repos/ports/recipes/src/bash/hash index faa1d7cf2a..834124516e 100644 --- a/repos/ports/recipes/src/bash/hash +++ b/repos/ports/recipes/src/bash/hash @@ -1 +1 @@ -2023-01-23 68e7f0247c70dfe89d0dc6aa9bdfd51910896b52 +2023-02-26 7be45fffaaa8e3e5f53f15ca94b606ff6ad04ab1 diff --git a/repos/ports/recipes/src/binutils_x86/hash b/repos/ports/recipes/src/binutils_x86/hash index 81c9a1fe96..d61ae3836f 100644 --- a/repos/ports/recipes/src/binutils_x86/hash +++ b/repos/ports/recipes/src/binutils_x86/hash @@ -1 +1 @@ -2023-01-23 f82ef68a3964cfc01664c3b5c4512e7a14c0f435 +2023-02-26 b2f8d3501fe7d3735c00913540ae24e5257f0b82 diff --git a/repos/ports/recipes/src/coreutils-minimal/hash b/repos/ports/recipes/src/coreutils-minimal/hash index 361cd35df8..0e96ece045 100644 --- a/repos/ports/recipes/src/coreutils-minimal/hash +++ b/repos/ports/recipes/src/coreutils-minimal/hash @@ -1 +1 @@ -2023-01-23 22d407cf97d1a1c2bfa405b34602efb3b6cebd35 +2023-02-26 3b4854f38d57dcc00a0953ee93fedf51dc46ed44 diff --git a/repos/ports/recipes/src/coreutils/hash b/repos/ports/recipes/src/coreutils/hash index 7fbba66456..66c4f5d83d 100644 --- a/repos/ports/recipes/src/coreutils/hash +++ b/repos/ports/recipes/src/coreutils/hash @@ -1 +1 @@ -2023-01-23 6c09eeccfc787e290cae04d7958ac066cebdf64b +2023-02-26 ef10360294a43873cdd4491c51dbd29df143d76e diff --git a/repos/ports/recipes/src/diffutils/hash b/repos/ports/recipes/src/diffutils/hash index 1c4bd9119a..a7c9024e12 100644 --- a/repos/ports/recipes/src/diffutils/hash +++ b/repos/ports/recipes/src/diffutils/hash @@ -1 +1 @@ -2023-01-23 4c9e31c2944656ce00c98d6cfa41d2b54ec9c92f +2023-02-26 372b29e2606e51432f66a5ef518585d3bbc71ce5 diff --git a/repos/ports/recipes/src/e2fsprogs-minimal/hash b/repos/ports/recipes/src/e2fsprogs-minimal/hash index ed5581cbb3..3e932039f4 100644 --- a/repos/ports/recipes/src/e2fsprogs-minimal/hash +++ b/repos/ports/recipes/src/e2fsprogs-minimal/hash @@ -1 +1 @@ -2023-01-23 3ffb6545c06d8be630a6ab030d7d87485d493589 +2023-02-26 d2f6fde0cb78d83002d2f8ffb2cd17274fd22c0a diff --git a/repos/ports/recipes/src/e2fsprogs/hash b/repos/ports/recipes/src/e2fsprogs/hash index be21dca710..01532abacc 100644 --- a/repos/ports/recipes/src/e2fsprogs/hash +++ b/repos/ports/recipes/src/e2fsprogs/hash @@ -1 +1 @@ -2023-01-23 dbd40bb3f4a4f85f2bb9a870923245c103d72009 +2023-02-26 0e74c37ac9f51d0621254251f9c999f9e359c496 diff --git a/repos/ports/recipes/src/findutils/hash b/repos/ports/recipes/src/findutils/hash index e20f771d0e..fe64763a5b 100644 --- a/repos/ports/recipes/src/findutils/hash +++ b/repos/ports/recipes/src/findutils/hash @@ -1 +1 @@ -2023-01-23 f9a1f8d3840ff20a54e272245fdbbd7672050f9f +2023-02-26 d0fc92cedb0313fba45aa0add572a0b9fe268d2b diff --git a/repos/ports/recipes/src/gcc_x86/hash b/repos/ports/recipes/src/gcc_x86/hash index 63452ce985..34b8219c17 100644 --- a/repos/ports/recipes/src/gcc_x86/hash +++ b/repos/ports/recipes/src/gcc_x86/hash @@ -1 +1 @@ -2023-01-23 769c083fcc518ccdee447f380345c789c56be25a +2023-02-26 854cdae2c19e33b14d83b36dbd7947f066deaed5 diff --git a/repos/ports/recipes/src/gnumake/hash b/repos/ports/recipes/src/gnumake/hash index b185f65dec..0a38931d6b 100644 --- a/repos/ports/recipes/src/gnumake/hash +++ b/repos/ports/recipes/src/gnumake/hash @@ -1 +1 @@ -2023-01-23 8d5034df871bc062b4fb27989ac01dd91986efe2 +2023-02-26 26366352ba10cc32ab182220e1b8d9b896326997 diff --git a/repos/ports/recipes/src/grep/hash b/repos/ports/recipes/src/grep/hash index af941cba5f..7fe4a60d36 100644 --- a/repos/ports/recipes/src/grep/hash +++ b/repos/ports/recipes/src/grep/hash @@ -1 +1 @@ -2023-01-23 89fe3ea29b15e7420a65492e65c69bae136c50a7 +2023-02-26 61498c07c670590e834cc40f70d2869c53d22de2 diff --git a/repos/ports/recipes/src/less/hash b/repos/ports/recipes/src/less/hash index 72f66324e1..423d94ead2 100644 --- a/repos/ports/recipes/src/less/hash +++ b/repos/ports/recipes/src/less/hash @@ -1 +1 @@ -2023-01-23 5ccef21323725d673763f914a6e9bbfaf0c3e3db +2023-02-26 5880948777d6699cdffe22dd3cdc954169d3f774 diff --git a/repos/ports/recipes/src/sed/hash b/repos/ports/recipes/src/sed/hash index d49c7785f2..5bf290d65f 100644 --- a/repos/ports/recipes/src/sed/hash +++ b/repos/ports/recipes/src/sed/hash @@ -1 +1 @@ -2023-01-23 99f91131c752d7ca4b6bc167cc84a115c5661eca +2023-02-26 ed88698c38ab290a07f0c07f89027e8997aee9fc diff --git a/repos/ports/recipes/src/tar/hash b/repos/ports/recipes/src/tar/hash index baf4f59cf7..6d76e59b82 100644 --- a/repos/ports/recipes/src/tar/hash +++ b/repos/ports/recipes/src/tar/hash @@ -1 +1 @@ -2023-01-23 a1c85969b702460fb956a3b264bc8680822a17a0 +2023-02-26 b3fa5c52e218370a61d1242df79c2c47f4c74f69 diff --git a/repos/ports/recipes/src/tclsh/hash b/repos/ports/recipes/src/tclsh/hash index 2af5ac9524..4275eb7eff 100644 --- a/repos/ports/recipes/src/tclsh/hash +++ b/repos/ports/recipes/src/tclsh/hash @@ -1 +1 @@ -2023-01-23 d9118f14fec04b8b58935a4aa357756123953c97 +2023-02-26 399b47dcf387be052a3d591872c75e54a144961d diff --git a/repos/ports/recipes/src/vbox5-nova/hash b/repos/ports/recipes/src/vbox5-nova/hash index 32d92d0ecf..eee6f53bfc 100644 --- a/repos/ports/recipes/src/vbox5-nova/hash +++ b/repos/ports/recipes/src/vbox5-nova/hash @@ -1 +1 @@ -2023-01-23 d96eeb50b144c0d7b81e315172fd8b9e740705dd +2023-02-26 48c768efc02dc358e3b72541ed101817bb63431a diff --git a/repos/ports/recipes/src/vbox5/hash b/repos/ports/recipes/src/vbox5/hash index d4d73d9bda..3598ee26c4 100644 --- a/repos/ports/recipes/src/vbox5/hash +++ b/repos/ports/recipes/src/vbox5/hash @@ -1 +1 @@ -2023-01-23 d0239f951733b10a822227f9a37e7d241104b020 +2023-02-26 27ae2fc2609ad4c08d33552a1b5c3a84254b0d63 diff --git a/repos/ports/recipes/src/vbox6/hash b/repos/ports/recipes/src/vbox6/hash index d0262be43f..308857c190 100644 --- a/repos/ports/recipes/src/vbox6/hash +++ b/repos/ports/recipes/src/vbox6/hash @@ -1 +1 @@ -2023-01-23 e1733e24fe507849a45ea695084c144c83e2341b +2023-02-26 abf23aab9b652ef22dec78305586be410f0dbbef diff --git a/repos/ports/recipes/src/verify/hash b/repos/ports/recipes/src/verify/hash index 2869c948b4..7276770fce 100644 --- a/repos/ports/recipes/src/verify/hash +++ b/repos/ports/recipes/src/verify/hash @@ -1 +1 @@ -2023-01-23 3a089eac8ca30c1ea8d086e62057a599995d7349 +2023-02-26 4e69a7cbae90a17a05f04b74658a1fa60b958b60 diff --git a/repos/ports/recipes/src/vim-minimal/hash b/repos/ports/recipes/src/vim-minimal/hash index 09974c3248..b8191a4f2a 100644 --- a/repos/ports/recipes/src/vim-minimal/hash +++ b/repos/ports/recipes/src/vim-minimal/hash @@ -1 +1 @@ -2023-01-23 7fe292afc27836f9aa67d3169f6a796f1ca03ce6 +2023-02-26 4e613e7aab1595bb370f04e8edda857404fefd3c diff --git a/repos/ports/recipes/src/vim/hash b/repos/ports/recipes/src/vim/hash index abfe44bc91..a1e584846b 100644 --- a/repos/ports/recipes/src/vim/hash +++ b/repos/ports/recipes/src/vim/hash @@ -1 +1 @@ -2023-01-23 1dca1ac82795b57fdcc91eb76763fa43a825e69a +2023-02-26 deac53c9d28e965ccc557e7ee6bcf5a76b7d9145 diff --git a/repos/ports/recipes/src/which/hash b/repos/ports/recipes/src/which/hash index fdfc9a10a3..42e3ceabb8 100644 --- a/repos/ports/recipes/src/which/hash +++ b/repos/ports/recipes/src/which/hash @@ -1 +1 @@ -2023-01-23 66f854e335ccf1375be68efbabbba84d5e7fcc8d +2023-02-26 dd156fbf93106aa8384221b86a38538d13b3bb6e From 89e198204f32cb197c0df85d72ffa5fa8acad358 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 22 Feb 2023 16:41:36 +0100 Subject: [PATCH 0347/1921] Release notes for version 23.02 --- doc/release_notes/23-02.txt | 886 ++++++++++++++++++++++++++++++++++++ 1 file changed, 886 insertions(+) create mode 100644 doc/release_notes/23-02.txt diff --git a/doc/release_notes/23-02.txt b/doc/release_notes/23-02.txt new file mode 100644 index 0000000000..da0f16f10b --- /dev/null +++ b/doc/release_notes/23-02.txt @@ -0,0 +1,886 @@ + + + =============================================== + Release notes for the Genode OS Framework 23.02 + =============================================== + + Genode Labs + + + +With Genode's February release, almost everything goes +[https://genode.org/about/road-map - according to plan]. +As envisioned on our road map, it features the first ready-to-install +system image of Sculpt OS for the PinePhone, which is not merely a re-targeted +version of the PC version but comes with a novel user interface, a new +mechanism for rapidly switching between different application scenarios, and +system-update functionality. +Section [First system image of mobile Sculpt OS (PinePhone)] gives an +overview and further links about running Genode on your PinePhone. + +While enabling substantial application workloads on devices as constrained as +the PinePhone, we engaged in holistic performance optimizations, ranging from +kernel scheduling [Base-HW microkernel], over the framework's VFS +infrastructure (Section [VFS optimization and simplification]), to the +interfacing of GPU drivers (Section [GPU performance optimizations]). + +For stationary ARM-based platforms like the MNT-Reform laptop, +interactive graphical virtual machines have become available now, which +brings us close to mirror the experience of the PC version of Sculpt OS on +such devices (Section [Interactive graphical VMs on ARM]). This development +is accompanied by several device-driver improvements for NXP's i.MX family. + +For embedded devices based on Xilinx Zynq, the release introduces custom +FPGA fabric for implementing DMA protection that is normally not covered by +Zynq SoCs. This line of work - as outlined in +Section [Custom IP block for DMA protection on AMD/Xilinx Zynq] - exemplifies +how well Genode and reconfigurable hardware can go hand in hand. + +Also, PC platforms got their share of attention, benefiting from the +new distinction between Intel's P&E cores, or the principle support of +suspend/resume on both NOVA and Genode's custom base-hw microkernel. + +When it comes to running applications on top of Genode, the release brings +good news as well. Our custom Goa tool for streamlining +application-development work flows received the ability to largely automate +the porting and packaging of 3rd-party libraries using CMake +(Section [Build system and tools]). + + +First system image of mobile Sculpt OS (PinePhone) +################################################## + +Just in time for our +[https://fosdem.org/2023/schedule/event/genode_on_the_pinephone/ - public presentation] +of Genode on the PinePhone at FOSDEM in the beginning of February, +we published a first ready-to-use system image: + +:First system image of mobile Sculpt OS: + + [https://genodians.org/nfeske/2023-02-01-mobile-sculpt] + +It features a +[https://genodians.org/nfeske/2023-01-05-mobile-user-interface - custom user interface], +voice calls and mobile-data connectivity, on-target software installation and +system update, device controls (battery, brightness, volume, mic, reset, +shutdown), and a variety of installable software. Among the installable +applications, there is the Chromium-based Morph web browser, an OpenGL demo +using the GPU, tests for the camera and microphone, as well as a light-weight +Unix-like system shell. + +The underpinnings of the Genode system image for the PinePhone are nearly +identical to Sculpt OS on the PC. However, besides the new user interface +specifically designed for the touch screen of the phone, two noteworthy +differences set it apart from the regular version of Sculpt OS. + +[image pinephone_presets] + +First, the phone variant allows the user to rapidly switch between different +runtime configurations, called presets. This way, the limited resources of the +phone can be accounted and fully leveraged for each preset individually, while +making the system extremely versatile. The loading of a preset can be imagined +as the boot into a separate operating system, but it takes only a fraction of +a second. The structure of the running system is made fully transparent to the +user by the component graph known from Sculpt OS. + +[image pinephone_scenarios] + The variety of presets includes the Morph browser, GLMark2, a system shell, + a simple oscilloscope, and camera test. + +Second, the system is equipped with an on-target system update mechanism that +allows the user to install new versions of the system image when they become +available. System updates are secured by cryptographic signatures. The +mechanism does not only allow for updating the system but also for the +rollback to any previously downloaded version. This way, the user can try +out a new version while being able to fall back to the previous one in the +case of a regression. This reinforces the end user's ultimate control. + +[image pinephone_update] + + +Interactive graphical VMs on ARM +################################ + +The virtual-machine monitor (VMM) using hardware-assisted virtualization on +ARM started as a case study eight years ago for Samsung's Exynos 5250 SoC. +Originally, it supported virtualization of CPU, timer, interrupt-controller, +and a UART-device only. Since then, it received several extensions like +support for 64-bit ARMv8 systems, VirtIO devices for network, console, and +block access. With release 22.11, the VMM's I/O device access, RAM +consumption, and CPU count have come configurable. + +With the current release, we further enhance the VMM for ARM devices to +provide all the means necessary to become a useful virtualization solution for +interactive scenarios. + +[image mnt_interactive_debian_vm] + Sculpt OS running Debian in a virtual machine on the MNT Reform laptop + +Two additional VirtIO device models are available now: A GPU model and one for +input. Both models are mapped to Genode's GUI service under the hood. One can +extend the configuration of the VMM accordingly: + +! +! +! +! ... +! + +For now, only one GPU and one input device can be declared. Both devices get +mapped to the very same GUI service, according to the service routing of the +VMM. + +Caution: the GPU and input model are still in an experimental state, and there +are known corner cases, e.g., when the graphical window size of the VMM gets +changed dynamically. + +Formerly, the VMM always expected an initial RAM file system to be provided as +ROM dataspace, which got loaded together with the Linux kernel into the VM's +memory. Now, it is possible to omit the "initrd_rom" configuration option. +If omitted, no initrd is provided to the Linux guest. + + +Custom IP block for DMA protection on AMD/Xilinx Zynq +##################################################### + +As a continuation of the hardware-software co-design efforts presented in the +[https://genode.org/documentation/release-notes/22.11#Hardware-software_co-design_with_Genode_on_Xilinx_Zynq - previous release], +we turned towards enabling bulk-data transfer between the Zynq's CPU and its +FPGA. In a first step, we built a custom hardware design that implements a DMA +loopback device based on Xilinx' AXI DMA IP. Since we were particularly +interested in testing out the Zynq's accelerator coherency port (ACP), we +implemented two loopback devices: one attached to the ACP and one to the +high-performance (HP) AXI port of the Zynq. In order to test the design in +Genode, we added a port of Xilinx' embeddedsw repository that hosts standalone +driver code for the Xilinx IP cores. Based on this port, we implemented the +xilinx_axidma library as a Genode wrapper in order to simplify development of +custom drivers using Xilinx' AXI DMA IP. A newly written test component takes +throughput measurements for varying transfer sizes. A more detailed account of +this story is published in an +[https://www.hackster.io/johannes-schlatow/using-axi-dma-on-genode-6482d2 - article on hackster.io]. + +Knowing that DMA bypasses any memory protection on the Zynq as it does not +feature an IOMMU, we further spent some development efforts on implementing a +custom IP block, called DMA Guard, for protecting against unintended DMA +transfers from/to the FPGA. The DMA Guard is configured with a limited set of +address ranges for which DMA transfers will be granted. Any out-of-range +transfer will be denied. The configuration of the DMA Guard is conducted by +the Zynq's platform driver based on the allocated DMA buffers. For the time +being, we applied several changes to the platform driver. These modifications +are currently hosted in the genode-zynq repository but are going to find their +way into the generic platform driver for the next release. + +If you are interested in more details about the DMA Guard's development, keep +watching our [https://www.hackster.io/genode - hackster.io channel] where we +will put out a new article concerning this matter very soon. + + +Base framework and OS-level infrastructure +########################################## + +VFS optimization and simplification +=================================== + +For regular applications executed on Genode, input and output involves the +virtual file system (VFS). In contrast to traditional monolithic operating +systems (which host the VFS in the kernel) or traditional microkernel-based +operating systems (which host the VFS in a dedicated server component), +Genode's VFS has the form of a library, giving each component an individual +virtual file system. The feature set of the VFS library is not fixed +but extensible by so-called VFS plugins that come in the form of optional +shared libraries. These plugins can implement new file-system types, but also +expose other I/O facilities as pseudo files. For example, TCP/IP stacks like +lwIP and lxIP (IP stack ported from Linux) have the form of VFS plugins. +The extensibility of the VFS gives us extreme flexibility without compromising +Genode's simplicity. + +On the other hand, the pervasiveness of the VFS - being embedded in Genode's C +runtime - puts it on the performance-critical path whenever application I/O is +involved. The ever-growing sophistication of application workloads like +running a Chromium-based web browser on the PinePhone puts merciless pressure +on the VFS, which motivated the following I/O-throughput optimizations. + +Even though the VFS and various VFS plugins work asynchronously, the batching +of I/O operations is not consistently effective across different kernels. It +particularly depends on the kernel's scheduling decision upon the delivery of +asynchronous notifications. Kernels that eagerly switch to the signal receiver +may thereby prevent the batching of consecutive write operations. We could +observe variances of more than an order of magnitude of TCP throughput, +depending on the used kernel. In the worst case, when executing a kernel that +eagerly schedules the recipient of each asynchronous notification, the +application performance is largely dominated by context-switching costs. + +Based on these observations, we concluded that the influence of the kernel's +scheduler should better be mitigated by scheduling asynchronous notifications +less eagerly at the application level. By waking up a remote peer not before +the application stalls for I/O, all scheduled operations would appear at the +remote side as one batch. + +The implementation of this idea required a slight redesign of the VFS, +replacing the former implicit wakeup of remote peers by explicit wakeup +signalling. The wakeup signalling is triggered not before the VFS user settles +down. E.g., for libc-based applications, this is the case when the libc goes +idle, waiting for external I/O. In the case of a busy writer to a non-blocking +file descriptor or socket (e.g., lighttpd), the remote peers are woken up once +a write operation yields an out-count of 0. The deferring of wakeup signals is +accommodated by the new 'Remote_io' mechanism (_vfs/remote_io.h_) that is +designated to be used by all VFS plugins that interact with asynchronous +Genode services for I/O. + +Combined with additional adjustments of I/O buffer sizes - like the request +queue of the file-system session, the TCP send buffer of the lwIP stack, or +the packet buffer of the NIC session - the VFS optimization almost eliminated +the variance of the I/O throughput among the different kernels and generally +improved the performance. On kernels that suffered most from the eager context +switching, netperf +[https://github.com/genodelabs/genode/issues/4697#issuecomment-1342542399 - shows a 10x] +improvement. But even on kernels with more balanced scheduling, the effect is +impressive. + +While we were at it, and since this structural change affected all VFS plugins +and users anyway, we took the opportunity to simplify and modernize other +aspects of the VFS-related code as well. + +In particular, the new interface 'Vfs::Env::User' replaces the former +'Vfs::Io_response_handler'. In contrast to the 'Io_response_handler', which +had to be called on a 'Vfs_handle', the new interface does not require any +specific handle. It is merely meant to prompt the VFS user (like the libc) to +re-attempt stalled I/O operations but it does not provide any immediate hint +about which of the handles have become ready for reading/writing. This +decoupling led to welcome simplifications of asynchronously working VFS +plugins. + +Furthermore, we removed the 'file_size' type from read/write interfaces. The +former C-style pair of (pointer, size) arguments to those operations have been +replaced by 'Byte_range_ptr' and 'Const_byte_range_ptr' argument types, which +make the code safer and easier to follow. Also, the VFS utilities offered by +_os/vfs.h_ benefit from this safety improvement. + + +GPU performance optimizations +============================= + +Session interface changes +------------------------- + +The GPU session interface was originally developed along the first version of +our GPU multiplexer for Intel devices. For this reason, the interface +contained Intel specific nomenclature, like GTT and PPGTT for memory map and +unmap operations. With the introduction of new GPU drivers with different +architectures (e.g., Mali and Vivante), the Intel specifics should have gone +away. With the current Genode release, we streamlined the map and unmap +functions to semantically be more correct on all supported hardware. There are +two map functions now: First, _map_cpu_ which maps GPU graphics memory to be +accessed by the CPU. And second, _map_gpu_ which establishes a mapping of +graphics memory within the GPU. + +Additionally, we removed the concept of buffers (as used by Mesa and Linux +drivers) to manage graphics memory and replaced it by the notion of video +memory (VRAM) where VRAM stands for the actual graphics memory used by a GPU - +may it be dedicated on-card memory or system RAM. The change makes it possible +to separate the graphics-memory management from the buffer management as +required by the Mesa library. + + +Intel graphics +-------------- + +When porting 3D applications using Mesa's OpenGL, we found that Mesa allocates +and frees a lot of small GPU buffer objects (data in GPU memory) during +operation. This is sub optimal for component-based systems because the Mesa +library has to perform an RPC to the GPU multiplexer for each buffer +allocation and for each buffer mapping. As mentioned above, we changed the +session semantics from buffer object to video memory and implemented this +feature within Intel's GPU multiplexer, which now only hands out VRAM. This +made it possible to move the buffer handling completely to the Mesa client +side (libdrm). Libdrm now allocates large chunks of video memory (i.e., 16MB) +and hands out memory for buffer objects from this pool. This brings two +advantages: First, the client-side VRAM pool acts as cache, which reduces the +number of RPCs required for memory management significantly. Second, because +of the larger VRAM allocations (compared to many 4K or 16K allocations before) +fewer capabilities for the actual dataspaces that back the memory are +required. Measurements showed that almost an order of magnitude of +capabilities can be saved at Mesa or the client side this way. + + +Mali graphics +------------- + +The 22.08 release introduced a +[https://genode.org/documentation/release-notes/22.08#GPU_and_Mesa_driver_for_Mali-400 - driver] +for the GPU found in the PinePhone. Since it was merely a rapid prototype, it +was limited to one client at a time, and was normally started and stopped +together with its client. With this release, we remedied these limitations and +enabled support for multiple concurrent clients and also revised our libdrm +backend for Mesa's Lima driver. + +We have not yet explored applying the same VRAM optimizations that are employed +by our Intel graphics stack. One VRAM allocation still correlates to one +buffer-object. + + +More flexible ACPI-event handling +================================= + +The _acpica_ component uses the Intel ACPICA library to parse and interpret +ACPI tables and AML code. One designated feature is the monitoring of several +ACPI event sources including optional reporting of information about state +changes. The supported event sources are: + +* Lid, which can be open or closed +* Smart battery (SB), information about battery parameters (e.g., capacity) + and charging/discharging status +* ACPI fixed events, e.g., power buttons +* AC adapters, which reflect power cable plug/unplug +* Embedded controller (EC), events like Fn-* keys, Lid, AC, SB changes +* Vendor-specific hardware events, e.g., Fujitsu FUJ02E3 key events + +Acpica optionally reports information about state changes. These reports can +be monitored by other components as ROMs. The following configuration +illustrates the feature: + +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! ... +! +! + +One such ACPI monitor component is _acpi_event_ that maps ACPI events to key +events of a requested Event session based on its configuration. This way, ACPI +state changes can be processed like ordinary key press-release events via, for +example, the _event_filter_. The following configuration illustrates how to +map the ACPI event types to key events: + +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! ... +! +! + +In the current release, we replaced the limited list of supported key names by +a general mechanism, which supports the use of all key names declared in +_repos/os/include/input/keycodes.h_. + + +Base API changes +================ + +As part of our continuous motive to streamline and simplify the framework's +base API as much as possible, the current release removes the interfaces +_base/blocking.h_, _base/debug.h_, and _base/lock_guard.h_ as those headers +contained parts of the API that have become obsolete by now. As a further +minor change, the 'abs' function of _util/misc_math.h_ got removed. + +The string utilities _util/string.h_ received the new 'Const_byte_range_ptr' +type complementing the existing 'Byte_range_ptr'. Both types are designated +for passing arguments that refer to a byte buffer, e.g., the source buffer of +a write operation. + + +On-target system-update and rollback mechanism +############################################## + +For the mobile version of Sculpt OS as covered in +Section [First system image of mobile Sculpt OS (PinePhone)], +we envisioned easy-to-use system updates that would enable us to quickly +iterate based on the feedback of early field testers. + +This topic confronted us with a variety of concerns. Just to name a few, +conventions for booting that would not require changes in the future, +equipping (system) images with self-reflecting version information, tools for +generating and publishing digitally-signed images, on-target discovery of new +image versions, secure downloading and cryptographic checking of new images, +directing the machine's boot loader to use the new version, and possibly +reverting to an earlier version. + +Fortunately, most of these concerns have a lot in common with the problems +we had to address for Genode's +[https://genode.org/documentation/release-notes/18.02#On-target_package_installation_and_deployment - package management]. +For example, the off-target and on-target tooling for digital signatures, +the notion of a depot, and the concept of federated software providers +(depot users) are established and time-tested by now. + + +Self-reflecting version information +----------------------------------- + +To allow a running Sculpt system to know its own version, the sculpt.run +script generates an artificial boot module named "build_info", which can be +evaluated at runtime by the sculpt-manager component. + +! + + +Formalism for generating images and image metadata +-------------------------------------------------- + +To enable the Sculpt system to easily detect new versions, system images must +be accompanied by metadata discoverable at a known location. This information +is provided by a so-called image-index file located at +_depot//image/index_. The image index of a depot user lists the +available images in XML form, e.g., + +! +! +! +! +! ... +! + +The 'os', 'board', and 'version' attributes can be used to infer the file name +of the corresponding image file. The '' nodes contain a summary of +changes as information for the end user. + +The new _gems/run/sculpt_image.run_ script provides assistance with generating +appropriately named images, placing them into the depot, and presenting a +template for the manually curated image index. + + +Signing and publishing +---------------------- + +For signing and publishing system images and image indices, we extended the +existing _tool/depot/publish_ tool. To publish a new version of an image +index: + +! ./tool/depot/publish /image/index + +Each system image comes in two forms, a bootable disk image and an archive of +the boot directory. The bootable disk image can be used to install a new +system from scratch by copying the image directly to a block device. It +contains raw block data. The archive of the boot directory contains the +content needed for an on-target system update to this version. Within the +depot, this archive has the form of a directory - named after the image - that +contains the designated content of the boot directory on target. Depending on +the board, it may contain only a single file loaded by the boot loader (e.g., +uImage), or several boot modules, or even the boot-loader configuration. The +following command publishes both forms: + +! ./tool/depot/publish /image/ + +This results in the following - accompanied by their respective .sig +files - in the public directory: + +! /image/.img.xz (disk image) +! /image/.tar.xz (boot archive) +! /image/.zip (disk image) + +The .zip file contains the .img file. It is provided for users who download +the image on a system with no support for .xz. + + +On-target image discovery, download, and verification +----------------------------------------------------- + +To enable a running Sculpt system to fetch image index files and images, the +existing depot-download component accepts the following two new download +types: + +! +! + +Internally, the depot-download subsystem employs the depot-query component to +determine the missing depot content. This component accepts the following two +new queries: + +! +! + +If present in the query, depot_query generates reports labeled as "images" and +"image_index" respectively. These reports are picked up by the depot-download +component to track the completion of each job. The reported information is +also used by the system updater to get hold of the images that are ready to +install. + + +On-target image installation and rollback +----------------------------------------- + +Once downloaded into the local depot of a Sculpt system, the content of the +boot directory for a given image version is readily available, e.g., + +! depot/nfeske/image/sculpt-pinephone-2023-02-02/uImage + +The installation comes down to copying this content to the _/boot/_ directory. +On the next reboot, the new image is executed. + +When subsequently downloading new image versions, the old versions stay +available in the depot as sibling directories. This allows for an easy +rollback by copying the boot content of an old version to the _/boot/_ +directory. + + +Device drivers +############## + +NXP i.MX Ethernet & USB +======================= + +The Ethernet driver for i.MX53, i.MX6, and i.MX7 got updated to use a more +recent Linux kernel version (5.11). These drivers got aligned with the +source-code base originally ported for the i.MX8 SoC. + +Using the recent approach to port Linux device drivers, trying to preserve the +original semantic, it is necessary to provide the correct clock rates to the +driver. Therefore, specific platform drivers for i.MX6 and i.MX7 were created +that enable the network related clocks and export their rate values. +The i.MX53 related platform driver got extended to support these clocks. + +The USB host-controller driver for the i.MX 8MQ EVK is now able to drive the +USB-C connector of this board too. + + +Realtek Wifi +============ + +As a welcoming side effect of switching to the new DDE-Linux approach, +enabling other drivers that are part of the same subsystem has become less +involved. In the past, we mostly focused on getting wireless devices supported +by the iwlwifi driver to work as those are the devices predominantly found in +commodity laptops. That being said, every now and then, one comes across a +different vendor and especially with the shifting focus on ARM-based systems +covering those as well became necessary. + +As a first experiment, we enabled the rtlwifi driver that provides support +for Realtek-based wireless devices. Due to lacking access to other hardware, +the driver has been so far tested only with a specific RTL8188EE based device +(10ec:8179 rev 01). Of course, some trade-offs were made as power-management +is currently not available. But getting it to work, nevertheless, took barely +half a day of work, which is promising. + + +Platforms +######### + +Base-HW microkernel +=================== + +Cache-maintenance optimization +------------------------------ + +On ARM systems, the memory view on instructions and data of the CPUs, as well +as between CPUs and other devices is not necessarily consistent. When dealing +with DMA transfers of devices, developers of related drivers need to ensure +that corresponding cache lines are cleaned before a DMA transfer gets +acknowledged. When dealing with just-in-time compilation, where instructions +are generated on demand, the data and instruction caches have to be aligned +too. + +Until now, the base-API functions for such cache-maintenance operations were +mapped to kernel system calls specific to base-hw. Only the kernel was allowed +to execute cache maintenance related instructions. On ARMv8 however, it is +possible to allow unprivileged components to execute most of these +instructions. + +With this release, we have implemented the cache maintenance functions outside +the kernel on ARMv8 where possible. Thereby, several device drivers with a lot +of DMA transactions, e.g. the GPU driver, benefit from this optimization +enormously. The JavaScript engine used in the Morph and Falkon browsers +profits as well. + + +ACPI suspend & resume +--------------------- + +In the previous release, we started to support the low-level +[https://genode.org/documentation/release-notes/22.11#Low-level_mechanism_for_suspend_resume_on_PC_platforms - ACPI suspend and resume] +mechanism with Genode for the NOVA kernel. With the current release, we added +the required low-level support to Genode's base-hw kernel for x86 64bit +platforms. Similar to the base-nova version, on base-hw the +'Pd::managing_system' RPC function of Genode's core roottask is used to +transfer the required ACPI values representing the S3 sleep state to the +kernel. The kernel then takes care to halt all CPUs and flush its state to +memory, before finally suspending the PC using the ACPI mechanism. On resume, +the kernel re-initializes necessary hardware used by the kernel, e.g., all +CPUs, interrupt controller, timer device, and serial device. One can test +drive the new feature using the _run/acpi_suspend_ scenario introduced by the +former release. + + +Scheduling improvements for interactive workloads +------------------------------------------------- + +As Genode conquers the PinePhone, the base-hw kernel, for the first time, has +to perform real-life multimedia on a daily basis given a resource-limited +mobile target. One particularly important and ambitious use case has become +video conferencing in the Morph browser. A combination of an already demanding +browser engine with an application that not only streams video and audio in +both directions over network but also handles video and audio I/O at the +device, and all that fluently and at the same time. + +A lot of thinking went into how to optimize this scenario on each level of +abstraction and one rather low-level lever was the scheduling scheme of the +base-hw kernel. The base-hw scheduling scheme consists of a combination of +absolute priority bands with execution-time quotas that prevent higher +prioritized subjects from starving lower ones. There is the notion of a super +period and each subject owns only a fraction of that super period as quota +together with its priority. Once a subject has depleted its quota, it can't +use its priority until the end of the current super period where its quota +will be re-filled. However, during that time, the subject is not blocked - It +can become active whenever there is no subject with priority and remaining +quota present. + +So, this "zero" band below all the priority bands temporarily accommodates all +subjects that have a priority but that are out of quota. It contains, however, +also subjects that have no priority in general. These might be tasks like a GCC +compilation or a ray tracer. While prioritized tasks would be user input +handlers or the display driver. Now, one difficult problem that arises with +this scheduling scheme is that system integration has to decide how much quota +is required by a prioritized task. The perfect value can't be determined as it +depends on many factors including the target platform. Therefore, we have to +consider that an important task like the audio driver in the video-conference +scenario runs out of quota shortly before finishing its work. + +This is already bad as is as the audio driver now has to share the CPU with +many unimportant tasks until the next super period. But it became even worse +because, in the past implementation, subjects always entered the zero band at +the tail position. It meant that, e.g., the remaining audio handling had to +wait at least until all the unprioritized tasks (e.g. long-taking computations) +had used up their zero-band time slice. In order to mitigate this situation, we +decided that prioritized tasks when depleting their quota become head of the +zero-band, so, they will be scheduled first whenever the higher bands become +idle. + +This change relaxes the consequences of quota-depletion events for +time-critical tasks in a typical system with many unprioritized tasks. +At the same time, it should not have a significant impact on the overall +schedule because depletion events are rare and zero-band time-slices short. + + +NOVA microhypervisor +==================== + +ACPI suspend & resume +--------------------- + +As an extension to the principal +[https://genode.org/documentation/release-notes/22.11#Low-level_mechanism_for_suspend_resume_on_PC_platforms - ACPI suspend and resume] +support introduced with the Genode 22.11 release, the NOVA kernel now supports +also the re-enablement of the IOMMU after ACPI resume. The IOMMU as a hardware +feature has been supported by Genode since +[https://genode.org/documentation/release-notes/13.02#DMA_protection_via_IOMMU - release 13.02] +and extended in +[https://genode.org/documentation/release-notes/20.11#NOVA_microhypervisor - release 20.11], +which sandboxed device hardware and (malicious/faulty) drivers to avoid +arbitrary DMA transactions. + +Intel P/E cores +--------------- + +Starting with [https://en.wikipedia.org/wiki/Intel_Core#12th_generation - Intel CPU generation 12], +Intel introduced CPUs with heterogeneous cores, similar to +[https://en.wikipedia.org/wiki/ARM_big.LITTLE - ARM's big/LITTLE] concept. +The new CPUs have a number of so called P-cores (performance) and E-cores +(efficient), which differ in their performance and power characteristics. +The CPU cores +([https://en.wikipedia.org/wiki/Alder_Lake#CPUID_incoherence - should be]) +instruction compatible and are reported as identical via x86's CPUID +instruction nowadays. However, an operating system such as Genode must be able +to differentiate the cores in order to take informed decisions about the +placement and scheduling of Genode components. + +With the current release, we added support to the NOVA kernel to propagate the +information about P/E cores to Genode's 'core' roottask. In Genode's core, +this information is used to group the CPU cores into Genode's +[https://genode.org/documentation/release-notes/13.08#Management_of_CPU_affinities - affinity space]. +With +[https://genode.org/documentation/release-notes/20.05#NOVA_microhypervisor - release 20.05], +we introduced the grouping of hyperthreads on the y-axis, which we keep in +case the P-cores have the feature enabled. Following the P-cores and +hyperthreads, all remaining E-cores are placed in the affinity space. + +The following examples showcase the grouping in the affinity-space on x/y axis: + +Core i7 1270P - 4 P-cores (hyperthreading enabled) and 8 E-cores: + +! x-axis 1 2 3 4 5 6 7 8 +! ---------------------------------- +! y-axis 1 | P\ P\ P\ P\ E E E E +! 2 | P/ P/ P/ P/ E E E E +! +! hyperthreads \ / of same core + +Core i7 1280P - 6 P-cores (hyperthreading enabled) and 8 E-cores: + +! x-axis 1 2 3 4 5 6 7 8 9 10 +! ----------------------------------------- +! y-axis 1 | P\ P\ P\ P\ P\ P\ E E E E +! 2 | P/ P/ P/ P/ P/ P/ E E E E +! +! hyperthreads \ / of same core + +The information about the P/E cores is visible in the kernel and Genode's +log output and is reported in the 'platform_info' ROM, e.g. + +! kernel: +! +! [ 0] CORE:00:00:0 6:9a:3:7 [415] P 12th Gen Intel(R) Core(TM) i7-1270P +! ... +! [15] CORE:00:17:0 6:9a:3:7 [415] E 12th Gen Intel(R) Core(TM) i7-1270P +! ... + +! Genode's core: +! +! mapping: affinity space -> kernel cpu id - package:core:thread +! remap (0x0) -> 0 - 0: 0:0 P boot cpu +! remap (0x1) -> 1 - 0: 0:1 P +! remap (1x0) -> 2 - 0: 4:0 P +! remap (1x1) -> 3 - 0: 4:1 P +! remap (2x0) -> 4 - 0: 8:0 P +! remap (2x1) -> 5 - 0: 8:1 P +! remap (3x0) -> 6 - 0:12:0 P +! remap (3x1) -> 7 - 0:12:1 P +! remap (4x0) -> 8 - 0:16:0 E +! remap (4x1) -> 9 - 0:17:0 E +! remap (5x0) -> 10 - 0:18:0 E +! remap (5x1) -> 11 - 0:19:0 E +! remap (6x0) -> 12 - 0:20:0 E +! remap (6x1) -> 13 - 0:21:0 E +! remap (7x0) -> 14 - 0:22:0 E +! remap (7x1) -> 15 - 0:23:0 E +! ... + +! platform_info ROM: +! +! ... +! +! +! ... +! +! ... +! +! ... + + +Build system and tools +###################### + +Building and packaging CMake-based shared libraries (via Goa) +============================================================= + +The [https://github.com/nfeske/goa - Goa] tool streamlines the work of +cross-developing, testing, and publishing Genode application software +using commodity build tools like CMake. The tool is particularly suited for +porting existing 3rd-party software to Sculpt OS. + +Until recently, Goa was solely focused on applications whereas the porting of +3rd-party libraries required the use of the traditional approach of hand +crafting build rules for Genode's build system. This limitation of Goa got +lifted now. + +In the new version, a Goa project can host an _api_ file indicating that +the project is a library project. The file contains the list of headers that +comprise the library's public interface. The build artifact of a library +is declared in the _artifacts_ file and is expected to have the form +_.lib.so_. The ABI symbols of such a library must be listed +in the file _symbols/_. With these bits of information supplied +to Goa, the tool is able to build and publish both the library and the API as +depot archives - ready to use by Genode applications linking to the library. +The way how all those little pieces work together is best illustrated by the +accompanied +[https://github.com/nfeske/goa/tree/master/examples/cmake_library - example]. +For further details, please consult Goa's builtin documentation via 'goa help' +(overview of Goa's sub commands and files) and 'goa help api' (specifics of +the _api_ declaration file). + +When porting a library to Genode, one manual step remains, which is the +declaration of the ABI symbols exported by the library. The new sub command +'goa extract-abi-symbols' eases this manual step. It automatically generates a +template for the _symbols/_ file from the library's built shared +object. Note, however, that the generated symbols file is expected to be +manually reviewed and tidied up, e.g., by removing library-internal symbols. + +_Thanks to Pirmin Duss for having contributed this welcomed new feature, which_ +_makes Goa much more versatile!_ + + +New tool for querying metadata of ports +======================================= + +The integration of third-party software into Genode is implemented via _ports_ +that specify how to retrieve, verify, and patch the source code in preparation +for use with our build system. Ports are managed by tools residing in the +_tool/ports_ directory. For example, _tool/ports/prepare_port_ is used to +execute all required preparation steps. + +Currently, the base Genode sources support 90 ports (you may try +_tool/ports/list_ yourself) and, thus, it's not trivial to keep track of all +the ports in the repo directories. Therefore, we introduce the +_tool/ports/metadata_ tool to extract information about license, upstream +version, and source URLs of individual ports. The tool can be used as follows: + +!./tool/ports/metadata virtualbox6 +! +!PORT: virtualbox6 +!LICENSE: GPLv2 +!VERSION: 6.1.26 +!SOURCE: http://download.virtualbox.org/virtualbox/6.1.26/VirtualBox-6.1.26.tar.bz2 (virtualbox) +!SOURCE: http://download.virtualbox.org/virtualbox/6.1.26/VirtualBoxSDK-6.1.26-145957.zip (virtualbox_sdk) + + +Harmonization of the boot concepts across ARM and PC platforms +============================================================== + +To make the system-update functionality covered in +Section [On-target system-update and rollback mechanism] equally usable across +PC and ARM platforms, the conventions of booting the platforms had to be +unified. + +Traditionally, a bootable disk image for the PC contains a _boot/_ directory. +E.g., when using NOVA it contains the GRUB boot-loader config + the hypervisor ++ the bender pre-boot loader + the banner image + the Genode system image. +This structure corresponds 1:1 to the _boot/_ directory as found on the 3rd +partition of the Sculpt system, which is very nice. A manual system update of +Sculpt comes down to replacing these files. However, on ARM platforms, SD-card +images used to host a _uImage_ file and a U-Boot environment configuration +file in the root directory. The distinction of these differences complicates +both the build-time tooling and the on-target handling of system updates. + +The current release unifies the boot convention by hosting a _boot/_ directory +on all platforms and reinforces the consistent naming of files. On ARM, the +_uImage_ and _uboot.env_ files now always reside under _boot/_. Thanks to this +uniform convention, Genode's new system update mechanism can now equally +expect that a system update corresponds to the mere replacement of the content +of the _boot/_ directory. + + +Minor run-tool changes +====================== + +The functionality of the _image/uboot_fit_ plugin has been integrated into the +regular _image/uboot_ plugin as both plugins were quite similar. +FIT images can now be produced by adding the run option '--image-uboot-fit'. + From f4cd47fa48ecfce7989bda7716fb40657e99e7ab Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 28 Feb 2023 14:49:44 +0100 Subject: [PATCH 0348/1921] News item for version 23.02 --- doc/news.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/doc/news.txt b/doc/news.txt index 58c2d90065..5060e1e06f 100644 --- a/doc/news.txt +++ b/doc/news.txt @@ -4,6 +4,43 @@ =========== +Genode OS Framework release 23.02 | 2023-02-28 +############################################## + +| Version 23.02 introduces system-update functionality to the mobile version +| of Sculpt OS, enhances our ARM VMM for interactive guest OSes, adds DMA +| protection to Xilinx Zynq via a custom IP core, extends suspend/resume +| support, and makes Intel's P&E cores explicitly manageable. + +For the first time, Genode has become easily installable on the PinePhone. +The first system image is not merely a re-targeted PC version of Sculpt OS but +it comes with a novel user interface, a new mechanism for rapidly switching +between different application scenarios, and system-update functionality. This +is everything we need to kick off the first public field test of Genode on the +phone. This line of development motivated plenty of optimizations - from +kernel scheduling, over the I/O throughput of the VFS, to the interfacing of +GPU drivers - that made it into version 23.02. + +Besides the focus on the phone, the release continues the hardware-software +co-design story of the previous version by adding DMA protection to Xilinx +Zynq SoCs using custom FPGA fabric, which is especially tailored for Genode. +But also stationary platforms like PCs and ARM laptops received attention. +On ARM, we enabled the use of interactive virtual machines by adding +device models for the GPU and input events. For the PC, the principle support +for suspend/resume has become available to Genode's custom microkernel in +addition to NOVA, and Genode learned to distinguish Intel's performance cores +from energy-efficient cores. + +Regarding application workloads, the new release is accompanied by a +substantially improved version of the Goa tool, which streamlines the +creation, packaging, and publishing of Genode components using commodity +build systems. With the new version, Goa largely automates the +porting of CMake-based 3rd-party libraries for Genode. + +Find these among many more topics covered by the official +[https:/documentation/release-notes/23.02 - release documentation of version 23.02...] + + Road Map for 2023 | 2023-01-17 ############################## From 57fcc7a25fa16b8acd94d3e79848386c4b3b21b6 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Tue, 28 Feb 2023 12:05:01 +0100 Subject: [PATCH 0349/1921] version: 23.02 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8b84b727be..5be0872313 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -22.11 +23.02 From caef7d642afd7c14e5a986d68fc2dd641b0b2c1c Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 23 Feb 2023 16:38:29 +0100 Subject: [PATCH 0350/1921] usb_block: enable WARN_STRICT_CONVERSION switch Implicitely fixes problems with USB devices having more than 4G blocks. Formerly the 16-Cmd LBA requests were silently casted to 32-bit. Fix genodelabs/genode#4771 --- repos/os/src/drivers/usb_block/cbw_csw.h | 9 ++-- repos/os/src/drivers/usb_block/main.cc | 56 +++++++++++++------- repos/os/src/drivers/usb_block/scsi.h | 67 ++++++++++-------------- repos/os/src/drivers/usb_block/target.mk | 2 - 4 files changed, 70 insertions(+), 64 deletions(-) diff --git a/repos/os/src/drivers/usb_block/cbw_csw.h b/repos/os/src/drivers/usb_block/cbw_csw.h index 6c87f2a5e1..59715cd2db 100644 --- a/repos/os/src/drivers/usb_block/cbw_csw.h +++ b/repos/os/src/drivers/usb_block/cbw_csw.h @@ -23,6 +23,7 @@ namespace Usb { using Genode::uint8_t; +using Genode::uint16_t; using Genode::uint32_t; using Genode::uint64_t; using Genode::size_t; @@ -161,7 +162,7 @@ struct Read_capacity_10 : Usb::Cbw, Scsi::Read_capacity_10 struct Read_10 : Usb::Cbw, Scsi::Read_10 { Read_10(addr_t addr, uint32_t tag, uint8_t lun, - uint32_t lba, uint32_t len, uint32_t block_size) + uint32_t lba, uint16_t len, uint32_t block_size) : Cbw(addr, tag, len * block_size, Usb::ENDPOINT_IN, lun, Scsi::Read_10::LENGTH), @@ -180,7 +181,7 @@ struct Read_10 : Usb::Cbw, Scsi::Read_10 struct Write_10 : Usb::Cbw, Scsi::Write_10 { Write_10(addr_t addr, uint32_t tag, uint8_t lun, - uint32_t lba, uint32_t len, uint32_t block_size) + uint32_t lba, uint16_t len, uint32_t block_size) : Cbw(addr, tag, len * block_size, Usb::ENDPOINT_OUT, lun, Scsi::Write_10::LENGTH), @@ -217,7 +218,7 @@ struct Read_capacity_16 : Usb::Cbw, Scsi::Read_capacity_16 struct Read_16 : Usb::Cbw, Scsi::Read_16 { Read_16(addr_t addr, uint32_t tag, uint8_t lun, - uint32_t lba, uint32_t len, uint32_t block_size) + uint64_t lba, uint32_t len, uint32_t block_size) : Cbw(addr, tag, len * block_size, Usb::ENDPOINT_IN, lun, Scsi::Read_16::LENGTH), @@ -236,7 +237,7 @@ struct Read_16 : Usb::Cbw, Scsi::Read_16 struct Write_16 : Usb::Cbw, Scsi::Write_16 { Write_16(addr_t addr, uint32_t tag, uint8_t lun, - uint32_t lba, uint32_t len, uint32_t block_size) + uint64_t lba, uint32_t len, uint32_t block_size) : Cbw(addr, tag, len * block_size, Usb::ENDPOINT_OUT, lun, Scsi::Write_16::LENGTH), diff --git a/repos/os/src/drivers/usb_block/main.cc b/repos/os/src/drivers/usb_block/main.cc index c1693d8992..bf7f4c3423 100644 --- a/repos/os/src/drivers/usb_block/main.cc +++ b/repos/os/src/drivers/usb_block/main.cc @@ -142,12 +142,15 @@ struct Usb::Block_driver : Usb::Completion return usb_label; } + enum Sizes : size_t { PACKET_STREAM_BUF_SIZE = 2 * (1UL << 20) }; + /* * USB session */ Allocator_avl alloc; Usb::Connection usb { env, &alloc, - get_label<128>(config.xml()).string(), 2 * (1<<20), state_change_dispatcher }; + get_label<128>(config.xml()).string(), PACKET_STREAM_BUF_SIZE, + state_change_dispatcher }; Usb::Device device; Signal_handler
&block_request_handler; @@ -161,7 +164,7 @@ struct Usb::Block_driver : Usb::Completion * Block session */ Block::sector_t _block_count { 0 }; - size_t _block_size { 0 }; + uint32_t _block_size { 0 }; bool _writeable = false; @@ -204,7 +207,7 @@ struct Usb::Block_driver : Usb::Completion uint8_t interface; Block::sector_t block_count = 0; - size_t block_size = 0; + uint32_t block_size = 0; char vendor[Scsi::Inquiry_response::Vid::ITEMS+1]; char product[Scsi::Inquiry_response::Pid::ITEMS+1]; @@ -328,8 +331,8 @@ struct Usb::Block_driver : Usb::Completion break; } - uint32_t const tag = csw.tag(); - uint8_t const status = csw.sts(); + uint32_t const tag = csw.tag(); + uint32_t const status = csw.sts(); if (status != Csw::PASSED) { error("CSW failed: ", Hex(status, Hex::PREFIX, Hex::PAD), " tag: ", tag); @@ -451,7 +454,7 @@ struct Usb::Block_driver : Usb::Completion /* cap value in case there is no bulk-only */ active_alt_setting = 0; - for (unsigned i = 0; i < iface.alternate_count(); i++) { + for (uint16_t i = 0; i < iface.alternate_count(); i++) { Alternate_interface &aif = iface.alternate_interface(i); if (aif.iclass == ICLASS_MASS_STORAGE && aif.isubclass == ISUBCLASS_SCSI @@ -480,7 +483,7 @@ struct Usb::Block_driver : Usb::Completion return false; } - for (int i = 0; i < alt_iface.num_endpoints; i++) { + for (uint8_t i = 0; i < alt_iface.num_endpoints; i++) { Endpoint ep = alt_iface.endpoint(i); if (!ep.bulk()) continue; @@ -617,9 +620,12 @@ struct Usb::Block_driver : Usb::Completion throw -1; } - if (init.block_count == 0x100000000) { + /** + * The READ_CAPACITY_10 count is 32-bit last() block + 1. + * If the maximum value is reached READ_CAPACITY_16 has to be used. + */ + if (init.block_count > ~(uint32_t)0U) { - /* capacity too large, try Scsi::Opcode::READ_CAPACITY_16 next */ Read_capacity_16 read_cap((addr_t)cbw_buffer, CAP_TAG, active_lun); init.read_capacity = false; @@ -789,7 +795,7 @@ struct Usb::Block_driver : Usb::Completion break; } - uint8_t const status = csw.sts(); + uint32_t const status = csw.sts(); if (status != Csw::PASSED) { error("CSW failed: ", Hex(status, Hex::PREFIX, Hex::PAD), " read: ", request->read(), " buffer: ", (void *)request->address, @@ -818,14 +824,13 @@ struct Usb::Block_driver : Usb::Completion { _writeable = node.attribute_value("writeable", false); _report_device = node.attribute_value("report", false); - active_interface = node.attribute_value("interface", 0UL); - active_lun = node.attribute_value("lun", 0UL); + active_interface = node.attribute_value("interface", 0); + active_lun = node.attribute_value("lun", 0); reset_device = node.attribute_value("reset_device", false); verbose_scsi = node.attribute_value("verbose_scsi", false); active_alt_setting = - node.attribute_value("alt_setting", - (unsigned long)INVALID_ALT_SETTING); + node.attribute_value("alt_setting", INVALID_ALT_SETTING); } /** @@ -862,13 +867,24 @@ struct Usb::Block_driver : Usb::Completion { uint32_t const t = new_tag(); + /** + * Assuming a minimal packet size of 512. Total packet stream buffer + * should not exceed 16-bit block count value. + */ + static_assert((PACKET_STREAM_BUF_SIZE / 512UL) < (uint16_t)~0UL); + uint16_t c = (uint16_t) count; + + /** + * We check for lba fitting 32-bit value for 10-Cmd mode + * before entering this function + */ char cb[Cbw::LENGTH]; if (read) { - if (force_cmd_16) Read_16 r((addr_t)cb, t, active_lun, lba, count, _block_size); - else Read_10 r((addr_t)cb, t, active_lun, lba, count, _block_size); + if (force_cmd_16) Read_16 r((addr_t)cb, t, active_lun, lba, c, _block_size); + else Read_10 r((addr_t)cb, t, active_lun, (uint32_t)lba, c, _block_size); } else { - if (force_cmd_16) Write_16 w((addr_t)cb, t, active_lun, lba, count, _block_size); - else Write_10 w((addr_t)cb, t, active_lun, lba, count, _block_size); + if (force_cmd_16) Write_16 w((addr_t)cb, t, active_lun, lba, c, _block_size); + else Write_10 w((addr_t)cb, t, active_lun, (uint32_t)lba, c, _block_size); } cbw(cb, *this); @@ -904,6 +920,10 @@ struct Usb::Block_driver : Usb::Completion if (last > info().block_count) return Response::REJECTED; + /* we only support 32-bit block numbers in 10-Cmd mode */ + if (!force_cmd_16 && last >= ~0U) + return Response::REJECTED; + /* check if request is pending */ if (request_pending()) return Response::RETRY; diff --git a/repos/os/src/drivers/usb_block/scsi.h b/repos/os/src/drivers/usb_block/scsi.h index c4510fc0d3..9d7e23b8e4 100644 --- a/repos/os/src/drivers/usb_block/scsi.h +++ b/repos/os/src/drivers/usb_block/scsi.h @@ -22,9 +22,20 @@ namespace Scsi { using namespace Genode; - uint16_t be16(uint16_t val); - uint32_t be32(uint32_t val); - uint64_t be64(uint64_t val); + /******************* + ** Endian helper ** + *******************/ + + template + T be(T val) + { + uint8_t * p = reinterpret_cast(&val); + T ret = 0; + for (size_t i = 0; i < sizeof(T); i++) + ret |= (T) (p[i] << ((sizeof(T)-i-1)*8)); + return ret; + } + /****************** * SCSI commands ** @@ -69,30 +80,6 @@ namespace Scsi { } -/******************* -** Endian helper ** -*******************/ - -Genode::uint16_t Scsi::be16(Genode::uint16_t val) -{ - Genode::uint8_t *p = reinterpret_cast(&val); - return (p[1]<<0)|(p[0]<<8); -} - -Genode::uint32_t Scsi::be32(Genode::uint32_t val) -{ - Genode::uint8_t *p = reinterpret_cast(&val); - return (p[3]<<0)|(p[2]<<8)|(p[1]<<16)|(p[0]<<24); -} - -Genode::uint64_t Scsi::be64(Genode::uint64_t val) -{ - Genode::uint8_t *p = reinterpret_cast(&val); - return ((((Genode::uint64_t)(p[3]<<0)|(p[2]<<8)|(p[1]<<16)|(p[0]<<24))<<32)| - (((Genode::uint32_t)(p[7]<<0)|(p[6]<<8)|(p[5]<<16)|(p[4]<<24)))); -} - - /*************************** * SCSI command responses ** ***************************/ @@ -189,8 +176,8 @@ struct Scsi::Capacity_response_10 : Genode::Mmio Capacity_response_10(addr_t addr) : Mmio(addr) { } - uint32_t last_block() const { return be32(read()); } - uint32_t block_size() const { return be32(read()); } + uint32_t last_block() const { return be(read()); } + uint32_t block_size() const { return be(read()); } void dump() { @@ -210,8 +197,8 @@ struct Scsi::Capacity_response_16 : Genode::Mmio Capacity_response_16(addr_t addr) : Mmio(addr) { } - uint64_t last_block() const { return be64(read()); } - uint32_t block_size() const { return be32(read()); } + uint64_t last_block() const { return be(read()); } + uint32_t block_size() const { return be(read()); } void dump() { @@ -239,7 +226,7 @@ struct Scsi::Cmd_6 : Genode::Mmio void dump() { Genode::log("Op: ", Genode::Hex(read())); - Genode::log("Lba: ", Genode::Hex(be16(read()))); + Genode::log("Lba: ", Genode::Hex(be(read()))); Genode::log("Len: ", read()); Genode::log("Ctl: ", Genode::Hex(read())); } @@ -327,8 +314,8 @@ struct Scsi::Cmd_10 : Genode::Mmio void dump() { Genode::log("Op: ", Genode::Hex(read())); - Genode::log("Lba: ", Genode::Hex(be32(read()))); - Genode::log("Len: ", be16(read())); + Genode::log("Lba: ", Genode::Hex(be(read()))); + Genode::log("Len: ", be(read())); Genode::log("Ctl: ", Genode::Hex(read())); } }; @@ -347,8 +334,8 @@ struct Scsi::Io_10 : Cmd_10 { Io_10(addr_t addr, uint32_t lba, uint16_t len) : Cmd_10(addr) { - write(be32(lba)); - write(be16(len)); + write(be(lba)); + write(be(len)); } }; @@ -388,8 +375,8 @@ struct Scsi::Cmd_16 : Genode::Mmio void dump() { Genode::log("Op: ", Genode::Hex(read())); - Genode::log("Lba: ", Genode::Hex(be64(read()))); - Genode::log("Len: ", be32(read())); + Genode::log("Lba: ", Genode::Hex(be(read()))); + Genode::log("Len: ", be(read())); Genode::log("Ctl: ", Genode::Hex(read())); } }; @@ -408,8 +395,8 @@ struct Scsi::Io_16 : Cmd_16 { Io_16(addr_t addr, uint64_t lba, uint32_t len) : Cmd_16(addr) { - write(be64(lba)); - write(be32(len)); + write(be(lba)); + write(be(len)); } }; diff --git a/repos/os/src/drivers/usb_block/target.mk b/repos/os/src/drivers/usb_block/target.mk index ba1d29725d..a0663d5c01 100644 --- a/repos/os/src/drivers/usb_block/target.mk +++ b/repos/os/src/drivers/usb_block/target.mk @@ -2,5 +2,3 @@ TARGET = usb_block_drv SRC_CC = main.cc INC_DIR = $(PRG_DIR) LIBS = base - -CC_CXX_WARN_STRICT_CONVERSION = From 98fa0a1ad2ea0001e03df0c6afb2db87ed14c4ec Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Thu, 2 Feb 2023 11:17:34 +0100 Subject: [PATCH 0351/1921] wifi: don't use kzalloc directly Avoid using wrong pointer when calling free_page() which causes otherwise memory corruption. --- repos/pc/src/lib/wifi/lx_emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/pc/src/lib/wifi/lx_emul.c b/repos/pc/src/lib/wifi/lx_emul.c index 499d7a9d75..ff54e1b507 100644 --- a/repos/pc/src/lib/wifi/lx_emul.c +++ b/repos/pc/src/lib/wifi/lx_emul.c @@ -326,7 +326,7 @@ void kfree_sensitive(const void *p) unsigned long get_zeroed_page(gfp_t gfp_mask) { - return (unsigned long)kzalloc(PAGE_SIZE, gfp_mask | __GFP_ZERO); + return (unsigned long)__alloc_pages(GFP_KERNEL, 0, 0, NULL)->virtual; } From 487aad6db11f1ee921680e292ac45d408bb7c2de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 16 Feb 2023 12:20:42 +0100 Subject: [PATCH 0352/1921] wifi: allow driver dump in error case This commit implements dummies that would otherwise trigger a 'generated dummy' call that stops the driver. --- repos/pc/src/lib/wifi/dummies.c | 9 +++++++++ repos/pc/src/lib/wifi/generated_dummies.c | 10 +--------- repos/pc/src/lib/wifi/lx_emul.c | 7 +++++++ 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/repos/pc/src/lib/wifi/dummies.c b/repos/pc/src/lib/wifi/dummies.c index 005fd51c38..18eb5f31f2 100644 --- a/repos/pc/src/lib/wifi/dummies.c +++ b/repos/pc/src/lib/wifi/dummies.c @@ -368,3 +368,12 @@ void pci_disable_device(struct pci_dev * dev) { lx_emul_trace(__func__); } + + +#include +#include <../net/mac80211/ieee80211_i.h> /* struct ieee80211_local */ + +void ieee80211_free_led_names(struct ieee80211_local * local) +{ + lx_emul_trace(__func__); +} diff --git a/repos/pc/src/lib/wifi/generated_dummies.c b/repos/pc/src/lib/wifi/generated_dummies.c index 384f9637a7..068746604a 100644 --- a/repos/pc/src/lib/wifi/generated_dummies.c +++ b/repos/pc/src/lib/wifi/generated_dummies.c @@ -1,7 +1,7 @@ /* * \brief Dummy definitions of Linux Kernel functions * \author Automatically generated file - do no edit - * \date 2022-07-29 + * \date 2023-02-28 */ #include @@ -702,14 +702,6 @@ int open_related_ns(struct ns_common * ns,struct ns_common * (* get_ns)(struct n enum reboot_mode panic_reboot_mode; -#include - -int pci_read_config_dword(const struct pci_dev * dev,int where,u32 * val) -{ - lx_emul_trace_and_stop(__func__); -} - - #include void pci_stop_and_remove_bus_device(struct pci_dev * dev) diff --git a/repos/pc/src/lib/wifi/lx_emul.c b/repos/pc/src/lib/wifi/lx_emul.c index ff54e1b507..91371d53ef 100644 --- a/repos/pc/src/lib/wifi/lx_emul.c +++ b/repos/pc/src/lib/wifi/lx_emul.c @@ -691,3 +691,10 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) return lx_emul_io_mem_map(phys_addr, size); } + + +int pci_read_config_dword(const struct pci_dev * dev,int where,u32 * val) +{ + *val = 0; + return 0; +} From 2e6dd010aea4b29b8491e8211747f3d9d850b8de Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Wed, 1 Mar 2023 16:29:05 +0100 Subject: [PATCH 0353/1921] core: introduce 'Core' namespace The namespace draws a clear line between the base library and the core component. It is declared at the new core-local header , which is expected to be included by all code of the core component. It is thereby a natural place for kernel-agnostic general types like commonly used C++ utilities. Fixes #4777 --- repos/base-fiasco/src/core/core_log_out.cc | 2 +- .../base-fiasco/src/core/include/ipc_pager.h | 4 +- .../base-fiasco/src/core/include/map_local.h | 2 +- repos/base-fiasco/src/core/include/platform.h | 4 +- .../src/core/include/platform_pd.h | 4 +- .../src/core/include/platform_thread.h | 4 +- .../src/core/include/rpc_cap_factory.h | 7 +- repos/base-fiasco/src/core/include/util.h | 5 +- .../src/core/io_mem_session_support.cc | 2 +- .../src/core/irq_session_component.cc | 3 +- repos/base-fiasco/src/core/pager.cc | 5 +- repos/base-fiasco/src/core/pager_object.cc | 2 +- repos/base-fiasco/src/core/platform.cc | 3 +- repos/base-fiasco/src/core/platform_pd.cc | 2 +- repos/base-fiasco/src/core/platform_thread.cc | 4 +- .../src/core/ram_dataspace_support.cc | 2 +- .../src/core/spec/x86/platform_x86.cc | 2 +- repos/base-fiasco/src/core/thread_start.cc | 2 +- .../src/include/base/internal/native_thread.h | 8 +-- repos/base-foc/src/core/core_log_out.cc | 2 +- .../base-foc/src/core/include/cap_id_alloc.h | 7 +- repos/base-foc/src/core/include/cap_index.h | 9 ++- repos/base-foc/src/core/include/cap_mapping.h | 5 +- repos/base-foc/src/core/include/ipc_pager.h | 6 +- repos/base-foc/src/core/include/irq_object.h | 11 +-- repos/base-foc/src/core/include/map_local.h | 2 +- .../src/core/include/native_cpu_component.h | 9 ++- .../include/pager_object_exception_state.h | 4 +- repos/base-foc/src/core/include/platform.h | 6 +- repos/base-foc/src/core/include/platform_pd.h | 4 +- .../src/core/include/platform_thread.h | 4 +- .../src/core/include/rpc_cap_factory.h | 7 +- repos/base-foc/src/core/include/util.h | 15 +++-- .../src/core/include/vm_session_component.h | 8 +-- .../src/core/io_mem_session_support.cc | 2 +- repos/base-foc/src/core/ipc_pager.cc | 3 +- .../src/core/irq_session_component.cc | 11 ++- .../base-foc/src/core/native_cpu_component.cc | 5 +- repos/base-foc/src/core/pager.cc | 6 +- repos/base-foc/src/core/pager_object.cc | 2 +- repos/base-foc/src/core/platform.cc | 5 +- repos/base-foc/src/core/platform_pd.cc | 2 +- repos/base-foc/src/core/platform_thread.cc | 4 +- .../src/core/ram_dataspace_support.cc | 4 +- repos/base-foc/src/core/rpc_cap_factory.cc | 2 +- .../src/core/signal_source_component.cc | 7 +- repos/base-foc/src/core/spec/arm/ipc_pager.cc | 2 +- .../src/core/spec/arm/platform_arm.cc | 2 +- .../src/core/spec/arm_64/ipc_pager.cc | 2 +- repos/base-foc/src/core/spec/x86/ipc_pager.cc | 2 +- repos/base-foc/src/core/spec/x86/platform.cc | 8 +-- .../src/core/spec/x86/platform_services.cc | 8 +-- .../src/core/spec/x86_32/ipc_pager.cc | 2 +- .../src/core/spec/x86_64/ipc_pager.cc | 2 +- repos/base-foc/src/core/thread_start.cc | 16 ++--- .../base-foc/src/core/vm_session_component.cc | 8 +-- repos/base-hw/src/bootstrap/platform.cc | 4 +- .../base-hw/src/core/board/imx53_qsb/board.h | 2 +- .../src/core/board/imx6q_sabrelite/board.h | 2 +- .../src/core/board/imx7d_sabre/board.h | 2 +- .../base-hw/src/core/board/nit6_solox/board.h | 2 +- repos/base-hw/src/core/board/pbxa9/board.h | 2 +- repos/base-hw/src/core/board/pc/board.h | 2 +- .../base-hw/src/core/board/usb_armory/board.h | 2 +- .../src/core/board/virt_qemu_arm_v7a/board.h | 10 +-- .../src/core/board/virt_qemu_arm_v8a/board.h | 6 -- .../base-hw/src/core/board/wand_quad/board.h | 2 +- repos/base-hw/src/core/core_log_out.cc | 4 +- repos/base-hw/src/core/core_region_map.cc | 3 +- repos/base-hw/src/core/cpu_session_support.cc | 2 +- repos/base-hw/src/core/cpu_thread_allocator.h | 5 +- .../src/core/io_mem_session_support.cc | 2 +- .../base-hw/src/core/irq_session_component.cc | 2 +- .../base-hw/src/core/irq_session_component.h | 7 +- repos/base-hw/src/core/kernel/cpu.h | 4 +- .../base-hw/src/core/kernel/cpu_scheduler.cc | 2 +- repos/base-hw/src/core/kernel/irq.h | 14 ++-- repos/base-hw/src/core/kernel/lock.cc | 2 +- repos/base-hw/src/core/kernel/main.cc | 32 +++------ repos/base-hw/src/core/kernel/main.h | 2 +- repos/base-hw/src/core/kernel/object.h | 2 +- repos/base-hw/src/core/kernel/pd.h | 23 +++---- .../base-hw/src/core/kernel/signal_receiver.h | 10 +-- repos/base-hw/src/core/kernel/thread.cc | 24 +++---- repos/base-hw/src/core/kernel/thread.h | 30 ++++----- repos/base-hw/src/core/kernel/timer.cc | 2 +- repos/base-hw/src/core/kernel/vm.h | 12 ++-- repos/base-hw/src/core/kernel_log.cc | 2 +- repos/base-hw/src/core/map_local.h | 4 +- repos/base-hw/src/core/native_pd_component.cc | 2 +- repos/base-hw/src/core/native_pd_component.h | 6 +- repos/base-hw/src/core/object.h | 29 ++++---- repos/base-hw/src/core/pager.cc | 5 +- repos/base-hw/src/core/pager.h | 18 ++--- repos/base-hw/src/core/platform.cc | 10 ++- repos/base-hw/src/core/platform.h | 8 +-- repos/base-hw/src/core/platform_pd.cc | 2 +- repos/base-hw/src/core/platform_pd.h | 43 ++++++------ repos/base-hw/src/core/platform_thread.cc | 4 +- repos/base-hw/src/core/platform_thread.h | 14 ++-- .../base-hw/src/core/ram_dataspace_support.cc | 5 +- repos/base-hw/src/core/region_map_support.cc | 10 +-- repos/base-hw/src/core/rpc_cap_factory.h | 10 ++- repos/base-hw/src/core/signal_broker.h | 6 +- .../src/core/signal_source_component.h | 16 ++--- .../core/spec/arm/cortex_a9_global_timer.cc | 2 +- repos/base-hw/src/core/spec/arm/cpu.cc | 10 +-- repos/base-hw/src/core/spec/arm/cpu_support.h | 6 +- .../src/core/spec/arm/generic_timer.cc | 2 +- repos/base-hw/src/core/spec/arm/gicv2.cc | 2 +- repos/base-hw/src/core/spec/arm/gicv3.cc | 4 +- repos/base-hw/src/core/spec/arm/imx_epit.cc | 2 +- repos/base-hw/src/core/spec/arm/imx_tzic.cc | 2 +- .../base-hw/src/core/spec/arm/kernel/lock.cc | 2 +- .../base-hw/src/core/spec/arm/kernel/panic.cc | 2 +- .../src/core/spec/arm/kernel/thread.cc | 2 +- .../src/core/spec/arm/kernel/thread_caches.cc | 10 +-- .../src/core/spec/arm/platform_support.cc | 4 +- .../src/core/spec/arm/trustzone_board.h | 6 +- .../src/core/spec/arm/virtualization/board.h | 4 +- .../src/core/spec/arm/virtualization/gicv2.cc | 4 +- .../src/core/spec/arm/virtualization/gicv2.h | 14 ++-- .../src/core/spec/arm/virtualization/gicv3.h | 18 +++-- .../arm/virtualization/platform_services.cc | 15 ++--- .../virtualization/vm_session_component.cc | 10 +-- repos/base-hw/src/core/spec/arm_v6/cpu.h | 13 ++-- .../src/core/spec/arm_v6/translation_table.h | 2 +- .../src/core/spec/arm_v7/cpu_support.h | 11 ++- .../arm_v7/trustzone/platform_services.cc | 10 +-- .../arm_v7/trustzone/vm_session_component.cc | 2 +- .../spec/arm_v7/virtualization/hypervisor.h | 5 +- .../spec/arm_v7/virtualization/kernel/vm.cc | 1 - repos/base-hw/src/core/spec/arm_v8/cpu.cc | 67 +++++++++---------- repos/base-hw/src/core/spec/arm_v8/cpu.h | 24 +++---- .../core/spec/arm_v8/pd_session_support.cc | 2 +- .../spec/arm_v8/virtualization/kernel/vm.cc | 1 - repos/base-hw/src/core/spec/cortex_a15/cpu.cc | 18 ++--- repos/base-hw/src/core/spec/cortex_a15/cpu.h | 8 +-- repos/base-hw/src/core/spec/cortex_a8/cpu.h | 4 +- .../core/spec/cortex_a8/translation_table.h | 4 +- .../base-hw/src/core/spec/cortex_a9/board.cc | 3 +- repos/base-hw/src/core/spec/cortex_a9/cpu.cc | 6 +- repos/base-hw/src/core/spec/cortex_a9/cpu.h | 6 +- repos/base-hw/src/core/spec/riscv/cpu.cc | 30 ++++----- repos/base-hw/src/core/spec/riscv/cpu.h | 14 ++-- .../src/core/spec/riscv/kernel/interface.cc | 1 - .../base-hw/src/core/spec/riscv/kernel/pd.cc | 2 +- .../src/core/spec/riscv/kernel/thread.cc | 6 +- repos/base-hw/src/core/spec/riscv/pic.cc | 3 +- .../src/core/spec/riscv/platform_support.cc | 4 +- repos/base-hw/src/core/spec/riscv/timer.cc | 2 +- repos/base-hw/src/core/spec/riscv/timer.h | 2 + .../spec/x86_64/address_space_id_allocator.h | 5 +- .../src/core/spec/x86_64/bios_data_area.cc | 2 +- repos/base-hw/src/core/spec/x86_64/cpu.cc | 46 ++++++------- repos/base-hw/src/core/spec/x86_64/cpu.h | 11 ++- .../src/core/spec/x86_64/kernel/thread.cc | 4 +- .../core/spec/x86_64/pd_session_support.cc | 2 +- repos/base-hw/src/core/spec/x86_64/pic.cc | 2 +- repos/base-hw/src/core/spec/x86_64/pit.cc | 2 +- .../src/core/spec/x86_64/platform_support.cc | 6 +- .../spec/x86_64/platform_support_common.cc | 2 +- repos/base-hw/src/core/spec/x86_64/port_io.h | 5 +- repos/base-hw/src/core/thread_start.cc | 22 +++--- repos/base-hw/src/core/util.h | 4 +- .../base-hw/src/core/vm_session_component.cc | 9 ++- repos/base-hw/src/core/vm_session_component.h | 8 +-- .../src/include/base/internal/native_thread.h | 10 +-- .../base-hw/src/test/cpu_scheduler/target.mk | 2 + repos/base-linux/src/core/core_log_out.cc | 2 +- .../base-linux/src/core/core_rpc_cap_alloc.cc | 5 +- .../src/core/include/core_region_map.h | 7 +- .../src/core/include/dataspace_component.h | 12 ++-- .../core/include/io_mem_session_component.h | 4 +- .../base-linux/src/core/include/irq_object.h | 8 ++- .../src/core/include/irq_session_component.h | 9 ++- .../src/core/include/native_cpu_component.h | 10 ++- .../src/core/include/native_pd_component.h | 10 ++- repos/base-linux/src/core/include/pager.h | 11 +-- repos/base-linux/src/core/include/platform.h | 4 +- .../base-linux/src/core/include/platform_pd.h | 9 ++- .../src/core/include/platform_thread.h | 4 +- .../src/core/include/region_map_component.h | 9 +-- .../src/core/include/rpc_cap_factory.h | 9 ++- repos/base-linux/src/core/include/util.h | 3 + .../src/core/native_cpu_component.cc | 4 +- .../src/core/native_pd_component.cc | 9 ++- repos/base-linux/src/core/platform.cc | 2 +- repos/base-linux/src/core/platform_thread.cc | 9 ++- .../src/core/ram_dataspace_support.cc | 2 +- .../src/core/rom_session_component.cc | 2 +- .../src/core/rpc_cap_factory_linux.cc | 2 +- .../core/spec/linux/dataspace_component.cc | 4 +- .../spec/linux/io_mem_session_component.cc | 5 +- .../spec/linux/io_port_session_component.cc | 2 +- .../core/spec/linux/irq_session_component.cc | 5 +- .../src/core/spec/linux/platform_services.cc | 8 +-- .../src/core/spec/pc/dataspace_component.cc | 10 +-- .../core/spec/pc/io_mem_session_component.cc | 5 +- .../core/spec/pc/io_port_session_component.cc | 2 +- .../src/core/spec/pc/irq_session_component.cc | 5 +- .../src/core/spec/pc/platform_services.cc | 11 +-- repos/base-nova/src/core/core_log_out.cc | 2 +- repos/base-nova/src/core/core_region_map.cc | 6 +- .../base-nova/src/core/core_rpc_cap_alloc.cc | 4 +- repos/base-nova/src/core/include/ipc_pager.h | 22 +++--- repos/base-nova/src/core/include/irq_object.h | 7 +- repos/base-nova/src/core/include/map_local.h | 2 +- .../src/core/include/native_cpu_component.h | 9 ++- .../src/core/include/native_pd_component.h | 6 +- repos/base-nova/src/core/include/nova_util.h | 17 +++-- repos/base-nova/src/core/include/pager.h | 16 +++-- repos/base-nova/src/core/include/platform.h | 4 +- .../base-nova/src/core/include/platform_pd.h | 4 +- .../src/core/include/platform_thread.h | 4 +- .../src/core/include/rpc_cap_factory.h | 10 +-- .../src/core/include/signal_broker.h | 6 +- .../core/include/signal_source_component.h | 11 +-- repos/base-nova/src/core/include/util.h | 3 +- .../src/core/include/vm_session_component.h | 7 +- .../src/core/io_mem_session_support.cc | 3 +- repos/base-nova/src/core/ipc_pager.cc | 5 +- .../src/core/irq_session_component.cc | 5 +- .../src/core/native_cpu_component.cc | 9 +-- .../base-nova/src/core/native_pd_component.cc | 5 +- repos/base-nova/src/core/pager.cc | 4 +- .../base-nova/src/core/pd_session_support.cc | 4 +- repos/base-nova/src/core/platform.cc | 6 +- repos/base-nova/src/core/platform_pd.cc | 10 +-- repos/base-nova/src/core/platform_services.cc | 8 +-- repos/base-nova/src/core/platform_thread.cc | 5 +- .../src/core/ram_dataspace_support.cc | 2 +- repos/base-nova/src/core/rpc_cap_factory.cc | 4 +- repos/base-nova/src/core/spec/x86_32/pager.cc | 4 +- repos/base-nova/src/core/spec/x86_64/pager.cc | 4 +- repos/base-nova/src/core/thread_start.cc | 17 +++-- .../src/core/vm_session_component.cc | 8 +-- repos/base-okl4/src/core/core_log_out.cc | 2 +- repos/base-okl4/src/core/core_region_map.cc | 2 +- repos/base-okl4/src/core/include/ipc_pager.h | 6 +- repos/base-okl4/src/core/include/map_local.h | 5 +- repos/base-okl4/src/core/include/platform.h | 4 +- .../base-okl4/src/core/include/platform_pd.h | 4 +- .../src/core/include/platform_thread.h | 4 +- .../src/core/include/rpc_cap_factory.h | 8 ++- repos/base-okl4/src/core/include/util.h | 7 +- .../src/core/io_mem_session_support.cc | 2 +- .../src/core/irq_session_component.cc | 7 +- repos/base-okl4/src/core/pager.cc | 5 +- repos/base-okl4/src/core/pager_object.cc | 2 +- repos/base-okl4/src/core/platform.cc | 3 +- repos/base-okl4/src/core/platform_pd.cc | 6 +- repos/base-okl4/src/core/platform_thread.cc | 4 +- .../src/core/ram_dataspace_support.cc | 2 +- .../src/core/spec/x86/platform_thread_x86.cc | 2 +- repos/base-okl4/src/core/thread_start.cc | 8 +-- .../src/include/base/internal/native_thread.h | 9 ++- repos/base-pistachio/src/core/core_log_out.cc | 2 +- .../src/core/include/ipc_pager.h | 8 +-- .../src/core/include/map_local.h | 2 +- .../src/core/include/platform.h | 4 +- .../src/core/include/platform_pd.h | 4 +- .../src/core/include/platform_thread.h | 4 +- .../src/core/include/print_l4_thread_id.h | 7 +- .../src/core/include/rpc_cap_factory.h | 8 ++- repos/base-pistachio/src/core/include/util.h | 9 +-- .../src/core/io_mem_session_support.cc | 2 +- .../src/core/irq_session_component.cc | 5 +- repos/base-pistachio/src/core/kip.cc | 2 +- repos/base-pistachio/src/core/pager.cc | 6 +- repos/base-pistachio/src/core/pager_object.cc | 2 +- repos/base-pistachio/src/core/platform.cc | 5 +- repos/base-pistachio/src/core/platform_pd.cc | 2 +- .../src/core/platform_thread.cc | 6 +- .../src/core/ram_dataspace_support.cc | 2 +- .../src/core/spec/x86/platform_x86.cc | 4 +- repos/base-pistachio/src/core/thread_start.cc | 11 +-- .../src/include/base/internal/native_thread.h | 10 ++- repos/base-sel4/src/core/capability_space.cc | 2 +- repos/base-sel4/src/core/core_log_out.cc | 2 +- repos/base-sel4/src/core/core_region_map.cc | 9 +-- .../src/core/include/cap_sel_alloc.h | 7 +- repos/base-sel4/src/core/include/cnode.h | 7 +- .../src/core/include/core_capability_data.h | 7 +- .../base-sel4/src/core/include/core_cspace.h | 4 +- .../src/core/include/initial_untyped_pool.h | 8 +-- .../src/core/include/install_mapping.h | 6 +- repos/base-sel4/src/core/include/ipc_pager.h | 6 +- repos/base-sel4/src/core/include/irq_object.h | 14 ++-- .../src/core/include/kernel_object.h | 2 +- repos/base-sel4/src/core/include/map_local.h | 3 +- .../src/core/include/page_table_registry.h | 11 ++- repos/base-sel4/src/core/include/pager.h | 13 ++-- repos/base-sel4/src/core/include/platform.h | 8 ++- .../base-sel4/src/core/include/platform_pd.h | 4 +- .../src/core/include/platform_thread.h | 4 +- .../src/core/include/rpc_cap_factory.h | 8 ++- .../src/core/include/sel4_boot_info.h | 5 +- .../base-sel4/src/core/include/thread_sel4.h | 20 +++--- .../src/core/include/untyped_memory.h | 6 +- repos/base-sel4/src/core/include/util.h | 3 +- .../src/core/include/vm_session_component.h | 5 +- repos/base-sel4/src/core/include/vm_space.h | 6 +- .../src/core/io_mem_session_support.cc | 2 +- .../src/core/irq_session_component.cc | 6 +- repos/base-sel4/src/core/pager.cc | 6 +- repos/base-sel4/src/core/platform.cc | 11 ++- repos/base-sel4/src/core/platform_pd.cc | 5 +- repos/base-sel4/src/core/platform_thread.cc | 10 +-- .../src/core/ram_dataspace_support.cc | 2 +- repos/base-sel4/src/core/rpc_cap_factory.cc | 2 +- .../src/core/signal_source_component.cc | 10 +-- .../src/core/spec/arm/arch_kernel_object.h | 5 +- .../base-sel4/src/core/spec/arm/boot_info.cc | 10 +-- repos/base-sel4/src/core/spec/arm/irq.cc | 7 +- repos/base-sel4/src/core/spec/arm/platform.cc | 17 ++--- .../src/core/spec/arm/platform_thread.cc | 5 +- repos/base-sel4/src/core/spec/arm/thread.cc | 16 +++-- repos/base-sel4/src/core/spec/arm/vm_space.cc | 29 ++++---- .../core/spec/x86/io_port_session_support.cc | 29 ++++---- repos/base-sel4/src/core/spec/x86/irq.cc | 8 ++- .../src/core/spec/x86/platform_services.cc | 8 +-- .../src/core/spec/x86/platform_thread.cc | 14 ++-- .../src/core/spec/x86/vm_session_component.cc | 27 ++++---- repos/base-sel4/src/core/spec/x86/vm_space.cc | 37 +++++----- .../src/core/spec/x86_32/arch_kernel_object.h | 2 +- .../src/core/spec/x86_32/boot_info.cc | 7 +- .../src/core/spec/x86_32/platform.cc | 14 ++-- .../src/core/spec/x86_32/platform_pd.cc | 6 +- .../base-sel4/src/core/spec/x86_32/thread.cc | 16 +++-- .../src/core/spec/x86_32/vm_space.cc | 13 ++-- .../src/core/spec/x86_64/arch_kernel_object.h | 2 +- .../src/core/spec/x86_64/boot_info.cc | 6 +- .../src/core/spec/x86_64/platform.cc | 13 ++-- .../src/core/spec/x86_64/platform_pd.cc | 7 +- .../base-sel4/src/core/spec/x86_64/thread.cc | 16 +++-- .../src/core/spec/x86_64/vm_space.cc | 21 +++--- repos/base-sel4/src/core/stack_area.cc | 11 +-- repos/base-sel4/src/core/thread_start.cc | 17 +++-- repos/base/src/core/capability_space.cc | 8 ++- repos/base/src/core/core_log.cc | 14 ++-- repos/base/src/core/core_mem_alloc.cc | 8 +-- repos/base/src/core/core_region_map.cc | 2 +- repos/base/src/core/core_rpc_cap_alloc.cc | 4 +- repos/base/src/core/cpu_session_component.cc | 5 +- repos/base/src/core/cpu_session_support.cc | 5 +- repos/base/src/core/cpu_thread_component.cc | 2 +- repos/base/src/core/dataspace_component.cc | 2 +- repos/base/src/core/default_log.cc | 3 +- repos/base/src/core/include/account.h | 8 ++- repos/base/src/core/include/address_space.h | 11 +-- repos/base/src/core/include/boot_modules.h | 15 +++-- .../src/core/include/constrained_core_ram.h | 10 ++- .../src/core/include/core_capability_space.h | 11 ++- repos/base/src/core/include/core_env.h | 4 +- repos/base/src/core/include/core_log.h | 7 +- repos/base/src/core/include/core_mem_alloc.h | 17 +++-- repos/base/src/core/include/core_region_map.h | 4 +- repos/base/src/core/include/core_service.h | 7 +- repos/base/src/core/include/cpu_root.h | 4 +- .../src/core/include/cpu_session_component.h | 6 +- .../src/core/include/cpu_thread_allocator.h | 5 +- .../src/core/include/cpu_thread_component.h | 8 +-- .../src/core/include/dataspace_component.h | 6 +- repos/base/src/core/include/io_mem_root.h | 7 +- .../core/include/io_mem_session_component.h | 4 +- repos/base/src/core/include/io_port_root.h | 11 +-- .../core/include/io_port_session_component.h | 4 +- repos/base/src/core/include/irq_args.h | 8 ++- repos/base/src/core/include/irq_object.h | 7 +- repos/base/src/core/include/irq_root.h | 6 +- .../src/core/include/irq_session_component.h | 7 +- repos/base/src/core/include/log_root.h | 7 +- .../src/core/include/log_session_component.h | 11 +-- repos/base/src/core/include/mapping.h | 7 +- .../src/core/include/native_cpu_component.h | 6 +- .../src/core/include/native_pd_component.h | 6 +- repos/base/src/core/include/pager.h | 12 ++-- .../include/pager_object_exception_state.h | 5 +- repos/base/src/core/include/pd_root.h | 7 +- .../src/core/include/pd_session_component.h | 7 +- .../base/src/core/include/platform_generic.h | 4 +- .../base/src/core/include/platform_services.h | 5 +- .../src/core/include/ram_dataspace_factory.h | 6 +- .../src/core/include/region_map_component.h | 21 +++--- repos/base/src/core/include/rm_root.h | 6 +- .../src/core/include/rm_session_component.h | 4 +- repos/base/src/core/include/rom_fs.h | 14 ++-- repos/base/src/core/include/rom_root.h | 8 ++- .../src/core/include/rom_session_component.h | 8 ++- repos/base/src/core/include/rpc_cap_factory.h | 7 +- repos/base/src/core/include/signal_broker.h | 5 +- .../src/core/include/signal_context_slab.h | 7 +- .../src/core/include/signal_delivery_proxy.h | 11 +-- .../core/include/signal_source_component.h | 13 ++-- .../src/core/include/signal_transmitter.h | 9 ++- .../src/core/include/synced_ram_allocator.h | 7 +- .../src/core/include/synced_range_allocator.h | 7 +- .../src/core/include/trace/policy_registry.h | 11 +-- repos/base/src/core/include/trace/root.h | 4 +- .../core/include/trace/session_component.h | 6 +- .../src/core/include/trace/source_registry.h | 19 ++++-- .../src/core/include/trace/subject_registry.h | 23 ++++--- repos/base/src/core/include/types.h | 24 +++++++ repos/base/src/core/include/vm_root.h | 4 +- .../base/src/core/io_mem_session_component.cc | 9 +-- repos/base/src/core/main.cc | 32 ++++----- repos/base/src/core/pager_ep.cc | 4 +- repos/base/src/core/pager_object.cc | 5 +- repos/base/src/core/pd_session_component.cc | 5 +- repos/base/src/core/pd_session_support.cc | 4 +- repos/base/src/core/platform_rom_modules.cc | 2 +- repos/base/src/core/platform_services.cc | 6 +- repos/base/src/core/ram_dataspace_factory.cc | 5 +- repos/base/src/core/region_map_component.cc | 9 ++- repos/base/src/core/rom_session_component.cc | 7 +- repos/base/src/core/rpc_cap_factory.cc | 6 +- repos/base/src/core/rpc_cap_factory_l4.cc | 8 +-- repos/base/src/core/signal_receiver.cc | 6 +- .../base/src/core/signal_source_component.cc | 2 +- .../src/core/signal_transmitter_noinit.cc | 7 +- .../base/src/core/signal_transmitter_proxy.cc | 6 +- .../spec/x86/io_port_session_component.cc | 6 +- .../core/spec/x86/io_port_session_support.cc | 2 +- .../src/core/spec/x86/platform_services.cc | 8 +-- repos/base/src/core/stack_area.cc | 5 +- .../base/src/core/trace_session_component.cc | 9 +-- repos/base/src/core/vm_session_common.cc | 12 ++-- repos/base/src/include/pager/capability.h | 11 --- 429 files changed, 1631 insertions(+), 1505 deletions(-) create mode 100644 repos/base/src/core/include/types.h diff --git a/repos/base-fiasco/src/core/core_log_out.cc b/repos/base-fiasco/src/core/core_log_out.cc index 7ccdcd68b5..732d9cf84e 100644 --- a/repos/base-fiasco/src/core/core_log_out.cc +++ b/repos/base-fiasco/src/core/core_log_out.cc @@ -17,7 +17,7 @@ /* L4/Fiasco includes */ #include -using namespace Genode; +using namespace Core; void Core_log::out(char const c) { Fiasco::outchar(c); } diff --git a/repos/base-fiasco/src/core/include/ipc_pager.h b/repos/base-fiasco/src/core/include/ipc_pager.h index fd97211a29..454186b666 100644 --- a/repos/base-fiasco/src/core/include/ipc_pager.h +++ b/repos/base-fiasco/src/core/include/ipc_pager.h @@ -30,10 +30,10 @@ /* L4/Fiasco includes */ #include -namespace Genode { class Ipc_pager; } +namespace Core { class Ipc_pager; } -class Genode::Ipc_pager +class Core::Ipc_pager { private: diff --git a/repos/base-fiasco/src/core/include/map_local.h b/repos/base-fiasco/src/core/include/map_local.h index dc0d7063ce..d1dfefeb03 100644 --- a/repos/base-fiasco/src/core/include/map_local.h +++ b/repos/base-fiasco/src/core/include/map_local.h @@ -21,7 +21,7 @@ /* L4/Fiasco includes */ #include -namespace Genode { +namespace Core { /** * Map page locally within core diff --git a/repos/base-fiasco/src/core/include/platform.h b/repos/base-fiasco/src/core/include/platform.h index 918c6fd799..180b3fc04f 100644 --- a/repos/base-fiasco/src/core/include/platform.h +++ b/repos/base-fiasco/src/core/include/platform.h @@ -29,10 +29,10 @@ #include #include -namespace Genode { class Platform; } +namespace Core { class Platform; } -class Genode::Platform : public Platform_generic +class Core::Platform : public Platform_generic { private: diff --git a/repos/base-fiasco/src/core/include/platform_pd.h b/repos/base-fiasco/src/core/include/platform_pd.h index d1ee34b88d..b0dd150f8d 100644 --- a/repos/base-fiasco/src/core/include/platform_pd.h +++ b/repos/base-fiasco/src/core/include/platform_pd.h @@ -27,14 +27,14 @@ /* L4/Fiasco includes */ #include -namespace Genode { +namespace Core { class Platform_thread; class Platform_pd; } -class Genode::Platform_pd : public Address_space +class Core::Platform_pd : public Address_space { private: diff --git a/repos/base-fiasco/src/core/include/platform_thread.h b/repos/base-fiasco/src/core/include/platform_thread.h index 5832fdbb12..0971847345 100644 --- a/repos/base-fiasco/src/core/include/platform_thread.h +++ b/repos/base-fiasco/src/core/include/platform_thread.h @@ -27,14 +27,14 @@ /* L4/Fiasco includes */ #include -namespace Genode { +namespace Core { class Platform_pd; class Platform_thread; } -class Genode::Platform_thread : Interface +class Core::Platform_thread : Interface { private: diff --git a/repos/base-fiasco/src/core/include/rpc_cap_factory.h b/repos/base-fiasco/src/core/include/rpc_cap_factory.h index 4ef13ade6e..d42c364a6d 100644 --- a/repos/base-fiasco/src/core/include/rpc_cap_factory.h +++ b/repos/base-fiasco/src/core/include/rpc_cap_factory.h @@ -18,10 +18,13 @@ #include #include -namespace Genode { class Rpc_cap_factory; } +/* core includes */ +#include + +namespace Core { class Rpc_cap_factory; } -class Genode::Rpc_cap_factory +class Core::Rpc_cap_factory { private: diff --git a/repos/base-fiasco/src/core/include/util.h b/repos/base-fiasco/src/core/include/util.h index d6bac861e4..33143a462a 100644 --- a/repos/base-fiasco/src/core/include/util.h +++ b/repos/base-fiasco/src/core/include/util.h @@ -28,7 +28,10 @@ /* L4/Fiasco includes */ #include -namespace Genode { +/* core includes */ +#include + +namespace Core { inline void log_event(const char *s) { diff --git a/repos/base-fiasco/src/core/io_mem_session_support.cc b/repos/base-fiasco/src/core/io_mem_session_support.cc index 64ef0a753d..79738876a4 100644 --- a/repos/base-fiasco/src/core/io_mem_session_support.cc +++ b/repos/base-fiasco/src/core/io_mem_session_support.cc @@ -19,7 +19,7 @@ /* L4/Fiasco includes */ #include -using namespace Genode; +using namespace Core; void Io_mem_session_component::_unmap_local(addr_t base, size_t) diff --git a/repos/base-fiasco/src/core/irq_session_component.cc b/repos/base-fiasco/src/core/irq_session_component.cc index b5f7e9293f..87c2cb93a6 100644 --- a/repos/base-fiasco/src/core/irq_session_component.cc +++ b/repos/base-fiasco/src/core/irq_session_component.cc @@ -12,7 +12,6 @@ */ /* Genode includes */ -#include #include /* core includes */ @@ -22,7 +21,7 @@ /* L4/Fiasco includes */ #include -using namespace Genode; +using namespace Core; bool Irq_object::_associate() diff --git a/repos/base-fiasco/src/core/pager.cc b/repos/base-fiasco/src/core/pager.cc index 544ee6f83c..e6c1d9257f 100644 --- a/repos/base-fiasco/src/core/pager.cc +++ b/repos/base-fiasco/src/core/pager.cc @@ -11,9 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include @@ -25,7 +22,7 @@ /* L4/Fiasco includes */ #include -using namespace Genode; +using namespace Core; using namespace Fiasco; diff --git a/repos/base-fiasco/src/core/pager_object.cc b/repos/base-fiasco/src/core/pager_object.cc index 794ec818d6..3d68da8819 100644 --- a/repos/base-fiasco/src/core/pager_object.cc +++ b/repos/base-fiasco/src/core/pager_object.cc @@ -20,7 +20,7 @@ /* L4/Fiasco includes */ #include -using namespace Genode; +using namespace Core; void Pager_object::wake_up() diff --git a/repos/base-fiasco/src/core/platform.cc b/repos/base-fiasco/src/core/platform.cc index 632151e353..4c760d9371 100644 --- a/repos/base-fiasco/src/core/platform.cc +++ b/repos/base-fiasco/src/core/platform.cc @@ -12,7 +12,6 @@ */ /* Genode includes */ -#include #include #include #include @@ -35,7 +34,7 @@ /* L4/Fiasco includes */ #include -using namespace Genode; +using namespace Core; using namespace Fiasco; diff --git a/repos/base-fiasco/src/core/platform_pd.cc b/repos/base-fiasco/src/core/platform_pd.cc index c3196ba628..7fd53d44e6 100644 --- a/repos/base-fiasco/src/core/platform_pd.cc +++ b/repos/base-fiasco/src/core/platform_pd.cc @@ -29,7 +29,7 @@ #include using namespace Fiasco; -using namespace Genode; +using namespace Core; static bool _init = false; diff --git a/repos/base-fiasco/src/core/platform_thread.cc b/repos/base-fiasco/src/core/platform_thread.cc index 65fdd25249..79b01382d0 100644 --- a/repos/base-fiasco/src/core/platform_thread.cc +++ b/repos/base-fiasco/src/core/platform_thread.cc @@ -15,8 +15,6 @@ */ /* Genode includes */ -#include -#include #include /* core includes */ @@ -28,7 +26,7 @@ /* L4/Fiasco includes */ #include -using namespace Genode; +using namespace Core; using namespace Fiasco; diff --git a/repos/base-fiasco/src/core/ram_dataspace_support.cc b/repos/base-fiasco/src/core/ram_dataspace_support.cc index 75e15507ab..f4f79bd11c 100644 --- a/repos/base-fiasco/src/core/ram_dataspace_support.cc +++ b/repos/base-fiasco/src/core/ram_dataspace_support.cc @@ -17,7 +17,7 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &) { } diff --git a/repos/base-fiasco/src/core/spec/x86/platform_x86.cc b/repos/base-fiasco/src/core/spec/x86/platform_x86.cc index c8f691b55a..b52e1d8699 100644 --- a/repos/base-fiasco/src/core/spec/x86/platform_x86.cc +++ b/repos/base-fiasco/src/core/spec/x86/platform_x86.cc @@ -21,7 +21,7 @@ /* L4/Fiasco includes */ #include -using namespace Genode; +using namespace Core; using namespace Fiasco; diff --git a/repos/base-fiasco/src/core/thread_start.cc b/repos/base-fiasco/src/core/thread_start.cc index 29ccc8d1f9..2e1180c420 100644 --- a/repos/base-fiasco/src/core/thread_start.cc +++ b/repos/base-fiasco/src/core/thread_start.cc @@ -22,7 +22,7 @@ #include #include -using namespace Genode; +using namespace Core; void Thread::_thread_start() diff --git a/repos/base-fiasco/src/include/base/internal/native_thread.h b/repos/base-fiasco/src/include/base/internal/native_thread.h index fb94535ede..1234c529e5 100644 --- a/repos/base-fiasco/src/include/base/internal/native_thread.h +++ b/repos/base-fiasco/src/include/base/internal/native_thread.h @@ -20,11 +20,9 @@ /* L4/Fiasco includes */ #include -namespace Genode { +namespace Core { struct Platform_thread; } - struct Platform_thread; - struct Native_thread; -} +namespace Genode { struct Native_thread; } struct Genode::Native_thread @@ -38,7 +36,7 @@ struct Genode::Native_thread * thread object, which is going to be destroyed on destruction of the * 'Thread'. */ - Platform_thread *pt; + Core::Platform_thread *pt; }; #endif /* _INCLUDE__BASE__INTERNAL__NATIVE_THREAD_H_ */ diff --git a/repos/base-foc/src/core/core_log_out.cc b/repos/base-foc/src/core/core_log_out.cc index 1ac63a5181..aadbf1c99e 100644 --- a/repos/base-foc/src/core/core_log_out.cc +++ b/repos/base-foc/src/core/core_log_out.cc @@ -17,7 +17,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; void Core_log::out(char const c) diff --git a/repos/base-foc/src/core/include/cap_id_alloc.h b/repos/base-foc/src/core/include/cap_id_alloc.h index dc3c84a10a..39c34ca571 100644 --- a/repos/base-foc/src/core/include/cap_id_alloc.h +++ b/repos/base-foc/src/core/include/cap_id_alloc.h @@ -20,10 +20,13 @@ #include #include -namespace Genode { class Cap_id_allocator; } +/* core includes */ +#include + +namespace Core { class Cap_id_allocator; } -class Genode::Cap_id_allocator +class Core::Cap_id_allocator { public: diff --git a/repos/base-foc/src/core/include/cap_index.h b/repos/base-foc/src/core/include/cap_index.h index 5f885020a8..be813d34ab 100644 --- a/repos/base-foc/src/core/include/cap_index.h +++ b/repos/base-foc/src/core/include/cap_index.h @@ -18,15 +18,18 @@ #include #include -namespace Genode { +/* core includes */ +#include +namespace Core { + + class Core_cap_index; class Platform_thread; class Pd_session_component; - class Core_cap_index; } -class Genode::Core_cap_index : public Native_capability::Data +class Core::Core_cap_index : public Native_capability::Data { private: diff --git a/repos/base-foc/src/core/include/cap_mapping.h b/repos/base-foc/src/core/include/cap_mapping.h index 05a43d61ff..8e2c863d34 100644 --- a/repos/base-foc/src/core/include/cap_mapping.h +++ b/repos/base-foc/src/core/include/cap_mapping.h @@ -16,16 +16,15 @@ /* core includes */ #include -#include -namespace Genode { class Cap_mapping; } +namespace Core { class Cap_mapping; } /** * A Cap_mapping embodies a capability of core, and its mapped * copy in another protection domain. */ -class Genode::Cap_mapping : Noncopyable +class Core::Cap_mapping : Noncopyable { private: diff --git a/repos/base-foc/src/core/include/ipc_pager.h b/repos/base-foc/src/core/include/ipc_pager.h index b9ba858afd..8786d8cfed 100644 --- a/repos/base-foc/src/core/include/ipc_pager.h +++ b/repos/base-foc/src/core/include/ipc_pager.h @@ -27,16 +27,16 @@ /* base-internal includes */ #include -/* core-local includes */ +/* core includes */ #include /* Fiasco.OC includes */ #include -namespace Genode { class Ipc_pager; } +namespace Core { class Ipc_pager; } -class Genode::Ipc_pager : public Native_capability +class Core::Ipc_pager : public Native_capability { public: diff --git a/repos/base-foc/src/core/include/irq_object.h b/repos/base-foc/src/core/include/irq_object.h index ef1604e2cc..8694cc8f57 100644 --- a/repos/base-foc/src/core/include/irq_object.h +++ b/repos/base-foc/src/core/include/irq_object.h @@ -20,10 +20,13 @@ #include #include -namespace Genode { class Irq_object; } +/* core includes */ +#include + +namespace Core { class Irq_object; } -class Genode::Irq_object +class Core::Irq_object { private: @@ -56,8 +59,8 @@ class Genode::Irq_object uint64_t msi_address() const { return _msi_addr; } addr_t msi_value() const { return _msi_data; } - void sigh(Genode::Signal_context_capability cap) { _sig_cap = cap; } - void notify() { Genode::Signal_transmitter(_sig_cap).submit(1); } + void sigh(Signal_context_capability cap) { _sig_cap = cap; } + void notify() { Signal_transmitter(_sig_cap).submit(1); } bool associate(unsigned irq, bool msi, Irq_session::Trigger, Irq_session::Polarity); diff --git a/repos/base-foc/src/core/include/map_local.h b/repos/base-foc/src/core/include/map_local.h index 4bfbacfe0b..05c8bc9be0 100644 --- a/repos/base-foc/src/core/include/map_local.h +++ b/repos/base-foc/src/core/include/map_local.h @@ -22,7 +22,7 @@ /* Fiasco.OC includes */ #include -namespace Genode { +namespace Core { /** * Map pages locally within core diff --git a/repos/base-foc/src/core/include/native_cpu_component.h b/repos/base-foc/src/core/include/native_cpu_component.h index 8fd21ad7f9..79c7e0fe5c 100644 --- a/repos/base-foc/src/core/include/native_cpu_component.h +++ b/repos/base-foc/src/core/include/native_cpu_component.h @@ -18,15 +18,18 @@ #include #include -namespace Genode { +/* core includes */ +#include + +namespace Core { class Cpu_session_component; class Native_cpu_component; } -class Genode::Native_cpu_component : public Rpc_object +class Core::Native_cpu_component : public Rpc_object { private: diff --git a/repos/base-foc/src/core/include/pager_object_exception_state.h b/repos/base-foc/src/core/include/pager_object_exception_state.h index a2ecb8b11d..82e49c0b89 100644 --- a/repos/base-foc/src/core/include/pager_object_exception_state.h +++ b/repos/base-foc/src/core/include/pager_object_exception_state.h @@ -17,10 +17,10 @@ #include #include -namespace Genode { struct Pager_object_exception_state; } +namespace Core { struct Pager_object_exception_state; } -struct Genode::Pager_object_exception_state +struct Core::Pager_object_exception_state { Mutex mutex { }; unsigned exceptions; /* counts exceptions raised by the thread */ diff --git a/repos/base-foc/src/core/include/platform.h b/repos/base-foc/src/core/include/platform.h index 274e0a4408..690b417b1d 100644 --- a/repos/base-foc/src/core/include/platform.h +++ b/repos/base-foc/src/core/include/platform.h @@ -21,7 +21,7 @@ #include #include -/* Core includes */ +/* core includes */ #include #include #include @@ -32,10 +32,10 @@ namespace Foc { struct l4_kernel_info_t; } -namespace Genode { class Platform; } +namespace Core { class Platform; } -class Genode::Platform : public Platform_generic +class Core::Platform : public Platform_generic { private: diff --git a/repos/base-foc/src/core/include/platform_pd.h b/repos/base-foc/src/core/include/platform_pd.h index bfa9f734be..a2aee59b7b 100644 --- a/repos/base-foc/src/core/include/platform_pd.h +++ b/repos/base-foc/src/core/include/platform_pd.h @@ -36,14 +36,14 @@ /* Fiasco.OC includes */ #include -namespace Genode { +namespace Core { class Platform_thread; class Platform_pd; } -class Genode::Platform_pd : public Address_space +class Core::Platform_pd : public Address_space { private: diff --git a/repos/base-foc/src/core/include/platform_thread.h b/repos/base-foc/src/core/include/platform_thread.h index 55e5b10afe..5837b7344e 100644 --- a/repos/base-foc/src/core/include/platform_thread.h +++ b/repos/base-foc/src/core/include/platform_thread.h @@ -26,14 +26,14 @@ #include #include -namespace Genode { +namespace Core { class Platform_pd; class Platform_thread; } -class Genode::Platform_thread : Interface +class Core::Platform_thread : Interface { private: diff --git a/repos/base-foc/src/core/include/rpc_cap_factory.h b/repos/base-foc/src/core/include/rpc_cap_factory.h index 3299b7cd62..0355c75922 100644 --- a/repos/base-foc/src/core/include/rpc_cap_factory.h +++ b/repos/base-foc/src/core/include/rpc_cap_factory.h @@ -23,10 +23,13 @@ /* base-internal includes */ #include +/* core includes */ +#include -namespace Genode { class Rpc_cap_factory; } +namespace Core { class Rpc_cap_factory; } -class Genode::Rpc_cap_factory + +class Core::Rpc_cap_factory { private: diff --git a/repos/base-foc/src/core/include/util.h b/repos/base-foc/src/core/include/util.h index 6103f9eec5..4656521e6a 100644 --- a/repos/base-foc/src/core/include/util.h +++ b/repos/base-foc/src/core/include/util.h @@ -18,8 +18,6 @@ #define _CORE__INCLUDE__UTIL_H_ /* Genode includes */ -#include -#include #include #include @@ -29,7 +27,10 @@ /* Fiasco.OC includes */ #include -namespace Genode { +/* core includes */ +#include + +namespace Core { inline void panic(const char *s) { @@ -44,8 +45,8 @@ namespace Genode { unsigned char const volatile *bptr; unsigned char const *eptr; - bptr = (unsigned char const volatile *)(((Genode::addr_t)addr) & L4_PAGEMASK); - eptr = (unsigned char const *)(((Genode::addr_t)addr + size - 1) & L4_PAGEMASK); + bptr = (unsigned char const volatile *)(((addr_t)addr) & L4_PAGEMASK); + eptr = (unsigned char const *)(((addr_t)addr + size - 1) & L4_PAGEMASK); for ( ; bptr <= eptr; bptr += L4_PAGESIZE) touch_read(bptr); } @@ -57,8 +58,8 @@ namespace Genode { unsigned char volatile *bptr; unsigned char const *eptr; - bptr = (unsigned char volatile *)(((Genode::addr_t)addr) & L4_PAGEMASK); - eptr = (unsigned char const *)(((Genode::addr_t)addr + size - 1) & L4_PAGEMASK); + bptr = (unsigned char volatile *)(((addr_t)addr) & L4_PAGEMASK); + eptr = (unsigned char const *)(((addr_t)addr + size - 1) & L4_PAGEMASK); for (; bptr <= eptr; bptr += L4_PAGESIZE) touch_read_write(bptr); } diff --git a/repos/base-foc/src/core/include/vm_session_component.h b/repos/base-foc/src/core/include/vm_session_component.h index 848f728102..2a02ba3ac5 100644 --- a/repos/base-foc/src/core/include/vm_session_component.h +++ b/repos/base-foc/src/core/include/vm_session_component.h @@ -28,8 +28,8 @@ #include #include -namespace Genode -{ +namespace Core { + class Vm_session_component; struct Vcpu; @@ -39,7 +39,7 @@ namespace Genode } -struct Genode::Vcpu : Rpc_object +struct Core::Vcpu : Rpc_object { private: @@ -69,7 +69,7 @@ struct Genode::Vcpu : Rpc_object }; -class Genode::Vm_session_component +class Core::Vm_session_component : private Ram_quota_guard, private Cap_quota_guard, diff --git a/repos/base-foc/src/core/io_mem_session_support.cc b/repos/base-foc/src/core/io_mem_session_support.cc index 891a300dbb..add5548d15 100644 --- a/repos/base-foc/src/core/io_mem_session_support.cc +++ b/repos/base-foc/src/core/io_mem_session_support.cc @@ -18,7 +18,7 @@ #include #include -using namespace Genode; +using namespace Core; void Io_mem_session_component::_unmap_local(addr_t base, size_t) diff --git a/repos/base-foc/src/core/ipc_pager.cc b/repos/base-foc/src/core/ipc_pager.cc index 0be90ad79b..322928f36c 100644 --- a/repos/base-foc/src/core/ipc_pager.cc +++ b/repos/base-foc/src/core/ipc_pager.cc @@ -12,7 +12,6 @@ */ /* Genode includes */ -#include #include /* core includes */ @@ -25,7 +24,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; using namespace Foc; diff --git a/repos/base-foc/src/core/irq_session_component.cc b/repos/base-foc/src/core/irq_session_component.cc index 302cd42b0d..bd1b06e8fa 100644 --- a/repos/base-foc/src/core/irq_session_component.cc +++ b/repos/base-foc/src/core/irq_session_component.cc @@ -14,7 +14,6 @@ */ /* Genode includes */ -#include #include #include @@ -28,15 +27,15 @@ /* Fiasco.OC includes */ #include -namespace Genode { class Interrupt_handler; } +namespace Core { class Interrupt_handler; } -using namespace Genode; +using namespace Core; /** * Dispatches interrupts from kernel */ -class Genode::Interrupt_handler : public Thread +class Core::Interrupt_handler : public Thread { private: @@ -239,7 +238,7 @@ void Irq_session_component::ack_irq() } -void Irq_session_component::sigh(Genode::Signal_context_capability cap) +void Irq_session_component::sigh(Signal_context_capability cap) { _irq_object.sigh(cap); } @@ -251,7 +250,7 @@ Irq_session::Info Irq_session_component::info() return { .type = Info::Type::INVALID, .address = 0, .value = 0 }; return { - .type = Genode::Irq_session::Info::Type::MSI, + .type = Irq_session::Info::Type::MSI, .address = (addr_t)_irq_object.msi_address(), .value = _irq_object.msi_value() }; diff --git a/repos/base-foc/src/core/native_cpu_component.cc b/repos/base-foc/src/core/native_cpu_component.cc index 20eff8b9dd..a3bc2388fd 100644 --- a/repos/base-foc/src/core/native_cpu_component.cc +++ b/repos/base-foc/src/core/native_cpu_component.cc @@ -11,9 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include @@ -22,7 +19,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; Native_capability Native_cpu_component::native_cap(Thread_capability cap) diff --git a/repos/base-foc/src/core/pager.cc b/repos/base-foc/src/core/pager.cc index fb10cc06a4..9ce4db4e5f 100644 --- a/repos/base-foc/src/core/pager.cc +++ b/repos/base-foc/src/core/pager.cc @@ -13,10 +13,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include -#include - /* core includes */ #include @@ -26,7 +22,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; void Pager_entrypoint::entry() diff --git a/repos/base-foc/src/core/pager_object.cc b/repos/base-foc/src/core/pager_object.cc index fc46e2efec..1b8f912ba5 100644 --- a/repos/base-foc/src/core/pager_object.cc +++ b/repos/base-foc/src/core/pager_object.cc @@ -20,7 +20,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; void Pager_object::wake_up() diff --git a/repos/base-foc/src/core/platform.cc b/repos/base-foc/src/core/platform.cc index 0c99efffb0..9d1d922822 100644 --- a/repos/base-foc/src/core/platform.cc +++ b/repos/base-foc/src/core/platform.cc @@ -13,7 +13,6 @@ */ /* Genode includes */ -#include #include #include #include @@ -38,7 +37,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; /*********************************** @@ -288,7 +287,7 @@ void Platform::_setup_mem_alloc() * prevent sigma0 from handing out those page as anonymous memory. */ volatile const char *beg, *end; - beg = (const char *)(((Genode::addr_t)&_prog_img_beg) & L4_PAGEMASK); + beg = (const char *)(((addr_t)&_prog_img_beg) & L4_PAGEMASK); end = (const char *)&_prog_img_end; for ( ; beg < end; beg += L4_PAGESIZE) (void)(*beg); diff --git a/repos/base-foc/src/core/platform_pd.cc b/repos/base-foc/src/core/platform_pd.cc index 17e7ae4c12..bf76ecc5e7 100644 --- a/repos/base-foc/src/core/platform_pd.cc +++ b/repos/base-foc/src/core/platform_pd.cc @@ -26,7 +26,7 @@ #include using namespace Foc; -using namespace Genode; +using namespace Core; static addr_t core_utcb_base() diff --git a/repos/base-foc/src/core/platform_thread.cc b/repos/base-foc/src/core/platform_thread.cc index cc613b95e6..5e626941bd 100644 --- a/repos/base-foc/src/core/platform_thread.cc +++ b/repos/base-foc/src/core/platform_thread.cc @@ -13,8 +13,6 @@ /* Genode includes */ #include -#include -#include #include /* core includes */ @@ -25,7 +23,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; using namespace Foc; diff --git a/repos/base-foc/src/core/ram_dataspace_support.cc b/repos/base-foc/src/core/ram_dataspace_support.cc index ac92a526ee..56d75d8633 100644 --- a/repos/base-foc/src/core/ram_dataspace_support.cc +++ b/repos/base-foc/src/core/ram_dataspace_support.cc @@ -11,14 +11,14 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core-local includes */ +/* core includes */ #include #include /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &) { } diff --git a/repos/base-foc/src/core/rpc_cap_factory.cc b/repos/base-foc/src/core/rpc_cap_factory.cc index afcb7b0dab..fa0c2ea5a0 100644 --- a/repos/base-foc/src/core/rpc_cap_factory.cc +++ b/repos/base-foc/src/core/rpc_cap_factory.cc @@ -29,7 +29,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; /*************************** diff --git a/repos/base-foc/src/core/signal_source_component.cc b/repos/base-foc/src/core/signal_source_component.cc index b25a9019a0..a1d82f097f 100644 --- a/repos/base-foc/src/core/signal_source_component.cc +++ b/repos/base-foc/src/core/signal_source_component.cc @@ -13,7 +13,6 @@ */ /* Genode includes */ -#include #include /* core includes */ @@ -23,13 +22,9 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; -/***************************** - ** Signal-source component ** - *****************************/ - void Signal_source_component::release(Signal_context_component &context) { if (context.enqueued()) diff --git a/repos/base-foc/src/core/spec/arm/ipc_pager.cc b/repos/base-foc/src/core/spec/arm/ipc_pager.cc index 465ea28ab6..75dc814abc 100644 --- a/repos/base-foc/src/core/spec/arm/ipc_pager.cc +++ b/repos/base-foc/src/core/spec/arm/ipc_pager.cc @@ -19,7 +19,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; enum Exceptions { EX_REGS = 0x500000 }; diff --git a/repos/base-foc/src/core/spec/arm/platform_arm.cc b/repos/base-foc/src/core/spec/arm/platform_arm.cc index 97634cb6de..5df54494d7 100644 --- a/repos/base-foc/src/core/spec/arm/platform_arm.cc +++ b/repos/base-foc/src/core/spec/arm/platform_arm.cc @@ -13,7 +13,7 @@ #include -using namespace Genode; +using namespace Core; void Platform::_setup_io_port_alloc() { } diff --git a/repos/base-foc/src/core/spec/arm_64/ipc_pager.cc b/repos/base-foc/src/core/spec/arm_64/ipc_pager.cc index e22e5f8190..fb0c6dca8c 100644 --- a/repos/base-foc/src/core/spec/arm_64/ipc_pager.cc +++ b/repos/base-foc/src/core/spec/arm_64/ipc_pager.cc @@ -19,7 +19,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; enum Exceptions { EX_REGS = 0x500000 }; diff --git a/repos/base-foc/src/core/spec/x86/ipc_pager.cc b/repos/base-foc/src/core/spec/x86/ipc_pager.cc index 6c40f3a5e4..28e6c23bc8 100644 --- a/repos/base-foc/src/core/spec/x86/ipc_pager.cc +++ b/repos/base-foc/src/core/spec/x86/ipc_pager.cc @@ -17,7 +17,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; enum Exceptions { EX_REGS = 0xff }; diff --git a/repos/base-foc/src/core/spec/x86/platform.cc b/repos/base-foc/src/core/spec/x86/platform.cc index 42e3d7abb6..38fddfaaaf 100644 --- a/repos/base-foc/src/core/spec/x86/platform.cc +++ b/repos/base-foc/src/core/spec/x86/platform.cc @@ -13,17 +13,17 @@ */ /* Genode includes */ -#include #include #include -#include "platform.h" -#include "util.h" +/* core includes */ +#include +#include /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; void Platform::_setup_io_port_alloc() diff --git a/repos/base-foc/src/core/spec/x86/platform_services.cc b/repos/base-foc/src/core/spec/x86/platform_services.cc index 09386b3cba..8e4888c65a 100644 --- a/repos/base-foc/src/core/spec/x86/platform_services.cc +++ b/repos/base-foc/src/core/spec/x86/platform_services.cc @@ -20,10 +20,10 @@ /* * Add x86 specific services */ -void Genode::platform_add_local_services(Rpc_entrypoint &ep, - Sliced_heap &heap, - Registry &services, - Trace::Source_registry &trace_sources) +void Core::platform_add_local_services(Rpc_entrypoint &ep, + Sliced_heap &heap, + Registry &services, + Trace::Source_registry &trace_sources) { static Vm_root vm_root(ep, heap, core_env().ram_allocator(), core_env().local_rm(), trace_sources); diff --git a/repos/base-foc/src/core/spec/x86_32/ipc_pager.cc b/repos/base-foc/src/core/spec/x86_32/ipc_pager.cc index 98b8f5e02c..2b4b0fc477 100644 --- a/repos/base-foc/src/core/spec/x86_32/ipc_pager.cc +++ b/repos/base-foc/src/core/spec/x86_32/ipc_pager.cc @@ -16,7 +16,7 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; void Ipc_pager::get_regs(Foc_thread_state &state) const diff --git a/repos/base-foc/src/core/spec/x86_64/ipc_pager.cc b/repos/base-foc/src/core/spec/x86_64/ipc_pager.cc index 5f8ab39ba6..6184f46992 100644 --- a/repos/base-foc/src/core/spec/x86_64/ipc_pager.cc +++ b/repos/base-foc/src/core/spec/x86_64/ipc_pager.cc @@ -16,7 +16,7 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; void Ipc_pager::get_regs(Foc_thread_state &state) const diff --git a/repos/base-foc/src/core/thread_start.cc b/repos/base-foc/src/core/thread_start.cc index 4e14b56af3..5ea31a67cb 100644 --- a/repos/base-foc/src/core/thread_start.cc +++ b/repos/base-foc/src/core/thread_start.cc @@ -27,7 +27,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; void Thread::_deinit_platform_thread() @@ -65,9 +65,9 @@ void Thread::start() pt.start((void *)_thread_start, stack_top()); - struct Core_trace_source : public Trace::Source::Info_accessor, - private Trace::Control, - private Trace::Source + struct Core_trace_source : public Core::Trace::Source::Info_accessor, + private Core::Trace::Control, + private Core::Trace::Source { Thread &thread; Platform_thread &platform_thread; @@ -101,16 +101,16 @@ void Thread::start() thread._affinity }; } - Core_trace_source(Trace::Source_registry ®istry, Thread &t, + Core_trace_source(Core::Trace::Source_registry ®istry, Thread &t, Platform_thread &pt) : - Trace::Control(), - Trace::Source(*this, *this), thread(t), platform_thread(pt) + Core::Trace::Control(), + Core::Trace::Source(*this, *this), thread(t), platform_thread(pt) { registry.insert(this); } }; - new (platform().core_mem_alloc()) Core_trace_source(Trace::sources(), + new (platform().core_mem_alloc()) Core_trace_source(Core::Trace::sources(), *this, pt); } diff --git a/repos/base-foc/src/core/vm_session_component.cc b/repos/base-foc/src/core/vm_session_component.cc index f38f72fe4c..ab9a21e4b9 100644 --- a/repos/base-foc/src/core/vm_session_component.cc +++ b/repos/base-foc/src/core/vm_session_component.cc @@ -23,7 +23,7 @@ /* Fiasco.OC includes */ #include -using namespace Genode; +using namespace Core; struct Vcpu_creation_error : Exception { }; @@ -44,7 +44,7 @@ Vcpu::Vcpu(Rpc_entrypoint &ep, Foc::l4_msgtag_t msg = l4_factory_create_irq(Foc::L4_BASE_FACTORY_CAP, _recall.local.data()->kcap()); if (l4_error(msg)) { - Genode::error("vcpu irq creation failed", l4_error(msg)); + error("vcpu irq creation failed", l4_error(msg)); throw Vcpu_creation_error(); } @@ -108,7 +108,7 @@ Vm_session_component::Vm_session_component(Rpc_entrypoint &ep, l4_msgtag_t msg = l4_factory_create_vm(L4_BASE_FACTORY_CAP, _task_vcpu.local.data()->kcap()); if (l4_error(msg)) { - Genode::error("create_vm failed ", l4_error(msg)); + error("create_vm failed ", l4_error(msg)); throw Service_denied(); } @@ -194,7 +194,7 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc, L4_MAP_ITEM_MAP)); if (l4_error(msg)) - Genode::error("task map failed ", l4_error(msg)); + error("task map failed ", l4_error(msg)); page = flex.page(); } diff --git a/repos/base-hw/src/bootstrap/platform.cc b/repos/base-hw/src/bootstrap/platform.cc index 8f56824ac3..d5d39978ba 100644 --- a/repos/base-hw/src/bootstrap/platform.cc +++ b/repos/base-hw/src/bootstrap/platform.cc @@ -157,9 +157,9 @@ void Platform::start_core(unsigned cpu_id) } -static constexpr Genode::Boot_modules_header & header() +static constexpr Core::Boot_modules_header &header() { - return *((Genode::Boot_modules_header*) &_boot_modules_headers_begin); + return *((Core::Boot_modules_header*) &_boot_modules_headers_begin); } diff --git a/repos/base-hw/src/core/board/imx53_qsb/board.h b/repos/base-hw/src/core/board/imx53_qsb/board.h index 962cc85be4..b52725447b 100644 --- a/repos/base-hw/src/core/board/imx53_qsb/board.h +++ b/repos/base-hw/src/core/board/imx53_qsb/board.h @@ -19,7 +19,7 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include diff --git a/repos/base-hw/src/core/board/imx6q_sabrelite/board.h b/repos/base-hw/src/core/board/imx6q_sabrelite/board.h index f9aff439c5..1fa42eb3f2 100644 --- a/repos/base-hw/src/core/board/imx6q_sabrelite/board.h +++ b/repos/base-hw/src/core/board/imx6q_sabrelite/board.h @@ -18,7 +18,7 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include diff --git a/repos/base-hw/src/core/board/imx7d_sabre/board.h b/repos/base-hw/src/core/board/imx7d_sabre/board.h index 06feed0330..3cc36b534a 100644 --- a/repos/base-hw/src/core/board/imx7d_sabre/board.h +++ b/repos/base-hw/src/core/board/imx7d_sabre/board.h @@ -17,7 +17,7 @@ /* base-hw internal includes */ #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include diff --git a/repos/base-hw/src/core/board/nit6_solox/board.h b/repos/base-hw/src/core/board/nit6_solox/board.h index 54594b30f8..b6ce29d5b9 100644 --- a/repos/base-hw/src/core/board/nit6_solox/board.h +++ b/repos/base-hw/src/core/board/nit6_solox/board.h @@ -18,7 +18,7 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include diff --git a/repos/base-hw/src/core/board/pbxa9/board.h b/repos/base-hw/src/core/board/pbxa9/board.h index 2bd2291d4f..e39d046502 100644 --- a/repos/base-hw/src/core/board/pbxa9/board.h +++ b/repos/base-hw/src/core/board/pbxa9/board.h @@ -18,7 +18,7 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include diff --git a/repos/base-hw/src/core/board/pc/board.h b/repos/base-hw/src/core/board/pc/board.h index ea23d11889..69602e5855 100644 --- a/repos/base-hw/src/core/board/pc/board.h +++ b/repos/base-hw/src/core/board/pc/board.h @@ -25,7 +25,7 @@ */ namespace Board { using namespace Hw::Pc_board; }; -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include diff --git a/repos/base-hw/src/core/board/usb_armory/board.h b/repos/base-hw/src/core/board/usb_armory/board.h index d0f5d14745..3931899037 100644 --- a/repos/base-hw/src/core/board/usb_armory/board.h +++ b/repos/base-hw/src/core/board/usb_armory/board.h @@ -19,7 +19,7 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include diff --git a/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h b/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h index 1bc91cf43e..194cb4ecc8 100644 --- a/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h +++ b/repos/base-hw/src/core/board/virt_qemu_arm_v7a/board.h @@ -14,19 +14,13 @@ #ifndef _SRC__CORE__SPEC__VIRT__QEMU_H_ #define _SRC__CORE__SPEC__VIRT__QEMU_H_ -/* base-hw internal includes */ +/* base-hw core includes */ #include - -/* base-hw Core includes */ #include #include - -/* base-hw includes */ -#include - -/* base-hw Core includes */ #include #include +#include namespace Kernel { class Cpu; } diff --git a/repos/base-hw/src/core/board/virt_qemu_arm_v8a/board.h b/repos/base-hw/src/core/board/virt_qemu_arm_v8a/board.h index c79aaf5c66..064e7af7a6 100644 --- a/repos/base-hw/src/core/board/virt_qemu_arm_v8a/board.h +++ b/repos/base-hw/src/core/board/virt_qemu_arm_v8a/board.h @@ -16,15 +16,9 @@ /* base-hw internal includes */ #include - -/* base-hw Core includes */ #include #include - -/* base-hw includes */ #include - -/* base-hw Core includes */ #include #include #include diff --git a/repos/base-hw/src/core/board/wand_quad/board.h b/repos/base-hw/src/core/board/wand_quad/board.h index 288b9b0bc8..149e115a20 100644 --- a/repos/base-hw/src/core/board/wand_quad/board.h +++ b/repos/base-hw/src/core/board/wand_quad/board.h @@ -19,7 +19,7 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include diff --git a/repos/base-hw/src/core/core_log_out.cc b/repos/base-hw/src/core/core_log_out.cc index bced5302fd..a8d63f8869 100644 --- a/repos/base-hw/src/core/core_log_out.cc +++ b/repos/base-hw/src/core/core_log_out.cc @@ -13,18 +13,18 @@ */ /* Genode includes */ -#include #include /* base-internal includes */ #include #include +/* core includes */ #include #include #include -using namespace Genode; +using namespace Core; void Core_log::out(char const c) { Kernel::log(c); } diff --git a/repos/base-hw/src/core/core_region_map.cc b/repos/base-hw/src/core/core_region_map.cc index 0ceb40217e..4f48f89252 100644 --- a/repos/base-hw/src/core/core_region_map.cc +++ b/repos/base-hw/src/core/core_region_map.cc @@ -19,9 +19,8 @@ #include #include #include -#include -using namespace Genode; +using namespace Core; Region_map::Local_addr diff --git a/repos/base-hw/src/core/cpu_session_support.cc b/repos/base-hw/src/core/cpu_session_support.cc index caf2257c53..9b7bc77292 100644 --- a/repos/base-hw/src/core/cpu_session_support.cc +++ b/repos/base-hw/src/core/cpu_session_support.cc @@ -21,7 +21,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; Dataspace_capability Cpu_thread_component::utcb() diff --git a/repos/base-hw/src/core/cpu_thread_allocator.h b/repos/base-hw/src/core/cpu_thread_allocator.h index c0e4038836..885ef1b62d 100644 --- a/repos/base-hw/src/core/cpu_thread_allocator.h +++ b/repos/base-hw/src/core/cpu_thread_allocator.h @@ -15,13 +15,12 @@ #define _CORE__CPU_THREAD_ALLOCATOR_H_ /* Genode includes */ -#include #include /* core includes */ #include -namespace Genode { class Cpu_thread_allocator; } +namespace Core { class Cpu_thread_allocator; } /** @@ -31,7 +30,7 @@ namespace Genode { class Cpu_thread_allocator; } * are tiny objects, but in 'base-hw' they contain the whole kernel * object in addition. Thus we use the given allocator directly. */ -class Genode::Cpu_thread_allocator : public Allocator +class Core::Cpu_thread_allocator : public Allocator { private: diff --git a/repos/base-hw/src/core/io_mem_session_support.cc b/repos/base-hw/src/core/io_mem_session_support.cc index 90dde90a64..d408750c5d 100644 --- a/repos/base-hw/src/core/io_mem_session_support.cc +++ b/repos/base-hw/src/core/io_mem_session_support.cc @@ -15,7 +15,7 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; void Io_mem_session_component::_unmap_local(addr_t, size_t) { } diff --git a/repos/base-hw/src/core/irq_session_component.cc b/repos/base-hw/src/core/irq_session_component.cc index 4f710b1df2..16d988749a 100644 --- a/repos/base-hw/src/core/irq_session_component.cc +++ b/repos/base-hw/src/core/irq_session_component.cc @@ -23,7 +23,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; unsigned Irq_session_component::_find_irq_number(const char * const args) diff --git a/repos/base-hw/src/core/irq_session_component.h b/repos/base-hw/src/core/irq_session_component.h index 74ca09fa84..58cd896733 100644 --- a/repos/base-hw/src/core/irq_session_component.h +++ b/repos/base-hw/src/core/irq_session_component.h @@ -19,15 +19,16 @@ #include #include +/* core includes */ #include #include #include -namespace Genode { class Irq_session_component; } +namespace Core { class Irq_session_component; } -class Genode::Irq_session_component : public Rpc_object, - private List::Element +class Core::Irq_session_component : public Rpc_object, + private List::Element { private: diff --git a/repos/base-hw/src/core/kernel/cpu.h b/repos/base-hw/src/core/kernel/cpu.h index 3040aa6e2b..490759c7b5 100644 --- a/repos/base-hw/src/core/kernel/cpu.h +++ b/repos/base-hw/src/core/kernel/cpu.h @@ -15,8 +15,6 @@ #ifndef _CORE__KERNEL__CPU_H_ #define _CORE__KERNEL__CPU_H_ -#include - /* core includes */ #include #include @@ -66,7 +64,7 @@ namespace Kernel { */ #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" -class Kernel::Cpu : public Genode::Cpu, private Irq::Pool, private Timeout +class Kernel::Cpu : public Core::Cpu, private Irq::Pool, private Timeout { private: diff --git a/repos/base-hw/src/core/kernel/cpu_scheduler.cc b/repos/base-hw/src/core/kernel/cpu_scheduler.cc index c97d49285d..91ca63e258 100644 --- a/repos/base-hw/src/core/kernel/cpu_scheduler.cc +++ b/repos/base-hw/src/core/kernel/cpu_scheduler.cc @@ -11,7 +11,7 @@ * under the terms of the GNU Affero General Public License version 3. */ -#include +#include #include #include diff --git a/repos/base-hw/src/core/kernel/irq.h b/repos/base-hw/src/core/kernel/irq.h index 4472cb8cb8..9b8be0bf65 100644 --- a/repos/base-hw/src/core/kernel/irq.h +++ b/repos/base-hw/src/core/kernel/irq.h @@ -42,7 +42,7 @@ namespace Kernel { } -namespace Genode { +namespace Core { /** * Core front-end of a user interrupt @@ -182,11 +182,11 @@ class Kernel::User_irq : public Kernel::Irq * \param polarity low or high * \param sig capability of signal context */ - static capid_t syscall_create(Genode::Kernel_object & irq, - unsigned nr, - Genode::Irq_session::Trigger trigger, - Genode::Irq_session::Polarity polarity, - capid_t sig) + static capid_t syscall_create(Core::Kernel_object &irq, + unsigned nr, + Genode::Irq_session::Trigger trigger, + Genode::Irq_session::Polarity polarity, + capid_t sig) { return (capid_t)call(call_id_new_irq(), (Call_arg)&irq, nr, (trigger << 2) | polarity, sig); @@ -197,7 +197,7 @@ class Kernel::User_irq : public Kernel::Irq * * \param irq reference to constructible object */ - static void syscall_destroy(Genode::Kernel_object &irq) { + static void syscall_destroy(Core::Kernel_object &irq) { call(call_id_delete_irq(), (Call_arg) &irq); } Object &kernel_object() { return _kernel_object; } diff --git a/repos/base-hw/src/core/kernel/lock.cc b/repos/base-hw/src/core/kernel/lock.cc index 21ed98b44d..e5b199dec6 100644 --- a/repos/base-hw/src/core/kernel/lock.cc +++ b/repos/base-hw/src/core/kernel/lock.cc @@ -15,7 +15,7 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include diff --git a/repos/base-hw/src/core/kernel/main.cc b/repos/base-hw/src/core/kernel/main.cc index c9b371a0d1..c1788806b8 100644 --- a/repos/base-hw/src/core/kernel/main.cc +++ b/repos/base-hw/src/core/kernel/main.cc @@ -12,13 +12,8 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* base includes */ -#include - -/* base Core includes */ +/* core includes */ #include - -/* base-hw Core includes */ #include #include #include @@ -28,11 +23,7 @@ /* base-hw-internal includes */ #include - -namespace Kernel { - - class Main; -} +namespace Kernel { class Main; } class Kernel::Main @@ -52,10 +43,10 @@ class Kernel::Main Cpu_pool _cpu_pool; Irq::Pool _user_irq_pool { }; Board::Address_space_id_allocator _addr_space_id_alloc { }; - Genode::Core_platform_pd _core_platform_pd { _addr_space_id_alloc }; + Core::Core_platform_pd _core_platform_pd { _addr_space_id_alloc }; Genode::Constructible _core_main_thread { }; Board::Global_interrupt_controller _global_irq_ctrl { }; - Board::Serial _serial { Genode::Platform::mmio_to_virt(Board::UART_BASE), + Board::Serial _serial { Core::Platform::mmio_to_virt(Board::UART_BASE), Board::UART_CLOCK, SERIAL_BAUD_RATE }; @@ -65,7 +56,7 @@ class Kernel::Main public: - static Genode::Platform_pd &core_platform_pd(); + static Core::Platform_pd &core_platform_pd(); }; @@ -101,7 +92,7 @@ void Kernel::main_handle_kernel_entry() void Kernel::main_initialize_and_handle_kernel_entry() { - static_assert(sizeof(Genode::sizet_arithm_t) >= 2 * sizeof(size_t), + static_assert(sizeof(Core::sizet_arithm_t) >= 2 * sizeof(size_t), "Bad result type for size_t arithmetics."); using Boot_info = Hw::Boot_info; @@ -226,7 +217,7 @@ void Kernel::main_initialize_and_handle_kernel_entry() } -Genode::Platform_pd &Kernel::Main::core_platform_pd() +Core::Platform_pd &Kernel::Main::core_platform_pd() { return _instance->_core_platform_pd; } @@ -244,15 +235,14 @@ Kernel::time_t Kernel::main_read_idle_thread_execution_time(unsigned cpu_idx) } -Genode::Platform_pd & -Genode::Platform_thread::_kernel_main_get_core_platform_pd() +Core::Platform_pd &Core::Platform_thread::_kernel_main_get_core_platform_pd() { return Kernel::Main::core_platform_pd(); } -bool Genode::map_local(addr_t from_phys, addr_t to_virt, size_t num_pages, - Page_flags flags) +bool Core::map_local(addr_t from_phys, addr_t to_virt, size_t num_pages, + Page_flags flags) { return Kernel::Main::core_platform_pd().insert_translation( @@ -260,7 +250,7 @@ bool Genode::map_local(addr_t from_phys, addr_t to_virt, size_t num_pages, } -bool Genode::unmap_local(addr_t virt_addr, size_t num_pages) +bool Core::unmap_local(addr_t virt_addr, size_t num_pages) { Kernel::Main::core_platform_pd().flush( virt_addr, num_pages * get_page_size()); diff --git a/repos/base-hw/src/core/kernel/main.h b/repos/base-hw/src/core/kernel/main.h index fe5a8d3367..dd728ad2f6 100644 --- a/repos/base-hw/src/core/kernel/main.h +++ b/repos/base-hw/src/core/kernel/main.h @@ -14,7 +14,7 @@ #ifndef _KERNEL__MAIN_H_ #define _KERNEL__MAIN_H_ -/* base-hw Core includes */ +/* base-hw core includes */ #include namespace Kernel { diff --git a/repos/base-hw/src/core/kernel/object.h b/repos/base-hw/src/core/kernel/object.h index d54ece909d..441ce618a3 100644 --- a/repos/base-hw/src/core/kernel/object.h +++ b/repos/base-hw/src/core/kernel/object.h @@ -18,9 +18,9 @@ #include #include #include -#include /* core includes */ +#include #include #include diff --git a/repos/base-hw/src/core/kernel/pd.h b/repos/base-hw/src/core/kernel/pd.h index 4a82c0b71f..e2658b4b73 100644 --- a/repos/base-hw/src/core/kernel/pd.h +++ b/repos/base-hw/src/core/kernel/pd.h @@ -15,16 +15,13 @@ #ifndef _CORE__KERNEL__PD_H_ #define _CORE__KERNEL__PD_H_ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include #include -/* base includes */ -#include - -namespace Genode { class Platform_pd; } +namespace Core { class Platform_pd; } namespace Kernel { @@ -50,13 +47,13 @@ class Kernel::Pd Kernel::Object _kernel_object { *this }; Hw::Page_table &_table; - Genode::Platform_pd &_platform_pd; + Core::Platform_pd &_platform_pd; Capid_allocator _capid_alloc { }; Object_identity_reference_tree _cap_tree { }; public: - Genode::Cpu::Mmu_context mmu_regs; + Core::Cpu::Mmu_context mmu_regs; /** * Constructor @@ -65,7 +62,7 @@ class Kernel::Pd * \param platform_pd core object of the PD */ Pd(Hw::Page_table &table, - Genode::Platform_pd &platform_pd, + Core::Platform_pd &platform_pd, Board::Address_space_id_allocator &addr_space_id_alloc) : _table(table), @@ -82,15 +79,15 @@ class Kernel::Pd oir->~Object_identity_reference(); } - static capid_t syscall_create(Genode::Kernel_object &p, - Hw::Page_table &tt, - Genode::Platform_pd &pd) + static capid_t syscall_create(Core::Kernel_object &p, + Hw::Page_table &tt, + Core::Platform_pd &pd) { return (capid_t)call(call_id_new_pd(), (Call_arg)&p, (Call_arg)&tt, (Call_arg)&pd); } - static void syscall_destroy(Genode::Kernel_object & p) { + static void syscall_destroy(Core::Kernel_object & p) { call(call_id_delete_pd(), (Call_arg)&p); } /** @@ -105,7 +102,7 @@ class Kernel::Pd ***************/ Object &kernel_object() { return _kernel_object; } - Genode::Platform_pd &platform_pd() { return _platform_pd; } + Core::Platform_pd &platform_pd() { return _platform_pd; } Hw::Page_table &translation_table() { return _table; } Capid_allocator &capid_alloc() { return _capid_alloc; } Object_identity_reference_tree &cap_tree() { return _cap_tree; } diff --git a/repos/base-hw/src/core/kernel/signal_receiver.h b/repos/base-hw/src/core/kernel/signal_receiver.h index 2aabe24ef5..b583876253 100644 --- a/repos/base-hw/src/core/kernel/signal_receiver.h +++ b/repos/base-hw/src/core/kernel/signal_receiver.h @@ -16,8 +16,8 @@ /* Genode includes */ #include -#include +/* core includes */ #include #include @@ -199,7 +199,7 @@ class Kernel::Signal_context * * \retval capability id of the new kernel object */ - static capid_t syscall_create(Genode::Kernel_object &c, + static capid_t syscall_create(Core::Kernel_object &c, Signal_receiver & receiver, addr_t const imprint) { @@ -212,7 +212,7 @@ class Kernel::Signal_context * * \param context pointer to signal context kernel object */ - static void syscall_destroy(Genode::Kernel_object &c) { + static void syscall_destroy(Core::Kernel_object &c) { call(call_id_delete_signal_context(), (Call_arg)&c); } Object &kernel_object() { return _kernel_object; } @@ -282,7 +282,7 @@ class Kernel::Signal_receiver * * \retval capability id of the new kernel object */ - static capid_t syscall_create(Genode::Kernel_object &r) { + static capid_t syscall_create(Core::Kernel_object &r) { return (capid_t)call(call_id_new_signal_receiver(), (Call_arg)&r); } /** @@ -290,7 +290,7 @@ class Kernel::Signal_receiver * * \param receiver pointer to signal receiver kernel object */ - static void syscall_destroy(Genode::Kernel_object &r) { + static void syscall_destroy(Core::Kernel_object &r) { call(call_id_delete_signal_receiver(), (Call_arg)&r); } Object &kernel_object() { return _kernel_object; } diff --git a/repos/base-hw/src/core/kernel/thread.cc b/repos/base-hw/src/core/kernel/thread.cc index b11ce7deca..9371cab310 100644 --- a/repos/base-hw/src/core/kernel/thread.cc +++ b/repos/base-hw/src/core/kernel/thread.cc @@ -159,7 +159,7 @@ Tlb_invalidation::Tlb_invalidation(Inter_processor_work_list &global_work_list, } -Thread::Destroy::Destroy(Thread & caller, Genode::Kernel_object & to_delete) +Thread::Destroy::Destroy(Thread & caller, Core::Kernel_object & to_delete) : caller(caller), thread_to_destroy(to_delete) { @@ -302,7 +302,7 @@ Cpu_job * Thread::helping_destination() { size_t Thread::_core_to_kernel_quota(size_t const quota) const { using Genode::Cpu_session; - using Genode::sizet_arithm_t; + using Core::sizet_arithm_t; /* we assert at timer construction that cpu_quota_us in ticks fits size_t */ size_t const ticks = (size_t) @@ -445,8 +445,8 @@ void Thread::_call_yield_thread() void Thread::_call_delete_thread() { - Genode::Kernel_object & to_delete = - *(Genode::Kernel_object*)user_arg_1(); + Core::Kernel_object & to_delete = + *(Core::Kernel_object*)user_arg_1(); /** * Delete a thread immediately if it has no cpu assigned yet, @@ -469,8 +469,8 @@ void Thread::_call_delete_thread() void Thread::_call_delete_pd() { - Genode::Kernel_object & pd = - *(Genode::Kernel_object*)user_arg_1(); + Core::Kernel_object & pd = + *(Core::Kernel_object*)user_arg_1(); if (_cpu->active(pd->mmu_regs)) _cpu->switch_to(_core_pd.mmu_regs); @@ -851,8 +851,8 @@ void Thread::_call() case call_id_thread_pager(): _call_pager(); return; case call_id_invalidate_tlb(): _call_invalidate_tlb(); return; case call_id_new_pd(): - _call_new(*(Hw::Page_table *) user_arg_2(), - *(Genode::Platform_pd *) user_arg_3(), + _call_new(*(Hw::Page_table *) user_arg_2(), + *(Core::Platform_pd *) user_arg_3(), _addr_space_id_alloc); return; case call_id_delete_pd(): _call_delete_pd(); return; @@ -951,11 +951,11 @@ Core_main_thread(Board::Address_space_id_allocator &addr_space_id_alloc, Core_object( core_pd, addr_space_id_alloc, user_irq_pool, cpu_pool, core_pd, "core") { - using namespace Genode; + using namespace Core; - Genode::map_local(Platform::core_phys_addr((addr_t)&_utcb_instance), - (addr_t)utcb_main_thread(), - sizeof(Native_utcb) / get_page_size()); + map_local(Platform::core_phys_addr((addr_t)&_utcb_instance), + (addr_t)utcb_main_thread(), + sizeof(Native_utcb) / get_page_size()); _utcb_instance.cap_add(core_capid()); _utcb_instance.cap_add(cap_id_invalid()); diff --git a/repos/base-hw/src/core/kernel/thread.h b/repos/base-hw/src/core/kernel/thread.h index 604deba6bd..6cf4119b4e 100644 --- a/repos/base-hw/src/core/kernel/thread.h +++ b/repos/base-hw/src/core/kernel/thread.h @@ -14,12 +14,10 @@ #ifndef _CORE__KERNEL__THREAD_H_ #define _CORE__KERNEL__THREAD_H_ - /* Genode includes */ #include -#include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include @@ -101,7 +99,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout */ struct Destroy : Inter_processor_work { - using Kthread = Genode::Kernel_object; + using Kthread = Core::Kernel_object; Thread & caller; /* the caller gets blocked till the end */ Kthread & thread_to_destroy; /* thread to be destroyed */ @@ -300,8 +298,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout template void _call_new(ARGS &&... args) { - Genode::Kernel_object & kobj = - *(Genode::Kernel_object*)user_arg_1(); + Core::Kernel_object & kobj = *(Core::Kernel_object*)user_arg_1(); kobj.construct(_core_pd, args...); user_arg_0(kobj->core_capid()); } @@ -310,8 +307,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout template void _call_delete() { - Genode::Kernel_object & kobj = - *(Genode::Kernel_object*)user_arg_1(); + Core::Kernel_object & kobj = *(Core::Kernel_object*)user_arg_1(); kobj.destruct(); } @@ -321,7 +317,7 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout public: - Genode::Align_at regs; + Genode::Align_at regs; /** * Constructor @@ -388,10 +384,10 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout * * \retval capability id of the new kernel object */ - static capid_t syscall_create(Genode::Kernel_object & t, - unsigned const priority, - size_t const quota, - char const * const label) + static capid_t syscall_create(Core::Kernel_object &t, + unsigned const priority, + size_t const quota, + char const * const label) { return (capid_t)call(call_id_new_thread(), (Call_arg)&t, (Call_arg)priority, (Call_arg)quota, @@ -406,8 +402,8 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout * * \retval capability id of the new kernel object */ - static capid_t syscall_create(Genode::Kernel_object & t, - char const * const label) + static capid_t syscall_create(Core::Kernel_object &t, + char const * const label) { return (capid_t)call(call_id_new_core_thread(), (Call_arg)&t, (Call_arg)label); @@ -418,11 +414,13 @@ class Kernel::Thread : private Kernel::Object, public Cpu_job, private Timeout * * \param thread pointer to thread kernel object */ - static void syscall_destroy(Genode::Kernel_object & t) { + static void syscall_destroy(Core::Kernel_object &t) { call(call_id_delete_thread(), (Call_arg)&t); } + void print(Genode::Output &out) const; + /************** ** Ipc_node ** **************/ diff --git a/repos/base-hw/src/core/kernel/timer.cc b/repos/base-hw/src/core/kernel/timer.cc index 9337aca95f..3e3bff6113 100644 --- a/repos/base-hw/src/core/kernel/timer.cc +++ b/repos/base-hw/src/core/kernel/timer.cc @@ -11,7 +11,7 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Core includes */ +/* core includes */ #include #include #include diff --git a/repos/base-hw/src/core/kernel/vm.h b/repos/base-hw/src/core/kernel/vm.h index 040d92f893..3951981842 100644 --- a/repos/base-hw/src/core/kernel/vm.h +++ b/repos/base-hw/src/core/kernel/vm.h @@ -97,11 +97,11 @@ class Kernel::Vm : private Kernel::Object, public Cpu_job * * \retval cap id when successful, otherwise invalid cap id */ - static capid_t syscall_create(Genode::Kernel_object & vm, - unsigned cpu, - void * const state, - capid_t const signal_context_id, - Identity & id) + static capid_t syscall_create(Core::Kernel_object &vm, + unsigned cpu, + void * const state, + capid_t const signal_context_id, + Identity &id) { return (capid_t)call(call_id_new_vm(), (Call_arg)&vm, (Call_arg)cpu, (Call_arg)state, (Call_arg)&id, signal_context_id); @@ -114,7 +114,7 @@ class Kernel::Vm : private Kernel::Object, public Cpu_job * * \retval 0 when successful, otherwise !=0 */ - static void syscall_destroy(Genode::Kernel_object & vm) { + static void syscall_destroy(Core::Kernel_object & vm) { call(call_id_delete_vm(), (Call_arg) &vm); } Object &kernel_object() { return _kernel_object; } diff --git a/repos/base-hw/src/core/kernel_log.cc b/repos/base-hw/src/core/kernel_log.cc index ba8a59c91e..51c1ca28df 100644 --- a/repos/base-hw/src/core/kernel_log.cc +++ b/repos/base-hw/src/core/kernel_log.cc @@ -12,7 +12,7 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* base-hw Core includes */ +/* core includes */ #include #include diff --git a/repos/base-hw/src/core/map_local.h b/repos/base-hw/src/core/map_local.h index bfd701c8cd..214a91077e 100644 --- a/repos/base-hw/src/core/map_local.h +++ b/repos/base-hw/src/core/map_local.h @@ -14,9 +14,11 @@ #ifndef _CORE__MAP_LOCAL_H_ #define _CORE__MAP_LOCAL_H_ +/* core includes */ +#include #include -namespace Genode { +namespace Core { using Hw::Page_flags; diff --git a/repos/base-hw/src/core/native_pd_component.cc b/repos/base-hw/src/core/native_pd_component.cc index 710c28d792..7b8291e083 100644 --- a/repos/base-hw/src/core/native_pd_component.cc +++ b/repos/base-hw/src/core/native_pd_component.cc @@ -14,7 +14,7 @@ #include #include -using namespace Genode; +using namespace Core; void Native_pd_component::upgrade_cap_slab() diff --git a/repos/base-hw/src/core/native_pd_component.h b/repos/base-hw/src/core/native_pd_component.h index 36589cd75a..64cc1e41c7 100644 --- a/repos/base-hw/src/core/native_pd_component.h +++ b/repos/base-hw/src/core/native_pd_component.h @@ -18,17 +18,17 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include -namespace Genode { +namespace Core { class Pd_session_component; class Native_pd_component; } -class Genode::Native_pd_component : public Rpc_object +class Core::Native_pd_component : public Rpc_object { private: diff --git a/repos/base-hw/src/core/object.h b/repos/base-hw/src/core/object.h index 4267b4b7a0..e143c3aff9 100644 --- a/repos/base-hw/src/core/object.h +++ b/repos/base-hw/src/core/object.h @@ -14,29 +14,26 @@ #ifndef _CORE__OBJECT_H_ #define _CORE__OBJECT_H_ -/* Genode includes */ -#include - /* base-internal includes */ #include +/* core includes */ +#include + /* base-hw includes */ #include #include -namespace Genode { - - /** - * Represents a kernel object in core - * - * \param T type of the kernel object - */ - template class Kernel_object; -} +namespace Core { template class Kernel_object; } +/** + * Represents a kernel object in core + * + * \param T type of the kernel object + */ template -class Genode::Kernel_object : public Genode::Constructible> +class Core::Kernel_object : public Constructible> { protected: @@ -66,12 +63,12 @@ class Genode::Kernel_object : public Genode::Constructible>::construct(args...); + Constructible>::construct(args...); } ~Kernel_object() { - if (Genode::Constructible>::constructed()) + if (Constructible>::constructed()) T::syscall_destroy(*this); } @@ -83,7 +80,7 @@ class Genode::Kernel_object : public Genode::Constructible bool create(ARGS &&... args) { - if (Genode::Constructible>::constructed()) + if (Constructible>::constructed()) return false; _cap = Capability_space::import(T::syscall_create(*this, args...)); diff --git a/repos/base-hw/src/core/pager.cc b/repos/base-hw/src/core/pager.cc index e5cc671c91..a8e2b30d11 100644 --- a/repos/base-hw/src/core/pager.cc +++ b/repos/base-hw/src/core/pager.cc @@ -11,9 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes*/ #include #include @@ -23,7 +20,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; /*************** diff --git a/repos/base-hw/src/core/pager.h b/repos/base-hw/src/core/pager.h index 3387ae1f07..60c9a24474 100644 --- a/repos/base-hw/src/core/pager.h +++ b/repos/base-hw/src/core/pager.h @@ -21,14 +21,14 @@ #include #include -/* core-local includes */ +/* core includes */ #include #include #include #include #include -namespace Genode { +namespace Core { /** * Interface used by generic region_map code @@ -50,11 +50,13 @@ namespace Genode { */ class Pager_entrypoint; + using Pager_capability = Capability; + enum { PAGER_EP_STACK_SIZE = sizeof(addr_t) * 2048 }; } -class Genode::Ipc_pager +class Core::Ipc_pager { protected: @@ -91,8 +93,8 @@ class Genode::Ipc_pager }; -class Genode::Pager_object : private Object_pool::Entry, - private Genode::Kernel_object +class Core::Pager_object : private Object_pool::Entry, + private Kernel_object { friend class Pager_entrypoint; friend class Object_pool; @@ -171,9 +173,9 @@ class Genode::Pager_object : private Object_pool::Entry, }; -class Genode::Pager_entrypoint : public Object_pool, - public Thread, - private Ipc_pager +class Core::Pager_entrypoint : public Object_pool, + public Thread, + private Ipc_pager { private: diff --git a/repos/base-hw/src/core/platform.cc b/repos/base-hw/src/core/platform.cc index 71779a5fe8..a87b3dffce 100644 --- a/repos/base-hw/src/core/platform.cc +++ b/repos/base-hw/src/core/platform.cc @@ -13,11 +13,11 @@ */ -/* base Core includes */ +/* core includes */ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include @@ -34,10 +34,9 @@ #include /* base includes */ -#include #include -using namespace Genode; +using namespace Core; /************** @@ -155,8 +154,7 @@ void Platform::_init_platform_info() return; } - Genode::Xml_generator xml(reinterpret_cast(virt_addr), - rom_size, rom_name, [&] () + Xml_generator xml(reinterpret_cast(virt_addr), rom_size, rom_name, [&] () { xml.node("kernel", [&] () { xml.attribute("name", "hw"); diff --git a/repos/base-hw/src/core/platform.h b/repos/base-hw/src/core/platform.h index acbf059d0e..1a42cb13dd 100644 --- a/repos/base-hw/src/core/platform.h +++ b/repos/base-hw/src/core/platform.h @@ -30,20 +30,20 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include #include #include -namespace Genode { +namespace Core { class Address_space; class Platform; }; -class Genode::Platform : public Genode::Platform_generic +class Core::Platform : public Platform_generic { private: @@ -79,7 +79,7 @@ class Genode::Platform : public Genode::Platform_generic /** * Add additional platform-specific information. */ - void _init_additional_platform_info(Genode::Xml_generator &); + void _init_additional_platform_info(Xml_generator &); void _init_rom_modules(); diff --git a/repos/base-hw/src/core/platform_pd.cc b/repos/base-hw/src/core/platform_pd.cc index 3d258c1d3d..42109b09ae 100644 --- a/repos/base-hw/src/core/platform_pd.cc +++ b/repos/base-hw/src/core/platform_pd.cc @@ -21,7 +21,7 @@ #include #include -using namespace Genode; +using namespace Core; using Hw::Page_table; diff --git a/repos/base-hw/src/core/platform_pd.h b/repos/base-hw/src/core/platform_pd.h index db3383713e..5438f069db 100644 --- a/repos/base-hw/src/core/platform_pd.h +++ b/repos/base-hw/src/core/platform_pd.h @@ -15,7 +15,7 @@ #ifndef _CORE__PLATFORM_PD_H_ #define _CORE__PLATFORM_PD_H_ -/* base-hw Core includes */ +/* core includes */ #include #include #include @@ -29,7 +29,7 @@ namespace Hw { using namespace Kernel; - using namespace Genode; + using namespace Core; /** * Memory virtualization interface of a protection domain @@ -38,19 +38,19 @@ namespace Hw { } -namespace Genode { +namespace Core { class Platform_thread; /* forward declaration */ class Cap_space; /** - * Platform specific part of a Genode protection domain + * Platform specific part of a protection domain */ class Platform_pd; /** - * Platform specific part of Core's protection domain + * Platform specific part of core's protection domain */ class Core_platform_pd; @@ -58,7 +58,7 @@ namespace Genode { } -class Hw::Address_space : public Genode::Address_space +class Hw::Address_space : public Core::Address_space { private: @@ -68,19 +68,19 @@ class Hw::Address_space : public Genode::Address_space Address_space(Address_space const &); Address_space &operator = (Address_space const &); - friend class Genode::Platform; - friend class Genode::Mapped_mem_allocator; + friend class Core::Platform; + friend class Core::Mapped_mem_allocator; using Table = Hw::Page_table; using Array = Table::Allocator::Array; - Genode::Mutex _mutex { }; /* table lock */ + Mutex _mutex { }; /* table lock */ Table &_tt; /* table virt addr */ - Genode::addr_t _tt_phys; /* table phys addr */ + addr_t _tt_phys; /* table phys addr */ Array *_tt_array = nullptr; Table::Allocator &_tt_alloc; /* table allocator */ - static inline Genode::Core_mem_allocator &_cma(); + static inline Core_mem_allocator &_cma(); static inline void *_table_alloc(); @@ -119,11 +119,11 @@ class Hw::Address_space : public Genode::Address_space * \param size size of memory region * \param flags translation table flags (e.g. caching attributes) */ - bool insert_translation(Genode::addr_t virt, Genode::addr_t phys, - Genode::size_t size, Genode::Page_flags flags); + bool insert_translation(addr_t virt, addr_t phys, + size_t size, Page_flags flags); + + bool lookup_rw_translation(addr_t const virt, addr_t & phys); - bool lookup_rw_translation(Genode::addr_t const virt, - Genode::addr_t & phys); /***************************** ** Address-space interface ** @@ -138,13 +138,13 @@ class Hw::Address_space : public Genode::Address_space ** Accessors ** ***************/ - Kernel::Pd & kernel_pd() { return *_kobj; } - Hw::Page_table & translation_table() { return _tt; } - Genode::addr_t translation_table_phys() { return _tt_phys; } + Kernel::Pd &kernel_pd() { return *_kobj; } + Hw::Page_table &translation_table() { return _tt; } + addr_t translation_table_phys() { return _tt_phys; } }; -class Genode::Cap_space +class Core::Cap_space { private: @@ -166,8 +166,7 @@ class Genode::Cap_space }; -class Genode::Platform_pd : public Hw::Address_space, - private Cap_space +class Core::Platform_pd : public Hw::Address_space, private Cap_space { private: @@ -230,7 +229,7 @@ class Genode::Platform_pd : public Hw::Address_space, }; -struct Genode::Core_platform_pd : Genode::Platform_pd +struct Core::Core_platform_pd : Platform_pd { Core_platform_pd(Board::Address_space_id_allocator &addr_space_id_alloc); }; diff --git a/repos/base-hw/src/core/platform_thread.cc b/repos/base-hw/src/core/platform_thread.cc index fac3d8551c..d625457c16 100644 --- a/repos/base-hw/src/core/platform_thread.cc +++ b/repos/base-hw/src/core/platform_thread.cc @@ -27,7 +27,7 @@ #include #include -using namespace Genode; +using namespace Core; void Platform_thread::_init() { } @@ -199,7 +199,7 @@ void Platform_thread::pager(Pager_object &pager) } -Genode::Pager_object &Platform_thread::pager() +Core::Pager_object &Platform_thread::pager() { if (_pager) return *_pager; diff --git a/repos/base-hw/src/core/platform_thread.h b/repos/base-hw/src/core/platform_thread.h index e7e5b5e259..6b30135abb 100644 --- a/repos/base-hw/src/core/platform_thread.h +++ b/repos/base-hw/src/core/platform_thread.h @@ -31,17 +31,19 @@ #include #include -namespace Genode { +namespace Core { class Pager_object; - class Thread_state; class Rm_client; class Platform_thread; class Platform_pd; } -class Genode::Platform_thread : Noncopyable +namespace Genode { class Thread_state; } + + +class Core::Platform_thread : Noncopyable { private: @@ -130,9 +132,7 @@ class Genode::Platform_thread : Noncopyable /** * Join a protection domain * - * \param pd platform pd object pointer - * \param main_thread wether thread is the first in protection domain - * \param address_space corresponding Genode address space + * \param main_thread whether thread is the first in protection domain * * This function has no effect when called more twice for a * given thread. @@ -207,7 +207,7 @@ class Genode::Platform_thread : Noncopyable */ Trace::Execution_time execution_time() const { - Genode::uint64_t execution_time = + uint64_t execution_time = const_cast(this)->_kobj->execution_time(); return { execution_time, 0, _quota, _priority }; } diff --git a/repos/base-hw/src/core/ram_dataspace_support.cc b/repos/base-hw/src/core/ram_dataspace_support.cc index 74e86ca880..39c617a4b8 100644 --- a/repos/base-hw/src/core/ram_dataspace_support.cc +++ b/repos/base-hw/src/core/ram_dataspace_support.cc @@ -12,15 +12,12 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include #include -using namespace Genode; +using namespace Core; void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &) { } diff --git a/repos/base-hw/src/core/region_map_support.cc b/repos/base-hw/src/core/region_map_support.cc index a90926a355..3f6620bf8f 100644 --- a/repos/base-hw/src/core/region_map_support.cc +++ b/repos/base-hw/src/core/region_map_support.cc @@ -12,18 +12,14 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include -using namespace Genode; +using namespace Core; -/********************** - ** Pager_entrypoint ** - **********************/ - void Pager_entrypoint::entry() { Untyped_capability cap; @@ -43,7 +39,7 @@ void Pager_entrypoint::entry() /* fetch fault data */ Platform_thread * const pt = (Platform_thread *)po->badge(); if (!pt) { - Genode::warning("failed to get platform thread of faulter"); + warning("failed to get platform thread of faulter"); continue; } diff --git a/repos/base-hw/src/core/rpc_cap_factory.h b/repos/base-hw/src/core/rpc_cap_factory.h index d8cfb3839c..078ecfc6a1 100644 --- a/repos/base-hw/src/core/rpc_cap_factory.h +++ b/repos/base-hw/src/core/rpc_cap_factory.h @@ -20,27 +20,25 @@ #include #include #include -#include -/* core-local includes */ +/* core includes */ #include #include /* base-internal includes */ #include -namespace Genode { class Rpc_cap_factory; } +namespace Core { class Rpc_cap_factory; } -class Genode::Rpc_cap_factory +class Core::Rpc_cap_factory { private: /** * Kernel object placeholder held in a list */ - struct Kobject - : List::Element + struct Kobject : List::Element { using O = Kernel::Core_object_identity; diff --git a/repos/base-hw/src/core/signal_broker.h b/repos/base-hw/src/core/signal_broker.h index 29460fc762..673a1ada01 100644 --- a/repos/base-hw/src/core/signal_broker.h +++ b/repos/base-hw/src/core/signal_broker.h @@ -17,13 +17,13 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include -namespace Genode { class Signal_broker; } +namespace Core { class Signal_broker; } -class Genode::Signal_broker +class Core::Signal_broker { private: diff --git a/repos/base-hw/src/core/signal_source_component.h b/repos/base-hw/src/core/signal_source_component.h index c5d49a9e2a..ba732dff13 100644 --- a/repos/base-hw/src/core/signal_source_component.h +++ b/repos/base-hw/src/core/signal_source_component.h @@ -17,12 +17,12 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include #include #include -namespace Genode { +namespace Core { class Signal_context_component; class Signal_source_component; @@ -32,8 +32,8 @@ namespace Genode { } -struct Genode::Signal_context_component : private Kernel_object, - public Signal_context_pool::Entry +struct Core::Signal_context_component : private Kernel_object, + public Signal_context_pool::Entry { friend class Object_pool; @@ -46,8 +46,8 @@ struct Genode::Signal_context_component : private Kernel_object, - public Signal_source_pool::Entry +struct Core::Signal_source_component : private Kernel_object, + public Signal_source_pool::Entry { friend class Object_pool; friend class Signal_context_component; @@ -67,8 +67,8 @@ struct Genode::Signal_source_component : private Kernel_object(CALLED_FROM_CORE, s.signal_receiver(), diff --git a/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc index 3f188d8d7c..ad18867824 100644 --- a/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc +++ b/repos/base-hw/src/core/spec/arm/cortex_a9_global_timer.cc @@ -19,7 +19,7 @@ #include #include -using namespace Genode; +using namespace Core; using namespace Kernel; using Device = Board::Timer; diff --git a/repos/base-hw/src/core/spec/arm/cpu.cc b/repos/base-hw/src/core/spec/arm/cpu.cc index 7c8c722e31..e30604871a 100644 --- a/repos/base-hw/src/core/spec/arm/cpu.cc +++ b/repos/base-hw/src/core/spec/arm/cpu.cc @@ -14,12 +14,12 @@ /* base includes */ #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include -using namespace Genode; +using namespace Core; Arm_cpu::Context::Context(bool privileged) @@ -46,7 +46,7 @@ Mmu_context(addr_t table, { } -Genode::Arm_cpu::Mmu_context::~Mmu_context() +Core::Arm_cpu::Mmu_context::~Mmu_context() { /* flush TLB by ASID */ Cpu::Tlbiasid::write(id()); @@ -147,8 +147,8 @@ void Arm_cpu::cache_coherent_region(addr_t const base, }; /* take the smallest cacheline, either from I-, or D-cache */ - size_t const cache_line_size = Genode::min(Cpu::instruction_cache_line_size(), - Cpu::data_cache_line_size()); + size_t const cache_line_size = min(Cpu::instruction_cache_line_size(), + Cpu::data_cache_line_size()); cache_maintainance(base, size, cache_line_size, lambda); } diff --git a/repos/base-hw/src/core/spec/arm/cpu_support.h b/repos/base-hw/src/core/spec/arm/cpu_support.h index 33d63848be..76ba1aca30 100644 --- a/repos/base-hw/src/core/spec/arm/cpu_support.h +++ b/repos/base-hw/src/core/spec/arm/cpu_support.h @@ -32,13 +32,13 @@ namespace Kernel { struct Thread_fault; } -namespace Genode { - using sizet_arithm_t = Genode::uint64_t; +namespace Core { + using sizet_arithm_t = uint64_t; struct Arm_cpu; } -struct Genode::Arm_cpu : public Hw::Arm_cpu +struct Core::Arm_cpu : public Hw::Arm_cpu { struct Fpu_context { diff --git a/repos/base-hw/src/core/spec/arm/generic_timer.cc b/repos/base-hw/src/core/spec/arm/generic_timer.cc index 18695b6306..efdc010751 100644 --- a/repos/base-hw/src/core/spec/arm/generic_timer.cc +++ b/repos/base-hw/src/core/spec/arm/generic_timer.cc @@ -21,7 +21,7 @@ using namespace Kernel; unsigned Timer::interrupt_id() const { return Board::TIMER_IRQ; } -unsigned long Board::Timer::_freq() { return Genode::Cpu::Cntfrq::read(); } +unsigned long Board::Timer::_freq() { return Core::Cpu::Cntfrq::read(); } Board::Timer::Timer(unsigned) : ticks_per_ms((unsigned)(_freq() / 1000)) diff --git a/repos/base-hw/src/core/spec/arm/gicv2.cc b/repos/base-hw/src/core/spec/arm/gicv2.cc index ff6ab9ff7b..8dd4c05ac0 100644 --- a/repos/base-hw/src/core/spec/arm/gicv2.cc +++ b/repos/base-hw/src/core/spec/arm/gicv2.cc @@ -15,7 +15,7 @@ #include #include -using namespace Genode; +using namespace Core; Hw::Gicv2::Gicv2() diff --git a/repos/base-hw/src/core/spec/arm/gicv3.cc b/repos/base-hw/src/core/spec/arm/gicv3.cc index 6ca86a3842..54e3fe2ef1 100644 --- a/repos/base-hw/src/core/spec/arm/gicv3.cc +++ b/repos/base-hw/src/core/spec/arm/gicv3.cc @@ -15,10 +15,10 @@ #include #include -using namespace Genode; +using namespace Core; -static inline Genode::addr_t redistributor_addr() +static inline addr_t redistributor_addr() { return Platform::mmio_to_virt(Board::Cpu_mmio::IRQ_CONTROLLER_REDIST_BASE + (Cpu::executing_id() * 0x20000)); diff --git a/repos/base-hw/src/core/spec/arm/imx_epit.cc b/repos/base-hw/src/core/spec/arm/imx_epit.cc index 34e3b126ac..9dae247282 100644 --- a/repos/base-hw/src/core/spec/arm/imx_epit.cc +++ b/repos/base-hw/src/core/spec/arm/imx_epit.cc @@ -19,7 +19,7 @@ #include -using namespace Genode; +using namespace Core; using namespace Kernel; diff --git a/repos/base-hw/src/core/spec/arm/imx_tzic.cc b/repos/base-hw/src/core/spec/arm/imx_tzic.cc index a0c9a2eade..1eef97f6ec 100644 --- a/repos/base-hw/src/core/spec/arm/imx_tzic.cc +++ b/repos/base-hw/src/core/spec/arm/imx_tzic.cc @@ -15,7 +15,7 @@ #include #include -using namespace Genode; +using namespace Core; Hw::Pic::Pic() : Mmio(Platform::mmio_to_virt(Board::IRQ_CONTROLLER_BASE)) { } diff --git a/repos/base-hw/src/core/spec/arm/kernel/lock.cc b/repos/base-hw/src/core/spec/arm/kernel/lock.cc index f017b7e93d..5815eb209d 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/lock.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/lock.cc @@ -15,7 +15,7 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include diff --git a/repos/base-hw/src/core/spec/arm/kernel/panic.cc b/repos/base-hw/src/core/spec/arm/kernel/panic.cc index 95da36f159..04dfa6094a 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/panic.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/panic.cc @@ -11,7 +11,7 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* base-hw Core includes */ +/* base-hw core includes */ #include diff --git a/repos/base-hw/src/core/spec/arm/kernel/thread.cc b/repos/base-hw/src/core/spec/arm/kernel/thread.cc index 9628aedff3..c353745e46 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/thread.cc @@ -15,7 +15,7 @@ /* base includes */ #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include diff --git a/repos/base-hw/src/core/spec/arm/kernel/thread_caches.cc b/repos/base-hw/src/core/spec/arm/kernel/thread_caches.cc index d73d8848fc..c9c7d4c38e 100644 --- a/repos/base-hw/src/core/spec/arm/kernel/thread_caches.cc +++ b/repos/base-hw/src/core/spec/arm/kernel/thread_caches.cc @@ -11,7 +11,7 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include @@ -54,7 +54,7 @@ void Kernel::Thread::_call_cache_coherent_region() { for_cachelines((addr_t)user_arg_1(), (size_t)user_arg_2(), *this, [] (addr_t addr, size_t size) { - Genode::Cpu::cache_coherent_region(addr, size); }); + Core::Cpu::cache_coherent_region(addr, size); }); } @@ -62,7 +62,7 @@ void Kernel::Thread::_call_cache_clean_invalidate_data_region() { for_cachelines((addr_t)user_arg_1(), (size_t)user_arg_2(), *this, [] (addr_t addr, size_t size) { - Genode::Cpu::cache_clean_invalidate_data_region(addr, size); }); + Core::Cpu::cache_clean_invalidate_data_region(addr, size); }); } @@ -70,12 +70,12 @@ void Kernel::Thread::_call_cache_invalidate_data_region() { for_cachelines((addr_t)user_arg_1(), (size_t)user_arg_2(), *this, [] (addr_t addr, size_t size) { - Genode::Cpu::cache_invalidate_data_region(addr, size); }); + Core::Cpu::cache_invalidate_data_region(addr, size); }); } void Kernel::Thread::_call_cache_line_size() { - size_t const cache_line_size = Genode::Cpu::cache_line_size(); + size_t const cache_line_size = Core::Cpu::cache_line_size(); user_arg_0(cache_line_size); } diff --git a/repos/base-hw/src/core/spec/arm/platform_support.cc b/repos/base-hw/src/core/spec/arm/platform_support.cc index 8890fb0d3d..7d952ffe85 100644 --- a/repos/base-hw/src/core/spec/arm/platform_support.cc +++ b/repos/base-hw/src/core/spec/arm/platform_support.cc @@ -14,13 +14,13 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; void Platform::_init_io_port_alloc() { }; -void Platform::_init_additional_platform_info(Genode::Xml_generator&) { } +void Platform::_init_additional_platform_info(Xml_generator&) { } long Platform::irq(long const user_irq) { return user_irq; } diff --git a/repos/base-hw/src/core/spec/arm/trustzone_board.h b/repos/base-hw/src/core/spec/arm/trustzone_board.h index a40e3e791f..d49287f960 100644 --- a/repos/base-hw/src/core/spec/arm/trustzone_board.h +++ b/repos/base-hw/src/core/spec/arm/trustzone_board.h @@ -14,13 +14,17 @@ #ifndef _CORE__SPEC__ARM_TRUSTZONE_BOARD_H_ #define _CORE__SPEC__ARM_TRUSTZONE_BOARD_H_ +/* Genode includes */ #include +/* core includes */ +#include + namespace Kernel { class Cpu; } namespace Board { - using Genode::Vm_state; + using Core::Vm_state; enum { VCPU_MAX = 1 }; diff --git a/repos/base-hw/src/core/spec/arm/virtualization/board.h b/repos/base-hw/src/core/spec/arm/virtualization/board.h index e89c563e6f..028f063d82 100644 --- a/repos/base-hw/src/core/spec/arm/virtualization/board.h +++ b/repos/base-hw/src/core/spec/arm/virtualization/board.h @@ -14,13 +14,15 @@ #ifndef _CORE__SPEC__ARM__VIRTUALIZATION__BOARD_H_ #define _CORE__SPEC__ARM__VIRTUALIZATION__BOARD_H_ -/* base-hw Core includes */ +/* core includes */ #include #include /* base-hw internal includes */ #include +namespace Genode { struct Vm_state; } + namespace Board { using Vm_page_table = Hw::Level_1_stage_2_translation_table; diff --git a/repos/base-hw/src/core/spec/arm/virtualization/gicv2.cc b/repos/base-hw/src/core/spec/arm/virtualization/gicv2.cc index 39e7687c06..14db8b4f6f 100644 --- a/repos/base-hw/src/core/spec/arm/virtualization/gicv2.cc +++ b/repos/base-hw/src/core/spec/arm/virtualization/gicv2.cc @@ -11,8 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ +/* Genode includes */ #include +/* core includes */ #include #include @@ -21,7 +23,7 @@ using Board::Pic; Pic::Gich::Gich() : - Genode::Mmio(Genode::Platform::mmio_to_virt(Board::Cpu_mmio::IRQ_CONTROLLER_VT_CTRL_BASE)) + Genode::Mmio(Core::Platform::mmio_to_virt(Board::Cpu_mmio::IRQ_CONTROLLER_VT_CTRL_BASE)) { } diff --git a/repos/base-hw/src/core/spec/arm/virtualization/gicv2.h b/repos/base-hw/src/core/spec/arm/virtualization/gicv2.h index 3044f69789..cbd28ecafb 100644 --- a/repos/base-hw/src/core/spec/arm/virtualization/gicv2.h +++ b/repos/base-hw/src/core/spec/arm/virtualization/gicv2.h @@ -27,6 +27,8 @@ class Board::Pic : public Hw::Gicv2 { private: + using uint32_t = Genode::uint32_t; + struct Gich : Genode::Mmio { struct Gich_hcr : Register<0x00, 32> { }; @@ -44,12 +46,12 @@ class Board::Pic : public Hw::Gicv2 struct Virtual_context { - Genode::uint32_t lr { 0 }; - Genode::uint32_t apr { 0 }; - Genode::uint32_t vmcr { 0x4c0000 }; - Genode::uint32_t misr { 0 }; - Genode::uint32_t eisr { 0 }; - Genode::uint32_t elrsr { 0xffffffff }; + uint32_t lr { 0 }; + uint32_t apr { 0 }; + uint32_t vmcr { 0x4c0000 }; + uint32_t misr { 0 }; + uint32_t eisr { 0 }; + uint32_t elrsr { 0xffffffff }; }; bool ack_virtual_irq(Virtual_context & c); diff --git a/repos/base-hw/src/core/spec/arm/virtualization/gicv3.h b/repos/base-hw/src/core/spec/arm/virtualization/gicv3.h index 459ff18f5d..f8f11cbf1e 100644 --- a/repos/base-hw/src/core/spec/arm/virtualization/gicv3.h +++ b/repos/base-hw/src/core/spec/arm/virtualization/gicv3.h @@ -27,13 +27,17 @@ class Board::Pic : public Hw::Pic { public: - struct Virtual_context { - Genode::uint64_t lr { 0 }; - Genode::uint32_t apr { 0 }; - Genode::uint32_t vmcr { 0x4c0000 }; - Genode::uint32_t misr { 0 }; - Genode::uint32_t eisr { 0 }; - Genode::uint32_t elrsr { 0xffffffff }; + using uint32_t = Genode::uint32_t; + using uint64_t = Genode::uint64_t; + + struct Virtual_context + { + uint64_t lr { 0 }; + uint32_t apr { 0 }; + uint32_t vmcr { 0x4c0000 }; + uint32_t misr { 0 }; + uint32_t eisr { 0 }; + uint32_t elrsr { 0xffffffff }; }; bool ack_virtual_irq(Virtual_context & c) diff --git a/repos/base-hw/src/core/spec/arm/virtualization/platform_services.cc b/repos/base-hw/src/core/spec/arm/virtualization/platform_services.cc index 3053a6047b..67c15ca117 100644 --- a/repos/base-hw/src/core/spec/arm/virtualization/platform_services.cc +++ b/repos/base-hw/src/core/spec/arm/virtualization/platform_services.cc @@ -13,7 +13,6 @@ /* Genode includes */ #include -#include /* core includes */ #include @@ -24,20 +23,20 @@ #include #include +using namespace Core; -extern Genode::addr_t hypervisor_exception_vector; + +extern addr_t hypervisor_exception_vector; /* * Add ARM virtualization specific vm service */ -void Genode::platform_add_local_services(Rpc_entrypoint &ep, - Sliced_heap &sh, - Registry &services, - Trace::Source_registry &trace_sources) +void Core::platform_add_local_services(Rpc_entrypoint &ep, + Sliced_heap &sh, + Registry &services, + Core::Trace::Source_registry &trace_sources) { - using namespace Genode; - map_local(Platform::core_phys_addr((addr_t)&hypervisor_exception_vector), Hw::Mm::hypervisor_exception_vector().base, Hw::Mm::hypervisor_exception_vector().size / get_page_size(), diff --git a/repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.cc b/repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.cc index 8edbc971f3..94fc8886c5 100644 --- a/repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.cc +++ b/repos/base-hw/src/core/spec/arm/virtualization/vm_session_component.cc @@ -24,7 +24,7 @@ #include #include -using namespace Genode; +using namespace Core; static Core_mem_allocator & cma() { @@ -42,10 +42,10 @@ void Vm_session_component::_attach(addr_t phys_addr, addr_t vm_addr, size_t size _table_array.alloc()); return; } catch(Hw::Out_of_tables &) { - Genode::error("Translation table needs to much RAM"); + error("Translation table needs to much RAM"); } catch(...) { - Genode::error("Invalid mapping ", Genode::Hex(phys_addr), " -> ", - Genode::Hex(vm_addr), " (", size, ")"); + error("Invalid mapping ", Hex(phys_addr), " -> ", + Hex(vm_addr), " (", size, ")"); } } @@ -87,7 +87,7 @@ void * Vm_session_component::_alloc_table() } -using Vmid_allocator = Genode::Bit_allocator<256>; +using Vmid_allocator = Bit_allocator<256>; static Vmid_allocator &alloc() { diff --git a/repos/base-hw/src/core/spec/arm_v6/cpu.h b/repos/base-hw/src/core/spec/arm_v6/cpu.h index fae5dcc532..042c9a6eac 100644 --- a/repos/base-hw/src/core/spec/arm_v6/cpu.h +++ b/repos/base-hw/src/core/spec/arm_v6/cpu.h @@ -15,20 +15,20 @@ #ifndef _CORE__SPEC__ARM_V6__CPU_H_ #define _CORE__SPEC__ARM_V6__CPU_H_ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include -namespace Genode { struct Cpu; } +namespace Core { struct Cpu; } -struct Genode::Cpu : Arm_cpu +struct Core::Cpu : Arm_cpu { static inline void synchronization_barrier() {} static inline size_t data_cache_line_size() { - struct Ctr : Genode::Register<32> { + struct Ctr : Register<32> { struct D_min_line : Bitfield<12,2> {}; }; @@ -44,7 +44,7 @@ struct Genode::Cpu : Arm_cpu static inline size_t instruction_cache_line_size() { - struct Ctr : Genode::Register<32> { + struct Ctr : Register<32> { struct I_min_line : Bitfield<0,2> {}; }; @@ -59,8 +59,7 @@ struct Genode::Cpu : Arm_cpu } static inline size_t cache_line_size() { - return Genode::min(data_cache_line_size(), - instruction_cache_line_size()); } + return min(data_cache_line_size(), instruction_cache_line_size()); } }; #endif /* _CORE__SPEC__ARM_V6__CPU_H_ */ diff --git a/repos/base-hw/src/core/spec/arm_v6/translation_table.h b/repos/base-hw/src/core/spec/arm_v6/translation_table.h index 11fb9ba0b4..fb2e2446bc 100644 --- a/repos/base-hw/src/core/spec/arm_v6/translation_table.h +++ b/repos/base-hw/src/core/spec/arm_v6/translation_table.h @@ -29,7 +29,7 @@ constexpr bool Hw::Page_table::Descriptor_base::_smp() { return false; } void Hw::Page_table::_table_changed(unsigned long addr, unsigned long size) { - Genode::Arm_cpu::cache_clean_data_region(addr, size); + Core::Arm_cpu::cache_clean_data_region(addr, size); } #endif /* _CORE__SPEC__ARM_V6__TRANSLATION_TABLE_H_ */ diff --git a/repos/base-hw/src/core/spec/arm_v7/cpu_support.h b/repos/base-hw/src/core/spec/arm_v7/cpu_support.h index 8b0ddf515b..b798999e30 100644 --- a/repos/base-hw/src/core/spec/arm_v7/cpu_support.h +++ b/repos/base-hw/src/core/spec/arm_v7/cpu_support.h @@ -17,10 +17,10 @@ /* core includes */ #include -namespace Genode { struct Arm_v7_cpu; } +namespace Core { struct Arm_v7_cpu; } -struct Genode::Arm_v7_cpu : Arm_cpu +struct Core::Arm_v7_cpu : Arm_cpu { /** * Returns whether this cpu implements the multiprocessor extensions @@ -50,7 +50,7 @@ struct Genode::Arm_v7_cpu : Arm_cpu static inline size_t data_cache_line_size() { - struct Ctr : Genode::Register<32> { + struct Ctr : Register<32> { struct D_min_line : Bitfield<16,4> {}; }; @@ -66,7 +66,7 @@ struct Genode::Arm_v7_cpu : Arm_cpu static inline size_t instruction_cache_line_size() { - struct Ctr : Genode::Register<32> { + struct Ctr : Register<32> { struct I_min_line : Bitfield<0,4> {}; }; @@ -82,8 +82,7 @@ struct Genode::Arm_v7_cpu : Arm_cpu static inline size_t cache_line_size() { - return Genode::min(data_cache_line_size(), - instruction_cache_line_size()); } + return min(data_cache_line_size(), instruction_cache_line_size()); } }; #endif /* _CORE__SPEC__ARM_V7__CPU_SUPPORT_H_ */ diff --git a/repos/base-hw/src/core/spec/arm_v7/trustzone/platform_services.cc b/repos/base-hw/src/core/spec/arm_v7/trustzone/platform_services.cc index 1b3fa24c08..8b5e07f7c8 100644 --- a/repos/base-hw/src/core/spec/arm_v7/trustzone/platform_services.cc +++ b/repos/base-hw/src/core/spec/arm_v7/trustzone/platform_services.cc @@ -15,7 +15,7 @@ #include #include -/* Core includes */ +/* core includes */ #include #include #include @@ -30,10 +30,10 @@ extern int monitor_mode_exception_vector; /* * Add TrustZone specific vm service */ -void Genode::platform_add_local_services(Rpc_entrypoint &ep, - Sliced_heap &sliced_heap, - Registry &local_services, - Trace::Source_registry &trace_sources) +void Core::platform_add_local_services(Rpc_entrypoint &ep, + Sliced_heap &sliced_heap, + Registry &local_services, + Core::Trace::Source_registry &trace_sources) { static addr_t const phys_base = Platform::core_phys_addr((addr_t)&monitor_mode_exception_vector); diff --git a/repos/base-hw/src/core/spec/arm_v7/trustzone/vm_session_component.cc b/repos/base-hw/src/core/spec/arm_v7/trustzone/vm_session_component.cc index eb2e462221..33b8546c8d 100644 --- a/repos/base-hw/src/core/spec/arm_v7/trustzone/vm_session_component.cc +++ b/repos/base-hw/src/core/spec/arm_v7/trustzone/vm_session_component.cc @@ -18,7 +18,7 @@ #include #include -using namespace Genode; +using namespace Core; static Board::Vm_page_table_array & dummy_array() diff --git a/repos/base-hw/src/core/spec/arm_v7/virtualization/hypervisor.h b/repos/base-hw/src/core/spec/arm_v7/virtualization/hypervisor.h index 0be63044db..c60890a614 100644 --- a/repos/base-hw/src/core/spec/arm_v7/virtualization/hypervisor.h +++ b/repos/base-hw/src/core/spec/arm_v7/virtualization/hypervisor.h @@ -14,7 +14,8 @@ #ifndef _SPEC__ARM_V7__VIRTUALIZATION_HYPERVISOR_H_ #define _SPEC__ARM_V7__VIRTUALIZATION_HYPERVISOR_H_ -#include +/* core includes */ +#include #include namespace Hypervisor { @@ -43,7 +44,7 @@ namespace Hypervisor { } - inline void switch_world(Genode::Vm_state & vm_state, + inline void switch_world(Core::Vm_state & vm_state, Host_context & host_state) { hypervisor_call(WORLD_SWITCH, diff --git a/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc b/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc index 65ada78c56..dc0f45d846 100644 --- a/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc +++ b/repos/base-hw/src/core/spec/arm_v7/virtualization/kernel/vm.cc @@ -11,7 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -#include #include #include diff --git a/repos/base-hw/src/core/spec/arm_v8/cpu.cc b/repos/base-hw/src/core/spec/arm_v8/cpu.cc index 617b7fd70b..7db1cd9bdb 100644 --- a/repos/base-hw/src/core/spec/arm_v8/cpu.cc +++ b/repos/base-hw/src/core/spec/arm_v8/cpu.cc @@ -15,31 +15,32 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include +using namespace Core; -Genode::Cpu::Context::Context(bool privileged) + +Cpu::Context::Context(bool privileged) { Spsr::El::set(pstate, privileged ? 1 : 0); } -bool Genode::Cpu::active(Mmu_context & mmu_context) +bool Cpu::active(Mmu_context & mmu_context) { return (mmu_context.id() == Ttbr::Asid::get(Ttbr0_el1::read())); } -void Genode::Cpu::switch_to(Mmu_context & mmu_context) +void Cpu::switch_to(Mmu_context & mmu_context) { Ttbr0_el1::write(mmu_context.ttbr); } -void Genode::Cpu::mmu_fault(Genode::Cpu::Context &, - Kernel::Thread_fault & fault) +void Cpu::mmu_fault(Cpu::Context &, Kernel::Thread_fault & fault) { Esr::access_t esr = Esr_el1::read(); @@ -54,57 +55,55 @@ void Genode::Cpu::mmu_fault(Genode::Cpu::Context &, ? Kernel::Thread_fault::WRITE : Kernel::Thread_fault::EXEC; return; default: - Genode::raw("MMU-fault not handled ESR=", Genode::Hex(esr)); + raw("MMU-fault not handled ESR=", Hex(esr)); fault.type = Kernel::Thread_fault::UNKNOWN; }; } -Genode::Cpu::Mmu_context:: -Mmu_context(addr_t table, - Board::Address_space_id_allocator &addr_space_id_alloc) +Cpu::Mmu_context::Mmu_context(addr_t table, + Board::Address_space_id_allocator &id_alloc) : - _addr_space_id_alloc(addr_space_id_alloc), + _addr_space_id_alloc(id_alloc), ttbr(Ttbr::Baddr::masked(table)) { - Ttbr::Asid::set(ttbr, (Genode::uint16_t)_addr_space_id_alloc.alloc()); + Ttbr::Asid::set(ttbr, (uint16_t)_addr_space_id_alloc.alloc()); } -Genode::Cpu::Mmu_context::~Mmu_context() +Cpu::Mmu_context::~Mmu_context() { _addr_space_id_alloc.free(id()); } -Genode::size_t Genode::Cpu::cache_line_size() +size_t Cpu::cache_line_size() { - static Genode::size_t cache_line_size = 0; + static size_t cache_line_size = 0; if (!cache_line_size) { - Genode::size_t i = 1 << Ctr_el0::I_min_line::get(Ctr_el0::read()); - Genode::size_t d = 1 << Ctr_el0::D_min_line::get(Ctr_el0::read()); - cache_line_size = Genode::min(i,d) * 4; /* word size is fixed in ARM */ + size_t i = 1 << Ctr_el0::I_min_line::get(Ctr_el0::read()); + size_t d = 1 << Ctr_el0::D_min_line::get(Ctr_el0::read()); + cache_line_size = min(i,d) * 4; /* word size is fixed in ARM */ } return cache_line_size; } template -static inline void cache_maintainance(Genode::addr_t const base, - Genode::size_t const size, +static inline void cache_maintainance(addr_t const base, + size_t const size, FUNC & func) { - Genode::addr_t start = (Genode::addr_t) base; - Genode::addr_t const end = base + size; - for (; start < end; start += Genode::Cpu::cache_line_size()) func(start); + addr_t start = (addr_t) base; + addr_t const end = base + size; + for (; start < end; start += Cpu::cache_line_size()) func(start); } -void Genode::Cpu::cache_coherent_region(addr_t const base, - size_t const size) +void Cpu::cache_coherent_region(addr_t const base, size_t const size) { - Genode::memory_barrier(); + memory_barrier(); auto lambda = [] (addr_t const base) { asm volatile("dc cvau, %0" :: "r" (base)); @@ -118,10 +117,10 @@ void Genode::Cpu::cache_coherent_region(addr_t const base, } -void Genode::Cpu::cache_clean_invalidate_data_region(addr_t const base, - size_t const size) +void Cpu::cache_clean_invalidate_data_region(addr_t const base, + size_t const size) { - Genode::memory_barrier(); + memory_barrier(); auto lambda = [] (addr_t const base) { asm volatile("dc civac, %0" :: "r" (base)); }; @@ -133,10 +132,9 @@ void Genode::Cpu::cache_clean_invalidate_data_region(addr_t const base, } -void Genode::Cpu::cache_invalidate_data_region(addr_t const base, - size_t const size) +void Cpu::cache_invalidate_data_region(addr_t const base, size_t const size) { - Genode::memory_barrier(); + memory_barrier(); auto lambda = [] (addr_t const base) { asm volatile("dc ivac, %0" :: "r" (base)); }; @@ -148,11 +146,10 @@ void Genode::Cpu::cache_invalidate_data_region(addr_t const base, } -void Genode::Cpu::clear_memory_region(addr_t const addr, - size_t const size, +void Cpu::clear_memory_region(addr_t const addr, size_t const size, bool changed_cache_properties) { - Genode::memory_barrier(); + memory_barrier(); /* normal memory is cleared by D-cache zeroing */ auto normal = [] (addr_t const base) { diff --git a/repos/base-hw/src/core/spec/arm_v8/cpu.h b/repos/base-hw/src/core/spec/arm_v8/cpu.h index b9ff4dbde6..473652b8b2 100644 --- a/repos/base-hw/src/core/spec/arm_v8/cpu.h +++ b/repos/base-hw/src/core/spec/arm_v8/cpu.h @@ -21,10 +21,11 @@ /* base internal includes */ #include +/* core includes */ +#include + /* base-hw internal includes */ #include - -/* base-hw Core includes */ #include #include @@ -34,7 +35,7 @@ namespace Kernel { struct Thread_fault; } namespace Board { class Address_space_id_allocator; } -namespace Genode { +namespace Core { struct Cpu; using sizet_arithm_t = __uint128_t; @@ -42,7 +43,7 @@ namespace Genode { } -struct Genode::Cpu : Hw::Arm_64_cpu +struct Core::Cpu : Hw::Arm_64_cpu { enum Exception_entry { SYNC_LEVEL_EL1 = 0x000, @@ -66,16 +67,16 @@ struct Genode::Cpu : Hw::Arm_64_cpu struct alignas(16) Fpu_state { - Genode::uint128_t q[32]; - Genode::uint64_t fpsr; - Genode::uint64_t fpcr; + uint128_t q[32]; + uint64_t fpsr; + uint64_t fpcr; }; struct alignas(16) Context : Cpu_state { - Genode::uint64_t pstate { }; - Genode::uint64_t exception_type { RESET }; - Fpu_state fpu_state { }; + uint64_t pstate { }; + uint64_t exception_type { RESET }; + Fpu_state fpu_state { }; Context(bool privileged); }; @@ -95,8 +96,7 @@ struct Genode::Cpu : Hw::Arm_64_cpu ~Mmu_context(); - Genode::uint16_t id() { - return Ttbr::Asid::get(ttbr) & 0xffff; } + uint16_t id() { return Ttbr::Asid::get(ttbr) & 0xffff; } }; bool active(Mmu_context &); diff --git a/repos/base-hw/src/core/spec/arm_v8/pd_session_support.cc b/repos/base-hw/src/core/spec/arm_v8/pd_session_support.cc index c23e68c7ab..dcc06a59a2 100644 --- a/repos/base-hw/src/core/spec/arm_v8/pd_session_support.cc +++ b/repos/base-hw/src/core/spec/arm_v8/pd_session_support.cc @@ -15,7 +15,7 @@ #include #include -using namespace Genode; +using namespace Core; using State = Genode::Pd_session::Managing_system_state; diff --git a/repos/base-hw/src/core/spec/arm_v8/virtualization/kernel/vm.cc b/repos/base-hw/src/core/spec/arm_v8/virtualization/kernel/vm.cc index cc07859602..f196f4bb1a 100644 --- a/repos/base-hw/src/core/spec/arm_v8/virtualization/kernel/vm.cc +++ b/repos/base-hw/src/core/spec/arm_v8/virtualization/kernel/vm.cc @@ -11,7 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -#include #include #include diff --git a/repos/base-hw/src/core/spec/cortex_a15/cpu.cc b/repos/base-hw/src/core/spec/cortex_a15/cpu.cc index 7a582d49ef..0bd9ffea7a 100644 --- a/repos/base-hw/src/core/spec/cortex_a15/cpu.cc +++ b/repos/base-hw/src/core/spec/cortex_a15/cpu.cc @@ -11,23 +11,24 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include +using namespace Core; -Genode::Cpu::Mmu_context:: -Mmu_context(addr_t table, - Board::Address_space_id_allocator &addr_space_id_alloc) + +Cpu::Mmu_context::Mmu_context(addr_t table, + Board::Address_space_id_allocator &id_alloc) : - _addr_space_id_alloc(addr_space_id_alloc), + _addr_space_id_alloc(id_alloc), ttbr0(Ttbr_64bit::Ba::masked((Ttbr_64bit::access_t)table)) { - Ttbr_64bit::Asid::set(ttbr0, (Genode::uint8_t)addr_space_id_alloc.alloc()); + Ttbr_64bit::Asid::set(ttbr0, (uint8_t)_addr_space_id_alloc.alloc()); } -Genode::Cpu::Mmu_context::~Mmu_context() +Cpu::Mmu_context::~Mmu_context() { /* flush TLB by ASID */ Cpu::Tlbiasid::write(id()); @@ -35,8 +36,7 @@ Genode::Cpu::Mmu_context::~Mmu_context() } -void Genode::Cpu::mmu_fault_status(Genode::Cpu::Fsr::access_t fsr, - Kernel::Thread_fault & fault) +void Cpu::mmu_fault_status(Cpu::Fsr::access_t fsr, Kernel::Thread_fault &fault) { enum { FAULT_MASK = 0b111100, diff --git a/repos/base-hw/src/core/spec/cortex_a15/cpu.h b/repos/base-hw/src/core/spec/cortex_a15/cpu.h index fe49dd58b9..0e75037d21 100644 --- a/repos/base-hw/src/core/spec/cortex_a15/cpu.h +++ b/repos/base-hw/src/core/spec/cortex_a15/cpu.h @@ -15,14 +15,14 @@ #ifndef _CORE__SPEC__CORTEX_A15__CPU_H_ #define _CORE__SPEC__CORTEX_A15__CPU_H_ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include -namespace Genode { class Cpu; } +namespace Core { class Cpu; } -class Genode::Cpu : public Arm_v7_cpu +class Core::Cpu : public Arm_v7_cpu { public: @@ -101,7 +101,7 @@ class Genode::Cpu : public Arm_v7_cpu ~Mmu_context(); - Genode::uint8_t id() const + uint8_t id() const { return (uint8_t)Ttbr_64bit::Asid::get(ttbr0); } diff --git a/repos/base-hw/src/core/spec/cortex_a8/cpu.h b/repos/base-hw/src/core/spec/cortex_a8/cpu.h index b59b787248..1132b6e901 100644 --- a/repos/base-hw/src/core/spec/cortex_a8/cpu.h +++ b/repos/base-hw/src/core/spec/cortex_a8/cpu.h @@ -15,10 +15,10 @@ #ifndef _CORE__SPEC__CORTEX_A8__CPU_H_ #define _CORE__SPEC__CORTEX_A8__CPU_H_ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include -namespace Genode { using Cpu = Arm_v7_cpu; } +namespace Core { using Cpu = Arm_v7_cpu; } #endif /* _CORE__SPEC__CORTEX_A8__CPU_H_ */ diff --git a/repos/base-hw/src/core/spec/cortex_a8/translation_table.h b/repos/base-hw/src/core/spec/cortex_a8/translation_table.h index 1898f5261f..e1fb29b0a5 100644 --- a/repos/base-hw/src/core/spec/cortex_a8/translation_table.h +++ b/repos/base-hw/src/core/spec/cortex_a8/translation_table.h @@ -18,7 +18,7 @@ /* base-hw internal includes */ #include -/* base-hw Core includes */ +/* base-hw core includes */ #include @@ -38,7 +38,7 @@ void Hw::Page_table::_table_changed(unsigned long addr, unsigned long size) * page table entry is added. We only do this as core as the kernel * adds translations solely before MMU and caches are enabled. */ - Genode::Arm_cpu::cache_clean_data_region(addr, size); + Core::Arm_cpu::cache_clean_data_region(addr, size); } #endif /* _CORE__SPEC__CORTEX_A8__TRANSLATION_TABLE_H_ */ diff --git a/repos/base-hw/src/core/spec/cortex_a9/board.cc b/repos/base-hw/src/core/spec/cortex_a9/board.cc index c0dcf9b7dd..d603998330 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/board.cc +++ b/repos/base-hw/src/core/spec/cortex_a9/board.cc @@ -11,13 +11,14 @@ * under the terms of the GNU Affero General Public License version 3. */ +/* core includes */ #include #include Board::L2_cache & Board::l2_cache() { - using namespace Genode; + using namespace Core; static L2_cache cache(Platform::mmio_to_virt(Board::PL310_MMIO_BASE)); return cache; diff --git a/repos/base-hw/src/core/spec/cortex_a9/cpu.cc b/repos/base-hw/src/core/spec/cortex_a9/cpu.cc index 0272eb5d6a..aff904f29e 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/cpu.cc +++ b/repos/base-hw/src/core/spec/cortex_a9/cpu.cc @@ -12,13 +12,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include -void Genode::Cpu::cache_clean_invalidate_data_region(addr_t const base, - size_t const size) +void Core::Cpu::cache_clean_invalidate_data_region(addr_t const base, + size_t const size) { Arm_cpu::cache_clean_invalidate_data_region(base, size); Board::l2_cache().clean_invalidate(); diff --git a/repos/base-hw/src/core/spec/cortex_a9/cpu.h b/repos/base-hw/src/core/spec/cortex_a9/cpu.h index 18fe5c246d..62fcc75144 100644 --- a/repos/base-hw/src/core/spec/cortex_a9/cpu.h +++ b/repos/base-hw/src/core/spec/cortex_a9/cpu.h @@ -15,14 +15,14 @@ #ifndef _CORE__SPEC__CORTEX_A9__CPU_H_ #define _CORE__SPEC__CORTEX_A9__CPU_H_ -/* base-hw Core includes */ +/* base-hw core includes */ #include #include -namespace Genode { struct Cpu; } +namespace Core { struct Cpu; } -struct Genode::Cpu : Arm_v7_cpu +struct Core::Cpu : Arm_v7_cpu { /** * Clean and invalidate data-cache for virtual region diff --git a/repos/base-hw/src/core/spec/riscv/cpu.cc b/repos/base-hw/src/core/spec/riscv/cpu.cc index e2e77f2aa5..df9495c743 100644 --- a/repos/base-hw/src/core/spec/riscv/cpu.cc +++ b/repos/base-hw/src/core/spec/riscv/cpu.cc @@ -15,15 +15,17 @@ /* base-hw internal includes */ #include -/* base-hw Core includes */ +/* base-hw core includes */ #include #include #include -using Mmu_context = Genode::Cpu::Mmu_context; +using Mmu_context = Core::Cpu::Mmu_context; + +using namespace Core; -Genode::Cpu::Context::Context(bool) +Cpu::Context::Context(bool) { /* * initialize cpu_exception with something that gets ignored in @@ -33,13 +35,12 @@ Genode::Cpu::Context::Context(bool) } -Mmu_context:: -Mmu_context(addr_t page_table_base, - Board::Address_space_id_allocator &addr_space_id_alloc) +Mmu_context::Mmu_context(addr_t page_table_base, + Board::Address_space_id_allocator &id_alloc) : - _addr_space_id_alloc(addr_space_id_alloc) + _addr_space_id_alloc(id_alloc) { - Satp::Asid::set(satp, (Genode::uint8_t)_addr_space_id_alloc.alloc()); + Satp::Asid::set(satp, (uint8_t)_addr_space_id_alloc.alloc()); Satp::Ppn::set(satp, page_table_base >> 12); Satp::Mode::set(satp, 8); } @@ -53,31 +54,30 @@ Mmu_context::~Mmu_context() } -bool Genode::Cpu::active(Mmu_context & context) +bool Cpu::active(Mmu_context &context) { return Satp::read() == context.satp; } -void Genode::Cpu::switch_to(Mmu_context & context) +void Cpu::switch_to(Mmu_context &context) { Satp::write(context.satp); sfence(); } -void Genode::Cpu::mmu_fault(Context &, Kernel::Thread_fault & f) +void Cpu::mmu_fault(Context &, Kernel::Thread_fault &f) { - f.addr = Genode::Cpu::Stval::read(); + f.addr = Cpu::Stval::read(); f.type = Kernel::Thread_fault::PAGE_MISSING; } -void Genode::Cpu::clear_memory_region(addr_t const addr, - size_t const size, bool) +void Cpu::clear_memory_region(addr_t const addr, size_t const size, bool) { memset((void*)addr, 0, size); /* FIXME: is this really necessary? */ - Genode::Cpu::sfence(); + Cpu::sfence(); } diff --git a/repos/base-hw/src/core/spec/riscv/cpu.h b/repos/base-hw/src/core/spec/riscv/cpu.h index d719abcb1c..3b1b79fff0 100644 --- a/repos/base-hw/src/core/spec/riscv/cpu.h +++ b/repos/base-hw/src/core/spec/riscv/cpu.h @@ -26,7 +26,8 @@ #include #include -/* base-hw Core includes */ +/* base-hw core includes */ +#include #include #include @@ -36,7 +37,7 @@ namespace Kernel { struct Thread_fault; } namespace Board { class Address_space_id_allocator; } -namespace Genode { +namespace Core { /** * CPU driver for core @@ -50,11 +51,11 @@ namespace Genode { namespace Kernel { class Pd; } -class Genode::Cpu : public Hw::Riscv_cpu +class Core::Cpu : public Hw::Riscv_cpu { public: - struct alignas(8) Context : Cpu_state + struct alignas(8) Context : Genode::Cpu_state { Context(bool); }; @@ -69,8 +70,7 @@ class Genode::Cpu : public Hw::Riscv_cpu Satp::access_t satp = 0; - Mmu_context(addr_t page_table_base, - Board::Address_space_id_allocator &addr_space_id_alloc); + Mmu_context(addr_t page_table_base, Board::Address_space_id_allocator &); ~Mmu_context(); }; @@ -112,7 +112,7 @@ class Genode::Cpu : public Hw::Riscv_cpu template void Sv39::Level_x_translation_table::_translation_added(addr_t, size_t) { - Genode::Cpu::sfence(); + Core::Cpu::sfence(); } diff --git a/repos/base-hw/src/core/spec/riscv/kernel/interface.cc b/repos/base-hw/src/core/spec/riscv/kernel/interface.cc index 5e2d2f3d11..65691bf312 100644 --- a/repos/base-hw/src/core/spec/riscv/kernel/interface.cc +++ b/repos/base-hw/src/core/spec/riscv/kernel/interface.cc @@ -21,7 +21,6 @@ /* Genode includes */ #include -#include #include using namespace Kernel; diff --git a/repos/base-hw/src/core/spec/riscv/kernel/pd.cc b/repos/base-hw/src/core/spec/riscv/kernel/pd.cc index 8f7d00d38f..d2396b990b 100644 --- a/repos/base-hw/src/core/spec/riscv/kernel/pd.cc +++ b/repos/base-hw/src/core/spec/riscv/kernel/pd.cc @@ -16,7 +16,7 @@ bool Kernel::Pd::invalidate_tlb(Kernel::Cpu&, addr_t, size_t) { - Genode::Cpu::sfence(); + Core::Cpu::sfence(); return false; } diff --git a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc index 4f95ff17e7..fbbd300cc6 100644 --- a/repos/base-hw/src/core/spec/riscv/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/riscv/kernel/thread.cc @@ -30,8 +30,8 @@ void Cpu::Halt_job::proceed(Kernel::Cpu &) { } void Thread::exception(Cpu & cpu) { - using Context = Genode::Cpu::Context; - using Stval = Genode::Cpu::Stval; + using Context = Core::Cpu::Context; + using Stval = Core::Cpu::Stval; if (regs->is_irq()) { /* cpu-local timer interrupt */ @@ -89,7 +89,7 @@ void Thread::exception(Cpu & cpu) default: Genode::raw(*this, ": unhandled exception ", regs->cpu_exception, " at ip=", (void*)regs->ip, - " addr=", Genode::Hex(Genode::Cpu::Stval::read())); + " addr=", Genode::Hex(Core::Cpu::Stval::read())); _die(); } } diff --git a/repos/base-hw/src/core/spec/riscv/pic.cc b/repos/base-hw/src/core/spec/riscv/pic.cc index a08b09daf4..d915e338d3 100644 --- a/repos/base-hw/src/core/spec/riscv/pic.cc +++ b/repos/base-hw/src/core/spec/riscv/pic.cc @@ -11,14 +11,13 @@ * under the terms of the GNU Affero General Public License version 3. */ - #include #include #include Board::Pic::Pic(Global_interrupt_controller &) : - _plic(Genode::Platform::mmio_to_virt(Board::PLIC_BASE)) + _plic(Core::Platform::mmio_to_virt(Board::PLIC_BASE)) { /* enable external interrupts */ enum { SEIE = 0x200 }; diff --git a/repos/base-hw/src/core/spec/riscv/platform_support.cc b/repos/base-hw/src/core/spec/riscv/platform_support.cc index d9cb1ada00..6cba39462c 100644 --- a/repos/base-hw/src/core/spec/riscv/platform_support.cc +++ b/repos/base-hw/src/core/spec/riscv/platform_support.cc @@ -16,13 +16,13 @@ #include #include -using namespace Genode; +using namespace Core; void Platform::_init_io_port_alloc() { } -void Platform::_init_additional_platform_info(Genode::Xml_generator&) { } +void Platform::_init_additional_platform_info(Xml_generator &) { } long Platform::irq(long const user_irq ) { return user_irq; } diff --git a/repos/base-hw/src/core/spec/riscv/timer.cc b/repos/base-hw/src/core/spec/riscv/timer.cc index 5a8c84b6c1..06ba8b1457 100644 --- a/repos/base-hw/src/core/spec/riscv/timer.cc +++ b/repos/base-hw/src/core/spec/riscv/timer.cc @@ -11,7 +11,7 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Core includes */ +/* core includes */ #include #include #include diff --git a/repos/base-hw/src/core/spec/riscv/timer.h b/repos/base-hw/src/core/spec/riscv/timer.h index b1d4c37aab..38f9f2bf58 100644 --- a/repos/base-hw/src/core/spec/riscv/timer.h +++ b/repos/base-hw/src/core/spec/riscv/timer.h @@ -16,6 +16,8 @@ /* Genode includes */ #include + +/* core includes */ #include namespace Board { class Timer; } diff --git a/repos/base-hw/src/core/spec/x86_64/address_space_id_allocator.h b/repos/base-hw/src/core/spec/x86_64/address_space_id_allocator.h index e87f581b9b..cb1c4b52b7 100644 --- a/repos/base-hw/src/core/spec/x86_64/address_space_id_allocator.h +++ b/repos/base-hw/src/core/spec/x86_64/address_space_id_allocator.h @@ -17,9 +17,6 @@ /* base includes */ #include -namespace Board { - - class Address_space_id_allocator { }; -} +namespace Board { class Address_space_id_allocator { }; } #endif /* _X86_64__ADDRESS_SPACE_ID_ALLOCATOR_H_ */ diff --git a/repos/base-hw/src/core/spec/x86_64/bios_data_area.cc b/repos/base-hw/src/core/spec/x86_64/bios_data_area.cc index 79ca36d108..d93f6a6254 100644 --- a/repos/base-hw/src/core/spec/x86_64/bios_data_area.cc +++ b/repos/base-hw/src/core/spec/x86_64/bios_data_area.cc @@ -18,4 +18,4 @@ using namespace Genode; -addr_t Bios_data_area::_mmio_base_virt() { return Platform::mmio_to_virt(0); } +addr_t Bios_data_area::_mmio_base_virt() { return Core::Platform::mmio_to_virt(0); } diff --git a/repos/base-hw/src/core/spec/x86_64/cpu.cc b/repos/base-hw/src/core/spec/x86_64/cpu.cc index 689e4f9e3d..d1e240568c 100644 --- a/repos/base-hw/src/core/spec/x86_64/cpu.cc +++ b/repos/base-hw/src/core/spec/x86_64/cpu.cc @@ -19,6 +19,8 @@ extern int __idt; extern int __idt_end; +using namespace Core; + /** * Pseudo Descriptor @@ -27,15 +29,15 @@ extern int __idt_end; */ struct Pseudo_descriptor { - Genode::uint16_t const limit = 0; - Genode::uint64_t const base = 0; + uint16_t const limit = 0; + uint64_t const base = 0; + + constexpr Pseudo_descriptor(uint16_t l, uint64_t b) : limit(l), base(b) {} - constexpr Pseudo_descriptor(Genode::uint16_t l, Genode::uint64_t b) - : limit(l), base(b) {} } __attribute__((packed)); -Genode::Cpu::Context::Context(bool core) +Cpu::Context::Context(bool core) { eflags = EFLAGS_IF_SET; cs = core ? 0x8 : 0x1b; @@ -43,19 +45,18 @@ Genode::Cpu::Context::Context(bool core) } -Genode::Cpu::Mmu_context::Mmu_context(addr_t table, - Board::Address_space_id_allocator &) +Cpu::Mmu_context::Mmu_context(addr_t table, Board::Address_space_id_allocator &) : cr3(Cr3::Pdb::masked(table)) { } -void Genode::Cpu::Tss::init() +void Cpu::Tss::init() { enum { TSS_SELECTOR = 0x28, }; asm volatile ("ltr %w0" : : "r" (TSS_SELECTOR)); } -void Genode::Cpu::Idt::init() +void Cpu::Idt::init() { Pseudo_descriptor descriptor { (uint16_t)((addr_t)&__idt_end - (addr_t)&__idt), @@ -64,7 +65,7 @@ void Genode::Cpu::Idt::init() } -void Genode::Cpu::Gdt::init(addr_t tss_addr) +void Cpu::Gdt::init(addr_t tss_addr) { tss_desc[0] = ((((tss_addr >> 24) & 0xff) << 24 | ((tss_addr >> 16) & 0xff) | @@ -79,7 +80,7 @@ void Genode::Cpu::Gdt::init(addr_t tss_addr) } -void Genode::Cpu::mmu_fault(Context & regs, Kernel::Thread_fault & fault) +void Cpu::mmu_fault(Context ®s, Kernel::Thread_fault &fault) { using Fault = Kernel::Thread_fault::Type; @@ -102,30 +103,30 @@ void Genode::Cpu::mmu_fault(Context & regs, Kernel::Thread_fault & fault) else return Fault::UNKNOWN; }; - fault.addr = Genode::Cpu::Cr2::read(); + fault.addr = Cpu::Cr2::read(); fault.type = fault_lambda(regs.errcode); } extern void const * const kernel_stack; -extern Genode::size_t const kernel_stack_size; +extern size_t const kernel_stack_size; -bool Genode::Cpu::active(Mmu_context &mmu_context) +bool Cpu::active(Mmu_context &mmu_context) { return (mmu_context.cr3 == Cr3::read()); } -void Genode::Cpu::switch_to(Mmu_context &mmu_context) +void Cpu::switch_to(Mmu_context &mmu_context) { Cr3::write(mmu_context.cr3); } -void Genode::Cpu::switch_to(Context & context) +void Cpu::switch_to(Context &context) { - tss.ist[0] = (addr_t)&context + sizeof(Genode::Cpu_state); + tss.ist[0] = (addr_t)&context + sizeof(Cpu_state); addr_t const stack_base = reinterpret_cast(&kernel_stack); context.kernel_stack = stack_base + @@ -134,7 +135,7 @@ void Genode::Cpu::switch_to(Context & context) } -unsigned Genode::Cpu::executing_id() +unsigned Cpu::executing_id() { void * const stack_ptr = nullptr; addr_t const stack_addr = reinterpret_cast(&stack_ptr); @@ -146,15 +147,14 @@ unsigned Genode::Cpu::executing_id() } -void Genode::Cpu::clear_memory_region(Genode::addr_t const addr, - Genode::size_t const size, bool) +void Cpu::clear_memory_region(addr_t const addr, size_t const size, bool) { if (align_addr(addr, 3) == addr && align_addr(size, 3) == size) { - Genode::addr_t start = addr; - Genode::size_t count = size / 8; + addr_t start = addr; + size_t count = size / 8; asm volatile ("rep stosq" : "+D" (start), "+c" (count) : "a" (0) : "memory"); } else { - Genode::memset((void*)addr, 0, size); + memset((void*)addr, 0, size); } } diff --git a/repos/base-hw/src/core/spec/x86_64/cpu.h b/repos/base-hw/src/core/spec/x86_64/cpu.h index 781fa38373..b303a3b51b 100644 --- a/repos/base-hw/src/core/spec/x86_64/cpu.h +++ b/repos/base-hw/src/core/spec/x86_64/cpu.h @@ -27,7 +27,8 @@ /* base internal includes */ #include -/* base-hw Core includes */ +/* core includes */ +#include #include #include #include @@ -38,14 +39,14 @@ namespace Kernel { struct Thread_fault; } namespace Board { class Address_space_id_allocator; } -namespace Genode { +namespace Core { class Cpu; using sizet_arithm_t = __uint128_t; } -class Genode::Cpu : public Hw::X86_64_cpu +class Core::Cpu : public Hw::X86_64_cpu { public: @@ -136,9 +137,7 @@ class Genode::Cpu : public Hw::X86_64_cpu /** * Invalidate the whole TLB */ - static void invalidate_tlb() { - Genode::Cpu::Cr3::write(Genode::Cpu::Cr3::read()); } - + static void invalidate_tlb() { Cr3::write(Cr3::read()); } static void clear_memory_region(addr_t const addr, size_t const size, diff --git a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc index 3d0c2c61ea..361246bd5a 100644 --- a/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/x86_64/kernel/thread.cc @@ -63,7 +63,7 @@ void Kernel::Cpu::Halt_job::Halt_job::proceed(Kernel::Cpu &cpu) asm volatile ("hlt"); } break; case SUSPEND: - using Genode::Platform; + using Core::Platform; Platform::apply_with_boot_info([&](auto const &boot_info) { auto table = boot_info.plat_info.acpi_fadt; @@ -102,7 +102,7 @@ void Kernel::Cpu::Halt_job::Halt_job::proceed(Kernel::Cpu &cpu) void Kernel::Thread::_call_suspend() { using Genode::uint8_t; - using Genode::Platform; + using Core::Platform; Hw::Acpi_generic * acpi_fadt_table { }; unsigned cpu_count { }; diff --git a/repos/base-hw/src/core/spec/x86_64/pd_session_support.cc b/repos/base-hw/src/core/spec/x86_64/pd_session_support.cc index d3b32ff266..87b9085ccc 100644 --- a/repos/base-hw/src/core/spec/x86_64/pd_session_support.cc +++ b/repos/base-hw/src/core/spec/x86_64/pd_session_support.cc @@ -14,7 +14,7 @@ #include #include -using namespace Genode; +using namespace Core; using State = Genode::Pd_session::Managing_system_state; diff --git a/repos/base-hw/src/core/spec/x86_64/pic.cc b/repos/base-hw/src/core/spec/x86_64/pic.cc index a151b1482a..6a6c67c3cf 100644 --- a/repos/base-hw/src/core/spec/x86_64/pic.cc +++ b/repos/base-hw/src/core/spec/x86_64/pic.cc @@ -21,7 +21,7 @@ #include #include -using namespace Genode; +using namespace Core; using namespace Board; enum { diff --git a/repos/base-hw/src/core/spec/x86_64/pit.cc b/repos/base-hw/src/core/spec/x86_64/pit.cc index bb07ae6f77..3c594f47df 100644 --- a/repos/base-hw/src/core/spec/x86_64/pit.cc +++ b/repos/base-hw/src/core/spec/x86_64/pit.cc @@ -22,7 +22,7 @@ #include #include -using namespace Genode; +using namespace Core; using namespace Kernel; diff --git a/repos/base-hw/src/core/spec/x86_64/platform_support.cc b/repos/base-hw/src/core/spec/x86_64/platform_support.cc index ef53e5dec2..0aba3437ca 100644 --- a/repos/base-hw/src/core/spec/x86_64/platform_support.cc +++ b/repos/base-hw/src/core/spec/x86_64/platform_support.cc @@ -17,7 +17,7 @@ #include #include -using namespace Genode; +using namespace Core; void Platform::_init_additional_platform_info(Xml_generator &xml) @@ -61,9 +61,9 @@ void Platform::_init_additional_platform_info(Xml_generator &xml) } -Genode::Bit_allocator<64> & msi_allocator() +Bit_allocator<64> &msi_allocator() { - static Genode::Bit_allocator<64> msi_allocator; + static Bit_allocator<64> msi_allocator; return msi_allocator; } diff --git a/repos/base-hw/src/core/spec/x86_64/platform_support_common.cc b/repos/base-hw/src/core/spec/x86_64/platform_support_common.cc index e3fe495a18..136459a4f9 100644 --- a/repos/base-hw/src/core/spec/x86_64/platform_support_common.cc +++ b/repos/base-hw/src/core/spec/x86_64/platform_support_common.cc @@ -17,7 +17,7 @@ #include #include -using namespace Genode; +using namespace Core; void Platform::_init_io_port_alloc() diff --git a/repos/base-hw/src/core/spec/x86_64/port_io.h b/repos/base-hw/src/core/spec/x86_64/port_io.h index 10798a8650..ebfcf2095c 100644 --- a/repos/base-hw/src/core/spec/x86_64/port_io.h +++ b/repos/base-hw/src/core/spec/x86_64/port_io.h @@ -14,9 +14,10 @@ #ifndef _CORE__SPEC__X86_64__PORT_IO_H_ #define _CORE__SPEC__X86_64__PORT_IO_H_ -#include +/* core includes */ +#include -namespace Genode { +namespace Core { /** * Read byte from I/O port diff --git a/repos/base-hw/src/core/thread_start.cc b/repos/base-hw/src/core/thread_start.cc index 0246501d6c..e8dace0d45 100644 --- a/repos/base-hw/src/core/thread_start.cc +++ b/repos/base-hw/src/core/thread_start.cc @@ -27,7 +27,7 @@ #include #include -using namespace Genode; +using namespace Core; namespace Hw { extern Untyped_capability _main_thread_cap; } @@ -40,9 +40,9 @@ void Thread::start() return; } - struct Trace_source : public Trace::Source::Info_accessor, - private Trace::Control, - private Trace::Source + struct Trace_source : public Core::Trace::Source::Info_accessor, + private Core::Trace::Control, + private Core::Trace::Source { Genode::Thread &thread; @@ -61,10 +61,10 @@ void Thread::start() execution_time, thread.affinity() }; } - Trace_source(Trace::Source_registry ®istry, Genode::Thread &thread) + Trace_source(Core::Trace::Source_registry ®istry, Genode::Thread &thread) : - Trace::Control(), - Trace::Source(*this, *this), + Core::Trace::Control(), + Core::Trace::Source(*this, *this), thread(thread) { registry.insert(this); @@ -72,7 +72,7 @@ void Thread::start() }; /* create trace sources for core threads */ - new (platform().core_mem_alloc()) Trace_source(Trace::sources(), *this); + new (platform().core_mem_alloc()) Trace_source(Core::Trace::sources(), *this); } @@ -92,9 +92,9 @@ void Thread::_init_platform_thread(size_t, Type type) } /* remap initial main-thread UTCB according to stack-area spec */ - Genode::map_local(Platform::core_main_thread_phys_utcb(), - (addr_t)&_stack->utcb(), - max(sizeof(Native_utcb) / get_page_size(), (size_t)1)); + map_local(Platform::core_main_thread_phys_utcb(), + (addr_t)&_stack->utcb(), + max(sizeof(Native_utcb) / get_page_size(), (size_t)1)); /* adjust initial object state in case of a main thread */ native_thread().cap = Hw::_main_thread_cap; diff --git a/repos/base-hw/src/core/util.h b/repos/base-hw/src/core/util.h index 78e1a3f4b4..99e22b48cf 100644 --- a/repos/base-hw/src/core/util.h +++ b/repos/base-hw/src/core/util.h @@ -15,9 +15,11 @@ #ifndef _CORE__UTIL_H_ #define _CORE__UTIL_H_ +/* core includes */ +#include #include -namespace Genode { +namespace Core { using Hw::get_page_mask; using Hw::trunc_page; diff --git a/repos/base-hw/src/core/vm_session_component.cc b/repos/base-hw/src/core/vm_session_component.cc index 22449aee6a..74293bb736 100644 --- a/repos/base-hw/src/core/vm_session_component.cc +++ b/repos/base-hw/src/core/vm_session_component.cc @@ -21,7 +21,7 @@ #include #include -using namespace Genode; +using namespace Core; size_t Vm_session_component::_ds_size() { @@ -31,20 +31,19 @@ size_t Vm_session_component::_ds_size() { void Vm_session_component::Vcpu::exception_handler(Signal_context_capability handler) { if (!handler.valid()) { - Genode::warning("invalid signal"); + warning("invalid signal"); return; } if (kobj.constructed()) { - Genode::warning("Cannot register vcpu handler twice"); + warning("Cannot register vcpu handler twice"); return; } unsigned const cpu = location.xpos(); if (!kobj.create(cpu, ds_addr, Capability_space::capid(handler), id)) - Genode::warning("Cannot instantiate vm kernel object, ", - "invalid signal context?"); + warning("Cannot instantiate vm kernel object, invalid signal context?"); } diff --git a/repos/base-hw/src/core/vm_session_component.h b/repos/base-hw/src/core/vm_session_component.h index 09d7206706..48845f3fa2 100644 --- a/repos/base-hw/src/core/vm_session_component.h +++ b/repos/base-hw/src/core/vm_session_component.h @@ -24,18 +24,16 @@ /* base-hw includes */ #include -/* base-hw Core includes */ +/* core includes */ #include #include #include - -/* base Core includes */ #include -namespace Genode { class Vm_session_component; } +namespace Core { class Vm_session_component; } -class Genode::Vm_session_component +class Core::Vm_session_component : private Ram_quota_guard, private Cap_quota_guard, diff --git a/repos/base-hw/src/include/base/internal/native_thread.h b/repos/base-hw/src/include/base/internal/native_thread.h index c2a1e7a4d1..fa412db38e 100644 --- a/repos/base-hw/src/include/base/internal/native_thread.h +++ b/repos/base-hw/src/include/base/internal/native_thread.h @@ -17,15 +17,15 @@ #include #include -namespace Genode { - struct Native_thread; - class Platform_thread; -} +namespace Genode { struct Native_thread; } + + +namespace Core { class Platform_thread; } struct Genode::Native_thread { - Platform_thread *platform_thread; + Core::Platform_thread *platform_thread; Native_capability cap; }; diff --git a/repos/base-hw/src/test/cpu_scheduler/target.mk b/repos/base-hw/src/test/cpu_scheduler/target.mk index f5baeca810..21ac7ad2e7 100644 --- a/repos/base-hw/src/test/cpu_scheduler/target.mk +++ b/repos/base-hw/src/test/cpu_scheduler/target.mk @@ -9,5 +9,7 @@ SRC_CC = main.cc cpu_scheduler.cc INC_DIR += $(REP_DIR)/src/core $(REP_DIR)/src/include $(BASE_DIR)/src/include LIBS = base +REP_INC_DIR += src/core/include + vpath main.cc $(PRG_DIR) vpath %.cc $(REP_DIR)/src/core/kernel diff --git a/repos/base-linux/src/core/core_log_out.cc b/repos/base-linux/src/core/core_log_out.cc index 0a8b1703e8..46909013fe 100644 --- a/repos/base-linux/src/core/core_log_out.cc +++ b/repos/base-linux/src/core/core_log_out.cc @@ -17,4 +17,4 @@ /* Linux syscall bindings */ #include -void Genode::Core_log::out(char const c) { lx_write(1, &c, sizeof(c)); } +void Core::Core_log::out(char const c) { lx_write(1, &c, sizeof(c)); } diff --git a/repos/base-linux/src/core/core_rpc_cap_alloc.cc b/repos/base-linux/src/core/core_rpc_cap_alloc.cc index ea3359ea54..eab7e2a804 100644 --- a/repos/base-linux/src/core/core_rpc_cap_alloc.cc +++ b/repos/base-linux/src/core/core_rpc_cap_alloc.cc @@ -17,7 +17,10 @@ /* base-internal includes */ #include -using namespace Genode; +/* core includes */ +#include + +using namespace Core; Native_capability Rpc_entrypoint::_alloc_rpc_cap(Pd_session &, Native_capability, diff --git a/repos/base-linux/src/core/include/core_region_map.h b/repos/base-linux/src/core/include/core_region_map.h index 92946ef424..98954ef094 100644 --- a/repos/base-linux/src/core/include/core_region_map.h +++ b/repos/base-linux/src/core/include/core_region_map.h @@ -17,10 +17,13 @@ /* base-internal includes */ #include -namespace Genode { class Core_region_map; } +/* core includes */ +#include + +namespace Core { class Core_region_map; } -struct Genode::Core_region_map : Region_map_mmap +struct Core::Core_region_map : Region_map_mmap { Core_region_map(Rpc_entrypoint &) : Region_map_mmap(false) { } }; diff --git a/repos/base-linux/src/core/include/dataspace_component.h b/repos/base-linux/src/core/include/dataspace_component.h index a49e42eafc..c0a013e9f8 100644 --- a/repos/base-linux/src/core/include/dataspace_component.h +++ b/repos/base-linux/src/core/include/dataspace_component.h @@ -19,15 +19,19 @@ #ifndef _CORE__INCLUDE__DATASPACE_COMPONENT_H_ #define _CORE__INCLUDE__DATASPACE_COMPONENT_H_ +/* Genode includes */ #include -#include #include #include /* base-internal includes */ #include -namespace Genode { +/* core includes */ +#include + +namespace Core { + class Dataspace_owner; class Dataspace_component; } @@ -36,10 +40,10 @@ namespace Genode { /** * Deriving classes can own a dataspace to implement conditional behavior */ -class Genode::Dataspace_owner : Interface { }; +class Core::Dataspace_owner : Interface { }; -class Genode::Dataspace_component : public Rpc_object +class Core::Dataspace_component : public Rpc_object { private: diff --git a/repos/base-linux/src/core/include/io_mem_session_component.h b/repos/base-linux/src/core/include/io_mem_session_component.h index 5c8c2bf2f2..3445367501 100644 --- a/repos/base-linux/src/core/include/io_mem_session_component.h +++ b/repos/base-linux/src/core/include/io_mem_session_component.h @@ -22,10 +22,10 @@ /* core includes */ #include -namespace Genode { class Io_mem_session_component; } +namespace Core { class Io_mem_session_component; } -class Genode::Io_mem_session_component : public Rpc_object +class Core::Io_mem_session_component : public Rpc_object { private: diff --git a/repos/base-linux/src/core/include/irq_object.h b/repos/base-linux/src/core/include/irq_object.h index c6aac790f3..c5a3d3d423 100644 --- a/repos/base-linux/src/core/include/irq_object.h +++ b/repos/base-linux/src/core/include/irq_object.h @@ -14,12 +14,16 @@ #ifndef _IRQ_OBJECT_H_ #define _IRQ_OBJECT_H_ +/* Genode includes */ #include -namespace Genode { class Irq_object; }; +/* core includes */ +#include + +namespace Core { class Irq_object; }; -class Genode::Irq_object : public Thread +class Core::Irq_object : public Thread { private: diff --git a/repos/base-linux/src/core/include/irq_session_component.h b/repos/base-linux/src/core/include/irq_session_component.h index cb28ef0ff4..72d319dbc8 100644 --- a/repos/base-linux/src/core/include/irq_session_component.h +++ b/repos/base-linux/src/core/include/irq_session_component.h @@ -14,17 +14,20 @@ #ifndef _CORE__INCLUDE__IRQ_SESSION_COMPONENT_H_ #define _CORE__INCLUDE__IRQ_SESSION_COMPONENT_H_ +/* Genode includes */ #include #include #include #include + +/* core includes */ #include -namespace Genode { class Irq_session_component; } +namespace Core { class Irq_session_component; } -class Genode::Irq_session_component : public Rpc_object, - private List::Element +class Core::Irq_session_component : public Rpc_object, + private List::Element { private: diff --git a/repos/base-linux/src/core/include/native_cpu_component.h b/repos/base-linux/src/core/include/native_cpu_component.h index adf2927cc5..12cc9c5192 100644 --- a/repos/base-linux/src/core/include/native_cpu_component.h +++ b/repos/base-linux/src/core/include/native_cpu_component.h @@ -19,14 +19,18 @@ /* Genode includes */ #include -namespace Genode { +/* core includes */ +#include + +namespace Core { + class Cpu_session_component; class Native_cpu_component; } -class Genode::Native_cpu_component : public Rpc_object +class Core::Native_cpu_component : public Rpc_object { private: diff --git a/repos/base-linux/src/core/include/native_pd_component.h b/repos/base-linux/src/core/include/native_pd_component.h index 654d0187e4..22a4c83427 100644 --- a/repos/base-linux/src/core/include/native_pd_component.h +++ b/repos/base-linux/src/core/include/native_pd_component.h @@ -17,15 +17,19 @@ /* Genode includes */ #include -namespace Genode { +/* core includes */ +#include + +namespace Core { + class Dataspace_component; class Pd_session_component; class Native_pd_component; } -class Genode::Native_pd_component : public Rpc_object +class Core::Native_pd_component : public Rpc_object { private: diff --git a/repos/base-linux/src/core/include/pager.h b/repos/base-linux/src/core/include/pager.h index c58d8a0bdd..4e806da244 100644 --- a/repos/base-linux/src/core/include/pager.h +++ b/repos/base-linux/src/core/include/pager.h @@ -20,16 +20,19 @@ #include /* for 'Thread_capability' type */ #include -/* core-local includes */ +/* core includes */ #include -namespace Genode { +namespace Core { + struct Pager_object; struct Pager_entrypoint; + + using Pager_capability = Capability; } -struct Genode::Pager_object +struct Core::Pager_object { Thread_capability _thread_cap { }; Signal_context_capability _sigh { }; @@ -47,7 +50,7 @@ struct Genode::Pager_object }; -struct Genode::Pager_entrypoint +struct Core::Pager_entrypoint { Pager_entrypoint(Rpc_cap_factory &) { } diff --git a/repos/base-linux/src/core/include/platform.h b/repos/base-linux/src/core/include/platform.h index 0cad618cf5..69a35861e1 100644 --- a/repos/base-linux/src/core/include/platform.h +++ b/repos/base-linux/src/core/include/platform.h @@ -19,7 +19,7 @@ #include #include -/* core-local includes */ +/* core includes */ #include #include #include @@ -51,7 +51,7 @@ static unsigned long ram_quota_from_env() } -class Genode::Platform : public Platform_generic +class Core::Platform : public Platform_generic { private: diff --git a/repos/base-linux/src/core/include/platform_pd.h b/repos/base-linux/src/core/include/platform_pd.h index 6e69925082..fd5c522e10 100644 --- a/repos/base-linux/src/core/include/platform_pd.h +++ b/repos/base-linux/src/core/include/platform_pd.h @@ -14,16 +14,21 @@ #ifndef _CORE__INCLUDE__PLATFORM_PD_H_ #define _CORE__INCLUDE__PLATFORM_PD_H_ +/* Genode includes */ #include #include -namespace Genode { +/* core includes */ +#include + +namespace Core { + struct Platform_pd; struct Platform_thread; } -struct Genode::Platform_pd +struct Core::Platform_pd { Platform_pd(Allocator &, char const *) { } diff --git a/repos/base-linux/src/core/include/platform_thread.h b/repos/base-linux/src/core/include/platform_thread.h index 4264b1685d..cd3449f433 100644 --- a/repos/base-linux/src/core/include/platform_thread.h +++ b/repos/base-linux/src/core/include/platform_thread.h @@ -23,7 +23,7 @@ /* core includes */ #include -namespace Genode { class Platform_thread; } +namespace Core { class Platform_thread; } /* @@ -34,7 +34,7 @@ namespace Genode { class Platform_thread; } * turn, we find the exception handler's 'Signal_context_capability'. */ -class Genode::Platform_thread : public List::Element +class Core::Platform_thread : public List::Element { private: diff --git a/repos/base-linux/src/core/include/region_map_component.h b/repos/base-linux/src/core/include/region_map_component.h index aa0bddd726..5d219d1e6b 100644 --- a/repos/base-linux/src/core/include/region_map_component.h +++ b/repos/base-linux/src/core/include/region_map_component.h @@ -25,15 +25,16 @@ #include #include -namespace Genode { +namespace Core { + struct Rm_client; struct Rm_member; class Region_map_component; } -class Genode::Region_map_component : public Rpc_object, - private List::Element +class Core::Region_map_component : public Rpc_object, + private List::Element { private: @@ -74,7 +75,7 @@ class Genode::Region_map_component : public Rpc_object, }; -struct Genode::Rm_client : Pager_object +struct Core::Rm_client : Pager_object { Rm_client(Cpu_session_capability, Thread_capability, Region_map_component &, unsigned long, diff --git a/repos/base-linux/src/core/include/rpc_cap_factory.h b/repos/base-linux/src/core/include/rpc_cap_factory.h index f28c36414d..d42c364a6d 100644 --- a/repos/base-linux/src/core/include/rpc_cap_factory.h +++ b/repos/base-linux/src/core/include/rpc_cap_factory.h @@ -14,12 +14,17 @@ #ifndef _CORE__INCLUDE__RPC_CAP_FACTORY_H_ #define _CORE__INCLUDE__RPC_CAP_FACTORY_H_ +/* Genode includes */ #include #include -namespace Genode { class Rpc_cap_factory; } +/* core includes */ +#include -class Genode::Rpc_cap_factory +namespace Core { class Rpc_cap_factory; } + + +class Core::Rpc_cap_factory { private: diff --git a/repos/base-linux/src/core/include/util.h b/repos/base-linux/src/core/include/util.h index 538527b7f5..5f725add7c 100644 --- a/repos/base-linux/src/core/include/util.h +++ b/repos/base-linux/src/core/include/util.h @@ -17,4 +17,7 @@ /* base-internal includes */ #include +/* core includes */ +#include + #endif /* _CORE__INCLUDE__UTIL_H_ */ diff --git a/repos/base-linux/src/core/native_cpu_component.cc b/repos/base-linux/src/core/native_cpu_component.cc index 08910d953c..0a083e997c 100644 --- a/repos/base-linux/src/core/native_cpu_component.cc +++ b/repos/base-linux/src/core/native_cpu_component.cc @@ -11,14 +11,14 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core-local includes */ +/* core includes */ #include #include /* base-internal includes */ #include -using namespace Genode; +using namespace Core; void Native_cpu_component::thread_id(Thread_capability thread_cap, int pid, int tid) diff --git a/repos/base-linux/src/core/native_pd_component.cc b/repos/base-linux/src/core/native_pd_component.cc index 7602552c07..b16511a23f 100644 --- a/repos/base-linux/src/core/native_pd_component.cc +++ b/repos/base-linux/src/core/native_pd_component.cc @@ -13,11 +13,10 @@ /* Genode includes */ #include -#include #include #include -/* core-local includes */ +/* core includes */ #include #include @@ -28,7 +27,7 @@ /* Linux includes */ #include -using namespace Genode; +using namespace Core; /*************** @@ -122,7 +121,7 @@ void Native_pd_component::_start(Dataspace_component &ds) * the dataspace content into a temporary file whose path is passed to * 'execve()'. */ - if (strcmp(filename, "") == 0) { + if (Genode::strcmp(filename, "") == 0) { filename = tmp_filename; @@ -174,7 +173,7 @@ void Native_pd_component::_start(Dataspace_component &ds) _pid = lx_create_process((int (*)())_exec_child, _execve_args_and_stack().initial_sp()); - if (strcmp(filename, tmp_filename) == 0) + if (Genode::strcmp(filename, tmp_filename) == 0) lx_unlink(filename); } diff --git a/repos/base-linux/src/core/platform.cc b/repos/base-linux/src/core/platform.cc index da2251bc69..4dd5fa4181 100644 --- a/repos/base-linux/src/core/platform.cc +++ b/repos/base-linux/src/core/platform.cc @@ -27,7 +27,7 @@ /* Linux includes */ #include -using namespace Genode; +using namespace Core; /** diff --git a/repos/base-linux/src/core/platform_thread.cc b/repos/base-linux/src/core/platform_thread.cc index 219ea4d20b..d909017eeb 100644 --- a/repos/base-linux/src/core/platform_thread.cc +++ b/repos/base-linux/src/core/platform_thread.cc @@ -14,13 +14,12 @@ /* Genode includes */ #include #include -#include -/* local includes */ -#include "platform_thread.h" +/* core includes */ +#include #include -using namespace Genode; +using namespace Core; typedef Token Tid_token; @@ -77,7 +76,7 @@ Platform_thread::Registry &Platform_thread::_registry() Platform_thread::Platform_thread(size_t, const char *name, unsigned, Affinity::Location, addr_t) { - copy_cstring(_name, name, min(sizeof(_name), strlen(name) + 1)); + copy_cstring(_name, name, min(sizeof(_name), Genode::strlen(name) + 1)); _registry().insert(this); } diff --git a/repos/base-linux/src/core/ram_dataspace_support.cc b/repos/base-linux/src/core/ram_dataspace_support.cc index f4f3126b02..8ff4103c6e 100644 --- a/repos/base-linux/src/core/ram_dataspace_support.cc +++ b/repos/base-linux/src/core/ram_dataspace_support.cc @@ -28,7 +28,7 @@ #include -using namespace Genode; +using namespace Core; static int ram_ds_cnt = 0; /* counter for creating unique dataspace IDs */ diff --git a/repos/base-linux/src/core/rom_session_component.cc b/repos/base-linux/src/core/rom_session_component.cc index fad600f1a3..e9f4ce0d62 100644 --- a/repos/base-linux/src/core/rom_session_component.cc +++ b/repos/base-linux/src/core/rom_session_component.cc @@ -30,7 +30,7 @@ /* local includes */ #include "rom_session_component.h" -using namespace Genode; +using namespace Core; /** diff --git a/repos/base-linux/src/core/rpc_cap_factory_linux.cc b/repos/base-linux/src/core/rpc_cap_factory_linux.cc index 09bf63fe62..84a37a8c69 100644 --- a/repos/base-linux/src/core/rpc_cap_factory_linux.cc +++ b/repos/base-linux/src/core/rpc_cap_factory_linux.cc @@ -14,7 +14,7 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; Native_capability Rpc_cap_factory::alloc(Native_capability) diff --git a/repos/base-linux/src/core/spec/linux/dataspace_component.cc b/repos/base-linux/src/core/spec/linux/dataspace_component.cc index a869e4a12e..54f50407ee 100644 --- a/repos/base-linux/src/core/spec/linux/dataspace_component.cc +++ b/repos/base-linux/src/core/spec/linux/dataspace_component.cc @@ -29,7 +29,7 @@ /* local includes */ #include "dataspace_component.h" -using namespace Genode; +using namespace Core; Linux_dataspace::Filename Dataspace_component::_file_name(const char *args) @@ -54,7 +54,7 @@ Linux_dataspace::Filename Dataspace_component::_file_name(const char *args) size_t Dataspace_component::_file_size() { - uint64_t size = 0; + Genode::uint64_t size = 0; if (lx_stat_size(_fname.buf, size) < 0) throw Service_denied(); diff --git a/repos/base-linux/src/core/spec/linux/io_mem_session_component.cc b/repos/base-linux/src/core/spec/linux/io_mem_session_component.cc index 244ece4d86..f56f76f8ca 100644 --- a/repos/base-linux/src/core/spec/linux/io_mem_session_component.cc +++ b/repos/base-linux/src/core/spec/linux/io_mem_session_component.cc @@ -12,17 +12,16 @@ */ /* Genode includes */ -#include #include #include /* base-internal includes */ #include -/* core-local includes */ +/* core includes */ #include -using namespace Genode; +using namespace Core; size_t Io_mem_session_component::get_arg_size(const char *) diff --git a/repos/base-linux/src/core/spec/linux/io_port_session_component.cc b/repos/base-linux/src/core/spec/linux/io_port_session_component.cc index 25bc3ba57e..2be691e645 100644 --- a/repos/base-linux/src/core/spec/linux/io_port_session_component.cc +++ b/repos/base-linux/src/core/spec/linux/io_port_session_component.cc @@ -13,7 +13,7 @@ #include -using namespace Genode; +using namespace Core; Io_port_session_component::Io_port_session_component(Range_allocator &io_port_alloc, diff --git a/repos/base-linux/src/core/spec/linux/irq_session_component.cc b/repos/base-linux/src/core/spec/linux/irq_session_component.cc index 5b83f6eb72..fc17abaea1 100644 --- a/repos/base-linux/src/core/spec/linux/irq_session_component.cc +++ b/repos/base-linux/src/core/spec/linux/irq_session_component.cc @@ -14,14 +14,13 @@ */ /* Genode includes */ -#include #include #include -/* core-local includes */ +/* core includes */ #include -using namespace Genode; +using namespace Core; Irq_session_component::Irq_session_component(Range_allocator &, const char *) diff --git a/repos/base-linux/src/core/spec/linux/platform_services.cc b/repos/base-linux/src/core/spec/linux/platform_services.cc index 4d579c89d4..700f0c1248 100644 --- a/repos/base-linux/src/core/spec/linux/platform_services.cc +++ b/repos/base-linux/src/core/spec/linux/platform_services.cc @@ -19,8 +19,8 @@ #include -void Genode::platform_add_local_services(Rpc_entrypoint &, - Sliced_heap &, - Registry &, - Trace::Source_registry &) +void Core::platform_add_local_services(Rpc_entrypoint &, + Sliced_heap &, + Registry &, + Trace::Source_registry &) { } diff --git a/repos/base-linux/src/core/spec/pc/dataspace_component.cc b/repos/base-linux/src/core/spec/pc/dataspace_component.cc index 39f3645a36..0fccdef262 100644 --- a/repos/base-linux/src/core/spec/pc/dataspace_component.cc +++ b/repos/base-linux/src/core/spec/pc/dataspace_component.cc @@ -25,10 +25,10 @@ #include #include -/* local includes */ -#include "dataspace_component.h" +/* core includes */ +#include -using namespace Genode; +using namespace Core; Linux_dataspace::Filename Dataspace_component::_file_name(const char *args) @@ -51,9 +51,9 @@ Linux_dataspace::Filename Dataspace_component::_file_name(const char *args) } -Genode::size_t Dataspace_component::_file_size() +size_t Dataspace_component::_file_size() { - uint64_t size = 0; + Genode::uint64_t size = 0; if (lx_stat_size(_fname.buf, size) < 0) throw Service_denied(); diff --git a/repos/base-linux/src/core/spec/pc/io_mem_session_component.cc b/repos/base-linux/src/core/spec/pc/io_mem_session_component.cc index 3dcaeef938..1510a23d2c 100644 --- a/repos/base-linux/src/core/spec/pc/io_mem_session_component.cc +++ b/repos/base-linux/src/core/spec/pc/io_mem_session_component.cc @@ -12,15 +12,14 @@ */ /* Genode includes */ -#include #include #include #include -/* core-local includes */ +/* core includes */ #include -using namespace Genode; +using namespace Core; size_t Io_mem_session_component::get_arg_size(const char *args) diff --git a/repos/base-linux/src/core/spec/pc/io_port_session_component.cc b/repos/base-linux/src/core/spec/pc/io_port_session_component.cc index bb772b0eb5..2708941ac6 100644 --- a/repos/base-linux/src/core/spec/pc/io_port_session_component.cc +++ b/repos/base-linux/src/core/spec/pc/io_port_session_component.cc @@ -14,7 +14,7 @@ #include #include -using namespace Genode; +using namespace Core; Io_port_session_component::Io_port_session_component(Range_allocator &io_port_alloc, diff --git a/repos/base-linux/src/core/spec/pc/irq_session_component.cc b/repos/base-linux/src/core/spec/pc/irq_session_component.cc index 3f4dd7de43..ffd1032e9c 100644 --- a/repos/base-linux/src/core/spec/pc/irq_session_component.cc +++ b/repos/base-linux/src/core/spec/pc/irq_session_component.cc @@ -13,15 +13,14 @@ */ /* Genode includes */ -#include #include -/* core-local includes */ +/* core includes */ #include #include #include -using namespace Genode; +using namespace Core; Irq_session_component::Irq_session_component(Range_allocator &, const char *args) diff --git a/repos/base-linux/src/core/spec/pc/platform_services.cc b/repos/base-linux/src/core/spec/pc/platform_services.cc index a3334c29ee..2a9dae0ddd 100644 --- a/repos/base-linux/src/core/spec/pc/platform_services.cc +++ b/repos/base-linux/src/core/spec/pc/platform_services.cc @@ -22,10 +22,13 @@ #include #include -void Genode::platform_add_local_services(Rpc_entrypoint &, - Sliced_heap &md, - Registry ®, - Trace::Source_registry &) +using namespace Core; + + +void Core::platform_add_local_services(Rpc_entrypoint &, + Sliced_heap &md, + Registry ®, + Core::Trace::Source_registry &) { if (!lx_iopl(3)) { static Io_port_root io_port_root(*core_env().pd_session(), diff --git a/repos/base-nova/src/core/core_log_out.cc b/repos/base-nova/src/core/core_log_out.cc index 0571e83c16..7596abbebe 100644 --- a/repos/base-nova/src/core/core_log_out.cc +++ b/repos/base-nova/src/core/core_log_out.cc @@ -18,7 +18,7 @@ #include #include -void Genode::Core_log::out(char const c) +void Core::Core_log::out(char const c) { enum { CLOCK = 0, BAUDRATE = 115200 }; diff --git a/repos/base-nova/src/core/core_region_map.cc b/repos/base-nova/src/core/core_region_map.cc index 7bacb30091..83e9b72c8e 100644 --- a/repos/base-nova/src/core/core_region_map.cc +++ b/repos/base-nova/src/core/core_region_map.cc @@ -11,9 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include @@ -23,7 +20,8 @@ /* NOVA includes */ #include -using namespace Genode; +using namespace Core; + /** * Map dataspace core-locally diff --git a/repos/base-nova/src/core/core_rpc_cap_alloc.cc b/repos/base-nova/src/core/core_rpc_cap_alloc.cc index 395cabf125..039eb24bff 100644 --- a/repos/base-nova/src/core/core_rpc_cap_alloc.cc +++ b/repos/base-nova/src/core/core_rpc_cap_alloc.cc @@ -14,12 +14,12 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include #include #include -using namespace Genode; +using namespace Core; static Rpc_cap_factory &rpc_cap_factory() diff --git a/repos/base-nova/src/core/include/ipc_pager.h b/repos/base-nova/src/core/include/ipc_pager.h index 98d9d5307d..090be57c27 100644 --- a/repos/base-nova/src/core/include/ipc_pager.h +++ b/repos/base-nova/src/core/include/ipc_pager.h @@ -19,41 +19,41 @@ #include #include -/* core-local includes */ +/* core includes */ #include /* NOVA includes */ #include -namespace Genode { class Ipc_pager; } +namespace Core { class Ipc_pager; } -namespace Genode { enum { PAGE_SIZE_LOG2 = 12 }; } +namespace Core { enum { PAGE_SIZE_LOG2 = 12 }; } -static inline Nova::Rights nova_map_rights(Genode::Mapping const &mapping) +static inline Nova::Rights nova_map_rights(Core::Mapping const &mapping) { return Nova::Rights(true, mapping.writeable, mapping.executable); } -static inline Nova::Mem_crd nova_src_crd(Genode::Mapping const &mapping) +static inline Nova::Mem_crd nova_src_crd(Core::Mapping const &mapping) { - return Nova::Mem_crd(mapping.src_addr >> Genode::PAGE_SIZE_LOG2, - mapping.size_log2 - Genode::PAGE_SIZE_LOG2, + return Nova::Mem_crd(mapping.src_addr >> Core::PAGE_SIZE_LOG2, + mapping.size_log2 - Core::PAGE_SIZE_LOG2, nova_map_rights(mapping)); } -static inline Nova::Mem_crd nova_dst_crd(Genode::Mapping const &mapping) +static inline Nova::Mem_crd nova_dst_crd(Core::Mapping const &mapping) { - return Nova::Mem_crd(mapping.dst_addr >> Genode::PAGE_SIZE_LOG2, - mapping.size_log2 - Genode::PAGE_SIZE_LOG2, + return Nova::Mem_crd(mapping.dst_addr >> Core::PAGE_SIZE_LOG2, + mapping.size_log2 - Core::PAGE_SIZE_LOG2, nova_map_rights(mapping)); } -class Genode::Ipc_pager +class Core::Ipc_pager { private: diff --git a/repos/base-nova/src/core/include/irq_object.h b/repos/base-nova/src/core/include/irq_object.h index fbdce58f78..5dd118a94c 100644 --- a/repos/base-nova/src/core/include/irq_object.h +++ b/repos/base-nova/src/core/include/irq_object.h @@ -15,10 +15,13 @@ #include /* Gsi_flags */ -namespace Genode { class Irq_object; class Irq_args; } +/* core includes */ +#include + +namespace Core { class Irq_object; class Irq_args; } -class Genode::Irq_object +class Core::Irq_object { private: diff --git a/repos/base-nova/src/core/include/map_local.h b/repos/base-nova/src/core/include/map_local.h index b8ee65928f..a19afa4d79 100644 --- a/repos/base-nova/src/core/include/map_local.h +++ b/repos/base-nova/src/core/include/map_local.h @@ -20,7 +20,7 @@ /* core includes */ #include -namespace Genode { +namespace Core { /** * Map pages locally within core diff --git a/repos/base-nova/src/core/include/native_cpu_component.h b/repos/base-nova/src/core/include/native_cpu_component.h index 2a2ea83677..df1291fcd4 100644 --- a/repos/base-nova/src/core/include/native_cpu_component.h +++ b/repos/base-nova/src/core/include/native_cpu_component.h @@ -18,15 +18,18 @@ #include #include -namespace Genode { +/* core includes */ +#include + +namespace Core { class Cpu_session_component; class Native_cpu_component; } -class Genode::Native_cpu_component : public Rpc_object +class Core::Native_cpu_component : public Rpc_object { private: diff --git a/repos/base-nova/src/core/include/native_pd_component.h b/repos/base-nova/src/core/include/native_pd_component.h index 98c1fcdde9..93836c0c73 100644 --- a/repos/base-nova/src/core/include/native_pd_component.h +++ b/repos/base-nova/src/core/include/native_pd_component.h @@ -17,17 +17,17 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include -namespace Genode { +namespace Core { class Pd_session_component; class Native_pd_component; } -class Genode::Native_pd_component : public Rpc_object +class Core::Native_pd_component : public Rpc_object { private: diff --git a/repos/base-nova/src/core/include/nova_util.h b/repos/base-nova/src/core/include/nova_util.h index f5dca5ca15..5abb027133 100644 --- a/repos/base-nova/src/core/include/nova_util.h +++ b/repos/base-nova/src/core/include/nova_util.h @@ -16,15 +16,14 @@ #ifndef _CORE__INCLUDE__NOVA_UTIL_H_ #define _CORE__INCLUDE__NOVA_UTIL_H_ -/* Genode includes */ -#include - /* NOVA includes */ #include -/* local includes */ +/* core includes */ +#include #include + /** * Return boot CPU number. It is required if threads in core should be placed * on the same CPU as the main thread. @@ -221,7 +220,7 @@ inline void unmap_local(Nova::Utcb &, Genode::addr_t start, template -inline Nova::uint8_t syscall_retry(Genode::Pager_object &pager, FUNC func) +inline Nova::uint8_t syscall_retry(Core::Pager_object &pager, FUNC func) { Nova::uint8_t res; do { @@ -231,7 +230,7 @@ inline Nova::uint8_t syscall_retry(Genode::Pager_object &pager, FUNC func) return res; } -inline Nova::uint8_t async_map(Genode::Pager_object &pager, +inline Nova::uint8_t async_map(Core::Pager_object &pager, Genode::addr_t const source_pd, Genode::addr_t const target_pd, Nova::Obj_crd const &source_initial_caps, @@ -251,7 +250,7 @@ inline Nova::uint8_t async_map(Genode::Pager_object &pager, }); } -inline Nova::uint8_t map_vcpu_portals(Genode::Pager_object &pager, +inline Nova::uint8_t map_vcpu_portals(Core::Pager_object &pager, Genode::addr_t const source_exc_base, Genode::addr_t const target_exc_base, Nova::Utcb &utcb, @@ -267,7 +266,7 @@ inline Nova::uint8_t map_vcpu_portals(Genode::Pager_object &pager, source_initial_caps, target_initial_caps, utcb); } -inline Nova::uint8_t map_pagefault_portal(Genode::Pager_object &pager, +inline Nova::uint8_t map_pagefault_portal(Core::Pager_object &pager, Genode::addr_t const source_exc_base, Genode::addr_t const target_exc_base, Genode::addr_t const target_pd, @@ -276,7 +275,7 @@ inline Nova::uint8_t map_pagefault_portal(Genode::Pager_object &pager, using Nova::Obj_crd; using Nova::PT_SEL_PAGE_FAULT; - Genode::addr_t const source_pd = Genode::platform_specific().core_pd_sel(); + Genode::addr_t const source_pd = Core::platform_specific().core_pd_sel(); Obj_crd const source_initial_caps(source_exc_base + PT_SEL_PAGE_FAULT, 0); Obj_crd const target_initial_caps(target_exc_base + PT_SEL_PAGE_FAULT, 0); diff --git a/repos/base-nova/src/core/include/pager.h b/repos/base-nova/src/core/include/pager.h index f29df601ef..f2aece3fae 100644 --- a/repos/base-nova/src/core/include/pager.h +++ b/repos/base-nova/src/core/include/pager.h @@ -25,21 +25,23 @@ /* NOVA includes */ #include -/* core-local includes */ +/* core includes */ #include #include -namespace Genode { +namespace Core { typedef Cpu_session::Thread_creation_failed Invalid_thread; class Pager_entrypoint; class Pager_object; class Exception_handlers; + + using Pager_capability = Capability; } -class Genode::Exception_handlers +class Core::Exception_handlers { private: @@ -56,7 +58,7 @@ class Genode::Exception_handlers }; -class Genode::Pager_object : public Object_pool::Entry +class Core::Pager_object : public Object_pool::Entry { private: @@ -168,7 +170,7 @@ class Genode::Pager_object : public Object_pool::Entry Pager_object(Cpu_session_capability cpu_session_cap, Thread_capability thread_cap, unsigned long badge, Affinity::Location location, - Genode::Session_label const &, + Session_label const &, Cpu_session::Name const &); virtual ~Pager_object(); @@ -176,7 +178,7 @@ class Genode::Pager_object : public Object_pool::Entry unsigned long badge() const { return _badge; } void reset_badge() { - Genode::Mutex::Guard guard(_state_lock); + Mutex::Guard guard(_state_lock); _badge = 0; } @@ -381,7 +383,7 @@ class Genode::Pager_object : public Object_pool::Entry * For a paging entry point can hold only one activation. So, paging is * strictly serialized for one entry point. */ -class Genode::Pager_entrypoint : public Object_pool +class Core::Pager_entrypoint : public Object_pool { public: diff --git a/repos/base-nova/src/core/include/platform.h b/repos/base-nova/src/core/include/platform.h index c38a3925f0..b914a81f85 100644 --- a/repos/base-nova/src/core/include/platform.h +++ b/repos/base-nova/src/core/include/platform.h @@ -20,10 +20,10 @@ #include #include -namespace Genode { class Platform; } +namespace Core { class Platform; } -class Genode::Platform : public Platform_generic +class Core::Platform : public Platform_generic { public: diff --git a/repos/base-nova/src/core/include/platform_pd.h b/repos/base-nova/src/core/include/platform_pd.h index 179d1157d0..846a224770 100644 --- a/repos/base-nova/src/core/include/platform_pd.h +++ b/repos/base-nova/src/core/include/platform_pd.h @@ -18,14 +18,14 @@ #include #include -namespace Genode { +namespace Core { class Platform_thread; class Platform_pd; } -class Genode::Platform_pd : public Address_space +class Core::Platform_pd : public Address_space { private: diff --git a/repos/base-nova/src/core/include/platform_thread.h b/repos/base-nova/src/core/include/platform_thread.h index 102cfe1dcd..a572e80abe 100644 --- a/repos/base-nova/src/core/include/platform_thread.h +++ b/repos/base-nova/src/core/include/platform_thread.h @@ -28,14 +28,14 @@ #include #include -namespace Genode { +namespace Core { class Platform_pd; class Platform_thread; } -class Genode::Platform_thread +class Core::Platform_thread { private: diff --git a/repos/base-nova/src/core/include/rpc_cap_factory.h b/repos/base-nova/src/core/include/rpc_cap_factory.h index 25179eecfd..78b37267cd 100644 --- a/repos/base-nova/src/core/include/rpc_cap_factory.h +++ b/repos/base-nova/src/core/include/rpc_cap_factory.h @@ -19,18 +19,20 @@ #include #include #include -#include -namespace Genode { class Rpc_cap_factory; } +/* core includes */ +#include + +namespace Core { class Rpc_cap_factory; } -class Genode::Rpc_cap_factory +class Core::Rpc_cap_factory { private: struct Cap_object : List::Element { - Genode::addr_t _cap_sel; + addr_t _cap_sel; Cap_object(addr_t cap_sel) : _cap_sel(cap_sel) {} }; diff --git a/repos/base-nova/src/core/include/signal_broker.h b/repos/base-nova/src/core/include/signal_broker.h index b61ee82e9f..89edffdbae 100644 --- a/repos/base-nova/src/core/include/signal_broker.h +++ b/repos/base-nova/src/core/include/signal_broker.h @@ -20,16 +20,16 @@ /* NOVA includes */ #include -/* core-local includes */ +/* core includes */ #include #include #include #include -namespace Genode { class Signal_broker; } +namespace Core { class Signal_broker; } -class Genode::Signal_broker +class Core::Signal_broker { private: diff --git a/repos/base-nova/src/core/include/signal_source_component.h b/repos/base-nova/src/core/include/signal_source_component.h index 5eccabb9e6..65f9042241 100644 --- a/repos/base-nova/src/core/include/signal_source_component.h +++ b/repos/base-nova/src/core/include/signal_source_component.h @@ -14,18 +14,21 @@ #ifndef _CORE__INCLUDE__SIGNAL_SOURCE_COMPONENT_H_ #define _CORE__INCLUDE__SIGNAL_SOURCE_COMPONENT_H_ +/* Genode includes */ #include + +/* core includes */ #include #include -namespace Genode { +namespace Core { class Signal_context_component; class Signal_source_component; } -struct Genode::Signal_context_component : Object_pool::Entry +struct Core::Signal_context_component : Object_pool::Entry { Signal_context_component(Signal_context_capability cap) : Object_pool::Entry(cap) { } @@ -34,8 +37,8 @@ struct Genode::Signal_context_component : Object_pool: }; -class Genode::Signal_source_component : public Rpc_object +class Core::Signal_source_component : public Rpc_object { private: diff --git a/repos/base-nova/src/core/include/util.h b/repos/base-nova/src/core/include/util.h index a504ecbe22..9bb1c50969 100644 --- a/repos/base-nova/src/core/include/util.h +++ b/repos/base-nova/src/core/include/util.h @@ -16,13 +16,12 @@ /* Genode includes */ #include -#include /* base-internal includes */ #include #include -namespace Genode { +namespace Core { constexpr size_t get_super_page_size_log2() { return 22; } constexpr size_t get_super_page_size() { return 1 << get_super_page_size_log2(); } diff --git a/repos/base-nova/src/core/include/vm_session_component.h b/repos/base-nova/src/core/include/vm_session_component.h index c0fb988d46..249f041d13 100644 --- a/repos/base-nova/src/core/include/vm_session_component.h +++ b/repos/base-nova/src/core/include/vm_session_component.h @@ -22,10 +22,13 @@ #include #include -namespace Genode { class Vm_session_component; } +/* core includes */ +#include + +namespace Core { class Vm_session_component; } -class Genode::Vm_session_component +class Core::Vm_session_component : private Ram_quota_guard, private Cap_quota_guard, diff --git a/repos/base-nova/src/core/io_mem_session_support.cc b/repos/base-nova/src/core/io_mem_session_support.cc index 92f7cc6b3b..287a3ac2a5 100644 --- a/repos/base-nova/src/core/io_mem_session_support.cc +++ b/repos/base-nova/src/core/io_mem_session_support.cc @@ -18,7 +18,8 @@ #include #include -using namespace Genode; +using namespace Core; + void Io_mem_session_component::_unmap_local(addr_t, size_t) { } diff --git a/repos/base-nova/src/core/ipc_pager.cc b/repos/base-nova/src/core/ipc_pager.cc index 7ca36b1a75..92f1419494 100644 --- a/repos/base-nova/src/core/ipc_pager.cc +++ b/repos/base-nova/src/core/ipc_pager.cc @@ -14,14 +14,13 @@ /* Genode includes */ #include -/* Core includes */ +/* core includes */ #include /* NOVA includes */ #include - -using namespace Genode; +using namespace Core; void Mapping::prepare_map_operation() const { } diff --git a/repos/base-nova/src/core/irq_session_component.cc b/repos/base-nova/src/core/irq_session_component.cc index 2d98d3f5bc..be8dc9c989 100644 --- a/repos/base-nova/src/core/irq_session_component.cc +++ b/repos/base-nova/src/core/irq_session_component.cc @@ -13,9 +13,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include @@ -25,7 +22,7 @@ #include #include -using namespace Genode; +using namespace Core; static bool irq_ctrl(addr_t irq_sel, addr_t &msi_addr, addr_t &msi_data, diff --git a/repos/base-nova/src/core/native_cpu_component.cc b/repos/base-nova/src/core/native_cpu_component.cc index f40b38e385..a809117365 100644 --- a/repos/base-nova/src/core/native_cpu_component.cc +++ b/repos/base-nova/src/core/native_cpu_component.cc @@ -11,14 +11,11 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - -/* core-local includes */ +/* core includes */ #include #include -using namespace Genode; +using namespace Core; void Native_cpu_component::thread_type(Thread_capability thread_cap, @@ -43,7 +40,7 @@ Native_cpu_component::Native_cpu_component(Cpu_session_component &cpu_session, c } -Genode::Native_cpu_component::~Native_cpu_component() +Core::Native_cpu_component::~Native_cpu_component() { _thread_ep.dissolve(this); } diff --git a/repos/base-nova/src/core/native_pd_component.cc b/repos/base-nova/src/core/native_pd_component.cc index 5de829aaee..79eb442af8 100644 --- a/repos/base-nova/src/core/native_pd_component.cc +++ b/repos/base-nova/src/core/native_pd_component.cc @@ -11,13 +11,12 @@ * under the terms of the GNU Affero General Public License version 3. */ +/* core includes */ #include #include - -/* core-local includes */ #include -using namespace Genode; +using namespace Core; Native_capability Native_pd_component::alloc_rpc_cap(Native_capability ep, diff --git a/repos/base-nova/src/core/pager.cc b/repos/base-nova/src/core/pager.cc index 231d4c918e..95b38bb372 100644 --- a/repos/base-nova/src/core/pager.cc +++ b/repos/base-nova/src/core/pager.cc @@ -19,7 +19,7 @@ /* base-internal includes */ #include -/* core-local includes */ +/* core includes */ #include #include #include @@ -34,7 +34,7 @@ static bool verbose_oom = false; -using namespace Genode; +using namespace Core; using namespace Nova; diff --git a/repos/base-nova/src/core/pd_session_support.cc b/repos/base-nova/src/core/pd_session_support.cc index 344a623d15..6bd0a71529 100644 --- a/repos/base-nova/src/core/pd_session_support.cc +++ b/repos/base-nova/src/core/pd_session_support.cc @@ -11,11 +11,11 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core */ +/* core includes */ #include #include -using namespace Genode; +using namespace Core; bool Pd_session_component::assign_pci(addr_t pci_config_memory, uint16_t bdf) diff --git a/repos/base-nova/src/core/platform.cc b/repos/base-nova/src/core/platform.cc index e3e5a6e258..69fd20a9a9 100644 --- a/repos/base-nova/src/core/platform.cc +++ b/repos/base-nova/src/core/platform.cc @@ -40,7 +40,7 @@ #include #include -using namespace Genode; +using namespace Core; using namespace Nova; @@ -280,7 +280,7 @@ static Affinity::Space setup_affinity_space(Hip const &hip) { unsigned cpus = 0; unsigned ids_thread = 0; - Genode::Bit_array<1 << (sizeof(Hip::Cpu_desc::thread) * 8)> threads; + Bit_array<1 << (sizeof(Hip::Cpu_desc::thread) * 8)> threads; hip.for_each_enabled_cpu([&](Hip::Cpu_desc const &cpu, unsigned) { cpus ++; @@ -1009,7 +1009,7 @@ bool Mapped_mem_allocator::_map_local(addr_t virt_addr, addr_t phys_addr, size_t { /* platform_specific()->core_pd_sel() deadlocks if called from platform constructor */ Hip const &hip = *(Hip const *)__initial_sp; - Genode::addr_t const core_pd_sel = hip.sel_exc; + addr_t const core_pd_sel = hip.sel_exc; map_local(core_pd_sel, *(Utcb *)Thread::myself()->utcb(), phys_addr, diff --git a/repos/base-nova/src/core/platform_pd.cc b/repos/base-nova/src/core/platform_pd.cc index 705889e8e1..70ae4d0fa2 100644 --- a/repos/base-nova/src/core/platform_pd.cc +++ b/repos/base-nova/src/core/platform_pd.cc @@ -12,20 +12,15 @@ */ /* Genode includes */ -#include #include /* core includes */ #include #include -using namespace Genode; +using namespace Core; -/*************************** - ** Public object members ** - ***************************/ - bool Platform_pd::bind_thread(Platform_thread &thread) { thread.bind_to_pd(this, _thread_cnt == 0); @@ -48,7 +43,8 @@ void Platform_pd::assign_parent(Native_capability parent) Platform_pd::Platform_pd(Allocator &, char const *label, signed, bool) -: _thread_cnt(0), _pd_sel(cap_map().insert()), _label(label) +: + _thread_cnt(0), _pd_sel(cap_map().insert()), _label(label) { if (_pd_sel == Native_thread::INVALID_INDEX) { error("platform pd creation failed "); diff --git a/repos/base-nova/src/core/platform_services.cc b/repos/base-nova/src/core/platform_services.cc index 94b42c59dd..f0df7a79a5 100644 --- a/repos/base-nova/src/core/platform_services.cc +++ b/repos/base-nova/src/core/platform_services.cc @@ -20,10 +20,10 @@ /* * Add x86 specific services */ -void Genode::platform_add_local_services(Rpc_entrypoint &ep, - Sliced_heap &heap, - Registry &services, - Trace::Source_registry &trace_sources) +void Core::platform_add_local_services(Rpc_entrypoint &ep, + Sliced_heap &heap, + Registry &services, + Trace::Source_registry &trace_sources) { static Vm_root vm_root(ep, heap, core_env().ram_allocator(), core_env().local_rm(), trace_sources); diff --git a/repos/base-nova/src/core/platform_thread.cc b/repos/base-nova/src/core/platform_thread.cc index dede726d2e..3aa8c095db 100644 --- a/repos/base-nova/src/core/platform_thread.cc +++ b/repos/base-nova/src/core/platform_thread.cc @@ -13,9 +13,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include @@ -31,7 +28,7 @@ #include #include -using namespace Genode; +using namespace Core; static uint8_t map_thread_portals(Pager_object &pager, diff --git a/repos/base-nova/src/core/ram_dataspace_support.cc b/repos/base-nova/src/core/ram_dataspace_support.cc index a850892905..fbc0cb1c62 100644 --- a/repos/base-nova/src/core/ram_dataspace_support.cc +++ b/repos/base-nova/src/core/ram_dataspace_support.cc @@ -23,7 +23,7 @@ /* NOVA includes */ #include -using namespace Genode; +using namespace Core; void Ram_dataspace_factory::_revoke_ram_ds(Dataspace_component &) { } diff --git a/repos/base-nova/src/core/rpc_cap_factory.cc b/repos/base-nova/src/core/rpc_cap_factory.cc index d929b7aac4..8e77e6611d 100644 --- a/repos/base-nova/src/core/rpc_cap_factory.cc +++ b/repos/base-nova/src/core/rpc_cap_factory.cc @@ -11,14 +11,14 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core-local includes */ +/* core includes */ #include #include /* NOVA includes */ #include -using namespace Genode; +using namespace Core; Native_capability Rpc_cap_factory::alloc(Native_capability ep, addr_t entry, addr_t mtd) diff --git a/repos/base-nova/src/core/spec/x86_32/pager.cc b/repos/base-nova/src/core/spec/x86_32/pager.cc index e0bb2652c4..f70b62162e 100644 --- a/repos/base-nova/src/core/spec/x86_32/pager.cc +++ b/repos/base-nova/src/core/spec/x86_32/pager.cc @@ -11,13 +11,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Core includes */ +/* core includes */ #include /* NOVA includes */ #include -using namespace Genode; +using namespace Core; void Pager_object::_copy_state_from_utcb(Nova::Utcb const &utcb) { diff --git a/repos/base-nova/src/core/spec/x86_64/pager.cc b/repos/base-nova/src/core/spec/x86_64/pager.cc index 68b7ad5559..fd675e2614 100644 --- a/repos/base-nova/src/core/spec/x86_64/pager.cc +++ b/repos/base-nova/src/core/spec/x86_64/pager.cc @@ -11,13 +11,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Core includes */ +/* core includes */ #include /* NOVA includes */ #include -using namespace Genode; +using namespace Core; void Pager_object::_copy_state_from_utcb(Nova::Utcb const &utcb) { diff --git a/repos/base-nova/src/core/thread_start.cc b/repos/base-nova/src/core/thread_start.cc index e600464c91..062b9edda2 100644 --- a/repos/base-nova/src/core/thread_start.cc +++ b/repos/base-nova/src/core/thread_start.cc @@ -15,7 +15,6 @@ /* Genode includes */ #include -#include /* base-internal includes */ #include @@ -28,7 +27,7 @@ #include #include -using namespace Genode; +using namespace Core; void Thread::_init_platform_thread(size_t, Type type) @@ -116,9 +115,9 @@ void Thread::start() throw Cpu_session::Thread_creation_failed(); } - struct Core_trace_source : public Trace::Source::Info_accessor, - private Trace::Control, - private Trace::Source + struct Core_trace_source : public Core::Trace::Source::Info_accessor, + private Core::Trace::Control, + private Core::Trace::Source { Thread &thread; @@ -137,15 +136,15 @@ void Thread::start() Trace::Execution_time(ec_time, 0), thread._affinity }; } - Core_trace_source(Trace::Source_registry ®istry, Thread &t) + Core_trace_source(Core::Trace::Source_registry ®istry, Thread &t) : - Trace::Control(), - Trace::Source(*this, *this), thread(t) + Core::Trace::Control(), + Core::Trace::Source(*this, *this), thread(t) { registry.insert(this); } }; new (platform().core_mem_alloc()) - Core_trace_source(Trace::sources(), *this); + Core_trace_source(Core::Trace::sources(), *this); } diff --git a/repos/base-nova/src/core/vm_session_component.cc b/repos/base-nova/src/core/vm_session_component.cc index 7d3d72c3e1..1093db09e1 100644 --- a/repos/base-nova/src/core/vm_session_component.cc +++ b/repos/base-nova/src/core/vm_session_component.cc @@ -12,13 +12,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Base includes */ +/* Genode includes */ #include #include #include #include -/* Core includes */ +/* core includes */ #include #include #include @@ -32,7 +32,7 @@ /* NOVA includes */ #include -using namespace Genode; +using namespace Core; enum { CAP_RANGE_LOG2 = 2, CAP_RANGE = 1 << CAP_RANGE_LOG2 }; @@ -83,7 +83,7 @@ static uint8_t _with_kernel_quota_upgrade(addr_t const pd_target, ** Vm_session_component::Vcpu ** ********************************/ -Trace::Source::Info Vm_session_component::Vcpu::trace_source_info() const +Core::Trace::Source::Info Vm_session_component::Vcpu::trace_source_info() const { uint64_t ec_time = 0; uint64_t sc_time = 0; diff --git a/repos/base-okl4/src/core/core_log_out.cc b/repos/base-okl4/src/core/core_log_out.cc index f601a07bc3..fcf503bbaa 100644 --- a/repos/base-okl4/src/core/core_log_out.cc +++ b/repos/base-okl4/src/core/core_log_out.cc @@ -17,7 +17,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; void Core_log::out(char const c) { Okl4::L4_KDB_PrintChar(c); } diff --git a/repos/base-okl4/src/core/core_region_map.cc b/repos/base-okl4/src/core/core_region_map.cc index 8540867422..0a915f63bc 100644 --- a/repos/base-okl4/src/core/core_region_map.cc +++ b/repos/base-okl4/src/core/core_region_map.cc @@ -16,7 +16,7 @@ #include #include -using namespace Genode; +using namespace Core; Region_map::Local_addr diff --git a/repos/base-okl4/src/core/include/ipc_pager.h b/repos/base-okl4/src/core/include/ipc_pager.h index 608522be02..7cd7f42849 100644 --- a/repos/base-okl4/src/core/include/ipc_pager.h +++ b/repos/base-okl4/src/core/include/ipc_pager.h @@ -20,13 +20,13 @@ /* base-internal includes */ #include -/* core-local includes */ +/* core includes */ #include -namespace Genode { class Ipc_pager; } +namespace Core { class Ipc_pager; } -class Genode::Ipc_pager +class Core::Ipc_pager { private: diff --git a/repos/base-okl4/src/core/include/map_local.h b/repos/base-okl4/src/core/include/map_local.h index 66fc2d48cd..794a1efaff 100644 --- a/repos/base-okl4/src/core/include/map_local.h +++ b/repos/base-okl4/src/core/include/map_local.h @@ -14,16 +14,13 @@ #ifndef _CORE__INCLUDE__MAP_LOCAL_H_ #define _CORE__INCLUDE__MAP_LOCAL_H_ -/* Genode includes */ -#include - /* core includes */ #include /* base-internal includes */ #include -namespace Genode { +namespace Core { inline void unmap_local_log2_range(Okl4::L4_Word_t base, Okl4::L4_Word_t size_log2) { diff --git a/repos/base-okl4/src/core/include/platform.h b/repos/base-okl4/src/core/include/platform.h index b096b3d698..4fc2479bfe 100644 --- a/repos/base-okl4/src/core/include/platform.h +++ b/repos/base-okl4/src/core/include/platform.h @@ -32,10 +32,10 @@ namespace Okl4 { extern "C" { #include } } -namespace Genode { class Platform; } +namespace Core { class Platform; } -class Genode::Platform : public Platform_generic +class Core::Platform : public Platform_generic { private: diff --git a/repos/base-okl4/src/core/include/platform_pd.h b/repos/base-okl4/src/core/include/platform_pd.h index 4152629695..a9100cd59c 100644 --- a/repos/base-okl4/src/core/include/platform_pd.h +++ b/repos/base-okl4/src/core/include/platform_pd.h @@ -23,7 +23,7 @@ /* base-internal includes */ #include -namespace Genode { +namespace Core { namespace Thread_id_bits { @@ -39,7 +39,7 @@ namespace Genode { } -class Genode::Platform_pd : public Address_space +class Core::Platform_pd : public Address_space { private: diff --git a/repos/base-okl4/src/core/include/platform_thread.h b/repos/base-okl4/src/core/include/platform_thread.h index bf6c33b0ea..38c23c3e6b 100644 --- a/repos/base-okl4/src/core/include/platform_thread.h +++ b/repos/base-okl4/src/core/include/platform_thread.h @@ -23,14 +23,14 @@ #include #include -namespace Genode { +namespace Core { class Platform_pd; class Platform_thread; } -class Genode::Platform_thread +class Core::Platform_thread { private: diff --git a/repos/base-okl4/src/core/include/rpc_cap_factory.h b/repos/base-okl4/src/core/include/rpc_cap_factory.h index 8514599aaf..d42c364a6d 100644 --- a/repos/base-okl4/src/core/include/rpc_cap_factory.h +++ b/repos/base-okl4/src/core/include/rpc_cap_factory.h @@ -14,13 +14,17 @@ #ifndef _CORE__INCLUDE__RPC_CAP_FACTORY_H_ #define _CORE__INCLUDE__RPC_CAP_FACTORY_H_ +/* Genode includes */ #include #include -namespace Genode { class Rpc_cap_factory; } +/* core includes */ +#include + +namespace Core { class Rpc_cap_factory; } -class Genode::Rpc_cap_factory +class Core::Rpc_cap_factory { private: diff --git a/repos/base-okl4/src/core/include/util.h b/repos/base-okl4/src/core/include/util.h index cde9413910..f838a7600e 100644 --- a/repos/base-okl4/src/core/include/util.h +++ b/repos/base-okl4/src/core/include/util.h @@ -16,14 +16,15 @@ /* Genode includes */ #include -#include -#include #include /* base-internal includes */ #include #include +/* core includes */ +#include + /* * The binding for 'L4_KDB_Enter' on ARM takes a 'char *' as argument, which * prevents us from passing a plain const "string". However, on x86, the @@ -37,7 +38,7 @@ #endif -namespace Genode { +namespace Core { inline void log_event(const char *) { } inline void log_event(const char *, unsigned, unsigned, unsigned) { } diff --git a/repos/base-okl4/src/core/io_mem_session_support.cc b/repos/base-okl4/src/core/io_mem_session_support.cc index 4b9c8c49ff..a169e79230 100644 --- a/repos/base-okl4/src/core/io_mem_session_support.cc +++ b/repos/base-okl4/src/core/io_mem_session_support.cc @@ -16,7 +16,7 @@ #include -using namespace Genode; +using namespace Core; void Io_mem_session_component::_unmap_local(addr_t, size_t) { } diff --git a/repos/base-okl4/src/core/irq_session_component.cc b/repos/base-okl4/src/core/irq_session_component.cc index c2d838c46e..1dcda2d6b2 100644 --- a/repos/base-okl4/src/core/irq_session_component.cc +++ b/repos/base-okl4/src/core/irq_session_component.cc @@ -13,7 +13,6 @@ */ /* Genode includes */ -#include #include /* core includes */ @@ -25,7 +24,7 @@ #include using namespace Okl4; -using namespace Genode; +using namespace Core; /* bit to use for IRQ notifications */ @@ -108,7 +107,7 @@ void Irq_object::entry() if (!_sig_cap.valid()) continue; - Genode::Signal_transmitter(_sig_cap).submit(1); + Signal_transmitter(_sig_cap).submit(1); _sync_ack.block(); } @@ -159,7 +158,7 @@ void Irq_session_component::ack_irq() } -void Irq_session_component::sigh(Genode::Signal_context_capability cap) +void Irq_session_component::sigh(Signal_context_capability cap) { _irq_object.sigh(cap); } diff --git a/repos/base-okl4/src/core/pager.cc b/repos/base-okl4/src/core/pager.cc index 17abffe3dd..f2549d8b68 100644 --- a/repos/base-okl4/src/core/pager.cc +++ b/repos/base-okl4/src/core/pager.cc @@ -11,9 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include @@ -29,7 +26,7 @@ static const bool verbose_page_fault = false; static const bool verbose_exception = false; -using namespace Genode; +using namespace Core; using namespace Okl4; /** diff --git a/repos/base-okl4/src/core/pager_object.cc b/repos/base-okl4/src/core/pager_object.cc index 661c052e9d..c90944d582 100644 --- a/repos/base-okl4/src/core/pager_object.cc +++ b/repos/base-okl4/src/core/pager_object.cc @@ -18,7 +18,7 @@ #include #include -using namespace Genode; +using namespace Core; void Pager_object::wake_up() diff --git a/repos/base-okl4/src/core/platform.cc b/repos/base-okl4/src/core/platform.cc index 170737f499..b9f05529bb 100644 --- a/repos/base-okl4/src/core/platform.cc +++ b/repos/base-okl4/src/core/platform.cc @@ -12,7 +12,6 @@ */ /* Genode includes */ -#include #include #include #include @@ -33,7 +32,7 @@ #include #include -using namespace Genode; +using namespace Core; /**************************************** diff --git a/repos/base-okl4/src/core/platform_pd.cc b/repos/base-okl4/src/core/platform_pd.cc index 29928f31c4..2a65959ff2 100644 --- a/repos/base-okl4/src/core/platform_pd.cc +++ b/repos/base-okl4/src/core/platform_pd.cc @@ -20,13 +20,9 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; -/**************************** - ** Private object members ** - ****************************/ - void Platform_pd::_create_pd(bool syscall) { using namespace Okl4; diff --git a/repos/base-okl4/src/core/platform_thread.cc b/repos/base-okl4/src/core/platform_thread.cc index 90e69e0aff..a266c79c2d 100644 --- a/repos/base-okl4/src/core/platform_thread.cc +++ b/repos/base-okl4/src/core/platform_thread.cc @@ -14,8 +14,6 @@ */ /* Genode includes */ -#include -#include #include /* core includes */ @@ -27,7 +25,7 @@ #include #include -using namespace Genode; +using namespace Core; using namespace Okl4; diff --git a/repos/base-okl4/src/core/ram_dataspace_support.cc b/repos/base-okl4/src/core/ram_dataspace_support.cc index afb346b0c7..37d8df0675 100644 --- a/repos/base-okl4/src/core/ram_dataspace_support.cc +++ b/repos/base-okl4/src/core/ram_dataspace_support.cc @@ -25,7 +25,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &) { } diff --git a/repos/base-okl4/src/core/spec/x86/platform_thread_x86.cc b/repos/base-okl4/src/core/spec/x86/platform_thread_x86.cc index 5ab3ffb730..91adb2fe63 100644 --- a/repos/base-okl4/src/core/spec/x86/platform_thread_x86.cc +++ b/repos/base-okl4/src/core/spec/x86/platform_thread_x86.cc @@ -17,7 +17,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; using namespace Okl4; diff --git a/repos/base-okl4/src/core/thread_start.cc b/repos/base-okl4/src/core/thread_start.cc index f3e03d1e5f..3a61f01163 100644 --- a/repos/base-okl4/src/core/thread_start.cc +++ b/repos/base-okl4/src/core/thread_start.cc @@ -37,10 +37,10 @@ void Thread::_thread_start() void Thread::start() { /* create and start platform thread */ - native_thread().pt = new (platform_specific().thread_slab()) - Platform_thread(_stack->name().string()); + native_thread().pt = new (Core::platform_specific().thread_slab()) + Core::Platform_thread(_stack->name().string()); - platform_specific().core_pd().bind_thread(*native_thread().pt); + Core::platform_specific().core_pd().bind_thread(*native_thread().pt); native_thread().pt->start((void *)_thread_start, stack_top()); } @@ -49,5 +49,5 @@ void Thread::start() void Thread::_deinit_platform_thread() { /* destruct platform thread */ - destroy(platform_specific().thread_slab(), native_thread().pt); + destroy(Core::platform_specific().thread_slab(), native_thread().pt); } diff --git a/repos/base-okl4/src/include/base/internal/native_thread.h b/repos/base-okl4/src/include/base/internal/native_thread.h index d05a9c421c..bd9c0668f0 100644 --- a/repos/base-okl4/src/include/base/internal/native_thread.h +++ b/repos/base-okl4/src/include/base/internal/native_thread.h @@ -20,11 +20,10 @@ /* base-internal includes */ #include -namespace Genode { +namespace Core { class Platform_thread; } - struct Native_thread; - class Platform_thread; -} + +namespace Genode { struct Native_thread; } struct Genode::Native_thread @@ -38,7 +37,7 @@ struct Genode::Native_thread * the physical thread object, which is going to be destroyed * on destruction of the 'Thread'. */ - Platform_thread *pt; + Core::Platform_thread *pt; }; #endif /* _INCLUDE__BASE__INTERNAL__NATIVE_THREAD_H_ */ diff --git a/repos/base-pistachio/src/core/core_log_out.cc b/repos/base-pistachio/src/core/core_log_out.cc index 80a66f810f..9971c13594 100644 --- a/repos/base-pistachio/src/core/core_log_out.cc +++ b/repos/base-pistachio/src/core/core_log_out.cc @@ -18,7 +18,7 @@ #include -void Genode::Core_log::out(char const c) +void Core::Core_log::out(char const c) { Pistachio::L4_KDB_PrintChar(c); } diff --git a/repos/base-pistachio/src/core/include/ipc_pager.h b/repos/base-pistachio/src/core/include/ipc_pager.h index 9d3589ffd8..5c46ba5f43 100644 --- a/repos/base-pistachio/src/core/include/ipc_pager.h +++ b/repos/base-pistachio/src/core/include/ipc_pager.h @@ -17,20 +17,20 @@ /* Genode includes */ #include #include -#include #include -/* core-local includes */ +/* core includes */ +#include #include #include /* base-internal includes */ #include -namespace Genode { class Ipc_pager; } +namespace Core { class Ipc_pager; } -class Genode::Ipc_pager +class Core::Ipc_pager { private: diff --git a/repos/base-pistachio/src/core/include/map_local.h b/repos/base-pistachio/src/core/include/map_local.h index 96a6114385..dd642677cb 100644 --- a/repos/base-pistachio/src/core/include/map_local.h +++ b/repos/base-pistachio/src/core/include/map_local.h @@ -21,7 +21,7 @@ /* base-internal includes */ #include -namespace Genode { +namespace Core { /** * Map page locally within core diff --git a/repos/base-pistachio/src/core/include/platform.h b/repos/base-pistachio/src/core/include/platform.h index 240038fb2c..fba112a6f4 100644 --- a/repos/base-pistachio/src/core/include/platform.h +++ b/repos/base-pistachio/src/core/include/platform.h @@ -27,10 +27,10 @@ #include #include -namespace Genode { class Platform; } +namespace Core { class Platform; } -class Genode::Platform : public Platform_generic +class Core::Platform : public Platform_generic { private: diff --git a/repos/base-pistachio/src/core/include/platform_pd.h b/repos/base-pistachio/src/core/include/platform_pd.h index 631cea8d79..9a0df523d3 100644 --- a/repos/base-pistachio/src/core/include/platform_pd.h +++ b/repos/base-pistachio/src/core/include/platform_pd.h @@ -24,14 +24,14 @@ #include #include -namespace Genode { +namespace Core { class Platform_thread; class Platform_pd; } -class Genode::Platform_pd : public Address_space +class Core::Platform_pd : public Address_space { private: diff --git a/repos/base-pistachio/src/core/include/platform_thread.h b/repos/base-pistachio/src/core/include/platform_thread.h index e201b8d941..6f31a4951d 100644 --- a/repos/base-pistachio/src/core/include/platform_thread.h +++ b/repos/base-pistachio/src/core/include/platform_thread.h @@ -27,7 +27,7 @@ /* base-internal includes */ #include -namespace Genode { +namespace Core { class Platform_pd; class Platform_thread; @@ -44,7 +44,7 @@ inline unsigned long convert_native_thread_id_to_badge(Pistachio::L4_ThreadId_t } -class Genode::Platform_thread : Interface +class Core::Platform_thread : Interface { private: diff --git a/repos/base-pistachio/src/core/include/print_l4_thread_id.h b/repos/base-pistachio/src/core/include/print_l4_thread_id.h index eafd22b6aa..76a58de439 100644 --- a/repos/base-pistachio/src/core/include/print_l4_thread_id.h +++ b/repos/base-pistachio/src/core/include/print_l4_thread_id.h @@ -14,15 +14,16 @@ #ifndef _CORE__INCLUDE__PRINT_L4_THREAD_ID_H_ #define _CORE__INCLUDE__PRINT_L4_THREAD_ID_H_ -#include +/* core includes */ +#include /* base-internal includes */ #include -namespace Genode { struct Formatted_tid; } +namespace Core { struct Formatted_tid; } -struct Genode::Formatted_tid +struct Core::Formatted_tid { Pistachio::L4_ThreadId_t tid; diff --git a/repos/base-pistachio/src/core/include/rpc_cap_factory.h b/repos/base-pistachio/src/core/include/rpc_cap_factory.h index 8514599aaf..d42c364a6d 100644 --- a/repos/base-pistachio/src/core/include/rpc_cap_factory.h +++ b/repos/base-pistachio/src/core/include/rpc_cap_factory.h @@ -14,13 +14,17 @@ #ifndef _CORE__INCLUDE__RPC_CAP_FACTORY_H_ #define _CORE__INCLUDE__RPC_CAP_FACTORY_H_ +/* Genode includes */ #include #include -namespace Genode { class Rpc_cap_factory; } +/* core includes */ +#include + +namespace Core { class Rpc_cap_factory; } -class Genode::Rpc_cap_factory +class Core::Rpc_cap_factory { private: diff --git a/repos/base-pistachio/src/core/include/util.h b/repos/base-pistachio/src/core/include/util.h index 7add6722a9..76fdd4e84f 100644 --- a/repos/base-pistachio/src/core/include/util.h +++ b/repos/base-pistachio/src/core/include/util.h @@ -15,8 +15,6 @@ #define _CORE__INCLUDE__UTIL_H_ /* Genode includes */ -#include -#include #include #include @@ -24,11 +22,14 @@ #include #include -/* core-local includes */ +/* core includes */ +#include #include #include -namespace Genode { +namespace Core { + + using Genode::get_page_size; inline void log_event(const char *) { } inline void log_event(const char *, unsigned, unsigned, unsigned) { } diff --git a/repos/base-pistachio/src/core/io_mem_session_support.cc b/repos/base-pistachio/src/core/io_mem_session_support.cc index 71a6c01e1f..95b0ce500e 100644 --- a/repos/base-pistachio/src/core/io_mem_session_support.cc +++ b/repos/base-pistachio/src/core/io_mem_session_support.cc @@ -21,7 +21,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; /* diff --git a/repos/base-pistachio/src/core/irq_session_component.cc b/repos/base-pistachio/src/core/irq_session_component.cc index 90292a0d6c..692ce37261 100644 --- a/repos/base-pistachio/src/core/irq_session_component.cc +++ b/repos/base-pistachio/src/core/irq_session_component.cc @@ -12,16 +12,13 @@ */ /* Genode includes */ -#include #include /* core includes */ #include #include -/* base-internal includes */ - -using namespace Genode; +using namespace Core; using namespace Pistachio; diff --git a/repos/base-pistachio/src/core/kip.cc b/repos/base-pistachio/src/core/kip.cc index 20712295f9..0d6882be7a 100644 --- a/repos/base-pistachio/src/core/kip.cc +++ b/repos/base-pistachio/src/core/kip.cc @@ -11,7 +11,7 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core-local includes */ +/* core includes */ #include using namespace Pistachio; diff --git a/repos/base-pistachio/src/core/pager.cc b/repos/base-pistachio/src/core/pager.cc index 7942fbd0f9..636417bd1b 100644 --- a/repos/base-pistachio/src/core/pager.cc +++ b/repos/base-pistachio/src/core/pager.cc @@ -11,10 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include -#include - /* base-internal includes */ #include #include @@ -24,7 +20,7 @@ #include #include -using namespace Genode; +using namespace Core; using namespace Pistachio; diff --git a/repos/base-pistachio/src/core/pager_object.cc b/repos/base-pistachio/src/core/pager_object.cc index 37b4ff1d16..a6918918e1 100644 --- a/repos/base-pistachio/src/core/pager_object.cc +++ b/repos/base-pistachio/src/core/pager_object.cc @@ -18,7 +18,7 @@ #include #include -using namespace Genode; +using namespace Core; void Pager_object::wake_up() diff --git a/repos/base-pistachio/src/core/platform.cc b/repos/base-pistachio/src/core/platform.cc index 8399f96510..ac3c536add 100644 --- a/repos/base-pistachio/src/core/platform.cc +++ b/repos/base-pistachio/src/core/platform.cc @@ -12,7 +12,6 @@ */ /* Genode includes */ -#include #include #include #include @@ -37,7 +36,7 @@ #include #include -using namespace Genode; +using namespace Core; static const bool verbose = true; @@ -261,7 +260,7 @@ struct Region return (((base + size) > start) && (base < end)); } - void print(Genode::Output &out) const + void print(Output &out) const { size_t const size = end - start; Genode::print(out, Hex_range(start, size), " ", diff --git a/repos/base-pistachio/src/core/platform_pd.cc b/repos/base-pistachio/src/core/platform_pd.cc index 1305083880..a3ee44c76a 100644 --- a/repos/base-pistachio/src/core/platform_pd.cc +++ b/repos/base-pistachio/src/core/platform_pd.cc @@ -20,7 +20,7 @@ #include using namespace Pistachio; -using namespace Genode; +using namespace Core; /************************** diff --git a/repos/base-pistachio/src/core/platform_thread.cc b/repos/base-pistachio/src/core/platform_thread.cc index 722d0c0001..642e5c3ccc 100644 --- a/repos/base-pistachio/src/core/platform_thread.cc +++ b/repos/base-pistachio/src/core/platform_thread.cc @@ -11,10 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include -#include - /* base-internal includes */ #include #include @@ -25,7 +21,7 @@ #include #include -using namespace Genode; +using namespace Core; using namespace Pistachio; diff --git a/repos/base-pistachio/src/core/ram_dataspace_support.cc b/repos/base-pistachio/src/core/ram_dataspace_support.cc index 843f3e6ec0..b6f6fae203 100644 --- a/repos/base-pistachio/src/core/ram_dataspace_support.cc +++ b/repos/base-pistachio/src/core/ram_dataspace_support.cc @@ -16,7 +16,7 @@ #include -using namespace Genode; +using namespace Core; void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &) { } diff --git a/repos/base-pistachio/src/core/spec/x86/platform_x86.cc b/repos/base-pistachio/src/core/spec/x86/platform_x86.cc index c7ec258f9d..d6ff5ef11d 100644 --- a/repos/base-pistachio/src/core/spec/x86/platform_x86.cc +++ b/repos/base-pistachio/src/core/spec/x86/platform_x86.cc @@ -14,12 +14,12 @@ /* base-internal includes */ #include -/* core-local includes */ +/* core includes */ #include #include #include -using namespace Genode; +using namespace Core; void Platform::_setup_io_port_alloc() diff --git a/repos/base-pistachio/src/core/thread_start.cc b/repos/base-pistachio/src/core/thread_start.cc index 29ccc8d1f9..a1fa2fc35e 100644 --- a/repos/base-pistachio/src/core/thread_start.cc +++ b/repos/base-pistachio/src/core/thread_start.cc @@ -15,14 +15,15 @@ #include #include +/* core includes */ +#include +#include +#include + /* base-internal includes */ #include -/* core includes */ -#include -#include - -using namespace Genode; +using namespace Core; void Thread::_thread_start() diff --git a/repos/base-pistachio/src/include/base/internal/native_thread.h b/repos/base-pistachio/src/include/base/internal/native_thread.h index 7ad8f52aa5..d867c9ede5 100644 --- a/repos/base-pistachio/src/include/base/internal/native_thread.h +++ b/repos/base-pistachio/src/include/base/internal/native_thread.h @@ -20,11 +20,9 @@ /* base-internal includes */ #include -namespace Genode { - - class Platform_thread; - struct Native_thread; -} +namespace Genode { struct Native_thread; } + +namespace Core { class Platform_thread; } struct Genode::Native_thread @@ -38,7 +36,7 @@ struct Genode::Native_thread * the physical thread object, which is going to be destroyed * on destruction of the 'Thread'. */ - Platform_thread *pt; + Core::Platform_thread *pt; }; #endif /* _INCLUDE__BASE__INTERNAL__NATIVE_THREAD_H_ */ diff --git a/repos/base-sel4/src/core/capability_space.cc b/repos/base-sel4/src/core/capability_space.cc index c30dd7359c..f13085c187 100644 --- a/repos/base-sel4/src/core/capability_space.cc +++ b/repos/base-sel4/src/core/capability_space.cc @@ -48,7 +48,7 @@ class Genode::Native_capability::Data : public Capability_data }; -using namespace Genode; +using namespace Core; /** diff --git a/repos/base-sel4/src/core/core_log_out.cc b/repos/base-sel4/src/core/core_log_out.cc index d334474115..dd3003f4c4 100644 --- a/repos/base-sel4/src/core/core_log_out.cc +++ b/repos/base-sel4/src/core/core_log_out.cc @@ -18,4 +18,4 @@ #include #include -void Genode::Core_log::out(char const c) { seL4_DebugPutChar(c); } +void Core::Core_log::out(char const c) { seL4_DebugPutChar(c); } diff --git a/repos/base-sel4/src/core/core_region_map.cc b/repos/base-sel4/src/core/core_region_map.cc index 63e923a6c0..50cc2bd0f7 100644 --- a/repos/base-sel4/src/core/core_region_map.cc +++ b/repos/base-sel4/src/core/core_region_map.cc @@ -11,15 +11,12 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include #include -using namespace Genode; +using namespace Core; Region_map::Local_addr @@ -71,8 +68,8 @@ void Core_region_map::detach(Local_addr core_local_addr) size_t size = platform_specific().region_alloc_size_at(core_local_addr); if (!unmap_local(core_local_addr, size >> get_page_size_log2())) { - Genode::error("could not unmap core virtual address ", - Hex(core_local_addr), " in ", __PRETTY_FUNCTION__); + error("could not unmap core virtual address ", + Hex(core_local_addr), " in ", __PRETTY_FUNCTION__); return; } diff --git a/repos/base-sel4/src/core/include/cap_sel_alloc.h b/repos/base-sel4/src/core/include/cap_sel_alloc.h index baaf531b10..37787a1eba 100644 --- a/repos/base-sel4/src/core/include/cap_sel_alloc.h +++ b/repos/base-sel4/src/core/include/cap_sel_alloc.h @@ -20,10 +20,13 @@ /* base-internal includes */ #include -namespace Genode { struct Cap_sel_alloc; } +/* core includes */ +#include + +namespace Core { struct Cap_sel_alloc; } -struct Genode::Cap_sel_alloc : Interface +struct Core::Cap_sel_alloc : Interface { struct Alloc_failed : Exception { }; diff --git a/repos/base-sel4/src/core/include/cnode.h b/repos/base-sel4/src/core/include/cnode.h index e905ed4f1b..31be281a87 100644 --- a/repos/base-sel4/src/core/include/cnode.h +++ b/repos/base-sel4/src/core/include/cnode.h @@ -15,21 +15,20 @@ #define _CORE__INCLUDE__CNODE_H_ /* Genode includes */ -#include #include #include /* core includes */ #include -namespace Genode { +namespace Core { class Cnode_base; class Cnode; } -class Genode::Cnode_base +class Core::Cnode_base { private: @@ -127,7 +126,7 @@ class Genode::Cnode_base }; -class Genode::Cnode : public Cnode_base, Noncopyable +class Core::Cnode : public Cnode_base, Noncopyable { private: diff --git a/repos/base-sel4/src/core/include/core_capability_data.h b/repos/base-sel4/src/core/include/core_capability_data.h index 50262492f3..dc15ad05de 100644 --- a/repos/base-sel4/src/core/include/core_capability_data.h +++ b/repos/base-sel4/src/core/include/core_capability_data.h @@ -17,14 +17,17 @@ /* base-internal includes */ #include -namespace Genode { +/* core includes */ +#include + +namespace Core { class Cap_session; class Core_capability_data; } -class Genode::Core_capability_data : public Capability_data +class Core::Core_capability_data : public Capability_data { private: diff --git a/repos/base-sel4/src/core/include/core_cspace.h b/repos/base-sel4/src/core/include/core_cspace.h index 509b06eea0..cef8599382 100644 --- a/repos/base-sel4/src/core/include/core_cspace.h +++ b/repos/base-sel4/src/core/include/core_cspace.h @@ -16,10 +16,10 @@ #include -namespace Genode { class Core_cspace; } +namespace Core { class Core_cspace; } -class Genode::Core_cspace +class Core::Core_cspace { public: diff --git a/repos/base-sel4/src/core/include/initial_untyped_pool.h b/repos/base-sel4/src/core/include/initial_untyped_pool.h index 024dfab5ce..c7bfa24615 100644 --- a/repos/base-sel4/src/core/include/initial_untyped_pool.h +++ b/repos/base-sel4/src/core/include/initial_untyped_pool.h @@ -16,18 +16,18 @@ /* Genode includes */ #include -#include -/* core-local includes */ +/* core includes */ +#include #include /* seL4 includes */ #include -namespace Genode { class Initial_untyped_pool; } +namespace Core { class Initial_untyped_pool; } -class Genode::Initial_untyped_pool +class Core::Initial_untyped_pool { private: diff --git a/repos/base-sel4/src/core/include/install_mapping.h b/repos/base-sel4/src/core/include/install_mapping.h index 8fb62c33a7..362e9f6117 100644 --- a/repos/base-sel4/src/core/include/install_mapping.h +++ b/repos/base-sel4/src/core/include/install_mapping.h @@ -14,13 +14,13 @@ #ifndef _CORE__INCLUDE__INSTALL_MAPPING_H_ #define _CORE__INCLUDE__INSTALL_MAPPING_H_ -/* Core includes */ +/* core includes */ #include #include -namespace Genode { +namespace Core { - bool install_mapping(Mapping const &mapping, unsigned long pager_object_badge); + bool install_mapping(Mapping const &, unsigned long pager_object_badge); } #endif /* _CORE__INCLUDE__INSTALL_MAPPING_H_ */ diff --git a/repos/base-sel4/src/core/include/ipc_pager.h b/repos/base-sel4/src/core/include/ipc_pager.h index c140aac982..1b7b874436 100644 --- a/repos/base-sel4/src/core/include/ipc_pager.h +++ b/repos/base-sel4/src/core/include/ipc_pager.h @@ -17,13 +17,13 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include -namespace Genode { class Ipc_pager; } +namespace Core { class Ipc_pager; } -class Genode::Ipc_pager : public Native_capability +class Core::Ipc_pager : public Native_capability { private: diff --git a/repos/base-sel4/src/core/include/irq_object.h b/repos/base-sel4/src/core/include/irq_object.h index 994bb36aab..a6945bbcf1 100644 --- a/repos/base-sel4/src/core/include/irq_object.h +++ b/repos/base-sel4/src/core/include/irq_object.h @@ -14,14 +14,20 @@ #ifndef _CORE__INCLUDE__IRQ_OBJECT_H_ #define _CORE__INCLUDE__IRQ_OBJECT_H_ +/* Genode includes */ #include -#include #include -namespace Genode { class Irq_object; } +/* base internal includes */ +#include + +/* core includes */ +#include + +namespace Core { class Irq_object; } -class Genode::Irq_object : public Thread { +class Core::Irq_object : public Thread { private: @@ -43,7 +49,7 @@ class Genode::Irq_object : public Thread { Irq_object(unsigned irq); void sigh(Signal_context_capability cap) { _sig_cap = cap; } - void notify() { Genode::Signal_transmitter(_sig_cap).submit(1); } + void notify() { Signal_transmitter(_sig_cap).submit(1); } void ack_irq(); void start() override; diff --git a/repos/base-sel4/src/core/include/kernel_object.h b/repos/base-sel4/src/core/include/kernel_object.h index 7b9fc31336..d32dc9b112 100644 --- a/repos/base-sel4/src/core/include/kernel_object.h +++ b/repos/base-sel4/src/core/include/kernel_object.h @@ -21,7 +21,7 @@ #include #include -namespace Genode { +namespace Core { /** * Index referring to a slot in a CNode diff --git a/repos/base-sel4/src/core/include/map_local.h b/repos/base-sel4/src/core/include/map_local.h index bc56afba76..18a86b52ae 100644 --- a/repos/base-sel4/src/core/include/map_local.h +++ b/repos/base-sel4/src/core/include/map_local.h @@ -18,8 +18,7 @@ #include #include - -namespace Genode { +namespace Core { /** * Map physical pages to core-local virtual address range diff --git a/repos/base-sel4/src/core/include/page_table_registry.h b/repos/base-sel4/src/core/include/page_table_registry.h index 739d132db0..a352fd8313 100644 --- a/repos/base-sel4/src/core/include/page_table_registry.h +++ b/repos/base-sel4/src/core/include/page_table_registry.h @@ -16,19 +16,18 @@ /* Genode includes */ #include -#include -#include #include +#include #include /* core includes */ #include #include -namespace Genode { class Page_table_registry; } +namespace Core { class Page_table_registry; } -class Genode::Page_table_registry +class Core::Page_table_registry { public: @@ -180,9 +179,9 @@ class Genode::Page_table_registry level_log2_size)); break; } - } catch (Genode::Allocator::Out_of_memory) { + } catch (Allocator::Out_of_memory) { throw Mapping_cache_full(Mapping_cache_full::Type::MEMORY); - } catch (Genode::Out_of_caps) { + } catch (Out_of_caps) { throw Mapping_cache_full(Mapping_cache_full::Type::CAPS); } } diff --git a/repos/base-sel4/src/core/include/pager.h b/repos/base-sel4/src/core/include/pager.h index c26f8960e9..b2f7939608 100644 --- a/repos/base-sel4/src/core/include/pager.h +++ b/repos/base-sel4/src/core/include/pager.h @@ -23,11 +23,11 @@ #include #include -/* core-local includes */ +/* core includes */ #include #include -namespace Genode { +namespace Core { /** * Special server object for paging @@ -43,11 +43,13 @@ namespace Genode { */ class Pager_entrypoint; + using Pager_capability = Capability; + enum { PAGER_EP_STACK_SIZE = sizeof(addr_t) * 2048 }; } -class Genode::Pager_object : public Object_pool::Entry +class Core::Pager_object : public Object_pool::Entry { protected: @@ -58,7 +60,7 @@ class Genode::Pager_object : public Object_pool::Entry Cpu_session_capability _cpu_session_cap; Thread_capability _thread_cap; - Genode::Cap_sel _reply_cap; + Cap_sel _reply_cap; /** * User-level signal handler registered for this pager object via @@ -155,8 +157,7 @@ class Genode::Pager_object : public Object_pool::Entry }; -class Genode::Pager_entrypoint : public Object_pool, - public Thread +class Core::Pager_entrypoint : public Object_pool, public Thread { private: diff --git a/repos/base-sel4/src/core/include/platform.h b/repos/base-sel4/src/core/include/platform.h index 6822fe1fca..fadbf6747c 100644 --- a/repos/base-sel4/src/core/include/platform.h +++ b/repos/base-sel4/src/core/include/platform.h @@ -22,7 +22,8 @@ #include #include -namespace Genode { +namespace Core { + class Platform; template class Static_allocator; class Address_space; @@ -37,7 +38,7 @@ namespace Genode { * The size of a single ELEM must be a multiple of sizeof(long). */ template -class Genode::Static_allocator : public Allocator +class Core::Static_allocator : public Allocator { private: @@ -76,7 +77,8 @@ class Genode::Static_allocator : public Allocator bool need_size_for_free() const override { return false; } }; -class Genode::Platform : public Platform_generic + +class Core::Platform : public Platform_generic { private: diff --git a/repos/base-sel4/src/core/include/platform_pd.h b/repos/base-sel4/src/core/include/platform_pd.h index 2eb1053602..87332c3d00 100644 --- a/repos/base-sel4/src/core/include/platform_pd.h +++ b/repos/base-sel4/src/core/include/platform_pd.h @@ -25,10 +25,10 @@ /* base-internal includes */ #include -namespace Genode { class Platform_pd; } +namespace Core { class Platform_pd; } -class Genode::Platform_pd : public Address_space +class Core::Platform_pd : public Address_space { private: diff --git a/repos/base-sel4/src/core/include/platform_thread.h b/repos/base-sel4/src/core/include/platform_thread.h index 28bbc797f3..50df72e582 100644 --- a/repos/base-sel4/src/core/include/platform_thread.h +++ b/repos/base-sel4/src/core/include/platform_thread.h @@ -26,14 +26,14 @@ #include #include -namespace Genode { +namespace Core { class Platform_pd; class Platform_thread; } -class Genode::Platform_thread : public List::Element +class Core::Platform_thread : public List::Element { private: diff --git a/repos/base-sel4/src/core/include/rpc_cap_factory.h b/repos/base-sel4/src/core/include/rpc_cap_factory.h index 8ffc9f7ea6..be357df6b5 100644 --- a/repos/base-sel4/src/core/include/rpc_cap_factory.h +++ b/repos/base-sel4/src/core/include/rpc_cap_factory.h @@ -14,13 +14,17 @@ #ifndef _CORE__INCLUDE__RPC_CAP_FACTORY_H_ #define _CORE__INCLUDE__RPC_CAP_FACTORY_H_ +/* Genode includes */ #include #include -namespace Genode { class Rpc_cap_factory; } +/* core includes */ +#include + +namespace Core { class Rpc_cap_factory; } -class Genode::Rpc_cap_factory +class Core::Rpc_cap_factory { private: diff --git a/repos/base-sel4/src/core/include/sel4_boot_info.h b/repos/base-sel4/src/core/include/sel4_boot_info.h index 66cbb14c06..3cd30e6f77 100644 --- a/repos/base-sel4/src/core/include/sel4_boot_info.h +++ b/repos/base-sel4/src/core/include/sel4_boot_info.h @@ -17,6 +17,9 @@ /* seL4 includes */ #include -namespace Genode { seL4_BootInfo const &sel4_boot_info(); } +/* core includes */ +#include + +namespace Core { seL4_BootInfo const &sel4_boot_info(); } #endif /* _CORE__INCLUDE__SEL4_BOOT_INFO_H_ */ diff --git a/repos/base-sel4/src/core/include/thread_sel4.h b/repos/base-sel4/src/core/include/thread_sel4.h index e22d998a27..ac02fb7a09 100644 --- a/repos/base-sel4/src/core/include/thread_sel4.h +++ b/repos/base-sel4/src/core/include/thread_sel4.h @@ -25,9 +25,9 @@ #include #include -namespace Genode { +namespace Genode { struct Thread_info; } - struct Thread_info; +namespace Core { /** * Set register values for the instruction pointer and stack pointer and @@ -52,19 +52,21 @@ struct Genode::Thread_info Thread_info() { } - inline void init_tcb(Platform &, Range_allocator &, + inline void init_tcb(Core::Platform &, Range_allocator &, unsigned const prio, unsigned const cpu); inline void init(addr_t const utcb_virt_addr, unsigned const prio); inline void destruct(); - bool init_vcpu(Platform &, Cap_sel ept); + bool init_vcpu(Core::Platform &, Cap_sel ept); }; -void Genode::Thread_info::init_tcb(Platform &platform, +void Genode::Thread_info::init_tcb(Core::Platform &platform, Range_allocator &phys_alloc, unsigned const prio, unsigned const cpu) { + using namespace Core; + /* allocate TCB within core's CNode */ addr_t const phys_addr = Untyped_memory::alloc_page(phys_alloc); seL4_Untyped const service = Untyped_memory::untyped_sel(phys_addr).value(); @@ -83,6 +85,8 @@ void Genode::Thread_info::init_tcb(Platform &platform, void Genode::Thread_info::init(addr_t const utcb_virt_addr, unsigned const prio) { + using namespace Core; + Platform &platform = platform_specific(); Range_allocator &phys_alloc = platform.ram_alloc(); @@ -125,6 +129,8 @@ void Genode::Thread_info::init(addr_t const utcb_virt_addr, unsigned const prio) void Genode::Thread_info::destruct() { + using namespace Core; + if (lock_sel.value()) { seL4_CNode_Delete(seL4_CapInitThreadCNode, lock_sel.value(), 32); platform_specific().core_sel_alloc().free(lock_sel); @@ -151,8 +157,4 @@ void Genode::Thread_info::destruct() } } - -void Genode::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, - unsigned cpu); - #endif /* _CORE__INCLUDE__THREAD_SEL4_H_ */ diff --git a/repos/base-sel4/src/core/include/untyped_memory.h b/repos/base-sel4/src/core/include/untyped_memory.h index 8a15957b8f..2f811ff56b 100644 --- a/repos/base-sel4/src/core/include/untyped_memory.h +++ b/repos/base-sel4/src/core/include/untyped_memory.h @@ -24,10 +24,10 @@ /* seL4 includes */ #include -namespace Genode { struct Untyped_memory; } +namespace Core { struct Untyped_memory; } -struct Genode::Untyped_memory +struct Core::Untyped_memory { class Phys_alloc_failed : Exception { }; @@ -54,7 +54,7 @@ struct Genode::Untyped_memory } - static inline void free_page(Range_allocator &phys_alloc, Genode::addr_t addr) + static inline void free_page(Range_allocator &phys_alloc, addr_t addr) { phys_alloc.free(reinterpret_cast(addr)); } diff --git a/repos/base-sel4/src/core/include/util.h b/repos/base-sel4/src/core/include/util.h index 725b632b41..7703b95fb4 100644 --- a/repos/base-sel4/src/core/include/util.h +++ b/repos/base-sel4/src/core/include/util.h @@ -20,8 +20,7 @@ /* core includes */ #include - -namespace Genode { +namespace Core { constexpr addr_t get_page_mask() { return ~(get_page_size() - 1); } inline addr_t trunc_page(addr_t addr) { return addr & get_page_mask(); } diff --git a/repos/base-sel4/src/core/include/vm_session_component.h b/repos/base-sel4/src/core/include/vm_session_component.h index ad3c34362b..0fab6a153b 100644 --- a/repos/base-sel4/src/core/include/vm_session_component.h +++ b/repos/base-sel4/src/core/include/vm_session_component.h @@ -18,13 +18,14 @@ #include #include +/* core includes */ #include #include -namespace Genode { class Vm_session_component; } +namespace Core { class Vm_session_component; } -class Genode::Vm_session_component +class Core::Vm_session_component : private Ram_quota_guard, private Cap_quota_guard, diff --git a/repos/base-sel4/src/core/include/vm_space.h b/repos/base-sel4/src/core/include/vm_space.h index de3b53344d..4192022df1 100644 --- a/repos/base-sel4/src/core/include/vm_space.h +++ b/repos/base-sel4/src/core/include/vm_space.h @@ -16,8 +16,6 @@ /* Genode includes */ #include -#include -#include #include #include @@ -29,10 +27,10 @@ #include #include -namespace Genode { class Vm_space; } +namespace Core { class Vm_space; } -class Genode::Vm_space +class Core::Vm_space { private: diff --git a/repos/base-sel4/src/core/io_mem_session_support.cc b/repos/base-sel4/src/core/io_mem_session_support.cc index c83341aa9f..f1f005e409 100644 --- a/repos/base-sel4/src/core/io_mem_session_support.cc +++ b/repos/base-sel4/src/core/io_mem_session_support.cc @@ -15,7 +15,7 @@ #include -using namespace Genode; +using namespace Core; void Io_mem_session_component::_unmap_local(addr_t, size_t) { } diff --git a/repos/base-sel4/src/core/irq_session_component.cc b/repos/base-sel4/src/core/irq_session_component.cc index 973d465d69..80f037cfd8 100644 --- a/repos/base-sel4/src/core/irq_session_component.cc +++ b/repos/base-sel4/src/core/irq_session_component.cc @@ -11,17 +11,15 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include #include +/* sel4 includes */ #include -using namespace Genode; +using namespace Core; bool Irq_object::associate(Irq_session::Trigger const irq_trigger, diff --git a/repos/base-sel4/src/core/pager.cc b/repos/base-sel4/src/core/pager.cc index f67c775548..c9be14e971 100644 --- a/repos/base-sel4/src/core/pager.cc +++ b/repos/base-sel4/src/core/pager.cc @@ -25,7 +25,7 @@ /* seL4 includes */ #include -using namespace Genode; +using namespace Core; void Mapping::prepare_map_operation() const { } @@ -43,7 +43,7 @@ void Ipc_pager::wait_for_fault() uint8_t const depth = 32; int ret = seL4_CNode_SaveCaller(service, index, depth); if (ret != seL4_NoError) - Genode::error("saving reply cap failed with ", ret); + error("saving reply cap failed with ", ret); } _reply_sel = 0; _badge = 0; @@ -53,7 +53,7 @@ void Ipc_pager::wait_for_fault() bool Ipc_pager::install_mapping() { - _badge = Genode::install_mapping(_reply_mapping, _badge); + _badge = Core::install_mapping(_reply_mapping, _badge); return _badge; } diff --git a/repos/base-sel4/src/core/platform.cc b/repos/base-sel4/src/core/platform.cc index b15f09fa0f..f4fc8b9cf4 100644 --- a/repos/base-sel4/src/core/platform.cc +++ b/repos/base-sel4/src/core/platform.cc @@ -14,7 +14,6 @@ /* Genode includes */ #include #include -#include #include #include @@ -34,7 +33,7 @@ /* seL4 includes */ #include -using namespace Genode; +using namespace Core; static bool const verbose_boot_info = true; @@ -61,7 +60,7 @@ extern unsigned _prog_img_beg, _prog_img_end; bool Mapped_mem_allocator::_map_local(addr_t virt_addr, addr_t phys_addr, size_t size) { if (platform_in_construction) - Genode::warning("need physical memory, but Platform object not constructed yet"); + warning("need physical memory, but Platform object not constructed yet"); size_t const num_pages = size / get_page_size(); @@ -447,7 +446,7 @@ void Platform::_init_rom_modules() bool valid() const { const char sign[] = "RSD PTR "; - return signature == *(Genode::uint64_t *)sign; + return signature == *(uint64_t *)sign; } } __attribute__((packed)); @@ -556,7 +555,7 @@ Platform::Platform() { platform_in_construction = this; - /* start benchmarking for CPU utilization in Genode TRACE service */ + /* start benchmarking for CPU utilization in TRACE service */ seL4_BenchmarkResetLog(); /* create notification object for Genode::Lock used by this first thread */ @@ -618,7 +617,7 @@ Platform::Platform() */ Info trace_source_info() const override { - Genode::Thread &myself = *Genode::Thread::myself(); + Thread &myself = *Thread::myself(); addr_t const ipc_buffer = reinterpret_cast(myself.utcb()); seL4_IPCBuffer * ipcbuffer = reinterpret_cast(ipc_buffer); uint64_t const * buf = reinterpret_cast(ipcbuffer->msg); diff --git a/repos/base-sel4/src/core/platform_pd.cc b/repos/base-sel4/src/core/platform_pd.cc index c6044f03df..e656024008 100644 --- a/repos/base-sel4/src/core/platform_pd.cc +++ b/repos/base-sel4/src/core/platform_pd.cc @@ -11,9 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include @@ -24,7 +21,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; /***************************************** diff --git a/repos/base-sel4/src/core/platform_thread.cc b/repos/base-sel4/src/core/platform_thread.cc index 6d0a593941..bcd61b797e 100644 --- a/repos/base-sel4/src/core/platform_thread.cc +++ b/repos/base-sel4/src/core/platform_thread.cc @@ -11,10 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include -#include - /* core includes */ #include #include @@ -26,7 +22,7 @@ /* seL4 includes */ #include -using namespace Genode; +using namespace Core; /***************************************************** @@ -88,7 +84,7 @@ Platform_thread_registry &platform_thread_registry() } -bool Genode::install_mapping(Mapping const &mapping, unsigned long pager_object_badge) +bool Core::install_mapping(Mapping const &mapping, unsigned long pager_object_badge) { return platform_thread_registry().install_mapping(mapping, pager_object_badge); } @@ -278,7 +274,7 @@ Trace::Execution_time Platform_thread::execution_time() const void Platform_thread::setup_vcpu(Cap_sel ept, Cap_sel notification) { if (!_info.init_vcpu(platform_specific(), ept)) { - Genode::error("creating vCPU failed"); + error("creating vCPU failed"); return; } diff --git a/repos/base-sel4/src/core/ram_dataspace_support.cc b/repos/base-sel4/src/core/ram_dataspace_support.cc index 814db791ae..660eecb1de 100644 --- a/repos/base-sel4/src/core/ram_dataspace_support.cc +++ b/repos/base-sel4/src/core/ram_dataspace_support.cc @@ -17,7 +17,7 @@ #include #include -using namespace Genode; +using namespace Core; void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &ds) diff --git a/repos/base-sel4/src/core/rpc_cap_factory.cc b/repos/base-sel4/src/core/rpc_cap_factory.cc index 806711d515..bcdc174062 100644 --- a/repos/base-sel4/src/core/rpc_cap_factory.cc +++ b/repos/base-sel4/src/core/rpc_cap_factory.cc @@ -23,7 +23,7 @@ /* base-internal include */ #include -using namespace Genode; +using namespace Core; static unsigned unique_id_cnt; diff --git a/repos/base-sel4/src/core/signal_source_component.cc b/repos/base-sel4/src/core/signal_source_component.cc index 69df522588..87a4953d6d 100644 --- a/repos/base-sel4/src/core/signal_source_component.cc +++ b/repos/base-sel4/src/core/signal_source_component.cc @@ -11,9 +11,6 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include #include @@ -21,13 +18,8 @@ /* base-internal include */ #include +using namespace Core; -using namespace Genode; - - -/***************************** - ** Signal-source component ** - *****************************/ void Signal_source_component::release(Signal_context_component &context) { diff --git a/repos/base-sel4/src/core/spec/arm/arch_kernel_object.h b/repos/base-sel4/src/core/spec/arm/arch_kernel_object.h index 83951b2817..9178ef3488 100644 --- a/repos/base-sel4/src/core/spec/arm/arch_kernel_object.h +++ b/repos/base-sel4/src/core/spec/arm/arch_kernel_object.h @@ -16,7 +16,10 @@ #include -namespace Genode { +/* core includes */ +#include + +namespace Core { enum { PAGE_TABLE_LOG2_SIZE = 20 /* 1M region */ diff --git a/repos/base-sel4/src/core/spec/arm/boot_info.cc b/repos/base-sel4/src/core/spec/arm/boot_info.cc index dc30965ae6..d72e924755 100644 --- a/repos/base-sel4/src/core/spec/arm/boot_info.cc +++ b/repos/base-sel4/src/core/spec/arm/boot_info.cc @@ -11,20 +11,20 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ +#include #include +using namespace Core; + /* provided by the assembly startup code */ -extern Genode::addr_t __initial_r0; +extern addr_t __initial_r0; /** * Obtain seL4 boot info structure */ -seL4_BootInfo const & Genode::sel4_boot_info() +seL4_BootInfo const &Core::sel4_boot_info() { return *(seL4_BootInfo const *)__initial_r0; } diff --git a/repos/base-sel4/src/core/spec/arm/irq.cc b/repos/base-sel4/src/core/spec/arm/irq.cc index 05eab2a132..a16be9edd6 100644 --- a/repos/base-sel4/src/core/spec/arm/irq.cc +++ b/repos/base-sel4/src/core/spec/arm/irq.cc @@ -8,8 +8,11 @@ #include -long Genode::Irq_object::_associate(Irq_session::Trigger const &, - Irq_session::Polarity const &) +using namespace Core; + + +long Irq_object::_associate(Irq_session::Trigger const &, + Irq_session::Polarity const &) { seL4_CNode const root = seL4_CapInitThreadCNode; seL4_Word const index = _kernel_irq_sel.value(); diff --git a/repos/base-sel4/src/core/spec/arm/platform.cc b/repos/base-sel4/src/core/spec/arm/platform.cc index 70f60d05d1..c61c98f4df 100644 --- a/repos/base-sel4/src/core/spec/arm/platform.cc +++ b/repos/base-sel4/src/core/spec/arm/platform.cc @@ -21,7 +21,8 @@ #include "arch_kernel_object.h" -using namespace Genode; +using namespace Core; + static Phys_allocator *_phys_alloc_16k_ptr; @@ -35,18 +36,18 @@ static Phys_allocator &phys_alloc_16k() } -seL4_Word Genode::Untyped_memory::smallest_page_type() { +seL4_Word Untyped_memory::smallest_page_type() { return seL4_ARM_SmallPageObject; } -void Genode::Platform::init_sel4_ipc_buffer() { } +void Platform::init_sel4_ipc_buffer() { } -long Genode::Platform::_unmap_page_frame(Cap_sel const &sel) { +long Platform::_unmap_page_frame(Cap_sel const &sel) { return seL4_ARM_Page_Unmap(sel.value()); } -void Genode::Platform::_init_core_page_table_registry() +void Platform::_init_core_page_table_registry() { seL4_BootInfo const &bi = sel4_boot_info(); @@ -68,7 +69,7 @@ void Genode::Platform::_init_core_page_table_registry() /* initialize 16k memory allocator */ { - static Genode::Phys_allocator inst(&core_mem_alloc()); + static Phys_allocator inst(&core_mem_alloc()); _phys_alloc_16k_ptr = &inst; } @@ -87,7 +88,7 @@ void Genode::Platform::_init_core_page_table_registry() } -Genode::addr_t Genode::Platform_pd::_init_page_directory() const +addr_t Platform_pd::_init_page_directory() const { /* page directory table contains 4096 elements of 32bits -> 16k required */ enum { PAGES_16K = (1UL << Page_directory_kobj::SIZE_LOG2) / 4096 }; @@ -109,7 +110,7 @@ Genode::addr_t Genode::Platform_pd::_init_page_directory() const } -void Genode::Platform_pd::_deinit_page_directory(addr_t phys_addr) const +void Platform_pd::_deinit_page_directory(addr_t phys_addr) const { int ret = seL4_CNode_Delete(seL4_CapInitThreadCNode, _page_directory_sel.value(), 32); diff --git a/repos/base-sel4/src/core/spec/arm/platform_thread.cc b/repos/base-sel4/src/core/spec/arm/platform_thread.cc index 2f7500487e..5b7a48fccd 100644 --- a/repos/base-sel4/src/core/spec/arm/platform_thread.cc +++ b/repos/base-sel4/src/core/spec/arm/platform_thread.cc @@ -13,7 +13,10 @@ #include -void Genode::Platform_thread::affinity(Affinity::Location const location) +using namespace Core; + + +void Platform_thread::affinity(Affinity::Location const location) { #if CONFIG_MAX_NUM_NODES > 1 seL4_Error const res = seL4_TCB_SetAffinity(tcb_sel().value(), location.xpos()); diff --git a/repos/base-sel4/src/core/spec/arm/thread.cc b/repos/base-sel4/src/core/spec/arm/thread.cc index 5ab1a951d1..f7f3d8ecb9 100644 --- a/repos/base-sel4/src/core/spec/arm/thread.cc +++ b/repos/base-sel4/src/core/spec/arm/thread.cc @@ -21,12 +21,14 @@ #include #include -void Genode::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, - unsigned cpu) +using namespace Core; + + +void Core::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, unsigned cpu) { /* set register values for the instruction pointer and stack pointer */ seL4_UserContext regs; - Genode::memset(®s, 0, sizeof(regs)); + memset(®s, 0, sizeof(regs)); size_t const num_regs = sizeof(regs)/sizeof(seL4_Word); regs.pc = ip; @@ -41,13 +43,15 @@ void Genode::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, seL4_TCB_Resume(tcb_sel.value()); } -void Genode::affinity_sel4_thread(Cap_sel const &, unsigned cpu) + +void Core::affinity_sel4_thread(Cap_sel const &, unsigned cpu) { if (cpu != 0) error("could not set affinity of thread"); } -Genode::Thread_state Genode::Platform_thread::state() + +Thread_state Platform_thread::state() { seL4_TCB const thread = _info.tcb_sel.value(); seL4_Bool const suspend_source = false; @@ -63,7 +67,7 @@ Genode::Thread_state Genode::Platform_thread::state() } Thread_state state; - Genode::memset(&state, 0, sizeof(state)); + memset(&state, 0, sizeof(state)); state.r0 = registers.r0; state.r1 = registers.r1; diff --git a/repos/base-sel4/src/core/spec/arm/vm_space.cc b/repos/base-sel4/src/core/spec/arm/vm_space.cc index 5d28c2eee0..5c6e8b6b99 100644 --- a/repos/base-sel4/src/core/spec/arm/vm_space.cc +++ b/repos/base-sel4/src/core/spec/arm/vm_space.cc @@ -15,19 +15,22 @@ #include #include -static long map_page_table(Genode::Cap_sel const pagetable, - Genode::Cap_sel const vroot, - Genode::addr_t const virt) +using namespace Core; + + +static long map_page_table(Cap_sel const pagetable, + Cap_sel const vroot, + addr_t const virt) { return seL4_ARM_PageTable_Map(pagetable.value(), vroot.value(), virt, seL4_ARM_Default_VMAttributes); } -long Genode::Vm_space::_map_page(Genode::Cap_sel const &idx, - Genode::addr_t const virt, - Map_attr const map_attr, - bool) +long Vm_space::_map_page(Cap_sel const &idx, + addr_t const virt, + Map_attr const map_attr, + bool) { seL4_ARM_Page const service = _idx_to_sel(idx.value()).value(); seL4_ARM_PageDirectory const pd = _pd_sel.value(); @@ -45,16 +48,16 @@ long Genode::Vm_space::_map_page(Genode::Cap_sel const &idx, } -long Genode::Vm_space::_unmap_page(Genode::Cap_sel const &idx) +long Vm_space::_unmap_page(Cap_sel const &idx) { seL4_ARM_Page const service = _idx_to_sel(idx.value()).value(); return seL4_ARM_Page_Unmap(service); } -long Genode::Vm_space::_invalidate_page(Genode::Cap_sel const &idx, - seL4_Word const start, - seL4_Word const end) +long Vm_space::_invalidate_page(Cap_sel const &idx, + seL4_Word const start, + seL4_Word const end) { seL4_ARM_Page const service = _idx_to_sel(idx.value()).value(); long error = seL4_ARM_Page_CleanInvalidate_Data(service, 0, end - start); @@ -68,8 +71,8 @@ long Genode::Vm_space::_invalidate_page(Genode::Cap_sel const &idx, } -void Genode::Vm_space::unsynchronized_alloc_page_tables(addr_t const start, - addr_t const size) +void Vm_space::unsynchronized_alloc_page_tables(addr_t const start, + addr_t const size) { addr_t constexpr PAGE_TABLE_AREA = 1UL << PAGE_TABLE_LOG2_SIZE; addr_t virt = start & ~(PAGE_TABLE_AREA - 1); diff --git a/repos/base-sel4/src/core/spec/x86/io_port_session_support.cc b/repos/base-sel4/src/core/spec/x86/io_port_session_support.cc index c8c039fbf2..bc78bb165b 100644 --- a/repos/base-sel4/src/core/spec/x86/io_port_session_support.cc +++ b/repos/base-sel4/src/core/spec/x86/io_port_session_support.cc @@ -11,16 +11,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include /* base-internal includes */ #include -using namespace Genode; +using namespace Core; unsigned char Io_port_session_component::inb(unsigned short address) @@ -32,7 +29,7 @@ unsigned char Io_port_session_component::inb(unsigned short address) if (v.error == seL4_NoError) return v.result; - Genode::error(__PRETTY_FUNCTION__, " failed ", v.error); + error(__PRETTY_FUNCTION__, " failed ", v.error); return 0; } @@ -46,7 +43,7 @@ unsigned short Io_port_session_component::inw(unsigned short address) if (v.error == seL4_NoError) return v.result; - Genode::error(__PRETTY_FUNCTION__, " failed ", v.error); + error(__PRETTY_FUNCTION__, " failed ", v.error); return 0; } @@ -60,7 +57,7 @@ unsigned Io_port_session_component::inl(unsigned short address) if (v.error == seL4_NoError) return v.result; - Genode::error(__PRETTY_FUNCTION__, " failed ", v.error); + error(__PRETTY_FUNCTION__, " failed ", v.error); return 0; } @@ -70,10 +67,10 @@ void Io_port_session_component::outb(unsigned short address, unsigned char value /* check boundaries */ if (!_in_bounds(address, sizeof(unsigned char))) return; - int error = seL4_X86_IOPort_Out8(seL4_CapIOPort, address, value); + int result = seL4_X86_IOPort_Out8(seL4_CapIOPort, address, value); - if (error != seL4_NoError) - Genode::error(__PRETTY_FUNCTION__, " failed ", error); + if (result != seL4_NoError) + error(__PRETTY_FUNCTION__, " failed ", result); } @@ -82,10 +79,10 @@ void Io_port_session_component::outw(unsigned short address, unsigned short valu /* check boundaries */ if (!_in_bounds(address, sizeof(unsigned short))) return; - int error = seL4_X86_IOPort_Out16(seL4_CapIOPort, address, value); + int result = seL4_X86_IOPort_Out16(seL4_CapIOPort, address, value); - if (error != seL4_NoError) - Genode::error(__PRETTY_FUNCTION__, " failed ", error); + if (result != seL4_NoError) + error(__PRETTY_FUNCTION__, " failed ", result); } @@ -94,8 +91,8 @@ void Io_port_session_component::outl(unsigned short address, unsigned value) /* check boundaries */ if (!_in_bounds(address, sizeof(unsigned))) return; - int error = seL4_X86_IOPort_Out32(seL4_CapIOPort, address, value); + int result = seL4_X86_IOPort_Out32(seL4_CapIOPort, address, value); - if (error != seL4_NoError) - Genode::error(__PRETTY_FUNCTION__, " failed ", error); + if (result != seL4_NoError) + error(__PRETTY_FUNCTION__, " failed ", result); } diff --git a/repos/base-sel4/src/core/spec/x86/irq.cc b/repos/base-sel4/src/core/spec/x86/irq.cc index 2ea442911a..e0f6c9715c 100644 --- a/repos/base-sel4/src/core/spec/x86/irq.cc +++ b/repos/base-sel4/src/core/spec/x86/irq.cc @@ -4,12 +4,16 @@ * \date 2017-07-07 */ +/* core includes */ #include #include -long Genode::Irq_object::_associate(Irq_session::Trigger const &irq_trigger, - Irq_session::Polarity const &irq_polarity) +using namespace Core; + + +long Irq_object::_associate(Irq_session::Trigger const &irq_trigger, + Irq_session::Polarity const &irq_polarity) { enum { IRQ_EDGE = 0, IRQ_LEVEL = 1 }; enum { IRQ_HIGH = 0, IRQ_LOW = 1 }; diff --git a/repos/base-sel4/src/core/spec/x86/platform_services.cc b/repos/base-sel4/src/core/spec/x86/platform_services.cc index b542eef89a..2e779a438d 100644 --- a/repos/base-sel4/src/core/spec/x86/platform_services.cc +++ b/repos/base-sel4/src/core/spec/x86/platform_services.cc @@ -20,10 +20,10 @@ /* * Add x86 specific services */ -void Genode::platform_add_local_services(Rpc_entrypoint &ep, - Sliced_heap &heap, - Registry &services, - Trace::Source_registry &trace_sources) +void Core::platform_add_local_services(Rpc_entrypoint &ep, + Sliced_heap &heap, + Registry &services, + Core::Trace::Source_registry &trace_sources) { static Vm_root vm_root(ep, heap, core_env().ram_allocator(), core_env().local_rm(), trace_sources); diff --git a/repos/base-sel4/src/core/spec/x86/platform_thread.cc b/repos/base-sel4/src/core/spec/x86/platform_thread.cc index 7da93a0e75..14057cd21d 100644 --- a/repos/base-sel4/src/core/spec/x86/platform_thread.cc +++ b/repos/base-sel4/src/core/spec/x86/platform_thread.cc @@ -14,23 +14,25 @@ #include #include -using Genode::Phys_allocator; -using Genode::Allocator; +using namespace Core; -Phys_allocator& Genode::phys_alloc_16k(Allocator * core_mem_alloc) + +Phys_allocator &Core::phys_alloc_16k(Allocator *core_mem_alloc) { - static Genode::Phys_allocator phys_alloc_16k(core_mem_alloc); + static Phys_allocator phys_alloc_16k(core_mem_alloc); return phys_alloc_16k; } -void Genode::Platform_thread::affinity(Affinity::Location const location) + +void Platform_thread::affinity(Affinity::Location const location) { seL4_Error const res = seL4_TCB_SetAffinity(tcb_sel().value(), location.xpos()); if (res == seL4_NoError) _location = location; } -bool Genode::Thread_info::init_vcpu(Platform &platform, Cap_sel ept) + +bool Thread_info::init_vcpu(Platform &platform, Cap_sel ept) { enum { PAGES_16K = (1UL << Vcpu_kobj::SIZE_LOG2) / 4096 }; diff --git a/repos/base-sel4/src/core/spec/x86/vm_session_component.cc b/repos/base-sel4/src/core/spec/x86/vm_session_component.cc index 3e29f2dbc8..5967a16911 100644 --- a/repos/base-sel4/src/core/spec/x86/vm_session_component.cc +++ b/repos/base-sel4/src/core/spec/x86/vm_session_component.cc @@ -22,8 +22,7 @@ #include #include - -using namespace Genode; +using namespace Core; /******************************** @@ -41,7 +40,7 @@ void Vm_session_component::Vcpu::_free_up() if (ret == seL4_NoError) platform_specific().core_sel_alloc().free(_notification); else - Genode::error(__func__, " cnode delete error ", ret); + error(__func__, " cnode delete error ", ret); } } @@ -53,7 +52,7 @@ Vm_session_component::Vcpu::Vcpu(Rpc_entrypoint &ep, : _ep(ep), _ram_alloc(ram_alloc), - _ds_cap (_ram_alloc.alloc(align_addr(sizeof(Genode::Vcpu_state), 12), + _ds_cap (_ram_alloc.alloc(align_addr(sizeof(Vcpu_state), 12), Cache::CACHED)) { try { @@ -232,7 +231,7 @@ Capability Vm_session_component::create_vcpu(Thread_cap free_up(); throw; } catch (...) { - Genode::error("unexpected exception occurred"); + error("unexpected exception occurred"); free_up(); return; } @@ -285,14 +284,14 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc, return; } } catch (Vm_space::Selector_allocator::Out_of_indices) { - Genode::warning("run out of indices - flush all - cap=", - _cap_quota_guard().used(), "/", - _cap_quota_guard().avail(), "/", - _cap_quota_guard().limit(), " ram=", - _ram_quota_guard().used(), "/", - _ram_quota_guard().avail(), "/", - _ram_quota_guard().limit(), " guest=", - Genode::Hex(0UL - _map.avail())); + warning("run out of indices - flush all - cap=", + _cap_quota_guard().used(), "/", + _cap_quota_guard().avail(), "/", + _cap_quota_guard().limit(), " ram=", + _ram_quota_guard().used(), "/", + _ram_quota_guard().avail(), "/", + _ram_quota_guard().limit(), " guest=", + Hex(0UL - _map.avail())); /* drop all attachment to limit ram usage of this session */ while (true) { @@ -307,7 +306,7 @@ void Vm_session_component::_attach_vm_memory(Dataspace_component &dsc, _vm_space.map_guest(page.addr, page.hotspot, (1 << page.log2_order) / 4096, attr_flush); } catch (Vm_space::Alloc_page_table_failed) { - Genode::error("alloc page table failed"); + error("alloc page table failed"); return; } diff --git a/repos/base-sel4/src/core/spec/x86/vm_space.cc b/repos/base-sel4/src/core/spec/x86/vm_space.cc index ed06ab9f80..9016120cc5 100644 --- a/repos/base-sel4/src/core/spec/x86/vm_space.cc +++ b/repos/base-sel4/src/core/spec/x86/vm_space.cc @@ -14,10 +14,13 @@ /* core includes */ #include -long Genode::Vm_space::_map_page(Genode::Cap_sel const &idx, - Genode::addr_t const virt, - Map_attr const map_attr, - bool const ept) +using namespace Core; + + +long Vm_space::_map_page(Cap_sel const &idx, + addr_t const virt, + Map_attr const map_attr, + bool const ept) { seL4_X86_Page const service = _idx_to_sel(idx.value()).value(); seL4_X86_PageDirectory const pd = _pd_sel.value(); @@ -38,14 +41,13 @@ long Genode::Vm_space::_map_page(Genode::Cap_sel const &idx, return seL4_X86_Page_Map(service, pd, virt, rights, attr); } -long Genode::Vm_space::_unmap_page(Genode::Cap_sel const &idx) +long Vm_space::_unmap_page(Cap_sel const &idx) { seL4_X86_Page const service = _idx_to_sel(idx.value()).value(); return seL4_X86_Page_Unmap(service); } -long Genode::Vm_space::_invalidate_page(Genode::Cap_sel const &, - seL4_Word const, seL4_Word const) +long Vm_space::_invalidate_page(Cap_sel const &, seL4_Word const, seL4_Word const) { return seL4_NoError; } @@ -85,32 +87,31 @@ struct Ept_page_map_kobj static char const *name() { return "ept page-map level-4 table"; } }; -static long map_page_table(Genode::Cap_sel const pagetable, - Genode::Cap_sel const vroot, - Genode::addr_t const virt) +static long map_page_table(Cap_sel const pagetable, + Cap_sel const vroot, + addr_t const virt) { return seL4_X86_EPTPT_Map(pagetable.value(), vroot.value(), virt, seL4_X86_Default_VMAttributes); } -static long map_pdpt(Genode::Cap_sel const pdpt, - Genode::Cap_sel const vroot, - Genode::addr_t const virt) +static long map_pdpt(Cap_sel const pdpt, + Cap_sel const vroot, + addr_t const virt) { return seL4_X86_EPTPDPT_Map(pdpt.value(), vroot.value(), virt, seL4_X86_Default_VMAttributes); } -static long map_directory(Genode::Cap_sel const pd, - Genode::Cap_sel const vroot, - Genode::addr_t const virt) +static long map_directory(Cap_sel const pd, + Cap_sel const vroot, + addr_t const virt) { return seL4_X86_EPTPD_Map(pd.value(), vroot.value(), virt, seL4_X86_Default_VMAttributes); } -void Genode::Vm_space::unsynchronized_alloc_guest_page_tables(addr_t const start, - addr_t size) +void Vm_space::unsynchronized_alloc_guest_page_tables(addr_t const start, addr_t size) { addr_t constexpr PAGE_TABLE_AREA = 1UL << EPT_PAGE_TABLE_LOG2_SIZE; addr_t virt = start & ~(PAGE_TABLE_AREA - 1); diff --git a/repos/base-sel4/src/core/spec/x86_32/arch_kernel_object.h b/repos/base-sel4/src/core/spec/x86_32/arch_kernel_object.h index 1075b4003c..2a8a7ba7c3 100644 --- a/repos/base-sel4/src/core/spec/x86_32/arch_kernel_object.h +++ b/repos/base-sel4/src/core/spec/x86_32/arch_kernel_object.h @@ -17,7 +17,7 @@ #include #include -namespace Genode { +namespace Core { Phys_allocator &phys_alloc_16k(Allocator * core_mem_alloc = nullptr); diff --git a/repos/base-sel4/src/core/spec/x86_32/boot_info.cc b/repos/base-sel4/src/core/spec/x86_32/boot_info.cc index e0d6b4e824..5444b55904 100644 --- a/repos/base-sel4/src/core/spec/x86_32/boot_info.cc +++ b/repos/base-sel4/src/core/spec/x86_32/boot_info.cc @@ -17,14 +17,17 @@ /* core includes */ #include +using namespace Core; + /* provided by the assembly startup code */ -extern Genode::addr_t __initial_bx; +extern addr_t __initial_bx; + /** * Obtain seL4 boot info structure */ -seL4_BootInfo const & Genode::sel4_boot_info() +seL4_BootInfo const &Core::sel4_boot_info() { return *(seL4_BootInfo const *)__initial_bx; } diff --git a/repos/base-sel4/src/core/spec/x86_32/platform.cc b/repos/base-sel4/src/core/spec/x86_32/platform.cc index 006aa2560e..c88365509a 100644 --- a/repos/base-sel4/src/core/spec/x86_32/platform.cc +++ b/repos/base-sel4/src/core/spec/x86_32/platform.cc @@ -21,17 +21,23 @@ #include #include "arch_kernel_object.h" -seL4_Word Genode::Untyped_memory::smallest_page_type() { return seL4_X86_4K; } +using namespace Core; -void Genode::Platform::init_sel4_ipc_buffer() + +seL4_Word Untyped_memory::smallest_page_type() { return seL4_X86_4K; } + + +void Platform::init_sel4_ipc_buffer() { asm volatile ("movl %0, %%fs" :: "r"(IPCBUF_GDT_SELECTOR) : "memory"); } -long Genode::Platform::_unmap_page_frame(Cap_sel const &sel) { + +long Platform::_unmap_page_frame(Cap_sel const &sel) { return seL4_X86_Page_Unmap(sel.value()); } -void Genode::Platform::_init_core_page_table_registry() + +void Platform::_init_core_page_table_registry() { seL4_BootInfo const &bi = sel4_boot_info(); diff --git a/repos/base-sel4/src/core/spec/x86_32/platform_pd.cc b/repos/base-sel4/src/core/spec/x86_32/platform_pd.cc index 358cabb79d..9745a08ac6 100644 --- a/repos/base-sel4/src/core/spec/x86_32/platform_pd.cc +++ b/repos/base-sel4/src/core/spec/x86_32/platform_pd.cc @@ -16,8 +16,10 @@ #include "arch_kernel_object.h" +using namespace Core; -Genode::addr_t Genode::Platform_pd::_init_page_directory() const + +addr_t Platform_pd::_init_page_directory() const { addr_t const phys_addr = Untyped_memory::alloc_page(platform().ram_alloc()); seL4_Untyped const service = Untyped_memory::untyped_sel(phys_addr).value(); @@ -36,7 +38,7 @@ Genode::addr_t Genode::Platform_pd::_init_page_directory() const } -void Genode::Platform_pd::_deinit_page_directory(addr_t phys_addr) const +void Platform_pd::_deinit_page_directory(addr_t phys_addr) const { int ret = seL4_CNode_Delete(seL4_CapInitThreadCNode, _page_directory_sel.value(), 32); diff --git a/repos/base-sel4/src/core/spec/x86_32/thread.cc b/repos/base-sel4/src/core/spec/x86_32/thread.cc index 191f8a2b7a..79c419faef 100644 --- a/repos/base-sel4/src/core/spec/x86_32/thread.cc +++ b/repos/base-sel4/src/core/spec/x86_32/thread.cc @@ -21,12 +21,14 @@ #include #include -void Genode::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, - unsigned cpu) +using namespace Genode; + + +void Core::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, unsigned cpu) { /* set register values for the instruction pointer and stack pointer */ seL4_UserContext regs; - Genode::memset(®s, 0, sizeof(regs)); + memset(®s, 0, sizeof(regs)); size_t const num_regs = sizeof(regs)/sizeof(seL4_Word); regs.eip = ip; @@ -42,12 +44,14 @@ void Genode::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, seL4_TCB_Resume(tcb_sel.value()); } -void Genode::affinity_sel4_thread(Cap_sel const &tcb_sel, unsigned cpu) + +void Core::affinity_sel4_thread(Cap_sel const &tcb_sel, unsigned cpu) { seL4_TCB_SetAffinity(tcb_sel.value(), cpu); } -Genode::Thread_state Genode::Platform_thread::state() + +Thread_state Core::Platform_thread::state() { seL4_TCB const thread = _info.tcb_sel.value(); seL4_Bool const suspend_source = false; @@ -63,7 +67,7 @@ Genode::Thread_state Genode::Platform_thread::state() } Thread_state state; - Genode::memset(&state, 0, sizeof(state)); + memset(&state, 0, sizeof(state)); state.ip = registers.eip; state.sp = registers.esp; diff --git a/repos/base-sel4/src/core/spec/x86_32/vm_space.cc b/repos/base-sel4/src/core/spec/x86_32/vm_space.cc index c67a953e01..9fe2abfe4a 100644 --- a/repos/base-sel4/src/core/spec/x86_32/vm_space.cc +++ b/repos/base-sel4/src/core/spec/x86_32/vm_space.cc @@ -16,16 +16,19 @@ #include "arch_kernel_object.h" -static long map_page_table(Genode::Cap_sel const pagetable, - Genode::Cap_sel const vroot, - Genode::addr_t const virt) +using namespace Core; + + +static long map_page_table(Cap_sel const pagetable, + Cap_sel const vroot, + addr_t const virt) { return seL4_X86_PageTable_Map(pagetable.value(), vroot.value(), virt, seL4_X86_Default_VMAttributes); } -void Genode::Vm_space::unsynchronized_alloc_page_tables(addr_t const start, - addr_t const size) +void Vm_space::unsynchronized_alloc_page_tables(addr_t const start, + addr_t const size) { addr_t constexpr PAGE_TABLE_AREA = 1UL << PAGE_TABLE_LOG2_SIZE; addr_t virt = start & ~(PAGE_TABLE_AREA - 1); diff --git a/repos/base-sel4/src/core/spec/x86_64/arch_kernel_object.h b/repos/base-sel4/src/core/spec/x86_64/arch_kernel_object.h index bc3ce04ae0..ccf2673585 100644 --- a/repos/base-sel4/src/core/spec/x86_64/arch_kernel_object.h +++ b/repos/base-sel4/src/core/spec/x86_64/arch_kernel_object.h @@ -17,7 +17,7 @@ #include #include -namespace Genode { +namespace Core { Phys_allocator &phys_alloc_16k(Allocator * core_mem_alloc = nullptr); diff --git a/repos/base-sel4/src/core/spec/x86_64/boot_info.cc b/repos/base-sel4/src/core/spec/x86_64/boot_info.cc index f176d67cfc..cfa977497f 100644 --- a/repos/base-sel4/src/core/spec/x86_64/boot_info.cc +++ b/repos/base-sel4/src/core/spec/x86_64/boot_info.cc @@ -17,14 +17,16 @@ /* core includes */ #include +using namespace Core; + /* provided by the assembly startup code */ -extern Genode::addr_t __initial_di; +extern addr_t __initial_di; /** * Obtain seL4 boot info structure */ -seL4_BootInfo const & Genode::sel4_boot_info() +seL4_BootInfo const &Core::sel4_boot_info() { return *(seL4_BootInfo const *)__initial_di; } diff --git a/repos/base-sel4/src/core/spec/x86_64/platform.cc b/repos/base-sel4/src/core/spec/x86_64/platform.cc index 9e15b8e274..b5228eaafe 100644 --- a/repos/base-sel4/src/core/spec/x86_64/platform.cc +++ b/repos/base-sel4/src/core/spec/x86_64/platform.cc @@ -21,15 +21,20 @@ #include #include "arch_kernel_object.h" +using namespace Core; -seL4_Word Genode::Untyped_memory::smallest_page_type() { return seL4_X86_4K; } -void Genode::Platform::init_sel4_ipc_buffer() { } +seL4_Word Untyped_memory::smallest_page_type() { return seL4_X86_4K; } -long Genode::Platform::_unmap_page_frame(Cap_sel const &sel) { + +void Platform::init_sel4_ipc_buffer() { } + + +long Platform::_unmap_page_frame(Cap_sel const &sel) { return seL4_X86_Page_Unmap(sel.value()); } -void Genode::Platform::_init_core_page_table_registry() + +void Platform::_init_core_page_table_registry() { seL4_BootInfo const &bi = sel4_boot_info(); diff --git a/repos/base-sel4/src/core/spec/x86_64/platform_pd.cc b/repos/base-sel4/src/core/spec/x86_64/platform_pd.cc index bf14ba27ee..2c7d1c69ee 100644 --- a/repos/base-sel4/src/core/spec/x86_64/platform_pd.cc +++ b/repos/base-sel4/src/core/spec/x86_64/platform_pd.cc @@ -16,7 +16,10 @@ #include "arch_kernel_object.h" -Genode::addr_t Genode::Platform_pd::_init_page_directory() const +using namespace Core; + + +addr_t Platform_pd::_init_page_directory() const { addr_t const phys_addr = Untyped_memory::alloc_page(platform().ram_alloc()); seL4_Untyped const service = Untyped_memory::untyped_sel(phys_addr).value(); @@ -33,7 +36,7 @@ Genode::addr_t Genode::Platform_pd::_init_page_directory() const return phys_addr; } -void Genode::Platform_pd::_deinit_page_directory(addr_t phys_addr) const +void Platform_pd::_deinit_page_directory(addr_t phys_addr) const { int ret = seL4_CNode_Delete(seL4_CapInitThreadCNode, _page_directory_sel.value(), 32); diff --git a/repos/base-sel4/src/core/spec/x86_64/thread.cc b/repos/base-sel4/src/core/spec/x86_64/thread.cc index dce39cc3f7..249e423f30 100644 --- a/repos/base-sel4/src/core/spec/x86_64/thread.cc +++ b/repos/base-sel4/src/core/spec/x86_64/thread.cc @@ -21,12 +21,14 @@ #include #include -void Genode::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, - unsigned cpu) +using namespace Core; + + +void Core::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, unsigned cpu) { /* set register values for the instruction pointer and stack pointer */ seL4_UserContext regs; - Genode::memset(®s, 0, sizeof(regs)); + memset(®s, 0, sizeof(regs)); size_t const num_regs = sizeof(regs)/sizeof(seL4_Word); regs.rip = ip; @@ -41,12 +43,14 @@ void Genode::start_sel4_thread(Cap_sel tcb_sel, addr_t ip, addr_t sp, seL4_TCB_Resume(tcb_sel.value()); } -void Genode::affinity_sel4_thread(Cap_sel const &tcb_sel, unsigned cpu) + +void Core::affinity_sel4_thread(Cap_sel const &tcb_sel, unsigned cpu) { seL4_TCB_SetAffinity(tcb_sel.value(), cpu); } -Genode::Thread_state Genode::Platform_thread::state() + +Thread_state Platform_thread::state() { seL4_TCB const thread = _info.tcb_sel.value(); seL4_Bool const suspend_source = false; @@ -62,7 +66,7 @@ Genode::Thread_state Genode::Platform_thread::state() } Thread_state state; - Genode::memset(&state, 0, sizeof(state)); + memset(&state, 0, sizeof(state)); state.ip = registers.rip; state.sp = registers.rsp; diff --git a/repos/base-sel4/src/core/spec/x86_64/vm_space.cc b/repos/base-sel4/src/core/spec/x86_64/vm_space.cc index de206eeaa1..8e1d33380b 100644 --- a/repos/base-sel4/src/core/spec/x86_64/vm_space.cc +++ b/repos/base-sel4/src/core/spec/x86_64/vm_space.cc @@ -16,32 +16,35 @@ #include "arch_kernel_object.h" -static long map_page_table(Genode::Cap_sel const pagetable, - Genode::Cap_sel const vroot, - Genode::addr_t const virt) +using namespace Core; + + +static long map_page_table(Cap_sel const pagetable, + Cap_sel const vroot, + addr_t const virt) { return seL4_X86_PageTable_Map(pagetable.value(), vroot.value(), virt, seL4_X86_Default_VMAttributes); } -static long map_pdpt(Genode::Cap_sel const pdpt, - Genode::Cap_sel const vroot, +static long map_pdpt(Cap_sel const pdpt, + Cap_sel const vroot, seL4_Word const virt) { return seL4_X86_PDPT_Map(pdpt.value(), vroot.value(), virt, seL4_X86_Default_VMAttributes); } -static long map_directory(Genode::Cap_sel const pd, - Genode::Cap_sel const vroot, +static long map_directory(Cap_sel const pd, + Cap_sel const vroot, seL4_Word const virt) { return seL4_X86_PageDirectory_Map(pd.value(), vroot.value(), virt, seL4_X86_Default_VMAttributes); } -void Genode::Vm_space::unsynchronized_alloc_page_tables(addr_t const start, - addr_t const size) +void Vm_space::unsynchronized_alloc_page_tables(addr_t const start, + addr_t const size) { addr_t constexpr PAGE_TABLE_AREA = 1UL << PAGE_TABLE_LOG2_SIZE; addr_t virt = start & ~(PAGE_TABLE_AREA - 1); diff --git a/repos/base-sel4/src/core/stack_area.cc b/repos/base-sel4/src/core/stack_area.cc index ac0bebe97b..cc6b627628 100644 --- a/repos/base-sel4/src/core/stack_area.cc +++ b/repos/base-sel4/src/core/stack_area.cc @@ -15,7 +15,6 @@ /* Genode includes */ #include #include -#include #include #include @@ -47,10 +46,10 @@ class Stack_area_region_map : public Region_map { private: - using Ds_slab = Synced_allocator >; - Ds_slab _ds_slab { platform().core_mem_alloc() }; + Ds_slab _ds_slab { Core::platform().core_mem_alloc() }; public: @@ -60,10 +59,12 @@ class Stack_area_region_map : public Region_map Local_addr attach(Dataspace_capability, size_t size, off_t, bool, Local_addr local_addr, bool, bool) override { + using namespace Core; + size = round_page(size); /* allocate physical memory */ - Range_allocator &phys_alloc = platform_specific().ram_alloc(); + Range_allocator &phys_alloc = Core::platform_specific().ram_alloc(); size_t const num_pages = size >> get_page_size_log2(); addr_t const phys = Untyped_memory::alloc_pages(phys_alloc, num_pages); Untyped_memory::convert_to_page_frames(phys, num_pages); @@ -88,7 +89,7 @@ class Stack_area_region_map : public Region_map void detach(Local_addr local_addr) override { - using Genode::addr_t; + using namespace Core; if ((addr_t)local_addr >= stack_area_virtual_size()) return; diff --git a/repos/base-sel4/src/core/thread_start.cc b/repos/base-sel4/src/core/thread_start.cc index ba09822c7c..c93ac873a3 100644 --- a/repos/base-sel4/src/core/thread_start.cc +++ b/repos/base-sel4/src/core/thread_start.cc @@ -13,7 +13,6 @@ /* Genode includes */ #include -#include #include /* base-internal includes */ @@ -28,7 +27,7 @@ /* seL4 includes */ #include -using namespace Genode; +using namespace Core; void Thread::_init_platform_thread(size_t, Type type) @@ -105,9 +104,9 @@ void Thread::start() start_sel4_thread(Cap_sel(native_thread().tcb_sel), (addr_t)&_thread_start, (addr_t)stack_top(), _affinity.xpos()); - struct Core_trace_source : public Trace::Source::Info_accessor, - private Trace::Control, - private Trace::Source + struct Core_trace_source : public Core::Trace::Source::Info_accessor, + private Core::Trace::Control, + private Core::Trace::Source { Thread &_thread; @@ -129,17 +128,17 @@ void Thread::start() } - Core_trace_source(Trace::Source_registry ®istry, Thread &t) + Core_trace_source(Core::Trace::Source_registry ®istry, Thread &t) : - Trace::Control(), - Trace::Source(*this, *this), _thread(t) + Core::Trace::Control(), + Core::Trace::Source(*this, *this), _thread(t) { registry.insert(this); } }; new (platform().core_mem_alloc()) - Core_trace_source(Trace::sources(), *this); + Core_trace_source(Core::Trace::sources(), *this); } diff --git a/repos/base/src/core/capability_space.cc b/repos/base/src/core/capability_space.cc index ba16260cdf..4f714f2d85 100644 --- a/repos/base/src/core/capability_space.cc +++ b/repos/base/src/core/capability_space.cc @@ -11,13 +11,15 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* base includes */ +/* Genode includes */ #include -#include /* base-internal includes */ #include +/* core includes */ +#include + /** * Definition of capability meta data @@ -33,7 +35,7 @@ struct Genode::Native_capability::Data : Capability_data }; -using namespace Genode; +using namespace Core; /** diff --git a/repos/base/src/core/core_log.cc b/repos/base/src/core/core_log.cc index 8df8613bd3..88a043804c 100644 --- a/repos/base/src/core/core_log.cc +++ b/repos/base/src/core/core_log.cc @@ -12,11 +12,17 @@ * under the terms of the GNU Affero General Public License version 3. */ +/* Genode includes */ +#include + +/* core includes */ #include -static Genode::Core_log_range range { 0, 0 }; + +static Core::Core_log_range range { 0, 0 }; static unsigned range_pos { 0 }; + static void out_mem(char const c) { struct Log_memory @@ -25,7 +31,7 @@ static void out_mem(char const c) char data[1]; unsigned out(char const c, unsigned cur_pos, - Genode::Core_log_range const &range) + Core::Core_log_range const &range) { pos.value = cur_pos; data[cur_pos++] = c; @@ -40,10 +46,10 @@ static void out_mem(char const c) } -void Genode::init_core_log(Core_log_range const &r) { range = r; } +void Core::init_core_log(Core_log_range const &r) { range = r; } -void Genode::Core_log::output(char const * str) +void Core::Core_log::output(char const * str) { for (unsigned i = 0; i < Genode::strlen(str); i++) { out(str[i]); diff --git a/repos/base/src/core/core_mem_alloc.cc b/repos/base/src/core/core_mem_alloc.cc index e352ab6337..cbad2f1f61 100644 --- a/repos/base/src/core/core_mem_alloc.cc +++ b/repos/base/src/core/core_mem_alloc.cc @@ -13,13 +13,12 @@ */ /* Genode includes */ -#include #include /* local includes */ #include -using namespace Genode; +using namespace Core; void * Mapped_avl_allocator::map_addr(void * addr) @@ -83,8 +82,9 @@ void Mapped_mem_allocator::free(void *addr, size_t) if (!b) return; if (!_unmap_local((addr_t)addr, (addr_t)b->map_addr, b->size())) { - Genode::error("error on unmap virt=", addr, " phys=", - Hex_range((addr_t)b->map_addr, b->size())); + error("error on unmap virt=", addr, " phys=", + Hex_range((addr_t)b->map_addr, b->size())); + /* leak physical and virtual region because of unknown usage state */ return; } diff --git a/repos/base/src/core/core_region_map.cc b/repos/base/src/core/core_region_map.cc index 8fff99e350..b505d6f3a8 100644 --- a/repos/base/src/core/core_region_map.cc +++ b/repos/base/src/core/core_region_map.cc @@ -18,7 +18,7 @@ #include #include -using namespace Genode; +using namespace Core; Region_map::Local_addr diff --git a/repos/base/src/core/core_rpc_cap_alloc.cc b/repos/base/src/core/core_rpc_cap_alloc.cc index f26ffeee7c..b8203279b6 100644 --- a/repos/base/src/core/core_rpc_cap_alloc.cc +++ b/repos/base/src/core/core_rpc_cap_alloc.cc @@ -14,11 +14,11 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include #include -using namespace Genode; +using namespace Core; static Rpc_cap_factory &rpc_cap_factory() diff --git a/repos/base/src/core/cpu_session_component.cc b/repos/base/src/core/cpu_session_component.cc index 959e1ab113..626d0eb4e3 100644 --- a/repos/base/src/core/cpu_session_component.cc +++ b/repos/base/src/core/cpu_session_component.cc @@ -14,7 +14,6 @@ */ /* Genode includes */ -#include #include /* core includes */ @@ -23,7 +22,7 @@ #include #include -using namespace Genode; +using namespace Core; Thread_capability Cpu_session_component::create_thread(Capability pd_cap, @@ -378,7 +377,7 @@ size_t Cpu_session_component::_weight_to_quota(size_t const weight) const ** Trace::Source_registry ** ****************************/ -unsigned Trace::Source::_alloc_unique_id() +unsigned Core::Trace::Source::_alloc_unique_id() { static Mutex lock; static unsigned cnt; diff --git a/repos/base/src/core/cpu_session_support.cc b/repos/base/src/core/cpu_session_support.cc index 66f6523b81..7525b58dd3 100644 --- a/repos/base/src/core/cpu_session_support.cc +++ b/repos/base/src/core/cpu_session_support.cc @@ -11,13 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include -using namespace Genode; +using namespace Core; Dataspace_capability Cpu_thread_component::utcb() diff --git a/repos/base/src/core/cpu_thread_component.cc b/repos/base/src/core/cpu_thread_component.cc index fdd21b198d..8d694ed299 100644 --- a/repos/base/src/core/cpu_thread_component.cc +++ b/repos/base/src/core/cpu_thread_component.cc @@ -14,7 +14,7 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; void Cpu_thread_component::_update_exception_sigh() diff --git a/repos/base/src/core/dataspace_component.cc b/repos/base/src/core/dataspace_component.cc index 1ba4f5ead5..c109ac5c1e 100644 --- a/repos/base/src/core/dataspace_component.cc +++ b/repos/base/src/core/dataspace_component.cc @@ -15,7 +15,7 @@ #include #include -using namespace Genode; +using namespace Core; void Dataspace_component::attached_to(Rm_region ®ion) diff --git a/repos/base/src/core/default_log.cc b/repos/base/src/core/default_log.cc index 01a52833a9..1da89e4deb 100644 --- a/repos/base/src/core/default_log.cc +++ b/repos/base/src/core/default_log.cc @@ -13,7 +13,6 @@ */ /* Genode includes */ -#include #include /* base-internal includes */ @@ -28,7 +27,7 @@ Genode::Log &Genode::Log::log() { struct Buffer { - struct Write_fn : Core_log + struct Write_fn : Core::Core_log { void operator () (char const *s) { output(s); } } function { }; diff --git a/repos/base/src/core/include/account.h b/repos/base/src/core/include/account.h index fda6370ad6..763a8244a6 100644 --- a/repos/base/src/core/include/account.h +++ b/repos/base/src/core/include/account.h @@ -14,15 +14,17 @@ #ifndef _CORE__INCLUDE__ACCOUNT_H_ #define _CORE__INCLUDE__ACCOUNT_H_ -#include #include #include -namespace Genode { template class Account; } +/* core includes */ +#include + +namespace Core { template class Account; } template -class Genode::Account +class Core::Account { private: diff --git a/repos/base/src/core/include/address_space.h b/repos/base/src/core/include/address_space.h index 0df3ecfa0b..b0eaf525be 100644 --- a/repos/base/src/core/include/address_space.h +++ b/repos/base/src/core/include/address_space.h @@ -14,14 +14,17 @@ #ifndef _CORE__INCLUDE__ADDRESS_SPACE_H_ #define _CORE__INCLUDE__ADDRESS_SPACE_H_ -#include +/* Genode includes */ #include -namespace Genode { struct Address_space; } +/* core includes */ +#include + +namespace Core { struct Address_space; } -struct Genode::Address_space : private Weak_object, - public Interface +struct Core::Address_space : private Weak_object, + public Interface { friend class Locked_ptr; diff --git a/repos/base/src/core/include/boot_modules.h b/repos/base/src/core/include/boot_modules.h index b4ea90af33..5ec33fafe7 100644 --- a/repos/base/src/core/include/boot_modules.h +++ b/repos/base/src/core/include/boot_modules.h @@ -14,19 +14,22 @@ #ifndef _CORE__INCLUDE__BOOT_MODULES_H_ #define _CORE__INCLUDE__BOOT_MODULES_H_ -namespace Genode { struct Boot_modules_header; } +/* core includes */ +#include + +namespace Core { struct Boot_modules_header; } -struct Genode::Boot_modules_header +struct Core::Boot_modules_header { long name; /* physical address of null-terminated string */ long base; /* physical address of module data */ long size; /* size of module data in bytes */ }; -extern Genode::Boot_modules_header _boot_modules_headers_begin; -extern Genode::Boot_modules_header _boot_modules_headers_end; -extern int _boot_modules_binaries_begin; -extern int _boot_modules_binaries_end; +extern Core::Boot_modules_header _boot_modules_headers_begin; +extern Core::Boot_modules_header _boot_modules_headers_end; +extern int _boot_modules_binaries_begin; +extern int _boot_modules_binaries_end; #endif /* _CORE__INCLUDE__BOOT_MODULES_H_ */ diff --git a/repos/base/src/core/include/constrained_core_ram.h b/repos/base/src/core/include/constrained_core_ram.h index a5776bace0..393ed923c3 100644 --- a/repos/base/src/core/include/constrained_core_ram.h +++ b/repos/base/src/core/include/constrained_core_ram.h @@ -15,12 +15,16 @@ #ifndef _CORE__INCLUDE__CORE_CONSTRAINED_CORE_RAM_H_ #define _CORE__INCLUDE__CORE_CONSTRAINED_CORE_RAM_H_ +/* Genode includes */ #include -namespace Genode { class Constrained_core_ram; } +/* core includes */ +#include + +namespace Core { class Constrained_core_ram; } -class Genode::Constrained_core_ram : public Allocator +class Core::Constrained_core_ram : public Allocator { private: @@ -28,7 +32,7 @@ class Genode::Constrained_core_ram : public Allocator Cap_quota_guard &_cap_guard; Range_allocator &_core_mem; - uint64_t core_mem_allocated { 0 }; + Genode::uint64_t core_mem_allocated { 0 }; public: diff --git a/repos/base/src/core/include/core_capability_space.h b/repos/base/src/core/include/core_capability_space.h index 8bce5980ae..7185789760 100644 --- a/repos/base/src/core/include/core_capability_space.h +++ b/repos/base/src/core/include/core_capability_space.h @@ -17,10 +17,15 @@ /* base-internal includes */ #include -namespace Genode { class Cap_sel; class Pd_session; } +/* core includes */ +#include +namespace Genode { -namespace Genode { namespace Capability_space { + class Pd_session; + class Cap_sel; + + namespace Capability_space { /** * Create new RPC object capability for the specified entrypoint @@ -29,7 +34,7 @@ namespace Genode { namespace Capability_space { Pd_session const *, Rpc_obj_key); - Native_capability create_notification_cap(Genode::Cap_sel ¬ify_cap); + Native_capability create_notification_cap(Cap_sel ¬ify_cap); } } #endif /* _CORE__INCLUDE__CORE_CAPABILITY_SPACE_H_ */ diff --git a/repos/base/src/core/include/core_env.h b/repos/base/src/core/include/core_env.h index 9f7278ed9d..a152d34de7 100644 --- a/repos/base/src/core/include/core_env.h +++ b/repos/base/src/core/include/core_env.h @@ -29,14 +29,14 @@ #include #include -namespace Genode { +namespace Core { class Core_env; extern Core_env &core_env(); } -class Genode::Core_env : public Env_deprecated, Noncopyable +class Core::Core_env : public Env_deprecated, Noncopyable { private: diff --git a/repos/base/src/core/include/core_log.h b/repos/base/src/core/include/core_log.h index a60d42964f..88d1b92e7b 100644 --- a/repos/base/src/core/include/core_log.h +++ b/repos/base/src/core/include/core_log.h @@ -15,9 +15,10 @@ #ifndef _CORE_LOG_H_ #define _CORE_LOG_H_ -#include +/* core includes */ +#include -namespace Genode { +namespace Core { struct Core_log; @@ -30,7 +31,7 @@ namespace Genode { } -struct Genode::Core_log +struct Core::Core_log { void out(char const c); diff --git a/repos/base/src/core/include/core_mem_alloc.h b/repos/base/src/core/include/core_mem_alloc.h index dcd317e75f..783772b71c 100644 --- a/repos/base/src/core/include/core_mem_alloc.h +++ b/repos/base/src/core/include/core_mem_alloc.h @@ -15,12 +15,16 @@ #ifndef _CORE__INCLUDE__CORE_MEM_ALLOC_H_ #define _CORE__INCLUDE__CORE_MEM_ALLOC_H_ +/* Genode includes */ #include #include + +/* core includes */ #include #include -namespace Genode { +namespace Core { + class Core_mem_translator; class Core_mem_allocator; @@ -39,7 +43,7 @@ namespace Genode { * Interface of an allocator that allows to return physical addresses * of its used virtual address ranges, and vice versa. */ -class Genode::Core_mem_translator : public Genode::Range_allocator +class Core::Core_mem_translator : public Range_allocator { public: @@ -62,14 +66,13 @@ class Genode::Core_mem_translator : public Genode::Range_allocator /** * Metadata for allocator blocks that stores a related address */ -struct Genode::Metadata { void * map_addr; }; +struct Core::Metadata { void * map_addr; }; /** * Page-size granular allocator that links ranges to related ones. */ -class Genode::Mapped_avl_allocator -: public Genode::Allocator_avl_tpl +class Core::Mapped_avl_allocator : public Allocator_avl_tpl { friend class Mapped_mem_allocator; @@ -99,7 +102,7 @@ class Genode::Mapped_avl_allocator * meta-data allocator for the other allocators and as back end for core's * synchronized memory allocator. */ -class Genode::Mapped_mem_allocator : public Genode::Core_mem_translator +class Core::Mapped_mem_allocator : public Core_mem_translator { private: @@ -196,7 +199,7 @@ class Genode::Mapped_mem_allocator : public Genode::Core_mem_translator * The class itself implements a ready-to-use memory allocator for * core that allows to allocate memory at page granularity only. */ -class Genode::Core_mem_allocator : public Genode::Core_mem_translator +class Core::Core_mem_allocator : public Core_mem_translator { protected: diff --git a/repos/base/src/core/include/core_region_map.h b/repos/base/src/core/include/core_region_map.h index d322a0f35d..fee4e1dedc 100644 --- a/repos/base/src/core/include/core_region_map.h +++ b/repos/base/src/core/include/core_region_map.h @@ -21,10 +21,10 @@ /* core includes */ #include -namespace Genode { class Core_region_map; } +namespace Core { class Core_region_map; } -class Genode::Core_region_map : public Region_map +class Core::Core_region_map : public Region_map { private: diff --git a/repos/base/src/core/include/core_service.h b/repos/base/src/core/include/core_service.h index 4f0ef1185c..7d59099cc3 100644 --- a/repos/base/src/core/include/core_service.h +++ b/repos/base/src/core/include/core_service.h @@ -16,11 +16,14 @@ #include -namespace Genode { template struct Core_service; } +/* core includes */ +#include + +namespace Core { template struct Core_service; } template -struct Genode::Core_service : Local_service +struct Core::Core_service : Local_service { Registry::Element _element; diff --git a/repos/base/src/core/include/cpu_root.h b/repos/base/src/core/include/cpu_root.h index c9136bdd65..9d3cb0d1d1 100644 --- a/repos/base/src/core/include/cpu_root.h +++ b/repos/base/src/core/include/cpu_root.h @@ -20,10 +20,10 @@ /* Core includes */ #include -namespace Genode { class Cpu_root; } +namespace Core { class Cpu_root; } -class Genode::Cpu_root : public Root_component +class Core::Cpu_root : public Root_component { private: diff --git a/repos/base/src/core/include/cpu_session_component.h b/repos/base/src/core/include/cpu_session_component.h index 328a498911..c309210b80 100644 --- a/repos/base/src/core/include/cpu_session_component.h +++ b/repos/base/src/core/include/cpu_session_component.h @@ -32,11 +32,11 @@ #include #include -namespace Genode { class Cpu_session_component; } +namespace Core { class Cpu_session_component; } -class Genode::Cpu_session_component : public Session_object, - private List::Element +class Core::Cpu_session_component : public Session_object, + private List::Element { private: diff --git a/repos/base/src/core/include/cpu_thread_allocator.h b/repos/base/src/core/include/cpu_thread_allocator.h index a54a6724c1..69a82d5bf7 100644 --- a/repos/base/src/core/include/cpu_thread_allocator.h +++ b/repos/base/src/core/include/cpu_thread_allocator.h @@ -18,10 +18,13 @@ #include #include +/* core includes */ +#include + /* base-internal includes */ #include -namespace Genode { +namespace Core { class Cpu_thread_component; diff --git a/repos/base/src/core/include/cpu_thread_component.h b/repos/base/src/core/include/cpu_thread_component.h index e1b9652a5e..84cec38f21 100644 --- a/repos/base/src/core/include/cpu_thread_component.h +++ b/repos/base/src/core/include/cpu_thread_component.h @@ -28,12 +28,12 @@ #include #include -namespace Genode { class Cpu_thread_component; } +namespace Core { class Cpu_thread_component; } -class Genode::Cpu_thread_component : public Rpc_object, - private List::Element, - public Trace::Source::Info_accessor +class Core::Cpu_thread_component : public Rpc_object, + private List::Element, + public Trace::Source::Info_accessor { public: diff --git a/repos/base/src/core/include/dataspace_component.h b/repos/base/src/core/include/dataspace_component.h index 0c97032051..3e74475c3c 100644 --- a/repos/base/src/core/include/dataspace_component.h +++ b/repos/base/src/core/include/dataspace_component.h @@ -23,7 +23,7 @@ /* core includes */ #include -namespace Genode { +namespace Core { class Rm_region; class Dataspace_component; @@ -35,7 +35,7 @@ namespace Genode { } -class Genode::Dataspace_component : public Rpc_object +class Core::Dataspace_component : public Rpc_object { private: @@ -134,7 +134,7 @@ class Genode::Dataspace_component : public Rpc_object */ addr_t map_src_addr() const { - return Genode::map_src_addr(_core_local_addr, _phys_addr); + return Core::map_src_addr(_core_local_addr, _phys_addr); } void assign_core_local_addr(void *addr) { _core_local_addr = (addr_t)addr; } diff --git a/repos/base/src/core/include/io_mem_root.h b/repos/base/src/core/include/io_mem_root.h index b21b72ae23..4695f29578 100644 --- a/repos/base/src/core/include/io_mem_root.h +++ b/repos/base/src/core/include/io_mem_root.h @@ -16,12 +16,13 @@ #include -#include "io_mem_session_component.h" +/* core includes */ +#include -namespace Genode { class Io_mem_root; } +namespace Core { class Io_mem_root; } -class Genode::Io_mem_root : public Root_component +class Core::Io_mem_root : public Root_component { private: diff --git a/repos/base/src/core/include/io_mem_session_component.h b/repos/base/src/core/include/io_mem_session_component.h index 617df1300a..de7687380a 100644 --- a/repos/base/src/core/include/io_mem_session_component.h +++ b/repos/base/src/core/include/io_mem_session_component.h @@ -22,10 +22,10 @@ /* core includes */ #include -namespace Genode { class Io_mem_session_component; } +namespace Core { class Io_mem_session_component; } -class Genode::Io_mem_session_component : public Rpc_object +class Core::Io_mem_session_component : public Rpc_object { private: diff --git a/repos/base/src/core/include/io_port_root.h b/repos/base/src/core/include/io_port_root.h index c95ab573a6..76eae53aa3 100644 --- a/repos/base/src/core/include/io_port_root.h +++ b/repos/base/src/core/include/io_port_root.h @@ -16,15 +16,16 @@ #include -#include "io_port_session_component.h" +/* core includes */ +#include -namespace Genode { +namespace Core { class Io_port_handler; class Io_port_root; } -class Genode::Io_port_handler +class Core::Io_port_handler { private: @@ -41,8 +42,8 @@ class Genode::Io_port_handler }; -class Genode::Io_port_root : private Io_port_handler, - public Root_component +class Core::Io_port_root : private Io_port_handler, + public Root_component { private: diff --git a/repos/base/src/core/include/io_port_session_component.h b/repos/base/src/core/include/io_port_session_component.h index 2360cab220..b87ccc17d3 100644 --- a/repos/base/src/core/include/io_port_session_component.h +++ b/repos/base/src/core/include/io_port_session_component.h @@ -24,10 +24,10 @@ /* core includes */ #include -namespace Genode { class Io_port_session_component; } +namespace Core { class Io_port_session_component; } -class Genode::Io_port_session_component : public Rpc_object +class Core::Io_port_session_component : public Rpc_object { private: diff --git a/repos/base/src/core/include/irq_args.h b/repos/base/src/core/include/irq_args.h index 92ceb6f34a..06f9e24480 100644 --- a/repos/base/src/core/include/irq_args.h +++ b/repos/base/src/core/include/irq_args.h @@ -14,14 +14,16 @@ #ifndef _CORE__INCLUDE__IRQ_ARGS_H_ #define _CORE__INCLUDE__IRQ_ARGS_H_ -#include #include #include -namespace Genode { class Irq_args; } +/* core includes */ +#include + +namespace Core { class Irq_args; } -class Genode::Irq_args +class Core::Irq_args { private: diff --git a/repos/base/src/core/include/irq_object.h b/repos/base/src/core/include/irq_object.h index 8dc9f9b495..b39cb9beba 100644 --- a/repos/base/src/core/include/irq_object.h +++ b/repos/base/src/core/include/irq_object.h @@ -16,10 +16,13 @@ #include -namespace Genode { class Irq_object; } +/* core includes */ +#include + +namespace Core { class Irq_object; } -class Genode::Irq_object : public Thread +class Core::Irq_object : public Thread { private: diff --git a/repos/base/src/core/include/irq_root.h b/repos/base/src/core/include/irq_root.h index 9e909cbcd7..6db7b8510c 100644 --- a/repos/base/src/core/include/irq_root.h +++ b/repos/base/src/core/include/irq_root.h @@ -16,12 +16,14 @@ #define _CORE__INCLUDE__IRQ_ROOT_H_ #include + +/* core includes */ #include -namespace Genode { class Irq_root; } +namespace Core { class Irq_root; } -class Genode::Irq_root : public Root_component +class Core::Irq_root : public Root_component { private: diff --git a/repos/base/src/core/include/irq_session_component.h b/repos/base/src/core/include/irq_session_component.h index 0d2efa7f3f..4c049268e7 100644 --- a/repos/base/src/core/include/irq_session_component.h +++ b/repos/base/src/core/include/irq_session_component.h @@ -20,13 +20,14 @@ #include #include +/* core includes */ #include -namespace Genode { class Irq_session_component; } +namespace Core { class Irq_session_component; } -class Genode::Irq_session_component : public Rpc_object, - private List::Element +class Core::Irq_session_component : public Rpc_object, + private List::Element { private: diff --git a/repos/base/src/core/include/log_root.h b/repos/base/src/core/include/log_root.h index 466b5bb7f2..9731f9df19 100644 --- a/repos/base/src/core/include/log_root.h +++ b/repos/base/src/core/include/log_root.h @@ -17,12 +17,13 @@ #include #include -#include "log_session_component.h" +/* core includes */ +#include -namespace Genode { class Log_root; } +namespace Core { class Log_root; } -class Genode::Log_root : public Root_component +class Core::Log_root : public Root_component { protected: diff --git a/repos/base/src/core/include/log_session_component.h b/repos/base/src/core/include/log_session_component.h index 27bad22ed7..eaa45f96d5 100644 --- a/repos/base/src/core/include/log_session_component.h +++ b/repos/base/src/core/include/log_session_component.h @@ -14,16 +14,17 @@ #ifndef _CORE__INCLUDE__LOG_SESSION_COMPONENT_H_ #define _CORE__INCLUDE__LOG_SESSION_COMPONENT_H_ -#include -#include #include #include #include -namespace Genode { class Log_session_component; } +/* core includes */ +#include + +namespace Core { class Log_session_component; } -class Genode::Log_session_component : public Rpc_object +class Core::Log_session_component : public Rpc_object { private: @@ -58,7 +59,7 @@ class Genode::Log_session_component : public Rpc_object } char const * const string = string_buf.string(); - size_t const len = strlen(string); + size_t const len = Genode::strlen(string); unsigned from_i = 0; for (unsigned i = 0; i < len; i++) { diff --git a/repos/base/src/core/include/mapping.h b/repos/base/src/core/include/mapping.h index 2de2dae558..7a7f8590f2 100644 --- a/repos/base/src/core/include/mapping.h +++ b/repos/base/src/core/include/mapping.h @@ -14,12 +14,13 @@ #ifndef _CORE__INCLUDE__MAPPING_H_ #define _CORE__INCLUDE__MAPPING_H_ -#include +/* core includes */ +#include -namespace Genode { struct Mapping; } +namespace Core { struct Mapping; } -struct Genode::Mapping +struct Core::Mapping { addr_t dst_addr; addr_t src_addr; diff --git a/repos/base/src/core/include/native_cpu_component.h b/repos/base/src/core/include/native_cpu_component.h index b90cc39663..9df72b4eef 100644 --- a/repos/base/src/core/include/native_cpu_component.h +++ b/repos/base/src/core/include/native_cpu_component.h @@ -19,17 +19,17 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include -namespace Genode { +namespace Core { class Cpu_session_component; class Native_cpu_component; } -struct Genode::Native_cpu_component +struct Core::Native_cpu_component { Native_cpu_component(Cpu_session_component &, char const *) { } diff --git a/repos/base/src/core/include/native_pd_component.h b/repos/base/src/core/include/native_pd_component.h index 6a1d1ec2e5..9e8a6ba858 100644 --- a/repos/base/src/core/include/native_pd_component.h +++ b/repos/base/src/core/include/native_pd_component.h @@ -19,17 +19,17 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include -namespace Genode { +namespace Core { class Pd_session_component; class Native_pd_component; } -struct Genode::Native_pd_component +struct Core::Native_pd_component { Native_pd_component(Pd_session_component &, char const *) { } diff --git a/repos/base/src/core/include/pager.h b/repos/base/src/core/include/pager.h index 259c2cea14..29ac8b7c68 100644 --- a/repos/base/src/core/include/pager.h +++ b/repos/base/src/core/include/pager.h @@ -24,11 +24,11 @@ #include #include -/* core-local includes */ +/* core includes */ #include #include -namespace Genode { +namespace Core { typedef Cpu_session::Thread_creation_failed Invalid_thread; @@ -46,11 +46,13 @@ namespace Genode { */ class Pager_entrypoint; + using Pager_capability = Capability; + enum { PAGER_EP_STACK_SIZE = sizeof(addr_t) * 2048 }; } -class Genode::Pager_object : public Object_pool::Entry +class Core::Pager_object : public Object_pool::Entry { protected: @@ -162,8 +164,8 @@ class Genode::Pager_object : public Object_pool::Entry }; -class Genode::Pager_entrypoint : public Object_pool, - public Thread +class Core::Pager_entrypoint : public Object_pool, + public Thread { private: diff --git a/repos/base/src/core/include/pager_object_exception_state.h b/repos/base/src/core/include/pager_object_exception_state.h index 50ef55a7f7..a3d0a9f902 100644 --- a/repos/base/src/core/include/pager_object_exception_state.h +++ b/repos/base/src/core/include/pager_object_exception_state.h @@ -16,6 +16,9 @@ #include -namespace Genode { typedef Thread_state Pager_object_exception_state; } +/* core includes */ +#include + +namespace Core { typedef Thread_state Pager_object_exception_state; } #endif /* _CORE__INCLUDE__PAGER_OBJECT_EXCEPTION_STATE_H_ */ diff --git a/repos/base/src/core/include/pd_root.h b/repos/base/src/core/include/pd_root.h index 47b09b0161..908b8ea2fa 100644 --- a/repos/base/src/core/include/pd_root.h +++ b/repos/base/src/core/include/pd_root.h @@ -20,10 +20,10 @@ /* Core */ #include -namespace Genode { class Pd_root; } +namespace Core { class Pd_root; } -class Genode::Pd_root : public Genode::Root_component +class Core::Pd_root : public Root_component { private: @@ -58,7 +58,8 @@ class Genode::Pd_root : public Genode::Root_component #include #include #include @@ -38,10 +37,10 @@ #include #include -namespace Genode { class Pd_session_component; } +namespace Core { class Pd_session_component; } -class Genode::Pd_session_component : public Session_object +class Core::Pd_session_component : public Session_object { public: @@ -206,7 +205,7 @@ class Genode::Pd_session_component : public Session_object { _consume_cap(SIG_SOURCE_CAP); try { return _signal_broker.alloc_signal_source(); } - catch (Genode::Allocator::Out_of_memory) { + catch (Allocator::Out_of_memory) { _released_cap_silent(); throw Out_of_ram(); } diff --git a/repos/base/src/core/include/platform_generic.h b/repos/base/src/core/include/platform_generic.h index 0f11e90410..da3bbfe6c1 100644 --- a/repos/base/src/core/include/platform_generic.h +++ b/repos/base/src/core/include/platform_generic.h @@ -22,7 +22,7 @@ /* core includes */ #include -namespace Genode { +namespace Core { class Platform_generic; @@ -42,7 +42,7 @@ namespace Genode { } -class Genode::Platform_generic +class Core::Platform_generic { public: diff --git a/repos/base/src/core/include/platform_services.h b/repos/base/src/core/include/platform_services.h index 4cb70bed37..5193f7f892 100644 --- a/repos/base/src/core/include/platform_services.h +++ b/repos/base/src/core/include/platform_services.h @@ -14,15 +14,18 @@ #ifndef _CORE__INCLUDE__PLATFORM_SERVICES_H_ #define _CORE__INCLUDE__PLATFORM_SERVICES_H_ +/* core includes */ #include #include namespace Genode { - class Rpc_entrypoint; class Sliced_heap; +} +namespace Core { + /** * Register platform-specific services at entrypoint, and service * registry diff --git a/repos/base/src/core/include/ram_dataspace_factory.h b/repos/base/src/core/include/ram_dataspace_factory.h index 747372b01b..2bdb4b5ed6 100644 --- a/repos/base/src/core/include/ram_dataspace_factory.h +++ b/repos/base/src/core/include/ram_dataspace_factory.h @@ -24,11 +24,11 @@ /* core includes */ #include -namespace Genode { class Ram_dataspace_factory; } +namespace Core { class Ram_dataspace_factory; } -class Genode::Ram_dataspace_factory : public Ram_allocator, - public Dataspace_owner +class Core::Ram_dataspace_factory : public Ram_allocator, + public Dataspace_owner { public: diff --git a/repos/base/src/core/include/region_map_component.h b/repos/base/src/core/include/region_map_component.h index 4764eab865..7025259bc6 100644 --- a/repos/base/src/core/include/region_map_component.h +++ b/repos/base/src/core/include/region_map_component.h @@ -16,7 +16,6 @@ #define _CORE__INCLUDE__REGION_MAP_COMPONENT_H_ /* Genode includes */ -#include #include #include #include @@ -39,7 +38,7 @@ /* base-internal includes */ #include -namespace Genode { +namespace Core { class Cpu_thread_component; class Dataspace_component; class Region_map_component; @@ -51,7 +50,7 @@ namespace Genode { } -class Genode::Region_map_detach : Genode::Interface +class Core::Region_map_detach : Interface { public: @@ -69,7 +68,7 @@ class Genode::Region_map_detach : Genode::Interface * organized in a linked list. The head of the list is a member of the * 'Dataspace_component'. */ -class Genode::Rm_region : public List::Element +class Core::Rm_region : public List::Element { public: @@ -120,7 +119,7 @@ class Genode::Rm_region : public List::Element * be able to handle faults by arbitrary clients (not only its own * clients), it maintains the list head of faulters. */ -class Genode::Rm_faulter : Fifo::Element, Interface +class Core::Rm_faulter : Fifo::Element, Interface { private: @@ -180,8 +179,8 @@ class Genode::Rm_faulter : Fifo::Element, Interface * A region map can be used as address space for any number of threads. This * class represents the thread's role as member of this address space. */ -class Genode::Rm_client : public Pager_object, public Rm_faulter, - private List::Element +class Core::Rm_client : public Pager_object, public Rm_faulter, + private List::Element { private: @@ -219,10 +218,10 @@ class Genode::Rm_client : public Pager_object, public Rm_faulter, }; -class Genode::Region_map_component : private Weak_object, - public Rpc_object, - private List::Element, - public Region_map_detach +class Core::Region_map_component : private Weak_object, + public Rpc_object, + private List::Element, + public Region_map_detach { private: diff --git a/repos/base/src/core/include/rm_root.h b/repos/base/src/core/include/rm_root.h index 263564cc71..ec30be460d 100644 --- a/repos/base/src/core/include/rm_root.h +++ b/repos/base/src/core/include/rm_root.h @@ -17,14 +17,14 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ #include #include -namespace Genode { class Rm_root; } +namespace Core { class Rm_root; } -class Genode::Rm_root : public Root_component +class Core::Rm_root : public Root_component { private: diff --git a/repos/base/src/core/include/rm_session_component.h b/repos/base/src/core/include/rm_session_component.h index f90f3c4d7e..c3731b0f61 100644 --- a/repos/base/src/core/include/rm_session_component.h +++ b/repos/base/src/core/include/rm_session_component.h @@ -22,10 +22,10 @@ /* core includes */ #include -namespace Genode { class Rm_session_component; } +namespace Core { class Rm_session_component; } -class Genode::Rm_session_component : public Session_object +class Core::Rm_session_component : public Session_object { private: diff --git a/repos/base/src/core/include/rom_fs.h b/repos/base/src/core/include/rom_fs.h index 00bcc17691..a06a208835 100644 --- a/repos/base/src/core/include/rom_fs.h +++ b/repos/base/src/core/include/rom_fs.h @@ -15,16 +15,18 @@ #ifndef _CORE__INCLUDE__ROM_FS_H_ #define _CORE__INCLUDE__ROM_FS_H_ -#include #include -namespace Genode { +/* core includes */ +#include + +namespace Core { struct Rom_module; struct Rom_fs; } -struct Genode::Rom_module : Genode::Avl_string_base +struct Core::Rom_module : Avl_string_base { addr_t const addr = 0; size_t const size = 0; @@ -36,12 +38,12 @@ struct Genode::Rom_module : Genode::Avl_string_base bool valid() const { return size ? true : false; } - void print(Genode::Output & out) const { + void print(Output & out) const { Genode::print(out, Hex_range(addr, size), " ", name()); } }; -struct Genode::Rom_fs : Genode::Avl_tree +struct Core::Rom_fs : Avl_tree { Rom_module const * find(char const * const name) const { @@ -49,7 +51,7 @@ struct Genode::Rom_fs : Genode::Avl_tree : nullptr; } - void print(Genode::Output & out) const + void print(Output & out) const { if (!first()) Genode::print(out, "No modules in Rom_fs\n"); diff --git a/repos/base/src/core/include/rom_root.h b/repos/base/src/core/include/rom_root.h index 50260ed821..879c919c8b 100644 --- a/repos/base/src/core/include/rom_root.h +++ b/repos/base/src/core/include/rom_root.h @@ -15,12 +15,14 @@ #define _CORE__INCLUDE__ROM_ROOT_H_ #include -#include "rom_session_component.h" -namespace Genode { class Rom_root; } +/* Genode includes */ +#include + +namespace Core { class Rom_root; } -class Genode::Rom_root : public Root_component +class Core::Rom_root : public Root_component { private: diff --git a/repos/base/src/core/include/rom_session_component.h b/repos/base/src/core/include/rom_session_component.h index e8ab04d66a..e29f26f452 100644 --- a/repos/base/src/core/include/rom_session_component.h +++ b/repos/base/src/core/include/rom_session_component.h @@ -14,16 +14,18 @@ #ifndef _CORE__INCLUDE__ROM_SESSION_COMPONENT_H_ #define _CORE__INCLUDE__ROM_SESSION_COMPONENT_H_ -#include #include #include #include #include -namespace Genode { class Rom_session_component; } +/* core includes */ +#include + +namespace Core { class Rom_session_component; } -class Genode::Rom_session_component : public Rpc_object +class Core::Rom_session_component : public Rpc_object { private: diff --git a/repos/base/src/core/include/rpc_cap_factory.h b/repos/base/src/core/include/rpc_cap_factory.h index 6a28ceaa20..5cf81a215b 100644 --- a/repos/base/src/core/include/rpc_cap_factory.h +++ b/repos/base/src/core/include/rpc_cap_factory.h @@ -18,10 +18,13 @@ #include #include -namespace Genode { class Rpc_cap_factory; } +/* core includes */ +#include + +namespace Core { class Rpc_cap_factory; } -class Genode::Rpc_cap_factory +class Core::Rpc_cap_factory { private: diff --git a/repos/base/src/core/include/signal_broker.h b/repos/base/src/core/include/signal_broker.h index 4496b35b51..0dda81655d 100644 --- a/repos/base/src/core/include/signal_broker.h +++ b/repos/base/src/core/include/signal_broker.h @@ -14,15 +14,16 @@ #ifndef _CORE__INCLUDE__SIGNAL_BROKER_H_ #define _CORE__INCLUDE__SIGNAL_BROKER_H_ +/* core includes */ #include #include #include #include -namespace Genode { class Signal_broker; } +namespace Core { class Signal_broker; } -class Genode::Signal_broker +class Core::Signal_broker { private: diff --git a/repos/base/src/core/include/signal_context_slab.h b/repos/base/src/core/include/signal_context_slab.h index e66b48bf7e..fd733fa4bb 100644 --- a/repos/base/src/core/include/signal_context_slab.h +++ b/repos/base/src/core/include/signal_context_slab.h @@ -17,10 +17,11 @@ /* Genode includes */ #include -/* core-local includes */ +/* core includes */ +#include #include -namespace Genode { struct Signal_context_slab; } +namespace Core { struct Signal_context_slab; } /** @@ -32,7 +33,7 @@ namespace Genode { struct Signal_context_slab; } * uses the PD session itself as backing store (which would be in the middle of * construction). */ -struct Genode::Signal_context_slab : Slab +struct Core::Signal_context_slab : Slab { static constexpr size_t SBS = 960*sizeof(long); uint8_t _initial_sb[SBS]; diff --git a/repos/base/src/core/include/signal_delivery_proxy.h b/repos/base/src/core/include/signal_delivery_proxy.h index e86f61a98e..b648f3843f 100644 --- a/repos/base/src/core/include/signal_delivery_proxy.h +++ b/repos/base/src/core/include/signal_delivery_proxy.h @@ -14,21 +14,24 @@ #ifndef _CORE__INCLUDE__SIGNAL_DELIVERY_PROXY_H_ #define _CORE__INCLUDE__SIGNAL_DELIVERY_PROXY_H_ -namespace Genode { +/* core includes */ +#include + +namespace Core { struct Signal_delivery_proxy; struct Signal_delivery_proxy_component; } -struct Genode::Signal_delivery_proxy : Interface +struct Core::Signal_delivery_proxy : Interface { GENODE_RPC(Rpc_deliver, void, _deliver_from_ep, Signal_context_capability, unsigned); - GENODE_RPC(Rpc_release, void, _release_from_ep, Genode::addr_t); + GENODE_RPC(Rpc_release, void, _release_from_ep, addr_t); GENODE_RPC_INTERFACE(Rpc_deliver, Rpc_release); }; -struct Genode::Signal_delivery_proxy_component +struct Core::Signal_delivery_proxy_component : Rpc_object { diff --git a/repos/base/src/core/include/signal_source_component.h b/repos/base/src/core/include/signal_source_component.h index bd03fcaeb5..aff19f5dd1 100644 --- a/repos/base/src/core/include/signal_source_component.h +++ b/repos/base/src/core/include/signal_source_component.h @@ -21,7 +21,10 @@ #include #include -namespace Genode { +/* core includes */ +#include + +namespace Core { class Signal_context_component; class Signal_source_component; @@ -32,8 +35,8 @@ namespace Genode { } -class Genode::Signal_context_component : public Rpc_object, - private Signal_queue::Element +class Core::Signal_context_component : public Rpc_object, + private Signal_queue::Element { private: @@ -75,7 +78,7 @@ class Genode::Signal_context_component : public Rpc_object, }; -class Genode::Signal_source_component : public Signal_source_rpc_object +class Core::Signal_source_component : public Signal_source_rpc_object { private: @@ -105,7 +108,7 @@ class Genode::Signal_source_component : public Signal_source_rpc_object }; -Genode::Signal_context_component::~Signal_context_component() +Core::Signal_context_component::~Signal_context_component() { if (enqueued()) _source.release(*this); diff --git a/repos/base/src/core/include/signal_transmitter.h b/repos/base/src/core/include/signal_transmitter.h index b06a6f4072..a3e4711180 100644 --- a/repos/base/src/core/include/signal_transmitter.h +++ b/repos/base/src/core/include/signal_transmitter.h @@ -14,9 +14,14 @@ #ifndef _CORE__INCLUDE__SIGNAL_TRANSMITTER_H_ #define _CORE__INCLUDE__SIGNAL_TRANSMITTER_H_ -namespace Genode { +/* core includes */ +#include + +namespace Genode { class Rpc_entrypoint; } + + +namespace Core { - class Rpc_entrypoint; /* * Initialize the emission of signals originating from the component diff --git a/repos/base/src/core/include/synced_ram_allocator.h b/repos/base/src/core/include/synced_ram_allocator.h index a7cd605fc6..6b94e1dde6 100644 --- a/repos/base/src/core/include/synced_ram_allocator.h +++ b/repos/base/src/core/include/synced_ram_allocator.h @@ -18,10 +18,13 @@ #include #include -namespace Genode { class Synced_ram_allocator; } +/* core includes */ +#include + +namespace Core { class Synced_ram_allocator; } -class Genode::Synced_ram_allocator : public Ram_allocator +class Core::Synced_ram_allocator : public Ram_allocator { private: diff --git a/repos/base/src/core/include/synced_range_allocator.h b/repos/base/src/core/include/synced_range_allocator.h index f1c34215d9..d47ebfe7f3 100644 --- a/repos/base/src/core/include/synced_range_allocator.h +++ b/repos/base/src/core/include/synced_range_allocator.h @@ -18,7 +18,10 @@ #include #include -namespace Genode { +/* core includes */ +#include + +namespace Core { class Mapped_mem_allocator; template class Synced_range_allocator; } @@ -33,7 +36,7 @@ namespace Genode { * \param ALLOC class implementing the 'Range_allocator' interface */ template -class Genode::Synced_range_allocator : public Range_allocator +class Core::Synced_range_allocator : public Range_allocator { private: diff --git a/repos/base/src/core/include/trace/policy_registry.h b/repos/base/src/core/include/trace/policy_registry.h index 53ab02192b..8ac864646c 100644 --- a/repos/base/src/core/include/trace/policy_registry.h +++ b/repos/base/src/core/include/trace/policy_registry.h @@ -18,17 +18,20 @@ #include #include -namespace Genode { namespace Trace { +/* core includes */ +#include + +namespace Core { namespace Trace { class Policy_owner; class Policy; class Policy_registry; } } -class Genode::Trace::Policy_owner : Interface { }; +class Core::Trace::Policy_owner : Interface { }; -class Genode::Trace::Policy : public Genode::List::Element +class Core::Trace::Policy : public List::Element { friend class Policy_registry; @@ -70,7 +73,7 @@ class Genode::Trace::Policy : public Genode::List::Elemen /** * Global policy registry */ -class Genode::Trace::Policy_registry +class Core::Trace::Policy_registry { private: diff --git a/repos/base/src/core/include/trace/root.h b/repos/base/src/core/include/trace/root.h index 7477b8650b..fd52cedd65 100644 --- a/repos/base/src/core/include/trace/root.h +++ b/repos/base/src/core/include/trace/root.h @@ -20,10 +20,10 @@ /* core-internal includes */ #include -namespace Genode { namespace Trace { class Root; } } +namespace Core { namespace Trace { class Root; } } -class Genode::Trace::Root : public Genode::Root_component +class Core::Trace::Root : public Root_component { private: diff --git a/repos/base/src/core/include/trace/session_component.h b/repos/base/src/core/include/trace/session_component.h index dbdafbb847..9859c14941 100644 --- a/repos/base/src/core/include/trace/session_component.h +++ b/repos/base/src/core/include/trace/session_component.h @@ -21,14 +21,14 @@ #include #include -/* core-local includes */ +/* core includes */ #include #include -namespace Genode { namespace Trace { class Session_component; } } +namespace Core { namespace Trace { class Session_component; } } -class Genode::Trace::Session_component +class Core::Trace::Session_component : public Session_object, diff --git a/repos/base/src/core/include/trace/source_registry.h b/repos/base/src/core/include/trace/source_registry.h index 900b9e16c1..8a5f1e3969 100644 --- a/repos/base/src/core/include/trace/source_registry.h +++ b/repos/base/src/core/include/trace/source_registry.h @@ -14,8 +14,8 @@ #ifndef _CORE__INCLUDE__TRACE__SOURCE_REGISTRY_H_ #define _CORE__INCLUDE__TRACE__SOURCE_REGISTRY_H_ +/* Genode includes */ #include -#include #include #include #include @@ -23,7 +23,13 @@ /* base-internal include */ #include -namespace Genode { namespace Trace { +/* core-internal includes */ +#include + +namespace Core { namespace Trace { + + using namespace Genode::Trace; + class Source; class Source_owner; class Source_registry; @@ -35,7 +41,7 @@ namespace Genode { namespace Trace { } } -struct Genode::Trace::Source_owner { }; +struct Core::Trace::Source_owner { }; /** @@ -43,10 +49,9 @@ struct Genode::Trace::Source_owner { }; * * There is one instance per thread. */ -class Genode::Trace::Source +class Core::Trace::Source : - public Genode::Weak_object, - public Genode::List::Element + public Weak_object, public List::Element { public: @@ -148,7 +153,7 @@ class Genode::Trace::Source * * There is a single instance within core. */ -class Genode::Trace::Source_registry +class Core::Trace::Source_registry { private: diff --git a/repos/base/src/core/include/trace/subject_registry.h b/repos/base/src/core/include/trace/subject_registry.h index 92b17b2e74..e97284bfa5 100644 --- a/repos/base/src/core/include/trace/subject_registry.h +++ b/repos/base/src/core/include/trace/subject_registry.h @@ -21,20 +21,23 @@ /* Genode includes */ #include -#include #include #include #include #include #include -/* core includes */ -#include - /* base-internal include */ #include -namespace Genode { namespace Trace { +/* core includes */ +#include +#include + +namespace Core { namespace Trace { + + using namespace Genode::Trace; + class Subject; class Subject_registry; } } @@ -43,10 +46,10 @@ namespace Genode { namespace Trace { /** * Subject of tracing data */ -class Genode::Trace::Subject +class Core::Trace::Subject : - public Genode::List::Element, - public Genode::Trace::Source_owner + public List::Element, + public Source_owner { private: @@ -110,7 +113,7 @@ class Genode::Trace::Subject void *src = local_rm.attach(from_ds), *dst = local_rm.attach(_ds); - memcpy(dst, src, _size); + Genode::memcpy(dst, src, _size); local_rm.detach(src); local_rm.detach(dst); @@ -314,7 +317,7 @@ class Genode::Trace::Subject * * There exists one instance for each TRACE session. */ -class Genode::Trace::Subject_registry +class Core::Trace::Subject_registry { private: diff --git a/repos/base/src/core/include/types.h b/repos/base/src/core/include/types.h new file mode 100644 index 0000000000..279f3ccd66 --- /dev/null +++ b/repos/base/src/core/include/types.h @@ -0,0 +1,24 @@ +/* + * \brief Core namespace declaration and basic types + * \author Norman Feske + * \date 2023-03-01 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _CORE__INCLUDE__TYPES_H_ +#define _CORE__INCLUDE__TYPES_H_ + +#include +#include +#include +#include + +namespace Core { using namespace Genode; } + +#endif /* _CORE__INCLUDE__TYPES_H_ */ diff --git a/repos/base/src/core/include/vm_root.h b/repos/base/src/core/include/vm_root.h index 2ae78bd778..ac559725b4 100644 --- a/repos/base/src/core/include/vm_root.h +++ b/repos/base/src/core/include/vm_root.h @@ -21,10 +21,10 @@ /* core includes */ #include -namespace Genode { class Vm_root; } +namespace Core { class Vm_root; } -class Genode::Vm_root : public Root_component +class Core::Vm_root : public Root_component { private: diff --git a/repos/base/src/core/io_mem_session_component.cc b/repos/base/src/core/io_mem_session_component.cc index 334d6e40e7..2ff47c1623 100644 --- a/repos/base/src/core/io_mem_session_component.cc +++ b/repos/base/src/core/io_mem_session_component.cc @@ -11,15 +11,16 @@ * under the terms of the GNU Affero General Public License version 3. */ -#include +/* Genode includes */ #include #include + +/* core includes */ +#include #include #include -#include -#include "util.h" -using namespace Genode; +using namespace Core; Io_mem_session_component::Dataspace_attr diff --git a/repos/base/src/core/main.cc b/repos/base/src/core/main.cc index 5455baac83..e0c3fb0f1e 100644 --- a/repos/base/src/core/main.cc +++ b/repos/base/src/core/main.cc @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2006-2017 Genode Labs GmbH + * Copyright (C) 2006-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -40,14 +39,14 @@ #include #include -using namespace Genode; +using namespace Core; /*************************************** ** Core environment/platform support ** ***************************************/ -Core_env &Genode::core_env() +Core_env &Core::core_env() { /* * Make sure to initialize the platform before constructing the core @@ -79,14 +78,14 @@ Env_deprecated *Genode::env_deprecated() { return &core_env(); } -Platform &Genode::platform_specific() +Platform &Core::platform_specific() { static Platform _platform; return _platform; } -Platform_generic &Genode::platform() { return platform_specific(); } +Platform_generic &Core::platform() { return platform_specific(); } Thread_capability Genode::main_thread_cap() { return Thread_capability(); } @@ -203,9 +202,9 @@ void Genode::destroy_signal_thread() { } ** Trace support ** *******************/ -Trace::Source_registry &Trace::sources() +Core::Trace::Source_registry &Core::Trace::sources() { - static Trace::Source_registry inst; + static Source_registry inst; return inst; } @@ -229,7 +228,7 @@ int main() log("Genode ", Genode::version_string); - static Trace::Policy_registry trace_policies; + static Core::Trace::Policy_registry trace_policies; static Rpc_entrypoint &ep = core_env().entrypoint(); static Ram_allocator &core_ram_alloc = core_env().ram_allocator(); @@ -252,10 +251,13 @@ int main() static Pager_entrypoint pager_ep(rpc_cap_factory); + using Trace_root = Core::Trace::Root; + using Trace_session_component = Core::Trace::Session_component; + static Rom_root rom_root (ep, ep, platform().rom_fs(), sliced_heap); static Rm_root rm_root (ep, sliced_heap, core_ram_alloc, local_rm, pager_ep); static Cpu_root cpu_root (core_ram_alloc, local_rm, ep, ep, pager_ep, - sliced_heap, Trace::sources()); + sliced_heap, Core::Trace::sources()); static Pd_root pd_root (ep, core_env().signal_ep(), pager_ep, platform().ram_alloc(), local_rm, sliced_heap, @@ -265,8 +267,8 @@ int main() platform().ram_alloc(), sliced_heap); static Irq_root irq_root (*core_env().pd_session(), platform().irq_alloc(), sliced_heap); - static Trace::Root trace_root (core_ram_alloc, local_rm, ep, sliced_heap, - Trace::sources(), trace_policies); + static Trace_root trace_root (core_ram_alloc, local_rm, ep, sliced_heap, + Core::Trace::sources(), trace_policies); static Core_service rom_service (services, rom_root); static Core_service rm_service (services, rm_root); @@ -275,10 +277,10 @@ int main() static Core_service log_service (services, log_root); static Core_service io_mem_service (services, io_mem_root); static Core_service irq_service (services, irq_root); - static Core_service trace_service (services, trace_root); + static Core_service trace_service (services, trace_root); /* make platform-specific services known to service pool */ - platform_add_local_services(ep, sliced_heap, services, Trace::sources()); + platform_add_local_services(ep, sliced_heap, services, Core::Trace::sources()); size_t const avail_ram_quota = core_pd.avail_ram().value; size_t const avail_cap_quota = core_pd.avail_caps().value; @@ -305,7 +307,7 @@ int main() Session::Resources{{Cpu_connection::RAM_QUOTA}, {Cpu_session::CAP_QUOTA}}, "core", Session::Diag{false}, - core_ram_alloc, local_rm, ep, pager_ep, Trace::sources(), "", + core_ram_alloc, local_rm, ep, pager_ep, Core::Trace::sources(), "", Affinity::unrestricted(), Cpu_session::QUOTA_LIMIT); Cpu_session_capability core_cpu_cap = core_cpu.cap(); diff --git a/repos/base/src/core/pager_ep.cc b/repos/base/src/core/pager_ep.cc index aae61f8522..1bd1c7f8d2 100644 --- a/repos/base/src/core/pager_ep.cc +++ b/repos/base/src/core/pager_ep.cc @@ -12,10 +12,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Core includes */ +/* core includes */ #include -using namespace Genode; +using namespace Core; void Pager_entrypoint::entry() diff --git a/repos/base/src/core/pager_object.cc b/repos/base/src/core/pager_object.cc index 4806347e35..d26dc758d2 100644 --- a/repos/base/src/core/pager_object.cc +++ b/repos/base/src/core/pager_object.cc @@ -11,13 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include -using namespace Genode; +using namespace Core; void Pager_object::wake_up() diff --git a/repos/base/src/core/pd_session_component.cc b/repos/base/src/core/pd_session_component.cc index acc607aed4..94984ec896 100644 --- a/repos/base/src/core/pd_session_component.cc +++ b/repos/base/src/core/pd_session_component.cc @@ -11,13 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include -using namespace Genode; +using namespace Core; Ram_allocator::Alloc_result diff --git a/repos/base/src/core/pd_session_support.cc b/repos/base/src/core/pd_session_support.cc index e314181595..6e632a1679 100644 --- a/repos/base/src/core/pd_session_support.cc +++ b/repos/base/src/core/pd_session_support.cc @@ -13,10 +13,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core-local includes */ +/* core includes */ #include -using namespace Genode; +using namespace Core; bool Pd_session_component::assign_pci(addr_t, uint16_t) { return true; } diff --git a/repos/base/src/core/platform_rom_modules.cc b/repos/base/src/core/platform_rom_modules.cc index a885038b3e..92128947de 100644 --- a/repos/base/src/core/platform_rom_modules.cc +++ b/repos/base/src/core/platform_rom_modules.cc @@ -15,7 +15,7 @@ #include #include -using namespace Genode; +using namespace Core; void Platform::_init_rom_modules() diff --git a/repos/base/src/core/platform_services.cc b/repos/base/src/core/platform_services.cc index a2cefe0c68..f925e1bcb2 100644 --- a/repos/base/src/core/platform_services.cc +++ b/repos/base/src/core/platform_services.cc @@ -15,6 +15,6 @@ #include -void Genode::platform_add_local_services(Rpc_entrypoint &, Sliced_heap &, - Registry &, - Trace::Source_registry &) { } +void Core::platform_add_local_services(Rpc_entrypoint &, Sliced_heap &, + Registry &, + Trace::Source_registry &) { } diff --git a/repos/base/src/core/ram_dataspace_factory.cc b/repos/base/src/core/ram_dataspace_factory.cc index 691b9f1b6a..8c37503834 100644 --- a/repos/base/src/core/ram_dataspace_factory.cc +++ b/repos/base/src/core/ram_dataspace_factory.cc @@ -11,13 +11,10 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Genode includes */ -#include - /* core includes */ #include -using namespace Genode; +using namespace Core; Ram_allocator::Alloc_result diff --git a/repos/base/src/core/region_map_component.cc b/repos/base/src/core/region_map_component.cc index af2bf50681..3b3f08e392 100644 --- a/repos/base/src/core/region_map_component.cc +++ b/repos/base/src/core/region_map_component.cc @@ -14,7 +14,6 @@ */ /* Genode includes */ -#include #include #include @@ -27,7 +26,7 @@ static const bool verbose_page_faults = false; -struct Genode::Region_map_component::Fault_area +struct Core::Region_map_component::Fault_area { addr_t _fault_addr = 0; addr_t _base = 0; @@ -145,7 +144,7 @@ struct Genode::Region_map_component::Fault_area }; -using namespace Genode; +using namespace Core; static void print_page_fault(char const *msg, addr_t pf_addr, @@ -292,7 +291,7 @@ void Rm_faulter::dissolve_from_faulting_region_map(Region_map_component &caller) locked_ptr->discard_faulter(*this, DO_LOCK); } - _faulting_region_map = Genode::Weak_ptr(); + _faulting_region_map = Weak_ptr(); } @@ -301,7 +300,7 @@ void Rm_faulter::continue_after_resolved_fault() Mutex::Guard lock_guard(_mutex); _pager_object.wake_up(); - _faulting_region_map = Genode::Weak_ptr(); + _faulting_region_map = Weak_ptr(); _fault_state = Region_map::State(); } diff --git a/repos/base/src/core/rom_session_component.cc b/repos/base/src/core/rom_session_component.cc index 5dc789588e..8e11f32302 100644 --- a/repos/base/src/core/rom_session_component.cc +++ b/repos/base/src/core/rom_session_component.cc @@ -11,11 +11,14 @@ * under the terms of the GNU Affero General Public License version 3. */ +/* Genode includes */ #include -#include #include -using namespace Genode; +/* core includes */ +#include + +using namespace Core; Rom_session_component::Rom_session_component(Rom_fs &rom_fs, diff --git a/repos/base/src/core/rpc_cap_factory.cc b/repos/base/src/core/rpc_cap_factory.cc index 30100f9054..73569ce43e 100644 --- a/repos/base/src/core/rpc_cap_factory.cc +++ b/repos/base/src/core/rpc_cap_factory.cc @@ -11,12 +11,12 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core-local includes */ +/* core includes */ #include -long Genode::Rpc_cap_factory::_unique_id_cnt; +long Core::Rpc_cap_factory::_unique_id_cnt; -Genode::Mutex &Genode::Rpc_cap_factory::_mutex() +Genode::Mutex &Core::Rpc_cap_factory::_mutex() { static Mutex static_mutex; return static_mutex; diff --git a/repos/base/src/core/rpc_cap_factory_l4.cc b/repos/base/src/core/rpc_cap_factory_l4.cc index c427cd7c06..cdd83082d1 100644 --- a/repos/base/src/core/rpc_cap_factory_l4.cc +++ b/repos/base/src/core/rpc_cap_factory_l4.cc @@ -19,7 +19,7 @@ #include #include -using namespace Genode; +using namespace Core; static unsigned unique_id_cnt; @@ -36,10 +36,10 @@ Native_capability Rpc_cap_factory::_alloc(Rpc_cap_factory &, Rpc_obj_key const rpc_obj_key(++unique_id_cnt); /* combine thread ID of 'ep' with new unique ID */ - Capability_space::Ipc_cap_data cap_data = - Capability_space::ipc_cap_data(ep); + Genode::Capability_space::Ipc_cap_data cap_data = + Genode::Capability_space::ipc_cap_data(ep); - return Capability_space::import(cap_data.dst, rpc_obj_key); + return Genode::Capability_space::import(cap_data.dst, rpc_obj_key); } diff --git a/repos/base/src/core/signal_receiver.cc b/repos/base/src/core/signal_receiver.cc index 1fc0d2285b..c3fb1c6e29 100644 --- a/repos/base/src/core/signal_receiver.cc +++ b/repos/base/src/core/signal_receiver.cc @@ -21,10 +21,12 @@ /* base-internal includes */ #include -/* core-local includes */ +/* core includes */ #include +#include + +using namespace Core; -using namespace Genode; Signal_receiver::Signal_receiver() { } diff --git a/repos/base/src/core/signal_source_component.cc b/repos/base/src/core/signal_source_component.cc index 7b91c0be78..3de6f26b2c 100644 --- a/repos/base/src/core/signal_source_component.cc +++ b/repos/base/src/core/signal_source_component.cc @@ -17,7 +17,7 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; /***************************** diff --git a/repos/base/src/core/signal_transmitter_noinit.cc b/repos/base/src/core/signal_transmitter_noinit.cc index 44b01e4734..62ba8f6342 100644 --- a/repos/base/src/core/signal_transmitter_noinit.cc +++ b/repos/base/src/core/signal_transmitter_noinit.cc @@ -14,12 +14,13 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core-local includes */ +/* core includes */ #include #include -using namespace Genode; +using namespace Core; -void Genode::init_core_signal_transmitter(Rpc_entrypoint &) { } + +void Core::init_core_signal_transmitter(Rpc_entrypoint &) { } Rpc_entrypoint &Core_env::signal_ep() { return _entrypoint; } diff --git a/repos/base/src/core/signal_transmitter_proxy.cc b/repos/base/src/core/signal_transmitter_proxy.cc index 3d861a3849..722dc496c2 100644 --- a/repos/base/src/core/signal_transmitter_proxy.cc +++ b/repos/base/src/core/signal_transmitter_proxy.cc @@ -16,7 +16,7 @@ #include #include -/* core-local includes */ +/* core includes */ #include #include #include @@ -24,7 +24,7 @@ /* base-internal includes */ #include -using namespace Genode; +using namespace Core; static Constructible delivery_proxy; @@ -36,7 +36,7 @@ static Constructible delivery_proxy; static Rpc_entrypoint *_ep; -void Genode::init_core_signal_transmitter(Rpc_entrypoint &ep) { _ep = &ep; } +void Core::init_core_signal_transmitter(Rpc_entrypoint &ep) { _ep = &ep; } void Genode::init_signal_transmitter(Env &) diff --git a/repos/base/src/core/spec/x86/io_port_session_component.cc b/repos/base/src/core/spec/x86/io_port_session_component.cc index 200fcf6b2a..10c1874098 100644 --- a/repos/base/src/core/spec/x86/io_port_session_component.cc +++ b/repos/base/src/core/spec/x86/io_port_session_component.cc @@ -19,13 +19,9 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; -/****************************** - ** Constructor / destructor ** - ******************************/ - Io_port_session_component::Io_port_session_component(Range_allocator &io_port_alloc, const char *args) : _io_port_alloc(io_port_alloc) diff --git a/repos/base/src/core/spec/x86/io_port_session_support.cc b/repos/base/src/core/spec/x86/io_port_session_support.cc index f65579068b..a51e505e31 100644 --- a/repos/base/src/core/spec/x86/io_port_session_support.cc +++ b/repos/base/src/core/spec/x86/io_port_session_support.cc @@ -14,7 +14,7 @@ /* core includes */ #include -using namespace Genode; +using namespace Core; /************** diff --git a/repos/base/src/core/spec/x86/platform_services.cc b/repos/base/src/core/spec/x86/platform_services.cc index 5bd9f18921..1edc5d85e2 100644 --- a/repos/base/src/core/spec/x86/platform_services.cc +++ b/repos/base/src/core/spec/x86/platform_services.cc @@ -24,10 +24,10 @@ /* * Add x86 specific ioport service */ -void Genode::platform_add_local_services(Rpc_entrypoint &, - Sliced_heap &sliced_heap, - Registry &local_services, - Trace::Source_registry &) +void Core::platform_add_local_services(Rpc_entrypoint &, + Sliced_heap &sliced_heap, + Registry &local_services, + Trace::Source_registry &) { static Io_port_root io_port_root(*core_env().pd_session(), platform().io_port_alloc(), sliced_heap); diff --git a/repos/base/src/core/stack_area.cc b/repos/base/src/core/stack_area.cc index c981eb54e5..f8791b334d 100644 --- a/repos/base/src/core/stack_area.cc +++ b/repos/base/src/core/stack_area.cc @@ -15,7 +15,6 @@ /* Genode includes */ #include #include -#include #include #include @@ -37,7 +36,7 @@ namespace Genode { } -using namespace Genode; +using namespace Core; /** @@ -56,7 +55,7 @@ class Stack_area_region_map : public Region_map { private: - using Ds_slab = Synced_allocator >; Ds_slab _ds_slab { platform().core_mem_alloc() }; diff --git a/repos/base/src/core/trace_session_component.cc b/repos/base/src/core/trace_session_component.cc index 09f19a0e9f..e46950cc66 100644 --- a/repos/base/src/core/trace_session_component.cc +++ b/repos/base/src/core/trace_session_component.cc @@ -11,14 +11,15 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* core-internal includes */ -#include +/* Genode includes */ #include #include +/* core-internal includes */ +#include -using namespace Genode; -using namespace Genode::Trace; +using namespace Core; +using namespace Core::Trace; Dataspace_capability Session_component::dataspace() diff --git a/repos/base/src/core/vm_session_common.cc b/repos/base/src/core/vm_session_common.cc index acf7fa256e..bf7f2e3326 100644 --- a/repos/base/src/core/vm_session_common.cc +++ b/repos/base/src/core/vm_session_common.cc @@ -16,16 +16,16 @@ * under the terms of the GNU Affero General Public License version 3. */ -/* Base includes */ +/* Genode includes */ #include -/* Core includes */ +/* core includes */ #include #include #include -using Genode::addr_t; -using Genode::Vm_session_component; +using namespace Core; + void Vm_session_component::attach(Dataspace_capability const cap, addr_t const guest_phys, @@ -172,11 +172,11 @@ void Vm_session_component::detach(Region_map::Local_addr addr) if (region) detach(region->base(), region->size()); else - Genode::error(__PRETTY_FUNCTION__, " unknown region"); + error(__PRETTY_FUNCTION__, " unknown region"); } void Vm_session_component::unmap_region(addr_t base, size_t size) { - Genode::error(__func__, " unimplemented ", base, " ", size); + error(__func__, " unimplemented ", base, " ", size); } diff --git a/repos/base/src/include/pager/capability.h b/repos/base/src/include/pager/capability.h index efd441b0ce..997c8f618a 100644 --- a/repos/base/src/include/pager/capability.h +++ b/repos/base/src/include/pager/capability.h @@ -16,15 +16,4 @@ #include -namespace Genode { - - /* - * The 'Pager_capability' type is returned by 'Region_map::add_client' and - * passed as argument to 'Cpu_session::set_pager'. It is never invoked or - * otherwise used. - */ - class Pager_object; - typedef Capability Pager_capability; -} - #endif /* _INCLUDE__PAGER__CAPABILITY_H_ */ From 23cc96e661d2ef6b9b17bcfabad686598231c6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 2 Mar 2023 18:22:45 +0100 Subject: [PATCH 0354/1921] wifi/pc: add firmware for the Intel AX210 --- repos/dde_linux/ports/linux-firmware.hash | 2 +- repos/dde_linux/ports/linux-firmware.port | 4 ++-- repos/pc/run/wifi.run | 2 ++ repos/pc/src/lib/wifi/firmware.cc | 3 +++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/repos/dde_linux/ports/linux-firmware.hash b/repos/dde_linux/ports/linux-firmware.hash index 5f5646e621..962e787567 100644 --- a/repos/dde_linux/ports/linux-firmware.hash +++ b/repos/dde_linux/ports/linux-firmware.hash @@ -1 +1 @@ -1e536cdd935a3c4fe906d49533a4762ffffdc6ee +573d6c7068adcac68929071e936a287c2af84346 diff --git a/repos/dde_linux/ports/linux-firmware.port b/repos/dde_linux/ports/linux-firmware.port index 5a56c426dd..6b0cd0f052 100644 --- a/repos/dde_linux/ports/linux-firmware.port +++ b/repos/dde_linux/ports/linux-firmware.port @@ -2,7 +2,7 @@ LICENSE := mixed VERSION := 1 DOWNLOADS := fw.archive -FW_REV := 416c8baf3066e4fbf5c6bf610c37a1f50ffb77b9 +FW_REV := 87d3cd32a2dd625aeda87b4955317605a84b0f77 URL(fw) := https://github.com/cnuke/dde_linux_firmware/archive/$(FW_REV).tar.gz -SHA(fw) := 60ed44d326b0f8a007b41ec46a24f8a9a3d807c40b75e3ba9757995f78ae9bcc +SHA(fw) := 85bc6e03fe2fd0dc3b457a1a543bbfc21cdb21d2ed86972875496bae2e7f1650 DIR(fw) := firmware diff --git a/repos/pc/run/wifi.run b/repos/pc/run/wifi.run index 9088198ee9..0b34757926 100644 --- a/repos/pc/run/wifi.run +++ b/repos/pc/run/wifi.run @@ -314,6 +314,8 @@ set firmware_modules { iwlwifi-9000-pu-b0-jf-b0-34.ucode iwlwifi-9000-pu-b0-jf-b0-46.ucode iwlwifi-QuZ-a0-hr-b0-63.ucode + iwlwifi-ty-a0-gf-a0-63.ucode + iwlwifi-ty-a0-gf-a0.pnvm rtl8192eu_nic.bin rtl8188efw.bin regulatory.db diff --git a/repos/pc/src/lib/wifi/firmware.cc b/repos/pc/src/lib/wifi/firmware.cc index a4d4f8c9d7..d35ac89e54 100644 --- a/repos/pc/src/lib/wifi/firmware.cc +++ b/repos/pc/src/lib/wifi/firmware.cc @@ -51,6 +51,9 @@ Firmware_list fw_list[] = { { "iwlwifi-so-a0-hr-b0-64.ucode", 1427384, nullptr }, { "iwlwifi-so-a0-gf-a0-64.ucode", 1515812, nullptr }, { "iwlwifi-so-a0-gf-a0.pnvm", 41808, nullptr }, + { "iwlwifi-ty-a0-gf-a0-63.ucode", 1460012, nullptr }, + { "iwlwifi-ty-a0-gf-a0-64.ucode", 1460012, "iwlwifi-ty-a0-gf-a0-63.ucode" }, + { "iwlwifi-ty-a0-gf-a0.pnvm", 41588, nullptr }, { "rtl8192eu_nic.bin", 31818, nullptr }, { "rtlwifi/rtl8192eefw.bin", 31818, "rtl8192eu_nic.bin" }, From 182ba3a931793e7e73b19b1584042a4b710af55f Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 3 Mar 2023 11:30:59 +0100 Subject: [PATCH 0355/1921] run/load/ipxe: prevent error on kill_spawned ... if the run script exits early. --- tool/run/load/ipxe | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/run/load/ipxe b/tool/run/load/ipxe index 4cf895320e..4c88390f10 100644 --- a/tool/run/load/ipxe +++ b/tool/run/load/ipxe @@ -106,7 +106,8 @@ rename exit load_ipxe_real_exit proc exit {{status 0}} { if {[load_ipxe_lighttpd]} { global lighttpd_spawn_id - kill_spawned $lighttpd_spawn_id + # variable may not exist if the script fails early + if {[info exists lighttpd_spawn_id]} { kill_spawned $lighttpd_spawn_id } } load_ipxe_real_exit $status From ea2584e2fb5227f13e24a50ddaa2896cdb7809a8 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Fri, 3 Mar 2023 11:37:38 +0100 Subject: [PATCH 0356/1921] Fix usb_block.run and add to autopilot.list --- repos/os/run/usb_block.run | 22 +++++++++++++++++----- tool/autopilot.list | 1 + 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/repos/os/run/usb_block.run b/repos/os/run/usb_block.run index 425a86ae2e..2ac0baeed4 100644 --- a/repos/os/run/usb_block.run +++ b/repos/os/run/usb_block.run @@ -1,4 +1,14 @@ -set use_qemu [have_include "power_on/qemu"] +if {![have_board pc]} { + puts "\nRun script is not supported on this platform.\n"; + exit 0 +} + +if {[get_cmd_switch --autopilot] && ![have_include "power_on/qemu"]} { + puts "\nAutopilot run is not supported on this platform\n" + exit 0 +} + +proc usb_device_label {} { return "usb-1-2" } create_boot_directory import_from_depot [depot_user]/src/[base_src] \ @@ -9,7 +19,7 @@ import_from_depot [depot_user]/src/[base_src] \ build { app/block_tester } -install_config { +append config { @@ -58,7 +68,7 @@ install_config { - + @@ -81,20 +91,22 @@ install_config { } +install_config $config + # # Define USB host controller config # set fd [open [run_dir]/genode/usb_host_drv.config w] puts $fd { } close $fd -build_boot_image { block_tester } +build_boot_image [build_artifacts] # # Execute test case # set disk_image "bin/test.img" set cmd "dd if=/dev/zero of=$disk_image bs=1M count=16" -if {$use_qemu} { +if {[have_include "power_on/qemu"]} { puts "creating disk image:\n$cmd" catch { exec sh -c $cmd } } diff --git a/tool/autopilot.list b/tool/autopilot.list index 66106e20a8..051dc6be15 100644 --- a/tool/autopilot.list +++ b/tool/autopilot.list @@ -74,6 +74,7 @@ timeout_smp timer_accuracy tool_chain_auto tz_vmm +usb_block usb_hid_raw usb_hid_reconnect vbox5_genode_usb_hid_raw From b9b18c92d03cb7502704fc534427338432bc8571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20B=C3=A4r?= Date: Sun, 12 Feb 2023 20:40:34 +0100 Subject: [PATCH 0357/1921] usb_host: deliver UTF-16 strings on request Linux kernel static functions usb_string_sub() and usb_get_langid() were made accessible to implement robust string rerieval. Fixes #4756 Fixes #4757 Fixes #4772 --- repos/dde_linux/patches/usb_message.patch | 19 +++++++ repos/dde_linux/ports/linux.hash | 2 +- repos/dde_linux/ports/linux.port | 3 +- repos/dde_linux/src/lib/lx_emul/usb.c | 64 ++++++++++++++++++++++- 4 files changed, 85 insertions(+), 3 deletions(-) create mode 100644 repos/dde_linux/patches/usb_message.patch diff --git a/repos/dde_linux/patches/usb_message.patch b/repos/dde_linux/patches/usb_message.patch new file mode 100644 index 0000000000..5536291942 --- /dev/null +++ b/repos/dde_linux/patches/usb_message.patch @@ -0,0 +1,19 @@ ++++ src/linux/drivers/usb/core/message.c +@@ -869,7 +869,7 @@ + } + } + +-static int usb_string_sub(struct usb_device *dev, unsigned int langid, ++int usb_string_sub(struct usb_device *dev, unsigned int langid, + unsigned int index, unsigned char *buf) + { + int rc; +@@ -906,7 +906,7 @@ + return rc; + } + +-static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf) ++int usb_get_langid(struct usb_device *dev, unsigned char *tbuf) + { + int err; + diff --git a/repos/dde_linux/ports/linux.hash b/repos/dde_linux/ports/linux.hash index 03391f4c34..c090c2e7c6 100644 --- a/repos/dde_linux/ports/linux.hash +++ b/repos/dde_linux/ports/linux.hash @@ -1 +1 @@ -04e5e6e790ae0a41343fec197667cc94a1bc3f25 +417db2da739fdf54788613353118bb904cc57ea9 diff --git a/repos/dde_linux/ports/linux.port b/repos/dde_linux/ports/linux.port index e60c8a6874..dbefd33d27 100644 --- a/repos/dde_linux/ports/linux.port +++ b/repos/dde_linux/ports/linux.port @@ -12,7 +12,8 @@ DIR(linux) := src/linux PATCH_FILES := i915_irq.patch i915_alderlake.patch xhci_fix_event_37.patch \ xhci_abort_ring.patch iwlwifi_enable_irq_before_pnvm.patch \ realloc-fix-gcc-12.patch \ - workqueue_deadlock.patch + workqueue_deadlock.patch \ + usb_message.patch PATCHES += $(addprefix patches/,$(PATCH_FILES)) # i915 diff --git a/repos/dde_linux/src/lib/lx_emul/usb.c b/repos/dde_linux/src/lib/lx_emul/usb.c index 2fe04dc17d..8b38582fac 100644 --- a/repos/dde_linux/src/lib/lx_emul/usb.c +++ b/repos/dde_linux/src/lib/lx_emul/usb.c @@ -340,6 +340,68 @@ handle_return_code(struct genode_usb_request_urb req, void * data) }; +extern int usb_get_langid(struct usb_device *dev, unsigned char *tbuf); +extern int usb_string_sub(struct usb_device *dev, unsigned int langid, int index, unsigned char *tbuf); + +/** + * usb_string_utf16 - returns the string descriptor + * @dev: the device whose string descriptor is being retrieved + * @index: the number of the descriptor + * @buf: where to put the string + * @size: how big is "buf"? + * + * Context: task context, might sleep. + * + * This returns the UTF-16LE encoded strings returned by devices, from + * usb_get_string_descriptor(). Note that this function + * chooses strings in the first language supported by the device. + * + * This call is synchronous, and may not be used in an interrupt context. + * + * Return: length of the string (>= 0) or usb_control_msg status (< 0). + */ +static int usb_string_utf16(struct usb_device *dev, int index, char *buf, size_t size) +{ + unsigned char *tbuf; + int err; + size_t len; + if (dev->state == USB_STATE_SUSPENDED) + return -EHOSTUNREACH; + if (size <= 2 || buf == NULL) + return -EINVAL; + buf[0] = 0; + if (index <= 0 || index >= 256) + return -EINVAL; + tbuf = kmalloc(256, GFP_NOIO); + if (!tbuf) + return -ENOMEM; + + err = usb_get_langid(dev, tbuf); + if (err < 0) + goto errout; + + err = usb_string_sub(dev, dev->string_langid, index, tbuf); + if (err < 0) + goto errout; + + len = min(size-2, (size_t)err); + memcpy(buf, tbuf+2, len); + + buf[len] = 0; + buf[len+1] = 0; + err = len + 2; + + if (tbuf[1] != USB_DT_STRING) + dev_dbg(&dev->dev, + "wrong descriptor type %02x for string %d (\"%s\")\n", + tbuf[1], index, buf); + + errout: + kfree(tbuf); + return err; +} + + static void handle_string_request(struct genode_usb_request_string * req, genode_usb_session_handle_t session, @@ -351,7 +413,7 @@ handle_string_request(struct genode_usb_request_string * req, struct usb_device * udev = (struct usb_device *) data; genode_usb_request_ret_t ret = UNKNOWN_ERROR; - int length = usb_string(udev, req->index, buf, size); + int length = usb_string_utf16(udev, req->index, buf, size); if (length < 0) { printk("Could not read string descriptor index: %u\n", req->index); req->length = 0; From 2c1724d7f2e41f4e5d721a1209abbd5e870820d6 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 28 Feb 2023 13:00:46 +0100 Subject: [PATCH 0358/1921] lx_emul: adjust start & stop tick behaviour Do not start and stop idle ticking within the timer interrupt routine, but do it around the whole Lx_kit scheduling, which is always called when Linux code gets active again, either because of backend signals, interrupts, or timing signals. This commit implicitly reverts the (incomplete) solution of issue #4550 Ref genodelabs/genode#4778 --- repos/dde_linux/src/include/lx_emul/task.h | 4 +- .../dde_linux/src/include/lx_kit/scheduler.h | 7 +++- .../src/lib/lx_emul/spec/arm/irqchip.c | 4 -- .../src/lib/lx_emul/spec/x86/irqchip.c | 4 -- repos/dde_linux/src/lib/lx_emul/start.c | 39 ++++++++++++++----- repos/dde_linux/src/lib/lx_emul/task.cc | 14 +++---- repos/dde_linux/src/lib/lx_kit/scheduler.cc | 34 +++++++--------- 7 files changed, 56 insertions(+), 50 deletions(-) diff --git a/repos/dde_linux/src/include/lx_emul/task.h b/repos/dde_linux/src/include/lx_emul/task.h index 3873bdff22..76708e0723 100644 --- a/repos/dde_linux/src/include/lx_emul/task.h +++ b/repos/dde_linux/src/include/lx_emul/task.h @@ -44,9 +44,9 @@ void lx_emul_task_name(struct task_struct * task, const char * name); void *lx_emul_task_stack(struct task_struct const * task); -char lx_emul_task_another_runnable(void); +void lx_emul_task_mark_for_removal(struct task_struct const * task); -void lx_emul_task_mark_for_removal(struct task_struct const * task); +void lx_emul_task_set_idle(void); #ifdef __cplusplus } diff --git a/repos/dde_linux/src/include/lx_kit/scheduler.h b/repos/dde_linux/src/include/lx_kit/scheduler.h index 418f790e52..3e2e12aebf 100644 --- a/repos/dde_linux/src/include/lx_kit/scheduler.h +++ b/repos/dde_linux/src/include/lx_kit/scheduler.h @@ -31,13 +31,18 @@ class Lx_kit::Scheduler List _present_list { }; Task * _current { nullptr }; + Task * _idle { nullptr }; Genode::Entrypoint &ep; + void _idle_pre_post_process(); + public: Task & current(); + void idle(Task & idle) { _idle = &idle; } + bool active() const; void add(Task & task); @@ -47,8 +52,6 @@ class Lx_kit::Scheduler void unblock_irq_handler(); void unblock_time_handler(); - bool another_runnable(Task *); - Task & task(void * t); template diff --git a/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c b/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c index 4892c6903d..7a35bbbe18 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c @@ -17,7 +17,6 @@ #include #include #include -#include #include <../kernel/irq/internals.h> static int dde_irq_set_wake(struct irq_data *d, unsigned int on) @@ -173,9 +172,6 @@ int lx_emul_irq_task_function(void * data) if (!dde_irq_domain) continue; - /* check restarting ticking which may stopped in idle task */ - tick_nohz_idle_restart_tick(); - irq_enter(); irq = irq_find_mapping(dde_irq_domain, lx_emul_irq_last()); diff --git a/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c b/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c index b6b53149fe..a59c6c37f7 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c @@ -15,7 +15,6 @@ #include #include #include -#include #include <../kernel/irq/internals.h> @@ -53,9 +52,6 @@ int lx_emul_irq_task_function(void * data) for (;;) { lx_emul_task_schedule(true); - /* check restarting ticking which may stopped in idle task */ - tick_nohz_idle_restart_tick(); - irq_enter(); irq = lx_emul_irq_last(); diff --git a/repos/dde_linux/src/lib/lx_emul/start.c b/repos/dde_linux/src/lib/lx_emul/start.c index b12d7901e8..21236a4474 100644 --- a/repos/dde_linux/src/lib/lx_emul/start.c +++ b/repos/dde_linux/src/lib/lx_emul/start.c @@ -69,21 +69,39 @@ static int kernel_init(void * args) } +static int kernel_idle(void * args) +{ + struct task_struct *tsk = current; + set_task_comm(tsk, "idle"); + + /* set this current task to be the idle task */ + lx_emul_task_set_idle(); + + /* + * Idle task always gets run in the end of each schedule + * and again at the beginning of each schedule + */ + for (;;) { + lx_emul_task_schedule(true); + + tick_nohz_idle_enter(); + tick_nohz_idle_stop_tick(); + + lx_emul_task_schedule(true); + + tick_nohz_idle_restart_tick(); + tick_nohz_idle_exit(); + } + + return 0; +} + + static void timer_loop(void) { for (;;) { - tick_nohz_idle_enter(); - - if (!lx_emul_task_another_runnable()) - tick_nohz_idle_stop_tick(); - lx_emul_task_schedule(true); lx_emul_time_handle(); - - /* check restarting ticking */ - tick_nohz_idle_restart_tick(); - - tick_nohz_idle_exit(); } } @@ -125,6 +143,7 @@ int lx_emul_init_task_function(void * dtb) sched_clock_init(); kernel_thread(kernel_init, NULL, CLONE_FS); + kernel_thread(kernel_idle, NULL, CLONE_FS); pid = kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_FILES); kthreadd_task = find_task_by_pid_ns(pid, NULL);; diff --git a/repos/dde_linux/src/lib/lx_emul/task.cc b/repos/dde_linux/src/lib/lx_emul/task.cc index fd3f82934b..28f97a1c5a 100644 --- a/repos/dde_linux/src/lib/lx_emul/task.cc +++ b/repos/dde_linux/src/lib/lx_emul/task.cc @@ -102,15 +102,13 @@ extern "C" void * lx_emul_task_stack(struct task_struct const * t) } -extern "C" char lx_emul_task_another_runnable() -{ - Lx_kit::Task & task = Lx_kit::env().scheduler.current(); - - return Lx_kit::env().scheduler.another_runnable(&task); -} - - extern "C" void lx_emul_task_mark_for_removal(struct task_struct const *t) { Lx_kit::env().scheduler.task((void*)t).mark_for_destruction(); } + + +extern "C" void lx_emul_task_set_idle(void) +{ + return Lx_kit::env().scheduler.idle(Lx_kit::env().scheduler.current()); +} diff --git a/repos/dde_linux/src/lib/lx_kit/scheduler.cc b/repos/dde_linux/src/lib/lx_kit/scheduler.cc index 7f64977fb0..187c8f4531 100644 --- a/repos/dde_linux/src/lib/lx_kit/scheduler.cc +++ b/repos/dde_linux/src/lib/lx_kit/scheduler.cc @@ -27,6 +27,16 @@ using namespace Genode; using namespace Lx_kit; +void Scheduler::_idle_pre_post_process() +{ + if (!_idle) + return; + + _current = _idle; + _idle->run(); +} + + Task & Scheduler::current() { if (!_current) { @@ -104,6 +114,8 @@ void Scheduler::schedule() Genode::sleep_forever(); } + _idle_pre_post_process(); + /* * Iterate over all tasks and run first runnable. * @@ -116,9 +128,6 @@ void Scheduler::schedule() while (true) { bool at_least_one = false; - /* update jiffies before running task */ - //Lx::timer_update_jiffies(); - for (Task * t = _present_list.first(); t; ) { Task *tmp = t; @@ -148,23 +157,8 @@ void Scheduler::schedule() break; } + _idle_pre_post_process(); + /* clear current as no task is running */ _current = nullptr; } - - -bool Scheduler::another_runnable(Task * skip) -{ - for (Task * t = _present_list.first(); t; t = t->next()) { - - if (!t->runnable()) - continue; - - if (skip && t == skip) - continue; - - return true; - }; - - return false; -} From eba2c8cf2f3825d93b056cd3c56956cab8de2f34 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Tue, 28 Feb 2023 15:18:55 +0100 Subject: [PATCH 0359/1921] lx_emul: set timer irq task to highest priority If a timer signal got received, first all time updates have to be done, before other tasks get active. Ref genodelabs/genode#4778 --- repos/dde_linux/src/lib/lx_emul/start.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/dde_linux/src/lib/lx_emul/start.c b/repos/dde_linux/src/lib/lx_emul/start.c index 21236a4474..f05bf600d6 100644 --- a/repos/dde_linux/src/lib/lx_emul/start.c +++ b/repos/dde_linux/src/lib/lx_emul/start.c @@ -99,6 +99,9 @@ static int kernel_idle(void * args) static void timer_loop(void) { + /* set timer interrupt task to highest priority */ + lx_emul_task_priority(current, 0); + for (;;) { lx_emul_task_schedule(true); lx_emul_time_handle(); From c90b61f5715483a8d9d3cbb7bc502768c509475f Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 2 Mar 2023 11:50:07 +0100 Subject: [PATCH 0360/1921] lx_emul: track irq state changes To be able to check for interrupts being on or off, the enabling and disabling is tracked in lx_emul. When interrupts get received, they have to be turned off. Ref genodelabs/genode#4778 --- .../lib/import/import-lx_emul_common.inc | 1 + repos/dde_linux/src/include/lx_emul/irq.h | 6 +++ .../shadow/arch/arm/include/asm/irqflags.h | 21 ++++++--- .../shadow/arch/arm64/include/asm/irqflags.h | 35 +++++++++++---- .../shadow/arch/x86/include/asm/irqflags.h | 35 +++++++++++---- repos/dde_linux/src/lib/lx_emul/irq_flags.cc | 45 +++++++++++++++++++ .../src/lib/lx_emul/spec/arm/irqchip.c | 3 ++ .../src/lib/lx_emul/spec/x86/irqchip.c | 3 ++ 8 files changed, 126 insertions(+), 23 deletions(-) create mode 100644 repos/dde_linux/src/lib/lx_emul/irq_flags.cc diff --git a/repos/dde_linux/lib/import/import-lx_emul_common.inc b/repos/dde_linux/lib/import/import-lx_emul_common.inc index 600b37b075..3d4049eeb3 100644 --- a/repos/dde_linux/lib/import/import-lx_emul_common.inc +++ b/repos/dde_linux/lib/import/import-lx_emul_common.inc @@ -16,6 +16,7 @@ SRC_CC += lx_emul/log.cc SRC_CC += lx_emul/page_virt.cc SRC_CC += lx_emul/task.cc SRC_CC += lx_emul/time.cc +SRC_CC += lx_emul/irq_flags.cc SRC_C += lx_emul/clocksource.c SRC_C += lx_emul/shadow/fs/exec.c diff --git a/repos/dde_linux/src/include/lx_emul/irq.h b/repos/dde_linux/src/include/lx_emul/irq.h index e98a37b121..6914a8bc1e 100644 --- a/repos/dde_linux/src/include/lx_emul/irq.h +++ b/repos/dde_linux/src/include/lx_emul/irq.h @@ -34,6 +34,12 @@ extern void * lx_emul_irq_task_struct; unsigned int lx_emul_irq_last(void); int lx_emul_irq_init(struct device_node *node, struct device_node *parent); + +unsigned long lx_emul_irq_enable(void); +unsigned long lx_emul_irq_disable(void); +unsigned long lx_emul_irq_state(void); +void lx_emul_irq_restore(unsigned long); + #ifdef __cplusplus } #endif diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/irqflags.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/irqflags.h index c89f318fdb..84765be9a6 100644 --- a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/irqflags.h +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/irqflags.h @@ -14,14 +14,25 @@ #ifndef __ASM_IRQFLAGS_H #define __ASM_IRQFLAGS_H -static inline unsigned long arch_local_save_flags(void) { - return 1; } +#include -static inline void arch_local_irq_restore(unsigned long flags) { } +#define arch_local_save_flags arch_local_save_flags +static inline unsigned long arch_local_save_flags(void) +{ + return lx_emul_irq_state(); +} + +#define arch_local_irq_restore arch_local_irq_restore +static inline void arch_local_irq_restore(unsigned long flags) +{ + lx_emul_irq_restore(flags); +} #define arch_irqs_disabled_flags arch_irqs_disabled_flags -static inline int arch_irqs_disabled_flags(unsigned long flags) { - return 1; } +static inline int arch_irqs_disabled_flags(unsigned long flags) +{ + return flags & 1; +} #define local_fiq_enable() ({}) #define local_fiq_disable() ({}) diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/irqflags.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/irqflags.h index 371143432f..125063ef0f 100644 --- a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/irqflags.h +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/irqflags.h @@ -14,19 +14,36 @@ #ifndef __ASM_IRQFLAGS_H #define __ASM_IRQFLAGS_H -static inline void arch_local_irq_enable(void) { } +#include -static inline void arch_local_irq_disable(void) { } +static inline void arch_local_irq_enable(void) +{ + lx_emul_irq_enable(); +} -static inline unsigned long arch_local_save_flags(void) { - return 1; } +static inline void arch_local_irq_disable(void) +{ + lx_emul_irq_disable(); +} -static inline int arch_irqs_disabled_flags(unsigned long flags) { - return flags; } +static inline unsigned long arch_local_save_flags(void) +{ + return lx_emul_irq_state(); +} -static inline unsigned long arch_local_irq_save(void) { - return 1; } +static inline int arch_irqs_disabled_flags(unsigned long flags) +{ + return flags & 1; +} -static inline void arch_local_irq_restore(unsigned long flags) { } +static inline unsigned long arch_local_irq_save(void) +{ + return lx_emul_irq_disable(); +} + +static inline void arch_local_irq_restore(unsigned long flags) +{ + lx_emul_irq_restore(flags); +} #endif diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/x86/include/asm/irqflags.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/x86/include/asm/irqflags.h index 371143432f..125063ef0f 100644 --- a/repos/dde_linux/src/include/lx_emul/shadow/arch/x86/include/asm/irqflags.h +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/x86/include/asm/irqflags.h @@ -14,19 +14,36 @@ #ifndef __ASM_IRQFLAGS_H #define __ASM_IRQFLAGS_H -static inline void arch_local_irq_enable(void) { } +#include -static inline void arch_local_irq_disable(void) { } +static inline void arch_local_irq_enable(void) +{ + lx_emul_irq_enable(); +} -static inline unsigned long arch_local_save_flags(void) { - return 1; } +static inline void arch_local_irq_disable(void) +{ + lx_emul_irq_disable(); +} -static inline int arch_irqs_disabled_flags(unsigned long flags) { - return flags; } +static inline unsigned long arch_local_save_flags(void) +{ + return lx_emul_irq_state(); +} -static inline unsigned long arch_local_irq_save(void) { - return 1; } +static inline int arch_irqs_disabled_flags(unsigned long flags) +{ + return flags & 1; +} -static inline void arch_local_irq_restore(unsigned long flags) { } +static inline unsigned long arch_local_irq_save(void) +{ + return lx_emul_irq_disable(); +} + +static inline void arch_local_irq_restore(unsigned long flags) +{ + lx_emul_irq_restore(flags); +} #endif diff --git a/repos/dde_linux/src/lib/lx_emul/irq_flags.cc b/repos/dde_linux/src/lib/lx_emul/irq_flags.cc new file mode 100644 index 0000000000..ad08d7573e --- /dev/null +++ b/repos/dde_linux/src/lib/lx_emul/irq_flags.cc @@ -0,0 +1,45 @@ +/* + * \brief Lx_emul backend for interrupts + * \author Stefan Kalkowski + * \date 2021-04-22 + */ + +/* + * Copyright (C) 2021 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#include + +static unsigned long cpu_local_irq_flags = 0; + + +extern "C" unsigned long lx_emul_irq_enable(void) +{ + unsigned long ret = cpu_local_irq_flags; + cpu_local_irq_flags = 0; + return ret; +} + + +extern "C" unsigned long lx_emul_irq_disable(void) +{ + unsigned long ret = cpu_local_irq_flags; + cpu_local_irq_flags = 1; + return ret; +} + + +extern "C" unsigned long lx_emul_irq_state(void) +{ + return cpu_local_irq_flags; +} + + +extern "C" void lx_emul_irq_restore(unsigned long flags) +{ + cpu_local_irq_flags = flags; +} + diff --git a/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c b/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c index 7a35bbbe18..679683c028 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/arm/irqchip.c @@ -165,6 +165,7 @@ IRQCHIP_DECLARE(dde_gic_400, "arm,gic-400", lx_emul_irq_init); int lx_emul_irq_task_function(void * data) { int irq; + unsigned long flags; for (;;) { lx_emul_task_schedule(true); @@ -172,6 +173,7 @@ int lx_emul_irq_task_function(void * data) if (!dde_irq_domain) continue; + local_irq_save(flags); irq_enter(); irq = irq_find_mapping(dde_irq_domain, lx_emul_irq_last()); @@ -184,6 +186,7 @@ int lx_emul_irq_task_function(void * data) } irq_exit(); + local_irq_restore(flags); } return 0; diff --git a/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c b/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c index a59c6c37f7..ebb5b94a57 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/x86/irqchip.c @@ -47,11 +47,13 @@ struct irq_chip dde_irqchip_data_chip = { int lx_emul_irq_task_function(void * data) { + unsigned long flags; int irq; for (;;) { lx_emul_task_schedule(true); + local_irq_save(flags); irq_enter(); irq = lx_emul_irq_last(); @@ -66,6 +68,7 @@ int lx_emul_irq_task_function(void * data) } irq_exit(); + local_irq_restore(flags); } return 0; From 7e2c546d8e5fc5113bf6b12b8e4a76a4f487c787 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 2 Mar 2023 13:08:27 +0100 Subject: [PATCH 0361/1921] lx_emul: update jiffies during schedule Whenever a new schedule decision is made in the Linux emulation layer, we try to update the jiffies counter. Ref genodelabs/genode#4778 --- repos/dde_linux/src/include/lx_emul/time.h | 2 ++ repos/dde_linux/src/lib/lx_emul/clocksource.c | 20 +++++++++++++++++++ .../lib/lx_emul/shadow/kernel/sched/core.c | 10 +++++----- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/repos/dde_linux/src/include/lx_emul/time.h b/repos/dde_linux/src/include/lx_emul/time.h index 7f560b75c0..dabd2e43df 100644 --- a/repos/dde_linux/src/include/lx_emul/time.h +++ b/repos/dde_linux/src/include/lx_emul/time.h @@ -28,6 +28,8 @@ unsigned long long lx_emul_time_counter(void); void lx_emul_time_handle(void); +void lx_emul_time_update_jiffies(void); + #ifdef __cplusplus } #endif diff --git a/repos/dde_linux/src/lib/lx_emul/clocksource.c b/repos/dde_linux/src/lib/lx_emul/clocksource.c index fe6cbedcc2..5ddc520d8a 100644 --- a/repos/dde_linux/src/lib/lx_emul/clocksource.c +++ b/repos/dde_linux/src/lib/lx_emul/clocksource.c @@ -17,6 +17,8 @@ #include #include #include +#include +#include #include #include #include @@ -109,6 +111,24 @@ void lx_emul_time_handle(void) } +extern ktime_t tick_next_period; +void lx_emul_time_update_jiffies(void) +{ + /* check if jiffies need an update */ + if (ktime_before(ktime_get(), tick_next_period)) + return; + + /* tick_nohz_idle_stop_tick breaks with error if softirq is pending */ + if (local_softirq_pending() & SOFTIRQ_STOP_IDLE_MASK) + return; + + tick_nohz_idle_enter(); + tick_nohz_idle_stop_tick(); + tick_nohz_idle_restart_tick(); + tick_nohz_idle_exit(); +} + + enum { LX_EMUL_MAX_OF_CLOCK_PROVIDERS = 256 }; diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/sched/core.c b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/sched/core.c index 8ea839d7d3..a9ee03858a 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/sched/core.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/sched/core.c @@ -103,14 +103,12 @@ static void __schedule(void) asmlinkage __visible void __sched schedule(void) { + lx_emul_time_update_jiffies(); + if (current->__state) { unsigned int task_flags = current->flags; - if (task_flags & PF_WQ_WORKER) { - tick_nohz_idle_enter(); - lx_emul_time_handle(); - tick_nohz_idle_exit(); + if (task_flags & PF_WQ_WORKER) wq_worker_sleeping(current); - } } __schedule(); @@ -141,6 +139,7 @@ asmlinkage __visible void __sched notrace preempt_schedule(void) if (likely(!preemptible())) return; + lx_emul_time_update_jiffies(); __schedule(); } @@ -150,6 +149,7 @@ asmlinkage __visible void __sched notrace preempt_schedule_notrace(void) if (likely(!preemptible())) return; + lx_emul_time_update_jiffies(); __schedule(); } From 50541c68ec14e0c5142357053aebd9d71537713f Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 2 Mar 2023 14:01:41 +0100 Subject: [PATCH 0362/1921] lx_emul: shadow cpu_relax to update jiffies There are rare use-cases where cpu_relax is used inside a busy loop (i2c bus functions), which only will break when the jiffies counter reaches a specific value. Because of the cooperative scheduling done in lx_emul, no timer interrupt will break such a loop. As a workaround, we check for necessary jiffies updates inside cpu_relax if interrupts are enabled. Ref genodelabs/genode#4778 --- .../arch/arm/include/asm/vdso/processor.h | 35 +++++++++++++++++ .../arch/arm64/include/asm/vdso/processor.h | 29 ++++++++++++++ .../arch/x86/include/asm/vdso/processor.h | 29 ++++++++++++++ .../intel/pc/shadow/asm/vdso/processor.h | 38 ------------------- .../drivers/framebuffer/intel/pc/target.inc | 1 - 5 files changed, 93 insertions(+), 39 deletions(-) create mode 100644 repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/vdso/processor.h create mode 100644 repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/vdso/processor.h create mode 100644 repos/dde_linux/src/include/lx_emul/shadow/arch/x86/include/asm/vdso/processor.h delete mode 100644 repos/pc/src/drivers/framebuffer/intel/pc/shadow/asm/vdso/processor.h diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/vdso/processor.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/vdso/processor.h new file mode 100644 index 0000000000..5d9cc073d4 --- /dev/null +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/vdso/processor.h @@ -0,0 +1,35 @@ +/** + * \brief Shadow copy of asm/vdso/processor.h + * \author Stefan Kalkowski + * \date 2023-03-02 + */ + +#ifndef _LX_EMUL__SHADOW__ARCH__ARM__INCLUDE__ASM__VDSO__PROCESSOR_H_ +#define _LX_EMUL__SHADOW__ARCH__ARM__INCLUDE__ASM__VDSO__PROCESSOR_H_ + +#include +#include_next + +static inline void __original_linux_cpu_relax(void) +{ + cpu_relax(); +} + +#undef cpu_relax + +#include +#include + +static inline void cpu_relax(void) +{ + __original_linux_cpu_relax(); + + /* + * When irqs are enabled, update jiffies to break potential + * endless busy loops like: + * - slchi() in drivers/i2c/algos/i2c-algo-bit.c + */ + if (!lx_emul_irq_state()) lx_emul_time_update_jiffies(); +} + +#endif /* _LX_EMUL__SHADOW__ARCH__ARM__INCLUDE__ASM__VDSO__PROCESSOR_H_ */ diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/vdso/processor.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/vdso/processor.h new file mode 100644 index 0000000000..bd1db03083 --- /dev/null +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm64/include/asm/vdso/processor.h @@ -0,0 +1,29 @@ +/** + * \brief Shadow copy of asm/vdso/processor.h + * \author Stefan Kalkowski + * \date 2023-03-02 + */ + +#ifndef _LX_EMUL__SHADOW__ARCH__ARM64__INCLUDE__ASM__VDSO__PROCESSOR_H_ +#define _LX_EMUL__SHADOW__ARCH__ARM64__INCLUDE__ASM__VDSO__PROCESSOR_H_ + +#define cpu_relax __original_linux_cpu_relax +#include_next +#undef cpu_relax + +#include +#include + +static __always_inline void cpu_relax(void) +{ + __original_linux_cpu_relax(); + + /* + * When irqs are enabled, update jiffies to break potential + * endless busy loops like: + * - slchi() in drivers/i2c/algos/i2c-algo-bit.c + */ + if (!lx_emul_irq_state()) lx_emul_time_update_jiffies(); +} + +#endif /* _LX_EMUL__SHADOW__ARCH__ARM64__INCLUDE__ASM__VDSO__PROCESSOR_H_ */ diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/x86/include/asm/vdso/processor.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/x86/include/asm/vdso/processor.h new file mode 100644 index 0000000000..e264975ddc --- /dev/null +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/x86/include/asm/vdso/processor.h @@ -0,0 +1,29 @@ +/** + * \brief Shadow copy of asm/vdso/processor.h + * \author Stefan Kalkowski + * \date 2023-03-02 + */ + +#ifndef _LX_EMUL__SHADOW__ARCH__X86__INCLUDE__ASM__VDSO__PROCESSOR_H_ +#define _LX_EMUL__SHADOW__ARCH__X86__INCLUDE__ASM__VDSO__PROCESSOR_H_ + +#define cpu_relax __original_linux_cpu_relax +#include_next +#undef cpu_relax + +#include +#include + +static __always_inline void cpu_relax(void) +{ + __original_linux_cpu_relax(); + + /* + * When irqs are enabled, update jiffies to break potential + * endless busy loops like: + * - slchi() in drivers/i2c/algos/i2c-algo-bit.c + */ + if (!lx_emul_irq_state()) lx_emul_time_update_jiffies(); +} + +#endif /* _LX_EMUL__SHADOW__ARCH__X86__INCLUDE__ASM__VDSO__PROCESSOR_H_ */ diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/shadow/asm/vdso/processor.h b/repos/pc/src/drivers/framebuffer/intel/pc/shadow/asm/vdso/processor.h deleted file mode 100644 index 08414f0c1a..0000000000 --- a/repos/pc/src/drivers/framebuffer/intel/pc/shadow/asm/vdso/processor.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * \brief Shadow copy of asm/vdso/processor.h - * \author Alexander Boettcher - * \date 2022-03-23 - */ - -/* - * Copyright (C) 2022 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -/* SPDX-License-Identifier: GPL-2.0-only */ - -#ifndef __ASM_VDSO_PROCESSOR_H -#define __ASM_VDSO_PROCESSOR_H - -#ifndef __ASSEMBLY__ - -#include - - -static __always_inline void rep_nop(void) -{ - asm volatile("rep; nop" ::: "memory"); -} - - -static __always_inline void cpu_relax(void) -{ - /* break busy loop of slchi() in drivers/i2c/algos/i2c-algo-bit.c */ - __udelay(100); -} - -#endif /* __ASSEMBLY__ */ - -#endif /* __ASM_VDSO_PROCESSOR_H */ diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/target.inc b/repos/pc/src/drivers/framebuffer/intel/pc/target.inc index e9d62979af..39db2b89cd 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/target.inc +++ b/repos/pc/src/drivers/framebuffer/intel/pc/target.inc @@ -6,7 +6,6 @@ TARGET := pc_intel_fb_drv LIBS := base pc_lx_emul blit jitterentropy INC_DIR += $(REL_PRG_DIR) -INC_DIR += $(REL_PRG_DIR)/shadow SRC_CC += main.cc SRC_CC += emul.cc From 6a7a30ceaac2a84b0d01406c89fac3e7607e69f9 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 2 Mar 2023 12:43:15 +0100 Subject: [PATCH 0363/1921] lx_emul: unify udelay implementation Implement udelay for all architectures within common lx_emul code, remove driver-specific version. Always do busy looping in udelay and use cpu_relax() like the original Linux code. Thereby, we profit from architecture specific instructions (cpu cool down), and jiffies are updated if irqs are on. Ref genodelabs/genode#4778 --- .../lib/import/import-lx_emul_common.inc | 1 + .../shadow/arch/arm/include/asm/delay.h | 25 +++++++ .../src/lib/lx_emul/shadow/lib/delay.c | 38 +++++++++++ repos/pc/lib/import/import-pc_lx_emul.mk | 1 - repos/pc/lib/mk/wifi.inc | 1 - .../drivers/framebuffer/intel/pc/lx_emul.h | 2 - .../drivers/framebuffer/intel/pc/target.inc | 1 - .../src/drivers/framebuffer/intel/pc/time.cc | 25 ------- repos/pc/src/drivers/usb_host/pc/lx_emul.h | 10 --- repos/pc/src/drivers/usb_host/pc/target.inc | 1 - repos/pc/src/drivers/usb_host/pc/time.cc | 25 ------- repos/pc/src/lib/pc/lx_emul/delay.c | 68 ------------------- repos/pc/src/lib/wifi/lx_emul.h | 2 - repos/pc/src/lib/wifi/time.cc | 25 ------- repos/pc/src/test/driver_time/lx_emul.h | 11 --- repos/pc/src/test/driver_time/target.mk | 2 +- repos/pc/src/test/driver_time/time.cc | 25 ------- 17 files changed, 65 insertions(+), 198 deletions(-) create mode 100644 repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/delay.h create mode 100644 repos/dde_linux/src/lib/lx_emul/shadow/lib/delay.c delete mode 100644 repos/pc/src/drivers/framebuffer/intel/pc/time.cc delete mode 100644 repos/pc/src/drivers/usb_host/pc/time.cc delete mode 100644 repos/pc/src/lib/pc/lx_emul/delay.c delete mode 100644 repos/pc/src/lib/wifi/time.cc delete mode 100644 repos/pc/src/test/driver_time/time.cc diff --git a/repos/dde_linux/lib/import/import-lx_emul_common.inc b/repos/dde_linux/lib/import/import-lx_emul_common.inc index 3d4049eeb3..da786556a1 100644 --- a/repos/dde_linux/lib/import/import-lx_emul_common.inc +++ b/repos/dde_linux/lib/import/import-lx_emul_common.inc @@ -37,6 +37,7 @@ SRC_C += lx_emul/shadow/kernel/sched/sched.c SRC_C += lx_emul/shadow/kernel/smp.c SRC_C += lx_emul/shadow/kernel/stop_machine.c SRC_C += lx_emul/shadow/lib/cpumask.c +SRC_C += lx_emul/shadow/lib/delay.c SRC_C += lx_emul/shadow/mm/percpu.c SRC_C += lx_emul/shadow/mm/slab_common.c SRC_C += lx_emul/shadow/mm/slub.c diff --git a/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/delay.h b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/delay.h new file mode 100644 index 0000000000..1f993b308c --- /dev/null +++ b/repos/dde_linux/src/include/lx_emul/shadow/arch/arm/include/asm/delay.h @@ -0,0 +1,25 @@ +/* + * \brief Shadows Linux kernel arch/arm/include/asm/delay.h + * \author Stefan Kalkowski + * \date 2023-03-03 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + +#ifndef __ASM_DELAY_H +#define __ASM_DELAY_H + +/* + * We shadow the original arm variant and use the generic version instead, + * like x86 and arm64. Thereby, we can simply use one and the same backend + * function for udelay, which is part of our emulation codebase anyway. + */ +#include + +#endif + diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/lib/delay.c b/repos/dde_linux/src/lib/lx_emul/shadow/lib/delay.c new file mode 100644 index 0000000000..3a80f3b117 --- /dev/null +++ b/repos/dde_linux/src/lib/lx_emul/shadow/lib/delay.c @@ -0,0 +1,38 @@ +/* + * \brief Supplement for emulation for arch-specific lib/delay.c + * \author Stefan Kalkowski + * \date 2023-03-02 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is distributed under the terms of the GNU General Public License + * version 2. + */ + + +#include +#include +#include + +#include +#include + + +void __const_udelay(unsigned long xloops) +{ + unsigned long const usecs = xloops / 0x10C7UL; + __udelay(usecs); +} + + +void __udelay(unsigned long usecs) +{ + /* + * if interrupts are open, jiffies get updated implicitely + * by call of cpu_relax() + */ + unsigned long long end = lx_emul_time_counter() + usecs; + while (lx_emul_time_counter() < end) cpu_relax(); +} diff --git a/repos/pc/lib/import/import-pc_lx_emul.mk b/repos/pc/lib/import/import-pc_lx_emul.mk index d67b81aee7..f737db844e 100644 --- a/repos/pc/lib/import/import-pc_lx_emul.mk +++ b/repos/pc/lib/import/import-pc_lx_emul.mk @@ -48,7 +48,6 @@ SRC_C += lx_emul/mapping.c SRC_C += lx_emul/page_alloc.c SRC_C += lx_emul/sched_core.c SRC_C += lx_emul/vmalloc.c -SRC_C += lx_emul/delay.c SRC_C += lx_emul/shadow/fs/libfs.c SRC_C += lx_emul/shadow/lib/logic_iomem.c diff --git a/repos/pc/lib/mk/wifi.inc b/repos/pc/lib/mk/wifi.inc index c032a9fa16..acb2739ac2 100644 --- a/repos/pc/lib/mk/wifi.inc +++ b/repos/pc/lib/mk/wifi.inc @@ -12,7 +12,6 @@ SRC_CC += wlan.cc SRC_CC += firmware.cc SRC_CC += socket_call.cc SRC_CC += lx_emul/random.cc -SRC_CC += time.cc SRC_C += dummies.c SRC_C += lx_emul.c diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h index a8be1f2e07..97cc1d2c06 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h +++ b/repos/pc/src/drivers/framebuffer/intel/pc/lx_emul.h @@ -26,8 +26,6 @@ extern "C" { struct dma_fence_work; struct dma_fence_work_ops; -void lx_emul_time_udelay(unsigned long usec); - void *emul_alloc_shmem_file_buffer(unsigned long); void emul_free_shmem_file_buffer(void *); diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/target.inc b/repos/pc/src/drivers/framebuffer/intel/pc/target.inc index 39db2b89cd..50556f5af7 100644 --- a/repos/pc/src/drivers/framebuffer/intel/pc/target.inc +++ b/repos/pc/src/drivers/framebuffer/intel/pc/target.inc @@ -9,7 +9,6 @@ INC_DIR += $(REL_PRG_DIR) SRC_CC += main.cc SRC_CC += emul.cc -SRC_CC += time.cc SRC_CC += opregion_io_mem.cc SRC_C += dummies.c SRC_C += pci.c diff --git a/repos/pc/src/drivers/framebuffer/intel/pc/time.cc b/repos/pc/src/drivers/framebuffer/intel/pc/time.cc deleted file mode 100644 index 0f8f40ad69..0000000000 --- a/repos/pc/src/drivers/framebuffer/intel/pc/time.cc +++ /dev/null @@ -1,25 +0,0 @@ -/* - * \brief Lx_emul udelay function for very short delays - * \author Stefan Kalkowski - * \date 2021-07-10 - */ - -/* - * Copyright (C) 2021 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -#include -#include - -extern "C" void lx_emul_time_udelay(unsigned long usec); -extern "C" void lx_emul_time_udelay(unsigned long usec) -{ - if (usec > 100) - Genode::error("Cannot delay that long ", usec, " microseconds"); - - unsigned long long start = Lx_kit::env().timer.curr_time().trunc_to_plain_us().value; - while (Lx_kit::env().timer.curr_time().trunc_to_plain_us().value < (start + usec)) { ; } -} diff --git a/repos/pc/src/drivers/usb_host/pc/lx_emul.h b/repos/pc/src/drivers/usb_host/pc/lx_emul.h index 2b25b75d96..b2b78b51fb 100644 --- a/repos/pc/src/drivers/usb_host/pc/lx_emul.h +++ b/repos/pc/src/drivers/usb_host/pc/lx_emul.h @@ -19,13 +19,3 @@ /* fix for missing include in linux/dynamic_debug.h */ #include - -#ifdef __cplusplus -extern "C" { -#endif - -void lx_emul_time_udelay(unsigned long usec); - -#ifdef __cplusplus -} -#endif diff --git a/repos/pc/src/drivers/usb_host/pc/target.inc b/repos/pc/src/drivers/usb_host/pc/target.inc index d9c11ce49e..e6ca4b8df5 100644 --- a/repos/pc/src/drivers/usb_host/pc/target.inc +++ b/repos/pc/src/drivers/usb_host/pc/target.inc @@ -7,7 +7,6 @@ LIBS := base pc_lx_emul jitterentropy INC_DIR += $(REL_PRG_DIR) SRC_CC += main.cc -SRC_CC += time.cc SRC_CC += lx_emul/shared_dma_buffer.cc SRC_C += dummies.c SRC_C += lx_emul.c diff --git a/repos/pc/src/drivers/usb_host/pc/time.cc b/repos/pc/src/drivers/usb_host/pc/time.cc deleted file mode 100644 index 0f8f40ad69..0000000000 --- a/repos/pc/src/drivers/usb_host/pc/time.cc +++ /dev/null @@ -1,25 +0,0 @@ -/* - * \brief Lx_emul udelay function for very short delays - * \author Stefan Kalkowski - * \date 2021-07-10 - */ - -/* - * Copyright (C) 2021 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -#include -#include - -extern "C" void lx_emul_time_udelay(unsigned long usec); -extern "C" void lx_emul_time_udelay(unsigned long usec) -{ - if (usec > 100) - Genode::error("Cannot delay that long ", usec, " microseconds"); - - unsigned long long start = Lx_kit::env().timer.curr_time().trunc_to_plain_us().value; - while (Lx_kit::env().timer.curr_time().trunc_to_plain_us().value < (start + usec)) { ; } -} diff --git a/repos/pc/src/lib/pc/lx_emul/delay.c b/repos/pc/src/lib/pc/lx_emul/delay.c deleted file mode 100644 index febbbd9a1e..0000000000 --- a/repos/pc/src/lib/pc/lx_emul/delay.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * \brief Supplement for emulation for linux/include/asm-generic/delay.h - * \author Josef Soentgen - * \author Alexander Boettcher - * \date 2022-05-05 - */ - -/* - * Copyright (C) 2022 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - - -#include -#include -#include - -#include - - -void __const_udelay(unsigned long xloops) -{ - unsigned long const usecs = xloops / 0x10C7UL; - __udelay(usecs); -} - - -void __udelay(unsigned long usecs) -{ - /* - * Account for delays summing up to equivalent of 1 jiffie during - * jiffies_64 stays same. When 1 jiffie is reached in sum, - * increase jiffie_64 to break endless loops, seen in - * * intel_fb - cpu_relax(void) emulation used by - * busy loop of slchi() in drivers/i2c/algos/i2c-algo-bit.c - * * wifi_drv - net/wireless/intel/iwlwif* code during error code handling - */ - static uint64_t last_jiffie = 0; - static unsigned long delayed_sum = 0; - - if (jiffies_64 == last_jiffie) { - delayed_sum += usecs; - } else { - last_jiffie = jiffies_64; - delayed_sum = usecs; - } - - if (usecs < 100) - lx_emul_time_udelay(usecs); - else { - unsigned long slept = 0; - while (slept < usecs) { - lx_emul_time_udelay(100); - slept += 100; - } - } - - /* - * When delays sum up to the equivalent of 1 jiffie, - * increase it to break endless loops. - */ - if (delayed_sum >= jiffies_to_usecs(1)) { - jiffies_64 ++; - delayed_sum = 0; - } -} diff --git a/repos/pc/src/lib/wifi/lx_emul.h b/repos/pc/src/lib/wifi/lx_emul.h index 8d1e9bb67c..7d4ccf12e0 100644 --- a/repos/pc/src/lib/wifi/lx_emul.h +++ b/repos/pc/src/lib/wifi/lx_emul.h @@ -24,8 +24,6 @@ extern "C" { #endif -void lx_emul_time_udelay(unsigned long usec); - int lx_emul_rfkill_get_any(void); void lx_emul_rfkill_switch_all(int blocked); diff --git a/repos/pc/src/lib/wifi/time.cc b/repos/pc/src/lib/wifi/time.cc deleted file mode 100644 index 0f8f40ad69..0000000000 --- a/repos/pc/src/lib/wifi/time.cc +++ /dev/null @@ -1,25 +0,0 @@ -/* - * \brief Lx_emul udelay function for very short delays - * \author Stefan Kalkowski - * \date 2021-07-10 - */ - -/* - * Copyright (C) 2021 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -#include -#include - -extern "C" void lx_emul_time_udelay(unsigned long usec); -extern "C" void lx_emul_time_udelay(unsigned long usec) -{ - if (usec > 100) - Genode::error("Cannot delay that long ", usec, " microseconds"); - - unsigned long long start = Lx_kit::env().timer.curr_time().trunc_to_plain_us().value; - while (Lx_kit::env().timer.curr_time().trunc_to_plain_us().value < (start + usec)) { ; } -} diff --git a/repos/pc/src/test/driver_time/lx_emul.h b/repos/pc/src/test/driver_time/lx_emul.h index acee561257..4c60a2f777 100644 --- a/repos/pc/src/test/driver_time/lx_emul.h +++ b/repos/pc/src/test/driver_time/lx_emul.h @@ -10,14 +10,3 @@ * This file is distributed under the terms of the GNU General Public License * version 2. */ - - -#ifdef __cplusplus -extern "C" { -#endif - -void lx_emul_time_udelay(unsigned long usec); - -#ifdef __cplusplus -} -#endif diff --git a/repos/pc/src/test/driver_time/target.mk b/repos/pc/src/test/driver_time/target.mk index ba7f8e5769..4a4beeb3c4 100644 --- a/repos/pc/src/test/driver_time/target.mk +++ b/repos/pc/src/test/driver_time/target.mk @@ -3,7 +3,7 @@ REQUIRES := x86_64 TARGET := test-driver_time LIBS := base pc_lx_emul jitterentropy -SRC_CC += main.cc time.cc +SRC_CC += main.cc SRC_C += lx_user.c SRC_C += dummies.c SRC_C += generated_dummies.c diff --git a/repos/pc/src/test/driver_time/time.cc b/repos/pc/src/test/driver_time/time.cc deleted file mode 100644 index 0f8f40ad69..0000000000 --- a/repos/pc/src/test/driver_time/time.cc +++ /dev/null @@ -1,25 +0,0 @@ -/* - * \brief Lx_emul udelay function for very short delays - * \author Stefan Kalkowski - * \date 2021-07-10 - */ - -/* - * Copyright (C) 2021 Genode Labs GmbH - * - * This file is distributed under the terms of the GNU General Public License - * version 2. - */ - -#include -#include - -extern "C" void lx_emul_time_udelay(unsigned long usec); -extern "C" void lx_emul_time_udelay(unsigned long usec) -{ - if (usec > 100) - Genode::error("Cannot delay that long ", usec, " microseconds"); - - unsigned long long start = Lx_kit::env().timer.curr_time().trunc_to_plain_us().value; - while (Lx_kit::env().timer.curr_time().trunc_to_plain_us().value < (start + usec)) { ; } -} From 9ae4fc23716de1ac7fcdf1cf4daefa56378dcf5f Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 6 Mar 2023 07:28:40 +0100 Subject: [PATCH 0364/1921] dde_linux: explicitly list patch files Using wildcards for selecting patch files clashes with files from linux.port. --- repos/dde_linux/ports/dde_linux.hash | 2 +- repos/dde_linux/ports/dde_linux.port | 30 ++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/repos/dde_linux/ports/dde_linux.hash b/repos/dde_linux/ports/dde_linux.hash index c5b7b44a2b..0c4ce7250a 100644 --- a/repos/dde_linux/ports/dde_linux.hash +++ b/repos/dde_linux/ports/dde_linux.hash @@ -1 +1 @@ -f56657b5edae9fb069db1b5846bca4aebe7ce542 +503582cb329201899f651e5f4af15ab84325ac6d diff --git a/repos/dde_linux/ports/dde_linux.port b/repos/dde_linux/ports/dde_linux.port index 31219db3b9..67edb1314e 100644 --- a/repos/dde_linux/ports/dde_linux.port +++ b/repos/dde_linux/ports/dde_linux.port @@ -89,12 +89,30 @@ HASH_INPUT += $(REP_DIR)/fec.list # # Patches # -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/lxip*.patch))) -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb_host*.patch))) -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb*.patch))) -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb_modem*.patch))) -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/fec_*.patch))) -PATCHES += $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/usb_hid*.patch))) +PATCHES += patches/fec_ndev_owner.patch +PATCHES += patches/fec_skbuff_cast.patch +PATCHES += patches/fec_tx_bounce_dma.patch +PATCHES += patches/fec_tx_sync_dma_write.patch +PATCHES += patches/lxip_icmp.patch +PATCHES += patches/lxip_ip_config.patch +PATCHES += patches/lxip_log2.patch +PATCHES += patches/lxip_netlink.patch +PATCHES += patches/lxip_request_sock.patch +PATCHES += patches/lxip_sk_wq.patch +PATCHES += patches/lxip_skbuff_cast.patch +PATCHES += patches/usb_hid_evdev.patch +PATCHES += patches/usb_hid_hid.patch +PATCHES += patches/usb_hid_input.patch +PATCHES += patches/usb_hid_usbhid.patch +PATCHES += patches/usb_hid_wacom_sys.patch +PATCHES += patches/usb_host_dwc_otg.patch +PATCHES += patches/usb_host_isoc_bei.patch +PATCHES += patches/usb_host_mem.patch +PATCHES += patches/usb_host_omap.patch +PATCHES += patches/usb_host_update_event_ring.patch +PATCHES += patches/usb_modem_skbuff_cast.patch +PATCHES += patches/usb_net_skbuff_cast.patch + #IP stack LXIP_OPT = -p1 -d$(SRC_DIR_LXIP) From bed084c17c1d4c3ee002accd38ccf671a46e3707 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Mon, 6 Mar 2023 12:30:56 +0100 Subject: [PATCH 0365/1921] Add missing sources to wireguard The additional files provide Chacha implementation in case may_use_simd() returns false because in_interrupt() returns true. Related to issue #4778, commit "lx_emul: track irq state changes" --- repos/dde_linux/src/app/wireguard/spec/arm_64/source.list | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/dde_linux/src/app/wireguard/spec/arm_64/source.list b/repos/dde_linux/src/app/wireguard/spec/arm_64/source.list index d7beff11fb..1cf85b061c 100644 --- a/repos/dde_linux/src/app/wireguard/spec/arm_64/source.list +++ b/repos/dde_linux/src/app/wireguard/spec/arm_64/source.list @@ -1,5 +1,8 @@ +arch/arm64/crypto/chacha-neon-core.S arch/arm64/crypto/poly1305-glue.c arch/arm64/crypto/chacha-neon-glue.c +arch/arm64/kernel/entry-fpsimd.S +arch/arm64/kernel/fpsimd.c arch/arm64/lib/memcmp.S arch/arm64/lib/memchr.S arch/arm64/lib/strcmp.S From fb66e733b5f4b72e97397137d52b0d74911b0784 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 3 Mar 2023 09:45:12 +0100 Subject: [PATCH 0366/1921] base: add 'Connection' constructor accepting args The new 'Connection' constructor accepts the session label, affinity, and args as constructor arguments. The session arguments are passed as a 'Genode::String'. This allows for side-stepping the need for rendering a format string passed to 'Env::session'. Issue #2064 --- repos/base/include/base/connection.h | 67 ++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 4 deletions(-) diff --git a/repos/base/include/base/connection.h b/repos/base/include/base/connection.h index d242603afe..89ec29df93 100644 --- a/repos/base/include/base/connection.h +++ b/repos/base/include/base/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -101,6 +101,12 @@ class Genode::Connection_base : Noncopyable, Interface template class Genode::Connection : public Connection_base { + public: + + using Args = String; + using Session_type = SESSION_TYPE; + using Ram_quota = Genode::Ram_quota; + private: /* @@ -126,6 +132,36 @@ class Genode::Connection : public Connection_base _affinity_arg = affinity; } + using Client_id = Parent::Client::Id; + + static Capability _request(Env &env, + Client_id const &id, + Session_label const &label, + Ram_quota const &ram_quota, + Affinity const &affinity, + Args const &args) + { + /* supplement session quotas and label as session arguments */ + Args const complete_args("label=\"", label, "\", " + "ram_quota=", ram_quota, ", " + "cap_quota=", unsigned(SESSION_TYPE::CAP_QUOTA), ", ", + args); + + if (complete_args.length() == Args::capacity()) + warning("truncated arguments of ", + SESSION_TYPE::service_name(), " session"); + + try { + return env.session(id, complete_args.string(), + affinity); + } + catch (...) { + error(SESSION_TYPE::service_name(), "-session creation failed " + "(", complete_args, ")"); + throw; + } + } + Capability _request_cap() { try { @@ -142,19 +178,38 @@ class Genode::Connection : public Connection_base public: - typedef SESSION_TYPE Session_type; - /** * Constructor + * + * \deprecated */ Connection(Env &env, Capability) : Connection_base(env), _cap(_request_cap()) { } + Connection(Env &env, + Session_label const &label, + Ram_quota const &ram_quota, + Affinity const &affinity, + Args const &args) + : + Connection_base(env), + _cap(_request(env, _id_space_element.id(), + label, ram_quota, affinity, args)) + { } + /** - * Destructor + * Constructor + * + * Shortcut for the common case where the affinity is not specified. */ + Connection(Env &env, Session_label const &label, + Ram_quota const &ram_quota, Args const &args) + : + Connection(env, label, ram_quota, Affinity(), args) + { } + ~Connection() { _env.close(_id_space_element.id()); } /** @@ -164,6 +219,8 @@ class Genode::Connection : public Connection_base /** * Issue session request to the parent + * + * \deprecated */ Capability session(Parent &parent, const char *format_args, ...) { @@ -176,6 +233,8 @@ class Genode::Connection : public Connection_base /** * Issue session request to the parent + * + * \deprecated */ Capability session(Parent &parent, Affinity const &affinity, From 9debad4e9139fa4593043d3b86c92bfe23e9d5f9 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 3 Mar 2023 12:07:28 +0100 Subject: [PATCH 0367/1921] Remove format strings from connection types Issue #2064 --- .../include/sync_session/connection.h | 2 +- repos/base/include/cpu_session/connection.h | 16 ++--- repos/base/include/cpu_session/cpu_session.h | 2 +- .../base/include/io_mem_session/connection.h | 12 ++-- .../include/io_mem_session/io_mem_session.h | 2 +- .../base/include/io_port_session/connection.h | 21 ++---- .../include/io_port_session/io_port_session.h | 3 +- repos/base/include/irq_session/connection.h | 46 ++++--------- repos/base/include/irq_session/irq_session.h | 2 +- repos/base/include/log_session/connection.h | 14 +--- repos/base/include/log_session/log_session.h | 2 +- repos/base/include/pd_session/connection.h | 23 ++----- repos/base/include/pd_session/pd_session.h | 2 +- repos/base/include/rm_session/connection.h | 13 +--- repos/base/include/rom_session/connection.h | 21 ++---- repos/base/include/rom_session/rom_session.h | 2 +- repos/base/include/timer_session/connection.h | 7 +- repos/base/include/trace_session/connection.h | 8 +-- repos/base/include/vm_session/connection.h | 23 ++----- repos/base/include/vm_session/vm_session.h | 2 +- repos/base/lib/symbols/ld | 6 +- repos/base/src/core/main.cc | 2 +- .../base/src/lib/timeout/timer_connection.cc | 12 +--- repos/base/src/timer/epit/imx6/timer.cc | 2 +- repos/base/src/timer/gpt/imx7/timer.cc | 2 +- repos/base/src/timer/pit/time_source.cc | 2 +- repos/hello_tutorial/doc/hello_tutorial.txt | 19 +++-- .../include/hello_session/connection.h | 8 +-- .../include/hello_session/hello_session.h | 2 +- .../src/lib/libc/internal/clone_session.h | 5 +- .../os/include/audio_in_session/connection.h | 15 +--- .../os/include/audio_out_session/connection.h | 7 +- repos/os/include/block_session/connection.h | 11 ++- repos/os/include/capture_session/connection.h | 12 +--- repos/os/include/event_session/connection.h | 13 +--- .../include/file_system_session/connection.h | 21 ++---- .../include/framebuffer_session/connection.h | 69 +++++-------------- repos/os/include/gpio_session/connection.h | 9 +-- repos/os/include/gpu_session/connection.h | 24 ++----- repos/os/include/gui_session/connection.h | 31 +-------- repos/os/include/i2c_session/connection.h | 4 +- repos/os/include/i2c_session/i2c_session.h | 5 -- repos/os/include/input_session/connection.h | 11 +-- repos/os/include/loader_session/connection.h | 12 ++-- repos/os/include/nic_session/connection.h | 13 ++-- .../include/pin_control_session/connection.h | 10 +-- .../os/include/pin_state_session/connection.h | 10 +-- .../os/include/platform_session/connection.h | 4 +- .../platform_session/platform_session.h | 2 +- repos/os/include/report_session/connection.h | 12 +--- repos/os/include/rtc_session/connection.h | 8 +-- repos/os/include/rtc_session/rtc_session.h | 1 + .../os/include/terminal_session/connection.h | 9 +-- repos/os/include/uart_session/connection.h | 5 +- repos/os/include/uplink_session/connection.h | 19 ++--- repos/os/include/usb_session/connection.h | 13 ++-- repos/os/src/drivers/gpio/rpi/driver.h | 2 +- repos/os/src/test/nic_stress/main.cc | 21 +++--- 58 files changed, 199 insertions(+), 457 deletions(-) diff --git a/repos/base-hw/src/test/cpu_quota/include/sync_session/connection.h b/repos/base-hw/src/test/cpu_quota/include/sync_session/connection.h index 725f6eec2d..049530a455 100644 --- a/repos/base-hw/src/test/cpu_quota/include/sync_session/connection.h +++ b/repos/base-hw/src/test/cpu_quota/include/sync_session/connection.h @@ -29,7 +29,7 @@ struct Sync::Connection : public Genode::Connection, { explicit Connection(Genode::Env &env) : - Genode::Connection(env, session(env.parent(), "ram_quota=4K")), + Genode::Connection(env, Label(), Ram_quota { 4*1024 }, Args()), Genode::Rpc_client(cap()) { } diff --git a/repos/base/include/cpu_session/connection.h b/repos/base/include/cpu_session/connection.h index ac0368abfd..30a44dfb4c 100644 --- a/repos/base/include/cpu_session/connection.h +++ b/repos/base/include/cpu_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -22,23 +22,19 @@ namespace Genode { struct Cpu_connection; } struct Genode::Cpu_connection : Connection, Cpu_session_client { - enum { RAM_QUOTA = 36*1024 }; - /** * Constructor * - * \param label initial session label * \param priority designated priority of all threads created * with this CPU session */ - Cpu_connection(Env &env, const char *label = "", long priority = DEFAULT_PRIORITY, + Cpu_connection(Env &env, + Label const &label = Label(), + long priority = DEFAULT_PRIORITY, Affinity const &affinity = Affinity()) : - Connection(env, - session(env.parent(), affinity, - "priority=0x%lx, ram_quota=%u, " - "cap_quota=%u, label=\"%s\"", - priority, RAM_QUOTA, CAP_QUOTA, label)), + Connection(env, label, Ram_quota { RAM_QUOTA }, affinity, + Args("priority=", Hex(priority))), Cpu_session_client(cap()) { } diff --git a/repos/base/include/cpu_session/cpu_session.h b/repos/base/include/cpu_session/cpu_session.h index 67389f49e1..1af3b390a2 100644 --- a/repos/base/include/cpu_session/cpu_session.h +++ b/repos/base/include/cpu_session/cpu_session.h @@ -43,7 +43,7 @@ struct Genode::Cpu_session : Session * allocation, its session capability, the capability of the 'Native_cpu' * RPC interface, and a capability for the trace-control dataspace. */ - enum { CAP_QUOTA = 6 }; + enum { CAP_QUOTA = 6, RAM_QUOTA = 36*1024 }; typedef Cpu_session_client Client; diff --git a/repos/base/include/io_mem_session/connection.h b/repos/base/include/io_mem_session/connection.h index e8deb1969b..18ae658d90 100644 --- a/repos/base/include/io_mem_session/connection.h +++ b/repos/base/include/io_mem_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -31,12 +31,10 @@ struct Genode::Io_mem_connection : Connection, Io_mem_session_cl */ Io_mem_connection(Env &env, addr_t base, size_t size, bool write_combined = false) : - Connection(env, - session(env.parent(), - "cap_quota=%u, ram_quota=%u, " - "base=0x%p, size=0x%lx, wc=%s", - CAP_QUOTA, RAM_QUOTA, base, size, - write_combined ? "yes" : "no")), + Connection(env, Label(), Ram_quota { RAM_QUOTA }, + Args("base=", Hex(base), ", " + "size=", Hex(size), ", " + "wc=", write_combined ? "yes" : "no")), Io_mem_session_client(cap()) { } }; diff --git a/repos/base/include/io_mem_session/io_mem_session.h b/repos/base/include/io_mem_session/io_mem_session.h index 90d774e939..bdb1e4a8a1 100644 --- a/repos/base/include/io_mem_session/io_mem_session.h +++ b/repos/base/include/io_mem_session/io_mem_session.h @@ -41,7 +41,7 @@ struct Genode::Io_mem_session : Session * session-object allocation, its session capability, and a dataspace * capability for the handed-out memory-mapped I/O dataspace. */ - enum { CAP_QUOTA = 3, RAM_QUOTA = 6 * 1024 }; + enum { CAP_QUOTA = 3, RAM_QUOTA = 6*1024 }; virtual ~Io_mem_session() { } diff --git a/repos/base/include/io_port_session/connection.h b/repos/base/include/io_port_session/connection.h index c7384b4b23..783875c72f 100644 --- a/repos/base/include/io_port_session/connection.h +++ b/repos/base/include/io_port_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -23,17 +23,6 @@ namespace Genode { struct Io_port_connection; } struct Genode::Io_port_connection : Connection, Io_port_session_client { - /** - * Issue session request - * - * \noapi - */ - Capability _session(Parent &parent, unsigned base, unsigned size) - { - return session(parent, "ram_quota=%u, cap_quota=%u, io_port_base=%u, io_port_size=%u", - RAM_QUOTA, CAP_QUOTA, base, size); - } - /** * Constructor * @@ -42,11 +31,9 @@ struct Genode::Io_port_connection : Connection, */ Io_port_connection(Env &env, unsigned base, unsigned size) : - Connection(env, - session(env.parent(), - "ram_quota=%u, cap_quota=%u, " - "io_port_base=%u, io_port_size=%u", - RAM_QUOTA, CAP_QUOTA, base, size)), + Connection(env, Label(), Ram_quota { RAM_QUOTA }, + Args("io_port_base=", base, ", " + "io_port_size=", size)), Io_port_session_client(cap()) { } }; diff --git a/repos/base/include/io_port_session/io_port_session.h b/repos/base/include/io_port_session/io_port_session.h index 24d7cfcd9d..b440d44803 100644 --- a/repos/base/include/io_port_session/io_port_session.h +++ b/repos/base/include/io_port_session/io_port_session.h @@ -38,10 +38,11 @@ struct Genode::Io_port_session : Session */ static const char *service_name() { return "IO_PORT"; } - enum { RAM_QUOTA = 6 * 1024, CAP_QUOTA = 2 }; + enum { CAP_QUOTA = 2, RAM_QUOTA = 6*1024 }; virtual ~Io_port_session() { } + /****************************** ** Read value from I/O port ** ******************************/ diff --git a/repos/base/include/irq_session/connection.h b/repos/base/include/irq_session/connection.h index f4b8f85ced..d502c7a69c 100644 --- a/repos/base/include/irq_session/connection.h +++ b/repos/base/include/irq_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -19,47 +19,27 @@ namespace Genode { struct Irq_connection; } + struct Genode::Irq_connection : Connection, Irq_session_client { /** * Constructor * - * \param irq physical interrupt number + * \param label physical interrupt number * \param trigger interrupt trigger (e.g., level/edge) * \param polarity interrupt trigger polarity (e.g., low/high) */ - Irq_connection(Env &env, - unsigned irq, - Irq_session::Trigger trigger = Irq_session::TRIGGER_UNCHANGED, - Irq_session::Polarity polarity = Irq_session::POLARITY_UNCHANGED, - Genode::addr_t device_config_phys = 0) + Irq_connection(Env &env, + Label const &label, + Trigger trigger = Irq_session::TRIGGER_UNCHANGED, + Polarity polarity = Irq_session::POLARITY_UNCHANGED, + addr_t device_config_phys = 0) : - Connection(env, session(env.parent(), - "ram_quota=%u, cap_quota=%u, " - "irq_number=%u, irq_trigger=%u, " - "irq_polarity=%u, device_config_phys=0x%lx", - RAM_QUOTA, CAP_QUOTA, - irq, trigger, polarity, device_config_phys)), - Irq_session_client(cap()) - { } - - /** - * Constructor for label-based configuration (used by pin driver) - * - * \param label session label - */ - Irq_connection(Env &env, - char const *label) - : - Connection(env, session(env.parent(), - "ram_quota=%u, cap_quota=%u, " - "irq_number=%u, irq_trigger=%u, " - "irq_polarity=%u, device_config_phys=0x%lx, " - "label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, 0, - Irq_session::TRIGGER_UNCHANGED, - Irq_session::POLARITY_UNCHANGED, - 0, label)), + Connection(env, label, Ram_quota { RAM_QUOTA }, + Args("irq_number=", label, ", " + "irq_trigger=", unsigned(trigger), ", " + "irq_polarity=", unsigned(polarity), ", " + "device_config_phys=", Hex(device_config_phys))), Irq_session_client(cap()) { } }; diff --git a/repos/base/include/irq_session/irq_session.h b/repos/base/include/irq_session/irq_session.h index cb6807bc49..900816e11f 100644 --- a/repos/base/include/irq_session/irq_session.h +++ b/repos/base/include/irq_session/irq_session.h @@ -78,7 +78,7 @@ struct Genode::Irq_session : Session */ static const char * service_name() { return "IRQ"; } - enum { CAP_QUOTA = 3, RAM_QUOTA = 6 * 1024 }; + enum { CAP_QUOTA = 3, RAM_QUOTA = 6*1024 }; /********************* diff --git a/repos/base/include/log_session/connection.h b/repos/base/include/log_session/connection.h index 330e92ddb0..1ed3ef2f53 100644 --- a/repos/base/include/log_session/connection.h +++ b/repos/base/include/log_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -16,23 +16,15 @@ #include #include -#include namespace Genode { struct Log_connection; } struct Genode::Log_connection : Connection, Log_session_client { - enum { RAM_QUOTA = 8*1024UL }; - - /** - * Constructor - */ - Log_connection(Env &env, Session_label label = Session_label()) + Log_connection(Env &env, Session_label const &label = Session_label()) : - Connection(env, session(env.parent(), - "ram_quota=%ld, cap_quota=%ld, label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, label.string())), + Connection(env, label, Ram_quota { RAM_QUOTA }, Args()), Log_session_client(cap()) { } }; diff --git a/repos/base/include/log_session/log_session.h b/repos/base/include/log_session/log_session.h index 5c7969824a..4c029ac3a0 100644 --- a/repos/base/include/log_session/log_session.h +++ b/repos/base/include/log_session/log_session.h @@ -37,7 +37,7 @@ struct Genode::Log_session : Session * A LOG connection consumes a dataspace capability for the session-object * allocation and its session capability. */ - enum { CAP_QUOTA = 2 }; + enum { CAP_QUOTA = 2, RAM_QUOTA = 8*1024 }; typedef Log_session_client Client; diff --git a/repos/base/include/pd_session/connection.h b/repos/base/include/pd_session/connection.h index 49a8911a4a..94bcf38968 100644 --- a/repos/base/include/pd_session/connection.h +++ b/repos/base/include/pd_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -22,19 +22,12 @@ namespace Genode { struct Pd_connection; } struct Genode::Pd_connection : Connection, Pd_session_client { - enum { RAM_QUOTA = 24*1024*sizeof(long)}; enum Virt_space { UNCONSTRAIN = 0, CONSTRAIN = 1 }; - /** - * Constructor - * - * \param label session label - */ - Pd_connection(Env &env, char const *label = "", Virt_space space = CONSTRAIN) + Pd_connection(Env &env, Label const &label = Label(), Virt_space space = CONSTRAIN) : - Connection(env, session(env.parent(), - "ram_quota=%u, cap_quota=%u, label=\"%s\", virt_space=%u", - RAM_QUOTA, CAP_QUOTA, label, space)), + Connection(env, label, Ram_quota { RAM_QUOTA }, + Args("virt_space=", unsigned(space))), Pd_session_client(cap()) { } @@ -45,11 +38,9 @@ struct Genode::Pd_connection : Connection, Pd_session_client */ Pd_connection(Env &env, Device_pd) : - Connection(env, session(env.parent(), - "ram_quota=%u, cap_quota=%u, " - "label=\"device PD\", virt_space=%u, " - "managing_system=yes", - RAM_QUOTA, CAP_QUOTA, UNCONSTRAIN)), + Connection(env, "device PD", Ram_quota { RAM_QUOTA }, + Args("virt_space=", unsigned(UNCONSTRAIN), ", " + "managing_system=yes")), Pd_session_client(cap()) { } }; diff --git a/repos/base/include/pd_session/pd_session.h b/repos/base/include/pd_session/pd_session.h index 9f6c7871c4..ca42977660 100644 --- a/repos/base/include/pd_session/pd_session.h +++ b/repos/base/include/pd_session/pd_session.h @@ -46,7 +46,7 @@ struct Genode::Pd_session : Session, Ram_allocator * Furthermore, we account for the dataspace capabilities allocated during * the component bootstrapping. */ - enum { CAP_QUOTA = 6 + 7 }; + enum { CAP_QUOTA = 6 + 7, RAM_QUOTA = 24*1024*sizeof(long) }; typedef Pd_session_client Client; diff --git a/repos/base/include/rm_session/connection.h b/repos/base/include/rm_session/connection.h index 0b6b7cf92c..0ef432bf7c 100644 --- a/repos/base/include/rm_session/connection.h +++ b/repos/base/include/rm_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2018 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -23,21 +23,14 @@ namespace Genode { struct Rm_connection; } struct Genode::Rm_connection : Connection, Rm_session_client { - enum { RAM_QUOTA = 64*1024 }; - - /** - * Constructor - */ Rm_connection(Env &env) : - Connection(env, session(env.parent(), "ram_quota=%u, cap_quota=%u", - RAM_QUOTA, CAP_QUOTA)), + Connection(env, Label(), Ram_quota { 64*1024 }, Args()), Rm_session_client(cap()) { } /** - * Wrapper over 'create' that handles resource requests - * from the server. + * Wrapper over 'create' that handles resource requests from the server */ Capability create(size_t size) override { diff --git a/repos/base/include/rom_session/connection.h b/repos/base/include/rom_session/connection.h index ce1b9badf4..fd33e0ac71 100644 --- a/repos/base/include/rom_session/connection.h +++ b/repos/base/include/rom_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -16,35 +16,28 @@ #include #include -#include namespace Genode { class Rom_connection; } -struct Genode::Rom_connection : Connection, - Rom_session_client +struct Genode::Rom_connection : Connection, Rom_session_client { - class Rom_connection_failed : public Service_denied { }; - - enum { RAM_QUOTA = 6*1024UL }; + struct Rom_connection_failed : Service_denied { }; /** * Constructor * - * \param label request label and name of ROM module + * \param label name of requested ROM module * * \throw Rom_connection_failed */ - Rom_connection(Env &env, const char *label) + Rom_connection(Env &env, Session_label const &label) try : - Connection(env, - session(env.parent(), - "ram_quota=%ld, cap_quota=%ld, label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, label)), + Connection(env, label, Ram_quota { RAM_QUOTA }, Args()), Rom_session_client(cap()) { } catch (...) { - error("Could not open ROM session for \"", label, "\""); + error("could not open ROM session for \"", label, "\""); throw Rom_connection_failed(); } }; diff --git a/repos/base/include/rom_session/rom_session.h b/repos/base/include/rom_session/rom_session.h index 9a81086acc..d79efd3efc 100644 --- a/repos/base/include/rom_session/rom_session.h +++ b/repos/base/include/rom_session/rom_session.h @@ -46,7 +46,7 @@ struct Genode::Rom_session : Session * allocation, a dataspace capability for the ROM dataspace, and its * session capability. */ - enum { CAP_QUOTA = 3 }; + enum { CAP_QUOTA = 3, RAM_QUOTA = 6*1024 }; typedef Rom_session_client Client; diff --git a/repos/base/include/timer_session/connection.h b/repos/base/include/timer_session/connection.h index 4f24dea770..c077ce0e99 100644 --- a/repos/base/include/timer_session/connection.h +++ b/repos/base/include/timer_session/connection.h @@ -256,14 +256,15 @@ class Timer::Connection : public Genode::Connection, * \param label optional label used in session routing */ Connection(Genode::Env &env, - Genode::Entrypoint & ep, - char const *label = ""); + Genode::Entrypoint &ep, + Label const &label = Label()); /** * Convenience constructor wrapper using the environment's entrypoint as * timeout handler execution context */ - Connection(Genode::Env &env, char const *label = ""); + Connection(Genode::Env &env, Label const &label = Label()) + : Connection(env, env.ep(), label) { } ~Connection() { _sig_rec.dissolve(&_default_sigh_ctx); } diff --git a/repos/base/include/trace_session/connection.h b/repos/base/include/trace_session/connection.h index 260d3eff79..3306690aa7 100644 --- a/repos/base/include/trace_session/connection.h +++ b/repos/base/include/trace_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2013-2017 Genode Labs GmbH + * Copyright (C) 2013-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -39,9 +39,9 @@ struct Genode::Trace::Connection : Genode::Connection, */ Connection(Env &env, size_t ram_quota, size_t arg_buffer_size, unsigned parent_levels) : - Genode::Connection(env, - session(env.parent(), "ram_quota=%lu, arg_buffer_size=%lu, parent_levels=%u", - ram_quota + 10*1024, arg_buffer_size, parent_levels)), + Genode::Connection(env, Label(), Ram_quota { 10*1024 + ram_quota }, + Args("arg_buffer_size=", arg_buffer_size, ", " + "parent_levels=", parent_levels)), Session_client(env.rm(), cap()) { } diff --git a/repos/base/include/vm_session/connection.h b/repos/base/include/vm_session/connection.h index b957846fa9..080582b078 100644 --- a/repos/base/include/vm_session/connection.h +++ b/repos/base/include/vm_session/connection.h @@ -9,7 +9,7 @@ */ /* - * Copyright (C) 2012-2021 Genode Labs GmbH + * Copyright (C) 2012-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -35,19 +35,6 @@ namespace Genode { struct Genode::Vm_connection : Connection, Rpc_client { - /** - * Issue session request - * - * \noapi - */ - Capability _session(Parent &parent, char const *label, long priority, - unsigned long affinity) - { - return session(parent, - "priority=0x%lx, affinity=0x%lx, ram_quota=16K, cap_quota=10, label=\"%s\"", - priority, affinity, label); - } - /* * VM-Exit state-transfer configuration * @@ -82,15 +69,16 @@ struct Genode::Vm_connection : Connection, Rpc_client /** * Constructor * - * \param label initial session label * \param priority designated priority of the VM * \param affinity which physical CPU the VM should run on top of */ - Vm_connection(Env &env, const char *label = "", + Vm_connection(Env &env, Label const &label = Label(), long priority = Cpu_session::DEFAULT_PRIORITY, unsigned long affinity = 0) : - Connection(env, _session(env.parent(), label, priority, affinity)), + Connection(env, label, Ram_quota { 16*1024 }, Affinity(), + Args("priority=", Hex(priority), ", " + "affinity=", Hex(affinity))), Rpc_client(cap()) { } @@ -107,6 +95,7 @@ struct Genode::Vm_connection : Connection, Rpc_client ); } + /************************** ** Vm_session interface ** **************************/ diff --git a/repos/base/include/vm_session/vm_session.h b/repos/base/include/vm_session/vm_session.h index e4087759c3..1872f9ce3c 100644 --- a/repos/base/include/vm_session/vm_session.h +++ b/repos/base/include/vm_session/vm_session.h @@ -37,7 +37,7 @@ struct Genode::Vm_session : Session bool writeable; }; - enum { CAP_QUOTA = 3 }; + enum { CAP_QUOTA = 10 }; class Invalid_dataspace : Exception { }; class Region_conflict : Exception { }; diff --git a/repos/base/lib/symbols/ld b/repos/base/lib/symbols/ld index 5a04b7470d..4af8270e0a 100644 --- a/repos/base/lib/symbols/ld +++ b/repos/base/lib/symbols/ld @@ -43,10 +43,8 @@ _Z16main_thread_utcbv T _Z22__ldso_raise_exceptionv T _ZN5Timer10Connection11set_timeoutEN6Genode12MicrosecondsERNS1_15Timeout_handlerE T _ZN5Timer10Connection9curr_timeEv T -_ZN5Timer10ConnectionC1ERN6Genode3EnvEPKc T -_ZN5Timer10ConnectionC1ERN6Genode3EnvERNS1_10EntrypointEPKc T -_ZN5Timer10ConnectionC2ERN6Genode3EnvEPKc T -_ZN5Timer10ConnectionC2ERN6Genode3EnvERNS1_10EntrypointEPKc T +_ZN5Timer10ConnectionC1ERN6Genode3EnvERNS1_10EntrypointERKNS1_13Session_labelE T +_ZN5Timer10ConnectionC2ERN6Genode3EnvERNS1_10EntrypointERKNS1_13Session_labelE T _ZN6Genode10Entrypoint16_dispatch_signalERNS_6SignalE T _ZN6Genode10Entrypoint16schedule_suspendEPFvvES2_ T _ZN6Genode10Entrypoint22Signal_proxy_component6signalEv T diff --git a/repos/base/src/core/main.cc b/repos/base/src/core/main.cc index e0c3fb0f1e..2d1d15f250 100644 --- a/repos/base/src/core/main.cc +++ b/repos/base/src/core/main.cc @@ -304,7 +304,7 @@ int main() /* CPU session representing core */ static Cpu_session_component core_cpu(ep, - Session::Resources{{Cpu_connection::RAM_QUOTA}, + Session::Resources{{Cpu_session::RAM_QUOTA}, {Cpu_session::CAP_QUOTA}}, "core", Session::Diag{false}, core_ram_alloc, local_rm, ep, pager_ep, Core::Trace::sources(), "", diff --git a/repos/base/src/lib/timeout/timer_connection.cc b/repos/base/src/lib/timeout/timer_connection.cc index 8d90e56459..c38718e711 100644 --- a/repos/base/src/lib/timeout/timer_connection.cc +++ b/repos/base/src/lib/timeout/timer_connection.cc @@ -120,12 +120,9 @@ void Timer::Connection::set_timeout(Microseconds duration, } -Timer::Connection::Connection(Genode::Env &env, Genode::Entrypoint &ep, - char const *label) +Timer::Connection::Connection(Env &env, Entrypoint &ep, Label const &label) : - Genode::Connection(env, session(env.parent(), - "ram_quota=10K, cap_quota=%u, label=\"%s\"", - CAP_QUOTA, label)), + Genode::Connection(env, label, Ram_quota { 10*1024 }, Args()), Session_client(cap()), _signal_handler(ep, *this, &Connection::_handle_timeout) { @@ -134,10 +131,6 @@ Timer::Connection::Connection(Genode::Env &env, Genode::Entrypoint &ep, } -Timer::Connection::Connection(Genode::Env &env, char const *label) -: Timer::Connection(env, env.ep(), label) {} - - Timeout_scheduler &Timer::Connection::_switch_to_timeout_framework_mode() { if (_mode == TIMEOUT_FRAMEWORK) { @@ -148,7 +141,6 @@ Timeout_scheduler &Timer::Connection::_switch_to_timeout_framework_mode() _timeout_scheduler._enable(); - /* do initial calibration burst to make interpolation available earlier */ for (unsigned i = 0; i < NR_OF_INITIAL_CALIBRATIONS; i++) { _update_real_time(); diff --git a/repos/base/src/timer/epit/imx6/timer.cc b/repos/base/src/timer/epit/imx6/timer.cc index 9747f8e072..39ff5e5e10 100644 --- a/repos/base/src/timer/epit/imx6/timer.cc +++ b/repos/base/src/timer/epit/imx6/timer.cc @@ -26,7 +26,7 @@ Timer::Time_source::Time_source(Env &env) : Attached_mmio(env, Imx6::EPIT_2_MMIO_BASE, Imx6::EPIT_2_MMIO_SIZE), Signalled_time_source(env), - _timer_irq(env, Imx6::EPIT_2_IRQ) + _timer_irq(env, unsigned(Imx6::EPIT_2_IRQ)) { _timer_irq.sigh(_signal_handler); while (read()) ; diff --git a/repos/base/src/timer/gpt/imx7/timer.cc b/repos/base/src/timer/gpt/imx7/timer.cc index b7d841ec54..b62e97c4a6 100644 --- a/repos/base/src/timer/gpt/imx7/timer.cc +++ b/repos/base/src/timer/gpt/imx7/timer.cc @@ -26,4 +26,4 @@ enum { Timer::Time_source::Time_source(Env &env) : Attached_mmio(env, MMIO_BASE, MMIO_SIZE), Signalled_time_source(env), - _timer_irq(env, IRQ) { _initialize(); } + _timer_irq(env, unsigned(IRQ)) { _initialize(); } diff --git a/repos/base/src/timer/pit/time_source.cc b/repos/base/src/timer/pit/time_source.cc index 83b47bc72d..86458070d4 100644 --- a/repos/base/src/timer/pit/time_source.cc +++ b/repos/base/src/timer/pit/time_source.cc @@ -200,7 +200,7 @@ Timer::Time_source::Time_source(Env &env) : Signalled_time_source(env), _io_port(env, PIT_DATA_PORT_0, PIT_CMD_PORT - PIT_DATA_PORT_0 + 1), - _timer_irq(env, IRQ_PIT) + _timer_irq(env, unsigned(IRQ_PIT)) { /* operate PIT in one-shot mode */ _io_port.outb(PIT_CMD_PORT, PIT_CMD_SELECT_CHANNEL_0 | diff --git a/repos/hello_tutorial/doc/hello_tutorial.txt b/repos/hello_tutorial/doc/hello_tutorial.txt index 8cf1a95a6e..7c7cb2e1f6 100644 --- a/repos/hello_tutorial/doc/hello_tutorial.txt +++ b/repos/hello_tutorial/doc/hello_tutorial.txt @@ -76,7 +76,7 @@ C++ class in 'include/hello_session/hello_session.h' !{ ! static const char *service_name() { return "Hello"; } ! -! enum { CAP_QUOTA = 2 }; +! enum { CAP_QUOTA = 4 }; ! ! virtual void say_hello() = 0; ! virtual int add(int a, int b) = 0; @@ -93,12 +93,10 @@ across component boundaries. Furthermore, we use the interface to specify the name of the service by providing the 'service_name' method. This method will later be used by both the server for announcing the service at its parent and the client for -requesting the creation of a "Hello" session. The 'CAP_QUOTA' definition -specifies the amount of capabilities required to establish the session. -The specified amount is transferred from the client to the server at session -creation time. For the "Hello" session, two capabilities are required, namely -a dataspace capability for the server-side memory occupied by the session -object and the actual session capability that refers to the RPC interface. +requesting the creation of a "Hello" session. The 'resources' definition +specifies the amount of capabilities and RAM required by the server to +establish the session. The specified amount is transferred from the client +to the server at session creation time. The 'GENODE_RPC' macro is used to declare an RPC function. Its first argument is a type name that is used to refer to the RPC function. The type name can @@ -351,10 +349,11 @@ of the session interface. For our case, the file ! Connection(Genode::Env &env) ! : ! /* create session */ -! Genode::Connection(env, session(env.parent(), -! "ram_quota=4K, cap_quota=4")), +! Genode::Connection(env, Label(), +! Ram_quota { 8*1024 }, Args()), ! /* initialize RPC interface */ -! Session_client(cap()) { } +! Session_client(cap()) +! { } !}; diff --git a/repos/hello_tutorial/include/hello_session/connection.h b/repos/hello_tutorial/include/hello_session/connection.h index a21b0109fe..c5cc2cdddf 100644 --- a/repos/hello_tutorial/include/hello_session/connection.h +++ b/repos/hello_tutorial/include/hello_session/connection.h @@ -25,11 +25,11 @@ struct Hello::Connection : Genode::Connection, Session_client Connection(Genode::Env &env) : /* create session */ - Genode::Connection(env, session(env.parent(), - "ram_quota=6K, cap_quota=4")), - + Genode::Connection(env, Label(), + Ram_quota { 8*1024 }, Args()), /* initialize RPC interface */ - Session_client(cap()) { } + Session_client(cap()) + { } }; #endif /* _INCLUDE__HELLO_SESSION__CONNECTION_H_ */ diff --git a/repos/hello_tutorial/include/hello_session/hello_session.h b/repos/hello_tutorial/include/hello_session/hello_session.h index 8ff65e2ea8..7dfa2f10bf 100644 --- a/repos/hello_tutorial/include/hello_session/hello_session.h +++ b/repos/hello_tutorial/include/hello_session/hello_session.h @@ -24,7 +24,7 @@ struct Hello::Session : Genode::Session { static const char *service_name() { return "Hello"; } - enum { CAP_QUOTA = 2 }; + enum { CAP_QUOTA = 4 }; virtual void say_hello() = 0; virtual int add(int a, int b) = 0; diff --git a/repos/libports/src/lib/libc/internal/clone_session.h b/repos/libports/src/lib/libc/internal/clone_session.h index c390822f4e..074d0c307f 100644 --- a/repos/libports/src/lib/libc/internal/clone_session.h +++ b/repos/libports/src/lib/libc/internal/clone_session.h @@ -57,10 +57,7 @@ struct Libc::Clone_connection : Connection, Clone_connection(Genode::Env &env) : - Connection(env, - session(env.parent(), - "ram_quota=%ld, cap_quota=%ld", - RAM_QUOTA, CAP_QUOTA)), + Connection(env, Label(), Ram_quota { RAM_QUOTA }, Args()), Rpc_client(cap()), _buffer(env.rm(), call()) { } diff --git a/repos/os/include/audio_in_session/connection.h b/repos/os/include/audio_in_session/connection.h index 26b48aa8c3..4893c80d05 100644 --- a/repos/os/include/audio_in_session/connection.h +++ b/repos/os/include/audio_in_session/connection.h @@ -23,17 +23,6 @@ namespace Audio_in { struct Connection; } struct Audio_in::Connection : Genode::Connection, Audio_in::Session_client { - /** - * Issue session request - * - * \noapi - */ - Genode::Capability _session(Genode::Parent &parent, char const *channel) - { - return session(parent, "ram_quota=%ld, cap_quota=%ld, channel=\"%s\"", - 10*1024 + sizeof(Stream), CAP_QUOTA, channel); - } - /** * Constructor * @@ -43,7 +32,9 @@ struct Audio_in::Connection : Genode::Connection, Audio_in::Session_cli */ Connection(Genode::Env &env, char const *channel, bool progress_signal = false) : - Genode::Connection(env, _session(env.parent(), channel)), + Genode::Connection(env, Label(), + Ram_quota { 10*1024 + sizeof(Stream) }, + Args("channel=\"", channel, "\"")), Session_client(env.rm(), cap(), progress_signal) { } }; diff --git a/repos/os/include/audio_out_session/connection.h b/repos/os/include/audio_out_session/connection.h index 9c11a7c96a..32589464b4 100644 --- a/repos/os/include/audio_out_session/connection.h +++ b/repos/os/include/audio_out_session/connection.h @@ -38,10 +38,9 @@ struct Audio_out::Connection : Genode::Connection, Audio_out::Session_c bool alloc_signal = true, bool progress_signal = false) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%ld, cap_quota=%ld, channel=\"%s\"", - 2*4096 + 2048 + sizeof(Stream), CAP_QUOTA, channel)), + Genode::Connection(env, Label(), + Ram_quota { 2*4096 + 2048 + sizeof(Stream) }, + Args("channel=\"", channel, "\"")), Session_client(env.rm(), cap(), alloc_signal, progress_signal) { } }; diff --git a/repos/os/include/block_session/connection.h b/repos/os/include/block_session/connection.h index 5b6a9c9e07..d4478892d8 100644 --- a/repos/os/include/block_session/connection.h +++ b/repos/os/include/block_session/connection.h @@ -19,7 +19,7 @@ */ /* - * Copyright (C) 2019 Genode Labs GmbH + * Copyright (C) 2019-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -233,12 +233,11 @@ struct Block::Connection : Genode::Connection, Session_client Connection(Genode::Env &env, Genode::Range_allocator *tx_block_alloc, Genode::size_t tx_buf_size = 128*1024, - const char *label = "") + Label const &label = Label()) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"", - 14*1024 + tx_buf_size, CAP_QUOTA, tx_buf_size, label)), + Genode::Connection(env, label, + Ram_quota { 14*1024 + tx_buf_size }, + Args("tx_buf_size=", tx_buf_size)), Session_client(cap(), *tx_block_alloc, env.rm()), _max_block_count(_init_max_block_count(_tx.source()->bulk_buffer_size())) { } diff --git a/repos/os/include/capture_session/connection.h b/repos/os/include/capture_session/connection.h index 5123702cdb..975cc9e9bc 100644 --- a/repos/os/include/capture_session/connection.h +++ b/repos/os/include/capture_session/connection.h @@ -26,10 +26,6 @@ namespace Capture { class Connection; } class Capture::Connection : public Genode::Connection, public Session_client { - public: - - enum { RAM_QUOTA = 36*1024UL }; - private: size_t _session_quota = 0; @@ -39,12 +35,10 @@ class Capture::Connection : public Genode::Connection, /** * Constructor */ - Connection(Genode::Env &env, char const *label = "") + Connection(Genode::Env &env, Label const &label = Label()) : - Genode::Connection( - env, session(env.parent(), - "ram_quota=%u, cap_quota=%u, label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, label)), + Genode::Connection(env, label, + Ram_quota { 36*1024 }, Args()), Session_client(cap()) { } diff --git a/repos/os/include/event_session/connection.h b/repos/os/include/event_session/connection.h index 664185f69a..9623bfa04f 100644 --- a/repos/os/include/event_session/connection.h +++ b/repos/os/include/event_session/connection.h @@ -19,19 +19,12 @@ namespace Event { struct Connection; } + struct Event::Connection : Genode::Connection, Session_client { - enum { RAM_QUOTA = 18*1024UL }; - - /** - * Constructor - */ - Connection(Genode::Env &env, char const *label = "") + Connection(Genode::Env &env, Label const &label = Label()) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%u, cap_quota=%u, label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, label)), + Genode::Connection(env, label, Ram_quota { 18*1024 }, Args()), Session_client(env.rm(), cap()) { } }; diff --git a/repos/os/include/file_system_session/connection.h b/repos/os/include/file_system_session/connection.h index 8b7ea53f83..6ddf61d816 100644 --- a/repos/os/include/file_system_session/connection.h +++ b/repos/os/include/file_system_session/connection.h @@ -66,23 +66,16 @@ struct File_system::Connection : Genode::Connection, Session_client */ Connection(Genode::Env &env, Genode::Range_allocator &tx_block_alloc, - char const *label = "", - char const *root = "/", + Label const &label = Label(), + char const *root = "/", bool writeable = true, size_t tx_buf_size = DEFAULT_TX_BUF_SIZE) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%ld, " - "cap_quota=%ld, " - "tx_buf_size=%ld, " - "label=\"%s\", " - "root=\"%s\", " - "writeable=%d", - 8*1024*sizeof(long) + tx_buf_size, - CAP_QUOTA, - tx_buf_size, - label, root, writeable)), + Genode::Connection(env, label, + Ram_quota { 8*1024*sizeof(long) + tx_buf_size }, + Args("root=\"", root, "\", " + "writeable=", writeable, ", " + "tx_buf_size=", tx_buf_size)), Session_client(cap(), tx_block_alloc, env.rm()) { } diff --git a/repos/os/include/framebuffer_session/connection.h b/repos/os/include/framebuffer_session/connection.h index 17fe028fbb..6dfd1ed1d6 100644 --- a/repos/os/include/framebuffer_session/connection.h +++ b/repos/os/include/framebuffer_session/connection.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2008-2017 Genode Labs GmbH + * Copyright (C) 2008-2023 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU Affero General Public License version 3. @@ -15,62 +15,29 @@ #define _INCLUDE__FRAMEBUFFER_SESSION__CONNECTION_H_ #include -#include #include namespace Framebuffer { class Connection; } -class Framebuffer::Connection : public Genode::Connection, - public Session_client +struct Framebuffer::Connection : Genode::Connection, Session_client { - public: - - enum { RAM_QUOTA = 8*1024UL }; - - private: - - /** - * Create session and return typed session capability - */ - Session_capability _connect(Genode::Parent &parent, Area area) - { - using namespace Genode; - - enum { ARGBUF_SIZE = 128 }; - char argbuf[ARGBUF_SIZE]; - argbuf[0] = 0; - - /* donate ram and cap quota for storing server-side meta data */ - Arg_string::set_arg(argbuf, sizeof(argbuf), "ram_quota", RAM_QUOTA); - Arg_string::set_arg(argbuf, sizeof(argbuf), "cap_quota", CAP_QUOTA); - - /* set optional session-constructor arguments */ - if (area.w()) - Arg_string::set_arg(argbuf, sizeof(argbuf), "fb_width", area.w()); - if (area.h()) - Arg_string::set_arg(argbuf, sizeof(argbuf), "fb_height", area.h()); - - return session(parent, argbuf); - } - - public: - - /** - * Constructor - * - * \param mode desired size and pixel format - * - * The specified values are not enforced. After creating the - * session, you should validate the actual frame-buffer attributes - * by calling the 'info' method of the frame-buffer interface. - */ - Connection(Genode::Env &env, Framebuffer::Mode mode) - : - Genode::Connection(env, _connect(env.parent(), - mode.area)), - Session_client(cap()) - { } + /** + * Constructor + * + * \param mode desired size and pixel format + * + * The specified values are not enforced. After creating the + * session, you should validate the actual frame-buffer attributes + * by calling the 'info' method of the frame-buffer interface. + */ + Connection(Genode::Env &env, Framebuffer::Mode mode) + : + Genode::Connection(env, Label(), Ram_quota { 8*1024 }, + Args("fb_width=", mode.area.w(), ", " + "fb_height=", mode.area.h())), + Session_client(cap()) + { } }; #endif /* _INCLUDE__FRAMEBUFFER_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/gpio_session/connection.h b/repos/os/include/gpio_session/connection.h index ea006d5dca..f7a36bf711 100644 --- a/repos/os/include/gpio_session/connection.h +++ b/repos/os/include/gpio_session/connection.h @@ -21,16 +21,13 @@ namespace Gpio { struct Connection; } + struct Gpio::Connection : Genode::Connection, Session_client { - /** - * Constructor - */ Connection(Genode::Env &env, unsigned long gpio_pin) : - Genode::Connection(env, session(env.parent(), - "ram_quota=8K, cap_quota=%ld, gpio=%ld", - CAP_QUOTA, gpio_pin)), + Genode::Connection(env, Label(), Ram_quota { 8*1024 }, + Args("gpio=", gpio_pin)), Session_client(cap()) { } }; diff --git a/repos/os/include/gpu_session/connection.h b/repos/os/include/gpu_session/connection.h index 1f5645ef09..747724ab65 100644 --- a/repos/os/include/gpu_session/connection.h +++ b/repos/os/include/gpu_session/connection.h @@ -21,6 +21,7 @@ namespace Gpu { struct Connection; } + struct Gpu::Connection : Genode::Connection, Session_client { /** @@ -30,29 +31,16 @@ struct Gpu::Connection : Genode::Connection, Session_client */ Genode::Attached_dataspace _info_dataspace; - /** - * Issue session request - * - * \noapi - */ - Genode::Capability _session(Genode::Parent &parent, - char const *label, Genode::size_t quota) - { - return session(parent, "ram_quota=%ld, cap_quota=%ld, label=\"%s\"", - quota, CAP_QUOTA, label); - } - /** * Constructor * - * \param quota initial amount of quota used for allocating Gpu - * memory + * \param quota initial amount of quota used for allocating GPU memory */ - Connection(Genode::Env &env, - Genode::size_t quota = Session::REQUIRED_QUOTA, - const char *label = "") + Connection(Genode::Env &env, + Genode::size_t quota = Session::REQUIRED_QUOTA, + Label const &label = Label()) : - Genode::Connection(env, _session(env.parent(), label, quota)), + Genode::Connection(env, label, Ram_quota { quota }, Args()), Session_client(cap()), _info_dataspace(env.rm(), info_dataspace()) { } diff --git a/repos/os/include/gui_session/connection.h b/repos/os/include/gui_session/connection.h index 91ee7ec922..289a9e38b3 100644 --- a/repos/os/include/gui_session/connection.h +++ b/repos/os/include/gui_session/connection.h @@ -17,7 +17,6 @@ #include #include #include -#include #include namespace Gui { class Connection; } @@ -26,47 +25,21 @@ namespace Gui { class Connection; } class Gui::Connection : public Genode::Connection, public Session_client { - public: - - enum { RAM_QUOTA = 36*1024UL }; - private: Framebuffer::Session_client _framebuffer; Input::Session_client _input; Genode::size_t _session_quota = 0; - /** - * Create session and return typed session capability - */ - Session_capability _connect(Genode::Parent &parent, char const *label) - { - enum { ARGBUF_SIZE = 128 }; - char argbuf[ARGBUF_SIZE]; - argbuf[0] = 0; - - if (Genode::strlen(label) > 0) - Genode::snprintf(argbuf, sizeof(argbuf), "label=\"%s\"", label); - - /* - * Declare ram-quota donation - */ - using Genode::Arg_string; - Arg_string::set_arg(argbuf, sizeof(argbuf), "ram_quota", RAM_QUOTA); - Arg_string::set_arg(argbuf, sizeof(argbuf), "cap_quota", CAP_QUOTA); - - return session(parent, argbuf); - } - public: /** * Constructor */ - Connection(Genode::Env &env, char const *label = "") + Connection(Genode::Env &env, Label const &label = Label()) : /* establish nitpicker session */ - Genode::Connection(env, _connect(env.parent(), label)), + Genode::Connection(env, label, Ram_quota { 36*1024 }, Args()), Session_client(env.rm(), cap()), /* request frame-buffer and input sub sessions */ diff --git a/repos/os/include/i2c_session/connection.h b/repos/os/include/i2c_session/connection.h index 911546fcb4..938e5d3869 100644 --- a/repos/os/include/i2c_session/connection.h +++ b/repos/os/include/i2c_session/connection.h @@ -23,9 +23,9 @@ namespace I2c { struct Connection; } struct I2c::Connection : Genode::Connection, I2c::Session_client { - Connection(Genode::Env &env, char const *label = "") + Connection(Genode::Env &env, Label const &label = Label()) : - Genode::Connection(env, session(env.parent(), "ram_quota=8K, label=%s", label)), + Genode::Connection(env, label, Ram_quota { 8*1024 }, Args()), Session_client(cap()) { } diff --git a/repos/os/include/i2c_session/i2c_session.h b/repos/os/include/i2c_session/i2c_session.h index 7d8d3c2356..da3362a846 100644 --- a/repos/os/include/i2c_session/i2c_session.h +++ b/repos/os/include/i2c_session/i2c_session.h @@ -34,11 +34,6 @@ struct I2c::Session : public Genode::Session enum { CAP_QUOTA = 2 }; - - /*************** - ** Exception ** - ***************/ - /** * Exception thrown in case of a bus error * diff --git a/repos/os/include/input_session/connection.h b/repos/os/include/input_session/connection.h index 57b6e549f3..80f55487c8 100644 --- a/repos/os/include/input_session/connection.h +++ b/repos/os/include/input_session/connection.h @@ -19,17 +19,12 @@ namespace Input { struct Connection; } + struct Input::Connection : Genode::Connection, Session_client { - /** - * Constructor - */ - Connection(Genode::Env &env, char const *label = "") + Connection(Genode::Env &env, Label const &label = Label()) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=18K, cap_quota=%u, label=\"%s\"", - CAP_QUOTA, label)), + Genode::Connection(env, label, Ram_quota { 18*1024 }, Args()), Session_client(env.rm(), cap()) { } }; diff --git a/repos/os/include/loader_session/connection.h b/repos/os/include/loader_session/connection.h index 42f80b61aa..5ab130b44f 100644 --- a/repos/os/include/loader_session/connection.h +++ b/repos/os/include/loader_session/connection.h @@ -23,17 +23,13 @@ namespace Loader { struct Connection; } struct Loader::Connection : Genode::Connection, Session_client { - /** - * Constructor - */ Connection(Genode::Env &env, Ram_quota ram_quota, Cap_quota cap_quota) : - Genode::Connection(env, session(env.parent(), - "ram_quota=%ld, cap_quota=%ld", - ram_quota.value, - CAP_QUOTA + cap_quota.value)), + Genode::Connection(env, Label(), ram_quota, Args()), Session_client(cap()) - { } + { + upgrade_caps(cap_quota.value); + } }; #endif /* _INCLUDE__LOADER_SESSION__CONNECTION_H_ */ diff --git a/repos/os/include/nic_session/connection.h b/repos/os/include/nic_session/connection.h index 3b8e9ebe79..3e8c333dd6 100644 --- a/repos/os/include/nic_session/connection.h +++ b/repos/os/include/nic_session/connection.h @@ -35,14 +35,13 @@ struct Nic::Connection : Genode::Connection, Session_client Genode::Range_allocator *tx_block_alloc, Genode::size_t tx_buf_size, Genode::size_t rx_buf_size, - char const *label = "") + Label const &label = Label()) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%ld, cap_quota=%ld, " - "tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"", - 32*1024*sizeof(long) + tx_buf_size + rx_buf_size, - CAP_QUOTA, tx_buf_size, rx_buf_size, label)), + Genode::Connection( + env, label, + Ram_quota { 32*1024*sizeof(long) + tx_buf_size + rx_buf_size }, + Args("tx_buf_size=", tx_buf_size, ", " + "rx_buf_size=", rx_buf_size)), Session_client(cap(), *tx_block_alloc, env.rm()) { } }; diff --git a/repos/os/include/pin_control_session/connection.h b/repos/os/include/pin_control_session/connection.h index 0806c2bf08..00477444bf 100644 --- a/repos/os/include/pin_control_session/connection.h +++ b/repos/os/include/pin_control_session/connection.h @@ -20,17 +20,13 @@ namespace Pin_control { struct Connection; } + struct Pin_control::Connection : private Genode::Connection, private Rpc_client { - enum { RAM_QUOTA = 8*1024UL }; - - Connection(Env &env, char const *label = "") + Connection(Env &env, Label const &label = Label()) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%u, cap_quota=%u, label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, label)), + Genode::Connection(env, label, Ram_quota { 8*1024 }, Args()), Rpc_client(cap()) { } diff --git a/repos/os/include/pin_state_session/connection.h b/repos/os/include/pin_state_session/connection.h index f9c4ef810c..e223123ffa 100644 --- a/repos/os/include/pin_state_session/connection.h +++ b/repos/os/include/pin_state_session/connection.h @@ -19,17 +19,13 @@ namespace Pin_state { struct Connection; } + struct Pin_state::Connection : private Genode::Connection, private Rpc_client { - enum { RAM_QUOTA = 8*1024UL }; - - Connection(Env &env, char const *label = "") + Connection(Env &env, Label const &label = Label()) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%u, cap_quota=%u, label=\"%s\"", - RAM_QUOTA, CAP_QUOTA, label)), + Genode::Connection(env, label, Ram_quota { 8*1024 }, Args()), Rpc_client(cap()) { } diff --git a/repos/os/include/platform_session/connection.h b/repos/os/include/platform_session/connection.h index a0e8a4f2b0..1f8ec60c8c 100644 --- a/repos/os/include/platform_session/connection.h +++ b/repos/os/include/platform_session/connection.h @@ -72,9 +72,7 @@ class Platform::Connection : public Genode::Connection, Connection(Env &env) : - Genode::Connection(env, session(env.parent(), - "ram_quota=%u, cap_quota=%u", - RAM_QUOTA, CAP_QUOTA)), + Genode::Connection(env, Label(), Ram_quota { 32*1024 }, Args()), Client(cap()), _env(env) { diff --git a/repos/os/include/platform_session/platform_session.h b/repos/os/include/platform_session/platform_session.h index 863764f9f0..700e72dc79 100644 --- a/repos/os/include/platform_session/platform_session.h +++ b/repos/os/include/platform_session/platform_session.h @@ -57,7 +57,7 @@ struct Platform::Session : Genode::Session */ static const char *service_name() { return "Platform"; } - enum { RAM_QUOTA = 32 * 1024, CAP_QUOTA = 6 }; + enum { CAP_QUOTA = 6 }; virtual ~Session() { } diff --git a/repos/os/include/report_session/connection.h b/repos/os/include/report_session/connection.h index aaac5380e9..0554dd19d9 100644 --- a/repos/os/include/report_session/connection.h +++ b/repos/os/include/report_session/connection.h @@ -22,16 +22,10 @@ namespace Report { struct Connection; } struct Report::Connection : Genode::Connection, Session_client { - enum { RAM_QUOTA = 10*1024 }; /* value used for 'Slave::Connection' */ - - Connection(Genode::Env &env, char const *label, size_t buffer_size = 4096) + Connection(Genode::Env &env, Label const &label, size_t buffer_size = 4096) : - Genode::Connection(env, - session(env.parent(), - "label=\"%s\", ram_quota=%ld, " - "cap_quota=%ld, buffer_size=%zd", - label, RAM_QUOTA + buffer_size, - CAP_QUOTA, buffer_size)), + Genode::Connection(env, label, Ram_quota { 10*1024 + buffer_size }, + Args("buffer_size=", buffer_size)), Session_client(cap()) { } }; diff --git a/repos/os/include/rtc_session/connection.h b/repos/os/include/rtc_session/connection.h index ef7827c5b9..fe53a5ccee 100644 --- a/repos/os/include/rtc_session/connection.h +++ b/repos/os/include/rtc_session/connection.h @@ -23,13 +23,9 @@ namespace Rtc { struct Connection; } struct Rtc::Connection : Genode::Connection, Session_client { - /** - * Constructor - */ - Connection(Genode::Env &env, char const *label = "") + Connection(Genode::Env &env, Label const &label = Label()) : - Genode::Connection( - env, session(env.parent(), "ram_quota=8K, label=\"%s\"", label)), + Genode::Connection(env, label, Ram_quota { 8*1024 }, Args()), Session_client(cap()) { } }; diff --git a/repos/os/include/rtc_session/rtc_session.h b/repos/os/include/rtc_session/rtc_session.h index 64e096a3c4..968a2b0e3e 100644 --- a/repos/os/include/rtc_session/rtc_session.h +++ b/repos/os/include/rtc_session/rtc_session.h @@ -57,6 +57,7 @@ struct Rtc::Session : Genode::Session enum { CAP_QUOTA = 2 }; + /*********************** ** Session interface ** ***********************/ diff --git a/repos/os/include/terminal_session/connection.h b/repos/os/include/terminal_session/connection.h index acc27c64f6..d377e2b85d 100644 --- a/repos/os/include/terminal_session/connection.h +++ b/repos/os/include/terminal_session/connection.h @@ -44,14 +44,9 @@ struct Terminal::Connection : Genode::Connection, Session_client sig_rec.dissolve(&sig_ctx); } - /** - * Constructor - */ - Connection(Genode::Env &env, char const *label = "") + Connection(Genode::Env &env, Label const &label = Label()) : - Genode::Connection(env, session(env.parent(), - "ram_quota=%ld, cap_quota=%ld, label=\"%s\"", - 10*1024, CAP_QUOTA, label)), + Genode::Connection(env, label, Ram_quota { 10*1024 }, Args()), Session_client(env.rm(), cap()) { wait_for_connection(cap()); diff --git a/repos/os/include/uart_session/connection.h b/repos/os/include/uart_session/connection.h index 4ebf5a80fc..200f197311 100644 --- a/repos/os/include/uart_session/connection.h +++ b/repos/os/include/uart_session/connection.h @@ -22,12 +22,9 @@ namespace Uart { struct Connection; } struct Uart::Connection : Genode::Connection, Session_client { - /** - * Constructor - */ Connection(Genode::Env &env) : - Genode::Connection(env, session(env.parent(), "ram_quota=%ld", 2*4096)), + Genode::Connection(env, Label(), Ram_quota { 2*4096 }, Args()), Session_client(env.rm(), cap()) { Terminal::Connection::wait_for_connection(cap()); diff --git a/repos/os/include/uplink_session/connection.h b/repos/os/include/uplink_session/connection.h index 6165cb162a..67005a5bc7 100644 --- a/repos/os/include/uplink_session/connection.h +++ b/repos/os/include/uplink_session/connection.h @@ -38,21 +38,14 @@ struct Uplink::Connection : Genode::Connection, Session_client Genode::size_t tx_buf_size, Genode::size_t rx_buf_size, Net::Mac_address const &mac_address, - char const *label = "") + Label const &label = Label()) : Genode::Connection( - env, - session( - env.parent(), - "ram_quota=%ld, cap_quota=%ld, mac_address=\"%s\", " - "tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"", - 32 * 1024 * sizeof(long) + tx_buf_size + rx_buf_size, - CAP_QUOTA, - Genode::String<18>(mac_address).string(), - tx_buf_size, - rx_buf_size, - label)), - + env, label, + Ram_quota { 32*1024*sizeof(long) + tx_buf_size + rx_buf_size }, + Args("mac_address=\"", mac_address, "\", " + "tx_buf_size=", tx_buf_size, ", " + "rx_buf_size=", rx_buf_size)), Session_client(cap(), *tx_block_alloc, env.rm()) { } }; diff --git a/repos/os/include/usb_session/connection.h b/repos/os/include/usb_session/connection.h index d10105dd30..6e010d9c81 100644 --- a/repos/os/include/usb_session/connection.h +++ b/repos/os/include/usb_session/connection.h @@ -22,20 +22,15 @@ namespace Usb { struct Connection; } struct Usb::Connection : Genode::Connection, Session_client { - /** - * Constructor - */ Connection(Genode::Env &env, Genode::Range_allocator *tx_block_alloc, - char const *label = "", - Genode::size_t tx_buf_size = 512 * 1024, + Label const &label = Label(), + Genode::size_t tx_buf_size = 512*1024, Genode::Signal_context_capability sigh_state_changed = Genode::Signal_context_capability()) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%ld, cap_quota=%ld, tx_buf_size=%ld, label=\"%s\"", - 5 * 4096 + tx_buf_size, CAP_QUOTA, tx_buf_size, label)), + Genode::Connection(env, label, Ram_quota { 5*4096 + tx_buf_size }, + Args("tx_buf_size=", tx_buf_size)), Session_client(cap(), *tx_block_alloc, env.rm(), sigh_state_changed) { } }; diff --git a/repos/os/src/drivers/gpio/rpi/driver.h b/repos/os/src/drivers/gpio/rpi/driver.h index a68895fd8f..8db153129b 100644 --- a/repos/os/src/drivers/gpio/rpi/driver.h +++ b/repos/os/src/drivers/gpio/rpi/driver.h @@ -68,7 +68,7 @@ class Gpio::Rpi_driver : public Driver Rpi_driver(Genode::Env &env) : _reg(env, Rpi::GPIO_CONTROLLER_BASE, 0, Rpi::GPIO_CONTROLLER_SIZE), - _irq(env, IRQ), + _irq(env, unsigned(IRQ)), _dispatcher(env.ep(), *this, &Rpi_driver::_handle), _async(false) { diff --git a/repos/os/src/test/nic_stress/main.cc b/repos/os/src/test/nic_stress/main.cc index a8995a081a..59c84ac017 100644 --- a/repos/os/src/test/nic_stress/main.cc +++ b/repos/os/src/test/nic_stress/main.cc @@ -23,25 +23,20 @@ namespace Local { using namespace Genode; + struct Bad_args_nic; struct Construct_destruct_test; struct Main; } -struct Bad_args_nic : Genode::Connection +struct Local::Bad_args_nic : Connection { - Bad_args_nic(Genode::Env &env, - Genode::size_t ram_quota, - Genode::size_t cap_quota, - Genode::size_t tx_buf_size, - Genode::size_t rx_buf_size, - char const *label) + Bad_args_nic(Env &env, size_t ram_quota, size_t tx_buf_size, size_t rx_buf_size, + Session::Label const &label) : - Genode::Connection(env, - session(env.parent(), - "ram_quota=%ld, cap_quota=%ld, " - "tx_buf_size=%ld, rx_buf_size=%ld, label=\"%s\"", - ram_quota, cap_quota, tx_buf_size, rx_buf_size, label)) + Genode::Connection(env, label, Ram_quota { ram_quota }, + Args("tx_buf_size=", tx_buf_size, ", " + "rx_buf_size=", rx_buf_size)) { } }; @@ -81,7 +76,7 @@ struct Local::Construct_destruct_test unsigned const round) { _bad_args_nic.construct( - _env, 0, 0, BUF_SIZE, BUF_SIZE, "bad_args"); + _env, 0, BUF_SIZE, BUF_SIZE, "bad_args"); for (unsigned idx = 0; idx < _nr_of_sessions; idx++) { try { nic[idx].construct(_env, &_pkt_alloc, BUF_SIZE, BUF_SIZE); From 915adcd0ddbd89319877e39d249aff42bcbce075 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 6 Mar 2023 10:57:13 +0100 Subject: [PATCH 0368/1921] base: remove internal use of format strings Issue #2064 --- .../src/core/include/core_linux_syscalls.h | 3 +- .../src/core/include/resource_path.h | 16 +---- .../src/core/native_pd_component.cc | 50 +++++++-------- .../src/core/ram_dataspace_support.cc | 12 ++-- .../core/spec/linux/dataspace_component.cc | 18 ++---- .../include/linux_dataspace/linux_dataspace.h | 7 +-- repos/base-linux/src/lib/base/thread_linux.cc | 1 - .../src/lib/syscall/linux_syscalls.h | 9 --- repos/base-nova/src/test/platform/main.cc | 22 +++---- .../src/include/base/internal/assert.h | 6 +- repos/base/include/base/connection.h | 1 + repos/base/include/base/session_label.h | 4 +- repos/base/include/deprecated/env.h | 1 - repos/base/include/util/arg_string.h | 7 +-- repos/base/include/util/xml_generator.h | 9 +-- repos/base/run/smp.run | 4 +- repos/base/src/core/main.cc | 1 - repos/base/src/lib/base/thread.cc | 3 +- repos/base/src/test/smp/main.cc | 62 ++++++++++++------- repos/base/src/test/thread/main.cc | 9 +-- 20 files changed, 101 insertions(+), 144 deletions(-) diff --git a/repos/base-linux/src/core/include/core_linux_syscalls.h b/repos/base-linux/src/core/include/core_linux_syscalls.h index 1b7adb6f3f..8966cf367a 100644 --- a/repos/base-linux/src/core/include/core_linux_syscalls.h +++ b/repos/base-linux/src/core/include/core_linux_syscalls.h @@ -117,8 +117,7 @@ inline int lx_ioctl_irq(int fd, int irq) ** Process creation and destruction ** **************************************/ -inline int lx_execve(const char *filename, char *const argv[], - char *const envp[]) +inline int lx_execve(char const *filename, char const *argv[], char const *envp[]) { return (int)lx_syscall(SYS_execve, filename, argv, envp); } diff --git a/repos/base-linux/src/core/include/resource_path.h b/repos/base-linux/src/core/include/resource_path.h index 6e73aa77fd..caa09139bd 100644 --- a/repos/base-linux/src/core/include/resource_path.h +++ b/repos/base-linux/src/core/include/resource_path.h @@ -18,7 +18,7 @@ #include /* Genode includes */ -#include +#include /** * Return resource path for Genode @@ -27,18 +27,8 @@ */ static inline char const *resource_path() { - struct Resource_path - { - char string[32]; - - Resource_path() - { - Genode::snprintf(string, sizeof(string), "/tmp/genode-%d", lx_getuid()); - } - }; - - static Resource_path path; - return path.string; + static Genode::String<32> path("/tmp/genode-", lx_getuid()); + return path.string(); } #endif /* _CORE__INCLUDE__RESOURCE_PATH_H_ */ diff --git a/repos/base-linux/src/core/native_pd_component.cc b/repos/base-linux/src/core/native_pd_component.cc index b16511a23f..5f0bdd2958 100644 --- a/repos/base-linux/src/core/native_pd_component.cc +++ b/repos/base-linux/src/core/native_pd_component.cc @@ -13,7 +13,6 @@ /* Genode includes */ #include -#include #include /* core includes */ @@ -42,8 +41,8 @@ struct Execve_args_and_stack struct Args { char const *filename; - char **argv; - char **envp; + char const **argv; + char const **envp; Lx_sd parent_sd; }; @@ -111,8 +110,7 @@ void Native_pd_component::_start(Dataspace_component &ds) const char *tmp_filename = "temporary_executable_elf_dataspace_file_for_execve"; /* we need 's' on stack to make it an lvalue with an lvalue member we use the pointer to */ - Linux_dataspace::Filename s = ds.fname(); - const char *filename = s.buf; + Linux_dataspace::Filename filename = ds.fname(); /* * In order to be executable via 'execve', a program must be represented as @@ -121,11 +119,11 @@ void Native_pd_component::_start(Dataspace_component &ds) * the dataspace content into a temporary file whose path is passed to * 'execve()'. */ - if (Genode::strcmp(filename, "") == 0) { + if (filename == "") { filename = tmp_filename; - int tmp_binary_fd = lx_open(filename, O_CREAT | O_EXCL | O_WRONLY, S_IRWXU); + int tmp_binary_fd = lx_open(filename.string(), O_CREAT | O_EXCL | O_WRONLY, S_IRWXU); if (tmp_binary_fd < 0) { error("Could not create file '", filename, "'"); return; /* XXX reflect error to client */ @@ -141,30 +139,24 @@ void Native_pd_component::_start(Dataspace_component &ds) } /* pass parent capability as environment variable to the child */ - enum { ENV_STR_LEN = 256 }; - static char envbuf[5][ENV_STR_LEN]; - Genode::snprintf(envbuf[1], ENV_STR_LEN, "parent_local_name=%lu", - _pd_session._parent.local_name()); - Genode::snprintf(envbuf[2], ENV_STR_LEN, "DISPLAY=%s", - get_env("DISPLAY")); - Genode::snprintf(envbuf[3], ENV_STR_LEN, "HOME=%s", - get_env("HOME")); - Genode::snprintf(envbuf[4], ENV_STR_LEN, "LD_LIBRARY_PATH=%s", - get_env("LD_LIBRARY_PATH")); - - char *env[] = { &envbuf[0][0], &envbuf[1][0], &envbuf[2][0], - &envbuf[3][0], &envbuf[4][0], 0 }; + using Env_string = String<256>; + static Env_string env_strings[] { + { "parent_local_name=", _pd_session._parent.local_name() }, + { "DISPLAY=", get_env("DISPLAY") }, + { "HOME=", get_env("HOME") }, + { "LD_LIBRARY_PATH=", get_env("LD_LIBRARY_PATH") }, + }; + char const *env[] = { env_strings[0].string(), env_strings[1].string(), + env_strings[2].string(), env_strings[3].string(), + nullptr }; /* prefix name of Linux program (helps killing some zombies) */ - char const *prefix = "[Genode] "; - char pname_buf[sizeof(_pd_session._label) + sizeof(prefix)]; - snprintf(pname_buf, sizeof(pname_buf), "%s%s", prefix, _pd_session._label.string()); - char *argv_buf[2]; - argv_buf[0] = pname_buf; - argv_buf[1] = 0; + using Pname = String; + Pname const pname("[Genode] ", _pd_session._label); + char const *argv_buf[] { pname.string(), nullptr }; _execve_args_and_stack().args = Execve_args_and_stack::Args { - .filename = filename, + .filename = filename.string(), .argv = argv_buf, .envp = env, .parent_sd = Capability_space::ipc_cap_data(_pd_session._parent).dst.socket @@ -173,8 +165,8 @@ void Native_pd_component::_start(Dataspace_component &ds) _pid = lx_create_process((int (*)())_exec_child, _execve_args_and_stack().initial_sp()); - if (Genode::strcmp(filename, tmp_filename) == 0) - lx_unlink(filename); + if (filename == tmp_filename) + lx_unlink(filename.string()); } diff --git a/repos/base-linux/src/core/ram_dataspace_support.cc b/repos/base-linux/src/core/ram_dataspace_support.cc index 8ff4103c6e..433811a9e9 100644 --- a/repos/base-linux/src/core/ram_dataspace_support.cc +++ b/repos/base-linux/src/core/ram_dataspace_support.cc @@ -14,9 +14,6 @@ /* glibc includes */ #include -/* Genode includes */ -#include - /* local includes */ #include #include @@ -35,12 +32,11 @@ static int ram_ds_cnt = 0; /* counter for creating unique dataspace IDs */ void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &ds) { - char fname[Linux_dataspace::FNAME_LEN]; + Linux_dataspace::Filename const fname(resource_path(), "/ds-", ram_ds_cnt++); /* create file using a unique file name in the resource path */ - snprintf(fname, sizeof(fname), "%s/ds-%d", resource_path(), ram_ds_cnt++); - lx_unlink(fname); - int const fd = lx_open(fname, O_CREAT|O_RDWR|O_TRUNC|LX_O_CLOEXEC, S_IRWXU); + lx_unlink(fname.string()); + int const fd = lx_open(fname.string(), O_CREAT|O_RDWR|O_TRUNC|LX_O_CLOEXEC, S_IRWXU); lx_ftruncate(fd, ds.size()); /* remember file descriptor in dataspace component object */ @@ -52,7 +48,7 @@ void Ram_dataspace_factory::_export_ram_ds(Dataspace_component &ds) * gone (i.e., an open file descriptor referring to the file). A process * w/o the right file descriptor won't be able to open and access the file. */ - lx_unlink(fname); + lx_unlink(fname.string()); } diff --git a/repos/base-linux/src/core/spec/linux/dataspace_component.cc b/repos/base-linux/src/core/spec/linux/dataspace_component.cc index 54f50407ee..0abfb74b5e 100644 --- a/repos/base-linux/src/core/spec/linux/dataspace_component.cc +++ b/repos/base-linux/src/core/spec/linux/dataspace_component.cc @@ -21,13 +21,10 @@ /* Genode includes */ #include -#include -#include -#include #include /* local includes */ -#include "dataspace_component.h" +#include using namespace Core; @@ -35,17 +32,15 @@ using namespace Core; Linux_dataspace::Filename Dataspace_component::_file_name(const char *args) { Session_label const label = label_from_args(args); - Linux_dataspace::Filename fname; - - if (label.last_element().length() > sizeof(fname.buf)) { + if (label.last_element().length() > Linux_dataspace::Filename::capacity()) { error("file name too long: ", label.last_element()); throw Service_denied(); } - copy_cstring(fname.buf, label.last_element().string(), sizeof(fname.buf)); + Linux_dataspace::Filename const fname = label.last_element(); /* only files inside the current working directory are allowed */ - for (const char *c = fname.buf; *c; ++c) + for (const char *c = fname.string(); *c; ++c) if (*c == '/') throw Service_denied(); return fname; @@ -55,7 +50,7 @@ Linux_dataspace::Filename Dataspace_component::_file_name(const char *args) size_t Dataspace_component::_file_size() { Genode::uint64_t size = 0; - if (lx_stat_size(_fname.buf, size) < 0) + if (lx_stat_size(_fname.string(), size) < 0) throw Service_denied(); return align_addr((size_t)size, 12); @@ -67,7 +62,7 @@ Dataspace_component::Dataspace_component(const char *args) _fname(_file_name(args)), _size(_file_size()), _addr(0), - _cap(_fd_to_cap(lx_open(_fname.buf, O_RDONLY | LX_O_CLOEXEC, S_IRUSR | S_IXUSR))), + _cap(_fd_to_cap(lx_open(_fname.string(), O_RDONLY | LX_O_CLOEXEC, S_IRUSR | S_IXUSR))), _writeable(false), _owner(0) { } @@ -79,5 +74,4 @@ Dataspace_component::Dataspace_component(size_t size, addr_t, addr_t phys_addr, _size(size), _addr(phys_addr), _cap(), _writeable(false), _owner(_owner) { warning("Should only be used for IOMEM and not within Linux."); - _fname.buf[0] = 0; } diff --git a/repos/base-linux/src/include/linux_dataspace/linux_dataspace.h b/repos/base-linux/src/include/linux_dataspace/linux_dataspace.h index 8803c3afda..c6940f25bb 100644 --- a/repos/base-linux/src/include/linux_dataspace/linux_dataspace.h +++ b/repos/base-linux/src/include/linux_dataspace/linux_dataspace.h @@ -16,16 +16,15 @@ #include #include -#include #include +#include namespace Genode { struct Linux_dataspace; } struct Genode::Linux_dataspace : Dataspace { - enum { FNAME_LEN = 64 }; - struct Filename { char buf[FNAME_LEN]; }; + using Filename = String<64>; virtual ~Linux_dataspace() { } @@ -42,11 +41,11 @@ struct Genode::Linux_dataspace : Dataspace */ virtual Untyped_capability fd() = 0; + /********************* ** RPC declaration ** *********************/ - GENODE_RPC(Rpc_fname, Filename, fname); GENODE_RPC(Rpc_fd, Untyped_capability, fd); GENODE_RPC_INTERFACE_INHERIT(Dataspace, Rpc_fname, Rpc_fd); diff --git a/repos/base-linux/src/lib/base/thread_linux.cc b/repos/base-linux/src/lib/base/thread_linux.cc index 5db0888e5e..6a8d5e8f16 100644 --- a/repos/base-linux/src/lib/base/thread_linux.cc +++ b/repos/base-linux/src/lib/base/thread_linux.cc @@ -15,7 +15,6 @@ /* Genode includes */ #include #include -#include #include #include #include diff --git a/repos/base-linux/src/lib/syscall/linux_syscalls.h b/repos/base-linux/src/lib/syscall/linux_syscalls.h index 8c7e96da23..0cf1bd8e41 100644 --- a/repos/base-linux/src/lib/syscall/linux_syscalls.h +++ b/repos/base-linux/src/lib/syscall/linux_syscalls.h @@ -36,7 +36,6 @@ /* Genode includes */ #include -#include #include #include @@ -77,14 +76,6 @@ extern "C" void wait_for_continue(void); -#define PRAW(fmt, ...) \ - do { \ - char str[128]; \ - Genode::snprintf(str, sizeof(str), \ - ESC_ERR fmt ESC_END "\n", ##__VA_ARGS__); \ - Genode::raw(Genode::Cstring(str)); \ - } while (0) - /********************************************************* ** System-call bindings implemented in syscall library ** diff --git a/repos/base-nova/src/test/platform/main.cc b/repos/base-nova/src/test/platform/main.cc index e8748b667a..debc793f7c 100644 --- a/repos/base-nova/src/test/platform/main.cc +++ b/repos/base-nova/src/test/platform/main.cc @@ -15,9 +15,7 @@ #include #include #include -#include #include - #include #include #include @@ -625,24 +623,18 @@ class Greedy : public Genode::Thread { } }; -void check(uint8_t res, const char *format, ...) + +template +void check(uint8_t res, ARGS &&... args) { - static char buf[128]; - - va_list list; - va_start(list, format); - - String_console sc(buf, sizeof(buf)); - sc.vprintf(format, list); - - va_end(list); + String<128> msg(args...); if (res == Nova::NOVA_OK) { - error("res=", res, " ", Cstring(buf), " - TEST FAILED"); + error("res=", res, " ", msg, " - TEST FAILED"); failed++; } else - log("res=", res, " ", Cstring(buf)); + log("res=", res, " ", msg); } struct Main @@ -708,7 +700,7 @@ Main::Main(Env &env) : env(env) for (unsigned i = 0; i < (1U << Nova::NUM_INITIAL_PT_LOG2); i++) { addr_t sel_exc = myself->native_thread().exc_pt_sel + i; res = Nova::pt_ctrl(sel_exc, 0xbadbad); - check(res, "pt_ctrl %2u", i); + check(res, "pt_ctrl ", i); } /* test PAT kernel feature */ diff --git a/repos/base-sel4/src/include/base/internal/assert.h b/repos/base-sel4/src/include/base/internal/assert.h index 17c1bbbf7d..f6e86e541c 100644 --- a/repos/base-sel4/src/include/base/internal/assert.h +++ b/repos/base-sel4/src/include/base/internal/assert.h @@ -18,18 +18,16 @@ #define _INCLUDE__BASE__INTERNAL__ASSERT_H_ /* Genode includes */ -#include +#include /* base-internal includes */ #include #define ASSERT(e) \ do { if (!(e)) { \ - char line_buf[32]; \ - Genode::snprintf(line_buf, sizeof(line_buf), "%d", __LINE__); \ kernel_debugger_outstring("Assertion failed: " #e "\n"); \ kernel_debugger_outstring(__FILE__ ":"); \ - kernel_debugger_outstring(line_buf); \ + kernel_debugger_outstring(Genode::String<32>(__LINE__).string()); \ kernel_debugger_panic("\n"); \ } \ } while(0) diff --git a/repos/base/include/base/connection.h b/repos/base/include/base/connection.h index 89ec29df93..fcf855e2b2 100644 --- a/repos/base/include/base/connection.h +++ b/repos/base/include/base/connection.h @@ -18,6 +18,7 @@ #include #include #include +#include /* deprecated */ namespace Genode { diff --git a/repos/base/include/base/session_label.h b/repos/base/include/base/session_label.h index e5728ed7a7..e23b3b2928 100644 --- a/repos/base/include/base/session_label.h +++ b/repos/base/include/base/session_label.h @@ -15,7 +15,6 @@ #ifndef _INCLUDE__BASE__SESSION_LABEL_H_ #define _INCLUDE__BASE__SESSION_LABEL_H_ -#include #include #include @@ -40,8 +39,7 @@ struct Genode::Session_label : String<160> * copy constructors as candidate. */ template - Session_label(Genode::String const &other) - : Genode::String<160>(other) { } + Session_label(Genode::String const &other) : Genode::String<160>(other) { } Session_label last_element() const { diff --git a/repos/base/include/deprecated/env.h b/repos/base/include/deprecated/env.h index 4164e40c2c..b96f55cdb9 100644 --- a/repos/base/include/deprecated/env.h +++ b/repos/base/include/deprecated/env.h @@ -24,7 +24,6 @@ #include #include #include -#include namespace Genode { diff --git a/repos/base/include/util/arg_string.h b/repos/base/include/util/arg_string.h index 907134492e..1522638bb2 100644 --- a/repos/base/include/util/arg_string.h +++ b/repos/base/include/util/arg_string.h @@ -29,7 +29,6 @@ #include #include -#include namespace Genode { @@ -329,10 +328,8 @@ class Genode::Arg_string static bool set_arg(char *args, size_t args_len, const char *key, int value) { - enum { STRING_LONG_MAX = 32 }; - char buf[STRING_LONG_MAX]; - snprintf(buf, sizeof(buf), "%d", value); - return remove_arg(args, key) && add_arg(args, args_len, key, buf); + return remove_arg(args, key) + && add_arg(args, args_len, key, String<16>(value).string()); } /** diff --git a/repos/base/include/util/xml_generator.h b/repos/base/include/util/xml_generator.h index 16e1926623..3ef833a94a 100644 --- a/repos/base/include/util/xml_generator.h +++ b/repos/base/include/util/xml_generator.h @@ -16,7 +16,6 @@ #include #include -#include namespace Genode { class Xml_generator; } @@ -336,9 +335,7 @@ class Genode::Xml_generator void attribute(char const *name, long long value) { - char buf[64]; - Genode::snprintf(buf, sizeof(buf), "%lld", value); - _curr_node->insert_attribute(name, buf); + _curr_node->insert_attribute(name, String<64>(value).string()); } void attribute(char const *name, long value) @@ -353,9 +350,7 @@ class Genode::Xml_generator void attribute(char const *name, unsigned long long value) { - char buf[64]; - Genode::snprintf(buf, sizeof(buf), "%llu", value); - _curr_node->insert_attribute(name, buf); + _curr_node->insert_attribute(name, String<64>(value).string()); } void attribute(char const *name, unsigned long value) diff --git a/repos/base/run/smp.run b/repos/base/run/smp.run index 99bfed3c34..30a93051b6 100644 --- a/repos/base/run/smp.run +++ b/repos/base/run/smp.run @@ -100,8 +100,8 @@ grep_output {\[init -\> test-smp\] Affinity: Round} set rounds "10" set good_string {} for {set r 0} {$r <= $rounds} {incr r} { - append good_string {[init -> test-smp] Affinity: Round } - append good_string [format "%02d" $r] + append good_string {[init -> test-smp] Affinity: Round } + append good_string [format "%2d" $r] append good_string ":" for {set i 0} {$i < $cpus} {incr i} { append good_string " A" diff --git a/repos/base/src/core/main.cc b/repos/base/src/core/main.cc index 2d1d15f250..1307e2e189 100644 --- a/repos/base/src/core/main.cc +++ b/repos/base/src/core/main.cc @@ -12,7 +12,6 @@ */ /* Genode includes */ -#include #include #include #include diff --git a/repos/base/src/lib/base/thread.cc b/repos/base/src/lib/base/thread.cc index b7ee561a44..b21ffb319d 100644 --- a/repos/base/src/lib/base/thread.cc +++ b/repos/base/src/lib/base/thread.cc @@ -18,7 +18,6 @@ #include #include #include -#include #include /* base-internal includes */ @@ -133,7 +132,7 @@ void Thread::_free_stack(Stack *stack) void Thread::name(char *dst, size_t dst_len) { - snprintf(dst, dst_len, "%s", _stack->name().string()); + copy_cstring(dst, name().string(), dst_len); } diff --git a/repos/base/src/test/smp/main.cc b/repos/base/src/test/smp/main.cc index 53ada8a743..b1096779fc 100644 --- a/repos/base/src/test/smp/main.cc +++ b/repos/base/src/test/smp/main.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -203,42 +204,59 @@ namespace Affinity_test { volatile uint64_t cnt = 0; unsigned round = 0; - char const text_cpu[] = "Affinity: CPU: "; - char const text_round[] = "Affinity: Round %2u: "; - char * output_buffer = new (heap) char [sizeof(text_cpu) + 3 * cpus.total()]; + static char const text_cpu[] = "Affinity: CPU: "; for (; round < 11;) { cnt++; /* try to get a life sign by the main thread from the remote threads */ if (cnt % COUNT_VALUE == 0) { - char * output = output_buffer; - snprintf(output, sizeof(text_cpu), text_cpu); - output += sizeof(text_cpu) - 1; - for (unsigned i = 0; i < cpus.total(); i++) { - snprintf(output, 4, "%2u ", i); - output += 3; - } - log(Cstring(output_buffer)); - output = output_buffer; - snprintf(output, sizeof(text_round), text_round, round); - output += sizeof(text_round) - 2; + struct Table_header + { + unsigned num_cpus; - for (unsigned i = 0; i < cpus.total(); i++) { - snprintf(output, 4, "%s ", - thread_cnt[i] == threads[i]->cnt ? " D" : " A"); - output += 3; + void print(Output &out) const + { + using Genode::print; + + print(out, text_cpu); + for (unsigned i = 0; i < num_cpus; i++) + print(out, Right_aligned(2, i), " "); + } + }; + + struct Table_entries + { + unsigned num_cpus; + unsigned round; + Spinning_thread **threads; + uint64_t *thread_cnt; + + void print(Output &out) const + { + using Genode::print; + + print(out, "Affinity: Round ", Right_aligned(2, round), ": "); + + for (unsigned i = 0; i < num_cpus; i++) + print(out, thread_cnt[i] == threads[i]->cnt ? " D " : " A "); + } + }; + + log(Table_header { .num_cpus = cpus.total() }); + log(Table_entries { .num_cpus = cpus.total(), + .round = round, + .threads = threads, + .thread_cnt = thread_cnt }); + + for (unsigned i = 0; i < cpus.total(); i++) thread_cnt[i] = threads[i]->cnt; - } - log(Cstring(output_buffer)); round ++; } } - destroy(heap, output_buffer); - for (unsigned i = 0; i < cpus.total(); i++) destroy(heap, threads[i]); destroy(heap, threads); diff --git a/repos/base/src/test/thread/main.cc b/repos/base/src/test/thread/main.cc index 786777b060..3d430dc916 100644 --- a/repos/base/src/test/thread/main.cc +++ b/repos/base/src/test/thread/main.cc @@ -25,6 +25,9 @@ #include #include +/* compiler includes */ +#include + using namespace Genode; @@ -194,7 +197,7 @@ struct Cpu_helper : Thread { Env &_env; - Cpu_helper(Env &env, const char * name, Cpu_session &cpu) + Cpu_helper(Env &env, Name const &name, Cpu_session &cpu) : Thread(env, name, STACK_SIZE, Thread::Location(), Thread::Weight(), cpu), _env(env) @@ -306,7 +309,6 @@ static void test_create_as_many_threads(Env &env) Thread::stack_virtual_size(); Cpu_helper * threads[max]; - static char thread_name[8]; Heap heap(env.ram(), env.rm()); @@ -314,8 +316,7 @@ static void test_create_as_many_threads(Env &env) try { for (; i < max; i++) { try { - snprintf(thread_name, sizeof(thread_name), "%u", i + 1); - threads[i] = new (heap) Cpu_helper(env, thread_name, env.cpu()); + threads[i] = new (heap) Cpu_helper(env, Thread::Name(i + 1), env.cpu()); threads[i]->start(); threads[i]->join(); } catch (Cpu_session::Thread_creation_failed) { From ecd0066e806741c39e72f7f274d5626dbe6ef1f3 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 6 Mar 2023 17:19:29 +0100 Subject: [PATCH 0369/1921] os: remove use of format strings Issue #2064 --- repos/os/src/app/usb_report_filter/main.cc | 49 ++++++++------------- repos/os/src/drivers/acpi/acpi.cc | 4 +- repos/os/src/drivers/virtdev_rom/main.cc | 6 +-- repos/os/src/lib/vfs/file_system_factory.cc | 6 +-- repos/os/src/lib/vfs/rtc_file_system.h | 30 +++++++++++-- repos/os/src/server/terminal_log/main.cc | 13 ++++-- repos/os/src/test/clipboard/main.cc | 7 +-- repos/os/src/test/vfs_stress/main.cc | 24 +++++----- 8 files changed, 71 insertions(+), 68 deletions(-) diff --git a/repos/os/src/app/usb_report_filter/main.cc b/repos/os/src/app/usb_report_filter/main.cc index 0b3c4cf502..40a4890a47 100644 --- a/repos/os/src/app/usb_report_filter/main.cc +++ b/repos/os/src/app/usb_report_filter/main.cc @@ -29,7 +29,6 @@ namespace Usb_filter { using Genode::Xml_node; using Genode::Xml_generator; using Genode::Attached_rom_dataspace; - using Genode::snprintf; using Genode::error; using Genode::log; using Genode::warning; @@ -120,29 +119,30 @@ class Usb_filter::Device_registry (vendor == entry.vendor && product == entry.product); } + static void _gen_dev_attributes(Xml_generator &xml, Xml_node const &node) + { + auto copy_attr = [&] (auto name) + { + using Value = Genode::String<32>; + xml.attribute(name, node.attribute_value(name, Value())); + }; + + copy_attr("vendor_id"); + copy_attr("product_id"); + copy_attr("bus"); + copy_attr("dev"); + } + static void _gen_policy_entry(Xml_generator &xml, Xml_node &node, Entry const &, char const *label) { xml.node("policy", [&] { - char buf[MAX_LABEL_LEN + 16]; - unsigned const bus = _get_value(node, "bus"); unsigned const dev = _get_value(node, "dev"); - snprintf(buf, sizeof(buf), "%s -> usb-%d-%d", label, bus, dev); - xml.attribute("label", buf); + xml.attribute("label", Label(label, " -> usb-", bus, "-", dev)); - snprintf(buf, sizeof(buf), "0x%4x", _get_value(node, "vendor_id")); - xml.attribute("vendor_id", buf); - - snprintf(buf, sizeof(buf), "0x%4x", _get_value(node, "product_id")); - xml.attribute("product_id", buf); - - snprintf(buf, sizeof(buf), "0x%4x", bus); - xml.attribute("bus", buf); - - snprintf(buf, sizeof(buf), "0x%4x", dev); - xml.attribute("dev", buf); + _gen_dev_attributes(xml, node); }); } @@ -272,25 +272,12 @@ class Usb_filter::Device_registry Entry const &) { xml.node("device", [&] { - char buf[16]; - unsigned const bus = _get_value(node, "bus"); unsigned const dev = _get_value(node, "dev"); - snprintf(buf, sizeof(buf), "usb-%d-%d", bus, dev); - xml.attribute("label", buf); + xml.attribute("label", Label("usb-", bus, "-", dev)); - snprintf(buf, sizeof(buf), "0x%4x", _get_value(node, "vendor_id")); - xml.attribute("vendor_id", buf); - - snprintf(buf, sizeof(buf), "0x%4x", _get_value(node, "product_id")); - xml.attribute("product_id", buf); - - snprintf(buf, sizeof(buf), "0x%4x", bus); - xml.attribute("bus", buf); - - snprintf(buf, sizeof(buf), "0x%4x", dev); - xml.attribute("dev", buf); + _gen_dev_attributes(xml, node); }); } diff --git a/repos/os/src/drivers/acpi/acpi.cc b/repos/os/src/drivers/acpi/acpi.cc index a62349abda..3e4ad11fa6 100644 --- a/repos/os/src/drivers/acpi/acpi.cc +++ b/repos/os/src/drivers/acpi/acpi.cc @@ -1605,9 +1605,7 @@ class Acpi_table static void attribute_hex(Xml_generator &xml, char const *name, unsigned long long value) { - char buf[32]; - Genode::snprintf(buf, sizeof(buf), "0x%llx", value); - xml.attribute(name, buf); + xml.attribute(name, String<32>(Hex(value))); } diff --git a/repos/os/src/drivers/virtdev_rom/main.cc b/repos/os/src/drivers/virtdev_rom/main.cc index bd57092028..15a72fe01e 100644 --- a/repos/os/src/drivers/virtdev_rom/main.cc +++ b/repos/os/src/drivers/virtdev_rom/main.cc @@ -151,9 +151,9 @@ struct Virtdev_rom::Main xml.node("device", [&] () { - static char name[DEVICE_NAME_LEN]; - snprintf(name, sizeof(name), "%s%u", _name_for_id(id), device_type_idx[id - 1]++); - xml.attribute("name", name); + using Name = String; + + xml.attribute("name", Name(_name_for_id(id), device_type_idx[id - 1]++)); xml.attribute("type", _name_for_id(id)); xml.node("io_mem", [&] () { xml.attribute("address", addr); diff --git a/repos/os/src/lib/vfs/file_system_factory.cc b/repos/os/src/lib/vfs/file_system_factory.cc index 2d86396e94..d197a6db58 100644 --- a/repos/os/src/lib/vfs/file_system_factory.cc +++ b/repos/os/src/lib/vfs/file_system_factory.cc @@ -116,11 +116,7 @@ Vfs::Global_file_system_factory::_try_create(Vfs::Env &env, */ Library_name Vfs::Global_file_system_factory::_library_name(Node_name const &node_name) { - char lib_name [Library_name::capacity()]; - Genode::snprintf(lib_name, sizeof(lib_name), "vfs_%s.lib.so", - node_name.string()); - - return Library_name(lib_name); + return Library_name("vfs_", node_name, ".lib.so"); } diff --git a/repos/os/src/lib/vfs/rtc_file_system.h b/repos/os/src/lib/vfs/rtc_file_system.h index a3a656f6d2..172e9ac3bf 100644 --- a/repos/os/src/lib/vfs/rtc_file_system.h +++ b/repos/os/src/lib/vfs/rtc_file_system.h @@ -16,6 +16,7 @@ /* Genode includes */ #include +#include #include #include @@ -60,10 +61,31 @@ class Vfs::Rtc_file_system : public Single_file_system Rtc::Timestamp ts = _rtc.current_time(); - char buf[TIMESTAMP_LEN+1]; - char *b = buf; - size_t n = Genode::snprintf(buf, sizeof(buf), "%04u-%02u-%02u %02u:%02u:%02u\n", - ts.year, ts.month, ts.day, ts.hour, ts.minute, ts.second); + struct Padded + { + unsigned pad, value; + + void print(Genode::Output &out) const + { + using namespace Genode; + + unsigned const len = printed_length(value); + if (len < pad) + Genode::print(out, Repeated(pad - len, Char('0'))); + + Genode::print(out, value); + } + }; + + String string { Padded { 4, ts.year }, "-", + Padded { 2, ts.month }, "-", + Padded { 2, ts.day }, " ", + Padded { 2, ts.hour }, ":", + Padded { 2, ts.minute }, ":", + Padded { 2, ts.second }, "\n" }; + char const *b = string.string(); + size_t n = string.length(); + n -= size_t(seek()); b += seek(); diff --git a/repos/os/src/server/terminal_log/main.cc b/repos/os/src/server/terminal_log/main.cc index 4c69596b5d..aa9576835d 100644 --- a/repos/os/src/server/terminal_log/main.cc +++ b/repos/os/src/server/terminal_log/main.cc @@ -26,11 +26,13 @@ namespace Genode { { public: - enum { LABEL_LEN = 64 }; + enum { LABEL_LEN = 64u }; private: - char _label[LABEL_LEN]; + using Label = Genode::String; + Label const _label; + Terminal::Connection &_terminal; public: @@ -39,7 +41,10 @@ namespace Genode { * Constructor */ Termlog_component(const char *label, Terminal::Connection &terminal) - : _terminal(terminal) { snprintf(_label, LABEL_LEN, "[%s] ", label); } + : + _label("[", label, "] "), + _terminal(terminal) + { } /***************** @@ -76,7 +81,7 @@ namespace Genode { return; } - _terminal.write(_label, strlen(_label)); + _terminal.write(_label.string(), strlen(_label.string())); _terminal.write(string, len); /* if last character of string was not a line break, add one */ diff --git a/repos/os/src/test/clipboard/main.cc b/repos/os/src/test/clipboard/main.cc index 9934e257e2..772575b34b 100644 --- a/repos/os/src/test/clipboard/main.cc +++ b/repos/os/src/test/clipboard/main.cc @@ -100,12 +100,7 @@ class Test::Subsystem bool _expect_import = true; - Label _session_label() - { - char buf[Label::capacity()]; - snprintf(buf, sizeof(buf), "%s -> clipboard", _name.string()); - return Label(Cstring(buf)); - } + Label _session_label() { return Label(_name, " -> clipboard"); } Attached_rom_dataspace _import_rom; diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index c208fa4bee..e0f6147c53 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -542,7 +542,7 @@ void Component::construct(Genode::Env &env) vfs_env.io().commit_and_wait(); }; - char path[Vfs::MAX_PATH_LEN]; + String path { }; MAX_DEPTH = config_xml.attribute_value("depth", 16U); @@ -563,11 +563,11 @@ void Component::construct(Genode::Env &env) elapsed_ms = timer.elapsed_ms(); for (int i = 0; i < ROOT_TREE_COUNT; ++i) { - snprintf(path, 3, "/%d", i); + path = { "/", i }; Vfs::Vfs_handle *dir_handle; - vfs_root.opendir(path, true, &dir_handle, heap); + vfs_root.opendir(path.string(), true, &dir_handle, heap); dir_handle->close(); - Mkdir_test test(vfs_root, heap, path); + Mkdir_test test(vfs_root, heap, path.string()); count += test.wait(); } elapsed_ms = timer.elapsed_ms() - elapsed_ms; @@ -590,8 +590,8 @@ void Component::construct(Genode::Env &env) elapsed_ms = timer.elapsed_ms(); for (int i = 0; i < ROOT_TREE_COUNT; ++i) { - snprintf(path, 3, "/%d", i); - Populate_test test(vfs_root, heap, path); + path = { "/", i }; + Populate_test test(vfs_root, heap, path.string()); count += test.wait(); } @@ -621,8 +621,8 @@ void Component::construct(Genode::Env &env) elapsed_ms = timer.elapsed_ms(); for (int i = 0; i < ROOT_TREE_COUNT; ++i) { - snprintf(path, 3, "/%d", i); - Write_test test(vfs_root, heap, path, vfs_env.io()); + path = { "/", i }; + Write_test test(vfs_root, heap, path.string(), vfs_env.io()); count += test.wait(); } @@ -657,8 +657,8 @@ void Component::construct(Genode::Env &env) elapsed_ms = timer.elapsed_ms(); for (int i = 0; i < ROOT_TREE_COUNT; ++i) { - snprintf(path, 3, "/%d", i); - Read_test test(vfs_root, heap, path, vfs_env.io()); + path = { "/", i }; + Read_test test(vfs_root, heap, path.string(), vfs_env.io()); count += test.wait(); } @@ -693,8 +693,8 @@ void Component::construct(Genode::Env &env) elapsed_ms = timer.elapsed_ms(); for (int i = 0; i < ROOT_TREE_COUNT; ++i) { - snprintf(path, 3, "/%d", i); - Unlink_test test(vfs_root, heap, path, vfs_env.io()); + path = { "/", i }; + Unlink_test test(vfs_root, heap, path.string(), vfs_env.io()); count += test.wait(); } From 36c00cc294dfc9d2d788b0f463614cc282233eea Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 6 Mar 2023 12:06:44 +0100 Subject: [PATCH 0370/1921] gems: remove use of format strings Issue #2064 --- repos/gems/src/app/decorator/window.h | 9 ++-- repos/gems/src/app/themed_decorator/window.h | 9 ++-- repos/gems/src/lib/vfs/trace/session_label.h | 1 - .../cpu_sampler/cpu_thread_component.cc | 48 +++++-------------- repos/gems/src/server/wm/gui.h | 10 ++-- repos/os/include/decorator/window.h | 1 - 6 files changed, 24 insertions(+), 54 deletions(-) diff --git a/repos/gems/src/app/decorator/window.h b/repos/gems/src/app/decorator/window.h index d77c5030d9..abf8b4a9e3 100644 --- a/repos/gems/src/app/decorator/window.h +++ b/repos/gems/src/app/decorator/window.h @@ -52,12 +52,9 @@ class Decorator::Window : public Window_base /* * We supply the window ID as label for the anchor view. */ - if (id) { - char buf[128]; - Genode::snprintf(buf, sizeof(buf), "%d", id); - - _gui.enqueue(_handle, Genode::Cstring(buf)); - } + if (id) + _gui.enqueue(_handle, + Genode::String<128>(id).string()); } ~Gui_view() diff --git a/repos/gems/src/app/themed_decorator/window.h b/repos/gems/src/app/themed_decorator/window.h index 39e3100f59..d4b07b1361 100644 --- a/repos/gems/src/app/themed_decorator/window.h +++ b/repos/gems/src/app/themed_decorator/window.h @@ -160,12 +160,9 @@ class Decorator::Window : public Window_base, public Animator::Item /* * We supply the window ID as label for the anchor view. */ - if (id) { - char buf[128]; - Genode::snprintf(buf, sizeof(buf), "%d", id); - - _gui.enqueue(_handle, Genode::Cstring(buf)); - } + if (id) + _gui.enqueue(_handle, + Genode::String<128>(id).string()); } View_handle _create_remote_view(Gui::Session_client &remote_gui) diff --git a/repos/gems/src/lib/vfs/trace/session_label.h b/repos/gems/src/lib/vfs/trace/session_label.h index 164dc42e49..9149470561 100644 --- a/repos/gems/src/lib/vfs/trace/session_label.h +++ b/repos/gems/src/lib/vfs/trace/session_label.h @@ -14,7 +14,6 @@ #ifndef _SESSION_LABEL_H_ #define _SESSION_LABEL_H_ -#include #include #include diff --git a/repos/gems/src/server/cpu_sampler/cpu_thread_component.cc b/repos/gems/src/server/cpu_sampler/cpu_thread_component.cc index 890fc128c6..58594983f0 100644 --- a/repos/gems/src/server/cpu_sampler/cpu_thread_component.cc +++ b/repos/gems/src/server/cpu_sampler/cpu_thread_component.cc @@ -12,7 +12,7 @@ */ /* Genode includes */ -#include +#include /* local includes */ #include "cpu_session_component.h" @@ -32,28 +32,14 @@ Cpu_sampler::Cpu_thread_component::Cpu_thread_component( addr_t utcb, char const *thread_name, unsigned int thread_id) -: _cpu_session_component(cpu_session_component), _env(env), - _md_alloc(md_alloc), - _parent_cpu_thread( - _cpu_session_component.parent_cpu_session().create_thread(pd, - name, - affinity, - weight, - utcb)) +: + _cpu_session_component(cpu_session_component), _env(env), _md_alloc(md_alloc), + _parent_cpu_thread( + _cpu_session_component.parent_cpu_session() + .create_thread(pd, name, affinity, weight, utcb)), + _label(_cpu_session_component.session_label().string(), " -> ", thread_name), + _log_session_label("samples -> ", _label, ".", thread_id) { - char label_buf[Session_label::size()]; - - snprintf(label_buf, sizeof(label_buf), "%s -> %s", - _cpu_session_component.session_label().string(), - thread_name); - - _label = Session_label(label_buf); - - snprintf(label_buf, sizeof(label_buf), "samples -> %s.%u", - _label.string(), thread_id); - - _log_session_label = Session_label(label_buf); - _cpu_session_component.thread_ep().manage(this); } @@ -121,21 +107,13 @@ void Cpu_sampler::Cpu_thread_component::flush() _log.construct(_env, _log_session_label); /* number of hex characters + newline + '\0' */ - enum { SAMPLE_STRING_SIZE = 2 * sizeof(addr_t) + 1 + 1 }; - - char sample_string[SAMPLE_STRING_SIZE]; - - char const *format_string; - - if (sizeof(addr_t) == 8) - format_string = "%16lX\n"; - else - format_string = "%8X\n"; + using Sample = String<2 * sizeof(addr_t) + 1 + 1>; for (unsigned int i = 0; i < _sample_buf_index; i++) { - snprintf(sample_string, SAMPLE_STRING_SIZE, format_string, - _sample_buf[i]); - _log->write(sample_string); + + Sample const sample(Hex(_sample_buf[i], Hex::OMIT_PREFIX, Hex::PAD), "\n"); + + _log->write(sample.string()); } _sample_buf_index = 0; diff --git a/repos/gems/src/server/wm/gui.h b/repos/gems/src/server/wm/gui.h index b9f964fa3e..b509b21427 100644 --- a/repos/gems/src/server/wm/gui.h +++ b/repos/gems/src/server/wm/gui.h @@ -883,16 +883,16 @@ class Wm::Gui::Session_component : public Rpc_object, bool matches_session_label(char const *selector) const { + using namespace Genode; + /* * Append label separator to match selectors with a trailing * separator. * - * The code originates from nitpicker's 'session.h'. + * The code snippet originates from nitpicker's 'gui_session.h'. */ - char label[Genode::Session_label::capacity() + 4]; - Genode::snprintf(label, sizeof(label), "%s ->", _session_label.string()); - return Genode::strcmp(label, selector, - Genode::strlen(selector)) == 0; + String const label(_session_label, " ->"); + return strcmp(label.string(), selector, strlen(selector)) == 0; } void request_resize(Area size) diff --git a/repos/os/include/decorator/window.h b/repos/os/include/decorator/window.h index 11f11fe4f7..83cf872032 100644 --- a/repos/os/include/decorator/window.h +++ b/repos/os/include/decorator/window.h @@ -19,7 +19,6 @@ #include #include #include -#include /* decorator includes */ #include From 8b44f49d75d2a82bf1bf4582721fc1be4c52965d Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 6 Mar 2023 12:30:48 +0100 Subject: [PATCH 0371/1921] vbox5: remove use of base/snprintf.h Issue #2064 --- repos/ports/src/virtualbox5/network.cpp | 8 +++----- repos/ports/src/virtualbox5/thread.cc | 8 ++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/repos/ports/src/virtualbox5/network.cpp b/repos/ports/src/virtualbox5/network.cpp index 8bed758258..7caad193f0 100644 --- a/repos/ports/src/virtualbox5/network.cpp +++ b/repos/ports/src/virtualbox5/network.cpp @@ -39,7 +39,6 @@ #include #include -#include #include @@ -187,7 +186,8 @@ class Nic_client public: - Nic_client(Genode::Env &env, PDRVNIC drvtap, char const *label) + Nic_client(Genode::Env &env, PDRVNIC drvtap, + Genode::Session::Label const &label) : _tx_block_alloc(_packet_allocator()), _nic(env, _tx_block_alloc, BUF_SIZE, BUF_SIZE, label), @@ -540,19 +540,17 @@ static DECLCALLBACK(int) drvNicConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uin N_("Configuration error: the above device/driver" " didn't export the network config interface!\n")); - char label[8]; uint64_t slot; rc = CFGMR3QueryInteger(pCfg, "Slot", &slot); if (RT_FAILURE(rc)) return PDMDRV_SET_ERROR(pDrvIns, rc, N_("Configuration error: Failed to retrieve the network interface slot")); - Genode::snprintf(label, sizeof(label), "%d", slot); /* * Setup Genode nic_session connection */ try { - pThis->nic_client = new (vmm_heap()) Nic_client(genode_env(), pThis, label); + pThis->nic_client = new (vmm_heap()) Nic_client(genode_env(), pThis, slot); } catch (...) { return VERR_HOSTIF_INIT_FAILED; } diff --git a/repos/ports/src/virtualbox5/thread.cc b/repos/ports/src/virtualbox5/thread.cc index 55f06fd452..19bd89de65 100644 --- a/repos/ports/src/virtualbox5/thread.cc +++ b/repos/ports/src/virtualbox5/thread.cc @@ -70,13 +70,9 @@ static Genode::Cpu_connection * cpu_connection(RTTHREADTYPE type) if (con[type - 1]) return con[type - 1]; - char * data = new (vmm_heap()) char[16]; - - Genode::snprintf(data, 16, "vbox %u", type); - - con[type - 1] = new (vmm_heap()) Cpu_connection(genode_env(), data, + con[type - 1] = new (vmm_heap()) Cpu_connection(genode_env(), + { "vbox ", unsigned(type) }, prio_class(type)); - return con[type - 1]; } From 94b8c61e32b4bf434dddc8180643770bb9fa8c48 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 6 Mar 2023 14:19:46 +0100 Subject: [PATCH 0372/1921] libc: remove internal use of base/snprintf.h Issue #2064 --- repos/libports/src/lib/libc/dynamic_linker.cc | 34 +++++++++++++------ .../libports/src/lib/libc/file_operations.cc | 3 ++ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/repos/libports/src/lib/libc/dynamic_linker.cc b/repos/libports/src/lib/libc/dynamic_linker.cc index ba47856bed..8760cb18ca 100644 --- a/repos/libports/src/lib/libc/dynamic_linker.cc +++ b/repos/libports/src/lib/libc/dynamic_linker.cc @@ -9,7 +9,6 @@ /* Genode includes */ #include #include -#include /* Genode-specific libc includes */ #include @@ -24,12 +23,27 @@ extern "C" { using namespace Genode; -enum { MAX_ERR = 128 }; -static char err_str[MAX_ERR]; + +using Err_string = String<128>; + + +static Err_string &_err_str() +{ + static Err_string str { }; + return str; +} + + +/** + * Set global 'dlerror' message + */ +template +static void _dlerror(ARGS &&... args) { _err_str() = { args... }; } + char *dlerror(void) { - return err_str; + return (char *)_err_str().string(); } @@ -58,8 +72,8 @@ void *dlopen(const char *name, int mode) /* error on unsupported mode values */ if (mode & ~supported) { - snprintf(err_str, MAX_ERR, "Unsupported mode 0x%x\n", mode & ~supported); - error(__func__, ": ", Cstring(err_str)); + _dlerror("Unsupported mode ", Hex(mode & ~supported)); + error(__func__, ": ", _err_str()); return nullptr; } @@ -82,7 +96,7 @@ void *dlopen(const char *name, int mode) name ? Genode::Path<128>(name).last_element() : nullptr, /* extract file name */ bind, keep); } catch (...) { - snprintf(err_str, MAX_ERR, "Unable to open file %s\n", name); + _dlerror("Unable to open file ", name); } return nullptr; } @@ -91,7 +105,7 @@ void *dlopen(const char *name, int mode) void *dlsym(void *handle, const char *name) { if (handle == nullptr || handle == RTLD_NEXT || handle == RTLD_SELF) { - snprintf(err_str, MAX_ERR, "Unsupported handle %p\n", handle); + _dlerror("Unsupported handle ", handle); return nullptr; } @@ -106,7 +120,7 @@ void *dlsym(void *handle, const char *name) return to_object(handle)->lookup(name); } catch (...) { - snprintf(err_str, MAX_ERR, "Symbol '%s' not found\n", name); + _dlerror("Symbol '", name, "' not found"); } return nullptr; @@ -122,7 +136,7 @@ int dladdr(const void *addr, Dl_info *dlip) dlip->dli_sname = info.name; dlip->dli_saddr = (void *)info.addr; } catch (...) { - snprintf(err_str, MAX_ERR, "Symbol %p at not found", addr); + _dlerror("Symbol at ", addr, " not found"); return 0; } diff --git a/repos/libports/src/lib/libc/file_operations.cc b/repos/libports/src/lib/libc/file_operations.cc index f2fa1c9652..2e97d45ee3 100644 --- a/repos/libports/src/lib/libc/file_operations.cc +++ b/repos/libports/src/lib/libc/file_operations.cc @@ -23,6 +23,9 @@ #include #include +/* compiler includes */ +#include + extern "C" { /* libc includes */ #include From 50ee8dfaf8a2a0988569f240b0294b41a8628bfd Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 6 Mar 2023 12:11:18 +0100 Subject: [PATCH 0373/1921] Remove obsolete includes of base/snprint.h Issue #2064 --- repos/demo/src/lib/launchpad/launchpad.cc | 1 - repos/libports/src/drivers/framebuffer/vesa/ifx86emu.cc | 1 - repos/libports/src/lib/gcov/libc/libc.cc | 1 - repos/os/src/test/vfs_stress/main.cc | 1 - 4 files changed, 4 deletions(-) diff --git a/repos/demo/src/lib/launchpad/launchpad.cc b/repos/demo/src/lib/launchpad/launchpad.cc index ed9ed27bd7..33d92c7deb 100644 --- a/repos/demo/src/lib/launchpad/launchpad.cc +++ b/repos/demo/src/lib/launchpad/launchpad.cc @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/repos/libports/src/drivers/framebuffer/vesa/ifx86emu.cc b/repos/libports/src/drivers/framebuffer/vesa/ifx86emu.cc index 33affabd02..64777f0db6 100644 --- a/repos/libports/src/drivers/framebuffer/vesa/ifx86emu.cc +++ b/repos/libports/src/drivers/framebuffer/vesa/ifx86emu.cc @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/repos/libports/src/lib/gcov/libc/libc.cc b/repos/libports/src/lib/gcov/libc/libc.cc index 2dcbb1769e..aeafa74236 100644 --- a/repos/libports/src/lib/gcov/libc/libc.cc +++ b/repos/libports/src/lib/gcov/libc/libc.cc @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc index e0f6147c53..3b165207bd 100644 --- a/repos/os/src/test/vfs_stress/main.cc +++ b/repos/os/src/test/vfs_stress/main.cc @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include From 9ef0f1b6cbc30d8c4cc7ca71d532a751b95d4419 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 6 Mar 2023 14:39:26 +0100 Subject: [PATCH 0374/1921] libports: freestanding 'format' string library This little library implements rudimentary format-string support. It is useful for porting 3rd-party code that ought not depend on a full libc. Issue #2064 --- repos/libports/include/format/console.h | 60 +++++ repos/libports/include/format/snprintf.h | 99 +++++++ repos/libports/lib/mk/format.mk | 6 + repos/libports/recipes/api/format/content.mk | 17 ++ repos/libports/recipes/api/format/hash | 1 + repos/libports/src/lib/format/console.cc | 256 +++++++++++++++++++ 6 files changed, 439 insertions(+) create mode 100644 repos/libports/include/format/console.h create mode 100644 repos/libports/include/format/snprintf.h create mode 100644 repos/libports/lib/mk/format.mk create mode 100644 repos/libports/recipes/api/format/content.mk create mode 100644 repos/libports/recipes/api/format/hash create mode 100644 repos/libports/src/lib/format/console.cc diff --git a/repos/libports/include/format/console.h b/repos/libports/include/format/console.h new file mode 100644 index 0000000000..3a58bb7aa7 --- /dev/null +++ b/repos/libports/include/format/console.h @@ -0,0 +1,60 @@ +/* + * \brief Simple console for debug output + * \author Norman Feske + * \date 2006-04-07 + */ + +/* + * Copyright (C) 2006-2017 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _INCLUDE__FORMAT__CONSOLE_H_ +#define _INCLUDE__FORMAT__CONSOLE_H_ + +#include + +namespace Format { class Console; } + + +class Format::Console +{ + public: + + virtual ~Console() {} + + /** + * Print format string + */ + void printf(const char *format, ...) __attribute__((format(printf, 2, 3))); + void vprintf(const char *format, va_list) __attribute__((format(printf, 2, 0))); + + protected: + + /** + * Back end used for the output of a single character + */ + virtual void _out_char(char c) = 0; + + /** + * Back end for the output of a null-terminated string + * + * The default implementation uses _out_char. This method may + * be overridden by the backend for improving efficiency. + * + * This method is virtual to enable the use an optimized + * string-output operation on some target platforms, e.g., + * a kernel debugger that offers a string-output syscall. The + * default implementation calls '_out_char' for each character. + */ + virtual void _out_string(const char *str); + + private: + + template void _out_unsigned(T value, unsigned base = 10, int pad = 0); + template void _out_signed(T value, unsigned base = 10); +}; + +#endif /* _INCLUDE__FORMAT__CONSOLE_H_ */ diff --git a/repos/libports/include/format/snprintf.h b/repos/libports/include/format/snprintf.h new file mode 100644 index 0000000000..fa09381369 --- /dev/null +++ b/repos/libports/include/format/snprintf.h @@ -0,0 +1,99 @@ +/* + * \brief Facility to write format string into character buffer + * \author Norman Feske + * \date 2006-07-17 + */ + +/* + * Copyright (C) 2006-2017 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#ifndef _INCLUDE__FORMAT__SNPRINTF_H_ +#define _INCLUDE__FORMAT__SNPRINTF_H_ + +#include + +namespace Format { + + class String_console; + + using size_t = __SIZE_TYPE__; + + /** + * Print format string into character buffer + * + * \param dst destination buffer + * \param dst_len size of 'dst' in bytes + * \param format format string followed by the list of arguments + * + * \return number of characters written to destination buffer + */ + inline size_t snprintf(char *dst, size_t dst_size, const char *format, ...) + __attribute__((format(printf, 3, 4))); +} + + +class Format::String_console : public Console +{ + private: + + char *_dst; + size_t _dst_len; + size_t _w_offset { 0 }; + + /* + * Noncopyable + */ + String_console &operator = (String_console const &); + String_console(String_console const &); + + public: + + /** + * Constructor + * + * \param dst destination character buffer + * \param dst_len size of 'dst' + */ + String_console(char *dst, size_t dst_len) + : _dst(dst), _dst_len(dst_len) + { _dst[0] = 0; } + + /** + * Return number of characters in destination buffer + */ + size_t len() { return _w_offset; } + + + /*********************** + ** Console interface ** + ***********************/ + + void _out_char(char c) override + { + /* ensure to leave space for null-termination */ + if (_w_offset + 2 > _dst_len) + return; + + _dst[_w_offset++] = c; + _dst[_w_offset] = 0; + } +}; + + +inline Format::size_t Format::snprintf(char *dst, size_t dst_len, const char *format, ...) +{ + va_list list; + va_start(list, format); + + String_console sc(dst, dst_len); + sc.vprintf(format, list); + + va_end(list); + return sc.len(); +} + +#endif /* _INCLUDE__FORMAT__SNPRINTF_H_ */ diff --git a/repos/libports/lib/mk/format.mk b/repos/libports/lib/mk/format.mk new file mode 100644 index 0000000000..2b51767219 --- /dev/null +++ b/repos/libports/lib/mk/format.mk @@ -0,0 +1,6 @@ +SRC_CC += console.cc + +vpath %.cc $(REP_DIR)/src/lib/format + +# for reusing output.h +REP_INC_DIR += src/include/base/internal diff --git a/repos/libports/recipes/api/format/content.mk b/repos/libports/recipes/api/format/content.mk new file mode 100644 index 0000000000..ea066e64a3 --- /dev/null +++ b/repos/libports/recipes/api/format/content.mk @@ -0,0 +1,17 @@ +MIRROR_FROM_REP_DIR := include/format src/lib/format lib/mk/format.mk + +content: $(MIRROR_FROM_REP_DIR) + +$(MIRROR_FROM_REP_DIR): + $(mirror_from_rep_dir) + +MIRROR_FROM_BASE_DIR := src/include/base/internal/output.h + +content: $(MIRROR_FROM_BASE_DIR) + +$(MIRROR_FROM_BASE_DIR): + mkdir -p $(dir $@) + cp -r $(addprefix $(GENODE_DIR)/repos/base/,$@) $(dir $@) + +LICENSE: + cp $(GENODE_DIR)/LICENSE $@ diff --git a/repos/libports/recipes/api/format/hash b/repos/libports/recipes/api/format/hash new file mode 100644 index 0000000000..499966045d --- /dev/null +++ b/repos/libports/recipes/api/format/hash @@ -0,0 +1 @@ +2023-03-06 bcd738392c9ae1d3f10b17e0b412051d07e650fb diff --git a/repos/libports/src/lib/format/console.cc b/repos/libports/src/lib/format/console.cc new file mode 100644 index 0000000000..53f624e409 --- /dev/null +++ b/repos/libports/src/lib/format/console.cc @@ -0,0 +1,256 @@ +/* + * \brief Output of format strings + * \author Norman Feske + * \date 2006-04-07 + */ + +/* + * Copyright (C) 2006-2017 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +/* format library interface */ +#include + +/* Genode includes */ +#include +#include /* base/internal/output.h */ + +using namespace Format; +using namespace Genode; + + +/** + * Format string command representation + */ +class Format_command +{ + public: + + enum Type { INT, UINT, STRING, CHAR, PTR, PERCENT, INVALID }; + enum Length { DEFAULT, LONG, SIZE_T, LONG_LONG }; + + private: + + /** + * Read decimal value from string + */ + int decode_decimal(const char *str, int *consumed) + { + int res = 0; + while (1) { + char c = str[*consumed]; + + if (!c || c < '0' || c > '0' + 9) + return res; + + res = (res * 10) + c - '0'; + (*consumed)++; + } + } + + public: + + Type type = INVALID; /* format argument type */ + Length length = DEFAULT; /* format argument length */ + int padding = 0; /* min number of characters to print */ + int base = 10; /* base of numeric arguments */ + bool zeropad = false; /* pad with zero instead of space */ + bool uppercase = false; /* use upper case for hex numbers */ + int consumed = 0; /* nb of consumed format string chars */ + + /** + * Constructor + * + * \param format begin of command in format string + */ + explicit Format_command(const char *format) + { + /* check for command begin and eat the character */ + if (format[consumed] != '%') return; + if (!format[++consumed]) return; + + /* heading zero indicates zero-padding */ + zeropad = (format[consumed] == '0'); + + /* read decimal padding value */ + padding = decode_decimal(format, &consumed); + if (!format[consumed]) return; + + /* decode length */ + switch (format[consumed]) { + + case 'l': + { + /* long long ints are marked by a subsequenting 'l' character */ + bool is_long_long = (format[consumed + 1] == 'l'); + + length = is_long_long ? LONG_LONG : LONG; + consumed += is_long_long ? 2 : 1; + break; + } + + case 'z': + + length = SIZE_T; + consumed++; + break; + + case 'p': + + length = LONG; + break; + + default: break; + } + + if (!format[consumed]) return; + + /* decode type */ + switch (format[consumed]) { + + case 'd': + case 'i': type = INT; base = 10; break; + case 'o': type = UINT; base = 8; break; + case 'u': type = UINT; base = 10; break; + case 'x': type = UINT; base = 16; break; + case 'X': type = UINT; base = 16; uppercase = 1; break; + case 'p': type = PTR; base = 16; break; + case 'c': type = CHAR; break; + case 's': type = STRING; break; + case '%': type = PERCENT; break; + + case 0: return; + default: break; + } + + /* eat type character */ + consumed++; + } + + int numeric() + { + return (type == INT || type == UINT || type == PTR); + } +}; + + +void Console::_out_string(const char *str) +{ + if (!str) + _out_string(""); + else + while (*str) _out_char(*str++); +} + + +void Console::printf(const char *format, ...) +{ + va_list list; + va_start(list, format); + vprintf(format, list); + va_end(list); +} + + +void Console::vprintf(const char *format, va_list list) +{ + + while (*format) { + + /* eat and output plain characters */ + if (*format != '%') { + _out_char(*format++); + continue; + } + + /* parse format argument descriptor */ + Format_command cmd(format); + + /* read numeric argument from va_list */ + long long numeric_arg = 0; + if (cmd.numeric()) { + switch (cmd.length) { + + case Format_command::LONG_LONG: + + numeric_arg = va_arg(list, long long); + break; + + case Format_command::LONG: + + numeric_arg = (cmd.type == Format_command::UINT) ? + (long long)va_arg(list, unsigned long) : va_arg(list, long); + break; + + case Format_command::SIZE_T: + + numeric_arg = va_arg(list, size_t); + break; + + case Format_command::DEFAULT: + + numeric_arg = (cmd.type == Format_command::UINT) ? + (long long)va_arg(list, unsigned int) : va_arg(list, int); + break; + } + } + + /* call type-specific output routines */ + switch (cmd.type) { + + case Format_command::INT: + + if (cmd.length == Format_command::LONG_LONG) + out_signed(numeric_arg, cmd.base, + [&] (char c) { _out_char(c); }); + else + out_signed((long)numeric_arg, cmd.base, + [&] (char c) { _out_char(c); }); + break; + + case Format_command::UINT: + + if (cmd.length == Format_command::LONG_LONG) { + out_unsigned(numeric_arg, cmd.base, cmd.padding, + [&] (char c) { _out_char(c); }); + break; + } + + /* fall through */ + + case Format_command::PTR: + + out_unsigned((long)numeric_arg, cmd.base, cmd.padding, + [&] (char c) { _out_char(c); }); + break; + + case Format_command::CHAR: + + _out_char((char)va_arg(list, int)); + break; + + case Format_command::STRING: + + _out_string(va_arg(list, const char *)); + break; + + case Format_command::PERCENT: + + _out_char('%'); + break; + + case Format_command::INVALID: + + _out_string(""); + /* consume the argument of the unsupported command */ + va_arg(list, long); + break; + } + + /* proceed with format string after command */ + format += cmd.consumed; + } +} From e9b249b709a5f6ceb5921f5b96691e7c89b657a6 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 6 Mar 2023 14:58:06 +0100 Subject: [PATCH 0375/1921] Replace use of base/snprintf.h by format library Issue #2064 --- .../recipes/src/test-xml_generator/used_apis | 1 + .../recipes/src/bsd_audio_drv/used_apis | 1 + .../src/drivers/audio/pci_audio_drv/target.mk | 2 +- repos/dde_bsd/src/lib/audio/driver.cc | 15 ++++++---- repos/dde_bsd/src/lib/audio/misc.cc | 6 ++-- .../recipes/src/ipxe_nic_drv/used_apis | 1 + repos/dde_ipxe/src/drivers/nic/target.mk | 2 +- .../dde_ipxe/src/lib/dde_ipxe/dde_support.cc | 5 +++- repos/dde_linux/lib/mk/lxip.mk | 2 +- .../recipes/src/legacy_usb_host_drv/used_apis | 1 + .../recipes/src/usb_hid_drv/used_apis | 1 + .../recipes/src/usb_modem_drv/used_apis | 1 + .../recipes/src/usb_net_drv/used_apis | 1 + .../dde_linux/recipes/src/vfs_lxip/used_apis | 1 + repos/dde_linux/src/drivers/usb_hid/target.mk | 2 +- .../dde_linux/src/drivers/usb_host/lx_emul.cc | 9 ++++-- .../dde_linux/src/drivers/usb_host/target.inc | 2 +- .../src/drivers/usb_modem/lx_emul.cc | 4 +-- .../dde_linux/src/drivers/usb_modem/target.mk | 2 +- .../dde_linux/src/drivers/usb_net/lx_emul.cc | 4 +-- repos/dde_linux/src/drivers/usb_net/target.mk | 2 +- .../src/include/legacy/lx_emul/impl/kernel.h | 6 ++-- repos/dde_linux/src/lib/legacy/lx_kit/irq.cc | 6 ++-- repos/dde_linux/src/lib/libnl/socket.cc | 4 ++- repos/dde_linux/src/lib/lxip/lxcc_emul.cc | 11 +++---- repos/dde_linux/src/lib/lxip/nic_handler.cc | 5 +++- repos/dde_linux/src/lib/vfs/lxip/vfs.cc | 20 +++++++------ repos/dde_rump/lib/mk/vfs_rump.mk | 2 +- repos/dde_rump/recipes/src/rump/used_apis | 1 + repos/dde_rump/src/lib/rump/hypercall.cc | 3 +- repos/dde_rump/src/lib/rump/io.cc | 3 +- repos/demo/lib/mk/mini_c.mk | 2 ++ repos/demo/recipes/src/demo/used_apis | 1 + repos/demo/src/lib/mini_c/snprintf.cc | 6 ++-- repos/demo/src/lib/mini_c/vsnprintf.cc | 6 ++-- repos/libports/lib/mk/gcov-libcommon.mk | 2 +- repos/libports/lib/mk/libgcov.mk | 2 ++ repos/libports/lib/mk/qemu-usb.inc | 1 + repos/libports/lib/mk/vfs_lwip.mk | 2 +- repos/libports/recipes/src/gcov/used_apis | 1 + .../libports/recipes/src/test-ldso/used_apis | 1 + repos/libports/recipes/src/vesa_drv/used_apis | 1 + repos/libports/recipes/src/vfs_lwip/used_apis | 1 + .../src/drivers/framebuffer/vesa/ifx86emu.cc | 5 +++- .../src/drivers/framebuffer/vesa/target.mk | 2 +- repos/libports/src/lib/gcov/libc/libc.cc | 5 ++-- repos/libports/src/lib/qemu-usb/qemu_emul.cc | 9 ++++-- repos/libports/src/lib/vfs/lwip/printf.cc | 9 ++++-- repos/libports/src/lib/vfs/lwip/vfs.cc | 29 ++++++++++--------- repos/libports/src/test/ldso/main.cc | 3 +- repos/libports/src/test/ldso/target.mk | 2 +- repos/ports/recipes/src/vbox5-nova/used_apis | 1 + repos/ports/recipes/src/vbox5/used_apis | 1 + repos/ports/recipes/src/vbox6/used_apis | 1 + 54 files changed, 139 insertions(+), 80 deletions(-) diff --git a/repos/base/recipes/src/test-xml_generator/used_apis b/repos/base/recipes/src/test-xml_generator/used_apis index f72ea155b5..9fb148f247 100644 --- a/repos/base/recipes/src/test-xml_generator/used_apis +++ b/repos/base/recipes/src/test-xml_generator/used_apis @@ -1,4 +1,5 @@ base file_system_session libgcov +format os diff --git a/repos/dde_bsd/recipes/src/bsd_audio_drv/used_apis b/repos/dde_bsd/recipes/src/bsd_audio_drv/used_apis index c6939f5a67..d4828db7e1 100644 --- a/repos/dde_bsd/recipes/src/bsd_audio_drv/used_apis +++ b/repos/dde_bsd/recipes/src/bsd_audio_drv/used_apis @@ -1,5 +1,6 @@ base os +format audio_in_session audio_out_session platform_session diff --git a/repos/dde_bsd/src/drivers/audio/pci_audio_drv/target.mk b/repos/dde_bsd/src/drivers/audio/pci_audio_drv/target.mk index 00a3f837c9..de93aacb7a 100644 --- a/repos/dde_bsd/src/drivers/audio/pci_audio_drv/target.mk +++ b/repos/dde_bsd/src/drivers/audio/pci_audio_drv/target.mk @@ -1,7 +1,7 @@ REQUIRES = x86 TARGET = pci_audio_drv SRC_CC = main.cc -LIBS = dde_bsd_audio base +LIBS = dde_bsd_audio base format INC_DIR += $(REP_DIR)/include vpath %.cc $(REP_DIR)/src/drivers/audio diff --git a/repos/dde_bsd/src/lib/audio/driver.cc b/repos/dde_bsd/src/lib/audio/driver.cc index ba34fa8e28..63710b7578 100644 --- a/repos/dde_bsd/src/lib/audio/driver.cc +++ b/repos/dde_bsd/src/lib/audio/driver.cc @@ -19,6 +19,9 @@ #include #include +/* format-string includes */ +#include + /* local includes */ #include