Home
last modified time | relevance | path

Searched refs:program_len (Results 1 – 16 of 16) sorted by relevance

/hardware/google/apf/
Dapf_disassembler.c30 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()
Ddisassembler.c81 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 …]
Dapf_run.c171 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 …]
Dapf_interpreter.c26 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()
Ddisassembler.h36 const char* apf_disassemble(const uint8_t* program, uint32_t program_len, uint32_t* ptr2pc);
Dapf_interpreter.h58 int accept_packet(uint8_t* program, uint32_t program_len, uint32_t ram_len,
/hardware/google/apf/v4/
Dapf_interpreter.c26 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()
Dapf_interpreter.h58 int accept_packet(uint8_t* program, uint32_t program_len, uint32_t ram_len,
/hardware/google/apf/v7/
Dapf_interpreter_source.c44 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 …]
Dapf_interpreter.c590 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 …]
Dapf_interpreter.h167 int apf_run(void* ctx, uint32_t* const program, const uint32_t program_len,
/hardware/google/apf/devtools/
Dapf_interpreter.c590 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 …]
Dapf_interpreter.h167 int apf_run(void* ctx, uint32_t* const program, const uint32_t program_len,
/hardware/google/apf/v6/
Dapf_interpreter.c588 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 …]
Dapf_interpreter.h167 int apf_run(void* ctx, uint32_t* const program, const uint32_t program_len,
/hardware/broadcom/wlan/bcmdhd/halutil/
Dhalutil.cpp5156 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()