From: Sven Schnelle <svens@stackframe.org>
To: Helge Deller <deller@gmx.de>
Cc: Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v4 5/6] hppa: Add emulation of Artist graphics
Date: Fri, 20 Dec 2019 18:03:54 +0100 [thread overview]
Message-ID: <20191220170354.GA2762@t470p.stackframe.org> (raw)
In-Reply-To: <237c693d-944c-8641-87d9-6bbd52736e5a@gmx.de>
Hi,
On Fri, Dec 20, 2019 at 05:36:36PM +0100, Helge Deller wrote:
> On 20.12.19 08:26, Helge Deller wrote:
> > On 19.12.19 01:28, Richard Henderson wrote:
> >> On 11/3/19 10:56 AM, Sven Schnelle wrote:
> >>> This adds emulation of Artist graphics good enough
> >>> to get a Text console on both Linux and HP-UX. The
> >>> X11 server from HP-UX also works.
> >>>
> >>> Signed-off-by: Sven Schnelle <svens@stackframe.org>
> >>> ---
> >>> hw/display/Kconfig | 4 +
> >>> hw/display/Makefile.objs | 1 +
> >>> hw/display/artist.c | 1449 ++++++++++++++++++++++++++++++++++++++
> >>> hw/display/trace-events | 9 +
> >>> hw/hppa/Kconfig | 1 +
> >>> hw/hppa/hppa_hardware.h | 1 +
> >>> hw/hppa/machine.c | 9 +
> >>> 7 files changed, 1474 insertions(+)
> >>> create mode 100644 hw/display/artist.c
> >>
> >> Seems to have some problems rebased upon master:
> >>
> >> ...
> >
> > Richard, the attached patch (for seabios-hppa) fixes it for me.
> > Can you test as well?
> > It fixes the sti text column to go out-of-range and thus outside the framebuffer memory.
>
> The attached patch is even better.
> It always wraps to the next line (or scrolls the screen if necessary) if
> the end of the line has been reached.
>
> Helge
> diff --git a/src/parisc/sti.c b/src/parisc/sti.c
> index 7935770..61e7002 100644
> --- a/src/parisc/sti.c
> +++ b/src/parisc/sti.c
> @@ -168,5 +168,10 @@ void sti_putc(const char c)
> }
> return;
> }
> +
> + /* wrap to next line or scroll screen if EOL reached */
> + if (col >= ((sti_glob_cfg.onscreen_x / font->width) - 1))
> + sti_putc('\n');
> +
> sti_putchar(rom, row, col++, c);
> }
Besides this, the root cause is the out-of-bounds check in vram_bit_write():
This fixes the crash for me. I'll resend an updated version later. Thanks for
helping debugging this issue!
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 1d6c7d5d76..13c770e795 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -360,7 +360,7 @@ static void vram_bit_write(ARTISTState *s, int posx, int posy, bool incr_x,
return;
}
- if (posy * width + posx > buf->size) {
+ if (posy * width + posx >= buf->size) {
qemu_log("write outside bounds: wants %dx%d, max size %dx%d\n",
posx, posy, width, height);
return;
Regards
Sven
next prev parent reply other threads:[~2019-12-20 17:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-03 20:56 [PATCH v4 0/6] HPPA: i82596, PS/2 and graphics emulation Sven Schnelle
2019-11-03 20:56 ` [PATCH v4 1/6] hw/hppa/dino.c: Improve emulation of Dino PCI chip Sven Schnelle
2019-11-03 20:56 ` [PATCH v4 2/6] hppa: Add support for LASI chip with i82596 NIC Sven Schnelle
2019-11-03 20:56 ` [PATCH v4 3/6] ps2: accept 'Set Key Make and Break' commands Sven Schnelle
2019-11-03 20:56 ` [PATCH v4 4/6] hppa: add emulation of LASI PS2 controllers Sven Schnelle
2019-11-03 20:56 ` [PATCH v4 5/6] hppa: Add emulation of Artist graphics Sven Schnelle
2019-12-19 0:28 ` Richard Henderson
2019-12-20 7:26 ` Helge Deller
2019-12-20 16:36 ` Helge Deller
2019-12-20 17:03 ` Sven Schnelle [this message]
2019-11-23 13:59 ` [PATCH v4 0/6] HPPA: i82596, PS/2 and graphics emulation Sven Schnelle
2019-11-25 10:01 ` Richard Henderson
2019-12-13 20:40 ` Helge Deller
2019-12-19 0:44 ` Richard Henderson
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=20191220170354.GA2762@t470p.stackframe.org \
--to=svens@stackframe.org \
--cc=deller@gmx.de \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=rth@twiddle.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.