vt_vga.c (219897) | vt_vga.c (234252) |
---|---|
1/*- 2 * Copyright (c) 2005 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Copyright (c) 2009 The FreeBSD Foundation 6 * All rights reserved. 7 * 8 * Portions of this software were developed by Ed Schouten --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005 Marcel Moolenaar 3 * All rights reserved. 4 * 5 * Copyright (c) 2009 The FreeBSD Foundation 6 * All rights reserved. 7 * 8 * Portions of this software were developed by Ed Schouten --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: user/ed/newcons/sys/dev/vt/hw/vga/vga.c 219897 2011-03-23 06:31:45Z ed $"); | 34__FBSDID("$FreeBSD: user/ed/newcons/sys/dev/vt/hw/vga/vga.c 234252 2012-04-14 00:27:50Z marcel $"); |
35 36#include <sys/param.h> 37#include <sys/kernel.h> 38#include <sys/systm.h> 39 40#include <dev/vt/vt.h> 41#include <dev/vt/hw/vga/vga_reg.h> 42 --- 526 unchanged lines hidden (view full) --- 569 struct vga_softc *sc = vd->vd_softc; 570 int textmode = 0; 571 572#if defined(__amd64__) || defined(__i386__) 573 sc->vga_fb_tag = X86_BUS_SPACE_MEM; 574 sc->vga_fb_handle = KERNBASE + VGA_MEM_BASE; 575 sc->vga_reg_tag = X86_BUS_SPACE_IO; 576 sc->vga_reg_handle = VGA_REG_BASE; | 35 36#include <sys/param.h> 37#include <sys/kernel.h> 38#include <sys/systm.h> 39 40#include <dev/vt/vt.h> 41#include <dev/vt/hw/vga/vga_reg.h> 42 --- 526 unchanged lines hidden (view full) --- 569 struct vga_softc *sc = vd->vd_softc; 570 int textmode = 0; 571 572#if defined(__amd64__) || defined(__i386__) 573 sc->vga_fb_tag = X86_BUS_SPACE_MEM; 574 sc->vga_fb_handle = KERNBASE + VGA_MEM_BASE; 575 sc->vga_reg_tag = X86_BUS_SPACE_IO; 576 sc->vga_reg_handle = VGA_REG_BASE; |
577#elif defined(__ia64__) 578 sc->vga_fb_tag = IA64_BUS_SPACE_MEM; 579 sc->vga_fb_handle = IA64_PHYS_TO_RR6(VGA_MEM_BASE); 580 sc->vga_reg_tag = IA64_BUS_SPACE_IO; 581 sc->vga_reg_handle = VGA_REG_BASE; |
|
577#else 578# error "Architecture not yet supported!" 579#endif 580 581 TUNABLE_INT_FETCH("hw.vga.textmode", &textmode); 582 if (textmode) { 583 vd->vd_flags |= VDF_TEXTMODE; 584 vd->vd_width = 80; 585 vd->vd_height = 25; 586 } else { 587 vd->vd_width = VT_VGA_WIDTH; 588 vd->vd_height = VT_VGA_HEIGHT; 589 } 590 vga_initialize(vd, textmode); 591 592 return (CN_INTERNAL); 593} | 582#else 583# error "Architecture not yet supported!" 584#endif 585 586 TUNABLE_INT_FETCH("hw.vga.textmode", &textmode); 587 if (textmode) { 588 vd->vd_flags |= VDF_TEXTMODE; 589 vd->vd_width = 80; 590 vd->vd_height = 25; 591 } else { 592 vd->vd_width = VT_VGA_WIDTH; 593 vd->vd_height = VT_VGA_HEIGHT; 594 } 595 vga_initialize(vd, textmode); 596 597 return (CN_INTERNAL); 598} |