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: RE: Problem with config file (Petersson, Mats)

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] RE: RE: Problem with config file (Petersson, Mats)
From: "frittitta1@xxxxxxxxxxx" <frittitta1@xxxxxxxxxxx>
Date: Tue, 8 Aug 2006 17:48:02 +0100 (GMT+01:00)
Delivery-date: Tue, 08 Aug 2006 09:48:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Reply-to: "frittitta1@xxxxxxxxxxx" <frittitta1@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I would do a simple thing: to write 

xm create -c <config file>

and 
to load a simple program which print a simple message ("Thi is the 
hello world program") on the screen!
I created a simple assembler 
program which print the message:

                .text
        .globl  _start
_start:
        cld

        # from include/asm-xeno/hypervisor.h

        movl    $2,%
eax                 # __HYPERVISOR_console_write (include/asm-
xeno/hypervisor-ifs/hypervisor-if.h)
        movl    $hello_message,%ebx     
#  arg1 = buffer virtual address
        movl    $hello_message_len,%ecx #  
arg2 = buffer length
        int     $0x82

    # from include/asm-
xeno/hypervisor.h

        movl    $8,%eax                 # 
__HYPERVISOR_sched_op
        movl    $1,%ebx                 # SCHEDOP_exit
        
int     $0x82

hang:   
        jmp     hang                    # shouldn't 
get here

hello_message:  .ascii  "This is the hello world program\n"
        
hello_message_len = . - hello_message

The Xen loader also wants a 12-
byte header on the image file. So I wrote a little assembler module 
(xenoguestheader.s) to handle that: 

        .text
        .globl  
_start
   _start:
        .ascii  "XenoGues"      # read_kernel_header 
(tools/xc/lib/xc_linux_build.c)
        .long   _start          # - the 
kernel's load address


The final image has to consist of the 12-bytes 
object code from xenoguestheader.s followed the object code from 
helloworld.s. Here is my makefile to accomplish that:

        
helloworld.gz: helloworld.s xenoguestheader.raw
        as -o helloworld.o -
a=helloworld.l helloworld.s
        ld -Ttext 0x100000 -o helloworld.elf 
helloworld.o
        objcopy -O binary -S -g helloworld.elf helloworld.raw
        
cat xenoguestheader.raw helloworld.raw | gzip > helloworld.gz

        
xenoguestheader.raw: xenoguestheader.s
        as -o xenoguestheader.o 
xenoguestheader.s
        ld -Ttext 0x100000 -o xenoguestheader 
xenoguestheader.o
        objcopy -O binary -S -g xenoguestheader 
xenoguestheader.raw


This example is at the URL www.o3one.org/xen.
html, but the config file run on Xen 1.2.
I would make something but 
for Xen 3.X.

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] RE: RE: Problem with config file (Petersson, Mats), frittitta1@xxxxxxxxxxx <=