Commit c0711bf3 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.16

parent 12980ed0
......@@ -308,7 +308,9 @@ D: Second extended file system co-designer
N: Terry Dawson
E: terry@perf.no.itg.telecom.com.au
E: terry@albert.vk2ktj.ampr.org (Amateur Radio use only)
D: trivial hack to add variable address length routing to Rose.
D: AX25-HOWTO, HAM-HOWTO, IPX-HOWTO, NET-2-HOWTO
D: ax25-utils maintainer.
N: Todd J. Derr
E: tjd@fore.com
......@@ -349,7 +351,7 @@ E: drew@PoohSticks.ORG
D: SCSI code
D: Assorted snippets elsewhere
D: Boot sector "..." printing
S: 2255 Spruce
S: 2037 Walnut #6
S: Boulder, Colorado 80302
S: USA
......@@ -1009,8 +1011,8 @@ S: Finland
N: Jonathan Naylor
E: jsn@cs.nott.ac.uk
E: g4klx@amsat.org
E: G4KLX@GB7DAD (Packet Radio)
D: AX.25 and NET/ROM protocol suites
D: AX.25, NET/ROM and ROSE amateur radio protocol suites
D: CCITT X.25 PLP and LAPB.
S: 24 Castle View Drive
S: Cromford
S: Matlock
......
......@@ -19,7 +19,7 @@ you don't need to bother doing so in the form of a diff, as this is
generated by texinfo so a diff is useless anyway (though I can
incorporate one by hand if you insist upon sending it that way ;-).
Last updated: December 3, 1996.
Last updated: December 13, 1996.
Current Author: Chris Ricker (gt1355b@prism.gatech.edu).
Current Minimal Requirements
......@@ -31,12 +31,12 @@ encountered a bug!
- Kernel modules 2.1.13
- Gnu C 2.7.2.1
- Binutils 2.7.0.3
- Linux C Library 5.4.13
- Linux C Library 5.4.17
- Dynamic Linker (ld.so) 1.8.5
- Linux C++ Library 2.7.2.1
- Procps 1.01
- SysVinit 2.64
- Util-linux 2.5
- SysVinit 2.69
- Sysklogd 1.3-3
- Mount 2.5p
- Net-tools 1.32-alpha
- Kbd 0.91
......@@ -64,7 +64,7 @@ accordingly.
For modules to work, you need to be running libc-5.4.x or greater.
Since updates to libc fix other problems as well (security flaws, for
example) and since 5.4.7 is missing a few needed symbols, try to get
the latest 5.4.x you can. Currently, libc-5.4.13 is the latest public
the latest 5.4.x you can. Currently, libc-5.4.17 is the latest public
release.
If you upgrade to libc-5.4.x, you also have to upgrade your dynamic
......@@ -86,6 +86,29 @@ the latest public release. If you already have GCC 2.7.2 on your
system, you don't have to upgrade just so the kernel will work (though
feel free to upgrade if you want the gcc bug fixes).
Networking Changes
==================
The network code now assumes less about your setup, which can cause
routing problems due to init scripts expecting the old behavior.
Lines like:
`/sbin/ifconfig lo 127.0.0.1 /sbin/route add -net 127.0.0.0'
need to be changed to something like:
`/sbin/ifconfig lo 127.0.0.1 /sbin/route add -net 127.0.0.0 netmask
255.0.0.0 dev lo'
for routing to be set up correctly.
SysVinit
========
To avoid an oops while shutting down or rebooting the computer,
upgrade to SysVinit 2.69.
How to know the version of the installed programs
*************************************************
......@@ -128,11 +151,11 @@ ftp://sunsite.unc.edu/pub/Linux/GCC/release.gcc-2.7.2.1
Linux C Library
===============
The 5.4.13 release:
ftp://tsx-11.mit.edu/pub/linux/packages/GCC/libc-5.4.13.bin.tar.gz
ftp://sunsite.unc.edu/pub/Linux/GCC/libc-5.4.13.bin.tar.gz
Installation notes for 5.4.13:
ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.gcc-2.7.2.1
The 5.4.17 release:
ftp://tsx-11.mit.edu/pub/linux/packages/GCC/libc-5.4.17.bin.tar.gz
ftp://sunsite.unc.edu/pub/Linux/GCC/libc-5.4.17.bin.tar.gz
Installation notes for 5.4.17:
ftp://tsx-11.mit.edu/pub/linux/packages/GCC/release.libc-5.4.17
ftp://sunsite.unc.edu/pub/Linux/GCC/release.libc-5.4.13
Linux C++ Library
......@@ -169,9 +192,9 @@ ftp://sunsite.unc.edu/pub/Linux/system/Status/ps/procps-1.01.tgz
SysVinit utilities
==================
The 2.64 release:
ftp://tsx-11.mit.edu/pub/linux/sources/sbin/sysvinit-2.64.tar.gz
ftp://sunsite.unc.edu/pub/Linux/system/Daemons/init/sysvinit-2.64.tar.gz
The 2.69 release (when it gets there):
ftp://tsx-11.mit.edu/pub/linux/sources/sbin/sysvinit-2.69.tar.gz
ftp://sunsite.unc.edu/pub/Linux/system/Daemons/init/sysvinit-2.69.tar.gz
Other Info
==========
......
This diff is collapsed.
......@@ -42,7 +42,7 @@ foo \kill}%
%
\title{{\bf Linux Allocated Devices}}
\author{Maintained by H. Peter Anvin $<$hpa@zytor.com$>$}
\date{Last revised: December 7, 1996}
\date{Last revised: December 16, 1996}
\maketitle
%
\noindent
......@@ -187,7 +187,8 @@ reply.
\major{60}{--63}{}{Local/experimental use}
\major{64}{}{char }{ENskip kernel encryption package}
\major{65}{}{char }{Sundance ``plink'' Transputer boards}
\major{66}{--119}{}{Unallocated}
\major{66}{}{char }{YARC PowerPC PCI coprocessor card}
\major{67}{--119}{}{Unallocated}
\major{120}{--127}{}{Local/experimental use}
\major{128}{--239}{}{Unallocated}
\major{240}{--254}{}{Local/experimental use}
......@@ -477,6 +478,8 @@ physical disks.
\minor{137}{/dev/qcam1}{QuickCam on {\file lp1}}
\minor{138}{/dev/qcam2}{QuickCam on {\file lp2}}
\minor{139}{/dev/openprom}{SPARC OpenBoot PROM}
\minor{140}{/dev/relay8}{Berkshire Products Octal relay card}
\minor{141}{/dev/relay16}{Berkshire Products ISO-16 relay card}
\end{devicelist}
\begin{devicelist}
......@@ -1194,7 +1197,14 @@ This is a commercial driver; contact James Howes
$<$jth@prosig.demon.co.uk$>$ for information.
\begin{devicelist}
\major{66}{--119}{}{Unallocated}
\major{66}{}{char }{YARC PowerPC PCI coprocessor card}
\minor{0}{/dev/yppcpci00}{First YARC card}
\minor{1}{/dev/yppcpci01}{Second YARC card}
\minordots
\end{devicelist}
\begin{devicelist}
\major{67}{--119}{}{Unallocated}
\end{devicelist}
\begin{devicelist}
......
......@@ -283,6 +283,8 @@ reply.
137 = /dev/qcam1 QuickCam on lp1
138 = /dev/qcam2 QuickCam on lp2
139 = /dev/openprom SPARC OpenBoot PROM
140 = /dev/relay8 Berkshire Products Octal relay card
141 = /dev/relay16 Berkshire Products ISO-16 relay card
11 char Raw keyboard device
0 = /dev/kbd Raw keyboard device
......@@ -838,7 +840,12 @@ reply.
This is a commercial driver; contact James Howes
<jth@prosig.demon.co.uk> for information.
66-119 UNALLOCATED
66 char YARC PowerPC PCI coprocessor card
0 = /dev/yppcpci00 First YARC card
1 = /dev/yppcpci01 Second YARC card
...
67-119 UNALLOCATED
120-127 LOCAL/EXPERIMENTAL USE
......
Ioctl Numbers
2 Dec 1996
16 Dec 1996
Michael Chastain
<mec@shout.net>
......@@ -21,8 +21,7 @@ The first argument to _IO, _IOW, _IOR, or _IOWR is an identifying letter
or number from the table below. If you are writing a driver for a new
device and need a letter, pick an unused letter. You can register the
letter by patching this file and submitting the patch to Linus Torvalds.
Or you can e-mail me at <mec@duracef.shout.net> and I'll register one
for you.
Or you can e-mail me at <mec@shout.net> and I'll register one for you.
The second argument to _IO, _IOW, _IOR, or _IOWR is a sequence number
to distinguish ioctls from each other. The third argument is the size
......@@ -51,7 +50,7 @@ Following the convention is good because:
code to call verify_area to validate parameters.
This table lists ioctls visible from user land for Linux/i386. It is
current to Linux 2.1.14.
current to Linux 2.1.15.
Code Seq# Include File Comments
========================================================
......@@ -82,7 +81,9 @@ Code Seq# Include File Comments
'T' all linux/soundcard.h conflict!
'T' all asm-i386/ioctls.h conflict!
'V' all linux/vt.h
'W' 00-1F linux/pcwd.h
'W' 00-1F linux/watchdog.h
'W' 20-27 linux/octal-relay.h in development
'W' 28-2F linux/iso16-relay.h in development
'Y' all linux/cyclades.h
'a' all various, see http://lrcwww.epfl.ch/linux-atm/magic.html
'c' all linux/comstats.h
......@@ -97,11 +98,12 @@ Code Seq# Include File Comments
't' 80-8F linux/isdn_ppp.h
'u' all linux/smb_fs.h
'v' all linux/ext2_fs.h
'w' all CERN SCI driver (in development)
'w' all CERN SCI driver in development
0x89 00-0F asm-i386/sockios.h
0x89 10-DF linux/sockios.h
0x89 E0-EF linux/sockios.h SIOCPROTOPRIVATE range
0x89 F0-FF linux/sockios.h SIOCDEVPRIVATE range
0x8B all linux/wireless.h
0x90 00 linux/sbpcd.h
0x99 00-0F 537-Addinboard driver (in development, e-mail contact:
b.kohl@ipn-b.comlink.apc.org)
0x99 00-0F 537-Addinboard driver in development, e-mail contact:
b.kohl@ipn-b.comlink.apc.org
/proc/sys/net/ipv4/* variables:
ip_forwarding - "SNMP" BOOLEAN
2 - disabled (default)
1 - enabled
This variable is special, its change resets all configuration
parameters to their default state (RFC1122 for hosts, RFC1812
for routers)
ip_default_ttl - INTEGER
default 64
ip_log_martians - BOOLEAN
log packets with strange or impossible addresses.
default TRUE (router)
FALSE (host)
ip_accept_redirects - BOOLEAN
Accept ICMP redirect messages.
default TRUE (host)
FALSE (router)
ip_secure_redirects - BOOLEAN
Accept ICMP redirect messages only for gateways,
listed in default gateway list.
default TRUE
ip_addrmask_agent - BOOLEAN
Reply to ICMP ADDRESS MASK requests.
default TRUE (router)
FALSE (host)
ip_rfc1620_redirects - BOOLEAN
Send(router) or accept(host) RFC1620 shared media redirects.
Overrides ip_secure_redirects.
default TRUE (should be FALSE for distributed version,
but I use it...)
ip_bootp_agent - BOOLEAN
Accept packets with source address of sort 0.b.c.d
and destined to this host, broadcast or multicast.
Such packets are silently ignored otherwise.
default FALSE
ip_bootp_relay - BOOLEAN
Accept packets with source address 0.b.c.d destined
not to this host as local ones. It is supposed, that
BOOTP relay deamon will catch and forward such packets.
default FASLE
Not Implemented Yet.
ip_source_route - BOOLEAN
Accept packets with SRR option.
default TRUE (router)
FALSE (host)
ip_no_pmtu_disc - BOOLEAN
Disable Path MTU Discovery.
default FALSE
ip_rfc1812_filter - INTEGER
2 - do source validation by reversed path, as specified in RFC1812
Recommended option for single homed hosts and stub network
routers. Could cause troubles for complicated (not loop free)
networks running a slow unreliable protocol (sort of RIP),
or using static routes.
1 - (DEFAULT) Weaker form of RP filtering: drop all the packets
that look as sourced at a directly connected interface, but
were input from another interface.
0 - No source validation.
NOTE: do not disable this option! All BSD derived routing software
(sort of gated, routed etc. etc.) is confused by such packets,
even if they are valid.
ip_fib_model - INTEGER
0 - (DEFAULT) Standard model. All routes are in class MAIN.
1 - default routes go to class DEFAULT. This mode should
be very convenient for small ISPs making policy routing.
2 - RFC1812 compliant model.
Interface routes are in class MAIN.
Gateway routes are in class DEFAULT.
Alexey Kuznetsov.
kuznet@ms2.inr.ac.ru
Classes
-------
"Class" is complete routing table in common sence.
I.e. it is tree of nodes (destination prefix, tos, metric)
with attached information: gateway, device etc.
This tree is looked up as specified in RFC1812 5.2.4.3
1. Basic match
2. Longest match
3. Weak TOS.
4. Metric. (should not be in kernel space, but they are)
5. Additional pruning rules. (not in kernel space).
We have two special type of nodes:
REJECT - abort route lookup and return an error value.
THROW - abort route lookup in this class.
Currently number of classes is limited by 255
(0 is reserved for "not specified class")
Three classes are builtin:
RT_CLASS_LOCAL=255 - local interface addresses,
broadcasts, nat addresses.
RT_CLASS_MAIN=254 - all normal routes are put there
by default.
RT_CLASS_DEFAULT=253 - if ip_fib_model==1, then
normal default routes are put there, if ip_fib_model==2
all gateway routes are put there.
Rules
-----
Rule is record of (src prefix, src interface, tos, dst prefix)
with attached information.
Rule types:
RTP_ROUTE - lookup in attached class
RTP_NAT - lookup in attached class and if a match is found,
translate packet source address.
RTP_MASQUERADE - lookup in attached class and if a match is found,
masquerade packet as sourced by us.
RTP_DROP - silently drop the packet.
RTP_REJECT - drop the packet and send ICMP NET UNREACHABLE.
RTP_PROHIBIT - drop the packet and send ICMP COMM. ADM. PROHIBITED.
Rule flags:
RTRF_LOG - log route creations.
RTRF_VALVE - One way route (used with masquerading)
Default setup:
root@amber:/pub/ip-routing # iproute -r
Kernel routing policy rules
Pref Source Destination TOS Iface Cl
0 default default 00 * 255
254 default default 00 * 254
255 default default 00 * 253
Lookup algorithm
----------------
We scan rules list, and if a rule is matched, apply it.
If route is found, return it.
If it is not found or THROW node was matched, continue
to scan rules.
Applications
------------
1. Just ignore classes. All the routes are put to MAIN class
(and/or to DEFAULT class).
HOWTO: iproute add PREFIX [ tos TOS ] [ gw GW ] [ dev DEV ]
[ metric METRIC ] [ reject ] ... (look at iproute utility)
or use route utility from current net-tools.
2. Opposite case. Just forget all that you know about routing
tables. Every rule is supplied with its own gateway, device
info. record. This approach is not appropriate for automated
route maintanance, but it is ideal for manual configuration.
HOWTO: iproute addrule [ from PREFIX ] [ to PREFIX ] [ tos TOS ]
[ dev INPUTDEV] [ pref PREFERENCE ] route [ gw GATEWAY ]
[ dev OUTDEV ] .....
Warning: just now size of routing table in this approach is
limited by 256. If someone will like this model, I'll
relax this limitation.
3. OSPF classes (see RFC1583, RFC1812 E.3.3)
Very clean, stable and robust algorithm for OSPF routing
domains. Unfortunately, it is not used widely in the Internet.
Proposed setup:
255 local addresses
254 interface routes
253 ASE routes with external metric
252 ASE routes with internal metric
251 inter-area routes
250 intra-area routes for 1st area
249 intra-area routes for 2nd area
etc.
Rules:
iproute addrule class 253
iproute addrule class 252
iproute addrule class 251
iproute addrule to a-prefix-for-1st-area class 250
iproute addrule to another-prefix-for-1st-area class 250
...
iproute addrule to a-prefix-for-2nd-area class 249
...
Area classes must be terminated with reject record.
iproute add default reject class 250
iproute add default reject class 249
...
4. The Variant Router Requirements Algorithm (RFC1812 E.3.2)
Create 16 classes for different TOS values.
It is funny, but pretty useless algorithm.
I listed it just to show power of new routing code.
5. All the variaty of combinations......
GATED
-----
Gated does not understand classes, but it will work
happily in MAIN+DEFAULT. All policy routes can be set
and maintained manually.
IMPORTANT NOTE
--------------
route.c has compilation time switch CONFIG_IP_LOCAL_RT_POLICY.
If it is set, locally originated packets are routed
using all the policy list. It is not very convenient and
pretty ambiguous, when used with NAT and masquerading.
I set it to FALSE by default.
Alexey Kuznetov
kuznet@ms2.inr.ac.ru
The directory ip-routing contains:
- patch to official linux-2.0 kernel tree
- iproute.c - "professional" routing table maintainance utility.
- rdisc.tar.gz - rdisc daemon, ported from Sun.
STRONGLY RECOMMENDED FOR ALL HOSTS.
- routing.tgz - original Mike McLagan's route by source patch.
Currently it is obsolete.
- gated.dif-ss<NEWEST>.gz - gated-R3_6Alpha_2 fixes.
Look at README.gated
- mrouted-3.8.dif.gz - mrouted-3.8 fixes.
- rtmon.c - trivial debugging utility: reads and stores netlink.
NEWS for user.
- Policy based routing. Routing decisions are made on the base
not only of destination address, but also source address,
TOS and incoming interface.
- Complete set of IP level control messages.
Now Linux is the only in the world OS comlying to RFC requirements.
Great win 8)
- New interface addressing paradigm.
Assignment of address ranges to interface,
multiple prefixes etc. etc.
Do not bother, it is compatible with old one. Moreover:
- You more need not make "route add aaa.bbb.ccc... eth0",
it is made automatically.
- "Abstract" UNIX sockets and security enhancements.
It is necessary to use TIRPC and TLI emulation library.
NEWS for hacker.
- New destination cache. Flexible, robust and just beatiful.
- Network stack is reordered, simplified, optimized, a lot of bugs fixed.
(well, and new bugs are intoduced, but I've yet not seen them 8))
It is difficult to descibe all the changes, look into source.
If you see this file, then this patch works 8)
Alexey Kuznetsov.
kuznet@ms2.inr.ac.ru
Linux X.25 Project
As my third year dissertation at University I have taken it upon myself to
write an X.25 implementation for Linux. My aim is to provide a complete X.25
Packet Layer and a LAPB module to allow for "normal" X.25 to be run using
Linux. There are two sorts of X.25 cards available, intelligent ones that
implement LAPB on the card itself, and unintelligent ones that simply do
framing, bit-stuffing and checksumming. These both need to be handled by the
system.
I therefore decided to write the implementation such that as far as the
Packet Layer is concerned, the link layer was being performed by a lower
layer of the Linux kernel and therefore it did not concern itself with
implementation of LAPB. Therefore the LAPB modules would be called by
unintelligent X.25 card drivers and not by intelligent ones, this would
provide a uniform device driver interface, and simplify configuration.
To confuse matters a little, an 802.2 LLC implementation for Linux is being
written which will allow X.25 to be run over an Ethernet (or Token Ring) and
conform with the JNT "Pink Book", this will have a different interface to
the Packet Layer but there will be no confusion since the class of device
being served by the LLC will be completely seperate from LAPB. The LLC
implementation is being done as part of another protocol project (SNA) and
by a different author.
Just when you thought that it could not become more confusing, another
option appeared, XOT. This allows X.25 Packet Layer frames to operate over
the Internet using TCP/IP as a reliable link layer. An RFC exists that
specifies the format and behaviour of the protocol. If time permits this
option will also be actively considered.
It is hoped that a linux-x25 mailing list will be opened soon to allow for
the discussion of Linux X.25, but it hasn't appeared yet.
Jonathan
jsn@cs.nott.ac.uk
g4klx@g4klx.demon.co.uk
......@@ -120,16 +120,16 @@ L: linux-hams@vger.rutgers.edu
S: Maintained
DAMA SLAVE for AX.25
P: Joerg Reuter
M: jreuter@lykos.oche.de
L: linux-hams@vger.rutgers.edu
S: Maintained
P: Joerg Reuter
M: jreuter@lykos.oche.de
L: linux-hams@vger.rutgers.edu
S: Maintained
Z8530 DRIVER FOR AX.25
P: Joerg Reuter
M: jreuter@lykos.oche.de
L: linux-hams@vger.rutgers.edu
S: Maintained
P: Joerg Reuter
M: jreuter@lykos.oche.de
L: linux-hams@vger.rutgers.edu
S: Maintained
BUSLOGIC SCSI DRIVER
P: Leonard N. Zubkoff
......@@ -314,6 +314,13 @@ M: begemot@bgm.rosprint.net
L: linux-kernel@vger.rutgers.edu
S: Maintained
HAYES ESP SERIAL DRIVER:
P: Andrew J. Robinson
M: arobinso@nyx.net
L: linux-kernel@vger.rutgers.edu
W: http://www.nyx.net/~arobinso
S: Maintainted
MOUSE AND MISC DEVICES [GENERAL]
P: Alessandro Rubini
M: rubini@ipvvis.unipv.it
......@@ -326,6 +333,11 @@ M: roadcapw@cfw.com
L: linux-kernel@vger.rutgers.edu
S: Maintained
CONFIGURE.HELP
P: Axel Boldt
M: boldt@math.ucsb.edu
S: Maintained
LANCE AND LANCE32 NETWORK DRIVER
P: Thomas Bogendoerfer
M: tsbogend@bigbug.franken.de
......
VERSION = 2
PATCHLEVEL = 1
SUBLEVEL = 15
SUBLEVEL = 16
ARCH = i386
......
......@@ -80,7 +80,7 @@ CONFIG_INET=y
#
# CONFIG_INET_PCTCP is not set
# CONFIG_INET_RARP is not set
# CONFIG_NO_PATH_MTU_DISCOVERY is not set
CONFIG_PATH_MTU_DISCOVERY=y
CONFIG_IP_NOSR=y
CONFIG_SKB_LARGE=y
......@@ -160,9 +160,11 @@ CONFIG_DE4X5=y
# CONFIG_DGRS is not set
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_DLCI is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_NET_RADIO is not set
# CONFIG_NET_HAM is not set
# CONFIG_SLIP is not set
# CONFIG_TR is not set
......@@ -206,6 +208,7 @@ CONFIG_SERIAL=y
# CONFIG_CYCLADES is not set
# CONFIG_STALDRV is not set
# CONFIG_RISCOM8 is not set
# CONFIG_ESPSERIAL is not set
# CONFIG_PRINTER is not set
CONFIG_MOUSE=y
# CONFIG_ATIXL_BUSMOUSE is not set
......
......@@ -112,7 +112,7 @@ asmlinkage void do_page_fault(unsigned long address, unsigned long mmcsr,
if ((fixup = search_exception_table(regs->pc)) != 0) {
unsigned long newpc;
newpc = fixup_exception(dpf_reg, fixup, regs->pc);
printk("Taking exception at %lx (%lx)\n", regs->pc, newpc);
printk("Taking exception at [<%lx>] (%lx)\n", regs->pc, newpc);
regs->pc = newpc;
return;
}
......
......@@ -294,6 +294,33 @@ no_disk1:
stosb
is_disk1:
! check for Micro Channel (MCA) bus
mov ax,cs ! aka #SETUPSEG
sub ax,#DELTA_INITSEG ! aka #INITSEG
mov ds,ax
mov ds,ax
xor ax,ax
mov [0x220], ax ! set table length to 0
mov ah, #0xc0
stc
int 0x15 ! puts feature table at es:bx
jc no_mca
push ds
mov ax,es
mov ds,ax
mov ax,cs ! aka #SETUPSEG
sub ax, #DELTA_INITSEG ! aka #INITSEG
mov es,ax
mov si,bx
mov di,#0x220
mov cx,(si)
add cx,#2 ! table length is a short
rep
movsb
pop ds
no_mca:
! Check for PS/2 pointing device
mov ax,cs ! aka #SETUPSEG
......
......@@ -116,6 +116,7 @@ CONFIG_EL3=y
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_NET_RADIO is not set
# CONFIG_NET_HAM is not set
# CONFIG_SLIP is not set
# CONFIG_TR is not set
......@@ -159,7 +160,7 @@ CONFIG_SERIAL=y
# CONFIG_CYCLADES is not set
# CONFIG_STALDRV is not set
# CONFIG_RISCOM8 is not set
# CONFIG_ESP is not set
# CONFIG_ESPSERIAL is not set
# CONFIG_PRINTER is not set
# CONFIG_MOUSE is not set
# CONFIG_UMISC is not set
......
......@@ -66,6 +66,6 @@ trampoline32.s: trampoline32.S $(CONFIGURE) $(TOPDIR)/include/linux/config.h Mak
$(CPP) -D__SMP__ -traditional $< -o $@
clean:
rm -f trampoline hexify
rm -f trampoline hexify trampoline.hex
include $(TOPDIR)/Rules.make
This diff is collapsed.
......@@ -17,6 +17,7 @@ static struct symbol_table arch_symbol_table = {
#include <linux/symtab_begin.h>
/* platform dependent support */
X(EISA_bus),
X(MCA_bus),
X(wp_works_ok),
X(__verify_write),
X(dump_thread),
......
......@@ -601,11 +601,6 @@ void smp_commence(void)
smp_commenced=1;
}
void pointless_func(void)
{
;
}
void smp_callin(void)
{
extern void calibrate_delay(void);
......
......@@ -165,7 +165,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code)
/* Are we prepared to handle this fault? */
if ((fixup = search_exception_table(regs->eip)) != 0) {
printk(KERN_DEBUG "Exception at %lx (%lx)\n", regs->eip, fixup);
printk(KERN_DEBUG "Exception at [<%lx>] (%lx)\n", regs->eip, fixup);
regs->eip = fixup;
return;
}
......
......@@ -113,7 +113,7 @@ asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
fault_pc = regs->pc;
if ((fixup = search_exception_table(fault_pc)) != 0) {
struct pt_regs *tregs;
printk("Exception at %lx (%lx)\n", fault_pc, fixup);
printk("Exception at [<%lx>] (%lx)\n", fault_pc, fixup);
/* Create a new four word stack frame, discarding the old
one. */
regs->stkadj = frame_extra_sizes[regs->format];
......
......@@ -12,43 +12,49 @@
#
# Copyright (C) 1994 by Linus Torvalds
# Changes for PPC by Gary Thomas
# Modified by Cort Dougan
#
# PowerPC (cross) tools
SUFFIX =.ppc
#AS = /u/cort/ppc/gcc/ppc-linux-elf/bin/as
SUFFIX =
AS = as$(SUFFIX)
ASFLAGS =
#LD = /u/cort/ppc/gcc/ppc-linux-elf/bin/ld
LD = ld$(SUFFIX)
LINKFLAGS = -T arch/ppc/ld.script -Ttext 0x90000000
HOSTCC = gcc
#CC = /u/cort/ppc/gcc/bin/gcc
CC = gcc$(SUFFIX)
#CC = /u/cort/ppc/gcc/bin/gcc.ppc
CFLAGS = -D__KERNEL__ -I$(TOPDIR)/include -D__powerpc__ \
CFLAGSINC = -D__KERNEL__ -I$(TOPDIR)/include -D__powerpc__
CFLAGS = $(CFLAGSINC) \
-Wstrict-prototypes \
-fomit-frame-pointer \
-fno-builtin \
-finhibit-size-directive \
-O2 -fsigned-char
-finhibit-size-directive -fno-strength-reduce\
-O2 -fsigned-char -pipe -mstring -mmultiple
CPP = $(CC) -E $(CFLAGS)
#AR = /u/cort/ppc/gcc/ppc-linux-elf/bin/ar
AR = ar$(SUFFIX)
#RANLIB = /u/cort/ppc/gcc/ppc-linux-elf/bin/ranlib
RANLIB = ar$(SUFFIX)
#STRIP = /u/cort/ppc/gcc/ppc-linux-elf/bin/strip
RANLIB = ranlib$(SUFFIX)
STRIP = strip$(SUFFIX)
#NM = /u/cort/ppc/gcc/ppc-linux-elf/bin/nm
NM = nm$(SUFFIX)
ifdef CONFIG_603
CFLAGS := $(CFLAGS) -mcpu=603 -DCPU=603
endif
ifdef CONFIG_603e
CFLAGS := $(CFLAGS) -mcpu=603e -DCPU=603e
endif
ifdef CONFIG_604
CFLAGS := $(CFLAGS) -mcpu=604 -DCPU=604
endif
#
# NFS_ROOT_NAME specifies the default name of the directory to mount
# as root via NFS, if the kernel does not get the "root=" option from
# the boot loader. The "%s" will be replaced by the IP-number of the
# local system.
#
NFS_ROOT = -DNFS_ROOT="\"/joplin/ppc/root/\""
NFS_ROOT = -DNFS_ROOT="\"/joplin/ppc/root\""
HEAD := arch/ppc/kernel/head.o
......@@ -59,10 +65,20 @@ ARCHIVES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(ARCHI
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
tImage: vmlinux
@$(MAKEBOOT) tImage
netboot: vmlinux
@$(MAKEBOOT) netboot
znetboot: vmlinux
@$(MAKEBOOT) znetboot
zImage: vmlinux
@$(MAKEBOOT) zImage
floppy: vmlinux
@$(MAKEBOOT) floppy
install: vmlinux
@$(MAKEBOOT) install
arch/ppc/kernel: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/ppc/kernel
......@@ -75,10 +91,10 @@ arch/ppc/lib: dummy
archclean:
/bin/rm -f arch/ppc/*/*.o #arch/ppc/kernel/mk_defs arch/ppc/kernel/ppc_defs.h
/bin/rm -f arch/ppc/*~ arch/ppc/*/*~ include/asm-ppc/*~ arch/ppc/boot/mkboot
rm -f arch/ppc/kernel/mk_defs arch/ppc/kernel/ppc_defs.h TAGS
@$(MAKEBOOT) clean
archdep:
corttags :
etags arch/ppc/*/*.c include/asm-ppc/* drivers/*/*.c net/*.c */*.c
etags arch/ppc/*/*.c include/asm/* */*.c drivers/*/*.c net/*.c
......@@ -20,30 +20,61 @@
.S.o:
$(CC) -D__ASSEMBLY__ -traditional -c -o $*.o $<
OBJECTS = head.o main.o
all: linux.boot mkboot
ZLINKFLAGS = -T ../ld.script -Ttext 0x00800000
GZIP_FLAGS = -9
linux.boot: $(TOPDIR)/vmlinux mkboot
rsh charon /bin/rm -f /usr/tftpboot/vmlinux
/bin/rm -f /usr/tftpboot/vmlinux
./mkboot $(TOPDIR)/vmlinux /usr/tftpboot/vmlinux
rcp /usr/tftpboot/vmlinux charon:/usr/tftpboot/vmlinux
sync
SYSTEM = $(TOPDIR)/vmlinux
tImage: mk_type41 $(TOPDIR)/vmlinux mkboot
./mkboot $(TOPDIR)/vmlinux vmlinux
mk_type41 vmlinux tImage
rm vmlinux
OBJECTS = head.o inflate.o unzip.o misc.o vreset.o
CFLAGS = -O2 -DSTDC_HEADERS -I$(TOPDIR)/include
all: $(TOPDIR)/zImage
mkboot : cortstrip.c
$(HOSTCC) -o mkboot cortstrip.c
$(HOSTCC) $(CFLAGSINC) -Wl,-static -o mkboot cortstrip.c
mk_type41: mk_type41.c
gcc -o mk_type41 mk_type41.c
$(HOSTCC) $(CFLAGSINC) -Wl,-static -o mk_type41 mk_type41.c
floppy: zImage $(TOPDIR)/vmlinux
dd if=$(TOPDIR)/zImage of=/dev/fd0H1440 bs=64b
netboot : $(TOPDIR)/vmlinux mkboot
mkboot $(TOPDIR)/vmlinux $(TOPDIR)/netboot
# rcp $(TOPDIR)/netboot charon:/usr/tftpboot/vmlinux
znetboot : mkboot zvmlinux
mkboot zvmlinux $(TOPDIR)/znetboot
rcp $(TOPDIR)/znetboot charon:/usr/tftpboot/vmlinux
zImage: mk_type41 zvmlinux
# make znetboot ourselves since using the normal dep
# will rcp it -- Cort
mkboot zvmlinux $(TOPDIR)/znetboot
mk_type41 $(TOPDIR)/znetboot $(TOPDIR)/zImage
install: zImage
dd if=$(TOPDIR)/zImage of=/dev/sda4
ln -s /dev/sda4 $(INSTALL_PATH)/vmlinuz
cp $(TOPDIR)/System.map $(INSTALL_PATH)/
zvmlinux: $(OBJECTS) $(SYSTEM) piggyback netboot $(TOPDIR)/vmlinux
gzip ${GZIP_FLAGS} <$(TOPDIR)/netboot | ./piggyback | $(AS) -o piggy.o
$(LD) $(ZLINKFLAGS) -o zvmlinux $(OBJECTS) piggy.o
rm -f piggy.o xx_boot
head.o: head.s
head.s: head.S $(TOPDIR)/include/linux/tasks.h
$(CPP) -traditional head.S -o head.s
piggyback: piggyback.c
$(HOSTCC) $(CFLAGS) -o piggyback piggyback.c
clean:
rsh charon /bin/rm -f /usr/tftpboot/vmlinux
/bin/rm -f /usr/tftpboot/vmlinux
rm -f piggyback zvmlinux mk_type41 mkprep mkboot
rm -f $(TOPDIR)/{zImage,znetboot,netboot}
dep:
#
# linux/arch/ppc/boot/compressed/Makefile
#
# create a compressed vmlinux image from the original vmlinux
#
TOPDIR = ../../../..
CC = cc.ppc
AS = as.ppc
LD = ld.ppc
ZLINKFLAGS = -T ../../ld.script -Ttext 0x00400000
HOSTCC = cc
#GZIP_FLAGS = -9
GZIP_FLAGS =
HEAD = head.o
SYSTEM = $(TOPDIR)/vmlinux
OBJECTS = $(HEAD) inflate.o unzip.o misc.o
CFLAGS = -O2 -DSTDC_HEADERS
.c.s:
$(CC) $(CFLAGS) -S $<
.s.o:
$(AS) -o $*.o $<
.c.o:
$(CC) $(CFLAGS) -c $<
all: vmlinux
vmlinux: $(OBJECTS) $(SYSTEM) piggyback
mkboot $(TOPDIR)/vmlinux xx_boot 0
gzip ${GZIP_FLAGS} <xx_boot | ./piggyback | $(AS) -o piggy.o
$(LD) $(ZLINKFLAGS) -o vmlinux $(OBJECTS) piggy.o
rm -f piggy.o xx_boot
vmlinux.no_ramdisk: $(OBJECTS) piggyback
mkboot $(TOPDIR)/vmlinux.no_ramdisk xx_boot 0
gzip ${GZIP_FLAGS} <xx_boot | ./piggyback | $(AS) -o piggy.o
$(LD) $(ZLINKFLAGS) -o vmlinux.no_ramdisk $(OBJECTS) piggy.o
rm -f piggy.o xx_boot
head.o: head.s
head.s: head.S $(TOPDIR)/include/linux/tasks.h
$(CPP) -traditional head.S -o head.s
piggyback: piggyback.c
$(HOSTCC) $(CFLAGS) -o piggyback piggyback.c
clean:
rm -f piggyback vmlinux
#include "ppc_defs.h"
.text
/*
* This code may be executed by a bootstrap process. If so, the
* purpose is to relocate the loaded image to it's final location
* in memory.
* R3: End of image
* R4: Start of image - 0x400
*
*/
.globl start
start:
addi r4,r4,0x400 /* Point at start of image */
lis r5,start@h /* Load address */
ori r5,r5,start@l
subi r4,r4,4 /* Adjust for auto-increment */
subi r5,r5,4
subi r3,r3,4
00: lwzu r0,4(r4) /* Fast move */
stwu r0,4(r5)
cmp 0,r3,r4
bne 00b
lis r5,continue@h /* Actual code starts here */
ori r5,r5,continue@l
mtlr r5
blr
continue:
bl decompress_kernel
li r5,0x100 /* Kernel code starts here */
mtlr r5
blr
#define r0 0
#define r1 1
#define r2 2
#define r3 3
#define r4 4
#define r5 5
......@@ -7,7 +7,7 @@
#define PLACE 65536
/* size of read buffer */
#define SIZE 0x200000
#define SIZE 0x100000
/* crude program to strip the elf header to make a bootable
image via tftp
......@@ -20,11 +20,13 @@ int main(int argc, char **argv )
unsigned char data[SIZE];
int i, n, skip;
#if 0
if ( argc != 3 )
{
fprintf(stderr,"%s infile outfile\n", argv[0]);
exit(-1);
}
#endif
fd = open(argv[1], O_RDONLY);
......@@ -49,7 +51,7 @@ int main(int argc, char **argv )
skip = PLACE;
#endif
i = lseek(fd, skip, SEEK_SET);
printf("lseek'd %d bytes\n", i);
/*printf("lseek'd %d bytes\n", i);*/
if ( i == -1 )
{
perror("lseek()");
......@@ -57,9 +59,9 @@ int main(int argc, char **argv )
while ( (n = read(fd, data, SIZE)) > 0 )
{
printf("Read %d bytes\n", n);
/*printf("Read %d bytes\n", n);*/
i = write(fdo, data, n);
printf("Wrote %d bytes\n", i);
/*printf("Wrote %d bytes\n", i); */
}
......
#include "../kernel/ppc_defs.h"
#include "../kernel/ppc_asm.tmpl"
.text
/*
* This code is loaded by the ROM loader at some arbitrary location.
* Move it to high memory so that it can load the kernel at 0x0000.
*/
.globl start
start:
bl start_
start_:
/* TEMP - No residual data on BeBox (yet) */
#if 0
#define IS_BE_BOX 0x42654278 /* 'BeBx' */
lis r2,IS_BE_BOX>>16
ori r2,r2,IS_BE_BOX&0xFFFF
cmp 0,r30,r2
bne notBeBox
li r3,0
#endif
notBeBox:
/* TEMP */
mr r11,r3 /* Save pointer to residual data */
mfmsr r3 /* Turn off interrupts */
li r4,0
ori r4,r4,MSR_EE
andc r3,r3,r4
mtmsr r3
/* Copy relocation code down to location 0x0100 (where we hope it's safe!) */
mflr r3
addi r5,r3,start_ldr-start_
addi r3,r3,relocate-start_
li r4,0x0100
mtctr r4
subi r3,r3,4
subi r4,r4,4
00: lwzu r6,4(r3)
stwu r6,4(r4)
cmp 0,r3,r5
bne 00b
mflr r21
mfctr r22
bl flush_instruction_cache
mtlr r21
mtctr r22
bctr /* Jump to code */
/* Relocate code to final resting spot */
relocate:
mflr r3 /* Compute code bias */
subi r3,r3,4
mr r8,r3
lis r4,start@h
ori r4,r4,start@l
lis r5,edata@h
ori r5,r5,edata@l
addi r5,r5,3 /* Round up - just in case */
sub r5,r5,r4 /* Compute # longwords to move */
srwi r5,r5,2
mtctr r5
mr r7,r5
li r6,0
subi r3,r3,4 /* Set up for loop */
subi r4,r4,4
00: lwzu r5,4(r3)
stwu r5,4(r4)
xor r6,r6,r5
bdnz 00b
lis r3,start_ldr@h
ori r3,r3,start_ldr@l
mtlr r3 /* Easiest way to do an absolute jump */
blr
start_ldr:
/* Clear all of BSS */
lis r3,edata@h
ori r3,r3,edata@l
lis r4,end@h
ori r4,r4,end@l
subi r3,r3,4
subi r4,r4,4
li r0,0
50: stwu r0,4(r3)
cmp 0,r3,r4
bne 50b
90: mr r9,r1 /* Save old stack pointer (in case it matters) */
lis r1,.stack@h
ori r1,r1,.stack@l
addi r1,r1,4096*2
subi r1,r1,256
li r2,0x000F /* Mask pointer to 16-byte boundary */
andc r1,r1,r2
/* Run loader */
mr r3,r8 /* Load point */
mr r4,r7 /* Program length */
mr r5,r6 /* Checksum */
mr r6,r11 /* Residual data */
bl decompress_kernel
/*mr r29,r3*/ /* R3 = TotalMemory */
/*lis r28,hold_residual@h
ori r28,r28,hold_residual@l*/
/* changed to use r3 (as firmware does) for kernel
as ptr to residual -- Cort*/
li r5,0x100 /* Kernel code starts here */
mtlr r5
blr
hang:
b hang
.globl _get_SP
_get_SP:
mr r3,r1
blr
.globl _get_PVR
_get_PVR:
mfspr r3,PVR
blr
.globl _get_MSR
_get_MSR:
mfmsr r3
blr
.globl _put_MSR
_put_MSR:
sync
mtmsr r3
blr
.globl _get_HID0
_get_HID0:
mfspr r3,HID0
blr
.globl _put_HID0
_put_HID0:
sync
mtspr HID0,r3
blr
/*
* This space [buffer] is used to forceably flush the data cache when
* running in copyback mode. This is necessary IFF the data cache could
* contain instructions for which the instruction cache has stale data.
* Since the instruction cache NEVER snoops the data cache, memory must
* be made coherent with the data cache to insure that the instruction
* cache gets a valid instruction stream. Note that this flushing is
* only performed when switching from system to user mode since this is
* the only juncture [as far as the OS goes] where the data cache may
* contain instructions, e.g. after a disk read.
*/
#define NUM_CACHE_LINES 128*8
#define CACHE_LINE_SIZE 32
#if 0
cache_flush_buffer:
.space NUM_CACHE_LINES*CACHE_LINE_SIZE /* CAUTION! these need to match hardware */
#else
#define cache_flush_buffer 0x1000
#endif
/*
* Flush instruction cache
* *** I'm really paranoid here!
*/
_GLOBAL(flush_instruction_cache)
mflr r5
bl flush_data_cache
mfspr r3,HID0 /* Caches are controlled by this register */
li r4,0
ori r4,r4,(HID0_ICE|HID0_ICFI)
or r3,r3,r4 /* Need to enable+invalidate to clear */
mtspr HID0,r3
andc r3,r3,r4
ori r3,r3,HID0_ICE /* Enable cache */
mtspr HID0,r3
mtlr r5
blr
/*
* Flush data cache
* *** I'm really paranoid here!
*/
_GLOBAL(flush_data_cache)
lis r3,cache_flush_buffer@h
ori r3,r3,cache_flush_buffer@l
li r4,NUM_CACHE_LINES
mtctr r4
#if 0
00: dcbz 0,r3 /* Flush cache line with minimal BUS traffic */
#else
00: lwz r4,0(r3)
#endif
addi r3,r3,CACHE_LINE_SIZE /* Next line, please */
bdnz 00b
10: blr
/*
* Flush a particular page from the DATA cache
* Note: this is necessary because the instruction cache does *not*
* snoop from the data cache.
* void flush_page(void *page)
*/
_GLOBAL(flush_page)
li r4,0x0FFF
andc r3,r3,r4 /* Get page base address */
li r4,4096/CACHE_LINE_SIZE /* Number of lines in a page */
mtctr r4
00: dcbf 0,r3 /* Clear line */
icbi 0,r3
addi r3,r3,CACHE_LINE_SIZE
bdnz 00b
blr
/*
* Execute a [foreign] function
*
* run(p1, p2, cp, ep, entry)
*
*/
.globl run
run:
mtctr r7 /* Entry point */
#define IS_PreP 0x50726550 /* 'PreP' */
lis r30,IS_PreP>>16
ori r30,r30,IS_PreP&0xFFFF
mr 11,r5
mr 12,r6
mr r28,r5
mr r29,r6
mr 11,r5
mr 12,r6
bctr
.comm .stack,4096*2,4
This diff is collapsed.
......@@ -8,7 +8,11 @@
#include <stdio.h>
#include <errno.h>
#ifdef linux
#include <asm/stat.h>
#else
#include <sys/stat.h>
#endif
_LE(long val, unsigned char *le)
{
......@@ -187,7 +191,7 @@ write_prep_boot_partition(int out_fd)
* (2 tracks/cylinder)(18 sectors/tracks)(80 cylinders/diskette)
* - unlike the above sector numbers, the beginning sector is zero-based!
*/
#if 0
#if 0
pe->beginning_sector = LeDword(1);
#else
/* This has to be 0 on the PowerStack? */
......
/*
* This program will make a type 0x41 load image from an
* executable file. Note: assumes that the executable has
* already been "flattened" by 'mkboot'.
*
* usage: mk_type41 flat-file image
*/
#include <stdio.h>
#include <errno.h>
#ifdef linux
#include <asm/stat.h>
#else
#include <sys/stat.h>
#endif
#include <asm/byteorder.h> /* use same as kernel -- Cort */
typedef unsigned long dword_t;
typedef unsigned short word_t;
typedef unsigned char byte_t;
typedef byte_t block_t[512];
typedef byte_t page_t[4096];
_LE(long val, unsigned char *le)
{
le[0] = val;
le[1] = val >> 8;
le[2] = val >> 16;
le[3] = val >> 24;
}
/*
* Partition table entry
* - from the PReP spec
*/
typedef struct partition_entry {
byte_t boot_indicator;
byte_t starting_head;
byte_t starting_sector;
byte_t starting_cylinder;
byte_t system_indicator;
byte_t ending_head;
byte_t ending_sector;
byte_t ending_cylinder;
dword_t beginning_sector;
dword_t number_of_sectors;
} partition_entry_t;
#define BootActive 0x80
#define SystemPrep 0x41
int main(int argc, char *argv[])
{
struct stat info;
char buf[8192];
int in_fd, out_fd,len;
unsigned char block[512];
partition_entry_t *pe = (partition_entry_t *)&block[0x1BE];
dword_t *entry = (dword_t *)&block[0x50];
dword_t *length = (dword_t *)&block[0x51];
if (argc != 3)
{
fprintf(stderr, "usage: mk_type41 <boot-file> <image>\n");
exit(1);
}
if ((in_fd = open(argv[1], 0)) < 0)
{
exit(2);
}
if ((out_fd = creat(argv[2], 0755)) < 0)
{
exit(2);
}
bzero( &block, sizeof block );
/*
* Magic marker
*/
block[510] = 0x55;
block[511] = 0xAA;
pe->boot_indicator = BootActive;
pe->system_indicator = SystemPrep;
pe->starting_head = 0; /* zero-based */
pe->starting_sector = 2; /* one-based */
pe->starting_cylinder = 0; /* zero-based */
pe->ending_head = 1; /* assumes two heads */
pe->ending_sector = 18; /* assumes 18 sectors/track */
pe->ending_cylinder = 79; /* assumes 80 cylinders/diskette */
#if 0
#if 0
pe->beginning_sector = LeDword(1);
#else
/* This has to be 0 on the PowerStack? */
pe->beginning_sector = LeDword(0);
#endif
pe->number_of_sectors = LeDword(2*18*80-1);
#endif
if (fstat(in_fd, &info) < 0)
{
exit(4);
}
/* begin execution at 0x400 */
_LE(0x400,(unsigned char *)entry);
_LE(info.st_size+0x400,length);
lseek( out_fd, 0, 0 );
/* write out 1st block */
write( out_fd, block, sizeof block );
/* copy image */
#if 1
lseek(out_fd, 0x400, 0);
while ((len = read(in_fd, buf, sizeof(buf))) > 0)
{
if (write(out_fd, buf, len) != len)
{
exit(5);
}
}
if (len < 0)
{
exit(6);
}
close(in_fd);
close(out_fd);
#endif
return 0;
}
......@@ -5,6 +5,7 @@ extern long ce_exec_config[];
main(int argc, char *argv[])
{
int i, cnt, pos, len;
unsigned int cksum, val;
unsigned char *lp;
unsigned char buf[8192];
if (argc != 1)
......@@ -21,6 +22,7 @@ main(int argc, char *argv[])
fprintf(stdout, "\t.globl input_data\n");
fprintf(stdout, "input_data:\n");
pos = 0;
cksum = 0;
while ((len = read(0, buf, sizeof(buf))) > 0)
{
cnt = 0;
......@@ -33,6 +35,8 @@ main(int argc, char *argv[])
fprintf(stdout, "\t.long\t");
}
fprintf(stdout, "0x%02X%02X%02X%02X", lp[0], lp[1], lp[2], lp[3]);
val = *(unsigned long *)lp;
cksum ^= val;
lp += 4;
if (++cnt == 4)
{
......@@ -54,6 +58,7 @@ main(int argc, char *argv[])
fprintf(stdout, "input_len:\t.long\t0x%x\n", pos);
fflush(stdout);
fclose(stdout);
fprintf(stderr, "cksum = %x\n", cksum);
exit(0);
}
......@@ -97,6 +97,7 @@ void unzip(in, out)
{
ulg orig_crc = 0; /* original crc */
ulg orig_len = 0; /* original uncompressed length */
ulg _crc, _len;
int n;
uch buf[EXTHDR]; /* extended local header */
......@@ -165,7 +166,8 @@ void unzip(in, out)
}
/* Validate decompression */
if (orig_crc != updcrc(outbuf, 0)) {
if (orig_crc != (_crc = updcrc(outbuf, 0))) {
extern char input_data[];
error("crc error");
}
if (orig_len != bytes_out) {
......
/*
* vreset.c
*
* Initialize the VGA control registers to 80x25 text mode.
*
* Adapted from a program by:
* Steve Sellgren
* San Francisco Indigo Company
* sfindigo!sellgren@uunet.uu.net
*/
unsigned char CRTC[24] = {
0x5F, 0x4F, 0x50, 0x82, 0x55, 0x81, 0xBF, 0x1F,
0x00, 0x4F, 0x0D, 0x0E, 0x00, 0x00, 0x00, 0x00, /*0x07, 0x80, */
0x9C, 0xAE, 0x8F, 0x28, 0x1F, 0x96, 0xB9, 0xA3};
unsigned char SEQ[5] = {0x3, 0x0, 0x3, 0x0, 0x2};
unsigned char GC[9] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0xE, 0x0, 0xFF};
unsigned char AC[21] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x14, 0x07,
0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
0x0C, 0x00, 0x0F, 0x08, 0x00};
#include "iso_font.h"
static const unsigned char color_LUT[] =
{
0x00, 0x00, 0x00, /* 0 - black */
0x00, 0x00, 0x2A, /* 1 - blue */
0x00, 0x2A, 0x00, /* 2 - green */
0x00, 0x2A, 0x2A, /* 3 - cyan */
0x2A, 0x00, 0x00, /* 4 - red */
0x2A, 0x00, 0x2A, /* 5 - magenta */
0x2A, 0x2A, 0x00, /* 6 - brown */
0x2A, 0x2A, 0x2A, /* 7 - white */
0x00, 0x00, 0x15, /* 8 - gray */
0x00, 0x00, 0x3F, /* 9 - light blue */
0x00, 0x2A, 0x15, /* 10 - light green */
0x00, 0x2A, 0x3F, /* 11 - light cyan */
0x2A, 0x00, 0x15, /* 12 - light red */
0x2A, 0x00, 0x3F, /* 13 - light magenta */
0x2A, 0x2A, 0x15, /* 14 - yellow */
0x2A, 0x2A, 0x3F, /* 15 - bright white */
};
static inline
outw(int port, unsigned short val)
{
outb(port, val >> 8);
outb(port+1, val);
}
vga_init(unsigned char *ISA_mem)
{
int i, j;
int value;
unsigned char *font_page = (unsigned char *) &ISA_mem[0xA0000];
/* See if VGA already in TEXT mode - exit if so! */
outb(0x3CE, 0x06);
if ((inb(0x3CF) & 0x01) == 0) return;
/* From the S3 manual */
outb(0x46E8, 0x10); /* Put into setup mode */
outb(0x3C3, 0x10);
outb(0x102, 0x01); /* Enable registers */
outb(0x46E8, 0x08); /* Enable video */
outb(0x3C3, 0x08);
outb(0x4AE8, 0x00);
outb(0x42E8, 0x80); /* Reset graphics engine? */
outb(0x3D4, 0x38); /* Unlock all registers */
outb(0x3D5, 0x48);
outb(0x3D4, 0x39);
outb(0x3D5, 0xA5);
outb(0x3D4, 0x40);
outb(0x3D5, inb(0x3D5)|0x01);
outb(0x3D4, 0x33);
outb(0x3D5, inb(0x3D5)&~0x52);
outb(0x3D4, 0x35);
outb(0x3D5, inb(0x3D5)&~0x30);
outb(0x3D4, 0x3A);
outb(0x3D5, 0x00);
outb(0x3D4, 0x53);
outb(0x3D5, 0x00);
outb(0x3D4, 0x31);
outb(0x3D5, inb(0x3D5)&~0x4B);
outb(0x3D4, 0x58);
outb(0x3D5, 0);
outb(0x3D4, 0x54);
outb(0x3D5, 0x38);
outb(0x3D4, 0x60);
outb(0x3D5, 0x07);
outb(0x3D4, 0x61);
outb(0x3D5, 0x80);
outb(0x3D4, 0x62);
outb(0x3D5, 0xA1);
outb(0x3D4, 0x69); /* High order bits for cursor address */
outb(0x3D5, 0);
outb(0x3D4, 0x32);
outb(0x3D5, inb(0x3D5)&~0x10);
outb(0x3C2, 0x67);
/* Initialize DAC */
outb(0x3C6,0xFF);
inb(0x3C7);
outb(0x3C8,0x00);
inb(0x3C7);
for (i=0; i<sizeof(color_LUT); i++) {
outb(0x3C9, color_LUT[i]);
}
for (i; i<768; i += 3) {
outb(0x3C9, 0x3F); /* White? */
outb(0x3C9, 0x3F); /* White? */
outb(0x3C9, 0x3F); /* White? */
}
/* Load font */
NOP(inb(0x3DA)); /* Reset Address/Data FlipFlop for Attribute ctlr */
outb(0x3C0,0x30); outb(0x3C0, 0x01); /* graphics mode */
outw(0x3C4, 0x0001); /* reset sequencer */
outw(0x3C4, 0x0204); /* write to plane 2 */
outw(0x3C4, 0x0407); /* enable plane graphics */
outw(0x3C4, 0x0003); /* reset sequencer */
outw(0x3CE, 0x0402); /* read plane 2 */
outw(0x3CE, 0x0500); /* write mode 0, read mode 0 */
outw(0x3CE, 0x0600); /* set graphics */
for (i = 0; i < sizeof(font); i += 16) {
for (j = 0; j < 16; j++) {
font_page[(2*i)+j] = font[i+j];
}
}
for (i = 0; i < 24; i++) {
outb(0x3D4, i);
outb(0x3D5, CRTC[i]);
}
for (i = 0; i < 5; i++) {
outb(0x3C4, i);
outb(0x3C5, SEQ[i]);
}
for (i = 0; i < 9; i++) {
outb(0x3CE, i);
outb(0x3CF, GC[i]);
}
value = inb(0x3DA); /* reset flip-flop */
for (i = 0; i < 16; i++) {
outb(0x3C0, i);
outb(0x3C0, AC[i]);
}
for (i = 16; i < 21; i++) {
outb(0x3C0, i | 0x20);
outb(0x3C0, AC[i]);
}
outb(0x3C2, 0x23);
}
static int
NOP(int x)
{
}
......@@ -14,10 +14,8 @@
.c.o:
$(CC) $(CFLAGS) -c $<
.S.s:
# $(CPP) $(CFLAGS) -D__ASSEMBLY__ -traditional $< -o $*.s
$(CPP) $(CFLAGS) -D__ASSEMBLY__ $< -o $*.s
.S.o:
# $(CC) -D__ASSEMBLY__ -traditional -c $< -o $*.o
$(CPP) $(CFLAGS) -D__ASSEMBLY__ $< -o $*.s
$(AS) $(ASFLAGS) -o $*.o $*.s
rm $*.s
......@@ -25,40 +23,25 @@
HOST_CC = gcc
OBJS = misc.o setup.o port_io.o irq.o pci.o traps.o stubs.o process.o \
signal.o ksyms.o time.o syscalls.o \
support.o ptrace.o # ramdisk_drvr.o
signal.o ksyms.o time.o syscalls.o usercpy.o\
support.o ptrace.o
all: head.o kernel.o #no_ramdisk.o ramdisk.o
all: head.o kernel.o
head.o: head.s
head.s: head.S $(TOPDIR)/include/linux/tasks.h ppc_defs.h
ppc_defs.h: mk_defs
# simppc mk_defs -- $@
mk_defs $@
#no_ramdisk.o: no_ramdisk.S
#ramdisk.o: ramdisk.image mk_ramdisk
# mk_ramdisk ramdisk.image $*.s
# $(AS) -o $@ $*.s
# rm $*.s
#mk_ramdisk: mk_ramdisk.c
# ${HOST_CC} -o mk_ramdisk mk_ramdisk.c
mk_defs: mk_defs.c $(TOPDIR)/include/asm/mmu.h $(TOPDIR)/include/asm/processor.h $(TOPDIR)/include/asm/pgtable.h $(TOPDIR)/include/asm/ptrace.h
# cc.ppc ${CFLAGS} -o mk_defs -T ld.script-user -Ttext 0x1000 mk_defs.c
gcc.ppc ${CFLAGS} -o mk_defs mk_defs.c
mk_defs: mk_defs.c
$(HOSTCC) $(CFLAGSINC) -Wl,-static ${CFLAGS} -o mk_defs mk_defs.c
kernel.o: $(OBJS)
$(LD) -r -o kernel.o $(OBJS)
sync
#mkboot: mkboot.c
# ${HOST_CC} -o $@ -Iinclude mkboot.c
dep:
$(CPP) -M *.c > .depend
......
This diff is collapsed.
Tue Jun 20 10:18:28 1995 Jeff Law (law@snake.cs.utah.edu)
* hppa.h (CPU_PA_RISC1_0): Protect from redefinitions.
(CPU_PA_RISC1_1): Likewise.
Wed Mar 8 18:14:37 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* ppc.h: New file for PowerPC support.
Tue Feb 14 13:59:13 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* common.h (EM_PPC): Use official value of 20, not 17.
(EM_PPC_OLD): Define this to be the old value of EM_PPC.
Tue Jan 24 09:40:59 1995 Michael Meissner <meissner@tiktok.cygnus.com>
* common.h (EM_PPC): New macro, PowerPC machine id.
Tue Jan 17 10:51:38 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
* mips.h (SHT_MIPS_MSYM, SHT_MIPS_DWARF, SHT_MIPS_EVENTS): Define.
Mon Oct 17 13:43:59 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
* internal.h (Elf_Internal_Shdr): Remove rawdata and size fields.
Add bfd_section field.
Tue May 24 16:11:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* mips.h (Elf32_External_gptab): Define.
Mon May 16 13:22:04 1994 Jeff Law (law@snake.cs.utah.edu)
* common.h (EM_HPPA): Delete.
(EM_PARISC): Add.
* hppa.h: New file.
Mon May 9 13:27:03 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* common.h (SHN_LORESERVE): Rename from SHN_LORESERV.
(ELF32_R_TYPE, ELF32_R_INFO): Don't rely on size of unsigned char.
(ELF64_R_TYPE): Don't rely on size of unsigned long.
Mon Apr 25 15:53:09 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* internal.h (Elf_Internal_Shdr): Use PTR, not void *.
Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* mips.h (SHN_MIPS_TEXT, SHN_MIPS_DATA): Define.
Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* internal.h: Remove Elf32_*, Elf64_* typedefs. These names
cause conflicts with system headers, e.g. link.h in gdb/solib.c.
Combine 32- and 64-bit versions of *_Internal_Dyn.
* common.h: Replace uses of Elf64_Word, Elf64_Xword typedefs
by their expansion.
* mips.h: Replace uses of Elf32_Word, Elf32_Sword, Elf32_Addr
typedefs by their expansion. Add DT_MIPS_RLD_MAP definition.
Fri Feb 18 10:39:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* common.h (EM_CYGNUS_POWERPC): Define. This may be temporary,
depending upon how quickly I can find a real PowerPC ABI.
Mon Feb 7 08:27:13 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* internal.h: Change HOST_64_BIT to BFD_HOST_64_BIT.
Wed Feb 2 14:12:18 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* common.h: Add comments regarding value of EM_HPPA and how to
pick an unofficial value.
Wed Nov 17 17:14:26 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* mips.h (SHT_MIPS_OPTIONS): Define.
Mon Nov 8 17:57:00 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* mips.h: Added some more MIPS ABI macro definitions.
Wed Nov 3 22:07:17 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
* common.h (EM_MIPS_RS4_BE): New macro.
Tue Oct 12 07:28:18 1993 Ian Lance Taylor (ian@cygnus.com)
* mips.h: New file. MIPS ABI specific information.
Mon Jun 21 13:13:43 1993 Ken Raeburn (raeburn@poseidon.cygnus.com)
* internal.h: Combined 32- and 64-bit versions of all structures
except *_Internal_Dyn. This will simply the assembler interface,
and some bfd code.
Tue May 25 02:00:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* external.h, internal.h, common.h: Added 64-bit versions of some
structures and macros. Renamed old versions to put "32" in the
name. Some are unchanged.
Thu Apr 29 12:12:20 1993 Ken Raeburn (raeburn@deneb.cygnus.com)
* common.h (EM_HPPA, NT_VERSION, STN_UNDEF, DT_*): New macros.
* external.h (Elf_External_Dyn): New type.
* internal.h (Elf_Internal_Shdr): New field `size'.
(Elf_Internal_Dyn): New type.
Tue Apr 20 16:03:45 1993 Fred Fish (fnf@cygnus.com)
* dwarf.h (LANG_CHILL): Change value to one randomly picked in
the user defined range, to reduce probability of collisions.
Sun Nov 15 09:34:02 1992 Fred Fish (fnf@cygnus.com)
* dwarf.h (AT_src_coords): Whitespace change only.
* dwarf.h (AT_body_begin, AT_body_end, LANG_MODULA2):
Add from latest gcc.
* dwarf.h (LANG_CHILL): Add as GNU extension.
Sat Aug 1 13:46:53 1992 Fred Fish (fnf@cygnus.com)
* dwarf.h: Replace with current version from gcc distribution.
Fri Jun 19 19:05:09 1992 John Gilmore (gnu at cygnus.com)
* internal.h: Add real struct tags to all the Type_Defs, so they
can be used in prototypes where the Type_Defs are not known.
Fri Apr 3 20:58:58 1992 Mark Eichin (eichin at cygnus.com)
* common.h: added ELF_R_{SYM,TYPE,INFO} for handling relocation
info
added EM_MIPS, and corrected value of EM_860 based on System V ABI
manual.
* external.h: added Elf_External_{Rel,Rela}.
* internal.h: added Elf_Internal_{Rel,Rela}.
added rawdata to Elf_Internal_Shdr.
Sat Nov 30 20:43:59 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* common.h, dwarf.h, external.h, internal.h, ChangeLog; moved from
../elf-<foo>
Local Variables:
version-control: never
End:
/* ELF support for BFD.
Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
Programming Support Tools".
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* This file is part of ELF support for BFD, and contains the portions
that are common to both the internal and external representations.
For example, ELFMAG0 is the byte 0x7F in both the internal (in-memory)
and external (in-file) representations. */
/* Fields in e_ident[] */
#define EI_MAG0 0 /* File identification byte 0 index */
#define ELFMAG0 0x7F /* Magic number byte 0 */
#define EI_MAG1 1 /* File identification byte 1 index */
#define ELFMAG1 'E' /* Magic number byte 1 */
#define EI_MAG2 2 /* File identification byte 2 index */
#define ELFMAG2 'L' /* Magic number byte 2 */
#define EI_MAG3 3 /* File identification byte 3 index */
#define ELFMAG3 'F' /* Magic number byte 3 */
#define EI_CLASS 4 /* File class */
#define ELFCLASSNONE 0 /* Invalid class */
#define ELFCLASS32 1 /* 32-bit objects */
#define ELFCLASS64 2 /* 64-bit objects */
#define EI_DATA 5 /* Data encoding */
#define ELFDATANONE 0 /* Invalid data encoding */
#define ELFDATA2LSB 1 /* 2's complement, little endian */
#define ELFDATA2MSB 2 /* 2's complement, big endian */
#define EI_VERSION 6 /* File version */
#define EI_PAD 7 /* Start of padding bytes */
/* Values for e_type, which identifies the object file type */
#define ET_NONE 0 /* No file type */
#define ET_REL 1 /* Relocatable file */
#define ET_EXEC 2 /* Executable file */
#define ET_DYN 3 /* Shared object file */
#define ET_CORE 4 /* Core file */
#define ET_LOPROC 0xFF00 /* Processor-specific */
#define ET_HIPROC 0xFFFF /* Processor-specific */
/* Values for e_machine, which identifies the architecture */
#define EM_NONE 0 /* No machine */
#define EM_M32 1 /* AT&T WE 32100 */
#define EM_SPARC 2 /* SUN SPARC */
#define EM_386 3 /* Intel 80386 */
#define EM_68K 4 /* Motorola m68k family */
#define EM_88K 5 /* Motorola m88k family */
#define EM_860 7 /* Intel 80860 */
#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian only) */
#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
#define EM_SPARC64 11 /* SPARC v9 (not official) 64-bit */
#define EM_PARISC 15 /* HPPA */
#define EM_PPC 20 /* PowerPC */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
with official or non-GNU unofficial values. */
/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_POWERPC 0x9025
/* Old version of PowerPC, this should be removed shortly. */
#define EM_PPC_OLD 17
/* Values for e_version */
#define EV_NONE 0 /* Invalid ELF version */
#define EV_CURRENT 1 /* Current version */
/* Values for program header, p_type field */
#define PT_NULL 0 /* Program header table entry unused */
#define PT_LOAD 1 /* Loadable program segment */
#define PT_DYNAMIC 2 /* Dynamic linking information */
#define PT_INTERP 3 /* Program interpreter */
#define PT_NOTE 4 /* Auxiliary information */
#define PT_SHLIB 5 /* Reserved, unspecified semantics */
#define PT_PHDR 6 /* Entry for header table itself */
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
/* Program segment permissions, in program header p_flags field */
#define PF_X (1 << 0) /* Segment is executable */
#define PF_W (1 << 1) /* Segment is writable */
#define PF_R (1 << 2) /* Segment is readable */
#define PF_MASKPROC 0xF0000000 /* Processor-specific reserved bits */
/* Values for section header, sh_type field */
#define SHT_NULL 0 /* Section header table entry unused */
#define SHT_PROGBITS 1 /* Program specific (private) data */
#define SHT_SYMTAB 2 /* Link editing symbol table */
#define SHT_STRTAB 3 /* A string table */
#define SHT_RELA 4 /* Relocation entries with addends */
#define SHT_HASH 5 /* A symbol hash table */
#define SHT_DYNAMIC 6 /* Information for dynamic linking */
#define SHT_NOTE 7 /* Information that marks file */
#define SHT_NOBITS 8 /* Section occupies no space in file */
#define SHT_REL 9 /* Relocation entries, no addends */
#define SHT_SHLIB 10 /* Reserved, unspecified semantics */
#define SHT_DYNSYM 11 /* Dynamic linking symbol table */
#define SHT_LOPROC 0x70000000 /* Processor-specific semantics, lo */
#define SHT_HIPROC 0x7FFFFFFF /* Processor-specific semantics, hi */
#define SHT_LOUSER 0x80000000 /* Application-specific semantics */
#define SHT_HIUSER 0x8FFFFFFF /* Application-specific semantics */
/* Values for section header, sh_flags field */
#define SHF_WRITE (1 << 0) /* Writable data during execution */
#define SHF_ALLOC (1 << 1) /* Occupies memory during execution */
#define SHF_EXECINSTR (1 << 2) /* Executable machine instructions */
#define SHF_MASKPROC 0xF0000000 /* Processor-specific semantics */
/* Values of note segment descriptor types for core files. */
#define NT_PRSTATUS 1 /* Contains copy of prstatus struct */
#define NT_FPREGSET 2 /* Contains copy of fpregset struct */
#define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */
/* Values of note segment descriptor types for object files. */
/* (Only for hppa right now. Should this be moved elsewhere?) */
#define NT_VERSION 1 /* Contains a version string. */
/* These three macros disassemble and assemble a symbol table st_info field,
which contains the symbol binding and symbol type. The STB_ and STT_
defines identify the binding and type. */
#define ELF_ST_BIND(val) (((unsigned int)(val)) >> 4)
#define ELF_ST_TYPE(val) ((val) & 0xF)
#define ELF_ST_INFO(bind,type) (((bind) << 4) + ((type) & 0xF))
#define STN_UNDEF 0 /* undefined symbol index */
#define STB_LOCAL 0 /* Symbol not visible outside obj */
#define STB_GLOBAL 1 /* Symbol visible outside obj */
#define STB_WEAK 2 /* Like globals, lower precedence */
#define STB_LOPROC 13 /* Application-specific semantics */
#define STB_HIPROC 15 /* Application-specific semantics */
#define STT_NOTYPE 0 /* Symbol type is unspecified */
#define STT_OBJECT 1 /* Symbol is a data object */
#define STT_FUNC 2 /* Symbol is a code object */
#define STT_SECTION 3 /* Symbol associated with a section */
#define STT_FILE 4 /* Symbol gives a file name */
#define STT_LOPROC 13 /* Application-specific semantics */
#define STT_HIPROC 15 /* Application-specific semantics */
/* Special section indices, which may show up in st_shndx fields, among
other places. */
#define SHN_UNDEF 0 /* Undefined section reference */
#define SHN_LORESERVE 0xFF00 /* Begin range of reserved indices */
#define SHN_LOPROC 0xFF00 /* Begin range of appl-specific */
#define SHN_HIPROC 0xFF1F /* End range of appl-specific */
#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
/* relocation info handling macros */
#define ELF32_R_SYM(i) ((i) >> 8)
#define ELF32_R_TYPE(i) ((i) & 0xff)
#define ELF32_R_INFO(s,t) (((s) << 8) + ((t) & 0xff))
#define ELF64_R_SYM(i) ((i) >> 32)
#define ELF64_R_TYPE(i) ((i) & 0xffffffff)
#define ELF64_R_INFO(s,t) (((bfd_vma) (s) << 32) + (bfd_vma) (t))
/* Dynamic section tags */
#define DT_NULL 0
#define DT_NEEDED 1
#define DT_PLTRELSZ 2
#define DT_PLTGOT 3
#define DT_HASH 4
#define DT_STRTAB 5
#define DT_SYMTAB 6
#define DT_RELA 7
#define DT_RELASZ 8
#define DT_RELAENT 9
#define DT_STRSZ 10
#define DT_SYMENT 11
#define DT_INIT 12
#define DT_FINI 13
#define DT_SONAME 14
#define DT_RPATH 15
#define DT_SYMBOLIC 16
#define DT_REL 17
#define DT_RELSZ 18
#define DT_RELENT 19
#define DT_PLTREL 20
#define DT_DEBUG 21
#define DT_TEXTREL 22
#define DT_JMPREL 23
#define DT_LOPROC 0x70000000
#define DT_HIPROC 0x7fffffff
This diff is collapsed.
This diff is collapsed.
/* HPPA ELF support for BFD.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* This file holds definitions specific to the HPPA ELF ABI. Note
that most of this is not actually implemented by BFD. */
/* Processor specific flags for the ELF header e_flags field. */
/* Target processor IDs to be placed in the low 16 bits of the flags
field. Note these names are shared with SOM, and therefore do not
follow ELF naming conventions. */
/* PA 1.0 big endian. */
#ifndef CPU_PA_RISC1_0
#define CPU_PA_RISC1_0 0x0000020b
#endif
/* PA 1.1 big endian. */
#ifndef CPU_PA_RISC1_1
#define CPU_PA_RISC1_1 0x00000210
#endif
/* PA 1.0 little endian (unsupported) is 0x0000028b. */
/* PA 1.1 little endian (unsupported) is 0x00000290. */
/* Trap null address dereferences. */
#define ELF_PARISC_TRAPNIL 0x00010000
/* .PARISC.archext section is present. */
#define EF_PARISC_EXT 0x00020000
/* Processor specific section types. */
/* Holds the global offset table, a table of pointers to external
data. */
#define SHT_PARISC_GOT SHT_LOPROC+0
/* Nonloadable section containing information in architecture
extensions used by the code. */
#define SHT_PARISC_ARCH SHT_LOPROC+1
/* Section in which $global$ is defined. */
#define SHT_PARISC_GLOBAL SHT_LOPROC+2
/* Section holding millicode routines (mul, div, rem, dyncall, etc. */
#define SHT_PARISC_MILLI SHT_LOPROC+3
/* Section holding unwind information for use by debuggers. */
#define SHT_PARISC_UNWIND SHT_LOPROC+4
/* Section holding the procedure linkage table. */
#define SHT_PARISC_PLT SHT_LOPROC+5
/* Short initialized and uninitialized data. */
#define SHT_PARISC_SDATA SHT_LOPROC+6
#define SHT_PARISC_SBSS SHT_LOPROC+7
/* Optional section holding argument location/relocation info. */
#define SHT_PARISC_SYMEXTN SHT_LOPROC+8
/* Option section for linker stubs. */
#define SHT_PARISC_STUBS SHT_LOPROC+9
/* Processor specific section flags. */
/* This section is near the global data pointer and thus allows short
addressing modes to be used. */
#define SHF_PARISC_SHORT 0x20000000
/* Processor specific symbol types. */
/* Millicode function entry point. */
#define STT_PARISC_MILLICODE STT_LOPROC+0
This diff is collapsed.
This diff is collapsed.
/* MIPS PPC support for BFD.
Copyright (C) 1995 Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
in the System V Application Binary Interface, PowerPC Processor Supplement
and the PowerPC Embedded Application Binary Interface (eabi).
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* This file holds definitions specific to the PPC ELF ABI. Note
that most of this is not actually implemented by BFD. */
/* Processor specific flags for the ELF header e_flags field. */
#define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */
/* CYGNUS local bits below */
#define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -25,6 +25,8 @@ main(int argc, char *argv[])
FILE *out;
struct task_struct task;
struct thread_struct tss;
int i;
char s[256];
struct pt_regs regs;
if (!(out = fopen(argv[1], "w")))
{
......@@ -62,6 +64,8 @@ main(int argc, char *argv[])
put_line(out, "MMU_SEG13", (int)&tss.segs[13]-(int)&tss);
put_line(out, "MMU_SEG14", (int)&tss.segs[14]-(int)&tss);
put_line(out, "MMU_SEG15", (int)&tss.segs[15]-(int)&tss);
put_line(out, "TSS_EXPC", (int)&tss.expc-(int)&tss);
put_line(out, "TSS_EXCOUNT", (int)&tss.excount-(int)&tss);
put_line(out, "TSS_FPR0", (int)&tss.fpr[0]-(int)&tss);
put_line(out, "TSS_FPR1", (int)&tss.fpr[1]-(int)&tss);
put_line(out, "TSS_FPR2", (int)&tss.fpr[2]-(int)&tss);
......@@ -94,6 +98,7 @@ main(int argc, char *argv[])
put_line(out, "TSS_FPR29", (int)&tss.fpr[29]-(int)&tss);
put_line(out, "TSS_FPR30", (int)&tss.fpr[30]-(int)&tss);
put_line(out, "TSS_FPR31", (int)&tss.fpr[31]-(int)&tss);
put_line(out, "TSS_FP_USED", (int)&tss.fp_used-(int)&tss);
/* Interrupt register frame */
put_line(out, "INT_FRAME_SIZE", sizeof(regs));
put_line(out, "GPR0", (int)&regs.gpr[0]-(int)&regs);
......@@ -128,14 +133,19 @@ main(int argc, char *argv[])
put_line(out, "GPR29", (int)&regs.gpr[29]-(int)&regs);
put_line(out, "GPR30", (int)&regs.gpr[30]-(int)&regs);
put_line(out, "GPR31", (int)&regs.gpr[31]-(int)&regs);
put_line(out, "FPR0", (int)&regs.fpr[0]-(int)&regs);
put_line(out, "FPR1", (int)&regs.fpr[1]-(int)&regs);
put_line(out, "FPR2", (int)&regs.fpr[2]-(int)&regs);
put_line(out, "FPR3", (int)&regs.fpr[3]-(int)&regs);
#if 0
for ( i = 0 ; i <= 31 ; i++)
{
sprintf(s,"FPR%d",i);
put_line(out, s, (int)&regs.fpr[i]-(int)&regs);
}
#endif
put_line(out, "FPCSR", (int)&regs.fpcsr-(int)&regs);
/* Note: these symbols include "_" because they overlap with special register names */
put_line(out, "_NIP", (int)&regs.nip-(int)&regs);
put_line(out, "_MSR", (int)&regs.msr-(int)&regs);
/* put_line(out, "_SRR1", (int)&regs.srr1-(int)&regs);
put_line(out, "_SRR0", (int)&regs.srr0-(int)&regs); */
put_line(out, "_CTR", (int)&regs.ctr-(int)&regs);
put_line(out, "_LINK", (int)&regs.link-(int)&regs);
put_line(out, "_CCR", (int)&regs.ccr-(int)&regs);
......
This diff is collapsed.
......@@ -141,3 +141,9 @@ unsigned char outb_p(unsigned char val,int port) { return (outb(val,port)); }
unsigned short outw_p(unsigned short val,int port) { return (outw(val,port)); }
unsigned long outl_p(unsigned long val,int port) { return (outl(val,port)); }
/* makes writing to the ibm acorn power management stuff easier -- Cort */
/* args in forn of PA.B as in tech spec for ibm carolina */
void ibm_write(unsigned char val,unsigned int port)
{
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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