-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bunch of small fixes #56
base: master
Are you sure you want to change the base?
Conversation
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.
#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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not just GCC, any ABI-compliant compiler (e.g. Clang) can use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I change this to The red zone is generally used for ......
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The red zone is used for". That's its only purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) ?
@@ -12,8 +12,8 @@ all: bios.bin | |||
|
|||
bios.elf: $(BIOS_DIRECTORY)/linker.ld $(OBJECTS) | |||
|
|||
%.elf: | |||
$(LD) $(LDFLAGS) -T $< -N -o $@ \ | |||
%.elf: ../libbase/crt0-$(CPU).o ../libnet/libnet.a ../libbase/libbase-nofloat.a ../libcompiler_rt/libcompiler_rt.a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be merged with the bios.elf
rule?