Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
115 user(s) are online (87 user(s) are browsing Forums)

Members: 0
Guests: 115

more...

Headlines

 
  Register To Post  

« 1 2 3 (4)
Re: Sam460 which file systems can be used
Quite a regular
Quite a regular


See User information
@smarkusg
Quote:
Pegasos bboot hangs on something like this and booting AOS4 (debug) is stopped

It it works with pegasos2.rom then maybe the ROM does some init to the card that the AmigaOS driver expects. BBoot does nothing with SCSI cards other than maybe assigning BARs. Maybe the AmigaOS lsi scsi driver is not init'ing/using these cards properly as the Linux drivers do or does something that works on real card but QEMU is not emulating as the Linux and other OS drivers don't do that?

Go to top
Re: Sam460 which file systems can be used
Just can't stay away
Just can't stay away


See User information
@balaton
Quote:
On real machine scsi is faster because scsi card works independently of CPU and can offload more operations but in emulation that's not necessarily the same and emulating a more complex scsi card may actually be slower.
IIRC the NCR/SYM/LSI 53c8xx class of SCSI controllers is Narrow Ultra SCSI with a theoretical max. speed of only 20 MB/s, while even SATA version 1.0/SATA-150 like in the 3112, 3512 and 3114 controllers is 150 MB/s, i.e. SATA could be about 7,5 times faster on real hardware than SCSI.
But as you said emulation is something completely different...

The reason SCSI emulation should be faster than SATA emulation is that the AmigaOS SATA drivers don't support NCQ, while on SCSI something similar is always done.


Edited by joerg on 2024/3/2 18:14:48
Go to top
Re: Sam460 which file systems can be used
Just popping in
Just popping in


See User information
@geennaam @Maijestro

Thank you Maijestro, Geennaam for your answers,

Indeed I have NGFS version 54.55 from 04.28.2018 is this the latest?

Go to top
Re: Sam460 which file systems can be used
Just popping in
Just popping in


See User information
Sorry double post.

I don't know how to delete my double post.


Edited by skynet on 2024/3/2 19:13:11
Go to top
Re: Sam460 which file systems can be used
Not too shy to talk
Not too shy to talk


See User information
@balatonQuote:
balaton wrote:@daveyw
Quote:
I thought I read here that we shouldn't use DiskCache (maybe only if you use FFS?).


Don't know what you refer to but maybe it was when running on QEMU when using image files that should already be cached by the host then having additional cache in the guest is not needed. On real hardware or when passing through disks to guest so it handles it like on real machine I think disk cache is still useful but @joerg is the expert on that. He said SFS uses diskcache.library so it should be useful for it. I think it's best to not mess with it and leave it as it is on real machine unless it's proven to slow down access whith disk image files on QEMU but I think the difference might be small if any so may not worth the hassle and confusion of when to use it or not.


I was referring to real hardware, the original conversation predated QEMU (or at least general discussion of it on this site). I can't find it, but there's a reference here : https://www.amigans.net/modules/newbb/ ... id=141903#forumpost141903

Which I take to mean you shouldn't use diskcache on real hardware with SSDs

Go to top
Re: Sam460 which file systems can be used
Quite a regular
Quite a regular


See User information
@daveyw
I didn't read that whole thread but the one sentence I've read suggests it would be faster with diskcache on SSD too but would wear your flash chips faster due to more writes so to save SSD life you'd better disable it. Since SSDs are fast it would probably still be faster than spinning disk without using diskcache.

Go to top
Re: Sam460 which file systems can be used
Quite a regular
Quite a regular


See User information
I did some experimenting with this lsi driver. Here are some findings:

- It's enough to replace nvram.resource.kmod and add nvrom.txt from the pegasos2 version to Kicklayout to be able to set nvram options with this file. Adding lsi53c8xx_override=0012 and lsi53c8xx_verbose=1 makes the driver happy with QEMU's card and print dome debug logs.

- The AmigaOS driver only sets bus master bit but does not enable memory regions and BBoot did not enable it either. The peagsos2.rom firmware does so that's why it did not work with BBoot. I'll fix that when it would work otherwise.

- The scsi-hd is detected but when trying to talk to it it fails after some error. The next command after the error seems to be missing something the card expects so maybe it's due to incorrect error handling in the AmigaOS driver or some behaviour of the card that's not emulated and the AmigaOS driver relies on.

