In memory of Ben “bushing” Byer, who passed away on Monday, February 8th, 2016.

Changes

Jump to navigation Jump to search
176 bytes added ,  06:47, 12 April 2023
__sys_read is used, kinda
Line 402: Line 402:  
== Syscalls (via syscall instruction) ==
 
== Syscalls (via syscall instruction) ==
 
These types of syscalls are created with the thumb syscall instruction. When the u16 from retaddr-0x2 matches 0xdfab(intended as thumb "svc 0xab" but ARM "svc 0xdfab" would pass too), it will just return from the exception-handler, otherwise it will do the same thing described [[IOSU|here]] for exceptions. These syscalls are [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjhiea.html RealView semihosting operations] that allow communication with a debugger.<br>
 
These types of syscalls are created with the thumb syscall instruction. When the u16 from retaddr-0x2 matches 0xdfab(intended as thumb "svc 0xab" but ARM "svc 0xdfab" would pass too), it will just return from the exception-handler, otherwise it will do the same thing described [[IOSU|here]] for exceptions. These syscalls are [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjhiea.html RealView semihosting operations] that allow communication with a debugger.<br>
Currently only syscall 0x04 is still used in production versions of IOSU.
+
Currently only syscall 0x04 is still used in production versions of IOSU. Syscall 0x06 is only used for a scanf call in some kind of debug configuration, with the following prompt: "Enter '1' to proceed with kernel startup."
    
<source lang="c">
 
<source lang="c">
Line 426: Line 426:  
| 0x05 || __sys_write || unused  ||
 
| 0x05 || __sys_write || unused  ||
 
|-
 
|-
| 0x06 || __sys_read || unused ||
+
| 0x06 || __sys_read || Reads input from debugger stdin ||
 
|-
 
|-
 
| 0x07 || __sys_readc || unused  ||
 
| 0x07 || __sys_readc || unused  ||

Navigation menu