9front - general discussion about 9front
 help / color / mirror / Atom feed
* CDROM on third drive?
@ 2015-01-02  4:46 kokamoto
  2015-01-02 10:46 ` [9front] " cinap_lenrek
  0 siblings, 1 reply; 18+ messages in thread
From: kokamoto @ 2015-01-02  4:46 UTC (permalink / raw)
  To: 9front

A happy new year!?
really happy?  I doubt it from an old man like me.
For young guyes, A Happy New Year definitely!!

My motherboard has an IDE for DVD and three SATA connectors.
The ATAPI CDROM is recongnized as the forth(3 if 0, 1, 2, 3 drives) by BIOS
which dosen't allow me to rearrange it. So, 9front kernel on that machine dosen't
recongnize IDE DVD drive.

If I want to change the source to change this, which source file I can edit?
Or is it difficult?

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-02  4:46 CDROM on third drive? kokamoto
@ 2015-01-02 10:46 ` cinap_lenrek
  2015-01-03  2:42   ` kokamoto
  0 siblings, 1 reply; 18+ messages in thread
From: cinap_lenrek @ 2015-01-02 10:46 UTC (permalink / raw)
  To: 9front

the 9boot loader should have no restriction on the drive
order. it gets the drive number passed in a register when
bios enters the bootsector code.

so, if the kernel got loaded but is unable to access
the dvd drive, then there is something else wrong.

maybe the ide controller isnt recognized or in the wrong
mode. can you enter !rc and cat /dev/sdctl?

--
cinap


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-02 10:46 ` [9front] " cinap_lenrek
@ 2015-01-03  2:42   ` kokamoto
  2015-01-03  3:16     ` cinap_lenrek
  0 siblings, 1 reply; 18+ messages in thread
From: kokamoto @ 2015-01-03  2:42 UTC (permalink / raw)
  To: 9front

Thanks cinap

cat /dev/sdctl says:

sdE ahci ich port 0xffffff000000f200: iss 0 ncs 0 np 1 ghc 80000002 isr 0 pi 3f 0-5 ver 0

My BIOS Main message says:

IDE Channel 0 Master   [None]
IDE Channel 0 Slave      [None]
IDE Channel 1 Master   [None]
IDE Channel 1 Slave      [None]
IDE Channel 2 Master   [None]
IDE Channel 3 Master  [ PIONEER DVD-RW DVD-]

I have no HDD drives, but have only one IDE DVD drive.

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-03  2:42   ` kokamoto
@ 2015-01-03  3:16     ` cinap_lenrek
  2015-01-03  6:50       ` kokamoto
  0 siblings, 1 reply; 18+ messages in thread
From: cinap_lenrek @ 2015-01-03  3:16 UTC (permalink / raw)
  To: 9front

it seems plausible that your drive is on this ahci controller,
as the pi shows 6 ahci ports. (if this is physical sata is
a different matter).

try booting with: *ahcidebug=1

just for info, can you check if there is anything in #S?

maybe the sata controller is just slow attaching the
drives so they dont show up in the boot device listing.

--
cinap


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-03  3:16     ` cinap_lenrek
@ 2015-01-03  6:50       ` kokamoto
  2015-01-03 14:37         ` cinap_lenrek
  0 siblings, 1 reply; 18+ messages in thread
From: kokamoto @ 2015-01-03  6:50 UTC (permalink / raw)
  To: 9front

> try booting with: *ahcidebug=1

It says:

....
iahci 0.0: configdrive: missing
iahci 0.1: configdrive: missing
iahci 0.2: configdrive: missing
iahci 0.3: configdrive: missing
iahci 0.4: configdrive: missing
iahci 0.5: configdrive: missing
....
sdE0: status ffff-->000: missing
sdE1: status ffff-->000: missing
sdE2: status ffff-->000: missing
sdE3: status ffff-->000: missing
sdE4: status ffff-->000: missing
sdE5: status ffff-->000: missing
....
sdE0: iaonline: missing
sdE1: iaonline: missing
sdE2: iaonline: missing
sdE3: iaonline: missing
sdE4: iaonline: missing
sdE5: iaonline: missing

nothing detected.

