2 Copyright © 2015, The AROS Development Team. All rights reserved.
6 #include <aros/kernel.h>
7 #include <aros/libcall.h>
9 #include "kernel_base.h"
10 #include "kernel_intern.h"
12 AROS_LH0(unsigned int, KrnGetCPUNumber
,
13 struct KernelBase
*, KernelBase
, 37, Kernel
)
17 register unsigned int superSP
;
24 " mov %[superSP], sp \n"
27 : [superSP
] "=r" (superSP
)
28 : [swi_no
] "I" (6 /*SC_SUPERSTATE*/) : "r1"
31 asm volatile (" mrc p15, 0, %0, c0, c0, 5 " : "=r" (tmp
));
38 " mov sp, %[superSP] \n"
39 " cpsie i, %[mode_user] \n"
42 : : [superSP
] "r" (superSP
), [mode_user
] "I" (CPUMODE_USER
) : "r1" );
50 // Uniprocessor System
56 AROS_LH1(unsigned int, KrnGetCPUMask
,
57 AROS_LHA(uint32_t, id
, D0
),
58 struct KernelBase
*, KernelBase
, 37, Kernel
)