aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/e820.c
Commit message (Collapse)AuthorAgeFilesLines
* xen: Remove x86_32 build target.Keir Fraser2012-09-121-19/+10
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* x86-64/MMCFG: finally make Fam10 enabling workJan Beulich2011-07-251-0/+49
| | | | | | | | | | | | | | | | Forcibly enabling the MMCFG space on AMD Fam10 CPUs cannot be expected to work since with the firmware not being aware of the address range used it cannot possibly reserve the space in E820 or ACPI resources. Hence we need to manually insert the range into the E820 table, and enable the range only when the insertion actually works without conflict. Further, the actual enabling of the space is done from identify_cpu(), which means that acpi_mmcfg_init() muts be called after that function (and hance should not be called from acpi_boot_init()). Otherwise, Dom0 would be able to use MMCFG, but Xen wouldn't. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Define new <pfn.h> header for PFN_{DOWN,UP} macros.Keir Fraser2011-03-231-0/+1
| | | | Signed-off-by: Keir Fraser <keir@xen.org>
* Use bool_t for various boolean variablesKeir Fraser2010-12-241-3/+3
| | | | | | | | | | | ... decreasing cache footprint. As a prerequisite this requires making cmdline_parse() a little more flexible. Also remove a few variables altogether, and adjust sections annotations for several others. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xen.org>
* x86: New boot option availmem= to limit usable system RAM.Keir Fraser2010-07-211-2/+24
| | | | | | | | | Unlike mem=, this specifies the limit on usable RAM, rather than a limit on maximum physical address of RAM. Original patch by Sarina Canelake <sarina.canelake@Oracle.Com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Fix clip_to_limit().Keir Fraser2009-11-091-11/+24
| | | | | | | | | | | | | | There are issues in updating the e820 map in the middle of a loop that iterates over it. For example, after memmove(&e820.map[i], &e820.map[i+1], ...), the original e820.map[i+1] become current e820.map[i] but the next loop count is i+1, so the original e820.map[i+1] will be skipped. Fix and clarify the code by making a double loop. Original bug discovery and fix by Xiao Guangrong <ericxiao.gr@gmail.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* e820: fix e820_change_range_type()Keir Fraser2009-11-091-1/+1
| | | | | | | | In below case, e820_change_range_type() will return success: [s, e] is in the middle of [rs, re] and e820->nr_map+1 >= ARRAY_SIZE(e820->map) actually, it's failed, so this patch fix it Signed-off-by: Xiao Guangrong <ericxiao.gr@gmail.com>
* x86: improve reporting through XENMEM_machine_memory_mapKeir Fraser2009-11-031-1/+7
| | | | | | | | | | | | | | | | | | | | | | Since Dom0 derives machine address ranges usable for assigning PCI device resources from the output of this sub-hypercall, Xen should make sure it properly reports all ranges not suitable for this (as either reserved or unusable): - RAM regions excluded via command line option - memory regions used by Xen itself (LAPIC, IOAPICs) While the latter should generally already be excluded by the BIOS provided E820 table, this apparently isn't always the case at least for IOAPICs, and with Linux having got changed to account for this it seems to make sense to also do so in Xen. Generally the HPET range should also be excluded here, but since it isn't being reflected in Dom0's iomem_caps (and can't be, as it's a sub-page range) I wasn't sure whether adding explicit code for doing so would be reasonable. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86-64: reduce range spanned by 1:1 mapping and frame table indexesKeir Fraser2009-09-221-11/+4
| | | | | | | | | | | | | | | | | Introduces a virtual space conserving transformation on the MFN thus far used to index 1:1 mapping and frame table, removing the largest range of contiguous bits (below the most significant one) which are zero for all valid MFNs from the MFN representation, to be used to index into those arrays, thereby cutting the virtual range these tables must cover approximately by half with each bit removed. Since this should account for hotpluggable memory (in order to not requiring a re-write when that gets supported), the determination of which bits are candidates for removal must not be based on the E820 information, but instead has to use the SRAT. That in turn requires a change to the ordering of steps done during early boot. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* x86-64: extend manageable memory range to 5TbKeir Fraser2009-09-221-1/+5
| | | | | | | | 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>
* introduce size_param()Keir Fraser2009-08-311-3/+2
| | | | | | | | | | | With there being several instances of custom_param() where the handler is just invoking parse_size_and_unit(), it seems to make sense to introduce a simplifying abstraction. Also fix serial_txbufsz not having been guaranteed to be a power of two. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* Enable pci mmcfg and ATS for x86_64Keir Fraser2009-06-021-0/+34
| | | | | | This patch enables PCI MMCONFIG in xen and turns on hooks for ATS. Signed-off-by: Allen Kay <allen.m.kay@intel.com>
* x86_32: Fix build after e820 verbosity printks.Keir Fraser2009-04-291-2/+3
| | | | Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Add boot options regarding e820 parsinga nd clipping.Keir Fraser2009-04-291-12/+61
| | | | | | | | | | [no-]e820-mtrr-clip: Clip e820 RAM areas to top-of-memory according to MTRRs. Prefix no- to disable the clip. e820-verbose: Extra e820 info printed during boot. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: Detect bogus BIOS e820 tables which are not fully covered asKeir Fraser2009-04-241-0/+58
| | | | | | | | cacheable (WB) by MTRRs. Fix up by truncating the memory map. This fixes performance issues on certain systems. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86-64: use MFNs for linking together pages on listsKeir Fraser2009-01-301-1/+1
| | | | | | | | | | | | | Unless more than 16Tb are going to ever be supported in Xen, this will allow reducing the linked list entries in struct page_info from 16 to 8 bytes. This doesn't modify struct shadow_page_info, yet, so in order to meet the constraints of that 'mirror' structure the list entry gets artificially forced to be 16 bytes in size. That workaround will be removed in a subsequent patch. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* tboot: tboot no longer marks TXT regions as E820_UNUSABLE, so Xen mustKeir Fraser2009-01-291-34/+59
| | | | | | | explicitly disallow them itself. Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
* x86-64: enforce memory limits imposed by virtual memory layoutKeir Fraser2008-09-161-2/+20
| | | | | | | | | | ... which currently means: - The 1:1 map cannot deal with more than 1Tb. - The m2p table can handle at most 8Tb. - The page_info array can cover up to e.g. 1.6Gb (<=3D 64 CPUs) or 1Tb (193-256 CPUs). Signed-off-by: Jan Beulich <jbeulich@novell.com>
* 32-on-64: Fix domain address-size clamping, implementKeir Fraser2007-12-061-7/+0
| | | | | | copy-on-grant-transfer, and eliminate 166GB memory limit for x86/64 Xen. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
* x86: If e820 map overflows, leak memory in a safe manner.Keir Fraser2007-09-271-3/+16
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: force DMI table to not be in E820 RAM regionKeir Fraser2007-09-261-0/+65
| | | | | | | | | | In order for Dom0 to be able to map the DMI table, it must not be in E820 RAM; since some BIOS versions apparently fail to set the type correctly for the page(s) containing this table, adjust it before starting to consume memory. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* xen: Understand the E820_UNUSABLE (type code 5) memory type.kfraser@localhost.localdomain2007-08-301-2/+7
| | | | | Signed-off-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: Keir Fraser <keir@xensource.com>
* Re-factor e820 truncation code and reintroduce clipping for 32-on-64kfraser@localhost.localdomain2007-07-101-40/+25
| | | | | guests (to 166GB). Signed-off-by: Keir Fraser <keir@xensource.com>
* Remove no-pv-compat cmdline option.kfraser@localhost.localdomain2007-07-091-34/+0
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: Fix log-level in printing e820 memory map.Keir Fraser2007-06-101-1/+1
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* x86: Print source of e820 memory map during boot. Fix Xen-e801 memmapkfraser@localhost.localdomain2007-06-071-2/+3
| | | | | | parsing. Get rid of unneeded e820_raw variable -- map straight onto boot-trampoline e820 array. Signed-off-by: Keir Fraser <keir@xensource.com>
* Add page table setup and handling, including the creation of an m2p tableEmmanuel Ackaouy2007-01-051-0/+35
| | | | | | meaningful to compatibility mode guests. Signed-off-by: Jan Beulich <jbeulich@novell.com>
* [XEN] Extend dom0_mem syntax to support min/max clamps.kfraser@localhost.localdomain2006-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | dom0_mem=[min:<min_amt>,][max:<max_amt>,][<amt>] <min_amt>: The minimum amount of memory which should be allocated for dom0. <max_amt>: The maximum amount of memory which should be allocated for dom0. <amt>: The precise amount of memory to allocate for dom0. Notes: 1. <amt> is clamped from below by <min_amt> and from above by available memory and <max_amt> 2. <min_amt> is clamped from above by available memory and <max_amt> 3. <min_amt> is ignored if it is greater than <max_amt> 4. If <amt> is not specified, it is calculated as follows: "All of memory is allocated to domain 0, minus 1/16th which is reserved for uses such as DMA buffers (the reservation is clamped to 128MB)." Each value can be specified as positive or negative: If +ve: The specified amount is an absolute value. If -ve: The specified amount is subtracted from total available memory. Signed-off-by: Keir Fraser <keir@xensource.com>
* [XEN] Clean up e820 definitions. Define shared set in hvm public dir.kaf24@localhost.localdomain2006-08-131-10/+2
| | | | Signed-off-by: Keir Fraser <keir@xensource.com>
* This is the patch for xen which allows using up to 16 GBkaf24@firebug.cl.cam.ac.uk2005-07-111-6/+9
| | | | | | | | of memory. Signed-off-by: Gerd Knorr <kraxel@suse.de>
* bitkeeper revision 1.1466.2.1 (428d01177uVxPlsgcWtGU3xUZaKeJw)kaf24@firebug.cl.cam.ac.uk2005-05-191-1/+1
| | | | | | | Rename memparse() to parse_size_and_unit(). A more general-purpose name, and avoids unecessary clash with Linux function name. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1428 (4289c9f6GdUyHEH-FCu9rRuWtOXnXQ)kaf24@firebug.cl.cam.ac.uk2005-05-171-3/+4
| | | | | | | | Initialise 1:1 mapping of physical memory map early during x86/64 boot. This mapping should include all ACPI tables, so simplify the mapping check in the ACPI code. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1389.17.1 (42823056RNtq4AlseRHL98DJV2uJgA)kaf24@firebug.cl.cam.ac.uk2005-05-111-0/+31
| | | | | | | | | | | | | | | | | Change the Xen command-line parameter syntax. 'noacpi' and 'ignorebiostables' are gone. 'dom0_mem' can optionally take a k/m/g suffix to specify units (default units are still kilobytes). Also added: 1. 'mem=xxx' to specify maximum physical RAM address (supports k/m/g suffix) 2. acpi=xxx/acpi_skip_timer_override/noapic: These all have same semantics as in Linux. They are *automatically* propagated to the domain0 command line, as dom0 shares resposibility for platform initialisation. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1381 (426ccd3chFZ3jThNSK9--Zvf3r2fug)kaf24@firebug.cl.cam.ac.uk2005-04-251-2/+2
| | | | | | | No longer disable format checking for printf/printk statements. This required a whole bunch of cleanups to get the build working again. Signed-off-by: Keir Fraser <keir@xensource.com>
* bitkeeper revision 1.1233 (421a1c36TYJWUEtp558QjJv1X0XXrQ)maf46@burn.cl.cam.ac.uk2005-02-211-8/+15
| | | | | | | If debugging is enabled, printout the e820 map for vmx guests. Signed-off-by: michael.fetterman@cl.cam.ac.uk
* bitkeeper revision 1.1159.231.14 (41fa441azB6742PriyqlRlCP_gJ0Tw)kaf24@firebug.cl.cam.ac.uk2005-01-281-8/+13
| | | | | | Build and x86/64 fixes. Signed-off-by: keir.fraser@cl.cam.ac.uk
* bitkeeper revision 1.1159.223.5 (41ee68b5s7SXOX6FRHT9GQ92WWOtRA)kaf24@scramble.cl.cam.ac.uk2005-01-191-0/+25
| | | | | | Truncate the e820 RAM map to 4GB maximum on 32-bit x86. We don't support PAE36 mode.
* bitkeeper revision 1.1159.170.74 (41d4488f9fINTxUzyjoq2FnTn5AvMQ)kaf24@scramble.cl.cam.ac.uk2004-12-301-6/+5
| | | | | Improved memory bootstrapping takes into account e820 RAM holes.
* bitkeeper revision 1.1159.170.73 (41d410a5UNN19EUanWSnfJ52P1DlQw)smh22@tempest.cl.cam.ac.uk2004-12-301-34/+0
| | | | | remove unused fn
* bitkeeper revision 1.1159.170.72 (41d3eaaftC1Zqz_rl9bIUUcTSZFIjg)kaf24@scramble.cl.cam.ac.uk2004-12-301-0/+357
Add e820 parsing to Xen. Currently not hooked into heap initialisation: this is the next step.