NetBSD-Bugs archive

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

Re: port-arm/48948: RPI:pkgsrc/security/ruby-hmac Floating point exception (core dumped)



The following reply was made to PR port-arm/48948; it has been noted by GNATS.

From: Takahiro HAYASHI <t.hash425%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost, port-arm-maintainer%netbsd.org@localhost
Cc: 
Subject: Re: port-arm/48948: RPI:pkgsrc/security/ruby-hmac  Floating point
 exception (core dumped)
Date: Mon, 14 Jul 2014 23:10:28 +0900

 Hello,
 
 Try this patch plz.
 
 It happens after changes on Fri Mar 28 21:39:10 UTC 2014.
 > Various MP changes.
 > http://mail-index.netbsd.org/source-changes/2014/03/28/msg053432.html
 
 Before arm/vfp/vfp_init.c rev 1.37, vfp_attach() reads f0 and f1
 from armreg_mvfr0_read() to only print fpu features list.
 Besides this it reads cpu_media_and_vfp_features[N] from
 armreg_mvfrN_read() (where N=0,1) and uses them to detect fpu features.
 
 On the other hand, in vfp_init.c rev 1.37 or later vfp_attach() uses
 armreg_mvfr0_read() for f0 and f1 (dmesg sez they are same)
 to print and detect fpu features except denormals (FTZ).
 
 I have no idea how to detect fpu correctly, but this patch may help
 if you prefer pre-1.37 behavior.
 
 Thank you.
 
 
 Index: src/sys/arch/arm/vfp/vfp_init.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/arm/vfp/vfp_init.c,v
 retrieving revision 1.40
 diff -p -U 6 -r1.40 vfp_init.c
 --- src/sys/arch/arm/vfp/vfp_init.c    15 Jun 2014 23:07:36 -0000      1.40
 +++ src/sys/arch/arm/vfp/vfp_init.c    14 Jul 2014 11:54:05 -0000
 @@ -331,13 +331,13 @@ vfp_attach(struct cpu_info *ci)
   
        cpu_fpu_present = 1;
        cpu_media_and_vfp_features[0] = armreg_mvfr0_read();
        cpu_media_and_vfp_features[1] = armreg_mvfr1_read();
        if (fpsid != 0) {
                uint32_t f0 = armreg_mvfr0_read();
 -              uint32_t f1 = armreg_mvfr0_read();
 +              uint32_t f1 = armreg_mvfr1_read();
                aprint_normal("vfp%d at %s: %s%s%s%s%s\n",
                    device_unit(ci->ci_dev),
                    device_xname(ci->ci_dev),
                    model,
                    ((f0 & ARM_MVFR0_ROUNDING_MASK) ? ", rounding" : ""),
                    ((f0 & ARM_MVFR0_EXCEPT_MASK) ? ", exceptions" : ""),
 
 -- 
 t-hash
 


Home | Main Index | Thread Index | Old Index