This is an old machine with C2D and Intel G965 chipset.

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-03  6:50       ` kokamoto
@ 2015-01-03 14:37         ` cinap_lenrek
  2015-01-04  0:36           ` kokamoto
  2015-01-04  0:53           ` kokamoto
  0 siblings, 2 replies; 18+ messages in thread
From: cinap_lenrek @ 2015-01-03 14:37 UTC (permalink / raw)
  To: 9front

i'd like to see pci information on this. could you, instead of mounting
root from cdrom boot from plan9 fileserver and run pci -v command?

alternatively, run this in the !rc shell:

grep '^01' '#$'/pci/*ctl

another thing would be to look in bios if there is any option for
IDE/AHCI/RAID settings. maybe it does emulate a ide controller that
that is not probed or detected and switching to AHCI mode (if theres
such an option) can make it appear on the sata controller.

--
cinap


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-03 14:37         ` cinap_lenrek
@ 2015-01-04  0:36           ` kokamoto
  2015-01-04  0:53           ` kokamoto
  1 sibling, 0 replies; 18+ messages in thread
From: kokamoto @ 2015-01-04  0:36 UTC (permalink / raw)
  To: 9front

> i'd like to see pci information on this. could you, instead of mounting
> root from cdrom boot from plan9 fileserver and run pci -v command?

Here is the result:
-------from here-----
0.0.0:	brg  06.00.00 8086/29a0   0
	Intel Corporation ?(82P965) Intel P965/G965 Processor to I/O Controller
0.1.0:	brg  06.04.00 8086/29a1  10
	Intel Corporation ?(82Q965, 82G965, 82P965) Intel P965/G965 PCI Express Root Port
0.26.0:	usb  0c.03.00 8086/2834  10 4:0000ff01 32
	Intel Corporation
0.26.1:	usb  0c.03.00 8086/2835  10 4:0000fe01 32
	Intel Corporation
0.26.7:	usb  0c.03.20 8086/283a  11 0:fdffe000 1024
	Intel Corporation 81EC1043 (?) ICH8 Enhanced USB2 Enhanced Host Controller
0.27.0:	aud  04.03.00 8086/284b   5 0:fdff4004 16384 1:00000000 16
	Intel Corporation 888 Microsoft UAA bus for HD audio
0.28.0:	brg  06.04.00 8086/283f 255
	Intel Corporation
0.29.0:	usb  0c.03.00 8086/2830   9 4:0000fd01 32
	Intel Corporation
0.29.1:	usb  0c.03.00 8086/2831  11 4:0000fc01 32
	Intel Corporation
0.29.2:	usb  0c.03.00 8086/2832  11 4:0000fb01 32
	Intel Corporation
0.29.7:	usb  0c.03.20 8086/2836   9 0:fdffd000 1024
	Intel Corporation
0.3.0:	ser  07.80.00 8086/29a4  10 0:fdfff004 16 1:00000000 16
	Intel Corporation Intel DG965SS The Intel Management Engine provides thermal management for Intel Desktop Boards.
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/2810   0
	Intel Corporation
0.31.2:	disk 01.01.8a 8086/2820  11 0:00000001 16 1:00000001 16 2:00000001 16 3:00000001 16 4:0000fa01 16 5:0000f901 16
	Intel Corporation 82801HB/HR/HH/HO SATA IDE Controller:4 port
0.31.3:	smb  0c.05.00 8086/283e  11 0:fdffc000 256 4:00000501 32
	Intel Corporation PCI\VEN_8086&DEV_283E&SUBSYS_20A917AA&REV_03\3&B1B SM Bus Controller
0.31.5:	disk 01.01.85 8086/2825  11 0:0000f701 16 1:0000f601 16 2:0000f501 16 3:0000f401 16 4:0000f301 16 5:0000f201 16
	Intel Corporation 82801IIH Intel Q35
1.0.0:	vid  03.00.00 10de/0392  10 0:fa000000 16777216 1:d000000c 268435456 2:00000000 16 3:fb000004 16777216 4:00000000 16 5:0000df01 128
	NVIDIA Corporation G73 NVIDIA GeForce 7600 GS
2.0.0:	net  02.00.00 10ec/8168  10 0:0000ee01 256 2:fdbff004 4096 3:00000000 16
	Realtek RTL8167 PCIe Gigabit Ethernet Family Controller
----to here---

I changed the sour of /sys/src/9/pc/sdide.c as

atapnp(void)
....
for(p=nil; p=pcimatch(p,0,0); ){
....
		case (0x2820<<16)|0x8086:	/* 82801HB/HR/HH/HO SATA IDE */
		case (0x2825<<16)|0x8086:	<====added
		case (0x2828<<16)|0x8086:	/* 82801HBM SATA (ICH8-M) */
