Received: by mail.netbsd.org (Postfix, from userid 605) id F3AA084E9C; Sun, 5 Sep 2021 07:27:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 3A2B584E91 for ; Sun, 5 Sep 2021 07:27:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id cmMBu5G7gbCj for ; Sun, 5 Sep 2021 07:27:14 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 2B9A084D25 for ; Sun, 5 Sep 2021 07:27:14 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 2017EFA97; Sun, 5 Sep 2021 07:27:14 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1630826834153350" MIME-Version: 1.0 Date: Sun, 5 Sep 2021 07:27:14 +0000 From: "Nick Hudson" Subject: CVS commit: pkgsrc/emulators/gxemul To: pkgsrc-changes@NetBSD.org Reply-To: skrll@netbsd.org X-Mailer: log_accum Message-Id: <20210905072714.2017EFA97@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1630826834153350 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: skrll Date: Sun Sep 5 07:27:14 UTC 2021 Modified Files: pkgsrc/emulators/gxemul: Makefile distinfo Added Files: pkgsrc/emulators/gxemul/patches: patch-doc_machine__cats.html patch-src_cpus_cpu__arm.c patch-src_cpus_cpu__arm__instr.c patch-src_cpus_cpu__arm__instr__dpi.c Log Message: Apply my recent fixes that have been upstreamed (and improved): ---- r6572 | debug | 2021-08-29 17:53:05 +0100 (Sun, 29 Aug 2021) | 1 line The ARM "permanently undefined" instructions now result in an und exception (patch from Nick Hudson). ---- r6573 | debug | 2021-08-29 18:02:18 +0100 (Sun, 29 Aug 2021) | 1 line Storing to memory is not allowed until the CPU has initialized completely; this code was for ARM OpenFirmware, which is not currently in use by any machine. ---- r6576 | debug | 2021-08-30 10:23:38 +0100 (Mon, 30 Aug 2021) | 1 line Fix for ARM carry flag update for some instructions (patch from Nick Hudson). Also updating the NetBSD/cats installation instructions to 9.2. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 pkgsrc/emulators/gxemul/Makefile cvs rdiff -u -r1.65 -r1.66 pkgsrc/emulators/gxemul/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/emulators/gxemul/patches/patch-doc_machine__cats.html \ pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm.c \ pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr.c \ pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr__dpi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1630826834153350 Content-Disposition: inline Content-Length: 7885 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/emulators/gxemul/Makefile diff -u pkgsrc/emulators/gxemul/Makefile:1.73 pkgsrc/emulators/gxemul/Makefile:1.74 --- pkgsrc/emulators/gxemul/Makefile:1.73 Sat Apr 24 07:31:36 2021 +++ pkgsrc/emulators/gxemul/Makefile Sun Sep 5 07:27:13 2021 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.73 2021/04/24 07:31:36 fcambus Exp $ +# $NetBSD: Makefile,v 1.74 2021/09/05 07:27:13 skrll Exp $ DISTNAME= gxemul-0.7.0 +PKGREVISION= 1 CATEGORIES= emulators MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gxemul/} Index: pkgsrc/emulators/gxemul/distinfo diff -u pkgsrc/emulators/gxemul/distinfo:1.65 pkgsrc/emulators/gxemul/distinfo:1.66 --- pkgsrc/emulators/gxemul/distinfo:1.65 Sat Apr 24 07:31:36 2021 +++ pkgsrc/emulators/gxemul/distinfo Sun Sep 5 07:27:13 2021 @@ -1,6 +1,10 @@ -$NetBSD: distinfo,v 1.65 2021/04/24 07:31:36 fcambus Exp $ +$NetBSD: distinfo,v 1.66 2021/09/05 07:27:13 skrll Exp $ SHA1 (gxemul-0.7.0.tar.gz) = 3a201be34b53bc851842c5a2ded6244e217e7cca RMD160 (gxemul-0.7.0.tar.gz) = 590a2ab904c2999552e33da42f1724d44efb9342 SHA512 (gxemul-0.7.0.tar.gz) = d977342843e903aedd9dcdf6fdab81ceb5ee1552bf3b90deb77eb59b42e5fad3a65f216ce33cf33259372ff9a10af5b1365827de949f0c61fb9859b417972c71 Size (gxemul-0.7.0.tar.gz) = 5985021 bytes +SHA1 (patch-doc_machine__cats.html) = 1c67fbfe42fa86427e3ebdc6720b894123eb4672 +SHA1 (patch-src_cpus_cpu__arm.c) = c34c78a13a65b06d8a0011a8bbb27ecaed3f4db9 +SHA1 (patch-src_cpus_cpu__arm__instr.c) = b91c6b4de6f47de28db259dac6146f46d3f81787 +SHA1 (patch-src_cpus_cpu__arm__instr__dpi.c) = 160d870151cd25e5393f57acbf91525b69fa41f3 Added files: Index: pkgsrc/emulators/gxemul/patches/patch-doc_machine__cats.html diff -u /dev/null pkgsrc/emulators/gxemul/patches/patch-doc_machine__cats.html:1.1 --- /dev/null Sun Sep 5 07:27:14 2021 +++ pkgsrc/emulators/gxemul/patches/patch-doc_machine__cats.html Sun Sep 5 07:27:13 2021 @@ -0,0 +1,48 @@ +$NetBSD: patch-doc_machine__cats.html,v 1.1 2021/09/05 07:27:13 skrll Exp $ + +--- doc/machine_cats.html.orig 2021-04-22 18:04:13.000000000 +0000 ++++ doc/machine_cats.html +@@ -46,8 +46,8 @@ SUCH DAMAGE. + + +

