I want to learn, pls give me some direction

Hi, I want to learn about CPU architecture (MIPS and similar others). I want to learn about their instruction sets and about everything so that I can add support of a device or arch on my own. I'm a quick learner and I know c/c++ programming. When I look at the codes I don't know what is CP0_CAUSE or CP0_EPC or "dmtc0\t%0,"STR(register)"\n\t" or
__BUILD_SET_CP0(conf,CP0_CONF) means.

I want to learn about this things. If there is any book or online tutorial pls give me a proper direction. Do I have to be a CSE graduate to learn about this things ?

1 Like

As a starter for adding new device support:
https://openwrt.org/faq/how_can_i_add_support_for_a_new_device

I read this stuffs quite sometimes ago and I've done some works. My current learning point is the linux kernel level stuffs. I don't understand those assembly things in binutils or gcc or this things like mips_opcode or what is jalr $25 \n" or addu $5, $5, $gp \n" means. Where can I learn the meaning of this things ?

By no means do I know much about low-level systems programming, however this book looks like it would be useful:
https://igm.univ-mlv.fr/~yahya/progsys/linux.pdf

Next time you should specify more informative questions for us to help you, for example, from where you extracted the information you supplied or some kind of reference (A source file, URL of said information etc..)

I'm no expert, but as far as I know, in Assembly(Low-Level Programming Language) you would use machine specific (or OS specific) codes you would send to a specific register(CPU register) in order to execute some kind of function available to you, what you found must be specific to MIPS based CPUs.

A few things that will help you understand some of what you mentioned:

  • Opcodes
  • MIPS specific opcodes - (Please note that these opcodes won't necessarily work for all MIPS CPUs!, this was found by using a simple google search).
  • How a CPU works and some basic Assembly - (This would give you a better understanding of what Registers are and how these opcodes are used with 'MOV' or 'ADD' commands... but as far as I know, for your specific case you Don't have to learn all of it more like just how it works), this video might help you understand CPU architecture better.
  • (EDIT), forgot to mention that those Constants like "CP0_CAUSE" and probably Macros like "__BUILD_SET_CP0(conf,CP0_CONF)" are used by the C language and are probably defined in one of the C Language Header files within the OpenWrt project.

Now what?
You need to get involved.. I can specify all these things but https://openwrt.org/submitting-patches specifies all of them... read it carefully and you will find such places (including here).

Good luck.

2 Likes