Linux MIPS Architecture development
 help / color / mirror / Atom feed
* IDE driver problem
@ 2004-02-24  5:09 Liu Hongming (Alan)
  2004-02-24 11:55 ` Thomas Lange
  2004-02-24 22:09 ` Alan Cox
  0 siblings, 2 replies; 12+ messages in thread
From: Liu Hongming (Alan) @ 2004-02-24  5:09 UTC (permalink / raw)
  To: linux-mips

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

Hi All,

I am porting IDE drivers(Since my hardware has endian issue),
and now it could work,however it has some abnormal problems:

I could 'fdisk'  /dev/hda,and partition it into several partitions.
After this,I reboot my board and see all the partitions is there.
Then I 'mke2fs' on /dev/hda1,after this, when using 'fdisk' again,
I found all partitions gone! At this time,I could not access /dev/hda1
any more.However, I could 'mount /dev/hda /opt', it really worked,and
I could create/read/write/erase files in it.

I dumped the first sector of Hard disk and found that it has been
zeroed.Now I dont know what the problem is,since I am not familiar 
with fs parts of linux kernel,and I dont know what 'mke2fs' has done.

Any advice?

Alan

-----Original Message-----
From: Kevin D. Kissell [mailto:kevink@mips.com]
Sent: Tuesday, February 24, 2004 6:47 AM
To: Mark and Janice Juszczec; linux-mips@linux-mips.org
Cc: uhler@mips.com; dom@mips.com; echristo@redhat.com
Subject: Re: r3000 instruction set


Kaffe's makefiles won't pick up on configuration changes, so any time
you re-configure for a different engine or debug level, you need to do
a make clean.  At least, that's the way it was the last time I worked on it.
If you had a partial build with JIT, then changed to intrp, then you could
get all kinds of strange behavior.  The address range of your error us a
dead giveaway.  It's too high to be the kaffe code segment, but too low
to be a shared library.  It's where I'd expect the heap to be, and where
I remember the JIT buffers being allocated when I was trying to debug
that stuff.

> Its been a few weeks since I built this version of kaffe.  The configure 
> output says I did specify --with-engine=intrp.  I'll delete the compiled 
> stuff, reconfigure (double checking that I give it --with-engine=intrp), 
> recompile and retest.
> 
> I'll post my results.
> 
> Mark
> 
> 
> 
> >From: "Kevin D. Kissell" <kevink@mips.com>
> >To: "Mark and Janice Juszczec" <juszczec@hotmail.com>,        
> ><linux-mips@linux-mips.org>
> >CC: <uhler@mips.com>, <dom@mips.com>, <echristo@redhat.com>
> >Subject: Re: r3000 instruction set
> >Date: Mon, 23 Feb 2004 18:21:19 +0100
> >
> > > Someone suggested posting the message I get.  Here it is:
> > >
> > > >./kaffe-bin FirstClass
> > > [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
> > > P0_STATUS=0000500
> > > pid 6: killed (signal 4)
> > > >Reading command line: Try again
> > > Kernel panic: Attmpted to kill int!
> >
> >Let me guess.  You are running little-endian.  The instruction word
> >in memory would be 0x6a697406.  Do you think it's a coincidence
> >that 0x6a6974 spells "jit" in ASCII?  ;o)
> >
> >The reported address range looks like that where kaffe builds its
> >JITted instruciton buffers in MIPS/Linux.  And, like I say, JIT is
> >somewhat broken for MIPS in Kaffe.  Which version of the kaffe sources
> >are you building, and have you tried configuring with --with-engine=intrp
> >as I suggested?
> >
> >             Regards,
> >
> >             Kevin K.
> 
> _________________________________________________________________
> Click, drag and drop. My MSN is the simple way to design your homepage. 
> http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/
> 
> 

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

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

* Re: IDE driver problem
  2004-02-24  5:09 Liu Hongming (Alan)