...
and recompiled the 9pcf.

Then,
cat /dev/sdctl
-----
sdC ata port F500 ctl F400 irq 11
sdE ahci ich port 0xe0002200: iss 0 ncs 0 np 1 ghc 80000002 isr 0 pi 3f 0-5 ver 0
-----

Now I got sdC line here, however I don't have /dev/sdC0 device.
How I can do it?

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-03 14:37         ` cinap_lenrek
  2015-01-04  0:36           ` kokamoto
@ 2015-01-04  0:53           ` kokamoto
  2015-01-04  1:19             ` cinap_lenrek
  1 sibling, 1 reply; 18+ messages in thread
From: kokamoto @ 2015-01-04  0:53 UTC (permalink / raw)
  To: 9front

> another thing would be to look in bios if there is any option for
> IDE/AHCI/RAID settings. maybe it does emulate a ide controller that
> that is not probed or detected and switching to AHCI mode (if theres
> such an option) can make it appear on the sata controller.

My BIOS is Phoenix-AwardBIOS, which has only one option for
IDE related thing.  The below is the menu tree:
Integrated Peripherals
	OnChip IDE Device
		LEGACY Mode Support    [Enabled].

If I choose this option [Disabled], the 9pcf kernel makes panic.

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-04  0:53           ` kokamoto
@ 2015-01-04  1:19             ` cinap_lenrek
  2015-01-04  2:17               ` kokamoto
  0 siblings, 1 reply; 18+ messages in thread
From: cinap_lenrek @ 2015-01-04  1:19 UTC (permalink / raw)
  To: 9front

so there is a second ide controller there in legacy mode!
can you make a photo of the panic with legacy mode disabled
and send me your 9pcf kernel?

--
cinap


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-04  1:19             ` cinap_lenrek
@ 2015-01-04  2:17               ` kokamoto
  2015-01-04  2:58                 ` cinap_lenrek
  0 siblings, 1 reply; 18+ messages in thread
From: kokamoto @ 2015-01-04  2:17 UTC (permalink / raw)
  To: 9front

> can you make a photo of the panic with legacy mode disabled
> and send me your 9pcf kernel?

