diff options
author | Roland McGrath <roland@gnu.org> | 2001-04-05 06:39:21 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2001-04-05 06:39:21 +0000 |
commit | b42bd0d675ec7d1e1fbbf274fadbea984c8dab22 (patch) | |
tree | a7f61083f2dfa365d5d9e7101c72e8cb5b3b16a9 /i386/i386at/blit.c | |
parent | 2d43f4abdedd003eb070d633bac0e3a6fb3a746b (diff) | |
download | gnumach-b42bd0d675ec7d1e1fbbf274fadbea984c8dab22.tar.gz gnumach-b42bd0d675ec7d1e1fbbf274fadbea984c8dab22.tar.bz2 gnumach-b42bd0d675ec7d1e1fbbf274fadbea984c8dab22.zip |
2001-04-04 Roland McGrath <roland@frob.com>
* ddb/db_access.h: Fix obsolescent #else/#endif syntax.
* ddb/db_aout.c: Likewise.
* ddb/db_break.c: Likewise.
* ddb/db_break.h: Likewise.
* ddb/db_command.c: Likewise.
* ddb/db_command.h: Likewise.
* ddb/db_cond.c: Likewise.
* ddb/db_examine.c: Likewise.
* ddb/db_expr.c: Likewise.
* ddb/db_ext_symtab.c: Likewise.
* ddb/db_input.c: Likewise.
* ddb/db_lex.c: Likewise.
* ddb/db_macro.c: Likewise.
* ddb/db_mp.c: Likewise.
* ddb/db_output.c: Likewise.
* ddb/db_print.c: Likewise.
* ddb/db_run.c: Likewise.
* ddb/db_sym.c: Likewise.
* ddb/db_task_thread.c: Likewise.
* ddb/db_task_thread.h: Likewise.
* ddb/db_trap.c: Likewise.
* ddb/db_variables.c: Likewise.
* ddb/db_watch.c: Likewise.
* ddb/db_watch.h: Likewise.
* ddb/db_write_cmd.c: Likewise.
* device/dev_pager.c: Likewise.
* device/device_port.h: Likewise.
* device/device_types_kernel.h: Likewise.
* device/ds_routines.h: Likewise.
* device/errno.h: Likewise.
* device/if_ether.h: Likewise.
* device/if_hdr.h: Likewise.
* device/io_req.h: Likewise.
* device/net_io.c: Likewise.
* device/net_io.h: Likewise.
* i386/i386/ast_check.c: Likewise.
* i386/i386/cswitch.S: Likewise.
* i386/i386/db_disasm.c: Likewise.
* i386/i386/db_interface.c: Likewise.
* i386/i386/db_trace.c: Likewise.
* i386/i386/debug.h: Likewise.
* i386/i386/debug_i386.c: Likewise.
* i386/i386/debug_trace.S: Likewise.
* i386/i386/eflags.h: Likewise.
* i386/i386/gdt.h: Likewise.
* i386/i386/hardclock.c: Likewise.
* i386/i386/idt-gen.h: Likewise.
* i386/i386/ipl.h: Likewise.
* i386/i386/ktss.h: Likewise.
* i386/i386/kttd_interface.c: Likewise.
* i386/i386/ldt.h: Likewise.
* i386/i386/lock.h: Likewise.
* i386/i386/locore.S: Likewise.
* i386/i386/mp_desc.h: Likewise.
* i386/i386/pic.c: Likewise.
* i386/i386/pic.h: Likewise.
* i386/i386/pio.h: Likewise.
* i386/i386/pit.h: Likewise.
* i386/i386/seg.h: Likewise.
* i386/i386/thread.h: Likewise.
* i386/i386/trap.c: Likewise.
* i386/i386/trap.h: Likewise.
* i386/i386/vm_param.h: Likewise.
* i386/i386/vm_tuning.h: Likewise.
* i386/i386at/autoconf.c: Likewise.
* i386/i386at/blit.c: Likewise.
* i386/i386at/conf.c: Likewise.
* i386/i386at/fd.c: Likewise.
* i386/i386at/idt.h: Likewise.
* i386/i386at/immc.c: Likewise.
* i386/i386at/kd.c: Likewise.
* i386/i386at/kd_event.c: Likewise.
* i386/i386at/kd_mouse.c: Likewise.
* i386/i386at/model_dep.c: Likewise.
* i386/i386at/rtc.c: Likewise.
* i386/include/mach/i386/asm.h: Likewise.
* i386/include/mach/i386/eflags.h: Likewise.
* i386/include/mach/i386/mach_i386.defs: Likewise.
* i386/include/mach/i386/multiboot.h: Likewise.
* i386/include/mach/i386/trap.h: Likewise.
* i386/include/mach/i386/vm_types.h: Likewise.
* i386/include/mach/sa/stdarg.h: Likewise.
* i386/intel/pmap.c: Likewise.
* i386/intel/pmap.h: Likewise.
* include/alloca.h: Likewise.
* include/device/device_types.defs: Likewise.
* include/device/device_types.h: Likewise.
* include/device/disk_status.h: Likewise.
* include/device/net_status.h: Likewise.
* include/mach/mach.defs: Likewise.
* include/mach/memory_object.defs: Likewise.
* include/mach/std_types.defs: Likewise.
* include/mach_debug/hash_info.h: Likewise.
* include/mach_debug/ipc_info.h: Likewise.
* include/mach_debug/mach_debug.defs: Likewise.
* include/mach_debug/mach_debug_types.defs: Likewise.
* include/mach_debug/mach_debug_types.h: Likewise.
* include/mach_debug/vm_info.h: Likewise.
* include/mach_debug/zone_info.h: Likewise.
* include/sys/ioctl.h: Likewise.
* include/sys/time.h: Likewise.
* ipc/ipc_entry.h: Likewise.
* ipc/ipc_hash.h: Likewise.
* ipc/ipc_init.c: Likewise.
* ipc/ipc_kmsg.c: Likewise.
* ipc/ipc_kmsg.h: Likewise.
* ipc/ipc_marequest.c: Likewise.
* ipc/ipc_marequest.h: Likewise.
* ipc/ipc_mqueue.c: Likewise.
* ipc/ipc_mqueue.h: Likewise.
* ipc/ipc_notify.c: Likewise.
* ipc/ipc_notify.h: Likewise.
* ipc/ipc_object.c: Likewise.
* ipc/ipc_object.h: Likewise.
* ipc/ipc_port.c: Likewise.
* ipc/ipc_port.h: Likewise.
* ipc/ipc_pset.c: Likewise.
* ipc/ipc_pset.h: Likewise.
* ipc/ipc_right.c: Likewise.
* ipc/ipc_right.h: Likewise.
* ipc/ipc_space.c: Likewise.
* ipc/ipc_space.h: Likewise.
* ipc/mach_debug.c: Likewise.
* ipc/mach_msg.c: Likewise.
* ipc/mach_msg.h: Likewise.
* ipc/mach_port.c: Likewise.
* kern/act.c: Likewise.
* kern/assert.h: Likewise.
* kern/ast.c: Likewise.
* kern/ast.h: Likewise.
* kern/bootstrap.c: Likewise.
* kern/counters.c: Likewise.
* kern/counters.h: Likewise.
* kern/debug.h: Likewise.
* kern/exception.c: Likewise.
* kern/host.h: Likewise.
* kern/ipc_host.c: Likewise.
* kern/ipc_host.h: Likewise.
* kern/ipc_kobject.c: Likewise.
* kern/ipc_mig.c: Likewise.
* kern/ipc_tt.c: Likewise.
* kern/ipc_tt.h: Likewise.
* kern/kalloc.h: Likewise.
* kern/lock_mon.c: Likewise.
* kern/mach_clock.c: Likewise.
* kern/mach_factor.c: Likewise.
* kern/mach_param.h: Likewise.
* kern/machine.c: Likewise.
* kern/processor.c: Likewise.
* kern/profile.c: Likewise.
* kern/queue.h: Likewise.
* kern/sched.h: Likewise.
* kern/startup.c: Likewise.
* kern/syscall_emulation.h: Likewise.
* kern/syscall_subr.c: Likewise.
* kern/syscall_subr.h: Likewise.
* kern/syscall_sw.c: Likewise.
* kern/syscall_sw.h: Likewise.
* kern/task.h: Likewise.
* kern/thread_swap.h: Likewise.
* kern/time_out.h: Likewise.
* kern/time_stamp.c: Likewise.
* kern/time_stamp.h: Likewise.
* kern/timer.c: Likewise.
* kern/timer.h: Likewise.
* kern/xpr.c: Likewise.
* kern/xpr.h: Likewise.
* kern/zalloc.c: Likewise.
* kern/zalloc.h: Likewise.
* linux/dev/drivers/block/ide.c: Likewise.
* linux/dev/include/linux/blk.h: Likewise.
* linux/src/include/linux/cdrom.h: Likewise.
* linux/src/include/linux/md.h: Likewise.
* util/cpu.h: Likewise.
* vm/memory_object.c: Likewise.
* vm/memory_object.h: Likewise.
* vm/pmap.h: Likewise.
* vm/vm_debug.c: Likewise.
* vm/vm_external.h: Likewise.
* vm/vm_fault.c: Likewise.
* vm/vm_fault.h: Likewise.
* vm/vm_kern.h: Likewise.
* vm/vm_map.c: Likewise.
* vm/vm_map.h: Likewise.
* vm/vm_object.h: Likewise.
* vm/vm_pageout.c: Likewise.
* vm/vm_pageout.h: Likewise.
* vm/vm_user.h: Likewise.
Diffstat (limited to 'i386/i386at/blit.c')
-rw-r--r-- | i386/i386at/blit.c | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/i386/i386at/blit.c b/i386/i386at/blit.c index e97b0eea..32cc0a27 100644 --- a/i386/i386at/blit.c +++ b/i386/i386at/blit.c @@ -1,29 +1,29 @@ -/* +/* * Mach Operating System * Copyright (c) 1991,1990,1989 Carnegie Mellon University * All Rights Reserved. - * + * * Permission to use, copy, modify and distribute this software and its * documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. - * + * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * + * * Carnegie Mellon requests users of this software to return to - * + * * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU * School of Computer Science * Carnegie Mellon University * Pittsburgh PA 15213-3890 - * + * * any improvements or extensions that they make and grant Carnegie Mellon * the rights to redistribute these changes. */ - + /* ********************************************************************** File: blit.c Description: Device Driver for Bell Tech Blit card @@ -81,14 +81,14 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #ifdef MACH_KERNEL #include <sys/types.h> #include <device/errno.h> -#else MACH_KERNEL +#else /* MACH_KERNEL */ #include <sys/types.h> #include <sys/errno.h> #include <sys/param.h> #include <sys/dir.h> #include <sys/signal.h> #include <sys/user.h> -#endif MACH_KERNEL +#endif /* MACH_KERNEL */ #include <vm/vm_kern.h> #include <mach/vm_param.h> #include <machine/machspl.h> @@ -115,7 +115,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #define MAXBLITS 1 -#if NBLIT > MAXBLITS +#if NBLIT > MAXBLITS /* oh, no, you don't want to do this...; */ #else @@ -166,14 +166,14 @@ struct mb_driver blitdriver = { /* * Per-card bookkeeping information for driver. - * - * "scrstrip" and "dpctlregs" point to data areas that are passed to - * the Display Processor. They are allocated out of the spare - * graphics memory. "scrstrip" is used to describe an entire screen. - * "dpctlregs" contains assorted parameters for the display - * controller. - * - * "firstfree" is an offset into the graphics memory. Memory starting + * + * "scrstrip" and "dpctlregs" point to data areas that are passed to + * the Display Processor. They are allocated out of the spare + * graphics memory. "scrstrip" is used to describe an entire screen. + * "dpctlregs" contains assorted parameters for the display + * controller. + * + * "firstfree" is an offset into the graphics memory. Memory starting * there can be allocated by users. */ @@ -187,7 +187,7 @@ struct blitsoft { } blitsoft[NBLIT]; -/* +/* * The following array contains the initial settings for * the Display Processor Control Block Registers. * The video timing signals in this array are for the @@ -221,9 +221,9 @@ DPCONTROLBLK blit_mparm = { DP_CURSOR_CROSSHAIR, /* cursor style & mode */ 0x00A0, 0x0050, /* cursor x & y loc. */ /* cursor pattern */ - 0xfffe, 0xfffc, 0xc018, 0xc030, 0xc060, 0xc0c0, 0xc0c0, 0xc060, - 0xc430, 0xce18, 0xdb0c, 0xf186, 0xe0c3, 0xc066, 0x803c, 0x0018 -}; + 0xfffe, 0xfffc, 0xc018, 0xc030, 0xc060, 0xc0c0, 0xc0c0, 0xc060, + 0xc430, 0xce18, 0xdb0c, 0xf186, 0xe0c3, 0xc066, 0x803c, 0x0018 +}; void blitreboot(); @@ -234,7 +234,7 @@ void blitreboot(); ***********/ -/* +/* * Probe - is the board there? * * in: reg = start of mapped Blit memory. @@ -242,7 +242,7 @@ void blitreboot(); * out: returns size of mapped Blit memory if the board is present, * 0 otherwise. * - * effects: if the board is present, it is reset and left visible in + * effects: if the board is present, it is reset and left visible in * Unix mode. */ @@ -277,7 +277,7 @@ blitinit() } -/* +/* * Allocate needed objects from Blit's memory. */ blit_memory_init(bs) @@ -311,14 +311,14 @@ blit_memory_init(bs) } -/* +/* * Reset the Blit board and leave it visible. */ blit_reset_board() { union blit_config_reg config; - + config.byte = inb(BLIT_CONFIG_ADDR); config.reg.reset = 1; outb(BLIT_CONFIG_ADDR, config.byte); @@ -331,7 +331,7 @@ blit_reset_board() #if AUTOINIT -/* +/* * Attach - finish initialization by setting up the 786. */ @@ -357,7 +357,7 @@ init_biu(blt) /* WRITEREG16(blt, DRAM_REFRESH, 0x003f); */ WRITEREG16(blt, DRAM_REFRESH, 0x0018); /* refresh rate */ - WRITEREG16(blt, DRAM_CONTROL, + WRITEREG16(blt, DRAM_CONTROL, MEMROWS1 | FASTPG_INTERLV | HEIGHT_256K); WRITEREG16(blt, DP_PRIORITY, (7 << 3) | 7); /* max pri */ WRITEREG16(blt, GP_PRIORITY, (1 << 3) | 1); /* almost min pri */ @@ -371,7 +371,7 @@ init_biu(blt) } -/* +/* * Initialize the Display Processor. * XXX - assumes only 1 card is installed, assumes monochrome display. */ @@ -383,9 +383,9 @@ init_dp(bs) struct blitmem *bm = (struct blitmem *)blt->graphmem; /* - * Set up strip header and tile descriptor for the whole - * screen. It's not clear why the C bit should be turned on, - * but it seems to get rid of the nasty flickering you can get + * Set up strip header and tile descriptor for the whole + * screen. It's not clear why the C bit should be turned on, + * but it seems to get rid of the nasty flickering you can get * by positioning an xterm window along the top of the screen. */ bs->scrstrip->strip.lines = BLIT_MONOHEIGHT - 1; @@ -398,7 +398,7 @@ init_dp(bs) BLIT_MONOWIDTH, /* width of bitmap */ VM_TO_ADDR786(bm->fb.mono_fb, blt), /* the actual bitmap */ 1); /* bits per pixel */ - + /* Copy into DP register block. */ *(bs->dpctlregs) = blit_mparm; bs->dpctlregs->descl = DP_ADDRLOW(VM_TO_ADDR786(bs->scrstrip, blt)); @@ -448,7 +448,7 @@ tiledesc(tile, x, y, w, ww, adx, bpp) /* - * Cause the Display Processor to load its Control Registers from + * Cause the Display Processor to load its Control Registers from * "vm_addr". */ @@ -463,7 +463,7 @@ DPCONTROLBLK *vm_addr; /* set up dp address */ WRITEREG16(blt, DP_PARM1_REG, DP_ADDRLOW(blit_addr)); WRITEREG16(blt, DP_PARM2_REG, DP_ADDRHIGH(blit_addr)); - + /* set blanking video */ WRITEREG16(blt, DEF_VIDEO_REG, 0); @@ -556,9 +556,9 @@ int length; /* num bytes to map */ vm_offset_t vmaddr; #ifdef MACH_KERNEL vm_offset_t io_map(); -#else MACH_KERNEL +#else /* MACH_KERNEL */ vm_offset_t pmap_map_bd(); -#endif MACH_KERNEL +#endif /* MACH_KERNEL */ if (physaddr != (caddr_t)trunc_page(physaddr)) panic("Blit card not on page boundary"); @@ -566,11 +566,11 @@ int length; /* num bytes to map */ #ifdef MACH_KERNEL vmaddr = io_map((vm_offset_t)physaddr, length); if (vmaddr == 0) -#else MACH_KERNEL +#else /* MACH_KERNEL */ if (kmem_alloc_pageable(kernel_map, &vmaddr, round_page(BLIT_MAPPED_SIZE)) != KERN_SUCCESS) -#endif MACH_KERNEL +#endif /* MACH_KERNEL */ panic("can't alloc VM for Blit card"); (void)pmap_map_bd(vmaddr, (vm_offset_t)physaddr, @@ -595,8 +595,8 @@ int length; /* * blit_init: initialize globals & hardware, and set cursor. Could be * called twice, once as part of kd initialization and once as part of - * blit initialization. Should not be called before blit_present() is - * called. + * blit initialization. Should not be called before blit_present() is + * called. */ void @@ -644,7 +644,7 @@ blit_init() /* * Use generic bitmap routines, no 786 assist (see - * blit_memory_init). + * blit_memory_init). */ kd_dput = bmpput; kd_dmvup = bmpmvup; @@ -723,7 +723,7 @@ getfontinfo(blt) char_white = BLIT_WHITE_BYTE; font_start = rom + fontoffset; - + /* * Check byte-alignment assumption. * XXX - does it do any good to panic when initializing the @@ -755,8 +755,8 @@ pick_cursor_height() int scl_avail; /* scan lines available for console */ int scl_per_line; /* scan lines per console line */ - /* - * scan lines avail. = total lines - top margin; + /* + * scan lines avail. = total lines - top margin; * no bottom margin (XXX). */ scl_avail = BLIT_MONOHEIGHT - ystart; @@ -769,9 +769,9 @@ pick_cursor_height() } -/* - * setstatus: Give a status indication to the user. Ideally, we'd - * just set the 3 user-controlled LED's. Unfortunately, that doesn't +/* + * setstatus: Give a status indication to the user. Ideally, we'd + * just set the 3 user-controlled LED's. Unfortunately, that doesn't * seem to work. So, we ring the bell. */ @@ -780,7 +780,7 @@ setstatus(val) int val; { union blit_diag_reg diag; - + diag.byte = inb(BLIT_DIAG_ADDR); diag.reg.led0 = (val & 1) ? BLIT_LED_ON : BLIT_LED_OFF; diag.reg.led1 = (val & 2) ? BLIT_LED_ON : BLIT_LED_OFF; @@ -807,8 +807,8 @@ setstatus(val) ***********/ -/* - * Open - Verify that minor device is OK and not in use, then clear +/* + * Open - Verify that minor device is OK and not in use, then clear * the screen. */ @@ -850,7 +850,7 @@ blitclose(dev, flag) } -/* +/* * Mmap. */ @@ -869,7 +869,7 @@ blitmmap(dev, off, prot) } -/* +/* * Ioctl. */ @@ -894,7 +894,7 @@ io_return_t blit_get_stat(dev, flavor, data, count) } return (D_SUCCESS); } -#else MACH_KERNEL +#else /* MACH_KERNEL */ /*ARGSUSED*/ int blitioctl(dev, cmd, data, flag) @@ -916,7 +916,7 @@ blitioctl(dev, cmd, data, flag) return(err); } -#endif MACH_KERNEL +#endif /* MACH_KERNEL */ /* * clear_blit: clear blit's screen. @@ -929,7 +929,7 @@ clear_blit(blt) (*kd_dclear)(0, kd_lines*kd_cols, KA_NORMAL); } -/* +/* * Put the board into DOS mode in preparation for rebooting. */ @@ -937,7 +937,7 @@ void blitreboot() { union blit_config_reg config; - + config.byte = inb(BLIT_CONFIG_ADDR); config.reg.mode = BLIT_DOS_MODE; config.reg.invisible = BLIT_VISIBLE; |