@ 2004-02-24 11:55 ` Thomas Lange
  2004-02-24 22:09 ` Alan Cox
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Lange @ 2004-02-24 11:55 UTC (permalink / raw)
  To: Liu Hongming (Alan); +Cc: linux-mips

The partition table is written to the first partition
on the device, in your example hda1.
Use mke2fs on hda2 and I am sure it work just great.

Cheers,
/Thomas

Liu Hongming (Alan) wrote:
> Hi All,
> 
> I am porting IDE drivers(Since my hardware has endian issue),
> and now it could work,however it has some abnormal problems:
> 
> I could 'fdisk'  /dev/hda,and partition it into several partitions.
> After this,I reboot my board and see all the partitions is there.
> Then I 'mke2fs' on /dev/hda1,after this, when using 'fdisk' again,
> I found all partitions gone! At this time,I could not access /dev/hda1
> any more.However, I could 'mount /dev/hda /opt', it really worked,and
> I could create/read/write/erase files in it.
> 
> I dumped the first sector of Hard disk and found that it has been
> zeroed.Now I dont know what the problem is,since I am not familiar
> with fs parts of linux kernel,and I dont know what 'mke2fs' has done.
> 
> Any advice?
> 
> Alan
> 
> -----Original Message-----
> From: Kevin D. Kissell [mailto:kevink@mips.com]
> Sent: Tuesday, February 24, 2004 6:47 AM
> To: Mark and Janice Juszczec; linux-mips@linux-mips.org
> Cc: uhler@mips.com; dom@mips.com; echristo@redhat.com
> Subject: Re: r3000 instruction set
> 
> 
> Kaffe's makefiles won't pick up on configuration changes, so any time
> you re-configure for a different engine or debug level, you need to do
> a make clean.  At least, that's the way it was the last time I worked on 
> it.
> If you had a partial build with JIT, then changed to intrp, then you could
> get all kinds of strange behavior.  The address range of your error us a
> dead giveaway.  It's too high to be the kaffe code segment, but too low
> to be a shared library.  It's where I'd expect the heap to be, and where
> I remember the JIT buffers being allocated when I was trying to debug
> that stuff.
> 
>  > Its been a few weeks since I built this version of kaffe.  The configure
>  > output says I did specify --with-engine=intrp.  I'll delete the compiled
>  > stuff, reconfigure (double checking that I give it --with-engine=intrp),
>  > recompile and retest.
>  >
>  > I'll post my results.
>  >
>  > Mark
>  >
>  >
>  >
>  > >From: "Kevin D. Kissell" <kevink@mips.com>
>  > >To: "Mark and Janice Juszczec" <juszczec@hotmail.com>,       
>  > ><linux-mips@linux-mips.org>
>  > >CC: <uhler@mips.com>, <dom@mips.com>, <echristo@redhat.com>
>  > >Subject: Re: r3000 instruction set
>  > >Date: Mon, 23 Feb 2004 18:21:19 +0100
>  > >
>  > > > Someone suggested posting the message I get.  Here it is:
>  > > >
>  > > > >./kaffe-bin FirstClass
>  > > > [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
>  > > > P0_STATUS=0000500
>  > > > pid 6: killed (signal 4)
>  > > > >Reading command line: Try again
>  > > > Kernel panic: Attmpted to kill int!
>  > >
>  > >Let me guess.  You are running little-endian.  The instruction word
>  > >in memory would be 0x6a697406.  Do you think it's a coincidence
>  > >that 0x6a6974 spells "jit" in ASCII?  ;o)
>  > >
>  > >The reported address range looks like that where kaffe builds its
>  > >JITted instruciton buffers in MIPS/Linux.  And, like I say, JIT is
>  > >somewhat broken for MIPS in Kaffe.  Which version of the kaffe sources
>  > >are you building, and have you tried configuring with 
> --with-engine=intrp
>  > >as I suggested?
>  > >
>  > >             Regards,
>  > >
>  > >             Kevin K.
>  >
>  > _________________________________________________________________
>  > Click, drag and drop. My MSN is the simple way to design your homepage.
>  > http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/
>  >
>  >
> 

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