The CATS emulation mode is working well enough to run +-old versions of NetBSD/cats and +-OpenBSD/cats.

++NetBSD/cats and ++an old version of OpenBSD/cats.

+ +

Debian GNU/Linux could + perhaps run in the future. +@@ -80,14 +80,14 @@ To install NetBSD/cats onto a disk image + + +

  • Download the NetBSD/cats ISO image and the generic and install kernels:
    +-	ftp://ftp.de.netbsd.org/pub/NetBSD/iso/8.1/NetBSD-8.1-cats.iso
    +-	ftp://ftp.de.netbsd.org/pub/NetBSD/NetBSD-8.1/cats/binary/kernel/netbsd-GENERIC.aout.gz
    +-	ftp://ftp.de.netbsd.org/pub/NetBSD/NetBSD-8.1/cats/binary/kernel/netbsd-INSTALL.aout.gz
    ++	ftp://ftp.de.netbsd.org/pub/NetBSD/iso/9.2/NetBSD-9.2-cats.iso
    ++	ftp://ftp.de.netbsd.org/pub/NetBSD/NetBSD-9.2/cats/binary/kernel/netbsd-GENERIC.aout.gz
    ++	ftp://ftp.de.netbsd.org/pub/NetBSD/NetBSD-9.2/cats/binary/kernel/netbsd-INSTALL.aout.gz
    + 
    + 
    +

    +

  • Start the installation like this:
    +-	gxemul -X -E cats -d nbsd_cats.img -d NetBSD-8.1-cats.iso netbsd-INSTALL.aout.gz
    ++	gxemul -X -E cats -d nbsd_cats.img -d NetBSD-9.2-cats.iso netbsd-INSTALL.aout.gz
    + 
    + 
    + and proceed like you would do if you were installing NetBSD on a real +@@ -96,11 +96,8 @@ To install NetBSD/cats onto a disk image + +

    Note that there may be some long delays during bootup. + +-

    (NOTE: Older versions of NetBSD could install via FTP in older versions +-of GXemul. Right now, that seems to not be possible, resulting in ethernet +-timeouts etc. Whether it is due to bit rot in the emulator, or due to NetBSD +-having changed over time, has not been debugged. +-If you want to try an FTP install anyway, ++

    (NOTE: It may also be possible to install via FTP, but this is slow and ++sometimes unstable. If you want to try an FTP install anyway, + start the install without -d xxxxx.iso and use + IPv4 address 10.0.0.1, gateway/default route 10.0.0.254, netmask + 255.0.0.0, and nameserver 10.0.0.254, when asked to configure the network.) Index: pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm.c diff -u /dev/null pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm.c:1.1 --- /dev/null Sun Sep 5 07:27:14 2021 +++ pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm.c Sun Sep 5 07:27:13 2021 @@ -0,0 +1,28 @@ +$NetBSD: patch-src_cpus_cpu__arm.c,v 1.1 2021/09/05 07:27:13 skrll Exp $ + +--- src/cpus/cpu_arm.c.orig 2021-09-05 05:56:14.113306233 +0000 ++++ src/cpus/cpu_arm.c +@@ -158,13 +158,17 @@ int arm_cpu_new(struct cpu *cpu, struct + cpu->cd.arm.coproc[14] = arm_coproc_xscale_14; + + /* +- * NOTE/TODO: Ugly hack for OpenFirmware emulation: ++ * OLD: Ugly hack for OpenFirmware emulation: ++ * ++ * Move this to the end of corresponding machine initialization ++ * code. ++ * ++ * if (cpu->machine->prom_emulation) { ++ * cpu->cd.arm.of_emul_addr = cpu->machine->physical_ram_in_mb ++ * * 1048576 - 8; ++ * store_32bit_word(cpu, cpu->cd.arm.of_emul_addr, 0xef8c64be); ++ * } + */ +- if (cpu->machine->prom_emulation) { +- cpu->cd.arm.of_emul_addr = cpu->machine->physical_ram_in_mb +- * 1048576 - 8; +- store_32bit_word(cpu, cpu->cd.arm.of_emul_addr, 0xef8c64be); +- } + + cpu->cd.arm.flags = cpu->cd.arm.cpsr >> 28; + Index: pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr.c diff -u /dev/null pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr.c:1.1 --- /dev/null Sun Sep 5 07:27:14 2021 +++ pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr.c Sun Sep 5 07:27:13 2021 @@ -0,0 +1,14 @@ +$NetBSD: patch-src_cpus_cpu__arm__instr.c,v 1.1 2021/09/05 07:27:13 skrll Exp $ + +--- src/cpus/cpu_arm_instr.c.orig 2021-04-22 18:04:18.000000000 +0000 ++++ src/cpus/cpu_arm_instr.c +@@ -3534,6 +3534,9 @@ X(to_be_translated) + int lsb = (iword >> 7) & 31; + int width = 1 + ((iword >> 16) & 31); + ic->arg[2] = (width << 16) + lsb; ++ } else if ((iword & 0x07f000f0) == 0x07f000f0) { ++ ic->f = cond_instr(und); ++ ic->arg[0] = addr & 0xfff; + } else { + if (!cpu->translation_readahead) + fatal("unimplemented special non-loadstore encoding!\n"); Index: pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr__dpi.c diff -u /dev/null pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr__dpi.c:1.1 --- /dev/null Sun Sep 5 07:27:14 2021 +++ pkgsrc/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr__dpi.c Sun Sep 5 07:27:13 2021 @@ -0,0 +1,13 @@ +$NetBSD: patch-src_cpus_cpu__arm__instr__dpi.c,v 1.1 2021/09/05 07:27:13 skrll Exp $ + +--- src/cpus/cpu_arm_instr_dpi.c.orig 2021-04-22 18:04:18.000000000 +0000 ++++ src/cpus/cpu_arm_instr_dpi.c +@@ -255,7 +255,7 @@ void A__NAME(struct cpu *cpu, struct arm + + #if defined(A__CMP) || defined(A__RSB) || defined(A__SUB) || \ + defined(A__RSC) || defined(A__SBC) +- if ((uint32_t)a >= (uint32_t)b) ++ if (c32 == c64) + cpu->cd.arm.flags |= ARM_F_C; + #else + #if defined(A__ADC) || defined(A__ADD) || defined(A__CMN) --_----------=_1630826834153350--