Date: Fri, 7 Dec 2007 07:07:25 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 130395 for review Message-ID: <200712070707.lB777PRb087497@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130395 Change 130395 by kmacy@entropy_kmacy_xen31 on 2007/12/07 07:07:20 final bits to get domU kernel to link Affected files ... .. //depot/projects/xen31/sys/conf/files#8 edit .. //depot/projects/xen31/sys/conf/files.i386#7 edit .. //depot/projects/xen31/sys/i386/include/trap.h#2 edit .. //depot/projects/xen31/sys/i386/pci/pci_cfgreg.c#3 edit .. //depot/projects/xen31/sys/i386/pci/pci_pir.c#2 edit .. //depot/projects/xen31/sys/i386/xen/clock.c#1 add .. //depot/projects/xen31/sys/xen/evtchn/evtchn_dev.c#1 add Differences ... ==== //depot/projects/xen31/sys/conf/files#8 (text+ko) ==== @@ -2108,7 +2108,8 @@ vm/vm_zeroidle.c standard vm/vnode_pager.c standard xen/gnttab.c optional xen -xen/evtchn.c optional xen +xen/evtchn/evtchn.c optional xen +xen/evtchn/evtchn_dev.c optional xen # gnu/fs/xfs/xfs_alloc.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" \ ==== //depot/projects/xen31/sys/conf/files.i386#7 (text+ko) ==== @@ -347,7 +347,8 @@ i386/ibcs2/imgact_coff.c optional ibcs2 i386/isa/atpic.c standard #i386/isa/atpic_vector.s standard -i386/isa/clock.c standard +i386/isa/clock.c optional native +i386/xen/clock.c optional xen i386/isa/elcr.c standard i386/isa/elink.c optional ep | ie i386/isa/isa.c optional isa ==== //depot/projects/xen31/sys/i386/include/trap.h#2 (text+ko) ==== @@ -49,6 +49,9 @@ #define T_PAGEFLT 12 /* page fault */ #define T_ALIGNFLT 14 /* alignment fault */ +#ifdef XEN +#define T_HYPCALLBACK 17 /* hypervisor upcall */ +#endif #define T_DIVIDE 18 /* integer divide fault */ #define T_NMI 19 /* non-maskable trap */ #define T_OFLOW 20 /* overflow trap */ ==== //depot/projects/xen31/sys/i386/pci/pci_cfgreg.c#3 (text+ko) ==== @@ -82,9 +82,10 @@ static int pcireg_cfgread(int bus, int slot, int func, int reg, int bytes); static void pcireg_cfgwrite(int bus, int slot, int func, int reg, int data, int bytes); +#ifndef XEN static int pcireg_cfgopen(void); - static int pciereg_cfgopen(void); +#endif static int pciereg_cfgread(int bus, int slot, int func, int reg, int bytes); static void pciereg_cfgwrite(int bus, int slot, int func, int reg, @@ -105,6 +106,7 @@ return (line); } +#ifndef XEN static u_int16_t pcibios_get_version(void) { @@ -125,6 +127,7 @@ } return (args.ebx & 0xffff); } +#endif /* * Initialise access to PCI configuration space @@ -132,6 +135,7 @@ int pci_cfgregopen(void) { +#ifndef XEN static int opened = 0; u_int16_t vid, did; u_int16_t v; @@ -173,7 +177,7 @@ pciereg_cfgopen(); } } - +#endif return(1); } @@ -353,6 +357,7 @@ mtx_unlock_spin(&pcicfg_mtx); } +#ifndef XEN /* check whether the configuration mechanism has been correctly identified */ static int pci_cfgcheck(int maxdev) @@ -530,6 +535,7 @@ devmax = 32; return (1); } +#endif #define PCIE_PADDR(bar, reg, bus, slot, func) \ ((bar) | \ ==== //depot/projects/xen31/sys/i386/pci/pci_pir.c#2 (text+ko) ==== @@ -80,8 +80,10 @@ struct PIR_intpin* intpin, void *arg); static void pci_print_irqmask(u_int16_t irqs); +#ifndef XEN static int pci_pir_biosroute(int bus, int device, int func, int pin, int irq); +#endif static int pci_pir_choose_irq(struct pci_link *pci_link, int irqmask); static void pci_pir_create_links(struct PIR_entry *entry, struct PIR_intpin *intpin, void *arg); @@ -133,6 +135,9 @@ void pci_pir_open(void) { +#if defined(XEN) && !defined(XEN_DOM0) + return; +#else struct PIR_table *pt; uint32_t sigaddr; int i; @@ -165,6 +170,8 @@ pci_route_count = (pt->pt_header.ph_length - sizeof(struct PIR_header)) / sizeof(struct PIR_entry); +# +#endif } /* @@ -466,7 +473,7 @@ printf(" ]\n"); } } - +#ifndef XEN /* * Use the PCI BIOS to route an interrupt for a given device. * @@ -487,7 +494,7 @@ args.ecx = (irq << 8) | (0xa + pin); return (bios32(&args, PCIbios.ventry, GSEL(GCODE_SEL, SEL_KPL))); } - +#endif /* * Route a PCI interrupt using a link device from the $PIR. @@ -497,7 +504,7 @@ { struct pci_link_lookup lookup; struct pci_link *pci_link; - int error, irq; + int irq; if (pci_route_table == NULL) return (PCI_INVALID_IRQ); @@ -539,9 +546,11 @@ } pci_link->pl_irq = irq; } - +#ifndef XEN /* Ask the BIOS to route this IRQ if we haven't done so already. */ if (!pci_link->pl_routed) { + int error; + error = pci_pir_biosroute(bus, device, func, pin - 1, pci_link->pl_irq); @@ -557,6 +566,7 @@ BUS_CONFIG_INTR(pir_device, pci_link->pl_irq, INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW); } +#endif if (bootverbose) printf("$PIR: %d:%d INT%c routed to irq %d\n", bus, device, pin - 1 + 'A', pci_link->pl_irq); @@ -677,6 +687,7 @@ return (0); } +#ifndef XEN static void pir_resume_find_device(struct PIR_entry *entry, struct PIR_intpin *intpin, void *arg) @@ -690,10 +701,12 @@ pd->device = entry->pe_device; pd->pin = intpin - entry->pe_intpin; } +#endif static int pir_resume(device_t dev) { +#ifndef XEN struct pci_dev_lookup pd; struct pci_link *pci_link; int error; @@ -726,6 +739,7 @@ pci_link->pl_id); } } +#endif return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712070707.lB777PRb087497>