Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

prep_setup.c File Reference

#include <linux/config.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h>
#include <linux/malloc.h>
#include <linux/user.h>
#include <linux/a.out.h>
#include <linux/tty.h>
#include <linux/major.h>
#include <linux/interrupt.h>
#include <linux/reboot.h>
#include <linux/init.h>
#include <linux/blk.h>
#include <linux/ioport.h>
#include <linux/console.h>
#include <linux/timex.h>
#include <linux/pci.h>
#include <linux/openpic.h>
#include <linux/delay.h>
#include <asm/mmu.h>
#include <asm/processor.h>
#include <asm/residual.h>
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/ide.h>
#include <asm/cache.h>
#include <asm/dma.h>
#include <asm/machdep.h>
#include <asm/mk48t59.h>
#include <asm/prep_nvram.h>
#include <asm/raven.h>
#include <asm/keyboard.h>
#include <asm/time.h>
#include <asm/vga.h>
#include "local_irq.h"
#include "i8259.h"
#include "open_pic.h"

Include dependency graph for prep_setup.c:

Go to the source code of this file.

Defines

#define cached_21   (((char *)(ppc_cached_irq_mask))[3])
#define cached_A1   (((char *)(ppc_cached_irq_mask))[2])
#define CD(X)   (X)
#define TIMER0_COUNT   0x40
#define TIMER_CONTROL   0x43

Functions

unsigned long mc146818_get_rtc_time (void)
int mc146818_set_rtc_time (unsigned long nowtime)
unsigned long mk48t59_get_rtc_time (void)
int mk48t59_set_rtc_time (unsigned long nowtime)
unsigned char prep_nvram_read_val (int addr)
void prep_nvram_write_val (int addr, unsigned char val)
unsigned char rs_nvram_read_val (int addr)
void rs_nvram_write_val (int addr, unsigned char val)
int pckbd_setkeycode (unsigned int scancode, unsigned int keycode)
int pckbd_getkeycode (unsigned int scancode)
int pckbd_translate (unsigned char scancode, unsigned char *keycode, char raw_mode)
char pckbd_unexpected_up (unsigned char keycode)
void pckbd_leds (unsigned char leds)
void pckbd_init_hw (void)
void prep_setup_pci_ptrs (void)
__prep int prep_get_cpuinfo (char *buffer)
 __initfunc (void prep_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p))
 __initfunc (void prep_res_calibrate_decr(void))
 __initfunc (void prep_calibrate_decr_handler(intirq, void *dev, struct pt_regs *regs))
void prep_restart (char *cmd)
void prep_direct_restart (char *cmd)
void prep_halt (void)
void prep_power_off (void)
int prep_setup_residual (char *buffer)
u_int prep_irq_cannonicalize (u_int irq)
void prep_do_IRQ (struct pt_regs *regs, int cpu, int isfake)
 __initfunc (void prep_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7))

Variables

unsigned char ucSystemType
unsigned char ucBoardRev
unsigned char ucBoardRevMaj
unsigned char ucBoardRevMin
unsigned char pckbd_sysrq_xlate [128]
char saved_command_line [256]
int _prep_type
kdev_t boot_dev
long ppc_cs4232_dma
long ppc_cs4232_dma2
unsigned long empty_zero_page [1024]
PTEHash
PTEHash_end
unsigned long Hash_size
unsigned long Hash_mask
int probingmem
int calibrate_done = 0
volatile int * done_ptr = &calibrate_done
unsigned longMotSave_SmpIar
unsigned char * MotSave_CpusState [2]


Define Documentation

#define cached_21   (((char *)(ppc_cached_irq_mask))[3])
 

Definition at line 93 of file prep_setup.c.

#define cached_A1   (((char *)(ppc_cached_irq_mask))[2])
 

Definition at line 94 of file prep_setup.c.

#define CD  )     (X)
 

Referenced by __initfunc(), block_til_ready(), eata_abort(), eata_pio_abort(), get_cpuinfo(), and pcxe_ioctl().

#define TIMER0_COUNT   0x40
 

#define TIMER_CONTROL   0x43
 


Function Documentation

__initfunc void   prep_init(unsigned long r3, unsigned long r4, unsigned long r5,unsigned long r6, unsigned long r7)  ) 
 

Definition at line 726 of file prep_setup.c.

