Lines Matching +full:halt +full:- +full:regs
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
55 #include <xen/xen-os.h>
63 #include <contrib/xen/arch-x86/cpuid.h>
67 /*--------------------------- Forward Declarations ---------------------------*/
70 /*-------------------------------- Global Data -------------------------------*/
81 * If non-zero, the hypervisor has been configured to use a direct
92 /*------------------------------- Per-CPU Data -------------------------------*/
95 /*------------------------------ Sysctl tunables -----------------------------*/
101 /*---------------------- XEN Hypervisor Probe and Setup ----------------------*/
113 msix_disable_migration == -1) {
116 * handle updates to enabled MSI-X table entries,
117 * so disable MSI-X interrupt migration in that
122 "Disabling MSI-X interrupt migration due to Xen hypervisor bug.\n"
132 uint32_t regs[4];
135 do_cpuid(hv_base + 1, regs);
137 major = regs[0] >> 16;
138 minor = regs[0] & 0xffff;
146 * created page-tables.
158 halt();
161 return ((uintptr_t)addr - KERNBASE
163 + kernphys - KERNLOAD
173 * non-RAM) address. But finding one at this point in boot is
174 * complicated, hence re-use a RAM address for the time being. This
175 * sadly causes super-page shattering in the second stage translation
223 switch (console->video_type) {
235 sizeof(fb->efi.fb_mask_reserved),
237 fb->vbe.fb_bpp = console->u.vesa_lfb.bits_per_pixel;
249 fb->efi.fb_addr = console->u.vesa_lfb.lfb_base;
252 fb->efi.fb_addr |=
253 (uint64_t)console->u.vesa_lfb.ext_lfb_base << 32;
254 fb->efi.fb_size = console->u.vesa_lfb.lfb_size << 16;
255 fb->efi.fb_height = console->u.vesa_lfb.height;
256 fb->efi.fb_width = console->u.vesa_lfb.width;
257 fb->efi.fb_stride = (console->u.vesa_lfb.bytes_per_line << 3) /
258 console->u.vesa_lfb.bits_per_pixel;
260 ((~0u << console->u.vesa_lfb.c ## _pos) & \
261 (~0u >> (32 - console->u.vesa_lfb.c ## _pos - \
262 console->u.vesa_lfb.c ## _size)))
263 fb->efi.fb_mask_red = FBMASK(red);
264 fb->efi.fb_mask_green = FBMASK(green);
265 fb->efi.fb_mask_blue = FBMASK(blue);
266 fb->efi.fb_mask_reserved = FBMASK(rsvd);
280 uint32_t regs[4];
290 do_cpuid(hv_base + 2, regs);
291 if (regs[0] != 1) {
293 regs[0]);
298 wrmsr(regs[1], early_init_vtop(&hypercall_page));
375 pin = pci_get_intpin(dev) - 1;
488 uint32_t regs[4];
497 * from a failed migration and our pre-suspend
508 cpuid_count(hv_base + 4, 0, regs);
509 KASSERT((regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ||
512 PCPU_SET(vcpu_id, (regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ?
513 regs[1] : PCPU_GET(acpi_id));
517 * Setup the per-vpcu event channel upcall vector. This is only
536 uint32_t regs[4];
539 cpuid_count(hv_base + 4, 0, regs);
541 return (regs[0] & XEN_HVM_CPUID_IOMMU_MAPPINGS);
572 end = MIN(trunc_page(smap[i].base + smap[i].length) - 1,