Re: [9fans] Intel ICH7 AHCI

2008-02-24 Thread cinap_lenrek
Linux version 2.6.19 ([EMAIL PROTECTED]) (gcc version 4.1.2 20061028 
(prerelease) (Debian 4.1.1-19)) #7 SMP PREEMPT Sun Dec 17 22:01:07 CET 2006

BIOS-provided physical RAM map:

 BIOS-e820:  - 0009fc00 (usable)

 BIOS-e820: 0009fc00 - 000a (reserved)

 BIOS-e820: 000e - 0010 (reserved)

 BIOS-e820: 0010 - 3fe6 (usable)

 BIOS-e820: 3fe6 - 3fee9000 (ACPI NVS)

 BIOS-e820: 3fee9000 - 3feed000 (usable)

 BIOS-e820: 3feed000 - 3feff000 (ACPI data)

 BIOS-e820: 3feff000 - 3ff0 (usable)

127MB HIGHMEM available.

896MB LOWMEM available.

found SMP MP-table at 000fe680

Entering add_active_range(0, 0, 261888) 0 entries of 256 used

Zone PFN ranges:

  DMA 0 -> 4096

  Normal   4096 ->   229376

  HighMem229376 ->   261888

early_node_map[1] active PFN ranges

0:0 ->   261888

On node 0 totalpages: 261888

  DMA zone: 32 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 4064 pages, LIFO batch:0

  Normal zone: 1760 pages used for memmap

  Normal zone: 223520 pages, LIFO batch:31

  HighMem zone: 254 pages used for memmap

  HighMem zone: 32258 pages, LIFO batch:7

DMI 2.3 present.

ACPI: RSDP (v000 INTEL ) @ 0x000fe020

ACPI: RSDT (v001 INTEL  D945PRN  0x0032 MSFT 0x0113) @ 0x3fefde48

ACPI: FADT (v001 INTEL  D945PRN  0x0032 MSFT 0x0113) @ 0x3fefcf10

ACPI: MADT (v001 INTEL  D945PRN  0x0032 MSFT 0x0113) @ 0x3fefce10

ACPI: WDDT (v001 INTEL  D945PRN  0x0032 MSFT 0x0113) @ 0x3fef7f90

ACPI: MCFG (v001 INTEL  D945PRN  0x0032 MSFT 0x0113) @ 0x3fef7f10

ACPI: DSDT (v001 INTEL  D945PRN  0x0032 MSFT 0x0113) @ 0x

ACPI: PM-Timer IO Port: 0x408

ACPI: Local APIC address 0xfee0

ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)

Processor #0 15:6 APIC version 20

ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)

Processor #1 15:6 APIC version 20

ACPI: LAPIC (acpi_id[0x03] lapic_id[0x82] disabled)

ACPI: LAPIC (acpi_id[0x04] lapic_id[0x83] disabled)

ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x1])

ACPI: LAPIC_NMI (acpi_id[0x02] dfl dfl lint[0x1])

ACPI: IOAPIC (id[0x02] address[0xfec0] gsi_base[0])

IOAPIC[0]: apic_id 2, version 32, address 0xfec0, GSI 0-23

ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)

ACPI: IRQ0 used by override.

ACPI: IRQ2 used by override.

ACPI: IRQ9 used by override.

Enabling APIC mode:  Flat.  Using 1 I/O APICs

Using ACPI (MADT) for SMP configuration information

Allocating PCI resources starting at 4000 (gap: 3ff0:c010)

Detected 3000.319 MHz processor.

Built 1 zonelists.  Total pages: 259842

Kernel command line: ramdisk_size=10 init=/etc/init lang=us apm=power-off 
vga=791 initrd=minirt.gz nomce loglevel=0 quiet BOOT_IMAGE=knoppix 
BOOT_IMAGE=linux 

mapped APIC to d000 (fee0)

mapped IOAPIC to c000 (fec0)

