Code Monkey home page Code Monkey logo

genodelabs / genode Goto Github PK

View Code? Open in Web Editor NEW
1.0K 83.0 248.0 66.43 MB

Genode OS Framework

Home Page: https://genode.org/

License: Other

Makefile 4.51% C++ 74.04% C 17.87% Assembly 0.59% Ada 0.03% QMake 0.01% QML 0.01% Shell 0.05% HTML 0.61% Tcl 1.28% PHP 0.13% M4 0.03% CSS 0.01% NASL 0.12% Pascal 0.01% Pawn 0.01% Vim Script 0.01% CMake 0.01% BitBake 0.72%
arm cplusplus framework genode goa hypervisor linux microkernel nova object-capabilities

genode's People

Contributors

3dik avatar a-dmg avatar abique avatar alex-ab avatar atopia avatar borismulder-csl avatar chelmuth avatar cnuke avatar cproc avatar ehmry avatar iloskutov avatar jklmnn avatar jschlatow avatar kensan avatar m-stein avatar mewmew avatar nfeske avatar nobodyiii avatar reet- avatar rite avatar rmillo avatar rolandbaer avatar sidhussmann avatar skalk avatar smuellerdd avatar ssumpf avatar throwexception avatar tomga avatar trimpim avatar tworaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

genode's Issues

Review hello tutorial regarding missing build steps (was mantis id 156)

Email on genode-main:

Date: Wed, 21 Sep 2011 14:57:48 +0200
From: Le Bao TRUONG <[email protected]>
To: [email protected]
Subject: Error when tried to build manually Hello Demo

Hi all,

I would like build manually the 'Hello Tutorial' demo. But I have an
error to execute ./core.

I follow the tutorial :

1. Build the server side by make hello/server

2. Build the client side by

make drivers/timer
make hello/client

Then, the tutoriel told me to execute a binary ./core. But I couldn't
find core file in my bin/ directory so I build it by

make core hello/client

Then I execute ./core, my program is stopping at

int main(): --- create local services ---
int main(): --- start init ---
Could not open file "init"
ROM module "init" not present
int main(): transferred 79 MB to init


Would you like give me some advice ?

Thanks,

Le Bao
``

Format_string 64bit issue (was mantis id 21)

When using %x in a format string on 64-bit platforms, the resulting string might get malformed when using a number equally or higher than 0xf0000000. Probably due to conversion errors in the format_string classes.

The following patch includes a test case, that triggers the error on 64-bit Genode/linux and Genode/Fiasco.OC. Just run make run/snprintf.