* RE: IDE driver problem
@ 2004-02-24 12:09 Liu Hongming (Alan)
  0 siblings, 0 replies; 12+ messages in thread
From: Liu Hongming (Alan) @ 2004-02-24 12:09 UTC (permalink / raw)
  To: Thomas Lange, Liu Hongming (Alan); +Cc: linux-mips

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

Hi Thomas,

I agree what you said,however,my problem is that
when I use 'mke2fs /dev/hda2', it will report following errors:
"Device size reported to be zero.  Invalid partition specified, or
 partition table wasn't reread after running fdisk, due to
 a modified partition being busy and in use.  You may need to reboot
 to re-read your partition table".
The fact is that I have created four partitions: hda1,hda2,hda3,hda4.
And their cylinder is:1-1000,1001-2000,2001-3000,3001-4000.However,
when kernel boots up,it only could find hda1.
After rebooting,I use fdisk to find the status of the four partitions.They
are
all still there.I dont know why kernel could not find them. I have used
tools
to dump the first sector,the four partition table is:
0x00000000:  00000000 00000000 00000000 00000000
0x00000010:  00000000 00000000 00000000 00000000
0x00000020:  00000000 00000000 00000000 00000000
0x00000030:  00000000 00000000 00000000 00000000
0x00000040:  00000000 00000000 00000000 00000000
0x00000050:  00000000 00000000 00000000 00000000
0x00000060:  00000000 00000000 00000000 00000000
0x00000070:  00000000 00000000 00000000 00000000
0x00000080:  00000000 00000000 00000000 00000000
0x00000090:  00000000 00000000 00000000 00000000
0x000000a0:  00000000 00000000 00000000 00000000
0x000000b0:  00000000 00000000 00000000 00000000
0x000000c0:  00000000 00000000 00000000 00000000
0x000000d0:  00000000 00000000 00000000 00000000
0x000000e0:  00000000 00000000 00000000 00000000
0x000000f0:  00000000 00000000 00000000 00000000
0x00000100:  00000000 00000000 00000000 00000000
0x00000110:  00000000 00000000 00000000 00000000
0x00000120:  00000000 00000000 00000000 00000000
0x00000130:  00000000 00000000 00000000 00000000
0x00000140:  00000000 00000000 00000000 00000000
0x00000150:  00000000 00000000 00000000 00000000
0x00000160:  00000000 00000000 00000000 00000000
0x00000170:  00000000 00000000 00000000 00000000
0x00000180:  00000000 00000000 00000000 00000000
0x00000190:  00000000 00000000 00000000 00000000
0x000001a0:  00000000 00000000 00000000 00000000
0x000001b0:  00000000 00000000 00000000 00008001
0x000001c0:  0100830f  ffe73f00 00004161 0f000000
0x000001d0:  c1e8830f ffff8061 0f008061 0f00000f
0x000001e0:  ffff830f ffff00c3 1e008061 0f00000f
0x000001f0:  ffff830f ffff8024 2e008061 0f0055aa

I think they are all right.But why kernel could not find these partitions?

Best Regards,
Alan

-----Original Message-----
From: Thomas Lange [mailto:thomas@corelatus.se]
Sent: Tuesday, February 24, 2004 7:56 PM
To: Liu Hongming (Alan)
Cc: linux-mips@linux-mips.org
Subject: Re: IDE driver problem


The partition table is written to the first partition
on the device, in your example hda1.
Use mke2fs on hda2 and I am sure it work just great.

Cheers,
/Thomas

