Home | History | Annotate | Line # | Download | only in alpha
linux_machdep.c revision 1.15.2.9
      1 /*	$NetBSD: linux_machdep.c,v 1.15.2.9 2002/05/29 21:32:29 nathanw Exp $	*/
      2 
      3 /*-
      4  * Copyright (c) 1998 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Eric Haszlakiewicz.
      9  *
     10  * Redistribution and use in source and binary forms, with or without
     11  * modification, are permitted provided that the following conditions
     12  * are met:
     13  * 1. Redistributions of source code must retain the above copyright
     14  *    notice, this list of conditions and the following disclaimer.
     15  * 2. Redistributions in binary form must reproduce the above copyright
     16  *    notice, this list of conditions and the following disclaimer in the
     17  *    documentation and/or other materials provided with the distribution.
     18  * 3. All advertising materials mentioning features or use of this software
     19  *    must display the following acknowledgement:
     20  *	This product includes software developed by the NetBSD
     21  *	Foundation, Inc. and its contributors.
     22  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  *    contributors may be used to endorse or promote products derived
     24  *    from this software without specific prior written permission.
     25  *
     26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  * POSSIBILITY OF SUCH DAMAGE.
     37  *
     38  * Based on sys/arch/i386/i386/linux_machdep.c:
     39  *	linux_machdep.c,v 1.42 1998/09/11 12:50:06 mycroft Exp
     40  *	written by Frank van der Linden
     41  *
     42  */
     43 
     44 #include <sys/cdefs.h>
     45 __KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.15.2.9 2002/05/29 21:32:29 nathanw Exp $");
     46 
     47 #include <sys/param.h>
     48 #include <sys/systm.h>
     49 #include <sys/signalvar.h>
     50 #include <sys/kernel.h>
     51 #include <sys/map.h>
     52 #include <sys/proc.h>
     53 #include <sys/user.h>
     54 #include <sys/buf.h>
     55 #include <sys/reboot.h>
     56 #include <sys/conf.h>
     57 #include <sys/exec.h>
     58 #include <sys/file.h>
     59 #include <sys/callout.h>
     60 #include <sys/malloc.h>
     61 #include <sys/mbuf.h>
     62 #include <sys/msgbuf.h>
     63 #include <sys/mount.h>
     64 #include <sys/vnode.h>
     65 #include <sys/device.h>
     66 #include <sys/sa.h>
     67 #include <sys/syscallargs.h>
     68 #include <sys/filedesc.h>
     69 #include <sys/exec_elf.h>
     70 #include <sys/ioctl.h>
     71 
     72 #include <uvm/uvm_extern.h>
     73 
     74 #include <compat/linux/common/linux_types.h>
     75 #include <compat/linux/common/linux_signal.h>
     76 #include <compat/linux/common/linux_siginfo.h>
     77 #include <compat/linux/common/linux_util.h>
     78 #include <compat/linux/common/linux_ioctl.h>
     79 #include <compat/linux/common/linux_exec.h>
     80 #include <compat/linux/common/linux_machdep.h>
     81 #include <compat/linux/common/linux_emuldata.h>
     82 
     83 #include <compat/linux/linux_syscallargs.h>
     84 
     85 #include <machine/alpha.h>
     86 #include <machine/reg.h>
     87 
     88 #if defined(_KERNEL_OPT)
     89 #include "wsdisplay.h"
     90 #endif
     91 #if (NWSDISPLAY >0)
     92 #include <dev/wscons/wsdisplay_usl_io.h>
     93 #endif
     94 #ifdef DEBUG
     95 #include <machine/sigdebug.h>
     96 #endif
     97 
     98 /*
     99  * Deal with some alpha-specific things in the Linux emulation code.
    100  */
    101 
    102 void
    103 linux_setregs(l, epp, stack)
    104 	struct lwp *l;
    105 	struct exec_package *epp;
    106 	u_long stack;
    107 {
    108 #ifdef DEBUG
    109 	struct trapframe *tfp = l->l_md.md_tf;
    110 #endif
    111 
    112 	setregs(l, epp, stack);
    113 #ifdef DEBUG
    114 	/*
    115 	 * Linux has registers set to zero on entry; for DEBUG kernels
    116 	 * the alpha setregs() fills registers with 0xbabefacedeadbeef.
    117 	 */
    118 	memset(tfp->tf_regs, 0, FRAME_SIZE * sizeof tfp->tf_regs[0]);
    119 #endif
    120 }
    121 
    122 void setup_linux_rt_sigframe(tf, sig, mask)
    123 	struct trapframe *tf;
    124 	int sig;
    125 	sigset_t *mask;
    126 {
    127 	struct lwp *l = curproc;
    128 	struct proc *p = l->l_proc;
    129 	struct linux_rt_sigframe *sfp, sigframe;
    130 	int onstack;
    131 	int fsize, rndfsize;
    132 	extern char linux_rt_sigcode[], linux_rt_esigcode[];
    133 
    134 	/* Do we need to jump onto the signal stack? */
    135 	onstack = (p->p_sigctx.ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
    136 		  (SIGACTION(p, sig).sa_flags & SA_ONSTACK) != 0;
    137 
    138 	/* Allocate space for the signal handler context.  */
    139 	fsize = sizeof(struct linux_rt_sigframe);
    140 	rndfsize = ((fsize + 15) / 16) * 16;
    141 
    142 	if (onstack)
    143 		sfp = (struct linux_rt_sigframe *)
    144 					((caddr_t)p->p_sigctx.ps_sigstk.ss_sp +
    145 						p->p_sigctx.ps_sigstk.ss_size);
    146 	else
    147 		sfp = (struct linux_rt_sigframe *)(alpha_pal_rdusp());
    148 	sfp = (struct linux_rt_sigframe *)((caddr_t)sfp - rndfsize);
    149 
    150 #ifdef DEBUG
    151 	if ((sigdebug & SDB_KSTACK) && (p->p_pid == sigpid))
    152 		printf("linux_sendsig(%d): sig %d ssp %p usp %p\n", p->p_pid,
    153 		    sig, &onstack, sfp);
    154 #endif /* DEBUG */
    155 
    156 	/*
    157 	 * Build the signal context to be used by sigreturn.
    158 	 */
    159 	bzero(&sigframe.uc, sizeof(struct linux_ucontext));
    160 	sigframe.uc.uc_mcontext.sc_onstack = onstack;
    161 
    162 	/* Setup potentially partial signal mask in sc_mask. */
    163 	/* But get all of it in uc_sigmask */
    164 	native_to_linux_old_sigset(&sigframe.uc.uc_mcontext.sc_mask, mask);
    165 	native_to_linux_sigset(&sigframe.uc.uc_sigmask, mask);
    166 
    167 	sigframe.uc.uc_mcontext.sc_pc = tf->tf_regs[FRAME_PC];
    168 	sigframe.uc.uc_mcontext.sc_ps = ALPHA_PSL_USERMODE;
    169 	frametoreg(tf, (struct reg *)sigframe.uc.uc_mcontext.sc_regs);
    170 	sigframe.uc.uc_mcontext.sc_regs[R_SP] = alpha_pal_rdusp();
    171 
    172 	alpha_enable_fp(l, 1);
    173 	sigframe.uc.uc_mcontext.sc_fpcr = alpha_read_fpcr();
    174 	sigframe.uc.uc_mcontext.sc_fp_control = alpha_read_fp_c(l);
    175 	alpha_pal_wrfen(0);
    176 
    177 	sigframe.uc.uc_mcontext.sc_traparg_a0 = tf->tf_regs[FRAME_A0];
    178 	sigframe.uc.uc_mcontext.sc_traparg_a1 = tf->tf_regs[FRAME_A1];
    179 	sigframe.uc.uc_mcontext.sc_traparg_a2 = tf->tf_regs[FRAME_A2];
    180 
    181 	/*
    182 	 * XXX XAX Create bogus siginfo data.  This can't really
    183 	 * XXX be fixed until NetBSD has realtime signals.
    184 	 * XXX Or we do the emuldata thing.
    185 	 * XXX -erh
    186 	 */
    187 	bzero(&sigframe.info, sizeof(struct linux_siginfo));
    188 	sigframe.info.lsi_signo = sig;
    189 	sigframe.info.lsi_code = LINUX_SI_USER;
    190 	sigframe.info.lsi_pid = p->p_pid;
    191 	sigframe.info.lsi_uid = p->p_ucred->cr_uid;	/* Use real uid here? */
    192 
    193 	if (copyout((caddr_t)&sigframe, (caddr_t)sfp, fsize) != 0) {
    194 #ifdef DEBUG
    195 		if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
    196 			printf("sendsig(%d): copyout failed on sig %d\n",
    197 			    p->p_pid, sig);
    198 #endif
    199 		/*
    200 		 * Process has trashed its stack; give it an illegal
    201 		 * instruction to halt it in its tracks.
    202 		 */
    203 		sigexit(l, SIGILL);
    204 		/* NOTREACHED */
    205 	}
    206 
    207 	/* Pass pointers to siginfo and ucontext in the regs */
    208 	tf->tf_regs[FRAME_A1] = (unsigned long)&sfp->info;
    209 	tf->tf_regs[FRAME_A2] = (unsigned long)&sfp->uc;
    210 
    211 	/* Address of trampoline code.  End up at this PC after mi_switch */
    212 	tf->tf_regs[FRAME_PC] =
    213 	    (u_int64_t)(p->p_psstr - (linux_rt_esigcode - linux_rt_sigcode));
    214 
    215 	/* Adjust the stack */
    216 	alpha_pal_wrusp((unsigned long)sfp);
    217 
    218 	/* Remember that we're now on the signal stack. */
    219 	if (onstack)
    220 		p->p_sigctx.ps_sigstk.ss_flags |= SS_ONSTACK;
    221 }
    222 
    223 void setup_linux_sigframe(tf, sig, mask)
    224 	struct trapframe *tf;
    225 	int sig;
    226 	sigset_t *mask;
    227 {
    228 	struct lwp *l = curproc;
    229 	struct proc *p = l->l_proc;
    230 	struct linux_sigframe *sfp, sigframe;
    231 	int onstack;
    232 	int fsize, rndfsize;
    233 	extern char linux_sigcode[], linux_esigcode[];
    234 
    235 	/* Do we need to jump onto the signal stack? */
    236 	onstack = (p->p_sigctx.ps_sigstk.ss_flags & (SS_DISABLE | SS_ONSTACK)) == 0 &&
    237 		  (SIGACTION(p, sig).sa_flags & SA_ONSTACK) != 0;
    238 
    239 	/* Allocate space for the signal handler context.  */
    240 	fsize = sizeof(struct linux_sigframe);
    241 	rndfsize = ((fsize + 15) / 16) * 16;
    242 
    243 	if (onstack)
    244 		sfp = (struct linux_sigframe *)
    245 					((caddr_t)p->p_sigctx.ps_sigstk.ss_sp +
    246 						p->p_sigctx.ps_sigstk.ss_size);
    247 	else
    248 		sfp = (struct linux_sigframe *)(alpha_pal_rdusp());
    249 	sfp = (struct linux_sigframe *)((caddr_t)sfp - rndfsize);
    250 
    251 #ifdef DEBUG
    252 	if ((sigdebug & SDB_KSTACK) && (p->p_pid == sigpid))
    253 		printf("linux_sendsig(%d): sig %d ssp %p usp %p\n", p->p_pid,
    254 		    sig, &onstack, sfp);
    255 #endif /* DEBUG */
    256 
    257 	/*
    258 	 * Build the signal context to be used by sigreturn.
    259 	 */
    260 	bzero(&sigframe.sf_sc, sizeof(struct linux_ucontext));
    261 	sigframe.sf_sc.sc_onstack = onstack;
    262 	native_to_linux_old_sigset(&sigframe.sf_sc.sc_mask, mask);
    263 	sigframe.sf_sc.sc_pc = tf->tf_regs[FRAME_PC];
    264 	sigframe.sf_sc.sc_ps = ALPHA_PSL_USERMODE;
    265 	frametoreg(tf, (struct reg *)sigframe.sf_sc.sc_regs);
    266 	sigframe.sf_sc.sc_regs[R_SP] = alpha_pal_rdusp();
    267 
    268 	if (l == fpcurproc) {
    269 	    alpha_pal_wrfen(1);
    270 	    savefpstate(&l->l_addr->u_pcb.pcb_fp);
    271 	    alpha_pal_wrfen(0);
    272 	    sigframe.sf_sc.sc_fpcr = l->l_addr->u_pcb.pcb_fp.fpr_cr;
    273 	    fpcurproc = NULL;
    274 	}
    275 	/* XXX ownedfp ? etc...? */
    276 
    277 	sigframe.sf_sc.sc_traparg_a0 = tf->tf_regs[FRAME_A0];
    278 	sigframe.sf_sc.sc_traparg_a1 = tf->tf_regs[FRAME_A1];
    279 	sigframe.sf_sc.sc_traparg_a2 = tf->tf_regs[FRAME_A2];
    280 
    281 	if (copyout((caddr_t)&sigframe, (caddr_t)sfp, fsize) != 0) {
    282 #ifdef DEBUG
    283 		if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
    284 			printf("sendsig(%d): copyout failed on sig %d\n",
    285 			    p->p_pid, sig);
    286 #endif
    287 		/*
    288 		 * Process has trashed its stack; give it an illegal
    289 		 * instruction to halt it in its tracks.
    290 		 */
    291 		sigexit(l, SIGILL);
    292 		/* NOTREACHED */
    293 	}
    294 
    295 	/* Pass pointers to sigcontext in the regs */
    296 	tf->tf_regs[FRAME_A1] = 0;
    297 	tf->tf_regs[FRAME_A2] = (unsigned long)&sfp->sf_sc;
    298 
    299 	/* Address of trampoline code.  End up at this PC after mi_switch */
    300 	tf->tf_regs[FRAME_PC] =
    301 	    (u_int64_t)(p->p_psstr - (linux_esigcode - linux_sigcode));
    302 
    303 	/* Adjust the stack */
    304 	alpha_pal_wrusp((unsigned long)sfp);
    305 
    306 	/* Remember that we're now on the signal stack. */
    307 	if (onstack)
    308 		p->p_sigctx.ps_sigstk.ss_flags |= SS_ONSTACK;
    309 }
    310 
    311 /*
    312  * Send an interrupt to process.
    313  *
    314  * Stack is set up to allow sigcode stored
    315  * in u. to call routine, followed by kcall
    316  * to sigreturn routine below.  After sigreturn
    317  * resets the signal mask, the stack, and the
    318  * frame pointer, it returns to the user
    319  * specified pc, psl.
    320  */
    321 void
    322 linux_sendsig(catcher, sig, mask, code)
    323 	sig_t catcher;
    324 	int sig;
    325 	sigset_t *mask;
    326 	u_long code;
    327 {
    328 	struct lwp *l = curproc;
    329 	struct trapframe *tf = l->l_md.md_tf;
    330 #ifdef notyet
    331 	struct linux_emuldata *edp;
    332 
    333 	/* Setup the signal frame (and part of the trapframe) */
    334 	/*OLD: if (p->p_sigacts->ps_siginfo & sigmask(sig))*/
    335 /*	XXX XAX this is broken now.  need someplace to store what
    336 	XXX XAX kind of signal handler a signal has.*/
    337 #if 0
    338 	edp = (struct linux_emuldata *)p->p_emuldata;
    339 #else
    340 	edp = 0;
    341 #endif
    342 	if (edp && sigismember(&edp->ps_siginfo, sig))
    343 		setup_linux_rt_sigframe(tf, sig, mask);
    344 	else
    345 #endif /* notyet */
    346 		setup_linux_sigframe(tf, sig, mask);
    347 
    348 	/* Signal handler for trampoline code */
    349 	tf->tf_regs[FRAME_T12] = (u_int64_t)catcher;
    350 	tf->tf_regs[FRAME_A0] = native_to_linux_signo[sig];
    351 
    352 	/*
    353 	 * Linux has a custom restorer option.  To support it we would
    354 	 * need to store an array of restorers and a sigcode block
    355 	 * which knew to use it.  Doesn't seem worth the trouble.
    356 	 * -erh
    357 	 */
    358 
    359 #ifdef DEBUG
    360 	if (sigdebug & SDB_FOLLOW)
    361 		printf("sendsig(%d): pc %lx, catcher %lx\n", l->l_proc->p_pid,
    362 		    tf->tf_regs[FRAME_PC], tf->tf_regs[FRAME_A3]);
    363 	if ((sigdebug & SDB_KSTACK) && l->l_proc->p_pid == sigpid)
    364 		printf("sendsig(%d): sig %d returns\n", l->l_proc->p_pid, sig);
    365 #endif
    366 }
    367 
    368 /*
    369  * System call to cleanup state after a signal
    370  * has been taken.  Reset signal mask and
    371  * stack state from context left by sendsig (above).
    372  * Return to previous pc as specified by context
    373  * left by sendsig.
    374  * Linux real-time signals use a different sigframe,
    375  * but the sigcontext is the same.
    376  */
    377 
    378 int
    379 linux_restore_sigcontext(struct lwp *l, struct linux_sigcontext context,
    380 			 sigset_t *mask)
    381 {
    382 
    383 	struct proc *p = l->l_proc;
    384 	/*
    385 	 * Linux doesn't (yet) have alternate signal stacks.
    386 	 * However, the OSF/1 sigcontext which they use has
    387 	 * an onstack member.  This could be needed in the future.
    388 	 */
    389 	if (context.sc_onstack & LINUX_SA_ONSTACK)
    390 	    p->p_sigctx.ps_sigstk.ss_flags |= SS_ONSTACK;
    391 	else
    392 	    p->p_sigctx.ps_sigstk.ss_flags &= ~SS_ONSTACK;
    393 
    394 	/* Reset the signal mask */
    395 	(void) sigprocmask1(p, SIG_SETMASK, mask, 0);
    396 
    397 	/*
    398 	 * Check for security violations.
    399 	 * Linux doesn't allow any changes to the PSL.
    400 	 */
    401 	if (context.sc_ps != ALPHA_PSL_USERMODE)
    402 	    return(EINVAL);
    403 
    404 	l->l_md.md_tf->tf_regs[FRAME_PC] = context.sc_pc;
    405 	l->l_md.md_tf->tf_regs[FRAME_PS] = context.sc_ps;
    406 
    407 	regtoframe((struct reg *)context.sc_regs, l->l_md.md_tf);
    408 	alpha_pal_wrusp(context.sc_regs[R_SP]);
    409 
    410 	if (l == fpcurproc)
    411 	    fpcurproc = NULL;
    412 
    413 	/* Restore fp regs and fpr_cr */
    414 	bcopy((struct fpreg *)context.sc_fpregs, &l->l_addr->u_pcb.pcb_fp,
    415 	    sizeof(struct fpreg));
    416 	/* XXX sc_ownedfp ? */
    417 	/* XXX sc_fp_control ? */
    418 
    419 #ifdef DEBUG
    420 	if (sigdebug & SDB_FOLLOW)
    421 		printf("linux_rt_sigreturn(%d): returns\n", p->p_pid);
    422 #endif
    423 	return (EJUSTRETURN);
    424 }
    425 
    426 int
    427 linux_sys_rt_sigreturn(l, v, retval)
    428 	struct lwp *l;
    429 	void *v;
    430 	register_t *retval;
    431 {
    432 	struct linux_sys_rt_sigreturn_args /* {
    433 		syscallarg(struct linux_rt_sigframe *) sfp;
    434 	} */ *uap = v;
    435 	struct linux_rt_sigframe *sfp, sigframe;
    436 	sigset_t mask;
    437 
    438 	/*
    439 	 * The trampoline code hands us the context.
    440 	 * It is unsafe to keep track of it ourselves, in the event that a
    441 	 * program jumps out of a signal handler.
    442 	 */
    443 
    444 	sfp = SCARG(uap, sfp);
    445 
    446 	if (ALIGN(sfp) != (u_int64_t)sfp)
    447 		return(EINVAL);
    448 
    449 	/*
    450 	 * Fetch the frame structure.
    451 	 */
    452 	if (copyin((caddr_t)sfp, &sigframe,
    453 			sizeof(struct linux_rt_sigframe)) != 0)
    454 		return (EFAULT);
    455 
    456 	/* Grab the signal mask */
    457 	linux_to_native_sigset(&mask, &sigframe.uc.uc_sigmask);
    458 
    459 	return(linux_restore_sigcontext(l, sigframe.uc.uc_mcontext, &mask));
    460 }
    461 
    462 
    463 int
    464 linux_sys_sigreturn(l, v, retval)
    465 	struct lwp *l;
    466 	void *v;
    467 	register_t *retval;
    468 {
    469 	struct linux_sys_sigreturn_args /* {
    470 		syscallarg(struct linux_sigframe *) sfp;
    471 	} */ *uap = v;
    472 	struct linux_sigframe *sfp, frame;
    473 	sigset_t mask;
    474 
    475 	/*
    476 	 * The trampoline code hands us the context.
    477 	 * It is unsafe to keep track of it ourselves, in the event that a
    478 	 * program jumps out of a signal handler.
    479 	 */
    480 
    481 	sfp = SCARG(uap, sfp);
    482 	if (ALIGN(sfp) != (u_int64_t)sfp)
    483 		return(EINVAL);
    484 
    485 	/*
    486 	 * Fetch the frame structure.
    487 	 */
    488 	if (copyin((caddr_t)sfp, &frame, sizeof(struct linux_sigframe)) != 0)
    489 		return(EFAULT);
    490 
    491 	/* Grab the signal mask. */
    492 	/* XXX use frame.extramask */
    493 	linux_old_to_native_sigset(&mask, frame.sf_sc.sc_mask);
    494 
    495 	return(linux_restore_sigcontext(l, frame.sf_sc, &mask));
    496 }
    497 
    498 /*
    499  * We come here in a last attempt to satisfy a Linux ioctl() call
    500  */
    501 /* XXX XAX update this, add maps, etc... */
    502 int
    503 linux_machdepioctl(p, v, retval)
    504 	struct proc *p;
    505 	void *v;
    506 	register_t *retval;
    507 {
    508 	struct linux_sys_ioctl_args /* {
    509 		syscallarg(int) fd;
    510 		syscallarg(u_long) com;
    511 		syscallarg(caddr_t) data;
    512 	} */ *uap = v;
    513 	struct sys_ioctl_args bia;
    514 	u_long com;
    515 
    516 	SCARG(&bia, fd) = SCARG(uap, fd);
    517 	SCARG(&bia, data) = SCARG(uap, data);
    518 	com = SCARG(uap, com);
    519 
    520 	switch (com) {
    521 	default:
    522 		printf("linux_machdepioctl: invalid ioctl %08lx\n", com);
    523 		return EINVAL;
    524 	}
    525 	SCARG(&bia, com) = com;
    526 	/* XXX njwlwp */
    527 	return sys_ioctl(curproc, &bia, retval);
    528 }
    529 
    530 /* XXX XAX fix this */
    531 dev_t
    532 linux_fakedev(dev, raw)
    533 	dev_t dev;
    534 	int raw;
    535 {
    536 	return dev;
    537 }
    538 
    539