File: [local] / sys / arch / hppa64 / include / reloc.h (download)
Revision 1.1.1.1 (vendor branch), Tue Mar 4 16:05:55 2008 UTC (16 years, 5 months ago) by nbrk
Branch: OPENBSD_4_2_BASE, MAIN
CVS Tags: jornada-partial-support-wip, HEAD Changes since 1.1: +0 -0 lines
Import of OpenBSD 4.2 release kernel tree with initial code to support
Jornada 720/728, StrongARM 1110-based handheld PC.
At this point kernel roots on NFS and boots into vfs_mountroot() and traps.
What is supported:
- glass console, Jornada framebuffer (jfb) works in 16bpp direct color mode
(needs some palette tweaks for non black/white/blue colors, i think)
- saic, SA11x0 interrupt controller (needs cleanup)
- sacom, SA11x0 UART (supported only as boot console for now)
- SA11x0 GPIO controller fully supported (but can't handle multiple interrupt
handlers on one gpio pin)
- sassp, SSP port on SA11x0 that attaches spibus
- Jornada microcontroller (jmcu) to control kbd, battery, etc throught
the SPI bus (wskbd attaches on jmcu, but not tested)
- tod functions seem work
- initial code for SA-1111 (chip companion) : this is TODO
Next important steps, i think:
- gpio and intc on sa1111
- pcmcia support for sa11x0 (and sa1111 help logic)
- REAL root on nfs when we have PCMCIA support (we may use any of supported pccard NICs)
- root on wd0! (using already supported PCMCIA-ATA)
|
/* $OpenBSD: reloc.h,v 1.1 2005/04/01 10:40:48 mickey Exp $ */
/*
* Copyright (c) 2005 Michael Shalayeff
* All rights reserved.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _MACHINE_RELOC_H_
#define _MACHINE_RELOC_H_
/* pa1 compatibility */
#define RELOC_DLTREL21L RELOC_GPREL21L
#define RELOC_DLTREL14R RELOC_GPREL14R
#define RELOC_DLTIND21L RELOC_LTOFF21L
#define RELOC_DLTIND14R RELOC_LTOFF14R
#define RELOC_DLTIND14F RELOC_LTOFF14F
#define RELOC_DLTREL14WR RELOC_GPREL14WR
#define RELOC_DLTREL14DR RELOC_GPREL14DR
#define RELOC_DLTIND14WR RELOC_LTOFF14WR
#define RELOC_DLTIND14DR RELOC_LTOFF14DR
enum reloc_type {
RELOC_NONE = 0,
RELOC_DIR32, /* symbol + addend*/
RELOC_DIR21L, /* LR(symbol, addend) */
RELOC_DIR17R, /* RR(symbol, addend) */
RELOC_DIR17F, /* symbol + addend */
RELOC_DIR14R = 6, /* RR(symbol, addend) */
RELOC_PCREL32 = 9, /* pa2: symbol - PC - 8 + addend */
RELOC_PCREL21L, /* L(symbol - PC - 8 + addend */
RELOC_PCREL17R, /* R(symbol - PC - 8 + addend */
RELOC_PCREL17F, /* symbol - PC - 8 + addend */
RELOC_PCREL17C, /* pa1: symbol - PC - 8 + addend */
RELOC_PCREL14R, /* R(symbol - PC - 8 + addend */
RELOC_DPREL21L = 18, /* pa1: LR(symbol - GP, addend */
RELOC_DPREL14WR, /* pa1: RR(symbol - GP, addend */
RELOC_DPREL14DR, /* pa1: RR(symbol - GP, addend */
RELOC_DPREL14R, /* pa1: RR(symbol - GP, addend */
RELOC_GPREL21L = 26, /* LR(symbol - GP, addend */
RELOC_GPREL14R = 30, /* RR(symbol - GP, addend */
RELOC_LTOFF21L = 34, /* L(ltoff(symbol + addend)) */
RELOC_LTOFF14R = 38, /* R(ltoff(symbol + addend)) */
RELOC_LTOFF14F, /* pa1: ltoff(symbol + addend) */
RELOC_SETBASE, /* no relocation; base = symbol */
RELOC_SECREL32, /* symbol - SECT + addend */
RELOC_BASEREL21L, /* pa1: LR(symbol - base, addend) */
RELOC_BASEREL17R, /* pa1: RR(symbol - base, addend) */
RELOC_BASEREL14R = 46, /* pa1: RR(symbol - base, addend) */
RELOC_SEGBASE = 48, /* no relocation; SB = symbol */
RELOC_SEGREL32, /* symbol - SB + addend */
RELOC_PLTOFF21L, /* LR(pltoff(symbol), addend */
RELOC_PLTOFF14R = 54, /* RR(pltoff(symbol), addend */
RELOC_PLTOFF14F, /* pa1: pltoff(symbol) + addend */
RELOC_LTOFF_FPTR32 = 57,/* pa2: ltoff(fptr(symbol + addend)) */
RELOC_LTOFF_FPTR21L, /* pa2: L(ltoff(fptr(symbol + addend))) */
RELOC_LTOFF_FPTR14R= 62,/* pa2: R(ltoff(fptr(symbol + addend))) */
RELOC_FPTR64 = 64, /* pa2: fptr(symbol + addend) */
RELOC_PLABEL32, /* pa1: fptr(symbol) */
RELOC_PCREL64 = 72, /* pa2: symbol - PC - 8 + addend */
RELOC_PCREL22C, /* pa1: symbol - PC - 8 + addend */
RELOC_PCREL22F, /* symbol - PC - 8 + addend */
RELOC_PCREL14WR, /* R(symbol - PC - 8 + addend) */
RELOC_PCREL14DR, /* R(symbol - PC - 8 + addend) */
RELOC_PCREL16F, /* pa2: symbol - PC - 8 + addend */
RELOC_PCREL16WF, /* pa2: symbol - PC - 8 + addend */
RELOC_PCREL16DF, /* pa2: symbol - PC - 8 + addend */
RELOC_DIR64, /* pa2: symbol + addend */
RELOC_DIR14WR = 83, /* RR(symbol, addend) */
RELOC_DIR14DR, /* RR(symbol, addend) */
RELOC_DIR16F, /* pa2: symbol + addend */
RELOC_DIR16WF, /* pa2: symbol + addend */
RELOC_DIR16DF, /* pa2: symbol + addend */
RELOC_GPREL64, /* pa2: symbol - GP + addend */
RELOC_GPREL14WR = 91, /* RR(symbol - GP, addend) */
RELOC_GPREL14DR, /* RR(symbol - GP, addend) */
RELOC_GPREL16F, /* pa2: symbol - GP + addend */
RELOC_GPREL16WF, /* pa2: symbol - GP + addend */
RELOC_GPREL16DF, /* pa2: symbol - GP + addend */
RELOC_LTOFF64 = 96, /* pa2: ltoff(symbol + addend) */
RELOC_LTOFF14WR = 99, /* R(ltoff(symbol + addend)) */
RELOC_LTOFF14DR, /* R(ltoff(symbol + addend)) */
RELOC_LTOFF16F, /* pa2: ltoff(symbol + addend) */
RELOC_LTOFF16WF, /* pa2: ltoff(symbol + addend) */
RELOC_LTOFF16DF, /* pa2: ltoff(symbol + addend) */
RELOC_SECREL64, /* pa2: symbol - SECT + addend */
RELOC_BASEREL14WR=107, /* pa1: RR(symbol - base, addend */
RELOC_BASEREL14DR, /* pa1: RR(symbol - base, addend */
RELOC_SEGREL64 = 112, /* pa2: symbol - SB + addend */
RELOC_PLTOFF14WR =115, /* RR(pltoff(symbol) + addend) */
RELOC_PLTOFF14DR, /* RR(pltoff(symbol) + addend) */
RELOC_PLTOFF16F, /* pa2: pltoff(symbol) + addend */
RELOC_PLTOFF16WF, /* pa2: pltoff(symbol) + addend */
RELOC_PLTOFF16DF, /* pa2: pltoff(symbol) + addend */
RELOC_LTOFF_FPTR64, /* pa2: ltoff(fptr(symbol + addend)) */
RELOC_LTOFF_FPTR14WR=123,/* pa2: R(ltoff(fptr(symbol + addend) */
RELOC_LTOFF_FPTR14DR, /* pa2: R(ltoff(fptr(symbol + addend) */
RELOC_LTOFF_FPTR16F, /* pa2: ltoff(fptr(symbol + addend)) */
RELOC_LTOFF_FPTR16WF, /* pa2: ltoff(fptr(symbol + addend)) */
RELOC_LTOFF_FPTR16DF, /* pa2: ltoff(fptr(symbol + addend)) */
RELOC_LORESERVE, /* reserved for environment-specific use */
RELOC_COPY = 128,
RELOC_IPLT,
RELOC_EPLT,
RELOC_GDATA,
RELOC_JMPSLOT,
RELOC_RELATIVE,
RELOC_HIRESERVE = 255
};
#endif /* _MACHINE_RELOC_H_ */