Derrick Lobo | 16 May 18:03
Favicon

pu-m2crypto fails for pkgsrc build Q12012

Hi All
building m2crypto fails with the following error.

Crypto.__m2crypto' extension
swigging SWIG/_m2crypto.i to SWIG/_m2crypto_wrap.c
swig -python -I/usr/pkg/include/python2.6 -I/usr/include -o
SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i
SWIG/_bio.i:64: Warning(454): Setting a pointer/reference variable may leak
memory.
SWIG/_rand.i:21: Warning(454): Setting a pointer/reference variable may leak
memory.
SWIG/_evp.i:159: Warning(454): Setting a pointer/reference variable may leak
memory.
SWIG/_dh.i:36: Warning(454): Setting a pointer/reference variable may leak
memory.
SWIG/_rsa.i:43: Warning(454): Setting a pointer/reference variable may leak
memory.
SWIG/_dsa.i:31: Warning(454): Setting a pointer/reference variable may leak
memory.
SWIG/_ssl.i:214: Warning(454): Setting a pointer/reference variable may leak
memory.
SWIG/_x509.i:323: Warning(454): Setting a pointer/reference variable may
leak memory.
SWIG/_pkcs7.i:44: Warning(454): Setting a pointer/reference variable may
leak memory.
SWIG/_pkcs7.i:44: Warning(454): Setting a pointer/reference variable may
leak memory.
SWIG/_util.i:11: Warning(454): Setting a pointer/reference variable may leak
memory.
SWIG/_ec.i:111: Warning(454): Setting a pointer/reference variable may leak
(Continue reading)

Martin Husemann | 9 May 18:16
Picon

Dell Vostro 200 boot problems

After seeing reports about some Dell machines not being able to boot our
stock install CDs, I walk around the office and tested a -current amd64 CD
on all Dell machines I found.

One of them, a slightly oldish Vostro 200, indeed failed to boot it.

There are two separate problems. First, the usb keyboard is turned into
a legacy pc keyboard via some emulation by the bios. Maybe this can be
turned off, but I didn't want to change too many settings, as it is not
my personal machine.

This, however, is both good an bad. Bad, because the keyboard does not
work - keyboard attaches at pckbc, but later the usb port is blocked
and bios does not give up ownership. Then our usb code disables the port,
and the keyboard is dead. Good, because by booting with -c and disabling
ehci and uhci I get a working keyboard very early, even before ukbd would
have a chance to attach.

Now let us ignore the keyboard problem for now. The machine hangs when it
should discover ATA devices. Everything waits for those to finish probing
and decrementing config defer count - which never happens.

With the keyboard hack I could use ddb and examine: apparently cpu 1 never
makes it to it's idle loop. "mach cpu 1" says it is not paused, ps does
not show the cpu specific threads. Cpu 0 is in the idle loop, a few kernel
threads (like the atabus config one for the first sata controller) have
been created, but never get scheduled. I suppose the half-running cpu
prevents all scheduling (by holding the scheduler lock or something).

When booted with -1 all works fine.
(Continue reading)

Edgar Fuß | 9 May 15:36
Picon
Favicon

linux emulation: rt_sigtimedwait

So I'ved pkgsrc-ed IBM's proprietary Tivoli Storage Manager client, and, on 6.0_BETA/amd64, I get:

 14453  14453 dsmc     CALL  mmap2(0,0x400000,7,0x20022,0xffffffff,0)
 14453  14453 dsmc     RET   mmap2 4212715520/0xfb18f000
 14453  14453 dsmc     CALL  mprotect(0xfb18f000,0x1000,0)
 14453  14453 dsmc     RET   mprotect 0
 14453  14453 dsmc     CALL  clone(0x3d0f00,0xfb58e494,0xfb58ebd8,0xbfffec60,0xfb58ebd8)
 14453  14453 dsmc     RET   clone 29374/0x72be
 14453  14453 dsmc     CALL  select(0,0,0,0,0xbfffed58)
 14453  29374 dsmc     RET   fork 0
 14453  29374 dsmc     CALL  set_robust_list(0xfb58ebe0,0xc)
 14453  29374 dsmc     RET   set_robust_list 0
 14453  29374 dsmc     CALL  rt_sigtimedwait(0x8455b3c,0,0,8,0x841faf8,0xfb58e2f8)
 14453  29374 dsmc     RET   rt_sigtimedwait -1 errno -14 Bad address
 14453  29374 dsmc     CALL  time(0)
 14453  29374 dsmc     RET   time 1336570114/0x4faa7102
 14453  29374 dsmc     CALL  netbsd32_write(3,0xfb58a8d0,0x36)
 14453  29374 dsmc     GIO   fd 3 wrote 54 bytes
       "05/09/12   15:28:34 sigwait failed in pkWaitshutdown.\n"

