diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-03-18 12:01:04 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-03-28 18:32:25 +0100 |
commit | 2a64b83ebcd604d4ccad8a95480be418c8ccb451 (patch) | |
tree | 017c8121dc33483f7120d18694e93daa0711eaad /x86_64 | |
parent | 95625ce8d154b28431d6e881e3c8012e860af362 (diff) | |
download | gnumach-2a64b83ebcd604d4ccad8a95480be418c8ccb451.tar.gz gnumach-2a64b83ebcd604d4ccad8a95480be418c8ccb451.tar.bz2 gnumach-2a64b83ebcd604d4ccad8a95480be418c8ccb451.zip |
build system: Add 64bit variant
Only Xen platform for now.
* Makefrag.am [HOST_x86_64]: Include x86_64/Makefrag.am.
* configure.ac: Include x86_64/configfrag.ac.
[default:x86_64] (host_platform): Set platform to xen.
* x86_64/Makefrag.am, x86_64/configfrag.ac: New files.
Diffstat (limited to 'x86_64')
-rw-r--r-- | x86_64/Makefrag.am | 271 | ||||
-rw-r--r-- | x86_64/configfrag.ac | 48 |
2 files changed, 319 insertions, 0 deletions
diff --git a/x86_64/Makefrag.am b/x86_64/Makefrag.am new file mode 100644 index 00000000..d260cebc --- /dev/null +++ b/x86_64/Makefrag.am @@ -0,0 +1,271 @@ +# Makefile fragment for x86_64. + +# Copyright (C) 1997, 1999, 2006, 2007 Free Software Foundation, Inc. + +# Permission to use, copy, modify and distribute this software and its +# documentation is hereby granted, provided that both the copyright +# notice and this permission notice appear in all copies of the +# software, derivative works or modified versions, and any portions +# thereof, and that both notices appear in supporting documentation. +# +# THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS +# "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY +# LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE +# USE OF THIS SOFTWARE. + +# +# Source files for any x86_64 kernel. +# + +libkernel_a_SOURCES += \ + i386/i386at/autoconf.c \ + i386/i386at/autoconf.h \ + i386/i386at/biosmem.c \ + i386/i386at/biosmem.h \ + i386/i386at/conf.c \ + i386/i386at/cons_conf.c \ + i386/i386at/elf.h \ + i386/i386at/idt.h \ + i386/i386at/model_dep.c \ + i386/i386at/model_dep.h \ + i386/include/mach/sa/stdarg.h + +if PLATFORM_at +libkernel_a_SOURCES += \ + x86_64/boothdr.S \ + i386/i386at/com.c \ + i386/i386at/com.h \ + i386/i386at/comreg.h \ + i386/i386at/cram.h \ + i386/i386at/disk.h \ + i386/i386at/i8250.h \ + i386/i386at/immc.c \ + i386/i386at/int_init.c \ + i386/i386at/int_init.h \ + x86_64/interrupt.S \ + i386/i386at/kd.c \ + i386/i386at/kd.h \ + i386/i386at/kd_event.c \ + i386/i386at/kd_event.h \ + i386/i386at/kd_queue.c \ + i386/i386at/kd_queue.h \ + i386/i386at/kd_mouse.c \ + i386/i386at/kd_mouse.h \ + x86_64/kdasm.S \ + i386/i386at/kdsoft.h \ + i386/i386at/mem.c \ + i386/i386at/mem.h \ + i386/i386at/pic_isa.c \ + i386/i386at/rtc.c \ + i386/i386at/rtc.h +endif + +# +# `lpr' device support. +# + +if enable_lpr +libkernel_a_SOURCES += \ + i386/i386at/lpr.c \ + i386/i386at/lpr.h +endif + + +# +# Further source files for any x86_64 kernel. +# + +libkernel_a_SOURCES += \ + i386/i386/ast.h \ + i386/i386/ast_check.c \ + i386/i386/ast_types.h \ + i386/i386/cpu.h \ + i386/i386/cpu_number.h \ + x86_64/cswitch.S \ + i386/i386/db_disasm.c \ + i386/i386/db_interface.c \ + i386/i386/db_interface.h \ + i386/i386/db_machdep.h \ + i386/i386/db_trace.c \ + i386/i386/db_trace.h \ + i386/i386/debug.h \ + i386/i386/debug_i386.c \ + x86_64/debug_trace.S \ + i386/i386/eflags.h \ + i386/i386/fpu.c \ + i386/i386/fpu.h \ + i386/i386/gdt.c \ + i386/i386/gdt.h \ + i386/i386/idt-gen.h \ + i386/i386/idt.c \ + x86_64/idt_inittab.S \ + i386/i386/io_perm.c \ + i386/i386/io_perm.h \ + i386/i386/ipl.h \ + i386/i386/ktss.c \ + i386/i386/ktss.h \ + i386/i386/kttd_interface.c \ + i386/i386/kttd_machdep.h \ + i386/i386/ldt.c \ + i386/i386/ldt.h \ + i386/i386/lock.h \ + x86_64/locore.S \ + i386/i386/locore.h \ + i386/i386/loose_ends.c \ + i386/i386/loose_ends.h \ + i386/i386/mach_param.h \ + i386/i386/machine_routines.h \ + i386/i386/machine_task.c \ + i386/i386/machspl.h \ + i386/i386/model_dep.h \ + i386/i386/mp_desc.c \ + i386/i386/mp_desc.h \ + i386/i386/pcb.c \ + i386/i386/pcb.h \ + i386/i386/phys.c \ + i386/i386/pio.h \ + i386/i386/pmap.h \ + i386/i386/proc_reg.h \ + i386/i386/sched_param.h \ + i386/i386/seg.c \ + i386/i386/seg.h \ + i386/i386/setjmp.h \ + x86_64/spl.S \ + i386/i386/spl.h \ + i386/i386/strings.c \ + i386/i386/task.h \ + i386/i386/thread.h \ + i386/i386/time_stamp.h \ + i386/i386/trap.c \ + i386/i386/trap.h \ + i386/i386/tss.h \ + i386/i386/user_ldt.c \ + i386/i386/user_ldt.h \ + i386/i386/vm_param.h \ + i386/i386/xpr.h \ + i386/intel/pmap.c \ + i386/intel/pmap.h \ + i386/intel/read_fault.c \ + i386/intel/read_fault.h +EXTRA_DIST += \ + i386/i386/mach_i386.srv + +if PLATFORM_at +libkernel_a_SOURCES += \ + i386/i386/hardclock.c \ + i386/i386/hardclock.h \ + i386/i386/io_map.c \ + i386/i386/pic.c \ + i386/i386/pic.h \ + i386/i386/pit.c \ + i386/i386/pit.h +endif + +# +# KDB support. +# + +if enable_kdb +libkernel_a_SOURCES += \ + x86_64/_setjmp.S +endif + + +# +# Files from the generic sources that we want. +# + +libkernel_a_SOURCES += \ + chips/busses.c \ + chips/busses.h \ + device/cirbuf.c + +# +# Automatically generated source files. +# +# See Makerules.mig.am. +# + +nodist_lib_dep_tr_for_defs_a_SOURCES += \ + i386/i386/mach_i386.server.defs.c +nodist_libkernel_a_SOURCES += \ + i386/i386/mach_i386.server.h \ + i386/i386/mach_i386.server.c \ + i386/i386/mach_i386.server.msgids +# i386/i386/mach_i386.server.defs + +EXTRA_DIST += \ + i386/i386/i386asm.sym +nodist_libkernel_a_SOURCES += \ + i386/i386/i386asm.h + +# +# Architecture specialities. +# + +EXTRA_DIST += \ + x86_64/ldscript + +AM_CPPFLAGS += \ + -I$(top_srcdir)/i386 \ + -I$(top_srcdir)/i386/i386 \ + -I$(top_srcdir)/i386/include/mach/sa + +AM_CFLAGS += \ + -mno-red-zone \ + -mcmodel=kernel \ + -mno-3dnow \ + -mno-mmx \ + -mno-sse \ + -mno-sse2 + +# +# Installation. +# + +include_mach_i386dir = $(includedir)/mach/i386 +include_mach_i386_HEADERS = \ + i386/include/mach/i386/asm.h \ + i386/include/mach/i386/boolean.h \ + i386/include/mach/i386/eflags.h \ + i386/include/mach/i386/exception.h \ + i386/include/mach/i386/fp_reg.h \ + i386/include/mach/i386/ioccom.h \ + i386/include/mach/i386/kern_return.h \ + i386/include/mach/i386/mach_i386.defs \ + i386/include/mach/i386/mach_i386_types.h \ + i386/include/mach/i386/machine_types.defs \ + i386/include/mach/i386/multiboot.h \ + i386/include/mach/i386/syscall_sw.h \ + i386/include/mach/i386/thread_status.h \ + i386/include/mach/i386/trap.h \ + i386/include/mach/i386/vm_param.h \ + i386/include/mach/i386/vm_types.h + +# +# Building a distribution. +# + +EXTRA_DIST += \ + i386/README-Drivers + +# Instead of listing each file individually... +EXTRA_DIST += \ + i386/include + +# +# Platform specific parts. +# + +if PLATFORM_xen +libkernel_a_SOURCES += \ + x86_64/xen_locore.S \ + x86_64/xen_boothdr.S \ + i386/xen/xen.c \ + i386/i386/xen.h + +gnumach_LINKFLAGS += \ + --defsym _START=0x40000000 \ + --defsym _START_MAP=0x40000000 \ + -T '$(srcdir)'/x86_64/ldscript +endif diff --git a/x86_64/configfrag.ac b/x86_64/configfrag.ac new file mode 100644 index 00000000..99db468f --- /dev/null +++ b/x86_64/configfrag.ac @@ -0,0 +1,48 @@ +dnl Configure fragment for x86_64. + +dnl Copyright (C) 1999, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. + +dnl Permission to use, copy, modify and distribute this software and its +dnl documentation is hereby granted, provided that both the copyright +dnl notice and this permission notice appear in all copies of the +dnl software, derivative works or modified versions, and any portions +dnl thereof, and that both notices appear in supporting documentation. +dnl +dnl THE FREE SOFTWARE FOUNDATION ALLOWS FREE USE OF THIS SOFTWARE IN ITS +dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY +dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE +dnl USE OF THIS SOFTWARE. + +# +# Definitions. +# + +[case $host_cpu in + x86_64)] + AM_CONDITIONAL([HOST_x86_64], [true]) + + # Some of the x86_64-specific code checks for these. + AC_DEFINE([__ELF__], [1], [__ELF__]) + + # Determines the size of the CPU cache line. + AC_DEFINE([CPU_L1_SHIFT], [6], [CPU_L1_SHIFT]) + + [# Does the architecture provide machine-specific interfaces? + mach_machine_routines=1;; + *)] + AM_CONDITIONAL([HOST_x86_64], [false])[;; +esac + +case $host_platform in + at)] + AM_CONDITIONAL([PLATFORM_at], [true])[;; + *)] + AM_CONDITIONAL([PLATFORM_at], [false])[;; +esac] + +AC_DEFINE([PAE], [1], [PAE support]) +AM_CONDITIONAL([enable_pae], [true]) + +dnl Local Variables: +dnl mode: autoconf +dnl End: |