GithubHelp home page GithubHelp logo

ominitay / zigvale Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 86 KB

A Zig implementation of the stivale2 boot protocol

License: MIT License

Zig 99.45% AMPL 0.55%
zig zig-package ziglang osdev stivale stivale2 boot bootloader kernel hacktoberfest zigvale

zigvale's Introduction

Zigvale

Zigvale is a Zig implementation of the stivale2 boot protocol to be used both in kernels and bootloaders. The specification, along with C header files, may be found here.

Example

Visit zigvale-barebones for a bare-bones kernel demonstrating how to use Zigvale.

Add to your project

Zigvale is available on aquila, zpm, and astrolabe.

Gyro

gyro add ominitay/zigvale

Zigmod

Aquila

zigmod aq add 1/Ominitay/zigvale

ZPM

zigmod zpm add zigvale

ZKG

zkg add zigvale

Git

Submodule

git submodule add https://github.com/ominitay/zigvale zigvale

Clone

git clone https://github.com/ominitay/zigvale

Documentation

To generate documentation, run zig build docs

Zig's documentation generator is experimental and incomplete. When documentation generation has improved somewhat, I will host the documentation. In the meantime, you may both read the comments made manually, and read the documentation in the stivale repository.

zigvale's People

Contributors

leecannon avatar ominitay avatar

Stargazers

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

Watchers

 avatar

Forkers

nailuj29

zigvale's Issues

`Header.entry_point` incorrect default value

The default value of Header.entry_point should be null

entry_point: ?fn (*const Struct) callconv(.C) noreturn = 0,

./deps/zigvale/src/stivale2.zig:44:62: error: expected type 'fn(*const .zigvale.src.stivale2.Struct) callconv(.C) noreturn', found 'comptime_int'
    entry_point: ?fn (*const Struct) callconv(.C) noreturn = 0,
                                                             ^

Missing bits in Stivale2 header

the bits for fully virtual kernel mappings (3) and not failing to boot if low memory area could not be allocated (4, should always be set) don't exist in the Header struct

`u1` instead of `bool`

Is there any reason why you have prefered to use u1 instead of bool in packed structs?

Basic hello world example

I'm trying to make a basic kernel that just prints "Hello World" to the terminal, but nothing is printed to the screen. Is there anywhere I can find an example of the proper usage of this library?

Pointer Issues

Pointers are different lengths depending on whether memory addresses are 64 or 32-bits long. This will cause the library to fail on non-64 bit architectures, as the sizes of structs will change. To get around this, pointers should be stored as a u64, and then cast into the correct pointer type.

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.