Giter VIP home page Giter VIP logo

latentprion / zambesii Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 3.0 6.03 MB

Non-unix, custom-API hybrid OS kernel written in C++ which can be thought of as an emulated microkernel. The native API is almost fully asynchronous and the kernel is aimed at high-scaling, high-throughput-requiring multiprocessor workloads, with working support for SMP and NUMA already implemented. Join the IRC channel, #zbz-dev on freenode!

Home Page: http://zambesii.com

License: GNU General Public License v2.0

Shell 0.09% C++ 57.15% Assembly 9.19% C 32.74% Makefile 0.83%
hybrid-kernel os operating-system kernel operating-system-kernel uniform-driver-interface udi smp symmetric-multiprocessing numa

zambesii's People

Contributors

alpha123 avatar latentprion avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

zambesii's Issues

[Resolved]Virtual Box IO-APIC support.

Virtual box fails to route IRQs through to the LAPICs when the kernel masks the i8259 PICs and unmasks pins on the IO-APICs.

ISA IRQ overriding is correctly set-up, and all signs point to the problem not being in the IO-APIC code.

Having looked through Linux source, I may have to probe for and handle possible cases where eccentric routing may need to be used. Could also be the fact that the LAPICs are only half-heartedly initialized for now.

Return to this issue when the CPU initialization sequence has been overhauled.

Check locking MultipleReaderLock assumptions

In several places where we do a readAcquire() and then read locked values, then do a readReleaseWriteAcquire() using the values we read during the readAcquire(), we may be creating bugs.

In particular, consider:

readAcquire();
// Assume that s.rsrc.count == 4, arbitrarily.
newmem = new ExampleClass[s.rsrc.count + 1];
memcpy(newmem, s.rsrc.array, sizeof(*newmem) * s.rsrc.count);

readReleaseWriteAcquire();
s.rsrc.array = newmem;
s.rsrc.counter += 1;
writeRelease();

This is fine if executed by one CPU, but if two CPUs executed it and both of them read the same value from s.rsrc.counter and allocated an array with 5 elements, then CPU0 acquired the write lock and incremented s.rsrc.counter to 5. CPU0 then exits safely.

Then CPU1 acquires the write lock and now it assigns its array of size 5 to s.rsrc.array as well. Then it increments s.rsrc.counter to 6. It then exits.

Now the state is invalid.

Unify these functions

acpiR::madt::sCpu *acpiR::madt::getNextCpuEntry(

You can combine all of the functions into one function with a single large switch, and then create front-end type-safe wrapper functions to eliminate the need to cast the returned table pointer.

The same applies to srat.cpp.

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.