__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * include/asm-parisc/processor.h
 *
 * Copyright (C) 1994 Linus Torvalds
 * Copyright (C) 2001 Grant Grundler
 */

#ifndef __ASM_PARISC_PROCESSOR_H
#define __ASM_PARISC_PROCESSOR_H

#ifndef __ASSEMBLY__
#include <linux/threads.h>
#include <linux/irqreturn.h>

#include <asm/assembly.h>
#include <asm/prefetch.h>
#include <asm/hardware.h>
#include <asm/pdc.h>
#include <asm/ptrace.h>
#include <asm/types.h>
#include <asm/percpu.h>
#endif /* __ASSEMBLY__ */

#define HAVE_ARCH_PICK_MMAP_LAYOUT

#define TASK_SIZE_OF(tsk)       ((tsk)->thread.task_size)
#define TASK_SIZE	        TASK_SIZE_OF(current)
#define TASK_UNMAPPED_BASE      (current->thread.map_base)

#define DEFAULT_TASK_SIZE32	(0xFFF00000UL)
#define DEFAULT_MAP_BASE32	(0x40000000UL)

#ifdef CONFIG_64BIT
#define DEFAULT_TASK_SIZE       (MAX_ADDRESS-0xf000000)
#define DEFAULT_MAP_BASE        (0x200000000UL)
#else
#define DEFAULT_TASK_SIZE	DEFAULT_TASK_SIZE32
#define DEFAULT_MAP_BASE	DEFAULT_MAP_BASE32
#endif

/* XXX: STACK_TOP actually should be STACK_BOTTOM for parisc.
 * prumpf */

#define STACK_TOP	TASK_SIZE
#define STACK_TOP_MAX	DEFAULT_TASK_SIZE

#ifndef __ASSEMBLY__

struct rlimit;
unsigned long mmap_upper_limit(struct rlimit *rlim_stack);
unsigned long calc_max_stack_size(unsigned long stack_max);

/*
 * Data detected about CPUs at boot time which is the same for all CPU's.
 * HP boxes are SMP - ie identical processors.
 *
 * FIXME: some CPU rev info may be processor specific...
 */
struct system_cpuinfo_parisc {
	unsigned int	cpu_count;
	unsigned int	cpu_hz;
	unsigned int	hversion;
	unsigned int	sversion;
	enum cpu_type	cpu_type;

	struct {
		struct pdc_model model;
		unsigned long versions;
		unsigned long cpuid;
		unsigned long capabilities;
		char   sys_model_name[81]; /* PDC-ROM returnes this model name */
	} pdc;

	const char	*cpu_name;	/* e.g. "PA7300LC (PCX-L2)" */
	const char	*family_name;	/* e.g. "1.1e" */
};


/* Per CPU data structure - ie varies per CPU.  */
struct cpuinfo_parisc {
	unsigned long it_value;     /* Interval Timer at last timer Intr */
	unsigned long irq_count;    /* number of IRQ's since boot */
	unsigned long cpuid;        /* aka slot_number or set to NO_PROC_ID */
	unsigned long hpa;          /* Host Physical address */
	unsigned long txn_addr;     /* MMIO addr of EIR or id_eid */
#ifdef CONFIG_SMP
	unsigned long pending_ipi;  /* bitmap of type ipi_message_type */
#endif
	unsigned long bh_count;     /* number of times bh was invoked */
	unsigned long fp_rev;
	unsigned long fp_model;
	unsigned long cpu_num;      /* CPU number from PAT firmware */
	unsigned long cpu_loc;      /* CPU location from PAT firmware */
	unsigned int state;
	struct parisc_device *dev;
};

extern struct system_cpuinfo_parisc boot_cpu_data;
DECLARE_PER_CPU(struct cpuinfo_parisc, cpu_data);
extern int time_keeper_id;		/* CPU used for timekeeping */

#define CPU_HVERSION ((boot_cpu_data.hversion >> 4) & 0x0FFF)

struct thread_struct {
	struct pt_regs regs;
	unsigned long  task_size;
	unsigned long  map_base;
	unsigned long  flags;
}; 

#define task_pt_regs(tsk) ((struct pt_regs *)&((tsk)->thread.regs))

