Skip to content

Conversation

@dreamos82
Copy link
Member

No description provided.

@dreamos82 dreamos82 marked this pull request as draft October 10, 2024 20:16
@dreamos82 dreamos82 marked this pull request as ready for review October 13, 2024 19:03
Relase date: TBD
Sixth Book Release

* _Stivale 2_ protocol sections have been replaced with Limine protocl, since _stivale2_ has been deprecated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protocl -> protocol

Again they can be placed anywhere in the code, since their position will be decided by the section they belongs to.
The last detail is to change the signature of our kernel entry function to:
The last detail is to add the kernel start function (declared in the `ENTRY()` section in the linker script):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you mention below that the entry function doesnt require any particular signature - I think we can remove this sentence and the code snippet below?

```

The above function can be used with the defines in `stivale2.h`, which follow the format `STIVALE2_STRUCT_TAG_xyz_ID`, where `xyz` represents the feature that is described in the tag. For example, the framebuffer would be `STIVALE2_STRUCT_TAG_FRAMEBUFFER_ID` and the memory map is `STIVALE2_STRUCT_TAG_MEMMAP_ID`. It's a little verbose, but easy to search for.
Is important to note, for every type of request the `response` field have a different type, in this case it is a pointer to a `struct limine_framebuffer_response`, for more info on all the available requests, and repsonses refer to the protocl documentation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protocl -> protocol

The above function can be used with the defines in `stivale2.h`, which follow the format `STIVALE2_STRUCT_TAG_xyz_ID`, where `xyz` represents the feature that is described in the tag. For example, the framebuffer would be `STIVALE2_STRUCT_TAG_FRAMEBUFFER_ID` and the memory map is `STIVALE2_STRUCT_TAG_MEMMAP_ID`. It's a little verbose, but easy to search for.
Is important to note, for every type of request the `response` field have a different type, in this case it is a pointer to a `struct limine_framebuffer_response`, for more info on all the available requests, and repsonses refer to the protocl documentation.

The `framebuffer_*` fields can be used to ask for a specific kind of framebuffer, but leaving them to zero tells the bootloader we want to best possible available. The `next` field can be used to point to the next header tag, if we had another one we wanted. The full list of tags is available in the stivale2 specification (see the useful links appendix).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is leftover from stivale2, we should just delete this I think.

This struct points to a list of tags, each containing details about the machine we're booted on. These are called struct tags (bootloader -> kernel) as opposed to the tags we defined before (header tags: kernel -> bootloader). To get info about a specific feature, simply walk the linked list of tags, the next tag's address is available in the `tag->next` field. The end of the list is indicated by a nullptr.
Again they can be placed anywhere in the code, since their position will be decided by the section they belongs to.
The last detail is to add the kernel start function (declared in the `ENTRY()` section in the linker script):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we remove this sentence too, since it referred to the block of code that is now gone :)

@DeanoBurrito
Copy link
Member

lgtm

@DeanoBurrito DeanoBurrito merged commit fc31880 into master Oct 24, 2024
@dreamos82 dreamos82 deleted the stivale_replacement branch September 1, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants