All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Daniel Kiper <daniel.kiper@oracle.com>, xen-devel@lists.xenproject.org
Cc: jgross@suse.com, keir@xen.org, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, ross.philipson@citrix.com,
	roy.franz@linaro.org, ning.sun@intel.com, jbeulich@suse.com,
	qiaowei.ren@intel.com, richard.l.maliszewski@intel.com,
	gang.wei@intel.com, fu.wei@linaro.org
Subject: Re: [PATCH for-xen-4.5 v3 15/16] x86/boot: Use %ecx instead of %eax
Date: Thu, 9 Oct 2014 12:02:53 +0100	[thread overview]
Message-ID: <54366B5D.3060503@citrix.com> (raw)
In-Reply-To: <1412790736-28915-16-git-send-email-daniel.kiper@oracle.com>

On 08/10/14 18:52, Daniel Kiper wrote:
> Use %ecx instead of %eax and do not wipe multiboot protocol identifier.
> We need that info in __reloc() to differentiate between multiboot(1)
> and multiboot2 protocol.
>
> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>

Much easier to review!

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> given 1 tiny
comment...

> ---
>  xen/arch/x86/boot/head.S |   23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
> index f1b872a..18df0b7 100644
> --- a/xen/arch/x86/boot/head.S
> +++ b/xen/arch/x86/boot/head.S
> @@ -86,14 +86,14 @@ __start:
>          jne     not_multiboot
>  
>          /* Set up trampoline segment 64k below EBDA */
> -        movzwl  0x40e,%eax          /* EBDA segment */
> -        cmp     $0xa000,%eax        /* sanity check (high) */
> +        movzwl  0x40e,%ecx          /* EBDA segment */
> +        cmp     $0xa000,%ecx        /* sanity check (high) */
>          jae     0f
> -        cmp     $0x4000,%eax        /* sanity check (low) */
> +        cmp     $0x4000,%ecx        /* sanity check (low) */
>          jae     1f
>  0:
> -        movzwl  0x413,%eax          /* use base memory size on failure */
> -        shl     $10-4,%eax
> +        movzwl  0x413,%ecx          /* use base memory size on failure */
> +        shl     $10-4,%ecx
>  1:
>          /*
>           * Compare the value in the BDA with the information from the
> @@ -105,19 +105,20 @@ __start:
>          cmp     $0x100,%edx         /* is the multiboot value too small? */
>          jb      2f                  /* if so, do not use it */
>          shl     $10-4,%edx
> -        cmp     %eax,%edx           /* compare with BDA value */
> -        cmovb   %edx,%eax           /* and use the smaller */
> +        cmp     %ecx,%edx           /* compare with BDA value */
> +        cmovb   %edx,%ecx           /* and use the smaller */
>  
>  2:      /* Reserve 64kb for the trampoline */
> -        sub     $0x1000,%eax
> +        sub     $0x1000,%ecx
>  
>          /* From arch/x86/smpboot.c: start_eip had better be page-aligned! */
> -        xor     %al, %al
> -        shl     $4, %eax
> -        mov     %eax,sym_phys(trampoline_phys)
> +        xor     %cl, %cl
> +        shl     $4, %ecx
> +        mov     %ecx,sym_phys(trampoline_phys)
>  
>          /* Save the Multiboot info struct (after relocation) for later use. */
>          mov     $sym_phys(cpu0_stack)+1024,%esp
> +        mov     %ecx,%eax

Probably useful to identify which parameters are in which registers when
calling into reloc

~Andrew

>          push    %ebx
>          call    reloc
>          mov     %eax,sym_phys(mbd_pa)

  reply	other threads:[~2014-10-09 11:03 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-08 17:52 [PATCH for-xen-4.5 v3 00/16] xen: Break multiboot (v1) dependency and add multiboot2 support Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 01/16] x86/boot/reloc: Remove redundant blank characters and reformat comments a bit Daniel Kiper
2014-10-09  9:26   ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 02/16] x86/boot/reloc: Move typedef and include to beginning of file Daniel Kiper
2014-10-09  9:40   ` Andrew Cooper
2014-10-10  8:50   ` Jan Beulich
2014-10-10 13:17     ` Daniel Kiper
2014-10-10 13:33       ` Jan Beulich
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 03/16] x86/boot/reloc: Create generic alloc and copy functions Daniel Kiper
2014-10-09  9:45   ` Andrew Cooper
2014-10-13 15:00     ` Daniel Kiper
2014-10-13 15:02       ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 04/16] x86: Introduce MultiBoot Data (MBD) type Daniel Kiper
2014-10-09 10:28   ` Andrew Cooper
2014-10-10 11:47     ` Daniel Kiper
2014-10-10 12:48       ` Jan Beulich
2014-10-13 10:21       ` Andrew Cooper
2014-10-13 15:14         ` Daniel Kiper
2014-10-14 15:27   ` Jan Beulich
2014-10-14 16:03     ` Daniel Kiper
2014-10-14 16:26       ` Jan Beulich
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 05/16] x86/efi: Add place_string_u32() function Daniel Kiper
2014-10-09 10:30   ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 06/16] x86: Introduce boot_info structure Daniel Kiper
2014-10-09 10:48   ` Andrew Cooper
2014-10-10 13:55   ` Stefano Stabellini
2014-10-10 20:44     ` Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 07/16] x86: Move boot_loader_name from mbi to boot_info Daniel Kiper
2014-10-09 10:53   ` Andrew Cooper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 08/16] x86: Move cmdline " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 09/16] x86: Move legacy BIOS memory map stuff " Daniel Kiper
2014-10-10 14:02   ` Stefano Stabellini
2014-10-10 20:26     ` Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 10/16] x86: Move modules data from mbi to boot_info and remove mbi Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 11/16] x86: Move EFI memory map stuff to boot_info Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 12/16] x86: Move MPS, ACPI and SMBIOS data " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 13/16] x86: Move video " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 14/16] x86: Move HDD " Daniel Kiper
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 15/16] x86/boot: Use %ecx instead of %eax Daniel Kiper
2014-10-09 11:02   ` Andrew Cooper [this message]
2014-10-08 17:52 ` [PATCH for-xen-4.5 v3 16/16] xen/x86: Add multiboot2 protocol support Daniel Kiper
2014-10-09 11:20   ` Andrew Cooper
2014-10-10  8:21     ` Jan Beulich
2014-10-10  8:23 ` [PATCH for-xen-4.5 v3 00/16] xen: Break multiboot (v1) dependency and add multiboot2 support Jan Beulich
2014-10-10 11:07   ` Daniel Kiper
2014-10-10 12:25     ` Jan Beulich
2014-10-10 13:03       ` Daniel Kiper
2014-10-16  8:13 ` Jan Beulich
2014-10-16 12:58   ` Daniel Kiper
2014-10-16 13:41     ` Jan Beulich
2014-10-16 15:33       ` Daniel Kiper
2014-10-16 15:42         ` Jan Beulich

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=54366B5D.3060503@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=daniel.kiper@oracle.com \
    --cc=fu.wei@linaro.org \
    --cc=gang.wei@intel.com \
    --cc=ian.campbell@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=keir@xen.org \
    --cc=ning.sun@intel.com \
    --cc=qiaowei.ren@intel.com \
    --cc=richard.l.maliszewski@intel.com \
    --cc=ross.philipson@citrix.com \
    --cc=roy.franz@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.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 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.