I have no idea what rt_sigtimewait is. The only thing i do know is I have to get TSM working on this machine.

Any help greatly appreciated.
David Laight | 30 Apr 23:24
Picon

ddb fails to write breakpoint

I tried to set a kerneld db breakpoint on amd64 current (6.99.6) but the
system just dumped - couldn't see why since it all scrolled away.

Attempts to write into code space fault in ddb.
The following makes it work - but is clearly ott.

--- arch/amd64/amd64/db_memrw.c 23 Nov 2011 01:15:02 -0000      1.9
+++ arch/amd64/amd64/db_memrw.c 30 Apr 2012 20:49:21 -0000
@@ -146,6 +146,7 @@ db_write_text(vaddr_t addr, size_t size,
 		pmap_pte_clearbits(ppte, PG_KR);
 		pmap_pte_setbits(ppte, PG_KW);
 		pmap_update_pg(pgva);
+		tlbflushg();

		/*
		 * Page is now writable.  Do as much access as we
@@ -160,6 +161,7 @@ db_write_text(vaddr_t addr, size_t size,
 		pmap_pte_clearbits(ppte, PG_KW);
 		pmap_pte_setbits(ppte, PG_KR);
 		pmap_update_pg(pgva);
+		tlbflushg();

 	} while (size != 0);
 }

pmap_update_pg(addr) is just the single instruction 'invlpg adddr'
tlbflushg() is a full tlb zap.

Not looked at what invlpg is supposed to do, or whether it is
an adequate synchronising instruction.
(Continue reading)

Derrick Lobo | 30 Apr 20:57
Favicon

BETA6.0 - AMD Opetron 6272 (16 core) multiprocessor config crashes

Hi All.

I am using the /201204271810Z/ built version of BETAnetbsd6 on a H8DG6-F, it
has one AMD 6272 with 16 cores..

The server crashes with no errors on the console or logs for a simple
untar.. booting the server with -12(Disable SMP) boots it with one core and
the server is stable..

I have the following turned on the kernel and still don't see a thing in the
logs..

# Diagnostic/debugging support options
options         DIAGNOSTIC      # expensive kernel consistency checks
                                # XXX to be commented out on release branch
options         DEBUG           # expensive debugging checks/support
options         LOCKDEBUG       # expensive locking checks/support
options         KMEMSTATS       # kernel memory statistics (vmstat -m)

options         DDB             # in-kernel debugger
options         DDB_ONPANIC=1   # see also sysctl(8): `ddb.onpanic'
options         DDB_HISTORY_SIZE=512    # enable history editing in DDB
#options        KGDB            # remote debugger
#options        KGDB_DEVNAME="\"com\"",KGDB_DEVADDR=0x3f8,KGDB_DEVRATE=9600

I would definitely like to use the CPU. But seems like betbsd hangs on any
activity.. maybe its some setup that I have incorrect
Regards

Derrick Lobo
(Continue reading)

Scott Burns | 28 Apr 03:59
Favicon

PCI-E U320 controller for amd64 5.1

I am looking for a PCI-E controller to run my new HP 1/8 LTO-4 Autoloader on a HP DL380/G5 Server.

 

The DL380/G5 has 2 half height PCI-E slots and 3 full height PCI-E slots.

 

I see on the supported hardware list the Adaptec AHA-29320LP is supported. This is a PCI-X based card.

 

I have found a AHA-29320LPE which appears to be a PCI-E version of the card.

 

Does anyone have any experience with this PCI-E version of this card on NetBSD/amd64 V5.1?

 

Thank you

Scott…

 

 

 

Attachment (Scott Burns.vcf): text/x-vcard, 5364 bytes
Manuel Bouyer | 21 Apr 22:47

ACPI mapping wrong memory

Hello,
I ran into a problem here, where NetBSD wouldn't boot as Xen dom0.
I tracked it down to ACPI requesting a mapping to a memory area
no allocated to the dom0: the address is just above 4GB.
This looks wrong to me, because such adresss wouldn't work with i386 anyway.
The attached patch got NetBSD/Xen working for me, but with these messages:

mainbus0 (root)
acpi_md_OsMapMemory 0x40e len 2
acpi_md_OsMapMemory 0x9d800 len 1024
acpi_md_OsMapMemory 0xe0000 len 131072
acpi_md_OsMapMemory 0xfacd0 len 36
acpi_md_OsMapMemory 0xd7e70100 len 36
acpi_md_OsMapMemory 0xd7e70100 len 132
acpi_md_OsMapMemory 0xd7e70290 len 36
acpi_md_OsMapMemory 0xd7e70290 len 244
acpi_md_OsMapMemory 0xd7e707c0 len 36
acpi_md_OsMapMemory 0xd7e94000 len 36
acpi_md_OsMapMemory 0xd7e70390 len 36
acpi_md_OsMapMemory 0xd7e70600 len 36
acpi_md_OsMapMemory 0xd7e94040 len 36
acpi_md_OsMapMemory 0xd7e7a7c0 len 36
acpi_md_OsMapMemory 0xd7e7a800 len 36
acpi_md_OsMapMemory 0xd7e7adc0 len 36
acpi_md_OsMapMemory 0xd7e7ae30 len 36
acpi_md_OsMapMemory 0xd7e80360 len 36
acpi_md_OsMapMemory 0xd7e804f0 len 36
acpi_md_OsMapMemory 0xd7e80520 len 36
acpi_md_OsMapMemory 0xd7e806d0 len 36
acpi_md_OsMapMemory 0xd7e707c0 len 26369
acpi_md_OsMapMemory 0xd7e7ae30 len 21796
acpi_md_OsMapMemory 0x40e len 2
acpi_md_OsMapMemory 0x9d800 len 1024
acpi_md_OsMapMemory 0xe0000 len 131072
acpi_md_OsMapMemory 0xfacd0 len 36
acpi_md_OsMapMemory 0xd7e70100 len 36
acpi_md_OsMapMemory 0xd7e70290 len 36
acpi_md_OsMapMemory 0xd7e94000 len 64
acpi_md_OsMapMemory 0xd7e70390 len 624
cpu0 at mainbus0 apid 32: AMD Opteron(tm) Processor 6282 SE              , id 0x600f12
[...]
ioapic0 at mainbus0 apid 0
ioapic1 at mainbus0 apid 1
ioapic2 at mainbus0 apid 2
acpi_md_OsMapMemory 0xd7e70290 len 36
acpi0 at mainbus0: Intel ACPICA 20110623
acpi_md_OsMapMemory 0x40e len 2
acpi_md_OsMapMemory 0x9d800 len 1024
acpi_md_OsMapMemory 0xe0000 len 131072
acpi_md_OsMapMemory 0xfacd0 len 36
acpi_md_OsMapMemory 0xd7e70100 len 36
acpi_md_OsMapMemory 0xd7e70290 len 36
acpi_md_OsMapMemory 0xd7e94065 len 254
acpi_md_OsMapMemory 0xefae0 len 124
acpi_md_OsMapMemory 0xe008800a len 4086
acpi_md_OsMapMemory 0x100000128 len 727
ACPI Error: Could not map memory at 0x0000000100000128, size 727 (20110623/exregion-197)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20110623/evregion-522)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.SATA.PRID.P_D0._STA] (Node
0xfffffe9012ef30a8), AE_NO_MEMORY (20110623/psparse-560)
ACPI Error: Method execution failed [\_SB_.PCI0.SATA.PRID.P_D0._STA] (Node 0xfffffe9012ef30a8),
AE_NO_MEMORY (20110623/uteval-114)
acpi_md_OsMapMemory 0x100000228 len 471
ACPI Error: Could not map memory at 0x0000000100000228, size 471 (20110623/exregion-197)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20110623/evregion-522)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.SATA.PRID.P_D1._STA] (Node
0xfffffe9012ef31f8), AE_NO_MEMORY (20110623/psparse-560)
ACPI Error: Method execution failed [\_SB_.PCI0.SATA.PRID.P_D1._STA] (Node 0xfffffe9012ef31f8),
AE_NO_MEMORY (20110623/uteval-114)
acpi_md_OsMapMemory 0x1000001a8 len 599
ACPI Error: Could not map memory at 0x00000001000001A8, size 599 (20110623/exregion-197)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20110623/evregion-522)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.SATA.SECD.S_D0._STA] (Node
0xfffffe9012ef34f8), AE_NO_MEMORY (20110623/psparse-560)
ACPI Error: Method execution failed [\_SB_.PCI0.SATA.SECD.S_D0._STA] (Node 0xfffffe9012ef34f8),
AE_NO_MEMORY (20110623/uteval-114)
acpi_md_OsMapMemory 0x1000002a8 len 343
ACPI Error: Could not map memory at 0x00000001000002A8, size 343 (20110623/exregion-197)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20110623/evregion-522)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.SATA.SECD.S_D1._STA] (Node
0xfffffe9012ef3648), AE_NO_MEMORY (20110623/psparse-560)
ACPI Error: Method execution failed [\_SB_.PCI0.SATA.SECD.S_D1._STA] (Node 0xfffffe9012ef3648),
AE_NO_MEMORY (20110623/uteval-114)
acpi_md_OsMapMemory 0xd7e94064 len 255
acpi_md_OsMapMemory 0x100000128 len 727
ACPI Error: Could not map memory at 0x0000000100000128, size 727 (20110623/exregion-197)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20110623/evregion-522)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.SATA.PRID.P_D0._STA] (Node
0xfffffe9012ef30a8), AE_NO_MEMORY (20110623/psparse-560)
ACPI Error: Method execution failed [\_SB_.PCI0.SATA.PRID.P_D0._STA] (Node 0xfffffe9012ef30a8),
AE_NO_MEMORY (20110623/uteval-114)
acpi_md_OsMapMemory 0x100000228 len 471
ACPI Error: Could not map memory at 0x0000000100000228, size 471 (20110623/exregion-197)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20110623/evregion-522)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.SATA.PRID.P_D1._STA] (Node
0xfffffe9012ef31f8), AE_NO_MEMORY (20110623/psparse-560)
ACPI Error: Method execution failed [\_SB_.PCI0.SATA.PRID.P_D1._STA] (Node 0xfffffe9012ef31f8),
AE_NO_MEMORY (20110623/uteval-114)
acpi_md_OsMapMemory 0x1000001a8 len 599
ACPI Error: Could not map memory at 0x00000001000001A8, size 599 (20110623/exregion-197)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20110623/evregion-522)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.SATA.SECD.S_D0._STA] (Node
0xfffffe9012ef34f8), AE_NO_MEMORY (20110623/psparse-560)
ACPI Error: Method execution failed [\_SB_.PCI0.SATA.SECD.S_D0._STA] (Node 0xfffffe9012ef34f8),
AE_NO_MEMORY (20110623/uteval-114)
acpi_md_OsMapMemory 0x1000002a8 len 343
ACPI Error: Could not map memory at 0x00000001000002A8, size 343 (20110623/exregion-197)
ACPI Exception: AE_NO_MEMORY, Returned by Handler for [SystemMemory] (20110623/evregion-522)
ACPI Error: Method parse/execution failed [\_SB_.PCI0.SATA.SECD.S_D1._STA] (Node
0xfffffe9012ef3648), AE_NO_MEMORY (20110623/psparse-560)
ACPI Error: Method execution failed [\_SB_.PCI0.SATA.SECD.S_D1._STA] (Node 0xfffffe9012ef3648),
AE_NO_MEMORY (20110623/uteval-114)
acpi_md_OsMapMemory 0xd7e7a7c0 len 56
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)

There is a SATA controller in this system but disabled in BIOS,
which may explain the problem. Would this be a BIOS bug ?
Would there be a clean way to fix this ?

the output of acpidump -dt is at:
http://www.netbsd.org/~bouyer/acpi.dt.gz

-- 
Manuel Bouyer <bouyer <at> antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: acpi/acpi_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/acpi/acpi_machdep.c,v
retrieving revision 1.3
diff -u -p -u -r1.3 acpi_machdep.c
--- acpi/acpi_machdep.c	30 Jan 2012 21:47:24 -0000	1.3
+++ acpi/acpi_machdep.c	21 Apr 2012 20:38:07 -0000
@@ -189,6 +189,11 @@ acpi_md_OsMapMemory(ACPI_PHYSICAL_ADDRES
 {
 	int rv;

+	printf("acpi_md_OsMapMemory 0x%" PRIx64 " len %d\n",
+	    (uint64_t)PhysicalAddress, Length);
+	if ((PhysicalAddress+Length) > 0xffffffff)
+		return AE_NO_MEMORY;
+
 	rv = _x86_memio_map(x86_bus_space_mem, PhysicalAddress,
 	    Length, 0, (bus_space_handle_t *)LogicalAddress);

Manuel Bouyer | 16 Apr 23:05

support for more than 32 CPUs

Hello,
the attached patch, based on a patch sent by Mindaugas Rasiukevicius
on tech-kern@ some time ago, bumps the max number of CPUs to 256 for
amd64, and should easily allow up to 64 for Xen/amd64. I tested it
on a x86 with 64 AMD cores (lighly as this box has now known drive yet - some
driver hacking is needed), 8 intel cores and with a Xen domU with 4 core.
I didn't notice regressions so far.

Comments before I commit ?

--

-- 
Manuel Bouyer <bouyer <at> antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--

Nicolas Joly | 10 Apr 11:21
Picon
Picon
Favicon

unaligned memory access & SIGBUS


Hi,

While trying to chase some unaligned memory access originally noticed
on alpha, i wanted to have a way to detect this on amd64 ...

Unfortunately, the attached sample code does not fail with SIGBUS on
NetBSD/amd64 unlike other OSes i checked (Linux and FreeBSD). It
simply tries to set the Alignment Check bit from RFLAGS register and
then trigger an unaligned memory access.

Any specific reason for such a behaviour ?

Thanks.

njoly <at> lanfeust [tmp/malign]> uname -a
NetBSD lanfeust.sis.pasteur.fr 6.99.4 NetBSD 6.99.4 (LANFEUST) #2: Mon Apr  9 23:30:03 CEST 2012 
njoly <at> lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/LANFEUST amd64
njoly <at> lanfeust [tmp/malign]> cc -o malign malign.c 
njoly <at> lanfeust [tmp/malign]> ./malign 
0

njoly <at> kiri-adm1 [~]> uname -a
Linux kiri-adm1.cluster.pasteur.fr 2.6.18-274.12.1.el5 #1 SMP Tue Nov 29 13:37:46 EST 2011 x86_64
x86_64 x86_64 GNU/Linux
njoly <at> kiri-adm1 [~]> cc -o malign malign.c 
njoly <at> kiri-adm1 [~]> ./malign 
zsh: bus error (core dumped)  ./malign

njoly <at> livarot [~]> uname -a
FreeBSD livarot.sis.pasteur.fr 8.1-RELEASE-p5 FreeBSD 8.1-RELEASE-p5 #0: Tue Sep 27 16:49:00 UTC 2011    
root <at> amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
njoly <at> livarot [~]> cc -o malign malign.c 
njoly <at> livarot [~]> ./malign 
zsh: bus error (core dumped)  ./malign

-- 
Nicolas Joly

Projects and Developments in Bioinformatics
Institut Pasteur, Paris.
#include <stdio.h>  
#include <stdlib.h>  
#include <string.h>  

int main(void)  
{  
    char *p;  

    __asm__("pushf; orl $0x40000, (%rsp); popf");  

    p = malloc(sizeof(int) + 1);  
    memset(p, 0, sizeof(int) + 1);  
    p++;  

    printf("%d\n", *(int *)p);  

    return 0;  
}  
Mouse | 9 Apr 18:57

64-bit-ness?

I'd like to switch one of my NetBSD/i386 machines to amd64.  There's
one that's known to run amd64, but it's not really very switchable at
present, so I was looking for another one.  I tried the most available
one and it simply reset as soon as the bootloader had loaded the kernel
off the install CD, so I assume that hardware is not recent enough to
run 64bit.

Is there an easy way to tell, given a root shell on a NetBSD/i386
machine, whether the hardware is NetBSD/amd64-compatible (or at least
64-bit compatible - I recognize there may be differences in supported
hardware and the like in corner cases)?  Looking at the list of
features reported for the CPUs on the one known-to-run-amd64 machine
and the one that isn't, I didn't see anything in the differences that
screamed "I'm 64-bit-ready!" to me.  My Web-fu is weak at best, but I
did some poking around, and my best guess is that features2 including
SSE3 is a pretty good correlate.  Might this be correct?  Or is there a
better test?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse <at> rodents-montreal.org
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Ian Clark | 24 Feb 17:31
Picon

Fwd: Xen on NetBSD 6.0_BETA DOM0 crashes

On 23 February 2012 20:43, Manuel Bouyer <bouyer <at> antioche.eu.org> wrote:
> On Mon, Feb 20, 2012 at 09:51:24PM +0000, Ian Clark wrote:
[snip]
>
> Hum, 12G. A bug invoving large memory has just been fixed.
> Please try a very recent -HEAD kernel (netbsd-6 has not been fixed yet),
> you need
> src/sys/arch/x86/x86/pmap.c 1.170
> src/sys/arch/xen/x86/x86_xpmap.c 1.40
>
I brought those in but was getting function errors in cpu.h, brought
that in and got incomplete struct in.. erm.. somewhere...

So I gave up with that, pulled down HEAD, built the latest kernel and rebooted.

Been up for a couple of hours now, compiling 6.0_BETA for about 40
minutes, which is orders of magnitude better than it had been
managing.

Will post later if it stays up, but looks very promising.

Cheers Manuel,

Ian


Gmane