References _IO_BASE, _PREP_IBM, _PREP_Motorola, _PREP_Radstone, _prep_type, machdep_calls::calibrate_decr, cmd_line, _RESIDUAL::Cpus, _PPC_CPU::CpuState, DMA_MODE_READ, DMA_MODE_WRITE, machdep_calls::do_IRQ, machdep_calls::get_cpuinfo, machdep_calls::get_rtc_time, machdep_calls::halt, machdep_calls::init, machdep_calls::init_IRQ, initrd_end, initrd_start, machdep_calls::irq_cannonicalize, ISA_DMA_THRESHOLD, isa_io_base, isa_mem_base, machdep_calls::kbd_getkeycode, machdep_calls::kbd_init_hw, machdep_calls::kbd_leds, machdep_calls::kbd_setkeycode, machdep_calls::kbd_translate, machdep_calls::kbd_unexpected_up, KERNELBASE, mc146818_get_rtc_time(), mc146818_set_rtc_time(), memcpy, mk48t59_get_rtc_time(), mk48t59_set_rtc_time(), Motherboard_map_name, NULL, pci_dram_offset, pckbd_getkeycode(), pckbd_init_hw(), pckbd_leds(), pckbd_setkeycode(), pckbd_sysrq_xlate, pckbd_translate(), pckbd_unexpected_up(), machdep_calls::power_off, ppc_ide_md, ppc_md, prep_direct_restart(), prep_do_IRQ(), prep_get_cpuinfo(), prep_halt(), prep_irq_cannonicalize(), PREP_ISA_IO_BASE, PREP_ISA_MEM_BASE, PREP_PCI_DRAM_OFFSET, prep_power_off(), prep_restart(), prep_setup_pci_ptrs(), prep_setup_residual(), _VPD::PrintableModel, res, _RESIDUAL::ResidualLength, machdep_calls::restart, RS_SYS_TYPE_PPC1, RS_SYS_TYPE_PPC1a, machdep_calls::set_rtc_time, machdep_calls::setup_arch, machdep_calls::setup_residual, _VPD::SmpIar, strcpy, strncmp(), SYSRQ_KEY, machdep_calls::time_init, ucBoardRevMaj, ucSystemType, and _RESIDUAL::VitalProductData.

Here is the call graph for this function:

__initfunc void   prep_calibrate_decr_handler(intirq,void *dev,struct pt_regs *regs)  ) 
 

Definition at line 385 of file prep_setup.c.

References count_period_den, count_period_num, decrementer_count, divisor, freq, get_dec(), HZ, printk, t1, and t2.

Here is the call graph for this function:

__initfunc void   prep_res_calibrate_decr(void)  ) 
 

Definition at line 364 of file prep_setup.c.

References count_period_den, count_period_num, decrementer_count, divisor, freq, HZ, printk, _VPD::ProcessorBusHz, res, and _RESIDUAL::VitalProductData.

__initfunc void   prep_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p)  ) 
 

Definition at line 210 of file prep_setup.c.

References _PREP_IBM, _PREP_Motorola, _PREP_Radstone, _prep_type, card_info::card_type, cmd_line, card_info::config, conswitchp, address_info::dma, address_info::dma2, HZ, inb, init_prep_nvram(), address_info::io_base, address_info::irq, is_prep, loops_per_jiffy, NULL, num_sound_cards, machdep_calls::nvram_read_val, machdep_calls::nvram_write_val, outb, ppc_cs4232_dma, ppc_cs4232_dma2, ppc_md, prep_nvram_get_var(), prep_nvram_read_val(), prep_nvram_write_val(), printk, raven_init(), reg, request_region, ROOT_DEV, rs_nvram_read_val(), rs_nvram_write_val(), RS_SYS_TYPE_PPC1, saved_command_line, SIO_CONFIG_RA, SIO_CONFIG_RD, SNDCARD_CS4232, strcpy, ucBoardRev, ucBoardRevMaj, ucBoardRevMin, ucSystemType, vga_con, vgacon_remap_base, x00, x09, x10, x20, x40, x80, and xc0.

Here is the call graph for this function:

unsigned long mc146818_get_rtc_time void   ) 
 

Definition at line 98 of file prep_time.c.

