@@ -23,6 +23,7 @@
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
#include "exception.h"
+#include "sysemu/sysemu.h"
#define TO_SPR(group, number) (((group) << 11) + (number))
@@ -249,10 +250,10 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env,
return env->esr;
case TO_SPR(0, 128): /* COREID */
- return 0;
+ return cpu->parent_obj.cpu_index;
case TO_SPR(0, 129): /* NUMCORES */
- return 1;
+ return max_cpus;
case TO_SPR(0, 1024) ... TO_SPR(0, 1024 + (16 * 32)): /* Shadow GPRs */
idx = (spr - 1024);