Date: Mon, 1 Aug 2022 15:07:15 +0900 (JST) From: Mori Hiroki <yamori813@yahoo.co.jp> To: Warner Losh <imp@bsdimp.com> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Subject: Re: Re: DSP support Message-ID: <226189806.1427308.1659334035170.JavaMail.yahoo@mail.yahoo.co.jp> In-Reply-To: <CANCZdfqqRSj-SfpbcMcS1QLJ0KgXBF7%2BO8V8fTLL_gC45d1h%2BQ@mail.gmail.com> References: <1730355085.2141074.1652362306262.JavaMail.yahoo.ref@mail.yahoo.co.jp> <1730355085.2141074.1652362306262.JavaMail.yahoo@mail.yahoo.co.jp> <CANCZdfqqRSj-SfpbcMcS1QLJ0KgXBF7%2BO8V8fTLL_gC45d1h%2BQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Thanks for your reply. First I do fixed crash bug by DSP instraction on 74K. diff --git a/sys/mips/include/trap.h b/sys/mips/include/trap.h index a88784f869c5..613df63c47e0 100644 --- a/sys/mips/include/trap.h +++ b/sys/mips/include/trap.h @@ -69,6 +69,7 @@ #define T_C2E 18 /* Exception from coprocessor 2 */ #define T_DWATCH 23 /* Data Watch address refer= ence */ #define T_MCHECK 24 /* Received an MCHECK */ +#define T_DSP 26 /* Not enable DSP ASE */ #define T_VCED 31 /* Virtual coherency data *= / =20 #define T_USER 0x20 /* user-mode flag or'ed wit= h type */ diff --git a/sys/mips/mips/trap.c b/sys/mips/mips/trap.c index 50747ff85dd2..fb92c8dd0f24 100644 --- a/sys/mips/mips/trap.c +++ b/sys/mips/mips/trap.c @@ -894,6 +894,7 @@ trap(struct trapframe *trapframe) } =20 case T_RES_INST + T_USER: + case T_DSP + T_USER: { InstFmt inst; inst =3D *(InstFmt *)(intptr_t)trapframe->pc; ----- Original Message ----- From: "Warner Losh" <imp@bsdimp.com> To: "=E3=82=84 =E3=82=82=E3=82=8A" <yamori813@yahoo.co.jp> Cc: "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org> Date: 2022/05/13 =E9=87=91 03:56 Subject: Re: DSP support On Thu, May 12, 2022 at 7:32 AM Mori Hiroki <yamori813@yahoo.co.jp> wrote: Hi =20 I want DSP support to FreeBSD 12. =20 Ralink 24K have DPS v1. =20 Ralink and Atheros 74k have DSP v1 and v2. =20 I seem NetBSD support DPS on userland. =20 Do you have advice something, please let me know. At the highest level, if you want to use the DSP, you need to save and rest= ore its state when it's being used. NetBSD should have some code to snag for th= at. I'm not familiar enough with toolchains to know the extent to which you'd n= eed userland changes. But you can likely snag those from NetBSD as well, though you may need to use an external toolchain to get support for DSP, since it'= s a bit of a niche part of the architecture. Warner=20 I seem gcc 4.2.1 support mdsp option but not support mdspr2 option. binutil 2.17.50 support dsp and dspr2 instruction. I think not need external toolchain if we use only as by dsp and dpsr2. Thanks Hiroki Mori
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?226189806.1427308.1659334035170.JavaMail.yahoo>