Skip to content
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

[Feature Request] - Initial Boot Record support #8

Open
biggestsonicfan opened this issue Feb 13, 2022 · 5 comments
Open

[Feature Request] - Initial Boot Record support #8

biggestsonicfan opened this issue Feb 13, 2022 · 5 comments

Comments

@biggestsonicfan
Copy link
Collaborator

Greetings,

So I was talking with @DrItanium regarding my disassembly, and they mentioned that the beginning of i960 executable is something called an "Initial Boot Record".

For example this is taken from an .exe:
Screenshot_20220213_005853

This is taken from a PS3 .elf executable:
Screenshot_20220213_005934

This is an example of an i960 Initial Boot Record provided by DrItanium:

Screenshot_20220213_010026

DrItanium goes on to state that a specific example of the Initial Boot Record for the 80960 KX architecture can be found in the NINDY source code file kx_init.s.

For that matter, I think a lot of what's shown in the KX_INIT.S file could (should) be implemented in the disassembly if it's common to basically all 80960 architecture. Granted this could be quite the feat to implement, I feel it would be beneficial for research purposes.

@DrItanium
Copy link

The initial boot record is a common structure on all i960 processors, it is how the cpu boots and is used by the processor extensively during runtime. Using the IBR as the disassembly starting point could even greatly reduce the amount of noise the user has to deal with. This will not apply if the executable is not a "bare-metal" executable but one for an operating system like VxWorks.

There is only one problem, the IBR location is different depending on the target i960 Processor.

Mx -> 0x0000'0000
Kx -> 0x0000'0000
Sx -> 0x0000'0000
Cx -> 0x????'????
Hx -> 0xFEFF'FF30
Jx -> 0xFEFF'FF30
Vx -> 0x????'????
Rx -> 0x????'????

I have some of the manuals for these processors in https://github.com/DrItanium/sim960/tree/main/doc

@mumbel
Copy link
Owner

mumbel commented Feb 14, 2022

ELF/PE are important because those are how relocations and memory mappings are setup. Does this bare metal and/or IBR do anything like that? Does something in the binary actually need to be changed based on those values or just a struct with some pointers? Im not really sure what you're asking for, just to automatically make/assign this struct at that address?

@DrItanium
Copy link

Eep! Sorry about the confusion first off!

Answers:

  1. The IBR does not do any relocations. It is just there to provide a sanity check on boot and tell the CPU where to go and where things are.
  2. It is just a struct with a combination of constants and pointers.
  3. Yes, just automatically make/assign the struct at that address. Nothing more.

@mumbel
Copy link
Owner

mumbel commented Feb 14, 2022

if thats all, i think it should be easy, just a question of piping in java since its just sleigh currently. I'll take a look

@biggestsonicfan
Copy link
Collaborator Author

Well what I was thinking was adding a system which combs out these values initially in the auto-analysis and adds those comments in black explaining what those values are, if that makes sense. I suppose after this area of data is disassembled, using it's addresses would probably be a good starting point for the disassembler in it's analysis to begin branching and analyzing.

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

No branches or pull requests

3 participants