I'm a newbie in kerel. In a linux kernel macro definition, I saw a line
li r10 trap
I would like to know the use of this 'trap' value. Thanks in advance
I'm a newbie in kerel. In a linux kernel macro definition, I saw a line
li r10 trap
I would like to know the use of this 'trap' value. Thanks in advance
li
is load immediate, r10 is a register, and there should be a comma before trap
which is going to a macro parameter... if you show the line above without the containing macro, that last insight's lost. Basically, it's putting one of the macro parameters into CPU register r10
. Knowing that by itself is just about useless by the way - you ought to get a tutorial that walks you through things in some systematic way. E.g. see http://www.linuxchix.org/content/courses/kernel_hacking/lesson7
It means that the register will be used to generate an exception is necessary.