Porting FreeBSD to Loongson 3A (RS780e)
Paul Ambrose
ambrosehua at gmail.com
Wed Jul 11 02:46:24 UTC 2012
I received my Loongson 3A
box(http://www.lemote.com/products/computer/fulong/348.html) 9 days
ago. It has Loongson 3A processor, 4 cores at 900Mhz( 64KB L1D + 64KB
L1I per-core and 4MB L2 cache shared) , MIPS64r2 with GS64 SIMD
extension and pre-installed with a RHEL6-derived distribution. The
hardware configuration is here:
CPU: 4 GS64 cores, 900Mhz, mips64r2-compatible;
MEM: 2x 2GB DDR3 800Mhz;
chipset: AMD RS780e + SB710;
Hardrive:320GB sata2 x1 ( 2 SATA SLOT);
Etherent: relteak 8168;
Display: built-in Radeaon 3200 with 128MB mem supporting DVI + VGA;
Bios: PMON
I did some test and some research, it seems stable, so I want to port
FreeBSD to this box.
Now I have a few question.
No.1: Does freebsd mips toolchain support mips64r2 with little-endian?
the source code indicate that there is only one mips64
little-endian board, MALTA64, other mips64 board are big-endian,
Loongson 3A only support little-endian and 64bit-address.
No.2: I cross-build malta64 on my x86-box, I have no idea whether
malta64 use ldscript.mips or ldscript.mips.mips64, and where is the
kernel image loaded?
[ambrosehua at lateaxfreebsd MALTA64] readelf -h kernel
ELF Header:
Magic: 7f 45 4c 46 02 01 01 09 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - FreeBSD
ABI Version: 0
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x80001160
Start of program headers: 64 (bytes into file)
Start of section headers: 5103792 (bytes into file)
Flags: 0x60000001, noreorder, mips64
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 5
Size of section headers: 64 (bytes)
Number of section headers: 27
Section header string table index: 24
and Where does this 0x80001160 come from? If this 0x80001160 is from
KERNLOADADDR(0X80001000)+SIZEOF_HEADERS, where is SIZEOF_HEADERS?
More information about the freebsd-mips
mailing list