I sent this by personal mail,
because it's too large file.

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-04  2:17               ` kokamoto
@ 2015-01-04  2:58                 ` cinap_lenrek
  2015-01-04  5:12                   ` kokamoto
  0 siblings, 1 reply; 18+ messages in thread
From: cinap_lenrek @ 2015-01-04  2:58 UTC (permalink / raw)
  To: 9front

found it, i made a new kernel under:

http://felloff.net/usr/cinap_lenrek/9pcfkenji2

the problem is that the ahci pci bar is probably wrong.
i added checks for this now so it shouldnt crash in this
place anymore.

if there are still issues, pass the *noahci=1 boot
parameter to the kernel in non-legacy mode. that should
at least get the kernel up and we can inspect the pci
device (using pci(1)) from netbooted plan9.

--
cinap

PS:

term% ktrace -i /tmp/9pcfkenji0 f010852c f0018c40
src(0xf010852c); // dumpstack+0x10
// data at 0xf0018c48? f016376c
src(0xf016376c); // panic+0xd2
// data at 0xf0018d70? f0108670
src(0xf0108670); // fault386+0xa3
// data at 0xf0018e20? f0107c39
src(0xf0107c39); // trap+0x15b
// data at 0xf0018ee0? f01005f0
src(0xf01005f0); // forkret
//passing interrupt frame; last pc found at sp=0xf0018ee0
// data at 0xf0018f20? f01b6736
src(0xf01b6736); // ahciidle+0x12
// data at 0xf0018f44? f01b6a25
src(0xf01b6a25); // ahciconfigdrive+0x78
// data at 0xf0018f64? f01b7424
src(0xf01b7424); // configdrive+0x2c
// data at 0xf0018f7c? f01ba366
src(0xf01ba366); // iapnp+0x337
// data at 0xf0018fc0? f01d157b
src(0xf01d157b); // sdreset+0x3d
// data at 0xf0018fd8? f0203550
src(0xf0203550); // chandevreset+0x24

acid: src(0xf01b6736); // ahciidle+0x12
/sys/src/9/pc/sdiahci.c:510
 505	ahciidle(Aport *port)
 506	{
 507		ulong *p, i, r;
 508	
 509		p = &port->cmd;
>510		if((*p & Arun) == 0)
 511			return 0;
 512		*p &= ~Ast;
 513		r = 0;
 514		for(i = 0; i < 500; i += 25){
 515			if((*p & Acr) == 0)

diff -r 1ccba5ce1e27 sys/src/9/pc/sdiahci.c
--- a/sys/src/9/pc/sdiahci.c	Sat Jan 03 18:33:35 2015 +0100
+++ b/sys/src/9/pc/sdiahci.c	Sun Jan 04 03:50:30 2015 +0100
@@ -2159,7 +2159,9 @@
 	while((p = pcimatch(p, 0, 0)) != nil){
 		if((type = didtype(p)) == -1)
 			continue;
-		if(p->mem[Abar].bar == 0)
+		if((p->mem[Abar].bar & ~0xf) == 0 || (p->mem[Abar].bar & 1) != 0)
+			continue;
+		if(p->mem[Abar].size < 0x180)
 			continue;
 		if(niactlr == NCtlr){
 			print("iapnp: %s: too many controllers\n", tname[type]);
@@ -2208,11 +2210,14 @@
 			d->ctlr = c;
 			if((c->hba->pi & 1<<i) == 0)
 				continue;
-			snprint(d->name, sizeof d->name, "iahci%d.%d", niactlr, i);
-			d->port = (Aport*)(c->mmio + 0x80*i + 0x100);
+			io = 0x100 + 0x80*i;
+			if((io + 0x80) > p->mem[Abar].size)
+				continue;
+			d->port = (Aport*)(c->mmio + io);
 			d->portc.p = d->port;
 			d->portc.m = &d->portm;
 			d->driveno = n++;
+			snprint(d->name, sizeof d->name, "iahci%d.%d", niactlr, i);
 			c->drive[d->driveno] = d;
 			iadrive[niadrive + d->driveno] = d;
 		}


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-04  2:58                 ` cinap_lenrek
@ 2015-01-04  5:12                   ` kokamoto
  2015-01-04  5:13                     ` kokamoto
  0 siblings, 1 reply; 18+ messages in thread
From: kokamoto @ 2015-01-04  5:12 UTC (permalink / raw)
  To: 9front

Wao!
Yes, your patch worked very fine.
cat /dev/sdctl says:
sdC ata port F100 ctl F000 irq 11.

When I inserted 9front CDROM,
ls -l /dev/sdC0 says:
--rw-r----- S 0 sys sys 0 Jan 4 11:50 /dev/sdC0/ctl
--rw-r----- S 0 sys sys 5555814000 Jan 4 11:50 /dev/sdC0/data
-lrw------    S 0 sys sys 0 Jan 4 11:50 /dev/sdC0/raw

then mounted CDROM to /n/cdrom, and then
cat /n/cdrom/cfg/plan9.ini says:
# config for initial cd booting
cdboot=yes
mouseport=ask
monitor=ask
vgasize=ask
bootfile=/386/9pcf.

All very good!!

Many debug lines are like:
ataready: dev f100: a0 reset 88 ready 0 ataargs 0xF100: 0x20 0x03 0x00 0x00 0x00 0x51
ataready: 106999: 10700 0x51
ataready: dev f100: 0 reset 80 ready 9 ataregs 0xF100: 0x20 0x00 0x00 0x00 0x80 0xA0 0x58
ataready: 400000:400000 0x58

and cat /dev/sdctl says:
sdc ata port F100 ctl F000 irq 11.

Thank you very much cinap.  You works very fast and fine!

Kenji

