This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Bunch of small fixes#56
Open
mithro wants to merge 4 commits intom-labs:masterfrom
Open
Conversation
Contributor
mithro
commented
Oct 8, 2017
- Bunch of small changes to the Makefile (enabling debug symbols and fixing the dependencies for the bios).
- Fixing the or1k exception stack. This fixes the issues with the or1k locking up when using gcc.
- Extra info when the bios is booting.
Makes it easier to understand what is happening (and that the BIOS is jumping to the right place).
Debugging symbols are useful when using GDB :-)
or1k defines a 128 byte "red zone" after the stack that can not be touched by the exception handler. We also need 128 bytes to store the 32 registers.
This means if the libraries are modified for any reason, the bios will be correctly relinked.
whitequark
reviewed
Oct 8, 2017
| #define EXCEPTION_STACK_SIZE (4*32) | ||
| /* | ||
| * OR1K Architecture has a 128 byte "red zone" after the stack that can not be | ||
| * touched by exception handlers. GCC uses this red zone for locals and |
Contributor
There was a problem hiding this comment.
Not just GCC, any ABI-compliant compiler (e.g. Clang) can use it.
Contributor
Author
There was a problem hiding this comment.
Should I change this to The red zone is generally used for ......?
Contributor
There was a problem hiding this comment.
"The red zone is used for". That's its only purpose.
Contributor
Author
There was a problem hiding this comment.
Well, technically you could use it for anything your heart desires... Maybe I should just remove the The red zone is used for bit and just have a link to the wikipedia article at https://en.wikipedia.org/wiki/Red_zone_(computing) ?
|
|
||
| %.elf: | ||
| $(LD) $(LDFLAGS) -T $< -N -o $@ \ | ||
| %.elf: ../libbase/crt0-$(CPU).o ../libnet/libnet.a ../libbase/libbase-nofloat.a ../libcompiler_rt/libcompiler_rt.a |
Member
There was a problem hiding this comment.
Shouldn't this be merged with the bios.elf rule?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.