aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/machdep.c11
-rw-r--r--sys/amd64/include/md_var.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index a743d8c63e1b..6e36ae975239 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -317,6 +317,12 @@ cpu_startup(dummy)
printf("avail memory = %ju (%ju MB)\n",
ptoa((uintmax_t)vm_free_count()),
ptoa((uintmax_t)vm_free_count()) / 1048576);
+#ifdef DEV_PCI
+ if (bootverbose && intel_graphics_stolen_base != 0)
+ printf("intel stolen mem: base %#jx size %ju MB\n",
+ (uintmax_t)intel_graphics_stolen_base,
+ (uintmax_t)intel_graphics_stolen_size / 1024 / 1024);
+#endif
/*
* Set up buffers, so they can be used to read disk labels.
@@ -1792,6 +1798,11 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
/* now running on new page tables, configured,and u/iom is accessible */
+#ifdef DEV_PCI
+ /* This call might adjust phys_avail[]. */
+ pci_early_quirks();
+#endif
+
if (late_console)
cninit();
diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h
index 5296517595f0..cd8036e25a29 100644
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -43,6 +43,9 @@ extern int hw_ssb_disable;
extern int nmi_flush_l1d_sw;
extern int syscall_ret_l1d_flush_mode;
+extern vm_paddr_t intel_graphics_stolen_base;
+extern vm_paddr_t intel_graphics_stolen_size;
+
/*
* The file "conf/ldscript.amd64" defines the symbol "kernphys". Its
* value is the physical address at which the kernel is loaded.
@@ -79,5 +82,6 @@ void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist);
void sse2_pagezero(void *addr);
struct savefpu *get_pcb_user_save_td(struct thread *td);
struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb);
+void pci_early_quirks(void);
#endif /* !_MACHINE_MD_VAR_H_ */