diff options
author | skrll <skrll@pkgsrc.org> | 2021-09-05 07:27:13 +0000 |
---|---|---|
committer | skrll <skrll@pkgsrc.org> | 2021-09-05 07:27:13 +0000 |
commit | 3b43cf25e40f68d93fb1b332d260e84565448fd9 (patch) | |
tree | 1e27cf20b9b607c7171ba11c1c139b33d3be4441 /emulators | |
parent | 810988045222f9093ebb53273df81ff53feae09d (diff) | |
download | pkgsrc-3b43cf25e40f68d93fb1b332d260e84565448fd9.tar.gz |
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.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/gxemul/Makefile | 3 | ||||
-rw-r--r-- | emulators/gxemul/distinfo | 6 | ||||
-rw-r--r-- | emulators/gxemul/patches/patch-doc_machine__cats.html | 48 | ||||
-rw-r--r-- | emulators/gxemul/patches/patch-src_cpus_cpu__arm.c | 28 | ||||
-rw-r--r-- | emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr.c | 14 | ||||
-rw-r--r-- | emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr__dpi.c | 13 |
6 files changed, 110 insertions, 2 deletions
diff --git a/emulators/gxemul/Makefile b/emulators/gxemul/Makefile index 62ab08cd465..333b181cd25 100644 --- a/emulators/gxemul/Makefile +++ b/emulators/gxemul/Makefile @@ -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/} diff --git a/emulators/gxemul/distinfo b/emulators/gxemul/distinfo index e6b5e2d3686..b52b004c892 100644 --- a/emulators/gxemul/distinfo +++ b/emulators/gxemul/distinfo @@ -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 diff --git a/emulators/gxemul/patches/patch-doc_machine__cats.html b/emulators/gxemul/patches/patch-doc_machine__cats.html new file mode 100644 index 00000000000..a2d836ec868 --- /dev/null +++ b/emulators/gxemul/patches/patch-doc_machine__cats.html @@ -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. + + + <p>The CATS emulation mode is working well enough to run +-old versions of <a href="#netbsdcatsinstall">NetBSD/cats</a> and +-<a href="#openbsdcatsinstall">OpenBSD/cats</a>.</p> ++<a href="#netbsdcatsinstall">NetBSD/cats</a> and ++an old version of <a href="#openbsdcatsinstall">OpenBSD/cats</a>.</p> + + <p><font color="red"><small><a name="#debiancats">Debian GNU/Linux</a></small></font> could + perhaps run in the future. +@@ -80,14 +80,14 @@ To install NetBSD/cats onto a disk image + + </pre> + <li>Download the NetBSD/cats ISO image and the generic and install kernels:<pre> +- <a href="ftp://ftp.de.netbsd.org/pub/NetBSD/iso/8.1/NetBSD-8.1-cats.iso">ftp://ftp.de.netbsd.org/pub/NetBSD/iso/8.1/NetBSD-8.1-cats.iso</a> +- <a href="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-GENERIC.aout.gz</a> +- <a href="ftp://ftp.de.netbsd.org/pub/NetBSD/NetBSD-8.1/cats/binary/kernel/netbsd-INSTALL.aout.gz">ftp://ftp.de.netbsd.org/pub/NetBSD/NetBSD-8.1/cats/binary/kernel/netbsd-INSTALL.aout.gz</a> ++ <a href="ftp://ftp.de.netbsd.org/pub/NetBSD/iso/9.2/NetBSD-9.2-cats.iso">ftp://ftp.de.netbsd.org/pub/NetBSD/iso/9.2/NetBSD-9.2-cats.iso</a> ++ <a href="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-GENERIC.aout.gz</a> ++ <a href="ftp://ftp.de.netbsd.org/pub/NetBSD/NetBSD-9.2/cats/binary/kernel/netbsd-INSTALL.aout.gz">ftp://ftp.de.netbsd.org/pub/NetBSD/NetBSD-9.2/cats/binary/kernel/netbsd-INSTALL.aout.gz</a> + + </pre> + <p> + <li>Start the installation like this:<pre> +- <b>gxemul -X -E cats -d nbsd_cats.img -d NetBSD-8.1-cats.iso netbsd-INSTALL.aout.gz</b> ++ <b>gxemul -X -E cats -d nbsd_cats.img -d NetBSD-9.2-cats.iso netbsd-INSTALL.aout.gz</b> + + </pre> + 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 + + <p>Note that there may be some long delays during bootup. + +-<p>(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, ++<p>(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 <tt>-d xxxxx.iso</tt> 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.) diff --git a/emulators/gxemul/patches/patch-src_cpus_cpu__arm.c b/emulators/gxemul/patches/patch-src_cpus_cpu__arm.c new file mode 100644 index 00000000000..328b7219d69 --- /dev/null +++ b/emulators/gxemul/patches/patch-src_cpus_cpu__arm.c @@ -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; + diff --git a/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr.c b/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr.c new file mode 100644 index 00000000000..e59fbece1e9 --- /dev/null +++ b/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr.c @@ -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"); diff --git a/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr__dpi.c b/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr__dpi.c new file mode 100644 index 00000000000..7c36fb5f32d --- /dev/null +++ b/emulators/gxemul/patches/patch-src_cpus_cpu__arm__instr__dpi.c @@ -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) |