CVS commit: src/sys/arch/acorn32/stand
Module Name:src Committed By: joerg Date: Sat Feb 6 21:45:38 UTC 2021 Modified Files: src/sys/arch/acorn32/stand/boot32: Makefile start.S src/sys/arch/acorn32/stand/nbfs: Makefile rmheader.S Log Message: Modernize acorn32 boot code to work directly with LLVM's assembler. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/acorn32/stand/boot32/Makefile cvs rdiff -u -r1.3 -r1.4 src/sys/arch/acorn32/stand/boot32/start.S cvs rdiff -u -r1.4 -r1.5 src/sys/arch/acorn32/stand/nbfs/Makefile \ src/sys/arch/acorn32/stand/nbfs/rmheader.S 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/acorn32/stand/boot32/Makefile diff -u src/sys/arch/acorn32/stand/boot32/Makefile:1.6 src/sys/arch/acorn32/stand/boot32/Makefile:1.7 --- src/sys/arch/acorn32/stand/boot32/Makefile:1.6 Fri Aug 2 12:06:20 2019 +++ src/sys/arch/acorn32/stand/boot32/Makefile Sat Feb 6 21:45:38 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2019/08/02 12:06:20 joerg Exp $ +# $NetBSD: Makefile,v 1.7 2021/02/06 21:45:38 joerg Exp $ PROG= boot32 PROGSOURCE= rmheader.S rmvers.c srt0.S boot32.c start.S @@ -17,6 +17,4 @@ rmvers.c: ${.CURDIR}/version CLEANFILES+= rmvers.c -AFLAGS.start.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} - .include "../Makefile.buildboot" Index: src/sys/arch/acorn32/stand/boot32/start.S diff -u src/sys/arch/acorn32/stand/boot32/start.S:1.3 src/sys/arch/acorn32/stand/boot32/start.S:1.4 --- src/sys/arch/acorn32/stand/boot32/start.S:1.3 Sun Feb 3 14:59:16 2008 +++ src/sys/arch/acorn32/stand/boot32/start.S Sat Feb 6 21:45:38 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: start.S,v 1.3 2008/02/03 14:59:16 chris Exp $ */ +/* $NetBSD: start.S,v 1.4 2021/02/06 21:45:38 joerg Exp $ */ /* * Copyright (c) 2002 Reinoud Zandijk @@ -50,7 +50,7 @@ ENTRY(relocate_code) * determine processor architecture version. This is nessisary for the * correct coprocessor instruction. */ - mrc 15, 0, r0, c0, c0, 0 /* read CPU id in r0 */ + mrc p15, 0, r0, c0, c0, 0 /* read CPU id in r0 */ mov r3, r0 /* store in r3*/ /* assume its ARMv4 instruction set */ @@ -77,23 +77,23 @@ ENTRY(relocate_code) /* flush ID cache */ mov r0, #0 cmp r14, #0 - mcreq 15, 0, r0, c7, c0, 0 /* flush v3 ID cache */ - mcrne 15, 0, r0, c7, c7, 0 /* flush v4 ID cache */ - mcrne 15, 0, r0, c7, c10, 4 /* drain WB (v4) */ + mcreq p15, 0, r0, c7, c0, 0 /* flush v3 ID cache */ + mcrne p15, 0, r0, c7, c7, 0 /* flush v4 ID cache */ + mcrne p15, 0, r0, c7, c10, 4 /* drain WB (v4) */ /* flush TLB*/ - mcr 15, 0, r0, c5, c0, 0 /* flush TLB for v3 and v4 */ + mcr p15, 0, r0, c5, c0, 0 /* flush TLB for v3 and v4 */ /* switch off MMU, IDcache and WB and branch to physical code space */ cmp r14, #0 - mrcne 15, 0, r0, c1, c0, 0 /* read processor control register if v4*/ + mrcne p15, 0, r0, c1, c0, 0 /* read processor control register if v4*/ bic r0, r0, #0x3f /* clear only known bits */ moveq r0, #0 /* for v3 just set to zero */ orr r0, r0, #CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_32BP_ENABLE mov r13, r0 /* save this control value in r13 */ cmp r14, #0 - mcr 15, 0, r0, c1, c0, 0 /* write control register! */ -/*1*/ mcrne 15, 0, r1, c7, c5, 0 /* write zero in ARMv4 MMU disable */ + mcr p15, 0, r0, c1, c0, 0 /* write control register! */ +/*1*/ mcrne p15, 0, r1, c7, c5, 0 /* write zero in ARMv4 MMU disable */ /*2*/ mov pc, r9 /* branch to physical address */ relocate_code_physical_restart: @@ -132,25 +132,25 @@ loop_one_page: /* flush ID cache */ mov r0, #0 cmp r14, #0 - mcreq 15, 0, r0, c7, c0, 0 /* flush v3 ID cache */ - mcrne 15, 0, r0, c7, c7, 0 /* flush v4 ID cache */ + mcreq p15, 0, r0, c7, c0, 0 /* flush v3 ID cache */ + mcrne p15, 0, r0, c7, c7, 0 /* flush v4 ID cache */ /* drain write buffer (v4) */ mov r0, #0 cmp r14, #0 - mcrne 15, 0, r0, c7, c10, 4 /* drain WB (v4) */ + mcrne p15, 0, r0, c7, c10, 4 /* drain WB (v4) */ /* flush TLB*/ - mcr 15, 0, r0, c5, c0, 0 /* flush TLB for v3 and v4 */ + mcr p15, 0, r0, c5, c0, 0 /* flush TLB for v3 and v4 */ /* set new TLB address */ mov r0, r11 - mcr 15, 0, r0, c2, c0, 0 /* write TLB address */ + mcr p15, 0, r0, c2, c0, 0 /* write TLB address */ /* Switch on MMU, IDCache and WB and keep on running on flat translated memory*/ orr r0, r13, #CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_32BP_ENABLE orr r0, r0, #CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_DC_ENABLE | CPU_CONTROL_MMU_ENABLE - mcr 15, 0, r0, c1, c0, 0 /* write register !!! */ + mcr p15, 0, r0, c1, c0, 0 /* write register !!! */ mov r0, r0 /* f
CVS commit: src/sys/arch/acorn32/stand
Module Name:src Committed By: rin Date: Sun Apr 26 07:01:52 UTC 2020 Modified Files: src/sys/arch/acorn32/stand: Makefile.buildboot Log Message: Adjust for binutils 2.34 in the same manner as efiboot: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/stand/efiboot/Makefile.efiboot#rev1.12 XXX Compile test only. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/acorn32/stand/Makefile.buildboot 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/acorn32/stand/Makefile.buildboot diff -u src/sys/arch/acorn32/stand/Makefile.buildboot:1.25 src/sys/arch/acorn32/stand/Makefile.buildboot:1.26 --- src/sys/arch/acorn32/stand/Makefile.buildboot:1.25 Thu Oct 24 18:46:20 2019 +++ src/sys/arch/acorn32/stand/Makefile.buildboot Sun Apr 26 07:01:52 2020 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.buildboot,v 1.25 2019/10/24 18:46:20 christos Exp $ +# $NetBSD: Makefile.buildboot,v 1.26 2020/04/26 07:01:52 rin Exp $ S?= ${.CURDIR}/../../../.. @@ -20,6 +20,7 @@ LIBCRTBEGIN= LIBCRTEND= MKMODULE?=no +LINKFLAGS+=--no-dynamic-linker --noinhibit-exec .if ${MKMODULE} == "yes" RISCOSTYPE ?= ffa LINKFLAGS+=-shared -Bsymbolic --no-undefined -T ${.CURDIR}/../module.ldscript
CVS commit: src/sys/arch/acorn32/stand
Module Name:src Committed By: christos Date: Sun Apr 9 16:29:46 UTC 2017 Modified Files: src/sys/arch/acorn32/stand: Makefile.buildboot Log Message: Put back KLINK_MACHINE To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/acorn32/stand/Makefile.buildboot 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/acorn32/stand/Makefile.buildboot diff -u src/sys/arch/acorn32/stand/Makefile.buildboot:1.23 src/sys/arch/acorn32/stand/Makefile.buildboot:1.24 --- src/sys/arch/acorn32/stand/Makefile.buildboot:1.23 Sat Apr 8 15:53:19 2017 +++ src/sys/arch/acorn32/stand/Makefile.buildboot Sun Apr 9 12:29:46 2017 @@ -1,9 +1,11 @@ -# $NetBSD: Makefile.buildboot,v 1.23 2017/04/08 19:53:19 christos Exp $ +# $NetBSD: Makefile.buildboot,v 1.24 2017/04/09 16:29:46 christos Exp $ S?= ${.CURDIR}/../../../.. .PATH: ${.CURDIR}/../lib +KLINK_MACHINE= acorn32 + SRCS= ${PROGSOURCE} NOMAN=# defined BINDIR=/usr/mdec
CVS commit: src/sys/arch/acorn32/stand
Module Name:src Committed By: christos Date: Sat Dec 29 00:35:21 UTC 2018 Modified Files: src/sys/arch/acorn32/stand: module.ldscript Log Message: Adjust for binutils-2.31.1 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/acorn32/stand/module.ldscript 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/acorn32/stand/module.ldscript diff -u src/sys/arch/acorn32/stand/module.ldscript:1.1 src/sys/arch/acorn32/stand/module.ldscript:1.2 --- src/sys/arch/acorn32/stand/module.ldscript:1.1 Tue Mar 28 15:45:46 2006 +++ src/sys/arch/acorn32/stand/module.ldscript Fri Dec 28 19:35:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: module.ldscript,v 1.1 2006/03/28 20:45:46 bjh21 Exp $ */ +/* $NetBSD: module.ldscript,v 1.2 2018/12/29 00:35:21 christos Exp $ */ /* linker script for generating RISC OS relocatable modules */ /* @@ -10,9 +10,15 @@ OUTPUT_ARCH(arm) +PHDRS +{ + text PT_LOAD; + headers PT_PHDR FILEHDR PHDRS; +} + SECTIONS { - .text : { *(.text) *(.gnu.warning) } + .text : { *(.text) *(.gnu.warning) } :text _etext = .; PROVIDE (etext = .); .rodata : { *(.rodata) } @@ -24,4 +30,4 @@ SECTIONS .bss : { *(.bss) *(COMMON) } _end = .; PROVIDE (end = .); -} \ No newline at end of file +}
CVS commit: src/sys/arch/acorn32/stand
Module Name:src Committed By: christos Date: Mon Nov 4 21:01:44 UTC 2013 Modified Files: src/sys/arch/acorn32/stand: Makefile.buildboot Log Message: no-thumb-interlock is the default, and no-thumb does not exist in gcc 4.8 To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/acorn32/stand/Makefile.buildboot 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/acorn32/stand/Makefile.buildboot diff -u src/sys/arch/acorn32/stand/Makefile.buildboot:1.17 src/sys/arch/acorn32/stand/Makefile.buildboot:1.18 --- src/sys/arch/acorn32/stand/Makefile.buildboot:1.17 Thu Aug 15 17:41:08 2013 +++ src/sys/arch/acorn32/stand/Makefile.buildboot Mon Nov 4 16:01:44 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.buildboot,v 1.17 2013/08/15 21:41:08 matt Exp $ +# $NetBSD: Makefile.buildboot,v 1.18 2013/11/04 21:01:44 christos Exp $ S?= ${.CURDIR}/../../../.. @@ -44,7 +44,9 @@ CPPFLAGS+= -D_STANDALONE CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. CPPFLAGS+= -I${.CURDIR}/../lib CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -march=armv3m +.if ${HAVE_GCC} < 48 CPPFLAGS+= -mno-thumb -mno-thumb-interwork +.endif CPUFLAGS= CFLAGS= -O2 CFLAGS+= -ffreestanding -fno-unwind-tables
CVS commit: src/sys/arch/acorn32/stand
Module Name:src Committed By: gavan Date: Sun Aug 2 11:20:38 UTC 2009 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c src/sys/arch/acorn32/stand/lib: riscoscalls.h Log Message: Don't reset devices if booting an Iyonix. It's fine for acorn32 devices because we know how to configure all of the hardware, but as we don't know how to configure the Iyonix graphics card we must rely on RISC OS to do it for us. While we're here, space separate the kernel arguments. It's a bit hard parsing them in the kernel when they're all run together. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/acorn32/stand/boot32/boot32.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/acorn32/stand/lib/riscoscalls.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/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.36 src/sys/arch/acorn32/stand/boot32/boot32.c:1.37 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.36 Wed Mar 18 16:00:08 2009 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Sun Aug 2 11:20:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.36 2009/03/18 16:00:08 cegger Exp $ */ +/* $NetBSD: boot32.c,v 1.37 2009/08/02 11:20:37 gavan Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -712,9 +712,13 @@ strcpy(bconfig->args, ""); for (i = start_args; i < argc; i++) { if (strncmp(argv[i], "root=",5) ==0) root_specified = 1; + if (i > start_args) + strcat(bconfig->args, " "); strcat(bconfig->args, argv[i]); } if (!root_specified) { + if (start_args < argc) + strcat(bconfig->args, " "); strcat(bconfig->args, "root="); strcat(bconfig->args, DEFAULT_ROOT); } @@ -766,6 +770,7 @@ main(int argc, char **argv) { int howto, start_args, ret; + int class; printf("\n\n"); printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev); @@ -855,8 +860,11 @@ /* dismount all filesystems */ xosfscontrol_shutdown(); - /* reset devices, well they try to anyway */ - service_pre_reset(); + os_readsysinfo_platform_class(&class, NULL, NULL); + if (class != osreadsysinfo_Platform_Pace) { + /* reset devices, well they try to anyway */ + service_pre_reset(); + } start_kernel( /* r0 relocation code page (V) */ relocate_code_page->logical, Index: src/sys/arch/acorn32/stand/lib/riscoscalls.h diff -u src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.10 src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.11 --- src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.10 Sun Mar 4 05:59:07 2007 +++ src/sys/arch/acorn32/stand/lib/riscoscalls.h Sun Aug 2 11:20:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: riscoscalls.h,v 1.10 2007/03/04 05:59:07 christos Exp $ */ +/* $NetBSD: riscoscalls.h,v 1.11 2009/08/02 11:20:37 gavan Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -194,11 +194,21 @@ #define OSReadSysInfo_ReadMonitorInfo 0x01 #define OSReadSysInfo_ReadChipPresenceAndId 0x02 #define OSReadSysInfo_ReadSuperIOFeatures 0x03 +#define OSReadSysInfo_ReadPlatformClass 0x08 #define osreadsysinfo_IOEB_ASIC_PRESENT 0x01 #define osreadsysinfo_SUPERIO_PRESENT 0x02 #define osreadsysinfo_LCD_ASIC_PRESENT 0x04 +#define osreadsysinfo_Platform_Unknown 0x00 +#define osreadsysinfo_Platform_RiscPC 0x01 +#define osreadsysinfo_Platform_A7000 0x02 +#define osreadsysinfo_Platform_A7000Plus 0x03 +#define osreadsysinfo_Platform_Phoebe 0x04 +#define osreadsysinfo_Platform_Pace 0x05 +#define osreadsysinfo_Platform_VirtualRPC 0x06 +#define osreadsysinfo_Platform_A9 0x07 + #ifndef __ASSEMBLER__ extern void os_readsysinfo(int what, int *r0, int *r1, int *r2, int *r3, int *r4); #define os_readsysinfo_configured_screensize(s) \ @@ -216,6 +226,9 @@ #define os_readsysinfo_superio_features(basic, extra) \ os_readsysinfo(OSReadSysInfo_ReadSuperIOFeatures, (basic), (extra), 0, 0, 0) +#define os_readsysinfo_platform_class(class, flags, feature) \ + os_readsysinfo(OSReadSysInfo_ReadPlatformClass, (class), (flags), (feature), 0, 0) + #endif /* OS_Memory */
CVS commit: src/sys/arch/acorn32/stand
Module Name:src Committed By: matt Date: Wed May 1 22:30:39 UTC 2013 Modified Files: src/sys/arch/acorn32/stand: Makefile Makefile.buildboot Log Message: Fix abi/arch/float-abi so can be built from any arm port. Force MACHINE to acorn32 Only build little-endian non-earm. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/acorn32/stand/Makefile cvs rdiff -u -r1.14 -r1.15 src/sys/arch/acorn32/stand/Makefile.buildboot 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/acorn32/stand/Makefile diff -u src/sys/arch/acorn32/stand/Makefile:1.2 src/sys/arch/acorn32/stand/Makefile:1.3 --- src/sys/arch/acorn32/stand/Makefile:1.2 Tue Jul 4 23:08:51 2006 +++ src/sys/arch/acorn32/stand/Makefile Wed May 1 22:30:39 2013 @@ -1,5 +1,11 @@ -# $NetBSD: Makefile,v 1.2 2006/07/04 23:08:51 bjh21 Exp $ +# $NetBSD: Makefile,v 1.3 2013/05/01 22:30:39 matt Exp $ + +.include + +.if empty(MACHINE_ARCH:Mearm*) && ${TARGET_ENDIANNESS} == "1234" SUBDIR= boot32 nbfs +.endif + .include Index: src/sys/arch/acorn32/stand/Makefile.buildboot diff -u src/sys/arch/acorn32/stand/Makefile.buildboot:1.14 src/sys/arch/acorn32/stand/Makefile.buildboot:1.15 --- src/sys/arch/acorn32/stand/Makefile.buildboot:1.14 Sat Jan 22 19:19:14 2011 +++ src/sys/arch/acorn32/stand/Makefile.buildboot Wed May 1 22:30:39 2013 @@ -1,9 +1,11 @@ -# $NetBSD: Makefile.buildboot,v 1.14 2011/01/22 19:19:14 joerg Exp $ +# $NetBSD: Makefile.buildboot,v 1.15 2013/05/01 22:30:39 matt Exp $ S?= ${.CURDIR}/../../../.. .PATH: ${.CURDIR}/../lib +MACHINE= acorn32 + SRCS= ${PROGSOURCE} NOMAN=# defined BINDIR=/usr/mdec @@ -40,6 +42,8 @@ vers.c: ${.CURDIR}/version CPPFLAGS+= -D_STANDALONE CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. CPPFLAGS+= -I${.CURDIR}/../lib +CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -march=armv3m +CPUFLAGS= CFLAGS= -O2 CFLAGS+= -ffreestanding CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes
CVS commit: src/sys/arch/acorn32/stand/boot32
Module Name:src Committed By: dholland Date: Sat Jun 11 06:25:21 UTC 2016 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c Log Message: PR 51200 gets in libsa considered harmful: use kgets To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/acorn32/stand/boot32/boot32.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/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.41 src/sys/arch/acorn32/stand/boot32/boot32.c:1.42 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.41 Fri Mar 21 16:43:00 2014 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Sat Jun 11 06:25:21 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.41 2014/03/21 16:43:00 christos Exp $ */ +/* $NetBSD: boot32.c,v 1.42 2016/06/11 06:25:21 dholland Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -1038,7 +1038,7 @@ process_args(int argc, char **argv, int if (*file == NULL) { if (*howto & RB_ASKNAME) { printf("boot: "); - gets(filename); + kgets(filename, sizeof(filename)); strcpy(file, filename); } else strcpy(file, "netbsd");
CVS commit: src/sys/arch/acorn32/stand/lib
Module Name:src Committed By: christos Date: Mon Jun 11 21:36:20 UTC 2018 Modified Files: src/sys/arch/acorn32/stand/lib: Makefile.inc Log Message: Switch from using MAKEOBJDIRPREFIX to MAKEOBJDIR To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/acorn32/stand/lib/Makefile.inc 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/acorn32/stand/lib/Makefile.inc diff -u src/sys/arch/acorn32/stand/lib/Makefile.inc:1.4 src/sys/arch/acorn32/stand/lib/Makefile.inc:1.5 --- src/sys/arch/acorn32/stand/lib/Makefile.inc:1.4 Sat May 26 21:14:50 2018 +++ src/sys/arch/acorn32/stand/lib/Makefile.inc Mon Jun 11 17:36:20 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.4 2018/05/27 01:14:50 christos Exp $ +# $NetBSD: Makefile.inc,v 1.5 2018/06/11 21:36:20 christos Exp $ # # Configuration variables (default values are below): # @@ -22,7 +22,7 @@ RISCOSLIB= ${RISCOSDST}/libriscos.a RISCOSMAKE= \ cd ${RISCOSDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \ MAKEOBJDIR=${RISCOSDST} ${MAKE} \ - CC=${CC:q} CFLAGS=${CFLAGS:q} \ + CC=${CC:q} CFLAGS=${CFLAGS:S/MAKEOBJDIRPREFIX/MAKEOBJDIR/:q} \ AS=${AS:q} AFLAGS=${AFLAGS:q} \ LD=${LD:q} STRIP=${STRIP:q} \ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:q} \
CVS commit: src/sys/arch/acorn32/stand/lib
Module Name:src Committed By: christos Date: Wed Jun 13 16:03:44 UTC 2018 Modified Files: src/sys/arch/acorn32/stand/lib: Makefile.inc Log Message: revert previous MAKEOBJDIRPREFIX massaging To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/acorn32/stand/lib/Makefile.inc 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/acorn32/stand/lib/Makefile.inc diff -u src/sys/arch/acorn32/stand/lib/Makefile.inc:1.5 src/sys/arch/acorn32/stand/lib/Makefile.inc:1.6 --- src/sys/arch/acorn32/stand/lib/Makefile.inc:1.5 Mon Jun 11 17:36:20 2018 +++ src/sys/arch/acorn32/stand/lib/Makefile.inc Wed Jun 13 12:03:44 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.5 2018/06/11 21:36:20 christos Exp $ +# $NetBSD: Makefile.inc,v 1.6 2018/06/13 16:03:44 christos Exp $ # # Configuration variables (default values are below): # @@ -22,7 +22,7 @@ RISCOSLIB= ${RISCOSDST}/libriscos.a RISCOSMAKE= \ cd ${RISCOSDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \ MAKEOBJDIR=${RISCOSDST} ${MAKE} \ - CC=${CC:q} CFLAGS=${CFLAGS:S/MAKEOBJDIRPREFIX/MAKEOBJDIR/:q} \ + CC=${CC:q} CFLAGS=${CFLAGS:q} \ AS=${AS:q} AFLAGS=${AFLAGS:q} \ LD=${LD:q} STRIP=${STRIP:q} \ MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:q} \
CVS commit: src/sys/arch/acorn32/stand/lib
Module Name:src Committed By: sborrill Date: Wed Jan 23 14:49:00 UTC 2019 Modified Files: src/sys/arch/acorn32/stand/lib: riscoscalls.S riscoscalls.h Log Message: Add xosmodule_enumeratewithversion() to allow operating systems modules to be enumerated along with their version numbers. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/acorn32/stand/lib/riscoscalls.S cvs rdiff -u -r1.12 -r1.13 src/sys/arch/acorn32/stand/lib/riscoscalls.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/acorn32/stand/lib/riscoscalls.S diff -u src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.11 src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.12 --- src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.11 Thu Oct 18 19:02:46 2018 +++ src/sys/arch/acorn32/stand/lib/riscoscalls.S Wed Jan 23 14:49:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: riscoscalls.S,v 1.11 2018/10/18 19:02:46 skrll Exp $ */ +/* $NetBSD: riscoscalls.S,v 1.12 2019/01/23 14:49:00 sborrill Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -254,6 +254,36 @@ ENTRY(xosmodule_lookup) mov r0, #0 ldmdb fp, {r4-r8, fp, sp, pc} +ENTRY(xosmodule_enumeratewithversion) + mov ip, sp + stmfd sp!, {r4-r10, fp, ip, lr, pc} + sub fp, ip, #4 + mov r7, r0 + mov r8, r1 + mov r9, r2 + mov r10, r3 + ldr r1, [r7] + ldr r2, [r8] + mov r0, #OSModule_EnumerateWithVersion + swi XOS_Module + ldmdbvs fp, {r4-r10, fp, sp, pc} + str r1, [r7] + str r2, [r8] + teq r9, #0 + strne r3, [r9] + teq r9, #0 + strne r3, [r9] + teq r10, #0 + strne r4, [r10] + ldr r10, [fp, #4] + teq r10, #0 + strne r5, [r10] + ldr r10, [fp, #8] + teq r10, #0 + strne r6, [r10] + mov r0, #0 + ldmdb fp, {r4-r10, fp, sp, pc} + ENTRY(xosfscontrol_shutdown) mov ip, sp stmfd sp!, {fp, ip, lr, pc} Index: src/sys/arch/acorn32/stand/lib/riscoscalls.h diff -u src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.12 src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.13 --- src/sys/arch/acorn32/stand/lib/riscoscalls.h:1.12 Thu May 10 10:27:10 2012 +++ src/sys/arch/acorn32/stand/lib/riscoscalls.h Wed Jan 23 14:49:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: riscoscalls.h,v 1.12 2012/05/10 10:27:10 skrll Exp $ */ +/* $NetBSD: riscoscalls.h,v 1.13 2019/01/23 14:49:00 sborrill Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -285,12 +285,15 @@ extern void os_enter_os(void); #define OSModule_Alloc 6 #define OSModule_Free 7 #define OSModule_Lookup 18 +#define OSModule_EnumerateWithVersion 20 #ifndef __ASSEMBLER__ extern os_error *xosmodule_alloc(int, void **); extern os_error *xosmodule_free(void *); extern os_error *xosmodule_lookup(char const *, int *, int *, void **, void **, char **); +extern os_error *xosmodule_enumeratewithversion(int *, int *, char **, int *, +int *, int *); #endif #define OSFSControl_AddFS 12
CVS commit: src/sys/arch/acorn32/stand/boot32
Module Name:src Committed By: sborrill Date: Wed Jan 23 14:52:49 UTC 2019 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c Log Message: Don't call OS_ReadSysInfo Platform class call on RISC OS 3 To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/acorn32/stand/boot32/boot32.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/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.45 src/sys/arch/acorn32/stand/boot32/boot32.c:1.46 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.45 Tue Oct 30 20:23:29 2018 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Wed Jan 23 14:52:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.45 2018/10/30 20:23:29 christos Exp $ */ +/* $NetBSD: boot32.c,v 1.46 2019/01/23 14:52:49 sborrill Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -760,17 +760,57 @@ create_configuration(int argc, char **ar } } +int get_riscos_ver(void); + +#define ModuleName_UtilityModule "UtilityModule" + +int +get_riscos_ver(void) +{ + int module, section; + os_error *e; + char *name; + int version; + + version = 0; + /* Full enumeration */ + module = 0; + section = -1; + do { + e = xosmodule_enumeratewithversion(&module, §ion, &name, + NULL, NULL, &version); + if (!strncmp(name, ModuleName_UtilityModule, + sizeof (ModuleName_UtilityModule))) { + return version; + } + } while (e == NULL && section == -1); + return 0; +} + int main(int, char **); int main(int argc, char **argv) { int howto, start_args, ret; + int riscosver; int class; + riscosver = get_riscos_ver(); + /* + * RISC OS version is in BCD + * Top 16 bits = major version + * Bottom 16 bits = fractional part + * e.g. 3.71 = 0x00037100 + */ + printf("\n\n"); printf(">> %s, Revision %s\n", bootprog_name, bootprog_rev); printf(">> Booting NetBSD/acorn32 on a RiscPC/A7000/NC\n"); + printf(">> RISC OS version: %d.%d%d\n", + (riscosver >> 16) & 0xff, + (riscosver >> 12) & 0xf, + (riscosver >> 8) & 0xf); printf("\n"); process_args(argc, argv, &howto, booted_file, &start_args); @@ -855,9 +895,19 @@ main(int argc, char **argv) /* dismount all filesystems */ xosfscontrol_shutdown(); - os_readsysinfo_platform_class(&class, NULL, NULL); - if (class != osreadsysinfo_Platform_Pace) { - /* reset devices, well they try to anyway */ + /* + * OS_ReadSysInfo Platform class reason code not valid + * on RISC OS 3. + * XXX Don't know about RISC OS 4 + */ + + if (riscosver >= 0x4) { + os_readsysinfo_platform_class(&class, NULL, NULL); + if (class != osreadsysinfo_Platform_Pace) { + /* reset devices, well try to anyway */ + service_pre_reset(); + } + } else { service_pre_reset(); }
CVS commit: src/sys/arch/acorn32/stand/lib
Module Name:src Committed By: skrll Date: Thu Oct 18 19:02:46 UTC 2018 Modified Files: src/sys/arch/acorn32/stand/lib: riscoscalls.S Log Message: Use unified syntax To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/acorn32/stand/lib/riscoscalls.S 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/acorn32/stand/lib/riscoscalls.S diff -u src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.10 src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.11 --- src/sys/arch/acorn32/stand/lib/riscoscalls.S:1.10 Sat Aug 19 22:44:58 2006 +++ src/sys/arch/acorn32/stand/lib/riscoscalls.S Thu Oct 18 19:02:46 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: riscoscalls.S,v 1.10 2006/08/19 22:44:58 bjh21 Exp $ */ +/* $NetBSD: riscoscalls.S,v 1.11 2018/10/18 19:02:46 skrll Exp $ */ /*- * Copyright (c) 2001 Ben Harris @@ -102,7 +102,7 @@ ENTRY(xosargs_read) sub fp, ip, #4 mov r3, r2 swi XOS_Args - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} teq r3, #0 strne r2, [r3] mov r0, #0 @@ -161,7 +161,7 @@ ENTRY(xosfind_open) stmfd sp!, {fp, ip, lr, pc} sub fp, ip, #4 swi XOS_Find - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} teq r3, #0 strne r0, [r3] mov r0, #0 @@ -212,7 +212,7 @@ ENTRY(xosmodule_alloc) mov r3, r0 mov r0, #OSModule_Alloc swi XOS_Module - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} teq r1, #0 strne r2, [r1] mov r0, #0 @@ -238,7 +238,7 @@ ENTRY(xosmodule_lookup) mov r1, r0 mov r0, #OSModule_Lookup swi XOS_Module - ldmvsdb fp, {r4-r8, fp, sp, pc} + ldmdbvs fp, {r4-r8, fp, sp, pc} teq r6, #0 strne r1, [r6] teq r7, #0 @@ -285,7 +285,7 @@ ENTRY(xos_swi_number_from_string) mov r2, r1 mov r1, r0 swi XOS_SWINumberFromString - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} str r0, [r2] mov r0, #0 ldmdb fp, {fp, sp, pc} @@ -363,7 +363,7 @@ ENTRY(xosmemory_read_arrangement_table_s mov r4, r1 mov r0, #OSMemory_ReadArrangementTableSize swi XOS_Memory - ldmvsdb fp, {r4, fp, sp, pc} + ldmdbvs fp, {r4, fp, sp, pc} cmp r3, #0 strne r1, [r3] cmp r4, #0 @@ -403,7 +403,7 @@ ENTRY(xcache_control) stmfd sp!, {fp, ip, lr, pc} sub fp, ip, #4 swi XCache_Control - ldmvsdb fp, {fp, sp, pc} + ldmdbvs fp, {fp, sp, pc} teq r2, #0 strne r0, [r2] mov r0, #0 @@ -419,7 +419,7 @@ ENTRY(xfilecorediscop_read_sectors) orr r1, r0, #FileCoreDiscOp_ReadSectors ldr r8, [fp, #4] swi XFileCore_DiscOp - ldmvsdb fp, {r4, r8, fp, sp, pc} + ldmdbvs fp, {r4, r8, fp, sp, pc} ldr r0, [fp, #8] teq r0, #0 strne r2, [r0] @@ -441,7 +441,7 @@ ENTRY(xfilecore_drives) mov r3, r1 mov r8, r0 swi XFileCore_Drives - ldmvsdb fp, {r4-r5, r8, fp, sp, pc} + ldmdbvs fp, {r4-r5, r8, fp, sp, pc} teq r3, #0 strne r0, [r3] teq r4, #0 @@ -461,7 +461,7 @@ ENTRY(xfilecoresectorop_read_sectors) orr r1, r0, #FileCoreDiscOp_ReadSectors ldr r8, [fp, #4] swi XFileCore_SectorOp - ldmvsdb fp, {r4, r8, fp, sp, pc} + ldmdbvs fp, {r4, r8, fp, sp, pc} ldr r0, [fp, #8] teq r0, #0 strne r2, [r0] @@ -485,7 +485,7 @@ ENTRY(xfilecorediscop64_read_sectors) ldr r5, [fp, #4] ldr r8, [fp, #8] swi XFileCore_DiscOp64 - ldmvsdb fp, {r4, r5, r8, fp, sp, pc} + ldmdbvs fp, {r4, r5, r8, fp, sp, pc} ldr r0, [fp, #12] teq r0, #0 strne r2, [r0]
CVS commit: src/sys/arch/acorn32/stand/boot32
Module Name:src Committed By: christos Date: Tue Oct 30 20:15:57 UTC 2018 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c Log Message: provide a main prototype (this is standalone) To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/acorn32/stand/boot32/boot32.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/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.43 src/sys/arch/acorn32/stand/boot32/boot32.c:1.44 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.43 Wed Jan 24 04:04:44 2018 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Tue Oct 30 16:15:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.43 2018/01/24 09:04:44 skrll Exp $ */ +/* $NetBSD: boot32.c,v 1.44 2018/10/30 20:15:57 christos Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -760,6 +760,7 @@ create_configuration(int argc, char **ar } } +int main(int, char **argv); int main(int argc, char **argv)
CVS commit: src/sys/arch/acorn32/stand/boot32
Module Name:src Committed By: christos Date: Tue Oct 30 20:23:29 UTC 2018 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c Log Message: no param names in prototype. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/acorn32/stand/boot32/boot32.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/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.44 src/sys/arch/acorn32/stand/boot32/boot32.c:1.45 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.44 Tue Oct 30 16:15:57 2018 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Tue Oct 30 16:23:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.44 2018/10/30 20:15:57 christos Exp $ */ +/* $NetBSD: boot32.c,v 1.45 2018/10/30 20:23:29 christos Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -760,7 +760,7 @@ create_configuration(int argc, char **ar } } -int main(int, char **argv); +int main(int, char **); int main(int argc, char **argv)
CVS commit: src/sys/arch/acorn32/stand/lib
Module Name:src Committed By: skrll Date: Thu May 10 10:48:24 UTC 2012 Modified Files: src/sys/arch/acorn32/stand/lib: riscospart.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/acorn32/stand/lib/riscospart.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/acorn32/stand/lib/riscospart.c diff -u src/sys/arch/acorn32/stand/lib/riscospart.c:1.3 src/sys/arch/acorn32/stand/lib/riscospart.c:1.4 --- src/sys/arch/acorn32/stand/lib/riscospart.c:1.3 Thu Nov 25 13:45:17 2010 +++ src/sys/arch/acorn32/stand/lib/riscospart.c Thu May 10 10:48:23 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: riscospart.c,v 1.3 2010/11/25 13:45:17 skrll Exp $ */ +/* $NetBSD: riscospart.c,v 1.4 2012/05/10 10:48:23 skrll Exp $ */ /*- * Copyright (c) 2006 Ben Harris @@ -156,7 +156,8 @@ getdisklabel_acorn(struct open_file *f, buf = alloc(DEV_BSIZE); err = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, FILECORE_BOOT_SECTOR, DEV_BSIZE, buf, &rsize); - if (err != 0) goto out; + if (err != 0) + goto out; bb = (struct filecore_bootblock *) buf; if (bb->checksum == filecore_checksum((u_char *)bb)) { if (bb->partition_type == PARTITION_FORMAT_RISCBSD) @@ -168,9 +169,11 @@ getdisklabel_acorn(struct open_file *f, } } else labelsect = LABELSECTOR; +printf("%s: labelsect %d\n", __func__, labelsect); err = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, labelsect, DEV_BSIZE, buf, &rsize); - if (err != 0) goto out; + if (err != 0) + goto out; msg = getdisklabel(buf, lp); if (msg) { printf("%s\n", msg);
CVS commit: src/sys/arch/acorn32/stand/nbfs
Module Name:src Committed By: skrll Date: Thu May 10 11:01:35 UTC 2012 Modified Files: src/sys/arch/acorn32/stand/nbfs: nbfs.c Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/acorn32/stand/nbfs/nbfs.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/acorn32/stand/nbfs/nbfs.c diff -u src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.7 src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.8 --- src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.7 Thu Jul 13 16:11:41 2006 +++ src/sys/arch/acorn32/stand/nbfs/nbfs.c Thu May 10 11:01:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nbfs.c,v 1.7 2006/07/13 16:11:41 bjh21 Exp $ */ +/* $NetBSD: nbfs.c,v 1.8 2012/05/10 11:01:35 skrll Exp $ */ /*- * Copyright (c) 2006 Ben Harris @@ -108,9 +108,11 @@ nbfs_devopen(struct open_file *f, char c if (*fname != '.' && *fname != '\0') return EINVAL; err = rodisk_open(f, special, drive, part); - if (err != 0) return err; + if (err != 0) + return err; *rest = fname; - if (**rest == '.') (*rest)++; + if (**rest == '.') + (*rest)++; return 0; } @@ -126,8 +128,10 @@ nbfs_fileopen(struct open_file *f, char strcpy(file, "/"); strcat(file, tail); for (p = file + 1; *p != '\0'; p++) { - if (*p == '.') *p = '/'; - else if (*p == '/') *p = '.'; + if (*p == '.') + *p = '/'; + else if (*p == '/') + *p = '.'; } if (strcmp(tail, "$") == 0) strcpy(file, "/"); @@ -150,7 +154,8 @@ nbfs_fopen(struct open_file *f, char con int err; err = nbfs_devopen(f, special, path, &tail); - if (err != 0) return err; + if (err != 0) + return err; err = nbfs_fileopen(f, tail); if (err != 0) DEV_CLOSE(f->f_dev)(f); @@ -185,13 +190,16 @@ nbfs_open(struct nbfs_reg *r) nof = alloc(sizeof(*nof)); memset(nof, 0, sizeof(*nof)); err = nbfs_fopen(&nof->f, special, fname); - if (err != 0) goto fail; + if (err != 0) + goto fail; err = FS_STAT(nof->f.f_ops)(&nof->f, &st); - if (err != 0) goto fail; + if (err != 0) + goto fail; nof->fileswitch_handle = fh; LIST_INSERT_HEAD(&nbfs_open_files, nof, link); r->r0 = 0x4000; - if (S_ISDIR(st.st_mode)) r->r0 |= 0x2000; + if (S_ISDIR(st.st_mode)) + r->r0 |= 0x2000; r->r1 = (uint32_t)nof; r->r2 = DEV_BSIZE; r->r3 = st.st_size; @@ -217,9 +225,11 @@ nbfs_getbytes(struct nbfs_reg *r) int err; err = FS_SEEK(nof->f.f_ops)(&nof->f, off, SEEK_SET); - if (err == -1) return maperr(err); + if (err == -1) + return maperr(err); err = FS_READ(nof->f.f_ops)(&nof->f, buf, size, NULL); - if (err != 0) return maperr(err); + if (err != 0) + return maperr(err); return NULL; } @@ -287,7 +297,8 @@ nbfs_file(struct nbfs_reg *r) r->r0 = r->r2 = r->r3 = r->r4 = r->r5 = 0; else { err = FS_STAT(f.f_ops)(&f, &st); - if (err != 0) goto fail; + if (err != 0) +goto fail; r->r0 = S_ISDIR(st.st_mode) ? fileswitch_IS_DIR : fileswitch_IS_FILE; r->r2 = r->r3 = 0; @@ -297,7 +308,8 @@ nbfs_file(struct nbfs_reg *r) if (reason == 255) { err = FS_READ(f.f_ops) (&f, buf, st.st_size, NULL); -if (err != 0) goto fail; +if (err != 0) + goto fail; /* R6 should really be the leaf name */ r->r6 = r->r1; } @@ -381,14 +393,16 @@ nbfs_func_dirents(struct nbfs_reg *r) switch (reason) { case 14: entsiz = strlen(dp->d_name) + 1; -if (buflen < entsiz) goto out; +if (buflen < entsiz) + goto out; strcpy(outp, dp->d_name); break; case 15: entsiz = ALIGN(offsetof( struct fileswitch_dirent, name) + strlen(dp->d_name) + 1); -if (buflen < entsiz) goto out; +if (buflen < entsiz) + goto out; fdp = (struct fileswitch_dirent *)outp; fdp->loadaddr = 0;
CVS commit: src/sys/arch/acorn32/stand/nbfs
Module Name:src Committed By: skrll Date: Thu May 10 11:03:22 UTC 2012 Modified Files: src/sys/arch/acorn32/stand/nbfs: nbfs.c Log Message: Bit more KNF To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/acorn32/stand/nbfs/nbfs.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/acorn32/stand/nbfs/nbfs.c diff -u src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.8 src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.9 --- src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.8 Thu May 10 11:01:35 2012 +++ src/sys/arch/acorn32/stand/nbfs/nbfs.c Thu May 10 11:03:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: nbfs.c,v 1.8 2012/05/10 11:01:35 skrll Exp $ */ +/* $NetBSD: nbfs.c,v 1.9 2012/05/10 11:03:22 skrll Exp $ */ /*- * Copyright (c) 2006 Ben Harris @@ -258,7 +258,8 @@ nbfs_close(struct nbfs_reg *r) int err; err = nbfs_fclose(&nof->f); - if (err != 0) return maperr(err); + if (err != 0) + return maperr(err); LIST_REMOVE(nof, link); dealloc(nof, sizeof(*nof)); return NULL;
CVS commit: src/sys/arch/acorn32/stand/lib
Module Name:src Committed By: skrll Date: Mon May 14 11:45:17 UTC 2012 Modified Files: src/sys/arch/acorn32/stand/lib: riscospart.c Log Message: Remove printf that snuck in somehow. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/acorn32/stand/lib/riscospart.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/acorn32/stand/lib/riscospart.c diff -u src/sys/arch/acorn32/stand/lib/riscospart.c:1.4 src/sys/arch/acorn32/stand/lib/riscospart.c:1.5 --- src/sys/arch/acorn32/stand/lib/riscospart.c:1.4 Thu May 10 10:48:23 2012 +++ src/sys/arch/acorn32/stand/lib/riscospart.c Mon May 14 11:45:16 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: riscospart.c,v 1.4 2012/05/10 10:48:23 skrll Exp $ */ +/* $NetBSD: riscospart.c,v 1.5 2012/05/14 11:45:16 skrll Exp $ */ /*- * Copyright (c) 2006 Ben Harris @@ -169,7 +169,6 @@ getdisklabel_acorn(struct open_file *f, } } else labelsect = LABELSECTOR; -printf("%s: labelsect %d\n", __func__, labelsect); err = DEV_STRATEGY(f->f_dev)(f->f_devdata, F_READ, labelsect, DEV_BSIZE, buf, &rsize); if (err != 0)
CVS commit: src/sys/arch/acorn32/stand/boot32
Module Name:src Committed By: christos Date: Mon Nov 4 21:08:14 UTC 2013 Modified Files: src/sys/arch/acorn32/stand/boot32: boot32.c Log Message: remove unused variable To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/acorn32/stand/boot32/boot32.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/acorn32/stand/boot32/boot32.c diff -u src/sys/arch/acorn32/stand/boot32/boot32.c:1.39 src/sys/arch/acorn32/stand/boot32/boot32.c:1.40 --- src/sys/arch/acorn32/stand/boot32/boot32.c:1.39 Thu May 10 06:27:10 2012 +++ src/sys/arch/acorn32/stand/boot32/boot32.c Mon Nov 4 16:08:14 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: boot32.c,v 1.39 2012/05/10 10:27:10 skrll Exp $ */ +/* $NetBSD: boot32.c,v 1.40 2013/11/04 21:08:14 christos Exp $ */ /*- * Copyright (c) 2002 Reinoud Zandijk @@ -282,7 +282,7 @@ void get_memory_configuration(void) { int loop, current_page_type, page_count, phys_page; - int page, count, bank, top_bank, video_bank; + int page, count, top_bank, video_bank; int mapped_screen_memory; int one_mb_pages; u_long top; @@ -292,8 +292,7 @@ get_memory_configuration(void) osmemory_read_arrangement_table(memory_page_types); /* init counters */ - bank = vram_blocks = dram_blocks = rom_blocks = io_blocks = - podram_blocks = 0; + vram_blocks = dram_blocks = rom_blocks = io_blocks = podram_blocks = 0; current_page_type = -1; phys_page = 0; /* physical address in pages */
CVS commit: src/sys/arch/acorn32/stand/lib
Module Name:src Committed By: skrll Date: Thu Nov 25 13:45:17 UTC 2010 Modified Files: src/sys/arch/acorn32/stand/lib: riscospart.c Log Message: Use partition_cyl_high and partition_cyl_low to find the "RiscBSD" partition. Makes nbfs somewhat work on my RiscPC. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/acorn32/stand/lib/riscospart.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/acorn32/stand/lib/riscospart.c diff -u src/sys/arch/acorn32/stand/lib/riscospart.c:1.2 src/sys/arch/acorn32/stand/lib/riscospart.c:1.3 --- src/sys/arch/acorn32/stand/lib/riscospart.c:1.2 Sun Jun 25 21:32:41 2006 +++ src/sys/arch/acorn32/stand/lib/riscospart.c Thu Nov 25 13:45:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: riscospart.c,v 1.2 2006/06/25 21:32:41 christos Exp $ */ +/* $NetBSD: riscospart.c,v 1.3 2010/11/25 13:45:17 skrll Exp $ */ /*- * Copyright (c) 2006 Ben Harris @@ -160,7 +160,7 @@ bb = (struct filecore_bootblock *) buf; if (bb->checksum == filecore_checksum((u_char *)bb)) { if (bb->partition_type == PARTITION_FORMAT_RISCBSD) - labelsect = (daddr_t)bb->partition_cyl_low * + labelsect = ((bb->partition_cyl_high << 8) + bb->partition_cyl_low) * bb->heads * bb->secspertrack + LABELSECTOR; else { err = EUNLAB;
CVS commit: src/sys/arch/acorn32/stand/nbfs
Module Name:src Committed By: mrg Date: Mon Jun 10 02:21:10 UTC 2013 Modified Files: src/sys/arch/acorn32/stand/nbfs: nbfs.c Log Message: s/DIRBLKSIZE/UFS_&/. HI DH! :-) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/acorn32/stand/nbfs/nbfs.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/acorn32/stand/nbfs/nbfs.c diff -u src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.9 src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.10 --- src/sys/arch/acorn32/stand/nbfs/nbfs.c:1.9 Thu May 10 11:03:22 2012 +++ src/sys/arch/acorn32/stand/nbfs/nbfs.c Mon Jun 10 02:21:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: nbfs.c,v 1.9 2012/05/10 11:03:22 skrll Exp $ */ +/* $NetBSD: nbfs.c,v 1.10 2013/06/10 02:21:10 mrg Exp $ */ /*- * Copyright (c) 2006 Ben Harris @@ -354,7 +354,7 @@ nbfs_func_dirents(struct nbfs_reg *r) size_t skip = r->r4; ssize_t off = 0; size_t buflen = r->r5; - char dirbuf[DIRBLKSIZ]; + char dirbuf[UFS_DIRBLKSIZ]; char *outp = (char *)r->r2; err = nbfs_fopen(&f, special, fname); @@ -367,12 +367,12 @@ nbfs_func_dirents(struct nbfs_reg *r) err = ENOTDIR; goto fail; } - while (FS_READ(f.f_ops)(&f, dirbuf, DIRBLKSIZ, &resid) == 0 && + while (FS_READ(f.f_ops)(&f, dirbuf, UFS_DIRBLKSIZ, &resid) == 0 && resid == 0) { struct direct *dp, *edp; dp = (struct direct *) dirbuf; - edp = (struct direct *) (dirbuf + DIRBLKSIZ); + edp = (struct direct *) (dirbuf + UFS_DIRBLKSIZ); for (; dp < edp; dp = (void *)((char *)dp + dp->d_reclen)) { size_t entsiz = 0;