Commit d75df542 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.9

parent 0f9cac5b
......@@ -1047,6 +1047,17 @@ N: Greg Page
E: greg@caldera.com
D: IPX development and support
N: Barak A. Pearlmutter
E: bap@cs.unm.edu
W: http://www.cs.unm.edu/~bap/
P: 512/602D785D 9B A1 83 CD EE CB AD 93 20 C6 4C B7 F5 E9 60 D4
D: Author of mark-and-sweep GC integrated by Alan Cox
S: Computer Science Department
S: FEC 313
S: University of New Mexico
S: Albuquerque, NM 87131
S: USA
N: Avery Pennarun
E: apenwarr@foxnet.net
D: ARCnet driver
......
This diff is collapsed.
......@@ -3813,6 +3813,16 @@ CONFIG_AP1000
machine see http://cap.anu.edu.au/cap/projects/linux or mail to
hackers@cafe.anu.edu.au
Video mode selection support
CONFIG_VIDEO_SELECT
This enables support for text mode selection on kernel startup. If you
want to take advantage of some high-resolution text mode your card's
BIOS offers, but the traditional Linux utilities like SVGATextMode
don't, you can enable this and set the mode using the "vga=" option
from your boot loader (LILO or LOADLIN) or set "vga=ask" which brings
up a video mode menu on kernel startup. Read Documentation/svga.txt
for more information. If unsure, say "n".
# need an empty line after last entry, for sed script in Configure.
#
......
This diff is collapsed.
......@@ -32,10 +32,11 @@ This driver provides the following features:
function; the only ones which i've heard of successes with are Sony
and Toshiba drives.
- There is now rudimentary support for cdrom changers which comply
with the ATAPI 2.6 draft standard (such as the NEC CDR-251). This
merely adds a function to switch between the slots of the changer
under control of an external program. A sample such program is
- There is now support for cdrom changers which comply with the
ATAPI 2.6 draft standard (such as the NEC CDR-251). This additional
functionality includes a function call to query which slot is the
currently selected slot, a function call to query which slots contain
CDs, etc. A sample program which demonstrates this functionality is
appended to the end of this file. The Sanyo 3-disc changer
(which does not conform to the standard) is also now supported.
Please note the driver refers to the first CD as slot # 0.
......@@ -150,11 +151,11 @@ such as cdda2wav. The only types of drive which i've heard support
this are Sony and Toshiba drives. You will get errors if you try to
use this function on a drive which does not support it.
For supported changers, you can use the `cdload' program (appended to
For supported changers, you can use the `cdchange' program (appended to
the end of this file) to switch between changer slots. Note that the
drive should be unmounted before attempting this. The program takes
two arguments: the cdrom device, and the slot number to which to change.
If the slot number is -1, the drive is unloaded.
two arguments: the cdrom device, and the slot number to which you wish
to change. If the slot number is -1, the drive is unloaded.
4. Compilation options
......@@ -360,16 +361,22 @@ f. Data corruption.
expense of low system performance.
6. cdload.c
-----------
6. cdchange.c
-------------
/*
* cdload.c <device> <slot>
* cdchange.c [-v] <device> [<slot>]
*
* Load a cdrom from a specified slot in a changer. The drive should be
* unmounted before executing this.
* This load a cdrom from a specified slot in a changer, and displays
* information about the changer status. The drive should be unmounted before
* using this program.
*
* Changer information is displayed if either the -v flag is specified
* or no slot was specified.
*
* Based on code originally from Gerhard Zuber <zuber@berlin.snafu.de>.
* Changer status information, and rewrite for the new common cdrom driver
* interface by Erik Andersen <andersee@et.byu.edu>.
*/
#include <stdlib.h>
......@@ -377,7 +384,6 @@ f. Data corruption.
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <linux/cdrom.h>
#include <linux/ucdrom.h>
......@@ -386,19 +392,34 @@ main (int argc, char **argv)
{
char *program;
char *device;
int x_slot;
int fd; /* file descriptor for CD-ROM device */
int status; /* return status for system calls */
int verbose = 0;
int x_slot = -1;
int total_slots_available;
program = argv[0];
if (argc != 3) {
fprintf (stderr, "usage: %s <device> <slot>\n", program);
++argv;
--argc;
if (argc < 1 || argc > 3) {
fprintf (stderr, "usage: %s [-v] <device> [<slot>]\n",
program);
fprintf (stderr, " Slots are numbered 1 -- n.\n");
exit (1);
}
device = argv[1];
x_slot = atoi (argv[2]);
if (strcmp (argv[0], "-v") == 0) {
verbose = 1;
++argv;
--argc;
}
device = argv[0];
if (argc == 2)
x_slot = atoi (argv[1]) - 1;
/* open device */
fd = open (device, 0);
......@@ -408,15 +429,77 @@ main (int argc, char **argv)
exit (1);
}
/* load */
status = ioctl (fd, CDROM_SELECT_DISC, x_slot);
if (status != 0) {
fprintf (stderr,
"%s: CDROM_SELECT_DISC ioctl failed for `%s': %s\n",
program, device, strerror (errno));
/* Check CD player status */
total_slots_available = ioctl (fd, CDROM_CHANGER_NSLOTS);
if (total_slots_available <= 1 ) {
fprintf (stderr, "%s: Device `%s' is not an ATAPI "
"compliant CD changer.\n", program, device);
exit (1);
}
if (x_slot >= 0) {
if (x_slot >= total_slots_available) {
fprintf (stderr, "Bad slot number. "
"Should be 1 -- %d.\n",
total_slots_available);
exit (1);
}
/* load */
status = ioctl (fd, CDROM_SELECT_DISC, x_slot);
}
if (x_slot < 0 || verbose) {
status = ioctl (fd, CDROM_SELECT_DISC, CDSL_CURRENT);
printf ("Current slot: %d\n", status+1);
printf ("Total slots available: %d\n",
total_slots_available);
printf ("Drive status: ");
switch (ioctl (fd, CDROM_DRIVE_STATUS, CDSL_CURRENT)) {
case CDS_DISC_OK:
printf ("Ready.\n");
break;
case CDS_TRAY_OPEN:
printf ("Tray Open.\n");
break;
case CDS_DRIVE_NOT_READY:
printf ("Drive Not Ready.\n");
break;
default:
printf ("This Should not happen!\n");
break;
}
for (x_slot=0; x_slot<total_slots_available; x_slot++) {
printf ("Slot %2d: ", x_slot+1);
switch (ioctl (fd, CDROM_DRIVE_STATUS, x_slot)) {
case CDS_DISC_OK:
printf ("Disc present.");
break;
case CDS_NO_DISC:
printf ("Empty slot.");
break;
case CDS_NO_INFO:
printf ("No Information.");
break;
default:
printf ("This Should not happen!\n");
break;
}
switch (ioctl (fd, CDROM_MEDIA_CHANGED, x_slot)) {
case 1:
printf ("\t\tChanged.\n");
break;
default:
printf ("\n");
break;
}
}
}
/* close device */
status = close (fd);
if (status != 0) {
......
This diff is collapsed.
Video Mode Selection Support 2.9
Video Mode Selection Support 2.10
(c) 1995, 1996 Martin Mares, <mj@k332.feld.cvut.cz>
--------------------------------------------------------------------------------
......@@ -118,6 +118,7 @@ can be divided to three regions:
0x0f05 VGA 80x30 (480 scans, 16-point font)
0x0f06 VGA 80x34 (480 scans, 14-point font)
0x0f07 VGA 80x60 (480 scans, 8-point font)
0x0f08 Graphics hack (see the CONFIG_VIDEO_HACK paragraph below)
0x1000 to 0x7fff - modes specified by resolution. The code has a "0xRRCC"
form where RR is a number of rows and CC is a number of columns.
......@@ -163,6 +164,19 @@ the "local_mode_table:" line. The comment before this line describes the format
of the table (which also includes a video card name to be displayed on the
top of the menu).
CONFIG_VIDEO_400_HACK - force setting of 400 scan lines for standard VGA
modes. This option is intended to be used on certain buggy BIOS'es which draw
some useless logo using font download and then fail to reset the correct mode.
Don't use unless needed as it forces resetting the video card.
CONFIG_VIDEO_GFX_HACK - includes special hack for setting of graphics modes
to be used later by special drivers (e.g., 800x600 on IBM ThinkPad -- see
ftp://ftp.phys.keio.ac.jp/pub/XFree86/800x600/XF86Configs/XF86Config.IBM_TP560).
Allows to set _any_ BIOS mode including graphic ones and forcing specific
text screen resolution instead of peeking it from BIOS variables. Don't use
unless you think you know what you're doing. To activate this setup, use
mode number 0x0f08 (see section 3).
5. Adding more cards
~~~~~~~~~~~~~~~~~~~~
If you have a card not detected by the driver and you are a good programmer,
......@@ -202,6 +216,10 @@ contains the most common video BIOS bug called "incorrect vertical display
end setting". Adding 0x8000 to the mode ID might fix the problem. Unfortunately,
this must be done manually -- no autodetection mechanisms are available.
If you have a VGA card and your display still looks as on EGA, your BIOS
is probably broken and you need to set the CONFIG_VIDEO_400_HACK switch to
force setting of the correct mode.
7. History
~~~~~~~~~~
1.0 (??-Nov-95) First version supporting all adapters supported by the old
......@@ -244,3 +262,7 @@ this must be done manually -- no autodetection mechanisms are available.
2.8 (14-Apr-96) - Previous release was not compilable without CONFIG_VIDEO_SVGA.
- Better recognition of text modes during mode scan.
2.9 (12-May-96) - Ignored VESA modes 0x80 - 0xff (more VESA BIOS bugs!)
2.10 (11-Nov-96)- The whole thing made optional.
- Added the CONFIG_VIDEO_400_HACK switch.
- Added the CONFIG_VIDEO_GFX_HACK switch.
- Code cleanup.
......@@ -20,18 +20,20 @@ loaded.
In accordance with the Unicode standard/ISO 10646 the range U+F000 to
U+F8FF has been reserved for OS-wide allocation (the Unicode Standard
refers to this as a "Corporate Zone"). U+F000 was picked as the
starting point since it lets the direct-mapping area start on a large
power of two (in case 1024- or 2048-character fonts ever become
necessary). This leaves U+E000 to U+EFFF as End User Zone.
refers to this as a "Corporate Zone", since this is inaccurate for
Linux we call it the "Linux Zone"). U+F000 was picked as the starting
point since it lets the direct-mapping area start on a large power of
two (in case 1024- or 2048-character fonts ever become necessary).
This leaves U+E000 to U+EFFF as End User Zone.
The Unicodes in the range U+F000 to U+F1FF have been hard-coded to map
directly to the loaded font, bypassing the translation table. The
user-defined map now defaults to U+F000 to U+F1FF, emulating the
previous behaviour.
previous behaviour. This range may expand in the future should it be
warranted.
Actual characters assigned in the Corporate Zone
------------------------------------------------
Actual characters assigned in the Linux Zone
--------------------------------------------
In addition, the following characters not present in Unicode 1.1.4 (at
least, I have not found them!) have been defined; these are used by
......@@ -58,7 +60,7 @@ also political reasons (the Japanese, for example, are not too happy
about the whole 16-bit concept to begin with.) However, with Linux
being a hacker-driven OS it seems this is a brilliant linguistic hack
worth supporting. Hence I have chosen to add it to the list in the
Linux "Corporate" Zone.
Linux Zone.
Several glyph forms for the Klingon alphabet has been proposed.
However, since the set of symbols appear to be consistent throughout,
......@@ -122,5 +124,16 @@ U+F8F7 KLINGON DIGIT SEVEN
U+F8F8 KLINGON DIGIT EIGHT
U+F8F9 KLINGON DIGIT NINE
Other Fictional and Artificial Scripts
--------------------------------------
H. Peter Anvin <hpa@storm.net>
Since the assignment of the Klingon Linux Unicode block, a registry of
fictional and artificial scripts has been established by John Cowan,
<cowan@ccil.org>. The ConScript Unicode Registry is accessible at
http://locke.ccil.org/~cowan/csur/; the ranges used fall at the bottom
of the End User Zone and can hence not be normatively assigned, but it
is recommended that people who wish to encode fictional scripts use
these codes, in the interest of interoperability. For Klingon, CSUR
has adopted the Linux encoding.
H. Peter Anvin <hpa@zytor.com>
......@@ -213,6 +213,12 @@ M: mlord@pobox.com
L: linux-kernel@vger.rutgers.edu
S: Maintained
IDE/ATAPI CDROM DRIVER
P: Erik Andersen
M: andersee@debian.org
L: linux-kernel@vger.rutgers.edu
S: Maintained
ISDN SUBSYSTEM
P: Fritz Elfert
M: fritz@wuemaus.franken.de
......@@ -289,7 +295,7 @@ S: Maintained
SVGA HANDLING:
P: Martin Mares
M: mj@k332.feld.cvut.cz
L: linux-kernel@vger.rutgers.edu
L: linux-video@atrey.karlin.mff.cuni.cz
S: Maintained
VFAT FILESYSTEM:
......
VERSION = 2
PATCHLEVEL = 1
SUBLEVEL = 8
SUBLEVEL = 9
ARCH = i386
......@@ -126,14 +126,14 @@ endif
DRIVERS := $(DRIVERS) drivers/net/net.a
ifdef CONFIG_CD_NO_IDESCSI
DRIVERS := $(DRIVERS) drivers/cdrom/cdrom.a
endif
ifeq ($(CONFIG_SCSI),y)
DRIVERS := $(DRIVERS) 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) drivers/sound/sound.a
endif
......
/*
* arch/alpha/lib/csum_ipv6_magic.S
* Contributed by Richard Henderson <rth@tamu.edu>
*
* unsigned short csum_ipv6_magic(struct in6_addr *saddr,
* struct in6_addr *daddr,
* __u16 len,
* unsigned short proto,
* unsigned int csum);
*/
.globl csum_ipv6_magic
.align 4
.ent csum_ipv6_magic
.frame $30,0,$26,0
csum_ipv6_magic:
.prologue 0
ldq $0,0($16) # e0 : load src & dst addr words
zapnot $20,15,$20 # .. e1 : zero extend incoming csum
extwh $18,7,$4 # e0 : byte swap len & proto while we wait
ldq $1,8($16) # .. e1 :
extbl $18,1,$18 # e0 :
ldq $2,0($17) # .. e1 :
extwh $19,7,$5 # e0 :
ldq $3,8($17) # .. e1 :
extbl $19,1,$19 # e0 :
or $18,$4,$18 # .. e1 :
addq $20,$0,$20 # e0 : begin summing the words
or $19,$5,$19 # .. e1 :
sll $18,48,$18 # e0 :
cmpult $20,$0,$0 # .. e1 :
sll $19,48,$19 # e0 :
addq $20,$1,$20 # .. e1 :
sra $18,32,$18 # e0 : len complete
cmpult $20,$1,$1 # .. e1 :
sra $19,32,$19 # e0 : proto complete
addq $20,$2,$20 # .. e1 :
cmpult $20,$2,$2 # e0 :
addq $20,$3,$20 # .. e1 :
cmpult $20,$3,$3 # e0 :
addq $20,$18,$20 # .. e1 :
cmpult $20,$18,$18 # e0 :
addq $20,$19,$20 # .. e1 :
cmpult $20,$19,$19 # e0 :
addq $0,$1,$0 # .. e1 : merge the carries back into the csum
addq $2,$3,$2 # e0 :
addq $18,$19,$18 # .. e1 :
addq $0,$2,$0 # e0 :
addq $20,$18,$20 # .. e1 :
addq $0,$20,$0 # e0 :
unop # :
extwl $0,2,$2 # e0 : begin folding the 64-bit value
zapnot $0,3,$3 # .. e1 :
extwl $0,4,$1 # e0 :
addq $2,$3,$3 # .. e1 :
extwl $0,6,$0 # e0 :
addq $3,$1,$3 # .. e1 :
addq $0,$3,$0 # e0 :
unop # :
extwl $0,2,$1 # e0 :
zapnot $0,3,$0 # .. e1 :
addq $0,$1,$0 # e0 :
unop # :
not $0,$0 # e0 :
ret # .. e1 :
.end csum_ipv6_magic
!
! Display adapter & video mode setup, version 2.9 (12-May-96)
! Display adapter & video mode setup, version 2.10 (11-Nov-96)
!
! Copyright (C) 1995, 1996 Martin Mares <mj@k332.feld.cvut.cz>
! Based on the original setup.S code (C) Linus Torvalds
! Based on the original setup.S code (C) Linus Torvalds and Mats Anderson
!
! Enable autodetection of SVGA adapters and modes
......@@ -20,6 +20,18 @@
! Enable local mode list
#undef CONFIG_VIDEO_LOCAL
! Force 400 scan lines for standard modes (hack to fix bad behaviour
! of certain broken BIOS'es -- don't use unless needed)
#undef CONFIG_VIDEO_400_HACK
! A special hack allowing to force specific BIOS mode ID along with specific
! dimensions. Especially useful for certain X-Window graphics mode hacks
! (e.g., 800x600 modes on IBM ThinkPad).
#undef CONFIG_VIDEO_GFX_HACK
#define VIDEO_GFX_BIOS_AX 0x4f02 /* 800x600 on ThinkPad */
#define VIDEO_GFX_BIOS_BX 0x0102
#define VIDEO_GFX_DUMMY_RESOLUTION 0x6425 /* 100x37 */
! This code uses an extended set of video mode numbers. These include:
! Aliases for standard modes
! NORMAL_VGA (-1)
......@@ -44,7 +56,8 @@
#define VIDEO_80x30 0x0f05
#define VIDEO_80x34 0x0f06
#define VIDEO_80x60 0x0f07
#define VIDEO_LAST_SPECIAL 0x0f08
#define VIDEO_GFX_HACK 0x0f08
#define VIDEO_LAST_SPECIAL 0x0f09
! Video modes given by resolution
#define VIDEO_FIRST_RESOLUTION 0x1000
......@@ -66,7 +79,7 @@
#define DO_STORE call store_screen
#else
#define DO_STORE
#endif
#endif /* CONFIG_VIDEO_RETAIN */
!
! This is the main entry point called by setup.S
......@@ -85,6 +98,7 @@ video: push ds ! We use different segments
mov gs,ax ! GS is zero
cld
call basic_detect ! Basic adapter type testing (EGA/VGA/MDA/CGA)
#ifdef CONFIG_VIDEO_SELECT
seg fs ! User-selected video mode
mov ax,[0x01fa]
cmp ax,#ASK_VGA ! Bring up the menu
......@@ -97,7 +111,8 @@ vid2: call mode_menu
vid1:
#ifdef CONFIG_VIDEO_RETAIN
call restore_screen ! Restore screen contents
#endif
#endif /* CONFIG_VIDEO_RETAIN */
#endif /* CONFIG_VIDEO_SELECT */
call mode_params ! Store mode parameters
pop ds ! Restore original DS
ret
......@@ -176,6 +191,8 @@ mopar2: seg fs
movb [PARAM_VIDEO_LINES],al
ret
#ifdef CONFIG_VIDEO_SELECT
!
! The video mode menu
!
......@@ -335,6 +352,8 @@ setv7: ! Video7 extended modes
stc
ret
_setrec: br setrec ! Ugly...
!
! Aliases for backward compatibility.
!
......@@ -358,7 +377,7 @@ mode_set:
cmp ah,#0xff
jz setalias
test ah,#VIDEO_RECALC>>8
jnz setrec
jnz _setrec
cmp ah,#VIDEO_FIRST_RESOLUTION>>8
jnc setres
cmp ah,#VIDEO_FIRST_SPECIAL>>8
......@@ -404,6 +423,8 @@ setspc: xor bh,bh ! Set special mode
.word 0xa7ff, spec_inits ! JMP [BX+spec_inits]
setmenu:
or al,al ! 80x25 is an exception
jz set_80x25
push bx ! Set mode chosen from menu
call mode_table ! Build the mode table
pop ax
......@@ -477,6 +498,7 @@ spec_inits:
.word set_80x30
.word set_80x34
.word set_80x60
.word set_gfx
!
! Set the 80x25 mode. If already set, do nothing.
......@@ -485,6 +507,11 @@ spec_inits:
set_80x25:
mov [force_size],#0x5019 ! Override possibly broken BIOS vars
use_80x25:
#ifdef CONFIG_VIDEO_400_HACK
mov ax,#0x1202 ! Force 400 scan lines
mov bl,#0x30
int 0x10
#else
mov ah,#0x0f ! Get current mode ID
int 0x10
cmp ax,#0x5007 ! Mode 7 (80x25 mono) is the only one available
......@@ -499,6 +526,7 @@ st80: cmpb [adapter],#0 ! CGA/MDA/HGA => mode 3/7 is always 80x25
jz set80
cmp al,#24 ! It's hopefully correct
jz set80
#endif /* CONFIG_VIDEO_400_HACK */
force3: DO_STORE
mov ax,#0x0003 ! Forced set
int 0x10
......@@ -623,6 +651,20 @@ set_80x60:
mov [force_size],#0x503c
jmp setvde
!
! Special hack for ThinkPad graphics
!
set_gfx:
#ifdef CONFIG_VIDEO_GFX_HACK
mov ax,# VIDEO_GFX_BIOS_AX
mov bx,# VIDEO_GFX_BIOS_BX
int 0x10
mov [force_size],# VIDEO_GFX_DUMMY_RESOLUTION
stc
#endif
ret
#ifdef CONFIG_VIDEO_RETAIN
!
......@@ -780,9 +822,9 @@ mode_table:
mtab1x: jmp mtab1
mtabv: lea si,vga_modes ! All modes for std VGA
mov cx,#12
rep
movsw
mov cx,#vga_modes_end-vga_modes
rep ! I'm unable to use movsw as I don't know how to store a half
movsb ! of the expression above to cx without using explicit shr.
cmpb [scanning],#0 ! Mode scan requested?
jz mscan1
......@@ -791,16 +833,16 @@ mscan1:
#ifdef CONFIG_VIDEO_LOCAL
call local_modes
#endif
#endif /* CONFIG_VIDEO_LOCAL */
#ifdef CONFIG_VIDEO_VESA
call vesa_modes ! Detect VESA VGA modes
#endif
#endif /* CONFIG_VIDEO_VESA */
#ifdef CONFIG_VIDEO_SVGA
cmpb [scanning],#0 ! Bypass when scanning
jnz mscan2
call svga_modes ! Detect SVGA cards & modes
mscan2:
#endif
#endif /* CONFIG_VIDEO_SVGA */
mtabe:
......@@ -848,6 +890,11 @@ vga_modes:
.word 0x5022 ! 80x34
.word VIDEO_80x60
.word 0x503c ! 80x60
#ifdef CONFIG_VIDEO_GFX_HACK
.word VIDEO_GFX_HACK
.word VIDEO_GFX_DUMMY_RESOLUTION
#endif
vga_modes_end:
!
! Detect VESA modes.
......@@ -1738,19 +1785,20 @@ skip10: mov al,ah
pop ax
ret
! Variables:
!
! VIDEO_SELECT-only variables
!
adapter: .byte 0 ! Video adapter: 0=CGA/MDA/HGA,1=EGA,2=VGA
mt_end: .word 0 ! End of video mode table if built
edit_buf: .space 6 ! Line editor buffer
card_name: .word 0 ! Pointer to adapter name
scanning: .byte 0 ! Performing mode scan
do_restore: .byte 0 ! Screen contents altered during mode change
svga_prefix: .byte VIDEO_FIRST_BIOS>>8 ! Default prefix for BIOS modes
video_segment: .word 0xb800 ! Video memory segment
force_size: .word 0 ! Use this size instead of the one in BIOS vars
!
! Messages:
!
keymsg: .ascii "Press <RETURN> to see video modes available, "
.ascii "<SPACE> to continue or wait 30 secs"
......@@ -1779,3 +1827,13 @@ vesa_name: .ascii "VESA"
db 0
name_bann: .ascii "Video adapter: "
db 0
#endif /* CONFIG_VIDEO_SELECT */
!
! Other variables:
!
adapter: .byte 0 ! Video adapter: 0=CGA/MDA/HGA,1=EGA,2=VGA
video_segment: .word 0xb800 ! Video memory segment
force_size: .word 0 ! Use this size instead of the one in BIOS vars
......@@ -42,6 +42,7 @@ choice 'Processor type' \
486 CONFIG_M486 \
Pentium CONFIG_M586 \
PPro CONFIG_M686" Pentium
bool 'Video mode selection support' CONFIG_VIDEO_SELECT
endmenu
source drivers/block/Config.in
......
......@@ -28,6 +28,7 @@ CONFIG_BINFMT_ELF=y
# CONFIG_M486 is not set
CONFIG_M586=y
# CONFIG_M686 is not set
# CONFIG_VIDEO_SELECT is not set
#
# Floppy, IDE, and other block devices
......@@ -43,7 +44,6 @@ 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_IDE_PCMCIA is not set
CONFIG_BLK_DEV_CMD640=y
# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
CONFIG_BLK_DEV_RZ1000=y
......@@ -144,6 +144,7 @@ CONFIG_NFS_FS=y
CONFIG_ISO9660_FS=y
# CONFIG_HPFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_UFS_FS is not set
#
......
......@@ -317,6 +317,7 @@ v86_signal_return:
RESTORE_ALL
ALIGN
tracesys:
movl $-ENOSYS,EAX(%esp)
call SYMBOL_NAME(syscall_trace)
movl ORIG_EAX(%esp),%eax
call SYMBOL_NAME(sys_call_table)(,%eax,4)
......
......@@ -232,6 +232,14 @@ static unsigned long do_slow_gettimeoffset(void)
return offset + count;
}
/*
* this is only used if we have fast gettimeoffset:
*/
void do_x86_get_fast_time(struct timeval * tv)
{
do_gettimeofday(tv);
}
static unsigned long (*do_gettimeoffset)(void) = do_slow_gettimeoffset;
/*
......@@ -465,15 +473,16 @@ void time_init(void)
needs more debugging. */
if (x86_capability & 16) {
do_gettimeoffset = do_fast_gettimeoffset;
do_get_fast_time = do_x86_get_fast_time;
if( strcmp( x86_vendor_id, "AuthenticAMD" ) == 0 ) {
if( x86 == 5 ) {
if( x86_model == 0 ) {
/* turn on cycle counters during power down */
__asm__ __volatile__ (" movl $0x83, %%ecx \n \
rdmsr \n \
.byte 0x0f,0x32 \n \
orl $1,%%eax \n \
wrmsr \n "
.byte 0x0f,0x30 \n "
: : : "ax", "cx", "dx" );
udelay(500);
}
......
# $Id: Makefile,v 1.2 1995/11/25 00:57:37 davem Exp $
# $Id: Makefile,v 1.3 1996/08/04 08:40:58 ecd Exp $
# Makefile for the Sparc low level /boot module.
#
# Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
OBJS =bare.o init_me.o ../kernel/promops.o ../lib/lib.a
BOOTLINKFLAGS = -N -Ttext 0x200000 -e _first_adr_in_text
.S.s:
$(CC) -D__ASSEMBLY__ -D__KERNEL__ -ansi -E -o $*.o $<
.S.o:
$(CC) -D__ASSEMBLY__ -D__KERNEL__ -ansi -c -o $*.o $<
all: boot
boot: $(OBJS)
$(LD) $(BOOTLINKFLAGS) $(OBJS) -o boot
boot:
@echo "Nothing special to be done for 'boot' on Linux/SPARC."
dep:
$(CPP) -M *.c > .depend
$(CPP) -M -D__ASSEMBLY__ -ansi *.S >>.depend
# $Id: config.in,v 1.12 1996/04/24 03:15:38 davem Exp $
# $Id: config.in,v 1.23 1996/10/28 01:24:40 davem Exp $
# For a description of the syntax of this configuration file,
# see the Configure script.
#
mainmenu_name "Kernel configuration of Linux for SparcStations"
mainmenu_name "Linux/SPARC Kernel Configuration"
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'
bool 'Support for AP1000 multicomputer' CONFIG_AP1000
if [ "$CONFIG_AP1000" = "n" ]; then
if [ "$CONFIG_AP1000" = "y" ]; then
define_bool CONFIG_NO_KEYBOARD y
define_bool CONFIG_APFDDI y
define_bool CONFIG_APBLOCK y
define_bool CONFIG_APBIF y
define_bool CONFIG_DDV y
else
# Global things across all Sun machines.
define_bool CONFIG_SBUS y
define_bool CONFIG_SBUSCHAR y
......@@ -20,21 +40,23 @@ if [ "$CONFIG_AP1000" = "n" ]; then
define_bool CONFIG_SUN_CONSOLE y
define_bool CONFIG_SUN_AUXIO y
define_bool CONFIG_SUN_IO y
source drivers/sbus/char/Config.in
fi
define_bool CONFIG_NET_ALIAS n
define_bool CONFIG_BINFMT_AOUT y
tristate 'Openprom tree appears in /proc/openprom (EXPERIMENTAL)' CONFIG_SUN_OPENPROMFS
bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
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
fi
endmenu
mainmenu_option next_comment
comment 'Floppy, IDE, and other block devices'
tristate 'Normal floppy disk support' CONFIG_BLK_DEV_FD
bool 'Normal floppy disk support' CONFIG_BLK_DEV_FD
bool 'Multiple devices driver support' CONFIG_BLK_DEV_MD
if [ "$CONFIG_BLK_DEV_MD" = "y" ]; then
......@@ -49,6 +71,8 @@ fi
tristate 'Loopback device support' CONFIG_BLK_DEV_LOOP
endmenu
if [ "$CONFIG_NET" = "y" ]; then
source net/Config.in
fi
......@@ -75,7 +99,8 @@ if [ "$CONFIG_SCSI" != "n" ]; then
mainmenu_option next_comment
comment 'SCSI low-level drivers'
dep_tristate 'Sparc ESP Scsi Driver' CONFIG_SCSI_SUNESP $CONFIG_SCSI
bool 'Sparc ESP Scsi Driver' CONFIG_SCSI_SUNESP $CONFIG_SCSI
endmenu
fi
endmenu
......@@ -86,16 +111,21 @@ if [ "$CONFIG_NET" = "y" ]; then
bool 'Network device support' CONFIG_NETDEVICES
if [ "$CONFIG_NETDEVICES" = "y" ]; then
tristate 'Dummy net driver support' CONFIG_DUMMY
tristate 'PPP (point-to-point) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then
comment 'CCP compressors for PPP are only built as modules.'
fi
tristate 'SLIP (serial line) support' CONFIG_SLIP
if [ "$CONFIG_SLIP" != "n" ]; then
bool ' CSLIP compressed headers' CONFIG_SLIP_COMPRESSED
bool ' Keepalive and linefill' CONFIG_SLIP_SMART
fi
tristate 'PPP (point-to-point) support' CONFIG_PPP
if [ ! "$CONFIG_PPP" = "n" ]; then
comment 'CCP compressors for PPP are only built as modules.'
bool ' Six bit SLIP encapsulation' CONFIG_SLIP_MODE_SLIP6
fi
bool 'Sun LANCE support' CONFIG_SUNLANCE
bool 'Sun Happy Meal 10/100baseT support' CONFIG_HAPPYMEAL
# bool 'FDDI driver support' CONFIG_FDDI
# if [ "$CONFIG_FDDI" = "y" ]; then
# fi
fi
endmenu
fi
......@@ -109,3 +139,4 @@ bool 'Kernel profiling support' CONFIG_PROFILE
if [ "$CONFIG_PROFILE" = "y" ]; then
int ' Profile shift count' CONFIG_PROFILE_SHIFT 2
fi
endmenu
......@@ -2,6 +2,18 @@
# Automatically generated make config: don't edit
#
#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KERNELD=y
#
# General setup
#
......@@ -15,46 +27,86 @@ CONFIG_SUN_KEYBOARD=y
CONFIG_SUN_CONSOLE=y
CONFIG_SUN_AUXIO=y
CONFIG_SUN_IO=y
# CONFIG_NET_ALIAS is not set
CONFIG_BINFMT_AOUT=y
#
# SBUS Frame Buffer support
#
SUN_FBS_IN_PROCFS=y
CONFIG_SUN_FB_DISPLAY=y
SUN_FB_CGSIX=y
SUN_FB_TCX=y
SUN_FB_CGTHREE=y
SUN_FB_CGFOURTEEN=y
SUN_FB_BWTWO=y
SUN_FB_LEO=y
TADPOLE_FB_WEITEK=y
SUN_FB_FAST_ONE=y
SUN_FB_FAST_TWO=y
SUN_FB_FAST_MONO=y
SUN_FB_GENERIC=y
#
# Misc Linux/SPARC drivers
#
CONFIG_SUN_OPENPROMIO=m
CONFIG_SUN_MOSTEK_RTC=y
CONFIG_SUN_OPENPROMFS=m
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_JAVA=m
#
# Floppy, IDE, and other block devices
#
CONFIG_BLK_DEV_FD=y
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_MD=y
CONFIG_MD_LINEAR=y
CONFIG_MD_STRIPED=y
CONFIG_BLK_DEV_RAM=y
# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_BLK_DEV_LOOP is not set
CONFIG_BLK_DEV_INITRD=y
CONFIG_BLK_DEV_LOOP=m
#
# Networking options
#
# CONFIG_FIREWALL is not set
# CONFIG_NET_ALIAS is not set
CONFIG_FIREWALL=y
CONFIG_NET_ALIAS=y
CONFIG_INET=y
# CONFIG_IP_FORWARD is not set
# CONFIG_IP_MULTICAST is not set
CONFIG_IP_FORWARD=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_FIREWALL=y
# CONFIG_IP_FIREWALL_VERBOSE is not set
CONFIG_IP_MASQUERADE=y
#
# Protocol-specific masquerading support will be built as modules.
#
# CONFIG_IP_TRANSPARENT_PROXY is not set
# CONFIG_IP_ALWAYS_DEFRAG is not set
# CONFIG_IP_ACCT is not set
# CONFIG_IP_ROUTER is not set
CONFIG_NET_IPIP=m
# CONFIG_IP_MROUTE is not set
CONFIG_IP_ALIAS=m
#
# (it is safe to leave these untouched)
#
# CONFIG_INET_PCTCP is not set
# CONFIG_INET_RARP is not set
CONFIG_INET_RARP=m
# CONFIG_NO_PATH_MTU_DISCOVERY is not set
# CONFIG_TCP_NAGLE_OFF is not set
CONFIG_IP_NOSR=y
# CONFIG_SKB_LARGE is not set
CONFIG_SKB_LARGE=y
CONFIG_IPV6=m
#
#
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
CONFIG_IPX=m
# CONFIG_IPX_INTERN is not set
CONFIG_ATALK=m
# CONFIG_AX25 is not set
# CONFIG_BRIDGE is not set
# CONFIG_NETLINK is not set
......@@ -68,9 +120,9 @@ CONFIG_SCSI=y
# SCSI support type (disk, tape, CDrom)
#
CONFIG_BLK_DEV_SD=y
# CONFIG_CHR_DEV_ST is not set
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
# CONFIG_CHR_DEV_SG is not set
CONFIG_CHR_DEV_SG=y
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
......@@ -87,34 +139,47 @@ CONFIG_SCSI_SUNESP=y
# Network device support
#
CONFIG_NETDEVICES=y
CONFIG_DUMMY=y
# CONFIG_SLIP is not set
# CONFIG_PPP is not set
CONFIG_DUMMY=m
CONFIG_PPP=m
#
# CCP compressors for PPP are only built as modules.
#
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
# CONFIG_SLIP_MODE_SLIP6 is not set
CONFIG_SUNLANCE=y
CONFIG_HAPPYMEAL=y
#
# Filesystems
#
# CONFIG_QUOTA is not set
# CONFIG_MINIX_FS is not set
# CONFIG_EXT_FS is not set
CONFIG_QUOTA=y
CONFIG_MINIX_FS=m
CONFIG_EXT_FS=m
CONFIG_EXT2_FS=y
# CONFIG_XIA_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_UMSDOS_FS is not set
CONFIG_XIA_FS=m
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_UMSDOS_FS=m
CONFIG_PROC_FS=y
CONFIG_NFS_FS=y
CONFIG_ROOT_NFS=y
CONFIG_RNFS_BOOTP=y
CONFIG_RNFS_RARP=y
# CONFIG_SMB_FS is not set
CONFIG_SMB_FS=m
CONFIG_SMB_LONG=y
CONFIG_NCP_FS=m
CONFIG_ISO9660_FS=y
# CONFIG_HPFS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_AFFS_FS is not set
CONFIG_HPFS_FS=m
CONFIG_SYSV_FS=m
CONFIG_AFFS_FS=m
CONFIG_AMIGA_PARTITION=y
CONFIG_UFS_FS=y
CONFIG_BSD_DISKLABEL=y
CONFIG_SMD_DISKLABEL=y
#
# Kernel hacking
......
# $Id: Makefile,v 1.30 1996/04/22 10:37:53 davem Exp $
# $Id: Makefile,v 1.34 1996/09/21 04:07:31 davem Exp $
# Makefile for the linux kernel.
#
# Note! Dependencies are done automagically by 'make dep', which also
......@@ -31,11 +31,14 @@ all: kernel.o head.o
O_TARGET := kernel.o
IRQ_OBJS := irq.o sun4m_irq.o sun4c_irq.o
O_OBJS := entry.o wof.o wuf.o etrap.o rtrap.o switch.o traps.o ${IRQ_OBJS} \
O_OBJS := entry.o wof.o wuf.o etrap.o rtrap.o traps.o ${IRQ_OBJS} \
process.o signal.o ioport.o setup.o idprom.o \
sys_sparc.o sunos_asm.o sparc-stub.o systbls.o sys_sunos.o \
sunos_ioctl.o time.o windows.o cpu.o devices.o ksyms.o \
sclow.o solaris.o tadpole.o tick14.o ptrace.o
sunos_ioctl.o time.o windows.o cpu.o devices.o \
sclow.o solaris.o tadpole.o tick14.o ptrace.o sys_solaris.o \
unaligned.o
OX_OBJS := sparc_ksyms.o
ifdef SMP
O_OBJS += trampoline.o smp.o rirq.o
......
......@@ -5,6 +5,7 @@
#include <asm/oplib.h>
#include <asm/io.h>
#include <asm/auxio.h>
/* Probe and map in the Auxiliary I/O register */
unsigned char *auxio_register;
......@@ -15,6 +16,10 @@ auxio_probe(void)
int node, auxio_nd;
struct linux_prom_registers auxregs[1];
if (sparc_cpu_model == sun4d) {
auxio_register = 0;
return;
}
node = prom_getchild(prom_root_node);
auxio_nd = prom_searchsiblings(node, "auxiliary-io");
if(!auxio_nd) {
......@@ -37,4 +42,6 @@ auxio_probe(void)
if((((unsigned long) auxregs[0].phys_addr) & 3) == 3 ||
sparc_cpu_model == sun4c)
auxio_register = (unsigned char *) ((int)auxio_register | 3);
TURN_ON_LED;
}
......@@ -66,6 +66,7 @@ struct cpu_fp_info linux_sparc_fpu[] = {
{ 5, 5, "reserved"},
{ 5, 6, "reserved"},
{ 5, 7, "No FPU"},
{ 9, 3, "Weitek on-chip FPU"},
};
#define NSPARCFPU (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info))
......@@ -100,7 +101,10 @@ struct cpu_iu_info linux_sparc_chips[] = {
{ 7, 0, "Harvest VLSI Design Center, Inc. - unknown"},
/* Gallium arsenide 200MHz, BOOOOGOOOOMIPS!!! */
{ 8, 0, "Systems and Processes Engineering Corporation (SPEC)"},
{ 9, 0, "Fujitsu #3"},
{ 9, 0, "Weitek Power-UP"},
{ 9, 1, "Weitek Power-UP"},
{ 9, 2, "Weitek Power-UP"},
{ 9, 3, "Weitek Power-UP"},
{ 0xa, 0, "UNKNOWN CPU-VENDOR/TYPE"},
{ 0xb, 0, "UNKNOWN CPU-VENDOR/TYPE"},
{ 0xc, 0, "UNKNOWN CPU-VENDOR/TYPE"},
......
......@@ -18,6 +18,7 @@ int linux_num_cpus;
extern void cpu_probe(void);
extern void clock_stop_probe(void); /* tadpole.c */
extern void sun4c_probe_memerr_reg(void);
unsigned long
device_scan(unsigned long mem_start)
......@@ -30,7 +31,7 @@ device_scan(unsigned long mem_start)
#if CONFIG_AP1000
printk("Not scanning device list for CPUs\n");
linux_num_cpus = 1;
return;
return mem_start;
#endif
prom_getstring(prom_root_node, "device_type", node_str, sizeof(node_str));
......@@ -76,5 +77,8 @@ device_scan(unsigned long mem_start)
#endif
clock_stop_probe();
if (sparc_cpu_model == sun4c)
sun4c_probe_memerr_reg();
return mem_start;
}
This diff is collapsed.
/* $Id: etrap.S,v 1.18 1996/04/25 06:08:35 davem Exp $
/* $Id: etrap.S,v 1.21 1996/10/11 00:59:40 davem Exp $
* etrap.S: Sparc trap window preparation for entry into the
* Linux kernel.
*
......@@ -23,7 +23,7 @@
#define t_kstack l5 /* Set right before pt_regs frame is built */
#define t_retpc l6 /* If you change this, change winmacro.h header file */
#define t_systable l7 /* Never touch this, could be the syscall table ptr. */
#define curptr g4 /* Set after pt_regs frame is built */
#define curptr g6 /* Set after pt_regs frame is built */
.text
.align 4
......@@ -78,10 +78,9 @@ trap_setup:
* or kernel and branch conditionally.
*/
mov 1, %t_twinmask
sll %t_twinmask, %t_psr, %t_twinmask ! t_twinmask = (1 << psr)
andcc %t_psr, PSR_PS, %g0 ! fromsupv_p = (psr & PSR_PS)
be trap_setup_from_user ! nope, from user mode
nop
sll %t_twinmask, %t_psr, %t_twinmask ! t_twinmask = (1 << psr)
/* From kernel, allocate more kernel stack and
* build a pt_regs trap frame.
......@@ -94,8 +93,7 @@ trap_setup:
be 1f
nop
b trap_setup_kernel_spill ! in trap window, clean up
nop
b,a trap_setup_kernel_spill ! in trap window, clean up
/* Trap from kernel with a window available.
* Just do it...
......@@ -105,7 +103,6 @@ trap_setup:
mov %t_kstack, %sp ! jump onto new stack
trap_setup_kernel_spill:
LOAD_CURRENT(curptr, g1)
ld [%curptr + THREAD_UMASK], %g1
orcc %g0, %g1, %g0
bne trap_setup_user_spill ! there are some user windows, yuck
......@@ -123,7 +120,6 @@ tsetup_patch2: and %g2, 0xff, %g2 ! patched on 7 window Sparcs
/* Set new %wim value */
wr %g2, 0x0, %wim
WRITE_PAUSE
/* Save the kernel window onto the corresponding stack. */
STORE_WINDOW(sp)
......@@ -198,7 +194,6 @@ tsetup_patch6: and %g2, 0xff, %g2 ! patched on 7win Sparcs
save %g0, %g0, %g0
wr %g2, 0x0, %wim
WRITE_PAUSE
/* Call MMU-architecture dependent stack checking
* routine.
......@@ -239,8 +234,7 @@ C_LABEL(tsetup_sun4c_stackchk):
be 1f
sra %sp, 29, %glob_tmp
b trap_setup_user_stack_is_bolixed
nop
b,a trap_setup_user_stack_is_bolixed
1:
add %glob_tmp, 0x1, %glob_tmp
......@@ -248,8 +242,7 @@ C_LABEL(tsetup_sun4c_stackchk):
be 1f
and %sp, 0xfff, %glob_tmp ! delay slot
b trap_setup_user_stack_is_bolixed
nop
b,a trap_setup_user_stack_is_bolixed
/* See if our dump area will be on more than one
* page.
......@@ -267,8 +260,7 @@ tsetup_sun4c_twopages:
be 1f
add %sp, 0x38, %glob_tmp /* Is second page in vma hole? */
b trap_setup_user_stack_is_bolixed
nop
b,a trap_setup_user_stack_is_bolixed
1:
sra %glob_tmp, 29, %glob_tmp
......@@ -277,8 +269,7 @@ tsetup_sun4c_twopages:
be 1f
add %sp, 0x38, %glob_tmp
b trap_setup_user_stack_is_bolixed
nop
b,a trap_setup_user_stack_is_bolixed
1:
lda [%glob_tmp] ASI_PTE, %glob_tmp
......@@ -289,20 +280,25 @@ tsetup_sun4c_onepage:
be trap_setup_good_ustack ! success
nop
b trap_setup_user_stack_is_bolixed
nop
b,a trap_setup_user_stack_is_bolixed
.globl C_LABEL(tsetup_srmmu_stackchk)
C_LABEL(tsetup_srmmu_stackchk):
/* Check results of callers andcc %sp, 0x7, %g0 */
bne trap_setup_user_stack_is_bolixed
sethi %hi(KERNBASE), %glob_tmp
sethi %hi(C_LABEL(page_offset)), %glob_tmp
be 1f
ld [%glob_tmp + %lo(C_LABEL(page_offset))], %glob_tmp
b,a trap_setup_user_stack_is_bolixed
1:
cmp %glob_tmp, %sp
bleu trap_setup_user_stack_is_bolixed
nop
bgu,a 1f
lda [%g0] ASI_M_MMUREGS, %glob_tmp ! read MMU control
b,a trap_setup_user_stack_is_bolixed
1:
/* Clear the fault status and turn on the no_fault bit. */
lda [%g0] ASI_M_MMUREGS, %glob_tmp ! read MMU control
or %glob_tmp, 0x2, %glob_tmp ! or in no_fault bit
sta %glob_tmp, [%g0] ASI_M_MMUREGS ! set it
......@@ -317,9 +313,7 @@ C_LABEL(tsetup_srmmu_stackchk):
mov AC_M_SFSR, %glob_tmp
lda [%glob_tmp] ASI_M_MMUREGS, %glob_tmp ! save away status of winstore
andcc %glob_tmp, 0x2, %g0 ! did we fault?
be trap_setup_finish_up ! cool beans, success
nop
b trap_setup_user_stack_is_bolixed ! we faulted, ugh
nop
be,a trap_setup_finish_up + 0x4 ! cool beans, success
restore %g0, %g0, %g0
b,a trap_setup_user_stack_is_bolixed ! we faulted, ugh
This diff is collapsed.
/* $Id: idprom.c,v 1.19 1996/04/25 06:08:41 davem Exp $
/* $Id: idprom.c,v 1.21 1996/10/12 13:12:48 davem Exp $
* idprom.c: Routines to load the idprom into kernel addresses and
* interpret the data contained within.
*
* Because they use the IDPROM's machine type field, some of the
* virtual address cache probings on the sun4c are done here.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
*/
......@@ -14,10 +11,9 @@
#include <asm/oplib.h>
#include <asm/idprom.h>
#include <asm/machines.h> /* Fun with Sun released architectures. */
#include <asm/system.h> /* For halt() macro */
struct idp_struct *idprom;
static struct idp_struct idprom_buff;
struct idprom *idprom;
static struct idprom idprom_buffer;
/* Here is the master table of Sun machines which use some implementation
* of the Sparc CPU and have a meaningful IDPROM machtype value that we
......@@ -44,127 +40,61 @@ struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
/* One entry for the OBP arch's which are sun4d, sun4e, and newer sun4m's */
{ "Sun4M OBP based system", (SM_SUN4M_OBP | 0x0) } };
void
sparc_display_systype(unsigned char machtyp)
static void display_system_type(unsigned char machtype)
{
char system_name[128];
int i;
char sysname[128];
register int i;
for(i = 0; i<NUM_SUN_MACHINES; i++) {
if(Sun_Machines[i].id_machtype == machtyp) {
if(machtyp!=(SM_SUN4M_OBP | 0x0)) {
for (i = 0; i < NUM_SUN_MACHINES; i++) {
if(Sun_Machines[i].id_machtype == machtype) {
if (machtype != (SM_SUN4M_OBP | 0x00))
printk("TYPE: %s\n", Sun_Machines[i].name);
break;
} else {
else {
prom_getproperty(prom_root_node, "banner-name",
system_name, sizeof(system_name));
printk("TYPE: %s\n", system_name);
break;
sysname, sizeof(sysname));
printk("TYPE: %s\n", sysname);
}
return;
}
}
if(i == NUM_SUN_MACHINES)
printk("Uh oh, IDPROM had bogus id_machtype value <%x>\n", machtyp);
return;
prom_printf("IDPROM: Bogus id_machtype value, 0x%x\n", machtype);
prom_halt();
}
void
get_idprom(void)
/* Calculate the IDPROM checksum (xor of the data bytes). */
static unsigned char calc_idprom_cksum(struct idprom *idprom)
{
prom_getidp((char *) &idprom_buff, sizeof(idprom_buff));
idprom = &idprom_buff;
sparc_display_systype(idprom->id_machtype);
unsigned char cksum, i, *ptr = (unsigned char *)idprom;
printk("Ethernet address: %x:%x:%x:%x:%x:%x\n",
idprom->id_eaddr[0], idprom->id_eaddr[1], idprom->id_eaddr[2],
idprom->id_eaddr[3], idprom->id_eaddr[4], idprom->id_eaddr[5]);
for (i = cksum = 0; i <= 0x0E; i++)
cksum ^= *ptr++;
return;
return cksum;
}
/* find_vac_size() returns the number of bytes in the VAC (virtual
* address cache) on this machine.
*/
int
find_vac_size(void)
/* Create a local IDPROM copy, verify integrity, and display information. */
void idprom_init(void)
{
int vac_prop_len;
int vacsize = 0;
vac_prop_len = prom_getproplen(prom_root_node, "vac-size");
if(vac_prop_len != -1) {
vacsize = prom_getint(prom_root_node, "vac-size");
return vacsize;
} else {
switch(idprom->id_machtype) {
case (SM_SUN4C | SM_4C_SS1): /* SparcStation1 */
case (SM_SUN4C | SM_4C_IPC): /* SparcStation IPX */
case (SM_SUN4C | SM_4C_SS1PLUS): /* SparcStation1+ */
case (SM_SUN4C | SM_4C_SLC): /* SparcStation SLC */
case (SM_SUN4C | SM_4C_SS2): /* SparcStation2 Cache-Chip BUG! */
case (SM_SUN4C | SM_4C_ELC): /* SparcStation ELC */
case (SM_SUN4C | SM_4C_IPX): /* SparcStation IPX */
return 65536;
default:
printk("find_vac_size: Can't determine size of VAC, bailing out...\n");
halt();
break;
};
};
return -1;
}
prom_get_idprom((char *) &idprom_buffer, sizeof(idprom_buffer));
/* find_vac_linesize() returns the size in bytes of the VAC linesize */
idprom = &idprom_buffer;
int
find_vac_linesize(void)
{
int vac_prop_len;
vac_prop_len = prom_getproplen(prom_root_node, "vac-linesize");
if(vac_prop_len != -1)
return prom_getint(prom_root_node, "vac-linesize");
else {
switch(idprom->id_machtype) {
case (SM_SUN4C | SM_4C_SS1): /* SparcStation1 */
case (SM_SUN4C | SM_4C_IPC): /* SparcStation IPC */
case (SM_SUN4C | SM_4C_SS1PLUS): /* SparcStation1+ */
case (SM_SUN4C | SM_4C_SLC): /* SparcStation SLC */
return 16;
case (SM_SUN4C | SM_4C_SS2): /* SparcStation2 Cache-Chip BUG! */
case (SM_SUN4C | SM_4C_ELC): /* SparcStation ELC */
case (SM_SUN4C | SM_4C_IPX): /* SparcStation IPX */
return 32;
default:
printk("find_vac_linesize: Can't determine VAC linesize, bailing out...\n");
halt();
break;
};
};
return -1;
}
int
find_vac_hwflushes(void)
{
register int len;
int tmp1, tmp2;
if (idprom->id_format != 0x01) {
prom_printf("IDPROM: Unknown format type!\n");
prom_halt();
}
/* Sun 4/75 has typo in prom_node, it's a dash instead of an underscore
* in the property name. :-(
*/
len = prom_getproperty(prom_root_node, "vac_hwflush",
(char *) &tmp1, sizeof(int));
if(len != 4) tmp1=0;
if (idprom->id_cksum != calc_idprom_cksum(idprom)) {
prom_printf("IDPROM: Checksum failure (nvram=%x, calc=%x)!\n",
idprom->id_cksum, calc_idprom_cksum(idprom));
prom_halt();
}
len = prom_getproperty(prom_root_node, "vac-hwflush",
(char *) &tmp2, sizeof(int));
if(len != 4) tmp2=0;
display_system_type(idprom->id_machtype);
return (tmp1|tmp2);
printk("Ethernet address: %x:%x:%x:%x:%x:%x\n",
idprom->id_ethaddr[0], idprom->id_ethaddr[1],
idprom->id_ethaddr[2], idprom->id_ethaddr[3],
idprom->id_ethaddr[4], idprom->id_ethaddr[5]);
}
/* $Id: ioport.c,v 1.18 1996/04/25 06:08:44 davem Exp $
/* $Id: ioport.c,v 1.22 1996/10/11 00:59:46 davem Exp $
* ioport.c: Simple io mapping allocator.
*
* Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
......@@ -9,8 +9,6 @@
* are administered by a general purpose allocator, and then you call
* that allocator with your handle and the block size instead of this
* weak stuff.
*
* XXX No joke, this needs to be rewritten badly. XXX
*/
#include <linux/sched.h>
......@@ -27,8 +25,8 @@
#include <asm/pgtable.h>
/* This points to the next to use virtual memory for io mappings */
static long next_free_region = IOBASE_VADDR;
static long dvma_next_free = DVMA_VADDR;
static unsigned long dvma_next_free = DVMA_VADDR;
unsigned long sparc_iobase_vaddr = IOBASE_VADDR;
/*
* sparc_alloc_io:
......@@ -54,23 +52,30 @@ void *sparc_alloc_io (void *address, void *virtual, int len, char *name,
unsigned long addr = (unsigned long) address;
unsigned long offset = (addr & (~PAGE_MASK));
if (virtual)
if (virtual) {
vaddr = (unsigned long) virtual;
else
vaddr = next_free_region;
len += offset;
if(((unsigned long) virtual + len) > (IOBASE_VADDR + IOBASE_LEN)) {
prom_printf("alloc_io: Mapping outside IOBASE area\n");
prom_halt();
}
if(check_region ((vaddr | offset), len)) {
prom_printf("alloc_io: 0x%lx is already in use\n", vaddr);
prom_halt();
}
/* Tell Linux resource manager about the mapping */
request_region ((vaddr | offset), len, name);
len += offset;
if(((unsigned long) virtual + len) > (IOBASE_VADDR + IOBASE_LEN)) {
prom_printf("alloc_io: Mapping outside IOBASE area\n");
prom_halt();
}
if(check_region ((vaddr | offset), len)) {
prom_printf("alloc_io: 0x%lx is already in use\n", vaddr);
prom_halt();
}
/* Tell Linux resource manager about the mapping */
request_region ((vaddr | offset), len, name);
} else {
vaddr = occupy_region(sparc_iobase_vaddr, IOBASE_END,
(offset + len + PAGE_SIZE-1) & PAGE_MASK, PAGE_SIZE, name);
if (vaddr == 0) {
/* Usually we cannot see printks in this case. */
prom_printf("alloc_io: cannot occupy %d region\n", len);
prom_halt();
}
}
base_address = vaddr;
/* Do the actual mapping */
......@@ -78,12 +83,24 @@ void *sparc_alloc_io (void *address, void *virtual, int len, char *name,
mapioaddr(addr, vaddr, bus_type, rdonly);
vaddr += PAGE_SIZE;
addr += PAGE_SIZE;
if (!virtual)
next_free_region += PAGE_SIZE;
}
return (void *) (base_address | offset);
}
void sparc_free_io (void *virtual, int len)
{
unsigned long vaddr = (unsigned long) virtual & PAGE_MASK;
unsigned long plen = (((unsigned long)virtual & ~PAGE_MASK) + len + PAGE_SIZE-1) & PAGE_MASK;
release_region(vaddr, plen);
for (; plen != 0;) {
plen -= PAGE_SIZE;
unmapioaddr(vaddr + plen);
}
}
/* Does DVMA allocations with PAGE_SIZE granularity. How this basically
* works is that the ESP chip can do DVMA transfers at ANY address with
* certain size and boundary restrictions. But other devices that are
......@@ -109,9 +126,10 @@ void *sparc_dvma_malloc (int len, char *name)
/* Basically these can be mapped just like any old
* IO pages, cacheable bit off, etc. The physical
* pages are pre-mapped in paging_init()
* pages are now mapped dynamically to save space.
*/
base_address = vaddr;
mmu_map_dma_area(base_address, len);
/* Assign the memory area. */
dvma_next_free = PAGE_ALIGN(dvma_next_free+len);
......
/* $Id: irq.c,v 1.44 1996/04/25 06:08:46 davem Exp $
/* $Id: irq.c,v 1.53 1996/10/16 12:30:18 zaitcev Exp $
* arch/sparc/kernel/irq.c: Interrupt request handling routines. On the
* Sparc the IRQ's are basically 'cast in stone'
* and you are supposed to probe the prom's device
......@@ -19,6 +19,7 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/malloc.h>
#include <linux/random.h>
#include <asm/ptrace.h>
#include <asm/processor.h>
......@@ -32,6 +33,7 @@
#include <asm/traps.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/pgtable.h>
/*
* Dave Redman (djhr@tadpole.co.uk)
......@@ -158,7 +160,7 @@ void free_irq(unsigned int irq, void *dev_id)
return;
}
save_flags(flags); cli();
save_and_cli(flags);
if (action && tmp)
tmp->next = action->next;
else
......@@ -184,11 +186,13 @@ void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs)
printk("IO device interrupt, irq = %d\n", irq);
printk("PC = %08lx NPC = %08lx FP=%08lx\n", regs->pc,
regs->npc, regs->u_regs[14]);
printk("Expecting: ");
for (i = 0; i < 16; i++)
if (action->handler)
prom_printf("[%s:%d:0x%x] ", action->name, (int) i,
(unsigned int) action->handler);
if (action) {
printk("Expecting: ");
for (i = 0; i < 16; i++)
if (action->handler)
prom_printf("[%s:%d:0x%x] ", action->name,
(int) i, (unsigned int) action->handler);
}
printk("AIEEE\n");
panic("bogus interrupt received");
}
......@@ -204,46 +208,12 @@ void handler_irq(int irq, struct pt_regs * regs)
#if 0
printk("I<%d,%d,%d>", smp_processor_id(), irq, smp_proc_in_lock[smp_processor_id()]);
#endif
while (action) {
if (!action->handler)
unexpected_irq(irq, action->dev_id, regs);
else
action->handler(irq, action->dev_id, regs);
action = action->next;
}
}
/*
* do_IRQ handles IRQ's that have been installed without the
* SA_INTERRUPT flag: it uses the full signal-handling return
* and runs with other interrupts enabled. All relatively slow
* IRQ's should use this format: notably the keyboard/timer
* routines.
*/
asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
{
struct irqaction * action;
unsigned int cpu_irq;
cpu_irq = irq & NR_IRQS;
action = *(cpu_irq + irq_action);
kstat.interrupts[cpu_irq]++;
while (action) {
do {
if (!action || !action->handler)
unexpected_irq(irq, 0, regs);
action->handler(irq, action->dev_id, regs);
action = action->next;
}
}
/*
* do_fast_IRQ handles IRQ's that don't need the fancy interrupt return
* stuff - the handler is also running with interrupts disabled unless
* it explicitly enables them later.
*/
asmlinkage void do_fast_IRQ(int irq)
{
kstat.interrupts[irq&NR_IRQS]++;
printk("Got FAST_IRQ number %04lx\n", (long unsigned int) irq);
return;
} while (action);
}
/* Fast IRQ's on the Sparc can only have one routine attached to them,
......@@ -256,6 +226,10 @@ int request_fast_irq(unsigned int irq,
struct irqaction *action;
unsigned long flags;
unsigned int cpu_irq;
#ifdef __SMP__
struct tt_entry *trap_table;
extern struct tt_entry trapbase_cpu1, trapbase_cpu2, trapbase_cpu3;
#endif
cpu_irq = irq & NR_IRQS;
if(cpu_irq > 14)
......@@ -273,7 +247,7 @@ int request_fast_irq(unsigned int irq,
return -EBUSY;
}
save_flags(flags); cli();
save_and_cli(flags);
/* If this is flagged as statically allocated then we use our
* private struct which is never freed.
......@@ -295,12 +269,27 @@ int request_fast_irq(unsigned int irq,
}
/* Dork with trap table if we get this far. */
sparc_ttable[SP_TRAP_IRQ1+(cpu_irq-1)].inst_one =
SPARC_BRANCH((unsigned long) handler,
(unsigned long) &sparc_ttable[SP_TRAP_IRQ1+(irq-1)].inst_one);
sparc_ttable[SP_TRAP_IRQ1+(cpu_irq-1)].inst_two = SPARC_RD_PSR_L0;
sparc_ttable[SP_TRAP_IRQ1+(cpu_irq-1)].inst_three = SPARC_NOP;
sparc_ttable[SP_TRAP_IRQ1+(cpu_irq-1)].inst_four = SPARC_NOP;
#define INSTANTIATE(table) \
table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_one = SPARC_RD_PSR_L0; \
table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_two = \
SPARC_BRANCH((unsigned long) handler, \
(unsigned long) &table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_two);\
table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_three = SPARC_RD_WIM_L3; \
table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_four = SPARC_NOP;
INSTANTIATE(sparc_ttable)
#ifdef __SMP__
trap_table = &trapbase_cpu1; INSTANTIATE(trap_table)
trap_table = &trapbase_cpu2; INSTANTIATE(trap_table)
trap_table = &trapbase_cpu3; INSTANTIATE(trap_table)
#endif
#undef INSTANTIATE
/*
* XXX Correct thing whould be to flush only I- and D-cache lines
* which contain the handler in question. But as of time of the
* writing we have no CPU-neutral interface to fine-grained flushes.
*/
flush_cache_all();
action->handler = handler;
action->flags = irqflags;
......@@ -342,7 +331,7 @@ int request_irq(unsigned int irq,
}
}
save_flags(flags); cli();
save_and_cli(flags);
/* If this is flagged as statically allocated then we use our
* private struct which is never freed.
......
This diff is collapsed.
This diff is collapsed.
......@@ -21,6 +21,7 @@
#define twin_tmp1 l4
#define twin_tmp2 l5
#define twin_tmp3 l6
#define curptr g6
/* 7 WINDOW SPARC PATCH INSTRUCTIONS */
.globl rirq_7win_patch1, rirq_7win_patch2, rirq_7win_patch3
......@@ -44,8 +45,7 @@ ret_irq_user:
wr %t_psr, 0x0, %psr
WRITE_PAUSE
LOAD_CURRENT(twin_tmp2, twin_tmp1)
ld [%twin_tmp2 + THREAD_W_SAVED], %twin_tmp1
ld [%curptr + THREAD_W_SAVED], %twin_tmp1
orcc %g0, %twin_tmp1, %g0
be ret_irq_nobufwins
nop
......@@ -62,7 +62,7 @@ ret_irq_user:
/* We have klock, so we must return just like a normal trap. */
b ret_trap_entry
nop
clr %l5
ret_irq_nobufwins:
/* Load up the user's out registers so we can pull
......@@ -73,7 +73,7 @@ ret_irq_nobufwins:
/* If there are already live user windows in the
* set we can return from trap safely.
*/
ld [%twin_tmp2 + THREAD_UMASK], %twin_tmp1
ld [%curptr + THREAD_UMASK], %twin_tmp1
orcc %g0, %twin_tmp1, %g0
bne ret_irq_userwins_ok
nop
......@@ -135,7 +135,7 @@ ret_irq_unaligned_pc:
/* We have klock, so we must return just like a normal trap. */
b ret_trap_entry
nop
clr %l5
ret_irq_kernel:
wr %t_psr, 0x0, %psr
......@@ -191,15 +191,14 @@ ret_irq_user_stack_is_bolixed:
/* We have klock, so we must return just like a normal trap. */
b ret_trap_entry
nop
clr %l5
.globl C_LABEL(sun4c_reti_stackchk)
C_LABEL(sun4c_reti_stackchk):
be 1f
and %fp, 0xfff, %g1 ! delay slot
b ret_irq_user_stack_is_bolixed
nop
b,a ret_irq_user_stack_is_bolixed
/* See if we have to check the sanity of one page or two */
1:
......@@ -211,8 +210,7 @@ C_LABEL(sun4c_reti_stackchk):
andncc %g1, 0xff8, %g0
/* %sp is in vma hole, yuck */
b ret_irq_user_stack_is_bolixed
nop
b,a ret_irq_user_stack_is_bolixed
1:
be sun4c_reti_onepage /* Only one page to check */
......@@ -227,8 +225,7 @@ sun4c_reti_twopages:
lda [%g1] ASI_PTE, %g2
/* Second page is in vma hole */
b ret_irq_user_stack_is_bolixed
nop
b,a ret_irq_user_stack_is_bolixed
1:
srl %g2, 29, %g2
......@@ -237,8 +234,7 @@ sun4c_reti_twopages:
lda [%fp] ASI_PTE, %g2
/* Second page has bad perms */
b ret_irq_user_stack_is_bolixed
nop
b,a ret_irq_user_stack_is_bolixed
sun4c_reti_onepage:
srl %g2, 29, %g2
......@@ -247,8 +243,7 @@ sun4c_reti_onepage:
nop
/* A page had bad page permissions, losing... */
b ret_irq_user_stack_is_bolixed
nop
b,a ret_irq_user_stack_is_bolixed
/* Whee, things are ok, load the window and continue. */
1:
......@@ -257,13 +252,13 @@ sun4c_reti_onepage:
LOAD_WINDOW(sp)
save %g0, %g0, %g0
b ret_irq_userwins_ok
nop
b,a ret_irq_userwins_ok
.globl C_LABEL(srmmu_reti_stackchk)
C_LABEL(srmmu_reti_stackchk):
sethi %hi(C_LABEL(page_offset)), %g1
bne ret_irq_user_stack_is_bolixed
sethi %hi(KERNBASE), %g1
ld [%g1 + %lo(C_LABEL(page_offset))], %g1
cmp %g1, %fp
bleu ret_irq_user_stack_is_bolixed
mov AC_M_SFSR, %g1
......@@ -291,5 +286,4 @@ C_LABEL(srmmu_reti_stackchk):
bne ret_irq_user_stack_is_bolixed
nop
b ret_irq_userwins_ok
nop
b,a ret_irq_userwins_ok
This diff is collapsed.
......@@ -99,6 +99,7 @@ LABEL(umask):
sth %l4, [%l5 + 4]
CC_AND_RETT
#if 0
.globl LABEL(write)
LABEL(write):
cmp %i0, 255 /* fd >= NR_OPEN */
......@@ -175,6 +176,7 @@ write_is_too_hard:
write_error_return:
SC_AND_RETT
#endif
/* XXX sys_nice() XXX */
/* XXX sys_setpriority() XXX */
......
This diff is collapsed.
This diff is collapsed.
......@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/tasks.h>
#include <linux/smp.h>
#include <linux/interrupt.h>
#include <asm/delay.h>
#include <asm/irq.h>
......@@ -91,18 +92,12 @@ static char smp_buf[512];
char *smp_info(void)
{
sprintf(smp_buf,
"\n CPU0\t\tCPU1\t\tCPU2\t\tCPU3\n"
"State: %s\t\t%s\t\t%s\t\t%s\n"
"Lock: %08lx\t\t%08lx\t%08lx\t%08lx\n"
"\n"
"klock: %x\n",
(cpu_present_map & 1) ? ((active_kernel_processor == 0) ? "akp" : "online") : "offline",
(cpu_present_map & 2) ? ((active_kernel_processor == 1) ? "akp" : "online") : "offline",
(cpu_present_map & 4) ? ((active_kernel_processor == 2) ? "akp" : "online") : "offline",
(cpu_present_map & 8) ? ((active_kernel_processor == 3) ? "akp" : "online") : "offline",
smp_proc_in_lock[0], smp_proc_in_lock[1], smp_proc_in_lock[2],
smp_proc_in_lock[3],
kernel_flag);
" CPU0\t\tCPU1\t\tCPU2\t\tCPU3\n"
"State: %s\t\t%s\t\t%s\t\t%s\n",
(cpu_present_map & 1) ? ((active_kernel_processor == 0) ? "akp" : "online") : "offline",
(cpu_present_map & 2) ? ((active_kernel_processor == 1) ? "akp" : "online") : "offline",
(cpu_present_map & 4) ? ((active_kernel_processor == 2) ? "akp" : "online") : "offline",
(cpu_present_map & 8) ? ((active_kernel_processor == 3) ? "akp" : "online") : "offline");
return smp_buf;
}
......@@ -169,8 +164,11 @@ void smp_callin(void)
local_flush_tlb_all();
/* Fix idle thread fields. */
__asm__ __volatile__("ld [%0], %%g6\n\t"
: : "r" (&current_set[smp_processor_id()])
: "memory" /* paranoid */);
current->mm->mmap->vm_page_prot = PAGE_SHARED;
current->mm->mmap->vm_start = KERNBASE;
current->mm->mmap->vm_start = PAGE_OFFSET;
current->mm->mmap->vm_end = init_task.mm->mmap->vm_end;
local_flush_cache_all();
......@@ -197,7 +195,7 @@ void smp_boot_cpus(void)
int cpucount = 0;
int i = 0;
printk("Entering SparclinuxMultiPenguin(SMP) Mode...\n");
printk("Entering SMP Mode...\n");
penguin_ctable.which_io = 0;
penguin_ctable.phys_addr = (char *) srmmu_ctx_table_phys;
......@@ -252,7 +250,7 @@ void smp_boot_cpus(void)
cpu_number_map[i] = i;
cpu_logical_map[i] = i;
} else {
printk("Penguin %d is stuck in the bottle.\n", i);
printk("Processor %d is stuck.\n", i);
}
}
if(!(cpu_callin_map[i])) {
......@@ -262,7 +260,7 @@ void smp_boot_cpus(void)
}
local_flush_cache_all();
if(cpucount == 0) {
printk("Error: only one Penguin found.\n");
printk("Error: only one Processor found.\n");
cpu_present_map = (1 << smp_processor_id());
} else {
unsigned long bogosum = 0;
......@@ -270,7 +268,7 @@ void smp_boot_cpus(void)
if(cpu_present_map & (1 << i))
bogosum += cpu_data[i].udelay_val;
}
printk("Total of %d Penguins activated (%lu.%02lu PenguinMIPS).\n",
printk("Total of %d Processors activated (%lu.%02lu BogoMIPS).\n",
cpucount + 1,
(bogosum + 2500)/500000,
((bogosum + 2500)/5000)%100);
......@@ -299,10 +297,7 @@ static inline void send_ipi(unsigned long target_map, int irq)
* A processor may get stuck with irq's off waiting to send a message and
* thus not replying to the person spinning for a reply....
*
* In the end invalidate ought to be the NMI and a very very short
* function (to avoid the old IDE disk problems), and other messages sent
* with IRQ's enabled in a civilised fashion. That will also boost
* performance.
* On the Sparc we use NMI's for all messages except reschedule.
*/
static volatile int message_cpu = NO_PROC_ID;
......@@ -404,7 +399,7 @@ void smp_message_pass(int target, int msg, unsigned long data, int wait)
return;
}
smp_cpu_in_msg[p]--;
smp_swap(&message_cpu, NO_PROC_ID);
message_cpu = NO_PROC_ID;
}
struct smp_funcall {
......@@ -444,7 +439,7 @@ void smp_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
printk("xc%d<", me);
#endif
if(smp_processors_ready) {
save_flags(flags); cli();
save_and_cli(flags);
if(me != active_kernel_processor)
goto cross_call_not_master;
......@@ -497,7 +492,7 @@ void smp_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
#endif
/* See wait case 3 in smp_message_pass()... */
smp_cpu_in_msg[me]--;
smp_swap(&message_cpu, NO_PROC_ID); /* store buffers... */
message_cpu = NO_PROC_ID;
restore_flags(flags);
return; /* made it... */
......@@ -589,7 +584,7 @@ void smp_capture(void)
#ifdef DEBUG_CAPTURE
printk("C<%d>", smp_processor_id());
#endif
save_flags(flags); cli();
save_and_cli(flags);
if(!capture_level) {
release = 0;
smp_message_pass(MSG_ALL_BUT_SELF, MSG_CAPTURE, 0, 1);
......@@ -608,7 +603,7 @@ void smp_release(void)
#ifdef DEBUG_CAPTURE
printk("R<%d>", smp_processor_id());
#endif
save_flags(flags); cli();
save_and_cli(flags);
if(!(capture_level - 1)) {
release = 1;
for(i = 0; i < smp_num_cpus; i++)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* linux/arch/sparc/sys_solaris.c
*
* Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
*/
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/personality.h>
#include <linux/ptrace.h>
#include <linux/mm.h>
asmlinkage int
do_solaris_syscall (struct pt_regs *regs)
{
current->personality = PER_SVR4;
current->exec_domain = lookup_exec_domain(PER_SVR4);
if (current->exec_domain && current->exec_domain->handler){
current->exec_domain->handler (regs);
current->exec_domain->use_count = 0;
return regs->u_regs [UREG_I0];
}
printk ("No solaris handler\n");
send_sig (SIGSEGV, current, 1);
return 0;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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