From owner-svn-src-head@FreeBSD.ORG Wed Apr 24 02:41:07 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6D8149FB for ; Wed, 24 Apr 2013 02:41:07 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) by mx1.freebsd.org (Postfix) with ESMTP id CFEE91A95 for ; Wed, 24 Apr 2013 02:41:06 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id em20so15715lab.32 for ; Tue, 23 Apr 2013 19:41:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding:x-gm-message-state; bh=2gFaKOsRKHpKCRG3D6EnuZ1DbL/dLoInKSvoh05Qg2s=; b=UwyolPYzjrM/gfADYVPjfl/l0+rpFL9pOEGEwApRmISdCInlbe/MtK/NoMGIpBU0El YSWshzZpksKcqGlUHz6kZEd3KFbXR4hTa1YqYf9pt+xLbSxHXQoUud6iBMXUxDPB14Fp R/lOcgdx4TaYcDqXHXUOmxEZ92ZchAgHB09ZpDy/Cg8ceJJHRJRTIY3M7fy4Y5fguHcS uHlHNkhCICqFO05MRJF1oKM8x6a409Rl9CE/c0r8ZCU+NUayCQ3JHfy/BTDu9500s1Qt dw1LU2+Wis/OgPIxBhjJK0Bzs3b3gDtJ4DmiejXffn2/ZcESaqeS1c/Kd9hg+0/gv+4B 1KeA== X-Received: by 10.152.6.162 with SMTP id c2mr16675568laa.20.1366771264798; Tue, 23 Apr 2013 19:41:04 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.28.196 with HTTP; Tue, 23 Apr 2013 19:40:44 -0700 (PDT) In-Reply-To: <201304230938.r3N9cIV0047961@svn.freebsd.org> References: <201304230938.r3N9cIV0047961@svn.freebsd.org> From: Juli Mallett Date: Tue, 23 Apr 2013 19:40:44 -0700 X-Google-Sender-Auth: qpMlfApFY2H2AjHjnjLbROo-7Ws Message-ID: Subject: Re: svn commit: r249790 - in head/sys/mips: include mips To: Warner Losh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQm9SV31vilpkkotRsIaSLRq5i/K1yws8VNbm65AOfwYwfRB3qH3fAcv7Fjwjom9ZafzWyBv Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2013 02:41:07 -0000 Also: the comment says that the trapframe layout must match regnum.h =E2=80= =94 I don't think that's really true. Why can't we just store things in the trapframe in whatever order we want? Why do they need to match the register numbers. More worrying, however, is that looking at regnum.h brought to my attention the fact that Juniper filed the original license off of the file, and placed a copyright without a license. The same file seems to have been published by SGI under a proprietary/unpublished copyright and under the GPL for Linux, but it's not clear to me that there's a public domain copy that it would have been acceptable for Juniper to assert sole copyright over. It's also definitely unacceptable that Juniper didn't provide a license for that file. I don't see why we shouldn't just replace regnum.h with the NetBSD version, and merge that to all active branches. Since you're trying to update these headers, Warner, it would be great if you could do that. I wish the project had never accepted any code for the MIPS port from Juniper, given their penchant (like OpenBSD's MIPS port =E2=80=94 what is i= t about MIPS ports?) for filing licenses off and placing on their own (or in Juniper's case, none at all.) That's just not acceptable for an open-source project. Juli. On Tue, Apr 23, 2013 at 2:38 AM, Warner Losh wrote: > Author: imp > Date: Tue Apr 23 09:38:18 2013 > New Revision: 249790 > URL: http://svnweb.freebsd.org/changeset/base/249790 > > Log: > Update trapframe to be consistent with the changes made to regnum.h. Th= is > should fix the booting problems people have been seeing. > > Modified: > head/sys/mips/include/frame.h > head/sys/mips/include/regnum.h > head/sys/mips/mips/db_interface.c > head/sys/mips/mips/trap.c > head/sys/mips/mips/vm_machdep.c > > Modified: head/sys/mips/include/frame.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/include/frame.h Tue Apr 23 06:37:50 2013 (= r249789) > +++ head/sys/mips/include/frame.h Tue Apr 23 09:38:18 2013 (= r249790) > @@ -37,6 +37,8 @@ > #ifndef _MACHINE_FRAME_H_ > #define _MACHINE_FRAME_H_ > > +/* Note: This must also match regnum.h and regdef.h */ > + > struct trapframe { > register_t zero; > register_t ast; > @@ -46,6 +48,16 @@ struct trapframe { > register_t a1; > register_t a2; > register_t a3; > +#if defined(__mips_n32) || defined(__mips_n64) > + register_t a4; > + register_t a5; > + register_t a6; > + register_t a7; > + register_t t0; > + register_t t1; > + register_t t2; > + register_t t3; > +#else > register_t t0; > register_t t1; > register_t t2; > @@ -54,6 +66,7 @@ struct trapframe { > register_t t5; > register_t t6; > register_t t7; > +#endif > register_t s0; > register_t s1; > register_t s2; > > Modified: head/sys/mips/include/regnum.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/include/regnum.h Tue Apr 23 06:37:50 2013 (= r249789) > +++ head/sys/mips/include/regnum.h Tue Apr 23 09:38:18 2013 (= r249790) > @@ -87,10 +87,10 @@ > #define T1 9 > #define T2 10 > #define T3 11 > -#define TA0 12 > -#define TA1 13 > -#define TA2 14 > -#define TA3 15 > +#define T4 12 > +#define T5 13 > +#define T6 14 > +#define T7 15 > #endif > #define S0 16 > #define S1 17 > > Modified: head/sys/mips/mips/db_interface.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/mips/db_interface.c Tue Apr 23 06:37:50 2013 (= r249789) > +++ head/sys/mips/mips/db_interface.c Tue Apr 23 09:38:18 2013 (= r249790) > @@ -77,6 +77,16 @@ struct db_variable db_regs[] =3D { > { "a1", DB_OFFSET(a1), db_frame }, > { "a2", DB_OFFSET(a2), db_frame }, > { "a3", DB_OFFSET(a3), db_frame }, > +#if defined(__mips_n32) || defined(__mips_n64) > + { "a4", DB_OFFSET(a4), db_frame }, > + { "a5", DB_OFFSET(a5), db_frame }, > + { "a6", DB_OFFSET(a6), db_frame }, > + { "a7", DB_OFFSET(a7), db_frame }, > + { "t0", DB_OFFSET(t0), db_frame }, > + { "t1", DB_OFFSET(t1), db_frame }, > + { "t2", DB_OFFSET(t2), db_frame }, > + { "t3", DB_OFFSET(t3), db_frame }, > +#else > { "t0", DB_OFFSET(t0), db_frame }, > { "t1", DB_OFFSET(t1), db_frame }, > { "t2", DB_OFFSET(t2), db_frame }, > @@ -85,6 +95,7 @@ struct db_variable db_regs[] =3D { > { "t5", DB_OFFSET(t5), db_frame }, > { "t6", DB_OFFSET(t6), db_frame }, > { "t7", DB_OFFSET(t7), db_frame }, > +#endif > { "s0", DB_OFFSET(s0), db_frame }, > { "s1", DB_OFFSET(s1), db_frame }, > { "s2", DB_OFFSET(s2), db_frame }, > > Modified: head/sys/mips/mips/trap.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/mips/trap.c Tue Apr 23 06:37:50 2013 (r249789) > +++ head/sys/mips/mips/trap.c Tue Apr 23 09:38:18 2013 (r249790) > @@ -363,10 +363,10 @@ cpu_fetch_syscall_args(struct thread *td > /* > * Non-o32 ABIs support more arguments in registe= rs. > */ > - sa->args[3] =3D locr0->t4; > - sa->args[4] =3D locr0->t5; > - sa->args[5] =3D locr0->t6; > - sa->args[6] =3D locr0->t7; > + sa->args[3] =3D locr0->t0; > + sa->args[4] =3D locr0->t1; > + sa->args[5] =3D locr0->t2; > + sa->args[6] =3D locr0->t3; > nsaved +=3D 4; > #ifdef COMPAT_FREEBSD32 > } > @@ -389,10 +389,10 @@ cpu_fetch_syscall_args(struct thread *td > /* > * Non-o32 ABIs support more arguments in registe= rs. > */ > - sa->args[4] =3D locr0->t4; > - sa->args[5] =3D locr0->t5; > - sa->args[6] =3D locr0->t6; > - sa->args[7] =3D locr0->t7; > + sa->args[4] =3D locr0->t0; > + sa->args[5] =3D locr0->t1; > + sa->args[6] =3D locr0->t2; > + sa->args[7] =3D locr0->t3; > nsaved +=3D 4; > #ifdef COMPAT_FREEBSD32 > } > @@ -1294,12 +1294,19 @@ log_frame_dump(struct trapframe *frame) > log(LOG_ERR, "\ta0: %#jx\ta1: %#jx\ta2: %#jx\ta3: %#jx\n", > (intmax_t)frame->a0, (intmax_t)frame->a1, (intmax_t)frame->a2= , (intmax_t)frame->a3); > > +#if defined(__mips_n32) || defined(__mips_n64) > + log(LOG_ERR, "\ta4: %#jx\ta5: %#jx\ta6: %#jx\ta6: %#jx\n", > + (intmax_t)frame->a4, (intmax_t)frame->a5, (intmax_t)frame->a6= , (intmax_t)frame->a7); > + > + log(LOG_ERR, "\tt0: %#jx\tt1: %#jx\tt2: %#jx\tt3: %#jx\n", > + (intmax_t)frame->t0, (intmax_t)frame->t1, (intmax_t)frame->t2= , (intmax_t)frame->t3); > +#else > log(LOG_ERR, "\tt0: %#jx\tt1: %#jx\tt2: %#jx\tt3: %#jx\n", > (intmax_t)frame->t0, (intmax_t)frame->t1, (intmax_t)frame->t2= , (intmax_t)frame->t3); > > log(LOG_ERR, "\tt4: %#jx\tt5: %#jx\tt6: %#jx\tt7: %#jx\n", > (intmax_t)frame->t4, (intmax_t)frame->t5, (intmax_t)frame->t6= , (intmax_t)frame->t7); > - > +#endif > log(LOG_ERR, "\tt8: %#jx\tt9: %#jx\ts0: %#jx\ts1: %#jx\n", > (intmax_t)frame->t8, (intmax_t)frame->t9, (intmax_t)frame->s0= , (intmax_t)frame->s1); > > @@ -1334,13 +1341,19 @@ trap_frame_dump(struct trapframe *frame) > > printf("\ta0: %#jx\ta1: %#jx\ta2: %#jx\ta3: %#jx\n", > (intmax_t)frame->a0, (intmax_t)frame->a1, (intmax_t)frame->a2= , (intmax_t)frame->a3); > +#if defined(__mips_n32) || defined(__mips_n64) > + printf("\ta4: %#jx\ta5: %#jx\ta6: %#jx\ta7: %#jx\n", > + (intmax_t)frame->a4, (intmax_t)frame->a5, (intmax_t)frame->a6= , (intmax_t)frame->a7); > > printf("\tt0: %#jx\tt1: %#jx\tt2: %#jx\tt3: %#jx\n", > (intmax_t)frame->t0, (intmax_t)frame->t1, (intmax_t)frame->t2= , (intmax_t)frame->t3); > +#else > + printf("\tt0: %#jx\tt1: %#jx\tt2: %#jx\tt3: %#jx\n", > + (intmax_t)frame->t0, (intmax_t)frame->t1, (intmax_t)frame->t2= , (intmax_t)frame->t3); > > printf("\tt4: %#jx\tt5: %#jx\tt6: %#jx\tt7: %#jx\n", > (intmax_t)frame->t4, (intmax_t)frame->t5, (intmax_t)frame->t6= , (intmax_t)frame->t7); > - > +#endif > printf("\tt8: %#jx\tt9: %#jx\ts0: %#jx\ts1: %#jx\n", > (intmax_t)frame->t8, (intmax_t)frame->t9, (intmax_t)frame->s0= , (intmax_t)frame->s1); > > > Modified: head/sys/mips/mips/vm_machdep.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/mips/mips/vm_machdep.c Tue Apr 23 06:37:50 2013 (= r249789) > +++ head/sys/mips/mips/vm_machdep.c Tue Apr 23 09:38:18 2013 (= r249790) > @@ -613,6 +613,16 @@ dump_trapframe(struct trapframe *trapfra > DB_PRINT_REG(trapframe, a1); > DB_PRINT_REG(trapframe, a2); > DB_PRINT_REG(trapframe, a3); > +#if defined(__mips_n32) || defined(__mips_n64) > + DB_PRINT_REG(trapframe, a4); > + DB_PRINT_REG(trapframe, a5); > + DB_PRINT_REG(trapframe, a6); > + DB_PRINT_REG(trapframe, a7); > + DB_PRINT_REG(trapframe, t0); > + DB_PRINT_REG(trapframe, t1); > + DB_PRINT_REG(trapframe, t2); > + DB_PRINT_REG(trapframe, t3); > +#else > DB_PRINT_REG(trapframe, t0); > DB_PRINT_REG(trapframe, t1); > DB_PRINT_REG(trapframe, t2); > @@ -621,6 +631,7 @@ dump_trapframe(struct trapframe *trapfra > DB_PRINT_REG(trapframe, t5); > DB_PRINT_REG(trapframe, t6); > DB_PRINT_REG(trapframe, t7); > +#endif > DB_PRINT_REG(trapframe, s0); > DB_PRINT_REG(trapframe, s1); > DB_PRINT_REG(trapframe, s2);