Enabling fast FPU save and restore... done.

Enabling unmasked SIMD FPU exception support... done.

Initializing CPU#0

PID hash table entries: 4096 (order: 12, 16384 bytes)

Console: colour VGA+ 80x25

Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)

Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)

Memory: 1031652k/1047552k available (2747k kernel code, 14636k reserved, 958k 
data, 336k init, 129428k highmem)

virtual kernel memory layout:

fixmap  : 0xffe16000 - 0xf000   (1956 kB)

pkmap   : 0xff80 - 0xffc0   (4096 kB)

vmalloc : 0xf880 - 0xff7fe000   ( 111 MB)

lowmem  : 0xc000 - 0xf800   ( 896 MB)

  .init : 0xc04a6000 - 0xc04fa000   ( 336 kB)

  .data : 0xc03aef9c - 0xc049e7b4   ( 958 kB)

  .text : 0xc010 - 0xc03aef9c   (2747 kB)

Checking if this processor honours the WP bit even in supervisor mode... Ok.

Calibrating delay using timer specific routine.. 6005.83 BogoMIPS (lpj=12011664)

Security Framework v1.0.0 initialized

SELinux:  Disabled at boot.

Capability LSM initialized

Mount-cache hash table entries: 512

CPU: After generic identify, caps: bfebfbff 2010   e43d 
 0001

monitor/mwait feature present.

using mwait in idle threads.

CPU: Trace cache: 12K uops, L1 D cache: 16K

CPU: L2 cache: 2048K

CPU: Physical Processor ID: 0

CPU: Processor Core ID: 0

CPU: After all inits, caps: bfebfbff 2010  0180 e43d 
 0001

Compat vDSO mapped to e000.

Checking 'hlt' instruction... OK.

Checking for popad bug... OK.

SMP alternatives: switching to UP code

ACPI: Core revision 20060707

CPU0: Intel(R) Pentium(R) D CPU 3.00GHz stepping 02

SMP alternatives: switching to SMP code

Booting processor 1/1 eip 3000

Initializing CPU#1

