diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-04-20 16:06:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2018-04-20 16:06:08 +0000 |
commit | 1fcdae3803f12bcab8d7dcd79f499606f6286306 (patch) | |
tree | e70105ce5469978a0e66ebab77083109aa41e72a /sys/arch/amd64 | |
parent | ec7677f0c1cf4c5c826b0fbbf535d65a596a17ea (diff) |
sync
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/efifb.c | 21 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/mainbus.c | 17 | ||||
-rw-r--r-- | sys/arch/amd64/include/efifbvar.h | 3 |
3 files changed, 37 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/efifb.c b/sys/arch/amd64/amd64/efifb.c index 609de484ae0..5cf95af7e62 100644 --- a/sys/arch/amd64/amd64/efifb.c +++ b/sys/arch/amd64/amd64/efifb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efifb.c,v 1.12 2017/10/28 01:48:03 yasuoka Exp $ */ +/* $OpenBSD: efifb.c,v 1.13 2018/04/20 16:06:04 deraadt Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -101,6 +101,7 @@ int efifb_show_screen(void *, void *, int, void (*cb) (void *, int, int), void *); int efifb_list_font(void *, struct wsdisplay_font *); int efifb_load_font(void *, void *, struct wsdisplay_font *); +void efifb_scrollback(void *, void *, int lines); void efifb_efiinfo_init(struct efifb *); void efifb_cnattach_common(void); @@ -133,7 +134,8 @@ struct wsdisplay_accessops efifb_accessops = { .free_screen = efifb_free_screen, .show_screen = efifb_show_screen, .load_font = efifb_load_font, - .list_font = efifb_list_font + .list_font = efifb_list_font, + .scrollback = efifb_scrollback, }; struct cfdriver efifb_cd = { @@ -399,6 +401,15 @@ efifb_list_font(void *v, struct wsdisplay_font *font) return (rasops_list_font(ri, font)); } +void +efifb_scrollback(void *v, void *cookie, int lines) +{ + struct efifb_softc *sc = v; + struct rasops_info *ri = &sc->sc_fb->rinfo; + + rasops_scrollback(ri, cookie, lines); +} + int efifb_cnattach(void) { @@ -484,6 +495,12 @@ efifb_cndetach(void) efifb_console.detached = 1; } +void +efifb_cnreattach(void) +{ + efifb_console.detached = 0; +} + int efifb_cb_cnattach(void) { diff --git a/sys/arch/amd64/amd64/mainbus.c b/sys/arch/amd64/amd64/mainbus.c index ed6ab059329..d26cf4c24de 100644 --- a/sys/arch/amd64/amd64/mainbus.c +++ b/sys/arch/amd64/amd64/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.40 2017/10/14 04:44:43 jsg Exp $ */ +/* $OpenBSD: mainbus.c,v 1.41 2018/04/20 16:06:04 deraadt Exp $ */ /* $NetBSD: mainbus.c,v 1.1 2003/04/26 18:39:29 fvdl Exp $ */ /* @@ -261,6 +261,21 @@ mainbus_attach(struct device *parent, struct device *self, void *aux) #endif } +void +mainbus_efifb_reattach(void) +{ +#if NEFIFB > 0 + union mainbus_attach_args mba; + struct device *self = device_mainbus(); + + if (bios_efiinfo != NULL || efifb_cb_found()) { + efifb_cnreattach(); + mba.mba_eaa.eaa_name = "efifb"; + config_found(self, &mba, mainbus_print); + } +#endif +} + int mainbus_print(void *aux, const char *pnp) { diff --git a/sys/arch/amd64/include/efifbvar.h b/sys/arch/amd64/include/efifbvar.h index f5e2bb26cae..26a5fe774e3 100644 --- a/sys/arch/amd64/include/efifbvar.h +++ b/sys/arch/amd64/include/efifbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: efifbvar.h,v 1.4 2016/06/21 15:24:55 jcs Exp $ */ +/* $OpenBSD: efifbvar.h,v 1.5 2018/04/20 16:06:04 deraadt Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -28,6 +28,7 @@ struct pci_attach_args; int efifb_cnattach(void); int efifb_is_console(struct pci_attach_args *); void efifb_cndetach(void); +void efifb_cnreattach(void); int efifb_cb_found(void); int efifb_cb_cnattach(void); |