LKML Archive on
help / color / mirror / Atom feed
From: Matthew Garrett <>
To: Don Zickus <>
Cc:, LKML <>,
Subject: Re: [PATCH] x86: use int instead of long to set reset vector back to 0
Date: Mon, 28 Feb 2011 15:15:16 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, Feb 07, 2011 at 11:25:00PM -0500, Don Zickus wrote:
> A customer of ours, complained that when setting the reset vector
> back to 0, it trashed other data and hung their box.  They noticed
> when only 4 bytes were set to 0 instead of 8, everything worked
> correctly.

We're supposed to be resetting trampoline_phys_low and 
trampoline_phys_high here, which are two 16-bit values. Writing 64 bits 
is definitely going to overwrite space that we're not supposed to be 

> -	*((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0;
> +	*((volatile int *)phys_to_virt(apic->trampoline_phys_low)) = 0;

I'd suggest either using u32 here, or alternatively make it more obvious 
what's going on and set trampoline_phys_low and trampoline_phys_high 
(which are both 16 bit) independently.

Ingo? Looks like you touched this last, but it seems that the bug was 
there already.
Matthew Garrett |

  reply	other threads:[~2011-02-28 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-08  4:25 Don Zickus
2011-02-28 15:15 ` Matthew Garrett [this message]
2011-02-28 15:26 ` [tip:x86/urgent] x86: Use u32 " tip-bot for Don Zickus
2011-02-23 22:12 [PATCH] x86: use int " Don Zickus

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [PATCH] x86: use int instead of long to set reset vector back to 0' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).