PS.  Your kernel(9pcfkenji2) has much improve of Japanese USB keyboard,
if we can neglect the nonability to input these four characters, '|', '¥', '_', '\'.



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-04  5:12                   ` kokamoto
@ 2015-01-04  5:13                     ` kokamoto
  2015-01-04  6:08                       ` kokamoto
  0 siblings, 1 reply; 18+ messages in thread
From: kokamoto @ 2015-01-04  5:13 UTC (permalink / raw)
  To: 9front

Awawawa!
This was aimed to be personal mail.
Sorry, cinap.

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-04  5:13                     ` kokamoto
@ 2015-01-04  6:08                       ` kokamoto
  2015-01-04 13:28                         ` cinap_lenrek
  2015-01-07  5:39                         ` kokamoto
  0 siblings, 2 replies; 18+ messages in thread
From: kokamoto @ 2015-01-04  6:08 UTC (permalink / raw)
  To: 9front

Thanks cinap, now I have very cute small 64bit 9front
terminal with C2D(E7400)+4GB memory.
This box was called as Xcube from ASUS (20x20x32cm)
which can use 1 HDD and 1 DVD upto 4GB memory.

I don't like Note's small display and huge desktop boxes.

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-04  6:08                       ` kokamoto
@ 2015-01-04 13:28                         ` cinap_lenrek
  2015-01-07  5:39                         ` kokamoto
  1 sibling, 0 replies; 18+ messages in thread
From: cinap_lenrek @ 2015-01-04 13:28 UTC (permalink / raw)
  To: 9front

thank you for your patience :)

--
cinap


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-04  6:08                       ` kokamoto
  2015-01-04 13:28                         ` cinap_lenrek
@ 2015-01-07  5:39                         ` kokamoto
  2015-01-07  5:54                           ` mischief
  1 sibling, 1 reply; 18+ messages in thread
From: kokamoto @ 2015-01-07  5:39 UTC (permalink / raw)
  To: 9front

> Thanks cinap, now I have very cute small 64bit 9front
> terminal with C2D(E7400)+4GB memory.
> This box was called as Xcube from ASUS (20x20x32cm)
> which can use 1 HDD and 1 DVD upto 4GB memory.

That's motherboard's name is UX965G-LWV.
I forgot to report this.

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-07  5:39                         ` kokamoto
@ 2015-01-07  5:54                           ` mischief
  2015-01-07  8:40                             ` kokamoto
  0 siblings, 1 reply; 18+ messages in thread
From: mischief @ 2015-01-07  5:54 UTC (permalink / raw)
  To: 9front, kokamoto

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]

Kenji,

Running sysinfo -p will post information about your system to sysinfo.9front.org so others can find it later. Its possible to add it to the knownworkinghardware wiki page too.

On January 6, 2015 9:39:23 PM PST, kokamoto@hera.eonet.ne.jp wrote:
>> Thanks cinap, now I have very cute small 64bit 9front
>> terminal with C2D(E7400)+4GB memory.
>> This box was called as Xcube from ASUS (20x20x32cm)
>> which can use 1 HDD and 1 DVD upto 4GB memory.
>
>That's motherboard's name is UX965G-LWV.
>I forgot to report this.
>
>Kenji

[-- Attachment #2: Type: text/html, Size: 1004 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [9front] CDROM on third drive?
  2015-01-07  5:54                           ` mischief
@ 2015-01-07  8:40                             ` kokamoto
  0 siblings, 0 replies; 18+ messages in thread
From: kokamoto @ 2015-01-07  8:40 UTC (permalink / raw)
  To: 9front

>Running sysinfo -p will post information about your system to sysinfo.9front.org so others can find it later. 

Really, I didn't know that.
Ok, I added two examples.

Kenji



^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-01-07  8:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-02  4:46 CDROM on third drive? kokamoto
2015-01-02 10:46 ` [9front] " cinap_lenrek
2015-01-03  2:42   ` kokamoto
2015-01-03  3:16     ` cinap_lenrek
2015-01-03  6:50       ` kokamoto
2015-01-03 14:37         ` cinap_lenrek
2015-01-04  0:36           ` kokamoto
2015-01-04  0:53           ` kokamoto
2015-01-04  1:19             ` cinap_lenrek
2015-01-04  2:17               ` kokamoto
2015-01-04  2:58                 ` cinap_lenrek
2015-01-04  5:12                   ` kokamoto
2015-01-04  5:13                     ` kokamoto
2015-01-04  6:08                       ` kokamoto
2015-01-04 13:28                         ` cinap_lenrek
2015-01-07  5:39                         ` kokamoto
2015-01-07  5:54                           ` mischief
2015-01-07  8:40                             ` kokamoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).