Module Name: src Committed By: bouyer Date: Mon Oct 16 17:27:03 UTC 2023
Modified Files: src/sys/arch/x86/acpi: acpi_machdep.c acpi_wakeup.c src/sys/arch/x86/include: genfb_machdep.h src/sys/arch/x86/pci: pci_machdep.c src/sys/arch/x86/x86: genfb_machdep.c hyperv.c Log Message: Declare int acpi_md_vesa_modenum; int acpi_md_vbios_reset; struct vcons_screen x86_genfb_console_screen; in genfb_machdep.h instead of locally as extern in various .c files. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/x86/acpi/acpi_machdep.c cvs rdiff -u -r1.55 -r1.56 src/sys/arch/x86/acpi/acpi_wakeup.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/genfb_machdep.h cvs rdiff -u -r1.95 -r1.96 src/sys/arch/x86/pci/pci_machdep.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x86/x86/genfb_machdep.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x86/x86/hyperv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/acpi/acpi_machdep.c diff -u src/sys/arch/x86/acpi/acpi_machdep.c:1.35 src/sys/arch/x86/acpi/acpi_machdep.c:1.36 --- src/sys/arch/x86/acpi/acpi_machdep.c:1.35 Tue Jan 24 09:35:20 2023 +++ src/sys/arch/x86/acpi/acpi_machdep.c Mon Oct 16 17:27:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_machdep.c,v 1.35 2023/01/24 09:35:20 riastradh Exp $ */ +/* $NetBSD: acpi_machdep.c,v 1.36 2023/10/16 17:27:02 bouyer Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.35 2023/01/24 09:35:20 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.36 2023/10/16 17:27:02 bouyer Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -72,6 +72,7 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_machdep #include <dev/isa/isareg.h> #include <dev/isa/isavar.h> +#include <arch/x86/include/genfb_machdep.h> #include "ioapic.h" @@ -594,6 +595,8 @@ acpi_md_callback(struct acpi_softc *sc) } #ifndef XENPV +int acpi_md_vbios_reset = 0; + void device_acpi_register(device_t dev, void *aux) { @@ -609,8 +612,6 @@ device_acpi_register(device_t dev, void device_is_isa = device_is_a(parent, "isa"); if (device_is_vga && (device_is_pci || device_is_isa)) { - extern int acpi_md_vbios_reset; - acpi_md_vbios_reset = VBIOS_RESET_DEFAULT; } } Index: src/sys/arch/x86/acpi/acpi_wakeup.c diff -u src/sys/arch/x86/acpi/acpi_wakeup.c:1.55 src/sys/arch/x86/acpi/acpi_wakeup.c:1.56 --- src/sys/arch/x86/acpi/acpi_wakeup.c:1.55 Fri Aug 25 08:05:18 2023 +++ src/sys/arch/x86/acpi/acpi_wakeup.c Mon Oct 16 17:27:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_wakeup.c,v 1.55 2023/08/25 08:05:18 riastradh Exp $ */ +/* $NetBSD: acpi_wakeup.c,v 1.56 2023/10/16 17:27:02 bouyer Exp $ */ /*- * Copyright (c) 2002, 2011 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.55 2023/08/25 08:05:18 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.56 2023/10/16 17:27:02 bouyer Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -98,6 +98,7 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_wakeup. #include <x86/cpuvar.h> #include <x86/x86/tsc.h> #include <x86/fpu.h> +#include <arch/x86/include/genfb_machdep.h> #include "opt_vga.h" @@ -111,8 +112,6 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_wakeup. static paddr_t acpi_wakeup_paddr = 3 * PAGE_SIZE; static vaddr_t acpi_wakeup_vaddr; -int acpi_md_vbios_reset = 0; /* Referenced by dev/pci/vga_pci.c */ -int acpi_md_vesa_modenum = 0; /* Referenced by arch/x86/x86/genfb_machdep.c */ static int acpi_md_beep_on_reset = 0; static int acpi_md_s4bios(void); Index: src/sys/arch/x86/include/genfb_machdep.h diff -u src/sys/arch/x86/include/genfb_machdep.h:1.5 src/sys/arch/x86/include/genfb_machdep.h:1.6 --- src/sys/arch/x86/include/genfb_machdep.h:1.5 Thu Jan 28 01:57:31 2021 +++ src/sys/arch/x86/include/genfb_machdep.h Mon Oct 16 17:27:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb_machdep.h,v 1.5 2021/01/28 01:57:31 jmcneill Exp $ */ +/* $NetBSD: genfb_machdep.h,v 1.6 2023/10/16 17:27:02 bouyer Exp $ */ /*- * Copyright (c) 2009 Jared D. McNeill <jmcne...@invisible.ca> @@ -34,4 +34,8 @@ int x86_genfb_cnattach(void); void x86_genfb_set_console_dev(device_t); void x86_genfb_ddb_trap_callback(int); +extern int acpi_md_vesa_modenum; +extern int acpi_md_vbios_reset; +extern struct vcons_screen x86_genfb_console_screen; + #endif /* !_X86_GENFB_MACHDEP_H */ Index: src/sys/arch/x86/pci/pci_machdep.c diff -u src/sys/arch/x86/pci/pci_machdep.c:1.95 src/sys/arch/x86/pci/pci_machdep.c:1.96 --- src/sys/arch/x86/pci/pci_machdep.c:1.95 Fri Aug 25 08:05:18 2023 +++ src/sys/arch/x86/pci/pci_machdep.c Mon Oct 16 17:27:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.95 2023/08/25 08:05:18 riastradh Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.96 2023/10/16 17:27:02 bouyer Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.95 2023/08/25 08:05:18 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.96 2023/10/16 17:27:02 bouyer Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -310,11 +310,6 @@ static struct pci_conf_lock cl0 = { static struct pci_conf_lock * const cl = &cl0; -#if NGENFB > 0 && NACPICA > 0 && defined(VGA_POST) && !defined(XENPV) -extern int acpi_md_vbios_reset; -extern int acpi_md_vesa_modenum; -#endif - static struct genfb_colormap_callback gfb_cb; static struct genfb_pmf_callback pmf_cb; static struct genfb_mode_callback mode_cb; @@ -1113,7 +1108,6 @@ static void populate_fbinfo(device_t dev, prop_dictionary_t dict) { #if NWSDISPLAY > 0 && NGENFB > 0 - extern struct vcons_screen x86_genfb_console_screen; struct rasops_info *ri = &x86_genfb_console_screen.scr_ri; #endif const void *fbptr = lookup_bootinfo(BTINFO_FRAMEBUFFER); @@ -1267,7 +1261,6 @@ device_pci_register(device_t dev, void * prop_dictionary_set_bool(dict, "clear-screen", false); #if NWSDISPLAY > 0 && NGENFB > 0 - extern struct vcons_screen x86_genfb_console_screen; prop_dictionary_set_uint16(dict, "cursor-row", x86_genfb_console_screen.scr_ri.ri_crow); #endif Index: src/sys/arch/x86/x86/genfb_machdep.c diff -u src/sys/arch/x86/x86/genfb_machdep.c:1.20 src/sys/arch/x86/x86/genfb_machdep.c:1.21 --- src/sys/arch/x86/x86/genfb_machdep.c:1.20 Fri Aug 25 08:05:18 2023 +++ src/sys/arch/x86/x86/genfb_machdep.c Mon Oct 16 17:27:03 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb_machdep.c,v 1.20 2023/08/25 08:05:18 riastradh Exp $ */ +/* $NetBSD: genfb_machdep.c,v 1.21 2023/10/16 17:27:03 bouyer Exp $ */ /*- * Copyright (c) 2009 Jared D. McNeill <jmcne...@invisible.ca> @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.20 2023/08/25 08:05:18 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.21 2023/10/16 17:27:03 bouyer Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -62,7 +62,7 @@ struct vcons_screen x86_genfb_console_sc bool x86_genfb_use_shadowfb = true; #if NACPICA > 0 && !defined(XENPV) -extern int acpi_md_vesa_modenum; /* XXX should go in a .h file */ +int acpi_md_vesa_modenum = 0; #endif static device_t x86_genfb_console_dev = NULL; Index: src/sys/arch/x86/x86/hyperv.c diff -u src/sys/arch/x86/x86/hyperv.c:1.15 src/sys/arch/x86/x86/hyperv.c:1.16 --- src/sys/arch/x86/x86/hyperv.c:1.15 Fri May 20 13:55:16 2022 +++ src/sys/arch/x86/x86/hyperv.c Mon Oct 16 17:27:03 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: hyperv.c,v 1.15 2022/05/20 13:55:16 nonaka Exp $ */ +/* $NetBSD: hyperv.c,v 1.16 2023/10/16 17:27:03 bouyer Exp $ */ /*- * Copyright (c) 2009-2012,2016-2017 Microsoft Corp. @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> #ifdef __KERNEL_RCSID -__KERNEL_RCSID(0, "$NetBSD: hyperv.c,v 1.15 2022/05/20 13:55:16 nonaka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hyperv.c,v 1.16 2023/10/16 17:27:03 bouyer Exp $"); #endif #ifdef __FBSDID __FBSDID("$FreeBSD: head/sys/dev/hyperv/vmbus/hyperv.c 331757 2018-03-30 02:25:12Z emaste $"); @@ -1048,7 +1048,6 @@ static void populate_fbinfo(device_t dev, prop_dictionary_t dict) { #if NWSDISPLAY > 0 && NGENFB > 0 - extern struct vcons_screen x86_genfb_console_screen; struct rasops_info *ri = &x86_genfb_console_screen.scr_ri; #endif const void *fbptr = lookup_bootinfo(BTINFO_FRAMEBUFFER); @@ -1140,7 +1139,6 @@ device_hyperv_register(device_t dev, voi prop_dictionary_set_bool(dict, "clear-screen", false); #if NWSDISPLAY > 0 && NGENFB > 0 - extern struct vcons_screen x86_genfb_console_screen; prop_dictionary_set_uint16(dict, "cursor-row", x86_genfb_console_screen.scr_ri.ri_crow); #endif