[41408d94] | 1 | #
|
---|
| 2 | # Copyright (c) 2005 Martin Decky
|
---|
| 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 |
|
---|
| 29 | if PROCESSOR == 'us' or PROCESSOR == 'us3'
|
---|
| 30 | USARCH = 'sun4u'
|
---|
| 31 | elif PROCESSOR == 'sun4v'
|
---|
| 32 | USARCH = 'sun4v'
|
---|
| 33 | else
|
---|
| 34 | error('Unknown PROCESSOR: ' + PROCESSOR)
|
---|
| 35 | endif
|
---|
| 36 |
|
---|
| 37 | arch_src += files(
|
---|
| 38 | 'src/sparc64.c',
|
---|
| 39 | 'src/cpu' / USARCH / 'cpu.c',
|
---|
| 40 | 'src/debug/stacktrace.c',
|
---|
| 41 | 'src/debug/stacktrace_asm.S',
|
---|
| 42 | 'src/asm.S',
|
---|
| 43 | 'src' / USARCH / 'asm.S',
|
---|
| 44 | 'src/console.c',
|
---|
| 45 | 'src/context.S',
|
---|
| 46 | 'src/fpu_context.c',
|
---|
| 47 | 'src/dummy.S',
|
---|
| 48 | 'src/mm' / USARCH / 'km.c',
|
---|
| 49 | 'src/mm' / USARCH / 'as.c',
|
---|
| 50 | 'src/mm' / USARCH / 'frame.c',
|
---|
| 51 | 'src/mm/page.c',
|
---|
| 52 | 'src/mm' / USARCH / 'tlb.c',
|
---|
| 53 | 'src' / USARCH / 'sparc64.c',
|
---|
| 54 | 'src' / USARCH / 'start.S',
|
---|
| 55 | 'src/proc' / USARCH / 'scheduler.c',
|
---|
| 56 | 'src/proc/thread.c',
|
---|
| 57 | 'src/smc.c',
|
---|
| 58 | 'src/trap' / USARCH / 'mmu.S',
|
---|
| 59 | 'src/trap' / USARCH / 'trap_table.S',
|
---|
| 60 | 'src/trap/trap.c',
|
---|
| 61 | 'src/trap/exception.c',
|
---|
| 62 | 'src/trap/interrupt.c',
|
---|
| 63 | 'src/drivers/tick.c',
|
---|
| 64 | 'src/drivers/kbd.c',
|
---|
| 65 | 'src/drivers/tty.c',
|
---|
| 66 | 'src/drivers/pci.c',
|
---|
| 67 | 'src/trap' / USARCH / 'interrupt.c',
|
---|
| 68 | )
|
---|
| 69 |
|
---|
| 70 | if USARCH == 'sun4v'
|
---|
| 71 | arch_src += files(
|
---|
| 72 | 'src/drivers/niagara.c',
|
---|
| 73 | 'src/sun4v/md.c',
|
---|
| 74 | )
|
---|
| 75 | endif
|
---|
| 76 |
|
---|
| 77 | if CONFIG_FB
|
---|
| 78 | arch_src += files(
|
---|
| 79 | 'src/drivers/scr.c',
|
---|
| 80 | )
|
---|
| 81 | endif
|
---|
| 82 |
|
---|
| 83 | if CONFIG_SMP
|
---|
| 84 | arch_src += files(
|
---|
| 85 | 'src/smp' / USARCH / 'smp.c',
|
---|
| 86 | 'src/smp' / USARCH / 'ipi.c',
|
---|
| 87 | )
|
---|
| 88 | endif
|
---|
| 89 |
|
---|
| 90 | if CONFIG_TSB
|
---|
| 91 | arch_src += files(
|
---|
| 92 | 'src/mm' / USARCH / 'tsb.c',
|
---|
| 93 | )
|
---|
| 94 | endif
|
---|
| 95 |
|
---|
| 96 |
|
---|
| 97 | _check_headers = [
|
---|
| 98 | 'include/arch/istate_struct.h',
|
---|
| 99 | 'include/arch/context_struct.h',
|
---|
| 100 | ]
|
---|
| 101 |
|
---|
| 102 | foreach h : _check_headers
|
---|
| 103 | arch_src += [ autocheck.process(h) ]
|
---|
| 104 | endforeach
|
---|