ia64/xen-unstable

changeset 3049:f5f178da1fbd

bitkeeper revision 1.1159.179.4 (419d4114nkyg4h9bvzeg9cCGGAkKLQ)

Update Linux 2.6 port to 2.6.10-rc2.
author cl349@arcadians.cl.cam.ac.uk
date Fri Nov 19 00:40:52 2004 +0000 (2004-11-19)
parents ceacd1c23c6c
children 33c4dd769467
files .rootkeys linux-2.6.10-rc2-xen-sparse/arch/xen/Kconfig linux-2.6.10-rc2-xen-sparse/arch/xen/Kconfig.drivers linux-2.6.10-rc2-xen-sparse/arch/xen/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/boot/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/configs/xen0_defconfig linux-2.6.10-rc2-xen-sparse/arch/xen/configs/xenU_defconfig linux-2.6.10-rc2-xen-sparse/arch/xen/i386/Kconfig linux-2.6.10-rc2-xen-sparse/arch/xen/i386/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/cpu/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/irq.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/signal.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vsyscall.S linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vsyscall.lds linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/pageattr.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/pci/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/i386/pci/direct.c linux-2.6.10-rc2-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/Makefile linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/ctrl_if.c linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/empty.c linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/fixup.c linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/reboot.c linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/skbuff.c linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/xen_proc.c linux-2.6.10-rc2-xen-sparse/drivers/Makefile linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c linux-2.6.10-rc2-xen-sparse/drivers/char/tty_io.c linux-2.6.10-rc2-xen-sparse/drivers/xen/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/balloon/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/common.h linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/control.c linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/interface.c linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/vbd.c linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/Kconfig linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/block.h linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6.10-rc2-xen-sparse/drivers/xen/console/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/console/console.c linux-2.6.10-rc2-xen-sparse/drivers/xen/evtchn/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/evtchn/evtchn.c linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/common.h linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/control.c linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/interface.c linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/netback.c linux-2.6.10-rc2-xen-sparse/drivers/xen/netfront/Kconfig linux-2.6.10-rc2-xen-sparse/drivers/xen/netfront/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6.10-rc2-xen-sparse/drivers/xen/privcmd/Makefile linux-2.6.10-rc2-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6.10-rc2-xen-sparse/include/asm-generic/pgtable.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/desc.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/floppy.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/highmem.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/io.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/msr.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/param.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pci.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/processor.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/ptrace.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/segment.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/setup.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/tlbflush.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/vga.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/xor.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/ctrl_if.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/evtchn.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/foreign_page.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/gnttab.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/hypervisor.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/linux-public/privcmd.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/linux-public/suspend.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/multicall.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/queues.h linux-2.6.10-rc2-xen-sparse/include/asm-xen/xen_proc.h linux-2.6.10-rc2-xen-sparse/include/linux/gfp.h linux-2.6.10-rc2-xen-sparse/include/linux/skbuff.h linux-2.6.10-rc2-xen-sparse/mkbuildtree linux-2.6.10-rc2-xen-sparse/mm/memory.c linux-2.6.10-rc2-xen-sparse/mm/page_alloc.c linux-2.6.10-rc2-xen-sparse/net/core/skbuff.c linux-2.6.10-rc2-xen-sparse/net/ipv4/raw.c linux-2.6.9-xen-sparse/arch/xen/Kconfig linux-2.6.9-xen-sparse/arch/xen/Kconfig.drivers linux-2.6.9-xen-sparse/arch/xen/Makefile linux-2.6.9-xen-sparse/arch/xen/boot/Makefile linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig linux-2.6.9-xen-sparse/arch/xen/i386/Kconfig linux-2.6.9-xen-sparse/arch/xen/i386/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/common.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S linux-2.6.9-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/irq.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ldt.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/setup.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/signal.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/sysenter.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.S linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.lds linux-2.6.9-xen-sparse/arch/xen/i386/mm/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/highmem.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/hypervisor.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c linux-2.6.9-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6.9-xen-sparse/arch/xen/i386/pci/Makefile linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c linux-2.6.9-xen-sparse/arch/xen/kernel/Makefile linux-2.6.9-xen-sparse/arch/xen/kernel/ctrl_if.c linux-2.6.9-xen-sparse/arch/xen/kernel/empty.c linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c linux-2.6.9-xen-sparse/arch/xen/kernel/fixup.c linux-2.6.9-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c linux-2.6.9-xen-sparse/arch/xen/kernel/skbuff.c linux-2.6.9-xen-sparse/arch/xen/kernel/xen_proc.c linux-2.6.9-xen-sparse/drivers/Makefile linux-2.6.9-xen-sparse/drivers/char/mem.c linux-2.6.9-xen-sparse/drivers/char/tty_io.c linux-2.6.9-xen-sparse/drivers/xen/Makefile linux-2.6.9-xen-sparse/drivers/xen/balloon/Makefile linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6.9-xen-sparse/drivers/xen/blkback/Makefile linux-2.6.9-xen-sparse/drivers/xen/blkback/blkback.c linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h linux-2.6.9-xen-sparse/drivers/xen/blkback/control.c linux-2.6.9-xen-sparse/drivers/xen/blkback/interface.c linux-2.6.9-xen-sparse/drivers/xen/blkback/vbd.c linux-2.6.9-xen-sparse/drivers/xen/blkfront/Kconfig linux-2.6.9-xen-sparse/drivers/xen/blkfront/Makefile linux-2.6.9-xen-sparse/drivers/xen/blkfront/blkfront.c linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c linux-2.6.9-xen-sparse/drivers/xen/console/Makefile linux-2.6.9-xen-sparse/drivers/xen/console/console.c linux-2.6.9-xen-sparse/drivers/xen/evtchn/Makefile linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c linux-2.6.9-xen-sparse/drivers/xen/netback/Makefile linux-2.6.9-xen-sparse/drivers/xen/netback/common.h linux-2.6.9-xen-sparse/drivers/xen/netback/control.c linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c linux-2.6.9-xen-sparse/drivers/xen/netback/netback.c linux-2.6.9-xen-sparse/drivers/xen/netfront/Kconfig linux-2.6.9-xen-sparse/drivers/xen/netfront/Makefile linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c linux-2.6.9-xen-sparse/drivers/xen/privcmd/Makefile linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c linux-2.6.9-xen-sparse/include/asm-generic/pgtable.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/desc.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/floppy.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/highmem.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mmu_context.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/msr.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/param.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pci.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/processor.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/ptrace.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/segment.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/setup.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/system.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/vga.h linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/xor.h linux-2.6.9-xen-sparse/include/asm-xen/ctrl_if.h linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h linux-2.6.9-xen-sparse/include/asm-xen/foreign_page.h linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h linux-2.6.9-xen-sparse/include/asm-xen/linux-public/privcmd.h linux-2.6.9-xen-sparse/include/asm-xen/linux-public/suspend.h linux-2.6.9-xen-sparse/include/asm-xen/multicall.h linux-2.6.9-xen-sparse/include/asm-xen/queues.h linux-2.6.9-xen-sparse/include/asm-xen/xen_proc.h linux-2.6.9-xen-sparse/include/linux/bio.h linux-2.6.9-xen-sparse/include/linux/gfp.h linux-2.6.9-xen-sparse/include/linux/skbuff.h linux-2.6.9-xen-sparse/mkbuildtree linux-2.6.9-xen-sparse/mm/memory.c linux-2.6.9-xen-sparse/mm/page_alloc.c linux-2.6.9-xen-sparse/net/core/skbuff.c linux-2.6.9-xen-sparse/net/ipv4/raw.c
line diff
     1.1 --- a/.rootkeys	Thu Nov 18 16:06:12 2004 +0000
     1.2 +++ b/.rootkeys	Fri Nov 19 00:40:52 2004 +0000
     1.3 @@ -127,132 +127,131 @@ 409ba2e7akOFqQUg6Qyg2s28xcXiMg linux-2.4
     1.4  3e5a4e683HKVU-sxtagrDasRB8eBVw linux-2.4.27-xen-sparse/mm/swapfile.c
     1.5  41180721bNns9Na7w1nJ0ZVt8bhUNA linux-2.4.27-xen-sparse/mm/vmalloc.c
     1.6  41505c57WAd5l1rlfCLNSCpx9J13vA linux-2.4.27-xen-sparse/net/core/skbuff.c
     1.7 -40f562372u3A7_kfbYYixPHJJxYUxA linux-2.6.9-xen-sparse/arch/xen/Kconfig
     1.8 -40f56237utH41NPukqHksuNf29IC9A linux-2.6.9-xen-sparse/arch/xen/Kconfig.drivers
     1.9 -40f56237penAAlWVBVDpeQZNFIg8CA linux-2.6.9-xen-sparse/arch/xen/Makefile
    1.10 -40f56237JTc60m1FRlUxkUaGSQKrNw linux-2.6.9-xen-sparse/arch/xen/boot/Makefile
    1.11 -40f56237hRxbacU_3PdoAl6DjZ3Jnw linux-2.6.9-xen-sparse/arch/xen/configs/xen0_defconfig
    1.12 -40f56237wubfjJKlfIzZlI3ZM2VgGA linux-2.6.9-xen-sparse/arch/xen/configs/xenU_defconfig
    1.13 -40f56237Mta0yHNaMS_qtM2rge0qYA linux-2.6.9-xen-sparse/arch/xen/i386/Kconfig
    1.14 -40f56238u2CJdXNpjsZgHBxeVyY-2g linux-2.6.9-xen-sparse/arch/xen/i386/Makefile
    1.15 -40f56238eczveJ86k_4hNxCLRQIF-g linux-2.6.9-xen-sparse/arch/xen/i386/kernel/Makefile
    1.16 -40f56238rXVTJQKbBuXXLH52qEArcg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/Makefile
    1.17 -40f562385s4lr6Zg92gExe7UQ4A76Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/cpu/common.c
    1.18 -40f56238XDtHSijkAFlbv1PT8Bhw_Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/entry.S
    1.19 -40f56238bnvciAuyzAiMkdzGErYt1A linux-2.6.9-xen-sparse/arch/xen/i386/kernel/head.S
    1.20 -40f58a0d31M2EkuPbG94ns_nOi0PVA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c
    1.21 -40faa751_zbZlAmLyQgCXdYekVFdWA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ioport.c
    1.22 -40f562382aC3_Gt4RG-4ZsfvDRUg3Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/irq.c
    1.23 -40f56238ue3YRsK52HG7iccNzP1AwQ linux-2.6.9-xen-sparse/arch/xen/i386/kernel/ldt.c
    1.24 -4107adf1cNtsuOxOB4T6paAoY2R2PA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/pci-dma.c
    1.25 -40f56238a8iOVDEoostsbun_sy2i4g linux-2.6.9-xen-sparse/arch/xen/i386/kernel/process.c
    1.26 -40f56238YQIJoYG2ehDGEcdTgLmGbg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/setup.c
    1.27 -40f56238nWMQg7CKbyTy0KJNvCzbtg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/signal.c
    1.28 -40f56238UL9uv78ODDzMwLL9yryeFw linux-2.6.9-xen-sparse/arch/xen/i386/kernel/sysenter.c
    1.29 -40f56238qVGkpO_ycnQA8k03kQzAgA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c
    1.30 -40f56238NzTgeO63RGoxHrW5NQeO3Q linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/Makefile
    1.31 -40f56238BMqG5PuSHufpjbvp_helBw linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
    1.32 -40f562389xNa78YBZciUibQjyRU_Lg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/traps.c
    1.33 -40f56238qASEI_IOhCKWNuwFKNZrKQ linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S
    1.34 -40f56238JypKAUG01ZojFwH7qnZ5uA linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.S
    1.35 -40f56238wi6AdNQjm0RT57bSkwb6hg linux-2.6.9-xen-sparse/arch/xen/i386/kernel/vsyscall.lds
    1.36 -40f56238a3w6-byOzexIlMgni76Lcg linux-2.6.9-xen-sparse/arch/xen/i386/mm/Makefile
    1.37 -40f56238ILx8xlbywNbzTdv5Zr4xXQ linux-2.6.9-xen-sparse/arch/xen/i386/mm/fault.c
    1.38 -4118cc35CbY8rfGVspF5O-7EkXBEAA linux-2.6.9-xen-sparse/arch/xen/i386/mm/highmem.c
    1.39 -40f562383SKvDStdtrvzr5fyCbW4rw linux-2.6.9-xen-sparse/arch/xen/i386/mm/hypervisor.c
    1.40 -40f56239xcNylAxuGsQHwi1AyMLV8w linux-2.6.9-xen-sparse/arch/xen/i386/mm/init.c
    1.41 -41062ab7CjxC1UBaFhOMWWdhHkIUyg linux-2.6.9-xen-sparse/arch/xen/i386/mm/ioremap.c
    1.42 -413b5ab8LIowAnQrEmaOJSdmqm96jQ linux-2.6.9-xen-sparse/arch/xen/i386/mm/pageattr.c
    1.43 -40f5623906UYHv1rsVUeRc0tFT0dWw linux-2.6.9-xen-sparse/arch/xen/i386/mm/pgtable.c
    1.44 -4107adf12ndy94MidCaivDibJ3pPAg linux-2.6.9-xen-sparse/arch/xen/i386/pci/Makefile
    1.45 -4107adf1WcCgkhsdLTRGX52cOG1vJg linux-2.6.9-xen-sparse/arch/xen/i386/pci/direct.c
    1.46 -4107adf1s5u6249DNPUViX1YNagbUQ linux-2.6.9-xen-sparse/arch/xen/i386/pci/irq.c
    1.47 -40f56239zOksGg_H4XD4ye6iZNtoZA linux-2.6.9-xen-sparse/arch/xen/kernel/Makefile
    1.48 -40f56239bvOjuuuViZ0XMlNiREFC0A linux-2.6.9-xen-sparse/arch/xen/kernel/ctrl_if.c
    1.49 -40f56239pYRq5yshPTkv3ujXKc8K6g linux-2.6.9-xen-sparse/arch/xen/kernel/empty.c
    1.50 -40f56238xFQe9T7M_U_FItM-bZIpLw linux-2.6.9-xen-sparse/arch/xen/kernel/evtchn.c
    1.51 -4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6.9-xen-sparse/arch/xen/kernel/fixup.c
    1.52 -412dfae9eA3_6e6bCGUtg1mj8b56fQ linux-2.6.9-xen-sparse/arch/xen/kernel/gnttab.c
    1.53 -40f562392LBhwmOxVPsYdkYXMxI_ZQ linux-2.6.9-xen-sparse/arch/xen/kernel/reboot.c
    1.54 -414c113396tK1HTVeUalm3u-1DF16g linux-2.6.9-xen-sparse/arch/xen/kernel/skbuff.c
    1.55 -3f68905c5eiA-lBMQSvXLMWS1ikDEA linux-2.6.9-xen-sparse/arch/xen/kernel/xen_proc.c
    1.56 -41261688yS8eAyy-7kzG4KBs0xbYCA linux-2.6.9-xen-sparse/drivers/Makefile
    1.57 -4108f5c1WfTIrs0HZFeV39sttekCTw linux-2.6.9-xen-sparse/drivers/char/mem.c
    1.58 -4111308bZAIzwf_Kzu6x1TZYZ3E0_Q linux-2.6.9-xen-sparse/drivers/char/tty_io.c
    1.59 -40f56239Dp_vMTgz8TEbvo1hjHGc3w linux-2.6.9-xen-sparse/drivers/xen/Makefile
    1.60 -41768fbcncpBQf8s2l2-CwoSNIZ9uA linux-2.6.9-xen-sparse/drivers/xen/balloon/Makefile
    1.61 -3e6377f8i5e9eGz7Pw6fQuhuTQ7DQg linux-2.6.9-xen-sparse/drivers/xen/balloon/balloon.c
    1.62 -410d0893otFGghmv4dUXDUBBdY5aIA linux-2.6.9-xen-sparse/drivers/xen/blkback/Makefile
    1.63 -4087cf0d1XgMkooTZAiJS6NrcpLQNQ linux-2.6.9-xen-sparse/drivers/xen/blkback/blkback.c
    1.64 -4087cf0dZadZ8r6CEt4fNN350Yle3A linux-2.6.9-xen-sparse/drivers/xen/blkback/common.h
    1.65 -4087cf0dxlh29iw0w-9rxOCEGCjPcw linux-2.6.9-xen-sparse/drivers/xen/blkback/control.c
    1.66 -4087cf0dbuoH20fMjNZjcgrRK-1msQ linux-2.6.9-xen-sparse/drivers/xen/blkback/interface.c
    1.67 -4087cf0dk97tacDzxfByWV7JifUYqA linux-2.6.9-xen-sparse/drivers/xen/blkback/vbd.c
    1.68 -40f56239Sfle6wGv5FS0wjS_HI150A linux-2.6.9-xen-sparse/drivers/xen/blkfront/Kconfig
    1.69 -40f562395atl9x4suKGhPkjqLOXESg linux-2.6.9-xen-sparse/drivers/xen/blkfront/Makefile
    1.70 -40f56239-JNIaTzlviVJohVdoYOUpw linux-2.6.9-xen-sparse/drivers/xen/blkfront/blkfront.c
    1.71 -40f56239y9naBTXe40Pi2J_z3p-d1g linux-2.6.9-xen-sparse/drivers/xen/blkfront/block.h
    1.72 -40f56239BVfPsXBiWQitXgDRtOsiqg linux-2.6.9-xen-sparse/drivers/xen/blkfront/vbd.c
    1.73 -40f56239fsLjvtD8YBRAWphps4FDjg linux-2.6.9-xen-sparse/drivers/xen/console/Makefile
    1.74 -3e5a4e651TH-SXHoufurnWjgl5bfOA linux-2.6.9-xen-sparse/drivers/xen/console/console.c
    1.75 -40f56239KYxO0YabhPzCTeUuln-lnA linux-2.6.9-xen-sparse/drivers/xen/evtchn/Makefile
    1.76 -40f56239DoibTX6R-ZYd3QTXAB8_TA linux-2.6.9-xen-sparse/drivers/xen/evtchn/evtchn.c
    1.77 -410a9817HEVJvred5Oy_uKH3HFJC5Q linux-2.6.9-xen-sparse/drivers/xen/netback/Makefile
    1.78 -4097ba831lpGeLlPg-bfV8XarVVuoQ linux-2.6.9-xen-sparse/drivers/xen/netback/common.h
    1.79 -4097ba83wvv8yi5P5xugCUBAdb6O-A linux-2.6.9-xen-sparse/drivers/xen/netback/control.c
    1.80 -4097ba83byY5bTSugJGZ1exTxIcMKw linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c
    1.81 -4087cf0dGmSbFhFZyIZBJzvqxY-qBw linux-2.6.9-xen-sparse/drivers/xen/netback/netback.c
    1.82 -40f56239lrg_Ob0BJ8WBFS1zeg2CYw linux-2.6.9-xen-sparse/drivers/xen/netfront/Kconfig
    1.83 -40f56239Wd4k_ycG_mFsSO1r5xKdtQ linux-2.6.9-xen-sparse/drivers/xen/netfront/Makefile
    1.84 -405853f6nbeazrNyEWNHBuoSg2PiPA linux-2.6.9-xen-sparse/drivers/xen/netfront/netfront.c
    1.85 -4108f5c1ppFXVpQzCOAZ6xXYubsjKA linux-2.6.9-xen-sparse/drivers/xen/privcmd/Makefile
    1.86 -3e5a4e65IUfzzMu2kZFlGEB8-rpTaA linux-2.6.9-xen-sparse/drivers/xen/privcmd/privcmd.c
    1.87 -412f47e4RKD-R5IS5gEXvcT8L4v8gA linux-2.6.9-xen-sparse/include/asm-generic/pgtable.h
    1.88 -40f56239YAjS52QG2FIAQpHDZAdGHg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/desc.h
    1.89 -4107adf1E5O4ztGHNGMzCCNhcvqNow linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h
    1.90 -40f5623akIoBsQ3KxSB2kufkbgONXQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/fixmap.h
    1.91 -41979925z1MsKU1SfuuheM1IFDQ_bA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/floppy.h
    1.92 -4118b6a418gnL6AZsTdglC92YGqYTg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/highmem.h
    1.93 -40f5623aJVXQwpJMOLE99XgvGsfQ8Q linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/io.h
    1.94 -40f5623aKXkBBxgpLx2NcvkncQ1Yyw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h
    1.95 -40f5623aDMCsWOFO0jktZ4e8sjwvEg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
    1.96 -40f5623arsFXkGdPvIqvFi3yFXGR0Q linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h
    1.97 -4120f807GCO0uqsLqdZj9csxR1Wthw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/mmu_context.h
    1.98 -40f5623aFTyFTR-vdiA-KaGxk5JOKQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/msr.h
    1.99 -40f5623adgjZq9nAgCt0IXdWl7udSA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/page.h
   1.100 -40f5623a54NuG-7qHihGYmw4wWQnMA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/param.h
   1.101 -41137cc1kkvg0cg7uxddcEfjL7L67w linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pci.h
   1.102 -40f5623atCokYc2uCysSJ8jFO8TEsw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgalloc.h
   1.103 -412e01beTwiaC8sYY4XJP8PxLST5CA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h
   1.104 -40f5623aEToIXouJgO-ao5d5pcEt1w linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h
   1.105 -40f5623aCCXRPlGpNthVXstGz9ZV3A linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/pgtable.h
   1.106 -40f5623aPCkQQfPtJSooGdhcatrvnQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/processor.h
   1.107 -412ea0afQL2CAI-f522TbLjLPMibPQ linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/ptrace.h
   1.108 -40f5623bzLvxr7WoJIxVf2OH4rCBJg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/segment.h
   1.109 -40f5623bG_LzgG6-qwk292nTc5Wabw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/setup.h
   1.110 -40f5623bgzm_9vwxpzJswlAxg298Gg linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h
   1.111 -40f5623bVdKP7Dt7qm8twu3NcnGNbA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/system.h
   1.112 -40f5623bc8LKPRO09wY5dGDnY_YCpw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/tlbflush.h
   1.113 -41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/vga.h
   1.114 -40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.9-xen-sparse/include/asm-xen/asm-i386/xor.h
   1.115 -40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.9-xen-sparse/include/asm-xen/ctrl_if.h
   1.116 -40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.9-xen-sparse/include/asm-xen/evtchn.h
   1.117 -419b4e9367PjTEvdjwavWN12BeBBXg linux-2.6.9-xen-sparse/include/asm-xen/foreign_page.h
   1.118 -412dfaeazclyNDM0cpnp60Yo4xulpQ linux-2.6.9-xen-sparse/include/asm-xen/gnttab.h
   1.119 -40f5623aGPlsm0u1LTO-NVZ6AGzNRQ linux-2.6.9-xen-sparse/include/asm-xen/hypervisor.h
   1.120 -3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.9-xen-sparse/include/asm-xen/linux-public/privcmd.h
   1.121 -3fa8e3f0kBLeE4To2vpdi3cpJbIkbQ linux-2.6.9-xen-sparse/include/asm-xen/linux-public/suspend.h
   1.122 -40f5623cndVUFlkxpf7Lfx7xu8madQ linux-2.6.9-xen-sparse/include/asm-xen/multicall.h
   1.123 -4122466356eIBnC9ot44WSVVIFyhQA linux-2.6.9-xen-sparse/include/asm-xen/queues.h
   1.124 -3f689063BoW-HWV3auUJ-OqXfcGArw linux-2.6.9-xen-sparse/include/asm-xen/xen_proc.h
   1.125 -4124d8c4aocX7A-jIbuGraWN84pxGQ linux-2.6.9-xen-sparse/include/linux/bio.h
   1.126 -419b4e93z2S0gR17XTy8wg09JEwAhg linux-2.6.9-xen-sparse/include/linux/gfp.h
   1.127 -4124f66f4NaKNa0xPiGGykn9QaZk3w linux-2.6.9-xen-sparse/include/linux/skbuff.h
   1.128 -40f56a0ddHCSs3501MY4hRf22tctOw linux-2.6.9-xen-sparse/mkbuildtree
   1.129 -412f46c0LJuKAgSPGoC0Z1DEkLfuLA linux-2.6.9-xen-sparse/mm/memory.c
   1.130 -410a94a4KT6I6X0LVc7djB39tRDp4g linux-2.6.9-xen-sparse/mm/page_alloc.c
   1.131 -41505c572m-s9ATiO1LiD1GPznTTIg linux-2.6.9-xen-sparse/net/core/skbuff.c
   1.132 -4149ec79wMpIHdvbntxqVGLRZZjPxw linux-2.6.9-xen-sparse/net/ipv4/raw.c
   1.133 +40f562372u3A7_kfbYYixPHJJxYUxA linux-2.6.10-rc2-xen-sparse/arch/xen/Kconfig
   1.134 +40f56237utH41NPukqHksuNf29IC9A linux-2.6.10-rc2-xen-sparse/arch/xen/Kconfig.drivers
   1.135 +40f56237penAAlWVBVDpeQZNFIg8CA linux-2.6.10-rc2-xen-sparse/arch/xen/Makefile
   1.136 +40f56237JTc60m1FRlUxkUaGSQKrNw linux-2.6.10-rc2-xen-sparse/arch/xen/boot/Makefile
   1.137 +40f56237hRxbacU_3PdoAl6DjZ3Jnw linux-2.6.10-rc2-xen-sparse/arch/xen/configs/xen0_defconfig
   1.138 +40f56237wubfjJKlfIzZlI3ZM2VgGA linux-2.6.10-rc2-xen-sparse/arch/xen/configs/xenU_defconfig
   1.139 +40f56237Mta0yHNaMS_qtM2rge0qYA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/Kconfig
   1.140 +40f56238u2CJdXNpjsZgHBxeVyY-2g linux-2.6.10-rc2-xen-sparse/arch/xen/i386/Makefile
   1.141 +40f56238eczveJ86k_4hNxCLRQIF-g linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile
   1.142 +40f56238rXVTJQKbBuXXLH52qEArcg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/cpu/Makefile
   1.143 +40f562385s4lr6Zg92gExe7UQ4A76Q linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/cpu/common.c
   1.144 +40f56238XDtHSijkAFlbv1PT8Bhw_Q linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/entry.S
   1.145 +40f56238bnvciAuyzAiMkdzGErYt1A linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S
   1.146 +40f58a0d31M2EkuPbG94ns_nOi0PVA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c
   1.147 +40faa751_zbZlAmLyQgCXdYekVFdWA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ioport.c
   1.148 +40f562382aC3_Gt4RG-4ZsfvDRUg3Q linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/irq.c
   1.149 +40f56238ue3YRsK52HG7iccNzP1AwQ linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c
   1.150 +4107adf1cNtsuOxOB4T6paAoY2R2PA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/pci-dma.c
   1.151 +40f56238a8iOVDEoostsbun_sy2i4g linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/process.c
   1.152 +40f56238YQIJoYG2ehDGEcdTgLmGbg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c
   1.153 +40f56238nWMQg7CKbyTy0KJNvCzbtg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/signal.c
   1.154 +40f56238UL9uv78ODDzMwLL9yryeFw linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c
   1.155 +40f56238qVGkpO_ycnQA8k03kQzAgA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/time.c
   1.156 +40f56238NzTgeO63RGoxHrW5NQeO3Q linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/Makefile
   1.157 +40f56238BMqG5PuSHufpjbvp_helBw linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
   1.158 +40f562389xNa78YBZciUibQjyRU_Lg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/traps.c
   1.159 +40f56238qASEI_IOhCKWNuwFKNZrKQ linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vmlinux.lds.S
   1.160 +40f56238JypKAUG01ZojFwH7qnZ5uA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vsyscall.S
   1.161 +40f56238wi6AdNQjm0RT57bSkwb6hg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/vsyscall.lds
   1.162 +40f56238a3w6-byOzexIlMgni76Lcg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/Makefile
   1.163 +40f56238ILx8xlbywNbzTdv5Zr4xXQ linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/fault.c
   1.164 +4118cc35CbY8rfGVspF5O-7EkXBEAA linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/highmem.c
   1.165 +40f562383SKvDStdtrvzr5fyCbW4rw linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/hypervisor.c
   1.166 +40f56239xcNylAxuGsQHwi1AyMLV8w linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/init.c
   1.167 +41062ab7CjxC1UBaFhOMWWdhHkIUyg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/ioremap.c
   1.168 +413b5ab8LIowAnQrEmaOJSdmqm96jQ linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/pageattr.c
   1.169 +40f5623906UYHv1rsVUeRc0tFT0dWw linux-2.6.10-rc2-xen-sparse/arch/xen/i386/mm/pgtable.c
   1.170 +4107adf12ndy94MidCaivDibJ3pPAg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/pci/Makefile
   1.171 +4107adf1WcCgkhsdLTRGX52cOG1vJg linux-2.6.10-rc2-xen-sparse/arch/xen/i386/pci/direct.c
   1.172 +4107adf1s5u6249DNPUViX1YNagbUQ linux-2.6.10-rc2-xen-sparse/arch/xen/i386/pci/irq.c
   1.173 +40f56239zOksGg_H4XD4ye6iZNtoZA linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/Makefile
   1.174 +40f56239bvOjuuuViZ0XMlNiREFC0A linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/ctrl_if.c
   1.175 +40f56239pYRq5yshPTkv3ujXKc8K6g linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/empty.c
   1.176 +40f56238xFQe9T7M_U_FItM-bZIpLw linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/evtchn.c
   1.177 +4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/fixup.c
   1.178 +412dfae9eA3_6e6bCGUtg1mj8b56fQ linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/gnttab.c
   1.179 +40f562392LBhwmOxVPsYdkYXMxI_ZQ linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/reboot.c
   1.180 +414c113396tK1HTVeUalm3u-1DF16g linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/skbuff.c
   1.181 +3f68905c5eiA-lBMQSvXLMWS1ikDEA linux-2.6.10-rc2-xen-sparse/arch/xen/kernel/xen_proc.c
   1.182 +41261688yS8eAyy-7kzG4KBs0xbYCA linux-2.6.10-rc2-xen-sparse/drivers/Makefile
   1.183 +4108f5c1WfTIrs0HZFeV39sttekCTw linux-2.6.10-rc2-xen-sparse/drivers/char/mem.c
   1.184 +4111308bZAIzwf_Kzu6x1TZYZ3E0_Q linux-2.6.10-rc2-xen-sparse/drivers/char/tty_io.c
   1.185 +40f56239Dp_vMTgz8TEbvo1hjHGc3w linux-2.6.10-rc2-xen-sparse/drivers/xen/Makefile
   1.186 +41768fbcncpBQf8s2l2-CwoSNIZ9uA linux-2.6.10-rc2-xen-sparse/drivers/xen/balloon/Makefile
   1.187 +3e6377f8i5e9eGz7Pw6fQuhuTQ7DQg linux-2.6.10-rc2-xen-sparse/drivers/xen/balloon/balloon.c
   1.188 +410d0893otFGghmv4dUXDUBBdY5aIA linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/Makefile
   1.189 +4087cf0d1XgMkooTZAiJS6NrcpLQNQ linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/blkback.c
   1.190 +4087cf0dZadZ8r6CEt4fNN350Yle3A linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/common.h
   1.191 +4087cf0dxlh29iw0w-9rxOCEGCjPcw linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/control.c
   1.192 +4087cf0dbuoH20fMjNZjcgrRK-1msQ linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/interface.c
   1.193 +4087cf0dk97tacDzxfByWV7JifUYqA linux-2.6.10-rc2-xen-sparse/drivers/xen/blkback/vbd.c
   1.194 +40f56239Sfle6wGv5FS0wjS_HI150A linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/Kconfig
   1.195 +40f562395atl9x4suKGhPkjqLOXESg linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/Makefile
   1.196 +40f56239-JNIaTzlviVJohVdoYOUpw linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/blkfront.c
   1.197 +40f56239y9naBTXe40Pi2J_z3p-d1g linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/block.h
   1.198 +40f56239BVfPsXBiWQitXgDRtOsiqg linux-2.6.10-rc2-xen-sparse/drivers/xen/blkfront/vbd.c
   1.199 +40f56239fsLjvtD8YBRAWphps4FDjg linux-2.6.10-rc2-xen-sparse/drivers/xen/console/Makefile
   1.200 +3e5a4e651TH-SXHoufurnWjgl5bfOA linux-2.6.10-rc2-xen-sparse/drivers/xen/console/console.c
   1.201 +40f56239KYxO0YabhPzCTeUuln-lnA linux-2.6.10-rc2-xen-sparse/drivers/xen/evtchn/Makefile
   1.202 +40f56239DoibTX6R-ZYd3QTXAB8_TA linux-2.6.10-rc2-xen-sparse/drivers/xen/evtchn/evtchn.c
   1.203 +410a9817HEVJvred5Oy_uKH3HFJC5Q linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/Makefile
   1.204 +4097ba831lpGeLlPg-bfV8XarVVuoQ linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/common.h
   1.205 +4097ba83wvv8yi5P5xugCUBAdb6O-A linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/control.c
   1.206 +4097ba83byY5bTSugJGZ1exTxIcMKw linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/interface.c
   1.207 +4087cf0dGmSbFhFZyIZBJzvqxY-qBw linux-2.6.10-rc2-xen-sparse/drivers/xen/netback/netback.c
   1.208 +40f56239lrg_Ob0BJ8WBFS1zeg2CYw linux-2.6.10-rc2-xen-sparse/drivers/xen/netfront/Kconfig
   1.209 +40f56239Wd4k_ycG_mFsSO1r5xKdtQ linux-2.6.10-rc2-xen-sparse/drivers/xen/netfront/Makefile
   1.210 +405853f6nbeazrNyEWNHBuoSg2PiPA linux-2.6.10-rc2-xen-sparse/drivers/xen/netfront/netfront.c
   1.211 +4108f5c1ppFXVpQzCOAZ6xXYubsjKA linux-2.6.10-rc2-xen-sparse/drivers/xen/privcmd/Makefile
   1.212 +3e5a4e65IUfzzMu2kZFlGEB8-rpTaA linux-2.6.10-rc2-xen-sparse/drivers/xen/privcmd/privcmd.c
   1.213 +412f47e4RKD-R5IS5gEXvcT8L4v8gA linux-2.6.10-rc2-xen-sparse/include/asm-generic/pgtable.h
   1.214 +40f56239YAjS52QG2FIAQpHDZAdGHg linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/desc.h
   1.215 +4107adf1E5O4ztGHNGMzCCNhcvqNow linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/dma-mapping.h
   1.216 +40f5623akIoBsQ3KxSB2kufkbgONXQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/fixmap.h
   1.217 +41979925z1MsKU1SfuuheM1IFDQ_bA linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/floppy.h
   1.218 +4118b6a418gnL6AZsTdglC92YGqYTg linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/highmem.h
   1.219 +40f5623aJVXQwpJMOLE99XgvGsfQ8Q linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/io.h
   1.220 +40f5623aKXkBBxgpLx2NcvkncQ1Yyw linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/irq_vectors.h
   1.221 +40f5623aDMCsWOFO0jktZ4e8sjwvEg linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h
   1.222 +40f5623arsFXkGdPvIqvFi3yFXGR0Q linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_pre.h
   1.223 +4120f807GCO0uqsLqdZj9csxR1Wthw linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/mmu_context.h
   1.224 +40f5623aFTyFTR-vdiA-KaGxk5JOKQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/msr.h
   1.225 +40f5623adgjZq9nAgCt0IXdWl7udSA linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/page.h
   1.226 +40f5623a54NuG-7qHihGYmw4wWQnMA linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/param.h
   1.227 +41137cc1kkvg0cg7uxddcEfjL7L67w linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pci.h
   1.228 +40f5623atCokYc2uCysSJ8jFO8TEsw linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgalloc.h
   1.229 +412e01beTwiaC8sYY4XJP8PxLST5CA linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable-2level-defs.h
   1.230 +40f5623aEToIXouJgO-ao5d5pcEt1w linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable-2level.h
   1.231 +40f5623aCCXRPlGpNthVXstGz9ZV3A linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/pgtable.h
   1.232 +40f5623aPCkQQfPtJSooGdhcatrvnQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/processor.h
   1.233 +412ea0afQL2CAI-f522TbLjLPMibPQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/ptrace.h
   1.234 +40f5623bzLvxr7WoJIxVf2OH4rCBJg linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/segment.h
   1.235 +40f5623bG_LzgG6-qwk292nTc5Wabw linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/setup.h
   1.236 +40f5623bgzm_9vwxpzJswlAxg298Gg linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/synch_bitops.h
   1.237 +40f5623bVdKP7Dt7qm8twu3NcnGNbA linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/system.h
   1.238 +40f5623bc8LKPRO09wY5dGDnY_YCpw linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/tlbflush.h
   1.239 +41062ab7uFxnCq-KtPeAm-aV8CicgA linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/vga.h
   1.240 +40f5623bxUbeGjkRrjDguCy_Gm8RLw linux-2.6.10-rc2-xen-sparse/include/asm-xen/asm-i386/xor.h
   1.241 +40f5623bYNP7tHE2zX6YQxp9Zq2utQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/ctrl_if.h
   1.242 +40f5623b3Eqs8pAc5WpPX8_jTzV2qw linux-2.6.10-rc2-xen-sparse/include/asm-xen/evtchn.h
   1.243 +419b4e9367PjTEvdjwavWN12BeBBXg linux-2.6.10-rc2-xen-sparse/include/asm-xen/foreign_page.h
   1.244 +412dfaeazclyNDM0cpnp60Yo4xulpQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/gnttab.h
   1.245 +40f5623aGPlsm0u1LTO-NVZ6AGzNRQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/hypervisor.h
   1.246 +3f108af1ylCIm82H052FVTfXACBHrw linux-2.6.10-rc2-xen-sparse/include/asm-xen/linux-public/privcmd.h
   1.247 +3fa8e3f0kBLeE4To2vpdi3cpJbIkbQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/linux-public/suspend.h
   1.248 +40f5623cndVUFlkxpf7Lfx7xu8madQ linux-2.6.10-rc2-xen-sparse/include/asm-xen/multicall.h
   1.249 +4122466356eIBnC9ot44WSVVIFyhQA linux-2.6.10-rc2-xen-sparse/include/asm-xen/queues.h
   1.250 +3f689063BoW-HWV3auUJ-OqXfcGArw linux-2.6.10-rc2-xen-sparse/include/asm-xen/xen_proc.h
   1.251 +419b4e93z2S0gR17XTy8wg09JEwAhg linux-2.6.10-rc2-xen-sparse/include/linux/gfp.h
   1.252 +4124f66f4NaKNa0xPiGGykn9QaZk3w linux-2.6.10-rc2-xen-sparse/include/linux/skbuff.h
   1.253 +40f56a0ddHCSs3501MY4hRf22tctOw linux-2.6.10-rc2-xen-sparse/mkbuildtree
   1.254 +412f46c0LJuKAgSPGoC0Z1DEkLfuLA linux-2.6.10-rc2-xen-sparse/mm/memory.c
   1.255 +410a94a4KT6I6X0LVc7djB39tRDp4g linux-2.6.10-rc2-xen-sparse/mm/page_alloc.c
   1.256 +41505c572m-s9ATiO1LiD1GPznTTIg linux-2.6.10-rc2-xen-sparse/net/core/skbuff.c
   1.257 +4149ec79wMpIHdvbntxqVGLRZZjPxw linux-2.6.10-rc2-xen-sparse/net/ipv4/raw.c
   1.258  413cb1e4zst25MDYjg63Y-NGC5_pLg netbsd-2.0-xen-sparse/Makefile
   1.259  413cb1e5c_Mkxf_X0zimEhTKI_l4DA netbsd-2.0-xen-sparse/mkbuildtree
   1.260  413cb1e5kY_Zil7-b0kI6hvCIxBEYg netbsd-2.0-xen-sparse/nbconfig-xen
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/Kconfig	Fri Nov 19 00:40:52 2004 +0000
     2.3 @@ -0,0 +1,166 @@
     2.4 +#
     2.5 +# For a description of the syntax of this configuration file,
     2.6 +# see Documentation/kbuild/kconfig-language.txt.
     2.7 +#
     2.8 +
     2.9 +mainmenu "Linux Kernel Configuration"
    2.10 +
    2.11 +config XEN
    2.12 +	bool
    2.13 +	default y
    2.14 +	help
    2.15 +	  This is the Linux Xen port.
    2.16 +
    2.17 +config ARCH_XEN
    2.18 +	bool
    2.19 +	default y
    2.20 +
    2.21 +
    2.22 +config NO_IDLE_HZ
    2.23 +	bool
    2.24 +	default y
    2.25 +
    2.26 +
    2.27 +menu "XEN"
    2.28 +
    2.29 +config XEN_PRIVILEGED_GUEST
    2.30 +	bool "Privileged Guest (domain 0)"
    2.31 +	default n
    2.32 +        select XEN_PHYSDEV_ACCESS
    2.33 +	help
    2.34 +	  Support for privileged operation (domain 0)
    2.35 +
    2.36 +config XEN_PHYSDEV_ACCESS
    2.37 +	bool "Physical device access"
    2.38 +	default y if XEN_PRIVILEGED_GUEST
    2.39 +	default n if !XEN_PRIVILEGED_GUEST
    2.40 +	help
    2.41 +	  Assume access is available to physical hardware devices
    2.42 +          (e.g., hard drives, network cards). This allows you to configure
    2.43 +          such devices and also includes some low-level support that is
    2.44 +          otherwise not compiled into the kernel.
    2.45 +
    2.46 +config XEN_BLKDEV_BACKEND
    2.47 +        bool "Block-device backend driver"
    2.48 +        default y if XEN_PHYSDEV_ACCESS
    2.49 +        default n if !XEN_PHYSDEV_ACCESS
    2.50 +        help
    2.51 +          The block-device backend driver allows the kernel to export its
    2.52 +          block devices to other guests via a high-performance shared-memory
    2.53 +          interface.
    2.54 +
    2.55 +config XEN_NETDEV_BACKEND
    2.56 +        bool "Network-device backend driver"
    2.57 +        default y if XEN_PHYSDEV_ACCESS
    2.58 +        default n if !XEN_PHYSDEV_ACCESS
    2.59 +        help
    2.60 +          The network-device backend driver allows the kernel to export its
    2.61 +          network devices to other guests via a high-performance shared-memory
    2.62 +          interface.
    2.63 +
    2.64 +config XEN_BLKDEV_FRONTEND
    2.65 +        bool "Block-device frontend driver"
    2.66 +        default y
    2.67 +        help
    2.68 +          The block-device frontend driver allows the kernel to access block
    2.69 +          devices mounted within another guest OS. Unless you are building a
    2.70 +          dedicated device-driver domain, or your master control domain
    2.71 +          (domain 0), then you almost certainly want to say Y here.
    2.72 +
    2.73 +config XEN_NETDEV_FRONTEND
    2.74 +        bool "Network-device frontend driver"
    2.75 +        default y
    2.76 +        help
    2.77 +          The network-device frontend driver allows the kernel to access
    2.78 +          network interfaces within another guest OS. Unless you are building a
    2.79 +          dedicated device-driver domain, or your master control domain
    2.80 +          (domain 0), then you almost certainly want to say Y here.
    2.81 +
    2.82 +if XEN_NETDEV_FRONTEND
    2.83 +config XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER
    2.84 +        bool "Pipelined transmitter (DANGEROUS)"
    2.85 +        default n
    2.86 +        help
    2.87 +          The driver will assume that the backend is pipelining packets for
    2.88 +          transmission: whenever packets are pending in the remote backend,
    2.89 +          the driver will not send asynchronous notifications when it queues
    2.90 +          additional packets for transmission.
    2.91 +          If the backend is a dumb domain, such as a transparent Ethernet
    2.92 +          bridge with no local IP interface, it is safe to say Y here to get
    2.93 +          slightly lower network overhead.
    2.94 +          If the backend has a local IP interface; or may be doing smart things
    2.95 +          like reassembling packets to perform firewall filtering; or if you
    2.96 +          are unsure; or if you experience network hangs when this option is
    2.97 +          enabled; then you must say N here.
    2.98 +endif
    2.99 +
   2.100 +config XEN_WRITABLE_PAGETABLES
   2.101 +	bool
   2.102 +	default y
   2.103 +
   2.104 +config XEN_SCRUB_PAGES
   2.105 +        bool "Scrub memory before freeing it to Xen"
   2.106 +        default y
   2.107 +        help
   2.108 +          Erase memory contents before freeing it back to Xen's global
   2.109 +          pool. This ensures that any secrets contained within that
   2.110 +          memory (e.g., private keys) cannot be found by other guests that
   2.111 +          may be running on the machine. Most people will want to say Y here.
   2.112 +          If security is not a concern then you may increase performance by
   2.113 +          saying N.
   2.114 +
   2.115 +endmenu
   2.116 +
   2.117 +config HAVE_ARCH_DEV_ALLOC_SKB
   2.118 +	bool
   2.119 +	default y
   2.120 +
   2.121 +#config VT
   2.122 +#	bool
   2.123 +#	default y
   2.124 +
   2.125 +#config VT_CONSOLE
   2.126 +#	bool
   2.127 +#	default y
   2.128 +
   2.129 +#config HW_CONSOLE
   2.130 +#	bool
   2.131 +#	default y
   2.132 +
   2.133 +choice
   2.134 +	prompt "Processor Type"
   2.135 +	default X86
   2.136 +
   2.137 +config X86
   2.138 +	bool "X86"
   2.139 +	help
   2.140 +	  Choose this option if your computer is a X86 architecture.
   2.141 +
   2.142 +config X86_64
   2.143 +	bool "X86_64"
   2.144 +	help
   2.145 +	  Choose this option if your computer is a X86 architecture.
   2.146 +
   2.147 +endchoice
   2.148 +
   2.149 +source "init/Kconfig"
   2.150 +
   2.151 +if X86
   2.152 +source "arch/xen/i386/Kconfig"
   2.153 +endif
   2.154 +
   2.155 +menu "Executable file formats"
   2.156 +
   2.157 +source "fs/Kconfig.binfmt"
   2.158 +
   2.159 +endmenu
   2.160 +
   2.161 +source "arch/xen/Kconfig.drivers"
   2.162 +
   2.163 +source "fs/Kconfig"
   2.164 +
   2.165 +source "security/Kconfig"
   2.166 +
   2.167 +source "crypto/Kconfig"
   2.168 +
   2.169 +source "lib/Kconfig"
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/Kconfig.drivers	Fri Nov 19 00:40:52 2004 +0000
     3.3 @@ -0,0 +1,55 @@
     3.4 +# arch/xen/Kconfig.drivers
     3.5 +
     3.6 +menu "Device Drivers"
     3.7 +
     3.8 +source "drivers/base/Kconfig"
     3.9 +
    3.10 +if XEN_PHYSDEV_ACCESS
    3.11 +source "drivers/mtd/Kconfig"
    3.12 +source "drivers/parport/Kconfig"
    3.13 +source "drivers/pnp/Kconfig"
    3.14 +endif
    3.15 +
    3.16 +source "drivers/block/Kconfig"
    3.17 +
    3.18 +if XEN_PHYSDEV_ACCESS
    3.19 +source "drivers/ide/Kconfig"
    3.20 +endif
    3.21 +
    3.22 +source "drivers/scsi/Kconfig"
    3.23 +
    3.24 +if XEN_PHYSDEV_ACCESS
    3.25 +source "drivers/cdrom/Kconfig"
    3.26 +endif
    3.27 +
    3.28 +source "drivers/md/Kconfig"
    3.29 +
    3.30 +if XEN_PHYSDEV_ACCESS
    3.31 +source "drivers/message/fusion/Kconfig"
    3.32 +source "drivers/ieee1394/Kconfig"
    3.33 +source "drivers/message/i2o/Kconfig"
    3.34 +endif
    3.35 +
    3.36 +source "net/Kconfig"
    3.37 +
    3.38 +if XEN_PHYSDEV_ACCESS
    3.39 +source "drivers/isdn/Kconfig"
    3.40 +source "drivers/telephony/Kconfig"
    3.41 +source "drivers/input/Kconfig"
    3.42 +source "drivers/char/Kconfig"
    3.43 +source "drivers/i2c/Kconfig"
    3.44 +source "drivers/w1/Kconfig"
    3.45 +source "drivers/misc/Kconfig"
    3.46 +source "drivers/media/Kconfig"
    3.47 +source "drivers/video/Kconfig"
    3.48 +source "sound/Kconfig"
    3.49 +source "drivers/usb/Kconfig"
    3.50 +endif
    3.51 +
    3.52 +if !XEN_PHYSDEV_ACCESS
    3.53 +config UNIX98_PTYS
    3.54 +	bool
    3.55 +	default y
    3.56 +endif
    3.57 +
    3.58 +endmenu
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/Makefile	Fri Nov 19 00:40:52 2004 +0000
     4.3 @@ -0,0 +1,72 @@
     4.4 +#
     4.5 +# xen/Makefile
     4.6 +#
     4.7 +# This file is included by the global makefile so that you can add your own
     4.8 +# architecture-specific flags and dependencies. Remember to do have actions
     4.9 +# for "archclean" cleaning up for this architecture.
    4.10 +#
    4.11 +# This file is subject to the terms and conditions of the GNU General Public
    4.12 +# License.  See the file "COPYING" in the main directory of this archive
    4.13 +# for more details.
    4.14 +#
    4.15 +# Copyright (C) 2004 by Christian Limpach
    4.16 +#
    4.17 +
    4.18 +XENARCH	:= $(subst ",,$(CONFIG_XENARCH))
    4.19 +
    4.20 +# pick up headers from include/asm-xen/asm in preference over include/asm
    4.21 +NOSTDINC_FLAGS  = -nostdinc -iwithprefix include/asm-xen -Iinclude/asm-xen -iwithprefix include
    4.22 +
    4.23 +# make uname return the processor arch
    4.24 +UTS_MACHINE := $(XENARCH)
    4.25 +
    4.26 +core-y	+= arch/xen/kernel/
    4.27 +
    4.28 +include/.asm-ignore: include/asm
    4.29 +	@rm -f include/.asm-ignore
    4.30 +	@mv include/asm include/.asm-ignore
    4.31 +	@echo '  SYMLINK include/asm -> include/asm-$(XENARCH)'
    4.32 +	$(Q)if [ ! -d include ]; then mkdir -p include; fi;
    4.33 +	@ln -fsn asm-$(XENARCH) include/asm
    4.34 +
    4.35 +include/asm-xen/asm:
    4.36 +	@echo '  SYMLINK $@ -> include/asm-xen/asm-$(XENARCH)'
    4.37 +	@ln -fsn asm-$(XENARCH) $@
    4.38 +
    4.39 +arch/xen/arch:
    4.40 +	@rm -f $@
    4.41 +	@ln -fsn $(XENARCH) $@
    4.42 +
    4.43 +prepare: include/.asm-ignore include/asm-xen/asm \
    4.44 +	arch/xen/arch ;
    4.45 +
    4.46 +all: vmlinuz
    4.47 +
    4.48 +vmlinuz: vmlinux
    4.49 +	$(Q)$(MAKE) $(build)=arch/xen/boot vmlinuz
    4.50 +
    4.51 +XINSTALL_NAME ?= $(KERNELRELEASE)
    4.52 +install: vmlinuz
    4.53 +	mkdir -p $(INSTALL_PATH)/boot
    4.54 +	install -m0644 vmlinuz $(INSTALL_PATH)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    4.55 +	install -m0644 vmlinux $(INSTALL_PATH)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    4.56 +	install -m0664 .config $(INSTALL_PATH)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    4.57 +	install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
    4.58 +	mkdir -p $(INSTALL_PATH)/usr/include/xen/linux
    4.59 +	install -m0644 include/asm-xen/linux-public/*.h $(INSTALL_PATH)/usr/include/xen/linux
    4.60 +dist:
    4.61 +	$(MAKE) INSTALL_PATH=../dist/install install
    4.62 +
    4.63 +archclean:
    4.64 +	@if [ -e arch/xen/arch ]; then $(MAKE) $(clean)=arch/xen/arch; fi;
    4.65 +	@rm -f arch/xen/arch include/.asm-ignore include/asm-xen/asm
    4.66 +	@rm -f vmlinux-stripped vmlinuz
    4.67 +
    4.68 +define archhelp
    4.69 +  echo  '* vmlinuz	- Compressed kernel image'
    4.70 +  echo  '  install	- Install kernel image and config file'
    4.71 +endef
    4.72 +
    4.73 +ifneq ($(XENARCH),)
    4.74 +include	$(srctree)/arch/xen/$(XENARCH)/Makefile
    4.75 +endif
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/boot/Makefile	Fri Nov 19 00:40:52 2004 +0000
     5.3 @@ -0,0 +1,8 @@
     5.4 +
     5.5 +OBJCOPYFLAGS := -g --strip-unneeded
     5.6 +
     5.7 +vmlinuz: vmlinux-stripped FORCE
     5.8 +	$(call if_changed,gzip)
     5.9 +
    5.10 +vmlinux-stripped: vmlinux FORCE
    5.11 +	$(call if_changed,objcopy)
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/configs/xen0_defconfig	Fri Nov 19 00:40:52 2004 +0000
     6.3 @@ -0,0 +1,1039 @@
     6.4 +#
     6.5 +# Automatically generated make config: don't edit
     6.6 +# Linux kernel version: 2.6.9-xen0
     6.7 +# Sun Nov 14 16:55:05 2004
     6.8 +#
     6.9 +CONFIG_XEN=y
    6.10 +CONFIG_ARCH_XEN=y
    6.11 +CONFIG_NO_IDLE_HZ=y
    6.12 +
    6.13 +#
    6.14 +# XEN
    6.15 +#
    6.16 +CONFIG_XEN_PRIVILEGED_GUEST=y
    6.17 +CONFIG_XEN_PHYSDEV_ACCESS=y
    6.18 +CONFIG_XEN_BLKDEV_BACKEND=y
    6.19 +CONFIG_XEN_NETDEV_BACKEND=y
    6.20 +CONFIG_XEN_BLKDEV_FRONTEND=y
    6.21 +CONFIG_XEN_NETDEV_FRONTEND=y
    6.22 +# CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
    6.23 +CONFIG_XEN_WRITABLE_PAGETABLES=y
    6.24 +CONFIG_XEN_SCRUB_PAGES=y
    6.25 +CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y
    6.26 +CONFIG_X86=y
    6.27 +# CONFIG_X86_64 is not set
    6.28 +
    6.29 +#
    6.30 +# Code maturity level options
    6.31 +#
    6.32 +CONFIG_EXPERIMENTAL=y
    6.33 +# CONFIG_CLEAN_COMPILE is not set
    6.34 +CONFIG_BROKEN=y
    6.35 +CONFIG_BROKEN_ON_SMP=y
    6.36 +
    6.37 +#
    6.38 +# General setup
    6.39 +#
    6.40 +CONFIG_LOCALVERSION=""
    6.41 +CONFIG_SWAP=y
    6.42 +CONFIG_SYSVIPC=y
    6.43 +# CONFIG_POSIX_MQUEUE is not set
    6.44 +# CONFIG_BSD_PROCESS_ACCT is not set
    6.45 +CONFIG_SYSCTL=y
    6.46 +# CONFIG_AUDIT is not set
    6.47 +CONFIG_LOG_BUF_SHIFT=14
    6.48 +CONFIG_HOTPLUG=y
    6.49 +# CONFIG_IKCONFIG is not set
    6.50 +# CONFIG_EMBEDDED is not set
    6.51 +CONFIG_KALLSYMS=y
    6.52 +# CONFIG_KALLSYMS_ALL is not set
    6.53 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
    6.54 +CONFIG_FUTEX=y
    6.55 +CONFIG_EPOLL=y
    6.56 +CONFIG_IOSCHED_NOOP=y
    6.57 +CONFIG_IOSCHED_AS=y
    6.58 +CONFIG_IOSCHED_DEADLINE=y
    6.59 +CONFIG_IOSCHED_CFQ=y
    6.60 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
    6.61 +CONFIG_SHMEM=y
    6.62 +# CONFIG_TINY_SHMEM is not set
    6.63 +
    6.64 +#
    6.65 +# Loadable module support
    6.66 +#
    6.67 +CONFIG_MODULES=y
    6.68 +CONFIG_MODULE_UNLOAD=y
    6.69 +# CONFIG_MODULE_FORCE_UNLOAD is not set
    6.70 +CONFIG_OBSOLETE_MODPARM=y
    6.71 +# CONFIG_MODVERSIONS is not set
    6.72 +CONFIG_KMOD=y
    6.73 +
    6.74 +#
    6.75 +# X86 Processor Configuration
    6.76 +#
    6.77 +CONFIG_XENARCH="i386"
    6.78 +CONFIG_MMU=y
    6.79 +CONFIG_UID16=y
    6.80 +CONFIG_GENERIC_ISA_DMA=y
    6.81 +# CONFIG_M686 is not set
    6.82 +# CONFIG_MPENTIUMII is not set
    6.83 +# CONFIG_MPENTIUMIII is not set
    6.84 +# CONFIG_MPENTIUMM is not set
    6.85 +CONFIG_MPENTIUM4=y
    6.86 +# CONFIG_MK6 is not set
    6.87 +# CONFIG_MK7 is not set
    6.88 +# CONFIG_MK8 is not set
    6.89 +# CONFIG_MCRUSOE is not set
    6.90 +# CONFIG_MCYRIXIII is not set
    6.91 +# CONFIG_MVIAC3_2 is not set
    6.92 +# CONFIG_X86_GENERIC is not set
    6.93 +CONFIG_X86_CMPXCHG=y
    6.94 +CONFIG_X86_XADD=y
    6.95 +CONFIG_X86_L1_CACHE_SHIFT=7
    6.96 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
    6.97 +CONFIG_X86_WP_WORKS_OK=y
    6.98 +CONFIG_X86_INVLPG=y
    6.99 +CONFIG_X86_BSWAP=y
   6.100 +CONFIG_X86_POPAD_OK=y
   6.101 +CONFIG_X86_GOOD_APIC=y
   6.102 +CONFIG_X86_INTEL_USERCOPY=y
   6.103 +CONFIG_X86_USE_PPRO_CHECKSUM=y
   6.104 +# CONFIG_HPET_TIMER is not set
   6.105 +# CONFIG_HPET_EMULATE_RTC is not set
   6.106 +# CONFIG_SMP is not set
   6.107 +CONFIG_PREEMPT=y
   6.108 +CONFIG_X86_CPUID=y
   6.109 +
   6.110 +#
   6.111 +# Firmware Drivers
   6.112 +#
   6.113 +# CONFIG_EDD is not set
   6.114 +CONFIG_NOHIGHMEM=y
   6.115 +# CONFIG_HIGHMEM4G is not set
   6.116 +CONFIG_HAVE_DEC_LOCK=y
   6.117 +# CONFIG_REGPARM is not set
   6.118 +
   6.119 +#
   6.120 +# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
   6.121 +#
   6.122 +CONFIG_PCI=y
   6.123 +CONFIG_PCI_DIRECT=y
   6.124 +CONFIG_PCI_LEGACY_PROC=y
   6.125 +# CONFIG_PCI_NAMES is not set
   6.126 +CONFIG_ISA=y
   6.127 +# CONFIG_EISA is not set
   6.128 +# CONFIG_MCA is not set
   6.129 +# CONFIG_SCx200 is not set
   6.130 +
   6.131 +#
   6.132 +# PCMCIA/CardBus support
   6.133 +#
   6.134 +CONFIG_PCMCIA=m
   6.135 +# CONFIG_PCMCIA_DEBUG is not set
   6.136 +CONFIG_YENTA=m
   6.137 +CONFIG_CARDBUS=y
   6.138 +# CONFIG_PD6729 is not set
   6.139 +# CONFIG_I82092 is not set
   6.140 +# CONFIG_I82365 is not set
   6.141 +# CONFIG_TCIC is not set
   6.142 +CONFIG_PCMCIA_PROBE=y
   6.143 +
   6.144 +#
   6.145 +# PCI Hotplug Support
   6.146 +#
   6.147 +# CONFIG_HOTPLUG_PCI is not set
   6.148 +
   6.149 +#
   6.150 +# Kernel hacking
   6.151 +#
   6.152 +CONFIG_DEBUG_KERNEL=y
   6.153 +CONFIG_EARLY_PRINTK=y
   6.154 +# CONFIG_DEBUG_STACKOVERFLOW is not set
   6.155 +# CONFIG_DEBUG_STACK_USAGE is not set
   6.156 +# CONFIG_DEBUG_SLAB is not set
   6.157 +CONFIG_MAGIC_SYSRQ=y
   6.158 +# CONFIG_DEBUG_SPINLOCK is not set
   6.159 +# CONFIG_DEBUG_PAGEALLOC is not set
   6.160 +# CONFIG_DEBUG_INFO is not set
   6.161 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
   6.162 +# CONFIG_FRAME_POINTER is not set
   6.163 +# CONFIG_4KSTACKS is not set
   6.164 +CONFIG_X86_BIOS_REBOOT=y
   6.165 +CONFIG_X86_STD_RESOURCES=y
   6.166 +CONFIG_PC=y
   6.167 +
   6.168 +#
   6.169 +# Executable file formats
   6.170 +#
   6.171 +CONFIG_BINFMT_ELF=y
   6.172 +# CONFIG_BINFMT_AOUT is not set
   6.173 +# CONFIG_BINFMT_MISC is not set
   6.174 +
   6.175 +#
   6.176 +# Device Drivers
   6.177 +#
   6.178 +
   6.179 +#
   6.180 +# Generic Driver Options
   6.181 +#
   6.182 +# CONFIG_STANDALONE is not set
   6.183 +CONFIG_PREVENT_FIRMWARE_BUILD=y
   6.184 +# CONFIG_FW_LOADER is not set
   6.185 +# CONFIG_DEBUG_DRIVER is not set
   6.186 +
   6.187 +#
   6.188 +# Memory Technology Devices (MTD)
   6.189 +#
   6.190 +# CONFIG_MTD is not set
   6.191 +
   6.192 +#
   6.193 +# Parallel port support
   6.194 +#
   6.195 +# CONFIG_PARPORT is not set
   6.196 +
   6.197 +#
   6.198 +# Plug and Play support
   6.199 +#
   6.200 +# CONFIG_PNP is not set
   6.201 +
   6.202 +#
   6.203 +# Block devices
   6.204 +#
   6.205 +CONFIG_BLK_DEV_FD=y
   6.206 +# CONFIG_BLK_DEV_XD is not set
   6.207 +# CONFIG_BLK_CPQ_DA is not set
   6.208 +CONFIG_BLK_CPQ_CISS_DA=y
   6.209 +# CONFIG_CISS_SCSI_TAPE is not set
   6.210 +# CONFIG_BLK_DEV_DAC960 is not set
   6.211 +# CONFIG_BLK_DEV_UMEM is not set
   6.212 +CONFIG_BLK_DEV_LOOP=y
   6.213 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
   6.214 +# CONFIG_BLK_DEV_NBD is not set
   6.215 +# CONFIG_BLK_DEV_SX8 is not set
   6.216 +CONFIG_BLK_DEV_RAM=y
   6.217 +CONFIG_BLK_DEV_RAM_SIZE=4096
   6.218 +CONFIG_BLK_DEV_INITRD=y
   6.219 +# CONFIG_LBD is not set
   6.220 +
   6.221 +#
   6.222 +# ATA/ATAPI/MFM/RLL support
   6.223 +#
   6.224 +CONFIG_IDE=y
   6.225 +CONFIG_BLK_DEV_IDE=y
   6.226 +
   6.227 +#
   6.228 +# Please see Documentation/ide.txt for help/info on IDE drives
   6.229 +#
   6.230 +# CONFIG_BLK_DEV_IDE_SATA is not set
   6.231 +# CONFIG_BLK_DEV_HD_IDE is not set
   6.232 +CONFIG_BLK_DEV_IDEDISK=y
   6.233 +# CONFIG_IDEDISK_MULTI_MODE is not set
   6.234 +# CONFIG_BLK_DEV_IDECS is not set
   6.235 +CONFIG_BLK_DEV_IDECD=y
   6.236 +# CONFIG_BLK_DEV_IDETAPE is not set
   6.237 +# CONFIG_BLK_DEV_IDEFLOPPY is not set
   6.238 +# CONFIG_BLK_DEV_IDESCSI is not set
   6.239 +# CONFIG_IDE_TASK_IOCTL is not set
   6.240 +# CONFIG_IDE_TASKFILE_IO is not set
   6.241 +
   6.242 +#
   6.243 +# IDE chipset support/bugfixes
   6.244 +#
   6.245 +CONFIG_IDE_GENERIC=y
   6.246 +# CONFIG_BLK_DEV_CMD640 is not set
   6.247 +CONFIG_BLK_DEV_IDEPCI=y
   6.248 +# CONFIG_IDEPCI_SHARE_IRQ is not set
   6.249 +# CONFIG_BLK_DEV_OFFBOARD is not set
   6.250 +CONFIG_BLK_DEV_GENERIC=y
   6.251 +# CONFIG_BLK_DEV_OPTI621 is not set
   6.252 +# CONFIG_BLK_DEV_RZ1000 is not set
   6.253 +CONFIG_BLK_DEV_IDEDMA_PCI=y
   6.254 +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
   6.255 +CONFIG_IDEDMA_PCI_AUTO=y
   6.256 +# CONFIG_IDEDMA_ONLYDISK is not set
   6.257 +# CONFIG_BLK_DEV_AEC62XX is not set
   6.258 +# CONFIG_BLK_DEV_ALI15X3 is not set
   6.259 +# CONFIG_BLK_DEV_AMD74XX is not set
   6.260 +# CONFIG_BLK_DEV_ATIIXP is not set
   6.261 +# CONFIG_BLK_DEV_CMD64X is not set
   6.262 +# CONFIG_BLK_DEV_TRIFLEX is not set
   6.263 +# CONFIG_BLK_DEV_CY82C693 is not set
   6.264 +# CONFIG_BLK_DEV_CS5520 is not set
   6.265 +# CONFIG_BLK_DEV_CS5530 is not set
   6.266 +# CONFIG_BLK_DEV_HPT34X is not set
   6.267 +# CONFIG_BLK_DEV_HPT366 is not set
   6.268 +# CONFIG_BLK_DEV_SC1200 is not set
   6.269 +CONFIG_BLK_DEV_PIIX=y
   6.270 +# CONFIG_BLK_DEV_NS87415 is not set
   6.271 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set
   6.272 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set
   6.273 +CONFIG_BLK_DEV_SVWKS=y
   6.274 +# CONFIG_BLK_DEV_SIIMAGE is not set
   6.275 +# CONFIG_BLK_DEV_SIS5513 is not set
   6.276 +# CONFIG_BLK_DEV_SLC90E66 is not set
   6.277 +# CONFIG_BLK_DEV_TRM290 is not set
   6.278 +# CONFIG_BLK_DEV_VIA82CXXX is not set
   6.279 +# CONFIG_IDE_ARM is not set
   6.280 +# CONFIG_IDE_CHIPSETS is not set
   6.281 +CONFIG_BLK_DEV_IDEDMA=y
   6.282 +# CONFIG_IDEDMA_IVB is not set
   6.283 +CONFIG_IDEDMA_AUTO=y
   6.284 +# CONFIG_BLK_DEV_HD is not set
   6.285 +
   6.286 +#
   6.287 +# SCSI device support
   6.288 +#
   6.289 +CONFIG_SCSI=y
   6.290 +CONFIG_SCSI_PROC_FS=y
   6.291 +
   6.292 +#
   6.293 +# SCSI support type (disk, tape, CD-ROM)
   6.294 +#
   6.295 +CONFIG_BLK_DEV_SD=y
   6.296 +# CONFIG_CHR_DEV_ST is not set
   6.297 +# CONFIG_CHR_DEV_OSST is not set
   6.298 +# CONFIG_BLK_DEV_SR is not set
   6.299 +# CONFIG_CHR_DEV_SG is not set
   6.300 +
   6.301 +#
   6.302 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
   6.303 +#
   6.304 +# CONFIG_SCSI_MULTI_LUN is not set
   6.305 +# CONFIG_SCSI_CONSTANTS is not set
   6.306 +# CONFIG_SCSI_LOGGING is not set
   6.307 +
   6.308 +#
   6.309 +# SCSI Transport Attributes
   6.310 +#
   6.311 +# CONFIG_SCSI_SPI_ATTRS is not set
   6.312 +# CONFIG_SCSI_FC_ATTRS is not set
   6.313 +
   6.314 +#
   6.315 +# SCSI low-level drivers
   6.316 +#
   6.317 +CONFIG_BLK_DEV_3W_XXXX_RAID=y
   6.318 +# CONFIG_SCSI_3W_9XXX is not set
   6.319 +# CONFIG_SCSI_7000FASST is not set
   6.320 +# CONFIG_SCSI_ACARD is not set
   6.321 +# CONFIG_SCSI_AHA152X is not set
   6.322 +# CONFIG_SCSI_AHA1542 is not set
   6.323 +CONFIG_SCSI_AACRAID=y
   6.324 +CONFIG_SCSI_AIC7XXX=y
   6.325 +CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
   6.326 +CONFIG_AIC7XXX_RESET_DELAY_MS=15000
   6.327 +CONFIG_AIC7XXX_DEBUG_ENABLE=y
   6.328 +CONFIG_AIC7XXX_DEBUG_MASK=0
   6.329 +CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
   6.330 +# CONFIG_SCSI_AIC7XXX_OLD is not set
   6.331 +CONFIG_SCSI_AIC79XX=y
   6.332 +CONFIG_AIC79XX_CMDS_PER_DEVICE=32
   6.333 +CONFIG_AIC79XX_RESET_DELAY_MS=15000
   6.334 +# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
   6.335 +CONFIG_AIC79XX_DEBUG_ENABLE=y
   6.336 +CONFIG_AIC79XX_DEBUG_MASK=0
   6.337 +CONFIG_AIC79XX_REG_PRETTY_PRINT=y
   6.338 +# CONFIG_SCSI_DPT_I2O is not set
   6.339 +# CONFIG_SCSI_ADVANSYS is not set
   6.340 +# CONFIG_SCSI_IN2000 is not set
   6.341 +# CONFIG_MEGARAID_NEWGEN is not set
   6.342 +# CONFIG_MEGARAID_LEGACY is not set
   6.343 +CONFIG_SCSI_SATA=y
   6.344 +# CONFIG_SCSI_SATA_SVW is not set
   6.345 +CONFIG_SCSI_ATA_PIIX=y
   6.346 +# CONFIG_SCSI_SATA_NV is not set
   6.347 +CONFIG_SCSI_SATA_PROMISE=y
   6.348 +CONFIG_SCSI_SATA_SX4=y
   6.349 +CONFIG_SCSI_SATA_SIL=y
   6.350 +# CONFIG_SCSI_SATA_SIS is not set
   6.351 +# CONFIG_SCSI_SATA_VIA is not set
   6.352 +# CONFIG_SCSI_SATA_VITESSE is not set
   6.353 +CONFIG_SCSI_BUSLOGIC=y
   6.354 +# CONFIG_SCSI_OMIT_FLASHPOINT is not set
   6.355 +# CONFIG_SCSI_CPQFCTS is not set
   6.356 +# CONFIG_SCSI_DMX3191D is not set
   6.357 +# CONFIG_SCSI_DTC3280 is not set
   6.358 +# CONFIG_SCSI_EATA is not set
   6.359 +# CONFIG_SCSI_EATA_PIO is not set
   6.360 +# CONFIG_SCSI_FUTURE_DOMAIN is not set
   6.361 +# CONFIG_SCSI_GDTH is not set
   6.362 +# CONFIG_SCSI_GENERIC_NCR5380 is not set
   6.363 +# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
   6.364 +# CONFIG_SCSI_IPS is not set
   6.365 +# CONFIG_SCSI_INITIO is not set
   6.366 +# CONFIG_SCSI_INIA100 is not set
   6.367 +# CONFIG_SCSI_NCR53C406A is not set
   6.368 +# CONFIG_SCSI_SYM53C8XX_2 is not set
   6.369 +# CONFIG_SCSI_IPR is not set
   6.370 +# CONFIG_SCSI_PAS16 is not set
   6.371 +# CONFIG_SCSI_PCI2000 is not set
   6.372 +# CONFIG_SCSI_PCI2220I is not set
   6.373 +# CONFIG_SCSI_PSI240I is not set
   6.374 +# CONFIG_SCSI_QLOGIC_FAS is not set
   6.375 +# CONFIG_SCSI_QLOGIC_ISP is not set
   6.376 +# CONFIG_SCSI_QLOGIC_FC is not set
   6.377 +# CONFIG_SCSI_QLOGIC_1280 is not set
   6.378 +CONFIG_SCSI_QLA2XXX=y
   6.379 +# CONFIG_SCSI_QLA21XX is not set
   6.380 +# CONFIG_SCSI_QLA22XX is not set
   6.381 +# CONFIG_SCSI_QLA2300 is not set
   6.382 +# CONFIG_SCSI_QLA2322 is not set
   6.383 +# CONFIG_SCSI_QLA6312 is not set
   6.384 +# CONFIG_SCSI_QLA6322 is not set
   6.385 +# CONFIG_SCSI_SEAGATE is not set
   6.386 +# CONFIG_SCSI_SYM53C416 is not set
   6.387 +# CONFIG_SCSI_DC395x is not set
   6.388 +# CONFIG_SCSI_DC390T is not set
   6.389 +# CONFIG_SCSI_T128 is not set
   6.390 +# CONFIG_SCSI_U14_34F is not set
   6.391 +# CONFIG_SCSI_ULTRASTOR is not set
   6.392 +# CONFIG_SCSI_NSP32 is not set
   6.393 +# CONFIG_SCSI_DEBUG is not set
   6.394 +
   6.395 +#
   6.396 +# PCMCIA SCSI adapter support
   6.397 +#
   6.398 +# CONFIG_PCMCIA_AHA152X is not set
   6.399 +# CONFIG_PCMCIA_FDOMAIN is not set
   6.400 +# CONFIG_PCMCIA_NINJA_SCSI is not set
   6.401 +# CONFIG_PCMCIA_QLOGIC is not set
   6.402 +# CONFIG_PCMCIA_SYM53C500 is not set
   6.403 +
   6.404 +#
   6.405 +# Old CD-ROM drivers (not SCSI, not IDE)
   6.406 +#
   6.407 +# CONFIG_CD_NO_IDESCSI is not set
   6.408 +
   6.409 +#
   6.410 +# Multi-device support (RAID and LVM)
   6.411 +#
   6.412 +CONFIG_MD=y
   6.413 +CONFIG_BLK_DEV_MD=y
   6.414 +# CONFIG_MD_LINEAR is not set
   6.415 +CONFIG_MD_RAID0=y
   6.416 +CONFIG_MD_RAID1=y
   6.417 +# CONFIG_MD_RAID10 is not set
   6.418 +CONFIG_MD_RAID5=y
   6.419 +# CONFIG_MD_RAID6 is not set
   6.420 +# CONFIG_MD_MULTIPATH is not set
   6.421 +CONFIG_BLK_DEV_DM=y
   6.422 +# CONFIG_DM_CRYPT is not set
   6.423 +CONFIG_DM_SNAPSHOT=y
   6.424 +CONFIG_DM_MIRROR=y
   6.425 +# CONFIG_DM_ZERO is not set
   6.426 +
   6.427 +#
   6.428 +# Fusion MPT device support
   6.429 +#
   6.430 +# CONFIG_FUSION is not set
   6.431 +
   6.432 +#
   6.433 +# IEEE 1394 (FireWire) support
   6.434 +#
   6.435 +# CONFIG_IEEE1394 is not set
   6.436 +
   6.437 +#
   6.438 +# I2O device support
   6.439 +#
   6.440 +# CONFIG_I2O is not set
   6.441 +
   6.442 +#
   6.443 +# Networking support
   6.444 +#
   6.445 +CONFIG_NET=y
   6.446 +
   6.447 +#
   6.448 +# Networking options
   6.449 +#
   6.450 +CONFIG_PACKET=y
   6.451 +# CONFIG_PACKET_MMAP is not set
   6.452 +# CONFIG_NETLINK_DEV is not set
   6.453 +CONFIG_UNIX=y
   6.454 +# CONFIG_NET_KEY is not set
   6.455 +CONFIG_INET=y
   6.456 +# CONFIG_IP_MULTICAST is not set
   6.457 +# CONFIG_IP_ADVANCED_ROUTER is not set
   6.458 +CONFIG_IP_PNP=y
   6.459 +CONFIG_IP_PNP_DHCP=y
   6.460 +# CONFIG_IP_PNP_BOOTP is not set
   6.461 +# CONFIG_IP_PNP_RARP is not set
   6.462 +# CONFIG_NET_IPIP is not set
   6.463 +# CONFIG_NET_IPGRE is not set
   6.464 +# CONFIG_ARPD is not set
   6.465 +# CONFIG_SYN_COOKIES is not set
   6.466 +# CONFIG_INET_AH is not set
   6.467 +# CONFIG_INET_ESP is not set
   6.468 +# CONFIG_INET_IPCOMP is not set
   6.469 +# CONFIG_INET_TUNNEL is not set
   6.470 +
   6.471 +#
   6.472 +# IP: Virtual Server Configuration
   6.473 +#
   6.474 +# CONFIG_IP_VS is not set
   6.475 +# CONFIG_IPV6 is not set
   6.476 +CONFIG_NETFILTER=y
   6.477 +# CONFIG_NETFILTER_DEBUG is not set
   6.478 +CONFIG_BRIDGE_NETFILTER=y
   6.479 +
   6.480 +#
   6.481 +# IP: Netfilter Configuration
   6.482 +#
   6.483 +CONFIG_IP_NF_CONNTRACK=m
   6.484 +CONFIG_IP_NF_CT_ACCT=y
   6.485 +# CONFIG_IP_NF_CT_PROTO_SCTP is not set
   6.486 +CONFIG_IP_NF_FTP=m
   6.487 +# CONFIG_IP_NF_IRC is not set
   6.488 +# CONFIG_IP_NF_TFTP is not set
   6.489 +# CONFIG_IP_NF_AMANDA is not set
   6.490 +# CONFIG_IP_NF_QUEUE is not set
   6.491 +CONFIG_IP_NF_IPTABLES=m
   6.492 +# CONFIG_IP_NF_MATCH_LIMIT is not set
   6.493 +# CONFIG_IP_NF_MATCH_IPRANGE is not set
   6.494 +# CONFIG_IP_NF_MATCH_MAC is not set
   6.495 +# CONFIG_IP_NF_MATCH_PKTTYPE is not set
   6.496 +# CONFIG_IP_NF_MATCH_MARK is not set
   6.497 +# CONFIG_IP_NF_MATCH_MULTIPORT is not set
   6.498 +# CONFIG_IP_NF_MATCH_TOS is not set
   6.499 +# CONFIG_IP_NF_MATCH_RECENT is not set
   6.500 +# CONFIG_IP_NF_MATCH_ECN is not set
   6.501 +# CONFIG_IP_NF_MATCH_DSCP is not set
   6.502 +# CONFIG_IP_NF_MATCH_AH_ESP is not set
   6.503 +# CONFIG_IP_NF_MATCH_LENGTH is not set
   6.504 +# CONFIG_IP_NF_MATCH_TTL is not set
   6.505 +# CONFIG_IP_NF_MATCH_TCPMSS is not set
   6.506 +# CONFIG_IP_NF_MATCH_HELPER is not set
   6.507 +# CONFIG_IP_NF_MATCH_STATE is not set
   6.508 +# CONFIG_IP_NF_MATCH_CONNTRACK is not set
   6.509 +# CONFIG_IP_NF_MATCH_OWNER is not set
   6.510 +# CONFIG_IP_NF_MATCH_PHYSDEV is not set
   6.511 +# CONFIG_IP_NF_MATCH_ADDRTYPE is not set
   6.512 +# CONFIG_IP_NF_MATCH_REALM is not set
   6.513 +# CONFIG_IP_NF_MATCH_SCTP is not set
   6.514 +# CONFIG_IP_NF_MATCH_COMMENT is not set
   6.515 +# CONFIG_IP_NF_FILTER is not set
   6.516 +# CONFIG_IP_NF_TARGET_LOG is not set
   6.517 +# CONFIG_IP_NF_TARGET_ULOG is not set
   6.518 +# CONFIG_IP_NF_TARGET_TCPMSS is not set
   6.519 +# CONFIG_IP_NF_NAT is not set
   6.520 +# CONFIG_IP_NF_MANGLE is not set
   6.521 +# CONFIG_IP_NF_RAW is not set
   6.522 +# CONFIG_IP_NF_ARPTABLES is not set
   6.523 +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
   6.524 +# CONFIG_IP_NF_COMPAT_IPFWADM is not set
   6.525 +
   6.526 +#
   6.527 +# Bridge: Netfilter Configuration
   6.528 +#
   6.529 +# CONFIG_BRIDGE_NF_EBTABLES is not set
   6.530 +
   6.531 +#
   6.532 +# SCTP Configuration (EXPERIMENTAL)
   6.533 +#
   6.534 +# CONFIG_IP_SCTP is not set
   6.535 +# CONFIG_ATM is not set
   6.536 +CONFIG_BRIDGE=y
   6.537 +# CONFIG_VLAN_8021Q is not set
   6.538 +# CONFIG_DECNET is not set
   6.539 +# CONFIG_LLC2 is not set
   6.540 +# CONFIG_IPX is not set
   6.541 +# CONFIG_ATALK is not set
   6.542 +# CONFIG_X25 is not set
   6.543 +# CONFIG_LAPB is not set
   6.544 +# CONFIG_NET_DIVERT is not set
   6.545 +# CONFIG_ECONET is not set
   6.546 +# CONFIG_WAN_ROUTER is not set
   6.547 +# CONFIG_NET_HW_FLOWCONTROL is not set
   6.548 +
   6.549 +#
   6.550 +# QoS and/or fair queueing
   6.551 +#
   6.552 +# CONFIG_NET_SCHED is not set
   6.553 +# CONFIG_NET_CLS_ROUTE is not set
   6.554 +
   6.555 +#
   6.556 +# Network testing
   6.557 +#
   6.558 +# CONFIG_NET_PKTGEN is not set
   6.559 +# CONFIG_NETPOLL is not set
   6.560 +# CONFIG_NET_POLL_CONTROLLER is not set
   6.561 +# CONFIG_HAMRADIO is not set
   6.562 +# CONFIG_IRDA is not set
   6.563 +# CONFIG_BT is not set
   6.564 +CONFIG_NETDEVICES=y
   6.565 +# CONFIG_DUMMY is not set
   6.566 +# CONFIG_BONDING is not set
   6.567 +# CONFIG_EQUALIZER is not set
   6.568 +# CONFIG_TUN is not set
   6.569 +
   6.570 +#
   6.571 +# ARCnet devices
   6.572 +#
   6.573 +# CONFIG_ARCNET is not set
   6.574 +
   6.575 +#
   6.576 +# Ethernet (10 or 100Mbit)
   6.577 +#
   6.578 +CONFIG_NET_ETHERNET=y
   6.579 +CONFIG_MII=y
   6.580 +# CONFIG_HAPPYMEAL is not set
   6.581 +# CONFIG_SUNGEM is not set
   6.582 +CONFIG_NET_VENDOR_3COM=y
   6.583 +# CONFIG_EL1 is not set
   6.584 +# CONFIG_EL2 is not set
   6.585 +# CONFIG_ELPLUS is not set
   6.586 +# CONFIG_EL16 is not set
   6.587 +# CONFIG_EL3 is not set
   6.588 +# CONFIG_3C515 is not set
   6.589 +CONFIG_VORTEX=y
   6.590 +# CONFIG_TYPHOON is not set
   6.591 +# CONFIG_LANCE is not set
   6.592 +# CONFIG_NET_VENDOR_SMC is not set
   6.593 +# CONFIG_NET_VENDOR_RACAL is not set
   6.594 +
   6.595 +#
   6.596 +# Tulip family network device support
   6.597 +#
   6.598 +CONFIG_NET_TULIP=y
   6.599 +# CONFIG_DE2104X is not set
   6.600 +CONFIG_TULIP=y
   6.601 +# CONFIG_TULIP_MWI is not set
   6.602 +# CONFIG_TULIP_MMIO is not set
   6.603 +# CONFIG_TULIP_NAPI is not set
   6.604 +# CONFIG_DE4X5 is not set
   6.605 +# CONFIG_WINBOND_840 is not set
   6.606 +# CONFIG_DM9102 is not set
   6.607 +# CONFIG_PCMCIA_XIRCOM is not set
   6.608 +# CONFIG_PCMCIA_XIRTULIP is not set
   6.609 +# CONFIG_AT1700 is not set
   6.610 +# CONFIG_DEPCA is not set
   6.611 +# CONFIG_HP100 is not set
   6.612 +# CONFIG_NET_ISA is not set
   6.613 +CONFIG_NET_PCI=y
   6.614 +CONFIG_PCNET32=y
   6.615 +# CONFIG_AMD8111_ETH is not set
   6.616 +# CONFIG_ADAPTEC_STARFIRE is not set
   6.617 +# CONFIG_AC3200 is not set
   6.618 +# CONFIG_APRICOT is not set
   6.619 +# CONFIG_B44 is not set
   6.620 +# CONFIG_FORCEDETH is not set
   6.621 +# CONFIG_CS89x0 is not set
   6.622 +# CONFIG_DGRS is not set
   6.623 +# CONFIG_EEPRO100 is not set
   6.624 +CONFIG_E100=y
   6.625 +# CONFIG_E100_NAPI is not set
   6.626 +# CONFIG_FEALNX is not set
   6.627 +# CONFIG_NATSEMI is not set
   6.628 +# CONFIG_NE2K_PCI is not set
   6.629 +# CONFIG_8139CP is not set
   6.630 +CONFIG_8139TOO=y
   6.631 +CONFIG_8139TOO_PIO=y
   6.632 +# CONFIG_8139TOO_TUNE_TWISTER is not set
   6.633 +# CONFIG_8139TOO_8129 is not set
   6.634 +# CONFIG_8139_OLD_RX_RESET is not set
   6.635 +# CONFIG_SIS900 is not set
   6.636 +# CONFIG_EPIC100 is not set
   6.637 +# CONFIG_SUNDANCE is not set
   6.638 +# CONFIG_TLAN is not set
   6.639 +CONFIG_VIA_RHINE=y
   6.640 +# CONFIG_VIA_RHINE_MMIO is not set
   6.641 +# CONFIG_VIA_VELOCITY is not set
   6.642 +# CONFIG_NET_POCKET is not set
   6.643 +
   6.644 +#
   6.645 +# Ethernet (1000 Mbit)
   6.646 +#
   6.647 +CONFIG_ACENIC=y
   6.648 +# CONFIG_ACENIC_OMIT_TIGON_I is not set
   6.649 +# CONFIG_DL2K is not set
   6.650 +CONFIG_E1000=y
   6.651 +# CONFIG_E1000_NAPI is not set
   6.652 +# CONFIG_NS83820 is not set
   6.653 +# CONFIG_HAMACHI is not set
   6.654 +# CONFIG_YELLOWFIN is not set
   6.655 +# CONFIG_R8169 is not set
   6.656 +# CONFIG_SK98LIN is not set
   6.657 +CONFIG_TIGON3=y
   6.658 +
   6.659 +#
   6.660 +# Ethernet (10000 Mbit)
   6.661 +#
   6.662 +# CONFIG_IXGB is not set
   6.663 +# CONFIG_S2IO is not set
   6.664 +
   6.665 +#
   6.666 +# Token Ring devices
   6.667 +#
   6.668 +# CONFIG_TR is not set
   6.669 +
   6.670 +#
   6.671 +# Wireless LAN (non-hamradio)
   6.672 +#
   6.673 +# CONFIG_NET_RADIO is not set
   6.674 +
   6.675 +#
   6.676 +# PCMCIA network device support
   6.677 +#
   6.678 +# CONFIG_NET_PCMCIA is not set
   6.679 +
   6.680 +#
   6.681 +# Wan interfaces
   6.682 +#
   6.683 +# CONFIG_WAN is not set
   6.684 +# CONFIG_FDDI is not set
   6.685 +# CONFIG_HIPPI is not set
   6.686 +# CONFIG_PPP is not set
   6.687 +# CONFIG_SLIP is not set
   6.688 +# CONFIG_NET_FC is not set
   6.689 +# CONFIG_SHAPER is not set
   6.690 +# CONFIG_NETCONSOLE is not set
   6.691 +
   6.692 +#
   6.693 +# ISDN subsystem
   6.694 +#
   6.695 +# CONFIG_ISDN is not set
   6.696 +
   6.697 +#
   6.698 +# Telephony Support
   6.699 +#
   6.700 +# CONFIG_PHONE is not set
   6.701 +
   6.702 +#
   6.703 +# Input device support
   6.704 +#
   6.705 +CONFIG_INPUT=y
   6.706 +
   6.707 +#
   6.708 +# Userland interfaces
   6.709 +#
   6.710 +CONFIG_INPUT_MOUSEDEV=y
   6.711 +CONFIG_INPUT_MOUSEDEV_PSAUX=y
   6.712 +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
   6.713 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
   6.714 +# CONFIG_INPUT_JOYDEV is not set
   6.715 +# CONFIG_INPUT_TSDEV is not set
   6.716 +# CONFIG_INPUT_EVDEV is not set
   6.717 +# CONFIG_INPUT_EVBUG is not set
   6.718 +
   6.719 +#
   6.720 +# Input I/O drivers
   6.721 +#
   6.722 +# CONFIG_GAMEPORT is not set
   6.723 +CONFIG_SOUND_GAMEPORT=y
   6.724 +CONFIG_SERIO=y
   6.725 +CONFIG_SERIO_I8042=y
   6.726 +CONFIG_SERIO_SERPORT=y
   6.727 +# CONFIG_SERIO_CT82C710 is not set
   6.728 +# CONFIG_SERIO_PCIPS2 is not set
   6.729 +# CONFIG_SERIO_RAW is not set
   6.730 +
   6.731 +#
   6.732 +# Input Device Drivers
   6.733 +#
   6.734 +CONFIG_INPUT_KEYBOARD=y
   6.735 +CONFIG_KEYBOARD_ATKBD=y
   6.736 +# CONFIG_KEYBOARD_SUNKBD is not set
   6.737 +# CONFIG_KEYBOARD_LKKBD is not set
   6.738 +# CONFIG_KEYBOARD_XTKBD is not set
   6.739 +# CONFIG_KEYBOARD_NEWTON is not set
   6.740 +CONFIG_INPUT_MOUSE=y
   6.741 +CONFIG_MOUSE_PS2=y
   6.742 +# CONFIG_MOUSE_SERIAL is not set
   6.743 +# CONFIG_MOUSE_INPORT is not set
   6.744 +# CONFIG_MOUSE_LOGIBM is not set
   6.745 +# CONFIG_MOUSE_PC110PAD is not set
   6.746 +# CONFIG_MOUSE_VSXXXAA is not set
   6.747 +# CONFIG_INPUT_JOYSTICK is not set
   6.748 +# CONFIG_INPUT_TOUCHSCREEN is not set
   6.749 +# CONFIG_INPUT_MISC is not set
   6.750 +
   6.751 +#
   6.752 +# Character devices
   6.753 +#
   6.754 +CONFIG_VT=y
   6.755 +CONFIG_VT_CONSOLE=y
   6.756 +CONFIG_HW_CONSOLE=y
   6.757 +# CONFIG_SERIAL_NONSTANDARD is not set
   6.758 +
   6.759 +#
   6.760 +# Serial drivers
   6.761 +#
   6.762 +# CONFIG_SERIAL_8250 is not set
   6.763 +
   6.764 +#
   6.765 +# Non-8250 serial port support
   6.766 +#
   6.767 +CONFIG_UNIX98_PTYS=y
   6.768 +CONFIG_LEGACY_PTYS=y
   6.769 +CONFIG_LEGACY_PTY_COUNT=256
   6.770 +
   6.771 +#
   6.772 +# IPMI
   6.773 +#
   6.774 +# CONFIG_IPMI_HANDLER is not set
   6.775 +
   6.776 +#
   6.777 +# Watchdog Cards
   6.778 +#
   6.779 +# CONFIG_WATCHDOG is not set
   6.780 +# CONFIG_HW_RANDOM is not set
   6.781 +# CONFIG_NVRAM is not set
   6.782 +# CONFIG_RTC is not set
   6.783 +# CONFIG_GEN_RTC is not set
   6.784 +# CONFIG_DTLK is not set
   6.785 +# CONFIG_R3964 is not set
   6.786 +# CONFIG_APPLICOM is not set
   6.787 +# CONFIG_SONYPI is not set
   6.788 +
   6.789 +#
   6.790 +# Ftape, the floppy tape device driver
   6.791 +#
   6.792 +# CONFIG_FTAPE is not set
   6.793 +# CONFIG_AGP is not set
   6.794 +# CONFIG_DRM is not set
   6.795 +
   6.796 +#
   6.797 +# PCMCIA character devices
   6.798 +#
   6.799 +# CONFIG_SYNCLINK_CS is not set
   6.800 +# CONFIG_MWAVE is not set
   6.801 +# CONFIG_RAW_DRIVER is not set
   6.802 +# CONFIG_HANGCHECK_TIMER is not set
   6.803 +
   6.804 +#
   6.805 +# I2C support
   6.806 +#
   6.807 +# CONFIG_I2C is not set
   6.808 +
   6.809 +#
   6.810 +# Dallas's 1-wire bus
   6.811 +#
   6.812 +# CONFIG_W1 is not set
   6.813 +
   6.814 +#
   6.815 +# Misc devices
   6.816 +#
   6.817 +# CONFIG_IBM_ASM is not set
   6.818 +
   6.819 +#
   6.820 +# Multimedia devices
   6.821 +#
   6.822 +# CONFIG_VIDEO_DEV is not set
   6.823 +
   6.824 +#
   6.825 +# Digital Video Broadcasting Devices
   6.826 +#
   6.827 +# CONFIG_DVB is not set
   6.828 +
   6.829 +#
   6.830 +# Graphics support
   6.831 +#
   6.832 +# CONFIG_FB is not set
   6.833 +# CONFIG_VIDEO_SELECT is not set
   6.834 +
   6.835 +#
   6.836 +# Console display driver support
   6.837 +#
   6.838 +CONFIG_VGA_CONSOLE=y
   6.839 +# CONFIG_MDA_CONSOLE is not set
   6.840 +CONFIG_DUMMY_CONSOLE=y
   6.841 +
   6.842 +#
   6.843 +# Sound
   6.844 +#
   6.845 +# CONFIG_SOUND is not set
   6.846 +
   6.847 +#
   6.848 +# USB support
   6.849 +#
   6.850 +# CONFIG_USB is not set
   6.851 +
   6.852 +#
   6.853 +# USB Gadget Support
   6.854 +#
   6.855 +# CONFIG_USB_GADGET is not set
   6.856 +
   6.857 +#
   6.858 +# File systems
   6.859 +#
   6.860 +CONFIG_EXT2_FS=y
   6.861 +# CONFIG_EXT2_FS_XATTR is not set
   6.862 +CONFIG_EXT3_FS=y
   6.863 +CONFIG_EXT3_FS_XATTR=y
   6.864 +# CONFIG_EXT3_FS_POSIX_ACL is not set
   6.865 +# CONFIG_EXT3_FS_SECURITY is not set
   6.866 +CONFIG_JBD=y
   6.867 +# CONFIG_JBD_DEBUG is not set
   6.868 +CONFIG_FS_MBCACHE=y
   6.869 +CONFIG_REISERFS_FS=y
   6.870 +# CONFIG_REISERFS_CHECK is not set
   6.871 +# CONFIG_REISERFS_PROC_INFO is not set
   6.872 +# CONFIG_REISERFS_FS_XATTR is not set
   6.873 +# CONFIG_JFS_FS is not set
   6.874 +# CONFIG_XFS_FS is not set
   6.875 +# CONFIG_MINIX_FS is not set
   6.876 +# CONFIG_ROMFS_FS is not set
   6.877 +# CONFIG_QUOTA is not set
   6.878 +# CONFIG_AUTOFS_FS is not set
   6.879 +# CONFIG_AUTOFS4_FS is not set
   6.880 +
   6.881 +#
   6.882 +# CD-ROM/DVD Filesystems
   6.883 +#
   6.884 +CONFIG_ISO9660_FS=y
   6.885 +CONFIG_JOLIET=y
   6.886 +CONFIG_ZISOFS=y
   6.887 +CONFIG_ZISOFS_FS=y
   6.888 +# CONFIG_UDF_FS is not set
   6.889 +
   6.890 +#
   6.891 +# DOS/FAT/NT Filesystems
   6.892 +#
   6.893 +CONFIG_FAT_FS=m
   6.894 +CONFIG_MSDOS_FS=m
   6.895 +CONFIG_VFAT_FS=m
   6.896 +CONFIG_FAT_DEFAULT_CODEPAGE=437
   6.897 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
   6.898 +# CONFIG_NTFS_FS is not set
   6.899 +
   6.900 +#
   6.901 +# Pseudo filesystems
   6.902 +#
   6.903 +CONFIG_PROC_FS=y
   6.904 +CONFIG_PROC_KCORE=y
   6.905 +CONFIG_SYSFS=y
   6.906 +# CONFIG_DEVFS_FS is not set
   6.907 +# CONFIG_DEVPTS_FS_XATTR is not set
   6.908 +CONFIG_TMPFS=y
   6.909 +# CONFIG_HUGETLBFS is not set
   6.910 +# CONFIG_HUGETLB_PAGE is not set
   6.911 +CONFIG_RAMFS=y
   6.912 +
   6.913 +#
   6.914 +# Miscellaneous filesystems
   6.915 +#
   6.916 +# CONFIG_ADFS_FS is not set
   6.917 +# CONFIG_AFFS_FS is not set
   6.918 +# CONFIG_HFS_FS is not set
   6.919 +# CONFIG_HFSPLUS_FS is not set
   6.920 +# CONFIG_BEFS_FS is not set
   6.921 +# CONFIG_BFS_FS is not set
   6.922 +# CONFIG_EFS_FS is not set
   6.923 +# CONFIG_CRAMFS is not set
   6.924 +# CONFIG_VXFS_FS is not set
   6.925 +# CONFIG_HPFS_FS is not set
   6.926 +# CONFIG_QNX4FS_FS is not set
   6.927 +# CONFIG_SYSV_FS is not set
   6.928 +# CONFIG_UFS_FS is not set
   6.929 +
   6.930 +#
   6.931 +# Network File Systems
   6.932 +#
   6.933 +CONFIG_NFS_FS=y
   6.934 +CONFIG_NFS_V3=y
   6.935 +# CONFIG_NFS_V4 is not set
   6.936 +# CONFIG_NFS_DIRECTIO is not set
   6.937 +CONFIG_NFSD=m
   6.938 +CONFIG_NFSD_V3=y
   6.939 +# CONFIG_NFSD_V4 is not set
   6.940 +CONFIG_NFSD_TCP=y
   6.941 +CONFIG_ROOT_NFS=y
   6.942 +CONFIG_LOCKD=y
   6.943 +CONFIG_LOCKD_V4=y
   6.944 +CONFIG_EXPORTFS=m
   6.945 +CONFIG_SUNRPC=y
   6.946 +# CONFIG_RPCSEC_GSS_KRB5 is not set
   6.947 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
   6.948 +# CONFIG_SMB_FS is not set
   6.949 +# CONFIG_CIFS is not set
   6.950 +# CONFIG_NCP_FS is not set
   6.951 +# CONFIG_CODA_FS is not set
   6.952 +# CONFIG_AFS_FS is not set
   6.953 +
   6.954 +#
   6.955 +# Partition Types
   6.956 +#
   6.957 +# CONFIG_PARTITION_ADVANCED is not set
   6.958 +CONFIG_MSDOS_PARTITION=y
   6.959 +
   6.960 +#
   6.961 +# Native Language Support
   6.962 +#
   6.963 +CONFIG_NLS=y
   6.964 +CONFIG_NLS_DEFAULT="iso8859-1"
   6.965 +CONFIG_NLS_CODEPAGE_437=y
   6.966 +# CONFIG_NLS_CODEPAGE_737 is not set
   6.967 +# CONFIG_NLS_CODEPAGE_775 is not set
   6.968 +# CONFIG_NLS_CODEPAGE_850 is not set
   6.969 +# CONFIG_NLS_CODEPAGE_852 is not set
   6.970 +# CONFIG_NLS_CODEPAGE_855 is not set
   6.971 +# CONFIG_NLS_CODEPAGE_857 is not set
   6.972 +# CONFIG_NLS_CODEPAGE_860 is not set
   6.973 +# CONFIG_NLS_CODEPAGE_861 is not set
   6.974 +# CONFIG_NLS_CODEPAGE_862 is not set
   6.975 +# CONFIG_NLS_CODEPAGE_863 is not set
   6.976 +# CONFIG_NLS_CODEPAGE_864 is not set
   6.977 +# CONFIG_NLS_CODEPAGE_865 is not set
   6.978 +# CONFIG_NLS_CODEPAGE_866 is not set
   6.979 +# CONFIG_NLS_CODEPAGE_869 is not set
   6.980 +# CONFIG_NLS_CODEPAGE_936 is not set
   6.981 +# CONFIG_NLS_CODEPAGE_950 is not set
   6.982 +# CONFIG_NLS_CODEPAGE_932 is not set
   6.983 +# CONFIG_NLS_CODEPAGE_949 is not set
   6.984 +# CONFIG_NLS_CODEPAGE_874 is not set
   6.985 +# CONFIG_NLS_ISO8859_8 is not set
   6.986 +# CONFIG_NLS_CODEPAGE_1250 is not set
   6.987 +# CONFIG_NLS_CODEPAGE_1251 is not set
   6.988 +# CONFIG_NLS_ASCII is not set
   6.989 +CONFIG_NLS_ISO8859_1=y
   6.990 +# CONFIG_NLS_ISO8859_2 is not set
   6.991 +# CONFIG_NLS_ISO8859_3 is not set
   6.992 +# CONFIG_NLS_ISO8859_4 is not set
   6.993 +# CONFIG_NLS_ISO8859_5 is not set
   6.994 +# CONFIG_NLS_ISO8859_6 is not set
   6.995 +# CONFIG_NLS_ISO8859_7 is not set
   6.996 +# CONFIG_NLS_ISO8859_9 is not set
   6.997 +# CONFIG_NLS_ISO8859_13 is not set
   6.998 +# CONFIG_NLS_ISO8859_14 is not set
   6.999 +# CONFIG_NLS_ISO8859_15 is not set
  6.1000 +# CONFIG_NLS_KOI8_R is not set
  6.1001 +# CONFIG_NLS_KOI8_U is not set
  6.1002 +# CONFIG_NLS_UTF8 is not set
  6.1003 +
  6.1004 +#
  6.1005 +# Security options
  6.1006 +#
  6.1007 +# CONFIG_SECURITY is not set
  6.1008 +
  6.1009 +#
  6.1010 +# Cryptographic options
  6.1011 +#
  6.1012 +CONFIG_CRYPTO=y
  6.1013 +CONFIG_CRYPTO_HMAC=y
  6.1014 +# CONFIG_CRYPTO_NULL is not set
  6.1015 +# CONFIG_CRYPTO_MD4 is not set
  6.1016 +CONFIG_CRYPTO_MD5=m
  6.1017 +CONFIG_CRYPTO_SHA1=m
  6.1018 +# CONFIG_CRYPTO_SHA256 is not set
  6.1019 +# CONFIG_CRYPTO_SHA512 is not set
  6.1020 +# CONFIG_CRYPTO_WP512 is not set
  6.1021 +CONFIG_CRYPTO_DES=m
  6.1022 +# CONFIG_CRYPTO_BLOWFISH is not set
  6.1023 +# CONFIG_CRYPTO_TWOFISH is not set
  6.1024 +# CONFIG_CRYPTO_SERPENT is not set
  6.1025 +# CONFIG_CRYPTO_AES_586 is not set
  6.1026 +# CONFIG_CRYPTO_CAST5 is not set
  6.1027 +# CONFIG_CRYPTO_CAST6 is not set
  6.1028 +# CONFIG_CRYPTO_TEA is not set
  6.1029 +# CONFIG_CRYPTO_ARC4 is not set
  6.1030 +# CONFIG_CRYPTO_KHAZAD is not set
  6.1031 +# CONFIG_CRYPTO_DEFLATE is not set
  6.1032 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
  6.1033 +CONFIG_CRYPTO_CRC32C=m
  6.1034 +# CONFIG_CRYPTO_TEST is not set
  6.1035 +
  6.1036 +#
  6.1037 +# Library routines
  6.1038 +#
  6.1039 +# CONFIG_CRC_CCITT is not set
  6.1040 +CONFIG_CRC32=y
  6.1041 +CONFIG_LIBCRC32C=y
  6.1042 +CONFIG_ZLIB_INFLATE=y
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/configs/xenU_defconfig	Fri Nov 19 00:40:52 2004 +0000
     7.3 @@ -0,0 +1,480 @@
     7.4 +#
     7.5 +# Automatically generated make config: don't edit
     7.6 +# Linux kernel version: 2.6.9-xen0
     7.7 +# Sun Oct 31 21:32:23 2004
     7.8 +#
     7.9 +CONFIG_XEN=y
    7.10 +CONFIG_ARCH_XEN=y
    7.11 +CONFIG_NO_IDLE_HZ=y
    7.12 +
    7.13 +#
    7.14 +# XEN
    7.15 +#
    7.16 +# CONFIG_XEN_PRIVILEGED_GUEST is not set
    7.17 +# CONFIG_XEN_PHYSDEV_ACCESS is not set
    7.18 +# CONFIG_XEN_BLKDEV_BACKEND is not set
    7.19 +# CONFIG_XEN_NETDEV_BACKEND is not set
    7.20 +CONFIG_XEN_BLKDEV_FRONTEND=y
    7.21 +CONFIG_XEN_NETDEV_FRONTEND=y
    7.22 +# CONFIG_XEN_NETDEV_FRONTEND_PIPELINED_TRANSMITTER is not set
    7.23 +CONFIG_XEN_WRITABLE_PAGETABLES=y
    7.24 +CONFIG_XEN_SCRUB_PAGES=y
    7.25 +CONFIG_HAVE_ARCH_DEV_ALLOC_SKB=y
    7.26 +CONFIG_X86=y
    7.27 +# CONFIG_X86_64 is not set
    7.28 +
    7.29 +#
    7.30 +# Code maturity level options
    7.31 +#
    7.32 +CONFIG_EXPERIMENTAL=y
    7.33 +CONFIG_CLEAN_COMPILE=y
    7.34 +CONFIG_BROKEN_ON_SMP=y
    7.35 +
    7.36 +#
    7.37 +# General setup
    7.38 +#
    7.39 +CONFIG_LOCALVERSION=""
    7.40 +CONFIG_SWAP=y
    7.41 +CONFIG_SYSVIPC=y
    7.42 +# CONFIG_POSIX_MQUEUE is not set
    7.43 +# CONFIG_BSD_PROCESS_ACCT is not set
    7.44 +CONFIG_SYSCTL=y
    7.45 +# CONFIG_AUDIT is not set
    7.46 +CONFIG_LOG_BUF_SHIFT=14
    7.47 +CONFIG_HOTPLUG=y
    7.48 +# CONFIG_IKCONFIG is not set
    7.49 +# CONFIG_EMBEDDED is not set
    7.50 +CONFIG_KALLSYMS=y
    7.51 +# CONFIG_KALLSYMS_EXTRA_PASS is not set
    7.52 +CONFIG_FUTEX=y
    7.53 +CONFIG_EPOLL=y
    7.54 +CONFIG_IOSCHED_NOOP=y
    7.55 +CONFIG_IOSCHED_AS=y
    7.56 +CONFIG_IOSCHED_DEADLINE=y
    7.57 +CONFIG_IOSCHED_CFQ=y
    7.58 +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
    7.59 +CONFIG_SHMEM=y
    7.60 +# CONFIG_TINY_SHMEM is not set
    7.61 +
    7.62 +#
    7.63 +# Loadable module support
    7.64 +#
    7.65 +CONFIG_MODULES=y
    7.66 +CONFIG_MODULE_UNLOAD=y
    7.67 +# CONFIG_MODULE_FORCE_UNLOAD is not set
    7.68 +CONFIG_OBSOLETE_MODPARM=y
    7.69 +# CONFIG_MODVERSIONS is not set
    7.70 +CONFIG_KMOD=y
    7.71 +
    7.72 +#
    7.73 +# X86 Processor Configuration
    7.74 +#
    7.75 +CONFIG_XENARCH="i386"
    7.76 +CONFIG_MMU=y
    7.77 +CONFIG_UID16=y
    7.78 +CONFIG_GENERIC_ISA_DMA=y
    7.79 +# CONFIG_M686 is not set
    7.80 +# CONFIG_MPENTIUMII is not set
    7.81 +# CONFIG_MPENTIUMIII is not set
    7.82 +# CONFIG_MPENTIUMM is not set
    7.83 +CONFIG_MPENTIUM4=y
    7.84 +# CONFIG_MK6 is not set
    7.85 +# CONFIG_MK7 is not set
    7.86 +# CONFIG_MK8 is not set
    7.87 +# CONFIG_MCRUSOE is not set
    7.88 +# CONFIG_MCYRIXIII is not set
    7.89 +# CONFIG_MVIAC3_2 is not set
    7.90 +# CONFIG_X86_GENERIC is not set
    7.91 +CONFIG_X86_CMPXCHG=y
    7.92 +CONFIG_X86_XADD=y
    7.93 +CONFIG_X86_L1_CACHE_SHIFT=7
    7.94 +CONFIG_RWSEM_XCHGADD_ALGORITHM=y
    7.95 +CONFIG_X86_WP_WORKS_OK=y
    7.96 +CONFIG_X86_INVLPG=y
    7.97 +CONFIG_X86_BSWAP=y
    7.98 +CONFIG_X86_POPAD_OK=y
    7.99 +CONFIG_X86_GOOD_APIC=y
   7.100 +CONFIG_X86_INTEL_USERCOPY=y
   7.101 +CONFIG_X86_USE_PPRO_CHECKSUM=y
   7.102 +# CONFIG_HPET_TIMER is not set
   7.103 +# CONFIG_HPET_EMULATE_RTC is not set
   7.104 +# CONFIG_SMP is not set
   7.105 +CONFIG_PREEMPT=y
   7.106 +CONFIG_X86_CPUID=y
   7.107 +
   7.108 +#
   7.109 +# Firmware Drivers
   7.110 +#
   7.111 +# CONFIG_EDD is not set
   7.112 +CONFIG_NOHIGHMEM=y
   7.113 +# CONFIG_HIGHMEM4G is not set
   7.114 +CONFIG_HAVE_DEC_LOCK=y
   7.115 +# CONFIG_REGPARM is not set
   7.116 +
   7.117 +#
   7.118 +# Kernel hacking
   7.119 +#
   7.120 +# CONFIG_DEBUG_KERNEL is not set
   7.121 +CONFIG_EARLY_PRINTK=y
   7.122 +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
   7.123 +# CONFIG_FRAME_POINTER is not set
   7.124 +# CONFIG_4KSTACKS is not set
   7.125 +CONFIG_X86_BIOS_REBOOT=y
   7.126 +CONFIG_X86_STD_RESOURCES=y
   7.127 +CONFIG_PC=y
   7.128 +
   7.129 +#
   7.130 +# Executable file formats
   7.131 +#
   7.132 +CONFIG_BINFMT_ELF=y
   7.133 +# CONFIG_BINFMT_AOUT is not set
   7.134 +# CONFIG_BINFMT_MISC is not set
   7.135 +
   7.136 +#
   7.137 +# Device Drivers
   7.138 +#
   7.139 +
   7.140 +#
   7.141 +# Generic Driver Options
   7.142 +#
   7.143 +CONFIG_STANDALONE=y
   7.144 +CONFIG_PREVENT_FIRMWARE_BUILD=y
   7.145 +# CONFIG_FW_LOADER is not set
   7.146 +
   7.147 +#
   7.148 +# Block devices
   7.149 +#
   7.150 +# CONFIG_BLK_DEV_FD is not set
   7.151 +CONFIG_BLK_DEV_LOOP=m
   7.152 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set
   7.153 +CONFIG_BLK_DEV_NBD=m
   7.154 +CONFIG_BLK_DEV_RAM=y
   7.155 +CONFIG_BLK_DEV_RAM_SIZE=4096
   7.156 +CONFIG_BLK_DEV_INITRD=y
   7.157 +# CONFIG_LBD is not set
   7.158 +
   7.159 +#
   7.160 +# SCSI device support
   7.161 +#
   7.162 +CONFIG_SCSI=m
   7.163 +CONFIG_SCSI_PROC_FS=y
   7.164 +
   7.165 +#
   7.166 +# SCSI support type (disk, tape, CD-ROM)
   7.167 +#
   7.168 +CONFIG_BLK_DEV_SD=m
   7.169 +# CONFIG_CHR_DEV_ST is not set
   7.170 +# CONFIG_CHR_DEV_OSST is not set
   7.171 +# CONFIG_BLK_DEV_SR is not set
   7.172 +# CONFIG_CHR_DEV_SG is not set
   7.173 +
   7.174 +#
   7.175 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
   7.176 +#
   7.177 +# CONFIG_SCSI_MULTI_LUN is not set
   7.178 +# CONFIG_SCSI_CONSTANTS is not set
   7.179 +# CONFIG_SCSI_LOGGING is not set
   7.180 +
   7.181 +#
   7.182 +# SCSI Transport Attributes
   7.183 +#
   7.184 +# CONFIG_SCSI_SPI_ATTRS is not set
   7.185 +# CONFIG_SCSI_FC_ATTRS is not set
   7.186 +
   7.187 +#
   7.188 +# SCSI low-level drivers
   7.189 +#
   7.190 +# CONFIG_SCSI_SATA is not set
   7.191 +# CONFIG_SCSI_DEBUG is not set
   7.192 +
   7.193 +#
   7.194 +# Multi-device support (RAID and LVM)
   7.195 +#
   7.196 +# CONFIG_MD is not set
   7.197 +
   7.198 +#
   7.199 +# Networking support
   7.200 +#
   7.201 +CONFIG_NET=y
   7.202 +
   7.203 +#
   7.204 +# Networking options
   7.205 +#
   7.206 +CONFIG_PACKET=y
   7.207 +# CONFIG_PACKET_MMAP is not set
   7.208 +# CONFIG_NETLINK_DEV is not set
   7.209 +CONFIG_UNIX=y
   7.210 +# CONFIG_NET_KEY is not set
   7.211 +CONFIG_INET=y
   7.212 +# CONFIG_IP_MULTICAST is not set
   7.213 +# CONFIG_IP_ADVANCED_ROUTER is not set
   7.214 +CONFIG_IP_PNP=y
   7.215 +# CONFIG_IP_PNP_DHCP is not set
   7.216 +# CONFIG_IP_PNP_BOOTP is not set
   7.217 +# CONFIG_IP_PNP_RARP is not set
   7.218 +# CONFIG_NET_IPIP is not set
   7.219 +# CONFIG_NET_IPGRE is not set
   7.220 +# CONFIG_ARPD is not set
   7.221 +# CONFIG_SYN_COOKIES is not set
   7.222 +# CONFIG_INET_AH is not set
   7.223 +# CONFIG_INET_ESP is not set
   7.224 +# CONFIG_INET_IPCOMP is not set
   7.225 +# CONFIG_INET_TUNNEL is not set
   7.226 +# CONFIG_IPV6 is not set
   7.227 +# CONFIG_NETFILTER is not set
   7.228 +
   7.229 +#
   7.230 +# SCTP Configuration (EXPERIMENTAL)
   7.231 +#
   7.232 +# CONFIG_IP_SCTP is not set
   7.233 +# CONFIG_ATM is not set
   7.234 +# CONFIG_BRIDGE is not set
   7.235 +# CONFIG_VLAN_8021Q is not set
   7.236 +# CONFIG_DECNET is not set
   7.237 +# CONFIG_LLC2 is not set
   7.238 +# CONFIG_IPX is not set
   7.239 +# CONFIG_ATALK is not set
   7.240 +# CONFIG_X25 is not set
   7.241 +# CONFIG_LAPB is not set
   7.242 +# CONFIG_NET_DIVERT is not set
   7.243 +# CONFIG_ECONET is not set
   7.244 +# CONFIG_WAN_ROUTER is not set
   7.245 +# CONFIG_NET_HW_FLOWCONTROL is not set
   7.246 +
   7.247 +#
   7.248 +# QoS and/or fair queueing
   7.249 +#
   7.250 +# CONFIG_NET_SCHED is not set
   7.251 +# CONFIG_NET_CLS_ROUTE is not set
   7.252 +
   7.253 +#
   7.254 +# Network testing
   7.255 +#
   7.256 +# CONFIG_NET_PKTGEN is not set
   7.257 +# CONFIG_NETPOLL is not set
   7.258 +# CONFIG_NET_POLL_CONTROLLER is not set
   7.259 +# CONFIG_HAMRADIO is not set
   7.260 +# CONFIG_IRDA is not set
   7.261 +# CONFIG_BT is not set
   7.262 +CONFIG_NETDEVICES=y
   7.263 +# CONFIG_DUMMY is not set
   7.264 +# CONFIG_BONDING is not set
   7.265 +# CONFIG_EQUALIZER is not set
   7.266 +# CONFIG_TUN is not set
   7.267 +
   7.268 +#
   7.269 +# Ethernet (10 or 100Mbit)
   7.270 +#
   7.271 +# CONFIG_NET_ETHERNET is not set
   7.272 +
   7.273 +#
   7.274 +# Ethernet (1000 Mbit)
   7.275 +#
   7.276 +
   7.277 +#
   7.278 +# Ethernet (10000 Mbit)
   7.279 +#
   7.280 +
   7.281 +#
   7.282 +# Token Ring devices
   7.283 +#
   7.284 +
   7.285 +#
   7.286 +# Wireless LAN (non-hamradio)
   7.287 +#
   7.288 +# CONFIG_NET_RADIO is not set
   7.289 +
   7.290 +#
   7.291 +# Wan interfaces
   7.292 +#
   7.293 +# CONFIG_WAN is not set
   7.294 +# CONFIG_PPP is not set
   7.295 +# CONFIG_SLIP is not set
   7.296 +# CONFIG_SHAPER is not set
   7.297 +# CONFIG_NETCONSOLE is not set
   7.298 +CONFIG_UNIX98_PTYS=y
   7.299 +
   7.300 +#
   7.301 +# File systems
   7.302 +#
   7.303 +CONFIG_EXT2_FS=y
   7.304 +# CONFIG_EXT2_FS_XATTR is not set
   7.305 +CONFIG_EXT3_FS=y
   7.306 +CONFIG_EXT3_FS_XATTR=y
   7.307 +# CONFIG_EXT3_FS_POSIX_ACL is not set
   7.308 +# CONFIG_EXT3_FS_SECURITY is not set
   7.309 +CONFIG_JBD=y
   7.310 +# CONFIG_JBD_DEBUG is not set
   7.311 +CONFIG_FS_MBCACHE=y
   7.312 +CONFIG_REISERFS_FS=y
   7.313 +# CONFIG_REISERFS_CHECK is not set
   7.314 +# CONFIG_REISERFS_PROC_INFO is not set
   7.315 +# CONFIG_REISERFS_FS_XATTR is not set
   7.316 +# CONFIG_JFS_FS is not set
   7.317 +# CONFIG_XFS_FS is not set
   7.318 +# CONFIG_MINIX_FS is not set
   7.319 +# CONFIG_ROMFS_FS is not set
   7.320 +# CONFIG_QUOTA is not set
   7.321 +CONFIG_AUTOFS_FS=y
   7.322 +CONFIG_AUTOFS4_FS=y
   7.323 +
   7.324 +#
   7.325 +# CD-ROM/DVD Filesystems
   7.326 +#
   7.327 +CONFIG_ISO9660_FS=y
   7.328 +CONFIG_JOLIET=y
   7.329 +CONFIG_ZISOFS=y
   7.330 +CONFIG_ZISOFS_FS=y
   7.331 +# CONFIG_UDF_FS is not set
   7.332 +
   7.333 +#
   7.334 +# DOS/FAT/NT Filesystems
   7.335 +#
   7.336 +CONFIG_FAT_FS=m
   7.337 +CONFIG_MSDOS_FS=m
   7.338 +CONFIG_VFAT_FS=m
   7.339 +CONFIG_FAT_DEFAULT_CODEPAGE=437
   7.340 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
   7.341 +# CONFIG_NTFS_FS is not set
   7.342 +
   7.343 +#
   7.344 +# Pseudo filesystems
   7.345 +#
   7.346 +CONFIG_PROC_FS=y
   7.347 +CONFIG_PROC_KCORE=y
   7.348 +CONFIG_SYSFS=y
   7.349 +# CONFIG_DEVFS_FS is not set
   7.350 +CONFIG_DEVPTS_FS_XATTR=y
   7.351 +# CONFIG_DEVPTS_FS_SECURITY is not set
   7.352 +CONFIG_TMPFS=y
   7.353 +# CONFIG_HUGETLBFS is not set
   7.354 +# CONFIG_HUGETLB_PAGE is not set
   7.355 +CONFIG_RAMFS=y
   7.356 +
   7.357 +#
   7.358 +# Miscellaneous filesystems
   7.359 +#
   7.360 +# CONFIG_ADFS_FS is not set
   7.361 +# CONFIG_AFFS_FS is not set
   7.362 +# CONFIG_HFS_FS is not set
   7.363 +# CONFIG_HFSPLUS_FS is not set
   7.364 +# CONFIG_BEFS_FS is not set
   7.365 +# CONFIG_BFS_FS is not set
   7.366 +# CONFIG_EFS_FS is not set
   7.367 +# CONFIG_CRAMFS is not set
   7.368 +# CONFIG_VXFS_FS is not set
   7.369 +# CONFIG_HPFS_FS is not set
   7.370 +# CONFIG_QNX4FS_FS is not set
   7.371 +# CONFIG_SYSV_FS is not set
   7.372 +# CONFIG_UFS_FS is not set
   7.373 +
   7.374 +#
   7.375 +# Network File Systems
   7.376 +#
   7.377 +CONFIG_NFS_FS=y
   7.378 +CONFIG_NFS_V3=y
   7.379 +# CONFIG_NFS_V4 is not set
   7.380 +# CONFIG_NFS_DIRECTIO is not set
   7.381 +# CONFIG_NFSD is not set
   7.382 +CONFIG_ROOT_NFS=y
   7.383 +CONFIG_LOCKD=y
   7.384 +CONFIG_LOCKD_V4=y
   7.385 +# CONFIG_EXPORTFS is not set
   7.386 +CONFIG_SUNRPC=y
   7.387 +# CONFIG_RPCSEC_GSS_KRB5 is not set
   7.388 +# CONFIG_RPCSEC_GSS_SPKM3 is not set
   7.389 +# CONFIG_SMB_FS is not set
   7.390 +# CONFIG_CIFS is not set
   7.391 +# CONFIG_NCP_FS is not set
   7.392 +# CONFIG_CODA_FS is not set
   7.393 +# CONFIG_AFS_FS is not set
   7.394 +
   7.395 +#
   7.396 +# Partition Types
   7.397 +#
   7.398 +# CONFIG_PARTITION_ADVANCED is not set
   7.399 +CONFIG_MSDOS_PARTITION=y
   7.400 +
   7.401 +#
   7.402 +# Native Language Support
   7.403 +#
   7.404 +CONFIG_NLS=y
   7.405 +CONFIG_NLS_DEFAULT="iso8859-1"
   7.406 +CONFIG_NLS_CODEPAGE_437=y
   7.407 +# CONFIG_NLS_CODEPAGE_737 is not set
   7.408 +# CONFIG_NLS_CODEPAGE_775 is not set
   7.409 +# CONFIG_NLS_CODEPAGE_850 is not set
   7.410 +# CONFIG_NLS_CODEPAGE_852 is not set
   7.411 +# CONFIG_NLS_CODEPAGE_855 is not set
   7.412 +# CONFIG_NLS_CODEPAGE_857 is not set
   7.413 +# CONFIG_NLS_CODEPAGE_860 is not set
   7.414 +# CONFIG_NLS_CODEPAGE_861 is not set
   7.415 +# CONFIG_NLS_CODEPAGE_862 is not set
   7.416 +# CONFIG_NLS_CODEPAGE_863 is not set
   7.417 +# CONFIG_NLS_CODEPAGE_864 is not set
   7.418 +# CONFIG_NLS_CODEPAGE_865 is not set
   7.419 +# CONFIG_NLS_CODEPAGE_866 is not set
   7.420 +# CONFIG_NLS_CODEPAGE_869 is not set
   7.421 +# CONFIG_NLS_CODEPAGE_936 is not set
   7.422 +# CONFIG_NLS_CODEPAGE_950 is not set
   7.423 +# CONFIG_NLS_CODEPAGE_932 is not set
   7.424 +# CONFIG_NLS_CODEPAGE_949 is not set
   7.425 +# CONFIG_NLS_CODEPAGE_874 is not set
   7.426 +# CONFIG_NLS_ISO8859_8 is not set
   7.427 +# CONFIG_NLS_CODEPAGE_1250 is not set
   7.428 +# CONFIG_NLS_CODEPAGE_1251 is not set
   7.429 +# CONFIG_NLS_ASCII is not set
   7.430 +CONFIG_NLS_ISO8859_1=y
   7.431 +# CONFIG_NLS_ISO8859_2 is not set
   7.432 +# CONFIG_NLS_ISO8859_3 is not set
   7.433 +# CONFIG_NLS_ISO8859_4 is not set
   7.434 +# CONFIG_NLS_ISO8859_5 is not set
   7.435 +# CONFIG_NLS_ISO8859_6 is not set
   7.436 +# CONFIG_NLS_ISO8859_7 is not set
   7.437 +# CONFIG_NLS_ISO8859_9 is not set
   7.438 +# CONFIG_NLS_ISO8859_13 is not set
   7.439 +# CONFIG_NLS_ISO8859_14 is not set
   7.440 +# CONFIG_NLS_ISO8859_15 is not set
   7.441 +# CONFIG_NLS_KOI8_R is not set
   7.442 +# CONFIG_NLS_KOI8_U is not set
   7.443 +# CONFIG_NLS_UTF8 is not set
   7.444 +
   7.445 +#
   7.446 +# Security options
   7.447 +#
   7.448 +# CONFIG_SECURITY is not set
   7.449 +
   7.450 +#
   7.451 +# Cryptographic options
   7.452 +#
   7.453 +CONFIG_CRYPTO=y
   7.454 +# CONFIG_CRYPTO_HMAC is not set
   7.455 +# CONFIG_CRYPTO_NULL is not set
   7.456 +# CONFIG_CRYPTO_MD4 is not set
   7.457 +CONFIG_CRYPTO_MD5=m
   7.458 +# CONFIG_CRYPTO_SHA1 is not set
   7.459 +# CONFIG_CRYPTO_SHA256 is not set
   7.460 +# CONFIG_CRYPTO_SHA512 is not set
   7.461 +# CONFIG_CRYPTO_WP512 is not set
   7.462 +# CONFIG_CRYPTO_DES is not set
   7.463 +# CONFIG_CRYPTO_BLOWFISH is not set
   7.464 +# CONFIG_CRYPTO_TWOFISH is not set
   7.465 +# CONFIG_CRYPTO_SERPENT is not set
   7.466 +# CONFIG_CRYPTO_AES_586 is not set
   7.467 +# CONFIG_CRYPTO_CAST5 is not set
   7.468 +# CONFIG_CRYPTO_CAST6 is not set
   7.469 +# CONFIG_CRYPTO_TEA is not set
   7.470 +# CONFIG_CRYPTO_ARC4 is not set
   7.471 +# CONFIG_CRYPTO_KHAZAD is not set
   7.472 +# CONFIG_CRYPTO_DEFLATE is not set
   7.473 +# CONFIG_CRYPTO_MICHAEL_MIC is not set
   7.474 +CONFIG_CRYPTO_CRC32C=m
   7.475 +# CONFIG_CRYPTO_TEST is not set
   7.476 +
   7.477 +#
   7.478 +# Library routines
   7.479 +#
   7.480 +# CONFIG_CRC_CCITT is not set
   7.481 +# CONFIG_CRC32 is not set
   7.482 +CONFIG_LIBCRC32C=m
   7.483 +CONFIG_ZLIB_INFLATE=y
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/Kconfig	Fri Nov 19 00:40:52 2004 +0000
     8.3 @@ -0,0 +1,951 @@
     8.4 +#
     8.5 +# For a description of the syntax of this configuration file,
     8.6 +# see Documentation/kbuild/kconfig-language.txt.
     8.7 +#
     8.8 +
     8.9 +menu "X86 Processor Configuration"
    8.10 +
    8.11 +config XENARCH
    8.12 +	string
    8.13 +	default i386
    8.14 +
    8.15 +config MMU
    8.16 +	bool
    8.17 +	default y
    8.18 +
    8.19 +config SBUS
    8.20 +	bool
    8.21 +
    8.22 +config UID16
    8.23 +	bool
    8.24 +	default y
    8.25 +
    8.26 +config GENERIC_ISA_DMA
    8.27 +	bool
    8.28 +	default y
    8.29 +
    8.30 +config GENERIC_IOMAP
    8.31 +	bool
    8.32 +	default y
    8.33 +
    8.34 +choice
    8.35 +	prompt "Processor family"
    8.36 +	default M686
    8.37 +
    8.38 +#config M386
    8.39 +#	bool "386"
    8.40 +#	---help---
    8.41 +#	  This is the processor type of your CPU. This information is used for
    8.42 +#	  optimizing purposes. In order to compile a kernel that can run on
    8.43 +#	  all x86 CPU types (albeit not optimally fast), you can specify
    8.44 +#	  "386" here.
    8.45 +#
    8.46 +#	  The kernel will not necessarily run on earlier architectures than
    8.47 +#	  the one you have chosen, e.g. a Pentium optimized kernel will run on
    8.48 +#	  a PPro, but not necessarily on a i486.
    8.49 +#
    8.50 +#	  Here are the settings recommended for greatest speed:
    8.51 +#	  - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI
    8.52 +#	  486DLC/DLC2, UMC 486SX-S and NexGen Nx586.  Only "386" kernels
    8.53 +#	  will run on a 386 class machine.
    8.54 +#	  - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or
    8.55 +#	  SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S.
    8.56 +#	  - "586" for generic Pentium CPUs lacking the TSC
    8.57 +#	  (time stamp counter) register.
    8.58 +#	  - "Pentium-Classic" for the Intel Pentium.
    8.59 +#	  - "Pentium-MMX" for the Intel Pentium MMX.
    8.60 +#	  - "Pentium-Pro" for the Intel Pentium Pro.
    8.61 +#	  - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron.
    8.62 +#	  - "Pentium-III" for the Intel Pentium III or Coppermine Celeron.
    8.63 +#	  - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron.
    8.64 +#	  - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D).
    8.65 +#	  - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird).
    8.66 +#	  - "Crusoe" for the Transmeta Crusoe series.
    8.67 +#	  - "Efficeon" for the Transmeta Efficeon series.
    8.68 +#	  - "Winchip-C6" for original IDT Winchip.
    8.69 +#	  - "Winchip-2" for IDT Winchip 2.
    8.70 +#	  - "Winchip-2A" for IDT Winchips with 3dNow! capabilities.
    8.71 +#	  - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3.
    8.72 +#	  - "VIA C3-2 for VIA C3-2 "Nehemiah" (model 9 and above).
    8.73 +#
    8.74 +#	  If you don't know what to do, choose "386".
    8.75 +
    8.76 +#config M486
    8.77 +#	bool "486"
    8.78 +#	help
    8.79 +#	  Select this for a 486 series processor, either Intel or one of the
    8.80 +#	  compatible processors from AMD, Cyrix, IBM, or Intel.  Includes DX,
    8.81 +#	  DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or
    8.82 +#	  U5S.
    8.83 +
    8.84 +#config M586
    8.85 +#	bool "586/K5/5x86/6x86/6x86MX"
    8.86 +#	help
    8.87 +#	  Select this for an 586 or 686 series processor such as the AMD K5,
    8.88 +#	  the Intel 5x86 or 6x86, or the Intel 6x86MX.  This choice does not
    8.89 +#	  assume the RDTSC (Read Time Stamp Counter) instruction.
    8.90 +
    8.91 +#config M586TSC
    8.92 +#	bool "Pentium-Classic"
    8.93 +#	help
    8.94 +#	  Select this for a Pentium Classic processor with the RDTSC (Read
    8.95 +#	  Time Stamp Counter) instruction for benchmarking.
    8.96 +
    8.97 +#config M586MMX
    8.98 +#	bool "Pentium-MMX"
    8.99 +#	help
   8.100 +#	  Select this for a Pentium with the MMX graphics/multimedia
   8.101 +#	  extended instructions.
   8.102 +
   8.103 +config M686
   8.104 +	bool "Pentium-Pro"
   8.105 +	help
   8.106 +	  Select this for Intel Pentium Pro chips.  This enables the use of
   8.107 +	  Pentium Pro extended instructions, and disables the init-time guard
   8.108 +	  against the f00f bug found in earlier Pentiums.
   8.109 +
   8.110 +config MPENTIUMII
   8.111 +	bool "Pentium-II/Celeron(pre-Coppermine)"
   8.112 +	help
   8.113 +	  Select this for Intel chips based on the Pentium-II and
   8.114 +	  pre-Coppermine Celeron core.  This option enables an unaligned
   8.115 +	  copy optimization, compiles the kernel with optimization flags
   8.116 +	  tailored for the chip, and applies any applicable Pentium Pro
   8.117 +	  optimizations.
   8.118 +
   8.119 +config MPENTIUMIII
   8.120 +	bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon"
   8.121 +	help
   8.122 +	  Select this for Intel chips based on the Pentium-III and
   8.123 +	  Celeron-Coppermine core.  This option enables use of some
   8.124 +	  extended prefetch instructions in addition to the Pentium II
   8.125 +	  extensions.
   8.126 +
   8.127 +config MPENTIUMM
   8.128 +	bool "Pentium M"
   8.129 +	help
   8.130 +	  Select this for Intel Pentium M (not Pentium-4 M)
   8.131 +	  notebook chips.
   8.132 +
   8.133 +config MPENTIUM4
   8.134 +	bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/Xeon"
   8.135 +	help
   8.136 +	  Select this for Intel Pentium 4 chips.  This includes the
   8.137 +	  Pentium 4, P4-based Celeron and Xeon, and Pentium-4 M
   8.138 +	  (not Pentium M) chips.  This option enables compile flags
   8.139 +	  optimized for the chip, uses the correct cache shift, and
   8.140 +	  applies any applicable Pentium III optimizations.
   8.141 +
   8.142 +config MK6
   8.143 +	bool "K6/K6-II/K6-III"
   8.144 +	help
   8.145 +	  Select this for an AMD K6-family processor.  Enables use of
   8.146 +	  some extended instructions, and passes appropriate optimization
   8.147 +	  flags to GCC.
   8.148 +
   8.149 +config MK7
   8.150 +	bool "Athlon/Duron/K7"
   8.151 +	help
   8.152 +	  Select this for an AMD Athlon K7-family processor.  Enables use of
   8.153 +	  some extended instructions, and passes appropriate optimization
   8.154 +	  flags to GCC.
   8.155 +
   8.156 +config MK8
   8.157 +	bool "Opteron/Athlon64/Hammer/K8"
   8.158 +	help
   8.159 +	  Select this for an AMD Opteron or Athlon64 Hammer-family processor.  Enables
   8.160 +	  use of some extended instructions, and passes appropriate optimization
   8.161 +	  flags to GCC.
   8.162 +
   8.163 +config MCRUSOE
   8.164 +	bool "Crusoe"
   8.165 +	help
   8.166 +	  Select this for a Transmeta Crusoe processor.  Treats the processor
   8.167 +	  like a 586 with TSC, and sets some GCC optimization flags (like a
   8.168 +	  Pentium Pro with no alignment requirements).
   8.169 +
   8.170 +config MEFFICEON
   8.171 +	bool "Efficeon"
   8.172 +	help
   8.173 +	  Select this for a Transmeta Efficeon processor.
   8.174 +
   8.175 +#config MWINCHIPC6
   8.176 +#	bool "Winchip-C6"
   8.177 +#	help
   8.178 +#	  Select this for an IDT Winchip C6 chip.  Linux and GCC
   8.179 +#	  treat this chip as a 586TSC with some extended instructions
   8.180 +#	  and alignment requirements.
   8.181 +
   8.182 +#config MWINCHIP2
   8.183 +#	bool "Winchip-2"
   8.184 +#	help
   8.185 +#	  Select this for an IDT Winchip-2.  Linux and GCC
   8.186 +#	  treat this chip as a 586TSC with some extended instructions
   8.187 +#	  and alignment requirements.
   8.188 +
   8.189 +#config MWINCHIP3D
   8.190 +#	bool "Winchip-2A/Winchip-3"
   8.191 +#	help
   8.192 +#	  Select this for an IDT Winchip-2A or 3.  Linux and GCC
   8.193 +#	  treat this chip as a 586TSC with some extended instructions
   8.194 +#	  and alignment reqirements.  Also enable out of order memory
   8.195 +#	  stores for this CPU, which can increase performance of some
   8.196 +#	  operations.
   8.197 +
   8.198 +config MCYRIXIII
   8.199 +	bool "CyrixIII/VIA-C3"
   8.200 +	help
   8.201 +	  Select this for a Cyrix III or C3 chip.  Presently Linux and GCC
   8.202 +	  treat this chip as a generic 586. Whilst the CPU is 686 class,
   8.203 +	  it lacks the cmov extension which gcc assumes is present when
   8.204 +	  generating 686 code.
   8.205 +	  Note that Nehemiah (Model 9) and above will not boot with this
   8.206 +	  kernel due to them lacking the 3DNow! instructions used in earlier
   8.207 +	  incarnations of the CPU.
   8.208 +
   8.209 +config MVIAC3_2
   8.210 +	bool "VIA C3-2 (Nehemiah)"
   8.211 +	help
   8.212 +	  Select this for a VIA C3 "Nehemiah". Selecting this enables usage
   8.213 +	  of SSE and tells gcc to treat the CPU as a 686.
   8.214 +	  Note, this kernel will not boot on older (pre model 9) C3s.
   8.215 +
   8.216 +endchoice
   8.217 +
   8.218 +config X86_GENERIC
   8.219 +       bool "Generic x86 support"
   8.220 +       help
   8.221 +	  Instead of just including optimizations for the selected
   8.222 +	  x86 variant (e.g. PII, Crusoe or Athlon), include some more
   8.223 +	  generic optimizations as well. This will make the kernel
   8.224 +	  perform better on x86 CPUs other than that selected.
   8.225 +
   8.226 +	  This is really intended for distributors who need more
   8.227 +	  generic optimizations.
   8.228 +
   8.229 +#
   8.230 +# Define implied options from the CPU selection here
   8.231 +#
   8.232 +config X86_CMPXCHG
   8.233 +	bool
   8.234 +	depends on !M386
   8.235 +	default y
   8.236 +
   8.237 +config X86_XADD
   8.238 +	bool
   8.239 +	depends on !M386
   8.240 +	default y
   8.241 +
   8.242 +config X86_L1_CACHE_SHIFT
   8.243 +	int
   8.244 +	default "7" if MPENTIUM4 || X86_GENERIC
   8.245 +	default "4" if X86_ELAN || M486 || M386
   8.246 +	default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2
   8.247 +	default "6" if MK7 || MK8 || MPENTIUMM
   8.248 +
   8.249 +config RWSEM_GENERIC_SPINLOCK
   8.250 +	bool
   8.251 +	depends on M386
   8.252 +	default y
   8.253 +
   8.254 +config RWSEM_XCHGADD_ALGORITHM
   8.255 +	bool
   8.256 +	depends on !M386
   8.257 +	default y
   8.258 +
   8.259 +config X86_PPRO_FENCE
   8.260 +	bool
   8.261 +	depends on M686 || M586MMX || M586TSC || M586 || M486 || M386
   8.262 +	default y
   8.263 +
   8.264 +config X86_F00F_BUG
   8.265 +	bool
   8.266 +	depends on M586MMX || M586TSC || M586 || M486 || M386
   8.267 +	default y
   8.268 +
   8.269 +config X86_WP_WORKS_OK
   8.270 +	bool
   8.271 +	depends on !M386
   8.272 +	default y
   8.273 +
   8.274 +config X86_INVLPG
   8.275 +	bool
   8.276 +	depends on !M386
   8.277 +	default y
   8.278 +
   8.279 +config X86_BSWAP
   8.280 +	bool
   8.281 +	depends on !M386
   8.282 +	default y
   8.283 +
   8.284 +config X86_POPAD_OK
   8.285 +	bool
   8.286 +	depends on !M386
   8.287 +	default y
   8.288 +
   8.289 +config X86_ALIGNMENT_16
   8.290 +	bool
   8.291 +	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2
   8.292 +	default y
   8.293 +
   8.294 +config X86_GOOD_APIC
   8.295 +	bool
   8.296 +	depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON
   8.297 +	default y
   8.298 +
   8.299 +config X86_INTEL_USERCOPY
   8.300 +	bool
   8.301 +	depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON
   8.302 +	default y
   8.303 +
   8.304 +config X86_USE_PPRO_CHECKSUM
   8.305 +	bool
   8.306 +	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MEFFICEON
   8.307 +	default y
   8.308 +
   8.309 +config X86_USE_3DNOW
   8.310 +	bool
   8.311 +	depends on MCYRIXIII || MK7
   8.312 +	default y
   8.313 +
   8.314 +config X86_OOSTORE
   8.315 +	bool
   8.316 +	depends on (MWINCHIP3D || MWINCHIP2 || MWINCHIPC6) && MTRR
   8.317 +	default y
   8.318 +
   8.319 +config HPET_TIMER
   8.320 +	bool
   8.321 +	default n
   8.322 +#config HPET_TIMER
   8.323 +#	bool "HPET Timer Support"
   8.324 +#	help
   8.325 +#	  This enables the use of the HPET for the kernel's internal timer.
   8.326 +#	  HPET is the next generation timer replacing legacy 8254s.
   8.327 +#	  You can safely choose Y here.  However, HPET will only be
   8.328 +#	  activated if the platform and the BIOS support this feature.
   8.329 +#	  Otherwise the 8254 will be used for timing services.
   8.330 +#
   8.331 +#	  Choose N to continue using the legacy 8254 timer.
   8.332 +
   8.333 +config HPET_EMULATE_RTC
   8.334 +	def_bool HPET_TIMER && RTC=y
   8.335 +
   8.336 +config SMP
   8.337 +	bool
   8.338 +	default n
   8.339 +#config SMP
   8.340 +#	bool "Symmetric multi-processing support"
   8.341 +#	---help---
   8.342 +#	  This enables support for systems with more than one CPU. If you have
   8.343 +#	  a system with only one CPU, like most personal computers, say N. If
   8.344 +#	  you have a system with more than one CPU, say Y.
   8.345 +#
   8.346 +#	  If you say N here, the kernel will run on single and multiprocessor
   8.347 +#	  machines, but will use only one CPU of a multiprocessor machine. If
   8.348 +#	  you say Y here, the kernel will run on many, but not all,
   8.349 +#	  singleprocessor machines. On a singleprocessor machine, the kernel
   8.350 +#	  will run faster if you say N here.
   8.351 +#
   8.352 +#	  Note that if you say Y here and choose architecture "586" or
   8.353 +#	  "Pentium" under "Processor family", the kernel will not work on 486
   8.354 +#	  architectures. Similarly, multiprocessor kernels for the "PPro"
   8.355 +#	  architecture may not work on all Pentium based boards.
   8.356 +#
   8.357 +#	  People using multiprocessor machines who say Y here should also say
   8.358 +#	  Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
   8.359 +#	  Management" code will be disabled if you say Y here.
   8.360 +#
   8.361 +#	  See also the <file:Documentation/smp.txt>,
   8.362 +#	  <file:Documentation/i386/IO-APIC.txt>,
   8.363 +#	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
   8.364 +#	  <http://www.tldp.org/docs.html#howto>.
   8.365 +#
   8.366 +#	  If you don't know what to do here, say N.
   8.367 +
   8.368 +config NR_CPUS
   8.369 +	int "Maximum number of CPUs (2-255)"
   8.370 +	range 2 255
   8.371 +	depends on SMP
   8.372 +	default "32" if X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000
   8.373 +	default "8"
   8.374 +	help
   8.375 +	  This allows you to specify the maximum number of CPUs which this
   8.376 +	  kernel will support.  The maximum supported value is 255 and the
   8.377 +	  minimum value which makes sense is 2.
   8.378 +
   8.379 +	  This is purely to save memory - each supported CPU adds
   8.380 +	  approximately eight kilobytes to the kernel image.
   8.381 +
   8.382 +config SCHED_SMT
   8.383 +	bool "SMT (Hyperthreading) scheduler support"
   8.384 +	depends on SMP
   8.385 +	default off
   8.386 +	help
   8.387 +	  SMT scheduler support improves the CPU scheduler's decision making
   8.388 +	  when dealing with Intel Pentium 4 chips with HyperThreading at a
   8.389 +	  cost of slightly increased overhead in some places. If unsure say
   8.390 +	  N here.
   8.391 +
   8.392 +config PREEMPT
   8.393 +	bool "Preemptible Kernel"
   8.394 +	help
   8.395 +	  This option reduces the latency of the kernel when reacting to
   8.396 +	  real-time or interactive events by allowing a low priority process to
   8.397 +	  be preempted even if it is in kernel mode executing a system call.
   8.398 +	  This allows applications to run more reliably even when the system is
   8.399 +	  under load.
   8.400 +
   8.401 +	  Say Y here if you are building a kernel for a desktop, embedded
   8.402 +	  or real-time system.  Say N if you are unsure.
   8.403 +
   8.404 +#config X86_TSC
   8.405 +#	 bool
   8.406 +#	depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ
   8.407 +#	 default y
   8.408 +
   8.409 +#config X86_MCE
   8.410 +#	 bool "Machine Check Exception"
   8.411 +#	depends on !X86_VOYAGER
   8.412 +#	 ---help---
   8.413 +#	   Machine Check Exception support allows the processor to notify the
   8.414 +#	   kernel if it detects a problem (e.g. overheating, component failure).
   8.415 +#	   The action the kernel takes depends on the severity of the problem,
   8.416 +#	   ranging from a warning message on the console, to halting the machine.
   8.417 +#	   Your processor must be a Pentium or newer to support this - check the
   8.418 +#	   flags in /proc/cpuinfo for mce.  Note that some older Pentium systems
   8.419 +#	   have a design flaw which leads to false MCE events - hence MCE is
   8.420 +#	   disabled on all P5 processors, unless explicitly enabled with "mce"
   8.421 +#	   as a boot argument.  Similarly, if MCE is built in and creates a
   8.422 +#	   problem on some new non-standard machine, you can boot with "nomce"
   8.423 +#	   to disable it.  MCE support simply ignores non-MCE processors like
   8.424 +#	   the 386 and 486, so nearly everyone can say Y here.
   8.425 +
   8.426 +#config X86_MCE_NONFATAL
   8.427 +#	tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4"
   8.428 +#	 depends on X86_MCE
   8.429 +#	 help
   8.430 +#	   Enabling this feature starts a timer that triggers every 5 seconds which
   8.431 +#	   will look at the machine check registers to see if anything happened.
   8.432 +#	   Non-fatal problems automatically get corrected (but still logged).
   8.433 +#	   Disable this if you don't want to see these messages.
   8.434 +#	   Seeing the messages this option prints out may be indicative of dying hardware,
   8.435 +#	   or out-of-spec (ie, overclocked) hardware.
   8.436 +#	   This option only does something on certain CPUs.
   8.437 +#	   (AMD Athlon/Duron and Intel Pentium 4)
   8.438 +
   8.439 +#config X86_MCE_P4THERMAL
   8.440 +#	 bool "check for P4 thermal throttling interrupt."
   8.441 +#	 depends on X86_MCE && (X86_UP_APIC || SMP)
   8.442 +#	 help
   8.443 +#	   Enabling this feature will cause a message to be printed when the P4
   8.444 +#	   enters thermal throttling.
   8.445 +
   8.446 +#config MICROCODE
   8.447 +#	 tristate "/dev/cpu/microcode - Intel IA32 CPU microcode support"
   8.448 +#	 ---help---
   8.449 +#	   If you say Y here and also to "/dev file system support" in the
   8.450 +#	   'File systems' section, you will be able to update the microcode on
   8.451 +#	   Intel processors in the IA32 family, e.g. Pentium Pro, Pentium II,
   8.452 +#	   Pentium III, Pentium 4, Xeon etc.  You will obviously need the
   8.453 +#	   actual microcode binary data itself which is not shipped with the
   8.454 +#	   Linux kernel.
   8.455 +#
   8.456 +#	   For latest news and information on obtaining all the required
   8.457 +#	   ingredients for this driver, check:
   8.458 +#	   <http://www.urbanmyth.org/microcode/>.
   8.459 +#
   8.460 +#	   To compile this driver as a module, choose M here: the
   8.461 +#	   module will be called microcode.
   8.462 +
   8.463 +#config X86_MSR
   8.464 +#	 tristate "/dev/cpu/*/msr - Model-specific register support"
   8.465 +#	 help
   8.466 +#	   This device gives privileged processes access to the x86
   8.467 +#	   Model-Specific Registers (MSRs).  It is a character device with
   8.468 +#	   major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr.
   8.469 +#	   MSR accesses are directed to a specific CPU on multi-processor
   8.470 +#	   systems.
   8.471 +
   8.472 +config X86_CPUID
   8.473 +	tristate "/dev/cpu/*/cpuid - CPU information support"
   8.474 +	help
   8.475 +	  This device gives processes access to the x86 CPUID instruction to
   8.476 +	  be executed on a specific processor.  It is a character device
   8.477 +	  with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to
   8.478 +	  /dev/cpu/31/cpuid.
   8.479 +
   8.480 +source "drivers/firmware/Kconfig"
   8.481 +
   8.482 +choice
   8.483 +	prompt "High Memory Support"
   8.484 +	default NOHIGHMEM
   8.485 +
   8.486 +config NOHIGHMEM
   8.487 +	bool "off"
   8.488 +	---help---
   8.489 +	  Linux can use up to 64 Gigabytes of physical memory on x86 systems.
   8.490 +	  However, the address space of 32-bit x86 processors is only 4
   8.491 +	  Gigabytes large. That means that, if you have a large amount of
   8.492 +	  physical memory, not all of it can be "permanently mapped" by the
   8.493 +	  kernel. The physical memory that's not permanently mapped is called
   8.494 +	  "high memory".
   8.495 +
   8.496 +	  If you are compiling a kernel which will never run on a machine with
   8.497 +	  more than 1 Gigabyte total physical RAM, answer "off" here (default
   8.498 +	  choice and suitable for most users). This will result in a "3GB/1GB"
   8.499 +	  split: 3GB are mapped so that each process sees a 3GB virtual memory
   8.500 +	  space and the remaining part of the 4GB virtual memory space is used
   8.501 +	  by the kernel to permanently map as much physical memory as
   8.502 +	  possible.
   8.503 +
   8.504 +	  If the machine has between 1 and 4 Gigabytes physical RAM, then
   8.505 +	  answer "4GB" here.
   8.506 +
   8.507 +	  If more than 4 Gigabytes is used then answer "64GB" here. This
   8.508 +	  selection turns Intel PAE (Physical Address Extension) mode on.
   8.509 +	  PAE implements 3-level paging on IA32 processors. PAE is fully
   8.510 +	  supported by Linux, PAE mode is implemented on all recent Intel
   8.511 +	  processors (Pentium Pro and better). NOTE: If you say "64GB" here,
   8.512 +	  then the kernel will not boot on CPUs that don't support PAE!
   8.513 +
   8.514 +	  The actual amount of total physical memory will either be
   8.515 +	  auto detected or can be forced by using a kernel command line option
   8.516 +	  such as "mem=256M". (Try "man bootparam" or see the documentation of
   8.517 +	  your boot loader (lilo or loadlin) about how to pass options to the
   8.518 +	  kernel at boot time.)
   8.519 +
   8.520 +	  If unsure, say "off".
   8.521 +
   8.522 +config HIGHMEM4G
   8.523 +	bool "4GB"
   8.524 +	help
   8.525 +	  Select this if you have a 32-bit processor and between 1 and 4
   8.526 +	  gigabytes of physical RAM.
   8.527 +
   8.528 +#config HIGHMEM64G
   8.529 +#	bool "64GB"
   8.530 +#	help
   8.531 +#	  Select this if you have a 32-bit processor and more than 4
   8.532 +#	  gigabytes of physical RAM.
   8.533 +
   8.534 +endchoice
   8.535 +
   8.536 +config HIGHMEM
   8.537 +	bool
   8.538 +	depends on HIGHMEM64G || HIGHMEM4G
   8.539 +	default y
   8.540 +
   8.541 +config X86_PAE
   8.542 +	bool
   8.543 +	depends on HIGHMEM64G
   8.544 +	default y
   8.545 +
   8.546 +# Common NUMA Features
   8.547 +config NUMA
   8.548 +	bool "Numa Memory Allocation and Scheduler Support"
   8.549 +	depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI))
   8.550 +	default n if X86_PC
   8.551 +	default y if (X86_NUMAQ || X86_SUMMIT)
   8.552 +
   8.553 +# Need comments to help the hapless user trying to turn on NUMA support
   8.554 +comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support"
   8.555 +	depends on X86_NUMAQ && (!HIGHMEM64G || !SMP)
   8.556 +
   8.557 +comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI"
   8.558 +	depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI)
   8.559 +
   8.560 +config DISCONTIGMEM
   8.561 +	bool
   8.562 +	depends on NUMA
   8.563 +	default y
   8.564 +
   8.565 +config HAVE_ARCH_BOOTMEM_NODE
   8.566 +	bool
   8.567 +	depends on NUMA
   8.568 +	default y
   8.569 +
   8.570 +#config HIGHPTE
   8.571 +#	bool "Allocate 3rd-level pagetables from highmem"
   8.572 +#	depends on HIGHMEM4G || HIGHMEM64G
   8.573 +#	help
   8.574 +#	  The VM uses one page table entry for each page of physical memory.
   8.575 +#	  For systems with a lot of RAM, this can be wasteful of precious
   8.576 +#	  low memory.  Setting this option will put user-space page table
   8.577 +#	  entries in high memory.
   8.578 +
   8.579 +#config MTRR
   8.580 +#	 bool "MTRR (Memory Type Range Register) support"
   8.581 +#	 ---help---
   8.582 +#	   On Intel P6 family processors (Pentium Pro, Pentium II and later)
   8.583 +#	   the Memory Type Range Registers (MTRRs) may be used to control
   8.584 +#	   processor access to memory ranges. This is most useful if you have
   8.585 +#	   a video (VGA) card on a PCI or AGP bus. Enabling write-combining
   8.586 +#	   allows bus write transfers to be combined into a larger transfer
   8.587 +#	   before bursting over the PCI/AGP bus. This can increase performance
   8.588 +#	   of image write operations 2.5 times or more. Saying Y here creates a
   8.589 +#	   /proc/mtrr file which may be used to manipulate your processor's
   8.590 +#	   MTRRs. Typically the X server should use this.
   8.591 +#
   8.592 +#	   This code has a reasonably generic interface so that similar
   8.593 +#	   control registers on other processors can be easily supported
   8.594 +#	   as well:
   8.595 +#
   8.596 +#	   The Cyrix 6x86, 6x86MX and M II processors have Address Range
   8.597 +#	   Registers (ARRs) which provide a similar functionality to MTRRs. For
   8.598 +#	   these, the ARRs are used to emulate the MTRRs.
   8.599 +#	   The AMD K6-2 (stepping 8 and above) and K6-3 processors have two
   8.600 +#	   MTRRs. The Centaur C6 (WinChip) has 8 MCRs, allowing
   8.601 +#	   write-combining. All of these processors are supported by this code
   8.602 +#	   and it makes sense to say Y here if you have one of them.
   8.603 +#
   8.604 +#	   Saying Y here also fixes a problem with buggy SMP BIOSes which only
   8.605 +#	   set the MTRRs for the boot CPU and not for the secondary CPUs. This
   8.606 +#	   can lead to all sorts of problems, so it's good to say Y here.
   8.607 +#
   8.608 +#	   You can safely say Y even if your machine doesn't have MTRRs, you'll
   8.609 +#	   just add about 9 KB to your kernel.
   8.610 +#
   8.611 +#	   See <file:Documentation/mtrr.txt> for more information.
   8.612 +
   8.613 +config IRQBALANCE
   8.614 + 	bool "Enable kernel irq balancing"
   8.615 +	depends on SMP && X86_IO_APIC
   8.616 +	default y
   8.617 +	help
   8.618 + 	  The default yes will allow the kernel to do irq load balancing.
   8.619 +	  Saying no will keep the kernel from doing irq load balancing.
   8.620 +
   8.621 +config HAVE_DEC_LOCK
   8.622 +	bool
   8.623 +	depends on (SMP || PREEMPT) && X86_CMPXCHG
   8.624 +	default y
   8.625 +
   8.626 +# turning this on wastes a bunch of space.
   8.627 +# Summit needs it only when NUMA is on
   8.628 +config BOOT_IOREMAP
   8.629 +	bool
   8.630 +	depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
   8.631 +	default y
   8.632 +
   8.633 +config REGPARM
   8.634 +	bool "Use register arguments (EXPERIMENTAL)"
   8.635 +	depends on EXPERIMENTAL
   8.636 +	default n
   8.637 +	help
   8.638 +	Compile the kernel with -mregparm=3. This uses an different ABI
   8.639 +	and passes the first three arguments of a function call in registers.
   8.640 +	This will probably break binary only modules.
   8.641 +
   8.642 +	This feature is only enabled for gcc-3.0 and later - earlier compilers
   8.643 +	generate incorrect output with certain kernel constructs when
   8.644 +	-mregparm=3 is used.
   8.645 +
   8.646 +
   8.647 +if XEN_PHYSDEV_ACCESS
   8.648 +
   8.649 +menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
   8.650 +
   8.651 +config X86_VISWS_APIC
   8.652 +	bool
   8.653 +	depends on X86_VISWS
   8.654 +	default y
   8.655 +
   8.656 +config X86_LOCAL_APIC
   8.657 +	bool
   8.658 +	depends on (X86_VISWS || SMP) && !X86_VOYAGER
   8.659 +	default y
   8.660 +
   8.661 +config X86_IO_APIC
   8.662 +	bool
   8.663 +	depends on SMP && !(X86_VISWS || X86_VOYAGER)
   8.664 +	default y
   8.665 +
   8.666 +config PCI
   8.667 +	bool "PCI support" if !X86_VISWS
   8.668 +	depends on !X86_VOYAGER
   8.669 +	default y if X86_VISWS
   8.670 +	help
   8.671 +	  Find out whether you have a PCI motherboard. PCI is the name of a
   8.672 +	  bus system, i.e. the way the CPU talks to the other stuff inside
   8.673 +	  your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or
   8.674 +	  VESA. If you have PCI, say Y, otherwise N.
   8.675 +
   8.676 +	  The PCI-HOWTO, available from
   8.677 +	  <http://www.tldp.org/docs.html#howto>, contains valuable
   8.678 +	  information about which PCI hardware does work under Linux and which
   8.679 +	  doesn't.
   8.680 +
   8.681 +#choice
   8.682 +#	prompt "PCI access mode"
   8.683 +#	depends on PCI && !X86_VISWS
   8.684 +#	default PCI_GOANY
   8.685 +#	---help---
   8.686 +#	  On PCI systems, the BIOS can be used to detect the PCI devices and
   8.687 +#	  determine their configuration. However, some old PCI motherboards
   8.688 +#	  have BIOS bugs and may crash if this is done. Also, some embedded
   8.689 +#	  PCI-based systems don't have any BIOS at all. Linux can also try to
   8.690 +#	  detect the PCI hardware directly without using the BIOS.
   8.691 +#
   8.692 +#	  With this option, you can specify how Linux should detect the
   8.693 +#	  PCI devices. If you choose "BIOS", the BIOS will be used,
   8.694 +#	  if you choose "Direct", the BIOS won't be used, and if you
   8.695 +#	  choose "MMConfig", then PCI Express MMCONFIG will be used.
   8.696 +#	  If you choose "Any", the kernel will try MMCONFIG, then the
   8.697 +#	  direct access method and falls back to the BIOS if that doesn't
   8.698 +#	  work. If unsure, go with the default, which is "Any".
   8.699 +#
   8.700 +#config PCI_GOBIOS
   8.701 +#	bool "BIOS"
   8.702 +#
   8.703 +#config PCI_GOMMCONFIG
   8.704 +#	bool "MMConfig"
   8.705 +#
   8.706 +#config PCI_GODIRECT
   8.707 +#	bool "Direct"
   8.708 +#
   8.709 +#config PCI_GOANY
   8.710 +#	bool "Any"
   8.711 +#
   8.712 +#endchoice
   8.713 +#
   8.714 +#config PCI_BIOS
   8.715 +#	bool
   8.716 +#	depends on !X86_VISWS && PCI && (PCI_GOBIOS || PCI_GOANY)
   8.717 +#	default y
   8.718 +#
   8.719 +#config PCI_DIRECT
   8.720 +#	bool
   8.721 +# 	depends on PCI && ((PCI_GODIRECT || PCI_GOANY) || X86_VISWS)
   8.722 +#	default y
   8.723 +
   8.724 +config PCI_DIRECT
   8.725 +	bool
   8.726 + 	depends on PCI
   8.727 +	default y
   8.728 +
   8.729 +source "drivers/pci/Kconfig"
   8.730 +
   8.731 +config ISA
   8.732 +	bool "ISA support"
   8.733 +	depends on !(X86_VOYAGER || X86_VISWS)
   8.734 +	help
   8.735 +	  Find out whether you have ISA slots on your motherboard.  ISA is the
   8.736 +	  name of a bus system, i.e. the way the CPU talks to the other stuff
   8.737 +	  inside your box.  Other bus systems are PCI, EISA, MicroChannel
   8.738 +	  (MCA) or VESA.  ISA is an older system, now being displaced by PCI;
   8.739 +	  newer boards don't support it.  If you have ISA, say Y, otherwise N.
   8.740 +
   8.741 +config EISA
   8.742 +	bool "EISA support"
   8.743 +	depends on ISA
   8.744 +	---help---
   8.745 +	  The Extended Industry Standard Architecture (EISA) bus was
   8.746 +	  developed as an open alternative to the IBM MicroChannel bus.
   8.747 +
   8.748 +	  The EISA bus provided some of the features of the IBM MicroChannel
   8.749 +	  bus while maintaining backward compatibility with cards made for
   8.750 +	  the older ISA bus.  The EISA bus saw limited use between 1988 and
   8.751 +	  1995 when it was made obsolete by the PCI bus.
   8.752 +
   8.753 +	  Say Y here if you are building a kernel for an EISA-based machine.
   8.754 +
   8.755 +	  Otherwise, say N.
   8.756 +
   8.757 +source "drivers/eisa/Kconfig"
   8.758 +
   8.759 +config MCA
   8.760 +	bool "MCA support"
   8.761 +	depends on !(X86_VISWS || X86_VOYAGER)
   8.762 +	help
   8.763 +	  MicroChannel Architecture is found in some IBM PS/2 machines and
   8.764 +	  laptops.  It is a bus system similar to PCI or ISA. See
   8.765 +	  <file:Documentation/mca.txt> (and especially the web page given
   8.766 +	  there) before attempting to build an MCA bus kernel.
   8.767 +
   8.768 +config MCA
   8.769 +	depends on X86_VOYAGER
   8.770 +	default y if X86_VOYAGER
   8.771 +
   8.772 +source "drivers/mca/Kconfig"
   8.773 +
   8.774 +config SCx200
   8.775 +	tristate "NatSemi SCx200 support"
   8.776 +	depends on !X86_VOYAGER
   8.777 +	help
   8.778 +	  This provides basic support for the National Semiconductor SCx200
   8.779 +	  processor.  Right now this is just a driver for the GPIO pins.
   8.780 +
   8.781 +	  If you don't know what to do here, say N.
   8.782 +
   8.783 +	  This support is also available as a module.  If compiled as a
   8.784 +	  module, it will be called scx200.
   8.785 +
   8.786 +source "drivers/pcmcia/Kconfig"
   8.787 +
   8.788 +source "drivers/pci/hotplug/Kconfig"
   8.789 +
   8.790 +endmenu
   8.791 +
   8.792 +endif
   8.793 +
   8.794 +menu "Kernel hacking"
   8.795 +
   8.796 +config DEBUG_KERNEL
   8.797 +	bool "Kernel debugging"
   8.798 +	help
   8.799 +	  Say Y here if you are developing drivers or trying to debug and
   8.800 +	  identify kernel problems.
   8.801 +
   8.802 +config EARLY_PRINTK
   8.803 +	bool "Early printk" if EMBEDDED
   8.804 +	default y
   8.805 +	help
   8.806 +	  Write kernel log output directly into the VGA buffer or to a serial
   8.807 +	  port.
   8.808 +
   8.809 +	  This is useful for kernel debugging when your machine crashes very
   8.810 +	  early before the console code is initialized. For normal operation
   8.811 +	  it is not recommended because it looks ugly and doesn't cooperate
   8.812 +	  with klogd/syslogd or the X server. You should normally N here,
   8.813 +	  unless you want to debug such a crash.
   8.814 +
   8.815 +config DEBUG_STACKOVERFLOW
   8.816 +	bool "Check for stack overflows"
   8.817 +	depends on DEBUG_KERNEL
   8.818 +
   8.819 +config DEBUG_STACK_USAGE
   8.820 +	bool "Stack utilization instrumentation"
   8.821 +	depends on DEBUG_KERNEL
   8.822 +	help
   8.823 +	  Enables the display of the minimum amount of free stack which each
   8.824 +	  task has ever had available in the sysrq-T and sysrq-P debug output.
   8.825 +
   8.826 +	  This option will slow down process creation somewhat.
   8.827 +
   8.828 +config DEBUG_SLAB
   8.829 +	bool "Debug memory allocations"
   8.830 +	depends on DEBUG_KERNEL
   8.831 +	help
   8.832 +	  Say Y here to have the kernel do limited verification on memory
   8.833 +	  allocation as well as poisoning memory on free to catch use of freed
   8.834 +	  memory.
   8.835 +
   8.836 +config MAGIC_SYSRQ
   8.837 +	bool "Magic SysRq key"
   8.838 +	depends on DEBUG_KERNEL
   8.839 +	help
   8.840 +	  If you say Y here, you will have some control over the system even
   8.841 +	  if the system crashes for example during kernel debugging (e.g., you
   8.842 +	  will be able to flush the buffer cache to disk, reboot the system
   8.843 +	  immediately or dump some status information). This is accomplished
   8.844 +	  by pressing various keys while holding SysRq (Alt+PrintScreen). It
   8.845 +	  also works on a serial console (on PC hardware at least), if you
   8.846 +	  send a BREAK and then within 5 seconds a command keypress. The
   8.847 +	  keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
   8.848 +	  unless you really know what this hack does.
   8.849 +
   8.850 +config DEBUG_SPINLOCK
   8.851 +	bool "Spinlock debugging"
   8.852 +	depends on DEBUG_KERNEL
   8.853 +	help
   8.854 +	  Say Y here and build SMP to catch missing spinlock initialization
   8.855 +	  and certain other kinds of spinlock errors commonly made.  This is
   8.856 +	  best used in conjunction with the NMI watchdog so that spinlock
   8.857 +	  deadlocks are also debuggable.
   8.858 +
   8.859 +config DEBUG_PAGEALLOC
   8.860 +	bool "Page alloc debugging"
   8.861 +	depends on DEBUG_KERNEL
   8.862 +	help
   8.863 +	  Unmap pages from the kernel linear mapping after free_pages().
   8.864 +	  This results in a large slowdown, but helps to find certain types
   8.865 +	  of memory corruptions.
   8.866 +
   8.867 +config DEBUG_HIGHMEM
   8.868 +	bool "Highmem debugging"
   8.869 +	depends on DEBUG_KERNEL && HIGHMEM
   8.870 +	help
   8.871 +	  This options enables addition error checking for high memory systems.
   8.872 +	  Disable for production systems.
   8.873 +
   8.874 +config DEBUG_INFO
   8.875 +	bool "Compile the kernel with debug info"
   8.876 +	depends on DEBUG_KERNEL
   8.877 +	help
   8.878 +          If you say Y here the resulting kernel image will include
   8.879 +	  debugging info resulting in a larger kernel image.
   8.880 +	  Say Y here only if you plan to use gdb to debug the kernel.
   8.881 +	  If you don't debug the kernel, you can say N.
   8.882 +	  
   8.883 +config DEBUG_SPINLOCK_SLEEP
   8.884 +	bool "Sleep-inside-spinlock checking"
   8.885 +	help
   8.886 +	  If you say Y here, various routines which may sleep will become very
   8.887 +	  noisy if they are called with a spinlock held.	
   8.888 +
   8.889 +config FRAME_POINTER
   8.890 +	bool "Compile the kernel with frame pointers"
   8.891 +	help
   8.892 +	  If you say Y here the resulting kernel image will be slightly larger
   8.893 +	  and slower, but it will give very useful debugging information.
   8.894 +	  If you don't debug the kernel, you can say N, but we may not be able
   8.895 +	  to solve problems without frame pointers.
   8.896 +
   8.897 +config 4KSTACKS
   8.898 +	bool "Use 4Kb for kernel stacks instead of 8Kb"
   8.899 +	help
   8.900 +	  If you say Y here the kernel will use a 4Kb stacksize for the
   8.901 +	  kernel stack attached to each process/thread. This facilitates
   8.902 +	  running more threads on a system and also reduces the pressure
   8.903 +	  on the VM subsystem for higher order allocations. This option
   8.904 +	  will also use IRQ stacks to compensate for the reduced stackspace.
   8.905 +
   8.906 +config X86_FIND_SMP_CONFIG
   8.907 +	bool
   8.908 +	depends on X86_LOCAL_APIC || X86_VOYAGER
   8.909 +	default y
   8.910 +
   8.911 +config X86_MPPARSE
   8.912 +	bool
   8.913 +	depends on X86_LOCAL_APIC && !X86_VISWS
   8.914 +	default y
   8.915 +
   8.916 +endmenu
   8.917 +
   8.918 +#
   8.919 +# Use the generic interrupt handling code in kernel/irq/:
   8.920 +#
   8.921 +config GENERIC_HARDIRQS
   8.922 +	bool
   8.923 +	default y
   8.924 +
   8.925 +config GENERIC_IRQ_PROBE
   8.926 +	bool
   8.927 +	default y
   8.928 +
   8.929 +config X86_SMP
   8.930 +	bool
   8.931 +	depends on SMP && !X86_VOYAGER
   8.932 +	default y
   8.933 +
   8.934 +config X86_HT
   8.935 +	bool
   8.936 +	depends on SMP && !(X86_VISWS || X86_VOYAGER)
   8.937 +	default y
   8.938 +
   8.939 +config X86_BIOS_REBOOT
   8.940 +	bool
   8.941 +	depends on !(X86_VISWS || X86_VOYAGER)
   8.942 +	default y
   8.943 +
   8.944 +config X86_TRAMPOLINE
   8.945 +	bool
   8.946 +	depends on X86_SMP || (X86_VOYAGER && SMP)
   8.947 +	default y
   8.948 +
   8.949 +config PC
   8.950 +	bool
   8.951 +	depends on X86 && !EMBEDDED
   8.952 +	default y
   8.953 +
   8.954 +endmenu
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/Makefile	Fri Nov 19 00:40:52 2004 +0000
     9.3 @@ -0,0 +1,99 @@
     9.4 +#
     9.5 +# i386/Makefile
     9.6 +#
     9.7 +# This file is included by the global makefile so that you can add your own
     9.8 +# architecture-specific flags and dependencies. Remember to do have actions
     9.9 +# for "archclean" cleaning up for this architecture.
    9.10 +#
    9.11 +# This file is subject to the terms and conditions of the GNU General Public
    9.12 +# License.  See the file "COPYING" in the main directory of this archive
    9.13 +# for more details.
    9.14 +#
    9.15 +# Copyright (C) 1994 by Linus Torvalds
    9.16 +#
    9.17 +# 19990713  Artur Skawina <skawina@geocities.com>
    9.18 +#           Added '-march' and '-mpreferred-stack-boundary' support
    9.19 +#
    9.20 +
    9.21 +XENARCH	:= $(subst ",,$(CONFIG_XENARCH))
    9.22 +
    9.23 +LDFLAGS		:= -m elf_i386
    9.24 +LDFLAGS_vmlinux :=
    9.25 +CHECK		:= $(CHECK) -D__i386__=1
    9.26 +
    9.27 +CFLAGS += -pipe -msoft-float
    9.28 +
    9.29 +# prevent gcc from keeping the stack 16 byte aligned
    9.30 +CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2,)
    9.31 +
    9.32 +align := $(cc-option-align)
    9.33 +cflags-$(CONFIG_M386)		+= -march=i386
    9.34 +cflags-$(CONFIG_M486)		+= -march=i486
    9.35 +cflags-$(CONFIG_M586)		+= -march=i586
    9.36 +cflags-$(CONFIG_M586TSC)	+= -march=i586
    9.37 +cflags-$(CONFIG_M586MMX)	+= $(call cc-option,-march=pentium-mmx,-march=i586)
    9.38 +cflags-$(CONFIG_M686)		+= -march=i686
    9.39 +cflags-$(CONFIG_MPENTIUMII)	+= $(call cc-option,-march=pentium2,-march=i686)
    9.40 +cflags-$(CONFIG_MPENTIUMIII)	+= $(call cc-option,-march=pentium3,-march=i686)
    9.41 +cflags-$(CONFIG_MPENTIUMM)	+= $(call cc-option,-march=pentium3,-march=i686)
    9.42 +cflags-$(CONFIG_MPENTIUM4)	+= $(call cc-option,-march=pentium4,-march=i686)
    9.43 +cflags-$(CONFIG_MK6)		+= -march=k6
    9.44 +# Please note, that patches that add -march=athlon-xp and friends are pointless.
    9.45 +# They make zero difference whatsosever to performance at this time.
    9.46 +cflags-$(CONFIG_MK7)		+= $(call cc-option,-march=athlon,-march=i686 $(align)-functions=4)
    9.47 +cflags-$(CONFIG_MK8)		+= $(call cc-option,-march=k8,$(call cc-option,-march=athlon,-march=i686 $(align)-functions=4))
    9.48 +cflags-$(CONFIG_MCRUSOE)	+= -march=i686 $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
    9.49 +cflags-$(CONFIG_MEFFICEON)	+= $(call cc-option,-march=pentium3,-march=i686) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
    9.50 +cflags-$(CONFIG_MWINCHIPC6)	+= $(call cc-option,-march=winchip-c6,-march=i586)
    9.51 +cflags-$(CONFIG_MWINCHIP2)	+= $(call cc-option,-march=winchip2,-march=i586)
    9.52 +cflags-$(CONFIG_MWINCHIP3D)	+= $(call cc-option,-march=winchip2,-march=i586)
    9.53 +cflags-$(CONFIG_MCYRIXIII)	+= $(call cc-option,-march=c3,-march=i486) $(align)-functions=0 $(align)-jumps=0 $(align)-loops=0
    9.54 +cflags-$(CONFIG_MVIAC3_2)	+= $(call cc-option,-march=c3-2,-march=i686)
    9.55 +
    9.56 +# AMD Elan support
    9.57 +cflags-$(CONFIG_X86_ELAN)	+= -march=i486
    9.58 +
    9.59 +# -mregparm=3 works ok on gcc-3.0 and later
    9.60 +#
    9.61 +GCC_VERSION			:= $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))
    9.62 +cflags-$(CONFIG_REGPARM) 	+= $(shell if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;)
    9.63 +
    9.64 +# Disable unit-at-a-time mode, it makes gcc use a lot more stack
    9.65 +# due to the lack of sharing of stacklots.
    9.66 +CFLAGS += $(call cc-option,-fno-unit-at-a-time,)
    9.67 +
    9.68 +CFLAGS += $(cflags-y)
    9.69 +
    9.70 +head-y := arch/xen/i386/kernel/head.o arch/xen/i386/kernel/init_task.o
    9.71 +
    9.72 +libs-y 					+= arch/i386/lib/
    9.73 +core-y					+= arch/xen/i386/kernel/ \
    9.74 +					   arch/xen/i386/mm/ \
    9.75 +					   arch/i386/crypto/
    9.76 +# \
    9.77 +#					   arch/xen/$(mcore-y)/
    9.78 +drivers-$(CONFIG_MATH_EMULATION)	+= arch/i386/math-emu/
    9.79 +drivers-$(CONFIG_PCI)			+= arch/xen/i386/pci/
    9.80 +# must be linked after kernel/
    9.81 +drivers-$(CONFIG_OPROFILE)		+= arch/i386/oprofile/
    9.82 +drivers-$(CONFIG_PM)			+= arch/i386/power/
    9.83 +
    9.84 +# for clean
    9.85 +obj-	+= kernel/ mm/ pci/
    9.86 +#obj-	+= ../../i386/lib/ ../../i386/mm/ 
    9.87 +#../../i386/$(mcore-y)/
    9.88 +#obj-	+= ../../i386/pci/ ../../i386/oprofile/ ../../i386/power/
    9.89 +
    9.90 +xenflags-y += -Iinclude/asm-xen/asm-i386/mach-xen \
    9.91 +		-Iinclude/asm-i386/mach-default
    9.92 +CFLAGS += $(xenflags-y)
    9.93 +AFLAGS += $(xenflags-y)
    9.94 +
    9.95 +prepare: include/asm-$(XENARCH)/asm_offsets.h
    9.96 +CLEAN_FILES += include/asm-$(XENARCH)/asm_offsets.h
    9.97 +
    9.98 +arch/$(XENARCH)/kernel/asm-offsets.s: include/asm include/.asm-ignore \
    9.99 +	include/linux/version.h include/config/MARKER
   9.100 +
   9.101 +include/asm-$(XENARCH)/asm_offsets.h: arch/$(XENARCH)/kernel/asm-offsets.s
   9.102 +	$(call filechk,gen-asm-offsets)
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/Makefile	Fri Nov 19 00:40:52 2004 +0000
    10.3 @@ -0,0 +1,92 @@
    10.4 +#
    10.5 +# Makefile for the linux kernel.
    10.6 +#
    10.7 +
    10.8 +XENARCH	:= $(subst ",,$(CONFIG_XENARCH))
    10.9 +
   10.10 +CFLAGS	+= -Iarch/$(XENARCH)/kernel
   10.11 +
   10.12 +extra-y := head.o init_task.o vmlinux.lds
   10.13 +
   10.14 +obj-y	:= process.o signal.o entry.o traps.o irq.o \
   10.15 +		time.o ioport.o ldt.o setup.o \
   10.16 +		pci-dma.o i386_ksyms.o
   10.17 +
   10.18 +c-obj-y	:= semaphore.o vm86.o \
   10.19 +		ptrace.o sys_i386.o \
   10.20 +		i387.o dmi_scan.o bootflag.o \
   10.21 +		doublefault.o quirks.o
   10.22 +s-obj-y	:=
   10.23 +
   10.24 +obj-y				+= cpu/
   10.25 +obj-y				+= timers/
   10.26 +c-obj-$(CONFIG_ACPI_BOOT)	+= acpi/
   10.27 +#c-obj-$(CONFIG_X86_BIOS_REBOOT)	+= reboot.o
   10.28 +c-obj-$(CONFIG_MCA)		+= mca.o
   10.29 +c-obj-$(CONFIG_X86_MSR)		+= msr.o
   10.30 +c-obj-$(CONFIG_X86_CPUID)	+= cpuid.o
   10.31 +c-obj-$(CONFIG_MICROCODE)	+= microcode.o
   10.32 +c-obj-$(CONFIG_APM)		+= apm.o
   10.33 +c-obj-$(CONFIG_X86_SMP)		+= smp.o smpboot.o
   10.34 +c-obj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline.o
   10.35 +c-obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
   10.36 +c-obj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o nmi.o
   10.37 +c-obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
   10.38 +c-obj-$(CONFIG_X86_NUMAQ)	+= numaq.o
   10.39 +c-obj-$(CONFIG_X86_SUMMIT_NUMA)	+= summit.o
   10.40 +c-obj-$(CONFIG_MODULES)		+= module.o
   10.41 +obj-y				+= sysenter.o
   10.42 +obj-y				+= vsyscall.o
   10.43 +c-obj-$(CONFIG_ACPI_SRAT) 	+= srat.o
   10.44 +c-obj-$(CONFIG_HPET_TIMER) 	+= time_hpet.o
   10.45 +c-obj-$(CONFIG_EFI) 		+= efi.o efi_stub.o
   10.46 +c-obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
   10.47 +
   10.48 +EXTRA_AFLAGS   := -traditional
   10.49 +
   10.50 +c-obj-$(CONFIG_SCx200)		+= scx200.o
   10.51 +
   10.52 +CPPFLAGS_vmlinux.lds += -U$(XENARCH)
   10.53 +
   10.54 +# vsyscall.o contains the vsyscall DSO images as __initdata.
   10.55 +# We must build both images before we can assemble it.
   10.56 +# Note: kbuild does not track this dependency due to usage of .incbin
   10.57 +$(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so
   10.58 +targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so)
   10.59 +
   10.60 +# The DSO images are built using a special linker script.
   10.61 +quiet_cmd_syscall = SYSCALL $@
   10.62 +      cmd_syscall = $(CC) -nostdlib $(SYSCFLAGS_$(@F)) \
   10.63 +		          -Wl,-T,$(filter-out FORCE,$^) -o $@
   10.64 +
   10.65 +vsyscall-flags = -shared -s -Wl,-soname=linux-gate.so.1
   10.66 +SYSCFLAGS_vsyscall-sysenter.so	= $(vsyscall-flags)
   10.67 +SYSCFLAGS_vsyscall-int80.so	= $(vsyscall-flags)
   10.68 +
   10.69 +$(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so: \
   10.70 +$(obj)/vsyscall-%.so: $(obj)/vsyscall.lds $(obj)/vsyscall-%.o FORCE
   10.71 +	$(call if_changed,syscall)
   10.72 +
   10.73 +# We also create a special relocatable object that should mirror the symbol
   10.74 +# table and layout of the linked DSO.  With ld -R we can then refer to
   10.75 +# these symbols in the kernel code rather than hand-coded addresses.
   10.76 +extra-y += vsyscall-syms.o
   10.77 +$(obj)/built-in.o: $(obj)/vsyscall-syms.o
   10.78 +$(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o
   10.79 +
   10.80 +SYSCFLAGS_vsyscall-syms.o = -r
   10.81 +$(obj)/vsyscall-syms.o: $(obj)/vsyscall.lds $(obj)/vsyscall-sysenter.o FORCE
   10.82 +	$(call if_changed,syscall)
   10.83 +
   10.84 +c-link	:= init_task.o
   10.85 +s-link	:= vsyscall-int80.o vsyscall-sysenter.o vsyscall-sigreturn.o
   10.86 +
   10.87 +$(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)) $(patsubst %.o,$(obj)/%.S,$(s-obj-y) $(s-link)):
   10.88 +	@ln -fsn $(srctree)/arch/i386/kernel/$(notdir $@) $@
   10.89 +
   10.90 +$(obj)/vsyscall-int80.S: $(obj)/vsyscall-sigreturn.S
   10.91 +
   10.92 +obj-y	+= $(c-obj-y) $(s-obj-y)
   10.93 +
   10.94 +clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link))
   10.95 +clean-files += $(patsubst %.o,%.S,$(s-obj-y) $(s-obj-) $(s-link))
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/cpu/Makefile	Fri Nov 19 00:40:52 2004 +0000
    11.3 @@ -0,0 +1,31 @@
    11.4 +#
    11.5 +# Makefile for x86-compatible CPU details and quirks
    11.6 +#
    11.7 +
    11.8 +CFLAGS	+= -Iarch/i386/kernel/cpu
    11.9 +
   11.10 +obj-y	:=	common.o
   11.11 +c-obj-y	+=	proc.o
   11.12 +
   11.13 +c-obj-y	+=	amd.o
   11.14 +c-obj-y	+=	cyrix.o
   11.15 +c-obj-y	+=	centaur.o
   11.16 +c-obj-y	+=	transmeta.o
   11.17 +c-obj-y	+=	intel.o intel_cacheinfo.o
   11.18 +c-obj-y	+=	rise.o
   11.19 +c-obj-y	+=	nexgen.o
   11.20 +c-obj-y	+=	umc.o
   11.21 +
   11.22 +#obj-$(CONFIG_X86_MCE)	+=	../../../../i386/kernel/cpu/mcheck/
   11.23 +
   11.24 +#obj-$(CONFIG_MTRR)	+= 	../../../../i386/kernel/cpu/mtrr/
   11.25 +#obj-$(CONFIG_CPU_FREQ)	+=	../../../../i386/kernel/cpu/cpufreq/
   11.26 +
   11.27 +c-link	:=
   11.28 +
   11.29 +$(patsubst %.o,$(obj)/%.c,$(c-obj-y) $(c-link)):
   11.30 +	@ln -fsn $(srctree)/arch/i386/kernel/cpu/$(notdir $@) $@
   11.31 +
   11.32 +obj-y	+= $(c-obj-y)
   11.33 +
   11.34 +clean-files += $(patsubst %.o,%.c,$(c-obj-y) $(c-obj-) $(c-link))
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/cpu/common.c	Fri Nov 19 00:40:52 2004 +0000
    12.3 @@ -0,0 +1,606 @@
    12.4 +#include <linux/init.h>
    12.5 +#include <linux/string.h>
    12.6 +#include <linux/delay.h>
    12.7 +#include <linux/smp.h>
    12.8 +#include <linux/module.h>
    12.9 +#include <linux/percpu.h>
   12.10 +#include <asm/semaphore.h>
   12.11 +#include <asm/processor.h>
   12.12 +#include <asm/i387.h>
   12.13 +#include <asm/msr.h>
   12.14 +#include <asm/io.h>
   12.15 +#include <asm/mmu_context.h>
   12.16 +#include <asm-xen/hypervisor.h>
   12.17 +
   12.18 +#include "cpu.h"
   12.19 +
   12.20 +DEFINE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]);
   12.21 +EXPORT_PER_CPU_SYMBOL(cpu_gdt_table);
   12.22 +
   12.23 +static int cachesize_override __initdata = -1;
   12.24 +static int disable_x86_fxsr __initdata = 0;
   12.25 +static int disable_x86_serial_nr __initdata = 1;
   12.26 +
   12.27 +struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
   12.28 +
   12.29 +extern void mcheck_init(struct cpuinfo_x86 *c);
   12.30 +
   12.31 +extern void machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c);
   12.32 +
   12.33 +extern int disable_pse;
   12.34 +
   12.35 +static void default_init(struct cpuinfo_x86 * c)
   12.36 +{
   12.37 +	/* Not much we can do here... */
   12.38 +	/* Check if at least it has cpuid */
   12.39 +	if (c->cpuid_level == -1) {
   12.40 +		/* No cpuid. It must be an ancient CPU */
   12.41 +		if (c->x86 == 4)
   12.42 +			strcpy(c->x86_model_id, "486");
   12.43 +		else if (c->x86 == 3)
   12.44 +			strcpy(c->x86_model_id, "386");
   12.45 +	}
   12.46 +}
   12.47 +
   12.48 +static struct cpu_dev default_cpu = {
   12.49 +	.c_init	= default_init,
   12.50 +};
   12.51 +static struct cpu_dev * this_cpu = &default_cpu;
   12.52 +
   12.53 +static int __init cachesize_setup(char *str)
   12.54 +{
   12.55 +	get_option (&str, &cachesize_override);
   12.56 +	return 1;
   12.57 +}
   12.58 +__setup("cachesize=", cachesize_setup);
   12.59 +
   12.60 +int __init get_model_name(struct cpuinfo_x86 *c)
   12.61 +{
   12.62 +	unsigned int *v;
   12.63 +	char *p, *q;
   12.64 +
   12.65 +	if (cpuid_eax(0x80000000) < 0x80000004)
   12.66 +		return 0;
   12.67 +
   12.68 +	v = (unsigned int *) c->x86_model_id;
   12.69 +	cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
   12.70 +	cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
   12.71 +	cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
   12.72 +	c->x86_model_id[48] = 0;
   12.73 +
   12.74 +	/* Intel chips right-justify this string for some dumb reason;
   12.75 +	   undo that brain damage */
   12.76 +	p = q = &c->x86_model_id[0];
   12.77 +	while ( *p == ' ' )
   12.78 +	     p++;
   12.79 +	if ( p != q ) {
   12.80 +	     while ( *p )
   12.81 +		  *q++ = *p++;
   12.82 +	     while ( q <= &c->x86_model_id[48] )
   12.83 +		  *q++ = '\0';	/* Zero-pad the rest */
   12.84 +	}
   12.85 +
   12.86 +	return 1;
   12.87 +}
   12.88 +
   12.89 +
   12.90 +void __init display_cacheinfo(struct cpuinfo_x86 *c)
   12.91 +{
   12.92 +	unsigned int n, dummy, ecx, edx, l2size;
   12.93 +
   12.94 +	n = cpuid_eax(0x80000000);
   12.95 +
   12.96 +	if (n >= 0x80000005) {
   12.97 +		cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
   12.98 +		printk(KERN_INFO "CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
   12.99 +			edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
  12.100 +		c->x86_cache_size=(ecx>>24)+(edx>>24);	
  12.101 +	}
  12.102 +
  12.103 +	if (n < 0x80000006)	/* Some chips just has a large L1. */
  12.104 +		return;
  12.105 +
  12.106 +	ecx = cpuid_ecx(0x80000006);
  12.107 +	l2size = ecx >> 16;
  12.108 +	
  12.109 +	/* do processor-specific cache resizing */
  12.110 +	if (this_cpu->c_size_cache)
  12.111 +		l2size = this_cpu->c_size_cache(c,l2size);
  12.112 +
  12.113 +	/* Allow user to override all this if necessary. */
  12.114 +	if (cachesize_override != -1)
  12.115 +		l2size = cachesize_override;
  12.116 +
  12.117 +	if ( l2size == 0 )
  12.118 +		return;		/* Again, no L2 cache is possible */
  12.119 +
  12.120 +	c->x86_cache_size = l2size;
  12.121 +
  12.122 +	printk(KERN_INFO "CPU: L2 Cache: %dK (%d bytes/line)\n",
  12.123 +	       l2size, ecx & 0xFF);
  12.124 +}
  12.125 +
  12.126 +/* Naming convention should be: <Name> [(<Codename>)] */
  12.127 +/* This table only is used unless init_<vendor>() below doesn't set it; */
  12.128 +/* in particular, if CPUID levels 0x80000002..4 are supported, this isn't used */
  12.129 +
  12.130 +/* Look up CPU names by table lookup. */
  12.131 +static char __init *table_lookup_model(struct cpuinfo_x86 *c)
  12.132 +{
  12.133 +	struct cpu_model_info *info;
  12.134 +
  12.135 +	if ( c->x86_model >= 16 )
  12.136 +		return NULL;	/* Range check */
  12.137 +
  12.138 +	if (!this_cpu)
  12.139 +		return NULL;
  12.140 +
  12.141 +	info = this_cpu->c_models;
  12.142 +
  12.143 +	while (info && info->family) {
  12.144 +		if (info->family == c->x86)
  12.145 +			return info->model_names[c->x86_model];
  12.146 +		info++;
  12.147 +	}
  12.148 +	return NULL;		/* Not found */
  12.149 +}
  12.150 +
  12.151 +
  12.152 +void __init get_cpu_vendor(struct cpuinfo_x86 *c, int early)
  12.153 +{
  12.154 +	char *v = c->x86_vendor_id;
  12.155 +	int i;
  12.156 +
  12.157 +	for (i = 0; i < X86_VENDOR_NUM; i++) {
  12.158 +		if (cpu_devs[i]) {
  12.159 +			if (!strcmp(v,cpu_devs[i]->c_ident[0]) ||
  12.160 +			    (cpu_devs[i]->c_ident[1] && 
  12.161 +			     !strcmp(v,cpu_devs[i]->c_ident[1]))) {
  12.162 +				c->x86_vendor = i;
  12.163 +				if (!early)
  12.164 +					this_cpu = cpu_devs[i];
  12.165 +				break;
  12.166 +			}
  12.167 +		}
  12.168 +	}
  12.169 +}
  12.170 +
  12.171 +
  12.172 +static int __init x86_fxsr_setup(char * s)
  12.173 +{
  12.174 +	disable_x86_fxsr = 1;
  12.175 +	return 1;
  12.176 +}
  12.177 +__setup("nofxsr", x86_fxsr_setup);
  12.178 +
  12.179 +
  12.180 +/* Standard macro to see if a specific flag is changeable */
  12.181 +static inline int flag_is_changeable_p(u32 flag)
  12.182 +{
  12.183 +	u32 f1, f2;
  12.184 +
  12.185 +	asm("pushfl\n\t"
  12.186 +	    "pushfl\n\t"
  12.187 +	    "popl %0\n\t"
  12.188 +	    "movl %0,%1\n\t"
  12.189 +	    "xorl %2,%0\n\t"
  12.190 +	    "pushl %0\n\t"
  12.191 +	    "popfl\n\t"
  12.192 +	    "pushfl\n\t"
  12.193 +	    "popl %0\n\t"
  12.194 +	    "popfl\n\t"
  12.195 +	    : "=&r" (f1), "=&r" (f2)
  12.196 +	    : "ir" (flag));
  12.197 +
  12.198 +	return ((f1^f2) & flag) != 0;
  12.199 +}
  12.200 +
  12.201 +
  12.202 +/* Probe for the CPUID instruction */
  12.203 +int __init have_cpuid_p(void)
  12.204 +{
  12.205 +	return flag_is_changeable_p(X86_EFLAGS_ID);
  12.206 +}
  12.207 +
  12.208 +/* Do minimum CPU detection early.
  12.209 +   Fields really needed: vendor, cpuid_level, family, model, mask, cache alignment.
  12.210 +   The others are not touched to avoid unwanted side effects. */
  12.211 +void __init early_cpu_detect(void)
  12.212 +{
  12.213 +	struct cpuinfo_x86 *c = &boot_cpu_data;
  12.214 +
  12.215 +	c->x86_cache_alignment = 32;
  12.216 +
  12.217 +	if (!have_cpuid_p())
  12.218 +		return;
  12.219 +
  12.220 +	/* Get vendor name */
  12.221 +	cpuid(0x00000000, &c->cpuid_level,
  12.222 +	      (int *)&c->x86_vendor_id[0],
  12.223 +	      (int *)&c->x86_vendor_id[8],
  12.224 +	      (int *)&c->x86_vendor_id[4]);
  12.225 +
  12.226 +	get_cpu_vendor(c, 1);
  12.227 +
  12.228 +	c->x86 = 4;
  12.229 +	if (c->cpuid_level >= 0x00000001) {
  12.230 +		u32 junk, tfms, cap0, misc;
  12.231 +		cpuid(0x00000001, &tfms, &misc, &junk, &cap0);
  12.232 +		c->x86 = (tfms >> 8) & 15;
  12.233 +		c->x86_model = (tfms >> 4) & 15;
  12.234 +		if (c->x86 == 0xf) {
  12.235 +			c->x86 += (tfms >> 20) & 0xff;
  12.236 +			c->x86_model += ((tfms >> 16) & 0xF) << 4;
  12.237 +		}
  12.238 +		c->x86_mask = tfms & 15;
  12.239 +		if (cap0 & (1<<19))
  12.240 +			c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8;
  12.241 +	}
  12.242 +
  12.243 +	early_intel_workaround(c);
  12.244 +}
  12.245 +
  12.246 +void __init generic_identify(struct cpuinfo_x86 * c)
  12.247 +{
  12.248 +	u32 tfms, xlvl;
  12.249 +	int junk;
  12.250 +
  12.251 +	if (have_cpuid_p()) {
  12.252 +		/* Get vendor name */
  12.253 +		cpuid(0x00000000, &c->cpuid_level,
  12.254 +		      (int *)&c->x86_vendor_id[0],
  12.255 +		      (int *)&c->x86_vendor_id[8],
  12.256 +		      (int *)&c->x86_vendor_id[4]);
  12.257 +		
  12.258 +		get_cpu_vendor(c, 0);
  12.259 +		/* Initialize the standard set of capabilities */
  12.260 +		/* Note that the vendor-specific code below might override */
  12.261 +	
  12.262 +		/* Intel-defined flags: level 0x00000001 */
  12.263 +		if ( c->cpuid_level >= 0x00000001 ) {
  12.264 +			u32 capability, excap;
  12.265 +			cpuid(0x00000001, &tfms, &junk, &excap, &capability);
  12.266 +			c->x86_capability[0] = capability;
  12.267 +			c->x86_capability[4] = excap;
  12.268 +			c->x86 = (tfms >> 8) & 15;
  12.269 +			c->x86_model = (tfms >> 4) & 15;
  12.270 +			if (c->x86 == 0xf) {
  12.271 +				c->x86 += (tfms >> 20) & 0xff;
  12.272 +				c->x86_model += ((tfms >> 16) & 0xF) << 4;
  12.273 +			} 
  12.274 +			c->x86_mask = tfms & 15;
  12.275 +		} else {
  12.276 +			/* Have CPUID level 0 only - unheard of */
  12.277 +			c->x86 = 4;
  12.278 +		}
  12.279 +
  12.280 +		/* AMD-defined flags: level 0x80000001 */
  12.281 +		xlvl = cpuid_eax(0x80000000);
  12.282 +		if ( (xlvl & 0xffff0000) == 0x80000000 ) {
  12.283 +			if ( xlvl >= 0x80000001 )
  12.284 +				c->x86_capability[1] = cpuid_edx(0x80000001);
  12.285 +			if ( xlvl >= 0x80000004 )
  12.286 +				get_model_name(c); /* Default name */
  12.287 +		}
  12.288 +	}
  12.289 +}
  12.290 +
  12.291 +static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
  12.292 +{
  12.293 +	if (cpu_has(c, X86_FEATURE_PN) && disable_x86_serial_nr ) {
  12.294 +		/* Disable processor serial number */
  12.295 +		unsigned long lo,hi;
  12.296 +		rdmsr(MSR_IA32_BBL_CR_CTL,lo,hi);
  12.297 +		lo |= 0x200000;
  12.298 +		wrmsr(MSR_IA32_BBL_CR_CTL,lo,hi);
  12.299 +		printk(KERN_NOTICE "CPU serial number disabled.\n");
  12.300 +		clear_bit(X86_FEATURE_PN, c->x86_capability);
  12.301 +
  12.302 +		/* Disabling the serial number may affect the cpuid level */
  12.303 +		c->cpuid_level = cpuid_eax(0);
  12.304 +	}
  12.305 +}
  12.306 +
  12.307 +static int __init x86_serial_nr_setup(char *s)
  12.308 +{
  12.309 +	disable_x86_serial_nr = 0;
  12.310 +	return 1;
  12.311 +}
  12.312 +__setup("serialnumber", x86_serial_nr_setup);
  12.313 +
  12.314 +
  12.315 +
  12.316 +/*
  12.317 + * This does the hard work of actually picking apart the CPU stuff...
  12.318 + */
  12.319 +void __init identify_cpu(struct cpuinfo_x86 *c)
  12.320 +{
  12.321 +	int i;
  12.322 +
  12.323 +	c->loops_per_jiffy = loops_per_jiffy;
  12.324 +	c->x86_cache_size = -1;
  12.325 +	c->x86_vendor = X86_VENDOR_UNKNOWN;
  12.326 +	c->cpuid_level = -1;	/* CPUID not detected */
  12.327 +	c->x86_model = c->x86_mask = 0;	/* So far unknown... */
  12.328 +	c->x86_vendor_id[0] = '\0'; /* Unset */
  12.329 +	c->x86_model_id[0] = '\0';  /* Unset */
  12.330 +	memset(&c->x86_capability, 0, sizeof c->x86_capability);
  12.331 +
  12.332 +	if (!have_cpuid_p()) {
  12.333 +		/* First of all, decide if this is a 486 or higher */
  12.334 +		/* It's a 486 if we can modify the AC flag */
  12.335 +		if ( flag_is_changeable_p(X86_EFLAGS_AC) )
  12.336 +			c->x86 = 4;
  12.337 +		else
  12.338 +			c->x86 = 3;
  12.339 +	}
  12.340 +
  12.341 +	generic_identify(c);
  12.342 +
  12.343 +	printk(KERN_DEBUG "CPU: After generic identify, caps: %08lx %08lx %08lx %08lx\n",
  12.344 +		c->x86_capability[0],
  12.345 +		c->x86_capability[1],
  12.346 +		c->x86_capability[2],
  12.347 +		c->x86_capability[3]);
  12.348 +
  12.349 +	if (this_cpu->c_identify) {
  12.350 +		this_cpu->c_identify(c);
  12.351 +
  12.352 +	printk(KERN_DEBUG "CPU: After vendor identify, caps:  %08lx %08lx %08lx %08lx\n",
  12.353 +		c->x86_capability[0],
  12.354 +		c->x86_capability[1],
  12.355 +		c->x86_capability[2],
  12.356 +		c->x86_capability[3]);
  12.357 +}
  12.358 +
  12.359 +	/*
  12.360 +	 * Vendor-specific initialization.  In this section we
  12.361 +	 * canonicalize the feature flags, meaning if there are
  12.362 +	 * features a certain CPU supports which CPUID doesn't
  12.363 +	 * tell us, CPUID claiming incorrect flags, or other bugs,
  12.364 +	 * we handle them here.
  12.365 +	 *
  12.366 +	 * At the end of this section, c->x86_capability better
  12.367 +	 * indicate the features this CPU genuinely supports!
  12.368 +	 */
  12.369 +	if (this_cpu->c_init)
  12.370 +		this_cpu->c_init(c);
  12.371 +
  12.372 +	/* Disable the PN if appropriate */
  12.373 +	squash_the_stupid_serial_number(c);
  12.374 +
  12.375 +	/*
  12.376 +	 * The vendor-specific functions might have changed features.  Now
  12.377 +	 * we do "generic changes."
  12.378 +	 */
  12.379 +
  12.380 +	/* TSC disabled? */
  12.381 +	if ( tsc_disable )
  12.382 +		clear_bit(X86_FEATURE_TSC, c->x86_capability);
  12.383 +
  12.384 +	/* FXSR disabled? */
  12.385 +	if (disable_x86_fxsr) {
  12.386 +		clear_bit(X86_FEATURE_FXSR, c->x86_capability);
  12.387 +		clear_bit(X86_FEATURE_XMM, c->x86_capability);
  12.388 +	}
  12.389 +
  12.390 +	if (disable_pse)
  12.391 +		clear_bit(X86_FEATURE_PSE, c->x86_capability);
  12.392 +
  12.393 +	/* If the model name is still unset, do table lookup. */
  12.394 +	if ( !c->x86_model_id[0] ) {
  12.395 +		char *p;
  12.396 +		p = table_lookup_model(c);
  12.397 +		if ( p )
  12.398 +			strcpy(c->x86_model_id, p);
  12.399 +		else
  12.400 +			/* Last resort... */
  12.401 +			sprintf(c->x86_model_id, "%02x/%02x",
  12.402 +				c->x86_vendor, c->x86_model);
  12.403 +	}
  12.404 +
  12.405 +	machine_specific_modify_cpu_capabilities(c);
  12.406 +
  12.407 +	/* Now the feature flags better reflect actual CPU features! */
  12.408 +
  12.409 +	printk(KERN_DEBUG "CPU: After all inits, caps:        %08lx %08lx %08lx %08lx\n",
  12.410 +	       c->x86_capability[0],
  12.411 +	       c->x86_capability[1],
  12.412 +	       c->x86_capability[2],
  12.413 +	       c->x86_capability[3]);
  12.414 +
  12.415 +	/*
  12.416 +	 * On SMP, boot_cpu_data holds the common feature set between
  12.417 +	 * all CPUs; so make sure that we indicate which features are
  12.418 +	 * common between the CPUs.  The first time this routine gets
  12.419 +	 * executed, c == &boot_cpu_data.
  12.420 +	 */
  12.421 +	if ( c != &boot_cpu_data ) {
  12.422 +		/* AND the already accumulated flags with these */
  12.423 +		for ( i = 0 ; i < NCAPINTS ; i++ )
  12.424 +			boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
  12.425 +	}
  12.426 +
  12.427 +	/* Init Machine Check Exception if available. */
  12.428 +#ifdef CONFIG_X86_MCE
  12.429 +	mcheck_init(c);
  12.430 +#endif
  12.431 +}
  12.432 +/*
  12.433 + *	Perform early boot up checks for a valid TSC. See arch/i386/kernel/time.c
  12.434 + */
  12.435 + 
  12.436 +void __init dodgy_tsc(void)
  12.437 +{
  12.438 +	if (( boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX ) ||
  12.439 +	    ( boot_cpu_data.x86_vendor == X86_VENDOR_NSC   ))
  12.440 +		cpu_devs[X86_VENDOR_CYRIX]->c_init(&boot_cpu_data);
  12.441 +}
  12.442 +
  12.443 +void __init print_cpu_info(struct cpuinfo_x86 *c)
  12.444 +{
  12.445 +	char *vendor = NULL;
  12.446 +
  12.447 +	if (c->x86_vendor < X86_VENDOR_NUM)
  12.448 +		vendor = this_cpu->c_vendor;
  12.449 +	else if (c->cpuid_level >= 0)
  12.450 +		vendor = c->x86_vendor_id;
  12.451 +
  12.452 +	if (vendor && strncmp(c->x86_model_id, vendor, strlen(vendor)))
  12.453 +		printk("%s ", vendor);
  12.454 +
  12.455 +	if (!c->x86_model_id[0])
  12.456 +		printk("%d86", c->x86);
  12.457 +	else
  12.458 +		printk("%s", c->x86_model_id);
  12.459 +
  12.460 +	if (c->x86_mask || c->cpuid_level >= 0) 
  12.461 +		printk(" stepping %02x\n", c->x86_mask);
  12.462 +	else
  12.463 +		printk("\n");
  12.464 +}
  12.465 +
  12.466 +unsigned long cpu_initialized __initdata = 0;
  12.467 +
  12.468 +/* This is hacky. :)
  12.469 + * We're emulating future behavior.
  12.470 + * In the future, the cpu-specific init functions will be called implicitly
  12.471 + * via the magic of initcalls.
  12.472 + * They will insert themselves into the cpu_devs structure.
  12.473 + * Then, when cpu_init() is called, we can just iterate over that array.
  12.474 + */
  12.475 +
  12.476 +extern int intel_cpu_init(void);
  12.477 +extern int cyrix_init_cpu(void);
  12.478 +extern int nsc_init_cpu(void);
  12.479 +extern int amd_init_cpu(void);
  12.480 +extern int centaur_init_cpu(void);
  12.481 +extern int transmeta_init_cpu(void);
  12.482 +extern int rise_init_cpu(void);
  12.483 +extern int nexgen_init_cpu(void);
  12.484 +extern int umc_init_cpu(void);
  12.485 +void early_cpu_detect(void);
  12.486 +
  12.487 +void __init early_cpu_init(void)
  12.488 +{
  12.489 +	intel_cpu_init();
  12.490 +	cyrix_init_cpu();
  12.491 +	nsc_init_cpu();
  12.492 +	amd_init_cpu();
  12.493 +	centaur_init_cpu();
  12.494 +	transmeta_init_cpu();
  12.495 +	rise_init_cpu();
  12.496 +	nexgen_init_cpu();
  12.497 +	umc_init_cpu();
  12.498 +	early_cpu_detect();
  12.499 +
  12.500 +#ifdef CONFIG_DEBUG_PAGEALLOC
  12.501 +	/* pse is not compatible with on-the-fly unmapping,
  12.502 +	 * disable it even if the cpus claim to support it.
  12.503 +	 */
  12.504 +	clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability);
  12.505 +	disable_pse = 1;
  12.506 +#endif
  12.507 +}
  12.508 +
  12.509 +void __init cpu_gdt_init(struct Xgt_desc_struct *gdt_descr)
  12.510 +{
  12.511 +	unsigned long frames[gdt_descr->size >> PAGE_SHIFT];
  12.512 +	unsigned long va;
  12.513 +	int f;
  12.514 +
  12.515 +	for (va = gdt_descr->address, f = 0;
  12.516 +	     va < gdt_descr->address + gdt_descr->size;
  12.517 +	     va += PAGE_SIZE, f++) {
  12.518 +		frames[f] = virt_to_machine(va) >> PAGE_SHIFT;
  12.519 +		protect_page(swapper_pg_dir, (void *)va, PROT_ON);
  12.520 +	}
  12.521 +	flush_page_update_queue();
  12.522 +	if (HYPERVISOR_set_gdt(frames, gdt_descr->size / 8))
  12.523 +		BUG();
  12.524 +	lgdt_finish();
  12.525 +}
  12.526 +
  12.527 +/*
  12.528 + * cpu_init() initializes state that is per-CPU. Some data is already
  12.529 + * initialized (naturally) in the bootstrap process, such as the GDT
  12.530 + * and IDT. We reload them nevertheless, this function acts as a
  12.531 + * 'CPU state barrier', nothing should get across.
  12.532 + */
  12.533 +void __init cpu_init (void)
  12.534 +{
  12.535 +	int cpu = smp_processor_id();
  12.536 +	struct tss_struct * t = &per_cpu(init_tss, cpu);
  12.537 +	struct thread_struct *thread = &current->thread;
  12.538 +
  12.539 +	if (test_and_set_bit(cpu, &cpu_initialized)) {
  12.540 +		printk(KERN_WARNING "CPU#%d already initialized!\n", cpu);
  12.541 +		for (;;) local_irq_enable();
  12.542 +	}
  12.543 +	printk(KERN_INFO "Initializing CPU#%d\n", cpu);
  12.544 +
  12.545 +	if (cpu_has_vme || cpu_has_de)
  12.546 +		clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
  12.547 +	if (tsc_disable && cpu_has_tsc) {
  12.548 +		printk(KERN_NOTICE "Disabling TSC...\n");
  12.549 +		/**** FIX-HPA: DOES THIS REALLY BELONG HERE? ****/
  12.550 +		clear_bit(X86_FEATURE_TSC, boot_cpu_data.x86_capability);
  12.551 +		set_in_cr4(X86_CR4_TSD);
  12.552 +	}
  12.553 +
  12.554 +	/*
  12.555 +	 * Initialize the per-CPU GDT with the boot GDT,
  12.556 +	 * and set up the GDT descriptor:
  12.557 +	 */
  12.558 +	if (cpu) {
  12.559 +		cpu_gdt_descr[cpu].size = GDT_SIZE;
  12.560 +		cpu_gdt_descr[cpu].address = 0;	/* XXXcl alloc page */
  12.561 +		BUG();		/* XXXcl SMP */
  12.562 +		memcpy((void *)cpu_gdt_descr[cpu].address,
  12.563 +		    (void *)cpu_gdt_descr[0].address, GDT_SIZE);
  12.564 +	}
  12.565 +	/*
  12.566 +	 * Set up the per-thread TLS descriptor cache:
  12.567 +	 */
  12.568 +	memcpy(thread->tls_array, &get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN],
  12.569 +	    GDT_ENTRY_TLS_ENTRIES * 8);
  12.570 +
  12.571 +	cpu_gdt_init(&cpu_gdt_descr[cpu]);
  12.572 +
  12.573 +	/*
  12.574 +	 * Delete NT
  12.575 +	 */
  12.576 +	__asm__("pushfl ; andl $0xffffbfff,(%esp) ; popfl");
  12.577 +
  12.578 +	/*
  12.579 +	 * Set up and load the per-CPU TSS and LDT
  12.580 +	 */
  12.581 +	atomic_inc(&init_mm.mm_count);
  12.582 +	current->active_mm = &init_mm;
  12.583 +	if (current->mm)
  12.584 +		BUG();
  12.585 +	enter_lazy_tlb(&init_mm, current);
  12.586 +
  12.587 +	load_esp0(t, thread);
  12.588 +
  12.589 +	load_LDT(&init_mm.context);
  12.590 +	flush_page_update_queue();
  12.591 +
  12.592 +	/* Clear %fs and %gs. */
  12.593 +	asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs");
  12.594 +
  12.595 +	/* Clear all 6 debug registers: */
  12.596 +
  12.597 +#define CD(register) HYPERVISOR_set_debugreg(register, 0)
  12.598 +
  12.599 +	CD(0); CD(1); CD(2); CD(3); /* no db4 and db5 */; CD(6); CD(7);
  12.600 +
  12.601 +#undef CD
  12.602 +
  12.603 +	/*
  12.604 +	 * Force FPU initialization:
  12.605 +	 */
  12.606 +	current_thread_info()->status = 0;
  12.607 +	current->used_math = 0;
  12.608 +	mxcsr_feature_mask_init();
  12.609 +}
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/entry.S	Fri Nov 19 00:40:52 2004 +0000
    13.3 @@ -0,0 +1,988 @@
    13.4 +/*
    13.5 + *  linux/arch/i386/entry.S
    13.6 + *
    13.7 + *  Copyright (C) 1991, 1992  Linus Torvalds
    13.8 + */
    13.9 +
   13.10 +/*
   13.11 + * entry.S contains the system-call and fault low-level handling routines.
   13.12 + * This also contains the timer-interrupt handler, as well as all interrupts
   13.13 + * and faults that can result in a task-switch.
   13.14 + *
   13.15 + * NOTE: This code handles signal-recognition, which happens every time
   13.16 + * after a timer-interrupt and after each system call.
   13.17 + *
   13.18 + * I changed all the .align's to 4 (16 byte alignment), as that's faster
   13.19 + * on a 486.
   13.20 + *
   13.21 + * Stack layout in 'ret_from_system_call':
   13.22 + * 	ptrace needs to have all regs on the stack.
   13.23 + *	if the order here is changed, it needs to be
   13.24 + *	updated in fork.c:copy_process, signal.c:do_signal,
   13.25 + *	ptrace.c and ptrace.h
   13.26 + *
   13.27 + *	 0(%esp) - %ebx
   13.28 + *	 4(%esp) - %ecx
   13.29 + *	 8(%esp) - %edx
   13.30 + *       C(%esp) - %esi
   13.31 + *	10(%esp) - %edi
   13.32 + *	14(%esp) - %ebp
   13.33 + *	18(%esp) - %eax
   13.34 + *	1C(%esp) - %ds
   13.35 + *	20(%esp) - %es
   13.36 + *	24(%esp) - orig_eax
   13.37 + *	28(%esp) - %eip
   13.38 + *	2C(%esp) - %cs
   13.39 + *	30(%esp) - %eflags
   13.40 + *	34(%esp) - %oldesp
   13.41 + *	38(%esp) - %oldss
   13.42 + *
   13.43 + * "current" is in register %ebx during any slow entries.
   13.44 + */
   13.45 +
   13.46 +#include <linux/config.h>
   13.47 +#include <linux/linkage.h>
   13.48 +#include <asm/thread_info.h>
   13.49 +#include <asm/errno.h>
   13.50 +#include <asm/segment.h>
   13.51 +#include <asm/smp.h>
   13.52 +#include <asm/page.h>
   13.53 +#include "irq_vectors.h"
   13.54 +#include <asm-xen/xen-public/xen.h>
   13.55 +
   13.56 +#define nr_syscalls ((syscall_table_size)/4)
   13.57 +
   13.58 +EBX		= 0x00
   13.59 +ECX		= 0x04
   13.60 +EDX		= 0x08
   13.61 +ESI		= 0x0C
   13.62 +EDI		= 0x10
   13.63 +EBP		= 0x14
   13.64 +EAX		= 0x18
   13.65 +DS		= 0x1C
   13.66 +ES		= 0x20
   13.67 +ORIG_EAX	= 0x24
   13.68 +EIP		= 0x28
   13.69 +CS		= 0x2C
   13.70 +EFLAGS		= 0x30
   13.71 +OLDESP		= 0x34
   13.72 +OLDSS		= 0x38
   13.73 +
   13.74 +CF_MASK		= 0x00000001
   13.75 +TF_MASK		= 0x00000100
   13.76 +IF_MASK		= 0x00000200
   13.77 +DF_MASK		= 0x00000400 
   13.78 +NT_MASK		= 0x00004000
   13.79 +VM_MASK		= 0x00020000
   13.80 +
   13.81 +/* Offsets into shared_info_t. */
   13.82 +#define evtchn_upcall_pending		/* 0 */
   13.83 +#define evtchn_upcall_mask		1
   13.84 +
   13.85 +#define XEN_BLOCK_EVENTS(reg)	movb $1,evtchn_upcall_mask(reg)
   13.86 +#define XEN_UNBLOCK_EVENTS(reg)	movb $0,evtchn_upcall_mask(reg)
   13.87 +#define XEN_TEST_PENDING(reg)	testb $0xFF,evtchn_upcall_pending(%reg)
   13.88 +
   13.89 +#ifdef CONFIG_PREEMPT
   13.90 +#define preempt_stop		movl HYPERVISOR_shared_info,%esi	; \
   13.91 +				XEN_BLOCK_EVENTS(%esi)
   13.92 +#else
   13.93 +#define preempt_stop
   13.94 +#define resume_kernel		restore_all_enable_events
   13.95 +#endif
   13.96 +
   13.97 +#define SAVE_ALL \
   13.98 +	cld; \
   13.99 +	pushl %es; \
  13.100 +	pushl %ds; \
  13.101 +	pushl %eax; \
  13.102 +	pushl %ebp; \
  13.103 +	pushl %edi; \
  13.104 +	pushl %esi; \
  13.105 +	pushl %edx; \
  13.106 +	pushl %ecx; \
  13.107 +	pushl %ebx; \
  13.108 +	movl $(__KERNEL_DS), %edx; \
  13.109 +	movl %edx, %ds; \
  13.110 +	movl %edx, %es;
  13.111 +	# XXXcl USER?
  13.112 +
  13.113 +#define RESTORE_INT_REGS \
  13.114 +	popl %ebx;	\
  13.115 +	popl %ecx;	\
  13.116 +	popl %edx;	\
  13.117 +	popl %esi;	\
  13.118 +	popl %edi;	\
  13.119 +	popl %ebp;	\
  13.120 +	popl %eax
  13.121 +
  13.122 +#define RESTORE_REGS	\
  13.123 +	RESTORE_INT_REGS; \
  13.124 +1:	popl %ds;	\
  13.125 +2:	popl %es;	\
  13.126 +.section .fixup,"ax";	\
  13.127 +3:	movl $0,(%esp);	\
  13.128 +	jmp 1b;		\
  13.129 +4:	movl $0,(%esp);	\
  13.130 +	jmp 2b;		\
  13.131 +.previous;		\
  13.132 +.section __ex_table,"a";\
  13.133 +	.align 4;	\
  13.134 +	.long 1b,3b;	\
  13.135 +	.long 2b,4b;	\
  13.136 +.previous
  13.137 +
  13.138 +
  13.139 +#define RESTORE_ALL	\
  13.140 +	RESTORE_REGS	\
  13.141 +	addl $4, %esp;	\
  13.142 +1:	iret;		\
  13.143 +.section .fixup,"ax";   \
  13.144 +2:	movl $(__USER_DS), %edx; \
  13.145 +	movl %edx, %ds; \
  13.146 +	movl %edx, %es; \
  13.147 +	movl $11,%eax;	\
  13.148 +	call do_exit;	\
  13.149 +.previous;		\
  13.150 +.section __ex_table,"a";\
  13.151 +	.align 4;	\
  13.152 +	.long 1b,2b;	\
  13.153 +.previous
  13.154 +
  13.155 +
  13.156 +ENTRY(ret_from_fork)
  13.157 +	pushl %eax
  13.158 +	call schedule_tail
  13.159 +	GET_THREAD_INFO(%ebp)
  13.160 +	popl %eax
  13.161 +	jmp syscall_exit
  13.162 +
  13.163 +/*
  13.164 + * Return to user mode is not as complex as all this looks,
  13.165 + * but we want the default path for a system call return to
  13.166 + * go as quickly as possible which is why some of this is
  13.167 + * less clear than it otherwise should be.
  13.168 + */
  13.169 +
  13.170 +	# userspace resumption stub bypassing syscall exit tracing
  13.171 +	ALIGN
  13.172 +ret_from_exception:
  13.173 +	preempt_stop
  13.174 +ret_from_intr:
  13.175 +	GET_THREAD_INFO(%ebp)
  13.176 +	movl EFLAGS(%esp), %eax		# mix EFLAGS and CS
  13.177 +	movb CS(%esp), %al
  13.178 +	testl $(VM_MASK | 2), %eax
  13.179 +	jz resume_kernel		# returning to kernel or vm86-space
  13.180 +ENTRY(resume_userspace)
  13.181 +	movl HYPERVISOR_shared_info,%esi
  13.182 +	XEN_BLOCK_EVENTS(%esi)		# make tests atomic
  13.183 +					# make sure we don't miss an interrupt
  13.184 +					# setting need_resched or sigpending
  13.185 +					# between sampling and the iret
  13.186 +ret_syscall_tests:
  13.187 +	movl TI_flags(%ebp), %ecx
  13.188 +	andl $_TIF_WORK_MASK, %ecx	# is there any work to be done on
  13.189 +					# int/exception return?
  13.190 +	jne work_pending
  13.191 +	jmp restore_all_enable_events
  13.192 +
  13.193 +#ifdef CONFIG_PREEMPT
  13.194 +ENTRY(resume_kernel)
  13.195 +	movl HYPERVISOR_shared_info,%esi
  13.196 +	cmpl $0,TI_preempt_count(%ebp)	# non-zero preempt_count ?
  13.197 +	jnz restore_all_enable_events
  13.198 +need_resched:
  13.199 +	movl TI_flags(%ebp), %ecx	# need_resched set ?
  13.200 +	testb $_TIF_NEED_RESCHED, %cl
  13.201 +	jz restore_all_enable_events
  13.202 +	testl $IF_MASK,EFLAGS(%esp)     # interrupts off (exception path) ?
  13.203 +	jz restore_all_enable_events
  13.204 +	movl $PREEMPT_ACTIVE,TI_preempt_count(%ebp)
  13.205 +	XEN_UNBLOCK_EVENTS(%esi)	# reenable event callbacks
  13.206 +	call schedule
  13.207 +	movl HYPERVISOR_shared_info,%esi
  13.208 +	XEN_BLOCK_EVENTS(%esi)		# make tests atomic
  13.209 +	movl $0,TI_preempt_count(%ebp)
  13.210 +	jmp need_resched
  13.211 +#endif
  13.212 +
  13.213 +/* SYSENTER_RETURN points to after the "sysenter" instruction in
  13.214 +   the vsyscall page.  See vsyscall-sysentry.S, which defines the symbol.  */
  13.215 +
  13.216 +	# sysenter call handler stub
  13.217 +ENTRY(sysenter_entry)
  13.218 +	movl TSS_sysenter_esp0(%esp),%esp
  13.219 +sysenter_past_esp:
  13.220 +	sti
  13.221 +	pushl $(__USER_DS)
  13.222 +	pushl %ebp
  13.223 +	pushfl
  13.224 +	pushl $(__USER_CS)
  13.225 +	pushl $SYSENTER_RETURN
  13.226 +
  13.227 +/*
  13.228 + * Load the potential sixth argument from user stack.
  13.229 + * Careful about security.
  13.230 + */
  13.231 +	cmpl $__PAGE_OFFSET-3,%ebp
  13.232 +	jae syscall_fault
  13.233 +1:	movl (%ebp),%ebp
  13.234 +.section __ex_table,"a"
  13.235 +	.align 4
  13.236 +	.long 1b,syscall_fault
  13.237 +.previous
  13.238 +
  13.239 +	pushl %eax
  13.240 +	SAVE_ALL
  13.241 +	GET_THREAD_INFO(%ebp)
  13.242 +
  13.243 +	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
  13.244 +	jnz syscall_trace_entry
  13.245 +	cmpl $(nr_syscalls), %eax
  13.246 +	jae syscall_badsys
  13.247 +	call *sys_call_table(,%eax,4)
  13.248 +	movl %eax,EAX(%esp)
  13.249 +	cli
  13.250 +	movl TI_flags(%ebp), %ecx
  13.251 +	testw $_TIF_ALLWORK_MASK, %cx
  13.252 +	jne syscall_exit_work
  13.253 +/* if something modifies registers it must also disable sysexit */
  13.254 +	movl EIP(%esp), %edx
  13.255 +	movl OLDESP(%esp), %ecx
  13.256 +	sti
  13.257 +	sysexit
  13.258 +
  13.259 +
  13.260 +	# system call handler stub
  13.261 +ENTRY(system_call)
  13.262 +	pushl %eax			# save orig_eax
  13.263 +	SAVE_ALL
  13.264 +	GET_THREAD_INFO(%ebp)
  13.265 +					# system call tracing in operation
  13.266 +	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
  13.267 +	jnz syscall_trace_entry
  13.268 +	cmpl $(nr_syscalls), %eax
  13.269 +	jae syscall_badsys
  13.270 +syscall_call:
  13.271 +	call *sys_call_table(,%eax,4)
  13.272 +	movl %eax,EAX(%esp)		# store the return value
  13.273 +syscall_exit:
  13.274 +	movl HYPERVISOR_shared_info,%esi
  13.275 +	XEN_BLOCK_EVENTS(%esi)		# make tests atomic
  13.276 +					# make sure we don't miss an interrupt
  13.277 +					# setting need_resched or sigpending
  13.278 +					# between sampling and the iret
  13.279 +	movl TI_flags(%ebp), %ecx
  13.280 +	testw $_TIF_ALLWORK_MASK, %cx	# current->work
  13.281 +	jne syscall_exit_work
  13.282 +	jmp restore_all_enable_events
  13.283 +
  13.284 +	# perform work that needs to be done immediately before resumption
  13.285 +	ALIGN
  13.286 +work_pending:
  13.287 +	XEN_UNBLOCK_EVENTS(%esi)	# reenable event callbacks
  13.288 +	testb $_TIF_NEED_RESCHED, %cl
  13.289 +	jz work_notifysig
  13.290 +work_resched:
  13.291 +	call schedule
  13.292 +	movl HYPERVISOR_shared_info,%esi
  13.293 +	XEN_BLOCK_EVENTS(%esi)		# make tests atomic
  13.294 +					# make sure we don't miss an interrupt
  13.295 +					# setting need_resched or sigpending
  13.296 +					# between sampling and the iret
  13.297 +	movl TI_flags(%ebp), %ecx
  13.298 +	andl $_TIF_WORK_MASK, %ecx	# is there any work to be done other
  13.299 +					# than syscall tracing?
  13.300 +	jz restore_all_enable_events
  13.301 +	# XXXcl sti missing???
  13.302 +	XEN_UNBLOCK_EVENTS(%esi)	# reenable event callbacks
  13.303 +	testb $_TIF_NEED_RESCHED, %cl
  13.304 +	jnz work_resched
  13.305 +
  13.306 +work_notifysig:				# deal with pending signals and
  13.307 +					# notify-resume requests
  13.308 +	testl $VM_MASK, EFLAGS(%esp)
  13.309 +	movl %esp, %eax
  13.310 +	jne work_notifysig_v86		# returning to kernel-space or
  13.311 +					# vm86-space
  13.312 +	xorl %edx, %edx
  13.313 +	call do_notify_resume
  13.314 +	movl HYPERVISOR_shared_info,%esi
  13.315 +	jmp restore_all_enable_events
  13.316 +
  13.317 +	ALIGN
  13.318 +work_notifysig_v86:
  13.319 +	pushl %ecx			# save ti_flags for do_notify_resume
  13.320 +	call save_v86_state		# %eax contains pt_regs pointer
  13.321 +	popl %ecx
  13.322 +	movl %eax, %esp
  13.323 +	xorl %edx, %edx
  13.324 +	call do_notify_resume
  13.325 +	movl HYPERVISOR_shared_info,%esi
  13.326 +	jmp restore_all_enable_events
  13.327 +
  13.328 +	# perform syscall exit tracing
  13.329 +	ALIGN
  13.330 +syscall_trace_entry:
  13.331 +	movl $-ENOSYS,EAX(%esp)
  13.332 +	movl %esp, %eax
  13.333 +	xorl %edx,%edx
  13.334 +	call do_syscall_trace
  13.335 +	movl ORIG_EAX(%esp), %eax
  13.336 +	cmpl $(nr_syscalls), %eax
  13.337 +	jnae syscall_call
  13.338 +	jmp syscall_exit
  13.339 +
  13.340 +	# perform syscall exit tracing
  13.341 +	ALIGN
  13.342 +syscall_exit_work:
  13.343 +	movl HYPERVISOR_shared_info,%esi
  13.344 +	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP), %cl
  13.345 +	jz work_pending
  13.346 +	XEN_UNBLOCK_EVENTS(%esi)	# reenable event callbacks
  13.347 +					# could let do_syscall_trace() call
  13.348 +					# schedule() instead
  13.349 +	movl %esp, %eax
  13.350 +	movl $1, %edx
  13.351 +	call do_syscall_trace
  13.352 +	jmp resume_userspace
  13.353 +
  13.354 +	ALIGN
  13.355 +syscall_fault:
  13.356 +	pushl %eax			# save orig_eax
  13.357 +	SAVE_ALL
  13.358 +	GET_THREAD_INFO(%ebp)
  13.359 +	movl $-EFAULT,EAX(%esp)
  13.360 +	jmp resume_userspace
  13.361 +
  13.362 +	ALIGN
  13.363 +syscall_badsys:
  13.364 +	movl $-ENOSYS,EAX(%esp)
  13.365 +	jmp resume_userspace
  13.366 +
  13.367 +ENTRY(divide_error)
  13.368 +	pushl $0			# no error code
  13.369 +	pushl $do_divide_error
  13.370 +	ALIGN
  13.371 +error_code:
  13.372 +	pushl %ds
  13.373 +	pushl %eax
  13.374 +	xorl %eax, %eax
  13.375 +	pushl %ebp
  13.376 +	pushl %edi
  13.377 +	pushl %esi
  13.378 +	pushl %edx
  13.379 +	decl %eax			# eax = -1
  13.380 +	pushl %ecx
  13.381 +	pushl %ebx
  13.382 +	cld
  13.383 +	movl %es, %ecx
  13.384 +	movl ES(%esp), %edi		# get the function address
  13.385 +	movl ORIG_EAX(%esp), %edx	# get the error code
  13.386 +	movl %eax, ORIG_EAX(%esp)
  13.387 +	movl %ecx, ES(%esp)
  13.388 +	movl $(__USER_DS), %ecx
  13.389 +	movl %ecx, %ds
  13.390 +	movl %ecx, %es
  13.391 +	movl %esp,%eax			# pt_regs pointer
  13.392 +	call *%edi
  13.393 +	jmp ret_from_exception
  13.394 +
  13.395 +# A note on the "critical region" in our callback handler.
  13.396 +# We want to avoid stacking callback handlers due to events occurring
  13.397 +# during handling of the last event. To do this, we keep events disabled
  13.398 +# until we've done all processing. HOWEVER, we must enable events before
  13.399 +# popping the stack frame (can't be done atomically) and so it would still
  13.400 +# be possible to get enough handler activations to overflow the stack.
  13.401 +# Although unlikely, bugs of that kind are hard to track down, so we'd
  13.402 +# like to avoid the possibility.
  13.403 +# So, on entry to the handler we detect whether we interrupted an
  13.404 +# existing activation in its critical region -- if so, we pop the current
  13.405 +# activation and restart the handler using the previous one.
  13.406 +ENTRY(hypervisor_callback)
  13.407 +	pushl %eax
  13.408 +	SAVE_ALL
  13.409 +	GET_THREAD_INFO(%ebp)
  13.410 +	movl EIP(%esp),%eax
  13.411 +	cmpl $scrit,%eax
  13.412 +	jb   11f
  13.413 +	cmpl $ecrit,%eax
  13.414 +	jb   critical_region_fixup
  13.415 +11:	push %esp
  13.416 +	call evtchn_do_upcall
  13.417 +	add  $4,%esp
  13.418 +	movl HYPERVISOR_shared_info,%esi
  13.419 +	movb CS(%esp),%cl
  13.420 +	test $2,%cl			# slow return to ring 2 or 3
  13.421 +	jne  ret_syscall_tests
  13.422 +restore_all_enable_events:  
  13.423 +safesti:XEN_UNBLOCK_EVENTS(%esi)	# reenable event callbacks
  13.424 +scrit:	/**** START OF CRITICAL REGION ****/
  13.425 +	testb $1,evtchn_upcall_pending(%esi)
  13.426 +	jnz  14f			# process more events if necessary...
  13.427 +	RESTORE_ALL
  13.428 +14:	XEN_BLOCK_EVENTS(%esi)
  13.429 +	jmp  11b
  13.430 +ecrit:  /**** END OF CRITICAL REGION ****/
  13.431 +# [How we do the fixup]. We want to merge the current stack frame with the
  13.432 +# just-interrupted frame. How we do this depends on where in the critical
  13.433 +# region the interrupted handler was executing, and so how many saved
  13.434 +# registers are in each frame. We do this quickly using the lookup table
  13.435 +# 'critical_fixup_table'. For each byte offset in the critical region, it
  13.436 +# provides the number of bytes which have already been popped from the
  13.437 +# interrupted stack frame. 
  13.438 +critical_region_fixup:
  13.439 +	addl $critical_fixup_table-scrit,%eax
  13.440 +	movzbl (%eax),%eax		# %eax contains num bytes popped
  13.441 +	mov  %esp,%esi
  13.442 +	add  %eax,%esi			# %esi points at end of src region
  13.443 +	mov  %esp,%edi
  13.444 +	add  $0x34,%edi			# %edi points at end of dst region
  13.445 +	mov  %eax,%ecx
  13.446 +	shr  $2,%ecx			# convert words to bytes
  13.447 +	je   16f			# skip loop if nothing to copy
  13.448 +15:	subl $4,%esi			# pre-decrementing copy loop
  13.449 +	subl $4,%edi
  13.450 +	movl (%esi),%eax
  13.451 +	movl %eax,(%edi)
  13.452 +	loop 15b
  13.453 +16:	movl %edi,%esp			# final %edi is top of merged stack
  13.454 +	jmp  11b
  13.455 +
  13.456 +critical_fixup_table:
  13.457 +	.byte 0x00,0x00,0x00		# testb $0xff,(%esi)
  13.458 +	.byte 0x00,0x00			# jnz  14f
  13.459 +	.byte 0x00			# pop  %ebx
  13.460 +	.byte 0x04			# pop  %ecx
  13.461 +	.byte 0x08			# pop  %edx
  13.462 +	.byte 0x0c			# pop  %esi
  13.463 +	.byte 0x10			# pop  %edi
  13.464 +	.byte 0x14			# pop  %ebp
  13.465 +	.byte 0x18			# pop  %eax
  13.466 +	.byte 0x1c			# pop  %ds
  13.467 +	.byte 0x20			# pop  %es
  13.468 +	.byte 0x24,0x24,0x24		# add  $4,%esp
  13.469 +	.byte 0x28			# iret
  13.470 +	.byte 0x00,0x00,0x00,0x00	# movb $1,1(%esi)
  13.471 +	.byte 0x00,0x00			# jmp  11b
  13.472 +
  13.473 +# Hypervisor uses this for application faults while it executes.
  13.474 +ENTRY(failsafe_callback)
  13.475 +1:      popl %ds
  13.476 +2:      popl %es
  13.477 +3:      popl %fs
  13.478 +4:      popl %gs
  13.479 +5:	iret
  13.480 +.section .fixup,"ax";	\
  13.481 +6:	movl $0,(%esp);	\
  13.482 +	jmp 1b;		\
  13.483 +7:	movl $0,(%esp);	\
  13.484 +	jmp 2b;		\
  13.485 +8:	movl $0,(%esp);	\
  13.486 +	jmp 3b;		\
  13.487 +9:	movl $0,(%esp);	\
  13.488 +	jmp 4b;		\
  13.489 +10:	pushl %ss;	\
  13.490 +	popl %ds;	\
  13.491 +	pushl %ss;	\
  13.492 +	popl %es;	\
  13.493 +	pushl $11;	\
  13.494 +	call do_exit;	\
  13.495 +.previous;		\
  13.496 +.section __ex_table,"a";\
  13.497 +	.align 4;	\
  13.498 +	.long 1b,6b;	\
  13.499 +	.long 2b,7b;	\
  13.500 +	.long 3b,8b;	\
  13.501 +	.long 4b,9b;	\
  13.502 +	.long 5b,10b;	\
  13.503 +.previous
  13.504 +
  13.505 +ENTRY(coprocessor_error)
  13.506 +	pushl $0
  13.507 +	pushl $do_coprocessor_error
  13.508 +	jmp error_code
  13.509 +
  13.510 +ENTRY(simd_coprocessor_error)
  13.511 +	pushl $0
  13.512 +	pushl $do_simd_coprocessor_error
  13.513 +	jmp error_code
  13.514 +
  13.515 +ENTRY(device_not_available)
  13.516 +	pushl $-1			# mark this as an int
  13.517 +	SAVE_ALL
  13.518 +	preempt_stop
  13.519 +	call math_state_restore
  13.520 +	jmp ret_from_exception
  13.521 +
  13.522 +/*
  13.523 + * Debug traps and NMI can happen at the one SYSENTER instruction
  13.524 + * that sets up the real kernel stack. Check here, since we can't
  13.525 + * allow the wrong stack to be used.
  13.526 + *
  13.527 + * "TSS_sysenter_esp0+12" is because the NMI/debug handler will have
  13.528 + * already pushed 3 words if it hits on the sysenter instruction:
  13.529 + * eflags, cs and eip.
  13.530 + *
  13.531 + * We just load the right stack, and push the three (known) values
  13.532 + * by hand onto the new stack - while updating the return eip past
  13.533 + * the instruction that would have done it for sysenter.
  13.534 + */
  13.535 +#define FIX_STACK(offset, ok, label)		\
  13.536 +	cmpw $__KERNEL_CS,4(%esp);		\
  13.537 +	jne ok;					\
  13.538 +label:						\
  13.539 +	movl TSS_sysenter_esp0+offset(%esp),%esp;	\
  13.540 +	pushfl;					\
  13.541 +	pushl $__KERNEL_CS;			\
  13.542 +	pushl $sysenter_past_esp
  13.543 +
  13.544 +ENTRY(debug)
  13.545 +	cmpl $sysenter_entry,(%esp)
  13.546 +	jne debug_stack_correct
  13.547 +	FIX_STACK(12, debug_stack_correct, debug_esp_fix_insn)
  13.548 +debug_stack_correct:
  13.549 +	pushl $-1			# mark this as an int
  13.550 +	SAVE_ALL
  13.551 +	xorl %edx,%edx			# error code 0
  13.552 +	movl %esp,%eax			# pt_regs pointer
  13.553 +	call do_debug
  13.554 +	testl %eax,%eax
  13.555 +	jnz restore_all_enable_events
  13.556 +	jmp ret_from_exception
  13.557 +
  13.558 +#if 0
  13.559 +/*
  13.560 + * NMI is doubly nasty. It can happen _while_ we're handling
  13.561 + * a debug fault, and the debug fault hasn't yet been able to
  13.562 + * clear up the stack. So we first check whether we got  an
  13.563 + * NMI on the sysenter entry path, but after that we need to
  13.564 + * check whether we got an NMI on the debug path where the debug
  13.565 + * fault happened on the sysenter path.
  13.566 + */
  13.567 +ENTRY(nmi)
  13.568 +	cmpl $sysenter_entry,(%esp)
  13.569 +	je nmi_stack_fixup
  13.570 +	pushl %eax
  13.571 +	movl %esp,%eax
  13.572 +	/* Do not access memory above the end of our stack page,
  13.573 +	 * it might not exist.
  13.574 +	 */
  13.575 +	andl $(THREAD_SIZE-1),%eax
  13.576 +	cmpl $(THREAD_SIZE-20),%eax
  13.577 +	popl %eax
  13.578 +	jae nmi_stack_correct
  13.579 +	cmpl $sysenter_entry,12(%esp)
  13.580 +	je nmi_debug_stack_check
  13.581 +nmi_stack_correct:
  13.582 +	pushl %eax
  13.583 +	SAVE_ALL
  13.584 +	xorl %edx,%edx		# zero error code
  13.585 +	movl %esp,%eax		# pt_regs pointer
  13.586 +	call do_nmi
  13.587 +	RESTORE_ALL
  13.588 +
  13.589 +nmi_stack_fixup:
  13.590 +	FIX_STACK(12,nmi_stack_correct, 1)
  13.591 +	jmp nmi_stack_correct
  13.592 +nmi_debug_stack_check:
  13.593 +	cmpw $__KERNEL_CS,16(%esp)
  13.594 +	jne nmi_stack_correct
  13.595 +	cmpl $debug - 1,(%esp)
  13.596 +	jle nmi_stack_correct
  13.597 +	cmpl $debug_esp_fix_insn,(%esp)
  13.598 +	jle nmi_debug_stack_fixup
  13.599 +nmi_debug_stack_fixup:
  13.600 +	FIX_STACK(24,nmi_stack_correct, 1)
  13.601 +	jmp nmi_stack_correct
  13.602 +#endif
  13.603 +
  13.604 +ENTRY(int3)
  13.605 +	pushl $-1			# mark this as an int
  13.606 +	SAVE_ALL
  13.607 +	xorl %edx,%edx		# zero error code
  13.608 +	movl %esp,%eax		# pt_regs pointer
  13.609 +	call do_int3
  13.610 +	testl %eax,%eax
  13.611 +	jnz restore_all_enable_events
  13.612 +	jmp ret_from_exception
  13.613 +
  13.614 +ENTRY(overflow)
  13.615 +	pushl $0
  13.616 +	pushl $do_overflow
  13.617 +	jmp error_code
  13.618 +
  13.619 +ENTRY(bounds)
  13.620 +	pushl $0
  13.621 +	pushl $do_bounds
  13.622 +	jmp error_code
  13.623 +
  13.624 +ENTRY(invalid_op)
  13.625 +	pushl $0
  13.626 +	pushl $do_invalid_op
  13.627 +	jmp error_code
  13.628 +
  13.629 +ENTRY(coprocessor_segment_overrun)
  13.630 +	pushl $0
  13.631 +	pushl $do_coprocessor_segment_overrun
  13.632 +	jmp error_code
  13.633 +
  13.634 +ENTRY(double_fault)
  13.635 +	pushl $do_double_fault
  13.636 +	jmp error_code
  13.637 +
  13.638 +ENTRY(invalid_TSS)
  13.639 +	pushl $do_invalid_TSS
  13.640 +	jmp error_code
  13.641 +
  13.642 +ENTRY(segment_not_present)
  13.643 +	pushl $do_segment_not_present
  13.644 +	jmp error_code
  13.645 +
  13.646 +ENTRY(stack_segment)
  13.647 +	pushl $do_stack_segment
  13.648 +	jmp error_code
  13.649 +
  13.650 +ENTRY(general_protection)
  13.651 +	pushl $do_general_protection
  13.652 +	jmp error_code
  13.653 +
  13.654 +ENTRY(alignment_check)
  13.655 +	pushl $do_alignment_check
  13.656 +	jmp error_code
  13.657 +
  13.658 +# This handler is special, because it gets an extra value on its stack,
  13.659 +# which is the linear faulting address.
  13.660 +# fastcall register usage:  %eax = pt_regs, %edx = error code,
  13.661 +#			    %ecx = fault address
  13.662 +#define PAGE_FAULT_STUB(_name1, _name2)					  \
  13.663 +ENTRY(_name1)								  \
  13.664 +	pushl %ds							; \
  13.665 +	pushl %eax							; \
  13.666 +	xorl %eax, %eax							; \
  13.667 +	pushl %ebp							; \
  13.668 +	pushl %edi							; \
  13.669 +	pushl %esi							; \
  13.670 +	pushl %edx							; \
  13.671 +	decl %eax			/* eax = -1 */			; \
  13.672 +	pushl %ecx							; \
  13.673 +	pushl %ebx							; \
  13.674 +	cld								; \
  13.675 +	movl %es,%edi							; \
  13.676 +	movl ES(%esp), %ecx		/* get the faulting address */	; \
  13.677 +	movl ORIG_EAX(%esp), %edx	/* get the error code */	; \
  13.678 +	movl %eax, ORIG_EAX(%esp)					; \
  13.679 +	movl %edi, ES(%esp)						; \
  13.680 +	movl $(__KERNEL_DS), %eax					; \
  13.681 +	movl %eax, %ds							; \
  13.682 +	movl %eax, %es							; \
  13.683 +	movl %esp,%eax			/* pt_regs pointer */		; \
  13.684 +	call _name2							; \
  13.685 +	jmp ret_from_exception						;
  13.686 +PAGE_FAULT_STUB(page_fault, do_page_fault)
  13.687 +
  13.688 +#ifdef CONFIG_X86_MCE
  13.689 +ENTRY(machine_check)
  13.690 +	pushl $0
  13.691 +	pushl machine_check_vector
  13.692 +	jmp error_code
  13.693 +#endif
  13.694 +
  13.695 +ENTRY(fixup_4gb_segment)
  13.696 +	pushl $do_fixup_4gb_segment
  13.697 +	jmp error_code
  13.698 +
  13.699 +.data
  13.700 +ENTRY(sys_call_table)
  13.701 +	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
  13.702 +	.long sys_exit
  13.703 +	.long sys_fork
  13.704 +	.long sys_read
  13.705 +	.long sys_write
  13.706 +	.long sys_open		/* 5 */
  13.707 +	.long sys_close
  13.708 +	.long sys_waitpid
  13.709 +	.long sys_creat
  13.710 +	.long sys_link
  13.711 +	.long sys_unlink	/* 10 */
  13.712 +	.long sys_execve
  13.713 +	.long sys_chdir
  13.714 +	.long sys_time
  13.715 +	.long sys_mknod
  13.716 +	.long sys_chmod		/* 15 */
  13.717 +	.long sys_lchown16
  13.718 +	.long sys_ni_syscall	/* old break syscall holder */
  13.719 +	.long sys_stat
  13.720 +	.long sys_lseek
  13.721 +	.long sys_getpid	/* 20 */
  13.722 +	.long sys_mount
  13.723 +	.long sys_oldumount
  13.724 +	.long sys_setuid16
  13.725 +	.long sys_getuid16
  13.726 +	.long sys_stime		/* 25 */
  13.727 +	.long sys_ptrace
  13.728 +	.long sys_alarm
  13.729 +	.long sys_fstat
  13.730 +	.long sys_pause
  13.731 +	.long sys_utime		/* 30 */
  13.732 +	.long sys_ni_syscall	/* old stty syscall holder */
  13.733 +	.long sys_ni_syscall	/* old gtty syscall holder */
  13.734 +	.long sys_access
  13.735 +	.long sys_nice
  13.736 +	.long sys_ni_syscall	/* 35 - old ftime syscall holder */
  13.737 +	.long sys_sync
  13.738 +	.long sys_kill
  13.739 +	.long sys_rename
  13.740 +	.long sys_mkdir
  13.741 +	.long sys_rmdir		/* 40 */
  13.742 +	.long sys_dup
  13.743 +	.long sys_pipe
  13.744 +	.long sys_times
  13.745 +	.long sys_ni_syscall	/* old prof syscall holder */
  13.746 +	.long sys_brk		/* 45 */
  13.747 +	.long sys_setgid16
  13.748 +	.long sys_getgid16
  13.749 +	.long sys_signal
  13.750 +	.long sys_geteuid16
  13.751 +	.long sys_getegid16	/* 50 */
  13.752 +	.long sys_acct
  13.753 +	.long sys_umount	/* recycled never used phys() */
  13.754 +	.long sys_ni_syscall	/* old lock syscall holder */
  13.755 +	.long sys_ioctl
  13.756 +	.long sys_fcntl		/* 55 */
  13.757 +	.long sys_ni_syscall	/* old mpx syscall holder */
  13.758 +	.long sys_setpgid
  13.759 +	.long sys_ni_syscall	/* old ulimit syscall holder */
  13.760 +	.long sys_olduname
  13.761 +	.long sys_umask		/* 60 */
  13.762 +	.long sys_chroot
  13.763 +	.long sys_ustat
  13.764 +	.long sys_dup2
  13.765 +	.long sys_getppid
  13.766 +	.long sys_getpgrp	/* 65 */
  13.767 +	.long sys_setsid
  13.768 +	.long sys_sigaction
  13.769 +	.long sys_sgetmask
  13.770 +	.long sys_ssetmask
  13.771 +	.long sys_setreuid16	/* 70 */
  13.772 +	.long sys_setregid16
  13.773 +	.long sys_sigsuspend
  13.774 +	.long sys_sigpending
  13.775 +	.long sys_sethostname
  13.776 +	.long sys_setrlimit	/* 75 */
  13.777 +	.long sys_old_getrlimit
  13.778 +	.long sys_getrusage
  13.779 +	.long sys_gettimeofday
  13.780 +	.long sys_settimeofday
  13.781 +	.long sys_getgroups16	/* 80 */
  13.782 +	.long sys_setgroups16
  13.783 +	.long old_select
  13.784 +	.long sys_symlink
  13.785 +	.long sys_lstat
  13.786 +	.long sys_readlink	/* 85 */
  13.787 +	.long sys_uselib
  13.788 +	.long sys_swapon
  13.789 +	.long sys_reboot
  13.790 +	.long old_readdir
  13.791 +	.long old_mmap		/* 90 */
  13.792 +	.long sys_munmap
  13.793 +	.long sys_truncate
  13.794 +	.long sys_ftruncate
  13.795 +	.long sys_fchmod
  13.796 +	.long sys_fchown16	/* 95 */
  13.797 +	.long sys_getpriority
  13.798 +	.long sys_setpriority
  13.799 +	.long sys_ni_syscall	/* old profil syscall holder */
  13.800 +	.long sys_statfs
  13.801 +	.long sys_fstatfs	/* 100 */
  13.802 +	.long sys_ioperm
  13.803 +	.long sys_socketcall
  13.804 +	.long sys_syslog
  13.805 +	.long sys_setitimer
  13.806 +	.long sys_getitimer	/* 105 */
  13.807 +	.long sys_newstat
  13.808 +	.long sys_newlstat
  13.809 +	.long sys_newfstat
  13.810 +	.long sys_uname
  13.811 +	.long sys_iopl		/* 110 */
  13.812 +	.long sys_vhangup
  13.813 +	.long sys_ni_syscall	/* old "idle" system call */
  13.814 +	.long sys_ni_syscall	/* disable sys_vm86old */
  13.815 +	.long sys_wait4
  13.816 +	.long sys_swapoff	/* 115 */
  13.817 +	.long sys_sysinfo
  13.818 +	.long sys_ipc
  13.819 +	.long sys_fsync
  13.820 +	.long sys_sigreturn
  13.821 +	.long sys_clone		/* 120 */
  13.822 +	.long sys_setdomainname
  13.823 +	.long sys_newuname
  13.824 +	.long sys_modify_ldt
  13.825 +	.long sys_adjtimex
  13.826 +	.long sys_mprotect	/* 125 */
  13.827 +	.long sys_sigprocmask
  13.828 +	.long sys_ni_syscall	/* old "create_module" */ 
  13.829 +	.long sys_init_module
  13.830 +	.long sys_delete_module
  13.831 +	.long sys_ni_syscall	/* 130:	old "get_kernel_syms" */
  13.832 +	.long sys_quotactl
  13.833 +	.long sys_getpgid
  13.834 +	.long sys_fchdir
  13.835 +	.long sys_bdflush
  13.836 +	.long sys_sysfs		/* 135 */
  13.837 +	.long sys_personality
  13.838 +	.long sys_ni_syscall	/* reserved for afs_syscall */
  13.839 +	.long sys_setfsuid16
  13.840 +	.long sys_setfsgid16
  13.841 +	.long sys_llseek	/* 140 */
  13.842 +	.long sys_getdents
  13.843 +	.long sys_select
  13.844 +	.long sys_flock
  13.845 +	.long sys_msync
  13.846 +	.long sys_readv		/* 145 */
  13.847 +	.long sys_writev
  13.848 +	.long sys_getsid
  13.849 +	.long sys_fdatasync
  13.850 +	.long sys_sysctl
  13.851 +	.long sys_mlock		/* 150 */
  13.852 +	.long sys_munlock
  13.853 +	.long sys_mlockall
  13.854 +	.long sys_munlockall
  13.855 +	.long sys_sched_setparam
  13.856 +	.long sys_sched_getparam   /* 155 */
  13.857 +	.long sys_sched_setscheduler
  13.858 +	.long sys_sched_getscheduler
  13.859 +	.long sys_sched_yield
  13.860 +	.long sys_sched_get_priority_max
  13.861 +	.long sys_sched_get_priority_min  /* 160 */
  13.862 +	.long sys_sched_rr_get_interval
  13.863 +	.long sys_nanosleep
  13.864 +	.long sys_mremap
  13.865 +	.long sys_setresuid16
  13.866 +	.long sys_getresuid16	/* 165 */
  13.867 +	.long sys_vm86
  13.868 +	.long sys_ni_syscall	/* Old sys_query_module */
  13.869 +	.long sys_poll
  13.870 +	.long sys_nfsservctl
  13.871 +	.long sys_setresgid16	/* 170 */
  13.872 +	.long sys_getresgid16
  13.873 +	.long sys_prctl
  13.874 +	.long sys_rt_sigreturn
  13.875 +	.long sys_rt_sigaction
  13.876 +	.long sys_rt_sigprocmask	/* 175 */
  13.877 +	.long sys_rt_sigpending
  13.878 +	.long sys_rt_sigtimedwait
  13.879 +	.long sys_rt_sigqueueinfo
  13.880 +	.long sys_rt_sigsuspend
  13.881 +	.long sys_pread64	/* 180 */
  13.882 +	.long sys_pwrite64
  13.883 +	.long sys_chown16
  13.884 +	.long sys_getcwd
  13.885 +	.long sys_capget
  13.886 +	.long sys_capset	/* 185 */
  13.887 +	.long sys_sigaltstack
  13.888 +	.long sys_sendfile
  13.889 +	.long sys_ni_syscall	/* reserved for streams1 */
  13.890 +	.long sys_ni_syscall	/* reserved for streams2 */
  13.891 +	.long sys_vfork		/* 190 */
  13.892 +	.long sys_getrlimit
  13.893 +	.long sys_mmap2
  13.894 +	.long sys_truncate64
  13.895 +	.long sys_ftruncate64
  13.896 +	.long sys_stat64	/* 195 */
  13.897 +	.long sys_lstat64
  13.898 +	.long sys_fstat64
  13.899 +	.long sys_lchown
  13.900 +	.long sys_getuid
  13.901 +	.long sys_getgid	/* 200 */
  13.902 +	.long sys_geteuid
  13.903 +	.long sys_getegid
  13.904 +	.long sys_setreuid
  13.905 +	.long sys_setregid
  13.906 +	.long sys_getgroups	/* 205 */
  13.907 +	.long sys_setgroups
  13.908 +	.long sys_fchown
  13.909 +	.long sys_setresuid
  13.910 +	.long sys_getresuid
  13.911 +	.long sys_setresgid	/* 210 */
  13.912 +	.long sys_getresgid
  13.913 +	.long sys_chown
  13.914 +	.long sys_setuid
  13.915 +	.long sys_setgid
  13.916 +	.long sys_setfsuid	/* 215 */
  13.917 +	.long sys_setfsgid
  13.918 +	.long sys_pivot_root
  13.919 +	.long sys_mincore
  13.920 +	.long sys_madvise
  13.921 +	.long sys_getdents64	/* 220 */
  13.922 +	.long sys_fcntl64
  13.923 +	.long sys_ni_syscall	/* reserved for TUX */
  13.924 +	.long sys_ni_syscall
  13.925 +	.long sys_gettid
  13.926 +	.long sys_readahead	/* 225 */
  13.927 +	.long sys_setxattr
  13.928 +	.long sys_lsetxattr
  13.929 +	.long sys_fsetxattr
  13.930 +	.long sys_getxattr
  13.931 +	.long sys_lgetxattr	/* 230 */
  13.932 +	.long sys_fgetxattr
  13.933 +	.long sys_listxattr
  13.934 +	.long sys_llistxattr
  13.935 +	.long sys_flistxattr
  13.936 +	.long sys_removexattr	/* 235 */
  13.937 +	.long sys_lremovexattr
  13.938 +	.long sys_fremovexattr
  13.939 +	.long sys_tkill
  13.940 +	.long sys_sendfile64
  13.941 +	.long sys_futex		/* 240 */
  13.942 +	.long sys_sched_setaffinity
  13.943 +	.long sys_sched_getaffinity
  13.944 +	.long sys_set_thread_area
  13.945 +	.long sys_get_thread_area
  13.946 +	.long sys_io_setup	/* 245 */
  13.947 +	.long sys_io_destroy
  13.948 +	.long sys_io_getevents
  13.949 +	.long sys_io_submit
  13.950 +	.long sys_io_cancel
  13.951 +	.long sys_fadvise64	/* 250 */
  13.952 +	.long sys_ni_syscall
  13.953 +	.long sys_exit_group
  13.954 +	.long sys_lookup_dcookie
  13.955 +	.long sys_epoll_create
  13.956 +	.long sys_epoll_ctl	/* 255 */
  13.957 +	.long sys_epoll_wait
  13.958 + 	.long sys_remap_file_pages
  13.959 + 	.long sys_set_tid_address
  13.960 + 	.long sys_timer_create
  13.961 + 	.long sys_timer_settime		/* 260 */
  13.962 + 	.long sys_timer_gettime
  13.963 + 	.long sys_timer_getoverrun
  13.964 + 	.long sys_timer_delete
  13.965 + 	.long sys_clock_settime
  13.966 + 	.long sys_clock_gettime		/* 265 */
  13.967 + 	.long sys_clock_getres
  13.968 + 	.long sys_clock_nanosleep
  13.969 +	.long sys_statfs64
  13.970 +	.long sys_fstatfs64	
  13.971 +	.long sys_tgkill	/* 270 */
  13.972 +	.long sys_utimes
  13.973 + 	.long sys_fadvise64_64
  13.974 +	.long sys_ni_syscall	/* sys_vserver */
  13.975 +	.long sys_mbind
  13.976 +	.long sys_get_mempolicy
  13.977 +	.long sys_set_mempolicy
  13.978 +	.long sys_mq_open
  13.979 +	.long sys_mq_unlink
  13.980 +	.long sys_mq_timedsend
  13.981 +	.long sys_mq_timedreceive	/* 280 */
  13.982 +	.long sys_mq_notify
  13.983 +	.long sys_mq_getsetattr
  13.984 +	.long sys_ni_syscall		/* reserved for kexec */
  13.985 +	.long sys_waitid
  13.986 +	.long sys_ni_syscall		/* 285 */ /* available */
  13.987 +	.long sys_add_key
  13.988 +	.long sys_request_key
  13.989 +	.long sys_keyctl
  13.990 +
  13.991 +syscall_table_size=(.-sys_call_table)
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/head.S	Fri Nov 19 00:40:52 2004 +0000
    14.3 @@ -0,0 +1,171 @@
    14.4 +
    14.5 +#include <linux/config.h>
    14.6 +
    14.7 +.section __xen_guest
    14.8 +	.ascii	"GUEST_OS=linux,GUEST_VER=2.6,XEN_VER=2.0,VIRT_BASE=0xC0000000"
    14.9 +	.ascii	",LOADER=generic"
   14.10 +#ifdef CONFIG_XEN_WRITABLE_PAGETABLES
   14.11 +	.ascii	",PT_MODE_WRITABLE"
   14.12 +#endif
   14.13 +	.byte	0
   14.14 +
   14.15 +.text
   14.16 +#include <linux/threads.h>
   14.17 +#include <linux/linkage.h>
   14.18 +#include <asm/segment.h>
   14.19 +#include <asm/thread_info.h>
   14.20 +#include <asm/asm_offsets.h>
   14.21 +#include <asm-xen/xen-public/arch-x86_32.h>
   14.22 +
   14.23 +/*
   14.24 + * References to members of the new_cpu_data structure.
   14.25 + */
   14.26 +
   14.27 +#define X86		new_cpu_data+CPUINFO_x86
   14.28 +#define X86_VENDOR	new_cpu_data+CPUINFO_x86_vendor
   14.29 +#define X86_MODEL	new_cpu_data+CPUINFO_x86_model
   14.30 +#define X86_MASK	new_cpu_data+CPUINFO_x86_mask
   14.31 +#define X86_HARD_MATH	new_cpu_data+CPUINFO_hard_math
   14.32 +#define X86_CPUID	new_cpu_data+CPUINFO_cpuid_level
   14.33 +#define X86_CAPABILITY	new_cpu_data+CPUINFO_x86_capability
   14.34 +#define X86_VENDOR_ID	new_cpu_data+CPUINFO_x86_vendor_id
   14.35 +
   14.36 +ENTRY(startup_32)
   14.37 +	cld
   14.38 +
   14.39 +	/* Set up the stack pointer */
   14.40 +	lss stack_start,%esp
   14.41 +
   14.42 +	/* Copy the necessary stuff from xen_start_info structure. */
   14.43 +	mov  $xen_start_info_union,%edi
   14.44 +	mov  $128,%ecx
   14.45 +	rep movsl
   14.46 +
   14.47 +checkCPUtype:
   14.48 +
   14.49 +	/* get vendor info */
   14.50 +	xorl %eax,%eax			# call CPUID with 0 -> return vendor ID
   14.51 +	cpuid
   14.52 +	movl %eax,X86_CPUID		# save CPUID level
   14.53 +	movl %ebx,X86_VENDOR_ID		# lo 4 chars
   14.54 +	movl %edx,X86_VENDOR_ID+4	# next 4 chars
   14.55 +	movl %ecx,X86_VENDOR_ID+8	# last 4 chars
   14.56 +
   14.57 +	movl $1,%eax		# Use the CPUID instruction to get CPU type
   14.58 +	cpuid
   14.59 +	movb %al,%cl		# save reg for future use
   14.60 +	andb $0x0f,%ah		# mask processor family
   14.61 +	movb %ah,X86
   14.62 +	andb $0xf0,%al		# mask model
   14.63 +	shrb $4,%al
   14.64 +	movb %al,X86_MODEL
   14.65 +	andb $0x0f,%cl		# mask mask revision
   14.66 +	movb %cl,X86_MASK
   14.67 +	movl %edx,X86_CAPABILITY
   14.68 +
   14.69 +	xorl %eax,%eax		# Clear FS/GS and LDT
   14.70 +	movl %eax,%fs
   14.71 +	movl %eax,%gs
   14.72 +	cld		# gcc2 wants the direction flag cleared at all times
   14.73 +
   14.74 +	call start_kernel
   14.75 +L6:
   14.76 +	jmp L6			# main should never return here, but
   14.77 +				# just in case, we know what happens.
   14.78 +
   14.79 +ENTRY(lgdt_finish)
   14.80 +	movl $(__KERNEL_DS),%eax	# reload all the segment registers
   14.81 +	movw %ax,%ss			# after changing gdt.
   14.82 +
   14.83 +	movl $(__USER_DS),%eax		# DS/ES contains default USER segment
   14.84 +	movw %ax,%ds
   14.85 +	movw %ax,%es
   14.86 +
   14.87 +	popl %eax			# reload CS by intersegment return
   14.88 +	pushl $(__KERNEL_CS)
   14.89 +	pushl %eax
   14.90 +	lret
   14.91 +
   14.92 +ENTRY(stack_start)
   14.93 +	.long init_thread_union+THREAD_SIZE
   14.94 +	.long __BOOT_DS
   14.95 +
   14.96 +# XXXcl
   14.97 +.globl idt_descr
   14.98 +.globl cpu_gdt_descr
   14.99 +
  14.100 +	ALIGN
  14.101 +	.word 0				# 32-bit align idt_desc.address
  14.102 +idt_descr:
  14.103 +	.word IDT_ENTRIES*8-1		# idt contains 256 entries
  14.104 +	.long idt_table
  14.105 +# XXXcl
  14.106 +
  14.107 +# boot GDT descriptor (later on used by CPU#0):
  14.108 +	.word 0				# 32 bit align gdt_desc.address
  14.109 +cpu_gdt_descr:
  14.110 +	.word GDT_SIZE
  14.111 +	.long cpu_gdt_table
  14.112 +
  14.113 +	.fill NR_CPUS-1,8,0		# space for the other GDT descriptors
  14.114 +
  14.115 +.org 0x1000
  14.116 +ENTRY(empty_zero_page)
  14.117 +
  14.118 +.org 0x2000
  14.119 +ENTRY(swapper_pg_dir)
  14.120 +
  14.121 +.org 0x3000
  14.122 +ENTRY(cpu_gdt_table)
  14.123 +	.quad 0x0000000000000000	/* NULL descriptor */
  14.124 +	.quad 0x0000000000000000	/* 0x0b reserved */
  14.125 +	.quad 0x0000000000000000	/* 0x13 reserved */
  14.126 +	.quad 0x0000000000000000	/* 0x1b reserved */
  14.127 +	.quad 0x0000000000000000	/* 0x20 unused */
  14.128 +	.quad 0x0000000000000000	/* 0x28 unused */
  14.129 +	.quad 0x0000000000000000	/* 0x33 TLS entry 1 */
  14.130 +	.quad 0x0000000000000000	/* 0x3b TLS entry 2 */
  14.131 +	.quad 0x0000000000000000	/* 0x43 TLS entry 3 */
  14.132 +	.quad 0x0000000000000000	/* 0x4b reserved */
  14.133 +	.quad 0x0000000000000000	/* 0x53 reserved */
  14.134 +	.quad 0x0000000000000000	/* 0x5b reserved */
  14.135 +
  14.136 +	.quad 0x00cfbb000000c3ff	/* 0x60 kernel 4GB code at 0x00000000 */
  14.137 +	.quad 0x00cfb3000000c3ff	/* 0x68 kernel 4GB data at 0x00000000 */
  14.138 +	.quad 0x00cffb000000c3ff	/* 0x73 user 4GB code at 0x00000000 */
  14.139 +	.quad 0x00cff3000000c3ff	/* 0x7b user 4GB data at 0x00000000 */
  14.140 +
  14.141 +	.quad 0x0000000000000000	/* 0x80 TSS descriptor */
  14.142 +	.quad 0x0000000000000000	/* 0x88 LDT descriptor */
  14.143 +
  14.144 +	/* Segments used for calling PnP BIOS */
  14.145 +	.quad 0x0000000000000000	/* 0x90 32-bit code */
  14.146 +	.quad 0x0000000000000000	/* 0x98 16-bit code */
  14.147 +	.quad 0x0000000000000000	/* 0xa0 16-bit data */
  14.148 +	.quad 0x0000000000000000	/* 0xa8 16-bit data */
  14.149 +	.quad 0x0000000000000000	/* 0xb0 16-bit data */
  14.150 +	/*
  14.151 +	 * The APM segments have byte granularity and their bases
  14.152 +	 * and limits are set at run time.
  14.153 +	 */
  14.154 +	.quad 0x0000000000000000	/* 0xb8 APM CS    code */
  14.155 +	.quad 0x0000000000000000	/* 0xc0 APM CS 16 code (16 bit) */
  14.156 +	.quad 0x0000000000000000	/* 0xc8 APM DS    data */
  14.157 +
  14.158 +	.quad 0x0000000000000000	/* 0xd0 - unused */
  14.159 +	.quad 0x0000000000000000	/* 0xd8 - unused */
  14.160 +	.quad 0x0000000000000000	/* 0xe0 - unused */
  14.161 +	.quad 0x0000000000000000	/* 0xe8 - unused */
  14.162 +	.quad 0x0000000000000000	/* 0xf0 - unused */
  14.163 +	.quad 0x0000000000000000	/* 0xf8 - GDT entry 31: double-fault TSS */
  14.164 +	.fill GDT_ENTRIES-32,8,0
  14.165 +
  14.166 +.org 0x4000
  14.167 +ENTRY(default_ldt)
  14.168 +
  14.169 +.org 0x5000
  14.170 +/*
  14.171 + * Real beginning of normal "text" segment
  14.172 + */
  14.173 +ENTRY(stext)
  14.174 +ENTRY(_stext)
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/i386_ksyms.c	Fri Nov 19 00:40:52 2004 +0000
    15.3 @@ -0,0 +1,196 @@
    15.4 +#include <linux/config.h>
    15.5 +#include <linux/module.h>
    15.6 +#include <linux/smp.h>
    15.7 +#include <linux/user.h>
    15.8 +#include <linux/elfcore.h>
    15.9 +#include <linux/mca.h>
   15.10 +#include <linux/sched.h>
   15.11 +#include <linux/in6.h>
   15.12 +#include <linux/interrupt.h>
   15.13 +#include <linux/smp_lock.h>
   15.14 +#include <linux/pm.h>
   15.15 +#include <linux/pci.h>
   15.16 +#include <linux/apm_bios.h>
   15.17 +#include <linux/kernel.h>
   15.18 +#include <linux/string.h>
   15.19 +#include <linux/tty.h>
   15.20 +#include <linux/highmem.h>
   15.21 +#include <linux/time.h>
   15.22 +
   15.23 +#include <asm/semaphore.h>
   15.24 +#include <asm/processor.h>
   15.25 +#include <asm/i387.h>
   15.26 +#include <asm/uaccess.h>
   15.27 +#include <asm/checksum.h>
   15.28 +#include <asm/io.h>
   15.29 +#include <asm/delay.h>
   15.30 +#include <asm/irq.h>
   15.31 +#include <asm/mmx.h>
   15.32 +#include <asm/desc.h>
   15.33 +#include <asm/pgtable.h>
   15.34 +#include <asm/tlbflush.h>
   15.35 +#include <asm/nmi.h>
   15.36 +#include <asm/ist.h>
   15.37 +#include <asm/kdebug.h>
   15.38 +
   15.39 +extern void dump_thread(struct pt_regs *, struct user *);
   15.40 +extern spinlock_t rtc_lock;
   15.41 +
   15.42 +/* This is definitely a GPL-only symbol */
   15.43 +EXPORT_SYMBOL_GPL(cpu_gdt_table);
   15.44 +
   15.45 +#if defined(CONFIG_APM_MODULE)
   15.46 +extern void machine_real_restart(unsigned char *, int);
   15.47 +EXPORT_SYMBOL(machine_real_restart);
   15.48 +extern void default_idle(void);
   15.49 +EXPORT_SYMBOL(default_idle);
   15.50 +#endif
   15.51 +
   15.52 +#ifdef CONFIG_SMP
   15.53 +extern void FASTCALL( __write_lock_failed(rwlock_t *rw));
   15.54 +extern void FASTCALL( __read_lock_failed(rwlock_t *rw));
   15.55 +#endif
   15.56 +
   15.57 +#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD) || defined(CONFIG_BLK_DEV_IDE_MODULE) || defined(CONFIG_BLK_DEV_HD_MODULE)
   15.58 +extern struct drive_info_struct drive_info;
   15.59 +EXPORT_SYMBOL(drive_info);
   15.60 +#endif
   15.61 +
   15.62 +extern unsigned long cpu_khz;
   15.63 +extern unsigned long get_cmos_time(void);
   15.64 +
   15.65 +/* platform dependent support */
   15.66 +EXPORT_SYMBOL(boot_cpu_data);
   15.67 +EXPORT_SYMBOL(MCA_bus);
   15.68 +#ifdef CONFIG_DISCONTIGMEM
   15.69 +EXPORT_SYMBOL(node_data);
   15.70 +EXPORT_SYMBOL(physnode_map);
   15.71 +#endif
   15.72 +#ifdef CONFIG_X86_NUMAQ
   15.73 +EXPORT_SYMBOL(xquad_portio);
   15.74 +#endif
   15.75 +EXPORT_SYMBOL(dump_thread);
   15.76 +EXPORT_SYMBOL(dump_fpu);
   15.77 +EXPORT_SYMBOL_GPL(kernel_fpu_begin);
   15.78 +EXPORT_SYMBOL(__ioremap);
   15.79 +EXPORT_SYMBOL(ioremap_nocache);
   15.80 +EXPORT_SYMBOL(iounmap);
   15.81 +EXPORT_SYMBOL(probe_irq_mask);
   15.82 +EXPORT_SYMBOL(kernel_thread);
   15.83 +EXPORT_SYMBOL(pm_idle);
   15.84 +#ifdef CONFIG_APM
   15.85 +EXPORT_SYMBOL(pm_power_off);
   15.86 +#endif
   15.87 +EXPORT_SYMBOL(get_cmos_time);
   15.88 +EXPORT_SYMBOL(cpu_khz);
   15.89 +EXPORT_SYMBOL(apm_info);
   15.90 +
   15.91 +EXPORT_SYMBOL(__down_failed);
   15.92 +EXPORT_SYMBOL(__down_failed_interruptible);
   15.93 +EXPORT_SYMBOL(__down_failed_trylock);
   15.94 +EXPORT_SYMBOL(__up_wakeup);
   15.95 +/* Networking helper routines. */
   15.96 +EXPORT_SYMBOL(csum_partial_copy_generic);
   15.97 +/* Delay loops */
   15.98 +EXPORT_SYMBOL(__ndelay);
   15.99 +EXPORT_SYMBOL(__udelay);
  15.100 +EXPORT_SYMBOL(__delay);
  15.101 +EXPORT_SYMBOL(__const_udelay);
  15.102 +
  15.103 +EXPORT_SYMBOL(__get_user_1);
  15.104 +EXPORT_SYMBOL(__get_user_2);
  15.105 +EXPORT_SYMBOL(__get_user_4);
  15.106 +
  15.107 +EXPORT_SYMBOL(strpbrk);
  15.108 +EXPORT_SYMBOL(strstr);
  15.109 +
  15.110 +EXPORT_SYMBOL(strncpy_from_user);
  15.111 +EXPORT_SYMBOL(__strncpy_from_user);
  15.112 +EXPORT_SYMBOL(clear_user);
  15.113 +EXPORT_SYMBOL(__clear_user);
  15.114 +EXPORT_SYMBOL(__copy_from_user_ll);
  15.115 +EXPORT_SYMBOL(__copy_to_user_ll);
  15.116 +EXPORT_SYMBOL(strnlen_user);
  15.117 +
  15.118 +EXPORT_SYMBOL(dma_alloc_coherent);
  15.119 +EXPORT_SYMBOL(dma_free_coherent);
  15.120 +
  15.121 +#ifdef CONFIG_PCI
  15.122 +EXPORT_SYMBOL(pcibios_penalize_isa_irq);
  15.123 +EXPORT_SYMBOL(pci_mem_start);
  15.124 +#endif
  15.125 +
  15.126 +#ifdef CONFIG_PCI_BIOS
  15.127 +EXPORT_SYMBOL(pcibios_set_irq_routing);
  15.128 +EXPORT_SYMBOL(pcibios_get_irq_routing_table);
  15.129 +#endif
  15.130 +
  15.131 +#ifdef CONFIG_X86_USE_3DNOW
  15.132 +EXPORT_SYMBOL(_mmx_memcpy);
  15.133 +EXPORT_SYMBOL(mmx_clear_page);
  15.134 +EXPORT_SYMBOL(mmx_copy_page);
  15.135 +#endif
  15.136 +
  15.137 +#ifdef CONFIG_X86_HT
  15.138 +EXPORT_SYMBOL(smp_num_siblings);
  15.139 +EXPORT_SYMBOL(cpu_sibling_map);
  15.140 +#endif
  15.141 +
  15.142 +#ifdef CONFIG_SMP
  15.143 +EXPORT_SYMBOL(cpu_data);
  15.144 +EXPORT_SYMBOL(cpu_online_map);
  15.145 +EXPORT_SYMBOL(cpu_callout_map);
  15.146 +EXPORT_SYMBOL(__write_lock_failed);
  15.147 +EXPORT_SYMBOL(__read_lock_failed);
  15.148 +
  15.149 +/* Global SMP stuff */
  15.150 +EXPORT_SYMBOL(smp_call_function);
  15.151 +
  15.152 +/* TLB flushing */
  15.153 +EXPORT_SYMBOL(flush_tlb_page);
  15.154 +EXPORT_SYMBOL_GPL(flush_tlb_all);
  15.155 +#endif
  15.156 +
  15.157 +#ifdef CONFIG_X86_IO_APIC
  15.158 +EXPORT_SYMBOL(IO_APIC_get_PCI_irq_vector);
  15.159 +#endif
  15.160 +
  15.161 +#ifdef CONFIG_MCA
  15.162 +EXPORT_SYMBOL(machine_id);
  15.163 +#endif
  15.164 +
  15.165 +#ifdef CONFIG_VT
  15.166 +EXPORT_SYMBOL(screen_info);
  15.167 +#endif
  15.168 +
  15.169 +EXPORT_SYMBOL(get_wchan);
  15.170 +
  15.171 +EXPORT_SYMBOL(rtc_lock);
  15.172 +
  15.173 +EXPORT_SYMBOL_GPL(set_nmi_callback);
  15.174 +EXPORT_SYMBOL_GPL(unset_nmi_callback);
  15.175 +
  15.176 +#undef memcmp
  15.177 +extern int memcmp(const void *,const void *,__kernel_size_t);
  15.178 +EXPORT_SYMBOL(memcmp);
  15.179 +
  15.180 +EXPORT_SYMBOL(register_die_notifier);
  15.181 +#ifdef CONFIG_HAVE_DEC_LOCK
  15.182 +EXPORT_SYMBOL(_atomic_dec_and_lock);
  15.183 +#endif
  15.184 +
  15.185 +EXPORT_SYMBOL(__PAGE_KERNEL);
  15.186 +
  15.187 +#ifdef CONFIG_HIGHMEM
  15.188 +EXPORT_SYMBOL(kmap);
  15.189 +EXPORT_SYMBOL(kunmap);
  15.190 +EXPORT_SYMBOL(kmap_atomic);
  15.191 +EXPORT_SYMBOL(kunmap_atomic);
  15.192 +EXPORT_SYMBOL(kmap_atomic_to_page);
  15.193 +#endif
  15.194 +
  15.195 +#if defined(CONFIG_X86_SPEEDSTEP_SMI) || defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
  15.196 +EXPORT_SYMBOL(ist_info);
  15.197 +#endif
  15.198 +
  15.199 +EXPORT_SYMBOL(csum_partial);
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ioport.c	Fri Nov 19 00:40:52 2004 +0000
    16.3 @@ -0,0 +1,51 @@
    16.4 +#include <linux/sched.h>
    16.5 +#include <linux/kernel.h>
    16.6 +#include <linux/errno.h>
    16.7 +#include <linux/types.h>
    16.8 +#include <linux/ioport.h>
    16.9 +#include <linux/mm.h>
   16.10 +#include <linux/smp.h>
   16.11 +#include <linux/smp_lock.h>
   16.12 +#include <linux/stddef.h>
   16.13 +#include <linux/slab.h>
   16.14 +#include <asm-xen/xen-public/dom0_ops.h>
   16.15 +
   16.16 +asmlinkage long sys_iopl(unsigned int new_io_pl)
   16.17 +{
   16.18 +	unsigned int old_io_pl = current->thread.io_pl;
   16.19 +	dom0_op_t op;
   16.20 +
   16.21 +	if (new_io_pl > 3)
   16.22 +		return -EINVAL;
   16.23 +
   16.24 +	/* Need "raw I/O" privileges for direct port access. */
   16.25 +	if ((new_io_pl > old_io_pl) && !capable(CAP_SYS_RAWIO))
   16.26 +		return -EPERM;
   16.27 +
   16.28 +	if (!(xen_start_info.flags & SIF_PRIVILEGED))
   16.29 +		return -EPERM;
   16.30 +
   16.31 +	/* Maintain OS privileges even if user attempts to relinquish them. */
   16.32 +	if (new_io_pl == 0)
   16.33 +		new_io_pl = 1;
   16.34 +
   16.35 +	/* Change our version of the privilege levels. */
   16.36 +	current->thread.io_pl = new_io_pl;
   16.37 +
   16.38 +	/* Force the change at ring 0. */
   16.39 +	op.cmd           = DOM0_IOPL;
   16.40 +	op.u.iopl.domain = DOMID_SELF;
   16.41 +	op.u.iopl.iopl   = new_io_pl;
   16.42 +	HYPERVISOR_dom0_op(&op);
   16.43 +
   16.44 +	return 0;
   16.45 +}
   16.46 +
   16.47 +asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
   16.48 +{
   16.49 +#if 0
   16.50 +	printk(KERN_INFO "ioperm not fully supported - %s\n",
   16.51 +		turn_on ? "set iopl to 3" : "ignore resource release");
   16.52 +#endif
   16.53 +	return turn_on ? sys_iopl(3) : 0;
   16.54 +}
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/irq.c	Fri Nov 19 00:40:52 2004 +0000
    17.3 @@ -0,0 +1,256 @@
    17.4 +/*
    17.5 + *	linux/arch/i386/kernel/irq.c
    17.6 + *
    17.7 + *	Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
    17.8 + *
    17.9 + * This file contains the lowest level x86-specific interrupt
   17.10 + * entry, irq-stacks and irq statistics code. All the remaining
   17.11 + * irq logic is done by the generic kernel/irq/ code and
   17.12 + * by the x86-specific irq controller code. (e.g. i8259.c and
   17.13 + * io_apic.c.)
   17.14 + */
   17.15 +
   17.16 +#include <asm/uaccess.h>
   17.17 +#include <linux/module.h>
   17.18 +#include <linux/seq_file.h>
   17.19 +#include <linux/interrupt.h>
   17.20 +#include <linux/kernel_stat.h>
   17.21 +
   17.22 +#ifndef CONFIG_X86_LOCAL_APIC
   17.23 +/*
   17.24 + * 'what should we do if we get a hw irq event on an illegal vector'.
   17.25 + * each architecture has to answer this themselves.
   17.26 + */
   17.27 +void ack_bad_irq(unsigned int irq)
   17.28 +{
   17.29 +	printk("unexpected IRQ trap at vector %02x\n", irq);
   17.30 +}
   17.31 +#endif
   17.32 +
   17.33 +#ifdef CONFIG_4KSTACKS
   17.34 +/*
   17.35 + * per-CPU IRQ handling contexts (thread information and stack)
   17.36 + */
   17.37 +union irq_ctx {
   17.38 +	struct thread_info      tinfo;
   17.39 +	u32                     stack[THREAD_SIZE/sizeof(u32)];
   17.40 +};
   17.41 +
   17.42 +static union irq_ctx *hardirq_ctx[NR_CPUS];
   17.43 +static union irq_ctx *softirq_ctx[NR_CPUS];
   17.44 +#endif
   17.45 +
   17.46 +/*
   17.47 + * do_IRQ handles all normal device IRQ's (the special
   17.48 + * SMP cross-CPU interrupts have their own specific
   17.49 + * handlers).
   17.50 + */
   17.51 +unsigned int do_IRQ(int irq, struct pt_regs *regs)
   17.52 +{
   17.53 +#ifdef CONFIG_4KSTACKS
   17.54 +	union irq_ctx *curctx, *irqctx;
   17.55 +	u32 *isp;
   17.56 +#endif
   17.57 +
   17.58 +	irq_enter();
   17.59 +#ifdef CONFIG_DEBUG_STACKOVERFLOW
   17.60 +	/* Debugging check for stack overflow: is there less than 1KB free? */
   17.61 +	{
   17.62 +		long esp;
   17.63 +
   17.64 +		__asm__ __volatile__("andl %%esp,%0" :
   17.65 +					"=r" (esp) : "0" (THREAD_SIZE - 1));
   17.66 +		if (unlikely(esp < (sizeof(struct thread_info) + STACK_WARN))) {
   17.67 +			printk("do_IRQ: stack overflow: %ld\n",
   17.68 +				esp - sizeof(struct thread_info));
   17.69 +			dump_stack();
   17.70 +		}
   17.71 +	}
   17.72 +#endif
   17.73 +
   17.74 +#ifdef CONFIG_4KSTACKS
   17.75 +
   17.76 +	curctx = (union irq_ctx *) current_thread_info();
   17.77 +	irqctx = hardirq_ctx[smp_processor_id()];
   17.78 +
   17.79 +	/*
   17.80 +	 * this is where we switch to the IRQ stack. However, if we are
   17.81 +	 * already using the IRQ stack (because we interrupted a hardirq
   17.82 +	 * handler) we can't do that and just have to keep using the
   17.83 +	 * current stack (which is the irq stack already after all)
   17.84 +	 */
   17.85 +	if (curctx != irqctx) {
   17.86 +		int arg1, arg2, ebx;
   17.87 +
   17.88 +		/* build the stack frame on the IRQ stack */
   17.89 +		isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
   17.90 +		irqctx->tinfo.task = curctx->tinfo.task;
   17.91 +		irqctx->tinfo.previous_esp = current_stack_pointer;
   17.92 +
   17.93 +		asm volatile(
   17.94 +			"       xchgl   %%ebx,%%esp      \n"
   17.95 +			"       call    __do_IRQ         \n"
   17.96 +			"       movl   %%ebx,%%esp      \n"
   17.97 +			: "=a" (arg1), "=d" (arg2), "=b" (ebx)
   17.98 +			:  "0" (irq),   "1" (regs),  "2" (isp)
   17.99 +			: "memory", "cc", "ecx"
  17.100 +		);
  17.101 +	} else
  17.102 +#endif
  17.103 +		__do_IRQ(irq, regs);
  17.104 +
  17.105 +	irq_exit();
  17.106 +
  17.107 +	return 1;
  17.108 +}
  17.109 +
  17.110 +#ifdef CONFIG_4KSTACKS
  17.111 +
  17.112 +/*
  17.113 + * These should really be __section__(".bss.page_aligned") as well, but
  17.114 + * gcc's 3.0 and earlier don't handle that correctly.
  17.115 + */
  17.116 +static char softirq_stack[NR_CPUS * THREAD_SIZE]
  17.117 +		__attribute__((__aligned__(THREAD_SIZE)));
  17.118 +
  17.119 +static char hardirq_stack[NR_CPUS * THREAD_SIZE]
  17.120 +		__attribute__((__aligned__(THREAD_SIZE)));
  17.121 +
  17.122 +/*
  17.123 + * allocate per-cpu stacks for hardirq and for softirq processing
  17.124 + */
  17.125 +void irq_ctx_init(int cpu)
  17.126 +{
  17.127 +	union irq_ctx *irqctx;
  17.128 +
  17.129 +	if (hardirq_ctx[cpu])
  17.130 +		return;
  17.131 +
  17.132 +	irqctx = (union irq_ctx*) &hardirq_stack[cpu*THREAD_SIZE];
  17.133 +	irqctx->tinfo.task              = NULL;
  17.134 +	irqctx->tinfo.exec_domain       = NULL;
  17.135 +	irqctx->tinfo.cpu               = cpu;
  17.136 +	irqctx->tinfo.preempt_count     = HARDIRQ_OFFSET;
  17.137 +	irqctx->tinfo.addr_limit        = MAKE_MM_SEG(0);
  17.138 +
  17.139 +	hardirq_ctx[cpu] = irqctx;
  17.140 +
  17.141 +	irqctx = (union irq_ctx*) &softirq_stack[cpu*THREAD_SIZE];
  17.142 +	irqctx->tinfo.task              = NULL;
  17.143 +	irqctx->tinfo.exec_domain       = NULL;
  17.144 +	irqctx->tinfo.cpu               = cpu;
  17.145 +	irqctx->tinfo.preempt_count     = SOFTIRQ_OFFSET;
  17.146 +	irqctx->tinfo.addr_limit        = MAKE_MM_SEG(0);
  17.147 +
  17.148 +	softirq_ctx[cpu] = irqctx;
  17.149 +
  17.150 +	printk("CPU %u irqstacks, hard=%p soft=%p\n",
  17.151 +		cpu,hardirq_ctx[cpu],softirq_ctx[cpu]);
  17.152 +}
  17.153 +
  17.154 +extern asmlinkage void __do_softirq(void);
  17.155 +
  17.156 +asmlinkage void do_softirq(void)
  17.157 +{
  17.158 +	unsigned long flags;
  17.159 +	struct thread_info *curctx;
  17.160 +	union irq_ctx *irqctx;
  17.161 +	u32 *isp;
  17.162 +
  17.163 +	if (in_interrupt())
  17.164 +		return;
  17.165 +
  17.166 +	local_irq_save(flags);
  17.167 +
  17.168 +	if (local_softirq_pending()) {
  17.169 +		curctx = current_thread_info();
  17.170 +		irqctx = softirq_ctx[smp_processor_id()];
  17.171 +		irqctx->tinfo.task = curctx->task;
  17.172 +		irqctx->tinfo.previous_esp = current_stack_pointer;
  17.173 +
  17.174 +		/* build the stack frame on the softirq stack */
  17.175 +		isp = (u32*) ((char*)irqctx + sizeof(*irqctx));
  17.176 +
  17.177 +		asm volatile(
  17.178 +			"       xchgl   %%ebx,%%esp     \n"
  17.179 +			"       call    __do_softirq    \n"
  17.180 +			"       movl    %%ebx,%%esp     \n"
  17.181 +			: "=b"(isp)
  17.182 +			: "0"(isp)
  17.183 +			: "memory", "cc", "edx", "ecx", "eax"
  17.184 +		);
  17.185 +	}
  17.186 +
  17.187 +	local_irq_restore(flags);
  17.188 +}
  17.189 +
  17.190 +EXPORT_SYMBOL(do_softirq);
  17.191 +#endif
  17.192 +
  17.193 +/*
  17.194 + * Interrupt statistics:
  17.195 + */
  17.196 +
  17.197 +atomic_t irq_err_count;
  17.198 +
  17.199 +/*
  17.200 + * /proc/interrupts printing:
  17.201 + */
  17.202 +
  17.203 +int show_interrupts(struct seq_file *p, void *v)
  17.204 +{
  17.205 +	int i = *(loff_t *) v, j;
  17.206 +	struct irqaction * action;
  17.207 +	unsigned long flags;
  17.208 +
  17.209 +	if (i == 0) {
  17.210 +		seq_printf(p, "           ");
  17.211 +		for (j=0; j<NR_CPUS; j++)
  17.212 +			if (cpu_online(j))
  17.213 +				seq_printf(p, "CPU%d       ",j);
  17.214 +		seq_putc(p, '\n');
  17.215 +	}
  17.216 +
  17.217 +	if (i < NR_IRQS) {
  17.218 +		spin_lock_irqsave(&irq_desc[i].lock, flags);
  17.219 +		action = irq_desc[i].action;
  17.220 +		if (!action)
  17.221 +			goto skip;
  17.222 +		seq_printf(p, "%3d: ",i);
  17.223 +#ifndef CONFIG_SMP
  17.224 +		seq_printf(p, "%10u ", kstat_irqs(i));
  17.225 +#else
  17.226 +		for (j = 0; j < NR_CPUS; j++)
  17.227 +			if (cpu_online(j))
  17.228 +				seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
  17.229 +#endif
  17.230 +		seq_printf(p, " %14s", irq_desc[i].handler->typename);
  17.231 +		seq_printf(p, "  %s", action->name);
  17.232 +
  17.233 +		for (action=action->next; action; action = action->next)
  17.234 +			seq_printf(p, ", %s", action->name);
  17.235 +
  17.236 +		seq_putc(p, '\n');
  17.237 +skip:
  17.238 +		spin_unlock_irqrestore(&irq_desc[i].lock, flags);
  17.239 +	} else if (i == NR_IRQS) {
  17.240 +		seq_printf(p, "NMI: ");
  17.241 +		for (j = 0; j < NR_CPUS; j++)
  17.242 +			if (cpu_online(j))
  17.243 +				seq_printf(p, "%10u ", nmi_count(j));
  17.244 +		seq_putc(p, '\n');
  17.245 +#ifdef CONFIG_X86_LOCAL_APIC
  17.246 +		seq_printf(p, "LOC: ");
  17.247 +		for (j = 0; j < NR_CPUS; j++)
  17.248 +			if (cpu_online(j))
  17.249 +				seq_printf(p, "%10u ",
  17.250 +					irq_stat[j].apic_timer_irqs);
  17.251 +		seq_putc(p, '\n');
  17.252 +#endif
  17.253 +		seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
  17.254 +#if defined(CONFIG_X86_IO_APIC)
  17.255 +		seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
  17.256 +#endif
  17.257 +	}
  17.258 +	return 0;
  17.259 +}
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/ldt.c	Fri Nov 19 00:40:52 2004 +0000
    18.3 @@ -0,0 +1,270 @@
    18.4 +/*
    18.5 + * linux/kernel/ldt.c
    18.6 + *
    18.7 + * Copyright (C) 1992 Krishna Balasubramanian and Linus Torvalds
    18.8 + * Copyright (C) 1999 Ingo Molnar <mingo@redhat.com>
    18.9 + */
   18.10 +
   18.11 +#include <linux/errno.h>
   18.12 +#include <linux/sched.h>
   18.13 +#include <linux/string.h>
   18.14 +#include <linux/mm.h>
   18.15 +#include <linux/smp.h>
   18.16 +#include <linux/smp_lock.h>
   18.17 +#include <linux/vmalloc.h>
   18.18 +#include <linux/slab.h>
   18.19 +
   18.20 +#include <asm/uaccess.h>
   18.21 +#include <asm/system.h>
   18.22 +#include <asm/ldt.h>
   18.23 +#include <asm/desc.h>
   18.24 +
   18.25 +#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
   18.26 +static void flush_ldt(void *null)
   18.27 +{
   18.28 +	if (current->active_mm) {
   18.29 +		load_LDT(&current->active_mm->context);
   18.30 +		flush_page_update_queue();
   18.31 +	}
   18.32 +}
   18.33 +#endif
   18.34 +
   18.35 +static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
   18.36 +{
   18.37 +	void *oldldt;
   18.38 +	void *newldt;
   18.39 +	int oldsize;
   18.40 +
   18.41 +	if (mincount <= pc->size)
   18.42 +		return 0;
   18.43 +	oldsize = pc->size;
   18.44 +	mincount = (mincount+511)&(~511);
   18.45 +	if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
   18.46 +		newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
   18.47 +	else
   18.48 +		newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
   18.49 +
   18.50 +	if (!newldt)
   18.51 +		return -ENOMEM;
   18.52 +
   18.53 +	if (oldsize)
   18.54 +		memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
   18.55 +	oldldt = pc->ldt;
   18.56 +	memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
   18.57 +	pc->ldt = newldt;
   18.58 +	wmb();
   18.59 +	pc->size = mincount;
   18.60 +	wmb();
   18.61 +
   18.62 +	if (reload) {
   18.63 +#ifdef CONFIG_SMP
   18.64 +		cpumask_t mask;
   18.65 +		preempt_disable();
   18.66 +#endif
   18.67 +		make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
   18.68 +				    PAGE_SIZE);
   18.69 +		load_LDT(pc);
   18.70 +		flush_page_update_queue();
   18.71 +#ifdef CONFIG_SMP
   18.72 +		mask = cpumask_of_cpu(smp_processor_id());
   18.73 +		if (!cpus_equal(current->mm->cpu_vm_mask, mask))
   18.74 +			smp_call_function(flush_ldt, NULL, 1, 1);
   18.75 +		preempt_enable();
   18.76 +#endif
   18.77 +	}
   18.78 +	if (oldsize) {
   18.79 +		make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) /
   18.80 +			PAGE_SIZE);
   18.81 +		flush_page_update_queue();
   18.82 +		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
   18.83 +			vfree(oldldt);
   18.84 +		else
   18.85 +			kfree(oldldt);
   18.86 +	}
   18.87 +	return 0;
   18.88 +}
   18.89 +
   18.90 +static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
   18.91 +{
   18.92 +	int err = alloc_ldt(new, old->size, 0);
   18.93 +	if (err < 0)
   18.94 +		return err;
   18.95 +	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
   18.96 +	make_pages_readonly(new->ldt, (new->size * LDT_ENTRY_SIZE) /
   18.97 +			    PAGE_SIZE);
   18.98 +	flush_page_update_queue();
   18.99 +	return 0;
  18.100 +}
  18.101 +
  18.102 +/*
  18.103 + * we do not have to muck with descriptors here, that is
  18.104 + * done in switch_mm() as needed.
  18.105 + */
  18.106 +int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
  18.107 +{
  18.108 +	struct mm_struct * old_mm;
  18.109 +	int retval = 0;
  18.110 +
  18.111 +	init_MUTEX(&mm->context.sem);
  18.112 +	mm->context.size = 0;
  18.113 +	old_mm = current->mm;
  18.114 +	if (old_mm && old_mm->context.size > 0) {
  18.115 +		down(&old_mm->context.sem);
  18.116 +		retval = copy_ldt(&mm->context, &old_mm->context);
  18.117 +		up(&old_mm->context.sem);
  18.118 +	}
  18.119 +	return retval;
  18.120 +}
  18.121 +
  18.122 +/*
  18.123 + * No need to lock the MM as we are the last user
  18.124 + */
  18.125 +void destroy_context(struct mm_struct *mm)
  18.126 +{
  18.127 +	if (mm->context.size) {
  18.128 +		if (mm == current->active_mm)
  18.129 +			clear_LDT();
  18.130 +		make_pages_writable(mm->context.ldt, 
  18.131 +                                    (mm->context.size * LDT_ENTRY_SIZE) /
  18.132 +                                    PAGE_SIZE);
  18.133 +		flush_page_update_queue();
  18.134 +		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
  18.135 +			vfree(mm->context.ldt);
  18.136 +		else
  18.137 +			kfree(mm->context.ldt);
  18.138 +		mm->context.size = 0;
  18.139 +	}
  18.140 +}
  18.141 +
  18.142 +static int read_ldt(void __user * ptr, unsigned long bytecount)
  18.143 +{
  18.144 +	int err;
  18.145 +	unsigned long size;
  18.146 +	struct mm_struct * mm = current->mm;
  18.147 +
  18.148 +	if (!mm->context.size)
  18.149 +		return 0;
  18.150 +	if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
  18.151 +		bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
  18.152 +
  18.153 +	down(&mm->context.sem);
  18.154 +	size = mm->context.size*LDT_ENTRY_SIZE;
  18.155 +	if (size > bytecount)
  18.156 +		size = bytecount;
  18.157 +
  18.158 +	err = 0;
  18.159 +	if (copy_to_user(ptr, mm->context.ldt, size))
  18.160 +		err = -EFAULT;
  18.161 +	up(&mm->context.sem);
  18.162 +	if (err < 0)
  18.163 +		goto error_return;
  18.164 +	if (size != bytecount) {
  18.165 +		/* zero-fill the rest */
  18.166 +		if (clear_user(ptr+size, bytecount-size) != 0) {
  18.167 +			err = -EFAULT;
  18.168 +			goto error_return;
  18.169 +		}
  18.170 +	}
  18.171 +	return bytecount;
  18.172 +error_return:
  18.173 +	return err;
  18.174 +}
  18.175 +
  18.176 +static int read_default_ldt(void __user * ptr, unsigned long bytecount)
  18.177 +{
  18.178 +	int err;
  18.179 +	unsigned long size;
  18.180 +	void *address;
  18.181 +
  18.182 +	err = 0;
  18.183 +	address = &default_ldt[0];
  18.184 +	size = 5*sizeof(struct desc_struct);
  18.185 +	if (size > bytecount)
  18.186 +		size = bytecount;
  18.187 +
  18.188 +	err = size;
  18.189 +	if (copy_to_user(ptr, address, size))
  18.190 +		err = -EFAULT;
  18.191 +
  18.192 +	return err;
  18.193 +}
  18.194 +
  18.195 +static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
  18.196 +{
  18.197 +	struct mm_struct * mm = current->mm;
  18.198 +	__u32 entry_1, entry_2, *lp;
  18.199 +	unsigned long phys_lp;
  18.200 +	int error;
  18.201 +	struct user_desc ldt_info;
  18.202 +
  18.203 +	error = -EINVAL;
  18.204 +	if (bytecount != sizeof(ldt_info))
  18.205 +		goto out;
  18.206 +	error = -EFAULT; 	
  18.207 +	if (copy_from_user(&ldt_info, ptr, sizeof(ldt_info)))
  18.208 +		goto out;
  18.209 +
  18.210 +	error = -EINVAL;
  18.211 +	if (ldt_info.entry_number >= LDT_ENTRIES)
  18.212 +		goto out;
  18.213 +	if (ldt_info.contents == 3) {
  18.214 +		if (oldmode)
  18.215 +			goto out;
  18.216 +		if (ldt_info.seg_not_present == 0)
  18.217 +			goto out;
  18.218 +	}
  18.219 +
  18.220 +	down(&mm->context.sem);
  18.221 +	if (ldt_info.entry_number >= mm->context.size) {
  18.222 +		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
  18.223 +		if (error < 0)
  18.224 +			goto out_unlock;
  18.225 +	}
  18.226 +
  18.227 +	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
  18.228 +	phys_lp = arbitrary_virt_to_phys(lp);
  18.229 +
  18.230 +   	/* Allow LDTs to be cleared by the user. */
  18.231 +   	if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
  18.232 +		if (oldmode || LDT_empty(&ldt_info)) {
  18.233 +			entry_1 = 0;
  18.234 +			entry_2 = 0;
  18.235 +			goto install;
  18.236 +		}
  18.237 +	}
  18.238 +
  18.239 +	entry_1 = LDT_entry_a(&ldt_info);
  18.240 +	entry_2 = LDT_entry_b(&ldt_info);
  18.241 +	if (oldmode)
  18.242 +		entry_2 &= ~(1 << 20);
  18.243 +
  18.244 +	/* Install the new entry ...  */
  18.245 +install:
  18.246 +	error = HYPERVISOR_update_descriptor(phys_lp, entry_1, entry_2);
  18.247 +
  18.248 +out_unlock:
  18.249 +	up(&mm->context.sem);
  18.250 +out:
  18.251 +	return error;
  18.252 +}
  18.253 +
  18.254 +asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount)
  18.255 +{
  18.256 +	int ret = -ENOSYS;
  18.257 +
  18.258 +	switch (func) {
  18.259 +	case 0:
  18.260 +		ret = read_ldt(ptr, bytecount);
  18.261 +		break;
  18.262 +	case 1:
  18.263 +		ret = write_ldt(ptr, bytecount, 1);
  18.264 +		break;
  18.265 +	case 2:
  18.266 +		ret = read_default_ldt(ptr, bytecount);
  18.267 +		break;
  18.268 +	case 0x11:
  18.269 +		ret = write_ldt(ptr, bytecount, 0);
  18.270 +		break;
  18.271 +	}
  18.272 +	return ret;
  18.273 +}
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/pci-dma.c	Fri Nov 19 00:40:52 2004 +0000
    19.3 @@ -0,0 +1,226 @@
    19.4 +/*
    19.5 + * Dynamic DMA mapping support.
    19.6 + *
    19.7 + * On i386 there is no hardware dynamic DMA address translation,
    19.8 + * so consistent alloc/free are merely page allocation/freeing.
    19.9 + * The rest of the dynamic DMA mapping interface is implemented
   19.10 + * in asm/pci.h.
   19.11 + */
   19.12 +
   19.13 +#include <linux/types.h>
   19.14 +#include <linux/mm.h>
   19.15 +#include <linux/string.h>
   19.16 +#include <linux/pci.h>
   19.17 +#include <linux/version.h>
   19.18 +#include <asm/io.h>
   19.19 +
   19.20 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
   19.21 +#define pte_offset_kernel pte_offset
   19.22 +#endif
   19.23 +
   19.24 +struct dma_coherent_mem {
   19.25 +	void		*virt_base;
   19.26 +	u32		device_base;
   19.27 +	int		size;
   19.28 +	int		flags;
   19.29 +	unsigned long	*bitmap;
   19.30 +};
   19.31 +
   19.32 +static void
   19.33 +xen_contig_memory(unsigned long vstart, unsigned int order)
   19.34 +{
   19.35 +	/*
   19.36 +	 * Ensure multi-page extents are contiguous in machine memory.
   19.37 +	 * This code could be cleaned up some, and the number of
   19.38 +	 * hypercalls reduced.
   19.39 +	 */
   19.40 +	pgd_t         *pgd; 
   19.41 +	pmd_t         *pmd;
   19.42 +	pte_t         *pte;
   19.43 +	unsigned long  pfn, i;
   19.44 +
   19.45 +	scrub_pages(vstart, 1 << order);
   19.46 +	/* 1. Zap current PTEs, giving away the underlying pages. */
   19.47 +	for (i = 0; i < (1<<order); i++) {
   19.48 +		pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
   19.49 +		pmd = pmd_offset(pgd, (vstart + (i*PAGE_SIZE)));
   19.50 +		pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
   19.51 +		pfn = pte->pte_low >> PAGE_SHIFT;
   19.52 +		queue_l1_entry_update(pte, 0);
   19.53 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   19.54 +			INVALID_P2M_ENTRY;
   19.55 +		flush_page_update_queue();
   19.56 +		if (HYPERVISOR_dom_mem_op(MEMOP_decrease_reservation, 
   19.57 +					  &pfn, 1, 0) != 1) BUG();
   19.58 +	}
   19.59 +	/* 2. Get a new contiguous memory extent. */
   19.60 +	if (HYPERVISOR_dom_mem_op(MEMOP_increase_reservation,
   19.61 +				  &pfn, 1, order) != 1) BUG();
   19.62 +	/* 3. Map the new extent in place of old pages. */
   19.63 +	for (i = 0; i < (1<<order); i++) {
   19.64 +		pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
   19.65 +		pmd = pmd_offset(pgd, (vstart + (i*PAGE_SIZE)));
   19.66 +		pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
   19.67 +		queue_l1_entry_update(
   19.68 +			pte, ((pfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL);
   19.69 +		queue_machphys_update(
   19.70 +			pfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
   19.71 +		phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
   19.72 +			pfn+i;
   19.73 +	}
   19.74 +	/* Flush updates through and flush the TLB. */
   19.75 +	xen_tlb_flush();
   19.76 +}
   19.77 +
   19.78 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
   19.79 +void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
   19.80 +			   dma_addr_t *dma_handle)
   19.81 +#else
   19.82 +void *dma_alloc_coherent(struct device *dev, size_t size,
   19.83 +			   dma_addr_t *dma_handle, int gfp)
   19.84 +#endif
   19.85 +{
   19.86 +	void *ret;
   19.87 +	unsigned int order = get_order(size);
   19.88 +	unsigned long vstart;
   19.89 +
   19.90 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
   19.91 +	int gfp = GFP_ATOMIC;
   19.92 +
   19.93 +	if (hwdev == NULL || ((u32)hwdev->dma_mask < 0xffffffff))
   19.94 +		gfp |= GFP_DMA;
   19.95 +#else
   19.96 +	struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
   19.97 +
   19.98 +	/* ignore region specifiers */
   19.99 +	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
  19.100 +
  19.101 +	if (mem) {
  19.102 +		int page = bitmap_find_free_region(mem->bitmap, mem->size,
  19.103 +						     order);
  19.104 +		if (page >= 0) {
  19.105 +			*dma_handle = mem->device_base + (page << PAGE_SHIFT);
  19.106 +			ret = mem->virt_base + (page << PAGE_SHIFT);
  19.107 +			memset(ret, 0, size);
  19.108 +			return ret;
  19.109 +		}
  19.110 +		if (mem->flags & DMA_MEMORY_EXCLUSIVE)
  19.111 +			return NULL;
  19.112 +	}
  19.113 +
  19.114 +	if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
  19.115 +		gfp |= GFP_DMA;
  19.116 +#endif
  19.117 +
  19.118 +	vstart = __get_free_pages(gfp, order);
  19.119 +	ret = (void *)vstart;
  19.120 +	if (ret == NULL)
  19.121 +		return ret;
  19.122 +
  19.123 +	xen_contig_memory(vstart, order);
  19.124 +
  19.125 +	memset(ret, 0, size);
  19.126 +	*dma_handle = virt_to_bus(ret);
  19.127 +
  19.128 +	return ret;
  19.129 +}
  19.130 +
  19.131 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
  19.132 +void pci_free_consistent(struct pci_dev *hwdev, size_t size,
  19.133 +			 void *vaddr, dma_addr_t dma_handle)
  19.134 +{
  19.135 +	free_pages((unsigned long)vaddr, get_order(size));
  19.136 +}
  19.137 +#else
  19.138 +
  19.139 +void dma_free_coherent(struct device *dev, size_t size,
  19.140 +			 void *vaddr, dma_addr_t dma_handle)
  19.141 +{
  19.142 +	struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
  19.143 +	int order = get_order(size);
  19.144 +	
  19.145 +	if (mem && vaddr >= mem->virt_base && vaddr < (mem->virt_base + (mem->size << PAGE_SHIFT))) {
  19.146 +		int page = (vaddr - mem->virt_base) >> PAGE_SHIFT;
  19.147 +
  19.148 +		bitmap_release_region(mem->bitmap, page, order);
  19.149 +	} else
  19.150 +		free_pages((unsigned long)vaddr, order);
  19.151 +}
  19.152 +
  19.153 +int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
  19.154 +				dma_addr_t device_addr, size_t size, int flags)
  19.155 +{
  19.156 +	void __iomem *mem_base;
  19.157 +	int pages = size >> PAGE_SHIFT;
  19.158 +	int bitmap_size = (pages + 31)/32;
  19.159 +
  19.160 +	if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
  19.161 +		goto out;
  19.162 +	if (!size)
  19.163 +		goto out;
  19.164 +	if (dev->dma_mem)
  19.165 +		goto out;
  19.166 +
  19.167 +	/* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
  19.168 +
  19.169 +	mem_base = ioremap(bus_addr, size);
  19.170 +	if (!mem_base)
  19.171 +		goto out;
  19.172 +
  19.173 +	dev->dma_mem = kmalloc(GFP_KERNEL, sizeof(struct dma_coherent_mem));
  19.174 +	if (!dev->dma_mem)
  19.175 +		goto out;
  19.176 +	memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem));
  19.177 +	dev->dma_mem->bitmap = kmalloc(GFP_KERNEL, bitmap_size);
  19.178 +	if (!dev->dma_mem->bitmap)
  19.179 +		goto free1_out;
  19.180 +	memset(dev->dma_mem->bitmap, 0, bitmap_size);
  19.181 +
  19.182 +	dev->dma_mem->virt_base = mem_base;
  19.183 +	dev->dma_mem->device_base = device_addr;
  19.184 +	dev->dma_mem->size = pages;
  19.185 +	dev->dma_mem->flags = flags;
  19.186 +
  19.187 +	if (flags & DMA_MEMORY_MAP)
  19.188 +		return DMA_MEMORY_MAP;
  19.189 +
  19.190 +	return DMA_MEMORY_IO;
  19.191 +
  19.192 + free1_out:
  19.193 +	kfree(dev->dma_mem->bitmap);
  19.194 + out:
  19.195 +	return 0;
  19.196 +}
  19.197 +EXPORT_SYMBOL(dma_declare_coherent_memory);
  19.198 +
  19.199 +void dma_release_declared_memory(struct device *dev)
  19.200 +{
  19.201 +	struct dma_coherent_mem *mem = dev->dma_mem;
  19.202 +	
  19.203 +	if(!mem)
  19.204 +		return;
  19.205 +	dev->dma_mem = NULL;
  19.206 +	kfree(mem->bitmap);
  19.207 +	kfree(mem);
  19.208 +}
  19.209 +EXPORT_SYMBOL(dma_release_declared_memory);
  19.210 +
  19.211 +void *dma_mark_declared_memory_occupied(struct device *dev,
  19.212 +					dma_addr_t device_addr, size_t size)
  19.213 +{
  19.214 +	struct dma_coherent_mem *mem = dev->dma_mem;
  19.215 +	int pages = (size + (device_addr & ~PAGE_MASK) + PAGE_SIZE - 1) >> PAGE_SHIFT;
  19.216 +	int pos, err;
  19.217 +
  19.218 +	if (!mem)
  19.219 +		return ERR_PTR(-EINVAL);
  19.220 +
  19.221 +	pos = (device_addr - mem->device_base) >> PAGE_SHIFT;
  19.222 +	err = bitmap_allocate_region(mem->bitmap, pos, get_order(pages));
  19.223 +	if (err != 0)
  19.224 +		return ERR_PTR(err);
  19.225 +	return mem->virt_base + (pos << PAGE_SHIFT);
  19.226 +}
  19.227 +EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
  19.228 +
  19.229 +#endif
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/process.c	Fri Nov 19 00:40:52 2004 +0000
    20.3 @@ -0,0 +1,776 @@
    20.4 +/*
    20.5 + *  linux/arch/i386/kernel/process.c
    20.6 + *
    20.7 + *  Copyright (C) 1995  Linus Torvalds
    20.8 + *
    20.9 + *  Pentium III FXSR, SSE support
   20.10 + *	Gareth Hughes <gareth@valinux.com>, May 2000
   20.11 + */
   20.12 +
   20.13 +/*
   20.14 + * This file handles the architecture-dependent parts of process handling..
   20.15 + */
   20.16 +
   20.17 +#include <stdarg.h>
   20.18 +
   20.19 +#include <linux/errno.h>
   20.20 +#include <linux/sched.h>
   20.21 +#include <linux/fs.h>
   20.22 +#include <linux/kernel.h>
   20.23 +#include <linux/mm.h>
   20.24 +#include <linux/elfcore.h>
   20.25 +#include <linux/smp.h>
   20.26 +#include <linux/smp_lock.h>
   20.27 +#include <linux/stddef.h>
   20.28 +#include <linux/slab.h>
   20.29 +#include <linux/vmalloc.h>
   20.30 +#include <linux/user.h>
   20.31 +#include <linux/a.out.h>
   20.32 +#include <linux/interrupt.h>
   20.33 +#include <linux/config.h>
   20.34 +#include <linux/utsname.h>
   20.35 +#include <linux/delay.h>
   20.36 +#include <linux/reboot.h>
   20.37 +#include <linux/init.h>
   20.38 +#include <linux/mc146818rtc.h>
   20.39 +#include <linux/module.h>
   20.40 +#include <linux/kallsyms.h>
   20.41 +#include <linux/ptrace.h>
   20.42 +
   20.43 +#include <asm/uaccess.h>
   20.44 +#include <asm/pgtable.h>
   20.45 +#include <asm/system.h>
   20.46 +#include <asm/io.h>
   20.47 +#include <asm/ldt.h>
   20.48 +#include <asm/processor.h>
   20.49 +#include <asm/i387.h>
   20.50 +#include <asm/irq.h>
   20.51 +#include <asm/desc.h>
   20.52 +#include <asm-xen/multicall.h>
   20.53 +#include <asm-xen/xen-public/dom0_ops.h>
   20.54 +#ifdef CONFIG_MATH_EMULATION
   20.55 +#include <asm/math_emu.h>
   20.56 +#endif
   20.57 +
   20.58 +#include <linux/irq.h>
   20.59 +#include <linux/err.h>
   20.60 +
   20.61 +asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
   20.62 +
   20.63 +int hlt_counter;
   20.64 +
   20.65 +unsigned long boot_option_idle_override = 0;
   20.66 +EXPORT_SYMBOL(boot_option_idle_override);
   20.67 +
   20.68 +/*
   20.69 + * Return saved PC of a blocked thread.
   20.70 + */
   20.71 +unsigned long thread_saved_pc(struct task_struct *tsk)
   20.72 +{
   20.73 +	return ((unsigned long *)tsk->thread.esp)[3];
   20.74 +}
   20.75 +
   20.76 +/*
   20.77 + * Powermanagement idle function, if any..
   20.78 + */
   20.79 +void (*pm_idle)(void);
   20.80 +
   20.81 +void disable_hlt(void)
   20.82 +{
   20.83 +	hlt_counter++;
   20.84 +}
   20.85 +
   20.86 +EXPORT_SYMBOL(disable_hlt);
   20.87 +
   20.88 +void enable_hlt(void)
   20.89 +{
   20.90 +	hlt_counter--;
   20.91 +}
   20.92 +
   20.93 +EXPORT_SYMBOL(enable_hlt);
   20.94 +
   20.95 +/* XXX XEN doesn't use default_idle(), poll_idle(). Use xen_idle() instead. */
   20.96 +extern int set_timeout_timer(void);
   20.97 +void xen_idle(void)
   20.98 +{
   20.99 +	int cpu = smp_processor_id();
  20.100 +
  20.101 +	local_irq_disable();
  20.102 +
  20.103 +	if (rcu_pending(cpu))
  20.104 +		rcu_check_callbacks(cpu, 0);
  20.105 +
  20.106 +	if (need_resched()) {
  20.107 +		local_irq_enable();
  20.108 +	} else if (set_timeout_timer() == 0) {
  20.109 +		/* NB. Blocking reenable events in a race-free manner. */
  20.110 +		HYPERVISOR_block();
  20.111 +	} else {
  20.112 +		local_irq_enable();
  20.113 +		HYPERVISOR_yield();
  20.114 +	}
  20.115 +}
  20.116 +
  20.117 +/*
  20.118 + * The idle thread. There's no useful work to be
  20.119 + * done, so just try to conserve power and have a
  20.120 + * low exit latency (ie sit in a loop waiting for
  20.121 + * somebody to say that they'd like to reschedule)
  20.122 + */
  20.123 +void cpu_idle (void)
  20.124 +{
  20.125 +	/* endless idle loop with no priority at all */
  20.126 +	while (1) {
  20.127 +		while (!need_resched()) {
  20.128 +			/*
  20.129 +			 * Mark this as an RCU critical section so that
  20.130 +			 * synchronize_kernel() in the unload path waits
  20.131 +			 * for our completion.
  20.132 +			 */
  20.133 +			rcu_read_lock();
  20.134 +			irq_stat[smp_processor_id()].idle_timestamp = jiffies;
  20.135 +			xen_idle();
  20.136 +			rcu_read_unlock();
  20.137 +		}
  20.138 +		schedule();
  20.139 +	}
  20.140 +}
  20.141 +
  20.142 +/* XXX XEN doesn't use mwait_idle(), select_idle_routine(), idle_setup(). */
  20.143 +/* Always use xen_idle() instead. */
  20.144 +void __init select_idle_routine(const struct cpuinfo_x86 *c) {}
  20.145 +
  20.146 +void show_regs(struct pt_regs * regs)
  20.147 +{
  20.148 +	printk("\n");
  20.149 +	printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
  20.150 +	printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
  20.151 +	print_symbol("EIP is at %s\n", regs->eip);
  20.152 +
  20.153 +	if (regs->xcs & 2)
  20.154 +		printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
  20.155 +	printk(" EFLAGS: %08lx    %s  (%s)\n",
  20.156 +	       regs->eflags, print_tainted(),UTS_RELEASE);
  20.157 +	printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
  20.158 +		regs->eax,regs->ebx,regs->ecx,regs->edx);
  20.159 +	printk("ESI: %08lx EDI: %08lx EBP: %08lx",
  20.160 +		regs->esi, regs->edi, regs->ebp);
  20.161 +	printk(" DS: %04x ES: %04x\n",
  20.162 +		0xffff & regs->xds,0xffff & regs->xes);
  20.163 +
  20.164 +	show_trace(NULL, &regs->esp);
  20.165 +}
  20.166 +
  20.167 +/*
  20.168 + * This gets run with %ebx containing the
  20.169 + * function to call, and %edx containing
  20.170 + * the "args".
  20.171 + */
  20.172 +extern void kernel_thread_helper(void);
  20.173 +__asm__(".section .text\n"
  20.174 +	".align 4\n"
  20.175 +	"kernel_thread_helper:\n\t"
  20.176 +	"movl %edx,%eax\n\t"
  20.177 +	"pushl %edx\n\t"
  20.178 +	"call *%ebx\n\t"
  20.179 +	"pushl %eax\n\t"
  20.180 +	"call do_exit\n"
  20.181 +	".previous");
  20.182 +
  20.183 +/*
  20.184 + * Create a kernel thread
  20.185 + */
  20.186 +int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
  20.187 +{
  20.188 +	struct pt_regs regs;
  20.189 +
  20.190 +	memset(&regs, 0, sizeof(regs));
  20.191 +
  20.192 +	regs.ebx = (unsigned long) fn;
  20.193 +	regs.edx = (unsigned long) arg;
  20.194 +
  20.195 +	regs.xds = __USER_DS;
  20.196 +	regs.xes = __USER_DS;
  20.197 +	regs.orig_eax = -1;
  20.198 +	regs.eip = (unsigned long) kernel_thread_helper;
  20.199 +	regs.xcs = __KERNEL_CS;
  20.200 +	regs.eflags = X86_EFLAGS_IF | X86_EFLAGS_SF | X86_EFLAGS_PF | 0x2;
  20.201 +
  20.202 +	/* Ok, create the new process.. */
  20.203 +	return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
  20.204 +}
  20.205 +
  20.206 +/*
  20.207 + * Free current thread data structures etc..
  20.208 + */
  20.209 +void exit_thread(void)
  20.210 +{
  20.211 +	struct task_struct *tsk = current;
  20.212 +	struct thread_struct *t = &tsk->thread;
  20.213 +
  20.214 +	/* The process may have allocated an io port bitmap... nuke it. */
  20.215 +	if (unlikely(NULL != t->io_bitmap_ptr)) {
  20.216 +		int cpu = get_cpu();
  20.217 +		struct tss_struct *tss = &per_cpu(init_tss, cpu);
  20.218 +
  20.219 +		kfree(t->io_bitmap_ptr);
  20.220 +		t->io_bitmap_ptr = NULL;
  20.221 +		/*
  20.222 +		 * Careful, clear this in the TSS too:
  20.223 +		 */
  20.224 +		memset(tss->io_bitmap, 0xff, tss->io_bitmap_max);
  20.225 +		t->io_bitmap_max = 0;
  20.226 +		tss->io_bitmap_owner = NULL;
  20.227 +		tss->io_bitmap_max = 0;
  20.228 +		tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
  20.229 +		put_cpu();
  20.230 +	}
  20.231 +}
  20.232 +
  20.233 +void flush_thread(void)
  20.234 +{
  20.235 +	struct task_struct *tsk = current;
  20.236 +
  20.237 +	memset(tsk->thread.debugreg, 0, sizeof(unsigned long)*8);
  20.238 +	memset(tsk->thread.tls_array, 0, sizeof(tsk->thread.tls_array));	
  20.239 +	/*
  20.240 +	 * Forget coprocessor state..
  20.241 +	 */
  20.242 +	clear_fpu(tsk);
  20.243 +	tsk->used_math = 0;
  20.244 +}
  20.245 +
  20.246 +void release_thread(struct task_struct *dead_task)
  20.247 +{
  20.248 +	if (dead_task->mm) {
  20.249 +		// temporary debugging check
  20.250 +		if (dead_task->mm->context.size) {
  20.251 +			printk("WARNING: dead process %8s still has LDT? <%p/%d>\n",
  20.252 +					dead_task->comm,
  20.253 +					dead_task->mm->context.ldt,
  20.254 +					dead_task->mm->context.size);
  20.255 +			BUG();
  20.256 +		}
  20.257 +	}
  20.258 +
  20.259 +	release_vm86_irqs(dead_task);
  20.260 +}
  20.261 +
  20.262 +/*
  20.263 + * This gets called before we allocate a new thread and copy
  20.264 + * the current task into it.
  20.265 + */
  20.266 +void prepare_to_copy(struct task_struct *tsk)
  20.267 +{
  20.268 +	unlazy_fpu(tsk);
  20.269 +}
  20.270 +
  20.271 +int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
  20.272 +	unsigned long unused,
  20.273 +	struct task_struct * p, struct pt_regs * regs)
  20.274 +{
  20.275 +	struct pt_regs * childregs;
  20.276 +	struct task_struct *tsk;
  20.277 +	int err;
  20.278 +	unsigned long eflags;
  20.279 +
  20.280 +	childregs = ((struct pt_regs *) (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
  20.281 +	*childregs = *regs;
  20.282 +	childregs->eax = 0;
  20.283 +	childregs->esp = esp;
  20.284 +
  20.285 +	p->thread.esp = (unsigned long) childregs;
  20.286 +	p->thread.esp0 = (unsigned long) (childregs+1);
  20.287 +
  20.288 +	p->thread.eip = (unsigned long) ret_from_fork;
  20.289 +
  20.290 +	savesegment(fs,p->thread.fs);
  20.291 +	savesegment(gs,p->thread.gs);
  20.292 +
  20.293 +	tsk = current;
  20.294 +	if (unlikely(NULL != tsk->thread.io_bitmap_ptr)) {
  20.295 +		p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
  20.296 +		if (!p->thread.io_bitmap_ptr) {
  20.297 +			p->thread.io_bitmap_max = 0;
  20.298 +			return -ENOMEM;
  20.299 +		}
  20.300 +		memcpy(p->thread.io_bitmap_ptr, tsk->thread.io_bitmap_ptr,
  20.301 +			IO_BITMAP_BYTES);
  20.302 +	}
  20.303 +
  20.304 +	/*
  20.305 +	 * Set a new TLS for the child thread?
  20.306 +	 */
  20.307 +	if (clone_flags & CLONE_SETTLS) {
  20.308 +		struct desc_struct *desc;
  20.309 +		struct user_desc info;
  20.310 +		int idx;
  20.311 +
  20.312 +		err = -EFAULT;
  20.313 +		if (copy_from_user(&info, (void __user *)childregs->esi, sizeof(info)))
  20.314 +			goto out;
  20.315 +		err = -EINVAL;
  20.316 +		if (LDT_empty(&info))
  20.317 +			goto out;
  20.318 +
  20.319 +		idx = info.entry_number;
  20.320 +		if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
  20.321 +			goto out;
  20.322 +
  20.323 +		desc = p->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
  20.324 +		desc->a = LDT_entry_a(&info);
  20.325 +		desc->b = LDT_entry_b(&info);
  20.326 +	}
  20.327 +
  20.328 +
  20.329 +	__asm__ __volatile__ ( "pushfl; popl %0" : "=r" (eflags) : );
  20.330 +	p->thread.io_pl = (eflags >> 12) & 3;
  20.331 +
  20.332 +	err = 0;
  20.333 + out:
  20.334 +	if (err && p->thread.io_bitmap_ptr) {
  20.335 +		kfree(p->thread.io_bitmap_ptr);
  20.336 +		p->thread.io_bitmap_max = 0;
  20.337 +	}
  20.338 +	return err;
  20.339 +}
  20.340 +
  20.341 +/*
  20.342 + * fill in the user structure for a core dump..
  20.343 + */
  20.344 +void dump_thread(struct pt_regs * regs, struct user * dump)
  20.345 +{
  20.346 +	int i;
  20.347 +
  20.348 +/* changed the size calculations - should hopefully work better. lbt */
  20.349 +	dump->magic = CMAGIC;
  20.350 +	dump->start_code = 0;
  20.351 +	dump->start_stack = regs->esp & ~(PAGE_SIZE - 1);
  20.352 +	dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
  20.353 +	dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
  20.354 +	dump->u_dsize -= dump->u_tsize;
  20.355 +	dump->u_ssize = 0;
  20.356 +	for (i = 0; i < 8; i++)
  20.357 +		dump->u_debugreg[i] = current->thread.debugreg[i];  
  20.358 +
  20.359 +	if (dump->start_stack < TASK_SIZE)
  20.360 +		dump->u_ssize = ((unsigned long) (TASK_SIZE - dump->start_stack)) >> PAGE_SHIFT;
  20.361 +
  20.362 +	dump->regs.ebx = regs->ebx;
  20.363 +	dump->regs.ecx = regs->ecx;
  20.364 +	dump->regs.edx = regs->edx;
  20.365 +	dump->regs.esi = regs->esi;
  20.366 +	dump->regs.edi = regs->edi;
  20.367 +	dump->regs.ebp = regs->ebp;
  20.368 +	dump->regs.eax = regs->eax;
  20.369 +	dump->regs.ds = regs->xds;
  20.370 +	dump->regs.es = regs->xes;
  20.371 +	savesegment(fs,dump->regs.fs);
  20.372 +	savesegment(gs,dump->regs.gs);
  20.373 +	dump->regs.orig_eax = regs->orig_eax;
  20.374 +	dump->regs.eip = regs->eip;
  20.375 +	dump->regs.cs = regs->xcs;
  20.376 +	dump->regs.eflags = regs->eflags;
  20.377 +	dump->regs.esp = regs->esp;
  20.378 +	dump->regs.ss = regs->xss;
  20.379 +
  20.380 +	dump->u_fpvalid = dump_fpu (regs, &dump->i387);
  20.381 +}
  20.382 +
  20.383 +/* 
  20.384 + * Capture the user space registers if the task is not running (in user space)
  20.385 + */
  20.386 +int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
  20.387 +{
  20.388 +	struct pt_regs ptregs;
  20.389 +	
  20.390 +	ptregs = *(struct pt_regs *)
  20.391 +		((unsigned long)tsk->thread_info+THREAD_SIZE - sizeof(ptregs));
  20.392 +	ptregs.xcs &= 0xffff;
  20.393 +	ptregs.xds &= 0xffff;
  20.394 +	ptregs.xes &= 0xffff;
  20.395 +	ptregs.xss &= 0xffff;
  20.396 +
  20.397 +	elf_core_copy_regs(regs, &ptregs);
  20.398 +
  20.399 +	boot_option_idle_override = 1;
  20.400 +	return 1;
  20.401 +}
  20.402 +
  20.403 +static inline void
  20.404 +handle_io_bitmap(struct thread_struct *next, struct tss_struct *tss)
  20.405 +{
  20.406 +	if (!next->io_bitmap_ptr) {
  20.407 +		/*
  20.408 +		 * Disable the bitmap via an invalid offset. We still cache
  20.409 +		 * the previous bitmap owner and the IO bitmap contents:
  20.410 +		 */
  20.411 +		tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET;
  20.412 +		return;
  20.413 +	}
  20.414 +	if (likely(next == tss->io_bitmap_owner)) {
  20.415 +		/*
  20.416 +		 * Previous owner of the bitmap (hence the bitmap content)
  20.417 +		 * matches the next task, we dont have to do anything but
  20.418 +		 * to set a valid offset in the TSS:
  20.419 +		 */
  20.420 +		tss->io_bitmap_base = IO_BITMAP_OFFSET;
  20.421 +		return;
  20.422 +	}
  20.423 +	/*
  20.424 +	 * Lazy TSS's I/O bitmap copy. We set an invalid offset here
  20.425 +	 * and we let the task to get a GPF in case an I/O instruction
  20.426 +	 * is performed.  The handler of the GPF will verify that the
  20.427 +	 * faulting task has a valid I/O bitmap and, it true, does the
  20.428 +	 * real copy and restart the instruction.  This will save us
  20.429 +	 * redundant copies when the currently switched task does not
  20.430 +	 * perform any I/O during its timeslice.
  20.431 +	 */
  20.432 +	tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY;
  20.433 +}
  20.434 +/*
  20.435 + * This special macro can be used to load a debugging register
  20.436 + */
  20.437 +#define loaddebug(thread,register) \
  20.438 +		HYPERVISOR_set_debugreg((register),	\
  20.439 +			(thread->debugreg[register]))
  20.440 +
  20.441 +/*
  20.442 + *	switch_to(x,yn) should switch tasks from x to y.
  20.443 + *
  20.444 + * We fsave/fwait so that an exception goes off at the right time
  20.445 + * (as a call from the fsave or fwait in effect) rather than to
  20.446 + * the wrong process. Lazy FP saving no longer makes any sense
  20.447 + * with modern CPU's, and this simplifies a lot of things (SMP
  20.448 + * and UP become the same).
  20.449 + *
  20.450 + * NOTE! We used to use the x86 hardware context switching. The
  20.451 + * reason for not using it any more becomes apparent when you
  20.452 + * try to recover gracefully from saved state that is no longer
  20.453 + * valid (stale segment register values in particular). With the
  20.454 + * hardware task-switch, there is no way to fix up bad state in
  20.455 + * a reasonable manner.
  20.456 + *
  20.457 + * The fact that Intel documents the hardware task-switching to
  20.458 + * be slow is a fairly red herring - this code is not noticeably
  20.459 + * faster. However, there _is_ some room for improvement here,
  20.460 + * so the performance issues may eventually be a valid point.
  20.461 + * More important, however, is the fact that this allows us much
  20.462 + * more flexibility.
  20.463 + *
  20.464 + * The return value (in %eax) will be the "prev" task after
  20.465 + * the task-switch, and shows up in ret_from_fork in entry.S,
  20.466 + * for example.
  20.467 + */
  20.468 +struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
  20.469 +{
  20.470 +	struct thread_struct *prev = &prev_p->thread,
  20.471 +				 *next = &next_p->thread;
  20.472 +	int cpu = smp_processor_id();
  20.473 +	struct tss_struct *tss = &per_cpu(init_tss, cpu);
  20.474 +	dom0_op_t op;
  20.475 +
  20.476 +        /* NB. No need to disable interrupts as already done in sched.c */
  20.477 +        /* __cli(); */
  20.478 +
  20.479 +	/*
  20.480 +	 * Save away %fs and %gs. No need to save %es and %ds, as
  20.481 +	 * those are always kernel segments while inside the kernel.
  20.482 +	 */
  20.483 +	asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs));
  20.484 +	asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
  20.485 +
  20.486 +	/*
  20.487 +	 * We clobber FS and GS here so that we avoid a GPF when
  20.488 +	 * restoring previous task's FS/GS values in Xen when the LDT
  20.489 +	 * is switched. If we don't do this then we can end up
  20.490 +	 * erroneously re-flushing the page-update queue when we
  20.491 +	 * 'execute_multicall_list'.
  20.492 +	 */
  20.493 +	__asm__ __volatile__ ( 
  20.494 +		"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs" : : :
  20.495 +		"eax" );
  20.496 +
  20.497 +	MULTICALL_flush_page_update_queue();
  20.498 +
  20.499 +	/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
  20.500 +
  20.501 +	/*
  20.502 +	 * This is basically '__unlazy_fpu', except that we queue a
  20.503 +	 * multicall to indicate FPU task switch, rather than
  20.504 +	 * synchronously trapping to Xen.
  20.505 +	 */
  20.506 +	if (prev_p->thread_info->status & TS_USEDFPU) {
  20.507 +		save_init_fpu(prev_p);
  20.508 +		queue_multicall0(__HYPERVISOR_fpu_taskswitch);
  20.509 +	}
  20.510 +
  20.511 +	/*
  20.512 +	 * Reload esp0, LDT and the page table pointer:
  20.513 +	 * This is load_esp0(tss, next) with a multicall.
  20.514 +	 */
  20.515 +	tss->esp0 = next->esp0;
  20.516 +	/* This can only happen when SEP is enabled, no need to test
  20.517 +	 * "SEP"arately */
  20.518 +	if (unlikely(tss->ss1 != next->sysenter_cs)) {
  20.519 +		tss->ss1 = next->sysenter_cs;
  20.520 +		wrmsr(MSR_IA32_SYSENTER_CS, next->sysenter_cs, 0);
  20.521 +	}
  20.522 +	queue_multicall2(__HYPERVISOR_stack_switch, tss->ss0, tss->esp0);
  20.523 +
  20.524 +	/*
  20.525 +	 * Load the per-thread Thread-Local Storage descriptor.
  20.526 +	 * This is load_TLS(next, cpu) with multicalls.
  20.527 +	 */
  20.528 +#define C(i) do {							    \
  20.529 +	if (unlikely(next->tls_array[i].a != prev->tls_array[i].a ||	    \
  20.530 +		     next->tls_array[i].b != prev->tls_array[i].b))	    \
  20.531 +		queue_multicall3(__HYPERVISOR_update_descriptor,	    \
  20.532 +				 virt_to_machine(&get_cpu_gdt_table(cpu)    \
  20.533 +						 [GDT_ENTRY_TLS_MIN + i]),  \
  20.534 +				 ((u32 *)&next->tls_array[i])[0],	    \
  20.535 +				 ((u32 *)&next->tls_array[i])[1]);	    \
  20.536 +} while (0)
  20.537 +	C(0); C(1); C(2);
  20.538 +#undef C
  20.539 +
  20.540 +	if (xen_start_info.flags & SIF_PRIVILEGED) {
  20.541 +		op.cmd           = DOM0_IOPL;
  20.542 +		op.u.iopl.domain = DOMID_SELF;
  20.543 +		op.u.iopl.iopl   = next->io_pl;
  20.544 +		queue_multicall1(__HYPERVISOR_dom0_op, (unsigned long)&op);
  20.545 +	}
  20.546 +
  20.547 +	/* EXECUTE ALL TASK SWITCH XEN SYSCALLS AT THIS POINT. */
  20.548 +	execute_multicall_list();
  20.549 +        /* __sti(); */
  20.550 +
  20.551 +	/*
  20.552 +	 * Restore %fs and %gs if needed.
  20.553 +	 */
  20.554 +	if (unlikely(prev->fs | prev->gs | next->fs | next->gs)) {
  20.555 +		loadsegment(fs, next->fs);
  20.556 +		loadsegment(gs, next->gs);
  20.557 +	}
  20.558 +
  20.559 +	/*
  20.560 +	 * Now maybe reload the debug registers
  20.561 +	 */
  20.562 +	if (unlikely(next->debugreg[7])) {
  20.563 +		loaddebug(next, 0);
  20.564 +		loaddebug(next, 1);
  20.565 +		loaddebug(next, 2);
  20.566 +		loaddebug(next, 3);
  20.567 +		/* no 4 and 5 */
  20.568 +		loaddebug(next, 6);
  20.569 +		loaddebug(next, 7);
  20.570 +	}
  20.571 +
  20.572 +	if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr))
  20.573 +		handle_io_bitmap(next, tss);
  20.574 +
  20.575 +	return prev_p;
  20.576 +}
  20.577 +
  20.578 +asmlinkage int sys_fork(struct pt_regs regs)
  20.579 +{
  20.580 +	return do_fork(SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
  20.581 +}
  20.582 +
  20.583 +asmlinkage int sys_clone(struct pt_regs regs)
  20.584 +{
  20.585 +	unsigned long clone_flags;
  20.586 +	unsigned long newsp;
  20.587 +	int __user *parent_tidptr, *child_tidptr;
  20.588 +
  20.589 +	clone_flags = regs.ebx;
  20.590 +	newsp = regs.ecx;
  20.591 +	parent_tidptr = (int __user *)regs.edx;
  20.592 +	child_tidptr = (int __user *)regs.edi;
  20.593 +	if (!newsp)
  20.594 +		newsp = regs.esp;
  20.595 +	return do_fork(clone_flags, newsp, &regs, 0, parent_tidptr, child_tidptr);
  20.596 +}
  20.597 +
  20.598 +/*
  20.599 + * This is trivial, and on the face of it looks like it
  20.600 + * could equally well be done in user mode.
  20.601 + *
  20.602 + * Not so, for quite unobvious reasons - register pressure.
  20.603 + * In user mode vfork() cannot have a stack frame, and if
  20.604 + * done by calling the "clone()" system call directly, you
  20.605 + * do not have enough call-clobbered registers to hold all
  20.606 + * the information you need.
  20.607 + */
  20.608 +asmlinkage int sys_vfork(struct pt_regs regs)
  20.609 +{
  20.610 +	return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs.esp, &regs, 0, NULL, NULL);
  20.611 +}
  20.612 +
  20.613 +/*
  20.614 + * sys_execve() executes a new program.
  20.615 + */
  20.616 +asmlinkage int sys_execve(struct pt_regs regs)
  20.617 +{
  20.618 +	int error;
  20.619 +	char * filename;
  20.620 +
  20.621 +	filename = getname((char __user *) regs.ebx);
  20.622 +	error = PTR_ERR(filename);
  20.623 +	if (IS_ERR(filename))
  20.624 +		goto out;
  20.625 +	error = do_execve(filename,
  20.626 +			(char __user * __user *) regs.ecx,
  20.627 +			(char __user * __user *) regs.edx,
  20.628 +			&regs);
  20.629 +	if (error == 0) {
  20.630 +		task_lock(current);
  20.631 +		current->ptrace &= ~PT_DTRACE;
  20.632 +		task_unlock(current);
  20.633 +		/* Make sure we don't return using sysenter.. */
  20.634 +		set_thread_flag(TIF_IRET);
  20.635 +	}
  20.636 +	putname(filename);
  20.637 +out:
  20.638 +	return error;
  20.639 +}
  20.640 +
  20.641 +#define top_esp                (THREAD_SIZE - sizeof(unsigned long))
  20.642 +#define top_ebp                (THREAD_SIZE - 2*sizeof(unsigned long))
  20.643 +
  20.644 +unsigned long get_wchan(struct task_struct *p)
  20.645 +{
  20.646 +	unsigned long ebp, esp, eip;
  20.647 +	unsigned long stack_page;
  20.648 +	int count = 0;
  20.649 +	if (!p || p == current || p->state == TASK_RUNNING)
  20.650 +		return 0;
  20.651 +	stack_page = (unsigned long)p->thread_info;
  20.652 +	esp = p->thread.esp;
  20.653 +	if (!stack_page || esp < stack_page || esp > top_esp+stack_page)
  20.654 +		return 0;
  20.655 +	/* include/asm-i386/system.h:switch_to() pushes ebp last. */
  20.656 +	ebp = *(unsigned long *) esp;
  20.657 +	do {
  20.658 +		if (ebp < stack_page || ebp > top_ebp+stack_page)
  20.659 +			return 0;
  20.660 +		eip = *(unsigned long *) (ebp+4);
  20.661 +		if (!in_sched_functions(eip))
  20.662 +			return eip;
  20.663 +		ebp = *(unsigned long *) ebp;
  20.664 +	} while (count++ < 16);
  20.665 +	return 0;
  20.666 +}
  20.667 +
  20.668 +/*
  20.669 + * sys_alloc_thread_area: get a yet unused TLS descriptor index.
  20.670 + */
  20.671 +static int get_free_idx(void)
  20.672 +{
  20.673 +	struct thread_struct *t = &current->thread;
  20.674 +	int idx;
  20.675 +
  20.676 +	for (idx = 0; idx < GDT_ENTRY_TLS_ENTRIES; idx++)
  20.677 +		if (desc_empty(t->tls_array + idx))
  20.678 +			return idx + GDT_ENTRY_TLS_MIN;
  20.679 +	return -ESRCH;
  20.680 +}
  20.681 +
  20.682 +/*
  20.683 + * Set a given TLS descriptor:
  20.684 + */
  20.685 +asmlinkage int sys_set_thread_area(struct user_desc __user *u_info)
  20.686 +{
  20.687 +	struct thread_struct *t = &current->thread;
  20.688 +	struct user_desc info;
  20.689 +	struct desc_struct *desc;
  20.690 +	int cpu, idx;
  20.691 +
  20.692 +	if (copy_from_user(&info, u_info, sizeof(info)))
  20.693 +		return -EFAULT;
  20.694 +	idx = info.entry_number;
  20.695 +
  20.696 +	/*
  20.697 +	 * index -1 means the kernel should try to find and
  20.698 +	 * allocate an empty descriptor:
  20.699 +	 */
  20.700 +	if (idx == -1) {
  20.701 +		idx = get_free_idx();
  20.702 +		if (idx < 0)
  20.703 +			return idx;
  20.704 +		if (put_user(idx, &u_info->entry_number))
  20.705 +			return -EFAULT;
  20.706 +	}
  20.707 +
  20.708 +	if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
  20.709 +		return -EINVAL;
  20.710 +
  20.711 +	desc = t->tls_array + idx - GDT_ENTRY_TLS_MIN;
  20.712 +
  20.713 +	/*
  20.714 +	 * We must not get preempted while modifying the TLS.
  20.715 +	 */
  20.716 +	cpu = get_cpu();
  20.717 +
  20.718 +	if (LDT_empty(&info)) {
  20.719 +		desc->a = 0;
  20.720 +		desc->b = 0;
  20.721 +	} else {
  20.722 +		desc->a = LDT_entry_a(&info);
  20.723 +		desc->b = LDT_entry_b(&info);
  20.724 +	}
  20.725 +	load_TLS(t, cpu);
  20.726 +
  20.727 +	put_cpu();
  20.728 +
  20.729 +	return 0;
  20.730 +}
  20.731 +
  20.732 +/*
  20.733 + * Get the current Thread-Local Storage area:
  20.734 + */
  20.735 +
  20.736 +#define GET_BASE(desc) ( \
  20.737 +	(((desc)->a >> 16) & 0x0000ffff) | \
  20.738 +	(((desc)->b << 16) & 0x00ff0000) | \
  20.739 +	( (desc)->b        & 0xff000000)   )
  20.740 +
  20.741 +#define GET_LIMIT(desc) ( \
  20.742 +	((desc)->a & 0x0ffff) | \
  20.743 +	 ((desc)->b & 0xf0000) )
  20.744 +	
  20.745 +#define GET_32BIT(desc)		(((desc)->b >> 22) & 1)
  20.746 +#define GET_CONTENTS(desc)	(((desc)->b >> 10) & 3)
  20.747 +#define GET_WRITABLE(desc)	(((desc)->b >>  9) & 1)
  20.748 +#define GET_LIMIT_PAGES(desc)	(((desc)->b >> 23) & 1)
  20.749 +#define GET_PRESENT(desc)	(((desc)->b >> 15) & 1)
  20.750 +#define GET_USEABLE(desc)	(((desc)->b >> 20) & 1)
  20.751 +
  20.752 +asmlinkage int sys_get_thread_area(struct user_desc __user *u_info)
  20.753 +{
  20.754 +	struct user_desc info;
  20.755 +	struct desc_struct *desc;
  20.756 +	int idx;
  20.757 +
  20.758 +	if (get_user(idx, &u_info->entry_number))
  20.759 +		return -EFAULT;
  20.760 +	if (idx < GDT_ENTRY_TLS_MIN || idx > GDT_ENTRY_TLS_MAX)
  20.761 +		return -EINVAL;
  20.762 +
  20.763 +	desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN;
  20.764 +
  20.765 +	info.entry_number = idx;
  20.766 +	info.base_addr = GET_BASE(desc);
  20.767 +	info.limit = GET_LIMIT(desc);
  20.768 +	info.seg_32bit = GET_32BIT(desc);
  20.769 +	info.contents = GET_CONTENTS(desc);
  20.770 +	info.read_exec_only = !GET_WRITABLE(desc);
  20.771 +	info.limit_in_pages = GET_LIMIT_PAGES(desc);
  20.772 +	info.seg_not_present = !GET_PRESENT(desc);
  20.773 +	info.useable = GET_USEABLE(desc);
  20.774 +
  20.775 +	if (copy_to_user(u_info, &info, sizeof(info)))
  20.776 +		return -EFAULT;
  20.777 +	return 0;
  20.778 +}
  20.779 +
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/setup.c	Fri Nov 19 00:40:52 2004 +0000
    21.3 @@ -0,0 +1,1509 @@
    21.4 +/*
    21.5 + *  linux/arch/i386/kernel/setup.c
    21.6 + *
    21.7 + *  Copyright (C) 1995  Linus Torvalds
    21.8 + *
    21.9 + *  Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
   21.10 + *
   21.11 + *  Memory region support
   21.12 + *	David Parsons <orc@pell.chi.il.us>, July-August 1999
   21.13 + *
   21.14 + *  Added E820 sanitization routine (removes overlapping memory regions);
   21.15 + *  Brian Moyle <bmoyle@mvista.com>, February 2001
   21.16 + *
   21.17 + * Moved CPU detection code to cpu/${cpu}.c
   21.18 + *    Patrick Mochel <mochel@osdl.org>, March 2002
   21.19 + *
   21.20 + *  Provisions for empty E820 memory regions (reported by certain BIOSes).
   21.21 + *  Alex Achenbach <xela@slit.de>, December 2002.
   21.22 + *
   21.23 + */
   21.24 +
   21.25 +/*
   21.26 + * This file handles the architecture-dependent parts of initialization
   21.27 + */
   21.28 +
   21.29 +#include <linux/sched.h>
   21.30 +#include <linux/mm.h>
   21.31 +#include <linux/tty.h>
   21.32 +#include <linux/ioport.h>
   21.33 +#include <linux/acpi.h>
   21.34 +#include <linux/apm_bios.h>
   21.35 +#include <linux/initrd.h>
   21.36 +#include <linux/bootmem.h>
   21.37 +#include <linux/seq_file.h>
   21.38 +#include <linux/console.h>
   21.39 +#include <linux/root_dev.h>
   21.40 +#include <linux/highmem.h>
   21.41 +#include <linux/module.h>
   21.42 +#include <linux/efi.h>
   21.43 +#include <linux/init.h>
   21.44 +#include <linux/edd.h>
   21.45 +#include <video/edid.h>
   21.46 +#include <asm/e820.h>
   21.47 +#include <asm/mpspec.h>
   21.48 +#include <asm/setup.h>
   21.49 +#include <asm/arch_hooks.h>
   21.50 +#include <asm/sections.h>
   21.51 +#include <asm/io_apic.h>
   21.52 +#include <asm/ist.h>
   21.53 +#include <asm/io.h>
   21.54 +#include <asm-xen/hypervisor.h>
   21.55 +#include "setup_arch_pre.h"
   21.56 +#include <bios_ebda.h>
   21.57 +
   21.58 +int disable_pse __initdata = 0;
   21.59 +
   21.60 +/*
   21.61 + * Machine setup..
   21.62 + */
   21.63 +
   21.64 +#ifdef CONFIG_EFI
   21.65 +int efi_enabled = 0;
   21.66 +EXPORT_SYMBOL(efi_enabled);
   21.67 +#endif
   21.68 +
   21.69 +/* cpu data as detected by the assembly code in head.S */
   21.70 +struct cpuinfo_x86 new_cpu_data __initdata = { 0, 0, 0, 0, -1, 0, 1, 0, -1 };
   21.71 +/* common cpu data for all cpus */
   21.72 +struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 0, 1, 0, -1 };
   21.73 +
   21.74 +unsigned long mmu_cr4_features;
   21.75 +EXPORT_SYMBOL_GPL(mmu_cr4_features);
   21.76 +
   21.77 +#ifdef	CONFIG_ACPI_INTERPRETER
   21.78 +	int acpi_disabled = 0;
   21.79 +#else
   21.80 +	int acpi_disabled = 1;
   21.81 +#endif
   21.82 +EXPORT_SYMBOL(acpi_disabled);
   21.83 +
   21.84 +#ifdef	CONFIG_ACPI_BOOT
   21.85 +int __initdata acpi_force = 0;
   21.86 +extern acpi_interrupt_flags	acpi_sci_flags;
   21.87 +#endif
   21.88 +
   21.89 +int MCA_bus;
   21.90 +/* for MCA, but anyone else can use it if they want */
   21.91 +unsigned int machine_id;
   21.92 +unsigned int machine_submodel_id;
   21.93 +unsigned int BIOS_revision;
   21.94 +unsigned int mca_pentium_flag;
   21.95 +
   21.96 +/* For PCI or other memory-mapped resources */
   21.97 +unsigned long pci_mem_start = 0x10000000;
   21.98 +
   21.99 +/* user-defined highmem size */
  21.100 +static unsigned int highmem_pages = -1;
  21.101 +
  21.102 +/*
  21.103 + * Setup options
  21.104 + */
  21.105 +struct drive_info_struct { char dummy[32]; } drive_info;
  21.106 +struct screen_info screen_info;
  21.107 +struct apm_info apm_info;
  21.108 +struct sys_desc_table_struct {
  21.109 +	unsigned short length;
  21.110 +	unsigned char table[0];
  21.111 +};
  21.112 +struct edid_info edid_info;
  21.113 +struct ist_info ist_info;
  21.114 +struct e820map e820;
  21.115 +
  21.116 +unsigned char aux_device_present;
  21.117 +
  21.118 +extern void early_cpu_init(void);
  21.119 +extern void dmi_scan_machine(void);
  21.120 +extern void generic_apic_probe(char *);
  21.121 +extern int root_mountflags;
  21.122 +
  21.123 +unsigned long saved_videomode;
  21.124 +
  21.125 +#define RAMDISK_IMAGE_START_MASK  	0x07FF
  21.126 +#define RAMDISK_PROMPT_FLAG		0x8000
  21.127 +#define RAMDISK_LOAD_FLAG		0x4000	
  21.128 +
  21.129 +static char command_line[COMMAND_LINE_SIZE];
  21.130 +
  21.131 +unsigned char __initdata boot_params[PARAM_SIZE];
  21.132 +
  21.133 +static struct resource data_resource = {
  21.134 +	.name	= "Kernel data",
  21.135 +	.start	= 0,
  21.136 +	.end	= 0,
  21.137 +	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
  21.138 +};
  21.139 +
  21.140 +static struct resource code_resource = {
  21.141 +	.name	= "Kernel code",
  21.142 +	.start	= 0,
  21.143 +	.end	= 0,
  21.144 +	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
  21.145 +};
  21.146 +
  21.147 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  21.148 +static struct resource system_rom_resource = {
  21.149 +	.name	= "System ROM",
  21.150 +	.start	= 0xf0000,
  21.151 +	.end	= 0xfffff,
  21.152 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.153 +};
  21.154 +
  21.155 +static struct resource extension_rom_resource = {
  21.156 +	.name	= "Extension ROM",
  21.157 +	.start	= 0xe0000,
  21.158 +	.end	= 0xeffff,
  21.159 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.160 +};
  21.161 +
  21.162 +static struct resource adapter_rom_resources[] = { {
  21.163 +	.name 	= "Adapter ROM",
  21.164 +	.start	= 0xc8000,
  21.165 +	.end	= 0,
  21.166 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.167 +}, {
  21.168 +	.name 	= "Adapter ROM",
  21.169 +	.start	= 0,
  21.170 +	.end	= 0,
  21.171 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.172 +}, {
  21.173 +	.name 	= "Adapter ROM",
  21.174 +	.start	= 0,
  21.175 +	.end	= 0,
  21.176 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.177 +}, {
  21.178 +	.name 	= "Adapter ROM",
  21.179 +	.start	= 0,
  21.180 +	.end	= 0,
  21.181 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.182 +}, {
  21.183 +	.name 	= "Adapter ROM",
  21.184 +	.start	= 0,
  21.185 +	.end	= 0,
  21.186 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.187 +}, {
  21.188 +	.name 	= "Adapter ROM",
  21.189 +	.start	= 0,
  21.190 +	.end	= 0,
  21.191 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.192 +} };
  21.193 +
  21.194 +#define ADAPTER_ROM_RESOURCES \
  21.195 +	(sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
  21.196 +
  21.197 +static struct resource video_rom_resource = {
  21.198 +	.name 	= "Video ROM",
  21.199 +	.start	= 0xc0000,
  21.200 +	.end	= 0xc7fff,
  21.201 +	.flags	= IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
  21.202 +};
  21.203 +#endif
  21.204 +
  21.205 +static struct resource video_ram_resource = {
  21.206 +	.name	= "Video RAM area",
  21.207 +	.start	= 0xa0000,
  21.208 +	.end	= 0xbffff,
  21.209 +	.flags	= IORESOURCE_BUSY | IORESOURCE_MEM
  21.210 +};
  21.211 +
  21.212 +static struct resource standard_io_resources[] = { {
  21.213 +	.name	= "dma1",
  21.214 +	.start	= 0x0000,
  21.215 +	.end	= 0x001f,
  21.216 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  21.217 +}, {
  21.218 +	.name	= "pic1",
  21.219 +	.start	= 0x0020,
  21.220 +	.end	= 0x0021,
  21.221 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  21.222 +}, {
  21.223 +	.name   = "timer0",
  21.224 +	.start	= 0x0040,
  21.225 +	.end    = 0x0043,
  21.226 +	.flags  = IORESOURCE_BUSY | IORESOURCE_IO
  21.227 +}, {
  21.228 +	.name   = "timer1",
  21.229 +	.start  = 0x0050,
  21.230 +	.end    = 0x0053,
  21.231 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  21.232 +}, {
  21.233 +	.name	= "keyboard",
  21.234 +	.start	= 0x0060,
  21.235 +	.end	= 0x006f,
  21.236 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  21.237 +}, {
  21.238 +	.name	= "dma page reg",
  21.239 +	.start	= 0x0080,
  21.240 +	.end	= 0x008f,
  21.241 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  21.242 +}, {
  21.243 +	.name	= "pic2",
  21.244 +	.start	= 0x00a0,
  21.245 +	.end	= 0x00a1,
  21.246 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  21.247 +}, {
  21.248 +	.name	= "dma2",
  21.249 +	.start	= 0x00c0,
  21.250 +	.end	= 0x00df,
  21.251 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  21.252 +}, {
  21.253 +	.name	= "fpu",
  21.254 +	.start	= 0x00f0,
  21.255 +	.end	= 0x00ff,
  21.256 +	.flags	= IORESOURCE_BUSY | IORESOURCE_IO
  21.257 +} };
  21.258 +
  21.259 +#define STANDARD_IO_RESOURCES \
  21.260 +	(sizeof standard_io_resources / sizeof standard_io_resources[0])
  21.261 +
  21.262 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  21.263 +#define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
  21.264 +
  21.265 +static int __init romchecksum(unsigned char *rom, unsigned long length)
  21.266 +{
  21.267 +	unsigned char *p, sum = 0;
  21.268 +
  21.269 +	for (p = rom; p < rom + length; p++)
  21.270 +		sum += *p;
  21.271 +	return sum == 0;
  21.272 +}
  21.273 +
  21.274 +static void __init probe_roms(void)
  21.275 +{
  21.276 +	unsigned long start, length, upper;
  21.277 +	unsigned char *rom;
  21.278 +	int	      i;
  21.279 +
  21.280 +	/* video rom */
  21.281 +	upper = adapter_rom_resources[0].start;
  21.282 +	for (start = video_rom_resource.start; start < upper; start += 2048) {
  21.283 +		rom = isa_bus_to_virt(start);
  21.284 +		if (!romsignature(rom))
  21.285 +			continue;
  21.286 +
  21.287 +		video_rom_resource.start = start;
  21.288 +
  21.289 +		/* 0 < length <= 0x7f * 512, historically */
  21.290 +		length = rom[2] * 512;
  21.291 +
  21.292 +		/* if checksum okay, trust length byte */
  21.293 +		if (length && romchecksum(rom, length))
  21.294 +			video_rom_resource.end = start + length - 1;
  21.295 +
  21.296 +		request_resource(&iomem_resource, &video_rom_resource);
  21.297 +		break;
  21.298 +	}
  21.299 +
  21.300 +	start = (video_rom_resource.end + 1 + 2047) & ~2047UL;
  21.301 +	if (start < upper)
  21.302 +		start = upper;
  21.303 +
  21.304 +	/* system rom */
  21.305 +	request_resource(&iomem_resource, &system_rom_resource);
  21.306 +	upper = system_rom_resource.start;
  21.307 +
  21.308 +	/* check for extension rom (ignore length byte!) */
  21.309 +	rom = isa_bus_to_virt(extension_rom_resource.start);
  21.310 +	if (romsignature(rom)) {
  21.311 +		length = extension_rom_resource.end - extension_rom_resource.start + 1;
  21.312 +		if (romchecksum(rom, length)) {
  21.313 +			request_resource(&iomem_resource, &extension_rom_resource);
  21.314 +			upper = extension_rom_resource.start;
  21.315 +		}
  21.316 +	}
  21.317 +
  21.318 +	/* check for adapter roms on 2k boundaries */
  21.319 +	for (i = 0; i < ADAPTER_ROM_RESOURCES && start < upper; start += 2048) {
  21.320 +		rom = isa_bus_to_virt(start);
  21.321 +		if (!romsignature(rom))
  21.322 +			continue;
  21.323 +
  21.324 +		/* 0 < length <= 0x7f * 512, historically */
  21.325 +		length = rom[2] * 512;
  21.326 +
  21.327 +		/* but accept any length that fits if checksum okay */
  21.328 +		if (!length || start + length > upper || !romchecksum(rom, length))
  21.329 +			continue;
  21.330 +
  21.331 +		adapter_rom_resources[i].start = start;
  21.332 +		adapter_rom_resources[i].end = start + length - 1;
  21.333 +		request_resource(&iomem_resource, &adapter_rom_resources[i]);
  21.334 +
  21.335 +		start = adapter_rom_resources[i++].end & ~2047UL;
  21.336 +	}
  21.337 +}
  21.338 +#endif
  21.339 +
  21.340 +/*
  21.341 + * Point at the empty zero page to start with. We map the real shared_info
  21.342 + * page as soon as fixmap is up and running.
  21.343 + */
  21.344 +shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
  21.345 +EXPORT_SYMBOL(HYPERVISOR_shared_info);
  21.346 +
  21.347 +unsigned long *phys_to_machine_mapping, *pfn_to_mfn_frame_list;
  21.348 +EXPORT_SYMBOL(phys_to_machine_mapping);
  21.349 +
  21.350 +multicall_entry_t multicall_list[8];
  21.351 +int nr_multicall_ents = 0;
  21.352 +
  21.353 +/* Raw start-of-day parameters from the hypervisor. */
  21.354 +union xen_start_info_union xen_start_info_union;
  21.355 +
  21.356 +static void __init limit_regions(unsigned long long size)
  21.357 +{
  21.358 +	unsigned long long current_addr = 0;
  21.359 +	int i;
  21.360 +
  21.361 +	if (efi_enabled) {
  21.362 +		for (i = 0; i < memmap.nr_map; i++) {
  21.363 +			current_addr = memmap.map[i].phys_addr +
  21.364 +				       (memmap.map[i].num_pages << 12);
  21.365 +			if (memmap.map[i].type == EFI_CONVENTIONAL_MEMORY) {
  21.366 +				if (current_addr >= size) {
  21.367 +					memmap.map[i].num_pages -=
  21.368 +						(((current_addr-size) + PAGE_SIZE-1) >> PAGE_SHIFT);
  21.369 +					memmap.nr_map = i + 1;
  21.370 +					return;
  21.371 +				}
  21.372 +			}
  21.373 +		}
  21.374 +	}
  21.375 +	for (i = 0; i < e820.nr_map; i++) {
  21.376 +		if (e820.map[i].type == E820_RAM) {
  21.377 +			current_addr = e820.map[i].addr + e820.map[i].size;
  21.378 +			if (current_addr >= size) {
  21.379 +				e820.map[i].size -= current_addr-size;
  21.380 +				e820.nr_map = i + 1;
  21.381 +				return;
  21.382 +			}
  21.383 +		}
  21.384 +	}
  21.385 +}
  21.386 +
  21.387 +static void __init add_memory_region(unsigned long long start,
  21.388 +                                  unsigned long long size, int type)
  21.389 +{
  21.390 +	int x;
  21.391 +
  21.392 +	if (!efi_enabled) {
  21.393 +       		x = e820.nr_map;
  21.394 +
  21.395 +		if (x == E820MAX) {
  21.396 +		    printk(KERN_ERR "Ooops! Too many entries in the memory map!\n");
  21.397 +		    return;
  21.398 +		}
  21.399 +
  21.400 +		e820.map[x].addr = start;
  21.401 +		e820.map[x].size = size;
  21.402 +		e820.map[x].type = type;
  21.403 +		e820.nr_map++;
  21.404 +	}
  21.405 +} /* add_memory_region */
  21.406 +
  21.407 +#define E820_DEBUG	1
  21.408 +
  21.409 +static void __init print_memory_map(char *who)
  21.410 +{
  21.411 +	int i;
  21.412 +
  21.413 +	for (i = 0; i < e820.nr_map; i++) {
  21.414 +		printk(" %s: %016Lx - %016Lx ", who,
  21.415 +			e820.map[i].addr,
  21.416 +			e820.map[i].addr + e820.map[i].size);
  21.417 +		switch (e820.map[i].type) {
  21.418 +		case E820_RAM:	printk("(usable)\n");
  21.419 +				break;
  21.420 +		case E820_RESERVED:
  21.421 +				printk("(reserved)\n");
  21.422 +				break;
  21.423 +		case E820_ACPI:
  21.424 +				printk("(ACPI data)\n");
  21.425 +				break;
  21.426 +		case E820_NVS:
  21.427 +				printk("(ACPI NVS)\n");
  21.428 +				break;
  21.429 +		default:	printk("type %lu\n", e820.map[i].type);
  21.430 +				break;
  21.431 +		}
  21.432 +	}
  21.433 +}
  21.434 +
  21.435 +#if 0
  21.436 +/*
  21.437 + * Sanitize the BIOS e820 map.
  21.438 + *
  21.439 + * Some e820 responses include overlapping entries.  The following 
  21.440 + * replaces the original e820 map with a new one, removing overlaps.
  21.441 + *
  21.442 + */
  21.443 +struct change_member {
  21.444 +	struct e820entry *pbios; /* pointer to original bios entry */
  21.445 +	unsigned long long addr; /* address for this change point */
  21.446 +};
  21.447 +struct change_member change_point_list[2*E820MAX] __initdata;
  21.448 +struct change_member *change_point[2*E820MAX] __initdata;
  21.449 +struct e820entry *overlap_list[E820MAX] __initdata;
  21.450 +struct e820entry new_bios[E820MAX] __initdata;
  21.451 +
  21.452 +static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map)
  21.453 +{
  21.454 +	struct change_member *change_tmp;
  21.455 +	unsigned long current_type, last_type;
  21.456 +	unsigned long long last_addr;
  21.457 +	int chgidx, still_changing;
  21.458 +	int overlap_entries;
  21.459 +	int new_bios_entry;
  21.460 +	int old_nr, new_nr, chg_nr;
  21.461 +	int i;
  21.462 +
  21.463 +	/*
  21.464 +		Visually we're performing the following (1,2,3,4 = memory types)...
  21.465 +
  21.466 +		Sample memory map (w/overlaps):
  21.467 +		   ____22__________________
  21.468 +		   ______________________4_
  21.469 +		   ____1111________________
  21.470 +		   _44_____________________
  21.471 +		   11111111________________
  21.472 +		   ____________________33__
  21.473 +		   ___________44___________
  21.474 +		   __________33333_________
  21.475 +		   ______________22________
  21.476 +		   ___________________2222_
  21.477 +		   _________111111111______
  21.478 +		   _____________________11_
  21.479 +		   _________________4______
  21.480 +
  21.481 +		Sanitized equivalent (no overlap):
  21.482 +		   1_______________________
  21.483 +		   _44_____________________
  21.484 +		   ___1____________________
  21.485 +		   ____22__________________
  21.486 +		   ______11________________
  21.487 +		   _________1______________
  21.488 +		   __________3_____________
  21.489 +		   ___________44___________
  21.490 +		   _____________33_________
  21.491 +		   _______________2________
  21.492 +		   ________________1_______
  21.493 +		   _________________4______
  21.494 +		   ___________________2____
  21.495 +		   ____________________33__
  21.496 +		   ______________________4_
  21.497 +	*/
  21.498 +
  21.499 +	/* if there's only one memory region, don't bother */
  21.500 +	if (*pnr_map < 2)
  21.501 +		return -1;
  21.502 +
  21.503 +	old_nr = *pnr_map;
  21.504 +
  21.505 +	/* bail out if we find any unreasonable addresses in bios map */
  21.506 +	for (i=0; i<old_nr; i++)
  21.507 +		if (biosmap[i].addr + biosmap[i].size < biosmap[i].addr)
  21.508 +			return -1;
  21.509 +
  21.510 +	/* create pointers for initial change-point information (for sorting) */
  21.511 +	for (i=0; i < 2*old_nr; i++)
  21.512 +		change_point[i] = &change_point_list[i];
  21.513 +
  21.514 +	/* record all known change-points (starting and ending addresses),
  21.515 +	   omitting those that are for empty memory regions */
  21.516 +	chgidx = 0;
  21.517 +	for (i=0; i < old_nr; i++)	{
  21.518 +		if (biosmap[i].size != 0) {
  21.519 +			change_point[chgidx]->addr = biosmap[i].addr;
  21.520 +			change_point[chgidx++]->pbios = &biosmap[i];
  21.521 +			change_point[chgidx]->addr = biosmap[i].addr + biosmap[i].size;
  21.522 +			change_point[chgidx++]->pbios = &biosmap[i];
  21.523 +		}
  21.524 +	}
  21.525 +	chg_nr = chgidx;    	/* true number of change-points */
  21.526 +
  21.527 +	/* sort change-point list by memory addresses (low -> high) */
  21.528 +	still_changing = 1;
  21.529 +	while (still_changing)	{
  21.530 +		still_changing = 0;
  21.531 +		for (i=1; i < chg_nr; i++)  {
  21.532 +			/* if <current_addr> > <last_addr>, swap */
  21.533 +			/* or, if current=<start_addr> & last=<end_addr>, swap */
  21.534 +			if ((change_point[i]->addr < change_point[i-1]->addr) ||
  21.535 +				((change_point[i]->addr == change_point[i-1]->addr) &&
  21.536 +				 (change_point[i]->addr == change_point[i]->pbios->addr) &&
  21.537 +				 (change_point[i-1]->addr != change_point[i-1]->pbios->addr))
  21.538 +			   )
  21.539 +			{
  21.540 +				change_tmp = change_point[i];
  21.541 +				change_point[i] = change_point[i-1];
  21.542 +				change_point[i-1] = change_tmp;
  21.543 +				still_changing=1;
  21.544 +			}
  21.545 +		}
  21.546 +	}
  21.547 +
  21.548 +	/* create a new bios memory map, removing overlaps */
  21.549 +	overlap_entries=0;	 /* number of entries in the overlap table */
  21.550 +	new_bios_entry=0;	 /* index for creating new bios map entries */
  21.551 +	last_type = 0;		 /* start with undefined memory type */
  21.552 +	last_addr = 0;		 /* start with 0 as last starting address */
  21.553 +	/* loop through change-points, determining affect on the new bios map */
  21.554 +	for (chgidx=0; chgidx < chg_nr; chgidx++)
  21.555 +	{
  21.556 +		/* keep track of all overlapping bios entries */
  21.557 +		if (change_point[chgidx]->addr == change_point[chgidx]->pbios->addr)
  21.558 +		{
  21.559 +			/* add map entry to overlap list (> 1 entry implies an overlap) */
  21.560 +			overlap_list[overlap_entries++]=change_point[chgidx]->pbios;
  21.561 +		}
  21.562 +		else
  21.563 +		{
  21.564 +			/* remove entry from list (order independent, so swap with last) */
  21.565 +			for (i=0; i<overlap_entries; i++)
  21.566 +			{
  21.567 +				if (overlap_list[i] == change_point[chgidx]->pbios)
  21.568 +					overlap_list[i] = overlap_list[overlap_entries-1];
  21.569 +			}
  21.570 +			overlap_entries--;
  21.571 +		}
  21.572 +		/* if there are overlapping entries, decide which "type" to use */
  21.573 +		/* (larger value takes precedence -- 1=usable, 2,3,4,4+=unusable) */
  21.574 +		current_type = 0;
  21.575 +		for (i=0; i<overlap_entries; i++)
  21.576 +			if (overlap_list[i]->type > current_type)
  21.577 +				current_type = overlap_list[i]->type;
  21.578 +		/* continue building up new bios map based on this information */
  21.579 +		if (current_type != last_type)	{
  21.580 +			if (last_type != 0)	 {
  21.581 +				new_bios[new_bios_entry].size =
  21.582 +					change_point[chgidx]->addr - last_addr;
  21.583 +				/* move forward only if the new size was non-zero */
  21.584 +				if (new_bios[new_bios_entry].size != 0)
  21.585 +					if (++new_bios_entry >= E820MAX)
  21.586 +						break; 	/* no more space left for new bios entries */
  21.587 +			}
  21.588 +			if (current_type != 0)	{
  21.589 +				new_bios[new_bios_entry].addr = change_point[chgidx]->addr;
  21.590 +				new_bios[new_bios_entry].type = current_type;
  21.591 +				last_addr=change_point[chgidx]->addr;
  21.592 +			}
  21.593 +			last_type = current_type;
  21.594 +		}
  21.595 +	}
  21.596 +	new_nr = new_bios_entry;   /* retain count for new bios entries */
  21.597 +
  21.598 +	/* copy new bios mapping into original location */
  21.599 +	memcpy(biosmap, new_bios, new_nr*sizeof(struct e820entry));
  21.600 +	*pnr_map = new_nr;
  21.601 +
  21.602 +	return 0;
  21.603 +}
  21.604 +
  21.605 +/*
  21.606 + * Copy the BIOS e820 map into a safe place.
  21.607 + *
  21.608 + * Sanity-check it while we're at it..
  21.609 + *
  21.610 + * If we're lucky and live on a modern system, the setup code
  21.611 + * will have given us a memory map that we can use to properly
  21.612 + * set up memory.  If we aren't, we'll fake a memory map.
  21.613 + *
  21.614 + * We check to see that the memory map contains at least 2 elements
  21.615 + * before we'll use it, because the detection code in setup.S may
  21.616 + * not be perfect and most every PC known to man has two memory
  21.617 + * regions: one from 0 to 640k, and one from 1mb up.  (The IBM
  21.618 + * thinkpad 560x, for example, does not cooperate with the memory
  21.619 + * detection code.)
  21.620 + */
  21.621 +static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
  21.622 +{
  21.623 +	/* Only one memory region (or negative)? Ignore it */
  21.624 +	if (nr_map < 2)
  21.625 +		return -1;
  21.626 +
  21.627 +	do {
  21.628 +		unsigned long long start = biosmap->addr;
  21.629 +		unsigned long long size = biosmap->size;
  21.630 +		unsigned long long end = start + size;
  21.631 +		unsigned long type = biosmap->type;
  21.632 +
  21.633 +		/* Overflow in 64 bits? Ignore the memory map. */
  21.634 +		if (start > end)
  21.635 +			return -1;
  21.636 +
  21.637 +		/*
  21.638 +		 * Some BIOSes claim RAM in the 640k - 1M region.
  21.639 +		 * Not right. Fix it up.
  21.640 +		 */
  21.641 +		if (type == E820_RAM) {
  21.642 +			if (start < 0x100000ULL && end > 0xA0000ULL) {
  21.643 +				if (start < 0xA0000ULL)
  21.644 +					add_memory_region(start, 0xA0000ULL-start, type);
  21.645 +				if (end <= 0x100000ULL)
  21.646 +					continue;
  21.647 +				start = 0x100000ULL;
  21.648 +				size = end - start;
  21.649 +			}
  21.650 +		}
  21.651 +		add_memory_region(start, size, type);
  21.652 +	} while (biosmap++,--nr_map);
  21.653 +	return 0;
  21.654 +}
  21.655 +#endif
  21.656 +
  21.657 +#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)
  21.658 +struct edd edd;
  21.659 +#ifdef CONFIG_EDD_MODULE
  21.660 +EXPORT_SYMBOL(edd);
  21.661 +#endif
  21.662 +/**
  21.663 + * copy_edd() - Copy the BIOS EDD information
  21.664 + *              from boot_params into a safe place.
  21.665 + *
  21.666 + */
  21.667 +static inline void copy_edd(void)
  21.668 +{
  21.669 +     memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature));
  21.670 +     memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info));
  21.671 +     edd.mbr_signature_nr = EDD_MBR_SIG_NR;
  21.672 +     edd.edd_info_nr = EDD_NR;
  21.673 +}
  21.674 +#else
  21.675 +static inline void copy_edd(void)
  21.676 +{
  21.677 +}
  21.678 +#endif
  21.679 +
  21.680 +/*
  21.681 + * Do NOT EVER look at the BIOS memory size location.
  21.682 + * It does not work on many machines.
  21.683 + */
  21.684 +#define LOWMEMSIZE()	(0x9f000)
  21.685 +
  21.686 +static void __init parse_cmdline_early (char ** cmdline_p)
  21.687 +{
  21.688 +	char c = ' ', *to = command_line, *from = saved_command_line;
  21.689 +	int len = 0;
  21.690 +	int userdef = 0;
  21.691 +
  21.692 +        memcpy(saved_command_line, xen_start_info.cmd_line, MAX_CMDLINE);
  21.693 +	/* Save unparsed command line copy for /proc/cmdline */
  21.694 +	saved_command_line[COMMAND_LINE_SIZE-1] = '\0';
  21.695 +
  21.696 +	for (;;) {
  21.697 +		/*
  21.698 +		 * "mem=nopentium" disables the 4MB page tables.
  21.699 +		 * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM
  21.700 +		 * to <mem>, overriding the bios size.
  21.701 +		 * "memmap=XXX[KkmM]@XXX[KkmM]" defines a memory region from
  21.702 +		 * <start> to <start>+<mem>, overriding the bios size.
  21.703 +		 *
  21.704 +		 * HPA tells me bootloaders need to parse mem=, so no new
  21.705 +		 * option should be mem=  [also see Documentation/i386/boot.txt]
  21.706 +		 */
  21.707 +		if (c == ' ' && !memcmp(from, "mem=", 4)) {
  21.708 +			if (to != command_line)
  21.709 +				to--;
  21.710 +			if (!memcmp(from+4, "nopentium", 9)) {
  21.711 +				from += 9+4;
  21.712 +				clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability);
  21.713 +				disable_pse = 1;
  21.714 +			} else {
  21.715 +				/* If the user specifies memory size, we
  21.716 +				 * limit the BIOS-provided memory map to
  21.717 +				 * that size. exactmap can be used to specify
  21.718 +				 * the exact map. mem=number can be used to
  21.719 +				 * trim the existing memory map.
  21.720 +				 */
  21.721 +				unsigned long long mem_size;
  21.722 + 
  21.723 +				mem_size = memparse(from+4, &from);
  21.724 +				limit_regions(mem_size);
  21.725 +				userdef=1;
  21.726 +			}
  21.727 +		}
  21.728 +
  21.729 +		if (c == ' ' && !memcmp(from, "memmap=", 7)) {
  21.730 +			if (to != command_line)
  21.731 +				to--;
  21.732 +			if (!memcmp(from+7, "exactmap", 8)) {
  21.733 +				from += 8+7;
  21.734 +				e820.nr_map = 0;
  21.735 +				userdef = 1;
  21.736 +			} else {
  21.737 +				/* If the user specifies memory size, we
  21.738 +				 * limit the BIOS-provided memory map to
  21.739 +				 * that size. exactmap can be used to specify
  21.740 +				 * the exact map. mem=number can be used to
  21.741 +				 * trim the existing memory map.
  21.742 +				 */
  21.743 +				unsigned long long start_at, mem_size;
  21.744 + 
  21.745 +				mem_size = memparse(from+7, &from);
  21.746 +				if (*from == '@') {
  21.747 +					start_at = memparse(from+1, &from);
  21.748 +					add_memory_region(start_at, mem_size, E820_RAM);
  21.749 +				} else if (*from == '#') {
  21.750 +					start_at = memparse(from+1, &from);
  21.751 +					add_memory_region(start_at, mem_size, E820_ACPI);
  21.752 +				} else if (*from == '$') {
  21.753 +					start_at = memparse(from+1, &from);
  21.754 +					add_memory_region(start_at, mem_size, E820_RESERVED);
  21.755 +				} else {
  21.756 +					limit_regions(mem_size);
  21.757 +					userdef=1;
  21.758 +				}
  21.759 +			}
  21.760 +		}
  21.761 +
  21.762 +#ifdef  CONFIG_X86_SMP
  21.763 +		/*
  21.764 +		 * If the BIOS enumerates physical processors before logical,
  21.765 +		 * maxcpus=N at enumeration-time can be used to disable HT.
  21.766 +		 */
  21.767 +		else if (!memcmp(from, "maxcpus=", 8)) {
  21.768 +			extern unsigned int maxcpus;
  21.769 +
  21.770 +			maxcpus = simple_strtoul(from + 8, NULL, 0);
  21.771 +		}
  21.772 +#endif
  21.773 +
  21.774 +#ifdef CONFIG_ACPI_BOOT
  21.775 +		/* "acpi=off" disables both ACPI table parsing and interpreter */
  21.776 +		else if (!memcmp(from, "acpi=off", 8)) {
  21.777 +			disable_acpi();
  21.778 +		}
  21.779 +
  21.780 +		/* acpi=force to over-ride black-list */
  21.781 +		else if (!memcmp(from, "acpi=force", 10)) {
  21.782 +			acpi_force = 1;
  21.783 +			acpi_ht = 1;
  21.784 +			acpi_disabled = 0;
  21.785 +		}
  21.786 +
  21.787 +		/* acpi=strict disables out-of-spec workarounds */
  21.788 +		else if (!memcmp(from, "acpi=strict", 11)) {
  21.789 +			acpi_strict = 1;
  21.790 +		}
  21.791 +
  21.792 +		/* Limit ACPI just to boot-time to enable HT */
  21.793 +		else if (!memcmp(from, "acpi=ht", 7)) {
  21.794 +			if (!acpi_force)
  21.795 +				disable_acpi();
  21.796 +			acpi_ht = 1;
  21.797 +		}
  21.798 +		
  21.799 +		/* "pci=noacpi" disable ACPI IRQ routing and PCI scan */
  21.800 +		else if (!memcmp(from, "pci=noacpi", 10)) {
  21.801 +			acpi_disable_pci();
  21.802 +		}
  21.803 +		/* "acpi=noirq" disables ACPI interrupt routing */
  21.804 +		else if (!memcmp(from, "acpi=noirq", 10)) {
  21.805 +			acpi_noirq_set();
  21.806 +		}
  21.807 +
  21.808 +		else if (!memcmp(from, "acpi_sci=edge", 13))
  21.809 +			acpi_sci_flags.trigger =  1;
  21.810 +
  21.811 +		else if (!memcmp(from, "acpi_sci=level", 14))
  21.812 +			acpi_sci_flags.trigger = 3;
  21.813 +
  21.814 +		else if (!memcmp(from, "acpi_sci=high", 13))
  21.815 +			acpi_sci_flags.polarity = 1;
  21.816 +
  21.817 +		else if (!memcmp(from, "acpi_sci=low", 12))
  21.818 +			acpi_sci_flags.polarity = 3;
  21.819 +
  21.820 +#ifdef CONFIG_X86_IO_APIC
  21.821 +		else if (!memcmp(from, "acpi_skip_timer_override", 24))
  21.822 +			acpi_skip_timer_override = 1;
  21.823 +#endif
  21.824 +
  21.825 +#ifdef CONFIG_X86_LOCAL_APIC
  21.826 +		/* disable IO-APIC */
  21.827 +		else if (!memcmp(from, "noapic", 6))
  21.828 +			disable_ioapic_setup();
  21.829 +#endif /* CONFIG_X86_LOCAL_APIC */
  21.830 +#endif /* CONFIG_ACPI_BOOT */
  21.831 +
  21.832 +		/*
  21.833 +		 * highmem=size forces highmem to be exactly 'size' bytes.
  21.834 +		 * This works even on boxes that have no highmem otherwise.
  21.835 +		 * This also works to reduce highmem size on bigger boxes.
  21.836 +		 */
  21.837 +		if (c == ' ' && !memcmp(from, "highmem=", 8))
  21.838 +			highmem_pages = memparse(from+8, &from) >> PAGE_SHIFT;
  21.839 +	
  21.840 +		/*
  21.841 +		 * vmalloc=size forces the vmalloc area to be exactly 'size'
  21.842 +		 * bytes. This can be used to increase (or decrease) the
  21.843 +		 * vmalloc area - the default is 128m.
  21.844 +		 */
  21.845 +		if (c == ' ' && !memcmp(from, "vmalloc=", 8))
  21.846 +			__VMALLOC_RESERVE = memparse(from+8, &from);
  21.847 +
  21.848 +		c = *(from++);
  21.849 +		if (!c)
  21.850 +			break;
  21.851 +		if (COMMAND_LINE_SIZE <= ++len)
  21.852 +			break;
  21.853 +		*(to++) = c;
  21.854 +	}
  21.855 +	*to = '\0';
  21.856 +	*cmdline_p = command_line;
  21.857 +	if (userdef) {
  21.858 +		printk(KERN_INFO "user-defined physical RAM map:\n");
  21.859 +		print_memory_map("user");
  21.860 +	}
  21.861 +}
  21.862 +
  21.863 +/*
  21.864 + * Callback for efi_memory_walk.
  21.865 + */
  21.866 +static int __init
  21.867 +efi_find_max_pfn(unsigned long start, unsigned long end, void *arg)
  21.868 +{
  21.869 +	unsigned long *max_pfn = arg, pfn;
  21.870 +
  21.871 +	if (start < end) {
  21.872 +		pfn = PFN_UP(end -1);
  21.873 +		if (pfn > *max_pfn)
  21.874 +			*max_pfn = pfn;
  21.875 +	}
  21.876 +	return 0;
  21.877 +}
  21.878 +
  21.879 +
  21.880 +/*
  21.881 + * Find the highest page frame number we have available
  21.882 + */
  21.883 +void __init find_max_pfn(void)
  21.884 +{
  21.885 +	int i;
  21.886 +
  21.887 +	max_pfn = 0;
  21.888 +	if (efi_enabled) {
  21.889 +		efi_memmap_walk(efi_find_max_pfn, &max_pfn);
  21.890 +		return;
  21.891 +	}
  21.892 +
  21.893 +	for (i = 0; i < e820.nr_map; i++) {
  21.894 +		unsigned long start, end;
  21.895 +		/* RAM? */
  21.896 +		if (e820.map[i].type != E820_RAM)
  21.897 +			continue;
  21.898 +		start = PFN_UP(e820.map[i].addr);
  21.899 +		end = PFN_DOWN(e820.map[i].addr + e820.map[i].size);
  21.900 +		if (start >= end)
  21.901 +			continue;
  21.902 +		if (end > max_pfn)
  21.903 +			max_pfn = end;
  21.904 +	}
  21.905 +}
  21.906 +
  21.907 +/*
  21.908 + * Determine low and high memory ranges:
  21.909 + */
  21.910 +unsigned long __init find_max_low_pfn(void)
  21.911 +{
  21.912 +	unsigned long max_low_pfn;
  21.913 +
  21.914 +	max_low_pfn = max_pfn;
  21.915 +	if (max_low_pfn > MAXMEM_PFN) {
  21.916 +		if (highmem_pages == -1)
  21.917 +			highmem_pages = max_pfn - MAXMEM_PFN;
  21.918 +		if (highmem_pages + MAXMEM_PFN < max_pfn)
  21.919 +			max_pfn = MAXMEM_PFN + highmem_pages;
  21.920 +		if (highmem_pages + MAXMEM_PFN > max_pfn) {
  21.921 +			printk("only %luMB highmem pages available, ignoring highmem size of %uMB.\n", pages_to_mb(max_pfn - MAXMEM_PFN), pages_to_mb(highmem_pages));
  21.922 +			highmem_pages = 0;
  21.923 +		}
  21.924 +		max_low_pfn = MAXMEM_PFN;
  21.925 +#ifndef CONFIG_HIGHMEM
  21.926 +		/* Maximum memory usable is what is directly addressable */
  21.927 +		printk(KERN_WARNING "Warning only %ldMB will be used.\n",
  21.928 +					MAXMEM>>20);
  21.929 +		if (max_pfn > MAX_NONPAE_PFN)
  21.930 +			printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  21.931 +		else
  21.932 +			printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n");
  21.933 +		max_pfn = MAXMEM_PFN;
  21.934 +#else /* !CONFIG_HIGHMEM */
  21.935 +#ifndef CONFIG_X86_PAE
  21.936 +		if (max_pfn > MAX_NONPAE_PFN) {
  21.937 +			max_pfn = MAX_NONPAE_PFN;
  21.938 +			printk(KERN_WARNING "Warning only 4GB will be used.\n");
  21.939 +			printk(KERN_WARNING "Use a PAE enabled kernel.\n");
  21.940 +		}
  21.941 +#endif /* !CONFIG_X86_PAE */
  21.942 +#endif /* !CONFIG_HIGHMEM */
  21.943 +	} else {
  21.944 +		if (highmem_pages == -1)
  21.945 +			highmem_pages = 0;
  21.946 +#ifdef CONFIG_HIGHMEM
  21.947 +		if (highmem_pages >= max_pfn) {
  21.948 +			printk(KERN_ERR "highmem size specified (%uMB) is bigger than pages available (%luMB)!.\n", pages_to_mb(highmem_pages), pages_to_mb(max_pfn));
  21.949 +			highmem_pages = 0;
  21.950 +		}
  21.951 +		if (highmem_pages) {
  21.952 +			if (max_low_pfn-highmem_pages < 64*1024*1024/PAGE_SIZE){
  21.953 +				printk(KERN_ERR "highmem size %uMB results in smaller than 64MB lowmem, ignoring it.\n", pages_to_mb(highmem_pages));
  21.954 +				highmem_pages = 0;
  21.955 +			}
  21.956 +			max_low_pfn -= highmem_pages;
  21.957 +		}
  21.958 +#else
  21.959 +		if (highmem_pages)
  21.960 +			printk(KERN_ERR "ignoring highmem size on non-highmem kernel!\n");
  21.961 +#endif
  21.962 +	}
  21.963 +	return max_low_pfn;
  21.964 +}
  21.965 +
  21.966 +#ifndef CONFIG_DISCONTIGMEM
  21.967 +
  21.968 +/*
  21.969 + * Free all available memory for boot time allocation.  Used
  21.970 + * as a callback function by efi_memory_walk()
  21.971 + */
  21.972 +
  21.973 +static int __init
  21.974 +free_available_memory(unsigned long start, unsigned long end, void *arg)
  21.975 +{
  21.976 +	/* check max_low_pfn */
  21.977 +	if (start >= ((max_low_pfn + 1) << PAGE_SHIFT))
  21.978 +		return 0;
  21.979 +	if (end >= ((max_low_pfn + 1) << PAGE_SHIFT))
  21.980 +		end = (max_low_pfn + 1) << PAGE_SHIFT;
  21.981 +	if (start < end)
  21.982 +		free_bootmem(start, end - start);
  21.983 +
  21.984 +	return 0;
  21.985 +}
  21.986 +/*
  21.987 + * Register fully available low RAM pages with the bootmem allocator.
  21.988 + */
  21.989 +static void __init register_bootmem_low_pages(unsigned long max_low_pfn)
  21.990 +{
  21.991 +	int i;
  21.992 +
  21.993 +	if (efi_enabled) {
  21.994 +		efi_memmap_walk(free_available_memory, NULL);
  21.995 +		return;
  21.996 +	}
  21.997 +	for (i = 0; i < e820.nr_map; i++) {
  21.998 +		unsigned long curr_pfn, last_pfn, size;
  21.999 +		/*
 21.1000 +		 * Reserve usable low memory
 21.1001 +		 */
 21.1002 +		if (e820.map[i].type != E820_RAM)
 21.1003 +			continue;
 21.1004 +		/*
 21.1005 +		 * We are rounding up the start address of usable memory:
 21.1006 +		 */
 21.1007 +		curr_pfn = PFN_UP(e820.map[i].addr);
 21.1008 +		if (curr_pfn >= max_low_pfn)
 21.1009 +			continue;
 21.1010 +		/*
 21.1011 +		 * ... and at the end of the usable range downwards:
 21.1012 +		 */
 21.1013 +		last_pfn = PFN_DOWN(e820.map[i].addr + e820.map[i].size);
 21.1014 +
 21.1015 +		if (last_pfn > max_low_pfn)
 21.1016 +			last_pfn = max_low_pfn;
 21.1017 +
 21.1018 +		/*
 21.1019 +		 * .. finally, did all the rounding and playing
 21.1020 +		 * around just make the area go away?
 21.1021 +		 */
 21.1022 +		if (last_pfn <= curr_pfn)
 21.1023 +			continue;
 21.1024 +
 21.1025 +		size = last_pfn - curr_pfn;
 21.1026 +		free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size));
 21.1027 +	}
 21.1028 +}
 21.1029 +
 21.1030 +/*
 21.1031 + * workaround for Dell systems that neglect to reserve EBDA
 21.1032 + */
 21.1033 +static void __init reserve_ebda_region(void)
 21.1034 +{
 21.1035 +	unsigned int addr;
 21.1036 +	addr = get_bios_ebda();
 21.1037 +	if (addr)
 21.1038 +		reserve_bootmem(addr, PAGE_SIZE);	
 21.1039 +}
 21.1040 +
 21.1041 +static unsigned long __init setup_memory(void)
 21.1042 +{
 21.1043 +	unsigned long bootmap_size, start_pfn, max_low_pfn;
 21.1044 +
 21.1045 +	/*
 21.1046 +	 * partially used pages are not usable - thus
 21.1047 +	 * we are rounding upwards:
 21.1048 +	 */
 21.1049 +	start_pfn = PFN_UP(__pa(xen_start_info.pt_base)) + xen_start_info.nr_pt_frames;
 21.1050 +
 21.1051 +	find_max_pfn();
 21.1052 +
 21.1053 +	max_low_pfn = find_max_low_pfn();
 21.1054 +
 21.1055 +#ifdef CONFIG_HIGHMEM
 21.1056 +	highstart_pfn = highend_pfn = max_pfn;
 21.1057 +	if (max_pfn > max_low_pfn) {
 21.1058 +		highstart_pfn = max_low_pfn;
 21.1059 +	}
 21.1060 +	printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
 21.1061 +		pages_to_mb(highend_pfn - highstart_pfn));
 21.1062 +#endif
 21.1063 +	printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
 21.1064 +			pages_to_mb(max_low_pfn));
 21.1065 +	/*
 21.1066 +	 * Initialize the boot-time allocator (with low memory only):
 21.1067 +	 */
 21.1068 +	bootmap_size = init_bootmem(start_pfn, max_low_pfn);
 21.1069 +
 21.1070 +	register_bootmem_low_pages(max_low_pfn);
 21.1071 +
 21.1072 +	/*
 21.1073 +	 * Reserve the bootmem bitmap itself as well. We do this in two
 21.1074 +	 * steps (first step was init_bootmem()) because this catches
 21.1075 +	 * the (very unlikely) case of us accidentally initializing the
 21.1076 +	 * bootmem allocator with an invalid RAM area.
 21.1077 +	 */
 21.1078 +	reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(start_pfn) +
 21.1079 +			 bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY));
 21.1080 +
 21.1081 +	/* reserve EBDA region, it's a 4K region */
 21.1082 +	reserve_ebda_region();
 21.1083 +
 21.1084 +    /* could be an AMD 768MPX chipset. Reserve a page  before VGA to prevent
 21.1085 +       PCI prefetch into it (errata #56). Usually the page is reserved anyways,
 21.1086 +       unless you have no PS/2 mouse plugged in. */
 21.1087 +	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
 21.1088 +	    boot_cpu_data.x86 == 6)
 21.1089 +	     reserve_bootmem(0xa0000 - 4096, 4096);
 21.1090 +
 21.1091 +#ifdef CONFIG_SMP
 21.1092 +	/*
 21.1093 +	 * But first pinch a few for the stack/trampoline stuff
 21.1094 +	 * FIXME: Don't need the extra page at 4K, but need to fix
 21.1095 +	 * trampoline before removing it. (see the GDT stuff)
 21.1096 +	 */
 21.1097 +	reserve_bootmem(PAGE_SIZE, PAGE_SIZE);
 21.1098 +#endif
 21.1099 +#ifdef CONFIG_ACPI_SLEEP
 21.1100 +	/*
 21.1101 +	 * Reserve low memory region for sleep support.
 21.1102 +	 */
 21.1103 +	acpi_reserve_bootmem();
 21.1104 +#endif
 21.1105 +#ifdef CONFIG_X86_FIND_SMP_CONFIG
 21.1106 +	/*
 21.1107 +	 * Find and reserve possible boot-time SMP configuration:
 21.1108 +	 */
 21.1109 +	find_smp_config();
 21.1110 +#endif
 21.1111 +
 21.1112 +#ifdef CONFIG_BLK_DEV_INITRD
 21.1113 +	if (xen_start_info.mod_start) {
 21.1114 +		if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
 21.1115 +			/*reserve_bootmem(INITRD_START, INITRD_SIZE);*/
 21.1116 +			initrd_start = INITRD_START + PAGE_OFFSET;
 21.1117 +			initrd_end = initrd_start+INITRD_SIZE;
 21.1118 +			initrd_below_start_ok = 1;
 21.1119 +		}
 21.1120 +		else {
 21.1121 +			printk(KERN_ERR "initrd extends beyond end of memory "
 21.1122 +			    "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
 21.1123 +			    INITRD_START + INITRD_SIZE,
 21.1124 +			    max_low_pfn << PAGE_SHIFT);
 21.1125 +			initrd_start = 0;
 21.1126 +		}
 21.1127 +	}
 21.1128 +#endif
 21.1129 +
 21.1130 +	phys_to_machine_mapping = (unsigned long *)xen_start_info.mfn_list;
 21.1131 +
 21.1132 +	return max_low_pfn;
 21.1133 +}
 21.1134 +#else
 21.1135 +extern unsigned long setup_memory(void);
 21.1136 +#endif /* !CONFIG_DISCONTIGMEM */
 21.1137 +
 21.1138 +/*
 21.1139 + * Request address space for all standard RAM and ROM resources
 21.1140 + * and also for regions reported as reserved by the e820.
 21.1141 + */
 21.1142 +static void __init
 21.1143 +legacy_init_iomem_resources(struct resource *code_resource, struct resource *data_resource)
 21.1144 +{
 21.1145 +	int i;
 21.1146 +
 21.1147 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
 21.1148 +	probe_roms();
 21.1149 +#endif
 21.1150 +	for (i = 0; i < e820.nr_map; i++) {
 21.1151 +		struct resource *res;
 21.1152 +		if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL)
 21.1153 +			continue;
 21.1154 +		res = alloc_bootmem_low(sizeof(struct resource));
 21.1155 +		switch (e820.map[i].type) {
 21.1156 +		case E820_RAM:	res->name = "System RAM"; break;
 21.1157 +		case E820_ACPI:	res->name = "ACPI Tables"; break;
 21.1158 +		case E820_NVS:	res->name = "ACPI Non-volatile Storage"; break;
 21.1159 +		default:	res->name = "reserved";
 21.1160 +		}
 21.1161 +		res->start = e820.map[i].addr;
 21.1162 +		res->end = res->start + e820.map[i].size - 1;
 21.1163 +		res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
 21.1164 +		request_resource(&iomem_resource, res);
 21.1165 +		if (e820.map[i].type == E820_RAM) {
 21.1166 +			/*
 21.1167 +			 *  We don't know which RAM region contains kernel data,
 21.1168 +			 *  so we try it repeatedly and let the resource manager
 21.1169 +			 *  test it.
 21.1170 +			 */
 21.1171 +			request_resource(res, code_resource);
 21.1172 +			request_resource(res, data_resource);
 21.1173 +		}
 21.1174 +	}
 21.1175 +}
 21.1176 +
 21.1177 +/*
 21.1178 + * Request address space for all standard resources
 21.1179 + */
 21.1180 +static void __init register_memory(unsigned long max_low_pfn)
 21.1181 +{
 21.1182 +	unsigned long low_mem_size;
 21.1183 +	int	      i;
 21.1184 +
 21.1185 +	if (efi_enabled)
 21.1186 +		efi_initialize_iomem_resources(&code_resource, &data_resource);
 21.1187 +	else
 21.1188 +		legacy_init_iomem_resources(&code_resource, &data_resource);
 21.1189 +
 21.1190 +	/* EFI systems may still have VGA */
 21.1191 +	request_resource(&iomem_resource, &video_ram_resource);
 21.1192 +
 21.1193 +	/* request I/O space for devices used on all i[345]86 PCs */
 21.1194 +	for (i = 0; i < STANDARD_IO_RESOURCES; i++)
 21.1195 +		request_resource(&ioport_resource, &standard_io_resources[i]);
 21.1196 +
 21.1197 +	/* Tell the PCI layer not to allocate too close to the RAM area.. */
 21.1198 +	low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
 21.1199 +	if (low_mem_size > pci_mem_start)
 21.1200 +		pci_mem_start = low_mem_size;
 21.1201 +}
 21.1202 +
 21.1203 +/* Use inline assembly to define this because the nops are defined 
 21.1204 +   as inline assembly strings in the include files and we cannot 
 21.1205 +   get them easily into strings. */
 21.1206 +asm("\t.data\nintelnops: " 
 21.1207 +    GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6
 21.1208 +    GENERIC_NOP7 GENERIC_NOP8); 
 21.1209 +asm("\t.data\nk8nops: " 
 21.1210 +    K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6
 21.1211 +    K8_NOP7 K8_NOP8); 
 21.1212 +asm("\t.data\nk7nops: " 
 21.1213 +    K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6
 21.1214 +    K7_NOP7 K7_NOP8); 
 21.1215 +    
 21.1216 +extern unsigned char intelnops[], k8nops[], k7nops[];
 21.1217 +static unsigned char *intel_nops[ASM_NOP_MAX+1] = { 
 21.1218 +     NULL,
 21.1219 +     intelnops,
 21.1220 +     intelnops + 1,
 21.1221 +     intelnops + 1 + 2,
 21.1222 +     intelnops + 1 + 2 + 3,
 21.1223 +     intelnops + 1 + 2 + 3 + 4,
 21.1224 +     intelnops + 1 + 2 + 3 + 4 + 5,
 21.1225 +     intelnops + 1 + 2 + 3 + 4 + 5 + 6,
 21.1226 +     intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
 21.1227 +}; 
 21.1228 +static unsigned char *k8_nops[ASM_NOP_MAX+1] = { 
 21.1229 +     NULL,
 21.1230 +     k8nops,
 21.1231 +     k8nops + 1,
 21.1232 +     k8nops + 1 + 2,
 21.1233 +     k8nops + 1 + 2 + 3,
 21.1234 +     k8nops + 1 + 2 + 3 + 4,
 21.1235 +     k8nops + 1 + 2 + 3 + 4 + 5,
 21.1236 +     k8nops + 1 + 2 + 3 + 4 + 5 + 6,
 21.1237 +     k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
 21.1238 +}; 
 21.1239 +static unsigned char *k7_nops[ASM_NOP_MAX+1] = { 
 21.1240 +     NULL,
 21.1241 +     k7nops,
 21.1242 +     k7nops + 1,
 21.1243 +     k7nops + 1 + 2,
 21.1244 +     k7nops + 1 + 2 + 3,
 21.1245 +     k7nops + 1 + 2 + 3 + 4,
 21.1246 +     k7nops + 1 + 2 + 3 + 4 + 5,
 21.1247 +     k7nops + 1 + 2 + 3 + 4 + 5 + 6,
 21.1248 +     k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
 21.1249 +}; 
 21.1250 +static struct nop { 
 21.1251 +     int cpuid; 
 21.1252 +     unsigned char **noptable; 
 21.1253 +} noptypes[] = { 
 21.1254 +     { X86_FEATURE_K8, k8_nops }, 
 21.1255 +     { X86_FEATURE_K7, k7_nops }, 
 21.1256 +     { -1, NULL }
 21.1257 +}; 
 21.1258 +
 21.1259 +/* Replace instructions with better alternatives for this CPU type.
 21.1260 +
 21.1261 +   This runs before SMP is initialized to avoid SMP problems with
 21.1262 +   self modifying code. This implies that assymetric systems where
 21.1263 +   APs have less capabilities than the boot processor are not handled. 
 21.1264 +   In this case boot with "noreplacement". */ 
 21.1265 +void apply_alternatives(void *start, void *end) 
 21.1266 +{ 
 21.1267 +	struct alt_instr *a; 
 21.1268 +	int diff, i, k;
 21.1269 +        unsigned char **noptable = intel_nops; 
 21.1270 +	for (i = 0; noptypes[i].cpuid >= 0; i++) { 
 21.1271 +		if (boot_cpu_has(noptypes[i].cpuid)) { 
 21.1272 +			noptable = noptypes[i].noptable;
 21.1273 +			break;
 21.1274 +		}
 21.1275 +	} 
 21.1276 +	for (a = start; (void *)a < end; a++) { 
 21.1277 +		if (!boot_cpu_has(a->cpuid))
 21.1278 +			continue;
 21.1279 +		BUG_ON(a->replacementlen > a->instrlen); 
 21.1280 +		memcpy(a->instr, a->replacement, a->replacementlen); 
 21.1281 +		diff = a->instrlen - a->replacementlen; 
 21.1282 +		/* Pad the rest with nops */
 21.1283 +		for (i = a->replacementlen; diff > 0; diff -= k, i += k) {
 21.1284 +			k = diff;
 21.1285 +			if (k > ASM_NOP_MAX)
 21.1286 +				k = ASM_NOP_MAX;
 21.1287 +			memcpy(a->instr + i, noptable[k], k); 
 21.1288 +		} 
 21.1289 +	}
 21.1290 +} 
 21.1291 +
 21.1292 +static int no_replacement __initdata = 0; 
 21.1293 + 
 21.1294 +void __init alternative_instructions(void)
 21.1295 +{
 21.1296 +	extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
 21.1297 +	if (no_replacement) 
 21.1298 +		return;
 21.1299 +	apply_alternatives(__alt_instructions, __alt_instructions_end);
 21.1300 +}
 21.1301 +
 21.1302 +static int __init noreplacement_setup(char *s)
 21.1303 +{ 
 21.1304 +     no_replacement = 1; 
 21.1305 +     return 0; 
 21.1306 +} 
 21.1307 +
 21.1308 +__setup("noreplacement", noreplacement_setup); 
 21.1309 +
 21.1310 +static char * __init machine_specific_memory_setup(void);
 21.1311 +
 21.1312 +/*
 21.1313 + * Determine if we were loaded by an EFI loader.  If so, then we have also been
 21.1314 + * passed the efi memmap, systab, etc., so we should use these data structures
 21.1315 + * for initialization.  Note, the efi init code path is determined by the
 21.1316 + * global efi_enabled. This allows the same kernel image to be used on existing
 21.1317 + * systems (with a traditional BIOS) as well as on EFI systems.
 21.1318 + */
 21.1319 +void __init setup_arch(char **cmdline_p)
 21.1320 +{
 21.1321 +        int i,j;
 21.1322 +
 21.1323 +        unsigned long max_low_pfn;
 21.1324 +
 21.1325 +	/* Force a quick death if the kernel panics. */
 21.1326 +	extern int panic_timeout;
 21.1327 +	if ( panic_timeout == 0 )
 21.1328 +		panic_timeout = 1;
 21.1329 +
 21.1330 +	HYPERVISOR_vm_assist(VMASST_CMD_enable,
 21.1331 +			     VMASST_TYPE_4gb_segments);
 21.1332 +
 21.1333 +	memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
 21.1334 +	early_cpu_init();
 21.1335 +
 21.1336 +	/*
 21.1337 +	 * FIXME: This isn't an official loader_type right
 21.1338 +	 * now but does currently work with elilo.
 21.1339 +	 * If we were configured as an EFI kernel, check to make
 21.1340 +	 * sure that we were loaded correctly from elilo and that
 21.1341 +	 * the system table is valid.  If not, then initialize normally.
 21.1342 +	 */
 21.1343 +#ifdef CONFIG_EFI
 21.1344 +	if ((LOADER_TYPE == 0x50) && EFI_SYSTAB)
 21.1345 +		efi_enabled = 1;
 21.1346 +#endif
 21.1347 +
 21.1348 + 	ROOT_DEV = MKDEV(RAMDISK_MAJOR,0); /*old_decode_dev(ORIG_ROOT_DEV);*/
 21.1349 + 	drive_info = DRIVE_INFO;
 21.1350 + 	screen_info = SCREEN_INFO;
 21.1351 +	edid_info = EDID_INFO;
 21.1352 +	apm_info.bios = APM_BIOS_INFO;
 21.1353 +	ist_info = IST_INFO;
 21.1354 +	saved_videomode = VIDEO_MODE;
 21.1355 +	if( SYS_DESC_TABLE.length != 0 ) {
 21.1356 +		MCA_bus = SYS_DESC_TABLE.table[3] &0x2;
 21.1357 +		machine_id = SYS_DESC_TABLE.table[0];
 21.1358 +		machine_submodel_id = SYS_DESC_TABLE.table[1];
 21.1359 +		BIOS_revision = SYS_DESC_TABLE.table[2];
 21.1360 +	}
 21.1361 +	aux_device_present = AUX_DEVICE_INFO;
 21.1362 +
 21.1363 +#ifdef CONFIG_XEN_PHYSDEV_ACCESS
 21.1364 +	/* This is drawn from a dump from vgacon:startup in standard Linux. */
 21.1365 +	screen_info.orig_video_mode = 3; 
 21.1366 +	screen_info.orig_video_isVGA = 1;
 21.1367 +	screen_info.orig_video_lines = 25;
 21.1368 +	screen_info.orig_video_cols = 80;
 21.1369 +	screen_info.orig_video_ega_bx = 3;
 21.1370 +	screen_info.orig_video_points = 16;
 21.1371 +#endif
 21.1372 +
 21.1373 +#ifdef CONFIG_BLK_DEV_RAM
 21.1374 +	rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK;
 21.1375 +	rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0);
 21.1376 +	rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
 21.1377 +#endif
 21.1378 +	ARCH_SETUP
 21.1379 +	if (efi_enabled)
 21.1380 +		efi_init();
 21.1381 +	else {
 21.1382 +		printk(KERN_INFO "BIOS-provided physical RAM map:\n");
 21.1383 +		print_memory_map(machine_specific_memory_setup());
 21.1384 +	}
 21.1385 +
 21.1386 +	copy_edd();
 21.1387 +
 21.1388 +	if (!MOUNT_ROOT_RDONLY)
 21.1389 +		root_mountflags &= ~MS_RDONLY;
 21.1390 +	init_mm.start_code = (unsigned long) _text;
 21.1391 +	init_mm.end_code = (unsigned long) _etext;
 21.1392 +	init_mm.end_data = (unsigned long) _edata;
 21.1393 +	init_mm.brk = (PFN_UP(__pa(xen_start_info.pt_base)) + xen_start_info.nr_pt_frames) << PAGE_SHIFT;
 21.1394 +
 21.1395 +	code_resource.start = virt_to_phys(_text);
 21.1396 +	code_resource.end = virt_to_phys(_etext)-1;
 21.1397 +	data_resource.start = virt_to_phys(_etext);
 21.1398 +	data_resource.end = virt_to_phys(_edata)-1;
 21.1399 +
 21.1400 +	parse_cmdline_early(cmdline_p);
 21.1401 +
 21.1402 +	max_low_pfn = setup_memory();
 21.1403 +
 21.1404 +	/*
 21.1405 +	 * NOTE: before this point _nobody_ is allowed to allocate
 21.1406 +	 * any memory using the bootmem allocator.  Although the
 21.1407 +	 * alloctor is now initialised only the first 8Mb of the kernel
 21.1408 +	 * virtual address space has been mapped.  All allocations before
 21.1409 +	 * paging_init() has completed must use the alloc_bootmem_low_pages()
 21.1410 +	 * variant (which allocates DMA'able memory) and care must be taken
 21.1411 +	 * not to exceed the 8Mb limit.
 21.1412 +	 */
 21.1413 +
 21.1414 +#ifdef CONFIG_SMP
 21.1415 +	smp_alloc_memory(); /* AP processor realmode stacks in low memory*/
 21.1416 +#endif
 21.1417 +	paging_init();
 21.1418 +
 21.1419 +	pfn_to_mfn_frame_list = alloc_bootmem_low_pages(PAGE_SIZE);
 21.1420 +	for ( i=0, j=0; i < max_pfn; i+=(PAGE_SIZE/sizeof(unsigned long)), j++ )
 21.1421 +	{	
 21.1422 +	     pfn_to_mfn_frame_list[j] = 
 21.1423 +		  virt_to_machine(&phys_to_machine_mapping[i]) >> PAGE_SHIFT;
 21.1424 +	}
 21.1425 +	HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list =
 21.1426 +	     virt_to_machine(pfn_to_mfn_frame_list) >> PAGE_SHIFT;
 21.1427 +
 21.1428 +
 21.1429 +	/*
 21.1430 +	 * NOTE: at this point the bootmem allocator is fully available.
 21.1431 +	 */
 21.1432 +
 21.1433 +#ifdef CONFIG_EARLY_PRINTK
 21.1434 +	{
 21.1435 +		char *s = strstr(*cmdline_p, "earlyprintk=");
 21.1436 +		if (s) {
 21.1437 +			extern void setup_early_printk(char *);
 21.1438 +
 21.1439 +			setup_early_printk(s);
 21.1440 +			printk("early console enabled\n");
 21.1441 +		}
 21.1442 +	}
 21.1443 +#endif
 21.1444 +
 21.1445 +
 21.1446 +	dmi_scan_machine();
 21.1447 +
 21.1448 +#ifdef CONFIG_X86_GENERICARCH
 21.1449 +	generic_apic_probe(*cmdline_p);
 21.1450 +#endif	
 21.1451 +	if (efi_enabled)
 21.1452 +		efi_map_memmap();
 21.1453 +
 21.1454 +	/*
 21.1455 +	 * Parse the ACPI tables for possible boot-time SMP configuration.
 21.1456 +	 */
 21.1457 +	acpi_boot_init();
 21.1458 +
 21.1459 +#ifdef CONFIG_X86_LOCAL_APIC
 21.1460 +	if (smp_found_config)
 21.1461 +		get_smp_config();
 21.1462 +#endif
 21.1463 +
 21.1464 +	register_memory(max_low_pfn);
 21.1465 +
 21.1466 +	/* If we are a privileged guest OS then we should request IO privs. */
 21.1467 +	if (xen_start_info.flags & SIF_PRIVILEGED) {
 21.1468 +		dom0_op_t op;
 21.1469 +		op.cmd           = DOM0_IOPL;
 21.1470 +		op.u.iopl.domain = DOMID_SELF;
 21.1471 +		op.u.iopl.iopl   = 1;
 21.1472 +		if (HYPERVISOR_dom0_op(&op) != 0)
 21.1473 +			panic("Unable to obtain IOPL, despite SIF_PRIVILEGED");
 21.1474 +		current->thread.io_pl = 1;
 21.1475 +	}
 21.1476 +
 21.1477 +	if (xen_start_info.flags & SIF_INITDOMAIN) {
 21.1478 +		if (!(xen_start_info.flags & SIF_PRIVILEGED))
 21.1479 +			panic("Xen granted us console access "
 21.1480 +			      "but not privileged status");
 21.1481 +
 21.1482 +#ifdef CONFIG_VT
 21.1483 +#if defined(CONFIG_VGA_CONSOLE)
 21.1484 +		if (!efi_enabled ||
 21.1485 +		    (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
 21.1486 +			conswitchp = &vga_con;
 21.1487 +#elif defined(CONFIG_DUMMY_CONSOLE)
 21.1488 +		conswitchp = &dummy_con;
 21.1489 +#endif
 21.1490 +#endif
 21.1491 +	} else {
 21.1492 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
 21.1493 +		extern const struct consw xennull_con;
 21.1494 +		extern int console_use_vt;
 21.1495 +#if defined(CONFIG_VGA_CONSOLE)
 21.1496 +		/* disable VGA driver */
 21.1497 +		ORIG_VIDEO_ISVGA = VIDEO_TYPE_VLFB;
 21.1498 +#endif
 21.1499 +		conswitchp = &xennull_con;
 21.1500 +		console_use_vt = 0;
 21.1501 +#endif
 21.1502 +	}
 21.1503 +}
 21.1504 +
 21.1505 +#include "setup_arch_post.h"
 21.1506 +/*
 21.1507 + * Local Variables:
 21.1508 + * mode:c
 21.1509 + * c-file-style:"k&r"
 21.1510 + * c-basic-offset:8
 21.1511 + * End:
 21.1512 + */
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/signal.c	Fri Nov 19 00:40:52 2004 +0000
    22.3 @@ -0,0 +1,649 @@
    22.4 +/*
    22.5 + *  linux/arch/i386/kernel/signal.c
    22.6 + *
    22.7 + *  Copyright (C) 1991, 1992  Linus Torvalds
    22.8 + *
    22.9 + *  1997-11-28  Modified for POSIX.1b signals by Richard Henderson
   22.10 + *  2000-06-20  Pentium III FXSR, SSE support by Gareth Hughes
   22.11 + */
   22.12 +
   22.13 +#include <linux/sched.h>
   22.14 +#include <linux/mm.h>
   22.15 +#include <linux/smp.h>
   22.16 +#include <linux/smp_lock.h>
   22.17 +#include <linux/kernel.h>
   22.18 +#include <linux/signal.h>
   22.19 +#include <linux/errno.h>
   22.20 +#include <linux/wait.h>
   22.21 +#include <linux/unistd.h>
   22.22 +#include <linux/stddef.h>
   22.23 +#include <linux/personality.h>
   22.24 +#include <linux/suspend.h>
   22.25 +#include <linux/ptrace.h>
   22.26 +#include <linux/elf.h>
   22.27 +#include <asm/processor.h>
   22.28 +#include <asm/ucontext.h>
   22.29 +#include <asm/uaccess.h>
   22.30 +#include <asm/i387.h>
   22.31 +#include "sigframe.h"
   22.32 +
   22.33 +#define DEBUG_SIG 0
   22.34 +
   22.35 +#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
   22.36 +
   22.37 +/*
   22.38 + * Atomically swap in the new signal mask, and wait for a signal.
   22.39 + */
   22.40 +asmlinkage int
   22.41 +sys_sigsuspend(int history0, int history1, old_sigset_t mask)
   22.42 +{
   22.43 +	struct pt_regs * regs = (struct pt_regs *) &history0;
   22.44 +	sigset_t saveset;
   22.45 +
   22.46 +	mask &= _BLOCKABLE;
   22.47 +	spin_lock_irq(&current->sighand->siglock);
   22.48 +	saveset = current->blocked;
   22.49 +	siginitset(&current->blocked, mask);
   22.50 +	recalc_sigpending();
   22.51 +	spin_unlock_irq(&current->sighand->siglock);
   22.52 +
   22.53 +	regs->eax = -EINTR;
   22.54 +	while (1) {
   22.55 +		current->state = TASK_INTERRUPTIBLE;
   22.56 +		schedule();
   22.57 +		if (do_signal(regs, &saveset))
   22.58 +			return -EINTR;
   22.59 +	}
   22.60 +}
   22.61 +
   22.62 +asmlinkage int
   22.63 +sys_rt_sigsuspend(struct pt_regs regs)
   22.64 +{
   22.65 +	sigset_t saveset, newset;
   22.66 +
   22.67 +	/* XXX: Don't preclude handling different sized sigset_t's.  */
   22.68 +	if (regs.ecx != sizeof(sigset_t))
   22.69 +		return -EINVAL;
   22.70 +
   22.71 +	if (copy_from_user(&newset, (sigset_t __user *)regs.ebx, sizeof(newset)))
   22.72 +		return -EFAULT;
   22.73 +	sigdelsetmask(&newset, ~_BLOCKABLE);
   22.74 +
   22.75 +	spin_lock_irq(&current->sighand->siglock);
   22.76 +	saveset = current->blocked;
   22.77 +	current->blocked = newset;
   22.78 +	recalc_sigpending();
   22.79 +	spin_unlock_irq(&current->sighand->siglock);
   22.80 +
   22.81 +	regs.eax = -EINTR;
   22.82 +	while (1) {
   22.83 +		current->state = TASK_INTERRUPTIBLE;
   22.84 +		schedule();
   22.85 +		if (do_signal(&regs, &saveset))
   22.86 +			return -EINTR;
   22.87 +	}
   22.88 +}
   22.89 +
   22.90 +asmlinkage int 
   22.91 +sys_sigaction(int sig, const struct old_sigaction __user *act,
   22.92 +	      struct old_sigaction __user *oact)
   22.93 +{
   22.94 +	struct k_sigaction new_ka, old_ka;
   22.95 +	int ret;
   22.96 +
   22.97 +	if (act) {
   22.98 +		old_sigset_t mask;
   22.99 +		if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
  22.100 +		    __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
  22.101 +		    __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
  22.102 +			return -EFAULT;
  22.103 +		__get_user(new_ka.sa.sa_flags, &act->sa_flags);
  22.104 +		__get_user(mask, &act->sa_mask);
  22.105 +		siginitset(&new_ka.sa.sa_mask, mask);
  22.106 +	}
  22.107 +
  22.108 +	ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
  22.109 +
  22.110 +	if (!ret && oact) {
  22.111 +		if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
  22.112 +		    __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
  22.113 +		    __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
  22.114 +			return -EFAULT;
  22.115 +		__put_user(old_ka.sa.sa_flags, &oact->sa_flags);
  22.116 +		__put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
  22.117 +	}
  22.118 +
  22.119 +	return ret;
  22.120 +}
  22.121 +
  22.122 +asmlinkage int
  22.123 +sys_sigaltstack(unsigned long ebx)
  22.124 +{
  22.125 +	/* This is needed to make gcc realize it doesn't own the "struct pt_regs" */
  22.126 +	struct pt_regs *regs = (struct pt_regs *)&ebx;
  22.127 +	const stack_t __user *uss = (const stack_t __user *)ebx;
  22.128 +	stack_t __user *uoss = (stack_t __user *)regs->ecx;
  22.129 +
  22.130 +	return do_sigaltstack(uss, uoss, regs->esp);
  22.131 +}
  22.132 +
  22.133 +
  22.134 +/*
  22.135 + * Do a signal return; undo the signal stack.
  22.136 + */
  22.137 +
  22.138 +static int
  22.139 +restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *peax)
  22.140 +{
  22.141 +	unsigned int err = 0;
  22.142 +
  22.143 +	/* Always make any pending restarted system calls return -EINTR */
  22.144 +	current_thread_info()->restart_block.fn = do_no_restart_syscall;
  22.145 +
  22.146 +#define COPY(x)		err |= __get_user(regs->x, &sc->x)
  22.147 +
  22.148 +#define COPY_SEG(seg)							\
  22.149 +	{ unsigned short tmp;						\
  22.150 +	  err |= __get_user(tmp, &sc->seg);				\
  22.151 +	  regs->x##seg = tmp; }
  22.152 +
  22.153 +#define COPY_SEG_STRICT(seg)						\
  22.154 +	{ unsigned short tmp;						\
  22.155 +	  err |= __get_user(tmp, &sc->seg);				\
  22.156 +	  regs->x##seg = tmp|3; }
  22.157 +
  22.158 +#define GET_SEG(seg)							\
  22.159 +	{ unsigned short tmp;						\
  22.160 +	  err |= __get_user(tmp, &sc->seg);				\
  22.161 +	  loadsegment(seg,tmp); }
  22.162 +
  22.163 +#define	FIX_EFLAGS	(X86_EFLAGS_AC | X86_EFLAGS_OF | X86_EFLAGS_DF | \
  22.164 +			 X86_EFLAGS_TF | X86_EFLAGS_SF | X86_EFLAGS_ZF | \
  22.165 +			 X86_EFLAGS_AF | X86_EFLAGS_PF | X86_EFLAGS_CF)
  22.166 +
  22.167 +	GET_SEG(gs);
  22.168 +	GET_SEG(fs);
  22.169 +	COPY_SEG(es);
  22.170 +	COPY_SEG(ds);
  22.171 +	COPY(edi);
  22.172 +	COPY(esi);
  22.173 +	COPY(ebp);
  22.174 +	COPY(esp);
  22.175 +	COPY(ebx);
  22.176 +	COPY(edx);
  22.177 +	COPY(ecx);
  22.178 +	COPY(eip);
  22.179 +	COPY_SEG_STRICT(cs);
  22.180 +	COPY_SEG_STRICT(ss);
  22.181 +	
  22.182 +	{
  22.183 +		unsigned int tmpflags;
  22.184 +		err |= __get_user(tmpflags, &sc->eflags);
  22.185 +		regs->eflags = (regs->eflags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
  22.186 +		regs->orig_eax = -1;		/* disable syscall checks */
  22.187 +	}
  22.188 +
  22.189 +	{
  22.190 +		struct _fpstate __user * buf;
  22.191 +		err |= __get_user(buf, &sc->fpstate);
  22.192 +		if (buf) {
  22.193 +			if (verify_area(VERIFY_READ, buf, sizeof(*buf)))
  22.194 +				goto badframe;
  22.195 +			err |= restore_i387(buf);
  22.196 +		}
  22.197 +	}
  22.198 +
  22.199 +	err |= __get_user(*peax, &sc->eax);
  22.200 +	return err;
  22.201 +
  22.202 +badframe:
  22.203 +	return 1;
  22.204 +}
  22.205 +
  22.206 +asmlinkage int sys_sigreturn(unsigned long __unused)
  22.207 +{
  22.208 +	struct pt_regs *regs = (struct pt_regs *) &__unused;
  22.209 +	struct sigframe __user *frame = (struct sigframe __user *)(regs->esp - 8);
  22.210 +	sigset_t set;
  22.211 +	int eax;
  22.212 +
  22.213 +	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  22.214 +		goto badframe;
  22.215 +	if (__get_user(set.sig[0], &frame->sc.oldmask)
  22.216 +	    || (_NSIG_WORDS > 1
  22.217 +		&& __copy_from_user(&set.sig[1], &frame->extramask,
  22.218 +				    sizeof(frame->extramask))))
  22.219 +		goto badframe;
  22.220 +
  22.221 +	sigdelsetmask(&set, ~_BLOCKABLE);
  22.222 +	spin_lock_irq(&current->sighand->siglock);
  22.223 +	current->blocked = set;
  22.224 +	recalc_sigpending();
  22.225 +	spin_unlock_irq(&current->sighand->siglock);
  22.226 +	
  22.227 +	if (restore_sigcontext(regs, &frame->sc, &eax))
  22.228 +		goto badframe;
  22.229 +	return eax;
  22.230 +
  22.231 +badframe:
  22.232 +	force_sig(SIGSEGV, current);
  22.233 +	return 0;
  22.234 +}	
  22.235 +
  22.236 +asmlinkage int sys_rt_sigreturn(unsigned long __unused)
  22.237 +{
  22.238 +	struct pt_regs *regs = (struct pt_regs *) &__unused;
  22.239 +	struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(regs->esp - 4);
  22.240 +	sigset_t set;
  22.241 +	int eax;
  22.242 +
  22.243 +	if (verify_area(VERIFY_READ, frame, sizeof(*frame)))
  22.244 +		goto badframe;
  22.245 +	if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
  22.246 +		goto badframe;
  22.247 +
  22.248 +	sigdelsetmask(&set, ~_BLOCKABLE);
  22.249 +	spin_lock_irq(&current->sighand->siglock);
  22.250 +	current->blocked = set;
  22.251 +	recalc_sigpending();
  22.252 +	spin_unlock_irq(&current->sighand->siglock);
  22.253 +	
  22.254 +	if (restore_sigcontext(regs, &frame->uc.uc_mcontext, &eax))
  22.255 +		goto badframe;
  22.256 +
  22.257 +	if (do_sigaltstack(&frame->uc.uc_stack, NULL, regs->esp) == -EFAULT)
  22.258 +		goto badframe;
  22.259 +
  22.260 +	return eax;
  22.261 +
  22.262 +badframe:
  22.263 +	force_sig(SIGSEGV, current);
  22.264 +	return 0;
  22.265 +}	
  22.266 +
  22.267 +/*
  22.268 + * Set up a signal frame.
  22.269 + */
  22.270 +
  22.271 +static int
  22.272 +setup_sigcontext(struct sigcontext __user *sc, struct _fpstate __user *fpstate,
  22.273 +		 struct pt_regs *regs, unsigned long mask)
  22.274 +{
  22.275 +	int tmp, err = 0;
  22.276 +	unsigned long eflags;
  22.277 +
  22.278 +	tmp = 0;
  22.279 +	__asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp));
  22.280 +	err |= __put_user(tmp, (unsigned int __user *)&sc->gs);
  22.281 +	__asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp));
  22.282 +	err |= __put_user(tmp, (unsigned int __user *)&sc->fs);
  22.283 +
  22.284 +	err |= __put_user(regs->xes, (unsigned int __user *)&sc->es);
  22.285 +	err |= __put_user(regs->xds, (unsigned int __user *)&sc->ds);
  22.286 +	err |= __put_user(regs->edi, &sc->edi);
  22.287 +	err |= __put_user(regs->esi, &sc->esi);
  22.288 +	err |= __put_user(regs->ebp, &sc->ebp);
  22.289 +	err |= __put_user(regs->esp, &sc->esp);
  22.290 +	err |= __put_user(regs->ebx, &sc->ebx);
  22.291 +	err |= __put_user(regs->edx, &sc->edx);
  22.292 +	err |= __put_user(regs->ecx, &sc->ecx);
  22.293 +	err |= __put_user(regs->eax, &sc->eax);
  22.294 +	err |= __put_user(current->thread.trap_no, &sc->trapno);
  22.295 +	err |= __put_user(current->thread.error_code, &sc->err);
  22.296 +	err |= __put_user(regs->eip, &sc->eip);
  22.297 +	err |= __put_user(regs->xcs, (unsigned int __user *)&sc->cs);
  22.298 +	eflags = regs->eflags;
  22.299 +	if (current->ptrace & PT_PTRACED) {
  22.300 +		eflags &= ~TF_MASK;
  22.301 +	}
  22.302 +	err |= __put_user(eflags, &sc->eflags);
  22.303 +	err |= __put_user(regs->esp, &sc->esp_at_signal);
  22.304 +	err |= __put_user(regs->xss, (unsigned int __user *)&sc->ss);
  22.305 +
  22.306 +	tmp = save_i387(fpstate);
  22.307 +	if (tmp < 0)
  22.308 +	  err = 1;
  22.309 +	else
  22.310 +	  err |= __put_user(tmp ? fpstate : NULL, &sc->fpstate);
  22.311 +
  22.312 +	/* non-iBCS2 extensions.. */
  22.313 +	err |= __put_user(mask, &sc->oldmask);
  22.314 +	err |= __put_user(current->thread.cr2, &sc->cr2);
  22.315 +
  22.316 +	return err;
  22.317 +}
  22.318 +
  22.319 +/*
  22.320 + * Determine which stack to use..
  22.321 + */
  22.322 +static inline void __user *
  22.323 +get_sigframe(struct k_sigaction *ka, struct pt_regs * regs, size_t frame_size)
  22.324 +{
  22.325 +	unsigned long esp;
  22.326 +
  22.327 +	/* Default to using normal stack */
  22.328 +	esp = regs->esp;
  22.329 +
  22.330 +	/* This is the X/Open sanctioned signal stack switching.  */
  22.331 +	if (ka->sa.sa_flags & SA_ONSTACK) {
  22.332 +		if (sas_ss_flags(esp) == 0)
  22.333 +			esp = current->sas_ss_sp + current->sas_ss_size;
  22.334 +	}
  22.335 +
  22.336 +	/* This is the legacy signal stack switching. */
  22.337 +	else if ((regs->xss & 0xffff) != __USER_DS &&
  22.338 +		 !(ka->sa.sa_flags & SA_RESTORER) &&
  22.339 +		 ka->sa.sa_restorer) {
  22.340 +		esp = (unsigned long) ka->sa.sa_restorer;
  22.341 +	}
  22.342 +
  22.343 +	return (void __user *)((esp - frame_size) & -8ul);
  22.344 +}
  22.345 +
  22.346 +/* These symbols are defined with the addresses in the vsyscall page.
  22.347 +   See vsyscall-sigreturn.S.  */
  22.348 +extern void __user __kernel_sigreturn;
  22.349 +extern void __user __kernel_rt_sigreturn;
  22.350 +
  22.351 +static void setup_frame(int sig, struct k_sigaction *ka,
  22.352 +			sigset_t *set, struct pt_regs * regs)
  22.353 +{
  22.354 +	void __user *restorer;
  22.355 +	struct sigframe __user *frame;
  22.356 +	int err = 0;
  22.357 +	int usig;
  22.358 +
  22.359 +	frame = get_sigframe(ka, regs, sizeof(*frame));
  22.360 +
  22.361 +	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  22.362 +		goto give_sigsegv;
  22.363 +
  22.364 +	usig = current_thread_info()->exec_domain
  22.365 +		&& current_thread_info()->exec_domain->signal_invmap
  22.366 +		&& sig < 32
  22.367 +		? current_thread_info()->exec_domain->signal_invmap[sig]
  22.368 +		: sig;
  22.369 +
  22.370 +	err |= __put_user(usig, &frame->sig);
  22.371 +	if (err)
  22.372 +		goto give_sigsegv;
  22.373 +
  22.374 +	err |= setup_sigcontext(&frame->sc, &frame->fpstate, regs, set->sig[0]);
  22.375 +	if (err)
  22.376 +		goto give_sigsegv;
  22.377 +
  22.378 +	if (_NSIG_WORDS > 1) {
  22.379 +		err |= __copy_to_user(&frame->extramask, &set->sig[1],
  22.380 +				      sizeof(frame->extramask));
  22.381 +	}
  22.382 +	if (err)
  22.383 +		goto give_sigsegv;
  22.384 +
  22.385 +	restorer = &__kernel_sigreturn;
  22.386 +	if (ka->sa.sa_flags & SA_RESTORER)
  22.387 +		restorer = ka->sa.sa_restorer;
  22.388 +
  22.389 +	/* Set up to return from userspace.  */
  22.390 +	err |= __put_user(restorer, &frame->pretcode);
  22.391 +	 
  22.392 +	/*
  22.393 +	 * This is popl %eax ; movl $,%eax ; int $0x80
  22.394 +	 *
  22.395 +	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
  22.396 +	 * reasons and because gdb uses it as a signature to notice
  22.397 +	 * signal handler stack frames.
  22.398 +	 */
  22.399 +	err |= __put_user(0xb858, (short __user *)(frame->retcode+0));
  22.400 +	err |= __put_user(__NR_sigreturn, (int __user *)(frame->retcode+2));
  22.401 +	err |= __put_user(0x80cd, (short __user *)(frame->retcode+6));
  22.402 +
  22.403 +	if (err)
  22.404 +		goto give_sigsegv;
  22.405 +
  22.406 +	/* Set up registers for signal handler */
  22.407 +	regs->esp = (unsigned long) frame;
  22.408 +	regs->eip = (unsigned long) ka->sa.sa_handler;
  22.409 +	regs->eax = (unsigned long) sig;
  22.410 +	regs->edx = (unsigned long) 0;
  22.411 +	regs->ecx = (unsigned long) 0;
  22.412 +
  22.413 +	set_fs(USER_DS);
  22.414 +	regs->xds = __USER_DS;
  22.415 +	regs->xes = __USER_DS;
  22.416 +	regs->xss = __USER_DS;
  22.417 +	regs->xcs = __USER_CS;
  22.418 +	if (regs->eflags & TF_MASK) {
  22.419 +		if ((current->ptrace & (PT_PTRACED | PT_DTRACE)) == (PT_PTRACED | PT_DTRACE)) {
  22.420 +			ptrace_notify(SIGTRAP);
  22.421 +		} else {
  22.422 +			regs->eflags &= ~TF_MASK;
  22.423 +		}
  22.424 +	}
  22.425 +
  22.426 +#if DEBUG_SIG
  22.427 +	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  22.428 +		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  22.429 +#endif
  22.430 +
  22.431 +	return;
  22.432 +
  22.433 +give_sigsegv:
  22.434 +	force_sigsegv(sig, current);
  22.435 +}
  22.436 +
  22.437 +static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
  22.438 +			   sigset_t *set, struct pt_regs * regs)
  22.439 +{
  22.440 +	void __user *restorer;
  22.441 +	struct rt_sigframe __user *frame;
  22.442 +	int err = 0;
  22.443 +	int usig;
  22.444 +
  22.445 +	frame = get_sigframe(ka, regs, sizeof(*frame));
  22.446 +
  22.447 +	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
  22.448 +		goto give_sigsegv;
  22.449 +
  22.450 +	usig = current_thread_info()->exec_domain
  22.451 +		&& current_thread_info()->exec_domain->signal_invmap
  22.452 +		&& sig < 32
  22.453 +		? current_thread_info()->exec_domain->signal_invmap[sig]
  22.454 +		: sig;
  22.455 +
  22.456 +	err |= __put_user(usig, &frame->sig);
  22.457 +	err |= __put_user(&frame->info, &frame->pinfo);
  22.458 +	err |= __put_user(&frame->uc, &frame->puc);
  22.459 +	err |= copy_siginfo_to_user(&frame->info, info);
  22.460 +	if (err)
  22.461 +		goto give_sigsegv;
  22.462 +
  22.463 +	/* Create the ucontext.  */
  22.464 +	err |= __put_user(0, &frame->uc.uc_flags);
  22.465 +	err |= __put_user(0, &frame->uc.uc_link);
  22.466 +	err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
  22.467 +	err |= __put_user(sas_ss_flags(regs->esp),
  22.468 +			  &frame->uc.uc_stack.ss_flags);
  22.469 +	err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
  22.470 +	err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->fpstate,
  22.471 +			        regs, set->sig[0]);
  22.472 +	err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
  22.473 +	if (err)
  22.474 +		goto give_sigsegv;
  22.475 +
  22.476 +	/* Set up to return from userspace.  */
  22.477 +	restorer = &__kernel_rt_sigreturn;
  22.478 +	if (ka->sa.sa_flags & SA_RESTORER)
  22.479 +		restorer = ka->sa.sa_restorer;
  22.480 +	err |= __put_user(restorer, &frame->pretcode);
  22.481 +	 
  22.482 +	/*
  22.483 +	 * This is movl $,%eax ; int $0x80
  22.484 +	 *
  22.485 +	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
  22.486 +	 * reasons and because gdb uses it as a signature to notice
  22.487 +	 * signal handler stack frames.
  22.488 +	 */
  22.489 +	err |= __put_user(0xb8, (char __user *)(frame->retcode+0));
  22.490 +	err |= __put_user(__NR_rt_sigreturn, (int __user *)(frame->retcode+1));
  22.491 +	err |= __put_user(0x80cd, (short __user *)(frame->retcode+5));
  22.492 +
  22.493 +	if (err)
  22.494 +		goto give_sigsegv;
  22.495 +
  22.496 +	/* Set up registers for signal handler */
  22.497 +	regs->esp = (unsigned long) frame;
  22.498 +	regs->eip = (unsigned long) ka->sa.sa_handler;
  22.499 +	regs->eax = (unsigned long) usig;
  22.500 +	regs->edx = (unsigned long) &frame->info;
  22.501 +	regs->ecx = (unsigned long) &frame->uc;
  22.502 +
  22.503 +	set_fs(USER_DS);
  22.504 +	regs->xds = __USER_DS;
  22.505 +	regs->xes = __USER_DS;
  22.506 +	regs->xss = __USER_DS;
  22.507 +	regs->xcs = __USER_CS;
  22.508 +	if (regs->eflags & TF_MASK) {
  22.509 +		if (current->ptrace & PT_PTRACED) {
  22.510 +			ptrace_notify(SIGTRAP);
  22.511 +		} else {
  22.512 +			regs->eflags &= ~TF_MASK;
  22.513 +		}
  22.514 +	}
  22.515 +
  22.516 +#if DEBUG_SIG
  22.517 +	printk("SIG deliver (%s:%d): sp=%p pc=%p ra=%p\n",
  22.518 +		current->comm, current->pid, frame, regs->eip, frame->pretcode);
  22.519 +#endif
  22.520 +
  22.521 +	return;
  22.522 +
  22.523 +give_sigsegv:
  22.524 +	force_sigsegv(sig, current);
  22.525 +}
  22.526 +
  22.527 +/*
  22.528 + * OK, we're invoking a handler
  22.529 + */	
  22.530 +
  22.531 +static void
  22.532 +handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
  22.533 +	      sigset_t *oldset,	struct pt_regs * regs)
  22.534 +{
  22.535 +	/* Are we from a system call? */
  22.536 +	if (regs->orig_eax >= 0) {
  22.537 +		/* If so, check system call restarting.. */
  22.538 +		switch (regs->eax) {
  22.539 +		        case -ERESTART_RESTARTBLOCK:
  22.540 +			case -ERESTARTNOHAND:
  22.541 +				regs->eax = -EINTR;
  22.542 +				break;
  22.543 +
  22.544 +			case -ERESTARTSYS:
  22.545 +				if (!(ka->sa.sa_flags & SA_RESTART)) {
  22.546 +					regs->eax = -EINTR;
  22.547 +					break;
  22.548 +				}
  22.549 +			/* fallthrough */
  22.550 +			case -ERESTARTNOINTR:
  22.551 +				regs->eax = regs->orig_eax;
  22.552 +				regs->eip -= 2;
  22.553 +		}
  22.554 +	}
  22.555 +
  22.556 +	/* Set up the stack frame */
  22.557 +	if (ka->sa.sa_flags & SA_SIGINFO)
  22.558 +		setup_rt_frame(sig, ka, info, oldset, regs);
  22.559 +	else
  22.560 +		setup_frame(sig, ka, oldset, regs);
  22.561 +
  22.562 +	if (!(ka->sa.sa_flags & SA_NODEFER)) {
  22.563 +		spin_lock_irq(&current->sighand->siglock);
  22.564 +		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
  22.565 +		sigaddset(&current->blocked,sig);
  22.566 +		recalc_sigpending();
  22.567 +		spin_unlock_irq(&current->sighand->siglock);
  22.568 +	}
  22.569 +}
  22.570 +
  22.571 +/*
  22.572 + * Note that 'init' is a special process: it doesn't get signals it doesn't
  22.573 + * want to handle. Thus you cannot kill init even with a SIGKILL even by
  22.574 + * mistake.
  22.575 + */
  22.576 +int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset)
  22.577 +{
  22.578 +	siginfo_t info;
  22.579 +	int signr;
  22.580 +	struct k_sigaction ka;
  22.581 +
  22.582 +	/*
  22.583 +	 * We want the common case to go fast, which
  22.584 +	 * is why we may in certain cases get here from
  22.585 +	 * kernel mode. Just return without doing anything
  22.586 +	 * if so.
  22.587 +	 */
  22.588 +	if ((regs->xcs & 2) != 2)
  22.589 +		return 1;
  22.590 +
  22.591 +	if (current->flags & PF_FREEZE) {
  22.592 +		refrigerator(0);
  22.593 +		goto no_signal;
  22.594 +	}
  22.595 +
  22.596 +	if (!oldset)
  22.597 +		oldset = &current->blocked;
  22.598 +
  22.599 +	signr = get_signal_to_deliver(&info, &ka, regs, NULL);
  22.600 +	if (signr > 0) {
  22.601 +		/* Reenable any watchpoints before delivering the
  22.602 +		 * signal to user space. The processor register will
  22.603 +		 * have been cleared if the watchpoint triggered
  22.604 +		 * inside the kernel.
  22.605 +		 */
  22.606 +		if (unlikely(current->thread.debugreg[7])) {
  22.607 +			HYPERVISOR_set_debugreg(7,
  22.608 +						current->thread.debugreg[7]);
  22.609 +		}
  22.610 +
  22.611 +		/* Whee!  Actually deliver the signal.  */
  22.612 +		handle_signal(signr, &info, &ka, oldset, regs);
  22.613 +		return 1;
  22.614 +	}
  22.615 +
  22.616 + no_signal:
  22.617 +	/* Did we come from a system call? */
  22.618 +	if (regs->orig_eax >= 0) {
  22.619 +		/* Restart the system call - no handlers present */
  22.620 +		if (regs->eax == -ERESTARTNOHAND ||
  22.621 +		    regs->eax == -ERESTARTSYS ||
  22.622 +		    regs->eax == -ERESTARTNOINTR) {
  22.623 +			regs->eax = regs->orig_eax;
  22.624 +			regs->eip -= 2;
  22.625 +		}
  22.626 +		if (regs->eax == -ERESTART_RESTARTBLOCK){
  22.627 +			regs->eax = __NR_restart_syscall;
  22.628 +			regs->eip -= 2;
  22.629 +		}
  22.630 +	}
  22.631 +	return 0;
  22.632 +}
  22.633 +
  22.634 +/*
  22.635 + * notification of userspace execution resumption
  22.636 + * - triggered by current->work.notify_resume
  22.637 + */
  22.638 +__attribute__((regparm(3)))
  22.639 +void do_notify_resume(struct pt_regs *regs, sigset_t *oldset,
  22.640 +		      __u32 thread_info_flags)
  22.641 +{
  22.642 +	/* Pending single-step? */
  22.643 +	if (thread_info_flags & _TIF_SINGLESTEP) {
  22.644 +		regs->eflags |= TF_MASK;
  22.645 +		clear_thread_flag(TIF_SINGLESTEP);
  22.646 +	}
  22.647 +	/* deal with pending signal delivery */
  22.648 +	if (thread_info_flags & _TIF_SIGPENDING)
  22.649 +		do_signal(regs,oldset);
  22.650 +	
  22.651 +	clear_thread_flag(TIF_IRET);
  22.652 +}
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/sysenter.c	Fri Nov 19 00:40:52 2004 +0000
    23.3 @@ -0,0 +1,65 @@
    23.4 +/*
    23.5 + * linux/arch/i386/kernel/sysenter.c
    23.6 + *
    23.7 + * (C) Copyright 2002 Linus Torvalds
    23.8 + *
    23.9 + * This file contains the needed initializations to support sysenter.
   23.10 + */
   23.11 +
   23.12 +#include <linux/init.h>
   23.13 +#include <linux/smp.h>
   23.14 +#include <linux/thread_info.h>
   23.15 +#include <linux/sched.h>
   23.16 +#include <linux/gfp.h>
   23.17 +#include <linux/string.h>
   23.18 +#include <linux/elf.h>
   23.19 +
   23.20 +#include <asm/cpufeature.h>
   23.21 +#include <asm/msr.h>
   23.22 +#include <asm/pgtable.h>
   23.23 +#include <asm/unistd.h>
   23.24 +
   23.25 +extern asmlinkage void sysenter_entry(void);
   23.26 +
   23.27 +void enable_sep_cpu(void *info)
   23.28 +{
   23.29 +	int cpu = get_cpu();
   23.30 +	struct tss_struct *tss = &per_cpu(init_tss, cpu);
   23.31 +
   23.32 +	tss->ss1 = __KERNEL_CS;
   23.33 +	tss->esp1 = sizeof(struct tss_struct) + (unsigned long) tss;
   23.34 +	wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
   23.35 +	wrmsr(MSR_IA32_SYSENTER_ESP, tss->esp1, 0);
   23.36 +	wrmsr(MSR_IA32_SYSENTER_EIP, (unsigned long) sysenter_entry, 0);
   23.37 +	put_cpu();	
   23.38 +}
   23.39 +
   23.40 +/*
   23.41 + * These symbols are defined by vsyscall.o to mark the bounds
   23.42 + * of the ELF DSO images included therein.
   23.43 + */
   23.44 +extern const char vsyscall_int80_start, vsyscall_int80_end;
   23.45 +extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
   23.46 +
   23.47 +static int __init sysenter_setup(void)
   23.48 +{
   23.49 +	void *page = (void *)get_zeroed_page(GFP_ATOMIC);
   23.50 +
   23.51 +	__set_fixmap(FIX_VSYSCALL, __pa(page), PAGE_READONLY_EXEC);
   23.52 +
   23.53 +	if (1 /* XXXcl not yet */ || !boot_cpu_has(X86_FEATURE_SEP)) {
   23.54 +		memcpy(page,
   23.55 +		       &vsyscall_int80_start,
   23.56 +		       &vsyscall_int80_end - &vsyscall_int80_start);
   23.57 +		return 0;
   23.58 +	}
   23.59 +
   23.60 +	memcpy(page,
   23.61 +	       &vsyscall_sysenter_start,
   23.62 +	       &vsyscall_sysenter_end - &vsyscall_sysenter_start);
   23.63 +
   23.64 +	on_each_cpu(enable_sep_cpu, NULL, 1, 1);
   23.65 +	return 0;
   23.66 +}
   23.67 +
   23.68 +__initcall(sysenter_setup);
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/linux-2.6.10-rc2-xen-sparse/arch/xen/i386/kernel/time.c	Fri Nov 19 00:40:52 2004 +0000
    24.3 @@ -0,0 +1,733 @@
    24.4 +/*
    24.5 + *  linux/arch/i386/kernel/time.c
    24.6 + *
    24.7 + *  Copyright (C) 1991, 1992, 1995  Linus Torvalds
    24.8 + *
    24.9 + * This file contains the PC-specific time handling details:
   24.10 + * reading the RTC at bootup, etc..
   24.11 + * 1994-07-02    Alan Modra
   24.12 + *	fixed set_rtc_mmss, fixed time.year for >= 2000, new mktime
   24.13 + * 1995-03-26    Markus Kuhn
   24.14 + *      fixed 500 ms bug at call to set_rtc_mmss, fixed DS12887
   24.15 + *      precision CMOS clock update
   24.16 + * 1996-05-03    Ingo Molnar
   24.17 + *      fixed time warps in do_[slow|fast]_gettimeoffset()
   24.18 + * 1997-09-10	Updated NTP code according to technical memorandum Jan '96
   24.19 + *		"A Kernel Model for Precision Timekeeping" by Dave Mills
   24.20 + * 1998-09-05    (Various)
   24.21 + *	More robust do_fast_gettimeoffset() algorithm implemented
   24.22 + *	(works with APM, Cyrix 6x86MX and Centaur C6),
   24.23 + *	monotonic gettimeofday() with fast_get_timeoffset(),
   24.24 + *	drift-proof precision TSC calibration on boot
   24.25 + *	(C. Scott Ananian <cananian@alumni.princeton.edu>, Andrew D.
   24.26 + *	Balsa <andrebalsa@altern.org>, Philip Gladstone <philip@raptor.com>;
   24.27 + *	ported from 2.0.35 Jumbo-9 by Michael Krause <m.krause@tu-harburg.de>).
   24.28 + * 1998-12-16    Andrea Arcangeli
   24.29 + *	Fixed Jumbo-9 code in 2.1.131: do_gettimeofday was missing 1 jiffy
   24.30 + *	because was not accounting lost_ticks.
   24.31 + * 1998-12-24 Copyright (C) 1998  Andrea Arcangeli
   24.32 + *	Fixed a xtime SMP race (we need the xtime_lock rw spinlock to
   24.33 + *	serialize accesses to xtime/lost_ticks).
   24.34 + */
   24.35 +
   24.36 +#include <linux/errno.h>
   24.37 +#include <linux/sched.h>
   24.38 +#include <linux/kernel.h>
   24.39 +#include <linux/param.h>
   24.40 +#include <linux/string.h>
   24.41 +#include <linux/mm.h>
   24.42 +#include <linux/interrupt.h>
   24.43 +#include <linux/time.h>
   24.44 +#include <linux/delay.h>
   24.45 +#include <linux/init.h>
   24.46 +#include <linux/smp.h>
   24.47 +#include <linux/module.h>
   24.48 +#include <linux/sysdev.h>
   24.49 +#include <linux/bcd.h>
   24.50 +#include <linux/efi.h>
   24.51 +#include <linux/sysctl.h>
   24.52 +
   24.53 +#include <asm/io.h>
   24.54 +#include <asm/smp.h>
   24.55 +#include <asm/irq.h>
   24.56 +#include <asm/msr.h>
   24.57 +#include <asm/delay.h>
   24.58 +#include <asm/mpspec.h>
   24.59 +#include <asm/uaccess.h>
   24.60 +#include <asm/processor.h>
   24.61 +#include <asm/timer.h>
   24.62 +
   24.63 +#include "mach_time.h"
   24.64 +
   24.65 +#include <linux/timex.h>
   24.66 +#include <linux/config.h>
   24.67 +
   24.68 +#include <asm/hpet.h>
   24.69 +
   24.70 +#include <asm/arch_hooks.h>
   24.71 +
   24.72 +#include "io_ports.h"
   24.73 +
   24.74 +extern spinlock_t i8259A_lock;
   24.75 +int pit_latch_buggy;              /* extern */
   24.76 +
   24.77 +u64 jiffies_64 = INITIAL_JIFFIES;
   24.78 +
   24.79 +EXPORT_SYMBOL(jiffies_64);
   24.80 +
   24.81 +unsigned long cpu_khz;	/* Detected as we calibrate the TSC */
   24.82 +
   24.83 +extern unsigned long wall_jiffies;
   24.84 +
   24.85 +spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
   24.86 +
   24.87 +spinlock_t i8253_lock = SPIN_LOCK_UNLOCKED;
   24.88 +EXPORT_SYMBOL(i8253_lock);
   24.89 +
   24.90 +extern struct init_timer_opts __initdata timer_tsc_init;
   24.91 +extern struct timer_opts timer_tsc;
   24.92 +struct timer_opts *cur_timer = &timer_tsc;
   24.93 +
   24.94 +/* These are peridically updated in shared_info, and then copied here. */
   24.95 +u32 shadow_tsc_stamp;
   24.96 +u64 shadow_system_time;
   24.97 +static u32 shadow_time_version;
   24.98 +static struct timeval shadow_tv;
   24.99 +extern u64 processed_system_time;
  24.100 +
  24.101 +/*
  24.102 + * We use this to ensure that gettimeofday() is monotonically increasing. We
  24.103 + * only break this guarantee if the wall clock jumps backwards "a long way".
  24.104 + */
  24.105 +static struct timeval last_seen_tv = {0,0};
  24.106 +
  24.107 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  24.108 +/* Periodically propagate synchronised time base to the RTC and to Xen. */
  24.109 +static long last_rtc_update, last_update_to_xen;
  24.110 +#endif
  24.111 +
  24.112 +/* Periodically take synchronised time base from Xen, if we need it. */
  24.113 +static long last_update_from_xen;   /* UTC seconds when last read Xen clock. */
  24.114 +
  24.115 +/* Keep track of last time we did processing/updating of jiffies and xtime. */
  24.116 +u64 processed_system_time;   /* System time (ns) at last processing. */
  24.117 +
  24.118 +#define NS_PER_TICK (1000000000ULL/HZ)
  24.119 +
  24.120 +#define HANDLE_USEC_UNDERFLOW(_tv) do {		\
  24.121 +	while ((_tv).tv_usec < 0) {		\
  24.122 +		(_tv).tv_usec += USEC_PER_SEC;	\
  24.123 +		(_tv).tv_sec--;			\
  24.124 +	}					\
  24.125 +} while (0)
  24.126 +#define HANDLE_USEC_OVERFLOW(_tv) do {		\
  24.127 +	while ((_tv).tv_usec >= USEC_PER_SEC) {	\
  24.128 +		(_tv).tv_usec -= USEC_PER_SEC;	\
  24.129 +		(_tv).tv_sec++;			\
  24.130 +	}					\
  24.131 +} while (0)
  24.132 +static inline void __normalize_time(time_t *sec, s64 *nsec)
  24.133 +{
  24.134 +	while (*nsec >= NSEC_PER_SEC) {
  24.135 +		(*nsec) -= NSEC_PER_SEC;
  24.136 +		(*sec)++;
  24.137 +	}
  24.138 +	while (*nsec < 0) {
  24.139 +		(*nsec) += NSEC_PER_SEC;
  24.140 +		(*sec)--;
  24.141 +	}
  24.142 +}
  24.143 +
  24.144 +/* Does this guest OS track Xen time, or set its wall clock independently? */
  24.145 +static int independent_wallclock = 0;
  24.146 +static int __init __independent_wallclock(char *str)
  24.147 +{
  24.148 +	independent_wallclock = 1;
  24.149 +	return 1;
  24.150 +}
  24.151 +__setup("independent_wallclock", __independent_wallclock);
  24.152 +#define INDEPENDENT_WALLCLOCK() \
  24.153 +    (independent_wallclock || (xen_start_info.flags & SIF_INITDOMAIN))
  24.154 +
  24.155 +/*
  24.156 + * Reads a consistent set of time-base values from Xen, into a shadow data
  24.157 + * area. Must be called with the xtime_lock held for writing.
  24.158 + */
  24.159 +static void __get_time_values_from_xen(void)
  24.160 +{
  24.161 +	shared_info_t *s = HYPERVISOR_shared_info;
  24.162 +
  24.163 +	do {
  24.164 +		shadow_time_version = s->time_version2;
  24.165 +		rmb();
  24.166 +		shadow_tv.tv_sec    = s->wc_sec;
  24.167 +		shadow_tv.tv_usec   = s->wc_usec;
  24.168 +		shadow_tsc_stamp    = (u32)s->tsc_timestamp;
  24.169 +		shadow_system_time  = s->system_time;
  24.170 +		rmb();
  24.171 +	}
  24.172 +	while (shadow_time_version != s->time_version1);
  24.173 +
  24.174 +	cur_timer->mark_offset();
  24.175 +}
  24.176 +
  24.177 +#define TIME_VALUES_UP_TO_DATE \
  24.178 + ({ rmb(); (shadow_time_version == HYPERVISOR_shared_info->time_version2); })
  24.179 +
  24.180 +/*
  24.181 + * This version of gettimeofday has microsecond resolution
  24.182 + * and better than microsecond precision on fast x86 machines with TSC.
  24.183 + */
  24.184 +void do_gettimeofday(struct timeval *tv)
  24.185 +{
  24.186 +	unsigned long seq;
  24.187 +	unsigned long usec, sec;
  24.188 +	unsigned long max_ntp_tick;
  24.189 +	unsigned long flags;
  24.190 +	s64 nsec;
  24.191 +
  24.192 +	do {
  24.193 +		unsigned long lost;
  24.194 +
  24.195 +		seq = read_seqbegin(&xtime_lock);
  24.196 +
  24.197 +		usec = cur_timer->get_offset();
  24.198 +		lost = jiffies - wall_jiffies;
  24.199 +
  24.200 +		/*
  24.201 +		 * If time_adjust is negative then NTP is slowing the clock
  24.202 +		 * so make sure not to go into next possible interval.
  24.203 +		 * Better to lose some accuracy than have time go backwards..
  24.204 +		 */
  24.205 +		if (unlikely(time_adjust < 0)) {
  24.206 +			max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
  24.207 +			usec = min(usec, max_ntp_tick);
  24.208 +
  24.209 +			if (lost)
  24.210 +				usec += lost * max_ntp_tick;
  24.211 +		}
  24.212 +		else if (unlikely(lost))
  24.213 +			usec += lost * (USEC_PER_SEC / HZ);
  24.214 +
  24.215 +		sec = xtime.tv_sec;
  24.216 +		usec += (xtime.tv_nsec / NSEC_PER_USEC);
  24.217 +
  24.218 +		nsec = shadow_system_time - processed_system_time;
  24.219 +		__normalize_time(&sec, &nsec);
  24.220 +		usec += (long)nsec / NSEC_PER_USEC;
  24.221 +
  24.222 +		if (unlikely(!TIME_VALUES_UP_TO_DATE)) {
  24.223 +			/*
  24.224 +			 * We may have blocked for a long time,
  24.225 +			 * rendering our calculations invalid
  24.226 +			 * (e.g. the time delta may have
  24.227 +			 * overflowed). Detect that and recalculate
  24.228 +			 * with fresh values.
  24.229 +			 */
  24.230 +			write_seqlock_irqsave(&xtime_lock, flags);
  24.231 +			__get_time_values_from_xen();
  24.232 +			write_sequnlock_irqrestore(&xtime_lock, flags);
  24.233 +			continue;
  24.234 +		}
  24.235 +	} while (read_seqretry(&xtime_lock, seq));
  24.236 +
  24.237 +	while (usec >= USEC_PER_SEC) {
  24.238 +		usec -= USEC_PER_SEC;
  24.239 +		sec++;
  24.240 +	}
  24.241 +
  24.242 +	/* Ensure that time-of-day is monotonically increasing. */
  24.243 +	if ((sec < last_seen_tv.tv_sec) ||
  24.244 +	    ((sec == last_seen_tv.tv_sec) && (usec < last_seen_tv.tv_usec))) {
  24.245 +		sec = last_seen_tv.tv_sec;
  24.246 +		usec = last_seen_tv.tv_usec;
  24.247 +	} else {
  24.248 +		last_seen_tv.tv_sec = sec;
  24.249 +		last_seen_tv.tv_usec = usec;
  24.250 +	}
  24.251 +
  24.252 +	tv->tv_sec = sec;
  24.253 +	tv->tv_usec = usec;
  24.254 +}
  24.255 +
  24.256 +EXPORT_SYMBOL(do_gettimeofday);
  24.257 +
  24.258 +int do_settimeofday(struct timespec *tv)
  24.259 +{
  24.260 +	time_t wtm_sec, sec = tv->tv_sec;
  24.261 +	long wtm_nsec;
  24.262 +	s64 nsec;
  24.263 +	struct timespec xentime;
  24.264 +
  24.265 +	if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
  24.266 +		return -EINVAL;
  24.267 +
  24.268 +	if (!INDEPENDENT_WALLCLOCK())
  24.269 +		return 0; /* Silent failure? */
  24.270 +
  24.271 +	write_seqlock_irq(&xtime_lock);
  24.272 +
  24.273 +	/*
  24.274 +	 * Ensure we don't get blocked for a long time so that our time delta
  24.275 +	 * overflows. If that were to happen then our shadow time values would
  24.276 +	 * be stale, so we can retry with fresh ones.
  24.277 +	 */
  24.278 + again:
  24.279 +	nsec = (s64)tv->tv_nsec -
  24.280 +	    ((s64)cur_timer->get_offset() * (s64)NSEC_PER_USEC);
  24.281 +	if (unlikely(!TIME_VALUES_UP_TO_DATE)) {
  24.282 +		__get_time_values_from_xen();
  24.283 +		goto again;
  24.284 +	}
  24.285 +
  24.286 +	__normalize_time(&sec, &nsec);
  24.287 +	set_normalized_timespec(&xentime, sec, nsec);
  24.288 +
  24.289 +	/*
  24.290 +	 * This is revolting. We need to set "xtime" correctly. However, the
  24.291 +	 * value in this location is the value at the most recent update of
  24.292 +	 * wall time.  Discover what correction gettimeofday() would have
  24.293 +	 * made, and then undo it!
  24.294 +	 */
  24.295 +	nsec -= (jiffies - wall_jiffies) * TICK_NSEC;
  24.296 +
  24.297 +	nsec -= (shadow_system_time - processed_system_time);
  24.298 +
  24.299 +	__normalize_time(&sec, &nsec);
  24.300 +	wtm_sec  = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
  24.301 +	wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
  24.302 +
  24.303 +	set_normalized_timespec(&xtime, sec, nsec);
  24.304 +	set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
  24.305 +
  24.306 +	time_adjust = 0;		/* stop active adjtime() */
  24.307 +	time_status |= STA_UNSYNC;
  24.308 +	time_maxerror = NTP_PHASE_LIMIT;
  24.309 +	time_esterror = NTP_PHASE_LIMIT;
  24.310 +
  24.311 +	/* Reset all our running time counts. They make no sense now. */
  24.312 +	last_seen_tv.tv_sec = 0;
  24.313 +	last_update_from_xen = 0;
  24.314 +
  24.315 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  24.316 +	if (xen_start_info.flags & SIF_INITDOMAIN) {
  24.317 +		dom0_op_t op;
  24.318 +		last_rtc_update = last_update_to_xen = 0;
  24.319 +		op.cmd = DOM0_SETTIME;
  24.320 +		op.u.settime.secs        = xentime.tv_sec;
  24.321 +		op.u.settime.usecs       = xentime.tv_nsec / NSEC_PER_USEC;
  24.322 +		op.u.settime.system_time = shadow_system_time;
  24.323 +		write_sequnlock_irq(&xtime_lock);
  24.324 +		HYPERVISOR_dom0_op(&op);
  24.325 +	} else
  24.326 +#endif
  24.327 +		write_sequnlock_irq(&xtime_lock);
  24.328 +
  24.329 +	clock_was_set();
  24.330 +	return 0;
  24.331 +}
  24.332 +
  24.333 +EXPORT_SYMBOL(do_settimeofday);
  24.334 +
  24.335 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  24.336 +static int set_rtc_mmss(unsigned long nowtime)
  24.337 +{
  24.338 +	int retval;
  24.339 +
  24.340 +	/* gets recalled with irq locally disabled */
  24.341 +	spin_lock(&rtc_lock);
  24.342 +	if (efi_enabled)
  24.343 +		retval = efi_set_rtc_mmss(nowtime);
  24.344 +	else
  24.345 +		retval = mach_set_rtc_mmss(nowtime);
  24.346 +	spin_unlock(&rtc_lock);
  24.347 +
  24.348 +	return retval;
  24.349 +}
  24.350 +#endif
  24.351 +
  24.352 +/* monotonic_clock(): returns # of nanoseconds passed since time_init()
  24.353 + *		Note: This function is required to return accurate
  24.354 + *		time even in the absence of multiple timer ticks.
  24.355 + */
  24.356 +unsigned long long monotonic_clock(void)
  24.357 +{
  24.358 +	return cur_timer->monotonic_clock();
  24.359 +}
  24.360 +EXPORT_SYMBOL(monotonic_clock);
  24.361 +
  24.362 +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
  24.363 +unsigned long profile_pc(struct pt_regs *regs)
  24.364 +{
  24.365 +	unsigned long pc = instruction_pointer(regs);
  24.366 +
  24.367 +	if (in_lock_functions(pc))
  24.368 +		return *(unsigned long *)(regs->ebp + 4);
  24.369 +
  24.370 +	return pc;
  24.371 +}
  24.372 +EXPORT_SYMBOL(profile_pc);
  24.373 +#endif
  24.374 +
  24.375 +/*
  24.376 + * timer_interrupt() needs to keep up the real-time clock,
  24.377 + * as well as call the "do_timer()" routine every clocktick
  24.378 + */
  24.379 +static inline void do_timer_interrupt(int irq, void *dev_id,
  24.380 +					struct pt_regs *regs)
  24.381 +{
  24.382 +	time_t wtm_sec, sec;
  24.383 +	s64 delta, nsec;
  24.384 +	long sec_diff, wtm_nsec;
  24.385 +
  24.386 +	do {
  24.387 +		__get_time_values_from_xen();
  24.388 +
  24.389 +		delta = (s64)(shadow_system_time +
  24.390 +			      ((s64)cur_timer->get_offset() * 
  24.391 +			       (s64)NSEC_PER_USEC) -
  24.392 +			      processed_system_time);
  24.393 +	}
  24.394 +	while (!TIME_VALUES_UP_TO_DATE);
  24.395 +
  24.396 +	if (unlikely(delta < 0)) {
  24.397 +		printk("Timer ISR: Time went backwards: %lld %lld %lld %lld\n",
  24.398 +		       delta, shadow_system_time,
  24.399 +		       ((s64)cur_timer->get_offset() * (s64)NSEC_PER_USEC), 
  24.400 +		       processed_system_time);
  24.401 +		return;
  24.402 +	}
  24.403 +
  24.404 +	/* Process elapsed jiffies since last call. */
  24.405 +	while (delta >= NS_PER_TICK) {
  24.406 +		delta -= NS_PER_TICK;
  24.407 +		processed_system_time += NS_PER_TICK;
  24.408 +		do_timer(regs);
  24.409 +#ifndef CONFIG_SMP
  24.410 +		update_process_times(user_mode(regs));
  24.411 +#endif
  24.412 +		if (regs)
  24.413 +		    profile_tick(CPU_PROFILING, regs);
  24.414 +	}
  24.415 +
  24.416 +	/*
  24.417 +	 * Take synchronised time from Xen once a minute if we're not
  24.418 +	 * synchronised ourselves, and we haven't chosen to keep an independent
  24.419 +	 * time base.
  24.420 +	 */
  24.421 +	if (!INDEPENDENT_WALLCLOCK() &&
  24.422 +	    ((time_status & STA_UNSYNC) != 0) &&
  24.423 +	    (xtime.tv_sec > (last_update_from_xen + 60))) {
  24.424 +		/* Adjust shadow for jiffies that haven't updated xtime yet. */
  24.425 +		shadow_tv.tv_usec -= 
  24.426 +			(jiffies - wall_jiffies) * (USEC_PER_SEC / HZ);
  24.427 +		HANDLE_USEC_UNDERFLOW(shadow_tv);
  24.428 +
  24.429 +		/*
  24.430 +		 * Reset our running time counts if they are invalidated by
  24.431 +		 * a warp backwards of more than 500ms.
  24.432 +		 */
  24.433 +		sec_diff = xtime.tv_sec - shadow_tv.tv_sec;
  24.434 +		if (unlikely(abs(sec_diff) > 1) ||
  24.435 +		    unlikely(((sec_diff * USEC_PER_SEC) +
  24.436 +			      (xtime.tv_nsec / NSEC_PER_USEC) -
  24.437 +			      shadow_tv.tv_usec) > 500000)) {
  24.438 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  24.439 +			last_rtc_update = last_update_to_xen = 0;
  24.440 +#endif
  24.441 +			last_seen_tv.tv_sec = 0;
  24.442 +		}
  24.443 +
  24.444 +		/* Update our unsynchronised xtime appropriately. */
  24.445 +		sec = shadow_tv.tv_sec;
  24.446 +		nsec = shadow_tv.tv_usec * NSEC_PER_USEC;
  24.447 +
  24.448 +		__normalize_time(&sec, &nsec);
  24.449 +		wtm_sec  = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
  24.450 +		wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
  24.451 +
  24.452 +		set_normalized_timespec(&xtime, sec, nsec);
  24.453 +		set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
  24.454 +
  24.455 +		last_update_from_xen = sec;
  24.456 +	}
  24.457 +
  24.458 +#ifdef CONFIG_XEN_PRIVILEGED_GUEST
  24.459 +	if (!(xen_start_info.flags & SIF_INITDOMAIN))
  24.460 +		return;
  24.461 +
  24.462 +	/* Send synchronised time to Xen approximately every minute. */
  24.463 +	if (((time_status & STA_UNSYNC) == 0) &&
  24.464 +	    (xtime.tv_sec > (last_update_to_xen + 60))) {
  24.465 +		dom0_op_t op;
  24.466 +		struct timeval tv;
  24.467 +
  24.468 +		tv.tv_sec   = xtime.tv_sec;
  24.469 +		tv.tv_usec  = xtime.tv_nsec / NSEC_PER_USEC;
  24.470 +		tv.tv_usec += (jiffies - wall_jiffies) * (USEC_PER_SEC/HZ);
  24.471 +		HANDLE_USEC_OVERFLOW(tv);
  24.472 +
  24.473 +		op.cmd = DOM0_SETTIME;
  24.474 +		op.u.settime.secs        = tv.tv_sec;
  24.475 +		op.u.settime.usecs       = tv.tv_usec;
  24.476 +		op.u.settime.system_time = shadow_system_time;
  24.477 +		HYPERVISOR_dom0_op(&op);
  24.478 +
  24.479 +		last_update_to_xen = xtime.tv_sec;
  24.480 +	}
  24.481 +
  24.482 +	/*
  24.483 +	 * If we have an externally synchronized Linux clock, then update
  24.484 +	 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
  24.485 +	 * called as close as possible to 500 ms before the new second starts.
  24.486 +	 */
  24.487 +	if ((time_status & STA_UNSYNC) == 0 &&
  24.488 +	    xtime.tv_sec > last_rtc_update + 660 &&
  24.489 +	    (xtime.tv_nsec / 1000)
  24.490 +			>= USEC_AFTER - ((unsigned) TICK_SIZE) / 2 &&
  24.491 +	    (xtime.tv_nsec / 1000)
  24.492 +			<= USEC_BEFORE + ((unsigned) TICK_SIZE) / 2) {
  24.493 +		/* horrible...FIXME */
  24.494 +		if (efi_enabled) {
  24.495 +	 		if (efi_set_rtc_mmss(xtime.tv_sec) == 0)
  24.496 +				last_rtc_update = xtime.tv_sec;
  24.497 +			else
  24.498 +				last_rtc_update = xtime.tv_sec - 600;
  24.499 +		} else if (set_rtc_mmss(xtime.tv_sec) == 0)
  24.500 +			last_rtc_update = xtime.tv_sec;
  24.501 +		else
  24.502 +			last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
  24.503 +	}
  24.504 +#endif
  24.505 +}
  24.506 +
  24.507 +/*
  24.508 + * This is the same as the above, except we _also_ save the current
  24.509 + * Time Stamp Counter value at the time of the timer interrupt, so that
  24.510 + * we later on can estimate the time of day more exactly.
  24.511 + */
  24.512 +irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
  24.513 +{
  24.514 +	/*
  24.515 +	 * Here we are in the timer irq handler. We just have irqs locally
  24.516 +	 * disabled but we don't know if the timer_bh is running on the other
  24.517 +	 * CPU. We need to avoid to SMP race with it. NOTE: we don' t need
  24.518 +	 * the irq version of write_lock because as just said we have irq
  24.519 +	 * locally disabled. -arca
  24.520 +	 */
  24.521 +	write_seqlock(&xtime_lock);
  24.522 +	do_timer_interrupt(irq, NULL, regs);
  24.523 +	write_sequnlock(&xtime_lock);
  24.524 +	return IRQ_HANDLED;
  24.525 +}
  24.526 +
  24.527 +/* not static: needed by APM */
  24.528 +unsigned long get_cmos_time(void)
  24.529 +{
  24.530 +	unsigned long retval;
  24.531 +
  24.532 +	spin_lock(&rtc_lock);
  24.533 +
  24.534 +	if (efi_enabled)
  24.535 +		retval = efi_get_time();
  24.536 +	else
  24.537 +		retval = mach_get_cmos_time();
  24.538 +
  24.539 +	spin_unlock(&rtc_lock);
  24.540 +
  24.541 +	return retval;
  24.542 +}
  24.543 +
  24.544 +static long clock_cmos_diff, sleep_start;
  24.545 +
  24.546 +static int timer_suspend(struct sys_device *dev, u32 state)
  24.547 +{
  24.548 +	/*
  24.549 +	 * Estimate time zone so that set_time can update the clock
  24.550 +	 */
  24.551 +	clock_cmos_diff = -get_cmos_time();
  24.552 +	clock_cmos_diff += get_seconds();
  24.553 +	sleep_start = get_cmos_time();
  24.554 +	return 0;
  24.555 +}
  24.556 +
  24.557 +static int timer_resume(struct sys_device *dev)
  24.558 +{
  24.559 +	unsigned long flags;
  24.560 +	unsigned long sec;
  24.561 +	unsigned long sleep_length;
  24.562 +
  24.563 +#ifdef CONFIG_HPET_TIMER
  24.564 +	if (is_hpet_enabled())
  24.565 +		hpet_reenable();
  24.566 +#endif
  24.567 +	sec = get_cmos_time() + clock_cmos_diff;
  24.568 +	sleep_length = get_cmos_time() - sleep_start;
  24.569 +	write_seqlock_irqsave(&xtime_lock, flags);
  24.570 +	xtime.tv_sec = sec;
  24.571 +	xtime.tv_nsec = 0;
  24.572 +	write_sequnlock_irqrestore(&xtime_lock, flags);
  24.573 +	jiffies += sleep_length * HZ;
  24.574 +	return 0;
  24.575 +}
  24.576 +
  24.577 +static struct sysdev_class timer_sysclass = {
  24.578 +	.resume = timer_resume,
  24.579 +	.suspend = timer_suspend,
  24.580 +	set_kset_name("timer"),
  24.581 +};
  24.582 +
  24.583 +
  24.584 +/* XXX this driverfs stuff should probably go elsewhere later -john */
  24.585 +static struct sys_device device_timer = {
  24.586 +	.id	= 0,
  24.587 +	.cls	= &timer_sysclass,
  24.588 +};
  24.589 +
  24.590 +static int time_init_device(void)
  24.591 +{
  24.592 +	int error = sysdev_class_register(&timer_sysclass);
  24.593 +	if (!error)
  24.594 +		error = sysdev_register(&device_timer);
  24.595 +	return error;
  24.596 +}
  24.597 +
  24.598 +device_initcall(time_init_device);
  24.599 +
  24.600 +#ifdef CONFIG_HPET_TIMER
  24.601 +extern void (*late_time_init)(void);
  24.602 +/* Duplicate of time_init() below, with hpet_enable part added */
  24.603 +void __init hpet_time_init(void)
  24.604 +{
  24.605 +	xtime.tv_sec = get_cmos_time();
  24.606 +	wall_to_monotonic.tv_sec = -xtime.tv_sec;
  24.607 +	xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ);
  24.608 +	wall_to_monotonic.tv_nsec = -xtime.tv_nsec;
  24.609 +
  24.610 +	if (hpet_enable() >= 0) {
  24.611 +		printk("Using HPET for base-timer\n");
  24.612 +	}
  24.613 +
  24.614 +	cur_timer = select_timer();
  24.615 +	printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name);
  24.616 +
  24.617 +	time_init_hook();
  24.618 +}
  24.619 +#endif
  24.620 +
  24.621 +/* Dynamically-mapped IRQ. */
  24.622 +static int time_irq;
  24.623 +
  24.624 +static struct irqaction irq_timer = {
  24.625 +	timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer",
  24.626 +	NULL, NULL
  24.627 +};
  24.628 +
  24.629 +void __init time_init(void)
  24.630 +{
  24.631 +#ifdef CONFIG_HPET_TIMER
  24.632 +	if (is_hpet_capable()) {
  24.633 +		/*
  24.634 +		 * HPET initialization needs to do memory-mapped io. So, let
  24.635 +		 * us do a late initialization after mem_init().
  24.636 +		 */
  24.637 +		late_time_init = hpet_time_init;
  24.638 +		return;
  24.639 +	}
  24.640 +#endif
  24.641 +	__get_time_values_from_xen();
  24.642 +	xtime.tv_sec = shadow_tv.tv_sec;
  24.643 +	wall_to_monotonic.tv_sec = -xtime.tv_sec;
  24.644 +	xtime.tv_nsec = shadow_tv.tv_usec * NSEC_PER_USEC;
  24.645 +	wall_to_monotonic.tv_nsec = -xtime.tv_nsec;
  24.646 +	processed_system_time = shadow_system_time;
  24.647 +
  24.648 +	if (timer_tsc_init.init(NULL) != 0)
  24.649 +		BUG();
  24.650 +	printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name);
  24.651 +
  24.652 +	time_irq = bind_virq_to_irq(VIRQ_TIMER);
  24.653 +
  24.654 +	(void)setup_irq(time_irq, &irq_timer);
  24.655 +}
  24.656 +
  24.657 +/* Convert jiffies to system time. Call with xtime_lock held for reading. */
  24.658 +static inline u64 __jiffies_to_st(unsigned long j) 
  24.659 +{
  24.660 +	return processed_system_time + ((j - jiffies) * NS_PER_TICK);
  24.661 +}
  24.662 +
  24.663 +/*
  24.664 + * This function works out when the the next timer function has to be
  24.665 + * executed (by looking at the timer list) and sets the Xen one-shot
  24.666 + * domain timer to the appropriate value. This is typically called in
  24.667 + * cpu_idle() before the domain blocks.
  24.668 + * 
  24.669 + * The function returns a non-0 value on error conditions.
  24.670 + * 
  24.671 + * It must be called with interrupts disabled.
  24.672 + */
  24.673 +int set_timeout_timer(void)
  24.674 +{
  24.675 +	u64 alarm = 0;
  24.676 +	int ret = 0;
  24.677 +
  24.678 +	/*
  24.679 +	 * This is safe against long blocking (since calculations are
  24.680 +	 * not based on TSC deltas). It is also safe against warped
  24.681 +	 * system time since suspend-resume is cooperative and we
  24.682 +	 * would first get locked out. It is safe against normal
  24.683 +	 * updates of jiffies since interrupts are off.
  24.684 +	 */
  24.685 +	alarm = __jiffies_to_st(next_timer_interrupt());
  24.686 +
  24.687 +	/* Failure is pretty bad, but we'd best soldier on. */
  24.688 +	if ( HYPERVISOR_set_timer_op(alarm) != 0 )
  24.689 +		ret = -1;
  24.690 +
  24.691 +	return ret;
  24.692 +}
  24.693 +
  24.694 +void time_suspend(void)
  24.695 +{
  24.696 +	/* nothing */
  24.697 +}
  24.698 +
  24.699 +/* No locking required. We are only CPU running, and interrupts are off. */
  24.700 +void time_resume(void)
  24.701 +{
  24.702 +	if (timer_tsc_init.init(NULL) != 0)
  24.703 +		BUG();
  24.704 +
  24.705 +	/* Get timebases for new environment. */ 
  24.706 +	__get_time_values_from_xen();
  24.707 +
  24.708 +	/* Reset our own concept of passage of system time. */
  24.709 +	processed_system_time = shadow_system_time;
  24.710 +
  24.711 +	/* Accept a warp in UTC (wall-clock) time. */
  24.712 +	last_seen_tv.tv_sec = 0;
  24.713 +
  24.714 +	/* Make sure we resync UTC time with Xen on next timer interrupt. */
  24.715 +	last_update_from_xen = 0;
  24.716 +}
  24.717 +
  24.718 +/*