Date: Tue, 24 Jul 2001 20:40:41 -0700 From: "neckpain@nettaxi.com" <neckpain@nettaxi.com> To: msmith@freebsd.org Cc: current@freebsd.org Subject: Re: acpi malfunctions Message-ID: <200107250340.UAA06939@mail3.bigmailbox.com>
index | next in thread | raw e-mail
[-- Attachment #1 --] In-Reply-To: <200107232037.f6NKbx201647@mass.dis.org>; from msmith@FreeBSD.ORG on Mon, Jul 23, 2001 at 01:37:59PM -0700 On Mon, Jul 23, 2001 at 01:37:59PM -0700, Mike Smith wrote: > > > > 1. Acpica modules hangs in > > > > AcpiRsCalculateByteStreamLength() called from > > > > AcpiRsCreateByteStream() called from > > > > AcpiRsSetSrsMethodData() called from > > > > AcpiSetCurrentResources() from somewhere in acpi_pcib.c . > > > > > > > > The hang itself occurs at LinkedList->Id == 9 and LinkedList->Length > > == 0 > > > > . > > > > > > Can you replace &crsbuf with crsbuf in acpi_pcib.c at line 484? > > > I think I should be passing a pointer to the buffer, not a pointer to a > > > pointer. > > > > There's no &crsbuf in line 484 (not in rev 1.10, nor 1.11). > > > > Assuming you're talking about the one in line 478, it doesn't compile if you > > change it to crsbuf from &crsbuf, since crsbuf is an ACPI_BUFFER, not > > an (ACPI_BUFFER *). > > Um. Sorry about the line numbers, and yes, sorry about the confusion > there; I just looked at it and it seemed wrong. > > I'd still like to know the allocation length for that buffer though; my > last suspicion is that it doesn't contain any resources at all, and so > we're overrunning it when we go to try to stuff an interrupt resource > into it. If that's the case, it's easy to fix. If not, then we will > have to go hunting snarks. Attached are what I got from dmesg, and two patches to obtain the dmesg output. The patches are to be applied against acpi_pcib.c and /sys/contrib/dev/acpica/rscalc.c, respectively. The latter lets you go past the RsCalculateByteStreamLength(), but of course the interrupt routing fails. Let me know if there are other places I had to put the printf()'s. Regards. ------------------------------------------------------------ Shop Smart Compare Prices on Name-Brand Products from Name-Brand Stores!! http://www.smartshop.com/cgi-bin/main.cgi?ssa=4099 [-- Attachment #2 --] Copyright (c) 1992-2001 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.0-CURRENT #2: Sat Jul 14 12:41:59 JST 2001 root@gzl:/usr/obj/kernel.2001.07.12.00.00.00 Calibrating clock(s) ... TSC clock: 264663055 Hz, i8254 clock: 1193166 Hz CLK_USE_I8254_CALIBRATION not specified - using default frequency Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 264663055 Hz CPU: Pentium II/Pentium II Xeon/Celeron (264.66-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x66a Stepping = 10 Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR> real memory = 67043328 (65472K bytes) Physical memory chunk(s): 0x00001000 - 0x0009efff, 647168 bytes (158 pages) 0x00448000 - 0x03fe7fff, 62521344 bytes (15264 pages) avail memory = 61034496 (59604K bytes) bios32: Found BIOS32 Service Directory header at 0xc00f6cf0 bios32: Entry = 0xfd880 (c00fd880) Rev = 0 Len = 1 pcibios: PCI BIOS entry at 0xfd880+0x11e pnpbios: Found PnP BIOS data at 0xc00f6d20 pnpbios: Entry = f0000:b334 Rev = 1.0 pnpbios: Event flag at 400 Other BIOS signatures found: Preloaded elf kernel "kernel" at 0xc0422000. Preloaded userconfig_script "/boot/kernel.conf" at 0xc042209c. Preloaded elf module "md.ko" at 0xc04220ec. Preloaded elf module "snd_ds1.ko" at 0xc0422188. Preloaded elf module "snd_pcm.ko" at 0xc0422228. Preloaded elf module "agp.ko" at 0xc04222c8. Preloaded elf module "random.ko" at 0xc0422364. Preloaded elf module "acpica.ko" at 0xc0422404. ACPI debug layer 0x0 debug level 0x0 null: <null device, zero device> mem: <memory & I/O> Pentium Pro MTRR support enabled VESA: information block 56 45 53 41 00 02 20 01 00 01 00 00 00 00 22 00 00 01 27 00 02 02 00 01 00 01 09 01 00 01 1b 01 00 01 00 01 01 01 02 01 03 01 04 01 05 01 07 01 0d 01 0e 01 10 01 11 01 12 01 13 01 14 01 15 01 VESA: 24 mode(s) found VESA: v2.0, 2496k memory, flags:0x0, mode table:0xc02cfa02 (1000022) VESA: MagicMedia 256AV 48K VESA: NeoMagic MagicMedia 256AV 01.0 random: <entropy source> Using $PIR table, 8 entries at 0xc00fdf40 npx0: <math processor> on motherboard npx0: INT 16 interface acpi0: <SONY M0 > on motherboard acpi_cpu0: <CPU> on acpi0 acpi_tz0: <thermal zone> on acpi0 acpi_tz0: _CRT value is absurd, ignored (1279.9C) acpi_tz0: _PSV value is absurd, ignored (1279.9C) acpi_button0: <Control Method Power Button Device> on acpi0 acpi_pcib0: <Host-PCI bridge> on acpi0 pci0: physical bus=0 map[10]: type 3, range 32, base 40000000, size 24, enabled found-> vendor=0x8086, dev=0x7190, revid=0x03 bus=0, slot=0, func=0 class=06-00-00, hdrtype=0x00, mfdev=0 found-> vendor=0x8086, dev=0x7191, revid=0x03 bus=0, slot=1, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 found-> vendor=0x8086, dev=0x7110, revid=0x02 bus=0, slot=7, func=0 class=06-01-00, hdrtype=0x00, mfdev=1 map[20]: type 4, range 32, base 0000fcf0, size 4, enabled found-> vendor=0x8086, dev=0x7111, revid=0x01 bus=0, slot=7, func=1 class=01-01-80, hdrtype=0x00, mfdev=0 map[20]: type 4, range 32, base 0000fcc0, size 5, enabled found-> vendor=0x8086, dev=0x7112, revid=0x01 bus=0, slot=7, func=2 class=0c-03-00, hdrtype=0x00, mfdev=0 intpin=d, irq=255 map[90]: type 4, range 32, base 00001040, size 4, enabled found-> vendor=0x8086, dev=0x7113, revid=0x03 bus=0, slot=7, func=3 class=06-80-00, hdrtype=0x00, mfdev=0 map[10]: type 1, range 32, base fedff000, size 11, memory disabled map[14]: type 1, range 32, base fedffc00, size 9, memory disabled found-> vendor=0x104d, dev=0x8039, revid=0x02 bus=0, slot=8, func=0 class=0c-00-10, hdrtype=0x00, mfdev=0 intpin=a, irq=255 powerspec 1 supports D0 D3 current D0 map[10]: type 1, range 32, base fedf0000, size 15, enabled map[14]: type 4, range 32, base 0000fc40, size 6, port disabled map[18]: type 4, range 32, base 0000fcec, size 2, port disabled found-> vendor=0x1073, dev=0x0010, revid=0x02 bus=0, slot=9, func=0 class=04-01-00, hdrtype=0x00, mfdev=0 intpin=a, irq=9 powerspec 1 supports D0 D2 D3 current D0 map[10]: type 1, range 32, base fedff800, size 9, memory disabled found-> vendor=0x136b, dev=0xff01, revid=0x01 bus=0, slot=10, func=0 class=04-80-00, hdrtype=0x00, mfdev=0 intpin=a, irq=255 powerspec 2 supports D0 D3 current D0 map[10]: type 1, range 32, base fede0000, size 16, memory disabled map[14]: type 4, range 32, base 0000fce0, size 3, port disabled found-> vendor=0x14f1, dev=0x1036, revid=0x08 bus=0, slot=11, func=0 class=07-80-00, hdrtype=0x00, mfdev=0 intpin=a, irq=9 powerspec 2 supports D0 D3 current D0 found-> vendor=0x1180, dev=0x0475, revid=0x80 bus=0, slot=12, func=0 class=06-07-00, hdrtype=0x02, mfdev=0 intpin=a, irq=255 powerspec 1 supports D0 D1 D2 D3 current D0 pci0: <PCI bus> on acpi_pcib0 agp0: <Intel 82443BX (440 BX) host to PCI bridge> mem 0x40000000-0x40ffffff at device 0.0 on pci0 agp0: allocating GATT for aperture of size 16M pcib1: <PCI-PCI bridge> at device 1.0 on pci0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: I/O decode 0xf000-0xfff pcib1: memory decode 0xfe800000-0xfecfffff pcib1: prefetched decode 0xfd000000-0xfdffffff pci1: physical bus=1 map[10]: type 3, range 32, base fd000000, size 24, enabled map[14]: type 1, range 32, base fe800000, size 22, enabled map[18]: type 1, range 32, base fec00000, size 20, enabled found-> vendor=0x10c8, dev=0x0005, revid=0x20 bus=1, slot=0, func=0 class=03-00-00, hdrtype=0x00, mfdev=0 intpin=a, irq=9 powerspec 1 supports D0 D1 D2 D3 current D0 pci1: <PCI bus> on pcib1 pci1: <display, VGA> at 0.0 (no driver attached) isab0: <PCI-ISA bridge> at device 7.0 on pci0 isa0: <ISA bus> on isab0 atapci0: <Intel PIIX4 ATA33 controller> port 0xfcf0-0xfcff at device 7.1 on pci0 ata0: iobase=0x01f0 altiobase=0x03f6 bmaddr=0xfcf0 ata0: mask=03 ostat0=50 ostat2=00 ata0-master: ATAPI probe 00 00 ata0-slave: ATAPI probe 00 00 ata0: mask=03 stat0=50 stat1=00 ata0-master: ATA probe 01 a5 ata0: devices=01 ata0: at 0x1f0 irq 14 on atapci0 ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0xfcf8 ata1: mask=03 ostat0=00 ostat2=00 ata1-master: ATAPI probe 00 00 ata1-slave: ATAPI probe 00 00 ata1: mask=03 stat0=00 stat1=00 ata1: devices=00 ata1: at 0x170 irq 15 on atapci0 pci0: <serial bus, USB> at 7.2 (no driver attached) intpm0: <Intel 82371AB Power management controller> port 0x1040-0x104f irq 9 at device 7.3 on pci0 intpm0: I/O mapped 1040 intpm0: intr IRQ 9 enabled revision 0 smbus0: <System Management Bus> on intsmb0 smb0: <SMBus general purpose I/O> on smbus0 intpm0: PM I/O mapped 8000 pci0: <serial bus, FireWire> at 8.0 (no driver attached) pcm0: <Yamaha DS-1E (YMF744)> mem 0xfedf0000-0xfedf7fff irq 9 at device 9.0 on pci0 ds1: setmap (466000, 3de4), nseg=1, error=0 pcm0: ac97 codec id 0x414b4d02 (Asahi Kasei AK4543) pcm0: ac97 codec features headphone, 18 bit DAC, 18 bit ADC, 5 bit master volume, AKM 3D Audio pcm: setmap 486000, 1000; 0xc6ef7000 -> 486000 pcm: setmap 4a0000, 1000; 0xc6f07000 -> 4a0000 pcm: setmap 4b0000, 1000; 0xc6f17000 -> 4b0000 pcm: setmap 4cc000, 1000; 0xc6f27000 -> 4cc000 pcm: setmap 4dc000, 1000; 0xc6f37000 -> 4dc000 pcm: setmap 4ed000, 1000; 0xc6f47000 -> 4ed000 pci0: <multimedia> at 10.0 (no driver attached) pci0: <simple comms> at 11.0 (no driver attached) acpi_pcib0: matched entry for 0.12.INTA (source \\_SB_.LNKB) got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS acpi_pcib0: possible interrupts: 9 Before the call to AcpiSetCurrentResources got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS AcpiRsCalculateByteStreamLength[ 0]: Id: 0, Length: 24 IRQ Resource Edge Triggered Active High Shared 1 Interrupts ( 1 ) AcpiRsCalculateByteStreamLength[ 1]: Id: 9, Length: 0 acpi_pcib0: couldn't route interrupt 9 via \\_SB_.LNKB - AE_AML_INVALID_RESOURCE_TYPE After the call to AcpiSetCurrentResources got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS pcic0: <Ricoh RL5C475 PCI-CardBus Bridge> at device 12.0 on pci0 pcic0: Memory mapped device, will work. pcic0: PCI Memory allocated: 0x44000000 acpi_pcib0: matched entry for 0.12.INTA (source \\_SB_.LNKB) got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS acpi_pcib0: possible interrupts: 9 Before the call to AcpiSetCurrentResources got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS AcpiRsCalculateByteStreamLength[ 0]: Id: 0, Length: 24 IRQ Resource Edge Triggered Active High Shared 1 Interrupts ( 1 ) AcpiRsCalculateByteStreamLength[ 1]: Id: 9, Length: 0 acpi_pcib0: couldn't route interrupt 9 via \\_SB_.LNKB - AE_AML_INVALID_RESOURCE_TYPE After the call to AcpiSetCurrentResources got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS pcic0: Failed to allocate managment irq device_probe_and_attach: pcic0 attach returned 5 acpi_ec0: <embedded controller> on acpi0 acpi_cmbat0: <Control method Battery> on acpi0 acpi_acad0: <AC adapter> on acpi0 acpi_timer0: <24-bit timer at 3.579545MHz> on acpi0 Trying Read_Port at 203 Trying Read_Port at 243 Trying Read_Port at 283 Trying Read_Port at 2c3 Trying Read_Port at 303 Trying Read_Port at 343 Trying Read_Port at 383 Trying Read_Port at 3c3 ata-: ata0 already exists, using ata2 instead ata-: ata1 already exists, using ata3 instead sc-: sc0 already exists, using sc1 instead vga-: vga0 already exists, using vga1 instead isa_probe_children: disabling PnP devices isa_probe_children: probing non-PnP devices orm0: <Option ROMs> at iomem 0xc0000-0xcbfff,0xdc000-0xdffff on isa0 atkbd: the current kbd controller command byte 0047 atkbd: keyboard ID 0x41ab (2) sc0: <System console> on isa0 sc0: VGA <16 virtual consoles, flags=0x200> sc0: fb0, kbd0, terminal emulator: sc (syscons terminal) vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 fb0: vga0, vga, type:VGA (5), flags:0x700ff fb0: port:0x3c0-0x3df, crtc:0x3d4, mem:0xa0000 0x20000 fb0: init mode:24, bios mode:3, current mode:24 fb0: window:0xc00b8000 size:32k gran:32k, buf:0 size:32k VGA parameters upon power-up 50 18 10 00 00 00 03 00 02 67 5f 4f 50 82 55 81 bf 1f 00 4f 0d 0e 00 00 07 80 9c 8e 8f 28 1f 96 b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff VGA parameters in BIOS for mode 24 50 18 10 00 10 00 03 00 02 67 5f 4f 50 82 55 81 bf 1f 00 4f 0d 0e 00 00 00 00 9c 8e 8f 28 1f 96 b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff EGA/VGA parameters to be used for mode 24 50 18 10 00 10 00 03 00 02 67 5f 4f 50 82 55 81 bf 1f 00 4f 0d 0e 00 00 00 00 9c 8e 8f 28 1f 96 b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff ata2 failed to probe at port 0x1f0 irq 14 on isa0 ata3 failed to probe at port 0x170 irq 15 on isa0 atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0 atkbd0: <AT Keyboard> irq 1 on atkbdc0 kbd0 at atkbd0 kbd0: atkbd0, AT 101/102 (2), config:0x0, flags:0x3d0000 psm0: current command byte:0047 psm0: <PS/2 Mouse> irq 12 on atkbdc0 psm0: model Generic PS/2 mouse, device ID 0-00, 2 buttons psm0: config:00000000, flags:00000000, packet size:3 psm0: syncmask:c0, syncbits:00 pcic0 failed to probe at port 0x3e0-0x3e1 on isa0 pcic1 failed to probe at port 0x3e0-0x3e1 on isa0 pmtimer0 on isa0 ppc0 failed to probe at irq 7 on isa0 sc1: no video adapter is found. sc1: <System console> failed to probe on isa0 sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: irq maps: 0x21 0x21 0x21 0x21 sio0: probe failed test(s): 0 1 2 4 6 7 9 sio0 failed to probe at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio1: irq maps: 0x21 0x21 0x21 0x21 sio1: probe failed test(s): 0 1 2 4 6 7 9 sio1 at port 0x2f8-0x2ff flags 0x10 on isa0 sio1: type 8250 spic0 failed to probe at port 0x10a0 on isa0 vga1: <Generic ISA VGA> failed to probe on isa0 vt0 failed to probe on isa0 isa_probe_children: probing PnP devices unknown: <PNP0800> failed to probe at port 0x61 on isa0 unknown: <PNP0303> can't assign resources unknown: <PNP0303> at port 0x60 on isa0 unknown: <PNP0F13> can't assign resources unknown: <PNP0F13> at irq 12 on isa0 unknown: <SNY6001> failed to probe at port 0x1080,0x1084 irq 5,10,11 on isa0 unknown: <16550A-compatible COM port> failed to probe on isa0 unknown: <SNY7001> failed to probe on isa0 unknown: <PNP0400> failed to probe on isa0 unknown: <PNP0400> failed to probe on isa0 unknown: <PNP0401> failed to probe on isa0 unknown: <PNP0400> failed to probe on isa0 BIOS Geometries: 0:03e2fe3f 0..994=995 cylinders, 0..254=255 heads, 1..63=63 sectors 0 accounted for Device configuration finished. IPv6 packet filtering initialized, logging disabled DUMMYNET initialized (010124) bpf: lo0 attached IP packet filtering initialized, divert enabled, rule-based forwarding enabled, default to deny, logging disabled bpf: faith0 attached BRIDGE 010131, have 2 interfaces IP Filter: v3.4.16 initialized. Default = pass all, Logging = enabled acpi_cpu0: set speed to 100.0% acpi_cpu: CPU throttling enabled, 8 steps from 100% to 12.5% ad0: success setting UDMA2 on Intel chip Creating DISK ad0 ad0: <TOSHIBA MK8113MAT/J3.00 A> ATA-4 disk at ata0-master ad0: 7815MB (16006410 sectors), 16938 C, 15 H, 63 S, 512 B ad0: 16 secs/int, 1 depth queue, UDMA33 ad0: piomode=4 dmamode=2 udmamode=2 cblid=0 Mounting root from ufs:/dev/ad0s1a ad0s1: type 0xa5, start 63, end = 6425999, size 6425937 : OK ad0s2: type 0xa5, start 6426000, end = 16000739, size 9574740 : OK start_init: trying /sbin/init acpi_acad0: Off Line system power profile changed to 'economy' acpi_cpu0: set speed to 50.0% acpi_acad0: Off Line acpi_pcib0: matched entry for 0.12.INTA (source \\_SB_.LNKB) got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS acpi_pcib0: possible interrupts: 9 Before the call to AcpiSetCurrentResources got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS AcpiRsCalculateByteStreamLength[ 0]: Id: 0, Length: 24 IRQ Resource Edge Triggered Active High Shared 1 Interrupts ( 1 ) AcpiRsCalculateByteStreamLength[ 1]: Id: 9, Length: 0 acpi_pcib0: couldn't route interrupt 9 via \\_SB_.LNKB - AE_AML_INVALID_RESOURCE_TYPE After the call to AcpiSetCurrentResources got 40 bytes for \\_SB_.LNKB._CRS got 44 bytes for \\_SB_.LNKB._PRS pcic2: <Ricoh RL5C475 PCI-CardBus Bridge> at device 12.0 on pci0 pcic2: Memory mapped device, will work. pcic2: Could not map register memory device_probe_and_attach: pcic2 attach returned 12 sc1: no video adapter is found. sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: irq maps: 0x125 0x125 0x125 0x125 sio0: probe failed test(s): 0 1 2 4 6 7 9 Linux ELF exec handler installed Creating DISK md0 md0: invalid primary partition table: no magic [-- Attachment #3 --] Index: sys/dev/acpica/acpi_pcib.c =================================================================== RCS file: /home/cvs/src/sys/dev/acpica/acpi_pcib.c,v retrieving revision 1.10 diff -u -u -r1.10 acpi_pcib.c --- sys/dev/acpica/acpi_pcib.c 2001/07/07 10:12:06 1.10 +++ sys/dev/acpica/acpi_pcib.c 2001/07/25 03:05:47 @@ -393,8 +393,13 @@ acpi_strerror(status)); /* this is not fatal, since it may be hardwired */ } +#if 0 DEBUG_PRINT(TRACE_RESOURCES, ("got %d bytes for %s._CRS\n", crsbuf.Length, acpi_name(lnkdev))); DEBUG_PRINT(TRACE_RESOURCES, ("got %d bytes for %s._PRS\n", prsbuf.Length, acpi_name(lnkdev))); +#else /* I'm not sure how to activate debugging code */ + AcpiOsPrintf("got %d bytes for %s._CRS\n", crsbuf.Length, acpi_name(lnkdev)); + AcpiOsPrintf("got %d bytes for %s._PRS\n", prsbuf.Length, acpi_name(lnkdev)); +#endif /* * The interrupt may already be routed, so check _CRS first. We don't check the @@ -475,9 +480,19 @@ printf("\n"); crsres->Data.Irq.Interrupts[0] = prsres->Data.Irq.Interrupts[0]; crsres->Data.Irq.NumberOfInterrupts = 1; + + AcpiOsPrintf("Before the call to AcpiSetCurrentResources\n"); + AcpiOsPrintf("got %d bytes for %s._CRS\n", crsbuf.Length, acpi_name(lnkdev)); + AcpiOsPrintf("got %d bytes for %s._PRS\n", prsbuf.Length, acpi_name(lnkdev)); + if (ACPI_FAILURE(status = AcpiSetCurrentResources(lnkdev, &crsbuf))) { device_printf(sc->ap_dev, "couldn't route interrupt %d via %s - %s\n", prsres->Data.Irq.Interrupts[0], acpi_name(lnkdev), acpi_strerror(status)); + + AcpiOsPrintf("After the call to AcpiSetCurrentResources\n"); + AcpiOsPrintf("got %d bytes for %s._CRS\n", crsbuf.Length, acpi_name(lnkdev)); + AcpiOsPrintf("got %d bytes for %s._PRS\n", prsbuf.Length, acpi_name(lnkdev)); + goto out; } [-- Attachment #4 --] Index: sys/contrib/dev/acpica/rscalc.c =================================================================== RCS file: /home/cvs/src/sys/contrib/dev/acpica/rscalc.c,v retrieving revision 1.1.1.7 diff -u -u -r1.1.1.7 rscalc.c --- sys/contrib/dev/acpica/rscalc.c 2001/05/29 19:52:37 1.1.1.7 +++ sys/contrib/dev/acpica/rscalc.c 2001/07/25 03:05:28 @@ -150,6 +150,7 @@ UINT32 SegmentSize; ACPI_RESOURCE_EXT_IRQ *ExIrq = NULL; BOOLEAN Done = FALSE; + int n = 0; FUNCTION_TRACE ("RsCalculateByteStreamLength"); @@ -157,6 +158,16 @@ while (!Done) { + AcpiOsPrintf(__func__ "[%3d]: Id: %d, Length: %d\n", + n, LinkedList->Id, LinkedList->Length); + + if (LinkedList->Length <= 0 || LinkedList->Length > 65536) + return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); + if (n++ >= 10000) { + AcpiOsPrintf("too many iterations in " __func__); + return_ACPI_STATUS (AE_AML_INVALID_RESOURCE_TYPE); + } + /* * Init the variable that will hold the size to add to the total. */ @@ -170,6 +181,13 @@ * For an IRQ Resource, Byte 3, although optional, will * always be created - it holds IRQ information. */ +#ifdef ACPI_DEBUG + /* + * I'm not really sure how to use the debugging codes, + * but this works for me anyway. + */ + AcpiRsDumpIrq(LinkedList); +#endif SegmentSize = 4; break;help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107250340.UAA06939>
