All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3] SGABIOS: fix wrong video attrs for int 10h, ah==13h
@ 2017-03-10 15:54 Herbie Robinson
  2017-03-10 19:10 ` Laurent Vivier
  2017-04-23  9:03 ` Michael Tokarev
  0 siblings, 2 replies; 4+ messages in thread
From: Herbie Robinson @ 2017-03-10 15:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, lvivier, Herbie Robinson

Fix Bug #1670509: wrong video attrs for int 10h, ah==13h
The subroutine set_cursor_position is trashing %bx.
Unfortunately, %bl contains the video attribute for write_string.

The fix saves %bx in the function prolog and restores it in
the epilog. 

Signed-off-by: Herbie Robinson <Herbie.Robinson@stratus.com>
---
Removed incorrect code deletions from set_current_cursor.
Removed explanation of same from the commit message.

BTW, I didn't see any test cases for this code, but if they exist
and somebody points me at them, I should be able to generate a 
very small qcow2 file that demonstrates the problem.

 sgabios.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sgabios.S b/sgabios.S
index 275d063..96c4e23 100644
--- a/sgabios.S
+++ b/sgabios.S
@@ -1728,6 +1728,7 @@ write_string_tail:
 
 set_cursor_position:
   pushw %ax
+  pushw %bx
   pushw %ds
   pushw $BDA_SEG
   popw %ds                             /* ds = 0x40 */
@@ -1738,6 +1739,7 @@ set_cursor_position:
   movw %ax, %bx                        /* bx = cursor save offset */
   movw %dx, (%bx)                      /* save new cursor value */
   popw %ds
+  popw %bx
   popw %ax
   ret
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v3] SGABIOS: fix wrong video attrs for int 10h, ah==13h
  2017-03-10 15:54 [Qemu-devel] [PATCH v3] SGABIOS: fix wrong video attrs for int 10h, ah==13h Herbie Robinson
@ 2017-03-10 19:10 ` Laurent Vivier
  2017-04-23  9:03 ` Michael Tokarev
  1 sibling, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2017-03-10 19:10 UTC (permalink / raw)
  To: Herbie Robinson, qemu-devel; +Cc: qemu-trivial

On 10/03/2017 16:54, Herbie Robinson wrote:
> Fix Bug #1670509: wrong video attrs for int 10h, ah==13h
> The subroutine set_cursor_position is trashing %bx.
> Unfortunately, %bl contains the video attribute for write_string.
> 
> The fix saves %bx in the function prolog and restores it in
> the epilog. 
> 
> Signed-off-by: Herbie Robinson <Herbie.Robinson@stratus.com>

Reviewed-by: Laurent Vivier <lvivier@redhat.com>


> ---
> Removed incorrect code deletions from set_current_cursor.
> Removed explanation of same from the commit message.
> 
> BTW, I didn't see any test cases for this code, but if they exist
> and somebody points me at them, I should be able to generate a 
> very small qcow2 file that demonstrates the problem.
> 
>  sgabios.S | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sgabios.S b/sgabios.S
> index 275d063..96c4e23 100644
> --- a/sgabios.S
> +++ b/sgabios.S
> @@ -1728,6 +1728,7 @@ write_string_tail:
>  
>  set_cursor_position:
>    pushw %ax
> +  pushw %bx
>    pushw %ds
>    pushw $BDA_SEG
>    popw %ds                             /* ds = 0x40 */
> @@ -1738,6 +1739,7 @@ set_cursor_position:
>    movw %ax, %bx                        /* bx = cursor save offset */
>    movw %dx, (%bx)                      /* save new cursor value */
>    popw %ds
> +  popw %bx
>    popw %ax
>    ret
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v3] SGABIOS: fix wrong video attrs for int 10h, ah==13h
  2017-03-10 15:54 [Qemu-devel] [PATCH v3] SGABIOS: fix wrong video attrs for int 10h, ah==13h Herbie Robinson
  2017-03-10 19:10 ` Laurent Vivier
@ 2017-04-23  9:03 ` Michael Tokarev
  2017-04-24 12:08   ` Laurent Vivier
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Tokarev @ 2017-04-23  9:03 UTC (permalink / raw)
  To: Herbie Robinson, qemu-devel; +Cc: qemu-trivial, lvivier

10.03.2017 18:54, Herbie Robinson wrote:
> Fix Bug #1670509: wrong video attrs for int 10h, ah==13h
> The subroutine set_cursor_position is trashing %bx.
> Unfortunately, %bl contains the video attribute for write_string.
> 
> The fix saves %bx in the function prolog and restores it in
> the epilog. 
> 
> Signed-off-by: Herbie Robinson <Herbie.Robinson@stratus.com>
> ---
> Removed incorrect code deletions from set_current_cursor.
> Removed explanation of same from the commit message.
> 
> BTW, I didn't see any test cases for this code, but if they exist
> and somebody points me at them, I should be able to generate a 
> very small qcow2 file that demonstrates the problem.
> 
>  sgabios.S | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sgabios.S b/sgabios.S

Now I'm not quite sure what to do with this.

It is part of sgabios, which is not qemu code but a submodule.

Maybe it's better to apply it upstream?
Or should we apply it directly?

Thanks,

/mjt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v3] SGABIOS: fix wrong video attrs for int 10h, ah==13h
  2017-04-23  9:03 ` Michael Tokarev
@ 2017-04-24 12:08   ` Laurent Vivier
  0 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2017-04-24 12:08 UTC (permalink / raw)
  To: Michael Tokarev, Herbie Robinson, qemu-devel; +Cc: Paolo Bonzini

On 23/04/2017 11:03, Michael Tokarev wrote:
> 10.03.2017 18:54, Herbie Robinson wrote:
>> Fix Bug #1670509: wrong video attrs for int 10h, ah==13h
>> The subroutine set_cursor_position is trashing %bx.
>> Unfortunately, %bl contains the video attribute for write_string.
>>
>> The fix saves %bx in the function prolog and restores it in
>> the epilog. 
>>
>> Signed-off-by: Herbie Robinson <Herbie.Robinson@stratus.com>
>> ---
>> Removed incorrect code deletions from set_current_cursor.
>> Removed explanation of same from the commit message.
>>
>> BTW, I didn't see any test cases for this code, but if they exist
>> and somebody points me at them, I should be able to generate a 
>> very small qcow2 file that demonstrates the problem.
>>
>>  sgabios.S | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/sgabios.S b/sgabios.S
> 
> Now I'm not quite sure what to do with this.
> 
> It is part of sgabios, which is not qemu code but a submodule.
> 
> Maybe it's better to apply it upstream?
> Or should we apply it directly?

The original project is hosted by code.google.com, that has been closed
in 2015. I doesn't appear there is a real alive repository hosting this
project now (except some multiple clones on github).

So I think you should apply it directly (and regenerate sgabios.bin)

I cc Paolo as he has added the submodule.

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-24 12:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 15:54 [Qemu-devel] [PATCH v3] SGABIOS: fix wrong video attrs for int 10h, ah==13h Herbie Robinson
2017-03-10 19:10 ` Laurent Vivier
2017-04-23  9:03 ` Michael Tokarev
2017-04-24 12:08   ` Laurent Vivier

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.