Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jul 2012 10:46:22 +0800
From:      Paul Ambrose <ambrosehua@gmail.com>
To:        freebsd-mips@FreeBSD.org
Subject:   Porting FreeBSD to Loongson 3A (RS780e)
Message-ID:  <CAMwoQQ7NcM0S7LmHgOH2hhL9xPu-fTsZZxCRvJ9LLHZD-AjFhw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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=A3=A9 , 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=A3=BA AMD RS780e + SB710=A3=BB
Hardrive=A3=BA320GB sata2 x1 =A3=A8 2 SATA SLOT=A3=A9=A3=BB
Etherent=A3=BA relteak 8168=A3=BB
Display=A3=BA built-in Radeaon 3200 with 128MB mem supporting DVI + VGA=A3=
=BB
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@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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMwoQQ7NcM0S7LmHgOH2hhL9xPu-fTsZZxCRvJ9LLHZD-AjFhw>