Calibrating delay using timer specific routine.. 6000.75 BogoMIPS (lpj=12001508

Re: [9fans] Intel ICH7 AHCI

2008-02-24 Thread erik quanstrom
assuming my code isn't totally broken on your machine,
it looks as if you have no mp table at all.  so either
your machine has no mp table or we are looking in the
wrong place.

since i'm a little unsure how this could be, my next
step would be to boot linux with mp interrupts to
troll dmesg for clues and compare with where we're
looking.  perhaps someone else has a better idea.

in looking at the mp spec 1.4 again

http://download.intel.com/design/archives/processors/pro/docs/24201606.pdf
plan 9 seems to cover the cases on p. 38 in
pc/archmp.c:/^mpsearch.  i wonder if that else
shouldn't be elided.  another way for bios to
go wrong here is to report the wrong amount
of base memory.

- erik


Re: [9fans] Intel ICH7 AHCI

2008-02-24 Thread cinap_lenrek
> > > > This machine also fails MP. I get mpintrenable() errors for any devices
> > > > including the keyboard and then i end up on the boot prompt unable
> > > > to type anything.
> > > > 
> > > > mpintrenable: out of choices -1 -1
> > > 
> > > generally this means that your machine's mp table is broken.  you can add
> > >   *nomp=1
> > 
> > yep, that works
> 
> then it's highly likely that your mp table is incorrect.  in bios there is 
> often an
> option for mp specification version or some such.  you want to set that to 1.4
> if you have it.  unfortunately, i suspect this is not your problem.

here is no such option for me

> i put a version of mp.c on sources (/n/sources/contrib/quanstro/mp.c) that
> provides the file #P/mpirq which prints out the mp table irq assignments.
> if you can figure out how to save this stuff automatically with mp irqs 
> enabled,
> this should have enough information to say for sure.

added a function to boot/boot.c that reads #P/mpirq and prints it. opening
the file works, but read() returns 0.

i have serial console connected to the machine now so here are some dumps:

boot with *nomp=1:

apm ax=f000 cx=f000 dx=40 di=100 ebx=21e7 esi=

initial probe, to find plan9.ini...dev A0 port 1F0 config 0C5A capabilities 
0F01 mwdma 0107

dev B0 port 1F0 config 85C0 capabilities 0F00 mwdma 0407

pcirouting: 8086/27D4 at pin 3 irq 11

pcirouting: 8086/27D6 at pin 4 irq 10

using sdC0!9fat!plan9.ini

.

Plan 9 Startup Menu:



1. save mode

2. test mode

Selection[default==1]: 1


booting sdC0!9fat!9pcf

found 9pcf

.960547.+1584100.+378252=2922899

entry: 0xf0100020



Plan 9

E820:  0009fc00 memory

E820: 0009fc00 000a reserved

E820: 000e 0010 reserved

E820: 0010 3fe6 memory

E820: 3fe6 3fee9000 acpi nvs

E820: 3fee9000 3feed000 memory

E820: 3feed000 3feff000 acpi reclaim

E820: 3feff000 3ff0 memory

126 holes free

00018000 0009f000 552960

003cb000 1000 264458240

265011200 bytes free

cpu0: 2999MHz GenuineIntel P4 (cpuid: AX 0x0F62 DX 0xBFEBFBFF)

ELCR: 0E00

#l0: i82557: 100Mbps port 0x1040 irq 11: 0002b397c4dd

#U/usb0: uhci: port 0x2080 irq 9

#U/usb1: uhci: port 0x2060 irq 10

#U/usb2: uhci: port 0x2040 irq 11

#U/usb3: uhci: port 0x2020 irq 11

1022M memory: 256M kernel data, 766M user, 1391M swap

root is from (tcp, local)[local!#S/sdC0/fossil]: 

user[none]: glenda

time...

fossil(#S/sdC0/fossil)...version...time...



init: starting /bin/rc



pci -v:
0.0.0:  brg  06.00.00 8086/2770   0
Intel Corporation 82945G/GZ/P/PL Host Bridge/DRAM Controller
0.28.0: brg  06.04.00 8086/27d0 255
Intel Corporation
0.28.2: brg  06.04.00 8086/27d4  11
Intel Corporation
0.28.3: brg  06.04.00 8086/27d6  10
Intel Corporation
0.29.0: usb 0c.03.00 8086/27c8   9 4:2081 32
Intel Corporation
0.29.1: usb 0c.03.00 8086/27c9  10 4:2061 32
Intel Corporation
0.29.2: usb 0c.03.00 8086/27ca  11 4:2041 32
Intel Corporation
0.29.3: usb 0c.03.00 8086/27cb  11 4:2021 32
Intel Corporation
0.30.0: brg  06.04.01 8086/244e 255
Intel Corporation 82801DB Hub Interface to PCI Bridge
0.31.0: brg  06.01.00 8086/27b8   0
Intel Corporation
0.31.1: disk 01.01.8a 8086/27df  11 0:0001 16 1:0001 16 2:0001 16 
3:0001 16 4:20b1 16
Intel Corporation
0.31.2: disk 01.01.8f 8086/27c0  10 0:20c9 16 1:20e5 16 2:20c1 16 
3:20e1 16 4:20a1 16
Intel Corporation 82801 82801 GB Serial ATA Storage Controllers
0.31.3: smb 0c.05.00 8086/27da  10 4:2001 32
Intel Corporation 82801G SMBus Controller
4.0.0:  net  02.00.00 8086/1229  11 0:44021000 4096 1:1041 64 2:4400 
131072
Intel Corporation 82557/8/9/0/1 Fast Ethernet LAN Controller
4.1.0:  vid  03.00.00 5333/8811  11 0:4000 67108864
S3 Graphics Co., Ltd 8622mcq04 Trio 64/64V
4.8.0:  net  02.00.00 8086/27dc  11 0:4402 4096 1:1001 64
Intel Corporation


boot without *nomp=1:

apm ax=f000 cx=f000 dx=40 di=100 ebx=21e7 esi=

initial probe, to find plan9.ini...dev A0 port 1F0 config 0C5A capabilities 
0F01 mwdma 0107

dev B0 port 1F0 config 85C0 capabilities 0F00 mwdma 0407

pcirouting: 8086/27D4 at pin 3 irq 11

pcirouting: 8086/27D6 at pin 4 irq 10

using sdC0!9fat!plan9.ini

.

Plan 9 Startup Menu:



1. save mode

2. test mode

Selection[default==1]: 2


booting sdC0!9fat!9pcf.t

found 9pcf.t

.941432..+1749612..

Re: [9fans] Intel ICH7 AHCI

2008-02-24 Thread erik quanstrom
>>  i feel your pain.  i have a new motherboard with some bad entries in the mp
>>  table, too.
> 
> Not surprising. What we see, all the time, is that the mobo makers
> just barely understand these tables, and usually get them quite wrong.
> We've also seen cases where the MP table for one board was used,
> verbatim, on a very different board. Finally, the vendors are always
> willing to rewire bits of the board, but don't quite get around to
> updating the table.
> 
> Short form: PC hardware is crap.

i'm not casting aspersions.  i've had good luck with getting corrected
bios in the few times i've had trouble on server motherboards.  i
think the problem is that mp interrupts are hard and need to be
constructed at bios runtime to account for the topology of add in
cards and bridges.

- erik



Re: [9fans] Intel ICH7 AHCI

2008-02-23 Thread lucio
> Short form: PC hardware is crap.

Caveat emptor.  I thought we lived in a world that aimed to please the
consumer...

++L



Re: [9fans] Intel ICH7 AHCI

2008-02-23 Thread ron minnich
On Sat, Feb 23, 2008 at 8:29 PM, erik quanstrom <[EMAIL PROTECTED]> wrote:

>  i feel your pain.  i have a new motherboard with some bad entries in the mp
>  table, too.

Not surprising. What we see, all the time, is that the mobo makers
just barely understand these tables, and usually get them quite wrong.
We've also seen cases where the MP table for one board was used,
verbatim, on a very different board. Finally, the vendors are always
willing to rewire bits of the board, but don't quite get around to
updating the table.

Short form: PC hardware is crap.

ron


Re: [9fans] Intel ICH7 AHCI

2008-02-23 Thread erik quanstrom
> > > This machine also fails MP. I get mpintrenable() errors for any devices
> > > including the keyboard and then i end up on the boot prompt unable
> > > to type anything.
> > > 
> > > mpintrenable: out of choices -1 -1
> > 
> > generally this means that your machine's mp table is broken.  you can add
> > *nomp=1
> 
> yep, that works

then it's highly likely that your mp table is incorrect.  in bios there is 
often an
option for mp specification version or some such.  you want to set that to 1.4
if you have it.  unfortunately, i suspect this is not your problem.

i put a version of mp.c on sources (/n/sources/contrib/quanstro/mp.c) that
provides the file #P/mpirq which prints out the mp table irq assignments.
if you can figure out how to save this stuff automatically with mp irqs enabled,
this should have enough information to say for sure.

i feel your pain.  i have a new motherboard with some bad entries in the mp
table, too.

- erik


Re: [9fans] Intel ICH7 AHCI

2008-02-23 Thread cinap_lenrek
> > Have tried Plan9 on Intel D945PLrn mainboard P4 Dualcore and
> > MP, Network and AHCI doesnt work out of the box.
> > 
> > ok, i try to resolve AHCI first... 
> > 
> > the pci ids are 0x8086/0x27c0 for the SATA controller (82801GB) and 
> > i tried to add this to the match function as Tich in sdiahci.c, but this 
> > fails on:
> > 
> > if (p->mem[Abar].bar == 0)
> > continue;
> 
> there's a reason for this check. :-)  if bios isn't setting up Abar, then
> either you're chipset doesn't support ahci or it isn't configured for
> ahci.  generally the options are Enhanced mode with Ahci enabled.
> they're different for esb southbridges.
> 
> intel says that the 82801gb does not support ahci mode.  
>   http://www.intel.com/support/chipsets/imsm/sb/CS-020644.htm
> ich7 should support your drives in *ata* mode.  you may need
> to add the vid/did to sdata.c  you can double check with pci.
> the device class/programming interface/subclass should be 01.06.01.
> you can check for a device with the proper configuration with this
> command:
> 
>   % pci|grep 'disk 01\.06\.01' 

i have 2 entries in pci for disk with class/interf/subclass of:

disk 01.01.8a
disk 01.01.8f

but no 01.06.01 entries.


> > This machine also fails MP. I get mpintrenable() errors for any devices
> > including the keyboard and then i end up on the boot prompt unable
> > to type anything.
> > 
> > mpintrenable: out of choices -1 -1
> 
> generally this means that your machine's mp table is broken.  you can add
>   *nomp=1

yep, that works

> to your plan9.ini file to get around this.  unfortunately, using mp interrupts
> there's no easy way to replicate what this bios does in setting up the
> interrupt routing on a modern machine.

bad :-(

> - erik



Re: [9fans] Intel ICH7 AHCI

2008-02-23 Thread erik quanstrom
> Have tried Plan9 on Intel D945PLrn mainboard P4 Dualcore and
> MP, Network and AHCI doesnt work out of the box.
> 
> ok, i try to resolve AHCI first... 
> 
> the pci ids are 0x8086/0x27c0 for the SATA controller (82801GB) and 
> i tried to add this to the match function as Tich in sdiahci.c, but this 
> fails on:
> 
> if (p->mem[Abar].bar == 0)
>   continue;

there's a reason for this check. :-)  if bios isn't setting up Abar, then
either you're chipset doesn't support ahci or it isn't configured for
ahci.  generally the options are Enhanced mode with Ahci enabled.
they're different for esb southbridges.

intel says that the 82801gb does not support ahci mode.  
http://www.intel.com/support/chipsets/imsm/sb/CS-020644.htm
ich7 should support your drives in *ata* mode.  you may need
to add the vid/did to sdata.c  you can double check with pci.
the device class/programming interface/subclass should be 01.06.01.
you can check for a device with the proper configuration with this
command:

% pci|grep 'disk 01\.06\.01' 

> This machine also fails MP. I get mpintrenable() errors for any devices
> including the keyboard and then i end up on the boot prompt unable
> to type anything.
> 
> mpintrenable: out of choices -1 -1

generally this means that your machine's mp table is broken.  you can add
*nomp=1
to your plan9.ini file to get around this.  unfortunately, using mp interrupts
there's no easy way to replicate what this bios does in setting up the
interrupt routing on a modern machine.

- erik


[9fans] Intel ICH7 AHCI

2008-02-23 Thread cinap_lenrek
Have tried Plan9 on Intel D945PLrn mainboard P4 Dualcore and
MP, Network and AHCI doesnt work out of the box.

ok, i try to resolve AHCI first... 

the pci ids are 0x8086/0x27c0 for the SATA controller (82801GB) and 
i tried to add this to the match function as Tich in sdiahci.c, but this 
fails on:

if (p->mem[Abar].bar == 0)
continue;

SATA mode is on [Enhanced] not [Legacy].

any ideas to progress further here?


This machine also fails MP. I get mpintrenable() errors for any devices
including the keyboard and then i end up on the boot prompt unable
to type anything.

mpintrenable: out of choices -1 -1


cinap