Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src Pull up following revision(s) (requested by tsutsui in ti...
details: https://anonhg.NetBSD.org/src/rev/92efbdc19b32
branches: netbsd-9
changeset: 934208:92efbdc19b32
user: martin <martin%NetBSD.org@localhost>
date: Sun Jun 07 12:35:01 2020 +0000
description:
Pull up following revision(s) (requested by tsutsui in ticket #939):
distrib/arc/ramdisk/Makefile: revision 1.29
sys/arch/arc/arc/arcbios.c: revision 1.18
distrib/arc/ramdisk/list: revision 1.24
sys/arch/arc/conf/GENERIC: revision 1.198
sys/arch/arc/conf/RAMDISK: revision 1.83
distrib/arc/ramdisk/Makefile: revision 1.28
bump ramdisk size to 3200k for gcc 8. yay!
-
Make sure to preserve MIPS_CURLWP (t8) register from ARC BIOS calls.
Fixes silent hangup right after starting a kernel on my
Express5800/230 R4400 PCI (finally I've repaired its PSU and RTC).
Reviewed by soda@. Maybe other ARC machines are also affected.
Note GXemul was not affected by this problem because it doesn't
have actual ARC BIOS ROM and emulates ARC functions internally.
Should be pulled up to at least netbsd-9.
-
Shrink ramdisk to make RAMDISK kernel smaller for ARC BIOS restriction.
Try to shrink kernels to smaller than ~6MB due to ARC BIOS restriction.
Currently NetBSD/arc kernels are loaded at 0x80200000
(on some machines ARC BIOS uses regions before it) and
ARC BIOS also uses around 0x807f0000, so bootloader fails
on loading >6MB kernels.
Note GXemul doesn't have this restriction because it loads
a kernel directly via a command line argument.
Tested by installing using sysinst on RAMDISK kernel on netbsd-9.
Should be pulled up to netbsd-9.
diffstat:
distrib/arc/ramdisk/Makefile | 4 +-
distrib/arc/ramdisk/list | 23 +++++----
sys/arch/arc/arc/arcbios.c | 65 ++++++++++++++++++++------
sys/arch/arc/conf/GENERIC | 55 +++++++++++----------
sys/arch/arc/conf/RAMDISK | 107 ++++++++++++++++++++++++++++++++----------
5 files changed, 173 insertions(+), 81 deletions(-)
diffs (truncated from 527 to 300 lines):
diff -r dba17dab2d01 -r 92efbdc19b32 distrib/arc/ramdisk/Makefile
--- a/distrib/arc/ramdisk/Makefile Sun Jun 07 12:21:35 2020 +0000
+++ b/distrib/arc/ramdisk/Makefile Sun Jun 07 12:35:01 2020 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.26 2017/05/12 07:26:35 martin Exp $
+# $NetBSD: Makefile,v 1.26.12.1 2020/06/07 12:35:01 martin Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
IMAGE= ramdisk.fs
-IMAGESIZE= 3060k
+IMAGESIZE= 2880k
MAKEFS_FLAGS+= -f 15
WARNS= 1
diff -r dba17dab2d01 -r 92efbdc19b32 distrib/arc/ramdisk/list
--- a/distrib/arc/ramdisk/list Sun Jun 07 12:21:35 2020 +0000
+++ b/distrib/arc/ramdisk/list Sun Jun 07 12:35:01 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: list,v 1.23 2011/08/03 13:59:14 tsutsui Exp $
+# $NetBSD: list,v 1.23.46.1 2020/06/07 12:35:01 martin Exp $
#SRCDIRS external/bsd/less/bin
SRCDIRS bin sbin usr.bin usr.sbin
@@ -8,16 +8,16 @@
PROG bin/cp
PROG bin/dd
PROG bin/df
-PROG bin/ed
+#PROG bin/ed
PROG bin/ln
PROG bin/ls
PROG bin/mkdir
-PROG bin/mt
+#PROG bin/mt
PROG bin/mv
PROG bin/pax usr/bin/tar
PROG bin/pwd
-PROG bin/rcmd
-PROG bin/rcp
+#PROG bin/rcmd
+#PROG bin/rcp
PROG bin/rm
PROG bin/sh
PROG bin/stty
@@ -31,22 +31,22 @@
PROG sbin/fsck_ffs
PROG sbin/ifconfig
PROG sbin/init
-PROG sbin/mbrlabel
+#PROG sbin/mbrlabel
PROG sbin/mknod
PROG sbin/mount
PROG sbin/mount_cd9660
PROG sbin/mount_ffs
PROG sbin/mount_msdos
PROG sbin/mount_nfs
-PROG sbin/mount_ntfs
+#PROG sbin/mount_ntfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/newfs_msdos
PROG sbin/ping
PROG sbin/reboot sbin/halt
-PROG sbin/restore sbin/rrestore
+#PROG sbin/restore sbin/rrestore
PROG sbin/route
PROG sbin/shutdown
-PROG sbin/slattach
+#PROG sbin/slattach
PROG sbin/swapctl sbin/swapon
PROG sbin/umount
@@ -62,10 +62,13 @@
# init invokes the shell as -sh
ARGVLN sh -sh
-SPECIAL ed srcdir distrib/utils/x_ed
+SPECIAL disklabel srcdir distrib/utils/x_disklabel
+#SPECIAL ed srcdir distrib/utils/x_ed
+SPECIAL fsck_ffs srcdir distrib/utils/x_fsck_ffs
SPECIAL gzip srcdir distrib/utils/x_gzip
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL more srcdir distrib/utils/more
+SPECIAL newfs srcdir distrib/utils/x_newfs
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL route srcdir distrib/utils/x_route
SPECIAL umount srcdir distrib/utils/x_umount
diff -r dba17dab2d01 -r 92efbdc19b32 sys/arch/arc/arc/arcbios.c
--- a/sys/arch/arc/arc/arcbios.c Sun Jun 07 12:21:35 2020 +0000
+++ b/sys/arch/arc/arc/arcbios.c Sun Jun 07 12:35:01 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arcbios.c,v 1.17 2009/11/27 03:23:04 rmind Exp $ */
+/* $NetBSD: arcbios.c,v 1.17.68.1 2020/06/07 12:35:01 martin Exp $ */
/* $OpenBSD: arcbios.c,v 1.3 1998/06/06 06:33:33 mickey Exp $ */
/*-
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.17 2009/11/27 03:23:04 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.17.68.1 2020/06/07 12:35:01 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -39,7 +39,9 @@
#include <sys/kcore.h>
#include <uvm/uvm_extern.h>
#include <dev/cons.h>
+#include <machine/asm.h>
#include <machine/cpu.h>
+#include <machine/regdef.h>
#include <arc/arc/arcbios.h>
int Bios_Read(int, char *, int, int *);
@@ -68,23 +70,56 @@
/*
* ARC Bios trampoline code.
+ * Note we have to save/restore reserved MIPS_CURLWP register.
*/
-#define ARC_Call(Name,Offset) \
-__asm("\n" \
-" .text\n" \
-" .ent " #Name "\n" \
-" .align 3\n" \
-" .set noreorder\n" \
-" .globl " #Name "\n" \
-#Name":\n" \
-" lw $2, 0x80001020\n"\
-" lw $2," #Offset "($2)\n"\
-" jr $2\n" \
-" nop\n" \
+#define ARC_Call(Name,Offset) \
+__asm("\n" \
+" .text\n" \
+" .ent " #Name "\n" \
+" .align 3\n" \
+" .set noreorder\n" \
+" .globl " #Name "\n" \
+#Name":\n" \
+" subu $29, " ___STRING(CALLFRAME_SIZ) "\n" \
+" sw $31, " ___STRING(CALLFRAME_RA) "($29)\n" \
+" sw $16, " ___STRING(CALLFRAME_SP) "($29)\n" \
+" lw $2, 0x80001020\n" \
+" lw $2," #Offset "($2)\n" \
+" jalr $2\n" \
+" move $16, " ___STRING(MIPS_CURLWP) "\n" \
+" move " ___STRING(MIPS_CURLWP) ", $16\n" \
+" lw $31, " ___STRING(CALLFRAME_RA) "($29)\n" \
+" lw $16, " ___STRING(CALLFRAME_SP) "($29)\n" \
+" j $31\n" \
+" addu $29, " ___STRING(CALLFRAME_SIZ) "\n" \
+" .end " #Name "\n" );
+
+#define ARC_Call5(Name,Offset) \
+__asm("\n" \
+" .text\n" \
+" .ent " #Name "\n" \
+" .align 3\n" \
+" .set noreorder\n" \
+" .globl " #Name "\n" \
+#Name":\n" \
+" subu $29, " ___STRING(CALLFRAME_SIZ + 4) "\n" \
+" sw $31, " ___STRING(CALLFRAME_RA + 4) "($29)\n" \
+" sw $16, " ___STRING(CALLFRAME_SP + 4) "($29)\n" \
+" lw $12, " ___STRING(CALLFRAME_SIZ + 4 + 16) "($29)\n" \
+" sw $12, 16($29)\n" \
+" lw $2, 0x80001020\n" \
+" lw $2," #Offset "($2)\n" \
+" jalr $2\n" \
+" move $16, " ___STRING(MIPS_CURLWP) "\n" \
+" move " ___STRING(MIPS_CURLWP) ", $16\n" \
+" lw $31, " ___STRING(CALLFRAME_RA + 4) "($29)\n" \
+" lw $16, " ___STRING(CALLFRAME_SP + 4) "($29)\n" \
+" j $31\n" \
+" addu $29, " ___STRING(CALLFRAME_SIZ + 4) "\n" \
" .end " #Name "\n" );
ARC_Call(Bios_Load, 0x00);
-ARC_Call(Bios_Invoke, 0x04);
+ARC_Call5(Bios_Invoke, 0x04);
ARC_Call(Bios_Execute, 0x08);
ARC_Call(Bios_Halt, 0x0c);
ARC_Call(Bios_PowerDown, 0x10);
diff -r dba17dab2d01 -r 92efbdc19b32 sys/arch/arc/conf/GENERIC
--- a/sys/arch/arc/conf/GENERIC Sun Jun 07 12:21:35 2020 +0000
+++ b/sys/arch/arc/conf/GENERIC Sun Jun 07 12:35:01 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.193 2019/04/26 21:40:29 sevan Exp $
+# $NetBSD: GENERIC,v 1.193.2.1 2020/06/07 12:35:01 martin Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.193 $"
+#ident "GENERIC-$Revision: 1.193.2.1 $"
maxusers 32 # estimated number of users
@@ -41,6 +41,7 @@
# CPU related options
makeoptions CPUFLAGS="-march=mips3 -mabi=32"
+makeoptions COPTS="-O2 -fno-unwind-tables"
# Standard system options
@@ -78,34 +79,34 @@
options COMPAT_386BSD_MBRPART # recognize old partition ID
# mipsel specific
-options COMPAT_ULTRIX # Ultrix binary compatibility
+#options COMPAT_ULTRIX # Ultrix binary compatibility
options EXEC_ECOFF # Ultrix RISC binaries are ECOFF format
# File systems
file-system FFS # fast filesystem
file-system EXT2FS # second extended file system (linux)
-file-system LFS # log-structured file system
+#file-system LFS # log-structured file system
file-system MFS # memory file system
-file-system NTFS # Windows/NT file system (experimental)
+#file-system NTFS # Windows/NT file system (experimental)
file-system CD9660 # ISO 9660 + Rock Ridge file system
file-system MSDOSFS # MS-DOS file system
file-system NFS # Network File System client
file-system FDESC # /dev/fd
file-system KERNFS # /kern
file-system NULLFS # loopback file system
-file-system OVERLAY # overlay file system
-file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs)
+#file-system OVERLAY # overlay file system
+#file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs)
file-system PROCFS # /proc
-file-system UMAPFS # NULLFS + uid and gid remapping
-file-system UNION # union file system
+#file-system UMAPFS # NULLFS + uid and gid remapping
+#file-system UNION # union file system
#file-system CODA # Coda File System; also needs vcoda (below)
file-system PTYFS # /dev/pts/N support
file-system TMPFS # Efficient memory file-system
#file-system UDF # experimental - OSTA UDF CD/DVD file-system
# File system options
-options QUOTA # legacy UFS quotas
-options QUOTA2 # new, in-filesystem UFS quotas
+#options QUOTA # legacy UFS quotas
+#options QUOTA2 # new, in-filesystem UFS quotas
#options FFS_EI # FFS Endian Independent support
options WAPBL # File system journaling support
#options UFS_DIRHASH # UFS Large Directory Hashing - Experimental
@@ -123,7 +124,7 @@
#options IPSEC_DEBUG # debug for IP security
#options MROUTING # IP multicast routing
#options PIM # Protocol Independent Multicast
-options NETATALK # AppleTalk networking protocols
+#options NETATALK # AppleTalk networking protocols
options PPP_BSDCOMP # BSD-Compress compression support for PPP
options PPP_DEFLATE # Deflate compression support for PPP
options PPP_FILTER # Active filter support for PPP (requires bpf)
@@ -159,7 +160,7 @@
options WSDISPLAY_COMPAT_USL # wsconscfg VT handling
# Kernel root file system and dump configuration.
-options NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
+options NFS_BOOT_DHCP
config netbsd root on ? type ?
#config netbsd root on sd0a type ffs
#config netbsd root on ? type nfs
@@ -236,8 +237,8 @@
com1 at isa? port 0x2f8 irq 3
com2 at isa? port 0x3e8 irq 4
com3 at isa? port 0x2e8 irq 3
-ast0 at isa? port 0x1a0 irq 3 # AST 4-port serial cards
-com* at ast? slave ?
+#ast0 at isa? port 0x1a0 irq 3 # AST 4-port serial cards
+#com* at ast? slave ?
# Joystick driver. Probe is a little strange; add only if you have one.
#joy0 at isa? port 0x201
@@ -279,8 +280,8 @@
ppb* at pci? dev ? function ? # PCI-PCI bridges
# PCI cryptographic devices
-hifn* at pci? dev ? function ? # Hifn 7755/7811/795x
-ubsec* at pci? dev ? function ? # Broadcom 5501/5601/580x/582x
+#hifn* at pci? dev ? function ? # Hifn 7755/7811/795x
+#ubsec* at pci? dev ? function ? # Broadcom 5501/5601/580x/582x
#vga* at pci? dev ? function ?
tga* at pci? dev ? function ? # DEC ZLXp-E[123] Graphics
@@ -311,7 +312,7 @@
pdcsata* at pci? dev ? function ? # Promise SATA150 controllers
satalink* at pci? dev ? function ? # SiI SATALink controllers
#siside* at pci? dev ? function ? # SiS IDE controllers
Home |
Main Index |
Thread Index |
Old Index