Lines Matching refs:tok
504 static int sb_token_to_long(char *tok, uint32_t *rid) in sb_token_to_long() argument
509 if (tok[0] != '0' || tok[1] != 'x') { in sb_token_to_long()
514 tok += 2; in sb_token_to_long()
517 id = strtoul(tok, &endptr, 16); in sb_token_to_long()
529 if (endptr == tok) { in sb_token_to_long()
564 char *tok; in sb_build_dcd() local
577 tok = strtok(cmd->cmd, " "); in sb_build_dcd()
578 if (!tok) { in sb_build_dcd()
586 ret = sb_token_to_long(tok, &id); in sb_build_dcd()
620 char *tok; in sb_build_dcd_block() local
663 tok = strtok(cmd->cmd, " "); in sb_build_dcd_block()
664 if (!tok) { in sb_build_dcd_block()
672 ret = sb_token_to_long(tok, &address); in sb_build_dcd_block()
679 tok = strtok(NULL, " "); in sb_build_dcd_block()
680 if (!tok) { in sb_build_dcd_block()
688 ret = sb_token_to_long(tok, &value); in sb_build_dcd_block()
714 char *tok; in sb_build_section() local
724 tok = strtok(cmd->cmd, " "); in sb_build_section()
725 if (!tok) { in sb_build_section()
733 ret = sb_token_to_long(tok, &id); in sb_build_section()
741 tok = strtok(NULL, " "); in sb_build_section()
742 if (tok && (strlen(tok) == 8) && !strncmp(tok, "BOOTABLE", 8)) in sb_build_section()
825 char *tok; in sb_build_command_tag() local
837 tok = strtok(cmd->cmd, " "); in sb_build_command_tag()
838 if (tok && !strcmp(tok, "LAST")) in sb_build_command_tag()
869 char *tok; in sb_build_command_load() local
882 tok = strtok(cmd->cmd, " "); in sb_build_command_load()
883 if (!tok) { in sb_build_command_load()
891 if (!strcmp(tok, "IVT")) in sb_build_command_load()
893 if (!strcmp(tok, "DCD")) in sb_build_command_load()
896 tok = strtok(NULL, " "); in sb_build_command_load()
897 if (!tok) { in sb_build_command_load()
906 ret = sb_token_to_long(tok, &dest); in sb_build_command_load()
914 tok = strtok(NULL, " "); in sb_build_command_load()
915 if (!tok) { in sb_build_command_load()
927 ret = sb_token_to_long(tok, &ivtep); in sb_build_command_load()
953 ret = sb_token_to_long(tok, &dcdid); in sb_build_command_load()
990 ret = sb_load_file(cctx, tok); in sb_build_command_load()
993 cmd->lineno, tok); in sb_build_command_load()
1042 char *tok; in sb_build_command_fill() local
1055 tok = strtok(cmd->cmd, " "); in sb_build_command_fill()
1056 if (!tok) { in sb_build_command_fill()
1064 ret = sb_token_to_long(tok, &address); in sb_build_command_fill()
1071 tok = strtok(NULL, " "); in sb_build_command_fill()
1072 if (!tok) { in sb_build_command_fill()
1080 ret = sb_token_to_long(tok, &pattern); in sb_build_command_fill()
1087 tok = strtok(NULL, " "); in sb_build_command_fill()
1088 if (!tok) { in sb_build_command_fill()
1096 ret = sb_token_to_long(tok, &length); in sb_build_command_fill()
1140 char *tok; in sb_build_command_jump_call() local
1155 tok = strtok(cmd->cmd, " "); in sb_build_command_jump_call()
1156 if (!tok) { in sb_build_command_jump_call()
1165 if (!strcmp(tok, "HAB")) { in sb_build_command_jump_call()
1167 tok = strtok(NULL, " "); in sb_build_command_jump_call()
1168 if (!tok) { in sb_build_command_jump_call()
1176 ret = sb_token_to_long(tok, &dest); in sb_build_command_jump_call()
1183 tok = strtok(NULL, " "); in sb_build_command_jump_call()
1184 if (tok) { in sb_build_command_jump_call()
1185 ret = sb_token_to_long(tok, &arg); in sb_build_command_jump_call()
1242 char *tok; in sb_build_command_mode() local
1256 tok = strtok(cmd->cmd, " "); in sb_build_command_mode()
1257 if (!tok) { in sb_build_command_mode()
1265 if (!strcmp(tok, modetable[i].name)) { in sb_build_command_mode()
1273 if (!strcmp(tok, modetable[i].altname)) { in sb_build_command_mode()
1451 char *tok; in sb_parse_line() local
1457 tok = strtok_r(line, " ", &rptr); in sb_parse_line()
1458 if (!tok || (strlen(tok) == 0)) { in sb_parse_line()
1466 if (!strcmp(tok, "DISPLAYPROGRESS")) { in sb_parse_line()
1472 if (!strcmp(tok, "DCD")) { in sb_parse_line()
1480 if (!strcmp(tok, "SECTION")) { in sb_parse_line()
1495 if (!strcmp(tok, "NOP")) { in sb_parse_line()
1497 } else if (!strcmp(tok, "TAG")) { in sb_parse_line()
1499 } else if (!strcmp(tok, "LOAD")) { in sb_parse_line()
1501 } else if (!strcmp(tok, "FILL")) { in sb_parse_line()
1503 } else if (!strcmp(tok, "JUMP")) { in sb_parse_line()
1505 } else if (!strcmp(tok, "CALL")) { in sb_parse_line()
1507 } else if (!strcmp(tok, "MODE")) { in sb_parse_line()
1512 cmd->lineno, tok); in sb_parse_line()
1519 tok = strtok_r(tok, ".", &lptr); in sb_parse_line()
1520 if (!tok || (strlen(tok) == 0) || (lptr && strlen(lptr) != 1)) { in sb_parse_line()
1537 if (!strcmp(tok, "WRITE")) { in sb_parse_line()
1540 } else if (!strcmp(tok, "ANDC")) { in sb_parse_line()
1543 } else if (!strcmp(tok, "ORR")) { in sb_parse_line()
1546 } else if (!strcmp(tok, "EQZ")) { in sb_parse_line()
1549 } else if (!strcmp(tok, "EQ")) { in sb_parse_line()
1552 } else if (!strcmp(tok, "NEQ")) { in sb_parse_line()
1555 } else if (!strcmp(tok, "NEZ")) { in sb_parse_line()
1558 } else if (!strcmp(tok, "NOOP")) { in sb_parse_line()
1563 cmd->lineno, tok); in sb_parse_line()
1568 cmd->lineno, tok); in sb_parse_line()