References BCD_TO_BIN, CMOS_READ, rtc_time::hour, i, min, mktime(), RTC_ALWAYS_BCD, RTC_CONTROL, RTC_DAY_OF_MONTH, RTC_DM_BINARY, RTC_FREQ_SELECT, RTC_HOURS, RTC_MINUTES, RTC_MONTH, RTC_SECONDS, RTC_UIP, RTC_YEAR, rtc_time::sec, and rtc_time::year.

Referenced by __initfunc().

Here is the call graph for this function:

int mc146818_set_rtc_time unsigned long  nowtime  ) 
 

Definition at line 51 of file prep_time.c.

References BIN_TO_BCD, CMOS_READ, CMOS_WRITE, RTC_ALWAYS_BCD, RTC_CONTROL, RTC_DAY_OF_MONTH, RTC_DIV_RESET2, RTC_DM_BINARY, RTC_FREQ_SELECT, RTC_HOURS, RTC_MINUTES, RTC_MONTH, RTC_SECONDS, RTC_SET, RTC_YEAR, rtc_time::tm_hour, rtc_time::tm_mday, rtc_time::tm_min, rtc_time::tm_mon, rtc_time::tm_sec, rtc_time::tm_year, and to_tm().

Referenced by __initfunc().

Here is the call graph for this function:

unsigned long mk48t59_get_rtc_time void   ) 
 

Definition at line 175 of file prep_time.c.

References BCD_TO_BIN, rtc_time::hour, i, min, MK48T59_RTC_CA_READ, MK48T59_RTC_CB_STOP, MK48T59_RTC_CONTROLA, MK48T59_RTC_CONTROLB, MK48T59_RTC_DAY_OF_MONTH, MK48T59_RTC_HOURS, MK48T59_RTC_MINUTES, MK48T59_RTC_MONTH, MK48T59_RTC_SECONDS, MK48T59_RTC_YEAR, mktime(), machdep_calls::nvram_read_val, machdep_calls::nvram_write_val, ppc_md, rtc_time::sec, and rtc_time::year.

Referenced by __initfunc().

Here is the call graph for this function:

int mk48t59_set_rtc_time unsigned long  nowtime  ) 
 

Definition at line 139 of file prep_time.c.

References BIN_TO_BCD, MK48T59_RTC_CA_WRITE, MK48T59_RTC_CONTROLA, MK48T59_RTC_DAY_OF_MONTH, MK48T59_RTC_HOURS, MK48T59_RTC_MINUTES, MK48T59_RTC_MONTH, MK48T59_RTC_SECONDS, MK48T59_RTC_YEAR, machdep_calls::nvram_read_val, machdep_calls::nvram_write_val, ppc_md, rtc_time::tm_hour, rtc_time::tm_mday, rtc_time::tm_min, rtc_time::tm_mon, rtc_time::tm_sec, rtc_time::tm_year, and to_tm().

Referenced by __initfunc().

Here is the call graph for this function:

int pckbd_getkeycode unsigned int  scancode  ) 
 

Definition at line 254 of file pc_keyb.c.

void pckbd_init_hw void   ) 
 

Definition at line 736 of file pc_keyb.c.

void pckbd_leds unsigned char  leds  ) 
 

Definition at line 531 of file pc_keyb.c.

int pckbd_setkeycode unsigned int  scancode,
unsigned int  keycode
 

Definition at line 243 of file pc_keyb.c.

int pckbd_translate unsigned char  scancode,
unsigned char *  keycode,
char  raw_mode
 

Definition at line 288 of file pc_keyb.c.

char pckbd_unexpected_up unsigned char  keycode  ) 
 

Definition at line 383 of file pc_keyb.c.

void prep_direct_restart char *  cmd  ) 
 

Definition at line 508 of file prep_setup.c.

References __asm__(), _disable_interrupts(), MSR_IP, and u32.

Referenced by __initfunc().

Here is the call graph for this function:

void prep_do_IRQ struct pt_regs regs,
int  cpu,
int  isfake
 

Definition at line 588 of file prep_setup.c.

References i8259_irq(), irq, KERN_DEBUG, pt_regs::nip, ppc_irq_dispatch_handler(), ppc_spurious_interrupts, and printk.

Referenced by __initfunc().

Here is the call graph for this function:

__prep int prep_get_cpuinfo char *  buffer  ) 
 

Definition at line 114 of file prep_setup.c.