Liu Hongming (Alan) wrote:
> Hi All,
> 
> I am porting IDE drivers(Since my hardware has endian issue),
> and now it could work,however it has some abnormal problems:
> 
> I could 'fdisk'  /dev/hda,and partition it into several partitions.
> After this,I reboot my board and see all the partitions is there.
> Then I 'mke2fs' on /dev/hda1,after this, when using 'fdisk' again,
> I found all partitions gone! At this time,I could not access /dev/hda1
> any more.However, I could 'mount /dev/hda /opt', it really worked,and
> I could create/read/write/erase files in it.
> 
> I dumped the first sector of Hard disk and found that it has been
> zeroed.Now I dont know what the problem is,since I am not familiar
> with fs parts of linux kernel,and I dont know what 'mke2fs' has done.
> 
> Any advice?
> 
> Alan
> 
> -----Original Message-----
> From: Kevin D. Kissell [mailto:kevink@mips.com]
> Sent: Tuesday, February 24, 2004 6:47 AM
> To: Mark and Janice Juszczec; linux-mips@linux-mips.org
> Cc: uhler@mips.com; dom@mips.com; echristo@redhat.com
> Subject: Re: r3000 instruction set
> 
> 
> Kaffe's makefiles won't pick up on configuration changes, so any time
> you re-configure for a different engine or debug level, you need to do
> a make clean.  At least, that's the way it was the last time I worked on 
> it.
> If you had a partial build with JIT, then changed to intrp, then you could
> get all kinds of strange behavior.  The address range of your error us a
> dead giveaway.  It's too high to be the kaffe code segment, but too low
> to be a shared library.  It's where I'd expect the heap to be, and where
> I remember the JIT buffers being allocated when I was trying to debug
> that stuff.
> 
>  > Its been a few weeks since I built this version of kaffe.  The
configure
>  > output says I did specify --with-engine=intrp.  I'll delete the
compiled
>  > stuff, reconfigure (double checking that I give it
--with-engine=intrp),
>  > recompile and retest.
>  >
>  > I'll post my results.
>  >
>  > Mark
>  >
>  >
>  >
>  > >From: "Kevin D. Kissell" <kevink@mips.com>
>  > >To: "Mark and Janice Juszczec" <juszczec@hotmail.com>,       
>  > ><linux-mips@linux-mips.org>
>  > >CC: <uhler@mips.com>, <dom@mips.com>, <echristo@redhat.com>
>  > >Subject: Re: r3000 instruction set
>  > >Date: Mon, 23 Feb 2004 18:21:19 +0100
>  > >
>  > > > Someone suggested posting the message I get.  Here it is:
>  > > >
>  > > > >./kaffe-bin FirstClass
>  > > > [kaffe-bin:6] Illgal instruction 674696a at 2abb034, ra=2adbffd0,
>  > > > P0_STATUS=0000500
>  > > > pid 6: killed (signal 4)
>  > > > >Reading command line: Try again
>  > > > Kernel panic: Attmpted to kill int!
>  > >
>  > >Let me guess.  You are running little-endian.  The instruction word
>  > >in memory would be 0x6a697406.  Do you think it's a coincidence
>  > >that 0x6a6974 spells "jit" in ASCII?  ;o)
>  > >
>  > >The reported address range looks like that where kaffe builds its
>  > >JITted instruciton buffers in MIPS/Linux.  And, like I say, JIT is
>  > >somewhat broken for MIPS in Kaffe.  Which version of the kaffe sources
>  > >are you building, and have you tried configuring with 
> --with-engine=intrp
>  > >as I suggested?
>  > >
>  > >             Regards,
>  > >
>  > >             Kevin K.
>  >
>  > _________________________________________________________________
>  > Click, drag and drop. My MSN is the simple way to design your homepage.
>  > http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/
>  >
>  >
> 


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

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

* Re: IDE driver problem
  2004-02-24  5:09 Liu Hongming (Alan)
  2004-02-24 11:55 ` Thomas Lange
@ 2004-02-24 22:09 ` Alan Cox
  1 sibling, 0 replies; 12+ messages in thread
From: Alan Cox @ 2004-02-24 22:09 UTC (permalink / raw)
  To: Liu Hongming (Alan); +Cc: linux-mips

On Maw, 2004-02-24 at 05:09, Liu Hongming (Alan) wrote:
> Hi All,
> 
> I am porting IDE drivers(Since my hardware has endian issue),
> and now it could work,however it has some abnormal problems:

