You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(165) |
Sep
(240) |
Oct
(424) |
Nov
(526) |
Dec
(293) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(242) |
Feb
(149) |
Mar
(143) |
Apr
(143) |
May
(76) |
Jun
(59) |
Jul
(20) |
Aug
(2) |
Sep
(49) |
Oct
(1) |
Nov
(4) |
Dec
|
2003 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(72) |
Jul
(36) |
Aug
(9) |
Sep
(16) |
Oct
(23) |
Nov
(9) |
Dec
(3) |
2010 |
Jan
|
Feb
(1) |
Mar
(35) |
Apr
(44) |
May
(56) |
Jun
(71) |
Jul
(41) |
Aug
(41) |
Sep
(22) |
Oct
(3) |
Nov
(1) |
Dec
(1) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(25) |
Oct
(105) |
Nov
(15) |
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Pete P. <pp...@us...> - 2001-10-10 17:46:59
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/include In directory usw-pr-cvs1:/tmp/cvs-serv26774/arch/mips/zboot/include Added Files: nonstdio.h ns16550.h pb1000_serial.h zlib.h Log Message: Alchemy PB1000 zImage support. Most of this work is portable to other embedded mips boards. The board specific code is in the pb1000 directory and it's just head.S and the Makefile and linker script. The common code was ported with very few modifications from the PPC boot code. --- NEW FILE: nonstdio.h --- /* * Copyright (C) Paul Mackerras 1997. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ typedef int FILE; extern FILE *stdin, *stdout; #define NULL ((void *)0) #define EOF (-1) #define fopen(n, m) NULL #define fflush(f) 0 #define fclose(f) 0 extern char *fgets(); #define perror(s) printf("%s: no files!\n", (s)) --- NEW FILE: ns16550.h --- /* * NS16550 Serial Port */ /* * Figure out which file will have the definitons of COMx */ #if defined(CONFIG_MIPS_PB1000) #else #error no serial.h #endif /* Some machines have their uart registers 16 bytes apart. Most don't. * TODO: Make this work like drivers/char/serial does - Tom */ #if !defined(UART_REG_PAD) #define UART_REG_PAD(x) #endif struct NS16550 { unsigned char rbr; /* 0 */ UART_REG_PAD(rbr) unsigned char ier; /* 1 */ UART_REG_PAD(ier) unsigned char fcr; /* 2 */ UART_REG_PAD(fcr) unsigned char lcr; /* 3 */ UART_REG_PAD(lcr) unsigned char mcr; /* 4 */ UART_REG_PAD(mcr) unsigned char lsr; /* 5 */ UART_REG_PAD(lsr) unsigned char msr; /* 6 */ UART_REG_PAD(msr) unsigned char scr; /* 7 */ }; #define thr rbr #define iir fcr #define dll rbr #define dlm ier #define LSR_DR 0x01 /* Data ready */ #define LSR_OE 0x02 /* Overrun */ #define LSR_PE 0x04 /* Parity error */ #define LSR_FE 0x08 /* Framing error */ #define LSR_BI 0x10 /* Break */ #define LSR_THRE 0x20 /* Xmit holding register empty */ #define LSR_TEMT 0x40 /* Xmitter empty */ #define LSR_ERR 0x80 /* Error */ --- NEW FILE: pb1000_serial.h --- /* * arch/ppc/boot/include/sandpoint_serial.h * * Location of the COM ports on Motorola SPS Sandpoint machines * * Author: Mark A. Greer * mg...@mv... * * Copyright 2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #define COM1 0xfe0003f8 #define COM2 0xfe0002f8 #define COM3 0x00000000 /* No COM3 */ #define COM4 0x00000000 /* No COM4 */ --- NEW FILE: zlib.h --- /* $Id: zlib.h,v 1.1 2001/10/10 17:46:56 ppopov Exp $ */ /* * This file is derived from zlib.h and zconf.h from the zlib-0.95 * distribution by Jean-loup Gailly and Mark Adler, with some additions * by Paul Mackerras to aid in implementing Deflate compression and * decompression for PPP packets. */ /* * ==FILEVERSION 960122== * * This marker is used by the Linux installation script to determine * whether an up-to-date version of this file is already installed. */ /* zlib.h -- interface of the 'zlib' general purpose compression library version 0.95, Aug 16th, 1995. Copyright (C) 1995 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler gz...@pr... ma...@al... */ #ifndef _ZLIB_H #define _ZLIB_H /* #include "zconf.h" */ /* included directly here */ /* zconf.h -- configuration of the zlib compression library * Copyright (C) 1995 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ /* From: zconf.h,v 1.12 1995/05/03 17:27:12 jloup Exp */ /* The library does not install any signal handler. It is recommended to add at least a handler for SIGSEGV when decompressing; the library checks the consistency of the input data whenever possible but may go nuts for some forms of corrupted input. */ /* * Compile with -DMAXSEG_64K if the alloc function cannot allocate more * than 64k bytes at a time (needed on systems with 16-bit int). * Compile with -DUNALIGNED_OK if it is OK to access shorts or ints * at addresses which are not a multiple of their size. * Under DOS, -DFAR=far or -DFAR=__far may be needed. */ #ifndef STDC # if defined(MSDOS) || defined(__STDC__) || defined(__cplusplus) # define STDC # endif #endif #ifdef __MWERKS__ /* Metrowerks CodeWarrior declares fileno() in unix.h */ # include <unix.h> #endif /* Maximum value for memLevel in deflateInit2 */ #ifndef MAX_MEM_LEVEL # ifdef MAXSEG_64K # define MAX_MEM_LEVEL 8 # else # define MAX_MEM_LEVEL 9 # endif #endif #ifndef FAR # define FAR #endif /* Maximum value for windowBits in deflateInit2 and inflateInit2 */ #ifndef MAX_WBITS # define MAX_WBITS 15 /* 32K LZ77 window */ #endif /* The memory requirements for deflate are (in bytes): 1 << (windowBits+2) + 1 << (memLevel+9) that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) plus a few kilobytes for small objects. For example, if you want to reduce the default memory requirements from 256K to 128K, compile with make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" Of course this will generally degrade compression (there's no free lunch). The memory requirements for inflate are (in bytes) 1 << windowBits that is, 32K for windowBits=15 (default value) plus a few kilobytes for small objects. */ /* Type declarations */ #ifndef OF /* function prototypes */ # ifdef STDC # define OF(args) args # else # define OF(args) () # endif #endif typedef unsigned char Byte; /* 8 bits */ typedef unsigned int uInt; /* 16 bits or more */ typedef unsigned long uLong; /* 32 bits or more */ typedef Byte FAR Bytef; typedef char FAR charf; typedef int FAR intf; typedef uInt FAR uIntf; typedef uLong FAR uLongf; #ifdef STDC typedef void FAR *voidpf; typedef void *voidp; #else typedef Byte FAR *voidpf; typedef Byte *voidp; #endif /* end of original zconf.h */ #define ZLIB_VERSION "0.95P" /* The 'zlib' compression library provides in-memory compression and decompression functions, including integrity checks of the uncompressed data. This version of the library supports only one compression method (deflation) but other algorithms may be added later and will have the same stream interface. For compression the application must provide the output buffer and may optionally provide the input buffer for optimization. For decompression, the application must provide the input buffer and may optionally provide the output buffer for optimization. Compression can be done in a single step if the buffers are large enough (for example if an input file is mmap'ed), or can be done by repeated calls of the compression function. In the latter case, the application must provide more input and/or consume the output (providing more output space) before each call. */ typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); typedef void (*free_func) OF((voidpf opaque, voidpf address, uInt nbytes)); struct internal_state; typedef struct z_stream_s { Bytef *next_in; /* next input byte */ uInt avail_in; /* number of bytes available at next_in */ uLong total_in; /* total nb of input bytes read so far */ Bytef *next_out; /* next output byte should be put there */ uInt avail_out; /* remaining free space at next_out */ uLong total_out; /* total nb of bytes output so far */ char *msg; /* last error message, NULL if no error */ struct internal_state FAR *state; /* not visible by applications */ alloc_func zalloc; /* used to allocate the internal state */ free_func zfree; /* used to free the internal state */ voidp opaque; /* private data object passed to zalloc and zfree */ Byte data_type; /* best guess about the data type: ascii or binary */ } z_stream; /* The application must update next_in and avail_in when avail_in has dropped to zero. It must update next_out and avail_out when avail_out has dropped to zero. The application must initialize zalloc, zfree and opaque before calling the init function. All other fields are set by the compression library and must not be updated by the application. The opaque value provided by the application will be passed as the first parameter for calls of zalloc and zfree. This can be useful for custom memory management. The compression library attaches no meaning to the opaque value. zalloc must return Z_NULL if there is not enough memory for the object. On 16-bit systems, the functions zalloc and zfree must be able to allocate exactly 65536 bytes, but will not be required to allocate more than this if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers returned by zalloc for objects of exactly 65536 bytes *must* have their offset normalized to zero. The default allocation function provided by this library ensures this (see zutil.c). To reduce memory requirements and avoid any allocation of 64K objects, at the expense of compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). The fields total_in and total_out can be used for statistics or progress reports. After compression, total_in holds the total size of the uncompressed data and may be saved for use in the decompressor (particularly if the decompressor wants to decompress everything in a single step). */ /* constants */ #define Z_NO_FLUSH 0 #define Z_PARTIAL_FLUSH 1 #define Z_FULL_FLUSH 2 #define Z_SYNC_FLUSH 3 /* experimental: partial_flush + byte align */ #define Z_FINISH 4 #define Z_PACKET_FLUSH 5 /* See deflate() below for the usage of these constants */ #define Z_OK 0 #define Z_STREAM_END 1 #define Z_ERRNO (-1) #define Z_STREAM_ERROR (-2) #define Z_DATA_ERROR (-3) #define Z_MEM_ERROR (-4) #define Z_BUF_ERROR (-5) /* error codes for the compression/decompression functions */ #define Z_BEST_SPEED 1 #define Z_BEST_COMPRESSION 9 #define Z_DEFAULT_COMPRESSION (-1) /* compression levels */ #define Z_FILTERED 1 #define Z_HUFFMAN_ONLY 2 #define Z_DEFAULT_STRATEGY 0 #define Z_BINARY 0 #define Z_ASCII 1 #define Z_UNKNOWN 2 /* Used to set the data_type field */ #define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ extern char *zlib_version; /* The application can compare zlib_version and ZLIB_VERSION for consistency. If the first character differs, the library code actually used is not compatible with the zlib.h header file used by the application. */ /* basic functions */ extern int inflateInit OF((z_stream *strm)); /* Initializes the internal stream state for decompression. The fields zalloc and zfree must be initialized before by the caller. If zalloc and zfree are set to Z_NULL, inflateInit updates them to use default allocation functions. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory. msg is set to null if there is no error message. inflateInit does not perform any decompression: this will be done by inflate(). */ extern int inflate OF((z_stream *strm, int flush)); /* Performs one or both of the following actions: - Decompress more input starting at next_in and update next_in and avail_in accordingly. If not all input can be processed (because there is not enough room in the output buffer), next_in is updated and processing will resume at this point for the next call of inflate(). - Provide more output starting at next_out and update next_out and avail_out accordingly. inflate() always provides as much output as possible (until there is no more input data or no more space in the output buffer). Before the call of inflate(), the application should ensure that at least one of the actions is possible, by providing more input and/or consuming more output, and updating the next_* and avail_* values accordingly. The application can consume the uncompressed output when it wants, for example when the output buffer is full (avail_out == 0), or after each call of inflate(). If the parameter flush is set to Z_PARTIAL_FLUSH or Z_PACKET_FLUSH, inflate flushes as much output as possible to the output buffer. The flushing behavior of inflate is not specified for values of the flush parameter other than Z_PARTIAL_FLUSH, Z_PACKET_FLUSH or Z_FINISH, but the current implementation actually flushes as much output as possible anyway. For Z_PACKET_FLUSH, inflate checks that once all the input data has been consumed, it is expecting to see the length field of a stored block; if not, it returns Z_DATA_ERROR. inflate() should normally be called until it returns Z_STREAM_END or an error. However if all decompression is to be performed in a single step (a single call of inflate), the parameter flush should be set to Z_FINISH. In this case all pending input is processed and all pending output is flushed; avail_out must be large enough to hold all the uncompressed data. (The size of the uncompressed data may have been saved by the compressor for this purpose.) The next operation on this stream must be inflateEnd to deallocate the decompression state. The use of Z_FINISH is never required, but can be used to inform inflate that a faster routine may be used for the single inflate() call. inflate() returns Z_OK if some progress has been made (more input processed or more output produced), Z_STREAM_END if the end of the compressed data has been reached and all uncompressed output has been produced, Z_DATA_ERROR if the input data was corrupted, Z_STREAM_ERROR if the stream structure was inconsistent (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if no progress is possible or if there was not enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR case, the application may then call inflateSync to look for a good compression block. */ extern int inflateEnd OF((z_stream *strm)); /* All dynamically allocated data structures for this stream are freed. This function discards any unprocessed input and does not flush any pending output. inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state was inconsistent. In the error case, msg may be set but then points to a static string (which must not be deallocated). */ /* advanced functions */ extern int inflateInit2 OF((z_stream *strm, int windowBits)); /* This is another version of inflateInit with more compression options. The fields next_out, zalloc and zfree must be initialized before by the caller. The windowBits parameter is the base two logarithm of the maximum window size (the size of the history buffer). It should be in the range 8..15 for this version of the library (the value 16 will be allowed soon). The default value is 15 if inflateInit is used instead. If a compressed stream with a larger window size is given as input, inflate() will return with the error code Z_DATA_ERROR instead of trying to allocate a larger window. If next_out is not null, the library will use this buffer for the history buffer; the buffer must either be large enough to hold the entire output data, or have at least 1<<windowBits bytes. If next_out is null, the library will allocate its own buffer (and leave next_out null). next_in need not be provided here but must be provided by the application for the next call of inflate(). If the history buffer is provided by the application, next_out must never be changed by the application since the decompressor maintains history information inside this buffer from call to call; the application can only reset next_out to the beginning of the history buffer when avail_out is zero and all output has been consumed. inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_STREAM_ERROR if a parameter is invalid (such as windowBits < 8). msg is set to null if there is no error message. inflateInit2 does not perform any decompression: this will be done by inflate(). */ extern int inflateSync OF((z_stream *strm)); /* Skips invalid compressed data until the special marker (see deflate() above) can be found, or until all available input is skipped. No output is provided. inflateSync returns Z_OK if the special marker has been found, Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no marker has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the success case, the application may save the current current value of total_in which indicates where valid compressed data was found. In the error case, the application may repeatedly call inflateSync, providing more input each time, until success or end of the input data. */ extern int inflateReset OF((z_stream *strm)); /* This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate all the internal decompression state. The stream will keep attributes that may have been set by inflateInit2. inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being NULL). */ extern int inflateIncomp OF((z_stream *strm)); /* This function adds the data at next_in (avail_in bytes) to the output history without performing any output. There must be no pending output, and the decompressor must be expecting to see the start of a block. Calling this function is equivalent to decompressing a stored block containing the data at next_in (except that the data is not output). */ /* checksum functions */ /* This function is not related to compression but is exported anyway because it might be useful in applications using the compression library. */ extern uLong adler32 OF((uLong adler, Bytef *buf, uInt len)); /* Update a running Adler-32 checksum with the bytes buf[0..len-1] and return the updated checksum. If buf is NULL, this function returns the required initial value for the checksum. An Adler-32 checksum is almost as reliable as a CRC32 but can be computed much faster. Usage example: uLong adler = adler32(0L, Z_NULL, 0); while (read_buffer(buffer, length) != EOF) { adler = adler32(adler, buffer, length); } if (adler != original_adler) error(); */ #ifndef _Z_UTIL_H struct internal_state {int dummy;}; /* hack for buggy compilers */ #endif #endif /* _ZLIB_H */ |
From: Pete P. <pp...@us...> - 2001-10-10 17:46:59
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/pb1000 In directory usw-pr-cvs1:/tmp/cvs-serv26774/arch/mips/zboot/pb1000 Added Files: Makefile head.S ld.script Log Message: Alchemy PB1000 zImage support. Most of this work is portable to other embedded mips boards. The board specific code is in the pb1000 directory and it's just head.S and the Makefile and linker script. The common code was ported with very few modifications from the PPC boot code. --- NEW FILE: Makefile --- # arch/mips/compressed/alchemy/Makefile # # Makefile for Alchemy Semiconductor PB1000 board. # All of the boot loader code was derived from the ppc # boot code. # # Copyright 2001 MontaVista Software Inc. # # Author: Mark A. Greer # mg...@mv... # Ported and modified for mips support by # Pete Popov <pp...@mv...> # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. .c.s: $(CC) $(CFLAGS) -S -o $*.s $< .s.o: $(AS) -o $*.o $< .c.o: $(CC) $(CFLAGS) -D__BOOTER__ -c -o $*.o $< .S.s: $(CPP) $(AFLAGS) -o $*.o $< .S.o: $(CC) $(AFLAGS) -c -o $*.o $< ######################################################################### # START BOARD SPECIFIC VARIABLES BNAME=pb1000 # These two variables control where the zImage is stored # in flash and loaded in memory. If you change either one, # be sure to make the appropriate change to the zImage # rule. RAM_LOAD_ADDR = 0x81000000 FLASH_LOAD_ADDR = 0xBFD00000 # These two variables specify the free ram region # that can be used for temporary malloc area AVAIL_RAM_START=0x80400000 AVAIL_RAM_END=0x80800000 # This one must match the LOADADDR in arch/mips/Makefile! LOADADDR=0x80100000 # END BOARD SPECIFIC VARIABLES ######################################################################### ZLINKFLAGS = -T ld.script -Ttext $(RAM_LOAD_ADDR) OBJECTS := head.o ../common/misc-common.o ../common/misc-simple.o \ ../common/au1k_uart.o ../common/string.o ../common/ctype.o LIBS := ../lib/zlib.a ENTRY := ../utils/entry OFFSET := ../utils/offset SIZE := ../utils/size all: zImage clean: rm -rf *.o vmlinux* head.o: head.S $(TOPDIR)/vmlinux $(CC) -DFLASH_LOAD_ADDR=$(FLASH_LOAD_ADDR) $(AFLAGS) \ -DKERNEL_ENTRY=$(shell sh $(ENTRY) $(NM) $(TOPDIR)/vmlinux ) \ -c -o $*.o $< ../common/misc-simple.o: $(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 -DZIMAGE_OFFSET=0 \ -DAVAIL_RAM_START=$(AVAIL_RAM_START) \ -DAVAIL_RAM_END=$(AVAIL_RAM_END) \ -DLOADADDR=$(LOADADDR) \ -DZIMAGE_SIZE=0 -c -o $@ $*.c # This is the first pass at building the boot loader image, # without knowing the file offset where the vmlinuz.gz # kernel will end up. We build this image, check the offset, # and then rebuild it with the correct offset and size # passed to mips-simple.c zvmlinux.no: $(OBJECTS) $(LIBS) ../images/vmlinux.gz $(LD) $(ZLINKFLAGS) -o $@.tmp $(OBJECTS) $(LIBS) $(OBJCOPY) -R .comment \ --add-section=image=../images/vmlinux.gz \ $@.tmp $@ # rm -f $@.tmp # This is the final image we build, now that we know what # the vmlinuz.gz offset is. zvmlinux: $(OBJECTS) $(LIBS) ../images/vmlinux.gz zvmlinux.no $(CC) $(CFLAGS) -DINITRD_OFFSET=0 -DINITRD_SIZE=0 \ -DZIMAGE_OFFSET=$(shell sh $(OFFSET) $(OBJDUMP) $@.no image) \ -DZIMAGE_SIZE=$(shell sh $(SIZE) $(OBJDUMP) $@.no image) \ -D__BOOTER__ \ -DAVAIL_RAM_START=$(AVAIL_RAM_START) \ -DAVAIL_RAM_END=$(AVAIL_RAM_END) \ -DLOADADDR=$(LOADADDR) \ -c -o ../common/misc-simple.o ../common/misc-simple.c $(LD) $(ZLINKFLAGS) -o $@.tmp $(OBJECTS) $(LIBS) $(OBJCOPY) -R .comment \ --add-section=image=../images/vmlinux.gz \ $@.tmp $@ $(OBJCOPY) --adjust-section-vma=image+$(RAM_LOAD_ADDR) $@ $(OBJCOPY) --adjust-section-vma=image+$(shell sh $(OFFSET) \ $(OBJDUMP) $@.no image ) $@ # rm -f $@.tmp # rm -f $@.no # Here we manipulate the image in order to get it the necessary # srecord file we need. zImage: zvmlinux mv zvmlinux ../images/$@.$(BNAME) $(OBJCOPY) --set-section-flags=image=alloc,load,code ../images/$@.$(BNAME) $(OBJCOPY) -O srec --adjust-vma 0x3ed00000 \ ../images/$@.$(BNAME) ../images/$@.$(BNAME).srec # rm ../images/vmlinux.gz include $(TOPDIR)/Rules.make --- NEW FILE: head.S --- /* * arch/mips/kernel/head.S * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1994, 1995 Waldorf Electronics * Written by Ralf Baechle and Andreas Busse * Copyright (C) 1995 - 1999 Ralf Baechle * Copyright (C) 1996 Paul M. Antoine * Modified for DECStation and hence R3000 support by Paul M. Antoine * Further modifications by David S. Miller and Harald Koerfgen * Copyright (C) 1999 Silicon Graphics, Inc. * * Head.S contains the MIPS exception handler and startup code. * ************************************************************************** * 9 Nov, 2000. * Added Cache Error exception handler and SBDDP EJTAG debug exception. * * Kevin Kissell, ke...@mi... and Carsten Langgaard, car...@mi... * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. ************************************************************************** */ #include <linux/config.h> #include <linux/threads.h> #include <asm/asm.h> #include <asm/cacheops.h> #include <asm/current.h> #include <asm/offset.h> #include <asm/processor.h> #include <asm/regdef.h> #include <asm/cachectl.h> #include <asm/mipsregs.h> #include <asm/stackframe.h> #include <asm/bootinfo.h> #define IndexInvalidate_I 0x00 .set noreorder .cprestore LEAF(start) start: /* turn on led 0 */ li k0, 1 li k1, 0xBE00000C sw k0, 0(k1) locate: la sp, .stack move s0, a0 move s1, a1 move s2, a2 move s3, a3 la a0, start /* li a1, 0xbfd00000 */ li a1, FLASH_LOAD_ADDR la a2, _edata subu t1, a2, a0 srl t1, t1, 2 /* copy text section */ li t0, 0 1: lw v0, 0(a1) nop sw v0, 0(a0) xor t0, t0, v0 addu a0, 4 bne a2, a0, 1b addu a1, 4 /* turn on led 1 */ li k0, 2 li k1, 0xBE00000C sw k0, 0(k1) /* Clear BSS */ la a0, _edata la a2, _end 2: sw zero, 0(a0) bne a2, a0, 2b addu a0, 4 /* turn on led 2 */ li k0, 4 li k1, 0xBE00000C sw k0, 0(k1) /* flush the I-Cache */ li k0, 0x80000000 # start address li k1, 0x80004000 # end address (16KB I-Cache) subu k1, 128 1: .set mips3 cache IndexInvalidate_I, 0(k0) cache IndexInvalidate_I, 32(k0) cache IndexInvalidate_I, 64(k0) cache IndexInvalidate_I, 96(k0) .set mips0 bne k0, k1, 1b addu k0, k0, 128 /* done */ /* turn on led 3 */ li k0, 8 li k1, 0xBE00000C sw k0, 0(k1) li a0, FLASH_LOAD_ADDR /* load address */ move a1, t1 /* length in words */ move a2, t0 /* checksum */ move a3, sp la ra, 1f la k0, decompress_kernel jr k0 nop 1: /* turn on led 4 */ li k0, 0x10 li k1, 0xBE00000C sw k0, 0(k1) move a0, s0 move a1, s1 move a2, s2 move a3, s3 li k0, KERNEL_ENTRY jr k0 nop 3: b 3b END(start) LEAF(udelay) udelay: END(udelay) LEAF(FlushCache) li k0, 0x80000000 # start address li k1, 0x80004000 # end address (16KB I-Cache) subu k1, 128 1: .set mips3 cache IndexInvalidate_I, 0(k0) cache IndexInvalidate_I, 32(k0) cache IndexInvalidate_I, 64(k0) cache IndexInvalidate_I, 96(k0) .set mips0 bne k0, k1, 1b addu k0, k0, 128 jr ra nop END(FlushCache) .comm .stack,4096*2,4 --- NEW FILE: ld.script --- OUTPUT_ARCH(mips) ENTRY(start) SECTIONS { /* Read-only sections, merged into text segment: */ /* . = 0x81000000; */ .init : { *(.init) } =0 .text : { _ftext = . ; *(.text) *(.rodata) *(.rodata1) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) } =0 .kstrtab : { *(.kstrtab) } . = ALIGN(16); /* Exception table */ __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; __start___dbe_table = .; /* Exception table for data bus errors */ __dbe_table : { *(__dbe_table) } __stop___dbe_table = .; __start___ksymtab = .; /* Kernel symbol table */ __ksymtab : { *(__ksymtab) } __stop___ksymtab = .; _etext = .; . = ALIGN(8192); .data.init_task : { *(.data.init_task) } /* Startup code */ . = ALIGN(4096); __init_begin = .; .text.init : { *(.text.init) } .data.init : { *(.data.init) } . = ALIGN(16); __setup_start = .; .setup.init : { *(.setup.init) } __setup_end = .; __initcall_start = .; .initcall.init : { *(.initcall.init) } __initcall_end = .; . = ALIGN(4096); /* Align double page for init_task_union */ __init_end = .; . = ALIGN(4096); .data.page_aligned : { *(.data.idt) } . = ALIGN(32); .data.cacheline_aligned : { *(.data.cacheline_aligned) } .fini : { *(.fini) } =0 .reginfo : { *(.reginfo) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. It would be more correct to do this: . = .; The current expression does not correctly handle the case of a text segment ending precisely at the end of a page; it causes the data segment to skip a page. The above expression does not have this problem, but it will currently (2/95) cause BFD to allocate a single segment, combining both text and data, for this case. This will prevent the text segment from being shared among multiple executions of the program; I think that is more important than losing a page of the virtual address space (note that no actual memory is lost; the page which is skipped can not be referenced). */ . = .; .data : { _fdata = . ; *(.data) /* Align the initial ramdisk image (INITRD) on page boundaries. */ . = ALIGN(4096); __rd_start = .; *(.initrd) __rd_end = .; . = ALIGN(4096); CONSTRUCTORS } .data1 : { *(.data1) } _gp = . + 0x8000; .lit8 : { *(.lit8) } .lit4 : { *(.lit4) } .ctors : { *(.ctors) } .dtors : { *(.dtors) } .got : { *(.got.plt) *(.got) } .dynamic : { *(.dynamic) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ .sdata : { *(.sdata) } . = ALIGN(4); _edata = .; PROVIDE (edata = .); __bss_start = .; _fbss = .; .sbss : { *(.sbss) *(.scommon) } .bss : { *(.dynbss) *(.bss) *(COMMON) . = ALIGN(4); _end = . ; PROVIDE (end = .); } /* Sections to be discarded */ /DISCARD/ : { *(.text.exit) *(.data.exit) *(.exitcall.exit) } /* This is the MIPS specific mdebug section. */ .mdebug : { *(.mdebug) } /* These are needed for ELF backends which have not yet been converted to the new style linker. */ .stab 0 : { *(.stab) } .stabstr 0 : { *(.stabstr) } /* DWARF debug sections. Symbols in the .debug DWARF section are relative to the beginning of the section so we begin .debug at 0. It's not clear yet what needs to happen for the others. */ .debug 0 : { *(.debug) } .debug_srcinfo 0 : { *(.debug_srcinfo) } .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } .debug_sfnames 0 : { *(.debug_sfnames) } .line 0 : { *(.line) } /* These must appear regardless of . */ .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } .comment : { *(.comment) } .note : { *(.note) } } |
From: Pete P. <pp...@us...> - 2001-10-10 17:46:59
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/utils In directory usw-pr-cvs1:/tmp/cvs-serv26774/arch/mips/zboot/utils Added Files: entry offset size Log Message: Alchemy PB1000 zImage support. Most of this work is portable to other embedded mips boards. The board specific code is in the pb1000 directory and it's just head.S and the Makefile and linker script. The common code was ported with very few modifications from the PPC boot code. --- NEW FILE: entry --- #!/bin/sh # grab the kernel_entry address from the vmlinux elf image echo "0x"`$1 $2 | grep kernel_entry | cut -c9- | awk '{print $1}'` --- NEW FILE: offset --- #!/bin/sh echo "0x"`$1 -h $2 | grep $3 | grep -v zvmlinux| awk '{print $6}'` --- NEW FILE: size --- #!/bin/sh OFFSET=`$1 -h $2 | grep $3 | grep -v zvmlinux | awk '{print $3}'` echo "0x"$OFFSET |
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/common In directory usw-pr-cvs1:/tmp/cvs-serv26774/arch/mips/zboot/common Added Files: Makefile au1k_uart.c ctype.c misc-common.c misc-simple.c no_initrd.c ns16550.c string.c Log Message: Alchemy PB1000 zImage support. Most of this work is portable to other embedded mips boards. The board specific code is in the pb1000 directory and it's just head.S and the Makefile and linker script. The common code was ported with very few modifications from the PPC boot code. --- NEW FILE: Makefile --- # # arch/ppc/boot/common/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive # for more details. # # Tom Rini January 2001 # .c.s: $(CC) $(CFLAGS) -S -o $*.s $< .s.o: $(AS) -o $*.o $< .c.o: $(CC) $(CFLAGS) -c -o $*.o $< .S.s: $(CPP) $(AFLAGS) -o $*.o $< .S.o: $(CC) $(AFLAGS) -c -o $*.o $< clean: rm -rf *.o OBJCOPY_ARGS = -O elf32-tradlittlemips include $(TOPDIR)/Rules.make --- NEW FILE: au1k_uart.c --- /* * BRIEF MODULE DESCRIPTION * Simple Au1000 uart routines. * * Copyright 2001 MontaVista Software Inc. * Author: MontaVista Software, Inc. * pp...@mv... or so...@mv... * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <linux/config.h> #include <asm/io.h> #include <asm/au1000.h> #include "ns16550.h" typedef unsigned char uint8; typedef unsigned int uint32; #define UART16550_BAUD_2400 2400 #define UART16550_BAUD_4800 4800 #define UART16550_BAUD_9600 9600 #define UART16550_BAUD_19200 19200 #define UART16550_BAUD_38400 38400 #define UART16550_BAUD_57600 57600 #define UART16550_BAUD_115200 115200 #define UART16550_PARITY_NONE 0 #define UART16550_PARITY_ODD 0x08 #define UART16550_PARITY_EVEN 0x18 #define UART16550_PARITY_MARK 0x28 #define UART16550_PARITY_SPACE 0x38 #define UART16550_DATA_5BIT 0x0 #define UART16550_DATA_6BIT 0x1 #define UART16550_DATA_7BIT 0x2 #define UART16550_DATA_8BIT 0x3 #define UART16550_STOP_1BIT 0x0 #define UART16550_STOP_2BIT 0x4 /* memory-mapped read/write of the port */ #define UART16550_READ(y) (readl(UART_BASE + y) & 0xff) #define UART16550_WRITE(y,z) (writel(z&0xff, UART_BASE + y)) /* * We use uart 0, which is already initialized by * yamon. */ volatile struct NS16550 * serial_init(int chan) { volatile struct NS16550 *com_port; com_port = (struct NS16550 *) UART_BASE; return (com_port); } void serial_putc(volatile struct NS16550 *com_port, unsigned char c) { while ((UART16550_READ(UART_LSR)&0x40) == 0); UART16550_WRITE(UART_TX, c); return 1; } unsigned char serial_getc(volatile struct NS16550 *com_port) { while((UART16550_READ(UART_LSR) & 0x1) == 0); return UART16550_READ(UART_RX); } int serial_tstc(volatile struct NS16550 *com_port) { return((UART16550_READ(UART_LSR) & LSR_DR) != 0); } --- NEW FILE: ctype.c --- /* * linux/lib/ctype.c * * Copyright (C) 1991, 1992 Linus Torvalds */ #include <linux/ctype.h> unsigned char _ctype[] = { _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ _C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */ _C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */ _C,_C,_C,_C,_C,_C,_C,_C, /* 24-31 */ _S|_SP,_P,_P,_P,_P,_P,_P,_P, /* 32-39 */ _P,_P,_P,_P,_P,_P,_P,_P, /* 40-47 */ _D,_D,_D,_D,_D,_D,_D,_D, /* 48-55 */ _D,_D,_P,_P,_P,_P,_P,_P, /* 56-63 */ _P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U, /* 64-71 */ _U,_U,_U,_U,_U,_U,_U,_U, /* 72-79 */ _U,_U,_U,_U,_U,_U,_U,_U, /* 80-87 */ _U,_U,_U,_P,_P,_P,_P,_P, /* 88-95 */ _P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L, /* 96-103 */ _L,_L,_L,_L,_L,_L,_L,_L, /* 104-111 */ _L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */ _L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */ _S|_SP,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 160-175 */ _P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P,_P, /* 176-191 */ _U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U,_U, /* 192-207 */ _U,_U,_U,_U,_U,_U,_U,_P,_U,_U,_U,_U,_U,_U,_U,_L, /* 208-223 */ _L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L,_L, /* 224-239 */ _L,_L,_L,_L,_L,_L,_L,_P,_L,_L,_L,_L,_L,_L,_L,_L}; /* 240-255 */ --- NEW FILE: misc-common.c --- /* * arch/mips/boot/common/misc-common.c * * Misc. bootloader code (almost) all platforms can use * * Author: Johnnie Peters <jp...@mv...> * Editor: Tom Rini <tr...@mv...> * * Derived from arch/ppc/boot/prep/misc.c * * Ported by Pete Popov <pp...@mv...> to * support mips board(s). I also got rid of the vga console * code. * * Copyright 2000-2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <linux/config.h> #include "zlib.h" #include <stdarg.h> extern char *avail_ram; extern char *end_avail; extern char _end[]; void puts(const char *); void putc(const char c); void puthex(unsigned long val); void _bcopy(char *src, char *dst, int len); void gunzip(void *, int, unsigned char *, int *); static int _cvt(unsigned long val, char *buf, long radix, char *digits); void _vprintk(void(*)(const char), const char *, va_list ap); struct NS16550 *com_port; int serial_tstc(volatile struct NS16550 *); unsigned char serial_getc(volatile struct NS16550 *); void serial_putc(volatile struct NS16550 *, unsigned char); void pause(void) { puts("pause\n"); } void exit(void) { puts("exit\n"); while(1); } int tstc(void) { return (serial_tstc(com_port)); } int getc(void) { while (1) { if (serial_tstc(com_port)) return (serial_getc(com_port)); } } void putc(const char c) { int x,y; serial_putc(com_port, c); if ( c == '\n' ) serial_putc(com_port, '\r'); } void puts(const char *s) { char c; while ( ( c = *s++ ) != '\0' ) { serial_putc(com_port, c); if ( c == '\n' ) serial_putc(com_port, '\r'); } } void error(char *x) { puts("\n\n"); puts(x); puts("\n\n -- System halted"); while(1); /* Halt */ } void *zalloc(void *x, unsigned items, unsigned size) { void *p = avail_ram; size *= items; size = (size + 7) & -8; avail_ram += size; if (avail_ram > end_avail) { puts("oops... out of memory\n"); pause(); } return p; } void zfree(void *x, void *addr, unsigned nb) { } #define HEAD_CRC 2 #define EXTRA_FIELD 4 #define ORIG_NAME 8 #define COMMENT 0x10 #define RESERVED 0xe0 #define DEFLATED 8 void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp) { z_stream s; int r, i, flags; /* skip header */ i = 10; flags = src[3]; if (src[2] != DEFLATED || (flags & RESERVED) != 0) { puts("bad gzipped data\n"); exit(); } if ((flags & EXTRA_FIELD) != 0) i = 12 + src[10] + (src[11] << 8); if ((flags & ORIG_NAME) != 0) while (src[i++] != 0) ; if ((flags & COMMENT) != 0) while (src[i++] != 0) ; if ((flags & HEAD_CRC) != 0) i += 2; if (i >= *lenp) { puts("gunzip: ran out of data in header\n"); exit(); } s.zalloc = zalloc; s.zfree = zfree; r = inflateInit2(&s, -MAX_WBITS); if (r != Z_OK) { puts("inflateInit2 returned %d\n"); exit(); } s.next_in = src + i; s.avail_in = *lenp - i; s.next_out = dst; s.avail_out = dstlen; r = inflate(&s, Z_FINISH); if (r != Z_OK && r != Z_STREAM_END) { puts("inflate returned %d\n"); exit(); } *lenp = s.next_out - (unsigned char *) dst; inflateEnd(&s); } void puthex(unsigned long val) { unsigned char buf[10]; int i; for (i = 7; i >= 0; i--) { buf[i] = "0123456789ABCDEF"[val & 0x0F]; val >>= 4; } buf[8] = '\0'; puts(buf); } #define FALSE 0 #define TRUE 1 void _printk(char const *fmt, ...) { va_list ap; va_start(ap, fmt); _vprintk(putc, fmt, ap); va_end(ap); return; } #define is_digit(c) ((c >= '0') && (c <= '9')) void _vprintk(void(*putc)(const char), const char *fmt0, va_list ap) { char c, sign, *cp = 0; int left_prec, right_prec, zero_fill, length = 0, pad, pad_on_right; char buf[32]; long val; while ((c = *fmt0++)) { if (c == '%') { c = *fmt0++; left_prec = right_prec = pad_on_right = 0; if (c == '-') { c = *fmt0++; pad_on_right++; } if (c == '0') { zero_fill = TRUE; c = *fmt0++; } else { zero_fill = FALSE; } while (is_digit(c)) { left_prec = (left_prec * 10) + (c - '0'); c = *fmt0++; } if (c == '.') { c = *fmt0++; zero_fill++; while (is_digit(c)) { right_prec = (right_prec * 10) + (c - '0'); c = *fmt0++; } } else { right_prec = left_prec; } sign = '\0'; switch (c) { case 'd': case 'x': case 'X': val = va_arg(ap, long); switch (c) { case 'd': if (val < 0) { sign = '-'; val = -val; } length = _cvt(val, buf, 10, "0123456789"); break; case 'x': length = _cvt(val, buf, 16, "0123456789abcdef"); break; case 'X': length = _cvt(val, buf, 16, "0123456789ABCDEF"); break; } cp = buf; break; case 's': cp = va_arg(ap, char *); length = strlen(cp); break; case 'c': c = va_arg(ap, long /*char*/); (*putc)(c); continue; default: (*putc)('?'); } pad = left_prec - length; if (sign != '\0') { pad--; } if (zero_fill) { c = '0'; if (sign != '\0') { (*putc)(sign); sign = '\0'; } } else { c = ' '; } if (!pad_on_right) { while (pad-- > 0) { (*putc)(c); } } if (sign != '\0') { (*putc)(sign); } while (length-- > 0) { (*putc)(c = *cp++); if (c == '\n') { (*putc)('\r'); } } if (pad_on_right) { while (pad-- > 0) { (*putc)(c); } } } else { (*putc)(c); if (c == '\n') { (*putc)('\r'); } } } } int _cvt(unsigned long val, char *buf, long radix, char *digits) { char temp[80]; char *cp = temp; int length = 0; if (val == 0) { /* Special case */ *cp++ = '0'; } else while (val) { *cp++ = digits[val % radix]; val /= radix; } while (cp != temp) { *buf++ = *--cp; length++; } *buf = '\0'; return (length); } void _dump_buf_with_offset(unsigned char *p, int s, unsigned char *base) { int i, c; if ((unsigned int)s > (unsigned int)p) { s = (unsigned int)s - (unsigned int)p; } while (s > 0) { if (base) { _printk("%06X: ", (int)p - (int)base); } else { _printk("%06X: ", p); } for (i = 0; i < 16; i++) { if (i < s) { _printk("%02X", p[i] & 0xFF); } else { _printk(" "); } if ((i % 2) == 1) _printk(" "); if ((i % 8) == 7) _printk(" "); } _printk(" |"); for (i = 0; i < 16; i++) { if (i < s) { c = p[i] & 0xFF; if ((c < 0x20) || (c >= 0x7F)) c = '.'; } else { c = ' '; } _printk("%c", c); } _printk("|\n"); s -= 16; p += 16; } } void _dump_buf(unsigned char *p, int s) { _printk("\n"); _dump_buf_with_offset(p, s, 0); } /* * Local variables: * c-indent-level: 8 * c-basic-offset: 8 * tab-width: 8 * End: */ --- NEW FILE: misc-simple.c --- /* * arch/ppc/common/misc-simple.c * * Misc. bootloader code for many machines. This assumes you have are using * a 6xx/7xx/74xx CPU in your machine. This assumes the chunk of memory * below 8MB is free. Finally, it assumes you have a NS16550-style uart for * your serial console. If a machine meets these requirements, it can quite * likely use this code during boot. * * Author: Matt Porter <mp...@mv...> * Derived from arch/ppc/boot/prep/misc.c * * Copyright 2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #include <linux/types.h> #include <linux/elf.h> #include <linux/config.h> #include <asm/page.h> #include <asm/processor.h> #include <asm/mmu.h> #include "zlib.h" extern struct NS16550 *com_port; char *avail_ram; char *end_avail; extern char _end[]; #ifdef CONFIG_CMDLINE #define CMDLINE CONFIG_CMDLINE #else #define CMDLINE "" #endif char cmd_preset[] = CMDLINE; char cmd_buf[256]; char *cmd_line = cmd_buf; unsigned long initrd_start = 0, initrd_end = 0; char *zimage_start; int zimage_size; extern void puts(const char *); extern void putc(const char c); extern void puthex(unsigned long val); extern void *memcpy(void * __dest, __const void * __src, __kernel_size_t __n); extern void gunzip(void *, int, unsigned char *, int *); extern void udelay(long delay); extern int tstc(void); extern int getc(void); extern volatile struct NS16550 *serial_init(int chan); void decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum, unsigned long *sp) { int timer = 0; extern unsigned long start; char *cp, ch; int i; com_port = (struct NS16550 *)serial_init(0); /* * Reveal where we were loaded at and where we * were relocated to. */ puts("loaded at: "); puthex(load_addr); puts(" "); puthex((unsigned long)(load_addr + (4*num_words))); puts("\n"); if ( (unsigned long)load_addr != (unsigned long)&start ) { puts("relocated to: "); puthex((unsigned long)&start); puts(" "); puthex((unsigned long)((unsigned long)&start + (4*num_words))); puts("\n"); } zimage_start = (char *)(load_addr + ZIMAGE_OFFSET); zimage_size = ZIMAGE_SIZE; if ( INITRD_OFFSET ) initrd_start = load_addr - 0x10000 + INITRD_OFFSET; else initrd_start = 0; initrd_end = INITRD_SIZE + initrd_start; /* * Find a place to stick the zimage and initrd and * relocate them if we have to. -- Cort */ avail_ram = (char *)PAGE_ALIGN((unsigned long)_end); puts("zimage at: "); puthex((unsigned long)zimage_start); puts(" "); puthex((unsigned long)(zimage_size+zimage_start)); puts("\n"); memcpy( (void *)avail_ram, (void *)zimage_start, zimage_size ); zimage_start = (char *)avail_ram; puts("relocated to: "); puthex((unsigned long)zimage_start); puts(" "); puthex((unsigned long)zimage_size+(unsigned long)zimage_start); puts("\n"); /* relocate initrd */ if ( initrd_start ) { puts("initrd at: "); puthex(initrd_start); puts(" "); puthex(initrd_end); puts("\n"); avail_ram = (char *)PAGE_ALIGN( (unsigned long)zimage_size+(unsigned long)zimage_start); memcpy ((void *)avail_ram, (void *)initrd_start, INITRD_SIZE ); initrd_start = (unsigned long)avail_ram; initrd_end = initrd_start + INITRD_SIZE; puts("relocated to: "); puthex(initrd_start); puts(" "); puthex(initrd_end); puts("\n"); } /* assume the chunk below 8M is free */ avail_ram = (char *)AVAIL_RAM_START; end_avail = (char *)AVAIL_RAM_END; puts("first four zImage words:\n"); puthex(((unsigned long *)zimage_start)[0]); puts("\n"); puthex(((unsigned long *)zimage_start)[1]); puts("\n"); puthex(((unsigned long *)zimage_start)[2]); puts("\n"); puthex(((unsigned long *)zimage_start)[3]); puts("\n"); /* Display standard Linux/MIPS boot prompt for kernel args */ puts("Uncompressing Linux at load address "); puthex(LOADADDR); puts("\n"); /* I don't like this hard coded gunzip size (fixme) */ gunzip((void *)LOADADDR, 0x400000, zimage_start, &zimage_size); puts("Now booting the kernel\n"); } --- NEW FILE: no_initrd.c --- char initrd_data[1]; int initrd_len = 0; --- NEW FILE: ns16550.c --- /* * NS16550 support */ #include <linux/config.h> #include <asm/serial.h> #include "ns16550.h" typedef struct NS16550 *NS16550_t; const NS16550_t COM_PORTS[] = { (NS16550_t) COM1, (NS16550_t) COM2, (NS16550_t) COM3, (NS16550_t) COM4 }; volatile struct NS16550 * serial_init(int chan) { volatile struct NS16550 *com_port; com_port = (struct NS16550 *) COM_PORTS[chan]; /* See if port is present */ com_port->lcr = 0x00; com_port->ier = 0xFF; #if 0 if (com_port->ier != 0x0F) return ((struct NS16550 *)0); #endif com_port->ier = 0x00; com_port->lcr = 0x80; /* Access baud rate */ #ifdef CONFIG_SERIAL_CONSOLE_NONSTD com_port->dll = (BASE_BAUD / CONFIG_SERIAL_CONSOLE_BAUD); com_port->dlm = (BASE_BAUD / CONFIG_SERIAL_CONSOLE_BAUD) >> 8; #endif com_port->lcr = 0x03; /* 8 data, 1 stop, no parity */ com_port->mcr = 0x03; /* RTS/DTR */ com_port->fcr = 0x07; /* Clear & enable FIFOs */ return (com_port); } void serial_putc(volatile struct NS16550 *com_port, unsigned char c) { while ((com_port->lsr & LSR_THRE) == 0) ; com_port->thr = c; } unsigned char serial_getc(volatile struct NS16550 *com_port) { while ((com_port->lsr & LSR_DR) == 0) ; return (com_port->rbr); } int serial_tstc(volatile struct NS16550 *com_port) { return ((com_port->lsr & LSR_DR) != 0); } --- NEW FILE: string.c --- /* * linux/lib/string.c * * Copyright (C) 1991, 1992 Linus Torvalds */ /* * stupid library routines.. The optimized versions should generally be found * as inline code in <asm-xx/string.h> * * These are buggy as well.. * * * Fri Jun 25 1999, Ingo Oeser <io...@in...> * - Added strsep() which will replace strtok() soon (because strsep() is * reentrant and should be faster). Use only strsep() in new code, please. */ #include <linux/types.h> #include <linux/string.h> #include <linux/ctype.h> /** * strnicmp - Case insensitive, length-limited string comparison * @s1: One string * @s2: The other string * @len: the maximum number of characters to compare */ int strnicmp(const char *s1, const char *s2, size_t len) { /* Yes, Virginia, it had better be unsigned */ unsigned char c1, c2; c1 = 0; c2 = 0; if (len) { do { c1 = *s1; c2 = *s2; s1++; s2++; if (!c1) break; if (!c2) break; if (c1 == c2) continue; c1 = tolower(c1); c2 = tolower(c2); if (c1 != c2) break; } while (--len); } return (int)c1 - (int)c2; } char * ___strtok; /** * strcpy - Copy a %NUL terminated string * @dest: Where to copy the string to * @src: Where to copy the string from */ char * strcpy(char * dest,const char *src) { char *tmp = dest; while ((*dest++ = *src++) != '\0') /* nothing */; return tmp; } /** * strncpy - Copy a length-limited, %NUL-terminated string * @dest: Where to copy the string to * @src: Where to copy the string from * @count: The maximum number of bytes to copy * * Note that unlike userspace strncpy, this does not %NUL-pad the buffer. * However, the result is not %NUL-terminated if the source exceeds * @count bytes. */ char * strncpy(char * dest,const char *src,size_t count) { char *tmp = dest; while (count-- && (*dest++ = *src++) != '\0') /* nothing */; return tmp; } /** * strcat - Append one %NUL-terminated string to another * @dest: The string to be appended to * @src: The string to append to it */ char * strcat(char * dest, const char * src) { char *tmp = dest; while (*dest) dest++; while ((*dest++ = *src++) != '\0') ; return tmp; } /** * strncat - Append a length-limited, %NUL-terminated string to another * @dest: The string to be appended to * @src: The string to append to it * @count: The maximum numbers of bytes to copy * * Note that in contrast to strncpy, strncat ensures the result is * terminated. */ char * strncat(char *dest, const char *src, size_t count) { char *tmp = dest; if (count) { while (*dest) dest++; while ((*dest++ = *src++)) { if (--count == 0) { *dest = '\0'; break; } } } return tmp; } /** * strcmp - Compare two strings * @cs: One string * @ct: Another string */ int strcmp(const char * cs,const char * ct) { register signed char __res; while (1) { if ((__res = *cs - *ct++) != 0 || !*cs++) break; } return __res; } /** * strncmp - Compare two length-limited strings * @cs: One string * @ct: Another string * @count: The maximum number of bytes to compare */ int strncmp(const char * cs,const char * ct,size_t count) { register signed char __res = 0; while (count) { if ((__res = *cs - *ct++) != 0 || !*cs++) break; count--; } return __res; } /** * strchr - Find the first occurrence of a character in a string * @s: The string to be searched * @c: The character to search for */ char * strchr(const char * s, int c) { for(; *s != (char) c; ++s) if (*s == '\0') return NULL; return (char *) s; } /** * strrchr - Find the last occurrence of a character in a string * @s: The string to be searched * @c: The character to search for */ char * strrchr(const char * s, int c) { const char *p = s + strlen(s); do { if (*p == (char)c) return (char *)p; } while (--p >= s); return NULL; } /** * strlen - Find the length of a string * @s: The string to be sized */ size_t strlen(const char * s) { const char *sc; for (sc = s; *sc != '\0'; ++sc) /* nothing */; return sc - s; } /** * strnlen - Find the length of a length-limited string * @s: The string to be sized * @count: The maximum number of bytes to search */ size_t strnlen(const char * s, size_t count) { const char *sc; for (sc = s; count-- && *sc != '\0'; ++sc) /* nothing */; return sc - s; } /** * strspn - Calculate the length of the initial substring of @s which only * contain letters in @accept * @s: The string to be searched * @accept: The string to search for */ size_t strspn(const char *s, const char *accept) { const char *p; const char *a; size_t count = 0; for (p = s; *p != '\0'; ++p) { for (a = accept; *a != '\0'; ++a) { if (*p == *a) break; } if (*a == '\0') return count; ++count; } return count; } /** * strpbrk - Find the first occurrence of a set of characters * @cs: The string to be searched * @ct: The characters to search for */ char * strpbrk(const char * cs,const char * ct) { const char *sc1,*sc2; for( sc1 = cs; *sc1 != '\0'; ++sc1) { for( sc2 = ct; *sc2 != '\0'; ++sc2) { if (*sc1 == *sc2) return (char *) sc1; } } return NULL; } /** * strtok - Split a string into tokens * @s: The string to be searched * @ct: The characters to search for * * WARNING: strtok is deprecated, use strsep instead. */ char * strtok(char * s,const char * ct) { char *sbegin, *send; sbegin = s ? s : ___strtok; if (!sbegin) { return NULL; } sbegin += strspn(sbegin,ct); if (*sbegin == '\0') { ___strtok = NULL; return( NULL ); } send = strpbrk( sbegin, ct); if (send && *send != '\0') *send++ = '\0'; ___strtok = send; return (sbegin); } /** * strsep - Split a string into tokens * @s: The string to be searched * @ct: The characters to search for * * strsep() updates @s to point after the token, ready for the next call. * * It returns empty tokens, too, behaving exactly like the libc function * of that name. In fact, it was stolen from glibc2 and de-fancy-fied. * Same semantics, slimmer shape. ;) */ char * strsep(char **s, const char *ct) { char *sbegin = *s, *end; if (sbegin == NULL) return NULL; end = strpbrk(sbegin, ct); if (end) *end++ = '\0'; *s = end; return sbegin; } /** * memset - Fill a region of memory with the given value * @s: Pointer to the start of the area. * @c: The byte to fill the area with * @count: The size of the area. * * Do not use memset() to access IO space, use memset_io() instead. */ void * memset(void * s,int c, size_t count) { char *xs = (char *) s; while (count--) *xs++ = c; return s; } /** * bcopy - Copy one area of memory to another * @src: Where to copy from * @dest: Where to copy to * @count: The size of the area. * * Note that this is the same as memcpy(), with the arguments reversed. * memcpy() is the standard, bcopy() is a legacy BSD function. * * You should not use this function to access IO space, use memcpy_toio() * or memcpy_fromio() instead. */ char * bcopy(const char * src, char * dest, int count) { char *tmp = dest; while (count--) *tmp++ = *src++; return dest; } /** * memcpy - Copy one area of memory to another * @dest: Where to copy to * @src: Where to copy from * @count: The size of the area. * * You should not use this function to access IO space, use memcpy_toio() * or memcpy_fromio() instead. */ void * memcpy(void * dest,const void *src,size_t count) { char *tmp = (char *) dest, *s = (char *) src; while (count--) *tmp++ = *s++; return dest; } /** * memmove - Copy one area of memory to another * @dest: Where to copy to * @src: Where to copy from * @count: The size of the area. * * Unlike memcpy(), memmove() copes with overlapping areas. */ void * memmove(void * dest,const void *src,size_t count) { char *tmp, *s; if (dest <= src) { tmp = (char *) dest; s = (char *) src; while (count--) *tmp++ = *s++; } else { tmp = (char *) dest + count; s = (char *) src + count; while (count--) *--tmp = *--s; } return dest; } /** * memcmp - Compare two areas of memory * @cs: One area of memory * @ct: Another area of memory * @count: The size of the area. */ int memcmp(const void * cs,const void * ct,size_t count) { const unsigned char *su1, *su2; signed char res = 0; for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) if ((res = *su1 - *su2) != 0) break; return res; } /** * memscan - Find a character in an area of memory. * @addr: The memory area * @c: The byte to search for * @size: The size of the area. * * returns the address of the first occurrence of @c, or 1 byte past * the area if @c is not found */ void * memscan(void * addr, int c, size_t size) { unsigned char * p = (unsigned char *) addr; unsigned char * e = p + size; while (p != e) { if (*p == c) return (void *) p; p++; } return (void *) p; } /** * strstr - Find the first substring in a %NUL terminated string * @s1: The string to be searched * @s2: The string to search for */ char * strstr(const char * s1,const char * s2) { int l1, l2; l2 = strlen(s2); if (!l2) return (char *) s1; l1 = strlen(s1); while (l1 >= l2) { l1--; if (!memcmp(s1,s2,l2)) return (char *) s1; s1++; } return NULL; } /** * memchr - Find a character in an area of memory. * @s: The memory area * @c: The byte to search for * @n: The size of the area. * * returns the address of the first occurrence of @c, or %NULL * if @c is not found */ void *memchr(const void *s, int c, size_t n) { const unsigned char *p = s; while (n-- != 0) { if ((unsigned char)c == *p++) { return (void *)(p-1); } } return NULL; } |
From: Pete P. <pp...@us...> - 2001-10-10 17:46:59
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/images In directory usw-pr-cvs1:/tmp/cvs-serv26774/arch/mips/zboot/images Added Files: Makefile Log Message: Alchemy PB1000 zImage support. Most of this work is portable to other embedded mips boards. The board specific code is in the pb1000 directory and it's just head.S and the Makefile and linker script. The common code was ported with very few modifications from the PPC boot code. --- NEW FILE: Makefile --- include $(TOPDIR)/Rules.make vmlinux.gz: $(TOPDIR)/vmlinux $(OBJCOPY) -S -O binary $(TOPDIR)/vmlinux vmlinux gzip -vf vmlinux clean: rm -f vmlinux.* zImage.* zImage.* |
From: Pete P. <pp...@us...> - 2001-10-10 17:46:58
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot In directory usw-pr-cvs1:/tmp/cvs-serv26774/arch/mips/zboot Added Files: Makefile Log Message: Alchemy PB1000 zImage support. Most of this work is portable to other embedded mips boards. The board specific code is in the pb1000 directory and it's just head.S and the Makefile and linker script. The common code was ported with very few modifications from the PPC boot code. --- NEW FILE: Makefile --- # # arch/ppc/boot/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive # for more details. # # Copyright (C) 1994 by Linus Torvalds # Adapted for PowerPC by Gary Thomas # modified by Cort (co...@cs...) # .c.s: $(CC) $(CFLAGS) -S -o $*.s $< .s.o: $(AS) -o $*.o $< .c.o: $(CC) $(CFLAGS) -c -o $*.o $< .S.s: $(CPP) $(AFLAGS) -o $*.o $< .S.o: $(CC) $(AFLAGS) -c -o $*.o $< GZIP_FLAGS = -v9f CFLAGS := $(CPPFLAGS) -O2 -D__BOOTER__ \ -fomit-frame-pointer -fno-strict-aliasing -fno-common \ -G 0 -mno-abicalls -fno-pic -mcpu=r4600 -mips2 \ -I$(TOPDIR)/arch/$(ARCH)/zboot/include \ -I$(TOPDIR)/include/asm AFLAGS += -D__BOOTER__ lib/zlib.a: $(MAKE) -C lib images/vmlinux.gz: $(TOPDIR)/vmlinux $(MAKE) -C images vmlinux.gz BOOT_TARGETS = zImage $(BOOT_TARGETS): lib/zlib.a images/vmlinux.gz ifdef CONFIG_MIPS_PB1000 $(MAKE) -C pb1000 endif # Do the dirs clean: $(MAKE) -C common clean $(MAKE) -C images clean ifdef CONFIG_MIPS_PB1000 $(MAKE) -C pb1000 clean endif include $(TOPDIR)/Rules.make |
From: Pete P. <pp...@us...> - 2001-10-10 17:46:58
|
Update of /cvsroot/linux-mips/linux/arch/mips In directory usw-pr-cvs1:/tmp/cvs-serv26774/arch/mips Modified Files: Makefile Log Message: Alchemy PB1000 zImage support. Most of this work is portable to other embedded mips boards. The board specific code is in the pb1000 directory and it's just head.S and the Makefile and linker script. The common code was ported with very few modifications from the PPC boot code. Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/Makefile,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Makefile 2001/10/08 18:06:07 1.21 +++ Makefile 2001/10/10 17:46:56 1.22 @@ -355,6 +355,11 @@ endif MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot +MAKEZBOOT = $(MAKE) -C arch/$(ARCH)/zboot + +BOOT_TARGETS = zImage +$(BOOT_TARGETS): vmlinux + @$(MAKEZBOOT) $@ vmlinux.ecoff: vmlinux @$(MAKEBOOT) $@ |
From: Pete P. <pp...@us...> - 2001-10-10 17:40:56
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/pb1000 In directory usw-pr-cvs1:/tmp/cvs-serv25633/arch/mips/zboot/pb1000 Log Message: Directory /cvsroot/linux-mips/linux/arch/mips/zboot/pb1000 added to the repository |
From: Pete P. <pp...@us...> - 2001-10-10 17:40:45
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/utils In directory usw-pr-cvs1:/tmp/cvs-serv25579/arch/mips/zboot/utils Log Message: Directory /cvsroot/linux-mips/linux/arch/mips/zboot/utils added to the repository |
From: Pete P. <pp...@us...> - 2001-10-10 17:40:37
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/images In directory usw-pr-cvs1:/tmp/cvs-serv25551/arch/mips/zboot/images Log Message: Directory /cvsroot/linux-mips/linux/arch/mips/zboot/images added to the repository |
From: Pete P. <pp...@us...> - 2001-10-10 17:40:26
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/include In directory usw-pr-cvs1:/tmp/cvs-serv25495/arch/mips/zboot/include Log Message: Directory /cvsroot/linux-mips/linux/arch/mips/zboot/include added to the repository |
From: Pete P. <pp...@us...> - 2001-10-10 17:40:16
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/lib In directory usw-pr-cvs1:/tmp/cvs-serv25452/arch/mips/zboot/lib Log Message: Directory /cvsroot/linux-mips/linux/arch/mips/zboot/lib added to the repository |
From: Pete P. <pp...@us...> - 2001-10-10 17:39:58
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot/common In directory usw-pr-cvs1:/tmp/cvs-serv25314/arch/mips/zboot/common Log Message: Directory /cvsroot/linux-mips/linux/arch/mips/zboot/common added to the repository |
From: Pete P. <pp...@us...> - 2001-10-10 17:39:40
|
Update of /cvsroot/linux-mips/linux/arch/mips/zboot In directory usw-pr-cvs1:/tmp/cvs-serv25154/arch/mips/zboot Log Message: Directory /cvsroot/linux-mips/linux/arch/mips/zboot added to the repository |
From: James S. <jsi...@tr...> - 2001-10-10 17:06:05
|
> Uuuh. There is something wrong (?): I see the problem. I'm working on it. Appears Ralph's changes are broke. |
From: Dirk B. <dir...@de...> - 2001-10-10 13:45:31
|
Uuuh. There is something wrong (?): arch/mips/kernel/kernel.o: In function `trap_init': arch/mips/kernel/kernel.o(.text.init+0x594): undefined reference to `TLBMISS_HANDLER_SETUP' arch/mips/mm/mm.o: In function `remap_area_pages': arch/mips/mm/mm.o(.text+0x738): undefined reference to `flush_tlb_all' arch/mips/mm/mm.o: In function `local_flush_tlb_mm': arch/mips/mm/mm.o(.text+0x6c18): undefined reference to `get_new_cpu_mmu_context' kernel/kernel.o(.text+0x4c0): undefined reference to `current_pgd' kernel/kernel.o(.text+0x5a0): undefined reference to `flush_tlb_all' kernel/kernel.o: In function `copy_mm': kernel/kernel.o(.text+0x264c): undefined reference to `flush_tlb_mm' kernel/kernel.o: In function `end_lazy_tlb': kernel/kernel.o(.text+0x5d28): undefined reference to `current_pgd' kernel/kernel.o(.text+0x5d2c): undefined reference to `current_pgd' kernel/kernel.o(.text+0x5dc0): undefined reference to `flush_tlb_all' mm/mm.o: In function `zeromap_page_range': mm/mm.o(.text+0x1240): undefined reference to `flush_tlb_range' mm/mm.o: In function `remap_page_range': mm/mm.o(.text+0x15c0): undefined reference to `flush_tlb_range' mm/mm.o: In function `do_wp_page': mm/mm.o(.text+0x1914): undefined reference to `flush_tlb_page' mm/mm.o(.text+0x19b8): undefined reference to `flush_tlb_page' mm/mm.o: In function `vmtruncate_list': mm/mm.o(.text+0x1bec): undefined reference to `flush_tlb_range' mm/mm.o(.text+0x1c70): undefined reference to `flush_tlb_range' mm/mm.o: In function `handle_mm_fault': mm/mm.o(.text+0x2644): undefined reference to `flush_tlb_page' mm/mm.o: In function `do_mmap_pgoff': mm/mm.o(.text+0x2edc): undefined reference to `flush_tlb_range' mm/mm.o: In function `do_munmap': mm/mm.o(.text+0x3d98): undefined reference to `flush_tlb_range' mm/mm.o: In function `exit_mmap': mm/mm.o(.text+0x42d4): undefined reference to `flush_tlb_mm' mm/mm.o: In function `filemap_sync': mm/mm.o(.text+0x7ba8): undefined reference to `flush_tlb_range' mm/mm.o(.text+0x7ca4): undefined reference to `flush_tlb_page' mm/mm.o: In function `madvise_dontneed': mm/mm.o(.text+0x8a78): undefined reference to `flush_tlb_range' mm/mm.o: In function `change_protection': mm/mm.o(.text+0x9e1c): undefined reference to `flush_tlb_range' mm/mm.o: In function `move_page_tables': mm/mm.o(.text+0xaf38): undefined reference to `flush_tlb_range' mm/mm.o(.text+0xafac): undefined reference to `flush_tlb_range' mm/mm.o: In function `vmfree_area_pages': mm/mm.o(.text+0xb644): undefined reference to `flush_tlb_all' mm/mm.o: In function `__vmalloc': mm/mm.o(.text+0xbad4): undefined reference to `flush_tlb_all' mm/mm.o: In function `vmalloc_area_pages': mm/mm.o(.text+0xbd5c): undefined reference to `flush_tlb_all' mm/mm.o: In function `try_to_swap_out': mm/mm.o(.text+0xe7a0): undefined reference to `flush_tlb_page' fs/fs.o: In function `exec_mmap': fs/fs.o(.text+0x10bb4): undefined reference to `current_pgd' fs/fs.o(.text+0x10bb8): undefined reference to `current_pgd' fs/fs.o(.text+0x10c8c): undefined reference to `flush_tlb_all' make: *** [vmlinux] Error 1 James Simmons wrote: > > Update of /cvsroot/linux-mips/linux/arch/mips/mm > In directory usw-pr-cvs1:/tmp/cvs-serv17388/arch/mips/mm > > Modified Files: > mips32.c r2300.c r4xx0.c r5432.c > Log Message: > Consolidate TLB context switching code. This also fixes a bunch very obscure bugs in the 32-bit code which probably didn't bite anybody yet. > > Index: mips32.c > ... -- dir...@de... |
From: James S. <jsi...@us...> - 2001-10-09 21:55:07
|
Update of /cvsroot/linux-mips/linux/include/asm-mips In directory usw-pr-cvs1:/tmp/cvs-serv17388/include/asm-mips Modified Files: processor.h Log Message: Consolidate TLB context switching code. This also fixes a bunch very obscure bugs in the 32-bit code which probably didn't bite anybody yet. Index: processor.h =================================================================== RCS file: /cvsroot/linux-mips/linux/include/asm-mips/processor.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- processor.h 2001/07/23 23:56:12 1.3 +++ processor.h 2001/10/09 21:54:21 1.4 @@ -28,31 +28,29 @@ #include <asm/reg.h> #include <asm/system.h> -struct mips_cpuinfo { +struct cpuinfo_mips { unsigned long udelay_val; unsigned long *pgd_quick; unsigned long *pte_quick; unsigned long pgtable_cache_sz; + unsigned long asid_cache; }; /* * System setup and hardware flags.. - * XXX: Should go into mips_cpuinfo. */ extern void (*cpu_wait)(void); /* only available on R4[26]00 and R3081 */ extern void r3081_wait(void); extern void r4k_wait(void); extern char cyclecounter_available; /* only available from R4000 upwards. */ -extern struct mips_cpuinfo boot_cpu_data; +extern struct cpuinfo_mips cpu_data[]; extern unsigned int vced_count, vcei_count; #ifdef CONFIG_SMP -extern struct mips_cpuinfo cpu_data[]; #define current_cpu_data cpu_data[smp_processor_id()] #else -#define cpu_data &boot_cpu_data -#define current_cpu_data boot_cpu_data +#define current_cpu_data cpu_data[0] #endif /* |
From: James S. <jsi...@us...> - 2001-10-09 21:54:54
|
Update of /cvsroot/linux-mips/linux/arch/mips/mm In directory usw-pr-cvs1:/tmp/cvs-serv17388/arch/mips/mm Modified Files: mips32.c r2300.c r4xx0.c r5432.c Log Message: Consolidate TLB context switching code. This also fixes a bunch very obscure bugs in the 32-bit code which probably didn't bite anybody yet. Index: mips32.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/mips32.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- mips32.c 2001/10/08 16:29:33 1.4 +++ mips32.c 2001/10/09 21:54:13 1.5 @@ -416,7 +416,7 @@ #undef DEBUG_TLB #undef DEBUG_TLBUPDATE -void flush_tlb_all(void) +void local_flush_tlb_all(void) { unsigned long flags; unsigned long old_ctx; @@ -451,7 +451,7 @@ __restore_flags(flags); } -void flush_tlb_mm(struct mm_struct *mm) +void local_flush_tlb_mm(struct mm_struct *mm) { if (mm->context != 0) { unsigned long flags; @@ -460,14 +460,14 @@ printk("[tlbmm<%d>]", mm->context); #endif __save_and_cli(flags); - get_new_mmu_context(mm, asid_cache); + get_new_cpu_mmu_context(mm, smp_processor_id()); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); __restore_flags(flags); } } -void flush_tlb_range(struct mm_struct *mm, unsigned long start, +void local_flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) { if(mm->context != 0) { @@ -509,7 +509,7 @@ } set_entryhi(oldpid); } else { - get_new_mmu_context(mm, asid_cache); + get_new_cpu_mmu_context(mm, smp_processor_id()); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); } @@ -517,7 +517,7 @@ } } -void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) +void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) { if (vma->vm_mm->context != 0) { unsigned long flags; @@ -673,7 +673,7 @@ set_entryhi(old_ctx); BARRIER; set_pagemask (old_pagemask); - flush_tlb_all(); + local_flush_tlb_all(); __restore_flags(flags); } @@ -963,5 +963,5 @@ * be set for 4kb pages. */ write_32bit_cp0_register(CP0_PAGEMASK, PM_4K); - flush_tlb_all(); + local_flush_tlb_all(); } Index: r2300.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/r2300.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- r2300.c 2001/10/08 16:29:33 1.4 +++ r2300.c 2001/10/09 21:54:13 1.5 @@ -370,7 +370,7 @@ } /* TLB operations. */ -void flush_tlb_all(void) +void local_flush_tlb_all(void) { unsigned long flags; unsigned long old_ctx; @@ -392,7 +392,7 @@ restore_flags(flags); } -void flush_tlb_mm(struct mm_struct *mm) +void local_flush_tlb_mm(struct mm_struct *mm) { if (mm->context != 0) { unsigned long flags; @@ -401,14 +401,14 @@ printk("[tlbmm<%lu>]", (unsigned long) mm->context); #endif save_and_cli(flags); - get_new_mmu_context(mm, asid_cache); + get_new_cpu_mmu_context(mm, smp_processor_id()); if (mm == current->active_mm) set_entryhi(mm->context & 0xfc0); restore_flags(flags); } } -void flush_tlb_range(struct mm_struct *mm, unsigned long start, +void local_flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) { if (mm->context != 0) { @@ -443,7 +443,7 @@ } set_entryhi(oldpid); } else { - get_new_mmu_context(mm, asid_cache); + get_new_cpu_mmu_context(mm, smp_processor_id()); if (mm == current->active_mm) set_entryhi(mm->context & 0xfc0); } @@ -451,7 +451,7 @@ } } -void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) +void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) { if(vma->vm_mm->context != 0) { unsigned long flags; @@ -610,7 +610,7 @@ wired++; tlb_write_indexed(); set_entryhi(old_ctx); - flush_tlb_all(); + local_flush_tlb_all(); restore_flags(flags); } } @@ -723,5 +723,5 @@ printk("Primary data cache %dkb, linesize %d bytes\n", (int) (dcache_size >> 10), (int) dcache_lsize); - flush_tlb_all(); + local_flush_tlb_all(); } Index: r4xx0.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/r4xx0.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- r4xx0.c 2001/10/08 16:29:33 1.7 +++ r4xx0.c 2001/10/09 21:54:13 1.8 @@ -1282,7 +1282,7 @@ #undef DEBUG_TLB #undef DEBUG_TLBUPDATE -void flush_tlb_all(void) +void local_flush_tlb_all(void) { unsigned long flags; unsigned long old_ctx; @@ -1315,7 +1315,7 @@ __restore_flags(flags); } -void flush_tlb_mm(struct mm_struct *mm) +void local_flush_tlb_mm(struct mm_struct *mm) { if (mm->context != 0) { unsigned long flags; @@ -1324,14 +1324,14 @@ printk("[tlbmm<%d>]", mm->context); #endif __save_and_cli(flags); - get_new_mmu_context(mm, asid_cache); + get_new_cpu_mmu_context(mm, smp_processor_id()); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); __restore_flags(flags); } } -void flush_tlb_range(struct mm_struct *mm, unsigned long start, +void local_flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) { if(mm->context != 0) { @@ -1372,7 +1372,7 @@ } set_entryhi(oldpid); } else { - get_new_mmu_context(mm, asid_cache); + get_new_cpu_mmu_context(mm, smp_processor_id()); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); } @@ -1380,7 +1380,7 @@ } } -void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) +void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) { if (vma->vm_mm->context != 0) { unsigned long flags; @@ -1566,7 +1566,7 @@ set_entryhi(old_ctx); BARRIER; set_pagemask (old_pagemask); - flush_tlb_all(); + local_flush_tlb_all(); __restore_flags(flags); } @@ -1880,5 +1880,5 @@ * be set for 4kb pages. */ set_pagemask(PM_4K); - flush_tlb_all(); + local_flush_tlb_all(); } Index: r5432.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/r5432.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- r5432.c 2001/10/08 16:29:33 1.3 +++ r5432.c 2001/10/09 21:54:13 1.4 @@ -448,7 +448,7 @@ #define NTLB_ENTRIES_HALF 24 /* Fixed on all R4XX0 variants... */ -void flush_tlb_all(void) +void local_flush_tlb_all(void) { unsigned long old_ctx; int entry; @@ -481,7 +481,7 @@ __restore_flags(flags); } -void flush_tlb_mm(struct mm_struct *mm) +void local_flush_tlb_mm(struct mm_struct *mm) { if (mm->context != 0) { unsigned long flags; @@ -490,15 +490,15 @@ printk("[tlbmm<%d>]", mm->context); #endif __save_and_cli(flags); - get_new_mmu_context(mm, asid_cache); + get_new_cpu_mmu_context(mm, smp_processor_id()); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); __restore_flags(flags); } } -void flush_tlb_range(struct mm_struct *mm, unsigned long start, - unsigned long end) +void local_flush_tlb_range(struct mm_struct *mm, unsigned long start, + unsigned long end) { if(mm->context != 0) { unsigned long flags; @@ -538,7 +538,7 @@ } set_entryhi(oldpid); } else { - get_new_mmu_context(mm, asid_cache); + get_new_cpu_mmu_context(mm, smp_processor_id()); if (mm == current->active_mm) set_entryhi(mm->context & 0xff); } @@ -546,7 +546,7 @@ } } -void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) +void local_flush_tlb_page(struct vm_area_struct *vma, unsigned long page) { if (vma->vm_mm->context != 0) { unsigned long flags; @@ -702,7 +702,7 @@ set_entryhi(old_ctx); BARRIER; set_pagemask (old_pagemask); - flush_tlb_all(); + local_flush_tlb_all(); __restore_flags(flags); } @@ -764,5 +764,5 @@ * be set for 4kb pages. */ write_32bit_cp0_register(CP0_PAGEMASK, PM_4K); - flush_tlb_all(); + local_flush_tlb_all(); } |
From: James S. <jsi...@us...> - 2001-10-09 21:54:54
|
Update of /cvsroot/linux-mips/linux/drivers/pci In directory usw-pr-cvs1:/tmp/cvs-serv17388/drivers/pci Modified Files: pci.ids Log Message: Consolidate TLB context switching code. This also fixes a bunch very obscure bugs in the 32-bit code which probably didn't bite anybody yet. Index: pci.ids =================================================================== RCS file: /cvsroot/linux-mips/linux/drivers/pci/pci.ids,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- pci.ids 2001/09/25 03:36:35 1.3 +++ pci.ids 2001/10/09 21:54:21 1.4 @@ -723,6 +723,8 @@ 0074 56k Voice Modem 1033 8014 RCV56ACF 56k Voice Modem 009b Vrc5476 + 00a5 BCU + 00a6 AC97 Audio Controller 1034 Framatome Connectors USA Inc. 1035 Comp. & Comm. Research Lab 1036 Future Domain Corp. |
From: James S. <jsi...@us...> - 2001-10-09 21:54:54
|
Update of /cvsroot/linux-mips/linux/arch/mips/vr4122/eagle In directory usw-pr-cvs1:/tmp/cvs-serv17388/arch/mips/vr4122/eagle Modified Files: pci.c Log Message: Consolidate TLB context switching code. This also fixes a bunch very obscure bugs in the 32-bit code which probably didn't bite anybody yet. Index: pci.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/vr4122/eagle/pci.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- pci.c 2001/10/08 18:06:07 1.2 +++ pci.c 2001/10/09 21:54:21 1.3 @@ -210,7 +210,6 @@ /* assume it's a generic PCI interrupt */ dev->irq = VR4122_IRQ_PCI; -#if 0 /* if it's wired differently, correct the assumption */ switch (dev->vendor) { case PCI_VENDOR_ID_NEC: @@ -228,7 +227,6 @@ dev->irq = VR4122_IRQ_MQ200; break; } -#endif } static void __init pcibios_fixup_irqs(void) |
From: James S. <jsi...@us...> - 2001-10-09 21:54:49
|
Update of /cvsroot/linux-mips/linux/include/asm-mips64 In directory usw-pr-cvs1:/tmp/cvs-serv17388/include/asm-mips64 Added Files: mmu_context.h processor.h smp.h Log Message: Consolidate TLB context switching code. This also fixes a bunch very obscure bugs in the 32-bit code which probably didn't bite anybody yet. --- NEW FILE: mmu_context.h --- /* * Switch a MMU context. * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. * * Copyright (C) 1996, 1997, 1998, 1999 by Ralf Baechle * Copyright (C) 1999 Silicon Graphics, Inc. */ #ifndef _ASM_MMU_CONTEXT_H #define _ASM_MMU_CONTEXT_H #include <linux/config.h> #include <linux/slab.h> #include <asm/pgalloc.h> /* * For the fast tlb miss handlers, we currently keep a per cpu array * of pointers to the current pgd for each processor. Also, the proc. * id is stuffed into the context register. This should be changed to * use the processor id via current->processor, where current is stored * in watchhi/lo. The context register should be used to contiguously * map the page tables. */ #define TLBMISS_HANDLER_SETUP_PGD(pgd) \ pgd_current[smp_processor_id()] = (unsigned long)(pgd) #define TLBMISS_HANDLER_SETUP() \ set_context((unsigned long) smp_processor_id() << (23 + 3)); \ TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) extern unsigned long pgd_current[]; #ifndef CONFIG_SMP #define CPU_CONTEXT(cpu, mm) (mm)->context #else #define CPU_CONTEXT(cpu, mm) (*((unsigned long *)((mm)->context) + cpu)) #endif #define ASID_CACHE(cpu) cpu_data[cpu].asid_cache #define ASID_INC 0x1 #define ASID_MASK 0xff static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) { } /* * All unused by hardware upper bits will be considered * as a software asid extension. */ #define ASID_VERSION_MASK ((unsigned long)~(ASID_MASK|(ASID_MASK-1))) #define ASID_FIRST_VERSION ((unsigned long)(~ASID_VERSION_MASK) + 1) extern inline void get_new_cpu_mmu_context(struct mm_struct *mm, unsigned long cpu) { unsigned long asid = ASID_CACHE(cpu); if (! ((asid += ASID_INC) & ASID_MASK) ) { local_flush_tlb_all(); /* start new asid cycle */ if (!asid) /* fix version if needed */ asid = ASID_FIRST_VERSION; } CPU_CONTEXT(cpu, mm) = ASID_CACHE(cpu) = asid; } /* * Initialize the context related info for a new mm_struct * instance. */ extern inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) { #ifndef CONFIG_SMP mm->context = 0; #else mm->context = (unsigned long)kmalloc(smp_num_cpus * sizeof(unsigned long), GFP_KERNEL); /* * Init the "context" values so that a tlbpid allocation * happens on the first switch. */ if (mm->context == 0) return -ENOMEM; memset((void *)mm->context, 0, smp_num_cpus * sizeof(unsigned long)); #endif return 0; } extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk, unsigned cpu) { /* Check if our ASID is of an older version and thus invalid */ if ((CPU_CONTEXT(cpu, next) ^ ASID_CACHE(cpu)) & ASID_VERSION_MASK) get_new_cpu_mmu_context(next, cpu); set_entryhi(CPU_CONTEXT(cpu, next)); TLBMISS_HANDLER_SETUP_PGD(next->pgd); } /* * Destroy context related info for an mm_struct that is about * to be put to rest. */ extern inline void destroy_context(struct mm_struct *mm) { #ifdef CONFIG_SMP if (mm->context) kfree((void *)mm->context); #endif } /* * After we have set current->mm to a new value, this activates * the context for the new mm so we see the new mappings. */ extern inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { /* Unconditionally get a new ASID. */ get_new_cpu_mmu_context(next, smp_processor_id()); set_entryhi(CPU_CONTEXT(smp_processor_id(), next)); TLBMISS_HANDLER_SETUP_PGD(next->pgd); } #endif /* _ASM_MMU_CONTEXT_H */ |
From: James S. <jsi...@us...> - 2001-10-09 21:38:01
|
Update of /cvsroot/linux-mips/linux/arch/mips/kernel In directory usw-pr-cvs1:/tmp/cvs-serv11842 Modified Files: head.S r2300_misc.S r4k_misc.S setup.c traps.c Added Files: smp.c Log Message: Consolidate TLB context switching code. This also fixes a bunch very obscure bugs in the 32-bit code which probably didn't bite anybody yet. Index: head.S =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/head.S,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- head.S 2001/08/22 05:31:27 1.6 +++ head.S 2001/10/09 21:37:55 1.7 @@ -61,13 +61,13 @@ .set mips3 #ifdef CONFIG_SMP mfc0 k1, CP0_CONTEXT - la k0, current_pgd + la k0, pgd_current srl k1, 23 sll k1, 2 addu k1, k0, k1 lw k1, (k1) #else - lw k1, current_pgd # get pgd pointer + lw k1, pgd_current # get pgd pointer #endif mfc0 k0, CP0_BADVADDR # Get faulting address srl k0, k0, 22 # get pgd only bits @@ -123,7 +123,7 @@ .set mips3 mfc0 k0, CP0_BADVADDR srl k0, k0, 22 - lw k1, current_pgd # get pgd pointer + lw k1, pgd_current # get pgd pointer sll k0, k0, 2 addu k1, k1, k0 mfc0 k0, CP0_CONTEXT @@ -159,7 +159,7 @@ .set mips3 mfc0 k0, CP0_BADVADDR # Get faulting address srl k0, k0, 22 # get pgd only bits - lw k1, current_pgd # get pgd pointer + lw k1, pgd_current # get pgd pointer sll k0, k0, 2 addu k1, k1, k0 # add in pgd offset lw k1, (k1) @@ -185,7 +185,7 @@ .set mips3 mfc0 k0, CP0_BADVADDR srl k0, k0, 22 - lw k1, current_pgd # get pgd pointer + lw k1, pgd_current # get pgd pointer sll k0, k0, 2 addu k1, k1, k0 mfc0 k0, CP0_CONTEXT @@ -215,7 +215,7 @@ .set mips3 mfc0 k0, CP0_BADVADDR srl k0, k0, 22 - lw k1, current_pgd # get pgd pointer + lw k1, pgd_current # get pgd pointer sll k0, k0, 2 addu k1, k1, k0 mfc0 k0, CP0_CONTEXT @@ -245,7 +245,7 @@ .set mips3 mfc0 k0, CP0_BADVADDR srl k0, k0, 22 - lw k1, current_pgd # get pgd pointer + lw k1, pgd_current # get pgd pointer sll k0, k0, 2 addu k1, k1, k0 mfc0 k0, CP0_CONTEXT @@ -274,7 +274,7 @@ .set mips3 mfc0 k0, CP0_BADVADDR srl k0, k0, 22 - lw k1, current_pgd # get pgd pointer + lw k1, pgd_current # get pgd pointer sll k0, k0, 2 addu k1, k1, k0 mfc0 k0, CP0_CONTEXT @@ -306,7 +306,7 @@ .set noat .set mips1 mfc0 k0, CP0_BADVADDR - lw k1, current_pgd # get pgd pointer + lw k1, pgd_current # get pgd pointer srl k0, k0, 22 sll k0, k0, 2 addu k1, k1, k0 @@ -680,18 +680,9 @@ __saved_ra: PTR 0 #endif -#ifndef CONFIG_SMP -EXPORT(kernelsp) - PTR 0 -EXPORT(current_pgd) - PTR 0 -#else - /* There's almost certainly a better way to do this with the macros...*/ - .globl kernelsp - .comm kernelsp, NR_CPUS * 8, 8 - .globl current_pgd - .comm current_pgd, NR_CPUS * 8, 8 -#endif + .comm kernelsp, NR_CPUS * 8, 8 + .comm pgd_current, NR_CPUS * 8, 8 + .text .org 0x1000 EXPORT(swapper_pg_dir) Index: r2300_misc.S =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/r2300_misc.S,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- r2300_misc.S 2001/09/06 16:12:01 1.1 +++ r2300_misc.S 2001/10/09 21:37:55 1.2 @@ -39,7 +39,7 @@ */ #define LOAD_PTE(pte, ptr) \ mfc0 pte, CP0_BADVADDR; \ - lw ptr, current_pgd; \ + lw ptr, pgd_current; \ srl pte, pte, 22; \ sll pte, pte, 2; \ addu ptr, ptr, pte; \ Index: r4k_misc.S =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/r4k_misc.S,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- r4k_misc.S 2001/09/06 16:12:59 1.4 +++ r4k_misc.S 2001/10/09 21:37:55 1.5 @@ -38,14 +38,14 @@ #ifdef CONFIG_SMP #define GET_PGD(scratch, ptr) \ mfc0 ptr, CP0_CONTEXT; \ - la scratch, current_pgd;\ + la scratch, pgd_current;\ srl ptr, 23; \ sll ptr, 2; \ addu ptr, scratch, ptr; \ lw ptr, (ptr); #else #define GET_PGD(scratch, ptr) \ - lw ptr, current_pgd; + lw ptr, pgd_current; #endif Index: setup.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/setup.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- setup.c 2001/10/02 18:35:48 1.17 +++ setup.c 2001/10/09 21:37:55 1.18 @@ -41,8 +41,9 @@ #include <asm/sgialib.h> #endif - -struct mips_cpuinfo boot_cpu_data = { 0, NULL, NULL, 0 }; +#ifndef CONFIG_SMP +struct cpuinfo_mips cpu_data[1]; +#endif /* * Not all of the MIPS CPUs have the "wait" instruction available. Moreover, Index: traps.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/traps.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- traps.c 2001/09/27 17:27:49 1.18 +++ traps.c 2001/10/09 21:37:55 1.19 @@ -917,7 +917,7 @@ case CPU_R6000A: save_fp_context = _save_fp_context; restore_fp_context = _restore_fp_context; - + /* * The R6000 is the only R-series CPU that features a machine * check exception (similar to the R4000 cache error) and @@ -956,6 +956,8 @@ atomic_inc(&init_mm.mm_count); /* XXX UP? */ current->active_mm = &init_mm; - write_32bit_cp0_register(CP0_CONTEXT, smp_processor_id()<<23); - current_pgd[0] = init_mm.pgd; + + /* XXX Must be done for all CPUs */ + current_cpu_data.asid_cache = ASID_FIRST_VERSION; + TLBMISS_HANDLER_SETUP(); } |
From: Jun S. <ju...@us...> - 2001-10-08 21:50:46
|
Update of /cvsroot/linux-mips/linux/arch/mips/vr4122/common In directory usw-pr-cvs1:/tmp/cvs-serv6614 Modified Files: Makefile Added Files: int-handler.S Log Message: This check in at least makes Linux build for Eagle board. --- NEW FILE: int-handler.S --- /* * BRIEF MODULE DESCRIPTION * Interrupt dispatcher for NEC Vr4122 CPU core. * * Copyright 2001 MontaVista Software Inc. * Author Yoichi Yuasa * yy...@mv... or so...@mv... * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ #include <asm/asm.h> #include <asm/regdef.h> #include <asm/mipsregs.h> #include <asm/stackframe.h> .text .set noreorder .align 5 NESTED(vr4122_handle_int, PT_SIZE, ra) .set noat SAVE_ALL CLI .set at .set noreorder /* * Get the pending interrupts */ mfc0 t0, CP0_CAUSE mfc0 t1, CP0_STATUS andi t0, 0xff00 and t0, t0, t1 andi t1, t0, CAUSEF_IP7 # timer interrupt beqz t1, 1f li a0, 7 jal ll_timer_interrupt move a1, sp j ret_from_irq 1: andi t1, t0, 0x7800 # check for IP3-6 beqz t1, 2f andi t1, t0, CAUSEF_IP3 # check for IP3 bnez t1, handle_it li a0, 3 andi t1, t0, CAUSEF_IP4 # check for IP4 bnez t1, handle_it li a0, 4 andi t1, t0, CAUSEF_IP5 # check for IP5 bnez t1, handle_it li a0, 5 andi t1, t0, CAUSEF_IP6 # check for IP6 bnez t1, handle_it li a0, 6 2: andi t1, t0, CAUSEF_IP2 # check for IP2 beqz t1, 3f move a0, sp jal int0_icu_irqdispatch nop j ret_from_irq nop 3: andi t1, t0, CAUSEF_IP0 # check for IP0 bnez t1, handle_it li a0, 0 andi t1, t0, CAUSEF_IP1 # check for IP1 bnez t1, handle_it li a0, 1 j spurious_interrupt nop handle_it: jal do_IRQ move a1, sp j ret_from_irq END(vr4122_handle_int) Index: Makefile =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/vr4122/common/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 2001/10/08 16:51:28 1.2 +++ Makefile 2001/10/08 21:50:42 1.3 @@ -25,6 +25,4 @@ obj-$(CONFIG_PCI) += pci.o obj-$(CONFIG_REMOTE_DEBUG) += dbg_io.o -int-handler.o: int-handler.S - include $(TOPDIR)/Rules.make |
From: James S. <jsi...@us...> - 2001-10-08 21:08:07
|
Update of /cvsroot/linux-mips/linux/arch/mips/ddb5xxx/ddb5477 In directory usw-pr-cvs1:/tmp/cvs-serv29235 Modified Files: debug.c Log Message: Get DDB5477 compile again. Index: debug.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/ddb5xxx/ddb5477/debug.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- debug.c 2001/08/03 21:26:26 1.2 +++ debug.c 2001/10/08 21:08:05 1.3 @@ -64,9 +64,9 @@ static Register pdar_regs[] = { {"DDB_SDRAM0", DDB_BASE + DDB_SDRAM0}, {"DDB_SDRAM1", DDB_BASE + DDB_SDRAM1}, - {"DDB_LDCS0", DDB_BASE + DDB_LDCS0}, - {"DDB_LDCS1", DDB_BASE + DDB_LDCS1}, - {"DDB_LDCS2", DDB_BASE + DDB_LDCS2}, + {"DDB_LCS0", DDB_BASE + DDB_LCS0}, + {"DDB_LCS1", DDB_BASE + DDB_LCS1}, + {"DDB_LCS2", DDB_BASE + DDB_LCS2}, {"DDB_INTCS", DDB_BASE + DDB_INTCS}, {"DDB_BOOTCS", DDB_BASE + DDB_BOOTCS}, {"DDB_PCIW0", DDB_BASE + DDB_PCIW0}, |
From: James S. <jsi...@us...> - 2001-10-08 18:06:10
|
Update of /cvsroot/linux-mips/linux/arch/mips/vr4122/eagle In directory usw-pr-cvs1:/tmp/cvs-serv30706/vr4122/eagle Modified Files: irq.c pci.c Log Message: Osprey fixs that where posted. Thank you. Index: irq.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/vr4122/eagle/irq.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- irq.c 2001/09/22 04:27:15 1.1 +++ irq.c 2001/10/08 18:06:07 1.2 @@ -55,7 +55,7 @@ spin_lock_irqsave(&vr4122_icu_lock, flags); status = read_32bit_cp0_register(CP0_STATUS); status |= (1UL << (irq + 8)); - set_cp0_status(ST0_IM, status); + set_cp0_status(status); spin_unlock_irqrestore(&vr4122_icu_lock, flags); } @@ -66,7 +66,7 @@ spin_lock_irqsave(&vr4122_icu_lock, flags); status = read_32bit_cp0_register(CP0_STATUS); status &= ~(1UL << (irq + 8)); - set_cp0_status(ST0_IM, status); + set_cp0_status(status); spin_unlock_irqrestore(&vr4122_icu_lock, flags); } Index: pci.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips/vr4122/eagle/pci.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- pci.c 2001/09/22 04:27:15 1.1 +++ pci.c 2001/10/08 18:06:07 1.2 @@ -210,6 +210,7 @@ /* assume it's a generic PCI interrupt */ dev->irq = VR4122_IRQ_PCI; +#if 0 /* if it's wired differently, correct the assumption */ switch (dev->vendor) { case PCI_VENDOR_ID_NEC: @@ -227,6 +228,7 @@ dev->irq = VR4122_IRQ_MQ200; break; } +#endif } static void __init pcibios_fixup_irqs(void) @@ -243,6 +245,11 @@ void __init pcibios_fixup_bus(struct pci_bus *b) { +} + +unsigned __init int pcibios_assign_all_busses(void) +{ + return 1; } void pcibios_update_resource(struct pci_dev *dev, struct resource *root, |