WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [RFC PATCH 10/35] Add a new head.S start-of-day file for

To: Andi Kleen <ak@xxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 10/35] Add a new head.S start-of-day file for booting on Xen.
From: Chris Wright <chrisw@xxxxxxxxxxxx>
Date: Wed, 22 Mar 2006 10:58:36 -0800
Cc: Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Delivery-date: Wed, 22 Mar 2006 18:59:56 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200603221443.54119.ak@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060322063040.960068000@xxxxxxxxxxxxxxxxxx> <20060322063748.490176000@xxxxxxxxxxxxxxxxxx> <200603221443.54119.ak@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
* Andi Kleen (ak@xxxxxxx) wrote:
> > +   /* get vendor info */
> > +   xorl %eax,%eax                  # call CPUID with 0 -> return vendor ID
> > +   cpuid
> > +   movl %eax,X86_CPUID             # save CPUID level
> > +   movl %ebx,X86_VENDOR_ID         # lo 4 chars
> > +   movl %edx,X86_VENDOR_ID+4       # next 4 chars
> > +   movl %ecx,X86_VENDOR_ID+8       # last 4 chars
> > +
> > +   movl $1,%eax            # Use the CPUID instruction to get CPU type
> > +   cpuid
> > +   movb %al,%cl            # save reg for future use
> > +   andb $0x0f,%ah          # mask processor family
> > +   movb %ah,X86
> > +   andb $0xf0,%al          # mask model
> > +   shrb $4,%al
> > +   movb %al,X86_MODEL
> > +   andb $0x0f,%cl          # mask mask revision
> > +   movb %cl,X86_MASK
> > +   movl %edx,X86_CAPABILITY
> 
> Can you make the CPU detection a common subfunction with the normal head.S ?

I don't see why not, prefer to share as much as possible.

> > +/*
> > + * BSS section
> > + */
> > +.section ".bss.page_aligned","w"
> > +ENTRY(swapper_pg_dir)
> > +   .fill 1024,4,0
> > +ENTRY(empty_zero_page)
> > +   .fill 4096,1,0
> > +
> > +/*
> > + * This starts the data section.
> > + */
> > +.data
> > +
> > +   ALIGN
> > +   .word 0                         # 32 bit align gdt_desc.address
> > +   .globl cpu_gdt_descr
> > +cpu_gdt_descr:
> > +   .word GDT_SIZE
> > +   .long cpu_gdt_table
> > +
> > +   .fill NR_CPUS-1,8,0             # space for the other GDT descriptors
> > +
> > +/*
> > + * The Global Descriptor Table contains 28 quadwords, per-CPU.
> > + */
> > +   .align PAGE_SIZE_asm
> > +ENTRY(cpu_gdt_table)
> 
> GDT and empty_zero_page should be shared (they're identical right?) Put them 
> into a 
> new separate common file.

There's still kernel/user cs/ds in gdt, so it's not all zero.

thanks,
-chris

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>