From owner-freebsd-mobile Mon Jul 15 22:58:03 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id WAA08726 for mobile-outgoing; Mon, 15 Jul 1996 22:58:03 -0700 (PDT) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id WAA08713; Mon, 15 Jul 1996 22:57:57 -0700 (PDT) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id XAA22922; Mon, 15 Jul 1996 23:57:46 -0600 (MDT) Date: Mon, 15 Jul 1996 23:57:46 -0600 (MDT) Message-Id: <199607160557.XAA22922@rocky.mt.sri.com> From: Nate Williams To: freebsd-mobile@freebsd.org, current@freebsd.org CC: davidg@freebsd.org Subject: Cause of APM_DSVALUE_BUG found (but not completely fixed yet) Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I got some email from John Kohl from the NetBSD project, and during our discussions I mentioned that on the IBM ThinkPad's I needed a hack because the APM data segment was getting corrupted. He mentioned that this used to be a problem in NetBSD until recently when they changed the way they determine the base and extended memory sizes. Both FreeBSD and previously NetBSD use the BIOS values stored in the RTC CMOS RAM (instead of probing). This is normally a 'good thing, except that these values are apparently stored *before* such niceties as the APM BIOS have a whack at things. Apparently the APM bios 'steals' the last page of base-memory for itself, and then subtracts this from the BIOS's value of base memory. But, since this is called after the data is stored in RTC we have no way of finding out using the RTC interface. However, our bootblocks read the BIOS information after ever everything else has run, and they provide the (correct!) amount of base and extended memory to the kernel. Currently, the kernel prints out a warning message if the RTC value and the bootblock value doesn't match, but it still uses the RTC value. Now, if this space is taken up by DOS-like things we may as well re-take that space back, but in this case it's a bad thing since it doesn't allow us to use the APM bios w/out significant hacks (which also uses up an additional 42K of memory on my box). The following patch fixes the BIOS problem, but it brings up another problem that I don't yet have a 'acceptable' solution for. On bootup, all of the memory is mapped read-only, and then specific parts are mapped read/write/no-cacheable etc.. The 'normal' ISA memory hole starting at 640K and continuing for the next 384K is mapped differently. Then, in machdep.c, the 'basemem' is mapped into the kernel for general use (read/write, etc.) However, with the below patch, the kernel only maps the 'actual' basemem the BIOS reports into 'general' memory. This leaves the 'stolen' memory mapped read-only (the default unless specified otherwise) which doesn't work for a data-segment that gets written to. The NetBSD kernel has a function to map the page read/write, but their kernel is *vastly* different from ours. I'm in contact with some of the kernel gurus on how best to solve this, but I wanted to give everyone the heads up before I go on a mini-vacation, in case anyone gets a wild hair and decides to fix this the 'correct' way. In my opinion, the proper solution would be to either: a) Map the memory read-write in machdep.c when we determine that the BIOS reported by the RTC and the bootblocks doesn't match. OR b) Map the memory read-write in the APM driver. The former assumes that *something* will use it later on, and the latter implies that any driver which has a use for that memory will do it's own mapping, since the driver may not have to do any modification. I'm not sure which one I prefer, but given my lack of experience with the pmap() functions and no success with the couple of attempts I did today, I probably won't get the 'correct' solution done this week. Finally, the patch below hasn't been reviewed and may not go into the FreeBSD as it stands, but it is provided to show the bug and part of the solution. It has been tested and doesn't cause anything bad to happen though, so you should feel safe in applying it to a -current system. (It may also apply to 2.1.5, but I haven't checked). Nate -------- Index: machdep.c =================================================================== RCS file: /home/CVS/src/sys/i386/i386/machdep.c,v retrieving revision 1.194 diff -u -r1.194 machdep.c --- machdep.c 1996/07/08 19:44:39 1.194 +++ machdep.c 1996/07/11 19:19:07 @@ -1239,12 +1239,16 @@ * the official interface should be used. */ if (bootinfo.bi_memsizes_valid) { - if (bootinfo.bi_basemem != biosbasemem) + if (bootinfo.bi_basemem != biosbasemem) { printf("BIOS basemem (%ldK) != RTC basemem (%dK)\n", bootinfo.bi_basemem, biosbasemem); - if (bootinfo.bi_extmem != biosextmem) + biosbasemem = bootinfo.bi_basemem; + } + if (bootinfo.bi_extmem != biosextmem) { printf("BIOS extmem (%ldK) != RTC extmem (%dK)\n", bootinfo.bi_extmem, biosextmem); + biosextmem = bootinfo.bi_extmem; + } } /* From owner-freebsd-mobile Tue Jul 16 02:55:37 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA03073 for mobile-outgoing; Tue, 16 Jul 1996 02:55:37 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id CAA03068; Tue, 16 Jul 1996 02:55:35 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id CAA20811 ; Tue, 16 Jul 1996 02:55:24 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id LAA23561; Tue, 16 Jul 1996 11:52:39 +0200 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id LAA16285; Tue, 16 Jul 1996 11:52:39 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id KAA22837; Tue, 16 Jul 1996 10:39:47 +0200 (MET DST) From: J Wunsch Message-Id: <199607160839.KAA22837@uriah.heep.sax.de> Subject: Re: Cause of APM_DSVALUE_BUG found (but not completely fixed yet) To: freebsd-current@FreeBSD.org (FreeBSD-current users) Date: Tue, 16 Jul 1996 10:39:46 +0200 (MET DST) Cc: freebsd-mobile@FreeBSD.org Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199607160557.XAA22922@rocky.mt.sri.com> from Nate Williams at "Jul 15, 96 11:57:46 pm" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-mobile@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk As Nate Williams wrote: > However, our bootblocks read the BIOS information after ever everything > else has run, and they provide the (correct!) amount of base and > extended memory to the kernel. Currently, the kernel prints out a > warning message if the RTC value and the bootblock value doesn't match, > but it still uses the RTC value. Alas, there are other system ``niceties'' that also subtract some amount from the BIOS basemem, like hard disk parameter tables for the custom-selectable hard disk type. (BIOS vendors should really use the BIOS stack for this, but only AMI seems to offer this as an option.) I'm not sure whether we are very interested in preserving this information. Anyway, i don't think the wasted at most one page would hurt very much. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) From owner-freebsd-mobile Tue Jul 16 08:20:04 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA01968 for mobile-outgoing; Tue, 16 Jul 1996 08:20:04 -0700 (PDT) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA01867; Tue, 16 Jul 1996 08:19:55 -0700 (PDT) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id JAA24381; Tue, 16 Jul 1996 09:19:07 -0600 (MDT) Date: Tue, 16 Jul 1996 09:19:07 -0600 (MDT) Message-Id: <199607161519.JAA24381@rocky.mt.sri.com> From: Nate Williams To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Cc: freebsd-current@freebsd.org (FreeBSD-current users), freebsd-mobile@freebsd.org Subject: Re: Cause of APM_DSVALUE_BUG found (but not completely fixed yet) In-Reply-To: <199607160839.KAA22837@uriah.heep.sax.de> References: <199607160557.XAA22922@rocky.mt.sri.com> <199607160839.KAA22837@uriah.heep.sax.de> Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > However, our bootblocks read the BIOS information after ever everything > > else has run, and they provide the (correct!) amount of base and > > extended memory to the kernel. Currently, the kernel prints out a > > warning message if the RTC value and the bootblock value doesn't match, > > but it still uses the RTC value. > > Alas, there are other system ``niceties'' that also subtract some > amount from the BIOS basemem, like hard disk parameter tables for the > custom-selectable hard disk type. (BIOS vendors should really use the > BIOS stack for this, but only AMI seems to offer this as an option.) > I'm not sure whether we are very interested in preserving this > information. It certainly couldn't hurt to preserve this and... > Anyway, i don't think the wasted at most one page would hurt very > much. *grin* Nate From owner-freebsd-mobile Tue Jul 16 11:32:27 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA20854 for mobile-outgoing; Tue, 16 Jul 1996 11:32:27 -0700 (PDT) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id LAA20845; Tue, 16 Jul 1996 11:32:23 -0700 (PDT) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id MAA25236; Tue, 16 Jul 1996 12:32:16 -0600 (MDT) Date: Tue, 16 Jul 1996 12:32:16 -0600 (MDT) Message-Id: <199607161832.MAA25236@rocky.mt.sri.com> From: Nate Williams To: mobile@freebsd.org CC: bde@freebsd.org, davidg@freebsd.org Subject: Possible fix for APM_DSVALUE_BUG Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk OK, I lied about not getting to this this week. ;) Based on a comment David Greenman made, I tried out the following code and it seems to work. At least, I can now run the APM commands on my laptop w/out a kernel panic, although suspend/resume doesn't work because the hardware suspend/resume on my box has been disabled for a different project. Again, this code is probably not going to be exactly the same as the code in the final version, but functionally it should be similar. Can ThinkPad owners please apply this to /sys/i386/i386/machdep.c, and build a new kernel with it. If it works (it should work fine), remove the APM_DSVALUE_BUG option from the config file and see if it still works. (It should). I'll be around today and tomorrow, but I'm leaving on my mini-vacation Weds. night and won't be back until early next week. For a description of the problem, see my previous article. Nate ------ ps. To Bruce and David, can you review this patch and give me any feedback/suggestions. As it stands now this should work fine in -current in spite of the bootblock differences, since the code is never executed unless the bootblocks return valid information. Also, please note the code inside '#ifdef unsure_if_needed'. Should the mapping have to occur on page boundaries? I am using it fine w/out the rounding down right now. -------- Index: machdep.c =================================================================== RCS file: /home/CVS/src/sys/i386/i386/machdep.c,v retrieving revision 1.195 diff -u -r1.195 machdep.c --- machdep.c 1996/07/12 06:09:49 1.195 +++ machdep.c 1996/07/16 18:21:19 @@ -1239,9 +1239,39 @@ * the official interface should be used. */ if (bootinfo.bi_memsizes_valid) { - if (bootinfo.bi_basemem != biosbasemem) - printf("BIOS basemem (%ldK) != RTC basemem (%dK)\n", + vm_offset_t pa, va, tmpva; + vm_size_t size; + unsigned *pte; + + if (bootinfo.bi_basemem != biosbasemem) { + printf("BIOS basemem (%ldK) != RTC basemem (%dK),", bootinfo.bi_basemem, biosbasemem); + printf(" setting to BIOS basemem\n"); + biosbasemem = bootinfo.bi_basemem; + /* + * XXX - Map this 'hole' of memory in the same manner + * as the ISA_HOLE (read/write/non-cacheable), since + * the BIOS 'fudges' it to become part of the ISA_HOLE. + * This code is similar to the code used in + * pmap_mapdev, but since no memory needs to be + * allocated we simply change the mapping. + */ +#ifdef unsure_if_needed + /* Round it down to the nearest page */ + pa = rounddown(biosbasemem * 1024, PAGE_SIZE); +#else + pa = biosbasemem * 1024; +#endif + va = pa + KERNBASE; + size = roundup(ISA_HOLE_START - pa, PAGE_SIZE); + for (tmpva = va; size > 0;) { + pte = (unsigned *)vtopte(tmpva); + *pte = pa | PG_RW | PG_V | PG_N; + size -= PAGE_SIZE; + tmpva += PAGE_SIZE; + pa += PAGE_SIZE; + } + } if (bootinfo.bi_extmem != biosextmem) printf("BIOS extmem (%ldK) != RTC extmem (%dK)\n", bootinfo.bi_extmem, biosextmem); From owner-freebsd-mobile Tue Jul 16 12:49:03 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA04058 for mobile-outgoing; Tue, 16 Jul 1996 12:49:03 -0700 (PDT) Received: from critter.tfs.com ([140.145.230.177]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA04033; Tue, 16 Jul 1996 12:48:57 -0700 (PDT) Received: from critter.tfs.com (localhost [127.0.0.1]) by critter.tfs.com (8.7.5/8.7.3) with ESMTP id VAA00211; Tue, 16 Jul 1996 21:48:28 +0200 (MET DST) To: Nate Williams cc: mobile@FreeBSD.org, bde@FreeBSD.org, davidg@FreeBSD.org Subject: Re: Possible fix for APM_DSVALUE_BUG In-reply-to: Your message of "Tue, 16 Jul 1996 12:32:16 MDT." <199607161832.MAA25236@rocky.mt.sri.com> Date: Tue, 16 Jul 1996 21:48:26 +0200 Message-ID: <209.837546506@critter.tfs.com> From: Poul-Henning Kamp Sender: owner-mobile@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk In message <199607161832.MAA25236@rocky.mt.sri.com>, Nate Williams writes: >OK, I lied about not getting to this this week. ;) > >Based on a comment David Greenman made, I tried out the following code >and it seems to work. At least, I can now run the APM commands on my >laptop w/out a kernel panic, although suspend/resume doesn't work >because the hardware suspend/resume on my box has been disabled for a >different project. I'll be damned! Even my precambric Gateway Handbook 486DX2/40 now runs APM ! Good work! Now there is some chance that my emails will no longer time-travel :-) Now, why the heck do I loose 2/3 of the chars comming in on the internal sio0 now... :-( Oh well, things come at a price I guess. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@ref.tfs.com TRW Financial Systems, Inc. Future will arrive by its own means, progress not so. From owner-freebsd-mobile Wed Jul 17 09:03:55 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA00512 for mobile-outgoing; Wed, 17 Jul 1996 09:03:55 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA00480; Wed, 17 Jul 1996 09:03:50 -0700 (PDT) Received: from zero-gravity.netlab.london.sco.com (zero-gravity.netlab.london.sco.com [150.126.252.16]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id IAA23273 ; Wed, 17 Jul 1996 08:34:41 -0700 Received: (from davided@localhost) by zero-gravity.netlab.london.sco.com (8.7.5/dme/nice-1.1) id QAA00438; Wed, 17 Jul 1996 16:27:10 +0100 (BST) Date: Wed, 17 Jul 1996 16:27:10 +0100 (BST) Message-Id: <199607171527.QAA00438@zero-gravity.netlab.london.sco.com> To: Nate Williams Cc: mobile@freebsd.org, bde@freebsd.org, davidg@freebsd.org Subject: re: Possible fix for APM_DSVALUE_BUG In-Reply-To: <199607161832.MAA25236@rocky.mt.sri.com> References: <199607161832.MAA25236@rocky.mt.sri.com> Mime-Version: 1.0 (generated by tm-edit 7.68) Content-Type: text/plain; charset=US-ASCII From: dave edmondson X-Face: "?v.huY]?B[a4C|xid!Tx8TpwOQe6]C(I}h8Vo1z6'9soM_Xvq2f3u::[F~rW>GWj6;IfU,10H;B&1JDE/H8?``q4XH4~!\_z{n3RDmkC;9d!Yx3O7n?9,[CE;TWB! F8.e5fc0dJXikU'v1qFVTfptB7xe$y*t#jx4`I44n,ypMQg@.|Z^ycJ:G]{dR~E}_.T1^shwC%T4eRGVu%h+J7lBzb>m20==Q*OPAf^~@6Lj^)rI9Tb*m*L}}HC~{> /__Od\I=[|aP6s}B%BhqtE-9uGJ0J3jchjcyJz5fW[i0$RfPv7Zp=!a+0pR Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk nate, thanks for the fix. things have improved (in some respects). with this latest fix my tp760 will now boot, apm 1.1 is detected and apm mostly works (*). unfortunately, the ep driver doesn't work with my 3c589 any more. with the `standard' pccard.conf card configuration fails. setting the interrupt to 10 (or various other values) in pccard.conf solves this, and the card is recognised and configuration proceeds. during configuration, a single page of kernel text gets filled with zero's. this happens during the call to dev_attach() from ep_isa_registerdev() from ep_pccard_init() from allocate_driver(). the page that gets zero'd is always the same - that surrounding the kdc_npx structure in i386/isa/npx.c. the instruction that causes it to happen is a movl which corresponds to: kdc->kdc_next->kdc_rlink = &kdc->kdc_next in dev_attach(). i guess it's always the same page because npx is always first on my dc_list. stopping the kernel (using the debugger) before the offending instruction and writing to the same location myself doesn't cause the same behaviour. i presume that something is messing up the page descriptor for this page and the vm system is demand filling it with zero's (will it do that whilst i'm single stepping in the debugger ?). this page being zero filled causes a panic on the next exec, because npxinit() gets called (and now starts with addb %al, 0(%eax) where %eax has some completely useless value (0x8zzzzzzz something). at this point i'm stumped - vm stuff always does have me banging my head. as an aside, my usrobotics xj2288 modem works just fine ! * - there are some error messages when i resume after suspend, which i'm looking into, but they don't seem to be related to the above problem. once again, thanks for all the work ! From owner-freebsd-mobile Wed Jul 17 09:36:17 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA02152 for mobile-outgoing; Wed, 17 Jul 1996 09:36:17 -0700 (PDT) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA02145; Wed, 17 Jul 1996 09:36:12 -0700 (PDT) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id KAA00491; Wed, 17 Jul 1996 10:35:51 -0600 (MDT) Date: Wed, 17 Jul 1996 10:35:51 -0600 (MDT) Message-Id: <199607171635.KAA00491@rocky.mt.sri.com> From: Nate Williams To: dave edmondson Cc: Nate Williams , mobile@freebsd.org, bde@freebsd.org, davidg@freebsd.org Subject: re: Possible fix for APM_DSVALUE_BUG In-Reply-To: <199607171527.QAA00438@zero-gravity.netlab.london.sco.com> References: <199607161832.MAA25236@rocky.mt.sri.com> <199607171527.QAA00438@zero-gravity.netlab.london.sco.com> Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk dave edmondson writes: > nate, thanks for the fix. things have improved (in some respects). > > with this latest fix my tp760 will now boot, apm 1.1 is detected and > apm mostly works (*). > * - there are some error messages when i resume after suspend, which > i'm looking into, but they don't seem to be related to the above > problem. Try doing this without any cards installed. It appears that the generic PCCARD suspend/resume code doesn't always work right. I want to get to it next, but I wanted to get the APM code working on everything first. > unfortunately, the ep driver doesn't work with > my 3c589 any more. with the `standard' pccard.conf card configuration > fails. setting the interrupt to 10 (or various other values) in > pccard.conf solves this, and the card is recognised and configuration > proceeds. Do you have IRQ 3 available in /etc/pccard.conf? If so, remove it since it's probably being used by the PCIC controller. Also, if you have a built-in sound-card then remove IRQ 5 as well. > during configuration, a single page of kernel text gets > filled with zero's. this happens during the call to dev_attach() from > ep_isa_registerdev() from ep_pccard_init() from allocate_driver(). Just for grins, comment out the call to ep_isa_registerdev() and see if that does anything. The function isn't essential to the working of the driver and used for statistics. > the page that gets zero'd is always the same - that surrounding the > kdc_npx structure in i386/isa/npx.c. the instruction that causes it > to happen is a movl which corresponds to: > kdc->kdc_next->kdc_rlink = &kdc->kdc_next > in dev_attach(). i guess it's always the same page because npx is > always first on my dc_list. Hmm.... *Shot in the dark* In the patch I sent out, I had some code that rounded it down to the correct page that was ifdef'd out with 'unsure_if_needed' or somesuch. Try enabling that code and disabling the code below and see if helps. Also, does using the option APM_DSVALUE_BUG work on your box at all? > stopping the kernel (using the debugger) before the offending > instruction and writing to the same location myself doesn't cause the > same behaviour. i presume that something is messing up the page > descriptor for this page and the vm system is demand filling it with > zero's (will it do that whilst i'm single stepping in the debugger ?). Bruce would be able to answer that better. > this page being zero filled causes a panic on the next exec, because > npxinit() gets called (and now starts with addb %al, 0(%eax) where > %eax has some completely useless value (0x8zzzzzzz something). > > at this point i'm stumped - vm stuff always does have me banging my > head. > > as an aside, my usrobotics xj2288 modem works just fine ! Great! Let me know if any of the above suggestions work. Nate From owner-freebsd-mobile Wed Jul 17 16:39:50 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA01235 for mobile-outgoing; Wed, 17 Jul 1996 16:39:50 -0700 (PDT) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.170.159]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id QAA01230 for ; Wed, 17 Jul 1996 16:39:48 -0700 (PDT) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.7.5/8.6.12) with SMTP id QAA00295 for ; Wed, 17 Jul 1996 16:39:43 -0700 (PDT) Date: Wed, 17 Jul 1996 16:39:42 -0700 (PDT) From: Doug White To: mobile@freebsd.org Subject: PCCard on 2.1.5 - How? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello! I'm not subscribed to this so please cc: replies back to me. Thanks. We're having trouble getting PCCARD support up on 2.1.5-RELEASE. The kernel won't build in nep0. We have the pccard-test series on there now (and associated kernel options). I don't see anything in LINT. Any pointers would be appreciated. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major From owner-freebsd-mobile Thu Jul 18 02:43:32 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id CAA08485 for mobile-outgoing; Thu, 18 Jul 1996 02:43:32 -0700 (PDT) Received: from zero-gravity.netlab.london.sco.com (zero-gravity.netlab.london.sco.com [150.126.252.16]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id CAA08479; Thu, 18 Jul 1996 02:43:21 -0700 (PDT) Received: (from davided@localhost) by zero-gravity.netlab.london.sco.com (8.7.5/dme/nice-1.1) id KAA00357; Thu, 18 Jul 1996 10:37:24 +0100 (BST) Date: Thu, 18 Jul 1996 10:37:24 +0100 (BST) Message-Id: <199607180937.KAA00357@zero-gravity.netlab.london.sco.com> To: Nate Williams Cc: mobile@freebsd.org, bde@freebsd.org, davidg@freebsd.org Subject: re: Possible fix for APM_DSVALUE_BUG In-Reply-To: <199607171635.KAA00491@rocky.mt.sri.com> References: <199607161832.MAA25236@rocky.mt.sri.com> <199607171527.QAA00438@zero-gravity.netlab.london.sco.com> <199607171635.KAA00491@rocky.mt.sri.com> Mime-Version: 1.0 (generated by tm-edit 7.68) Content-Type: text/plain; charset=US-ASCII From: dave edmondson X-Face: "?v.huY]?B[a4C|xid!Tx8TpwOQe6]C(I}h8Vo1z6'9soM_Xvq2f3u::[F~rW>GWj6;IfU,10H;B&1JDE/H8?``q4XH4~!\_z{n3RDmkC;9d!Yx3O7n?9,[CE;TWB! F8.e5fc0dJXikU'v1qFVTfptB7xe$y*t#jx4`I44n,ypMQg@.|Z^ycJ:G]{dR~E}_.T1^shwC%T4eRGVu%h+J7lBzb>m20==Q*OPAf^~@6Lj^)rI9Tb*m*L}}HC~{> /__Od\I=[|aP6s}B%BhqtE-9uGJ0J3jchjcyJz5fW[i0$RfPv7Zp=!a+0pR Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk : Try doing this without any cards installed. It appears that the generic : PCCARD suspend/resume code doesn't always work right. I want to get to : it next, but I wanted to get the APM code working on everything first. cards in or out doesn't affect this. : Do you have IRQ 3 available in /etc/pccard.conf? If so, remove it since : it's probably being used by the PCIC controller. Also, if you have a : built-in sound-card then remove IRQ 5 as well. stupid mistake. removing 3 solved the problem. 5 is okay as the audio in the 760e is mwave dsp based, which means it's not likely to work for ages (of course, everyone has heard that `someone', usually from japan, is working on a linux driver for this, but the `someone' is never named or to be found :-) : Just for grins, comment out the call to ep_isa_registerdev() and see if : that does anything. The function isn't essential to the working of the : driver and used for statistics. now panics in ep_attach(). i've not looked at this panic in detail (needed to get some work done !), but %eax was 0, so it may be the same sort of problem. : In the patch I sent out, I had some code that rounded it down to the : correct page that was ifdef'd out with 'unsure_if_needed' or somesuch. : Try enabling that code and disabling the code below and see if helps. no change. : Also, does using the option APM_DSVALUE_BUG work on your box at all? works just the same (ie. apm works but the ep driver doesn't). today i'll try it without apm support in the kernel to see if the problem is entirely pccard/ep related. i'll let you know how it goes. From owner-freebsd-mobile Thu Jul 18 04:34:04 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA13438 for mobile-outgoing; Thu, 18 Jul 1996 04:34:04 -0700 (PDT) Received: from zero-gravity.netlab.london.sco.com (zero-gravity.netlab.london.sco.com [150.126.252.16]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA13380; Thu, 18 Jul 1996 04:33:56 -0700 (PDT) Received: (from davided@localhost) by zero-gravity.netlab.london.sco.com (8.7.5/dme/nice-1.1) id MAA00200; Thu, 18 Jul 1996 12:28:06 +0100 (BST) Date: Thu, 18 Jul 1996 12:28:06 +0100 (BST) Message-Id: <199607181128.MAA00200@zero-gravity.netlab.london.sco.com> To: Nate Williams Cc: mobile@freebsd.org, bde@freebsd.org, davidg@freebsd.org Subject: re: Possible fix for APM_DSVALUE_BUG In-Reply-To: <199607171635.KAA00491@rocky.mt.sri.com> References: <199607161832.MAA25236@rocky.mt.sri.com> <199607171527.QAA00438@zero-gravity.netlab.london.sco.com> <199607171635.KAA00491@rocky.mt.sri.com> Mime-Version: 1.0 (generated by tm-edit 7.68) Content-Type: text/plain; charset=US-ASCII From: dave edmondson X-Face: "?v.huY]?B[a4C|xid!Tx8TpwOQe6]C(I}h8Vo1z6'9soM_Xvq2f3u::[F~rW>GWj6;IfU,10H;B&1JDE/H8?``q4XH4~!\_z{n3RDmkC;9d!Yx3O7n?9,[CE;TWB! F8.e5fc0dJXikU'v1qFVTfptB7xe$y*t#jx4`I44n,ypMQg@.|Z^ycJ:G]{dR~E}_.T1^shwC%T4eRGVu%h+J7lBzb>m20==Q*OPAf^~@6Lj^)rI9Tb*m*L}}HC~{> /__Od\I=[|aP6s}B%BhqtE-9uGJ0J3jchjcyJz5fW[i0$RfPv7Zp=!a+0pR Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk latest testing: - a kernel without apm support and with-or-without nate's fix will panic when i insert a 3c589. the panic is the same as that described yesterday. :-( From owner-freebsd-mobile Thu Jul 18 05:20:23 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id FAA14946 for mobile-outgoing; Thu, 18 Jul 1996 05:20:23 -0700 (PDT) Received: from vanuata.dcs.gla.ac.uk (vanuata.dcs.gla.ac.uk [130.209.240.50]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id FAA14939 for ; Thu, 18 Jul 1996 05:20:19 -0700 (PDT) Message-Id: <199607181220.FAA14939@freefall.freebsd.org> Received: from solander.dcs.gla.ac.uk by vanuata.dcs.gla.ac.uk with LOCAL SMTP (PP); Thu, 18 Jul 1996 13:08:18 +0100 To: Nate Williams cc: mobile@FreeBSD.org Subject: Re: Possible fix for APM_DSVALUE_BUG In-reply-to: Your message of "Tue, 16 Jul 1996 12:32:16 MDT." <199607161832.MAA25236@rocky.mt.sri.com> Date: Thu, 18 Jul 1996 13:08:16 +0100 From: Simon Marlow Sender: owner-mobile@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk With this fix, my ThinkPad 370C no longer panics on 'apmconf -e', however suspend/resume still don't work properly. Sometimes the suspend light will blink for a while, and the machine will come back on after about 15 secs. Other times it manages to suspend, but on resume I get Entire system suspend failure: errcode = 96 and sometimes Entire system suspend failure: errcode = 83 on the console. The other apm commands seem to work fine, including the battery percentage stuff. By the way, I have patches for thinkpad keyboard support in syscons if anyone is interested. They don't support X, but I guess someone who knows what they're doing can fix that ;-) Cheers, Simon -- Simon Marlow simonm@dcs.gla.ac.uk Research Assistant http://www.dcs.gla.ac.uk/~simonm/ finger for PGP public key From owner-freebsd-mobile Thu Jul 18 08:28:28 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA26838 for mobile-outgoing; Thu, 18 Jul 1996 08:28:28 -0700 (PDT) Received: from vanuata.dcs.gla.ac.uk (vanuata.dcs.gla.ac.uk [130.209.240.50]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA26773 for ; Thu, 18 Jul 1996 08:27:10 -0700 (PDT) Message-Id: <199607181527.IAA26773@freefall.freebsd.org> Received: from solander.dcs.gla.ac.uk by vanuata.dcs.gla.ac.uk with LOCAL SMTP (PP); Thu, 18 Jul 1996 15:53:46 +0100 To: mobile@freebsd.org Subject: Slow Ethernet Date: Thu, 18 Jul 1996 15:53:42 +0100 From: Simon Marlow Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk My IBM creditcard ethernet adaptor is running *really* slow. I get a maximum of about 40k/sec ftp over a local net, and NFS is much worse. I'm also getting some of these on the console, maybe a couple of times an hour: ed0: NIC memory corrupt - Invalid packet length XXXX (where XXXX is some random number). Anyone have any idea what the problem is? This is current as of 7/16, on an IBM ThinkPad 370C, IBM creditcard ethernet II, using the ed0 driver with pccardd. The card is using IRQ 5 at 0x300. Cheers, Simon -- Simon Marlow simonm@dcs.gla.ac.uk Research Assistant http://www.dcs.gla.ac.uk/~simonm/ finger for PGP public key From owner-freebsd-mobile Thu Jul 18 09:24:47 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA29770 for mobile-outgoing; Thu, 18 Jul 1996 09:24:47 -0700 (PDT) Received: from rover.village.org (rover.village.org [204.144.255.49]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA29747; Thu, 18 Jul 1996 09:24:41 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by rover.village.org (8.7.5/8.6.6) with SMTP id KAA00775; Thu, 18 Jul 1996 10:22:59 -0600 (MDT) Message-Id: <199607181622.KAA00775@rover.village.org> To: Nate Williams Subject: Re: Cause of APM_DSVALUE_BUG found (but not completely fixed yet) Cc: freebsd-mobile@freebsd.org, current@freebsd.org, davidg@freebsd.org In-reply-to: Your message of Mon, 15 Jul 1996 23:57:46 MDT Date: Thu, 18 Jul 1996 10:22:58 -0600 From: Warner Losh Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk : + biosbasemem = bootinfo.bi_basemem; : + biosextmem = bootinfo.bi_extmem; Hmmm. The linux folks are running into machines that this would be bad for. Evidentally, they claim, a nontrivial number of machines will cap the returned value at 16M of memory. It might be best to do this as an option. Warner From owner-freebsd-mobile Thu Jul 18 20:31:28 1996 Return-Path: owner-mobile Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA20476 for mobile-outgoing; Thu, 18 Jul 1996 20:31:28 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id UAA20459; Thu, 18 Jul 1996 20:31:17 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id NAA32464; Fri, 19 Jul 1996 13:25:39 +1000 Date: Fri, 19 Jul 1996 13:25:39 +1000 From: Bruce Evans Message-Id: <199607190325.NAA32464@godzilla.zeta.org.au> To: imp@village.org, nate@mt.sri.com Subject: Re: Cause of APM_DSVALUE_BUG found (but not completely fixed yet) Cc: current@freebsd.org, davidg@freebsd.org, freebsd-mobile@freebsd.org Sender: owner-mobile@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >: + biosbasemem = bootinfo.bi_basemem; >: + biosextmem = bootinfo.bi_extmem; >Hmmm. The linux folks are running into machines that this would be >bad for. Evidentally, they claim, a nontrivial number of machines >will cap the returned value at 16M of memory. A number of machines alreay cap the value in the CMOS at 16M, and all machines cap it at 64M, while there's nothing to stop the bootstrap getting it right and going up to 4096GB (1024 back switched segments of 4GB each ;-). >It might be best to do >this as an option. Nope. Bruce