diff options
Diffstat (limited to 'sys/boot/powerpc/uboot')
| -rw-r--r-- | sys/boot/powerpc/uboot/Makefile | 37 | ||||
| -rw-r--r-- | sys/boot/powerpc/uboot/conf.c | 112 | ||||
| -rw-r--r-- | sys/boot/powerpc/uboot/ldscript.powerpc | 138 | ||||
| -rw-r--r-- | sys/boot/powerpc/uboot/start.S | 94 | ||||
| -rw-r--r-- | sys/boot/powerpc/uboot/version | 11 |
5 files changed, 0 insertions, 392 deletions
diff --git a/sys/boot/powerpc/uboot/Makefile b/sys/boot/powerpc/uboot/Makefile deleted file mode 100644 index d543aceeee4c..000000000000 --- a/sys/boot/powerpc/uboot/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# $FreeBSD$ - -LOADER_UFS_SUPPORT?= yes -LOADER_CD9660_SUPPORT?= no -LOADER_EXT2FS_SUPPORT?= no -LOADER_NET_SUPPORT?= yes -LOADER_NFS_SUPPORT?= yes -LOADER_TFTP_SUPPORT?= no -LOADER_GZIP_SUPPORT?= no -LOADER_BZIP2_SUPPORT?= no - -.include <bsd.init.mk> - -PROG= ubldr -NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} -INSTALLFLAGS= -b -MAN= - -# Architecture-specific loader code -SRCS= start.S conf.c vers.c -SRCS+= ucmpdi2.c - -# Always add MI sources -HELP_FILES= # Disable -.include "${BOOTSRC}/loader.mk" -.PATH: ${SYSDIR}/libkern - -CFLAGS+= -ffreestanding - -LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc - -.include "${BOOTSRC}/uboot.mk" - -DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} - -.include <bsd.prog.mk> diff --git a/sys/boot/powerpc/uboot/conf.c b/sys/boot/powerpc/uboot/conf.c deleted file mode 100644 index 561238d1ccf7..000000000000 --- a/sys/boot/powerpc/uboot/conf.c +++ /dev/null @@ -1,112 +0,0 @@ -/*- - * Copyright (c) 1999 Michael Smith <msmith@freebsd.org> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - -#include <stand.h> -#include "bootstrap.h" -#include "libuboot.h" - -#if defined(LOADER_NET_SUPPORT) -#include "dev_net.h" -#endif - -/* Make sure we have an explicit reference to exit so libsa's panic pulls in the MD exit */ -void (*exitfn)(int) = exit; - -/* - * We could use linker sets for some or all of these, but - * then we would have to control what ended up linked into - * the bootstrap. So it's easier to conditionalise things - * here. - * - * XXX rename these arrays to be consistent and less namespace-hostile - */ - -/* Exported for libstand */ -struct devsw *devsw[] = { -#if defined(LOADER_DISK_SUPPORT) || defined(LOADER_CD9660_SUPPORT) - &uboot_storage, -#endif -#if defined(LOADER_NET_SUPPORT) - &netdev, -#endif - NULL -}; - -struct fs_ops *file_system[] = { -#if defined(LOADER_UFS_SUPPORT) - &ufs_fsops, -#endif -#if defined(LOADER_CD9660_SUPPORT) - &cd9660_fsops, -#endif -#if defined(LOADER_EXT2FS_SUPPORT) - &ext2fs_fsops, -#endif -#if defined(LOADER_NFS_SUPPORT) - &nfs_fsops, -#endif -#if defined(LOADER_TFTP_SUPPORT) - &tftp_fsops, -#endif -#if defined(LOADER_GZIP_SUPPORT) - &gzipfs_fsops, -#endif -#if defined(LOADER_BZIP2_SUPPORT) - &bzipfs_fsops, -#endif - NULL -}; - -struct netif_driver *netif_drivers[] = { -#if defined(LOADER_NET_SUPPORT) - &uboot_net, -#endif - NULL, -}; - -/* Exported for PowerPC only */ -/* - * Sort formats so that those that can detect based on arguments - * rather than reading the file go first. - */ - -struct file_format *file_formats[] = { - &uboot_elf, - NULL -}; - -/* - * Consoles - */ -extern struct console uboot_console; - -struct console *consoles[] = { - &uboot_console, - NULL -}; diff --git a/sys/boot/powerpc/uboot/ldscript.powerpc b/sys/boot/powerpc/uboot/ldscript.powerpc deleted file mode 100644 index 923838365793..000000000000 --- a/sys/boot/powerpc/uboot/ldscript.powerpc +++ /dev/null @@ -1,138 +0,0 @@ -/* $FreeBSD$ */ - -OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", - "elf32-powerpc-freebsd") -OUTPUT_ARCH(powerpc:common) -ENTRY(_start) -SEARCH_DIR(/usr/lib); -PROVIDE (__stack = 0); -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - . = 0x00010000 + 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) } - .rela.text : - { *(.rela.text) *(.rela.gnu.linkonce.t*) } - .rela.data : - { *(.rela.data) *(.rela.gnu.linkonce.d*) } - .rela.rodata : - { *(.rela.rodata) *(.rela.gnu.linkonce.r*) } - .rela.got : { *(.rela.got) } - .rela.got1 : { *(.rela.got1) } - .rela.got2 : { *(.rela.got2) } - .rela.ctors : { *(.rela.ctors) } - .rela.dtors : { *(.rela.dtors) } - .rela.init : { *(.rela.init) } - .rela.fini : { *(.rela.fini) } - .rela.bss : { *(.rela.bss) } - .rela.plt : { *(.rela.plt) } - .rela.sdata : { *(.rela.sdata) } - .rela.sbss : { *(.rela.sbss) } - .rela.sdata2 : { *(.rela.sdata2) } - .rela.sbss2 : { *(.rela.sbss2) } - .text : - { - *(.text) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - *(.gnu.linkonce.t*) - } =0 - _etext = .; - PROVIDE (etext = .); - .init : { *(.init) } =0 - .fini : { *(.fini) } =0 - .rodata : { *(.rodata) *(.gnu.linkonce.r*) } - .rodata1 : { *(.rodata1) } - .sdata2 : { *(.sdata2) } - .sbss2 : { *(.sbss2) } - /* Adjust the address for the data segment to the next page up. */ - . = ((. + 0x1000) & ~(0x1000 - 1)); - .data : - { - *(.data) - *(.gnu.linkonce.d*) - CONSTRUCTORS - } - .data1 : { *(.data1) } - .got1 : { *(.got1) } - .dynamic : { *(.dynamic) } - /* Put .ctors and .dtors next to the .got2 section, so that the pointers - get relocated with -mrelocatable. Also put in the .fixup pointers. - The current compiler no longer needs this, but keep it around for 2.7.2 */ - PROVIDE (_GOT2_START_ = .); - .got2 : { *(.got2) } - PROVIDE (__CTOR_LIST__ = .); - .ctors : { *(.ctors) } - PROVIDE (__CTOR_END__ = .); - PROVIDE (__DTOR_LIST__ = .); - .dtors : { *(.dtors) } - PROVIDE (__DTOR_END__ = .); - PROVIDE (_FIXUP_START_ = .); - .fixup : { *(.fixup) } - PROVIDE (_FIXUP_END_ = .); - PROVIDE (_GOT2_END_ = .); - PROVIDE (_GOT_START_ = .); - .got : { *(.got) } - .got.plt : { *(.got.plt) } - PROVIDE (_GOT_END_ = .); - /* 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 = .; - PROVIDE (edata = .); - .sbss : - { - PROVIDE (__sbss_start = .); - *(.sbss) - *(.scommon) - *(.dynsbss) - PROVIDE (__sbss_end = .); - } - .plt : { *(.plt) } - .bss : - { - PROVIDE (__bss_start = .); - *(.dynbss) - *(.bss) - *(COMMON) - } - _end = . ; - PROVIDE (end = .); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - /* These must appear regardless of . */ -} - diff --git a/sys/boot/powerpc/uboot/start.S b/sys/boot/powerpc/uboot/start.S deleted file mode 100644 index 3e80576907a4..000000000000 --- a/sys/boot/powerpc/uboot/start.S +++ /dev/null @@ -1,94 +0,0 @@ -/*- - * Copyright (c) 2007 Semihalf, Rafal Jaworowski <raj@semihalf.com> - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#include <machine/asm.h> - -/* - * Entry point to the loader that U-Boot passes control to. - */ - .text - .globl _start -_start: - /* Hint where to look for the API signature */ - lis %r11, uboot_address@ha - addi %r11, %r11, uboot_address@l - stw %r1, 0(%r11) - /* Save U-Boot's r14 */ - lis %r11, saved_regs@ha - addi %r11, %r11, saved_regs@l - stw %r14, 0(%r11) - /* Disable interrupts */ - mfmsr %r11 - andi. %r11, %r11, ~0x8000@l - mtmsr %r11 - b main - -/* - * syscall() - */ -ENTRY(syscall) - stwu %r1, -16(%r1) - mflr %r0 - stw %r14, 8(%r1) - stw %r0, 20(%r1) - /* Restore U-Boot's r14 */ - lis %r11, saved_regs@ha - addi %r11, %r11, saved_regs@l - lwz %r14, 0(%r11) - /* Enable interrupts */ - mfmsr %r11 - ori %r11, %r11, 0x8000@l - mtmsr %r11 - /* Call into U-Boot */ - lis %r11, syscall_ptr@ha - addi %r11, %r11, syscall_ptr@l - lwz %r11, 0(%r11) - mtctr %r11 - bctrl - /* Disable interrupts */ - mfmsr %r11 - andi. %r11, %r11, ~0x8000@l - mtmsr %r11 - /* Epilogue */ - lwz %r11, 0(%r1) - lwz %r0, 4(%r11) - mtlr %r0 - lwz %r14, 8(%r1) - mr %r1, %r11 - blr - -/* - * Data section - */ - .data -GLOBAL(syscall_ptr) - .long 0 -GLOBAL(saved_regs) - .long 0 /* R14 */ -GLOBAL(uboot_address) - .long 0 diff --git a/sys/boot/powerpc/uboot/version b/sys/boot/powerpc/uboot/version deleted file mode 100644 index 21556cff70e0..000000000000 --- a/sys/boot/powerpc/uboot/version +++ /dev/null @@ -1,11 +0,0 @@ -$FreeBSD$ - -NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this -file is important. Make sure the current version number is on line 6. - -1.1: Flattened Device Tree blob support. -1.0: Added storage support. -0.6: Integrated with the new U-Boot API -0.5: Full network functionality. -0.2: Initial U-Boot/PowerPC version derived from the existing - OpenFirmware-based. |
