|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * The contents of this file constitute Original Code as defined in and ! 7: * are subject to the Apple Public Source License Version 1.1 (the ! 8: * "License"). You may not use this file except in compliance with the ! 9: * License. Please obtain a copy of the License at ! 10: * http://www.apple.com/publicsource and read it before using this file. ! 11: * ! 12: * This Original Code and all software distributed under the License are ! 13: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 14: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 15: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 16: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 17: * License for the specific language governing rights and limitations ! 18: * under the License. ! 19: * ! 20: * @APPLE_LICENSE_HEADER_END@ ! 21: */ ! 22: #include <pexpert/pexpert.h> ! 23: #include <pexpert/ppc/powermac.h> ! 24: #include <kern/debug.h> ! 25: ! 26: static int DEBUGFlag; ! 27: ! 28: pe_init_debug(void) ! 29: { ! 30: if( !PE_parse_boot_arg( "debug", &DEBUGFlag )) ! 31: DEBUGFlag = 0; ! 32: #ifdef DEBUG ! 33: dump_machine_info(); ! 34: #endif ! 35: } ! 36: ! 37: void PE_enter_debugger( char * cause ) ! 38: { ! 39: if( DEBUGFlag & DB_NMI) ! 40: Debugger(cause); ! 41: } ! 42: ! 43: ! 44: void dump_machine_info(void) ! 45: { ! 46: kprintf("--- machine info ---\n"); ! 47: kprintf(" processor version: 0x%x\n", powermac_info.processor_version); ! 48: kprintf(" cpu clock rate: %d hz\n", powermac_info.cpu_clock_rate_hz); ! 49: kprintf(" bus clock rate: %d hz\n", powermac_info.bus_clock_rate_hz); ! 50: kprintf(" dec clock rate: %d hz\n", powermac_info.dec_clock_rate_hz); ! 51: kprintf(" caches:\n dcache size:%dk; block size: %db\n", ! 52: powermac_info.dcache_size / 1024, ! 53: powermac_info.dcache_block_size); ! 54: kprintf(" icache size: %dk %s\n", ! 55: powermac_info.icache_size / 1024, ! 56: powermac_info.caches_unified ? "(unified)" : ""); ! 57: kprintf("--------------------\n"); ! 58: } ! 59:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.