Commit 07e15ef7 authored by Linus Torvalds's avatar Linus Torvalds

Linux 2.1.80

This release should fix a few networking problems, and the NFS client is
hopefully fairly stable even under the kinds of loads we have here at
Transmeta.

The 2.1.80 release also contains some initial ARM support, and contains
Ingo Molnar's better SMP interrupt handling.

NOTE NOTE NOTE! The new SMP interrupt handling is currently not very good
at autodetection. This can be a real problem, and _before_ booting the
2.1.80 kernel as compiled for SMP you should probably try to figure out a
possible IRQ override line by doing:

        echo -n pirq=; echo `scanpci -f | grep T_L | cut -c56-` | sed 's/ /,/g'
which for me gives
        pirq=0x00,0x09,0x0b

Then, after doing the above, boot into 2.1.80 and see if it finds your PCI
interrupt lines correctly. If it does, everything is fine. If it doesn't,
you need to boot with the pirq setting that you determined earlier, by
giving the kernel the pirq data at the bootup command line or by using the
LILO "append=" feature (or similar features in other bootloaders).
We'll certainly have to make the autodetection work reliably, but in the
meantime the command-line approach at least gives us a way to test the
more fundamental impacts of better interrupt handling.

                Linus
parent 4bbfc32d
......@@ -1335,11 +1335,12 @@ S: Malvern, Pennsylvania 19355
S: USA
N: Stefan Reinauer
E: stepan@home.culture.mipt.ru
W: http://home.culture.mipt.ru/~stepan
D: Modularized affs and ufs. Minor fixes.
S: Rebmannsweg 34h
S: 79539 Loerrach
E: stepan@linux.de
W: http://www.freiburg.linux.de/~stepan/
D: Modularization of some filesystems
D: /proc/sound, minor fixes
S: Schlossbergring 9
S: 79098 Freiburg
S: Germany
N: Joerg Reuter
......
ARM Linux 2.1.78
================
** The ARM support contained within is NOT complete - it will not build. **
** If you want to build it, then please obtain a full copy of the ARM **
** patches from ftp://ftp.arm.uk.linux.org/pub/armlinux/kernel-sources/v2.1 **
Since this is a development kernel, it will not be as stable as the 2.0
series, and can cause very nasty problems (eg, trashing your hard disk).
When running one of these kernels, I advise you to back up the complete
contents of all your hard disks.
Contributors
------------
Here is a list of people actively working on the project (If you
wish to be added to the list, please email me):
Name: Russell King
Mail: linux@arm.uk.linux.org
Desc: Original developer of ARM Linux, project co-ordinator.
Name: Dave Gilbert
Mail: linux@treblig.org
Desc: A3/4/5xx floppy and hard disk code maintainer.
Name: Philip Blundell
Mail: Philip.Blundell@pobox.com
Desc: Architecture and processor selection during make config.
Todo list
---------
This is the list of changes to be done (roughly prioritorised):
* fully test new A5000 & older MEMC translation code
* fully test new AcornSCSI driver.
* reply to email ;)
Bugs
----
Fixed bugs in this version 2.1.76:
Modules believed to be buggy (please report your successes/failures):
* AcornSCSI believed to occasionally corrupt hard drives.
* All NCR5380-based SCSI devices [Cumana I, Oak, EcoSCSI] are slow,
and may not allow write access.
* A5000 and older machine kernel builds may not be as stable as they were.
Notes
=====
Compilation of kernel
---------------------
In order to compile ARM Linux, you will need a compiler capable of
generating ARM ELF code with GNU extensions. GCC-2.7.2.2 is good.
To build ARM Linux natively, you shouldn't have to alter the ARCH = line in
the top level Makefile. However, if you don't have the ARM Linux ELF tools
installed as default, then you should change the CROSS_COMPILE line as
detailed below.
If you wish to cross-compile, then alter the following lines in the top
level make file:
ARCH = <whatever>
with
ARCH = arm
and
CROSS_COMPILE=
to
CROSS_COMPILE=<your-path-to-your-compiler-without-gcc>
eg.
CROSS_COMPILE=/usr/src/bin/arm/arm-linuxelf-
Do a 'make config', followed by 'make dep', and finally 'make all' to
build the kernel (vmlinux). A compressed image can be built by doing
a 'make zImage' instead of 'make all'.
Bug reports etc
---------------
Please send patches, bug reports and code for the ARM Linux project
to linux@arm.uk.linux.org. Patches will not be included into future
kernels unless they come to me (or the relevant person concerned).
When sending bug reports, please ensure that they contain all relevent
information, eg. the kernel messages that were printed before/during
the problem, what you were doing, etc.
For patches, please include some explaination as to what the patch does
and why (if relevent).
Modules
-------
Although modularisation is supported (and required for the FP emulator),
each module on an arm2/arm250/arm3 machine when is loaded will take
memory up to the next 32k boundary due to the size of the pages. Hence is
modularisation on these machines really worth it?
However, arm6 and up machines allow modules to take multiples of 4k, and
as such Acorn RiscPCs and other architectures using these processors can
make good use of modularisation.
ADFS Image files
----------------
You can access image files on your ADFS partitions by mounting the ADFS
partition, and then using the loopback device driver. You must have
losetup installed.
Please note that the PCEmulator DOS partitions have a partition table at
the start, and as such, you will have to give '-o offset' to losetup.
Kernel initialisation abort codes
---------------------------------
When the kernel is unable to boot, it will if possible display a colour
at the top of the screen. The colours have the following significance
when run in a 16 colour mode with the default palette:
Stripes of White,Red,Yellow,Green:
Kernel does not support the processor architecture detected.
Request to developers
---------------------
When writing device drivers which include a separate assember file, please
include it in with the C file, and not the arch/arm/lib directory. This
allows the driver to be compiled as a loadable module without requiring
half the code to be needlessly compiled into the kernel image.
In general, try to avoid using assembler unless it is really necessary. It
makes drivers far less easy to port to other hardware.
ST506 hard drives
-----------------
The ST506 hard drive controllers seem to be working fine (if a little
slowly). At the moment they will only work off the controllers on an
A4x0's motherboard, but for it to work off a Podule just requires
someone with a podule to add the addresses for the IRQ mask and the
HDC base to the source.
As of 31/3/96 it works with two drives (you should get the ADFS
*configure harddrive set to 2). I've got an internal 20MB and a great
big external 5.25" FH 64MB drive (who could ever want more :-) ).
I've just got 240K/s off it (a dd with bs=128k); thats about half of what
RiscOS gets; but its a heck of a lot better than the 50K/s I was getting
last week :-)
Known bug: Drive data errors can cause a hang; including cases where
the controller has fixed the error using ECC. (Possibly ONLY
in that case...hmm).
1772 Floppy
-----------
This also seems to work OK, but hasn't been stressed much lately. It
hasn't got any code for disc change detection in there at the moment which
could be a bit of a problem! Suggestions on the correct way to do this
are welcome.
#
# arch/arm/Makefile
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
#
# 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) 1995, 1996 by Russell King
ifeq ($(CONFIG_CPU_ARM2),y)
PROCESSOR = armo
ASFLAGS_PROC += -m2
ifeq ($(CONFIG_BINUTILS_NEW),y)
CFLAGS_PROC += -mcpu=arm2
ASFLAGS_PROC += -m2
else
CFLAGS_PROC += -m2
ASFLAGS_PROC += -m2
endif
endif
ifeq ($(CONFIG_CPU_ARM3),y)
PROCESSOR = armo
ifeq ($(CONFIG_BINUTILS_NEW),y)
CFLAGS_PROC += -mcpu=arm3
ASFLAGS_PROC += -m3
else
CFLAGS_PROC += -m3
ASFLAGS_PROC += -m3
endif
endif
ifeq ($(CONFIG_CPU_ARM6),y)
PROCESSOR = armv
ifeq ($(CONFIG_BINUTILS_NEW),y)
CFLAGS_PROC += -mcpu=arm6
ASFLAGS_PROC += -m6
else
CFLAGS_PROC += -m6
ASFLAGS_PROC += -m6
endif
endif
ifeq ($(CONFIG_CPU_SA110),y)
PROCESSOR = armv
ifeq ($(CONFIG_BINUTILS_NEW),y)
CFLAGS_PROC += -mcpu=strongarm110
ASFLAGS_PROC += -m6
else
CFLAGS_PROC += -m6
ASFLAGS_PROC += -m6
endif
endif
# Processor Architecture
# CFLAGS_PROC - processor dependent CFLAGS
# PROCESSOR - processor type
# TEXTADDR - Uncompressed kernel link text address
# ZTEXTADDR - Compressed kernel link text address
# ZRELADDR - Compressed kernel relocating address (point at which uncompressed kernel is loaded).
#
HEAD := arch/arm/kernel/head-$(PROCESSOR).o arch/arm/kernel/init_task.o
COMPRESSED_HEAD = head.o
ifeq ($(PROCESSOR),armo)
ifeq ($(CONFIG_BINUTILS_NEW),y)
CFLAGS_PROC += -mapcs-26 -mshort-load-bytes
endif
TEXTADDR = 0x02080000
ZTEXTADDR = 0x01800000
ZRELADDR = 0x02080000
endif
ifeq ($(CONFIG_ARCH_A5K),y)
MACHINE = a5k
COMPRESSED_EXTRA = $(TOPDIR)/arch/arm/lib/ll_char_wr.o
endif
ifeq ($(CONFIG_ARCH_ARC),y)
MACHINE = arc
COMPRESSED_EXTRA = $(TOPDIR)/arch/arm/lib/ll_char_wr.o
endif
ifeq ($(PROCESSOR),armv)
ifeq ($(CONFIG_BINUTILS_NEW),y)
CFLAGS_PROC += -mapcs-32 -mshort-load-bytes
endif
TEXTADDR = 0xC0008000
endif
ifeq ($(CONFIG_ARCH_RPC),y)
MACHINE = rpc
COMPRESSED_EXTRA = $(TOPDIR)/arch/arm/lib/ll_char_wr.o
ZTEXTADDR = 0x10008000
ZRELADDR = 0x10008000
endif
ifeq ($(CONFIG_ARCH_EBSA110),y)
MACHINE = ebsa110
ZTEXTADDR = 0x00008000
ZRELADDR = 0x00008000
endif
ifeq ($(CONFIG_ARCH_NEXUSPCI),y)
MACHINE = nexuspci
TEXTADDR = 0xc0000000
ZTEXTADDR = 0x40200000
ZRELADDR = 0x40000000
COMPRESSED_EXTRA = $(TOPDIR)/arch/arm/lib/ll_char_wr_scc.o
COMPRESSED_HEAD = head-nexuspci.o
endif
OBJDUMP = $(CROSS_COMPILE)objdump
PERL = perl
LD = $(CROSS_COMPILE)ld -m elf_arm
CPP = $(CC) -E
OBJCOPY = $(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
ARCHCC := $(word 1,$(CC))
GCCLIB := `$(ARCHCC) $(CFLAGS_PROC) --print-libgcc-file-name`
GCCARCH := -B/usr/src/bin/arm/arm-linuxelf-
HOSTCFLAGS := $(CFLAGS:-fomit-frame-pointer=)
ifeq ($(CONFIG_FRAME_POINTER),y)
CFLAGS := $(CFLAGS:-fomit-frame-pointer=)
endif
CFLAGS := $(CFLAGS_PROC) $(CFLAGS) -pipe
ASFLAGS := $(ASFLAGS_PROC) $(ASFLAGS) -D__ASSEMBLY__
LINKFLAGS = -T $(TOPDIR)/arch/arm/vmlinux.lds -e stext -Ttext $(TEXTADDR)
ZLINKFLAGS = -Ttext $(ZTEXTADDR)
SUBDIRS := $(SUBDIRS:drivers=) arch/arm/lib arch/arm/kernel arch/arm/mm arch/arm/drivers
CORE_FILES := arch/arm/kernel/kernel.o arch/arm/mm/mm.o $(CORE_FILES)
LIBS := arch/arm/lib/lib.a $(LIBS) $(GCCLIB)
DRIVERS := arch/arm/drivers/block/block.a \
arch/arm/drivers/char/char.a \
drivers/misc/misc.a \
arch/arm/drivers/net/net.a
ifeq ($(CONFIG_SCSI),y)
DRIVERS := $(DRIVERS) arch/arm/drivers/scsi/scsi.a
endif
ifneq ($(CONFIG_CD_NO_IDESCSI)$(CONFIG_BLK_DEV_IDECD)$(CONFIG_BLK_DEV_SR),)
DRIVERS := $(DRIVERS) drivers/cdrom/cdrom.a
endif
ifeq ($(CONFIG_SOUND),y)
DRIVERS := $(DRIVERS) arch/arm/drivers/sound/sound.a
endif
symlinks::
$(RM) include/asm-arm/arch include/asm-arm/proc
(cd include/asm-arm; ln -sf arch-$(MACHINE) arch; ln -sf proc-$(PROCESSOR) proc)
mrproper::
rm -f include/asm-arm/arch include/asm-arm/proc
@$(MAKE) -C arch/$(ARCH)/drivers mrproper
arch/arm/kernel: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/arm/kernel
arch/arm/mm: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/arm/mm
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
zImage: vmlinux
@$(MAKEBOOT) zImage
zinstall: vmlinux
@$(MAKEBOOT) zinstall
Image: vmlinux
@$(MAKEBOOT) Image
install: vmlinux
@$(MAKEBOOT) install
# My testing targets (that short circuit a few dependencies)
#
zImg:; @$(MAKEBOOT) zImage
Img:; @$(MAKEBOOT) Image
i:; @$(MAKEBOOT) install
zi:; @$(MAKEBOOT) zinstall
archclean:
@$(MAKEBOOT) clean
@$(MAKE) -C arch/arm/lib clean
archdep:
@$(MAKEBOOT) dep
sed -e /^MACHINE..*=/s,= .*,= rpc,;/^PROCESSOR..*=/s,= .*,= armv, linux/arch/arm/Makefile.normal
#
# arch/arm/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) 1995, 1996 Russell King
#
SYSTEM =$(TOPDIR)/vmlinux
Image: $(CONFIGURE) $(SYSTEM)
$(OBJCOPY) $(SYSTEM) $@
zImage: $(CONFIGURE) compressed/vmlinux
$(OBJCOPY) compressed/vmlinux $@
compressed/vmlinux: $(TOPDIR)/vmlinux dep
@$(MAKE) -C compressed vmlinux
install: $(CONFIGURE) Image
sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
zinstall: $(CONFIGURE) zImage
sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
tools/build: tools/build.c
$(HOSTCC) $(HOSTCFLAGS) -o $@ $< -I$(TOPDIR)/include
clean:
rm -f Image zImage tools/build
@$(MAKE) -C compressed clean
dep:
#
# linux/arch/arm/boot/compressed/Makefile
#
# create a compressed vmlinuz image from the original vmlinux
#
# With this config, max compressed image size = 640k
# Uncompressed image size = 1.3M (text+data)
SYSTEM =$(TOPDIR)/vmlinux
HEAD =$(COMPRESSED_HEAD)
OBJS =$(HEAD) misc.o $(COMPRESSED_EXTRA)
CFLAGS =-O2 -DSTDC_HEADERS $(CFLAGS_PROC)
ARFLAGS =rc
all: vmlinux
vmlinux: piggy.o $(OBJS)
$(LD) $(ZLINKFLAGS) -o vmlinux $(OBJS) piggy.o
$(HEAD): $(HEAD:.o=.S)
$(CC) -traditional -DLOADADDR=$(ZRELADDR) -c $(HEAD:.o=.S)
piggy.o: $(SYSTEM)
tmppiggy=_tmp_$$$$piggy; \
rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk; \
$(OBJCOPY) $(SYSTEM) $$tmppiggy; \
gzip -f -9 < $$tmppiggy > $$tmppiggy.gz; \
echo "SECTIONS { .data : { input_len = .; LONG(input_data_end - input_data) input_data = .; *(.data) input_data_end = .; }}" > $$tmppiggy.lnk; \
$(LD) -m elf_arm -r -o piggy.o -b binary $$tmppiggy.gz -b elf32-arm -T $$tmppiggy.lnk; \
rm -f $$tmppiggy $$tmppiggy.gz $$tmppiggy.lnk;
clean:; rm -f vmlinux core
#
# linux/arch/arm/boot/compressed/Makefile
#
# create a compressed vmlinux image from the original vmlinux
#
COMPRESSED_EXTRA=../../lib/ll_char_wr.o
OBJECTS=misc-debug.o $(COMPRESSED_EXTRA)
CFLAGS=-D__KERNEL__ -O2 -DSTDC_HEADERS -DSTANDALONE_DEBUG -Wall -I../../../../include -c
test-gzip: piggy.o $(OBJECTS)
$(CC) -o $@ $(OBJECTS) piggy.o
misc-debug.o: misc.c
$(CC) $(CFLAGS) -o $@ misc.c
/*
* linux/arch/arm/boot/compressed/head-nexuspci.S
*
* Copyright (C) 1996 Philip Blundell
*/
#define ARM_CP p15
#define ARM610_REG_CONTROL cr1
#define ARM_REG_ZERO cr0
.text
start: b skip1
b go_uncompress
b go_uncompress
b go_uncompress
b go_uncompress
b go_uncompress
b go_uncompress
b go_uncompress
b go_uncompress
b go_uncompress
skip1: mov sp, #0x40000000
add sp, sp, #0x200000
mov r2, #0x20000000
mov r1, #0x1a
str r1, [r2]
MOV r0, #0x30
MCR ARM_CP, 0, r0, ARM610_REG_CONTROL, ARM_REG_ZERO
mov r2, #0x10000000
mov r1, #42
strb r1, [r2, #8]
mov r1, #48
strb r1, [r2, #8]
mov r1, #16
strb r1, [r2, #8]
mov r1, #0x93
strb r1, [r2, #0]
mov r1, #0x17
strb r1, [r2, #0]
mov r1, #0xbb
strb r1, [r2, #0x4]
mov r1, #0x78
strb r1, [r2, #0x10]
mov r1, #160
strb r1, [r2, #0x8]
mov r1, #5
strb r1, [r2, #0x8]
mov r0, #0x50
bl _ll_write_char
mov r4, #0x40000000
mov r1, #0x00200000
add r4, r4, r1
copylp:
ldr r3, [r1]
str r3, [r4, r1]
subs r1, r1, #4
bne copylp
add pc, r4, #0x28
/*
* Uncompress the kernel
*/
go_uncompress:
mov r0, #0x40000000
add r0, r0, #0x300000
bl _decompress_kernel
mov r0, #0x40000000
add r1, r0, #0x300000
mov r2, #0x100000
clp2: ldr r3, [r1, r2]
str r3, [r0, r2]
subs r2, r2, #4
bne clp2
mov r2, #0x40000000
mov r0, #0
mov r1, #3
add pc, r2, #0x20 @ call via EXEC entry
/*
* linux/arch/arm/boot/compressed/head.S
*
* Copyright (C) 1996,1997,1998 Russell King
*/
#include <linux/linkage.h>
.text
/*
* sort out different calling conventions
*/
.align
.globl _start
_start:
start: mov r0, r0
mov r0, r0
mov r0, r0
mov r0, r0
mov r0, r0
mov r0, r0
mov r0, r0
mov r0, r0
teq r0, #0
beq 2f
mov r4, #0x02000000
add r4, r4, #0x7C000
mov r3, #0x4000
sub r3, r3, #4
1: ldmia r0!, {r5 - r12}
stmia r4!, {r5 - r12}
subs r3, r3, #32
bpl 1b
2: adr r2, LC0
ldmia r2, {r2, r3, r4, r5, r6, sp}
add r2, r2, #3
add r3, r3, #3
add sp, sp, #3
bic r2, r2, #3
bic r3, r3, #3
bic sp, sp, #3
adr r7, start
sub r6, r7, r6
/*
* Relocate pointers
*/
add r2, r2, r6
add r3, r3, r6
add r5, r5, r6
add sp, sp, r6
/*
* Clear zero-init
*/
mov r6, #0
1: str r6, [r2], #4
cmp r2, r3
blt 1b
str r1, [r5] @ save architecture
/*
* Uncompress the kernel
*/
mov r1, #0x8000
add r2, r2, r1, lsl #1 @ Add 64k for malloc
sub r1, r1, #1
add r2, r2, r1
bic r5, r2, r1 @ decompress kernel to after end of the compressed
mov r0, r5
bl SYMBOL_NAME(decompress_kernel)
add r0, r0, #7
bic r2, r0, #7
/*
* Now move the kernel to the correct location (r5 -> r4, len r0)
*/
mov r0, r4 @ r0 = start of real kernel
mov r1, r5 @ r1 = start of kernel image
add r3, r5, r2 @ r3 = end of kernel
adr r4, movecode
adr r5, movecodeend
1: ldmia r4!, {r6 - r12, lr}
stmia r3!, {r6 - r12, lr}
cmp r4, r5
blt 1b
mrc p15, 0, r5, c0, c0
eor r5, r5, #0x44 << 24
eor r5, r5, #0x01 << 16
eor r5, r5, #0xa1 << 8
movs r5, r5, lsr #4
mov r5, #0
mcreq p15, 0, r5, c7, c5, 0 @ flush I cache
ldr r5, LC0 + 12 @ get architecture
ldr r5, [r5]
add pc, r1, r2 @ Call move code
/*
* r0 = length, r1 = to, r2 = from
*/
movecode: add r3, r1, r2
mov r4, r0
1: ldmia r1!, {r6 - r12, lr}
stmia r0!, {r6 - r12, lr}
cmp r1, r3
blt 1b
mrc p15, 0, r0, c0, c0
eor r0, r0, #0x44 << 24
eor r0, r0, #0x01 << 16
eor r0, r0, #0xa1 << 8
movs r0, r0, lsr #4
mov r0, #0
mcreq p15, 0, r0, c7, c5, 0 @ flush I cache
mov r1, r5 @ call kernel correctly
mov pc, r4 @ call via EXEC entry
movecodeend:
LC0: .word SYMBOL_NAME(_edata)
.word SYMBOL_NAME(_end)
.word LOADADDR
.word SYMBOL_NAME(architecture)
.word start
.word SYMBOL_NAME(user_stack)+4096
.align
.bss
SYMBOL_NAME(architecture):
.space 4
.align
/*
* misc.c
*
* This is a collection of several routines from gzip-1.0.3
* adapted for Linux.
*
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
*
* Modified for ARM Linux by Russell King
*/
#include <asm/uaccess.h>
#include <asm/arch/uncompress.h>
#include <asm/proc/uncompress.h>
#ifdef STANDALONE_DEBUG
#define puts printf
#endif
#define __ptr_t void *
/*
* Optimised C version of memzero for the ARM.
*/
extern __inline__ __ptr_t __memzero (__ptr_t s, size_t n)
{
union { void *vp; unsigned long *ulp; unsigned char *ucp; } u;
int i;
u.vp = s;
for (i = n >> 5; i > 0; i--) {
*u.ulp++ = 0;
*u.ulp++ = 0;
*u.ulp++ = 0;
*u.ulp++ = 0;
*u.ulp++ = 0;
*u.ulp++ = 0;
*u.ulp++ = 0;
*u.ulp++ = 0;
}
if (n & 1 << 4) {
*u.ulp++ = 0;
*u.ulp++ = 0;
*u.ulp++ = 0;
*u.ulp++ = 0;
}
if (n & 1 << 3) {
*u.ulp++ = 0;
*u.ulp++ = 0;
}
if (n & 1 << 2)
*u.ulp++ = 0;
if (n & 1 << 1) {
*u.ucp++ = 0;
*u.ucp++ = 0;
}
if (n & 1)
*u.ucp++ = 0;
return s;
}
#define memzero(s,n) __memzero(s,n)
extern __inline__ __ptr_t memcpy(__ptr_t __dest, __const __ptr_t __src,
size_t __n)
{
int i = 0;
unsigned char *d = (unsigned char *)__dest, *s = (unsigned char *)__src;
for (i = __n >> 3; i > 0; i--) {
*d++ = *s++;
*d++ = *s++;
*d++ = *s++;
*d++ = *s++;
*d++ = *s++;
*d++ = *s++;
*d++ = *s++;
*d++ = *s++;
}
if (__n & 1 << 2) {
*d++ = *s++;
*d++ = *s++;
*d++ = *s++;
*d++ = *s++;
}
if (__n & 1 << 1) {
*d++ = *s++;
*d++ = *s++;
}
if (__n & 1)
*d++ = *s++;
return __dest;
}
/*
* gzip delarations
*/
#define OF(args) args
#define STATIC static
typedef unsigned char uch;
typedef unsigned short ush;
typedef unsigned long ulg;
#define WSIZE 0x8000 /* Window size must be at least 32k, */
/* and a power of two */
static uch *inbuf; /* input buffer */
static uch window[WSIZE]; /* Sliding window buffer */
static unsigned insize; /* valid bytes in inbuf */
static unsigned inptr; /* index of next byte to be processed in inbuf */
static unsigned outcnt; /* bytes in output buffer */
/* gzip flag byte */
#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
#define COMMENT 0x10 /* bit 4 set: file comment present */
#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
#define RESERVED 0xC0 /* bit 6,7: reserved */
#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf())
/* Diagnostic functions */
#ifdef DEBUG
# define Assert(cond,msg) {if(!(cond)) error(msg);}
# define Trace(x) fprintf x
# define Tracev(x) {if (verbose) fprintf x ;}
# define Tracevv(x) {if (verbose>1) fprintf x ;}
# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
#else
# define Assert(cond,msg)
# define Trace(x)
# define Tracev(x)
# define Tracevv(x)
# define Tracec(c,x)
# define Tracecv(c,x)
#endif
static int fill_inbuf(void);
static void flush_window(void);
static void error(char *m);
static void gzip_mark(void **);
static void gzip_release(void **);
extern char input_data[];
extern int input_len;
static uch *output_data;
static ulg output_ptr;
static ulg bytes_out = 0;
static void *malloc(int size);
static void free(void *where);
static void error(char *m);
static void gzip_mark(void **);
static void gzip_release(void **);
static void puts(const char *);
extern int end;
static ulg free_mem_ptr;
static ulg free_mem_ptr_end;
#define HEAP_SIZE 0x2000
#include "../../../../lib/inflate.c"
#ifndef STANDALONE_DEBUG
static void *malloc(int size)
{
void *p;
if (size <0) error("Malloc error\n");
if (free_mem_ptr <= 0) error("Memory error\n");
free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */
p = (void *)free_mem_ptr;
free_mem_ptr += size;
if (free_mem_ptr >= free_mem_ptr_end)
error("Out of memory");
return p;
}
static void free(void *where)
{ /* gzip_mark & gzip_release do the free */
}
static void gzip_mark(void **ptr)
{
*ptr = (void *) free_mem_ptr;
}
static void gzip_release(void **ptr)
{
free_mem_ptr = (long) *ptr;
}
#else
static void gzip_mark(void **ptr)
{
}
static void gzip_release(void **ptr)
{
}
#endif
/* ===========================================================================
* Fill the input buffer. This is called only when the buffer is empty
* and at least one byte is really needed.
*/
int fill_inbuf()
{
if (insize != 0)
error("ran out of input data\n");
inbuf = input_data;
insize = input_len;
inptr = 1;
return inbuf[0];
}
/* ===========================================================================
* Write the output window window[0..outcnt-1] and update crc and bytes_out.
* (Used for the decompressed data only.)
*/
void flush_window()
{
ulg c = crc;
unsigned n;
uch *in, *out, ch;
in = window;
out = &output_data[output_ptr];
for (n = 0; n < outcnt; n++) {
ch = *out++ = *in++;
c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8);
}
crc = c;
bytes_out += (ulg)outcnt;
output_ptr += (ulg)outcnt;
outcnt = 0;
}
static void error(char *x)
{
int ptr;
puts("\n\n");
puts(x);
puts("\n\n -- System halted");
while(1); /* Halt */
}
#define STACK_SIZE (4096)
ulg user_stack [STACK_SIZE];
#ifndef STANDALONE_DEBUG
ulg decompress_kernel(ulg output_start)
{
free_mem_ptr = (ulg)&end;
free_mem_ptr_end = output_start;
proc_decomp_setup ();
arch_decomp_setup ();
output_data = (uch *)output_start; /* Points to kernel start */
makecrc();
puts("Uncompressing Linux...");
gunzip();
puts("done.\nNow booting the kernel\n");
return output_ptr;
}
#else
char output_buffer[1500*1024];
int main()
{
output_data = output_buffer;
makecrc();
puts("Uncompressing Linux...");
gunzip();
puts("done.\n");
return 0;
}
#endif
#!/bin/sh
#
# arch/arm/boot/install.sh
#
# 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) 1995 by Linus Torvalds
#
# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
# Adapted from code in arch/i386/boot/install.sh by Russell King
#
# "make install" script for arm architecture
#
# Arguments:
# $1 - kernel version
# $2 - kernel image file
# $3 - kernel map file
# $4 - default install path (blank if root directory)
#
# User may have a custom install script
if [ -x /sbin/installkernel ]; then
exec /sbin/installkernel "$@"
fi
if [ "$2" = "zImage" ]; then
# Compressed install
echo "Installing compressed kernel"
if [ -f $4/vmlinuz-$1 ]; then
mv $4/vmlinuz-$1 $4/vmlinuz.old
fi
if [ -f $4/System.map-$1 ]; then
mv $4/System.map-$1 $4/System.old
fi
cat $2 > $4/vmlinuz-$1
cp $3 $4/System.map-$1
else
# Normal install
echo "Installing normal kernel"
if [ -f $4/vmlinux-$1 ]; then
mv $4/vmlinux-$1 $4/vmlinux.old
fi
if [ -f $4/System.map ]; then
mv $4/System.map $4/System.old
fi
cat $2 > $4/vmlinux-$1
cp $3 $4/System.map
fi
if [ -x /sbin/loadmap ]; then
/sbin/loadmap --rdev /dev/ima
else
echo "You have to install it yourself"
fi
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <a.out.h>
typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned long u32;
void die(const char * str, ...)
{
va_list args;
va_start(args, str);
vfprintf(stderr, str, args);
fputc('\n', stderr);
exit (1);
}
int main(int argc, char **argv)
{
void *data;
struct exec ex;
FILE *f;
int totlen;
if (argc < 2) {
fprintf(stderr, "Usage: build kernel-name\n");
exit(1);
}
f = fopen(argv[1], "rb");
if (!f)
die("Unable to open `%s': %m", argv[1]);
fread(&ex, 1, sizeof(ex), f);
if(N_MAGIC(ex) == ZMAGIC) {
fseek(f, 4096, SEEK_SET);
totlen = ex.a_text + ex.a_data;
} else
if(N_MAGIC(ex) == QMAGIC) {
unsigned long my_header;
fseek(f, 4, SEEK_SET);
my_header = 0xea000006;
fwrite(&my_header, 4, 1, stdout);
totlen = ex.a_text + ex.a_data - 4;
} else {
fprintf(stderr, "Unacceptable a.out header on kernel\n");
fclose(f);
exit(1);
}
fprintf(stderr, "Kernel is %dk (%dk text, %dk data, %dk bss)\n",
(ex.a_text + ex.a_data + ex.a_bss)/1024,
ex.a_text/1024, ex.a_data/1024, ex.a_bss/1024);
data = malloc(totlen);
fread(data, 1, totlen, f);
fwrite(data, 1, totlen, stdout);
free(data);
fclose(f);
fflush(stdout);
return 0;
}
#
# For a description of the syntax of this configuration file,
# see the Configure script.
#
mainmenu_name "Linux Kernel Configuration"
define_bool CONFIG_ARM y
mainmenu_option next_comment
comment 'Code maturity level options'
bool 'Prompt for development and/or incomplete code/drivers' CONFIG_EXPERIMENTAL
endmenu
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
bool 'Kernel daemon support (e.g. autoload of modules)' CONFIG_KERNELD
fi
endmenu
mainmenu_option next_comment
comment 'General setup'
choice 'ARM system type' \
"Archimedes CONFIG_ARCH_ARC \
A5000 CONFIG_ARCH_A5K \
RiscPC CONFIG_ARCH_RPC \
EBSA-110 CONFIG_ARCH_EBSA110 \
NexusPCI CONFIG_ARCH_NEXUSPCI" RiscPC
if [ "$CONFIG_ARCH_ARC" = "y" -o "$CONFIG_ARCH_A5K" = "y" -o "$CONFIG_ARCH_RPC" = "y" ]; then
define_bool CONFIG_ARCH_ACORN y
else
define_bool CONFIG_ARCH_ACORN n
fi
if [ "$CONFIG_ARCH_NEXUSPCI" = "y" ]; then
define_bool CONFIG_PCI y
else
define_bool CONFIG_PCI n
fi
if [ "$CONFIG_ARCH_NEXUSPCI" = "y" -o "$CONFIG_ARCH_EBSA110" = "y" ]; then
define_bool CONFIG_CPU_SA110 y
else
if [ "$CONFIG_ARCH_A5K" = "y" ]; then
define_bool CONFIG_CPU_ARM3 y
else
choice 'ARM cpu type' \
"ARM2 CONFIG_CPU_ARM2 \
ARM3 CONFIG_CPU_ARM3 \
ARM6/7 CONFIG_CPU_ARM6 \
StrongARM CONFIG_CPU_SA110" StrongARM
fi
fi
bool 'Compile kernel with frame pointer (for useful debugging)' CONFIG_FRAME_POINTER
bool 'Use new compilation options (for GCC 2.8)' CONFIG_BINUTILS_NEW
bool 'Debug kernel errors' CONFIG_DEBUG_ERRORS
bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
bool 'Sysctl support' CONFIG_SYSCTL
tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
# tristate 'Kernel support for JAVA binaries' CONFIG_BINFMT_JAVA
define_bool CONFIG_BINFMT_JAVA n
fi
tristate 'Parallel port support' CONFIG_PARPORT
if [ "$CONFIG_PARPORT" != "n" ]; then
dep_tristate ' PC-style hardware' CONFIG_PARPORT_PC $CONFIG_PARPORT
fi
endmenu
source arch/arm/drivers/block/Config.in
if [ "$CONFIG_NET" = "y" ]; then
source net/Config.in
fi
mainmenu_option next_comment
comment 'SCSI support'
tristate 'SCSI support?' CONFIG_SCSI
if [ "$CONFIG_SCSI" != "n" ]; then
source arch/arm/drivers/scsi/Config.in
fi
endmenu
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Network device support'
bool 'Network device support?' CONFIG_NETDEVICES
if [ "$CONFIG_NETDEVICES" = "y" ]; then
source arch/arm/drivers/net/Config.in
fi
endmenu
fi
# mainmenu_option next_comment
# comment 'ISDN subsystem'
#
# tristate 'ISDN support' CONFIG_ISDN
# if [ "$CONFIG_ISDN" != "n" ]; then
# source drivers/isdn/Config.in
# fi
# endmenu
# Conditionally compile in the Uniform CD-ROM driver
if [ "$CONFIG_BLK_DEV_IDECD" = "y" -o "$CONFIG_BLK_DEV_SR" = "y" ]; then
define_bool CONFIG_CDROM y
else
if [ "$CONFIG_BLK_DEV_IDECD" = "m" -o "$CONFIG_BLK_DEV_SR" = "m" ]; then
define_bool CONFIG_CDROM m
else
define_bool CONFIG_CDROM n
fi
fi
source fs/Config.in
source fs/nls/Config.in
source arch/arm/drivers/char/Config.in
if [ "$CONFIG_ARCH_ACORN" = "y" ]; then
mainmenu_option next_comment
comment 'Sound'
tristate 'Sound support' CONFIG_SOUND
if [ "$CONFIG_SOUND" != "n" ]; then
source arch/arm/drivers/sound/Config.in
fi
endmenu
fi
mainmenu_option next_comment
comment 'Kernel hacking'
#bool 'Debug kmalloc/kfree' CONFIG_DEBUG_MALLOC
bool 'Kernel profiling support' CONFIG_PROFILE
if [ "$CONFIG_PROFILE" = "y" ]; then
int ' Profile shift count' CONFIG_PROFILE_SHIFT 2
fi
bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ
endmenu
#
# Automatically generated make config: don't edit
#
CONFIG_ARM=y
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KERNELD=y
#
# General setup
#
# CONFIG_ARCH_ARC is not set
# CONFIG_ARCH_A5K is not set
CONFIG_ARCH_RPC=y
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_NEXUSPCI is not set
CONFIG_ARCH_ACORN=y
# CONFIG_PCI is not set
# CONFIG_CPU_ARM2 is not set
# CONFIG_CPU_ARM3 is not set
# CONFIG_CPU_ARM6 is not set
CONFIG_CPU_SA110=y
CONFIG_FRAME_POINTER=y
# CONFIG_BINUTILS_NEW is not set
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=m
# CONFIG_BINFMT_JAVA is not set
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
#
# Floppy, IDE, and other block devices
#
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_DEV_IDE=y
#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
# CONFIG_BLK_DEV_IDESCSI is not set
# CONFIG_BLK_DEV_IDE_PCMCIA is not set
CONFIG_BLK_DEV_IDE_CARDS=y
CONFIG_BLK_DEV_IDE_ICSIDE=y
# CONFIG_BLK_DEV_IDE_RAPIDE is not set
# CONFIG_BLK_DEV_XD is not set
#
# Additional Block Devices
#
CONFIG_BLK_DEV_LOOP=m
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_PARIDE_PARPORT=y
# CONFIG_PARIDE is not set
CONFIG_BLK_DEV_PART=y
# CONFIG_BLK_DEV_HD is not set
#
# Networking options
#
CONFIG_PACKET=m
# CONFIG_NETLINK is not set
# CONFIG_FIREWALL is not set
# CONFIG_NET_ALIAS is not set
# CONFIG_FILTER is not set
CONFIG_UNIX=y
CONFIG_INET=y
# CONFIG_IP_MULTICAST is not set
# CONFIG_IP_ADVANCED_ROUTER is not set
# CONFIG_IP_PNP is not set
# CONFIG_IP_ACCT is not set
# CONFIG_IP_MASQUERADE is not set
# CONFIG_IP_ROUTER is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_ALIAS is not set
# CONFIG_SYN_COOKIES is not set
#
# (it is safe to leave these untouched)
#
# CONFIG_INET_RARP is not set
CONFIG_IP_NOSR=y
# CONFIG_SKB_LARGE is not set
# CONFIG_IPV6 is not set
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_BRIDGE is not set
# CONFIG_LLC is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_CPU_IS_SLOW is not set
# CONFIG_NET_SCHED is not set
#
# SCSI support
#
CONFIG_SCSI=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
CONFIG_BLK_DEV_SR=y
# CONFIG_BLK_DEV_SR_VENDOR is not set
# CONFIG_CHR_DEV_SG is not set
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
#
# SCSI low-level drivers
#
CONFIG_SCSI_ACORNSCSI_3=m
CONFIG_SCSI_ACORNSCSI_TAGGED_QUEUE=y
CONFIG_SCSI_ACORNSCSI_SYNC=y
CONFIG_SCSI_CUMANA_2=m
CONFIG_SCSI_POWERTECSCSI=m
#
# The following drives are not fully supported
#
CONFIG_SCSI_CUMANA_1=m
CONFIG_SCSI_ECOSCSI=m
CONFIG_SCSI_OAK1=m
CONFIG_SCSI_PPA=m
CONFIG_SCSI_PPA_HAVE_PEDANTIC=2
#
# Network device support
#
CONFIG_NETDEVICES=y
# CONFIG_DUMMY is not set
# CONFIG_EQUALIZER is not set
CONFIG_PPP=m
#
# CCP compressors for PPP are only built as modules.
#
# CONFIG_SLIP is not set
CONFIG_ETHER1=m
CONFIG_ETHER3=m
CONFIG_ETHERH=m
CONFIG_CDROM=y
#
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_MINIX_FS is not set
CONFIG_EXT2_FS=y
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
# CONFIG_UMSDOS_FS is not set
CONFIG_VFAT_FS=y
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
CONFIG_NFSD=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
# CONFIG_CODA_FS is not set
# CONFIG_SMB_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_ROMFS_FS is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_ADFS_FS=y
# CONFIG_MAC_PARTITION is not set
CONFIG_NLS=y
#
# Native Language Support
#
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_KOI8_R is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
CONFIG_ATOMWIDE_SERIAL=y
CONFIG_DUALSP_SERIAL=y
CONFIG_MOUSE=y
CONFIG_PRINTER=m
CONFIG_PRINTER_READBACK=y
# CONFIG_UMISC is not set
# CONFIG_WATCHDOG is not set
CONFIG_RPCMOUSE=y
#
# Sound
#
# CONFIG_SOUND is not set
# CONFIG_VIDC is not set
# CONFIG_AUDIO is not set
# DSP_BUFFSIZE is not set
#
# Kernel hacking
#
# CONFIG_PROFILE is not set
CONFIG_MAGIC_SYSRQ=y
#
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
# removes any old dependencies. DON'T put your own dependencies here
# unless it's something special (ie not a .c file).
HEAD_OBJ = head-$(PROCESSOR).o
ENTRY_OBJ = entry-$(PROCESSOR).o
O_TARGET := kernel.o
O_OBJS := $(ENTRY_OBJ) ioport.o irq.o process.o ptrace.o signal.o sys_arm.o time.o traps.o
all: kernel.o $(HEAD_OBJ) init_task.o
ifeq ($(CONFIG_MODULES),y)
OX_OBJS = armksyms.o
else
O_OBJS += armksyms.o
endif
ifdef CONFIG_ARCH_ACORN
O_OBJS += setup.o ecard.o iic.o dma.o
ifdef CONFIG_ARCH_ARC
O_OBJS += oldlatches.o
endif
endif
ifeq ($(MACHINE),ebsa110)
O_OBJS += setup-ebsa110.o dma.o
endif
ifeq ($(MACHINE),nexuspci)
O_OBJS += setup-ebsa110.o
endif
$(HEAD_OBJ): $(HEAD_OBJ:.o=.S)
$(CC) -D__ASSEMBLY__ -traditional -c $(HEAD_OBJ:.o=.S) -o $@
include $(TOPDIR)/Rules.make
$(ENTRY_OBJ:.o=.S): ../lib/constants.h
.PHONY: ../lib/constants.h
../lib/constants.h:
$(MAKE) -C ../lib constants.h
#include <linux/config.h>
#include <linux/module.h>
#include <linux/user.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/mman.h>
#include <asm/ecard.h>
#include <asm/io.h>
#include <asm/delay.h>
#include <asm/dma.h>
#include <asm/pgtable.h>
#include <asm/uaccess.h>
extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(struct pt_regs *, struct user_fp_struct *);
/*
* libgcc functions - functions that are used internally by the
* compiler... (prototypes are not correct though, but that
* doesn't really matter since they're not versioned).
*/
extern void __gcc_bcmp(void);
extern void __ashldi3(void);
extern void __ashrdi3(void);
extern void __cmpdi2(void);
extern void __divdi3(void);
extern void __divsi3(void);
extern void __lshrdi3(void);
extern void __moddi3(void);
extern void __modsi3(void);
extern void __muldi3(void);
extern void __negdi2(void);
extern void __ucmpdi2(void);
extern void __udivdi3(void);
extern void __udivmoddi4(void);
extern void __udivsi3(void);
extern void __umoddi3(void);
extern void __umodsi3(void);
extern void inswb(unsigned int port, void *to, int len);
extern void outswb(unsigned int port, const void *to, int len);
/*
* floating point math emulator support.
* These will not change. If they do, then a new version
* of the emulator will have to be compiled...
* fp_current is never actually dereferenced - it is just
* used as a pointer to pass back for send_sig().
*/
extern void (*fp_save)(unsigned char *);
extern void (*fp_restore)(unsigned char *);
extern void fp_setup(void);
extern void fpreturn(void);
extern void fpundefinstr(void);
extern void fp_enter(void);
extern void fp_printk(void);
extern struct task_struct *fp_current;
extern void fp_send_sig(int);
/* platform dependent support */
EXPORT_SYMBOL(dump_thread);
EXPORT_SYMBOL(dump_fpu);
EXPORT_SYMBOL(udelay);
EXPORT_SYMBOL(dma_str);
EXPORT_SYMBOL(xchg_str);
/* expansion card support */
#ifdef CONFIG_ARCH_ACORN
EXPORT_SYMBOL(ecard_startfind);
EXPORT_SYMBOL(ecard_find);
EXPORT_SYMBOL(ecard_readchunk);
EXPORT_SYMBOL(ecard_address);
#endif
/* processor dependencies */
EXPORT_SYMBOL(processor);
/* io */
EXPORT_SYMBOL(outswb);
EXPORT_SYMBOL(outsw);
EXPORT_SYMBOL(inswb);
EXPORT_SYMBOL(insw);
#ifdef CONFIG_ARCH_RPC
EXPORT_SYMBOL(drambank);
#endif
/* dma */
EXPORT_SYMBOL(enable_dma);
EXPORT_SYMBOL(set_dma_mode);
EXPORT_SYMBOL(set_dma_addr);
EXPORT_SYMBOL(set_dma_count);
EXPORT_SYMBOL(get_dma_residue);
/*
* floating point math emulator support.
* These symbols will never change their calling convention...
*/
EXPORT_SYMBOL_NOVERS(fpreturn);
EXPORT_SYMBOL_NOVERS(fpundefinstr);
EXPORT_SYMBOL_NOVERS(fp_enter);
EXPORT_SYMBOL_NOVERS(fp_save);
EXPORT_SYMBOL_NOVERS(fp_restore);
EXPORT_SYMBOL_NOVERS(fp_setup);
const char __kstrtab_fp_printk[] __attribute__((section(".kstrtab"))) = __MODULE_STRING(fp_printk);
const struct module_symbol __ksymtab_fp_printk __attribute__((section("__ksymtab"))) =
{ (unsigned long)&printk, __kstrtab_fp_printk };
const char __kstrtab_fp_send_sig[] __attribute__((section(".kstrtab"))) = __MODULE_STRING(fp_send_sig);
const struct module_symbol __ksymtab_fp_send_sig __attribute__((section("__ksymtab"))) =
{ (unsigned long)&send_sig, __kstrtab_fp_send_sig };
//EXPORT_SYMBOL_NOVERS(fp_current);
/*
* string / mem functions
*/
EXPORT_SYMBOL_NOVERS(strcpy);
EXPORT_SYMBOL_NOVERS(strncpy);
EXPORT_SYMBOL_NOVERS(strcat);
EXPORT_SYMBOL_NOVERS(strncat);
EXPORT_SYMBOL_NOVERS(strcmp);
EXPORT_SYMBOL_NOVERS(strncmp);
EXPORT_SYMBOL_NOVERS(strchr);
EXPORT_SYMBOL_NOVERS(strlen);
EXPORT_SYMBOL_NOVERS(strnlen);
EXPORT_SYMBOL_NOVERS(strspn);
EXPORT_SYMBOL_NOVERS(strpbrk);
EXPORT_SYMBOL_NOVERS(strtok);
EXPORT_SYMBOL_NOVERS(strrchr);
EXPORT_SYMBOL_NOVERS(memset);
EXPORT_SYMBOL_NOVERS(memcpy);
EXPORT_SYMBOL_NOVERS(memmove);
EXPORT_SYMBOL_NOVERS(memcmp);
EXPORT_SYMBOL_NOVERS(memscan);
EXPORT_SYMBOL_NOVERS(memzero);
/* user mem (segment) */
#if defined(CONFIG_CPU_ARM6) || defined(CONFIG_CPU_SA110)
EXPORT_SYMBOL(__arch_copy_from_user);
EXPORT_SYMBOL(__arch_copy_to_user);
EXPORT_SYMBOL(__arch_clear_user);
EXPORT_SYMBOL(__arch_strlen_user);
#elif defined(CONFIG_CPU_ARM2) || defined(CONFIG_CPU_ARM3)
EXPORT_SYMBOL(uaccess_kernel);
EXPORT_SYMBOL(uaccess_user);
#endif
/* gcc lib functions */
EXPORT_SYMBOL_NOVERS(__gcc_bcmp);
EXPORT_SYMBOL_NOVERS(__ashldi3);
EXPORT_SYMBOL_NOVERS(__ashrdi3);
EXPORT_SYMBOL_NOVERS(__cmpdi2);
EXPORT_SYMBOL_NOVERS(__divdi3);
EXPORT_SYMBOL_NOVERS(__divsi3);
EXPORT_SYMBOL_NOVERS(__lshrdi3);
EXPORT_SYMBOL_NOVERS(__moddi3);
EXPORT_SYMBOL_NOVERS(__modsi3);
EXPORT_SYMBOL_NOVERS(__muldi3);
EXPORT_SYMBOL_NOVERS(__negdi2);
EXPORT_SYMBOL_NOVERS(__ucmpdi2);
EXPORT_SYMBOL_NOVERS(__udivdi3);
EXPORT_SYMBOL_NOVERS(__udivmoddi4);
EXPORT_SYMBOL_NOVERS(__udivsi3);
EXPORT_SYMBOL_NOVERS(__umoddi3);
EXPORT_SYMBOL_NOVERS(__umodsi3);
/* bitops */
EXPORT_SYMBOL(set_bit);
EXPORT_SYMBOL(test_and_set_bit);
EXPORT_SYMBOL(clear_bit);
EXPORT_SYMBOL(test_and_clear_bit);
EXPORT_SYMBOL(change_bit);
EXPORT_SYMBOL(test_and_change_bit);
EXPORT_SYMBOL(find_first_zero_bit);
EXPORT_SYMBOL(find_next_zero_bit);
/*
* linux/arch/arm/lib/calls.h
*
* Copyright (C) 1995, 1996 Russell King
*/
#ifndef NR_SYSCALLS
#define NR_syscalls 256
#define NR_SYSCALLS 182
#else
/* 0 */ .long SYMBOL_NAME(sys_setup)
.long SYMBOL_NAME(sys_exit)
.long SYMBOL_NAME(sys_fork_wrapper)
.long SYMBOL_NAME(sys_read)
.long SYMBOL_NAME(sys_write)
/* 5 */ .long SYMBOL_NAME(sys_open)
.long SYMBOL_NAME(sys_close)
.long SYMBOL_NAME(sys_waitpid)
.long SYMBOL_NAME(sys_creat)
.long SYMBOL_NAME(sys_link)
/* 10 */ .long SYMBOL_NAME(sys_unlink)
.long SYMBOL_NAME(sys_execve_wrapper)
.long SYMBOL_NAME(sys_chdir)
.long SYMBOL_NAME(sys_time)
.long SYMBOL_NAME(sys_mknod)
/* 15 */ .long SYMBOL_NAME(sys_chmod)
.long SYMBOL_NAME(sys_chown)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_break */
.long SYMBOL_NAME(sys_stat)
.long SYMBOL_NAME(sys_lseek)
/* 20 */ .long SYMBOL_NAME(sys_getpid)
.long SYMBOL_NAME(sys_mount_wrapper)
.long SYMBOL_NAME(sys_umount)
.long SYMBOL_NAME(sys_setuid)
.long SYMBOL_NAME(sys_getuid)
/* 25 */ .long SYMBOL_NAME(sys_stime)
.long SYMBOL_NAME(sys_ptrace)
.long SYMBOL_NAME(sys_alarm)
.long SYMBOL_NAME(sys_fstat)
.long SYMBOL_NAME(sys_pause)
/* 30 */ .long SYMBOL_NAME(sys_utime)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_stty */
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_getty */
.long SYMBOL_NAME(sys_access)
.long SYMBOL_NAME(sys_nice)
/* 35 */ .long SYMBOL_NAME(sys_ni_syscall) /* was sys_ftime */
.long SYMBOL_NAME(sys_sync)
.long SYMBOL_NAME(sys_kill)
.long SYMBOL_NAME(sys_rename)
.long SYMBOL_NAME(sys_mkdir)
/* 40 */ .long SYMBOL_NAME(sys_rmdir)
.long SYMBOL_NAME(sys_dup)
.long SYMBOL_NAME(sys_pipe)
.long SYMBOL_NAME(sys_times)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_prof */
/* 45 */ .long SYMBOL_NAME(sys_brk)
.long SYMBOL_NAME(sys_setgid)
.long SYMBOL_NAME(sys_getgid)
.long SYMBOL_NAME(sys_signal)
.long SYMBOL_NAME(sys_geteuid)
/* 50 */ .long SYMBOL_NAME(sys_getegid)
.long SYMBOL_NAME(sys_acct)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_phys */
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_lock */
.long SYMBOL_NAME(sys_ioctl)
/* 55 */ .long SYMBOL_NAME(sys_fcntl)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_mpx */
.long SYMBOL_NAME(sys_setpgid)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_ulimit */
.long SYMBOL_NAME(sys_olduname)
/* 60 */ .long SYMBOL_NAME(sys_umask)
.long SYMBOL_NAME(sys_chroot)
.long SYMBOL_NAME(sys_ustat)
.long SYMBOL_NAME(sys_dup2)
.long SYMBOL_NAME(sys_getppid)
/* 65 */ .long SYMBOL_NAME(sys_getpgrp)
.long SYMBOL_NAME(sys_setsid)
.long SYMBOL_NAME(sys_sigaction)
.long SYMBOL_NAME(sys_sgetmask)
.long SYMBOL_NAME(sys_ssetmask)
/* 70 */ .long SYMBOL_NAME(sys_setreuid)
.long SYMBOL_NAME(sys_setregid)
.long SYMBOL_NAME(sys_sigsuspend_wrapper)
.long SYMBOL_NAME(sys_sigpending)
.long SYMBOL_NAME(sys_sethostname)
/* 75 */ .long SYMBOL_NAME(sys_setrlimit)
.long SYMBOL_NAME(sys_getrlimit)
.long SYMBOL_NAME(sys_getrusage)
.long SYMBOL_NAME(sys_gettimeofday)
.long SYMBOL_NAME(sys_settimeofday)
/* 80 */ .long SYMBOL_NAME(sys_getgroups)
.long SYMBOL_NAME(sys_setgroups)
.long SYMBOL_NAME(old_select)
.long SYMBOL_NAME(sys_symlink)
.long SYMBOL_NAME(sys_lstat)
/* 85 */ .long SYMBOL_NAME(sys_readlink)
.long SYMBOL_NAME(sys_uselib)
.long SYMBOL_NAME(sys_swapon)
.long SYMBOL_NAME(sys_reboot)
.long SYMBOL_NAME(old_readdir)
/* 90 */ .long SYMBOL_NAME(old_mmap)
.long SYMBOL_NAME(sys_munmap)
.long SYMBOL_NAME(sys_truncate)
.long SYMBOL_NAME(sys_ftruncate)
.long SYMBOL_NAME(sys_fchmod)
/* 95 */ .long SYMBOL_NAME(sys_fchown)
.long SYMBOL_NAME(sys_getpriority)
.long SYMBOL_NAME(sys_setpriority)
.long SYMBOL_NAME(sys_ni_syscall) /* was sys_profil */
.long SYMBOL_NAME(sys_statfs)
/* 100 */ .long SYMBOL_NAME(sys_fstatfs)
.long SYMBOL_NAME(sys_ni_syscall) /* .long _sys_ioperm */
.long SYMBOL_NAME(sys_socketcall)
.long SYMBOL_NAME(sys_syslog)
.long SYMBOL_NAME(sys_setitimer)
/* 105 */ .long SYMBOL_NAME(sys_getitimer)
.long SYMBOL_NAME(sys_newstat)
.long SYMBOL_NAME(sys_newlstat)
.long SYMBOL_NAME(sys_newfstat)
.long SYMBOL_NAME(sys_uname)
/* 110 */ .long SYMBOL_NAME(sys_iopl)
.long SYMBOL_NAME(sys_vhangup)
.long SYMBOL_NAME(sys_idle)
.long SYMBOL_NAME(sys_syscall) /* call a syscall */
.long SYMBOL_NAME(sys_wait4)
/* 115 */ .long SYMBOL_NAME(sys_swapoff)
.long SYMBOL_NAME(sys_sysinfo)
.long SYMBOL_NAME(sys_ipc)
.long SYMBOL_NAME(sys_fsync)
.long SYMBOL_NAME(sys_sigreturn_wrapper)
.long SYMBOL_NAME(sys_clone_wapper)
.long SYMBOL_NAME(sys_setdomainname)
.long SYMBOL_NAME(sys_newuname)
.long SYMBOL_NAME(sys_ni_syscall) /* .long SYMBOL_NAME(sys_modify_ldt) */
.long SYMBOL_NAME(sys_adjtimex)
/* 125 */ .long SYMBOL_NAME(sys_mprotect)
.long SYMBOL_NAME(sys_sigprocmask)
.long SYMBOL_NAME(sys_create_module)
.long SYMBOL_NAME(sys_init_module)
.long SYMBOL_NAME(sys_delete_module)
/* 130 */ .long SYMBOL_NAME(sys_get_kernel_syms)
.long SYMBOL_NAME(sys_quotactl)
.long SYMBOL_NAME(sys_getpgid)
.long SYMBOL_NAME(sys_fchdir)
.long SYMBOL_NAME(sys_bdflush)
/* 135 */ .long SYMBOL_NAME(sys_sysfs)
.long SYMBOL_NAME(sys_personality)
.long SYMBOL_NAME(sys_ni_syscall) /* .long _sys_afs_syscall */
.long SYMBOL_NAME(sys_setfsuid)
.long SYMBOL_NAME(sys_setfsgid)
/* 140 */ .long SYMBOL_NAME(sys_llseek_wrapper)
.long SYMBOL_NAME(sys_getdents)
.long SYMBOL_NAME(sys_select)
.long SYMBOL_NAME(sys_flock)
.long SYMBOL_NAME(sys_msync)
/* 145 */ .long SYMBOL_NAME(sys_readv)
.long SYMBOL_NAME(sys_writev)
.long SYMBOL_NAME(sys_getsid)
.long SYMBOL_NAME(sys_ni_syscall)
.long SYMBOL_NAME(sys_ni_syscall)
/* 150 */ .long SYMBOL_NAME(sys_mlock)
.long SYMBOL_NAME(sys_munlock)
.long SYMBOL_NAME(sys_mlockall)
.long SYMBOL_NAME(sys_munlockall)
.long SYMBOL_NAME(sys_sched_setparam)
/* 155 */ .long SYMBOL_NAME(sys_sched_getparam)
.long SYMBOL_NAME(sys_sched_setscheduler)
.long SYMBOL_NAME(sys_sched_getscheduler)
.long SYMBOL_NAME(sys_sched_yield)
.long SYMBOL_NAME(sys_sched_get_priority_max)
/* 160 */ .long SYMBOL_NAME(sys_sched_get_priority_min)
.long SYMBOL_NAME(sys_sched_rr_get_interval)
.long SYMBOL_NAME(sys_nanosleep)
.long SYMBOL_NAME(sys_mremap)
.long SYMBOL_NAME(sys_setresuid)
/* 165 */ .long SYMBOL_NAME(sys_getresuid)
.long SYMBOL_NAME(sys_ni_syscall)
.long SYMBOL_NAME(sys_query_module)
.long SYMBOL_NAME(sys_poll)
.long SYMBOL_NAME(sys_nfsservctl)
/* 170 */ .long SYMBOL_NAME(sys_setresgid)
.long SYMBOL_NAME(sys_getresgid)
.long SYMBOL_NAME(sys_prctl)
.long SYMBOL_NAME(sys_rt_sigreturn_wrapper)
.long SYMBOL_NAME(sys_rt_sigaction)
/* 175 */ .long SYMBOL_NAME(sys_rt_sigprocmask)
.long SYMBOL_NAME(sys_rt_sigpending)
.long SYMBOL_NAME(sys_rt_sigtimedwait)
.long SYMBOL_NAME(sys_rt_sigqueueinfo)
.long SYMBOL_NAME(sys_rt_sigsuspend_wrapper)
/* 180 */ .long SYMBOL_NAME(sys_pread)
.long SYMBOL_NAME(sys_pwrite)
.space (NR_syscalls - 182) * 4
#endif
/*
* linux/arch/arm/kernel/dma.c
*
* Copyright (C) 1995, 1996 Russell King
*/
#include <linux/config.h>
#include <linux/sched.h>
#include <linux/malloc.h>
#include <linux/mman.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/irq.h>
#include <asm/hardware.h>
#include <asm/io.h>
#define KERNEL_ARCH_DMA
#include <asm/dma.h>
static unsigned long dma_address[8];
static unsigned long dma_count[8];
static char dma_direction[8] = { -1, -1, -1, -1, -1, -1, -1};
#if defined(CONFIG_ARCH_A5K) || defined(CONFIG_ARCH_RPC)
#define DMA_PCIO
#endif
#if defined(CONFIG_ARCH_ARC) && defined(CONFIG_BLK_DEV_FD)
#define DMA_OLD
#endif
void enable_dma (unsigned int dmanr)
{
switch (dmanr) {
#ifdef DMA_PCIO
case 2: {
void *fiqhandler_start;
unsigned int fiqhandler_length;
extern void floppy_fiqsetup (unsigned long len, unsigned long addr,
unsigned long port);
switch (dma_direction[dmanr]) {
case 1: {
extern unsigned char floppy_fiqin_start, floppy_fiqin_end;
fiqhandler_start = &floppy_fiqin_start;
fiqhandler_length = &floppy_fiqin_end - &floppy_fiqin_start;
break;
}
case 0: {
extern unsigned char floppy_fiqout_start, floppy_fiqout_end;
fiqhandler_start = &floppy_fiqout_start;
fiqhandler_length = &floppy_fiqout_end - &floppy_fiqout_start;
break;
}
default:
printk ("enable_dma: dma%d not initialised\n", dmanr);
return;
}
memcpy ((void *)0x1c, fiqhandler_start, fiqhandler_length);
flush_page_to_ram(0);
floppy_fiqsetup (dma_count[dmanr], dma_address[dmanr], (int)PCIO_FLOPPYDMABASE);
enable_irq (64);
return;
}
#endif
#ifdef DMA_OLD
case 0: { /* Data DMA */
switch (dma_direction[dmanr]) {
case 1: /* read */
{
extern unsigned char fdc1772_dma_read, fdc1772_dma_read_end;
extern void fdc1772_setupdma(unsigned int count,unsigned int addr);
unsigned long flags;
#ifdef DEBUG
printk("enable_dma fdc1772 data read\n");
#endif
save_flags(flags);
cliIF();
memcpy ((void *)0x1c, (void *)&fdc1772_dma_read,
&fdc1772_dma_read_end - &fdc1772_dma_read);
fdc1772_setupdma(dma_count[dmanr],dma_address[dmanr]); /* Sets data pointer up */
enable_irq (64);
restore_flags(flags);
}
break;
case 0: /* write */
{
extern unsigned char fdc1772_dma_write, fdc1772_dma_write_end;
extern void fdc1772_setupdma(unsigned int count,unsigned int addr);
unsigned long flags;
#ifdef DEBUG
printk("enable_dma fdc1772 data write\n");
#endif
save_flags(flags);
cliIF();
memcpy ((void *)0x1c, (void *)&fdc1772_dma_write,
&fdc1772_dma_write_end - &fdc1772_dma_write);
fdc1772_setupdma(dma_count[dmanr],dma_address[dmanr]); /* Sets data pointer up */
enable_irq (64);
restore_flags(flags);
}
break;
default:
printk ("enable_dma: dma%d not initialised\n", dmanr);
return;
}
}
break;
case 1: { /* Command end FIQ - actually just sets a flag */
/* Need to build a branch at the FIQ address */
extern void fdc1772_comendhandler(void);
unsigned long flags;
/*printk("enable_dma fdc1772 command end FIQ\n");*/
save_flags(flags);
cliIF();
*((unsigned int *)0x1c)=0xea000000 | (((unsigned int)fdc1772_comendhandler-(0x1c+8))/4); /* B fdc1772_comendhandler */
restore_flags(flags);
}
break;
#endif
case DMA_0:
case DMA_1:
case DMA_2:
case DMA_3:
case DMA_S0:
case DMA_S1:
arch_enable_dma (dmanr - DMA_0);
break;
default:
printk ("enable_dma: dma %d not supported\n", dmanr);
}
}
void set_dma_mode (unsigned int dmanr, char mode)
{
if (dmanr < 8) {
if (mode == DMA_MODE_READ)
dma_direction[dmanr] = 1;
else if (mode == DMA_MODE_WRITE)
dma_direction[dmanr] = 0;
else
printk ("set_dma_mode: dma%d: invalid mode %02X not supported\n",
dmanr, mode);
} else if (dmanr < MAX_DMA_CHANNELS)
arch_set_dma_mode (dmanr - DMA_0, mode);
else
printk ("set_dma_mode: dma %d not supported\n", dmanr);
}
void set_dma_addr (unsigned int dmanr, unsigned int addr)
{
if (dmanr < 8)
dma_address[dmanr] = (unsigned long)addr;
else if (dmanr < MAX_DMA_CHANNELS)
arch_set_dma_addr (dmanr - DMA_0, addr);
else
printk ("set_dma_addr: dma %d not supported\n", dmanr);
}
void set_dma_count (unsigned int dmanr, unsigned int count)
{
if (dmanr < 8)
dma_count[dmanr] = (unsigned long)count;
else if (dmanr < MAX_DMA_CHANNELS)
arch_set_dma_count (dmanr - DMA_0, count);
else
printk ("set_dma_count: dma %d not supported\n", dmanr);
}
int get_dma_residue (unsigned int dmanr)
{
if (dmanr < 8) {
switch (dmanr) {
#if defined(CONFIG_ARCH_A5K) || defined(CONFIG_ARCH_RPC)
case 2: {
extern int floppy_fiqresidual (void);
return floppy_fiqresidual ();
}
#endif
#if defined(CONFIG_ARCH_ARC) && defined(CONFIG_BLK_DEV_FD)
case 0: {
extern unsigned int fdc1772_bytestogo;
return fdc1772_bytestogo;
}
#endif
default:
return -1;
}
} else if (dmanr < MAX_DMA_CHANNELS)
return arch_dma_count (dmanr - DMA_0);
return -1;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
*=============================================================================
* Low-level interface code
*-----------------------------------------------------------------------------
* Trap initialisation
*-----------------------------------------------------------------------------
*
* Note - FIQ code has changed. The default is a couple of words in 0x1c, 0x20
* that call _unexp_fiq. Nowever, we now copy the FIQ routine to 0x1c (removes
* some excess cycles).
*
* What we need to put into 0-0x1c are ldrs to branch to 0xC0000000
* (the kernel).
* 0x1c onwards is reserved for FIQ, so I think that I will allocate 0xe0 onwards for
* the actuall address to jump to.
*/
/*
* these go into 0x00
*/
.Lbranches: swi SYS_ERROR0
ldr pc, .Lbranches + 0xe4
ldr pc, .Lbranches + 0xe8
ldr pc, .Lbranches + 0xec
ldr pc, .Lbranches + 0xf0
ldr pc, .Lbranches + 0xf4
ldr pc, .Lbranches + 0xf8
ldr pc, .Lbranches + 0xfc
/*
* this is put into 0xe4 and above
*/
.Ljump_addresses:
.word vector_undefinstr @ 0xe4
.word vector_swi @ 0xe8
.word vector_prefetch @ 0xec
.word vector_data @ 0xf0
.word vector_addrexcptn @ 0xf4
.word vector_IRQ @ 0xf8
.word _unexp_fiq @ 0xfc
/*
* initialise the trap system
*/
ENTRY(trap_init)
stmfd sp!, {r4 - r7, lr}
initialise_traps_extra
mov r0, #0xe4
adr r1, .Ljump_addresses
ldmia r1, {r1 - r6}
stmia r0, {r1 - r6}
mov r0, #0
adr r1, .Lbranches
ldmia r1, {r1 - r7}
stmia r0, {r1 - r7}
LOADREGS(fd, sp!, {r4 - r7, pc})
/*=============================================================================
* SWI handler
*-----------------------------------------------------------------------------
*
* We now handle sys-call tracing, and the errno in the task structure.
* Still have a problem with >4 arguments for functions. Theres only
* a couple of functions in the code that have 5 arguments, so Im not
* too worried.
*/
#include "calls.S"
vector_swi: save_user_regs
mov fp, #0
mask_pc lr, lr
ldr r6, [lr, #-4]! @ get SWI instruction
arm700_bug_check r6, r7
enable_irqs r7
bic r6, r6, #0xff000000 @ mask off SWI op-code
eor r6, r6, #OS_NUMBER<<20 @ check OS number
cmp r6, #NR_SYSCALLS @ check upper syscall limit
bcs 2f
get_current_task r5
ldr ip, [r5, #FLAGS] @ check for syscall tracing
tst ip, #PF_TRACESYS
bne 1f
adr ip, SYMBOL_NAME(sys_call_table)
str r4, [sp, #-4]! @ new style: (r0 = arg1, r5 = arg5)
mov lr, pc
ldr pc, [ip, r6, lsl #2] @ call sys routine
add sp, sp, #4
str r0, [sp, #S_R0] @ returned r0
b ret_from_sys_call
1: ldr r7, [sp, #S_IP] @ save old IP
mov r0, #0
str r7, [sp, #S_IP] @ trace entry [IP = 0]
bl SYMBOL_NAME(syscall_trace)
str r7, [sp, #S_IP]
ldmia sp, {r0 - r3} @ have to reload r0 - r3
adr ip, SYMBOL_NAME(sys_call_table)
str r4, [sp, #-4]! @ new style: (r0 = arg1, r5 = arg5)
mov lr, pc
ldr pc, [ip, r6, lsl #2] @ call sys routine
add sp, sp, #4
str r0, [sp, #S_R0] @ returned r0
mov r0, #1
str r0, [sp, #S_IP] @ trace exit [IP = 1]
bl SYMBOL_NAME(syscall_trace)
str r7, [sp, #S_IP]
b ret_from_sys_call
2: tst r6, #0x00f00000 @ is it a Unix SWI?
bne 3f
cmp r6, #(KSWI_SYS_BASE - KSWI_BASE)
bcc 4f @ not private func
bic r0, r6, #0x000f0000
mov r1, sp
bl SYMBOL_NAME(arm_syscall)
b ret_from_sys_call
3: eor r0, r6, #OS_NUMBER<<20 @ Put OS number back
mov r1, sp
bl SYMBOL_NAME(deferred)
ldmfd sp, {r0 - r3}
b ret_from_sys_call
4: bl SYMBOL_NAME(sys_ni_syscall)
str r0, [sp, #0] @ returned r0
b ret_from_sys_call
@ r0 = syscall number
@ r1 = syscall r0
@ r5 = syscall r4
@ ip = syscall table
SYMBOL_NAME(sys_syscall):
mov r6, r0
eor r6, r6, #OS_NUMBER << 20
cmp r6, #NR_SYSCALLS @ check range
movgt r0, #-ENOSYS
movgt pc, lr
add sp, sp, #4 @ take of the save of our r4
ldmib sp, {r0 - r4} @ get our args
str r4, [sp, #-4]! @ Put our arg on the stack
ldr pc, [ip, r6, lsl #2]
ENTRY(sys_call_table)
#include "calls.S"
/*============================================================================
* Special system call wrappers
*/
sys_fork_wrapper:
add r0, sp, #4
b SYMBOL_NAME(sys_fork)
sys_execve_wrapper:
add r3, sp, #4
b SYMBOL_NAME(sys_execve)
sys_mount_wrapper:
mov r6, lr
add r5, sp, #4
str r5, [sp]
str r4, [sp, #-4]!
bl SYMBOL_NAME(sys_compat_mount)
add sp, sp, #4
RETINSTR(mov,pc,r6)
sys_clone_wapper:
add r2, sp, #4
b SYMBOL_NAME(sys_clone)
sys_llseek_wrapper:
mov r6, lr
add r5, sp, #4
str r5, [sp]
str r4, [sp, #-4]!
bl SYMBOL_NAME(sys_compat_llseek)
add sp, sp, #4
RETINSTR(mov,pc,r6)
sys_sigsuspend_wrapper:
add r3, sp, #4
b SYMBOL_NAME(sys_sigsuspend)
sys_rt_sigsuspend_wrapper:
add r2, sp, #4
b SYMBOL_NAME(sys_rt_sigsuspend)
sys_sigreturn_wrapper:
add r0, sp, #4
b SYMBOL_NAME(sys_sigreturn)
sys_rt_sigreturn_wrapper:
add r0, sp, #4
b SYMBOL_NAME(sys_rt_sigreturn)
/*============================================================================
* All exits to user mode from the kernel go through this code.
*/
.globl ret_from_sys_call
.globl SYMBOL_NAME(fpreturn)
SYMBOL_NAME(fpreturn):
ret_from_exception:
adr r0, 1f
ldmia r0, {r0, r1}
ldr r0, [r0]
ldr r1, [r1]
tst r0, r1
blne SYMBOL_NAME(do_bottom_half)
ret_from_intr: ldr r0, [sp, #S_PSR]
tst r0, #3
beq ret_with_reschedule
b ret_from_all
ret_signal: mov r1, sp
adrsvc al, lr, ret_from_all
b SYMBOL_NAME(do_signal)
2: bl SYMBOL_NAME(schedule)
ret_from_sys_call:
adr r0, 1f
ldmia r0, {r0, r1}
ldr r0, [r0]
ldr r1, [r1]
tst r0, r1
adrsvc ne, lr, ret_from_intr
bne SYMBOL_NAME(do_bottom_half)
ret_with_reschedule:
ldr r0, 1f + 8
ldr r0, [r0]
teq r0, #0
bne 2b
get_current_task r1
ldr r1, [r1, #SIGPENDING]
teq r1, #0
bne ret_signal
ret_from_all: restore_user_regs
1: .word SYMBOL_NAME(bh_mask)
.word SYMBOL_NAME(bh_active)
.word SYMBOL_NAME(need_resched)
/*============================================================================
* FP support
*/
1: .word SYMBOL_NAME(fp_save)
.word SYMBOL_NAME(fp_restore)
.Lfpnull: mov pc, lr
/*
* Function to call when switching tasks to save FP state
*/
ENTRY(fpe_save)
ldr r1, 1b
ldr pc, [r1]
/*
* Function to call when switching tasks to restore FP state
*/
ENTRY(fpe_restore)
ldr r1, 1b + 4
ldr pc, [r1]
.data
ENTRY(fp_enter)
.word SYMBOL_NAME(fpundefinstr)
.word SYMBOL_NAME(fpundefinstrsvc)
ENTRY(fp_save)
.word .Lfpnull
ENTRY(fp_restore)
.word .Lfpnull
/*
* linux/arch/arm/kernel/head.S
*
* Copyright (C) 1994, 1995, 1996, 1997 Russell King
*
* 26-bit kernel startup code
*/
#include <linux/config.h>
#include <linux/linkage.h>
.text
.align
/*
* Entry point.
*/
ENTRY(stext)
ENTRY(_stext)
__entry: cmp pc, #0x02000000
ldrlt pc, LC1 @ if 0x01800000, call at 0x02080000
teq r0, #0 @ Check for old calling method
blne Loldparams @ Move page if old
adr r5, LC0
ldmia r5, {r5, r6, sl, sp} @ Setup stack
mov r4, #0
1: cmp r5, sl @ Clear BSS
strcc r4, [r5], #4
bcc 1b
mov r0, #0xea000000 @ Point undef instr to continuation
adr r5, Lcontinue - 12
orr r5, r0, r5, lsr #2
str r5, [r4, #4]
mov r2, r4
ldr r5, Larm2_id
swp r0, r0, [r2] @ check for swp (ARM2 can't)
ldr r5, Larm250_id
mrc 15, 0, r0, c0, c0 @ check for CP#15 (ARM250 can't)
mov r5, r0 @ Use processor ID if we do have CP#15
Lcontinue: str r5, [r6]
mov r5, #0xeb000000 @ Point undef instr vector to itself
sub r5, r5, #2
str r5, [r4, #4]
mov fp, #0
b SYMBOL_NAME(start_kernel)
LC1: .word SYMBOL_NAME(_stext)
LC0: .word SYMBOL_NAME(_edata)
.word SYMBOL_NAME(arm_id)
.word SYMBOL_NAME(_end)
.word SYMBOL_NAME(init_task_union)+8192
Larm2_id: .long 0x41560200
Larm250_id: .long 0x41560250
.align
Loldparams: mov r4, #0x02000000
add r3, r4, #0x00080000
add r4, r4, #0x0007c000
1: ldmia r0!, {r5 - r12}
stmia r4!, {r5 - r12}
cmp r4, r3
blt 1b
movs pc, lr
.align 13
ENTRY(this_must_match_init_task)
/*
* linux/arch/arm/kernel/head32.S
*
* Copyright (C) 1994, 1995, 1996, 1997 Russell King
*
* Kernel 32 bit startup code for ARM6 / ARM7 / StrongARM
*/
#include <linux/config.h>
#include <linux/linkage.h>
.text
.align
.globl SYMBOL_NAME(swapper_pg_dir)
.equ SYMBOL_NAME(swapper_pg_dir), 0xc0004000
.globl __stext
/*
* Entry point and restart point. Entry *must* be called with r0 == 0,
* MMU off.
*
* r1 = 0 -> ebsa (Ram @ 0x00000000)
* r1 = 1 -> RPC (Ram @ 0x10000000)
* r1 = 2 -> ebsit (???)
* r1 = 3 -> nexuspci
*/
ENTRY(stext)
ENTRY(_stext)
__entry:
teq r0, #0 @ check for illegal entry...
bne .Lerror @ loop indefinitely
cmp r1, #4 @ Unknown machine architecture
bge .Lerror
@
@ First thing to do is to get the page tables set up so that we can call the kernel
@ in the correct place. This is relocatable code...
@
mrc p15, 0, r9, c0, c0 @ get Processor ID
@
@ Read processor ID register (CP#15, CR0).
@ NOTE: ARM2 & ARM250 cause an undefined instruction exception...
@ Values are:
@ XX01XXXX = ARMv4 architecture (StrongARM)
@ XX00XXXX = ARMv3 architecture
@ 4156061X = ARM 610
@ 4156030X = ARM 3
@ 4156025X = ARM 250
@ 4156020X = ARM 2
@
adr r10, .LCProcTypes
1: ldmia r10!, {r5, r6, r8} @ Get Set, Mask, MMU Flags
teq r5, #0 @ End of list?
beq .Lerror
eor r5, r5, r9
tst r5, r6
addne r10, r10, #8
bne 1b
adr r4, .LCMachTypes
add r4, r4, r1, lsl #4
ldmia r4, {r4, r5, r6} @ r4 = page dir in physical ram
mov r0, r4
mov r1, #0
add r2, r0, #0x4000
1: str r1, [r0], #4 @ Clear page table
teq r0, r2
bne 1b
@
@ Add enough entries to allow the kernel to be called.
@ It will sort out the real mapping in paging_init
@
add r0, r4, #0x3000
mov r1, #0x0000000c @ SECT_CACHEABLE | SECT_BUFFERABLE
orr r1, r1, r8
add r1, r1, r5
str r1, [r0], #4
add r1, r1, #1 << 20
str r1, [r0], #4
add r1, r1, #1 << 20
@
@ Map in IO space
@
add r0, r4, #0x3800
orr r1, r6, r8
add r2, r0, #0x0800
1: str r1, [r0], #4
add r1, r1, #1 << 20
teq r0, r2
bne 1b
@
@ Map in screen at 0x02000000 & SCREEN2_BASE
@
teq r5, #0
addne r0, r4, #0x80 @ 02000000
movne r1, #0x02000000
orrne r1, r1, r8
strne r1, [r0]
addne r0, r4, #0x3600 @ d8000000
strne r1, [r0]
@
@ The following should work on both v3 and v4 implementations
@
mov lr, pc
mov pc, r10 @ Call processor flush (returns ctrl reg)
adr r5, __entry
sub r10, r10, r5 @ Make r10 PIC
ldr lr, .Lbranch
mcr p15, 0, r0, c1, c0 @ Enable MMU & caches. In 3 instructions
@ we lose this page!
mov pc, lr
.Lerror: mov r0, #0x02000000
mov r1, #0x11
orr r1, r1, r1, lsl #8
orr r1, r1, r1, lsl #16
str r1, [r0], #4
str r1, [r0], #4
str r1, [r0], #4
str r1, [r0], #4
b .Lerror
.Lbranch: .long .Lalready_done_mmap @ Real address of routine
@ EBSA (pg dir phys, phys ram start, phys i/o)
.LCMachTypes: .long SYMBOL_NAME(swapper_pg_dir) - 0xc0000000 @ Address of page tables (physical)
.long 0 @ Address of RAM
.long 0xe0000000 @ I/O address
.long 0
@ RPC
.long SYMBOL_NAME(swapper_pg_dir) - 0xc0000000 + 0x10000000
.long 0x10000000
.long 0x03000000
.long 0
@ EBSIT ???
.long SYMBOL_NAME(swapper_pg_dir) - 0xc0000000
.long 0
.long 0xe0000000
.long 0
@ NexusPCI
.long SYMBOL_NAME(swapper_pg_dir) - 0xc0000000 + 0x40000000
.long 0x40000000
.long 0x10000000
.long 0
.LCProcTypes: @ ARM6 / 610
.long 0x41560600
.long 0xffffff00
.long 0x00000c12
b .Larmv3_flush_early @ arm v3 flush & ctrl early setup
mov pc, lr
@ ARM7 / 710
.long 0x41007000
.long 0xfffff000
.long 0x00000c12
b .Larmv3_flush_late @ arm v3 flush & ctrl late setup
mov pc, lr
@ StrongARM
.long 0x4401a100
.long 0xfffffff0
.long 0x00000c02
b .Larmv4_flush_early
b .Lsa_fastclock
.long 0
.LC0: .long SYMBOL_NAME(_edata)
.long SYMBOL_NAME(arm_id)
.long SYMBOL_NAME(_end)
.long SYMBOL_NAME(init_task_union)+8192
.align
.Larmv3_flush_early:
mov r0, #0
mcr p15, 0, r0, c7, c0 @ flush caches on v3
mcr p15, 0, r0, c5, c0 @ flush TLBs on v3
mcr p15, 0, r4, c2, c0 @ load page table pointer
mov r0, #0x1f @ Domains 0, 1 = client
mcr p15, 0, r0, c3, c0 @ load domain access register
mov r0, #0x3d @ ....S..DPWC.M
orr r0, r0, #0x100
mov pc, lr
.Larmv3_flush_late:
mov r0, #0
mcr p15, 0, r0, c7, c0 @ flush caches on v3
mcr p15, 0, r0, c5, c0 @ flush TLBs on v3
mcr p15, 0, r4, c2, c0 @ load page table pointer
mov r0, #0x1f @ Domains 0, 1 = client
mcr p15, 0, r0, c3, c0 @ load domain access register
mov r0, #0x7d @ ....S.LDPWC.M
orr r0, r0, #0x100
mov pc, lr
.Larmv4_flush_early:
mov r0, #0
mcr p15, 0, r0, c7, c7 @ flush I,D caches on v4
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer on v4
mcr p15, 0, r0, c8, c7 @ flush I,D TLBs on v4
mcr p15, 0, r4, c2, c0 @ load page table pointer
mov r0, #0x1f @ Domains 0, 1 = client
mcr p15, 0, r0, c3, c0 @ load domain access register
mrc p15, 0, r0, c1, c0 @ get control register v4
bic r0, r0, #0x0e00
bic r0, r0, #0x0002
orr r0, r0, #0x003d @ I...S..DPWC.M
orr r0, r0, #0x1100 @ v4 supports separate I cache
mov pc, lr
.Lsa_fastclock: mcr p15, 0, r4, c15, c1, 2 @ Enable clock switching
mov pc, lr
.Lalready_done_mmap:
adr r5, __entry @ Add base back in
add r10, r10, r5
adr r5, .LC0
ldmia r5, {r5, r6, r8, sp} @ Setup stack
mov r4, #0
1: cmp r5, r8 @ Clear BSS
strcc r4, [r5],#4
bcc 1b
str r9, [r6] @ Save processor ID
mov lr, pc
add pc, r10, #4 @ Call post-processor init
mov fp, #0
b SYMBOL_NAME(start_kernel)
#if 1
/*
* Useful debugging routines
*/
.globl _printhex8
_printhex8: mov r1, #8
b printhex
.globl _printhex4
_printhex4: mov r1, #4
b printhex
.globl _printhex2
_printhex2: mov r1, #2
printhex: ldr r2, =hexbuf
add r3, r2, r1
mov r1, #0
strb r1, [r3]
1: and r1, r0, #15
mov r0, r0, lsr #4
cmp r1, #10
addlt r1, r1, #'0'
addge r1, r1, #'a' - 10
strb r1, [r3, #-1]!
teq r3, r2
bne 1b
mov r0, r2
.globl _printascii
_printascii:
#ifdef CONFIG_ARCH_RPC
mov r3, #0xe0000000
orr r3, r3, #0x00010000
orr r3, r3, #0x00000fe0
#else
mov r3, #0xf0000000
orr r3, r3, #0x0be0
#endif
b 3f
1: ldrb r2, [r3, #0x18]
tst r2, #0x10
beq 1b
strb r1, [r3]
2: ldrb r2, [r3, #0x14]
and r2, r2, #0x60
teq r2, #0x60
bne 2b
teq r1, #'\n'
moveq r1, #'\r'
beq 1b
3: teq r0, #0
ldrneb r1, [r0], #1
teqne r1, #0
bne 1b
mov pc, lr
.ltorg
.globl _printch
_printch:
#ifdef CONFIG_ARCH_RPC
mov r3, #0xe0000000
orr r3, r3, #0x00010000
orr r3, r3, #0x00000fe0
#else
mov r3, #0xf0000000
orr r3, r3, #0x0be0
#endif
mov r1, r0
mov r0, #0
b 1b
.bss
hexbuf: .space 16
#endif
.text
.align 13
ENTRY(this_must_match_init_task)
/*
* linux/arch/arm/kernel/iic.c
*
* Copyright (C) 1995, 1996 Russell King
*
* IIC is used to get the current time from the CMOS rtc.
*/
#include <asm/system.h>
#include <asm/delay.h>
#include <asm/io.h>
#include <asm/hardware.h>
/*
* if delay loop has been calibrated then us that,
* else use IOC timer 1.
*/
static void iic_delay (void)
{
extern unsigned long loops_per_sec;
if (loops_per_sec != (1 << 12)) {
udelay(10);
return;
} else {
unsigned long flags;
save_flags_cli(flags);
outb(254, IOC_T1LTCHL);
outb(255, IOC_T1LTCHH);
outb(0, IOC_T1GO);
outb(1<<6, IOC_IRQCLRA); /* clear T1 irq */
outb(4, IOC_T1LTCHL);
outb(0, IOC_T1LTCHH);
outb(0, IOC_T1GO);
while ((inb(IOC_IRQSTATA) & (1<<6)) == 0);
restore_flags(flags);
}
}
static inline void iic_start (void)
{
unsigned char out;
out = inb(IOC_CONTROL) | 0xc2;
outb(out, IOC_CONTROL);
iic_delay();
outb(out ^ 1, IOC_CONTROL);
iic_delay();
}
static inline void iic_stop (void)
{
unsigned char out;
out = inb(IOC_CONTROL) | 0xc3;
iic_delay();
outb(out ^ 1, IOC_CONTROL);
iic_delay();
outb(out, IOC_CONTROL);
}
static int iic_sendbyte (unsigned char b)
{
unsigned char out, in;
int i;
out = (inb(IOC_CONTROL) & 0xfc) | 0xc0;
outb(out, IOC_CONTROL);
for (i = 7; i >= 0; i--) {
unsigned char c;
c = out | ((b & (1 << i)) ? 1 : 0);
outb(c, IOC_CONTROL);
iic_delay();
outb(c | 2, IOC_CONTROL);
iic_delay();
outb(c, IOC_CONTROL);
}
outb(out | 1, IOC_CONTROL);
iic_delay();
outb(out | 3, IOC_CONTROL);
iic_delay();
in = inb(IOC_CONTROL) & 1;
outb(out | 1, IOC_CONTROL);
iic_delay();
outb(out, IOC_CONTROL);
iic_delay();
if(in) {
printk("No acknowledge from RTC\n");
return 1;
} else
return 0;
}
static unsigned char iic_recvbyte (void)
{
unsigned char out, in;
int i;
out = (inb(IOC_CONTROL) & 0xfc) | 0xc0;
outb(out, IOC_CONTROL);
in = 0;
for (i = 7; i >= 0; i--) {
outb(out | 1, IOC_CONTROL);
iic_delay();
outb(out | 3, IOC_CONTROL);
iic_delay();
in = (in << 1) | (inb(IOC_CONTROL) & 1);
outb(out | 1, IOC_CONTROL);
iic_delay();
}
outb(out, IOC_CONTROL);
iic_delay();
outb(out | 2, IOC_CONTROL);
iic_delay();
return in;
}
void iic_control (unsigned char addr, unsigned char loc, unsigned char *buf, int len)
{
iic_start();
if (iic_sendbyte(addr & 0xfe))
goto error;
if (iic_sendbyte(loc))
goto error;
if (addr & 1) {
int i;
for (i = 0; i < len; i++)
if (iic_sendbyte (buf[i]))
break;
} else {
int i;
iic_stop();
iic_start();
iic_sendbyte(addr|1);
for (i = 0; i < len; i++)
buf[i] = iic_recvbyte ();
}
error:
iic_stop();
}
#include <linux/mm.h>
#include <linux/sched.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
static struct vm_area_struct init_mmap = INIT_MMAP;
static struct fs_struct init_fs = INIT_FS;
static struct files_struct init_files = INIT_FILES;
static struct signal_struct init_signals = INIT_SIGNALS;
struct mm_struct init_mm = INIT_MM;
/*
* Initial task structure.
*
* We need to make sure that this is 8192-byte aligned due to the
* way process stacks are handled. This is done by making sure
* the linker maps this in the .text segment right after head.S,
* and making head.S ensure the proper alignment.
*
* The things we do for performance..
*/
union task_union init_task_union __attribute__((__section__(".text"))) = { INIT_TASK };
This diff is collapsed.
This diff is collapsed.
/* Support for the latches on the old Archimedes which control the floppy,
* hard disc and printer
*
* (c) David Alan Gilbert 1995/1996
*/
#include <linux/kernel.h>
#include <asm/io.h>
#include <asm/hardware.h>
#ifdef LATCHAADDR
/*
* They are static so that everyone who accesses them has to go through here
*/
static unsigned char LatchACopy;
/* newval=(oldval & ~mask)|newdata */
void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
{
LatchACopy=(LatchACopy & ~mask)|newdata;
outb(LatchACopy, LATCHAADDR);
#ifdef DEBUG
printk("oldlatch_A:0x%2x\n",LatchACopy);
#endif
}
#endif
#ifdef LATCHBADDR
static unsigned char LatchBCopy;
/* newval=(oldval & ~mask)|newdata */
void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
{
LatchBCopy=(LatchBCopy & ~mask)|newdata;
outb(LatchBCopy, LATCHBADDR);
#ifdef DEBUG
printk("oldlatch_B:0x%2x\n",LatchBCopy);
#endif
}
#endif
void oldlatch_init(void)
{
printk("oldlatch: init\n");
#ifdef LATCHAADDR
oldlatch_aupdate(0xff,0xff);
#endif
#ifdef LATCHBADDR
oldlatch_bupdate(0xff,0x8); /* Thats no FDC reset...*/
#endif
return ;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* linux/arch/arm/lib/fp_support.c
*
* Copyright (C) 1995, 1996 Russell King
*/
#include <linux/sched.h>
#include <linux/linkage.h>
extern void (*fp_save)(struct fp_soft_struct *);
asmlinkage void fp_setup(void)
{
struct task_struct *p;
p = &init_task;
do {
fp_save(&p->tss.fpstate.soft);
p = p->next_task;
}
while (p != &init_task);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* arch/arm/mm/mm-a5k.c
*
* Extra MM routines for the Archimedes architecture
*
* Copyright (C) 1998 Russell King
*/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment