From: Alan Cox Date: Wed, 19 Oct 2016 19:46:00 +0000 (+0100) Subject: 68000: for 32bit platforms we need a codebase field X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=41afb190e6108545668b6bb8608a70bcdf8a44a7;p=FUZIX.git 68000: for 32bit platforms we need a codebase field --- diff --git a/Kernel/include/kernel.h b/Kernel/include/kernel.h index 76c2632a..cb3c64cc 100644 --- a/Kernel/include/kernel.h +++ b/Kernel/include/kernel.h @@ -402,6 +402,11 @@ typedef struct p_tab { #endif } p_tab, *ptptr; +/* + * We copy the u_data block between processes when we fork and on some + * platforms it moves. This means that there must be *no* internal pointer + * references to the udata within u_data itself. + */ typedef struct u_data { /**** If you change this top section, also update offsets in "kernel.def" ****/ struct p_tab *u_ptab; /* Process table pointer */ @@ -422,6 +427,9 @@ typedef struct u_data { void * u_isp; /* Value of initial sp (argv) */ usize_t u_top; /* Top of memory for this task */ uaddr_t u_break; /* Top of data space */ +#ifdef CONFIG_32BIT + uaddr_t u_codebase; /* 32bit platform base pointers */ +#endif int (*u_sigvec[NSIGS])(int); /* Array of signal vectors */ /**** If you change this top section, also update offsets in "kernel.def" ****/ diff --git a/Kernel/kernel-68000.def b/Kernel/kernel-68000.def index f3c00c19..b22e4e20 100644 --- a/Kernel/kernel-68000.def +++ b/Kernel/kernel-68000.def @@ -16,7 +16,8 @@ #define U_DATA__U_ARGN2 34 #define U_DATA__U_ARGN3 38 #define U_DATA__U_ISP 42 -#define U_DATA__U_SIGVEC 46 +#define U_DATA__U_CODEBASE 46 +#define U_DATA__U_SIGVEC 50 #define P_TAB__P_STATUS_OFFSET 0 #define P_TAB__P_TTY_OFFSET 1