Lines Matching +full:no +full:- +full:mt
5 # SPDX-License-Identifier: Apache-2.0
14 - That the memory address points to a kernel object
16 - The kernel object is of the expected type for the API being invoked
18 - The kernel object is of the expected initialization state
20 - The calling thread has sufficient permissions on the object
33 - A gperf script to generate the hash table mapping kernel object memory
35 object type, initialization state, and any object-specific data.
37 - A header file containing generated macros for validating driver instances
40 - A code fragment included by kernel.h with one enum constant for
43 - The inner cases of a switch/case C statement, included by
45 instances to their human-readable representation in the
48 - The inner cases of a switch/case C statement, included by
74 # - The first item is None, or the name of a Kconfig that
78 # - The second item is a boolean indicating whether it is permissible for
79 # the object to be located in user-accessible memory.
81 # - The third items is a boolean indicating whether this item can be
91 # https://stackoverflow.com/questions/39980323/are-dictionaries-ordered-in-python-3-6
144 return "K_OBJ_DRIVER_" + subsys[:-11].upper()
146 # --- debug stuff ---
163 fileinfo = files[die.attributes["DW_AT_decl_file"].value - 1]
164 filename = fileinfo.name.decode("utf-8")
165 filedir = includes[fileinfo.dir_index - 1].decode("utf-8")
174 # -- ELF processing
234 mt = type_env[self.member_type]
239 if isinstance(mt, KobjectType) and mt.name == STACK_TYPE:
240 # An array of stacks appears as a multi-dimensional array.
251 o = mt.get_kobjects(a)
264 objs.update(mt.get_kobjects(addr + (i * mt.size)))
277 for i in range(1, len(member_offset)-1):
298 mt = type_env[self.member_type]
299 return mt.get_kobjects(addr + self.member_offset)
356 # --- helper functions for getting data from DIEs ---
376 return die.attributes["DW_AT_name"].value.decode("utf-8")
468 mt = type_env[type_offset]
469 if mt.has_kobject():
470 if isinstance(mt, KobjectType) and mt.name == STACK_TYPE:
506 offset = addr - start
525 sys.exit("ELF file has no DWARF information")
581 # Boot-time initialization function; not an actual device
598 "No location information for object '%s'; possibly stack allocated"
635 # Never linked; gc-sections deleted it
666 debug("skip kernel-only stack at %s" % hex(addr))
695 debug("device instance at 0x%x has no associated subsystem"
726 # -- GPERF generation logic
728 header = """%compare-lengths
729 %define lookup-function-name z_object_lookup
730 %language=ANSI-C
731 %global-table
732 %struct-type
745 # NULL-terminated.
780 if i != sys_mutex_counter - 1:
789 if i != futex_counter - 1:
824 if counter != (stack_counter - 1):
842 # pre-initialized objects fall within this memory range, they are
996 parser.add_argument("-k", "--kernel", required=False,
999 "-g", "--gperf-output", required=False,
1002 "-V", "--validation-output", required=False,
1005 "-K", "--kobj-types-output", required=False,
1008 "-S", "--kobj-otype-output", required=False,
1011 "-Z", "--kobj-size-output", required=False,
1013 parser.add_argument("-i", "--include-subsystem-list", required=False, action='append',
1016 -i file1 -i file2 ...''')
1018 parser.add_argument("-v", "--verbose", action="store_true",
1033 assert args.kernel, "--kernel ELF required for --gperf-output"
1045 .format(thread_counter, -(-thread_counter // 8)))