|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1995-1994 The University of Utah and ! 3: * the Computer Systems Laboratory at the University of Utah (CSL). ! 4: * All rights reserved. ! 5: * ! 6: * Permission to use, copy, modify and distribute this software is hereby ! 7: * granted provided that (1) source code retains these copyright, permission, ! 8: * and disclaimer notices, and (2) redistributions including binaries ! 9: * reproduce the notices in supporting documentation, and (3) all advertising ! 10: * materials mentioning features or use of this software display the following ! 11: * acknowledgement: ``This product includes software developed by the ! 12: * Computer Systems Laboratory at the University of Utah.'' ! 13: * ! 14: * THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF THIS SOFTWARE IN ITS "AS ! 15: * IS" CONDITION. THE UNIVERSITY OF UTAH AND CSL DISCLAIM ANY LIABILITY OF ! 16: * ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. ! 17: * ! 18: * CSL requests users of this software to return to [email protected] any ! 19: * improvements that they make and grant CSL redistribution rights. ! 20: * ! 21: * Author: Bryan Ford, University of Utah CSL ! 22: */ ! 23: #ifndef _KUKM_I386_PC_DEBUG_H_ ! 24: #define _KUKM_I386_PC_DEBUG_H_ ! 25: ! 26: #ifdef ASSEMBLER ! 27: #ifdef DEBUG ! 28: ! 29: ! 30: /* Poke a character directly onto the VGA text display, ! 31: as a very quick, mostly-reliable status indicator. ! 32: Assumes ss is a kernel data segment register. */ ! 33: #define POKE_STATUS(char,scratch) \ ! 34: ss/*XXX gas bug */ ;\ ! 35: movl %ss:_phys_mem_va,scratch ;\ ! 36: addl $0xb8000+80*2*13+40*2,scratch ;\ ! 37: movb char,%ss:(scratch) ;\ ! 38: movb $0xf0,%ss:1(scratch) ! 39: ! 40: ! 41: #else !DEBUG ! 42: ! 43: #define POKE_STATUS(char,scratch) ! 44: ! 45: #endif !DEBUG ! 46: #else !ASSEMBLER ! 47: #ifdef DEBUG ! 48: ! 49: #include <mach/machine/vm_types.h> ! 50: ! 51: ! 52: #define POKE_STATUS(string) \ ! 53: ({ unsigned char *s = (string); \ ! 54: extern vm_offset_t phys_mem_va; \ ! 55: short *d = (short*)(phys_mem_va+0xb8000+80*2*13+40*2); \ ! 56: while (*s) { (*d++) = 0x3000 | (*s++); } \ ! 57: *d = ' '; \ ! 58: }) ! 59: ! 60: ! 61: #else !DEBUG ! 62: ! 63: #define POKE_STATUS(char) ! 64: ! 65: #endif !DEBUG ! 66: #endif !ASSEMBLER ! 67: ! 68: ! 69: #include_next "debug.h" ! 70: ! 71: #endif _KUKM_I386_PC_DEBUG_H_
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.