Lines Matching +full:halt +full:- +full:regs
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
5 * Copyright (c) 2004-2006,2008 Kip Macy
73 #include <xen/xen-os.h>
79 #include <contrib/xen/arch-x86/cpuid.h>
80 #include <contrib/xen/arch-x86/hvm/start_info.h>
96 /*--------------------------- Forward Declarations ---------------------------*/
100 /*---------------------------- Extern Declarations ---------------------------*/
107 /*-------------------------------- Global Data -------------------------------*/
119 /*-------------------------------- Xen PV init -------------------------------*/
124 static int xen = -1;
126 u_int regs[4];
128 if (xen != -1)
134 * this is sufficient to distinguish Xen PVH booting from non-Xen PVH
135 * and skip some very early Xen-specific code in the non-Xen case.
139 do_cpuid(base, regs);
140 if (regs[1] == XEN_CPUID_SIGNATURE_EBX &&
141 regs[2] == XEN_CPUID_SIGNATURE_ECX &&
142 regs[3] == XEN_CPUID_SIGNATURE_EDX) {
153 halt(); \
163 if (start_info->magic != XEN_HVM_START_MAGIC_VALUE) {
165 start_info->magic);
176 physfree = MAX(roundup2((vm_paddr_t)_end - KERNBASE, PAGE_SIZE),
179 if (start_info->memmap_paddr != 0)
180 physfree = MAX(roundup2(start_info->memmap_paddr +
181 start_info->memmap_entries *
185 if (start_info->modlist_paddr != 0) {
188 if (start_info->nr_modules == 0) {
193 (start_info->modlist_paddr + KERNBASE);
194 for (i = 0; i < start_info->nr_modules; i++)
201 hvm_start_flags = start_info->flags;
207 /*-------------------------------- PV specific -------------------------------*/
224 if (memcmp(ehdr->e_ident, ELFMAG, SELFMAG) ||
225 ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS ||
226 ehdr->e_version > 1) {
232 shdr = (Elf_Shdr *)((uint8_t *)ehdr + ehdr->e_shoff);
234 for (i = 1; i < ehdr->e_shnum; i++) {
262 if (start_info->modlist_paddr != 0) {
267 (start_info->modlist_paddr + KERNBASE);
276 if ((header->flags & XENHEADER_HAS_MODULEP_OFFSET) !=
283 header->modulep_offset + KERNBASE);
292 off = header->modulep_offset;
307 off += mod[0].paddr + KERNBASE - metadata;
328 if (start_info->cmdline_paddr != 0)
330 (char *)(start_info->cmdline_paddr + KERNBASE),
342 acpi_set_root(start_info->rsdp_paddr);
359 entries = (struct hvm_memmap_table_entry *)(start_info->memmap_paddr + KERNBASE);
360 nentries = start_info->memmap_entries;
414 if ((start_info->version >= 1) && (start_info->memmap_paddr != 0))