Lines Matching +full:- +full:- +full:exit +full:- +full:code
5 # SPDX-License-Identifier: Apache-2.0
13 which is a link of the Zephyr kernel without various build-time
22 - Memory addresses of the Main and Double Fault TSS structures
24 - Memory addresses of where the GDT lives in memory, so that this
26 - whether userspace or HW stack protection are enabled in Kconfig
30 we generate flat 32-bit code and data segments. If hardware-
32 we additionally create descriptors for the main and double-
34 double-fault handling. If userspace is enabled, we also create
35 flat code/data segments for ring 3 execution.
51 sys.exit("pyelftools is out of date, need version 0.24 or later")
55 """Display debug message if --verbose"""
61 """Exit program with an error message"""
62 sys.exit(os.path.basename(sys.argv[0]) + ": " + text)
80 size = size - 1
100 """Create GDT entry for code or data"""
101 debug("create code or data entry: %x %x %x %x %x" %
110 # 32-bit protected mode
113 # 1 = code or data, 0 = system type
136 type_code = 0x9 # non-busy 32-bit TSS descriptor
163 parser.add_argument("-k", "--kernel", required=True,
165 parser.add_argument("-v", "--verbose", action="store_true",
167 parser.add_argument("-o", "--output-gdt", required=True,
182 # NOTE: use-cases are extremely limited; we always have a basic flat
183 # code/data segments. If we are doing stack protection, we are going to
207 # Selector 0x08: code descriptor
222 # Selector 0x20: double-fault TSS
226 # Selector 0x28: code descriptor, dpl = 3