/* Thread struct flags. */
#define PARISC_UAC_NOPRINT	(1UL << 0)	/* see prctl and unaligned.c */
#define PARISC_UAC_SIGBUS	(1UL << 1)
#define PARISC_KERNEL_DEATH	(1UL << 31)	/* see die_if_kernel()... */

#define PARISC_UAC_SHIFT	0
#define PARISC_UAC_MASK		(PARISC_UAC_NOPRINT|PARISC_UAC_SIGBUS)

#define SET_UNALIGN_CTL(task,value)                                       \
        ({                                                                \
        (task)->thread.flags = (((task)->thread.flags & ~PARISC_UAC_MASK) \
                                | (((value) << PARISC_UAC_SHIFT) &        \
                                   PARISC_UAC_MASK));                     \
        0;                                                                \
        })

#define GET_UNALIGN_CTL(task,addr)                                        \
        ({                                                                \
        put_user(((task)->thread.flags & PARISC_UAC_MASK)                 \
                 >> PARISC_UAC_SHIFT, (int __user *) (addr));             \
        })

#define INIT_THREAD { \
	.regs = {	.gr	= { 0, }, \
			.fr	= { 0, }, \
			.sr	= { 0, }, \
			.iasq	= { 0, }, \
			.iaoq	= { 0, }, \
			.cr27	= 0, \
		}, \
	.task_size	= DEFAULT_TASK_SIZE, \
	.map_base	= DEFAULT_MAP_BASE, \
	.flags		= 0 \
	}

struct task_struct;
void show_trace(struct task_struct *task, unsigned long *stack);

/*
 * Start user thread in another space.
 *
 * Note that we set both the iaoq and r31 to the new pc. When
 * the kernel initially calls execve it will return through an
 * rfi path that will use the values in the iaoq. The execve
 * syscall path will return through the gateway page, and
 * that uses r31 to branch to.
 *
 * For ELF we clear r23, because the dynamic linker uses it to pass
 * the address of the finalizer function.
 *
 * We also initialize sr3 to an illegal value (illegal for our
 * implementation, not for the architecture).
 */
typedef unsigned int elf_caddr_t;

/* The ELF abi wants things done a "wee bit" differently than
 * som does.  Supporting this behavior here avoids
 * having our own version of create_elf_tables.
 *
 * Oh, and yes, that is not a typo, we are really passing argc in r25
 * and argv in r24 (rather than r26 and r25).  This is because that's
 * where __libc_start_main wants them.
 *
 * Duplicated from dl-machine.h for the benefit of readers:
 *
 *  Our initial stack layout is rather different from everyone else's
 *  due to the unique PA-RISC ABI.  As far as I know it looks like
 *  this:

   -----------------------------------  (user startup code creates this frame)
   |         32 bytes of magic       |
   |---------------------------------|
   | 32 bytes argument/sp save area  |
   |---------------------------------| (bprm->p)
   |	    ELF auxiliary info	     |
   |         (up to 28 words)        |
   |---------------------------------|
   |		   NULL		     |
   |---------------------------------|
   |	   Environment pointers	     |
   |---------------------------------|
   |		   NULL		     |
   |---------------------------------|
   |        Argument pointers        |
   |---------------------------------| <- argv
   |          argc (1 word)          |
   |---------------------------------| <- bprm->exec (HACK!)
   |         N bytes of slack        |
   |---------------------------------|
   |	filename passed to execve    |
   |---------------------------------| (mm->env_end)
   |           env strings           |
   |---------------------------------| (mm->env_start, mm->arg_end)
   |           arg strings           |
   |---------------------------------|
   | additional faked arg strings if |
   | we're invoked via binfmt_script |
   |---------------------------------| (mm->arg_start)
   stack base is at TASK_SIZE - rlim_max.

on downward growing arches, it looks like this:
   stack base at TASK_SIZE
   | filename passed to execve
   | env strings
   | arg strings
   | faked arg strings
   | slack
   | ELF
   | envps
   | argvs
   | argc

 *  The pleasant part of this is that if we need to skip arguments we
 *  can just decrement argc and move argv, because the stack pointer
 *  is utterly unrelated to the location of the environment and
 *  argument vectors.
 *
 * Note that the S/390 people took the easy way out and hacked their
 * GCC to make the stack grow downwards.
 *
 * Final Note: For entry from syscall, the W (wide) bit of the PSW
 * is stuffed into the lowest bit of the user sp (%r30), so we fill
 * it in here from the current->personality
 */

