Skip to content
  • Philippe Gerum's avatar
    cobalt: introduce new common syscall tag · a5856604
    Philippe Gerum authored
    The legacy Cobalt tag sitting on the LSB part of the syscall code did
    not cope well with the requirement for extending the numbering range,
    for supporting the 32->64bit ABI models.
    
    We fix this by reserving bit #28 as a marker for all Cobalt syscalls
    (__COBALT_SYSCALL_BIT), which is still compatible with the I-pipe's
    current syscall routing rules (i.e. call nr >= NR_syscalls being sent
    unconditionally to the head domain).
    
    For all archs, we now have:
    
    nr = syscall_register & ~__COBALT_SYSCALL_BIT.
    
    NOTE: when received, a Cobalt syscall has NOT been cleaned up from any
    ABI mode tag bit which might belong to the host kernel,
    e.g. __X32_SYSCALL_BIT may be present in syscall_register(orig_ax)
    when received for handling an x32 call by a x86_64 host kernel.  Which
    means that in the x32 case, we would have to filter out this extra bit
    as well:
    
    nr = syscall_register & ~(__X32_SYSCALL_BIT|__COBALT_SYSCALL_BIT).
    a5856604