Sounds like your partition data reading is wrong. Print out the
partition table bases and see if they are all zero

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

* RE: IDE driver problem
@ 2004-02-25 12:11 Liu Hongming (Alan)
  2004-02-25 17:13 ` Ralf Baechle
  0 siblings, 1 reply; 12+ messages in thread
From: Liu Hongming (Alan) @ 2004-02-25 12:11 UTC (permalink / raw)
  To: Alan Cox, Liu Hongming (Alan); +Cc: linux-mips

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


Thanks for your tips.

I have found out where the problem is. Since my hardware has
endian issue, fs/partition/msdos.c could not handle partition table
correctly. I have changed a little(still having much to change),and it 
really works now.


-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
Sent: Wednesday, February 25, 2004 6:10 AM
To: Liu Hongming (Alan)
Cc: linux-mips@linux-mips.org
Subject: Re: IDE driver problem


On Maw, 2004-02-24 at 05:09, Liu Hongming (Alan) wrote:
> Hi All,
> 
> I am porting IDE drivers(Since my hardware has endian issue),
> and now it could work,however it has some abnormal problems:

Sounds like your partition data reading is wrong. Print out the
partition table bases and see if they are all zero

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

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

* Re: IDE driver problem
  2004-02-25 12:11 IDE driver problem Liu Hongming (Alan)
@ 2004-02-25 17:13 ` Ralf Baechle
  2004-02-25 17:38   ` Geert Uytterhoeven
  0 siblings, 1 reply; 12+ messages in thread
From: Ralf Baechle @ 2004-02-25 17:13 UTC (permalink / raw)
  To: Liu Hongming (Alan); +Cc: Alan Cox, linux-mips

On Wed, Feb 25, 2004 at 08:11:54PM +0800, Liu Hongming (Alan) wrote:

> I have found out where the problem is. Since my hardware has
> endian issue, fs/partition/msdos.c could not handle partition table
> correctly. I have changed a little(still having much to change),and it 
> really works now.

I'm not sure what you call endian issue here.  The PC style partition
table code we've used for years on big endian systems without problems.

  Ralf

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

* Re: IDE driver problem
  2004-02-25 17:13 ` Ralf Baechle
@ 2004-02-25 17:38   ` Geert Uytterhoeven
  2004-02-25 18:16     ` Ralf Baechle
  0 siblings, 1 reply; 12+ messages in thread
From: Geert Uytterhoeven @ 2004-02-25 17:38 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: Liu Hongming (Alan), Alan Cox, Linux/MIPS Development

On Wed, 25 Feb 2004, Ralf Baechle wrote:
> On Wed, Feb 25, 2004 at 08:11:54PM +0800, Liu Hongming (Alan) wrote:
> > I have found out where the problem is. Since my hardware has
> > endian issue, fs/partition/msdos.c could not handle partition table
> > correctly. I have changed a little(still having much to change),and it
> > really works now.
>
> I'm not sure what you call endian issue here.  The PC style partition
> table code we've used for years on big endian systems without problems.

I guess his hardware has a byteswapped IDE bus, like on Atari, Q40/Q60 and
Tivo.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: IDE driver problem
  2004-02-25 17:38   ` Geert Uytterhoeven
@ 2004-02-25 18:16     ` Ralf Baechle
  2004-02-25 21:47       ` Alan Cox
  2004-02-26  2:08       ` Atsushi Nemoto
  0 siblings, 2 replies; 12+ messages in thread
From: Ralf Baechle @ 2004-02-25 18:16 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Liu Hongming (Alan), Alan Cox, Linux/MIPS Development

On Wed, Feb 25, 2004 at 06:38:17PM +0100, Geert Uytterhoeven wrote:

> > I'm not sure what you call endian issue here.  The PC style partition
> > table code we've used for years on big endian systems without problems.
> 
> I guess his hardware has a byteswapped IDE bus, like on Atari, Q40/Q60 and
> Tivo.

