type
stringclasses
5 values
content
stringlengths
9
163k
includes
#include <linux/string.h>
includes
#include <asm/bootinfo.h>
includes
#include <asm/time.h>
includes
#include <asm/vr41xx/irq.h>
includes
#include <asm/vr41xx/vr41xx.h>
defines
#define IO_MEM_RESOURCE_START 0UL
defines
#define IO_MEM_RESOURCE_END 0x1fffffffUL
functions
__init iomem_resource_init(void) { iomem_resource.start = IO_MEM_RESOURCE_START; iomem_resource.end = IO_MEM_RESOURCE_END; }
functions
__init setup_timer_frequency(void) { unsigned long tclock; tclock = vr41xx_get_tclock_frequency(); if (current_cpu_data.processor_id == PRID_VR4131_REV2_0 || current_cpu_data.processor_id == PRID_VR4131_REV2_1) mips_hpt_frequency = tclock / 2; else mips_hpt_frequency = tclock / 4; }
functions
__init plat_timer_setup(struct irqaction *irq) { setup_irq(TIMER_IRQ, irq); }
functions
__init timer_init(void) { board_time_init = setup_timer_frequency; }
functions
__init plat_mem_setup(void) { vr41xx_calculate_clock_frequency(); timer_init(); iomem_resource_init(); }
functions
__init prom_init(void) { int argc, i; char **argv; argc = fw_arg0; argv = (char **)fw_arg1; for (i = 1; i < argc; i++) { strcat(arcs_cmdline, argv[i]); if (i < (argc - 1)) strcat(arcs_cmdline, " "); }
functions
__init prom_free_prom_memory (void) { return 0UL; }
defines
#define JPEG_INTERNALS
defines
#define SCALEBITS 16 /* speediest right-shift on some machines */
defines
#define ONE_HALF ((INT32) 1 << (SCALEBITS-1))
defines
#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5))
functions
SHIFT_TEMPS while (--num_rows >= 0) { inptr0 = input_buf[0][input_row]; inptr1 = input_buf[1][input_row]; inptr2 = input_buf[2][input_row]; input_row++; outptr = *output_buf++; for (col = 0; col < num_cols; col++) { y = GETJSAMPLE(inptr0[col]); cb = GETJSAMPLE(inptr1[co...
functions
SHIFT_TEMPS while (--num_rows >= 0) { inptr0 = input_buf[0][input_row]; inptr1 = input_buf[1][input_row]; inptr2 = input_buf[2][input_row]; inptr3 = input_buf[3][input_row]; input_row++; outptr = *output_buf++; for (col = 0; col < num_cols; col++) { y = GETJSAMPLE(inptr0[...
functions
else if (cinfo->jpeg_color_space == JCS_GRAYSCALE) { cconvert->pub.color_convert = gray_rgb_convert; }
functions
else if (cinfo->jpeg_color_space == JCS_RGB && RGB_PIXELSIZE == 3) { cconvert->pub.color_convert = null_convert; }
functions
else if (cinfo->jpeg_color_space == JCS_CMYK) { cconvert->pub.color_convert = null_convert; }
includes
#include <linux/mm.h>
includes
#include <linux/sysctl.h>
includes
#include <linux/config.h>
includes
#include <linux/types.h>
includes
#include <linux/ip.h>
includes
#include <linux/netfilter.h>
includes
#include <linux/netfilter_ipv4.h>
includes
#include <linux/module.h>
includes
#include <linux/kmod.h>
includes
#include <linux/skbuff.h>
includes
#include <linux/proc_fs.h>
includes
#include <net/checksum.h>
includes
#include <net/route.h>
includes
#include <linux/bitops.h>
includes
#include <linux/netfilter_ipv4/ip_tables.h>
includes
#include <linux/netfilter_ipv4/ip_nat.h>
includes
#include <linux/netfilter_ipv4/ip_nat_core.h>
includes
#include <linux/netfilter_ipv4/ip_nat_rule.h>
includes
#include <linux/netfilter_ipv4/listhelp.h>
defines
#define ASSERT_READ_LOCK(x)
defines
#define ASSERT_WRITE_LOCK(x)
defines
#define DEBUGP printk
defines
#define DEBUGP(format, args...)
defines
#define NAT_VALID_HOOKS ((1<<NF_IP_PRE_ROUTING) | (1<<NF_IP_POST_ROUTING) | (1<<NF_IP_LOCAL_OUT))
functions
int ipt_snat_target(struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, unsigned int hooknum, const struct ipt_target *target, const void *targinfo, void *userinfo) { struct ip_conntrack *ct; enum ip_conntrack_info ctinfo; const struct ip_...
functions
void warn_if_extra_mangle(u32 dstip, u32 srcip) { static int warned = 0; struct flowi fl = { .nl_u = { .ip4_u = { .daddr = dstip }
functions
int ipt_dnat_target(struct sk_buff **pskb, const struct net_device *in, const struct net_device *out, unsigned int hooknum, const struct ipt_target *target, const void *targinfo, void *userinfo) { struct ip_conntrack *ct; enum ip_conntrack_info ctinfo; const struct ip_...
functions
int ipt_snat_checkentry(const char *tablename, const void *entry, const struct ipt_target *target, void *targinfo, unsigned int targinfosize, unsigned int hook_mask) { struct ip_nat_multi_range_compat *mr = targinfo; /* Must be a valid range */ if (mr->rangesize != ...
functions
int ipt_dnat_checkentry(const char *tablename, const void *entry, const struct ipt_target *target, void *targinfo, unsigned int targinfosize, unsigned int hook_mask) { struct ip_nat_multi_range_compat *mr = targinfo; /* Must be a valid range */ if (mr->rangesize != ...
functions
int alloc_null_binding(struct ip_conntrack *conntrack, struct ip_nat_info *info, unsigned int hooknum) { /* Force range to this IP; let proto decide mapping for per-proto parts (hence not IP_NAT_RANGE_PROTO_SPECIFIED). Use reply in case it's already been mangled (eg local packet). */ u_int32_t ip ...
functions
int alloc_null_binding_confirmed(struct ip_conntrack *conntrack, struct ip_nat_info *info, unsigned int hooknum) { u_int32_t ip = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC ? conntrack->tuplehash[IP_CT_DIR_REPLY].tuple.dst.ip : conntrack->tuplehash[IP...
functions
int ip_nat_rule_find(struct sk_buff **pskb, unsigned int hooknum, const struct net_device *in, const struct net_device *out, struct ip_conntrack *ct, struct ip_nat_info *info) { int ret; ret = ipt_do_table(pskb, hooknum, in, out, &nat_table, NULL); if (ret == NF_ACCEPT) { if (!...
functions
__init ip_nat_rule_init(void) { int ret; ret = ipt_register_table(&nat_table, &nat_initial_table.repl); if (ret != 0) return ret; ret = ipt_register_target(&ipt_snat_reg); if (ret != 0) goto unregister_table; ret = ipt_register_target(&ipt_dnat_reg); if (ret != 0) goto unregister_snat; return ret; un...
functions
void ip_nat_rule_cleanup(void) { ipt_unregister_target(&ipt_dnat_reg); ipt_unregister_target(&ipt_snat_reg); ipt_unregister_table(&nat_table); }
defines
#define EEPROM_SIZE 32
functions
uint8_t eeprom_read_byte(const uint8_t *addr) { uintptr_t offset = (uintptr_t)addr; return buffer[offset]; }
functions
void eeprom_write_byte(uint8_t *addr, uint8_t value) { uintptr_t offset = (uintptr_t)addr; buffer[offset] = value; }
functions
uint16_t eeprom_read_word(const uint16_t *addr) { const uint8_t *p = (const uint8_t *)addr; return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8); }
functions
uint32_t eeprom_read_dword(const uint32_t *addr) { const uint8_t *p = (const uint8_t *)addr; return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); }
functions
void eeprom_read_block(void *buf, const void *addr, uint32_t len) { const uint8_t *p = (const uint8_t *)addr; uint8_t * dest = (uint8_t *)buf; while (len--) { *dest++ = eeprom_read_byte(p++); }
functions
void eeprom_write_word(uint16_t *addr, uint16_t value) { uint8_t *p = (uint8_t *)addr; eeprom_write_byte(p++, value); eeprom_write_byte(p, value >> 8); }
functions
void eeprom_write_dword(uint32_t *addr, uint32_t value) { uint8_t *p = (uint8_t *)addr; eeprom_write_byte(p++, value); eeprom_write_byte(p++, value >> 8); eeprom_write_byte(p++, value >> 16); eeprom_write_byte(p, value >> 24); }
functions
void eeprom_write_block(const void *buf, void *addr, uint32_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { eeprom_write_byte(p++, *src++); }
functions
void eeprom_update_byte(uint8_t *addr, uint8_t value) { eeprom_write_byte(addr, value); }
functions
void eeprom_update_word(uint16_t *addr, uint16_t value) { uint8_t *p = (uint8_t *)addr; eeprom_write_byte(p++, value); eeprom_write_byte(p, value >> 8); }
functions
void eeprom_update_dword(uint32_t *addr, uint32_t value) { uint8_t *p = (uint8_t *)addr; eeprom_write_byte(p++, value); eeprom_write_byte(p++, value >> 8); eeprom_write_byte(p++, value >> 16); eeprom_write_byte(p, value >> 24); }
functions
void eeprom_update_block(const void *buf, void *addr, uint32_t len) { uint8_t * p = (uint8_t *)addr; const uint8_t *src = (const uint8_t *)buf; while (len--) { eeprom_write_byte(p++, *src++); }
includes
#include <stdarg.h>
includes
#include <stdlib.h>
includes
#include <stdio.h>
includes
#include <string.h>
includes
#include <inttypes.h>
includes
#include <assert.h>
defines
#define GEN_HELPER 1
defines
#define SIM_COMPAT 0
defines
#define DISAS_GNU 1
defines
#define DISAS_MB 1
defines
#define D(x)
defines
#define EXTRACT_FIELD(src, start, end) \
defines
#define JMP_NOJMP 0
defines
#define JMP_DIRECT 1
defines
#define JMP_DIRECT_CC 2
defines
#define JMP_INDIRECT 3
defines
#define GEN_HELPER 2
structs
struct decoder_info { struct { uint32_t bits; uint32_t mask; };
functions
int sign_extend(unsigned int val, unsigned int width) { int sval; /* LSL. */ val <<= 31 - width; sval = val; /* ASR. */ sval >>= 31 - width; return sval; }
functions
void t_sync_flags(DisasContext *dc) { /* Synch the tb dependant flags between translator and runtime. */ if (dc->tb_flags != dc->synced_flags) { tcg_gen_movi_tl(env_iflags, dc->tb_flags); dc->synced_flags = dc->tb_flags; }
functions
void t_gen_raise_exception(DisasContext *dc, uint32_t index) { TCGv_i32 tmp = tcg_const_i32(index); t_sync_flags(dc); tcg_gen_movi_tl(cpu_SR[SR_PC], dc->pc); gen_helper_raise_exception(tmp); tcg_temp_free_i32(tmp); dc->is_jmp = DISAS_UPDATE; }
functions
void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) { TranslationBlock *tb; tb = dc->tb; if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK)) { tcg_gen_goto_tb(n); tcg_gen_movi_tl(cpu_SR[SR_PC], dest); tcg_gen_exit_tb((tcg_target_long)tb + n); }
functions
void read_carry(DisasContext *dc, TCGv d) { tcg_gen_shri_tl(d, cpu_SR[SR_MSR], 31); }
functions
void write_carry(DisasContext *dc, TCGv v) { TCGv t0 = tcg_temp_new(); tcg_gen_shli_tl(t0, v, 31); tcg_gen_sari_tl(t0, t0, 31); tcg_gen_andi_tl(t0, t0, (MSR_C | MSR_CC)); tcg_gen_andi_tl(cpu_SR[SR_MSR], cpu_SR[SR_MSR], ~(MSR_C | MSR_CC)); tcg_gen_or_tl(cpu_SR[SR_MSR], cpu_SR[...
functions
int dec_alu_op_b_is_small_imm(DisasContext *dc) { /* Immediate insn without the imm prefix ? */ return dc->type_b && !(dc->tb_flags & IMM_FLAG); }
functions
void dec_add(DisasContext *dc) { unsigned int k, c; TCGv cf; k = dc->opcode & 4; c = dc->opcode & 2; LOG_DIS("add%s%s%s r%d r%d r%d\n", dc->type_b ? "i" : "", k ? "k" : "", c ? "c" : "", dc->rd, dc->ra, dc->rb); /* Take care of the easy cases first. */ if (k) { ...
functions
void dec_sub(DisasContext *dc) { unsigned int u, cmp, k, c; TCGv cf, na; u = dc->imm & 2; k = dc->opcode & 4; c = dc->opcode & 2; cmp = (dc->imm & 1) && (!dc->type_b) && k; if (cmp) { LOG_DIS("cmp%s r%d, r%d ir=%x\n", u ? "u" : "", dc->rd, dc->ra, dc->ir); if (dc->rd) { ...
functions
void dec_pattern(DisasContext *dc) { unsigned int mode; int l1; if ((dc->tb_flags & MSR_EE_FLAG) && (dc->env->pvr.regs[2] & PVR2_ILL_OPCODE_EXC_MASK) && !((dc->env->pvr.regs[2] & PVR2_USE_PCMP_INSTR))) { tcg_gen_movi_tl(cpu_SR[SR_ESR], ESR_EC_ILLEGAL_OP); t_gen_raise_exc...
functions
void dec_and(DisasContext *dc) { unsigned int not; if (!dc->type_b && (dc->imm & (1 << 10))) { dec_pattern(dc); return; }
functions
void dec_or(DisasContext *dc) { if (!dc->type_b && (dc->imm & (1 << 10))) { dec_pattern(dc); return; }