CVS commit: [netbsd-9] src/sys/arch/atari/conf

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:24:18 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
regen (ticket #1521)


To generate a diff of this commit:
cvs rdiff -u -r1.120.4.1 -r1.120.4.2 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.117.4.1 -r1.117.4.2 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.115.4.1 -r1.115.4.2 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.93.2.1 -r1.93.2.2 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.97.2.1 -r1.97.2.2 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.23.6.1 -r1.23.6.2 src/sys/arch/atari/conf/SMALL030

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.120.4.1 src/sys/arch/atari/conf/ATARITT:1.120.4.2
--- src/sys/arch/atari/conf/ATARITT:1.120.4.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/ATARITT	Sun Sep 11 18:24:18 2022
@@ -1,5 +1,5 @@
 #
-# $NetBSD: ATARITT,v 1.120.4.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: ATARITT,v 1.120.4.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.117.4.1 src/sys/arch/atari/conf/FALCON:1.117.4.2
--- src/sys/arch/atari/conf/FALCON:1.117.4.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/FALCON	Sun Sep 11 18:24:18 2022
@@ -1,5 +1,5 @@
 #
-# $NetBSD: FALCON,v 1.117.4.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: FALCON,v 1.117.4.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.

Index: src/sys/arch/atari/conf/HADES
diff -u src/sys/arch/atari/conf/HADES:1.115.4.1 src/sys/arch/atari/conf/HADES:1.115.4.2
--- src/sys/arch/atari/conf/HADES:1.115.4.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/HADES	Sun Sep 11 18:24:18 2022
@@ -1,5 +1,5 @@
 #
-# $NetBSD: HADES,v 1.115.4.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: HADES,v 1.115.4.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.

Index: src/sys/arch/atari/conf/MILAN-ISAIDE
diff -u src/sys/arch/atari/conf/MILAN-ISAIDE:1.93.2.1 src/sys/arch/atari/conf/MILAN-ISAIDE:1.93.2.2
--- src/sys/arch/atari/conf/MILAN-ISAIDE:1.93.2.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/MILAN-ISAIDE	Sun Sep 11 18:24:18 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: MILAN-ISAIDE,v 1.93.2.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: MILAN-ISAIDE,v 1.93.2.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#		NetBSD: MILAN.in,v 1.29.2.1 2022/09/11 18:23:30 martin Exp $
 #		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.milan"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
@@ -83,6 +83,7 @@ options WS_KERNEL_BG=WSCOL_BLACK
 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling
 options WSDISPLAY_DEFAULTSCREENS=4
 options PCDISPLAY_SOFTCURSOR
+options FONT_VT220L8x16
 isab0 at mainbus0 # ISA-bus
 isa0 at isab0
 pcib0 at mainbus0 # PCI-bus

Index: src/sys/arch/atari/conf/MILAN-PCIIDE
diff -u src/sys/arch/atari/conf/MILAN-PCIIDE:1.97.2.1 src/sys/arch/atari/conf/MILAN-PCIIDE:1.97.2.2
--- src/sys/arch/atari/conf/MILAN-PCIIDE:1.97.2.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/MILAN-PCIIDE	Sun Sep 11 18:24:18 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: MILAN-PCIIDE,v 1.97.2.1 2022/09/11 18:17:02 martin Exp $
+# $NetBSD: MILAN-PCIIDE,v 1.97.2.2 2022/09/11 18:24:18 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#		NetBSD: MILAN.in,v 1.29.2.1 2022/09/11 18:23:30 martin Exp $
 #		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.milan"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
@@ -83,6 +83,7 @@ options WS_KERNEL_BG=WSCOL_BLACK
 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling
 options WSDISPLAY_DEFAULTSCREENS=4
 options PCDISPLAY_SOFTCURSOR
+options FONT_VT220L8x16
 isab0 at mainbus0 # ISA-bus
 isa0 at isab0
 pcib0 at mainbus0 # PCI-bus

Index: src/sys/arch/atari/conf/SMALL030
diff -u src/sys/arch/atari/conf/SMALL030:1.23.6.1 src/sys/arch/atari/conf/SMALL030:1.23.6.2
--- src/sys/arch/atari/conf/SMALL030:1.23.6.1	Sun Sep 11 18:17:02 2022
+++ src/sys/arch/atari/conf/SMALL030	Sun Sep 11 18:24:18 2022
@@ -1,5 +1,5 @@
 #
-# $NetBSD: SMALL030,v 1.23.6.1 2022/09/11 18:17:02 

CVS commit: [netbsd-9] src/sys/arch/atari/conf

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:24:18 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
regen (ticket #1521)


To generate a diff of this commit:
cvs rdiff -u -r1.120.4.1 -r1.120.4.2 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.117.4.1 -r1.117.4.2 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.115.4.1 -r1.115.4.2 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.93.2.1 -r1.93.2.2 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.97.2.1 -r1.97.2.2 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.23.6.1 -r1.23.6.2 src/sys/arch/atari/conf/SMALL030

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/arch/atari

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:23:30 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: MILAN.in
src/sys/arch/atari/pci [netbsd-9]: pci_vga.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1521):

sys/arch/atari/pci/pci_vga.c: revision 1.19
sys/arch/atari/conf/MILAN.in: revision 1.30

Improve VGA console settings for Milan, especially for sysinst.
- use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
  (so that box drawing characters are rendered properly)
- set ATC and DAC palette settings for proper colors
  (copied from MI vga_subr.c for now because HADES doesn't use mi vga(4))

Tested on Milan with S3 Trio64.  (XXX: needs working HADES with ET4000)

Specify options FONT_VT220L8x16 to get similar glyphs as past font_8x16.c.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.2.1 src/sys/arch/atari/conf/MILAN.in
cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/atari/pci/pci_vga.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/conf/MILAN.in
diff -u src/sys/arch/atari/conf/MILAN.in:1.29 src/sys/arch/atari/conf/MILAN.in:1.29.2.1
--- src/sys/arch/atari/conf/MILAN.in:1.29	Sat May  4 13:12:03 2019
+++ src/sys/arch/atari/conf/MILAN.in	Sun Sep 11 18:23:30 2022
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#	$NetBSD: MILAN.in,v 1.29.2.1 2022/09/11 18:23:30 martin Exp $
 #
 # Milan
 #
@@ -34,6 +34,8 @@ options 	WSDISPLAY_DEFAULTSCREENS=4
 options 	PCDISPLAY_SOFTCURSOR
 # modify the screen type of the console; defaults to "80x25"
 #options 	VGA_CONSOLE_SCREENTYPE="\"80x25\""
+# use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
+options 	FONT_VT220L8x16
 
 #
 # The following sections describe various hardware options.

Index: src/sys/arch/atari/pci/pci_vga.c
diff -u src/sys/arch/atari/pci/pci_vga.c:1.17 src/sys/arch/atari/pci/pci_vga.c:1.17.2.1
--- src/sys/arch/atari/pci/pci_vga.c:1.17	Sat May  4 09:03:08 2019
+++ src/sys/arch/atari/pci/pci_vga.c	Sun Sep 11 18:23:30 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_vga.c,v 1.17 2019/05/04 09:03:08 tsutsui Exp $	*/
+/*	$NetBSD: pci_vga.c,v 1.17.2.1 2022/09/11 18:23:30 martin Exp $	*/
 
 /*
  * Copyright (c) 1999 Leo Weppelman.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.17 2019/05/04 09:03:08 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.17.2.1 2022/09/11 18:23:30 martin Exp $");
 
 #include 
 #include 
@@ -55,11 +55,51 @@ extern font_info	font_info_8x8;
 extern font_info	font_info_8x16;
 
 /* Console colors */
-static const uint8_t conscolors[3][3] = {
-	/* background, foreground, hilite */
-	{ 0x00, 0x00, 0x00 },
-	{ 0x30, 0x30, 0x30 },
-	{ 0x3f, 0x3f, 0x3f }
+/* attribute controller registers */
+static const uint8_t vga_atc[] = {
+	0x00,	/* 00: internal palette  0 */
+	0x01,	/* 01: internal palette  1 */
+	0x02,	/* 02: internal palette  2 */
+	0x03,	/* 03: internal palette  3 */
+	0x04,	/* 04: internal palette  4 */
+	0x05,	/* 05: internal palette  5 */
+	0x14,	/* 06: internal palette  6 */
+	0x07,	/* 07: internal palette  7 */
+	0x38,	/* 08: internal palette  8 */
+	0x39,	/* 09: internal palette  9 */
+	0x3a,	/* 0A: internal palette 10 */
+	0x3b,	/* 0B: internal palette 11 */
+	0x3c,	/* 0C: internal palette 12 */
+	0x3d,	/* 0D: internal palette 13 */
+	0x3e,	/* 0E: internal palette 14 */
+	0x3f,	/* 0F: internal palette 15 */
+	0x0c,	/* 10: attribute mode control */
+	0x00,	/* 11: overscan color */
+	0x0f,	/* 12: color plane enable */
+	0x08,	/* 13: horizontal PEL panning */
+	0x00	/* 14: color select */
+};
+
+/* video DAC palette registers */
+/* XXX only set up 16 colors used by internal palette in ATC regsters */
+static const uint8_t vga_dacpal[] = {
+	/* R G B */
+	0x00, 0x00, 0x00,	/* BLACK*/
+	0x00, 0x00, 0x2a,	/* BLUE	*/
+	0x00, 0x2a, 0x00,	/* GREEN*/
+	0x00, 0x2a, 0x2a,	/* CYAN */
+	0x2a, 0x00, 0x00,	/* RED  */
+	0x2a, 0x00, 0x2a,	/* MAGENTA  */
+	0x2a, 0x15, 0x00,	/* BROWN*/
+	0x2a, 0x2a, 0x2a,	/* LIGHTGREY*/
+	0x15, 0x15, 0x15,	/* DARKGREY */
+	0x15, 0x15, 0x3f,	/* LIGHTBLUE*/
+	0x15, 0x3f, 0x15,	/* LIGHTGREEN   */
+	0x15, 0x3f, 0x3f,	/* LIGHTCYAN*/
+	0x3f, 0x15, 0x15,	/* LIGHTRED */
+	0x3f, 0x15, 0x3f,	/* LIGHTMAGENTA */
+	0x3f, 0x3f, 0x15,	/* YELLOW   */
+	0x3f, 0x3f, 0x3f	/* WHITE*/
 };
 
 static bus_space_tag_t	vga_iot, vga_memt;
@@ -79,7 +119,7 @@ check_for_vga(bus_space_tag_t iot, bus_s
 	pci_chipset_tag_t	pc = NULL; /* XXX */
 	bus_space_handle_t	ioh_regs, memh_fb;
 	pcitag_t		tag;
-	int			device, found, maxndevs, i, j;
+	int			device, found, maxndevs, i;
 	int			got_ioh, got_memh, rv;
 	uint32_t		id, class;
 	volatile uint8_t	*regs;
@@ -176,16 +216,23 @@ check_for_vga(bus_space_tag_t iot, bus_s
 	 * Generic 

CVS commit: [netbsd-9] src/sys/arch/atari

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:23:30 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: MILAN.in
src/sys/arch/atari/pci [netbsd-9]: pci_vga.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1521):

sys/arch/atari/pci/pci_vga.c: revision 1.19
sys/arch/atari/conf/MILAN.in: revision 1.30

Improve VGA console settings for Milan, especially for sysinst.
- use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
  (so that box drawing characters are rendered properly)
- set ATC and DAC palette settings for proper colors
  (copied from MI vga_subr.c for now because HADES doesn't use mi vga(4))

Tested on Milan with S3 Trio64.  (XXX: needs working HADES with ET4000)

Specify options FONT_VT220L8x16 to get similar glyphs as past font_8x16.c.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.2.1 src/sys/arch/atari/conf/MILAN.in
cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/atari/pci/pci_vga.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/arch/atari/vme

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:21:56 UTC 2022

Modified Files:
src/sys/arch/atari/vme [netbsd-9]: if_le_vme.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1520):

sys/arch/atari/vme/if_le_vme.c: revision 1.32
sys/arch/atari/vme/if_le_vme.c: revision 1.33

Fix a long-standing "leprobe: cannot map memory-area" error during probe.

PAM and ROTHRON VME LANCE seem to have 64KB RAM, but the register
address region are overwrapped, so we cannot map both of them via
bus_space_map(9) that checks regions using extent(9).

To work around this, just use only 32KB RAM for buffers.

XXX: not sure if anyone tried these VME LANCE variants

No need to print errors via aprint_error(9) in probe/match function.

Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.

Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.58.1 src/sys/arch/atari/vme/if_le_vme.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/vme/if_le_vme.c
diff -u src/sys/arch/atari/vme/if_le_vme.c:1.31 src/sys/arch/atari/vme/if_le_vme.c:1.31.58.1
--- src/sys/arch/atari/vme/if_le_vme.c:1.31	Fri Jul  1 20:34:06 2011
+++ src/sys/arch/atari/vme/if_le_vme.c	Sun Sep 11 18:21:56 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_vme.c,v 1.31 2011/07/01 20:34:06 dyoung Exp $	*/
+/*	$NetBSD: if_le_vme.c,v 1.31.58.1 2022/09/11 18:21:56 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998 maximum entropy.  All rights reserved.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.31 2011/07/01 20:34:06 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.31.58.1 2022/09/11 18:21:56 martin Exp $");
 
 #include "opt_inet.h"
 
@@ -111,8 +111,11 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,
 #include 
 
 /*
- * All cards except BVME410 have 64KB RAM. However On the Riebl cards the
- * area between the offsets 0xee70-0xeec0 is used to store config data.
+ * All cards except BVME410 have 64KB RAM. However,
+ *  - On the Riebl cards the area between the offsets 0xee70-0xeec0 is used
+ *to store config data.
+ *  - On PAM and ROTHRON, mem_addr cannot be mapped if reg_addr is already
+ *mapped because they are overwrapped. Just use 32KB as Linux does.
  */
 struct le_addresses {
 	u_long	reg_addr;
@@ -124,9 +127,9 @@ struct le_addresses {
 } lestd[] = {
 	{ 0xfe00fff0, 0xfe01, IRQUNK, 16, 64*1024,
 LE_OLD_RIEBL|LE_NEW_RIEBL }, /* Riebl	*/
-	{ 0xfec0, 0xfecf,  5, 16, 64*1024,
+	{ 0xfec0, 0xfecf,  5, 16, 32*1024,
 LE_PAM },		 /* PAM	*/
-	{ 0xfec0, 0xfecf,  5, 16, 64*1024,
+	{ 0xfec0, 0xfecf,  5, 16, 32*1024,
 LE_ROTHRON },		 /* Rhotron	*/
 	{ 0xfeff4100, 0xfe00,  4,  8, VMECF_MEMSIZ_DEFAULT,
 LE_BVME410 }		 /* BVME410 */
@@ -230,8 +233,7 @@ le_vme_match(device_t parent, cfdata_t c
 
 		if (bus_space_map(iot, le_ap->reg_addr, le_ap->reg_size, 0,
 		)) {
-			aprint_error("leprobe: cannot map io-area\n");
-			return 0;
+			continue;
 		}
 		if (le_ap->mem_size == VMECF_MEMSIZ_DEFAULT) {
 			if (bvme410_probe(iot, ioh)) {
@@ -249,8 +251,7 @@ le_vme_match(device_t parent, cfdata_t c
 		if (bus_space_map(memt, le_ap->mem_addr, le_ap->mem_size, 0,
 		)) {
 			bus_space_unmap(iot, ioh, le_ap->reg_size);
-			aprint_error("leprobe: cannot map memory-area\n");
-			return 0;
+			continue;
 		}
 		found = probe_addresses(, , , );
 		bus_space_unmap(iot, ioh, le_ap->reg_size);



CVS commit: [netbsd-9] src/sys/arch/atari/vme

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:21:56 UTC 2022

Modified Files:
src/sys/arch/atari/vme [netbsd-9]: if_le_vme.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1520):

sys/arch/atari/vme/if_le_vme.c: revision 1.32
sys/arch/atari/vme/if_le_vme.c: revision 1.33

Fix a long-standing "leprobe: cannot map memory-area" error during probe.

PAM and ROTHRON VME LANCE seem to have 64KB RAM, but the register
address region are overwrapped, so we cannot map both of them via
bus_space_map(9) that checks regions using extent(9).

To work around this, just use only 32KB RAM for buffers.

XXX: not sure if anyone tried these VME LANCE variants

No need to print errors via aprint_error(9) in probe/match function.

Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.

Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.31.58.1 src/sys/arch/atari/vme/if_le_vme.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/arch/atari/conf

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:17:02 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
regen (ticket #1519)


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.120.4.1 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.117 -r1.117.4.1 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.115 -r1.115.4.1 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.93 -r1.93.2.1 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.97 -r1.97.2.1 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.23 -r1.23.6.1 src/sys/arch/atari/conf/SMALL030

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.120 src/sys/arch/atari/conf/ATARITT:1.120.4.1
--- src/sys/arch/atari/conf/ATARITT:1.120	Sat Apr 13 08:26:14 2019
+++ src/sys/arch/atari/conf/ATARITT	Sun Sep 11 18:17:02 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: ATARITT,v 1.120 2019/04/13 08:26:14 isaki Exp $
+# $NetBSD: ATARITT,v 1.120.4.1 2022/09/11 18:17:02 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $
+#		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk
@@ -44,7 +44,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options TT_SCSI # SCSI-support for TT
 options TT_VIDEO # Graphics support for TT
 options MEMORY_DISK_HOOKS # Boot RAM-disk

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.117 src/sys/arch/atari/conf/FALCON:1.117.4.1
--- src/sys/arch/atari/conf/FALCON:1.117	Sat Apr 13 08:26:14 2019
+++ src/sys/arch/atari/conf/FALCON	Sun Sep 11 18:17:02 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: FALCON,v 1.117 2019/04/13 08:26:14 isaki Exp $
+# $NetBSD: FALCON,v 1.117.4.1 2022/09/11 18:17:02 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $
+#		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk
@@ -49,7 +49,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options FALCON_SCSI # SCSI-support for Falcon
 options FALCON_VIDEO # Graphics support for FALCON
 options MEMORY_DISK_HOOKS # Boot RAM-disk

Index: src/sys/arch/atari/conf/HADES
diff -u src/sys/arch/atari/conf/HADES:1.115 src/sys/arch/atari/conf/HADES:1.115.4.1
--- src/sys/arch/atari/conf/HADES:1.115	Sat Apr 13 08:26:14 2019
+++ src/sys/arch/atari/conf/HADES	Sun Sep 11 18:17:02 2022
@@ -1,12 +1,12 @@
 #
-# $NetBSD: HADES,v 1.115 2019/04/13 08:26:14 isaki Exp $
+# $NetBSD: HADES,v 1.115.4.1 2022/09/11 18:17:02 martin Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
 #		NetBSD: HADES.in,v 1.16 2018/03/31 04:19:41 tsutsui Exp $
-#		NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $
+#		NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 include "arch/atari/conf/std.hades"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk
@@ -48,7 +48,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options TT_SCSI # SCSI-support for TT
 options TT_VIDEO # Graphics support for TT
 options MEMORY_DISK_HOOKS # Boot RAM-disk

Index: src/sys/arch/atari/conf/MILAN-ISAIDE
diff -u src/sys/arch/atari/conf/MILAN-ISAIDE:1.93 src/sys/arch/atari/conf/MILAN-ISAIDE:1.93.2.1
--- src/sys/arch/atari/conf/MILAN-ISAIDE:1.93	Sat May  4 13:14:18 2019
+++ src/sys/arch/atari/conf/MILAN-ISAIDE	Sun Sep 11 18:17:02 

CVS commit: [netbsd-9] src/sys/arch/atari/conf

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:17:02 UTC 2022

Modified Files:
src/sys/arch/atari/conf [netbsd-9]: ATARITT FALCON HADES MILAN-ISAIDE
MILAN-PCIIDE SMALL030

Log Message:
regen (ticket #1519)


To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.120.4.1 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.117 -r1.117.4.1 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.115 -r1.115.4.1 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.93 -r1.93.2.1 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.97 -r1.97.2.1 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.23 -r1.23.6.1 src/sys/arch/atari/conf/SMALL030

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/arch/atari

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:14:55 UTC 2022

Modified Files:
src/sys/arch/atari/atari [netbsd-9]: atari_init.c
src/sys/arch/atari/conf [netbsd-9]: GENERIC.in files.atari

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1519):

sys/arch/atari/conf/GENERIC.in: revision 1.123
sys/arch/atari/conf/files.atari: revision 1.124
sys/arch/atari/atari/atari_init.c: revision 1.105

Allocalte enough reserved ST-RAM to make the old Xserver work by default.

Instead, check ST-RAM size and TT-RAM size on startup and restrict
size of reserved ST memory on lower RAM machines.

Closes PR port-atari/41002 from David Ross.

While here, make options ST_POOL_SIZE defparam'ed to make sure to
reflect config(5) changes on each build.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.101.8.1 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.118 -r1.118.4.1 src/sys/arch/atari/conf/GENERIC.in
cvs rdiff -u -r1.123 -r1.123.4.1 src/sys/arch/atari/conf/files.atari

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/atari/atari_init.c
diff -u src/sys/arch/atari/atari/atari_init.c:1.101 src/sys/arch/atari/atari/atari_init.c:1.101.8.1
--- src/sys/arch/atari/atari/atari_init.c:1.101	Mon Feb 26 15:11:12 2018
+++ src/sys/arch/atari/atari/atari_init.c	Sun Sep 11 18:14:55 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari_init.c,v 1.101 2018/02/26 15:11:12 tsutsui Exp $	*/
+/*	$NetBSD: atari_init.c,v 1.101.8.1 2022/09/11 18:14:55 martin Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,12 +33,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.101 2018/02/26 15:11:12 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.101.8.1 2022/09/11 18:14:55 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
 #include "opt_m060sp.h"
 #include "opt_m68k_arch.h"
+#include "opt_st_pool_size.h"
 
 #include 
 #include 
@@ -145,18 +146,29 @@ extern struct pcb	*curpcb;
 vaddr_t	page_zero;
 
 /*
- * Crude support for allocation in ST-ram. Currently only used to allocate
- * video ram.
+ * Simple support for allocation in ST-ram.
+ * Currently 16 bit ST-ram is required to allocate DMA buffers for SCSI and
+ * FDC transfers, and video memory for the XFree68 based Xservers.
  * The physical address is also returned because the video init needs it to
  * setup the controller at the time the vm-system is not yet operational so
  * 'kvtop()' cannot be used.
  */
+#define	ST_POOL_SIZE_MIN	24	/* for DMA bounce buffers */
 #ifndef ST_POOL_SIZE
-#define	ST_POOL_SIZE	40			/* XXX: enough? */
+#define	ST_POOL_SIZE		56	/* Xserver requires 320KB (40 pages) */
 #endif
 
-u_long	st_pool_size = ST_POOL_SIZE * PAGE_SIZE; /* Patchable	*/
-u_long	st_pool_virt, st_pool_phys;
+psize_t	st_pool_size = ST_POOL_SIZE * PAGE_SIZE; /* Patchable	*/
+vaddr_t	st_pool_virt;
+paddr_t	st_pool_phys;
+
+/*
+ * Thresholds to restrict size of reserved ST memory to make sure
+ * the kernel at least boot even on lower memory machines.
+ * Nowadays we could assume most users have 4MB ST-RAM and 16MB TT-RAM.
+ */
+#define	STRAM_MINTHRESH		(2 * 1024 * 1024)
+#define	TTRAM_MINTHRESH		(4 * 1024 * 1024)
 
 /* I/O address space variables */
 vaddr_t	stio_addr;		/* Where the st io-area is mapped	*/
@@ -284,12 +296,20 @@ start_c(int id, u_int ttphystart, u_int 
 #endif
 
 	/*
-	 * The following is a hack. We do not know how much ST memory we
-	 * really need until after configuration has finished. At this
-	 * time I have no idea how to grab ST memory at that time.
+	 * We do not know how much ST memory we really need until after
+	 * configuration has finished, but typical users of ST memory
+	 * are bounce buffers DMA against TT-RAM for SCSI and FDC,
+	 * and video memory for the Xserver.
+	 * If we have enough RAMs reserve ST memory including for the Xserver.
+	 * Otherwise just allocate minimum one for SCSI and FDC.
+	 *
 	 * The round_page() call is ment to correct errors made by
 	 * binpatching!
 	 */
+	if (st_pool_size > ST_POOL_SIZE_MIN * PAGE_SIZE &&
+	(stphysize <= STRAM_MINTHRESH || ttphysize <= TTRAM_MINTHRESH)) {
+		st_pool_size = ST_POOL_SIZE_MIN * PAGE_SIZE;
+	}
 	st_pool_size   = m68k_round_page(st_pool_size);
 	st_pool_phys   = stphysize - st_pool_size;
 	stphysize  = st_pool_phys;

Index: src/sys/arch/atari/conf/GENERIC.in
diff -u src/sys/arch/atari/conf/GENERIC.in:1.118 src/sys/arch/atari/conf/GENERIC.in:1.118.4.1
--- src/sys/arch/atari/conf/GENERIC.in:1.118	Sat Apr 13 08:22:59 2019
+++ src/sys/arch/atari/conf/GENERIC.in	Sun Sep 11 18:14:55 2022
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC.in,v 1.118 2019/04/13 08:22:59 isaki Exp $
+#	$NetBSD: GENERIC.in,v 1.118.4.1 2022/09/11 18:14:55 martin Exp $
 #
 # Generic atari
 #
@@ -204,7 +204,7 @@ options		PIPE_SOCKETPAIR	# smaller, but 
 # Atari specific options
 #
 #options 	

CVS commit: [netbsd-9] src/sys/arch/atari

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:14:55 UTC 2022

Modified Files:
src/sys/arch/atari/atari [netbsd-9]: atari_init.c
src/sys/arch/atari/conf [netbsd-9]: GENERIC.in files.atari

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1519):

sys/arch/atari/conf/GENERIC.in: revision 1.123
sys/arch/atari/conf/files.atari: revision 1.124
sys/arch/atari/atari/atari_init.c: revision 1.105

Allocalte enough reserved ST-RAM to make the old Xserver work by default.

Instead, check ST-RAM size and TT-RAM size on startup and restrict
size of reserved ST memory on lower RAM machines.

Closes PR port-atari/41002 from David Ross.

While here, make options ST_POOL_SIZE defparam'ed to make sure to
reflect config(5) changes on each build.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.101.8.1 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.118 -r1.118.4.1 src/sys/arch/atari/conf/GENERIC.in
cvs rdiff -u -r1.123 -r1.123.4.1 src/sys/arch/atari/conf/files.atari

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/arch/atari/dev

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:10:23 UTC 2022

Modified Files:
src/sys/arch/atari/dev [netbsd-9]: ite.c ite_cc.c ite_et.c itevar.h

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1518):

sys/arch/atari/dev/ite.c: revision 1.82
sys/arch/atari/dev/ite_cc.c: revision 1.45
sys/arch/atari/dev/ite_et.c: revision 1.36
sys/arch/atari/dev/itevar.h: revision 1.15

Add a minimum DEC special graphics character support for atari ite(4).

This closes PR port-atari/46647 (Menu borders in sysinst appear as
characters with diacritical marks instead of graphics characters).

Switching encoding support by "ESC ( " sequence for vt220 was
pulled from x68k ite(4) (that already supports ISO-2022-JP and EUC-JP).

Note atari's fonts already include DEC special graphics characters.
ET4000 on Hades is untested due to long-term lack of hardware.

Discussed on port-atari@ etc.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.2.1 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.40 -r1.40.2.1 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.31 -r1.31.2.1 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.14 -r1.14.58.1 src/sys/arch/atari/dev/itevar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-9] src/sys/arch/atari/dev

2022-09-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Sep 11 18:10:23 UTC 2022

Modified Files:
src/sys/arch/atari/dev [netbsd-9]: ite.c ite_cc.c ite_et.c itevar.h

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1518):

sys/arch/atari/dev/ite.c: revision 1.82
sys/arch/atari/dev/ite_cc.c: revision 1.45
sys/arch/atari/dev/ite_et.c: revision 1.36
sys/arch/atari/dev/itevar.h: revision 1.15

Add a minimum DEC special graphics character support for atari ite(4).

This closes PR port-atari/46647 (Menu borders in sysinst appear as
characters with diacritical marks instead of graphics characters).

Switching encoding support by "ESC ( " sequence for vt220 was
pulled from x68k ite(4) (that already supports ISO-2022-JP and EUC-JP).

Note atari's fonts already include DEC special graphics characters.
ET4000 on Hades is untested due to long-term lack of hardware.

Discussed on port-atari@ etc.


To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.79.2.1 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.40 -r1.40.2.1 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.31 -r1.31.2.1 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.14 -r1.14.58.1 src/sys/arch/atari/dev/itevar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/dev/ite.c
diff -u src/sys/arch/atari/dev/ite.c:1.79 src/sys/arch/atari/dev/ite.c:1.79.2.1
--- src/sys/arch/atari/dev/ite.c:1.79	Sat Jun 29 16:41:19 2019
+++ src/sys/arch/atari/dev/ite.c	Sun Sep 11 18:10:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.79 2019/06/29 16:41:19 tsutsui Exp $	*/
+/*	$NetBSD: ite.c,v 1.79.2.1 2022/09/11 18:10:23 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.79 2019/06/29 16:41:19 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.79.2.1 2022/09/11 18:10:23 martin Exp $");
 
 #include "opt_ddb.h"
 
@@ -736,6 +736,12 @@ ite_reset(struct ite_softc *sc)
 	sc->keypad_appmode = 0;
 	sc->imode = 0;
 	sc->key_repeat = 1;
+	sc->G0 = CSET_ASCII;
+	sc->G1 = CSET_DECGRAPH;
+	sc->G2 = 0;
+	sc->G3 = 0;
+	sc->GL = >G0;
+	sc->GR = >G1;
 	memset(sc->tabs, 0, sc->cols);
 	for (i = 0; i < sc->cols; i++)
 		sc->tabs[i] = ((i & 7) == 0);
@@ -1247,6 +1253,14 @@ ite_lf (struct ite_softc *sc)
 }
   SUBR_CURSOR(sc, MOVE_CURSOR);
   clr_attr(sc, ATTR_INV);
+
+  /* reset character set */
+  sc->G0 = CSET_ASCII;
+  sc->G1 = CSET_DECGRAPH;
+  sc->G2 = 0;
+  sc->G3 = 0;
+  sc->GL = >G0;
+  sc->GR = >G1;
 }
 
 static inline void
@@ -1446,7 +1460,7 @@ iteputchar(register int c, struct ite_so
 		  case 'B':	/* ASCII */
 		  case 'A':	/* ISO latin 1 */
 		  case '<':	/* user preferred suplemental */
-		  case '0':	/* dec special graphics */
+		  case '0':	/* DEC special graphics */
 		  
 		  /* 96-character sets: */
 		  case '-':	/* G1 */
@@ -1471,27 +1485,32 @@ iteputchar(register int c, struct ite_so
 		  
 		  /* locking shift modes (as you might guess, not yet supported..) */
 		  case '`':
-		sc->GR = sc->G1;
+		sc->GR = >G1;
 		sc->escape = 0;
 		return;
 		
 		  case 'n':
-		sc->GL = sc->G2;
+		sc->GL = >G2;
 		sc->escape = 0;
 		return;
 		
 		  case '}':
-		sc->GR = sc->G2;
+		sc->GR = >G2;
 		sc->escape = 0;
 		return;
 		
 		  case 'o':
-		sc->GL = sc->G3;
+		sc->GL = >G3;
 		sc->escape = 0;
 		return;
 		
 		  case '|':
-		sc->GR = sc->G3;
+		sc->GR = >G3;
+		sc->escape = 0;
+		return;
+
+		  case '~':
+		sc->GR = >G1;
 		sc->escape = 0;
 		return;
 		
@@ -1511,16 +1530,30 @@ iteputchar(register int c, struct ite_so
 
 
 		  case '7':
+		/* save cursor */
 		sc->save_curx = sc->curx;
 		sc->save_cury = sc->cury;
 		sc->save_attribute = sc->attribute;
+		sc->sc_G0 = sc->G0;
+		sc->sc_G1 = sc->G1;
+		sc->sc_G2 = sc->G2;
+		sc->sc_G3 = sc->G3;
+		sc->sc_GL = sc->GL;
+		sc->sc_GR = sc->GR;
 		sc->escape = 0;
 		return;
 		
 		  case '8':
+		/* restore cursor */
 		sc->curx = sc->save_curx;
 		sc->cury = sc->save_cury;
 		sc->attribute = sc->save_attribute;
+		sc->G0 = sc->sc_G0;
+		sc->G1 = sc->sc_G1;
+		sc->G2 = sc->sc_G2;
+		sc->G3 = sc->sc_G3;
+		sc->GL = sc->sc_GL;
+		sc->GR = sc->sc_GR;
 		SUBR_CURSOR(sc, MOVE_CURSOR);
 		sc->escape = 0;
 		return;
@@ -1551,8 +1584,22 @@ iteputchar(register int c, struct ite_so
 		break;
 
 
-	  case '(':
-	  case ')':
+	  case '(': /* designated G0 */
+		switch (c) {
+		case 'B': /* US-ASCII */
+		  sc->G0 = CSET_ASCII;
+		  sc->escape = 0;
+		  return;
+		case '0': /* DEC special graphics */
+		  sc->G0 = CSET_DECGRAPH;
+		  sc->escape = 0;
+		  return;
+		default:
+		  /* not supported */
+		  sc->escape = 0;
+		  return;
+		}
+	  case ')': /* 

CVS commit: [netbsd-9] src/sys/arch/atari/atari

2022-06-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  4 12:38:34 UTC 2022

Modified Files:
src/sys/arch/atari/atari [netbsd-9]: stalloc.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1462):

sys/arch/atari/atari/stalloc.c: revision 1.17

Restore NULL pointer checks lost in rev 1.16.

Fixes PR port-atari/56859, ok'ed mlelstv@, and confirmed on TT030.
Should be pulled up to netbsd-9 and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.34.1 src/sys/arch/atari/atari/stalloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/atari/atari/stalloc.c
diff -u src/sys/arch/atari/atari/stalloc.c:1.16 src/sys/arch/atari/atari/stalloc.c:1.16.34.1
--- src/sys/arch/atari/atari/stalloc.c:1.16	Fri Jan  3 07:14:20 2014
+++ src/sys/arch/atari/atari/stalloc.c	Sat Jun  4 12:38:34 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: stalloc.c,v 1.16 2014/01/03 07:14:20 mlelstv Exp $	*/
+/*	$NetBSD: stalloc.c,v 1.16.34.1 2022/06/04 12:38:34 martin Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman (Atari modifications)
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.16 2014/01/03 07:14:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.16.34.1 2022/06/04 12:38:34 martin Exp $");
 
 #include 
 #include 
@@ -163,7 +163,7 @@ free_stmem(void *mem)
 	/*
 	 * check ahead of us.
 	 */
-	if (next->type == MNODE_FREE) {
+	if (next != NULL && next->type == MNODE_FREE) {
 		/*
 		 * if next is: a valid node and a free node. ==> merge
 		 */
@@ -174,7 +174,7 @@ free_stmem(void *mem)
 		stmem_total += mn->size + sizeof(struct mem_node);
 		mn->size += next->size + sizeof(struct mem_node);
 	}
-	if (prev->type == MNODE_FREE) {
+	if (prev != NULL && prev->type == MNODE_FREE) {
 		/*
 		 * if prev is: a valid node and a free node. ==> merge
 		 */



CVS commit: [netbsd-9] src/sys/arch/atari/atari

2022-06-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  4 12:38:34 UTC 2022

Modified Files:
src/sys/arch/atari/atari [netbsd-9]: stalloc.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1462):

sys/arch/atari/atari/stalloc.c: revision 1.17

Restore NULL pointer checks lost in rev 1.16.

Fixes PR port-atari/56859, ok'ed mlelstv@, and confirmed on TT030.
Should be pulled up to netbsd-9 and netbsd-8.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.34.1 src/sys/arch/atari/atari/stalloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.