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-ia64-devel

[Xen-ia64-devel] Re: MiniOS on ia64

To: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Subject: [Xen-ia64-devel] Re: MiniOS on ia64
From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Dec 2008 07:56:55 +0100
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 16 Dec 2008 22:57:03 -0800
Domainkey-signature: s=s768; d=fujitsu-siemens.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:From:To:Subject:Date:User-Agent:Cc: References:In-Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-Disposition:Message-Id; b=Ds27NkP2I5iNZADlyRk99PJysCKLQsPikxplCPd5c2hx3hTp2zYpjOHI O0If40ATzNdaRKMO/cSzrg+IHBSQz1GGj0ZTJ5mV90mpNNb8OC8jjBhzc /hTHfCgGe/t6f0t;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20081215133724.GA21771@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200811110947.18562.dietmar.hahn@xxxxxxxxxxxxxxxxxxx> <20081111113232.GB10778@xxxxxxxxxxxxxxxxxxxxxxxxx> <20081215133724.GA21771@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6 (enterprise 20070904.708012)
Hallo Samuel,

Am Montag, 15. Dezember 2008 schrieb Samuel Thibault:
> Hello,
>
> Samuel Thibault, le Tue 11 Nov 2008 12:32:32 +0100, a écrit :
> > Dietmar Hahn, le Tue 11 Nov 2008 09:47:18 +0100, a écrit :
> > > This doesn't work on ia64 because the special object mini-os_app.o is
> > > not linkable with the other objects.
> >
> > Ah, because it's empty, how odd :) Well I think it'd be better to just
> > drop it from the link line. Here is a complete patch that seeems to work
> > for me.
>
> Here is a reworked version without the gntmap.h move (since Dietmar will
> fix it another way), please apply.

Yes I did this already.

>
> Samuel
>
>
> Fix mini-os ia64 compilation
>
> - Avoid nested function to avoid a trampoline.
> - Do not link mini-os_app.o when it is empty.
>
> Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
>
> diff -ur xen-unstable.hg/extras/mini-os/kernel.c
> xen-unstable.hg-mine/extras/mini-os/kernel.c ---
> xen-unstable.hg/extras/mini-os/kernel.c       2008-11-11 12:05:03.000000000 
> +0100
> +++ xen-unstable.hg-mine/extras/mini-os/kernel.c      2008-11-11
> 12:25:04.000000000 +0100 @@ -434,25 +434,25 @@
>
>  static struct pcifront_dev *pci_dev;
>
> -static void pcifront_thread(void *p)
> +static void print_pcidev(unsigned int domain, unsigned int bus, unsigned
> int slot, unsigned int fun) {
> -    void print(unsigned int domain, unsigned int bus, unsigned int slot,
> unsigned int fun) -    {
> -        unsigned int vendor, device, rev, class;
> +    unsigned int vendor, device, rev, class;
>
> -        pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x00, 2,
> &vendor); -        pcifront_conf_read(pci_dev, domain, bus, slot, fun,
> 0x02, 2, &device); -        pcifront_conf_read(pci_dev, domain, bus, slot,
> fun, 0x08, 1, &rev); -        pcifront_conf_read(pci_dev, domain, bus,
> slot, fun, 0x0a, 2, &class); +    pcifront_conf_read(pci_dev, domain, bus,
> slot, fun, 0x00, 2, &vendor); +    pcifront_conf_read(pci_dev, domain, bus,
> slot, fun, 0x02, 2, &device); +    pcifront_conf_read(pci_dev, domain, bus,
> slot, fun, 0x08, 1, &rev); +    pcifront_conf_read(pci_dev, domain, bus,
> slot, fun, 0x0a, 2, &class);
>
> -        printk("%04x:%02x:%02x.%02x %04x: %04x:%04x (rev %02x)\n", domain,
> bus, slot, fun, class, vendor, device, rev); -    }
> +    printk("%04x:%02x:%02x.%02x %04x: %04x:%04x (rev %02x)\n", domain,
> bus, slot, fun, class, vendor, device, rev); +}
>
> +static void pcifront_thread(void *p)
> +{
>      pci_dev = init_pcifront(NULL);
>      if (!pci_dev)
>          return;
>      printk("PCI devices:\n");
> -    pcifront_scan(pci_dev, print);
> +    pcifront_scan(pci_dev, print_pcidev);
>  }
>
>  static void fs_thread(void *p)
> diff -ur xen-unstable.hg/extras/mini-os/Makefile
> xen-unstable.hg-mine/extras/mini-os/Makefile ---
> xen-unstable.hg/extras/mini-os/Makefile       2008-11-11 12:05:03.000000000 
> +0100
> +++ xen-unstable.hg-mine/extras/mini-os/Makefile      2008-11-11
> 12:16:04.000000000 +0100 @@ -93,8 +93,12 @@
>  $(OBJ_DIR)/$(TARGET)_app.o: $(APP_OBJS) app.lds
>       $(LD) -r -d $(LDFLAGS) -\( $^ -\) $(APP_LDLIBS) --undefined main -o $@
>
> -$(OBJ_DIR)/$(TARGET): links $(OBJS) $(OBJ_DIR)/$(TARGET)_app.o arch_lib
> -     $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(OBJ_DIR)/$(TARGET)_app.o $(OBJS)
> $(LDARCHLIB) $(LDLIBS) -o $@.o +ifneq ($(APP_OBJS),)
> +APP_O=$(OBJ_DIR)/$(TARGET)_app.o
> +endif
> +
> +$(OBJ_DIR)/$(TARGET): links $(OBJS) $(APP_O) arch_lib
> +     $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(OBJS) $(LDARCHLIB) $(LDLIBS)
> -o $@.o $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
>       $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
>       gzip -f -9 -c $@ >$@.gz

The patch works fine for me, mini-os on ia64 compiles now fine again.
Please send it to xen-devel@xxxxxxxxxxxxxxxxxxx for checkin because it's all 
common code.
Thanks.

Dietmar.


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

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