#define USER_WIDE_MODE	(!is_32bit_task())

#define start_thread(regs, new_pc, new_sp) do {		\
	elf_addr_t *sp = (elf_addr_t *)new_sp;		\
	__u32 spaceid = (__u32)current->mm->context.space_id;	\
	elf_addr_t pc = (elf_addr_t)new_pc | 3;		\
	elf_caddr_t *argv = (elf_caddr_t *)bprm->exec + 1;	\
							\
	regs->iasq[0] = spaceid;			\
	regs->iasq[1] = spaceid;			\
	regs->iaoq[0] = pc;				\
	regs->iaoq[1] = pc + 4;                         \
	regs->sr[2] = LINUX_GATEWAY_SPACE;              \
	regs->sr[3] = 0xffff;				\
	regs->sr[4] = spaceid;				\
	regs->sr[5] = spaceid;				\
	regs->sr[6] = spaceid;				\
	regs->sr[7] = spaceid;				\
	regs->gr[ 0] = USER_PSW | (USER_WIDE_MODE ? PSW_W : 0); \
	regs->fr[ 0] = 0LL;                            	\
	regs->fr[ 1] = 0LL;                            	\
	regs->fr[ 2] = 0LL;                            	\
	regs->fr[ 3] = 0LL;                            	\
	regs->gr[30] = (((unsigned long)sp + 63) &~ 63) | (USER_WIDE_MODE ? 1 : 0); \
	regs->gr[31] = pc;				\
							\
	get_user(regs->gr[25], (argv - 1));		\
	regs->gr[24] = (long) argv;			\
	regs->gr[23] = 0;				\
} while(0)

struct mm_struct;

extern unsigned long __get_wchan(struct task_struct *p);

#define KSTK_EIP(tsk)	((tsk)->thread.regs.iaoq[0])
#define KSTK_ESP(tsk)	((tsk)->thread.regs.gr[30])

#define cpu_relax()	barrier()

/*
 * parisc_requires_coherency() is used to identify the combined VIPT/PIPT
 * cached CPUs which require a guarantee of coherency (no inequivalent aliases
 * with different data, whether clean or not) to operate
 */
#ifdef CONFIG_PA8X00
extern int _parisc_requires_coherency;
#define parisc_requires_coherency()	_parisc_requires_coherency
#else
#define parisc_requires_coherency()	(0)
#endif

extern int running_on_qemu;
extern int parisc_narrow_firmware;

extern void __noreturn toc_intr(struct pt_regs *regs);
extern void toc_handler(void);
extern unsigned int toc_handler_size;
extern unsigned int toc_handler_csum;
extern void do_cpu_irq_mask(struct pt_regs *);
extern irqreturn_t timer_interrupt(int, void *);
extern irqreturn_t ipi_interrupt(int, void *);
extern void parisc_clockevent_init(void);
extern void handle_interruption(int, struct pt_regs *);

/* called from assembly code: */
extern void start_parisc(void);
extern void smp_callin(unsigned long);
extern void sys_rt_sigreturn(struct pt_regs *, int);
extern void do_notify_resume(struct pt_regs *, long);
extern long do_syscall_trace_enter(struct pt_regs *);
extern void do_syscall_trace_exit(struct pt_regs *);

/* CPU startup and info */
struct seq_file;
extern void early_trap_init(void);
extern void collect_boot_cpu_data(void);
extern void btlb_init_per_cpu(void);
extern int show_cpuinfo (struct seq_file *m, void *v);

/* driver code in driver/parisc */
extern void processor_init(void);
struct parisc_device;
struct resource;
extern void sba_distributed_lmmio(struct parisc_device *, struct resource *);
extern void sba_directed_lmmio(struct parisc_device *, struct resource *);
extern void lba_set_iregs(struct parisc_device *lba, u32 ibase, u32 imask);
extern void ccio_cujo20_fixup(struct parisc_device *dev, u32 iovp);

