Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

21 messages, 6 authors, 2015-07-27 · open the first message on its own page

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Andreas Schwab <hidden>
Date: 2015-07-13 18:13:52

Finn Thain [off-list ref] writes:
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Which one is correct?
I think atari_scsi is wrong.  The best source I could find
(http://www.gratifiant.com/nvram-falcon-t561185) places it after the
video mode byte, thus at byte 16.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-14 08:18:01

On Mon, 13 Jul 2015, Andreas Schwab wrote:
Finn Thain [off-list ref] writes:
quoted
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16 
whereas atari_scsi says 14. Which one is correct?
I think atari_scsi is wrong.  The best source I could find 
(http://www.gratifiant.com/nvram-falcon-t561185) places it after the 
video mode byte, thus at byte 16.
Thanks for that. BTW, I googled a phrase from that page and found this one
  http://toshyp.atari.org/en/004009.html
which may be closer to the source.

I'll send a patch if someone can offer to test such a change to atari_scsi 
(or merely confirm that the SCSI ID setting in TOS does not match this_id 
given in dmesg).

-- 

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2015-07-14 08:23:55

On Tue, Jul 14, 2015 at 10:17 AM, Finn Thain [off-list ref] wrote:
On Mon, 13 Jul 2015, Andreas Schwab wrote:
quoted
Finn Thain [off-list ref] writes:
quoted
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Which one is correct?
I think atari_scsi is wrong.  The best source I could find
(http://www.gratifiant.com/nvram-falcon-t561185) places it after the
video mode byte, thus at byte 16.
Thanks for that. BTW, I googled a phrase from that page and found this one
  http://toshyp.atari.org/en/004009.html
which may be closer to the source.
Hence "int" is 16-bits in all those references?

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

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2015-07-22 03:52:17

Hi Finn,

I'm afraid I cannot test anything on Atari hardware at present - my 
Falcon ate it's IDE disk partition table with all the fun that entails. 
Haven't even begun to try and recover that yet.

If you send a patch I could build a kernel and send that to Christian 
for testing (if he's got his Falcon up and running - might be a tad warm 
in the attic for that, in fact).

Cheers,

     Michael


Am 14.07.15 um 20:17 schrieb Finn Thain:
On Mon, 13 Jul 2015, Andreas Schwab wrote:
quoted
Finn Thain [off-list ref] writes:
quoted
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Which one is correct?
I think atari_scsi is wrong.  The best source I could find
(http://www.gratifiant.com/nvram-falcon-t561185) places it after the
video mode byte, thus at byte 16.
Thanks for that. BTW, I googled a phrase from that page and found this one
   http://toshyp.atari.org/en/004009.html
which may be closer to the source.

I'll send a patch if someone can offer to test such a change to atari_scsi
(or merely confirm that the SCSI ID setting in TOS does not match this_id
given in dmesg).

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-22 04:22:46

On Wed, 22 Jul 2015, Michael Schmitz wrote:
Hi Finn,

I'm afraid I cannot test anything on Atari hardware at present - my 
Falcon ate it's IDE disk partition table with all the fun that entails. 
That doesn't sound good.
Haven't even begun to try and recover that yet.

If you send a patch I could build a kernel and send that to Christian 
for testing (if he's got his Falcon up and running - might be a tad warm 
in the attic for that, in fact).
Anyone with a suitable Atari, i.e. ATARIHW_PRESENT(TT_CLK), who can boot 
both TOS and Linux could resolve the question. (Perhaps with an emulator?)

Any old kernel binary would do, since atari_scsi should print either 
"HOSTID=n" or "this_id n" at startup.

If n doesn't agree with what TOS says about the host's SCSI ID, then I 
think a trivial patch is safe enough. Especially if cat /proc/driver/nvram 
produces a "SCSI host ID : m" that does agree with TOS.

Regards,
Finn
Cheers,

    Michael


Am 14.07.15 um 20:17 schrieb Finn Thain:
quoted
On Mon, 13 Jul 2015, Andreas Schwab wrote:
quoted
Finn Thain [off-list ref] writes:
quoted
BTW, I didn't change the SCSI ID location in NVRAM. This code says 16
whereas atari_scsi says 14. Which one is correct?
I think atari_scsi is wrong.  The best source I could find
(http://www.gratifiant.com/nvram-falcon-t561185) places it after the
video mode byte, thus at byte 16.
Thanks for that. BTW, I googled a phrase from that page and found this one
   http://toshyp.atari.org/en/004009.html
which may be closer to the source.

I'll send a patch if someone can offer to test such a change to atari_scsi
(or merely confirm that the SCSI ID setting in TOS does not match this_id
given in dmesg).

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Christian T. Steigies <hidden>
Date: 2015-07-22 14:33:44

On Wed, Jul 22, 2015 at 02:22:21PM +1000, Finn Thain wrote:
On Wed, 22 Jul 2015, Michael Schmitz wrote:
quoted
Hi Finn,

I'm afraid I cannot test anything on Atari hardware at present - my 
Falcon ate it's IDE disk partition table with all the fun that entails. 
That doesn't sound good.
quoted
Haven't even begun to try and recover that yet.

If you send a patch I could build a kernel and send that to Christian 
for testing (if he's got his Falcon up and running - might be a tad warm 
in the attic for that, in fact).
Anyone with a suitable Atari, i.e. ATARIHW_PRESENT(TT_CLK), who can boot 
both TOS and Linux could resolve the question. (Perhaps with an emulator?)
The Falcon is not powered on currently but it should still work. What should
I test?
Any old kernel binary would do, since atari_scsi should print either 
"HOSTID=n" or "this_id n" at startup.

If n doesn't agree with what TOS says about the host's SCSI ID, then I 
think a trivial patch is safe enough. Especially if cat /proc/driver/nvram 
produces a "SCSI host ID : m" that does agree with TOS.
Christian

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2015-07-22 23:46:48

Hi Christian,

if I understand Finn right, he needs the SCSI host ID reported for the
Falcon SCSI chip, as found in this kernel log line:

scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq
15, can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { },
options { REAL_DMA SUPPORT_TAGS }

(see this_id; output from one of my ARAnyM instances, kernel 3.19rc6).
Also, the SCSI host ID reported by cat /proc/drivers/nvram (also 7, in
my case)

TOS reports the SCSI host ID during boot (when scannig for bootable
disks) IIRC. There may be some control panel to view the NVRAM
settings as well (stuff like default video mode was accessible from
the CT60 control panel so the SCSI host ID might be there as well).

Cheers,

  Michael



On Thu, Jul 23, 2015 at 2:32 AM, Christian T. Steigies [off-list ref] wrote:
On Wed, Jul 22, 2015 at 02:22:21PM +1000, Finn Thain wrote:
quoted
On Wed, 22 Jul 2015, Michael Schmitz wrote:
quoted
Hi Finn,

I'm afraid I cannot test anything on Atari hardware at present - my
Falcon ate it's IDE disk partition table with all the fun that entails.
That doesn't sound good.
quoted
Haven't even begun to try and recover that yet.

If you send a patch I could build a kernel and send that to Christian
for testing (if he's got his Falcon up and running - might be a tad warm
in the attic for that, in fact).
Anyone with a suitable Atari, i.e. ATARIHW_PRESENT(TT_CLK), who can boot
both TOS and Linux could resolve the question. (Perhaps with an emulator?)
The Falcon is not powered on currently but it should still work. What should
I test?
quoted
Any old kernel binary would do, since atari_scsi should print either
"HOSTID=n" or "this_id n" at startup.

If n doesn't agree with what TOS says about the host's SCSI ID, then I
think a trivial patch is safe enough. Especially if cat /proc/driver/nvram
produces a "SCSI host ID : m" that does agree with TOS.
Christian

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-23 00:49:28

On Thu, 23 Jul 2015, Michael Schmitz wrote:
Hi Christian,

if I understand Finn right, he needs the SCSI host ID reported for the 
Falcon SCSI chip, as found in this kernel log line:
What I'd really like is a regression test for this patch series. The SCSI 
host ID issue is a separate one; these patches won't fix that bug.
scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 
15, can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, 
options { REAL_DMA SUPPORT_TAGS }

(see this_id; output from one of my ARAnyM instances, kernel 3.19rc6). 
Also, the SCSI host ID reported by cat /proc/drivers/nvram (also 7, in 
my case)
This seems inconclusive to me. Perhaps if you were to change a setting in 
TOS such that the two values became unequal...
TOS reports the SCSI host ID during boot (when scannig for bootable 
disks) IIRC. There may be some control panel to view the NVRAM settings 
as well (stuff like default video mode was accessible from the CT60 
control panel so the SCSI host ID might be there as well).
Can that be done in Aranym also?

-- 
Cheers,

  Michael



On Thu, Jul 23, 2015 at 2:32 AM, Christian T. Steigies [off-list ref] wrote:
quoted
On Wed, Jul 22, 2015 at 02:22:21PM +1000, Finn Thain wrote:
quoted
On Wed, 22 Jul 2015, Michael Schmitz wrote:
quoted
Hi Finn,

I'm afraid I cannot test anything on Atari hardware at present - my
Falcon ate it's IDE disk partition table with all the fun that entails.
That doesn't sound good.
quoted
Haven't even begun to try and recover that yet.

If you send a patch I could build a kernel and send that to Christian
for testing (if he's got his Falcon up and running - might be a tad warm
in the attic for that, in fact).
Anyone with a suitable Atari, i.e. ATARIHW_PRESENT(TT_CLK), who can boot
both TOS and Linux could resolve the question. (Perhaps with an emulator?)
The Falcon is not powered on currently but it should still work. What should
I test?
quoted
Any old kernel binary would do, since atari_scsi should print either
"HOSTID=n" or "this_id n" at startup.

If n doesn't agree with what TOS says about the host's SCSI ID, then I
think a trivial patch is safe enough. Especially if cat /proc/driver/nvram
produces a "SCSI host ID : m" that does agree with TOS.
Christian
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Christian T. Steigies <hidden>
Date: 2015-07-23 09:44:32

On Wed, Jul 22, 2015 at 02:22:21PM +1000, Finn Thain wrote:
Anyone with a suitable Atari, i.e. ATARIHW_PRESENT(TT_CLK), who can boot 
both TOS and Linux could resolve the question. (Perhaps with an emulator?)

Any old kernel binary would do, since atari_scsi should print either 
"HOSTID=n" or "this_id n" at startup.

If n doesn't agree with what TOS says about the host's SCSI ID, then I 
think a trivial patch is safe enough. Especially if cat /proc/driver/nvram 
produces a "SCSI host ID : m" that does agree with TOS.
root@garkin:~>cat /proc/hardware 
Model:          Atari Falcon
System Memory:  522752K
        510 MB at 0x01000000 (alternate RAM)
Detected hardware:
        Falcon Shifter
        Programmable Sound Generator
        PCM 8 Bit Sound
        CODEC Sound
        SCSI Controller NCR5380 (Falcon style)
        IDE Interface
        8/16 Mhz Switch for FDC
        Multi Function Peripheral MFP 68901
        Serial Communications Controller SCC 8530
        Paddle Interface
        DMA Controller for SCC
        Clock Chip MC146818A
        Blitter
        DSP56001 processor

root@garkin:~>dmesg |grep SCSI
[    0.000000] Atari hardware found: VIDEL STDMA-SCSI ST_MFP YM2149 PCM CODEC DSP56K SCC_DMA SCC ANALOG_JOY BLITTER IDE TT_CLK FDC_SPEED 
[    0.410000] SCSI subsystem initialized
[    0.850000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    4.230000] Atari SCSI: resetting the SCSI bus... done
[    6.750000] scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 15, can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, options { REAL_DMA SUPPORT_TAGS } 

root@garkin:~>cat /proc/driver/nvram
Checksum status  : not valid
Boot preference  : 0xff (undefined)
SCSI arbitration : on
SCSI host ID     : 7
OS language      : 255 (undefined)
Keyboard language: 255 (undefined)
Date format      : 7 (undefined), 24h clock
Boot delay       : 255s
Video mode       : 4 colors, 40 columns, TV NTSC monitor
                   no overscan, compat. mode off


Let me know if you need more info.

Christian

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2015-07-24 02:56:30

Hi Christian,

here's what Finn asked me to run as tests:

# dmesg | grep this_id > nvram.out
# cat /proc/driver/nvram >> nvram.out
# hexdump -C /dev/nvram >> nvram.out
# cp /dev/nvram /tmp/nvram
# cp /tmp/nvram /dev/nvram
# md5sum /dev/nvram /tmp/nvram >> nvram.out

What you sent so far looks OK. I've tested the change of SCSI ID
(using EmuTOS) along with a trivial patch to atari_scsi.c (replace
offset 14 by 16) and the driver now uses the stored ID properly. I'll
sent kernels to test Finn's NVRAM patch for regression ASAP.

Thanks for your offer of help!

Cheers,

  Michael


On Thu, Jul 23, 2015 at 9:21 PM, Christian T. Steigies [off-list ref] wrote:
On Wed, Jul 22, 2015 at 02:22:21PM +1000, Finn Thain wrote:
quoted
Anyone with a suitable Atari, i.e. ATARIHW_PRESENT(TT_CLK), who can boot
both TOS and Linux could resolve the question. (Perhaps with an emulator?)

Any old kernel binary would do, since atari_scsi should print either
"HOSTID=n" or "this_id n" at startup.

If n doesn't agree with what TOS says about the host's SCSI ID, then I
think a trivial patch is safe enough. Especially if cat /proc/driver/nvram
produces a "SCSI host ID : m" that does agree with TOS.
root@garkin:~>cat /proc/hardware
Model:          Atari Falcon
System Memory:  522752K
        510 MB at 0x01000000 (alternate RAM)
Detected hardware:
        Falcon Shifter
        Programmable Sound Generator
        PCM 8 Bit Sound
        CODEC Sound
        SCSI Controller NCR5380 (Falcon style)
        IDE Interface
        8/16 Mhz Switch for FDC
        Multi Function Peripheral MFP 68901
        Serial Communications Controller SCC 8530
        Paddle Interface
        DMA Controller for SCC
        Clock Chip MC146818A
        Blitter
        DSP56001 processor

root@garkin:~>dmesg |grep SCSI
[    0.000000] Atari hardware found: VIDEL STDMA-SCSI ST_MFP YM2149 PCM CODEC DSP56K SCC_DMA SCC ANALOG_JOY BLITTER IDE TT_CLK FDC_SPEED
[    0.410000] SCSI subsystem initialized
[    0.850000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    4.230000] Atari SCSI: resetting the SCSI bus... done
[    6.750000] scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 15, can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, options { REAL_DMA SUPPORT_TAGS }

root@garkin:~>cat /proc/driver/nvram
Checksum status  : not valid
Boot preference  : 0xff (undefined)
SCSI arbitration : on
SCSI host ID     : 7
OS language      : 255 (undefined)
Keyboard language: 255 (undefined)
Date format      : 7 (undefined), 24h clock
Boot delay       : 255s
Video mode       : 4 colors, 40 columns, TV NTSC monitor
                   no overscan, compat. mode off


Let me know if you need more info.

Christian

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Christian T. Steigies <hidden>
Date: 2015-07-24 19:09:08

Moin,
On Fri, Jul 24, 2015 at 02:56:26PM +1200, Michael Schmitz wrote:
here's what Finn asked me to run as tests:

# dmesg | grep this_id > nvram.out
# cat /proc/driver/nvram >> nvram.out
# hexdump -C /dev/nvram >> nvram.out
# cp /dev/nvram /tmp/nvram
# cp /tmp/nvram /dev/nvram
# md5sum /dev/nvram /tmp/nvram >> nvram.out
It seems I could successfully reset the nvram under TOS with bootconf.
Here is nvram.out, using the new kernel you sent me:

root@garkin:~>uname -a
Linux garkin 4.2.0-rc2-atari-269994-gc1e9d12 #327 Fri Jul 24 19:34:44 NZST 2015 m68k GNU/Linux

PS it seems LVM is working with this kernel as well!

Christian


[    7.000000] scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 15, can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, options { REAL_DMA SUPPORT_TAGS } 
Checksum status  : valid
Boot preference  : unspecified
SCSI arbitration : on
SCSI host ID     : 7
OS language      : English (US)
Keyboard language: English (UK)
Date format      : YYÿDDÿMM, 24h clock
Boot delay       : 10s
Video mode       : ?? colors, 80 columns, VGA PAL monitor
                   overscan, compat. mode off, line doubling
00000000  00 00 ff ff ff ff 00 03  13 ff 0a ff ff ff 01 7f  |................|
00000010  87 ff 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  e1 1e                                             |..|
00000032
3b5801864975cf23bcacb52f648e74cc  /dev/nvram
3b5801864975cf23bcacb52f648e74cc  /tmp/nvram

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-25 00:36:00

On Fri, 24 Jul 2015, Christian T. Steigies wrote:
Moin,
On Fri, Jul 24, 2015 at 02:56:26PM +1200, Michael Schmitz wrote:
quoted
here's what Finn asked me to run as tests:

# dmesg | grep this_id > nvram.out
# cat /proc/driver/nvram >> nvram.out
# hexdump -C /dev/nvram >> nvram.out
# cp /dev/nvram /tmp/nvram
# cp /tmp/nvram /dev/nvram
# md5sum /dev/nvram /tmp/nvram >> nvram.out
It seems I could successfully reset the nvram under TOS with bootconf.
Here is nvram.out, using the new kernel you sent me:

root@garkin:~>uname -a
Linux garkin 4.2.0-rc2-atari-269994-gc1e9d12 #327 Fri Jul 24 19:34:44 NZST 2015 m68k GNU/Linux

PS it seems LVM is working with this kernel as well!

Christian


[    7.000000] scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 15, can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, options { REAL_DMA SUPPORT_TAGS } 
Checksum status  : valid
Boot preference  : unspecified
SCSI arbitration : on
SCSI host ID     : 7
OS language      : English (US)
Keyboard language: English (UK)
Date format      : YY?DD?MM, 24h clock
Boot delay       : 10s
Video mode       : ?? colors, 80 columns, VGA PAL monitor
                   overscan, compat. mode off, line doubling
00000000  00 00 ff ff ff ff 00 03  13 ff 0a ff ff ff 01 7f  |................|
00000010  87 ff 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  e1 1e                                             |..|
00000032
3b5801864975cf23bcacb52f648e74cc  /dev/nvram
3b5801864975cf23bcacb52f648e74cc  /tmp/nvram

Thanks for helping with this, Christian. I'll add your name in "Tested-by" 
tags on the relevant patches. These are rudimentary tests but combined 
with my own testing on m68k, ppc32 and x86, coverage is quite good. Some 
testing on ppc64 is still lacking though.

-- 

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2015-07-25 00:51:34

Hi Christian,

good to know this worked - for the record (Finn), this is the kernel 
with Finn's patch applied.

I'll build the missing LVM module so Christian can run the tests on the 
unpatched kernel as well.

Thanks for testing!

     Michael


Am 25.07.15 um 07:07 schrieb Christian T. Steigies:
Moin,
On Fri, Jul 24, 2015 at 02:56:26PM +1200, Michael Schmitz wrote:
quoted
here's what Finn asked me to run as tests:

# dmesg | grep this_id > nvram.out
# cat /proc/driver/nvram >> nvram.out
# hexdump -C /dev/nvram >> nvram.out
# cp /dev/nvram /tmp/nvram
# cp /tmp/nvram /dev/nvram
# md5sum /dev/nvram /tmp/nvram >> nvram.out
It seems I could successfully reset the nvram under TOS with bootconf.
Here is nvram.out, using the new kernel you sent me:

root@garkin:~>uname -a
Linux garkin 4.2.0-rc2-atari-269994-gc1e9d12 #327 Fri Jul 24 19:34:44 NZST 2015 m68k GNU/Linux

PS it seems LVM is working with this kernel as well!

Christian


[    7.000000] scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 15, can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, options { REAL_DMA SUPPORT_TAGS }
Checksum status  : valid
Boot preference  : unspecified
SCSI arbitration : on
SCSI host ID     : 7
OS language      : English (US)
Keyboard language: English (UK)
Date format      : YYÿDDÿMM, 24h clock
Boot delay       : 10s
Video mode       : ?? colors, 80 columns, VGA PAL monitor
                    overscan, compat. mode off, line doubling
00000000  00 00 ff ff ff ff 00 03  13 ff 0a ff ff ff 01 7f  |................|
00000010  87 ff 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000030  e1 1e                                             |..|
00000032
3b5801864975cf23bcacb52f648e74cc  /dev/nvram
3b5801864975cf23bcacb52f648e74cc  /tmp/nvram

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-07-25 01:00:24

On Sat, 2015-07-25 at 10:35 +1000, Finn Thain wrote:
On Fri, 24 Jul 2015, Christian T. Steigies wrote:
quoted
3b5801864975cf23bcacb52f648e74cc  /dev/nvram
3b5801864975cf23bcacb52f648e74cc  /tmp/nvram
Thanks for helping with this, Christian. I'll add your name in "Tested-by" 
tags on the relevant patches. These are rudimentary tests but combined 
with my own testing on m68k, ppc32 and x86, coverage is quite good. Some 
testing on ppc64 is still lacking though.
*Blush*

I'll try and get to it next week promise!

cheers

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-25 07:28:20

On Sat, 25 Jul 2015, Michael Schmitz wrote:
Hi Christian,

good to know this worked - for the record (Finn), this is the kernel 
with Finn's patch applied.
That was v5 of this patch series. I will send that out to the lists now. 
It has some minor changes that relate to powerpc.

Thanks for your help with this, Michael.

Finn
I'll build the missing LVM module so Christian can run the tests on the 
unpatched kernel as well.

Thanks for testing!

    Michael

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-25 07:38:25

On Sat, 25 Jul 2015, Michael Ellerman wrote:
On Sat, 2015-07-25 at 10:35 +1000, Finn Thain wrote:
quoted
Thanks for helping with this, Christian. I'll add your name in 
"Tested-by" tags on the relevant patches. These are rudimentary tests 
but combined with my own testing on m68k, ppc32 and x86, coverage is 
quite good. Some testing on ppc64 is still lacking though.
*Blush*

I'll try and get to it next week promise!
That would be a great help. Unfortunately I don't have any ppc64 hardware. 
I wish ;-)

-- 

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2015-07-26 01:03:01

Hi Finn,

For the sake of completeness: further testing on ARAnyM shows no 
difference between original and patched kernel in the NVRAM proc and 
diff outputs:

scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 
15, can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, 
options { REAL_DMA SUPPORT_TAGS }
Checksum status  : valid
Boot preference  : unspecified
SCSI arbitration : on
SCSI host ID     : 7
OS language      : English (US)
Keyboard language: English (US)
Date format      : DD.MM.YY, 24h clock
Boot delay       : 32s
Video mode       : 4 colors, 40 columns, TV NTSC monitor
                    no overscan, compat. mode off
00000000  00 00 00 00 00 00 00 00  11 2e 20 01 ff 00 00 3b |.......... 
....;|
00000010  87 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
|................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
|................|
00000030  de 21                                             |.!|
00000032
d640bf7d535b54e39582fabdc016d7ca  /dev/nvram
d640bf7d535b54e39582fabdc016d7ca  /tmp/nvram

Happy to help ...

Cheers,

     Michael
On Sat, 25 Jul 2015, Michael Schmitz wrote:
quoted
Hi Christian,

good to know this worked - for the record (Finn), this is the kernel
with Finn's patch applied.
That was v5 of this patch series. I will send that out to the lists now.
It has some minor changes that relate to powerpc.

Thanks for your help with this, Michael.

Finn
quoted
I'll build the missing LVM module so Christian can run the tests on the
unpatched kernel as well.

Thanks for testing!

     Michael

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-26 01:20:07

On Sun, 26 Jul 2015, Michael Schmitz wrote:
Hi Finn,

For the sake of completeness: further testing on ARAnyM shows no difference
between original and patched kernel in the NVRAM proc and diff outputs:

scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 15,
can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, options {
REAL_DMA SUPPORT_TAGS }
Checksum status  : valid
Boot preference  : unspecified
SCSI arbitration : on
SCSI host ID     : 7
OS language      : English (US)
Keyboard language: English (US)
Date format      : DD.MM.YY, 24h clock
Boot delay       : 32s
Video mode       : 4 colors, 40 columns, TV NTSC monitor
                   no overscan, compat. mode off
00000000  00 00 00 00 00 00 00 00  11 2e 20 01 ff 00 00 3b |.......... ....;|
00000010  87 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
00000030  de 21                                            |.!|
00000032
I'd expect to see a change in the Video mode above, because of patch 2.

With 0x3B in byte 15, I'd expect the patched kernel to produce something 
similar to Christian's /proc/driver/nvram results.

-- 

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-26 01:37:49

On Sat, 25 Jul 2015, Michael Ellerman wrote:
On Sat, 2015-07-25 at 10:35 +1000, Finn Thain wrote:
quoted
... These are rudimentary tests but combined with my own testing on 
m68k, ppc32 and x86, coverage is quite good. Some testing on ppc64 is 
still lacking though.
Here's some code I wrote some time ago to help me test these patches, 
maybe it will help others (though independent results may be more 
valuable...)


-- -- 8< -- -- 


#!/bin/sh
set -e -u -x
temp=`mktemp /root/nvram.XXXX`
test -f "$temp"
cat /proc/version
if ! test -e /dev/nvram ; then
    mknod /dev/nvram c 10 144
fi
ls -l /dev/nvram
if test -c /dev/nvram ; then
    cp /dev/nvram "$temp"
    hexdump -C "$temp"
    cp /dev/zero /dev/nvram || true
    hexdump -C /dev/nvram
    cp "$temp" /dev/nvram
    hexdump -C /dev/nvram
fi


-- -- 8< -- -- 


#include <stdio.h>
#include <sys/ioctl.h>
#include <errno.h>

#if defined(__powerpc__)
#include <asm/nvram.h>
#elif defined(__i386__) || defined(__mc68020__)
#include <linux/nvram.h>
#endif

int main(void) {
        int result, i;
        FILE *f;

        f = fopen("/dev/nvram", "r+");
        if (!f) {
                perror("fopen");
                return 1;
        }

#if defined(__powerpc__)
        result = ioctl(fileno(f), IOC_NVRAM_SYNC);
	fprintf(stderr, "ioctl IOC_NVRAM_SYNC: result %d, errno %m\n", result);

        for (i = 0; i <= 8; ++i) {
                int arg = i;

                result = ioctl(fileno(f), IOC_NVRAM_GET_OFFSET, (long)&arg);
		fprintf(stderr, "ioctl IOC_NVRAM_GET_OFFSET: i %d, result %d, offset %d, errno %m\n", i, result, arg);
        }
#elif defined(__i386__) || defined(__mc68020__)
        result = ioctl(fileno(f), NVRAM_INIT);
	fprintf(stderr, "ioctl NVRAM_INIT: result %d, errno %m\n", result);

        result = ioctl(fileno(f), NVRAM_SETCKS);
	fprintf(stderr, "ioctl NVRAM_SETCKS: result %d, errno %m\n", result);
#endif

        return 0;
}


-- 

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2015-07-27 02:23:46

Finn,

my bad - there is indeed a change in the /proc/driver/nvram output:
--- nvram-4.out    2015-07-24 12:32:44.000000000 +1200
+++ nvram-4p2.out    2015-07-27 13:56:06.000000000 +1200
@@ -7,7 +7,7 @@
 Keyboard language: English (US)
 Date format      : DD.MM.YY, 24h clock
 Boot delay       : 32s
-Video mode       : 4 colors, 40 columns, TV NTSC monitor
+Video mode       : 256 colors, 80 columns, VGA PAL monitor
                    no overscan, compat. mode off
 00000000  00 00 00 00 00 00 00 00  11 2e 20 01 ff 00 00 3b  |.......... ....;|
 00000010  84 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

That video mode is indeed the one set in the NVRAM (by ARAnyM config,
if running emulated)

Cheers,

  Michael


On Sun, Jul 26, 2015 at 1:19 PM, Finn Thain [off-list ref] wrote:
On Sun, 26 Jul 2015, Michael Schmitz wrote:
quoted
Hi Finn,

For the sake of completeness: further testing on ARAnyM shows no difference
between original and patched kernel in the NVRAM proc and diff outputs:

scsi host0: Atari native SCSI, io_port 0x0, n_io_port 0, base 0x0, irq 15,
can_queue 8, cmd_per_lun 1, sg_tablesize 0, this_id 7, flags { }, options {
REAL_DMA SUPPORT_TAGS }
Checksum status  : valid
Boot preference  : unspecified
SCSI arbitration : on
SCSI host ID     : 7
OS language      : English (US)
Keyboard language: English (US)
Date format      : DD.MM.YY, 24h clock
Boot delay       : 32s
Video mode       : 4 colors, 40 columns, TV NTSC monitor
                   no overscan, compat. mode off
00000000  00 00 00 00 00 00 00 00  11 2e 20 01 ff 00 00 3b |.......... ....;|
00000010  87 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
00000030  de 21                                            |.!|
00000032
I'd expect to see a change in the Video mode above, because of patch 2.

With 0x3B in byte 15, I'd expect the patched kernel to produce something
similar to Christian's /proc/driver/nvram results.

--

Re: [RFC v4 03/25] m68k/atari: Move Atari-specific code out of drivers/char/nvram.c

From: Finn Thain <hidden>
Date: 2015-07-27 05:51:33

On Mon, 27 Jul 2015, Michael Schmitz wrote:
quoted hunk
Finn,

my bad - there is indeed a change in the /proc/driver/nvram output:
--- nvram-4.out    2015-07-24 12:32:44.000000000 +1200
+++ nvram-4p2.out    2015-07-27 13:56:06.000000000 +1200
@@ -7,7 +7,7 @@
 Keyboard language: English (US)
 Date format      : DD.MM.YY, 24h clock
 Boot delay       : 32s
-Video mode       : 4 colors, 40 columns, TV NTSC monitor
+Video mode       : 256 colors, 80 columns, VGA PAL monitor
                    no overscan, compat. mode off
 00000000  00 00 00 00 00 00 00 00  11 2e 20 01 ff 00 00 3b  |.......... ....;|
 00000010  84 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

That video mode is indeed the one set in the NVRAM (by ARAnyM config,
if running emulated)
All's well then.

Thanks.

Finn
Cheers,

  Michael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help