References _PREP_IBM, _PREP_Motorola, _prep_type, _RESIDUAL::ActualNumMemories, CACHECRBA, i, L2CACHE_1MB, L2CACHE_256KB, L2CACHE_512KB, L2CACHE_MASK, L2CACHE_NONE, L2CACHE_PARITY, len, MAX_MEMS, _RESIDUAL::Memories, Motherboard_map_name, res, _RESIDUAL::ResidualLength, _PPC_MEM::SIMMSize, sprintf(), x3, and xf0.

Referenced by __initfunc().

Here is the call graph for this function:

void prep_halt void   ) 
 

Definition at line 531 of file prep_setup.c.

References _disable_interrupts(), inb, L, MSR_IP, outb, restore_flags, and save_flags.

Referenced by __initfunc(), and prep_power_off().

Here is the call graph for this function:

u_int prep_irq_cannonicalize u_int  irq  ) 
 

Definition at line 575 of file prep_setup.c.

Referenced by __initfunc().

unsigned char prep_nvram_read_val int  addr  ) 
 

Definition at line 31 of file prep_nvram.c.

void prep_nvram_write_val int  addr,
unsigned char  val
 

Definition at line 38 of file prep_nvram.c.

void prep_power_off void   ) 
 

Definition at line 551 of file prep_setup.c.

References prep_halt().

Referenced by __initfunc().

Here is the call graph for this function:

void prep_restart char *  cmd  ) 
 

Definition at line 485 of file prep_setup.c.

References _disable_interrupts(), inb, L, MSR_IP, outb, and panic().

Referenced by __initfunc().

Here is the call graph for this function:

void prep_setup_pci_ptrs void   ) 
 

Referenced by __initfunc().

int prep_setup_residual char *  buffer  ) 
 

Definition at line 556 of file prep_setup.c.

References len, _VPD::ProcessorHz, res, _RESIDUAL::ResidualLength, sprintf(), and _RESIDUAL::VitalProductData.

Referenced by __initfunc().

Here is the call graph for this function:

unsigned char rs_nvram_read_val int  addr  ) 
 

Definition at line 49 of file prep_nvram.c.

References rs_pcNvRAM.

Referenced by __initfunc().

void rs_nvram_write_val int  addr,
unsigned char  val
 

Definition at line 54 of file prep_nvram.c.

References rs_pcNvRAM.

Referenced by __initfunc().


Variable Documentation

int _prep_type
 

Definition at line 91 of file prep_setup.c.

Referenced by __initfunc(), enable_dma(), prep_get_cpuinfo(), and prep_pib_init().

kdev_t boot_dev
 

Definition at line 97 of file prep_setup.c.

int calibrate_done = 0
 

Definition at line 382 of file prep_setup.c.

volatile int* done_ptr = &calibrate_done
 

Definition at line 383 of file prep_setup.c.

unsigned long empty_zero_page[1024]
 

Definition at line 100 of file prep_setup.c.

PTE* Hash
 

Definition at line 121 of file arch/ppc/mm/init.c.

PTE * Hash_end
 

Definition at line 121 of file arch/ppc/mm/init.c.

unsigned long Hash_mask
 

Definition at line 122 of file arch/ppc/mm/init.c.

unsigned long Hash_size
 

Definition at line 122 of file arch/ppc/mm/init.c.

unsigned char* MotSave_CpusState[2]
 

Definition at line 724 of file prep_setup.c.

Referenced by smp_boot_cpus().

unsigned long* MotSave_SmpIar
 

Definition at line 723 of file prep_setup.c.

Referenced by smp_boot_cpus().

unsigned char pckbd_sysrq_xlate[128]
 

long ppc_cs4232_dma
 

Definition at line 99 of file prep_setup.c.

Referenced by __initfunc().

long ppc_cs4232_dma2
 

Definition at line 99 of file prep_setup.c.

Referenced by __initfunc().

int probingmem
 

Definition at line 48 of file ppc/mm/fault.c.

char saved_command_line[256]
 

Definition at line 87 of file alpha/kernel/setup.c.

unsigned char ucBoardRev
 

Definition at line 64 of file prep_setup.c.

Referenced by __initfunc().

unsigned char ucBoardRevMaj
 

Definition at line 65 of file prep_setup.c.

Referenced by __initfunc().

unsigned char ucBoardRevMin
 

Definition at line 65 of file prep_setup.c.

Referenced by __initfunc().

unsigned char ucSystemType
 

Definition at line 63 of file prep_setup.c.

Referenced by __initfunc(), and enable_dma().