diff options
-rw-r--r-- | sys/conf/Makefile.amd64 | 15 | ||||
-rw-r--r-- | sys/conf/files.amd64 | 110 | ||||
-rw-r--r-- | sys/conf/ldscript.amd64 | 198 | ||||
-rw-r--r-- | sys/conf/options.amd64 | 10 |
4 files changed, 219 insertions, 114 deletions
diff --git a/sys/conf/Makefile.amd64 b/sys/conf/Makefile.amd64 index 50775e17d1fc..c1dd8a85d27a 100644 --- a/sys/conf/Makefile.amd64 +++ b/sys/conf/Makefile.amd64 @@ -17,6 +17,19 @@ # after which config should be rerun for all machines. # +# The FSF cross tools don't understand -fformat-extensions +CWARNFLAGS= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ + -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ + -ffreestanding -Wno-format -Wno-sign-compare +CC= x86_64-unknown-freebsd5.0-gcc -D__amd64__ +LD= x86_64-unknown-freebsd5.0-ld +NM= x86_64-unknown-freebsd5.0-nm +SIZE= x86_64-unknown-freebsd5.0-size +OBJCOPY= x86_64-unknown-freebsd5.0-objcopy +OBJDUMP= x86_64-unknown-freebsd5.0-objdump +MACHINE_ARCH= amd64 +NO_CPU_COPTFLAGS= true # minimize cross compile pain + # Which version of config(8) is required. %VERSREQ= 500012 @@ -31,7 +44,7 @@ S= ../../.. .endif .include "$S/conf/kern.pre.mk" -MKMODULESENV+= MACHINE=x86_64 +MKMODULESENV+= MACHINE=amd64 %BEFORE_DEPEND diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 2845f1bf680f..53e6e61253ad 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -31,32 +31,84 @@ dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc isa/atkbd_isa.c optional atkbd -libkern/ffs.c standard - -x86_64/x86_64/autoconf.c standard -x86_64/x86_64/bios.c standard -x86_64/x86_64/bioscall.s standard -x86_64/x86_64/busdma_machdep.c standard -x86_64/x86_64/critical.c standard -x86_64/x86_64/dump_machdep.c standard -x86_64/x86_64/elf_machdep.c standard -x86_64/x86_64/exception.s standard -x86_64/x86_64/i686_mem.c standard -x86_64/x86_64/identcpu.c standard -x86_64/x86_64/initcpu.c standard -x86_64/x86_64/k6_mem.c standard -x86_64/x86_64/locore.s standard no-obj -x86_64/x86_64/machdep.c standard -x86_64/x86_64/mem.c standard -x86_64/x86_64/nexus.c standard -x86_64/x86_64/pmap.c standard -x86_64/x86_64/support.s standard -x86_64/x86_64/swtch.s standard -x86_64/x86_64/sys_machdep.c standard -x86_64/x86_64/trap.c standard -x86_64/x86_64/vm86.c standard -x86_64/x86_64/vm_machdep.c standard - -x86_64/isa/clock.c standard -x86_64/isa/intr_machdep.c standard -x86_64/isa/ithread.c standard +amd64/amd64/autoconf.c standard +amd64/amd64/busdma_machdep.c standard +amd64/amd64/critical.c standard +amd64/amd64/dump_machdep.c standard +amd64/amd64/elf_machdep.c standard +amd64/amd64/exception.s standard +amd64/amd64/identcpu.c standard +amd64/amd64/initcpu.c standard +amd64/amd64/legacy.c standard +amd64/amd64/locore.s standard no-obj +amd64/amd64/machdep.c standard +amd64/amd64/mem.c standard +amd64/amd64/nexus.c standard +amd64/amd64/pmap.c standard +amd64/amd64/sigtramp.s standard +amd64/amd64/support.s standard +amd64/amd64/swtch.s standard +amd64/amd64/sys_machdep.c standard +amd64/amd64/trap.c standard +amd64/amd64/tsc.c standard +amd64/amd64/vm_machdep.c standard +amd64/amd64/in_cksum.c optional inet + +amd64/isa/clock.c standard +amd64/isa/intr_machdep.c standard +amd64/isa/isa.c standard +amd64/isa/isa_dma.c standard +amd64/isa/ithread.c standard +amd64/isa/npx.c standard + +amd64/pci/pci_cfgreg.c optional pci +amd64/pci/pci_bus.c optional pci + + + +# This file tells config what files go into building a kernel, +# files marked standard are always included. +# +dev/fb/fb.c optional fb +dev/fb/fb.c optional vga +dev/fb/splash.c optional splash +dev/fb/vga.c optional vga + +dev/kbd/atkbd.c optional atkbd +dev/kbd/atkbdc.c optional atkbdc +dev/kbd/kbd.c optional atkbd +dev/kbd/kbd.c optional kbd +dev/kbd/kbd.c optional sc +dev/kbd/kbd.c optional ukbd +dev/kbd/kbd.c optional vt + +dev/syscons/schistory.c optional sc +dev/syscons/scmouse.c optional sc +dev/syscons/scterm.c optional sc +dev/syscons/scterm-dumb.c optional sc +dev/syscons/scterm-sc.c optional sc +dev/syscons/scvgarndr.c optional sc vga +dev/syscons/scvidctl.c optional sc +dev/syscons/scvtb.c optional sc +dev/syscons/syscons.c optional sc +dev/syscons/sysmouse.c optional sc +geom/geom_bsd.c standard +geom/geom_bsd_enc.c standard +geom/geom_mbr.c standard +geom/geom_mbr_enc.c standard + +#i386/isa/pmtimer.c optional pmtimer +# +isa/atkbd_isa.c optional atkbd +isa/atkbdc_isa.c optional atkbdc +isa/fd.c optional fdc +isa/ppc.c optional ppc +isa/psm.c optional psm +isa/syscons_isa.c optional sc +isa/vga_isa.c optional vga +pci/agp_intel.c optional agp +pci/agp_via.c optional agp +pci/agp_sis.c optional agp +pci/agp_ali.c optional agp +pci/agp_amd.c optional agp +pci/agp_i810.c optional agp diff --git a/sys/conf/ldscript.amd64 b/sys/conf/ldscript.amd64 index 181e36665f29..318e5e64ad0f 100644 --- a/sys/conf/ldscript.amd64 +++ b/sys/conf/ldscript.amd64 @@ -1,109 +1,146 @@ /* $FreeBSD$ */ -OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd", "elf32-i386-freebsd") -OUTPUT_ARCH(i386) +OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") +OUTPUT_ARCH(i386:x86-64) ENTRY(btext) -SEARCH_DIR(/usr/lib); +SEARCH_DIR("/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ . = kernbase + 0x00100000 + SIZEOF_HEADERS; - .interp : { *(.interp) } - .hash : { *(.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.text : - { *(.rel.text) *(.rel.gnu.linkonce.t*) } - .rela.text : - { *(.rela.text) *(.rela.gnu.linkonce.t*) } - .rel.data : - { *(.rel.data) *(.rel.gnu.linkonce.d*) } - .rela.data : - { *(.rela.data) *(.rela.gnu.linkonce.d*) } - .rel.rodata : - { *(.rel.rodata) *(.rel.gnu.linkonce.r*) } - .rela.rodata : - { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } - .rela.dtors : { *(.rela.dtors) } - .rel.init : { *(.rel.init) } - .rela.init : { *(.rela.init) } - .rel.fini : { *(.rel.fini) } - .rela.fini : { *(.rela.fini) } - .rel.bss : { *(.rel.bss) } - .rela.bss : { *(.rela.bss) } - .rel.plt : { *(.rel.plt) } - .rela.plt : { *(.rela.plt) } - .init : { *(.init) } =0x9090 - .plt : { *(.plt) } - .text : + .interp : { *(.interp) } + .hash : { *(.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .rel.init : { *(.rel.init) } + .rela.init : { *(.rela.init) } + .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) } + .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) } + .rel.fini : { *(.rel.fini) } + .rela.fini : { *(.rela.fini) } + .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) } + .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) } + .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) } + .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) } + .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) } + .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) } + .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) } + .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) } + .rel.ctors : { *(.rel.ctors) } + .rela.ctors : { *(.rela.ctors) } + .rel.dtors : { *(.rel.dtors) } + .rela.dtors : { *(.rela.dtors) } + .rel.got : { *(.rel.got) } + .rela.got : { *(.rela.got) } + .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) } + .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } + .rel.plt : { *(.rel.plt) } + .rela.plt : { *(.rela.plt) } + .init : { - *(.text) - *(.stub) + KEEP (*(.init)) + } =0x90909090 + .plt : { *(.plt) } + .text : + { + *(.text .stub .text.* .gnu.linkonce.t.*) /* .gnu.warning sections are handled specially by elf32.em. */ *(.gnu.warning) - *(.gnu.linkonce.t*) - } =0x9090 - _etext = .; + } =0x90909090 + .fini : + { + KEEP (*(.fini)) + } =0x90909090 + PROVIDE (__etext = .); + PROVIDE (_etext = .); PROVIDE (etext = .); - .fini : { *(.fini) } =0x9090 - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } - .rodata1 : { *(.rodata1) } + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } + .rodata1 : { *(.rodata1) } + .eh_frame_hdr : { *(.eh_frame_hdr) } /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ - . = ALIGN(0x1000) + (. & (0x1000 - 1)) ; - .data : + . = DATA_SEGMENT_ALIGN(0x100000, 0x1000); + /* Ensure the __preinit_array_start label is properly aligned. We + could instead move the label definition inside the section, but + the linker would then create the section even if it turns out to + be empty, which isn't pretty. */ + . = ALIGN(64 / 8); + PROVIDE (__preinit_array_start = .); + .preinit_array : { *(.preinit_array) } + PROVIDE (__preinit_array_end = .); + PROVIDE (__init_array_start = .); + .init_array : { *(.init_array) } + PROVIDE (__init_array_end = .); + PROVIDE (__fini_array_start = .); + .fini_array : { *(.fini_array) } + PROVIDE (__fini_array_end = .); + .data : { - *(.data) - *(.gnu.linkonce.d*) - CONSTRUCTORS + *(.data .data.* .gnu.linkonce.d.*) + SORT(CONSTRUCTORS) } - .data1 : { *(.data1) } - _start_ctors = .; - PROVIDE (start_ctors = .); - .ctors : + .data1 : { *(.data1) } + .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } + .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } + .eh_frame : { KEEP (*(.eh_frame)) } + .gcc_except_table : { *(.gcc_except_table) } + .dynamic : { *(.dynamic) } + .ctors : { - *(.ctors) + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + /* We don't want to include the .ctor section from + from the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) } - _stop_ctors = .; - PROVIDE (stop_ctors = .); - .dtors : + .dtors : { - *(.dtors) + KEEP (*crtbegin.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) } - .got : { *(.got.plt) *(.got) } - .dynamic : { *(.dynamic) } - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so - we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } - _edata = .; + .jcr : { KEEP (*(.jcr)) } + .got : { *(.got.plt) *(.got) } + _edata = .; PROVIDE (edata = .); __bss_start = .; - .sbss : { *(.sbss) *(.scommon) } - .bss : + .bss : { *(.dynbss) - *(.bss) + *(.bss .bss.* .gnu.linkonce.b.*) *(COMMON) + /* Align here to ensure that the .bss section occupies space up to + _end. Align after .bss to ensure correct alignment even if the + .bss section disappears because there are no input sections. */ + . = ALIGN(64 / 8); } - . = ALIGN(32 / 8); - _end = . ; + . = ALIGN(64 / 8); + _end = .; PROVIDE (end = .); + . = DATA_SEGMENT_END (.); /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } + .comment 0 : { *(.comment) } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ @@ -117,7 +154,7 @@ SECTIONS .debug_aranges 0 : { *(.debug_aranges) } .debug_pubnames 0 : { *(.debug_pubnames) } /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } + .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } .debug_abbrev 0 : { *(.debug_abbrev) } .debug_line 0 : { *(.debug_line) } .debug_frame 0 : { *(.debug_frame) } @@ -129,5 +166,4 @@ SECTIONS .debug_funcnames 0 : { *(.debug_funcnames) } .debug_typenames 0 : { *(.debug_typenames) } .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ } diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64 index 7db7d8f3acfc..ad735889b65a 100644 --- a/sys/conf/options.amd64 +++ b/sys/conf/options.amd64 @@ -32,6 +32,7 @@ SC_PIXEL_MODE opt_syscons.h SC_RENDER_DEBUG opt_syscons.h SC_TWOBUTTON_MOUSE opt_syscons.h SC_NO_SUSPEND_VTYSWITCH opt_syscons.h +DEV_SPLASH opt_splash.h VGA_ALT_SEQACCESS opt_vga.h VGA_DEBUG opt_vga.h @@ -40,9 +41,6 @@ VGA_NO_MODE_CHANGE opt_vga.h VGA_SLOW_IOACCESS opt_vga.h VGA_WIDTH90 opt_vga.h -VESA -VESA_DEBUG opt_vesa.h - ATKBD_DFLT_KEYMAP opt_atkbd.h KBD_DISABLE_KEYMAP_LOAD opt_kbd.h @@ -55,3 +53,9 @@ KBDIO_DEBUG opt_kbd.h # ------------------------------- # EOF # ------------------------------- +HAMMER opt_cpu.h +PPC_PROBE_CHIPSET opt_ppc.h +PPC_DEBUG opt_ppc.h +PSM_HOOKRESUME opt_psm.h +PSM_RESETAFTERSUSPEND opt_psm.h +PSM_DEBUG opt_psm.h |