Oh, those.  I fear every possible way to hookup the IDE bus in a more or
particularly less intelligent way to a system has already been found out
there ...

  Ralf

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

* Re: IDE driver problem
  2004-02-25 18:16     ` Ralf Baechle
@ 2004-02-25 21:47       ` Alan Cox
  2004-02-25 21:53         ` Ralf Baechle
  2004-02-26  2:08       ` Atsushi Nemoto
  1 sibling, 1 reply; 12+ messages in thread
From: Alan Cox @ 2004-02-25 21:47 UTC (permalink / raw)
  To: Ralf Baechle
  Cc: Geert Uytterhoeven, Liu Hongming (Alan), Linux/MIPS Development

On Mer, 2004-02-25 at 18:16, Ralf Baechle wrote:
> Oh, those.  I fear every possible way to hookup the IDE bus in a more or
> particularly less intelligent way to a system has already been found out
> there ...

You would be suprised. You can do PIO IDE on just about anything. I
think the most grotesque I've seen is bitbanged IDE PIO on GPIO ports

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

* Re: IDE driver problem
  2004-02-25 21:47       ` Alan Cox
@ 2004-02-25 21:53         ` Ralf Baechle
  0 siblings, 0 replies; 12+ messages in thread
From: Ralf Baechle @ 2004-02-25 21:53 UTC (permalink / raw)
  To: Alan Cox; +Cc: Geert Uytterhoeven, Liu Hongming (Alan), Linux/MIPS Development

On Wed, Feb 25, 2004 at 09:47:35PM +0000, Alan Cox wrote:

> On Mer, 2004-02-25 at 18:16, Ralf Baechle wrote:
> > Oh, those.  I fear every possible way to hookup the IDE bus in a more or
> > particularly less intelligent way to a system has already been found out
> > there ...
> 
> You would be suprised. You can do PIO IDE on just about anything. I
> think the most grotesque I've seen is bitbanged IDE PIO on GPIO ports

And I thought the ISA bus accessible only through an address / data
register pair was gross ;-)

  Ralf

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

* Re: IDE driver problem
  2004-02-25 18:16     ` Ralf Baechle
  2004-02-25 21:47       ` Alan Cox
