Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
2
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
ebd3c00
Documentation
arch
alpha
arm
avr32
blackfin
cris
frv
h8300
ia64
m32r
m68k
m68knommu
mips
mn10300
parisc
powerpc
s390
sh
sparc
boot
include/asm
Kbuild
agp.h
apb.h
apc.h
asi.h
asmmacro.h
atomic.h
atomic_32.h
atomic_64.h
auxio.h
auxio_32.h
auxio_64.h
auxvec.h
backoff.h
bbc.h
bitext.h
bitops.h
bitops_32.h
bitops_64.h
bpp.h
btfixup.h
bug.h
bugs.h
byteorder.h
cache.h
cacheflush.h
cacheflush_32.h
cacheflush_64.h
chafsr.h
checksum.h
checksum_32.h
checksum_64.h
chmctrl.h
clock.h
cmt.h
compat.h
compat_signal.h
contregs.h
cpudata.h
cpudata_32.h
cpudata_64.h
cputime.h
current.h
cypress.h
dcr.h
dcu.h
delay.h
delay_32.h
delay_64.h
device.h
display7seg.h
div64.h
dma-mapping.h
dma-mapping_32.h
dma-mapping_64.h
dma.h
dma_32.h
dma_64.h
ebus.h
ebus_32.h
ebus_64.h
ecc.h
eeprom.h
elf.h
elf_32.h
elf_64.h
emergency-restart.h
envctrl.h
errno.h
estate.h
fb.h
fbio.h
fcntl.h
fhc.h
fixmap.h
floppy.h
floppy_32.h
floppy_64.h
fpumacro.h
ftrace.h
futex.h
futex_32.h
futex_64.h
hardirq.h
hardirq_32.h
hardirq_64.h
head.h
head_32.h
head_64.h
highmem.h
hugetlb.h
hvtramp.h
hw_irq.h
hypervisor.h
ide.h
idprom.h
intr_queue.h
io-unit.h
io.h
io_32.h
io_64.h
ioctl.h
ioctls.h
iommu.h
iommu_32.h
iommu_64.h
ipcbuf.h
ipcbuf_32.h
ipcbuf_64.h
irq.h
irq_32.h
irq_64.h
irq_regs.h
irqflags.h
irqflags_32.h
irqflags_64.h
jsflash.h
kdebug.h
kdebug_32.h
kdebug_64.h
kgdb.h
kmap_types.h
kprobes.h
ldc.h
linkage.h
lmb.h
local.h
lsu.h
machines.h
mbus.h
mc146818rtc.h
mc146818rtc_32.h
mc146818rtc_64.h
mdesc.h
memreg.h
mman.h
mmu.h
mmu_32.h
mmu_64.h
mmu_context.h
mmu_context_32.h
mmu_context_64.h
mmzone.h
module.h
module_32.h
module_64.h
mostek.h
mostek_32.h
mostek_64.h
mpmbox.h
msgbuf.h
msi.h
mutex.h
mxcc.h
ns87303.h
obio.h
of_device.h
of_platform.h
of_platform_32.h
of_platform_64.h
openprom.h
openprom_32.h
openprom_64.h
openpromio.h
oplib.h
oplib_32.h
oplib_64.h
page.h
page_32.h
page_64.h
param.h
parport.h
pbm.h
pci.h
pci_32.h
pci_64.h
pcic.h
percpu.h
percpu_32.h
percpu_64.h
perfctr.h
pgalloc.h
pgalloc_32.h
pgalloc_64.h
pgtable.h
pgtable_32.h
pgtable_64.h
pgtsrmmu.h
pgtsun4.h
pgtsun4c.h
pil.h
poll.h
posix_types.h
posix_types_32.h
posix_types_64.h
processor.h
processor_32.h
processor_64.h
prom.h
psr.h
psrcompat.h
pstate.h
ptrace.h
ptrace_32.h
ptrace_64.h
reboot.h
reg.h
reg_32.h
reg_64.h
resource.h
ross.h
rtc.h
rwsem-const.h
rwsem.h
sbi.h
sbus.h
sbus_32.h
sbus_64.h
scatterlist.h
scatterlist_32.h
scatterlist_64.h
scratchpad.h
seccomp.h
sections.h
sections_32.h
sections_64.h
sembuf.h
setup.h
sfafsr.h
sfp-machine.h
sfp-machine_32.h
sfp-machine_64.h
shmbuf.h
shmparam.h
shmparam_32.h
shmparam_64.h
sigcontext.h
sigcontext_32.h
sigcontext_64.h
siginfo.h
siginfo_32.h
siginfo_64.h
signal.h
signal_32.h
signal_64.h
smp.h
smp_32.h
smp_64.h
smpprim.h
socket.h
sockios.h
sparsemem.h
spinlock.h
spinlock_32.h
spinlock_64.h
spinlock_types.h
spitfire.h
sstate.h
stacktrace.h
starfire.h
stat.h
stat_32.h
stat_64.h
statfs.h
statfs_32.h
statfs_64.h
string.h
string_32.h
string_64.h
sun4paddr.h
sun4prom.h
sunbpp.h
swift.h
syscall.h
syscalls.h
sysen.h
system.h
system_32.h
system_64.h
termbits.h
termios.h
thread_info.h
thread_info_32.h
thread_info_64.h
timer.h
timer_32.h
timer_64.h
timex.h
timex_32.h
timex_64.h
tlb.h
tlb_32.h
tlb_64.h
tlbflush.h
tlbflush_32.h
tlbflush_64.h
topology.h
topology_32.h
topology_64.h
traps.h
tsb.h
tsunami.h
ttable.h
turbosparc.h
types.h
uaccess.h
uaccess_32.h
uaccess_64.h
uctx.h
unaligned.h
unistd.h
unistd_32.h
unistd_64.h
upa.h
user.h
utrap.h
vac-ops.h
vaddrs.h
vfc_ioctls.h
vga.h
viking.h
vio.h
visasm.h
watchdog.h
winmacro.h
xor.h
xor_32.h
xor_64.h
kernel
lib
math-emu
mm
oprofile
prom
Kconfig
Kconfig.debug
Makefile
defconfig
sparc64
um
x86
xtensa
.gitignore
Kconfig
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
arch
/
sparc
/
include
/
asm
/
processor_32.h
Blame
Blame
Latest commit
History
History
129 lines (104 loc) · 3.45 KB
Breadcrumbs
linux
/
arch
/
sparc
/
include
/
asm
/
processor_32.h
Top
File metadata and controls
Code
Blame
129 lines (104 loc) · 3.45 KB
Raw
/* include/asm/processor.h * * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) */ #ifndef __ASM_SPARC_PROCESSOR_H #define __ASM_SPARC_PROCESSOR_H /* * Sparc32 implementation of macro that returns current * instruction pointer ("program counter"). */ #define current_text_addr() ({ void *pc; __asm__("sethi %%hi(1f), %0; or %0, %%lo(1f), %0;\n1:" : "=r" (pc)); pc; }) #include <asm/psr.h> #include <asm/ptrace.h> #include <asm/head.h> #include <asm/signal.h> #include <asm/btfixup.h> #include <asm/page.h> /* * The sparc has no problems with write protection */ #define wp_works_ok 1 #define wp_works_ok__is_a_macro /* for versions in ksyms.c */ /* Whee, this is STACK_TOP + PAGE_SIZE and the lowest kernel address too... * That one page is used to protect kernel from intruders, so that * we can make our access_ok test faster */ #define TASK_SIZE PAGE_OFFSET #ifdef __KERNEL__ #define STACK_TOP (PAGE_OFFSET - PAGE_SIZE) #define STACK_TOP_MAX STACK_TOP #endif /* __KERNEL__ */ struct task_struct; #ifdef __KERNEL__ struct fpq { unsigned long *insn_addr; unsigned long insn; }; #endif typedef struct { int seg; } mm_segment_t; /* The Sparc processor specific thread struct. */ struct thread_struct { struct pt_regs *kregs; unsigned int _pad1; /* Special child fork kpsr/kwim values. */ unsigned long fork_kpsr __attribute__ ((aligned (8))); unsigned long fork_kwim; /* Floating point regs */ unsigned long float_regs[32] __attribute__ ((aligned (8))); unsigned long fsr; unsigned long fpqdepth; struct fpq fpqueue[16]; unsigned long flags; mm_segment_t current_ds; }; #define SPARC_FLAG_KTHREAD 0x1 /* task is a kernel thread */ #define SPARC_FLAG_UNALIGNED 0x2 /* is allowed to do unaligned accesses */ #define INIT_THREAD { \ .flags = SPARC_FLAG_KTHREAD, \ .current_ds = KERNEL_DS, \ } /* Return saved PC of a blocked thread. */ extern unsigned long thread_saved_pc(struct task_struct *t); /* Do necessary setup to start up a newly executed thread. */ static inline void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) { register unsigned long zero asm("g1"); regs->psr = (regs->psr & (PSR_CWP)) | PSR_S; regs->pc = ((pc & (~3)) - 4); regs->npc = regs->pc + 4; regs->y = 0; zero = 0; __asm__ __volatile__("std\t%%g0, [%0 + %3 + 0x00]\n\t" "std\t%%g0, [%0 + %3 + 0x08]\n\t" "std\t%%g0, [%0 + %3 + 0x10]\n\t" "std\t%%g0, [%0 + %3 + 0x18]\n\t" "std\t%%g0, [%0 + %3 + 0x20]\n\t" "std\t%%g0, [%0 + %3 + 0x28]\n\t" "std\t%%g0, [%0 + %3 + 0x30]\n\t" "st\t%1, [%0 + %3 + 0x38]\n\t" "st\t%%g0, [%0 + %3 + 0x3c]" : /* no outputs */ : "r" (regs), "r" (sp - sizeof(struct reg_window)), "r" (zero), "i" ((const unsigned long)(&((struct pt_regs *)0)->u_regs[0])) : "memory"); } /* Free all resources held by a thread. */ #define release_thread(tsk) do { } while(0) extern pid_t kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); /* Prepare to copy thread state - unlazy all lazy status */ #define prepare_to_copy(tsk) do { } while (0) extern unsigned long get_wchan(struct task_struct *); #define task_pt_regs(tsk) ((tsk)->thread.kregs) #define KSTK_EIP(tsk) ((tsk)->thread.kregs->pc) #define KSTK_ESP(tsk) ((tsk)->thread.kregs->u_regs[UREG_FP]) #ifdef __KERNEL__ extern struct task_struct *last_task_used_math; #define cpu_relax() barrier() #endif #endif /* __ASM_SPARC_PROCESSOR_H */
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
You can’t perform that action at this time.