aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/boot/head.S
Commit message (Collapse)AuthorAgeFilesLines
* patches to support booting from my grubroot2013-10-231-0/+19
|
* x86: Introduce and use GLOBAL() in asm codeAndrew Cooper2013-09-091-6/+3
| | | | | | Also clean up some cases of misused/opencoded ENTRY() Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
* x86: find a better location for the real-mode trampolinePaolo Bonzini2013-01-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | On some machines, the location at 0x40e does not point to the beginning of the EBDA. Rather, it points to the beginning of the BIOS-reserved area of the EBDA, while the option ROMs place their data below that segment. For this reason, 0x413 is actually a better source than 0x40e to get the location of the real-mode trampoline. Xen was already using it as a second source, and this patch keeps that working. However, just in case, let's also fetch the information from the multiboot structure, where the boot loader should have placed it. This way we don't necessarily trust one of the BIOS or the multiboot loader more than the other. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Retain the previous code, thus using the multiboot value only if it's sane but lower than the BDA computed one. Also use the full 32-bit mem_lower value and prefer MBI_MEMLIMITS over open coding it (requiring a slight adjustment to multiboot.h to make its constants actually usable in assembly code, which previously they were only meant to be). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com>
* xen: Remove x86_32 build target.Keir Fraser2012-09-121-6/+0
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86-64: construct static, uniform parts of page tables at build timeJan Beulich2012-09-111-31/+4
| | | | | | | | ... rather than at boot time, removing unnecessary redundancy between EFI and legacy boot code. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: construct static part of 1:1 mapping at build timeJan Beulich2012-09-111-49/+25
| | | | | | | | ... rather than at boot time, removing unnecessary redundancy between EFI and legacy boot code. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: allow early use of fixmapsJan Beulich2012-09-111-1/+10
| | | | | | | | | As a prerequisite for adding an EHCI debug port based console implementation, set up the page tables needed for (a sub-portion of) the fixmaps together with other boot time page table construction. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
* x86: get rid of BOOT_TRAMPOLINEJan Beulich2012-06-111-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We recently saw a machine that has the EBDA extending as low as 0x7c000, so that Xen fails to boot after relocating the trampoline. To fix this, I removed BOOT_TRAMPOLINE and bootsym_phys completely. Here are the parts: 1) the trampoline segment is set to 64k below the EBDA. head.S grows the ability to relocate the trampoline segment 2) reloc.c is made position-independent. It allocates data below the trampoline, whose address is passed in _eax. 3) cmdline.S is called before relocating, so all bootsym_phys there become sym_phys. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> jb: - fall back to low memory size (instead of segment 0x7c00) if EBDA value is out of range - also add upper limit check on EBDA value - fix and simplify inline assembly operands in reloc_mbi_struct() - use lret instead of retf - renamed early_stack to wakeup_stack, defined and used now only in wakeup.S - aligned reloc.bin's end of .text to 16 bytes, so that checking __bss_start == end works reliably Signed-off-by: Jan Beulich <jbeulich@suse.com> Committed-by: Keir Fraser <keir@xen.org>
* x86: trampoline cleanupJan Beulich2011-08-191-2/+4
| | | | | | | | | | | | | | | To make future changes less error prone, and to slightly simplify a possible future conversion to a relocatable trampoline even for the multiboot path (pretty desirable given that we had to change the trampoline base a number of times to escape collisions with firmware placed data), - remove final uses of bootsym_phys() from trampoline.S, allowing the symbol to be undefined before including this file (to make sure no new references get added) - replace two easy to deal with uses of bootsym_phys() in head.S - remove an easy to replace reference to BOOT_TRAMPOLINE Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: make run-time part of trampoline relocatableJan Beulich2011-08-191-1/+12
| | | | | | | | | | | | | | In order to eliminate an initial hack in the EFI boot code (where memory for the trampoline was just "claimed" instead of properly allocated), the trampoline code must no longer make assumption on the address at which it would be located. For the time being, the fixed address is being retained for the traditional multiboot path. As an additional benefit (at least from my pov) it allows confining the visibility of the BOOT_TRAMPOLINE definition to just the boot code. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: do away with the boot time low-memory 1:1 mappingKeir Fraser2010-11-091-2/+10
| | | | | | | | | | | | | | | By doing so, we're no longer restricted to be able to place all boot loader modules into the low 1Gb/4Gb (32-/64-bit) of memory, nor is there a dependency anymore on where the boot loader places the modules. We're also no longer restricted to copy the modules into a place below 4Gb, nor to put them all together into a single piece of memory. Further it allows even the 32-bit Dom0 kernel to be loaded anywhere in physical memory (except if it doesn't support PAE-above-4G). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: Avoid assumptions about C struct layouts from asm code.Keir Fraser2010-07-131-1/+1
| | | | | | Largely this involves avoiding assumptions about 'struct cpu_info'. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86-64: extend manageable memory range to 5TbKeir Fraser2009-09-221-4/+4
| | | | | | | | Extend the virtual range reserved for the 1:1 mapping to cover 5Tb, and make the virtual size of the frame table gets match whatever the 1:1 table can cover. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86: Relocate Multiboot structures where we know they will beKeir Fraser2009-02-031-2/+8
| | | | | | | | | | | | | | | accessible. GRUB2 seems to like to stick them really high sometimes (just below 4GB). The 32-bit C code framework that this sets up can also be used for other stuff in future: * early cmdline parsing * relocating multiboot modules so they too are guaranteed accessible Its interaction with normal Xen start-of-day, and with the 16-bit assembly trampoline, needs a bit of thought. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* i386: Remove non-PAE hypervisor build target.Keir Fraser2008-05-081-20/+2
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: First 1MB of memory should be mapped with 4kB mappings to avoidKeir Fraser2008-01-251-1/+35
| | | | | | conflict with fixed-range MTRRs. While there, we now map the VGA hole as uncacheable. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Clean up boot/wakeup code.Keir Fraser2007-12-101-2/+1
| | | | | | | | | * Generalise wakeup stack to general 'early stack' used everywhere. * Ensure things that must be aligned are aligned. * Remove some unused symbols. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Do not read/write EFER MSR if it doesn't exist.Keir Fraser2007-11-131-0/+1
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: small boot-time changes:Keir Fraser2007-10-221-1/+1
| | | | | | | | * use memory 0x8c000-0x90000 to avoid trampling the area above 0x90000 -- some bootloaders may leave droppings in that region * reserve 2kB for vga mode table -- limit of 128 VESA modes could overflow the original 1kB allocation * remove unnecessary alignment of trampoline GDT
* Provide basic Xen PM infrastructurekfraser@localhost.localdomain2007-07-111-0/+2
| | | | | | | | | | | | | | Basic infrastructure for Xen S3 support with a common CPU context save/restore logic for both 32bit and 64bit. Wakeup code is split into two parts: - the first locates after trampoline code, to share all the tricks on the latter, like relocation base and identy mapping - the 2nd part locates in xen code segment, to do the actual CPU context restore Signed-off-by Ke Yu <ke.yu@intel.com> Signed-off-by Kevin Tian <kevin.tian@intel.com>
* x86: Allow selection of graphical video modes during boot.Keir Fraser2007-06-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'vga=' boot option is extended as follows: ---------- 'vga=<mode-specifier>[,keep]' where <mode-specifier> is one of: 'vga=ask': display a vga menu of available modes 'vga=text-80x<rows>': text mode, where <rows> is one of {25,28,30,34,43,50,60} 'vga=gfx-<width>x<height>x<depth>': graphics mode, e.g., vga=gfx-1024x768x16 'vga=mode-<mode>: specifies a mode as specified in 'vga=ask' menu (NB. menu modes are displayed in hex, so mode numbers here must be prefixed with '0x' (e.g., 'vga=mode-0x0318')) The option 'keep' causes Xen to continue to print to the VGA console even after domain 0 starts to boot. The default behaviour is to relinquish control of the console to domain 0. ---------- Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: Return to real-mode when booting primary CPU, and gatherkfraser@localhost.localdomain2007-06-071-34/+37
| | | | | | | memory-map information (from int15{e820,e801,88} and int12 bios calls). Signed-off-by: Keir Fraser <keir@xensource.com>
* xen: Big changes to x86 start-of-day:kfraser@localhost.localdomain2007-05-101-0/+180
1. x86/64 Xen now relocates itself to physical high memory. This is useful if we have devices that need very low memory, or if in future we want to grant a 1:1 mapping of low physical memory to a special 'native client domain'. 2. We now only map low 16MB RAM statically. All other RAM is mapped dynamically within the constraints of the e820 map. It is recommended never to map MMIO regions, and this change means that Xen now obeys this constraint. 3. The CPU bootup trampoline is now permanently installed at 0x90000. This is necessary prereq for CPU hotplug. 4. Start-of-day asm is generally cleaned up and diff between x86/32 and x86/64 is reduced. Signed-off-by: Keir Fraser <keir@xensource.com>