Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Re, it took me some time to add basic ARAnyM detection support to imvirt. The detection heuristic does only the dmesg check, atm. The code is available via SVN at: https://imvirt.svn.sourceforge.net/svnroot/imvirt/tags/0.9.3-pre0_r573/ Since I have no experience on ARAnyM/m68k I would really appreciate contributions to become independent of the dmesg output. TIA, Thomas On 02/06/2012 10:23 PM, Thomas Liske wrote: Hi, On 02/06/2012 08:06 PM, Thorsten Glaser wrote: root@ara2:~ # uname -a Linux ara2.mirbsd.org 3.2.0-1+m68k.1-atari #1 Mon Jan 23 06:44:50 UTC 2012 m68k GNU/Linux root@ara2:~ # cat /proc/cpuinfo CPU: 68040 MMU: 68040 FPU: 68040 Clocking: 134.2MHz BogoMips: 89.49 Calibration: 447488 loops root@ara2:~ # dmesg|fgrep -i aranym [ 0.00] NatFeats found (ARAnyM, 1.0) Are there additional characteristics while running inside ARAnyM (i.e. cat /proc/modules)? The dmesg logfile might not be available for (unprivileged) users and the dmesg kernel buffer might be scrolled off. Cheers, Thomas An optional feature is to use nfhd{8,9} instead of hd{a,b} for hard discs (which is also not present in all Linux kernels): root@ara2:~ # cat /proc/partitions major minor #blocks name 254 128 10485720 nfhd8 254 129 8496093 nfhd8p1 254 130 1989626 nfhd8p2 2 0 3280 fd0 2 1 3280 fd1 3 0 10485720 hda 3 1 8496093 hda1 3 2 1989626 hda2 bye, //mirabilos -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
On Sun, Feb 12, 2012 at 20:08, Andreas Schwab sch...@linux-m68k.org wrote: Finn Thain fth...@telegraphics.com.au writes: I don't know what those differences might be but the aranym developers may have some ideas. They may even know how to get the CPU to identify itself. You could probe for the natfeat instruction. The userspace program below nicely crashes ARAnyM (0.9.9-1 Ubuntu) with | Gotcha! Illegal memory access. Atari PC = $84dc | If the Full History was enabled you would see the last 20 instructions here. #include stdio.h asm(\n .global nf_get_id,nf_call\n nf_get_id:\n .short 0x7300\n rts\n nf_call:\n .short 0x7301\n rts\n 1: moveq.l #0,%d0\n rts\n .section __ex_table,\a\\n .long nf_get_id,1b\n .long nf_call,1b\n .previous); int main() { unsigned long id, version; char buf[256]; id = nf_get_id(NF_VERSION); if (!id) return; version = nf_call(id); id = nf_get_id(NF_NAME); if (!id) return; nf_call(id, buf, 256); buf[255] = 0; printf(NatFeats found (%s, %lu.%lu)\n, buf, version 16, version 0x); return 0; } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Michael Schmitz píše v Sun 12. 02. 2012 v 01:40 +0100: I'd wager a guess that there is no actual hardware Falcon with AB040 that runs Linux out there - Petr had trouble getting Linux to run on that hardware and we never got to the bottom of that. I can always give it a new try. I remember that the kernel must have been in ST-RAM, otherwise the bogomips detection went hairy (just a side effect of losing interrupts?) Petr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Petr Stehlik dixit: # cat /proc/hardware Model: ARAnyM --- output of NF_NAME That, again, would require a kernel that supports this. Oh, by the way, Linux 3.2.4 says: root@aranym:~ # cat /proc/hardware Model: Atari Falcon (with Afterburner040) System Memory: 800768K 14 MB at 0x (ST-RAM) 768 MB at 0x0100 (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 Clock Chip MC146818A Blitter DSP56001 processor So, no-go. This is root on /dev/nfhd8p1, so NF work. bye, //mirabilos -- FWIW, I'm quite impressed with mksh interactively. I thought it was much *much* more bare bones. But it turns out it beats the living hell out of ksh93 in that respect. I'd even consider it for my daily use if I hadn't wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Petr Stehlik dixit: # cat /proc/hardware Model: ARAnyM --- output of NF_NAME That, again, would require a kernel that supports this. And the kernel would have to be told by ARAnyM in some way - I'm not sure how the AB040 part is recognized by the kernel. SCSI Controller NCR5380 (Falcon style) Is there some form of SCSI emulation in ARAnyM now? What does cat /proc/scsi/scsi and cat /proc/scsi/Atari/0 return? But then, the SCSI driver does not need to be compiled in or loaded either. Looking at the clock speed as reported by /proc/cpuinfo should give a good hint as to whether we're running on real hardware. What do you get there? Cheers, Michael -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Michael Schmitz píše v Út 14. 02. 2012 v 07:43 +0100: And the kernel would have to be told by ARAnyM in some way - I'm not sure how the AB040 part is recognized by the kernel. I believe the AB040 is if the HW is Falcon and the CPU is 040 then it is AB040. After all, the AfterBurner doesn't bring any specific HW changes apart from the different CPU - the rest is pure original Falcon HW. SCSI Controller NCR5380 (Falcon style) Is there some form of SCSI emulation in ARAnyM now? no form, AFAIK, and nothing has ever been planned. ARAnyM is not a Falcon emulator. Looking at the clock speed as reported by /proc/cpuinfo should give a good hint as to whether we're running on real hardware. What do you get there? Falcon can have several different bus clock accelerators ranging from 16 up to 25 MHz. That affects the AB040 clock speed directly. So the only sensible check would be if the clock speed is higher than 30 MHz bus clock then it most probably can't be a real HW. This check would naturally fail on slow hosts... Petr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
On Tue, 14 Feb 2012, Petr Stehlik wrote: if the clock speed is higher than 30 MHz bus clock then it most probably can't be a real HW. This check would naturally fail on slow hosts... ... and busy hosts. And, in general, that reasoning could also fail if imvirt was running on ColdFire with 680x0 emulation libraries (though that may not matter since /proc/cpuinfo is only available on Linux). Finn -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Finn Thain fth...@telegraphics.com.au writes: I don't know what those differences might be but the aranym developers may have some ideas. They may even know how to get the CPU to identify itself. You could probe for the natfeat instruction. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something completely different. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Andreas Schwab dixit: Finn Thain fth...@telegraphics.com.au writes: I don't know what those differences might be but the aranym developers may have some ideas. They may even know how to get the CPU to identify itself. Good plan. You could probe for the natfeat instruction. That could work, especially if the probe can be done without superuser privs. bye, //mirabilos -- “It is inappropriate to require that a time represented as seconds since the Epoch precisely represent the number of seconds between the referenced time and the Epoch.” -- IEEE Std 1003.1b-1993 (POSIX) Section B.2.2.2 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Thorsten Glaser píše v Sun 12. 02. 2012 v 03:53 +: The idea of this exercise is to detect an emulator _without_ special setup… I might have missed the original goal but I can't see why it should be hard to detect NatFeat aware emulator. Originally ARAnyM tried to emulate Falcon040 closely to not scare Linux by unknown architecture but now when Linux contains specific support for NatFeats why don't we just extend the /proc/hardware with something like this: A) # cat /proc/hardware Model: ARAnyM --- output of NF_NAME System Memory: 800768K 14 MB at 0x (ST-RAM) 768 MB at 0x0100 (alternate RAM) Detected hardware: Native Features new 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 Clock Chip MC146818A Blitter DSP56001 processor Petr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Hi, Are there additional characteristics while running inside ARAnyM (i.e. cat /proc/modules)? The dmesg logfile might not be available for (unprivileged) users and the dmesg kernel buffer might be scrolled off. # cat /proc/hardware Model: Atari Falcon (with Afterburner040) System Memory: 800768K 14 MB at 0x (ST-RAM) 768 MB at 0x0100 (alternate RAM) I'd wager a guess that there is no actual hardware Falcon with AB040 that runs Linux out there - Petr had trouble getting Linux to run on that hardware and we never got to the bottom of that. The amount of TT RAM might be an additional clue. If that's not enough we could conceivably detect usage of natfeat drivers in the running kernel, and modify the /proc/hardware output in that case (perhaps enabled by an additional kernel boot option flag so we won't affect other uses of /proc/hardware). Placing a flag in the kernel boot option seems like the easiest way to signal the kernel runs on an emulator - unused optios should be passed to init which ought to ignore an option like 'aranym'. Please try that. Cheers, Michael -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Michael Schmitz dixit: The amount of TT RAM might be an additional clue. No, that’s configurable and arbitrary. If that's not enough we could conceivably detect usage of natfeat drivers in the running kernel There unfortunately are kernels out there without those. Especially old ones. Placing a flag in the kernel boot option seems like the easiest way to signal The idea of this exercise is to detect an emulator _without_ special setup… bye, //mirabilos -- FWIW, I'm quite impressed with mksh interactively. I thought it was much *much* more bare bones. But it turns out it beats the living hell out of ksh93 in that respect. I'd even consider it for my daily use if I hadn't wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
On Sun, 12 Feb 2012, Thorsten Glaser wrote: The idea of this exercise is to detect an emulator _without_ special setup? I found a post [1] by Dave O'Neill which has some ideas, like checking /proc/ide/hd*/model (though grep -q X /sys/class/block/*/device/model would probably work better, assuming that there exists an appropriate X). Finn [1] http://www.dmo.ca/blog/detecting-virtualization-on-linux/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
On Sun, 12 Feb 2012, Thorsten Glaser wrote: The idea of this exercise is to detect an emulator _without_ special setup? You could test for slight differences in CPU or FPU behaviour. It needn't be a privileged operation (kernel hacks may not be needed). I don't know what those differences might be but the aranym developers may have some ideas. They may even know how to get the CPU to identify itself. Finn -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Package: imvirt Version: 0.9.2-1 Severity: wishlist Tags: upstream imvirt doesn’t know about ARAnyM (Atari Running on Any Machine): root@ara2:~ # imvirt pcilib: Cannot open /proc/bus/pci lspci: Cannot find any working access method. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Physical root@ara2:~ # uname -a Linux ara2.mirbsd.org 3.2.0-1+m68k.1-atari #1 Mon Jan 23 06:44:50 UTC 2012 m68k GNU/Linux root@ara2:~ # cat /proc/cpuinfo CPU:68040 MMU:68040 FPU:68040 Clocking: 134.2MHz BogoMips: 89.49 Calibration:447488 loops root@ara2:~ # dmesg|fgrep -i aranym [0.00] NatFeats found (ARAnyM, 1.0) An optional feature is to use nfhd{8,9} instead of hd{a,b} for hard discs (which is also not present in all Linux kernels): root@ara2:~ # cat /proc/partitions major minor #blocks name 254 128 10485720 nfhd8 254 1298496093 nfhd8p1 254 1301989626 nfhd8p2 20 3280 fd0 21 3280 fd1 30 10485720 hda 318496093 hda1 321989626 hda2 bye, //mirabilos -- “Having a smoking section in a restaurant is like having a peeing section in a swimming pool.” -- Edward Burr -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Thomas Liske dixit: Are there additional characteristics while running inside ARAnyM (i.e. cat /proc/modules)? The dmesg logfile might not be available for (unprivileged) users and the dmesg kernel buffer might be scrolled off. Hrm, good question. root@ara3:~ # cat /proc/modules ipv6 237947 10 - Live 0x3195 Nothing on that front, thus. Unlike MirBSD, Debian doesn’t seem to have a /var/run/dmesg.boot either, so the scrolled-away comment is true. The one below also seems to be generic Atari… # cat /proc/hardware Model: Atari Falcon (with Afterburner040) System Memory: 800768K 14 MB at 0x (ST-RAM) 768 MB at 0x0100 (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 Clock Chip MC146818A Blitter DSP56001 processor I hope the m68k porters have more ideas where to look. You can also get your own ARAnyM: https://wiki.debian.org/Aranym/Quick bye, //mirabilos -- FWIW, I'm quite impressed with mksh interactively. I thought it was much *much* more bare bones. But it turns out it beats the living hell out of ksh93 in that respect. I'd even consider it for my daily use if I hadn't wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#658914: imvirt: does not know about ARAnyM (m68k Atari emulator)
Hi, On 02/06/2012 08:06 PM, Thorsten Glaser wrote: root@ara2:~ # uname -a Linux ara2.mirbsd.org 3.2.0-1+m68k.1-atari #1 Mon Jan 23 06:44:50 UTC 2012 m68k GNU/Linux root@ara2:~ # cat /proc/cpuinfo CPU:68040 MMU:68040 FPU:68040 Clocking: 134.2MHz BogoMips: 89.49 Calibration:447488 loops root@ara2:~ # dmesg|fgrep -i aranym [0.00] NatFeats found (ARAnyM, 1.0) Are there additional characteristics while running inside ARAnyM (i.e. cat /proc/modules)? The dmesg logfile might not be available for (unprivileged) users and the dmesg kernel buffer might be scrolled off. Cheers, Thomas An optional feature is to use nfhd{8,9} instead of hd{a,b} for hard discs (which is also not present in all Linux kernels): root@ara2:~ # cat /proc/partitions major minor #blocks name 254 128 10485720 nfhd8 254 1298496093 nfhd8p1 254 1301989626 nfhd8p2 20 3280 fd0 21 3280 fd1 30 10485720 hda 318496093 hda1 321989626 hda2 bye, //mirabilos -- supp...@ibh.de Tel. +49 351 477 77 30 www.ibh.de Fax +49 351 477 77 39 --- Dipl.-Ing. Thomas Liske Netzwerk- und System-Design IBH IT-Service GmbH Amtsgericht Dresden Gostritzer Str. 67a HRB 13626 D-01217 Dresden GF: Prof. Dr. Thomas Horn Germany VAT DE182302907 --- Ihr Partner für: LAN, WAN IP-Quality, Security, VoIP, SAN, Backup, USV --- professioneller IT-Service - kompetent und zuverlässig --- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org