/hardware/google/apf/ |
D | apf_disassembler.c | 30 uint32_t program_len = 0; in main() local 35 while (scanf("%2x", &byte) == 1 && program_len < sizeof(program)) { in main() 36 program[program_len++] = byte; in main() 39 for (uint32_t pc = 0; pc < program_len;) { in main() 40 printf("%s\n", apf_disassemble(program, program_len, &pc)); in main()
|
D | disassembler.c | 81 static void print_jump_target(uint32_t target, uint32_t program_len) { in print_jump_target() argument 82 if (target == program_len) { in print_jump_target() 84 } else if (target == program_len + 1) { in print_jump_target() 91 const char* apf_disassemble(const uint8_t* program, uint32_t program_len, uint32_t* const ptr2pc) { in apf_disassemble() argument 94 if (*ptr2pc > program_len + 1) { in apf_disassemble() 95 bprintf("pc is overflow: pc %d, program_len: %d", *ptr2pc, program_len); in apf_disassemble() 101 if (*ptr2pc == program_len) { in apf_disassemble() 107 if (*ptr2pc == program_len + 1) { in apf_disassemble() 119 for (uint32_t i = 0; i < (length) && *ptr2pc < program_len; i++) \ in apf_disassemble() 165 print_jump_target(*ptr2pc + imm, program_len); in apf_disassemble() [all …]
|
D | apf_run.c | 171 uint32_t program_len, uint32_t ram_len, const char* pkt, uint32_t filter_age) { in packet_handler() argument 179 ret = apf_run(NULL, (uint32_t*)program, program_len, ram_len, packet, packet_len, in packet_handler() 182 ret = accept_packet(program, program_len, ram_len, packet, packet_len, in packet_handler() 191 void apf_trace_hook(uint32_t pc, const uint32_t* regs, const uint8_t* program, uint32_t program_len, in apf_trace_hook() argument 197 printf("%s\n", apf_disassemble(program, program_len, &pc)); in apf_trace_hook() 202 uint32_t program_len, uint32_t ram_len, const char* filename, in file_handler() argument 234 result = apf_run(NULL, (uint32_t*)program, program_len, ram_len, apf_packet, in file_handler() 237 result = accept_packet(program, program_len, ram_len, apf_packet, in file_handler() 275 uint32_t program_len; in main() local 290 program_len = parse_hex(optarg, &program); in main() [all …]
|
D | apf_interpreter.c | 26 uint32_t program_len, const uint8_t *packet, uint32_t packet_len, 29 #define APF_TRACE_HOOK(pc, regs, program, program_len, packet, packet_len, memory, memory_len) \ argument 45 int accept_packet(uint8_t* program, uint32_t program_len, uint32_t ram_len, in accept_packet() argument 49 #define IN_PROGRAM_BOUNDS(p) (ENFORCE_UNSIGNED(p) && (p) < program_len) in accept_packet() 56 (p) >= program_len && \ in accept_packet() 72 memory[MEMORY_OFFSET_PROGRAM_SIZE] = program_len; in accept_packet() 87 uint32_t instructions_remaining = program_len; in accept_packet() 90 APF_TRACE_HOOK(pc, registers, program, program_len, packet, packet_len, memory, ram_len); in accept_packet() 91 if (pc == program_len) { in accept_packet() 93 } else if (pc == (program_len + 1)) { in accept_packet()
|
D | disassembler.h | 36 const char* apf_disassemble(const uint8_t* program, uint32_t program_len, uint32_t* ptr2pc);
|
D | apf_interpreter.h | 58 int accept_packet(uint8_t* program, uint32_t program_len, uint32_t ram_len,
|
/hardware/google/apf/v4/ |
D | apf_interpreter.c | 26 uint32_t program_len, const uint8_t *packet, uint32_t packet_len, 29 #define APF_TRACE_HOOK(pc, regs, program, program_len, packet, packet_len, memory, memory_len) \ argument 45 int accept_packet(uint8_t* program, uint32_t program_len, uint32_t ram_len, in accept_packet() argument 49 #define IN_PROGRAM_BOUNDS(p) (ENFORCE_UNSIGNED(p) && (p) < program_len) in accept_packet() 56 (p) >= program_len && \ in accept_packet() 72 memory[MEMORY_OFFSET_PROGRAM_SIZE] = program_len; in accept_packet() 87 uint32_t instructions_remaining = program_len; in accept_packet() 90 APF_TRACE_HOOK(pc, registers, program, program_len, packet, packet_len, memory, ram_len); in accept_packet() 91 if (pc == program_len) { in accept_packet() 93 } else if (pc == (program_len + 1)) { in accept_packet()
|
D | apf_interpreter.h | 58 int accept_packet(uint8_t* program, uint32_t program_len, uint32_t ram_len,
|
/hardware/google/apf/v7/ |
D | apf_interpreter_source.c | 44 u32 program_len, const u8 *packet, u32 packet_len, 47 #define APF_TRACE_HOOK(pc, regs, program, program_len, packet, packet_len, memory, memory_len) \ argument 83 u32 program_len; // Length of the program member 149 u32 instructions_remaining = ctx->program_len; in do_apf_run() 153 if (ctx->program_len + 20 > ctx->ram_len) return EXCEPTION; in do_apf_run() 171 APF_TRACE_HOOK(ctx->pc, ctx->R, ctx->program, ctx->program_len, in do_apf_run() 173 if (ctx->pc == ctx->program_len + 1) return DROP; in do_apf_run() 174 if (ctx->pc == ctx->program_len) return PASS; in do_apf_run() 175 if (ctx->pc > ctx->program_len) return EXCEPTION; in do_apf_run() 440 ctx->program + ctx->program_len, in do_apf_run() [all …]
|
D | apf_interpreter.c | 590 u32 program_len, const u8 *packet, u32 packet_len, 593 #define APF_TRACE_HOOK(pc, regs, program, program_len, packet, packet_len, memory, memory_len) \ argument 629 u32 program_len; /* Length of the program */ member 695 u32 instructions_remaining = ctx->program_len; in do_apf_run() 699 if (ctx->program_len + 20 > ctx->ram_len) return EXCEPTION; in do_apf_run() 717 APF_TRACE_HOOK(ctx->pc, ctx->R, ctx->program, ctx->program_len, in do_apf_run() 719 if (ctx->pc == ctx->program_len + 1) return DROP; in do_apf_run() 720 if (ctx->pc == ctx->program_len) return PASS; in do_apf_run() 721 if (ctx->pc > ctx->program_len) return EXCEPTION; in do_apf_run() 986 ctx->program + ctx->program_len, in do_apf_run() [all …]
|
D | apf_interpreter.h | 167 int apf_run(void* ctx, uint32_t* const program, const uint32_t program_len,
|
/hardware/google/apf/devtools/ |
D | apf_interpreter.c | 590 u32 program_len, const u8 *packet, u32 packet_len, 593 #define APF_TRACE_HOOK(pc, regs, program, program_len, packet, packet_len, memory, memory_len) \ argument 629 u32 program_len; /* Length of the program */ member 695 u32 instructions_remaining = ctx->program_len; in do_apf_run() 699 if (ctx->program_len + 20 > ctx->ram_len) return EXCEPTION; in do_apf_run() 717 APF_TRACE_HOOK(ctx->pc, ctx->R, ctx->program, ctx->program_len, in do_apf_run() 719 if (ctx->pc == ctx->program_len + 1) return DROP; in do_apf_run() 720 if (ctx->pc == ctx->program_len) return PASS; in do_apf_run() 721 if (ctx->pc > ctx->program_len) return EXCEPTION; in do_apf_run() 986 ctx->program + ctx->program_len, in do_apf_run() [all …]
|
D | apf_interpreter.h | 167 int apf_run(void* ctx, uint32_t* const program, const uint32_t program_len,
|
/hardware/google/apf/v6/ |
D | apf_interpreter.c | 588 u32 program_len, const u8 *packet, u32 packet_len, 591 #define APF_TRACE_HOOK(pc, regs, program, program_len, packet, packet_len, memory, memory_len) \ argument 627 u32 program_len; /* Length of the program */ member 688 u32 instructions_remaining = ctx->program_len; in do_apf_run() 692 if (ctx->program_len + 20 > ctx->ram_len) return EXCEPTION; in do_apf_run() 709 APF_TRACE_HOOK(ctx->pc, ctx->R, ctx->program, ctx->program_len, in do_apf_run() 711 if (ctx->pc == ctx->program_len + 1) return DROP; in do_apf_run() 712 if (ctx->pc == ctx->program_len) return PASS; in do_apf_run() 713 if (ctx->pc > ctx->program_len) return EXCEPTION; in do_apf_run() 976 ctx->program + ctx->program_len, in do_apf_run() [all …]
|
D | apf_interpreter.h | 167 int apf_run(void* ctx, uint32_t* const program, const uint32_t program_len,
|
/hardware/broadcom/wlan/bcmdhd/halutil/ |
D | halutil.cpp | 5156 u32 program_len; in setApfProgram() local 5169 program_len = (strlen((const char *)str) / 2); in setApfProgram() 5170 program = (u8 *)malloc(program_len); in setApfProgram() 5176 if ((u32)str2hex(str, (char *)program) != program_len) { in setApfProgram() 5184 ret = hal_fn.wifi_set_packet_filter(ifHandle, program, program_len); in setApfProgram()
|