[c21d4d6] | 1 | #
|
---|
| 2 | # Copyright (c) 2019 Jiří Zárevúcky
|
---|
| 3 | # All rights reserved.
|
---|
| 4 | #
|
---|
| 5 | # Redistribution and use in source and binary forms, with or without
|
---|
| 6 | # modification, are permitted provided that the following conditions
|
---|
| 7 | # are met:
|
---|
| 8 | #
|
---|
| 9 | # - Redistributions of source code must retain the above copyright
|
---|
| 10 | # notice, this list of conditions and the following disclaimer.
|
---|
| 11 | # - Redistributions in binary form must reproduce the above copyright
|
---|
| 12 | # notice, this list of conditions and the following disclaimer in the
|
---|
| 13 | # documentation and/or other materials provided with the distribution.
|
---|
| 14 | # - The name of the author may not be used to endorse or promote products
|
---|
| 15 | # derived from this software without specific prior written permission.
|
---|
| 16 | #
|
---|
| 17 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
| 18 | # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 19 | # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
| 20 | # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
| 21 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
| 22 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
| 23 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
| 24 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
| 25 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
| 26 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 27 | #
|
---|
| 28 |
|
---|
[2fff3c4] | 29 | # Generic kernel sources
|
---|
| 30 | generic_src = []
|
---|
| 31 |
|
---|
| 32 | # Generic kernel sources that are instrumented when CONFIG_TRACE is enabled.
|
---|
| 33 | # Must be disjoint with generic_src.
|
---|
| 34 | instrumentable_src = []
|
---|
| 35 |
|
---|
| 36 |
|
---|
| 37 | generic_src += files(
|
---|
[ad9178bf] | 38 | 'common/adt/bitmap.c',
|
---|
| 39 | 'common/adt/hash_table.c',
|
---|
| 40 | 'common/adt/list.c',
|
---|
| 41 | 'common/adt/odict.c',
|
---|
[163e34c] | 42 | 'common/gsort.c',
|
---|
[694ca3d6] | 43 | 'common/printf/printf_core.c',
|
---|
[fdfb24e] | 44 | 'common/stdc/calloc.c',
|
---|
| 45 | 'common/stdc/ctype.c',
|
---|
[b169619] | 46 | 'common/stdc/mem.c',
|
---|
[163e34c] | 47 | 'common/stdc/snprintf.c',
|
---|
| 48 | 'common/stdc/vsnprintf.c',
|
---|
[fdfb24e] | 49 | 'common/str.c',
|
---|
| 50 | 'common/str_error.c',
|
---|
| 51 | 'common/strtol.c',
|
---|
[b169619] | 52 |
|
---|
[2fff3c4] | 53 | 'src/cap/cap.c',
|
---|
| 54 | 'src/console/chardev.c',
|
---|
| 55 | 'src/console/console.c',
|
---|
| 56 | 'src/console/prompt.c',
|
---|
| 57 | 'src/cpu/cpu_mask.c',
|
---|
| 58 | 'src/ddi/irq.c',
|
---|
[2fbb42f] | 59 | 'src/debug/line.c',
|
---|
| 60 | 'src/debug/names.c',
|
---|
[2fff3c4] | 61 | 'src/debug/panic.c',
|
---|
[da13982] | 62 | 'src/debug/profile.c',
|
---|
| 63 | 'src/debug/sections.c',
|
---|
[2fff3c4] | 64 | 'src/debug/stacktrace.c',
|
---|
| 65 | 'src/debug/symtab.c',
|
---|
[2fbb42f] | 66 | 'src/debug/util.c',
|
---|
[2fff3c4] | 67 | 'src/ipc/event.c',
|
---|
| 68 | 'src/ipc/ipc.c',
|
---|
| 69 | 'src/ipc/ipcrsc.c',
|
---|
| 70 | 'src/ipc/irq.c',
|
---|
| 71 | 'src/ipc/ops/conctmeto.c',
|
---|
| 72 | 'src/ipc/ops/concttome.c',
|
---|
| 73 | 'src/ipc/ops/dataread.c',
|
---|
| 74 | 'src/ipc/ops/datawrite.c',
|
---|
| 75 | 'src/ipc/ops/debug.c',
|
---|
| 76 | 'src/ipc/ops/pagein.c',
|
---|
| 77 | 'src/ipc/ops/sharein.c',
|
---|
| 78 | 'src/ipc/ops/shareout.c',
|
---|
| 79 | 'src/ipc/ops/stchngath.c',
|
---|
| 80 | 'src/ipc/sysipc.c',
|
---|
| 81 | 'src/ipc/sysipc_ops.c',
|
---|
| 82 | 'src/lib/elf.c',
|
---|
| 83 | 'src/lib/halt.c',
|
---|
| 84 | 'src/lib/mem.c',
|
---|
| 85 | 'src/lib/ra.c',
|
---|
| 86 | 'src/lib/rd.c',
|
---|
| 87 | 'src/lib/ubsan.c',
|
---|
| 88 | 'src/log/log.c',
|
---|
| 89 | 'src/main/shutdown.c',
|
---|
| 90 | 'src/main/uinit.c',
|
---|
| 91 | 'src/main/version.c',
|
---|
| 92 | 'src/mm/backend_anon.c',
|
---|
| 93 | 'src/mm/backend_elf.c',
|
---|
| 94 | 'src/mm/backend_phys.c',
|
---|
| 95 | 'src/mm/backend_user.c',
|
---|
| 96 | 'src/mm/km.c',
|
---|
| 97 | 'src/mm/malloc.c',
|
---|
| 98 | 'src/mm/reserve.c',
|
---|
| 99 | 'src/printf/printf.c',
|
---|
| 100 | 'src/printf/vprintf.c',
|
---|
| 101 | 'src/proc/program.c',
|
---|
| 102 | 'src/proc/scheduler.c',
|
---|
| 103 | 'src/proc/task.c',
|
---|
| 104 | 'src/proc/thread.c',
|
---|
| 105 | 'src/security/perm.c',
|
---|
| 106 | 'src/smp/ipi.c',
|
---|
| 107 | 'src/smp/smp.c',
|
---|
| 108 | 'src/synch/condvar.c',
|
---|
[95658c9] | 109 | 'src/synch/irq_spinlock.c',
|
---|
[2fff3c4] | 110 | 'src/synch/mutex.c',
|
---|
| 111 | 'src/synch/semaphore.c',
|
---|
| 112 | 'src/synch/smc.c',
|
---|
| 113 | 'src/synch/spinlock.c',
|
---|
| 114 | 'src/synch/syswaitq.c',
|
---|
| 115 | 'src/synch/waitq.c',
|
---|
| 116 | 'src/syscall/copy.c',
|
---|
| 117 | 'src/syscall/syscall.c',
|
---|
| 118 | 'src/sysinfo/stats.c',
|
---|
| 119 | 'src/time/clock.c',
|
---|
| 120 | 'src/time/delay.c',
|
---|
| 121 | 'src/time/timeout.c',
|
---|
| 122 | )
|
---|
| 123 |
|
---|
| 124 | instrumentable_src += files(
|
---|
| 125 | 'src/cpu/cpu.c',
|
---|
| 126 | 'src/ddi/ddi.c',
|
---|
| 127 | 'src/interrupt/interrupt.c',
|
---|
| 128 | 'src/main/kinit.c',
|
---|
| 129 | 'src/main/main.c',
|
---|
| 130 | 'src/mm/as.c',
|
---|
| 131 | 'src/mm/frame.c',
|
---|
| 132 | 'src/mm/page.c',
|
---|
| 133 | 'src/mm/slab.c',
|
---|
| 134 | 'src/mm/tlb.c',
|
---|
| 135 | 'src/proc/current.c',
|
---|
| 136 | 'src/sysinfo/sysinfo.c',
|
---|
| 137 | )
|
---|
| 138 |
|
---|
| 139 | ## Kernel console support
|
---|
| 140 | #
|
---|
| 141 |
|
---|
| 142 | if CONFIG_KCONSOLE
|
---|
| 143 | generic_src += files('src/console/cmd.c')
|
---|
| 144 | instrumentable_src += files('src/console/kconsole.c')
|
---|
| 145 | endif
|
---|
| 146 |
|
---|
| 147 | ## Udebug interface sources
|
---|
| 148 | #
|
---|
| 149 |
|
---|
| 150 | if CONFIG_UDEBUG
|
---|
| 151 | generic_src += files(
|
---|
| 152 | 'src/ipc/kbox.c',
|
---|
| 153 | 'src/udebug/udebug.c',
|
---|
| 154 | 'src/udebug/udebug_ops.c',
|
---|
| 155 | 'src/udebug/udebug_ipc.c',
|
---|
| 156 | )
|
---|
| 157 | endif
|
---|