public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Graeme Russ <graeme.russ@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] U-Boot X86 bootstart
Date: Fri, 30 Sep 2011 23:02:02 +1000	[thread overview]
Message-ID: <4E85BDCA.8020101@gmail.com> (raw)
In-Reply-To: <CANq5_NmMp7HJJEo03_V4DrGmoW7pKtBr05yd6cWnryjaY+BUMw@mail.gmail.com>

Hi Ondrej Kupka

On 30/09/11 21:06, Ondra Kupka wrote:
> Hello,
> 
> I've been digging a bit in X86 bootstart asm code and found possibly wrong
> code, as far as I understand:
> 
> In u-boot/arch/x86/cpu/start.S, there is piece of code to disable caches:
>     
>     /* Turn of cache (this might require a 486-class CPU) */ 
>     movl    %cr0, %eax
>     orl     $(X86_CR0_NW | X86_CR0_CD), %eax
>     movl    %eax, %cr0
>     wbinvd
> 
> , which perfectly makes sense to me. What doesn't really make sense then is:
>  
>     /* Turn of cache (this might require a 486-class CPU) */
>     movl    %cr0, %eax
>     orl     $(X86_CR0_NW & X86_CR0_CD), %eax    - AND HERE???
>     movl    %eax, %cr0
>     wbinvd
> 
> in start16.S of the same directory.
> 
> Is is wrong or not?

Nice catch :) At least one of them is wrong - I'll sort out a patch (unless
you want to submit a patch yourself that is)

> 
> Thanks a lot,
> Ondrej Kupka

Thank you

Regards,

Graeme

      parent reply	other threads:[~2011-09-30 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 11:06 [U-Boot] U-Boot X86 bootstart Ondra Kupka
2011-09-30 11:09 ` Marek Vasut
2011-09-30 13:02 ` Graeme Russ [this message]

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=4E85BDCA.8020101@gmail.com \
    --to=graeme.russ@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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