~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to arch/x86/lguest/i386_head.S

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
#include <asm/processor-flags.h>
7
7
 
8
8
/*G:020
9
 
 * Our story starts with the kernel booting into startup_32 in
10
 
 * arch/x86/kernel/head_32.S.  It expects a boot header, which is created by
11
 
 * the bootloader (the Launcher in our case).
 
9
 
 
10
 * Our story starts with the bzImage: booting starts at startup_32 in
 
11
 * arch/x86/boot/compressed/head_32.S.  This merely uncompresses the real
 
12
 * kernel in place and then jumps into it: startup_32 in
 
13
 * arch/x86/kernel/head_32.S.  Both routines expects a boot header in the %esi
 
14
 * register, which is created by the bootloader (the Launcher in our case).
12
15
 *
13
16
 * The startup_32 function does very little: it clears the uninitialized global
14
17
 * C variables which we expect to be zero (ie. BSS) and then copies the boot
15
 
 * header and kernel command line somewhere safe.  Finally it checks the
16
 
 * 'hardware_subarch' field.  This was introduced in 2.6.24 for lguest and Xen:
17
 
 * if it's set to '1' (lguest's assigned number), then it calls us here.
 
18
 * header and kernel command line somewhere safe, and populates some initial
 
19
 * page tables.  Finally it checks the 'hardware_subarch' field.  This was
 
20
 * introduced in 2.6.24 for lguest and Xen: if it's set to '1' (lguest's
 
21
 * assigned number), then it calls us here.
18
22
 *
19
23
 * WARNING: be very careful here!  We're running at addresses equal to physical
20
 
 * addesses (around 0), not above PAGE_OFFSET as most code expectes
 
24
 * addresses (around 0), not above PAGE_OFFSET as most code expects
21
25
 * (eg. 0xC0000000).  Jumps are relative, so they're OK, but we can't touch any
22
26
 * data without remembering to subtract __PAGE_OFFSET!
23
27
 *
27
31
.section .init.text, "ax", @progbits
28
32
ENTRY(lguest_entry)
29
33
        /*
30
 
         * We make the "initialization" hypercall now to tell the Host about
31
 
         * us, and also find out where it put our page tables.
 
34
         * We make the "initialization" hypercall now to tell the Host where
 
35
         * our lguest_data struct is.
32
36
         */
33
37
        movl $LHCALL_LGUEST_INIT, %eax
34
38
        movl $lguest_data - __PAGE_OFFSET, %ebx
35
39
        int $LGUEST_TRAP_ENTRY
36
40
 
 
41
        /* Now turn our pagetables on; setup by arch/x86/kernel/head_32.S. */
 
42
        movl $LHCALL_NEW_PGTABLE, %eax
 
43
        movl $(initial_page_table - __PAGE_OFFSET), %ebx
 
44
        int $LGUEST_TRAP_ENTRY
 
45
 
37
46
        /* Set up the initial stack so we can run C code. */
38
47
        movl $(init_thread_union+THREAD_SIZE),%esp
39
48
 
96
105
         */
97
106
        pushl %eax
98
107
        movl $LHCALL_SEND_INTERRUPTS, %eax
99
 
        /*
100
 
         * This is a vmcall instruction (same thing that KVM uses).  Older
101
 
         * assembler versions might not know the "vmcall" instruction, so we
102
 
         * create one manually here.
103
 
         */
104
 
        .byte 0x0f,0x01,0xc1 /* KVM_HYPERCALL */
 
108
        /* This is the actual hypercall trap. */
 
109
        int  $LGUEST_TRAP_ENTRY
105
110
        /* Put eax back the way we found it. */
106
111
        popl %eax
107
112
        ret