From owner-freebsd-hackers Fri Feb 12 15:03:16 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA19042 for freebsd-hackers-outgoing; Fri, 12 Feb 1999 15:03:16 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA19037 for ; Fri, 12 Feb 1999 15:03:13 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.8.8/8.8.8) id AAA05641 for freebsd-hackers@FreeBSD.ORG; Sat, 13 Feb 1999 00:03:11 +0100 (CET) (envelope-from olli) Date: Sat, 13 Feb 1999 00:03:11 +0100 (CET) From: Oliver Fromme Message-Id: <199902122303.AAA05641@dorifer.heim3.tu-clausthal.de> To: freebsd-hackers@FreeBSD.ORG Subject: ISA DMA problems if >= 512 Mb RAM? Newsgroups: list.freebsd-hackers Organization: Administration Heim 3 Reply-To: freebsd-hackers@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: TIN [version 1.2 RZTUC(3) PL2] Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I submitted a PR regarding this last month, but it seems like that was rather inappropriate (and obviously it didn't get any attention). Admittedly, I'm not that much of a VM expert, so maybe the information that I provide is insufficient. In that case please let me know what I can do to help fixing this problem. This is the situation: ASUS P2B-LS mainboard with 512 Mb RAM, Soundblaster AWE64 PnP. (This is NOT a problem with PnP or the sound drivers!). We're running 3.0-stable of 1999-01-28. This is what happens (dmesg excerpt): hermes /kernel: real memory = 536870912 (524288K bytes) hermes /kernel: avail memory = 519753728 (507572K bytes) hermes /kernel: snd0: hermes /kernel: sbxvi0 at drq 5 on isa hermes /kernel: snd0: hermes /kernel: soundcard buffer alloc failed hermes /kernel: snd: Unable to allocate 131072 bytes of buffer hermes /kernel: sbmidi0 at 0x330 on isa hermes /kernel: snd0: hermes /kernel: awe0 at 0x620 on isa hermes /kernel: awe0: hermes /kernel: opl0 at 0x388 on isa hermes /kernel: snd0: It looks like the driver is unable to allocate its DMA buffers. Needless to say, audio playback doesn't work. With Luigi's pcm driver, no error messages appear during boot, but when I try to play audio, the result is a panic: "isa_dmacheck: no physical page present". I noticed that the difference between "real" and "avail" memory (reported during boot) is about 16.3 Mb. Therefore my guess is that the kernel allocates that memory at the lower end of the RAM for some internal bookkeeping related to physical RAM (page tables? Remember, I'm not a VM expert). The sound drivers try to allocate their DMA buffers in the lower 16 Mb, too, because the rest is not accessible by ISA DMA (someone correct me if I'm wrong), which fails, of course. (It's probably a bug in the pcm driver not to check for this case, which leads to the panic, but that's a different story.) When I came to that conclusion, I tried to remove some of the RAM, reducing the total amount to 256 Mb. Voilà: No error messages, and playing audio works fine! This time, dmesg says: hermes /kernel: real memory = 268435456 (262144K bytes) hermes /kernel: avail memory = 258564096 (252504K bytes) The difference is only about 9.5 Mb now. Enough space left for the sound drivers. Out of curiosity, I also tryed 384 Mb RAM: hermes /kernel: real memory = 402653184 (393216K bytes) hermes /kernel: avail memory = 389107712 (379988K bytes) That's 13 Mb difference, audio playback still works fine. However, reducing the amount of RAM is not really a solution. After all, we got that much for a reason. ;-) Has anyone an idea how to solve the problem? Is there a way to tell the kernel to leave some space available in the lower 16 Mb? Or is the problem caused by something completely different? Regards Oliver PS: Hmm... thinking about it, doesn't the floppy driver also use ISA DMA? The floppy drive seems to work fine, even with 512 Mb RAM. (Does the 16 Mb limitation not apply to onboard FD controllers?) PPS: No need to Cc: me, I'm reading the list through a news gateway. -- Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) "In jedem Stück Kohle wartet ein Diamant auf seine Geburt" (Terry Pratchett) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message