#endif /* __ASSEMBLY__ */

#endif /* __ASM_PARISC_PROCESSOR_H */

Filemanager

Name Type Size Permission Actions
Kbuild File 194 B 0644
alternative.h File 2.01 KB 0644
asm-offsets.h File 35 B 0644
asmregs.h File 2.42 KB 0644
assembly.h File 13.98 KB 0644
atomic.h File 5.97 KB 0644
barrier.h File 2.5 KB 0644
bitops.h File 5.32 KB 0644
bug.h File 2.56 KB 0644
cache.h File 2.28 KB 0644
cacheflush.h File 3.08 KB 0644
cachetype.h File 178 B 0644
checksum.h File 4.6 KB 0644
cmpxchg.h File 3.67 KB 0644
compat.h File 3.3 KB 0644
compat_ucontext.h File 591 B 0644
current.h File 435 B 0644
delay.h File 533 B 0644
dma-mapping.h File 996 B 0644
dma.h File 5.65 KB 0644
dwarf.h File 456 B 0644
eisa_bus.h File 492 B 0644
eisa_eeprom.h File 4.22 KB 0644
elf.h File 14.15 KB 0644
extable.h File 2.17 KB 0644
fixmap.h File 2.2 KB 0644
floppy.h File 6.05 KB 0644
ftrace.h File 805 B 0644
futex.h File 2.65 KB 0644
grfioctl.h File 2.69 KB 0644
hardirq.h File 976 B 0644
hardware.h File 4.14 KB 0644
hash.h File 5.07 KB 0644
hugetlb.h File 1004 B 0644
io.h File 6.42 KB 0644
irq.h File 1.14 KB 0644
irqflags.h File 1.22 KB 0644
jump_label.h File 1.06 KB 0644
kbdleds.h File 477 B 0644
kexec.h File 827 B 0644
kfence.h File 865 B 0644
kgdb.h File 1.32 KB 0644
kprobes.h File 1.31 KB 0644
ldcw.h File 2.49 KB 0644
led.h File 1.18 KB 0644
linkage.h File 738 B 0644
mman.h File 808 B 0644
mmu.h File 199 B 0644
mmu_context.h File 2.37 KB 0644
mmzone.h File 202 B 0644
module.h File 527 B 0644
page.h File 5.09 KB 0644
parisc-device.h File 1.93 KB 0644
parport.h File 358 B 0644
pci.h File 5.71 KB 0644
pdc.h File 4.39 KB 0644
pdc_chassis.h File 14.4 KB 0644
pdcpat.h File 16.7 KB 0644
perf.h File 1.89 KB 0644
perf_event.h File 152 B 0644
pgalloc.h File 1.4 KB 0644
pgtable.h File 17.18 KB 0644
prefetch.h File 1.12 KB 0644
processor.h File 10.65 KB 0644
psw.h File 2.41 KB 0644
ptrace.h File 1.6 KB 0644
ropes.h File 9.86 KB 0644
rt_sigframe.h File 410 B 0644
runway.h File 183 B 0644
seccomp.h File 651 B 0644
sections.h File 332 B 0644
serial.h File 124 B 0644
shmparam.h File 968 B 0644
signal.h File 348 B 0644
smp.h File 1.18 KB 0644
socket.h File 310 B 0644
sparsemem.h File 345 B 0644
special_insns.h File 1.6 KB 0644
spinlock.h File 3.4 KB 0644
spinlock_types.h File 974 B 0644
string.h File 247 B 0644
superio.h File 3.25 KB 0644
switch_to.h File 332 B 0644
syscall.h File 1.44 KB 0644
text-patching.h File 445 B 0644
thread_info.h File 2.91 KB 0644
timex.h File 403 B 0644
tlb.h File 288 B 0644
tlbflush.h File 1.94 KB 0644
topology.h File 402 B 0644
traps.h File 666 B 0644
uaccess.h File 4.88 KB 0644
ucontext.h File 327 B 0644
unistd.h File 4.78 KB 0644
unwind.h File 2.66 KB 0644
vdso.h File 598 B 0644
video.h File 328 B 0644
vmalloc.h File 96 B 0644
Filemanager