1/*-
2 * Copyright (c) 1999 FreeBSD(98) Porting Team.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 9 unchanged lines hidden (view full) ---
18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/pc98/cbus/scvtb.c 109623 2003-01-21 08:56:16Z alfred $
27 */
28
29#include "opt_syscons.h"
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/malloc.h>
34#include <sys/consio.h>
--- 63 unchanged lines hidden (view full) ---
98
99 switch (type) {
100 case VTB_MEMORY:
101 case VTB_RINGBUFFER:
102 if ((buf == NULL) && (cols*rows != 0)) {
103 vtb->vtb_buffer =
104 (vm_offset_t)malloc(cols*rows*sizeof(u_int16_t)*2,
105 M_DEVBUF,
106 ((wait) ? 0 : M_NOWAIT) | M_ZERO);
107 if (vtb->vtb_buffer != 0) {
108 vtb->vtb_flags |= VTB_ALLOCED;
109 }
110 } else {
111 vtb->vtb_buffer = (vm_offset_t)buf;
112 }
113 vtb->vtb_flags |= VTB_VALID;
114 break;
--- 285 unchanged lines hidden ---
2 * Copyright (c) 1999 FreeBSD(98) Porting Team.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 9 unchanged lines hidden (view full) ---
18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/pc98/cbus/scvtb.c 109623 2003-01-21 08:56:16Z alfred $
27 */
28
29#include "opt_syscons.h"
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/malloc.h>
34#include <sys/consio.h>
--- 63 unchanged lines hidden (view full) ---
98
99 switch (type) {
100 case VTB_MEMORY:
101 case VTB_RINGBUFFER:
102 if ((buf == NULL) && (cols*rows != 0)) {
103 vtb->vtb_buffer =
104 (vm_offset_t)malloc(cols*rows*sizeof(u_int16_t)*2,
105 M_DEVBUF,
106 ((wait) ? 0 : M_NOWAIT) | M_ZERO);
107 if (vtb->vtb_buffer != 0) {
108 vtb->vtb_flags |= VTB_ALLOCED;
109 }
110 } else {
111 vtb->vtb_buffer = (vm_offset_t)buf;
112 }
113 vtb->vtb_flags |= VTB_VALID;
114 break;
--- 285 unchanged lines hidden ---