@ 2004-02-26  2:08       ` Atsushi Nemoto
  1 sibling, 0 replies; 12+ messages in thread
From: Atsushi Nemoto @ 2004-02-26  2:08 UTC (permalink / raw)
  To: ralf; +Cc: geert, alanliu, alan, linux-mips

>>>>> On Wed, 25 Feb 2004 19:16:45 +0100, Ralf Baechle <ralf@linux-mips.org> said:
>>> I'm not sure what you call endian issue here.  The PC style
>>> partition table code we've used for years on big endian systems
>>> without problems.
>> 
>> I guess his hardware has a byteswapped IDE bus, like on Atari,
>> Q40/Q60 and Tivo.

ralf> Oh, those.  I fear every possible way to hookup the IDE bus in a
ralf> more or particularly less intelligent way to a system has
ralf> already been found out there ...

Since 2.4.21, I need following changes in asm-mips/ide.h to work
generic PCI IDE on my big-endian platform (which uses
CONFIG_SWAP_IO_SPACE) again.  This is a same hack used until 2.4.20.
CONFIG_IDE_USE_RAW_IO is a flag in my local configuration.

The 2.4.21 IDE subsystem introduced hwif->OUTW, hwif->OUTSW, etc. but
I could not found a way to override them for generic PCI IDE
controllers.  So I still need the hack.


#if defined(CONFIG_IDE_USE_RAW_IO) && defined(__MIPSEB__)

/* get rid of defs from io.h - ide has its private and conflicting versions */
#ifdef insw
#undef insw
#endif
#ifdef outsw
#undef outsw
#endif
#ifdef insl
#undef insl
#endif
#ifdef outsl
#undef outsl
#endif

#define insw(port, addr, count) raw_insw(port, addr, count)
#define insl(port, addr, count) raw_insl(port, addr, count)
#define outsw(port, addr, count) raw_outsw(port, addr, count)
#define outsl(port, addr, count) raw_outsl(port, addr, count)

static inline void raw_insw(unsigned long port, void *addr, unsigned int count)
{
	while (count--) {
		*(u16 *)addr = *(volatile u16 *)(mips_io_port_base + port);
		addr += 2;
	}
}

static inline void raw_outsw(unsigned long port, void *addr, unsigned int count)
{
	while (count--) {
		*(volatile u16 *)(mips_io_port_base + (port)) = *(u16 *)addr;
		addr += 2;
	}
}

static inline void raw_insl(unsigned long port, void *addr, unsigned int count)
{
	while (count--) {
		*(u32 *)addr = *(volatile u32 *)(mips_io_port_base + port);
		addr += 4;
	}
}

static inline void raw_outsl(unsigned long port, void *addr, unsigned int count)
{
	while (count--) {
		*(volatile u32 *)(mips_io_port_base + (port)) = *(u32 *)addr;
		addr += 4;
	}
}

#endif

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

* RE: IDE driver problem
@ 2004-02-26  2:42 Liu Hongming (Alan)
  0 siblings, 0 replies; 12+ messages in thread
From: Liu Hongming (Alan) @ 2004-02-26  2:42 UTC (permalink / raw)
  To: Ralf Baechle, Liu Hongming (Alan); +Cc: Alan Cox, linux-mips

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


Hi,

Very glad to see you here.

Alan Cox,many friends of mine ADMIRE you very much!
Ralf Baechle,I learn a lot from your codes when porting my mips!

The ENDIAN issue in my board is:
My mips is little endian(not pure,dont care it here),and my memory 
is little endian(it should be same as cpu,however,it is not always in my
SOC,that's why ENDIAN issue comes out).When reading/writing words 
from/to memory,it is always OK,little endian. However,the wierd situation is
that
when writing string such as "ABCDEFGH" into memory,such as address
0,in memory it will be stored as:
addr 0:1:2:3:4:5:6:7
        DC B A HG F E
that means,when using byte access to memory,it will byteswap.You want
to access address 0,however,it will access address 3,vice versa.
You want to access address 1,it will access address 2,vice versa.
This is byte access situation.
When using half word accessing,it will swap too:
if I want to write 0x1234 into memory at address 0,it will write into memory
address 2;
if I want to write 0x1234 into memory at address 2,it will write into memory
address 0;

So,in my board, we could not use type-casting to access data in memory.
I dont know if I have clarified the situation.


-----Original Message-----
From: Ralf Baechle [mailto:ralf@linux-mips.org]
Sent: Thursday, February 26, 2004 1:13 AM
To: Liu Hongming (Alan)
Cc: Alan Cox; linux-mips@linux-mips.org
Subject: Re: IDE driver problem


On Wed, Feb 25, 2004 at 08:11:54PM +0800, Liu Hongming (Alan) wrote:

> I have found out where the problem is. Since my hardware has
> endian issue, fs/partition/msdos.c could not handle partition table
> correctly. I have changed a little(still having much to change),and it 
> really works now.

I'm not sure what you call endian issue here.  The PC style partition
table code we've used for years on big endian systems without problems.

  Ralf

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

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

end of thread, other threads:[~2004-02-26  2:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-25 12:11 IDE driver problem Liu Hongming (Alan)
2004-02-25 17:13 ` Ralf Baechle
2004-02-25 17:38   ` Geert Uytterhoeven
2004-02-25 18:16     ` Ralf Baechle
2004-02-25 21:47       ` Alan Cox
2004-02-25 21:53         ` Ralf Baechle
2004-02-26  2:08       ` Atsushi Nemoto
  -- strict thread matches above, loose matches on Subject: below --
2004-02-26  2:42 Liu Hongming (Alan)
2004-02-24 12:09 Liu Hongming (Alan)
2004-02-24  5:09 Liu Hongming (Alan)
2004-02-24 11:55 ` Thomas Lange
2004-02-24 22:09 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox