summaryrefslogtreecommitdiffstats
path: root/sys/conf
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2013-05-21 03:05:49 +0000
committermarcel <marcel@FreeBSD.org>2013-05-21 03:05:49 +0000
commit65b2bbd1ff199671c94b2cda153da397c3ccf21b (patch)
tree0d3cc07ded5112e72a074450de122954cf708679 /sys/conf
parent1d4da2d9049dfe73f6d7dbb505b2eb67b74bb01a (diff)
downloadFreeBSD-src-65b2bbd1ff199671c94b2cda153da397c3ccf21b.zip
FreeBSD-src-65b2bbd1ff199671c94b2cda153da397c3ccf21b.tar.gz
Add basic support for FDT to i386 & amd64. This change includes:
1. Common headers for fdt.h and ofw_machdep.h under x86/include with indirections under i386/include and amd64/include. 2. New modinfo for loader provided FDT blob. 3. Common x86_init_fdt() called from hammer_time() on amd64 and init386() on i386. 4. Split-off FDT specific low-level console functions from FDT bus methods for the uart(4) driver. The low-level console logic has been moved to uart_cpu_fdt.c and is used for arm, mips & powerpc only. The FDT bus methods are shared across all architectures. 5. Add dev/fdt/fdt_x86.c to hold the fdt_fixup_table[] and the fdt_pic_table[] arrays. Both are empty right now. FDT addresses are I/O ports on x86. Since the core FDT code does not handle different address spaces, adding support for both I/O ports and memory addresses requires some thought and discussion. It may be better to use a compile-time option that controls this. Obtained from: Juniper Networks, Inc.
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/Makefile.amd642
-rw-r--r--sys/conf/Makefile.i3862
-rw-r--r--sys/conf/files1
-rw-r--r--sys/conf/files.amd642
-rw-r--r--sys/conf/files.arm3
-rw-r--r--sys/conf/files.i3862
-rw-r--r--sys/conf/files.mips2
-rw-r--r--sys/conf/files.powerpc2
8 files changed, 13 insertions, 3 deletions
diff --git a/sys/conf/Makefile.amd64 b/sys/conf/Makefile.amd64
index 0dce5ef..716c742 100644
--- a/sys/conf/Makefile.amd64
+++ b/sys/conf/Makefile.amd64
@@ -31,6 +31,8 @@ S= ../../..
.endif
.include "$S/conf/kern.pre.mk"
+INCLUDES+= -I$S/contrib/libfdt
+
.if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED)
CFLAGS+= -fno-omit-frame-pointer
.endif
diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386
index 538ccbc..4651e8d 100644
--- a/sys/conf/Makefile.i386
+++ b/sys/conf/Makefile.i386
@@ -30,6 +30,8 @@ S= ../../..
.endif
.include "$S/conf/kern.pre.mk"
+INCLUDES+= -I$S/contrib/libfdt
+
MACHINE=i386
MKMODULESENV+= MACHINE=${MACHINE}
diff --git a/sys/conf/files b/sys/conf/files
index 2208937..7e52504 100644
--- a/sys/conf/files
+++ b/sys/conf/files
@@ -2903,6 +2903,7 @@ libkern/inet_pton.c standard
libkern/jenkins_hash.c standard
libkern/mcount.c optional profiling-routine
libkern/memcchr.c standard
+libkern/memchr.c optional fdt
libkern/memcmp.c standard
libkern/qsort.c standard
libkern/qsort_r.c standard
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index fc5a04f..cdb43df 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -189,6 +189,7 @@ dev/fdc/fdc.c optional fdc
dev/fdc/fdc_acpi.c optional fdc
dev/fdc/fdc_isa.c optional fdc isa
dev/fdc/fdc_pccard.c optional fdc pccard
+dev/fdt/fdt_x86.c optional fdt
dev/hpt27xx/os_bsd.c optional hpt27xx
dev/hpt27xx/osm_bsd.c optional hpt27xx
dev/hpt27xx/hpt27xx_config.c optional hpt27xx
@@ -501,6 +502,7 @@ x86/pci/pci_bus.c optional pci
x86/pci/qpi.c optional pci
x86/x86/busdma_machdep.c standard
x86/x86/dump_machdep.c standard
+x86/x86/fdt_machdep.c optional fdt
x86/x86/intr_machdep.c standard
x86/x86/io_apic.c standard
x86/x86/legacy.c standard
diff --git a/sys/conf/files.arm b/sys/conf/files.arm
index f9e0be8..ade34e6 100644
--- a/sys/conf/files.arm
+++ b/sys/conf/files.arm
@@ -66,6 +66,8 @@ dev/kbd/kbd.c optional sc
dev/syscons/scgfbrndr.c optional sc
dev/syscons/scterm-teken.c optional sc
dev/syscons/scvtb.c optional sc
+dev/uart/uart_cpu_fdt.c optional uart fdt
+
font.h optional sc \
compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \
no-obj no-implicit-rule before-depend \
@@ -87,7 +89,6 @@ libkern/ffsl.c standard
libkern/fls.c standard
libkern/flsl.c standard
libkern/lshrdi3.c standard
-libkern/memchr.c optional fdt
libkern/moddi3.c standard
libkern/qdivrem.c standard
libkern/ucmpdi2.c standard
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 79a91cd..218472b 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -176,6 +176,7 @@ dev/fdc/fdc.c optional fdc
dev/fdc/fdc_acpi.c optional fdc
dev/fdc/fdc_isa.c optional fdc isa
dev/fdc/fdc_pccard.c optional fdc pccard
+dev/fdt/fdt_x86.c optional fdt
dev/fe/if_fe_isa.c optional fe isa
dev/glxiic/glxiic.c optional glxiic
dev/glxsb/glxsb.c optional glxsb
@@ -545,6 +546,7 @@ x86/pci/pci_bus.c optional pci
x86/pci/qpi.c optional pci
x86/x86/busdma_machdep.c standard
x86/x86/dump_machdep.c standard
+x86/x86/fdt_machdep.c optional fdt
x86/x86/intr_machdep.c standard
x86/x86/io_apic.c optional apic
x86/x86/legacy.c optional native
diff --git a/sys/conf/files.mips b/sys/conf/files.mips
index 2dfc5dd..7308143 100644
--- a/sys/conf/files.mips
+++ b/sys/conf/files.mips
@@ -53,7 +53,6 @@ kern/subr_dummy_vdso_tc.c standard
libkern/ffsl.c standard
libkern/fls.c standard
libkern/flsl.c standard
-libkern/memchr.c optional fdt
libkern/memmove.c standard
libkern/ucmpdi2.c optional mips | mipsel
@@ -72,6 +71,7 @@ mips/mips/sc_machdep.c optional sc
# FDT support
dev/fdt/fdt_mips.c optional fdt
+dev/uart/uart_cpu_fdt.c optional uart fdt
# crypto support -- use generic
crypto/blowfish/bf_enc.c optional crypto | ipsec
diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc
index 6ab02a8..96331f7 100644
--- a/sys/conf/files.powerpc
+++ b/sys/conf/files.powerpc
@@ -61,6 +61,7 @@ dev/syscons/scterm-teken.c optional sc
dev/syscons/scvtb.c optional sc
dev/tsec/if_tsec.c optional tsec
dev/tsec/if_tsec_fdt.c optional tsec fdt
+dev/uart/uart_cpu_fdt.c optional uart fdt
dev/uart/uart_cpu_powerpc.c optional uart aim
dev/usb/controller/ehci_fsl.c optional ehci mpc85xx
kern/kern_clocksource.c standard
@@ -76,7 +77,6 @@ libkern/ffsl.c standard
libkern/fls.c standard
libkern/flsl.c standard
libkern/lshrdi3.c optional powerpc
-libkern/memchr.c optional fdt
libkern/memmove.c standard
libkern/memset.c standard
libkern/moddi3.c optional powerpc
OpenPOWER on IntegriCloud