diff options
author | 2019-01-10 01:16:29 +0000 | |
---|---|---|
committer | 2019-01-10 01:16:29 +0000 | |
commit | 3a3c80cb6005e4e3046d5bb264684f11f50186ef (patch) | |
tree | 354f953556a7474c3aadda6f543a64d2840110ee | |
parent | Drop dead links to loria.fr and cvshome.org (diff) | |
download | wireguard-openbsd-3a3c80cb6005e4e3046d5bb264684f11f50186ef.tar.xz wireguard-openbsd-3a3c80cb6005e4e3046d5bb264684f11f50186ef.zip |
add efifb_stolen() to get the size of the efifb framebuffer
suggested by and ok kettenis@
-rw-r--r-- | sys/arch/amd64/amd64/efifb.c | 9 | ||||
-rw-r--r-- | sys/arch/amd64/include/efifbvar.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/efifb.c b/sys/arch/amd64/amd64/efifb.c index 255b8f7760d..9bf5bb58b7e 100644 --- a/sys/arch/amd64/amd64/efifb.c +++ b/sys/arch/amd64/amd64/efifb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: efifb.c,v 1.18 2018/09/22 17:41:52 kettenis Exp $ */ +/* $OpenBSD: efifb.c,v 1.19 2019/01/10 01:16:29 jsg Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -594,3 +594,10 @@ cb_find_fb(paddr_t addr) return NULL; } + +psize_t +efifb_stolen(void) +{ + struct efifb *fb = &efifb_console; + return fb->psize; +} diff --git a/sys/arch/amd64/include/efifbvar.h b/sys/arch/amd64/include/efifbvar.h index a900cd0238d..0737ea8e5ce 100644 --- a/sys/arch/amd64/include/efifbvar.h +++ b/sys/arch/amd64/include/efifbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: efifbvar.h,v 1.8 2018/09/22 17:41:52 kettenis Exp $ */ +/* $OpenBSD: efifbvar.h,v 1.9 2019/01/10 01:16:29 jsg Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -34,4 +34,6 @@ void efifb_cnreattach(void); int efifb_cb_found(void); int efifb_cb_cnattach(void); +psize_t efifb_stolen(void); + #endif /* _MACHINE_EFIFB_H_ */ |