[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT/NEWLIB PATCH 10/16] sys/user.h: Import from musl


  • To: minios-devel@xxxxxxxxxxxxx
  • From: Costin Lupu <costin.lupu@xxxxxxxxx>
  • Date: Thu, 22 Aug 2019 13:10:50 +0300
  • Cc: felipe.huici@xxxxxxxxx, charalampos.mainas@xxxxxxxxx
  • Delivery-date: Thu, 22 Aug 2019 10:11:20 +0000
  • Ironport-phdr: 9a23:Hdifkx3+uWr9mGXismDT+DRfVm0co7zxezQtwd8ZseMVKPad9pjvdHbS+e9qxAeQG9mCsbQd17ed6fuocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmSSxbalvIBi5rQjdudcajIV/Iast1xXFpWdFdf5Lzm1yP1KTmBj85sa0/JF99ilbpuws+c1dX6jkZqo0VbNXAigoPGAz/83rqALMTRCT6XsGU2UZiQRHDg7Y5xznRJjxsy/6tu1g2CmGOMD9UL45VSi+46ptVRTljjoMOTwk/2HNksF+jLxVrg+vqRJ8xIDbYo+VOeFicq/BZ94WWXBMUtpNWyFHH4iyb5EPD+0EPetAsYT9oEAOrQe/BQmqGejhzCJIhmfr3aYn1OkuDQbG3Bc8H9IPtnTYttH1NLoKUeCo16TH0S7DY+lO2Tfg84fEaAohofaVUL92bMHfx04vFwbfgVWRr4zoJzaV1vkWs2if9uZgUeOvhHU7pA1rpTiv3Mgsh4/UjYwW0lDJ7Th1zYkoKdGiS0N2YcSoHIVOuyyYLYd7TNsuT3xntSon0LELup62cDIUxJkpyRPTceGLfoeW7h/lSe2fOy13hGh/d7K6nxuy9E+gxfDiWcSsy1ZKqzZFksHLtnAQyxzf8siHReV5/kemwTuPyQXT5ftFIUAwj6bUN4UhzqQolpoOqkvPBDX2mELugK+XcEUr5PSo5vz6brjpu5OQLYx5hwHkPqgwhMCyA/40PwYWU2ie4+u81bnj/UPjQLVNi/07irXWsJfBJcQHp665BRVZ0oI+6xanEjery8gXnWIdIFJdZRKIlJLlO0vJIPzgF/ewn0yskCt3x/DBJrDhB5TNLn7CkLfmZrZx8lNTxxQtzd9B45JZEbUBIPPoWk/tr9zUFBA4PBKyw+r9D9V9zIweU3qVAqCFKKPSrUOI5uU3LuaQZI8aoiz9JOIh5/H0iH85gVgdfbKz0ZsScn+4H/JmLF+CYXf3hNcOD3sFvg4kQ+PxklGNTyNTbW6oX60g/jE7FJ6mDYDbS4CjnrOB2Ca7HoVIaWxcClCMDHboeJmFW/oXbiKdPNNukjgeWre6UYMuywyu50fGzO9iL+zV/TZduZ/92dxd4+zIiQp05TFyScOH3DKjVWZxy0gPXCM32uhbvFRgggOI1rNkgvoeEcFL+ttCSUEiKJSa1essWIO6YR7IYtrcEAXued6hGzxkFt8=
  • Ironport-sdr: J9XyEQzrB6XMAJ1lSa7uzI+zHdBlzPhVuVinZFrib1zw0LyzQJLtBu+Z16eZ0F3fj0BJvNSxrY 7xZBAhBnvvIg==
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>

Copied as is from the official musl git mirror
git://git.musl-libc.org/musl, commit 6fcb440d.

Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
 musl-imported/arch/x86_64/bits/user.h | 41 +++++++++++++++++++++++++++
 musl-imported/include/sys/user.h      | 16 +++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 musl-imported/arch/x86_64/bits/user.h
 create mode 100644 musl-imported/include/sys/user.h

diff --git a/musl-imported/arch/x86_64/bits/user.h 
b/musl-imported/arch/x86_64/bits/user.h
new file mode 100644
index 0000000..4073cc0
--- /dev/null
+++ b/musl-imported/arch/x86_64/bits/user.h
@@ -0,0 +1,41 @@
+#undef __WORDSIZE
+#define __WORDSIZE 64
+
+typedef struct user_fpregs_struct {
+       uint16_t cwd, swd, ftw, fop;
+       uint64_t rip, rdp;
+       uint32_t mxcsr, mxcr_mask;
+       uint32_t st_space[32], xmm_space[64], padding[24];
+} elf_fpregset_t;
+
+struct user_regs_struct {
+       unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8;
+       unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip;
+       unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs;
+};
+#define ELF_NGREG 27
+typedef unsigned long long elf_greg_t, elf_gregset_t[ELF_NGREG];
+
+struct user {
+       struct user_regs_struct         regs;
+       int                             u_fpvalid;
+       struct user_fpregs_struct       i387;
+       unsigned long                   u_tsize;
+       unsigned long                   u_dsize;
+       unsigned long                   u_ssize;
+       unsigned long                   start_code;
+       unsigned long                   start_stack;
+       long                            signal;
+       int                             reserved;
+       struct user_regs_struct         *u_ar0;
+       struct user_fpregs_struct       *u_fpstate;
+       unsigned long                   magic;
+       char                            u_comm[32];
+       unsigned long                   u_debugreg[8];
+};
+
+#define PAGE_MASK              (~(PAGESIZE-1))
+#define NBPG                   PAGESIZE
+#define UPAGES                 1
+#define HOST_TEXT_START_ADDR   (u.start_code)
+#define HOST_STACK_END_ADDR    (u.start_stack + u.u_ssize * NBPG)
diff --git a/musl-imported/include/sys/user.h b/musl-imported/include/sys/user.h
new file mode 100644
index 0000000..96a0340
--- /dev/null
+++ b/musl-imported/include/sys/user.h
@@ -0,0 +1,16 @@
+#ifndef _SYS_USER_H
+#define _SYS_USER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <limits.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include <bits/user.h>
+
+#ifdef __cplusplus
+}
+#endif
+#endif
-- 
2.20.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.