| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: bootxxx.c,v 1.8 2009/08/24 13:04:37 tsutsui Exp $ */ | | 1 | /* $NetBSD: bootxxx.c,v 1.9 2022/06/26 14:08:15 tsutsui Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2001 Leo Weppelman. | | 4 | * Copyright (c) 2001 Leo Weppelman. |
5 | * Copyright (c) 1995 Waldi Ravens. | | 5 | * Copyright (c) 1995 Waldi Ravens. |
6 | * All rights reserved. | | 6 | * All rights reserved. |
7 | * | | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | | 8 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | | 9 | * modification, are permitted provided that the following conditions |
10 | * are met: | | 10 | * are met: |
11 | * 1. Redistributions of source code must retain the above copyright | | 11 | * 1. Redistributions of source code must retain the above copyright |
12 | * notice, this list of conditions and the following disclaimer. | | 12 | * notice, this list of conditions and the following disclaimer. |
13 | * 2. Redistributions in binary form must reproduce the above copyright | | 13 | * 2. Redistributions in binary form must reproduce the above copyright |
14 | * notice, this list of conditions and the following disclaimer in the | | 14 | * notice, this list of conditions and the following disclaimer in the |
| @@ -47,28 +47,28 @@ int bootxxx(void *, void *, osdsc_t *); | | | @@ -47,28 +47,28 @@ int bootxxx(void *, void *, osdsc_t *); |
47 | void boot_BSD(struct kparamb *)__attribute__((noreturn)); | | 47 | void boot_BSD(struct kparamb *)__attribute__((noreturn)); |
48 | | | 48 | |
49 | int | | 49 | int |
50 | bootxxx(void *readsector, void *disklabel, osdsc_t *od) | | 50 | bootxxx(void *readsector, void *disklabel, osdsc_t *od) |
51 | { | | 51 | { |
52 | int fd; | | 52 | int fd; |
53 | char *errmsg; | | 53 | char *errmsg; |
54 | extern char end[], edata[]; | | 54 | extern char end[], edata[]; |
55 | | | 55 | |
56 | memset(edata, 0, end - edata); | | 56 | memset(edata, 0, end - edata); |
57 | | | 57 | |
58 | /* XXX: Limit should be 16MB */ | | 58 | /* XXX: Limit should be 16MB */ |
59 | setheap(end, (void*)0x1000000); | | 59 | setheap(end, (void*)0x1000000); |
60 | printf("\033v\nNetBSD/Atari tertiary bootloader " | | 60 | printf("\033v\nNetBSD/atari tertiary bootloader " |
61 | "($Revision: 1.8 $)\n\n"); | | 61 | "($Revision: 1.9 $)\n\n"); |
62 | | | 62 | |
63 | if (init_dskio(readsector, disklabel, od->rootfs)) | | 63 | if (init_dskio(readsector, disklabel, od->rootfs)) |
64 | return -1; | | 64 | return -1; |
65 | | | 65 | |
66 | sys_info(od); | | 66 | sys_info(od); |
67 | if (!(od->cputype & ATARI_ANYCPU)) { | | 67 | if (!(od->cputype & ATARI_ANYCPU)) { |
68 | printf("Unknown CPU-type.\n"); | | 68 | printf("Unknown CPU-type.\n"); |
69 | return -2; | | 69 | return -2; |
70 | } | | 70 | } |
71 | | | 71 | |
72 | if ((fd = open(od->osname, 0)) < 0) { | | 72 | if ((fd = open(od->osname, 0)) < 0) { |
73 | printf("Cannot open kernel '%s'\n", od->osname); | | 73 | printf("Cannot open kernel '%s'\n", od->osname); |
74 | return -3; | | 74 | return -3; |