Subject: port-amiga/22140: update for /dev/reload
To: None <gnats-bugs@gnats.netbsd.org>
From: None <gni@gecko.de>
List: netbsd-bugs
Date: 07/15/2003 11:27:58
>Number: 22140
>Category: port-amiga
>Synopsis: update for /dev/reload
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-amiga-maintainer
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Jul 15 09:27:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Gunther Nikl
>Release: NetBSD 1.6.1
>Organization:
>Environment:
Architecture: m68k
Machine: amiga
>Description:
Since the switch to ELF on NetBSD/amiga with 1.6 /dev/reload cannot be used
anymore since it works for a.out kernels only. Additionally, /dev/reload
does still require chipmem to reload a kernel and the reload code must be
at exactly the same location in the new kernel and the currently running
kernel (because reload continues in chipmem after the MMU is switched off).
>How-To-Repeat:
Copy an ELF kernel into /dev/reload. This will fail.
>Fix:
The attached diff for amiga/amiga_init.c replaces the a.out support with an
ELF loader including symbol loading. The attached diff for amiga/locore.s
removes the chipmem limitation and reload code match constraint. That allows
to reload into arbitary kernels with no size restriction since it places the
new kernel in fastmem. The old code used chipmem because the kernel could
only load from there. This restriction is long gone.
The patches are against -current sources and apply with a small change
(AOUT_LDPGSZ -> __LDPGSZ) on 1.6.1. The new /dev/reload code was only tested
with 1.6.1 and a 68060.
begin 644 dev_reload.tgz
M'XL(`-._$S\"`^T\:W/3R+)\=7[%L!2L'<E!?N9%@$#,PMF$4$G892^7<BF2
M'`O;DE>2"6'AOY_NGAEI1H\D[.[94W6OIL"/4<],3[^[9QS7GVS,0R>,O(WX
MSG^H61W+&O;[=RS+ZFP..OAN6=T^?[>L0;<SN&-M;EK]S=[F8`C]G6ZG/[S#
MK#O_0%O%B1TQ=F>Q"F;7P0'89'+G_UQKM]M,\G\CC/R+QE$8L'^MYJS3AW\[
M@ZV=P3;K6E9OS3",%+1QMO(XU(!UK)U^;Z>[R:&>/F7M3G]S:/8ZS.`?NNSI
MTS7&UAL--K'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