Skip to content

Conversation

@mithro
Copy link
Contributor

@mithro 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.

mithro added 4 commits October 8, 2017 18:34
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
Copy link
Contributor

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.

Copy link
Contributor Author

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 ......?

Copy link
Contributor

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.

Copy link
Contributor Author

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) ?


%.elf:
$(LD) $(LDFLAGS) -T $< -N -o $@ \
%.elf: ../libbase/crt0-$(CPU).o ../libnet/libnet.a ../libbase/libbase-nofloat.a ../libcompiler_rt/libcompiler_rt.a
Copy link
Member

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?

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