I get these logs during detecting the card which seems to finish successfully:
lsi53c8xx.device 53.20 (24.9.2014)

[
lsi53c8xx/dev_initAdjusted pci_prodid to 0012
[lsi53c8xx/dev_initFound chip #0
[lsi53c8xx/ide_initchipWaiting for devices to spin up..
[
lsi53c8xx/init_port] ---> Port 0
[lsi53c8xx/scsi_scanScanning SCSI bus...
lsi_do_msgout MSG out len=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
lsi_do_dma DMA addr
=0x19b000 len=254
lsi_do_status Get status len
=1 status=0
lsi_do_msgin Message in len
=1 1
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
lsi_do_status Get status len
=1 status=2
lsi_do_msgin Message in len
=1 1
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
lsi_do_dma DMA addr
=0x19907c len=14
lsi_do_status Get status len
=1 status=0
lsi_do_msgin Message in len
=1 1
[lsi53c8xx/execute_cmdRequest_sense sense key 6 ASC 29 ASCQ 0
[lsi53c8xx/execute_cmdTarget 0 not readyretry 0
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
lsi_do_status Get status len
=1 status=0
lsi_do_msgin Message in len
=1 1
  Device 0
: (0:0VendorQEMU Prod.: QEMU HARDDISK Rev2.5+
            
TypeHard Disk
[lsi53c8xx/execute_scriptID1 Selection Timeout
[lsi53c8xx/execute_scriptID2 Selection Timeout
[lsi53c8xx/execute_scriptID3 Selection Timeout
[lsi53c8xx/execute_scriptID4 Selection Timeout
[lsi53c8xx/execute_scriptID5 Selection Timeout
[lsi53c8xx/execute_scriptID6 Selection Timeout
[lsi53c8xx/execute_scriptID7 Selection Timeout
[lsi53c8xx/execute_scriptID8 Selection Timeout
[lsi53c8xx/execute_scriptID9 Selection Timeout
[lsi53c8xx/execute_scriptIDA Selection Timeout
[lsi53c8xx/execute_scriptIDB Selection Timeout
[lsi53c8xx/execute_scriptIDC Selection Timeout
[lsi53c8xx/execute_scriptIDD Selection Timeout
[lsi53c8xx/execute_scriptIDE Selection Timeout
[lsi53c8xx/execute_scriptIDF Selection Timeout
[lsi53c8xx/init_port1 device(son port
[lsi53c8xx/init_portStarting 'lsi53c8xx.device - chip 0 port 0' task
[lsi53c8xx/int_install_handlerInstalling handler for irq 25
[lsi53c8xx/init_unitTrying to configure unit 0
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=10
lsi_do_dma DMA addr
=0x23a0000 len=8
lsi_do_status Get status len
=1 status=0
lsi_do_msgin Message in len
=1 1
[lsi53c8xx/init_unitUnit configuredflags $0301
[lsi53c8xx/init_portPort 0 task started
[lsi53c8xx/dev_initAll done


Then later when trying to access the device:
lsi_do_msgout MSG out len=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
lsi_do_dma DMA addr
=0x23a0000 len=8
lsi_do_status Get status len
=1 status=0
lsi_do_msgin Message in len
=1 1
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=10
lsi_do_msgin Message in len
=1 2
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=10
lsi_do_msgin Message in len
=1 3
[lsi53c8xx/scsi_print_errorSCSI ErrorTarget 0 LUN 0 Command 28
       CCB
28 00 00 00 00 01 00 00 01 00 (len 10)
     
CntrlScript Error
     Sense
SK 0 (No SenseASC 0 ASCQ 0
    Status
Good
lsi_do_msgin Message in len
=1 3
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=10
qemu
-system-ppc: ../hw/scsi/lsi53c895a.c:866lsi_do_commandAssertion `s->current == NULL' failed.

I don't know what the failed command is, would need to look up in some SCSI docs.

It tries to detect up to 15 devices so maybe even more than 7 could be attached to this controller. The options to attach a scsi disk in QEMU is:

-device lsi53c895a -drive if=none,id=shd,format=raw,file=disk.img -device scsi-hd,drive=shd

but it won't work currently, only added it here because @smarkusg had a more complex command above which can be simplified as above.

Using scsi-cd instead of scsi-hd the error does not happen but eventually gets the same error after some more communication with the scsi-cd:
lsi_do_msgout MSG out len=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
lsi_do_dma DMA addr
=0x23a0000 len=8
lsi_do_status Get status len
=1 status=0
lsi_do_msgin Message in len
=1 1
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
lsi_do_status Get status len
=1 status=0
lsi_do_msgin Message in len
=1 1
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=10
lsi_do_msgin Message in len
=1 2
[lsi53c8xx/find_unitunitnum 16 invalid (!chip)
[
lsi53c8xx/find_unitunitnum 17 invalid (!chip)
...
[
lsi53c8xx/find_unitunitnum 62 invalid (!chip)
[
lsi53c8xx/find_unitunitnum 63 invalid (!chip)
lsi_do_msgout MSG out len=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
lsi_do_status Get status len
=1 status=0
lsi_do_msgin Message in len
=1 2

[DOSNOTEKernel debug level detected as 1
lsi_do_msgin Message in len
=1 2
lsi_do_msgout MSG out len
=1
lsi_do_msgout_select Select LUN 0
lsi_do_command Send command len
=6
qemu
-system-ppc: ../hw/scsi/lsi53c895a.c:866lsi_do_commandAssertion `s->current == NULL' failed.


Edited by balaton on 2024/3/2 19:35:14
Go to top
Re: Sam460 which file systems can be used
Not too shy to talk
Not too shy to talk


See User information
@balaton

Quote:
Maybe the AmigaOS lsi scsi driver is not init'ing/using these cards properly as the Linux drivers do or does something that works on real card >but QEMU is not emulating as the Linux and other OS drivers don't do that?


I would be more in favour of saying that lsi53c810 under qemu was written for specific machines.
It was certainly not done on purpose, but some of the code may have been omitted because the author decided it was not used/needed for a particular system and driver- and rightly so
Quote:
>The assert means that the condition should be true. If it's not then there's a problem somewhere, either the guest sent some unexpected commands >or there's a problem with emulation. Commenting the assert won't help as it's there to make sure it won't break later.

I wrote with exclamation marks that it was a test and I would never leave it like that in my life The test was successful because it showed that AOS is able to work with its lsi53c810 driver, making the correct drive data available.

Unfortunately, I am unable to debug this problem. I hope you find a solution

Go to top
Re: Sam460 which file systems can be used
Quite a regular
Quite a regular


See User information
@smarkusg
QEMU emulates devices enough for guests to run and often omits details that aren't required or nothing would use it. But this SCSI controller emulation probably works with at least Linux and Windows drivers and maybe also BSD ones so it's more likely that the AmigaOS driver does something weird that no other driver does. Immediately at start it does not enable the card itself and expects the firmware to do that (this is a problem with all other drivers like graphics and USB, e.g. MorphOS does not need that and inits the cards itself such as Linux too).

I've seen the note that it's for testing but even then it's not correct and could cause problems. The s->current this assert checks seems to be the request that's currently being processed. If you remove the assert it would overwrite that request and at least cause leaking memory at worst cause pending request to be lost and maybe cause data loss if that request was supposed to read or write data. So even if AmigaOS detects the drive that way I would not expect it to actually work until we understand why that assert is there and why it trips with AmigaOS driver. Maybe the QEMU emulation does not expect the driver to send new commands in the middle of another one or some condition should remove that request that's not handled by the emulation currently.

I don't know this scsi card so I could only debug it if I read the docs and learned about it first which takes too much time so I likely won't do that. What I hope is I can gather enough information about what's happening so I can send a message to the QEMU list asking if somebody knows what could it be and how to fix it. That's all I plan to do and anybody else could do that.

Go to top
Re: Sam460 which file systems can be used
Just can't stay away
Just can't stay away


See User information
@balaton
Quote:
[lsi53c8xx/execute_cmdRequest_sense sense key 6 ASC 29 ASCQ 0
[lsi53c8xx/execute_cmdTarget 0 not readyretry 0
Unit Attention - POR or device reset occurred
Quote:
[lsi53c8xx/scsi_print_errorSCSI ErrorTarget 0 LUN 0 Command 28
      CCB
28 00 00 00 00 01 00 00 01 00 (len 10)
I don't know what the failed command is, would need to look up in some SCSI docs.
Operation code 0x28 (byte 0) is the Read(10) command, LBA 1 (bytes 2-5, big endian), transfer length 1 sector (bytes 7+8).

If you know how ATAPI works you don't need SCSI docs, ATAPI basically uses the SCSI command set, just a different way to transfer commands, data and error codes.

Quote:
CntrlScript Error
AFAIK scripts based SCSI controllers use some kind of assembler language to execute the commands on the controller, the script code is uploaded by the driver.
Maybe the QEmu emulation of this SCSI controller doesn't support some script code the AmigaOS 4.1 driver uses, but the Linux, Windows, etc. drivers don't.


Edited by joerg on 2024/3/3 4:36:39
Edited by joerg on 2024/3/3 4:44:58
Go to top
Re: Sam460 which file systems can be used
Just can't stay away
Just can't stay away


See User information
@balaton
Did your try https://lists.nongnu.org/archive/html/ ... vel/2024-03/msg00343.html already?
I don't know if it's the case for lsi53c8xx.device.kmod as well, but when porting hardware drivers to AmigaOS the usual source is NetBSD, for example the Classic Amiga cybppc.device.kmod SCSI driver is based on the NetBSD Amiga http://cvsweb.netbsd.org/bsdweb.cgi/s ... type=text/x-cvsweb-markup driver.

Different SCSI controller, NCR/SYM/LSI 53C720/770, different other hardware (A4000[T] CyberStormPPC CPU board with custom connection to the SCSI chip), but still should be very similar to the NCR/SYM/LSI 53C895A/53C810 SCSI controller on a PCI card.

Go to top
Re: Sam460 which file systems can be used
Quite a regular
Quite a regular


See User information
@joerg
I tried that patch yesterday already and also the other one that was posted recently but none of those helped. I've also found that WinUAE snatched this emulation from QEMU and apparently it works for cybppc or some other cards using similar chips in WinUAE but I could not find any changes there either the would fix this AmigaOS4 driver (although that is based on a very old QEMU version and the changes are not documented at all so hard to follow but I've tried the changes that I've found and still get into the assert. I now think this may be because the emulation does not generate disconnect and reselect events the same way as real chip and this may confuse the sctipts that this driver uses. There's a FIXME comment about this here:
qemu/hw/scsi/lsi53c895a.c:1338

Go to top
Re: Sam460 which file systems can be used
Just can't stay away
Just can't stay away


See User information
@balaton
cybppc.device, implemented by the Amiga/m68k and Amiga/PPC NetBSD maintainer Ignatios Souvatzis (with a little help from me in the AmigaOS 4.x specific parts), and lsi53c8xx.device, implemented by Stephane Guillard who did the PATA (VIA (a1|peg2)ide, SII0680, IT8212) and SATA (SII3[15]1[24]) drivers as well, may have nothing in common, especially the script code may be completely different.

I don't know the script code lsi53c8xx.device uses, the csppc.device script code is available on http://cvsweb.netbsd.org/bsdweb.cgi/s ... type=text/x-cvsweb-markup


Edited by joerg on 2024/3/5 5:59:26
Go to top
Re: Sam460 which file systems can be used
Quite a regular
Quite a regular


See User information
@joerg
I gave up on fixing this because this 53Cxxx chip is too complex so needs a lot of learning about how it should work and how it is currently implemented in QEMU. Also the current emulation works with other drivers, including MorphOS which is probably based on the NetBSD driver so it seems the AmigaOS4 driver does something differently and without source for it I don't want to find it out.

All this scsi test was just a side track anyway, it does not fix or answer the original question: why SFS doos not work on sam460ex when it works with the same sii2112 controller on pegasos2. So maybe finding that out would be more important but I also know nothing about that so I can't fix that until somebody identifies what's the problem with it.

Go to top
Re: Sam460 which file systems can be used
Just can't stay away
Just can't stay away


See User information
@balaton
Quote:
it does not fix or answer the original question: why SFS doos not work on sam460ex when it works with the same sii2112 controller on pegasos2.
Since it works for @jabirulo (real Sam460), but not for @smarkusg (except for the AmigaOS 3.x/m68k version, QEmu Sam460), I have no idea what the problem could be.

Go to top

  Register To Post
« 1 2 3 (4)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project