diff --git a/os/run/snprintf.run b/os/run/snprintf.run
new file mode 100644
--- /dev/null
+++ b/os/run/snprintf.run
@@ -0,0 +1,38 @@
+build "core init test/snprintf"
+
+create_boot_directory
+
+install_config {
+<config>
+   <parent-provides>
+       <service name="ROM"/>
+       <service name="RAM"/>
+       <service name="IRQ"/>
+       <service name="IO_MEM"/>
+       <service name="IO_PORT"/>
+       <service name="CAP"/>
+       <service name="PD"/>
+       <service name="RM"/>
+       <service name="CPU"/>
+       <service name="LOG"/>
+   </parent-provides>
+   <default-route>
+       <any-service> <parent/> <any-child/> </any-service>
+   </default-route>
+   <start name="test-snprintf">
+       <resource name="RAM" quantum="1M"/>
+   </start>
+</config>
+}
+
+build_boot_image "core init test-snprintf"
+
+append qemu_args "-m 64"
+
+run_genode_until "child exited with exit value 0" 10
+
+grep_output {^\[init -> test-snprintf}
+
+compare_output_to {
+[init -> test-snprintf] 0xf0000000
+}
\ No newline at end of file
diff --git a/os/src/test/snprintf/main.cc b/os/src/test/snprintf/main.cc
new file mode 100644
--- /dev/null
+++ b/os/src/test/snprintf/main.cc
@@ -0,0 +1,11 @@
+#include <base/printf.h>
+#include <util/arg_string.h>
+
+int main ()
+{
+   using namespace Genode;
+   static char str[1024];
+   snprintf(str, sizeof(str), "0x%x", 0xf0000000);
+   printf("%s\n", str);
+   return 0;
+}
diff --git a/os/src/test/snprintf/target.mk b/os/src/test/snprintf/target.mk
new file mode 100644
--- /dev/null
+++ b/os/src/test/snprintf/target.mk
@@ -0,0 +1,3 @@
+TARGET = test-snprintf
+LIBS   = cxx env
+SRC_CC = main.cc

Split GPU driver from Gallium3D (was mantis id 40)

Currently, the GPU driver is linked against the Gallium3D program. Consequently, only one program can use the GPU at a time. To allow multiple 3D-graphics application to run at the same time, the GPU driver must be executed as a separate GPU service.

Child::upgrade(...) for base services (was mantis id 20)

Child::upgrade(Session_capability to_session, const char *amount) in e.g.:
base/include/base/child.h is broken for services rm, cpu, ram, and pd.
These services are not in the session pool, and thereby upgrade exists without doing anything.

Remove thread iterator from CPU session (was mantis id 48)

The thread iterator of the CPU session is an ancient relic from a profiling-tool experiment we did together with Torsten Frenzel some years back. In the meantime, we have learned better ways to observe subsystems (by virtualizing core's services) such that these functions are considered obsolete. However, unfortunately, there are a few users of these functions (e.g., OKLinux, which uses these functions to determine its own main-thread capability). We should revisit all current use cases of the thread iterator, change their implementations to use a different mechanism, and remove the thread iterator functions ('first', 'next') from the generic interface.

Autopilot: distinct non-supported run scripts from OK (was mantis id 123)

Some run scripts are not supported on some platforms. This condition is normally caught by some checks at the beginning of the respective run script. If such a check triggers, the run script should exit with a specific exit code that tells 'autopilot' that the script is unsupported on the platform. This way, the autopilot statistics would be even more meaningful.

libSDL on ARM (was mantis id 204)

When trying to compile libSDL on ARM, a compile-time assertion fails:

SDL_stdinc.h:133:1: error: size of array ‘SDL_dummy_enum’ is negative

For now, I have restricted sdl.mk to build the library only on x86 but we should better investigate the issue on ARM.

Support for resizing framebuffers (was mantis id 51)

Support for changing the size of framebuffers is highly desired. One use case is changing screen resolutions at runtime. But more importantly, we want applications to adapt their framebuffer sessions to window-size changes in our future working environment. Intuitively, I would add a way to install a signal handler to a 'Framebuffer_session'. The signal handler receives a signal each time, the framebuffer properties change. So a client can request the new framebuffer information and adapt itself. However, this might not be enough. A client should be able to specify the degree of freedom it is able to deal with. E.g., one client may be able to adapt itself to a changed color depth whereas another client does not.

Separate symbols from binaries using GNU debuglink (was sf id 3023943)

Modern binutils versions 2.18, 2.19, 2.20+ allow splitting of symbols from ELF files, leaving only symbol link in target ELF.
This allows keep symbols separate with release code and makes debugging considerably easier.
E.g. you reference the elf file in gdb/insight "symbol-file foo" -> gdb knows about .debuglink sections and loads the referenced external symbol file.

Example for symbol splitting step for base\mk\prg.mk:

TARGET_DBG = $(INSTALL_DIR)/.debug/$(TARGET).dbg

$(INSTALL_DIR)/$(TARGET): $(TARGET_DBG)
$(MSG_STRIP)$(TARGET)
$(VERBOSE)ln -sf `pwd`/$(TARGET) $@
$(VERBOSE)$(CUSTOM_OBJCOPY) --add-gnu-debuglink=$(TARGET_DBG) --strip-unneeded $(abspath $(TARGET)) $@
$(VERBOSE)chmod 755 $@

$(TARGET_DBG): $(TARGET)
$(MSG_SYMBOLS)$(TARGET)
$(VERBOSE)$(CUSTOM_OBJCOPY) --only-keep-debug $(abspath $<) $@

This would produce an ELF file as usual, stripped of all symbol information "foo" and a file "foo.dbg" containing all symbol info for debugging in ".debug" subfolder.

global.mk:

MSG_SYMBOLS = @$(ECHO) " SYMBOLS "
MSG_STRIP = @$(ECHO) " STRIP+INST "

Fiasco.OC: mainline integration of single-stepping feature

We should try to submit our Fiasco.OC patch for user-level single stepping to the mainline Fiasco.OC development. I.e., posting the patch to l4-hackers, accompanied with the following information:

  • What was the reason to create the patch? (description of the desired feature / use case)
  • How does the patch resolve the problem? How does it fix into the current kernel? (changed syscalls, bits, etc.)
  • Which are the implications for regular Fiasco.OC users? (Fiasco.OC config)
  • Copyright sign-off

Enable -Wconversion compiler flag (was mantis id 134)

GCC manpage about the Wconversion option:

Warn for implicit conversions that may alter a value. This includes conversions between real and integer, like abs (x)' whenx' is double'; conversions between signed and unsigned, likeunsigned ui = -1'; and conversions to smaller types, like sqrtf (M_PI)'. Do not warn for explicit casts likeabs ((int) x)' and ui = (unsigned) -1', or if the value is not changed by the conversion like inabs (2.0)'. Warnings about conversions between signed and unsigned integers can be disabled by using `-Wno-sign-conversion'.

Replace current version of gdtoa (was sf id 3023898)

Please consider completely replacing current genode version of gdtoa (BSD) library with newer one from: http://www.netlib.org/fp/ (gdtoa.tgz)

libc\src\lib\libc\gdtoa*

The reason is that gdtoa code gets miscompiled by gcc 4.4 and later due to bad programming practices (abusing aliasing rules).
For glory details see: http://patrakov.blogspot.com/2009/03/dont-use-old-dtoac.html

Symptoms: hangs on gcc 4.4+ x86 and ARM targets that sprintf double params.

With this update you also need to update:

libc\src\lib\libc\stdio\vfprintf.c
libc\src\lib\libc\stdio\vfwprintf.c
libc\src\lib\libc\stdio\xprintf_float.c

and remove following redefines:

define dtoa __dtoa

define freedtoa __freedtoa

Lock::trylock() (was mantis id 136)

Some contrib code depends on trylock() to implement lock-state-dependent policies. To now, I've not found a way to safely implement this feature outside of Genode::Lock. A prominent example using trylock() is Madwifi.

I/O-APIC routing table parser (was mantis id 147)

On platforms using APIC and not PIC (NOVA, Fiasco.OC) to use certain drivers (like SATA) we need the concrete IRQ -> Device mapping. Parse ACPI, use DSDT in there to find out IRQ -> Device mapping.

Pistachio: rm-fault handling (was mantis id 71)

The RM fault handling on Pistachio does not work yet. The problem seems to be that the pager thread receives page faults as short IPC messages whereas core-local wake-up notifications are sent to the pager as long IPC messages (via the Genode IPC framework). Hence, the pager thread wrongly considers wakeup messages as IPC errors. My proposed solution is to replace the use of the IPC framework (in 'include/base/pager.h') for the core-internal wake-up call by a kernel-specific implementation of 'Pager_object::wake_up'.

For testing, the 'base/run/rm_fault.run' script can be used.

Nitpicker: handle global background if destroyed (was mantis id 29)

Currently, a global background can be assigned by a client. This way, the backdrop program can supply a background image. However, there is no proper handling of the case that this session gets closed. Right now, it never happens (for backdrop started by init) but in general, this should be fixed.

Reconsideration of Parent::exit(status) (was mantis id 139)

The current POSIX-like exit() handling does not fit Genode very well. Additionally, it interferes (historically) with atexit handling and static destructors. By the best the child must assume to be killed right after calling Parent::exit(), which means no finalizers will be called.

Generic flexpage iterator (was mantis id 39)

Handling flexpages is not easy (e.g., look at the unmap code in OKL4). Right now, such code appears at several places. We could improve the situation with a generic flexpage iterator, which takes an address range as constructor argument and generates log2-sized flexpages spanning the whole range.

Linux: explore idea of capability-based security using scm_rights (was mantis id 160)

Linux supports delegation of file descriptors via Unix-domain sockets called "SCM_RIGHTS via ancillary messages" (man 7 unix):

SCM_RIGHTS
  Send or receive a set of open file descriptors from another process.
  The data portion contains an integer array of the file descriptors.
  The passed file descriptors behave as though they have been created
  with dup(2).

A good read seems to be http://www.lst.de/~okir/blackhats/node121.html

PS2: make verbose flags run-time configurable (was mantis id 36)

The verbose flags in the ps2 mouse and keyboard implementation must be defined at compile time. However, the ps2 driver is often used for diagnostic purposes. In such a case, the driver must be recompiled. It would be convenient to have 'verbose_mouse' 'verbose_keyboard' arguments to the config node of the PS/2 driver.

Merge all Genode base libs into one or two (was mantis id 121)

The set of functionality that we always link to Genode programs becomes pretty clear now. It consists of the libraries listed in 'base/mk/base-libs.mk'. To simplify the directory layout and make the distinction between base and non-base libraries more clear, those libraries could be merged into a single 'base' library. In contrast to other static libraries, this base library is guaranteed to be linked only once (to 'ld.lib.so' for dynamic binaries). Core is the only program that does not link to this library. It assembles the needed parts of the library by itself. Eventually, we could use two "base" libraries, namely 'cxx' and 'base' because the library description file for cxx is rather complicated.

Timer: improve granularity by providing usleep (was sf id 3023883)

Please consider adding "void usleep(unsigned us)" method to base interface because some platforms can actually implement such feature.
Opcode "USLEEP" .
On platforms where impl is not possible/feasible you could add default iml that just:

(us < 500) ? msleep(1) : msleep((us + 500)/1000)

To keep abstract interface class, consider something like Session_base with two pure virtual members: msleep, usleep.
class Session : public Session_base which provides default impl of usleep. This way all the current timer drivers/servers code doesnt need to be changed to implement usleep() (even if its dummy).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.