qemu-patch-raspberry4/linux-user/microblaze/syscall.h
Peter Maydell 4ce6243dc6 linux-user: Clean up handling of clone() argument order
Linux manages to have three separate orderings of the arguments to
the clone() syscall on different architectures. In the kernel these
are selected via CONFIG_CLONE_BACKWARDS and CONFIG_CLONE_BACKWARDS2.
Clean up our implementation of this to use similar #define names
rather than a TARGET_* ifdef ladder.

This includes behaviour changes fixing bugs on cris, x86-64, m68k,
openrisc and unicore32.  cris had explicit but wrong handling; the
others were just incorrectly using QEMU's default, which happened
to be the equivalent of CONFIG_CLONE_BACKWARDS. (unicore32 appears
to be broken in the mainline kernel in that it tries to use arg3 for
both parent_tidptr and newtls simultaneously -- we don't attempt
to emulate this bug...)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2013-07-22 21:54:36 +03:00

54 lines
1.4 KiB
C

#ifndef MICROBLAZE_SYSCALLS_H
#define MICROBLAZE_SYSCALLS_H 1
#define UNAME_MACHINE "microblaze"
/* We use microblaze_reg_t to keep things similar to the kernel sources. */
typedef uint32_t microblaze_reg_t;
struct target_pt_regs {
microblaze_reg_t r0;
microblaze_reg_t r1;
microblaze_reg_t r2;
microblaze_reg_t r3;
microblaze_reg_t r4;
microblaze_reg_t r5;
microblaze_reg_t r6;
microblaze_reg_t r7;
microblaze_reg_t r8;
microblaze_reg_t r9;
microblaze_reg_t r10;
microblaze_reg_t r11;
microblaze_reg_t r12;
microblaze_reg_t r13;
microblaze_reg_t r14;
microblaze_reg_t r15;
microblaze_reg_t r16;
microblaze_reg_t r17;
microblaze_reg_t r18;
microblaze_reg_t r19;
microblaze_reg_t r20;
microblaze_reg_t r21;
microblaze_reg_t r22;
microblaze_reg_t r23;
microblaze_reg_t r24;
microblaze_reg_t r25;
microblaze_reg_t r26;
microblaze_reg_t r27;
microblaze_reg_t r28;
microblaze_reg_t r29;
microblaze_reg_t r30;
microblaze_reg_t r31;
microblaze_reg_t pc;
microblaze_reg_t msr;
microblaze_reg_t ear;
microblaze_reg_t esr;
microblaze_reg_t fsr;
uint32_t kernel_mode;
};
#define TARGET_CLONE_BACKWARDS
#endif