[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-ia64-devel] Re: MiniOS on ia64
Am Dienstag, 11. November 2008 schrieb Samuel Thibault: > Hello, > > 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. > > Samuel > > > Fix mini-os ia64 compilation > > - Move the gntmap.h include to let hypercall-ia64.h get lib.h's memcpy > declaration. This part is not needed because I will clean up the code a little bit. But the rest of your patch works OK for me. Thanks. Dietmar. > - 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/include/lib.h > xen-unstable.hg-mine/extras/mini-os/include/lib.h --- > xen-unstable.hg/extras/mini-os/include/lib.h 2008-11-11 12:05:03.000000000 > +0100 +++ xen-unstable.hg-mine/extras/mini-os/include/lib.h 2008-11-11 > 12:10:18.000000000 +0100 @@ -59,7 +59,6 @@ > #include <stddef.h> > #include <xen/xen.h> > #include <xen/event_channel.h> > -#include "gntmap.h" > > #ifdef HAVE_LIBC > #include <stdio.h> > @@ -147,6 +146,7 @@ > FTYPE_FB, > }; > > +#include "gntmap.h" > #define MAX_EVTCHN_PORTS 16 > > extern struct file { > 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 -- Dietmar Hahn IP SW OS6 Telephone: +49 (0) 89 636 40274 Fujitsu Siemens Computers Email: dietmar.hahn@xxxxxxxxxxxxxxxxxxx Otto-Hahn-Ring 6 Internet: http://www.fujitsu-siemens.com D-81739 München Company details: www.fujitsu-siemens.com/imprint.html _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |