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(, , , + NULL, NULL, ); + 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, , booted_file, _args); @@ -855,9 +895,19 @@ main(int argc, char **argv) /* dismount all filesystems */ xosfscontrol_shutdown(); - os_readsysinfo_platform_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(, 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/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/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: 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/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 */