From: Laurent Vivier <laurent@vivier.eu>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] q800: implement mac rom reset function for BIOS-less mode
Date: Thu, 2 Jan 2020 12:10:47 +0100 [thread overview]
Message-ID: <60efe91c-af82-f6d7-36c5-c603971c2f33@vivier.eu> (raw)
In-Reply-To: <20200102103644.233370-1-Jason@zx2c4.com>
Le 02/01/2020 à 11:36, Jason A. Donenfeld a écrit :
> On Linux, calling `reboot(RB_AUTOBOOT);` will result in
> arch/m68k/mac/misc.c's mac_reset function being called. That in turn
> looks at the rombase (or uses 0x40800000 is there's no rombase), adds
> 0xa, and jumps to that address. At the moment, there's nothing there, so
> the kernel just crashes when trying to reboot. So, this commit adds a
> very simple implementation at that location, which just writes to via2
> to power down.
>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
There are two cleaners solution to do that:
1- catch the jump to the ROM address in QEMU and shutdown the machine, see
https://github.com/vivier/qemu-m68k/commit/51cd57d1128059819038b9800455fbf794430c15
2- or as you do, write a fake ROM but use the VIA2 port B bit 3 to
shutdown the machine see hw/misc/mac_via.c mos6522_q800_via2_portB_write().
Thanks,
Laurent
next prev parent reply other threads:[~2020-01-02 11:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-02 10:36 [PATCH] q800: implement mac rom reset function for BIOS-less mode Jason A. Donenfeld
2020-01-02 10:42 ` no-reply
2020-01-02 10:43 ` no-reply
2020-01-02 11:10 ` Laurent Vivier [this message]
2020-01-02 11:41 ` Laurent Vivier
2020-01-02 12:01 ` [PATCH v2] " Jason A. Donenfeld
2020-01-02 14:13 ` Laurent Vivier
2020-01-02 13:41 ` [PATCH] " Jason A. Donenfeld
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=60efe91c-af82-f6d7-36c5-c603971c2f33@vivier.eu \
--to=laurent@vivier.eu \
--cc=Jason@zx2c4.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).