Rename Fuloong into Fuloong 2F. Add new ID for Fuloong2E.
* grub-core/Makefile.core.def (fwstart_fuloong): Rename fwstart_fuloong into fwstart_fuloong2f. Use boot/mips/loongson/fuloong2f.S. * grub-core/boot/mips/loongson/fuloong.S: Rename to ... * grub-core/boot/mips/loongson/fuloong2f.S: ... this. (FULOONG): Rename to ... (FULOONG2F): ... this. All users updated. * grub-core/boot/mips/startup_raw.S (machtype_fuloong_str): Rename to (machtype_fuloong2f_str): ... this. (machtype_fuloong2e_str): New string. Check for machtype_fuloong2e_str. * grub-core/loader/mips/linux.c (loongson_machtypes) [GRUB_MACHINE_MIPS_LOONGSON]: Add GRUB_ARCH_MACHINE_FULOONG2E. * grub-core/term/serial.c (loongson_defserial) [GRUB_MACHINE_MIPS_LOONGSON]: New array. (grub_serial_register) [GRUB_MACHINE_MIPS_LOONGSON]: Use loongson_defserial. * include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_FULOONG): Rename to ... (GRUB_ARCH_MACHINE_FULOONG2F): ... this. (GRUB_ARCH_MACHINE_FULOONG2E): New const. * util/grub-mkimage.c (image_target_desc): Rename IMAGE_FULOONG_FLASH to IMAGE_FULOONG2F_FLASH. All users updated. (image_targets): Rename images. * util/grub-mkstandalone.in: Accept fuloong2f and fuloong2e.
This commit is contained in:
parent
b526cbb6fa
commit
14a2562cf7
13 changed files with 82 additions and 39 deletions
29
ChangeLog
29
ChangeLog
|
@ -1,3 +1,32 @@
|
|||
2011-08-19 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Rename Fuloong into Fuloong 2F. Add new ID for Fuloong2E.
|
||||
|
||||
* grub-core/Makefile.core.def (fwstart_fuloong): Rename fwstart_fuloong
|
||||
into fwstart_fuloong2f. Use boot/mips/loongson/fuloong2f.S.
|
||||
* grub-core/boot/mips/loongson/fuloong.S: Rename to ...
|
||||
* grub-core/boot/mips/loongson/fuloong2f.S: ... this.
|
||||
(FULOONG): Rename to ...
|
||||
(FULOONG2F): ... this. All users updated.
|
||||
* grub-core/boot/mips/startup_raw.S (machtype_fuloong_str): Rename to
|
||||
(machtype_fuloong2f_str): ... this.
|
||||
(machtype_fuloong2e_str): New string.
|
||||
Check for machtype_fuloong2e_str.
|
||||
* grub-core/loader/mips/linux.c (loongson_machtypes)
|
||||
[GRUB_MACHINE_MIPS_LOONGSON]: Add GRUB_ARCH_MACHINE_FULOONG2E.
|
||||
* grub-core/term/serial.c (loongson_defserial)
|
||||
[GRUB_MACHINE_MIPS_LOONGSON]: New array.
|
||||
(grub_serial_register) [GRUB_MACHINE_MIPS_LOONGSON]: Use
|
||||
loongson_defserial.
|
||||
* include/grub/mips/loongson/kernel.h (GRUB_ARCH_MACHINE_FULOONG):
|
||||
Rename to ...
|
||||
(GRUB_ARCH_MACHINE_FULOONG2F): ... this.
|
||||
(GRUB_ARCH_MACHINE_FULOONG2E): New const.
|
||||
* util/grub-mkimage.c (image_target_desc): Rename IMAGE_FULOONG_FLASH
|
||||
to IMAGE_FULOONG2F_FLASH. All users updated.
|
||||
(image_targets): Rename images.
|
||||
* util/grub-mkstandalone.in: Accept fuloong2f and fuloong2e.
|
||||
|
||||
2011-08-19 Szymon Janc <szymon@janc.net.pl>
|
||||
|
||||
Make enable of disk cache statistics code configurable.
|
||||
|
|
|
@ -363,8 +363,8 @@ image = {
|
|||
};
|
||||
|
||||
image = {
|
||||
name = fwstart_fuloong;
|
||||
mips_loongson = boot/mips/loongson/fuloong.S;
|
||||
name = fwstart_fuloong2f;
|
||||
mips_loongson = boot/mips/loongson/fuloong2f.S;
|
||||
objcopyflags = '-O binary';
|
||||
ldflags = '-static-libgcc -lgcc -Wl,-N,-S,-Ttext,0xbfc00000,-Bstatic';
|
||||
enable = mips_loongson;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#define FULOONG 1
|
||||
#define FULOONG2F 1
|
||||
#include "fwstart.S"
|
|
@ -26,7 +26,7 @@
|
|||
#include <grub/cs5536.h>
|
||||
#include <grub/smbus.h>
|
||||
|
||||
#ifdef FULOONG
|
||||
#ifdef FULOONG2F
|
||||
#define GRUB_MACHINE_SERIAL_PORT GRUB_MACHINE_SERIAL_PORT2
|
||||
#define GRUB_MACHINE_SERIAL_DIVISOR_115200 GRUB_MACHINE_SERIAL_PORT2_DIVISOR_115200
|
||||
#else
|
||||
|
@ -43,10 +43,10 @@
|
|||
start:
|
||||
_start:
|
||||
__start:
|
||||
/* Put serial init as soon as possible. But on Fuloong serial is past
|
||||
Geode, so on Fuloong we need Geode first.
|
||||
/* Put serial init as soon as possible. But on Fuloong2f serial is past
|
||||
Geode, so on Fuloong2f we need Geode first.
|
||||
*/
|
||||
#ifndef FULOONG
|
||||
#ifndef FULOONG2F
|
||||
bal serial_hw_init
|
||||
nop
|
||||
#endif
|
||||
|
@ -72,7 +72,7 @@ retry_cs5536:
|
|||
bnel $t2, $t3, 1b
|
||||
sll $t4, $t4, 1
|
||||
|
||||
#ifndef FULOONG
|
||||
#ifndef FULOONG2F
|
||||
bal message
|
||||
addiu $a0, $a0, %lo(cs5536_found)
|
||||
bal printhex
|
||||
|
@ -95,7 +95,7 @@ retry_cs5536:
|
|||
bal gpio_init
|
||||
nop
|
||||
|
||||
#ifdef FULOONG
|
||||
#ifdef FULOONG2F
|
||||
bal serial_hw_init
|
||||
nop
|
||||
#endif
|
||||
|
@ -130,7 +130,7 @@ retry_cs5536:
|
|||
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL3) ($t0)
|
||||
sb $t1, %lo(GRUB_MACHINE_PCI_IO_BASE + GRUB_CS5536_LBAR_SMBUS + GRUB_CS5536_SMB_REG_CTRL2) ($t0)
|
||||
|
||||
/* Yeeloong and Fuloong have only one memory slot. */
|
||||
/* Yeeloong and Fuloong2f have only one memory slot. */
|
||||
/* Output first byte on serial for debugging. */
|
||||
ori $a1, $zero, GRUB_SMB_RAM_START_ADDR
|
||||
bal read_spd
|
||||
|
@ -252,7 +252,7 @@ gpio_init:
|
|||
/* In: none. Out: none. Clobbered: $t0, $t1, $t2, $a0, $a1, $a2. */
|
||||
serial_hw_init:
|
||||
move $t2, $ra
|
||||
#ifdef FULOONG
|
||||
#ifdef FULOONG2F
|
||||
lui $a0, %hi(GRUB_CS5536_MSR_DIVIL_LEG_IO)
|
||||
addiu $a0, $a0, %lo(GRUB_CS5536_MSR_DIVIL_LEG_IO)
|
||||
lui $a1, %hi (GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3 \
|
||||
|
@ -471,7 +471,7 @@ regdump:
|
|||
.quad 0x0100020200010101 /* 4 */
|
||||
.quad 0x0a04030603050203 /* 6 */
|
||||
.quad 0x0f0e040000010a0b /* 7 */
|
||||
#ifdef FULOONG
|
||||
#ifdef FULOONG2F
|
||||
.quad 0x0000000100000001 /* 8 */
|
||||
#else
|
||||
.quad 0x0000010200000102 /* 8 */
|
||||
|
@ -482,7 +482,7 @@ regdump:
|
|||
.quad 0x002a3c0615000000 /* c */
|
||||
.quad 0x002a002a002a002a /* d */
|
||||
.quad 0x002a002a002a002a /* e */
|
||||
#ifdef FULOONG
|
||||
#ifdef FULOONG2F
|
||||
.quad 0x00b40020005b0004 /* f */
|
||||
#else
|
||||
.quad 0x00b40020006d0004 /* f */
|
||||
|
@ -503,7 +503,7 @@ regdump:
|
|||
|
||||
/* Dump of GPIO connections. FIXME: Remove useless and macroify. */
|
||||
gpio_dump:
|
||||
#ifdef FULOONG
|
||||
#ifdef FULOONG2F
|
||||
.long 0xffff0000, 0x2eefd110, 0xffff0000, 0xffff0000
|
||||
.long 0x2eefd110, 0xffff0000, 0x1000efff, 0xefff1000
|
||||
.long 0x3df3c20c, 0xffff0000, 0xffff0000, 0xffff0000
|
||||
|
@ -740,8 +740,8 @@ continue:
|
|||
lui $t0, %hi(cached_continue - 0x20000000)
|
||||
addiu $t0, $t0, %lo(cached_continue - 0x20000000)
|
||||
jr $t0
|
||||
#ifdef FULOONG
|
||||
addiu $a2, $zero, -(1 + GRUB_ARCH_MACHINE_FULOONG)
|
||||
#ifdef FULOONG2F
|
||||
addiu $a2, $zero, -(1 + GRUB_ARCH_MACHINE_FULOONG2F)
|
||||
#else
|
||||
addiu $a2, $zero, -(1 + GRUB_ARCH_MACHINE_YEELOONG)
|
||||
#endif
|
||||
|
|
|
@ -109,7 +109,7 @@ argcont:
|
|||
DO_PARSE (memsizestr, $s4)
|
||||
DO_PARSE (highmemsizestr, $s5)
|
||||
DO_CHECKT1 (pmon_yeeloong_verstr, GRUB_ARCH_MACHINE_YEELOONG)
|
||||
DO_CHECKT1 (pmon_fuloong_verstr, GRUB_ARCH_MACHINE_FULOONG)
|
||||
DO_CHECKT1 (pmon_fuloong2f_verstr, GRUB_ARCH_MACHINE_FULOONG2F)
|
||||
2:
|
||||
b argcont
|
||||
addiu $t0, $t0, 4
|
||||
|
@ -155,11 +155,12 @@ memsizestr: .asciiz "memsize="
|
|||
highmemsizestr: .asciiz "highmemsize="
|
||||
machtype_yeeloong_str1: .asciiz "machtype=8.9"
|
||||
machtype_yeeloong_str2: .asciiz "machtype=lemote-yeeloong-"
|
||||
machtype_fuloong_str: .asciiz "machtype=lemote-fuloong-"
|
||||
machtype_fuloong2f_str: .asciiz "machtype=lemote-fuloong-2f"
|
||||
machtype_fuloong2e_str: .asciiz "machtype=lemote-fuloong-2e"
|
||||
pmon_yeeloong_str: .asciiz "PMON_VER=LM8"
|
||||
pmon_fuloong_str: .asciiz "PMON_VER=LM6"
|
||||
pmon_fuloong2f_str: .asciiz "PMON_VER=LM6"
|
||||
pmon_yeeloong_verstr: .asciiz "Version=LM8"
|
||||
pmon_fuloong_verstr: .asciiz "Version=LM6"
|
||||
pmon_fuloong2f_verstr: .asciiz "Version=LM6"
|
||||
.p2align 2
|
||||
|
||||
argdone:
|
||||
|
@ -173,8 +174,9 @@ argdone:
|
|||
DO_CHECKA1 (machtype_yeeloong_str1, GRUB_ARCH_MACHINE_YEELOONG)
|
||||
DO_CHECKA1 (machtype_yeeloong_str2, GRUB_ARCH_MACHINE_YEELOONG)
|
||||
DO_CHECKA1 (pmon_yeeloong_str, GRUB_ARCH_MACHINE_YEELOONG)
|
||||
DO_CHECKA1 (machtype_fuloong_str, GRUB_ARCH_MACHINE_FULOONG)
|
||||
DO_CHECKA1 (pmon_fuloong_str, GRUB_ARCH_MACHINE_FULOONG)
|
||||
DO_CHECKA1 (machtype_fuloong2f_str, GRUB_ARCH_MACHINE_FULOONG2F)
|
||||
DO_CHECKA1 (machtype_fuloong2e_str, GRUB_ARCH_MACHINE_FULOONG2E)
|
||||
DO_CHECKA1 (pmon_fuloong2f_str, GRUB_ARCH_MACHINE_FULOONG2F)
|
||||
addiu $a0, $a0, -1
|
||||
b argdone
|
||||
addiu $a1, $a1, 4
|
||||
|
|
|
@ -281,7 +281,7 @@ grub_cs5536_init_geode (grub_pci_device_t dev)
|
|||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE0
|
||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1);
|
||||
break;
|
||||
case GRUB_ARCH_MACHINE_FULOONG:
|
||||
case GRUB_ARCH_MACHINE_FULOONG2F:
|
||||
grub_cs5536_write_msr (dev, GRUB_CS5536_MSR_DIVIL_LEG_IO,
|
||||
GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3
|
||||
| GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1
|
||||
|
|
|
@ -213,7 +213,9 @@ grub_halt (void)
|
|||
{
|
||||
switch (grub_arch_machine)
|
||||
{
|
||||
case GRUB_ARCH_MACHINE_FULOONG:
|
||||
case GRUB_ARCH_MACHINE_FULOONG2E:
|
||||
break;
|
||||
case GRUB_ARCH_MACHINE_FULOONG2F:
|
||||
{
|
||||
grub_pci_device_t dev;
|
||||
grub_port_t p;
|
||||
|
|
|
@ -61,7 +61,7 @@ VARIABLE (grub_arch_highmemsize)
|
|||
.long 0
|
||||
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||
VARIABLE (grub_arch_machine)
|
||||
.long GRUB_ARCH_MACHINE_FULOONG
|
||||
.long GRUB_ARCH_MACHINE_FULOONG2F
|
||||
#endif
|
||||
cont:
|
||||
/* Save our base. */
|
||||
|
|
|
@ -41,7 +41,8 @@ GRUB_MOD_LICENSE ("GPLv3+");
|
|||
const char loongson_machtypes[][60] =
|
||||
{
|
||||
[GRUB_ARCH_MACHINE_YEELOONG] = "machtype=lemote-yeeloong-2f-8.9inches",
|
||||
[GRUB_ARCH_MACHINE_FULOONG] = "machtype=lemote-fuloong-2f-unknown"
|
||||
[GRUB_ARCH_MACHINE_FULOONG2F] = "machtype=lemote-fuloong-2f-unknown",
|
||||
[GRUB_ARCH_MACHINE_FULOONG2E] = "machtype=lemote-fuloong-2e-unknown"
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
@ -239,6 +239,15 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||
const char loongson_defserial[][6] =
|
||||
{
|
||||
[GRUB_ARCH_MACHINE_YEELOONG] = "com0",
|
||||
[GRUB_ARCH_MACHINE_FULOONG2F] = "com2",
|
||||
[GRUB_ARCH_MACHINE_FULOONG2E] = "com1"
|
||||
};
|
||||
#endif
|
||||
|
||||
grub_err_t
|
||||
grub_serial_register (struct grub_serial_port *port)
|
||||
{
|
||||
|
@ -301,9 +310,7 @@ grub_serial_register (struct grub_serial_port *port)
|
|||
port->term_out = out;
|
||||
grub_terminfo_output_register (out, "vt100");
|
||||
#ifdef GRUB_MACHINE_MIPS_LOONGSON
|
||||
if (grub_strcmp (port->name,
|
||||
(grub_arch_machine == GRUB_ARCH_MACHINE_YEELOONG)
|
||||
? "com0" : "com2") == 0)
|
||||
if (grub_strcmp (port->name, loongson_defserial[grub_arch_machine]) == 0)
|
||||
{
|
||||
grub_term_register_input_active ("serial_*", in);
|
||||
grub_term_register_output_active ("serial_*", out);
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
#include <grub/cpu/kernel.h>
|
||||
|
||||
#define GRUB_ARCH_MACHINE_YEELOONG 0
|
||||
#define GRUB_ARCH_MACHINE_FULOONG 1
|
||||
#define GRUB_ARCH_MACHINE_FULOONG2F 1
|
||||
#define GRUB_ARCH_MACHINE_FULOONG2E 2
|
||||
|
||||
#ifndef ASM_FILE
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ struct image_target_desc
|
|||
IMAGE_I386_PC, IMAGE_EFI, IMAGE_COREBOOT,
|
||||
IMAGE_SPARC64_AOUT, IMAGE_SPARC64_RAW, IMAGE_I386_IEEE1275,
|
||||
IMAGE_LOONGSON_ELF, IMAGE_QEMU, IMAGE_PPC, IMAGE_YEELOONG_FLASH,
|
||||
IMAGE_FULOONG_FLASH, IMAGE_I386_PC_PXE, IMAGE_MIPS_ARC,
|
||||
IMAGE_FULOONG2F_FLASH, IMAGE_I386_PC_PXE, IMAGE_MIPS_ARC,
|
||||
IMAGE_QEMU_MIPS_FLASH
|
||||
} id;
|
||||
enum
|
||||
|
@ -298,10 +298,10 @@ struct image_target_desc image_targets[] =
|
|||
},
|
||||
{
|
||||
.dirname = "mipsel-loongson",
|
||||
.names = { "mipsel-fuloong-flash", NULL },
|
||||
.names = { "mipsel-fuloong2f-flash", NULL },
|
||||
.voidp_sizeof = 4,
|
||||
.bigendian = 0,
|
||||
.id = IMAGE_FULOONG_FLASH,
|
||||
.id = IMAGE_FULOONG2F_FLASH,
|
||||
.flags = PLATFORM_FLAGS_DECOMPRESSORS,
|
||||
.prefix = GRUB_KERNEL_MIPS_LOONGSON_PREFIX,
|
||||
.prefix_end = GRUB_KERNEL_MIPS_LOONGSON_PREFIX_END,
|
||||
|
@ -321,6 +321,7 @@ struct image_target_desc image_targets[] =
|
|||
{
|
||||
.dirname = "mipsel-loongson",
|
||||
.names = { "mipsel-loongson-elf", "mipsel-yeeloong-elf",
|
||||
"mipsel-fuloong2f-elf", "mipsel-fuloong2e-elf",
|
||||
"mipsel-fuloong-elf", NULL },
|
||||
.voidp_sizeof = 4,
|
||||
.bigendian = 0,
|
||||
|
@ -1362,7 +1363,7 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
|||
}
|
||||
break;
|
||||
case IMAGE_YEELOONG_FLASH:
|
||||
case IMAGE_FULOONG_FLASH:
|
||||
case IMAGE_FULOONG2F_FLASH:
|
||||
{
|
||||
char *rom_img;
|
||||
size_t rom_size;
|
||||
|
@ -1381,7 +1382,7 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
/* None yet. */
|
||||
const grub_uint8_t fuloong_fwstart_good_hash[512 / 8] =
|
||||
const grub_uint8_t fuloong2f_fwstart_good_hash[512 / 8] =
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
@ -1393,10 +1394,10 @@ generate_image (const char *dir, char *prefix, FILE *out, char *mods[],
|
|||
};
|
||||
const grub_uint8_t *fwstart_good_hash;
|
||||
|
||||
if (image_target->id == IMAGE_FULOONG_FLASH)
|
||||
if (image_target->id == IMAGE_FULOONG2F_FLASH)
|
||||
{
|
||||
fwstart_good_hash = fuloong_fwstart_good_hash;
|
||||
boot_path = grub_util_get_path (dir, "fwstart_fuloong.img");
|
||||
fwstart_good_hash = fuloong2f_fwstart_good_hash;
|
||||
boot_path = grub_util_get_path (dir, "fwstart_fuloong2f.img");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -136,7 +136,7 @@ if [ "x$source_directory" = x ] ; then
|
|||
cpu="`echo $format | awk -F - '{ print $1; }'`"
|
||||
platform="`echo $format | awk -F - '{ print $2; }'`"
|
||||
case "$platform" in
|
||||
yeeloong | fuloong)
|
||||
yeeloong | fuloong | fuloong2f | fuloong2e)
|
||||
platform=loongson ;;
|
||||
esac
|
||||
case "$cpu-$platform" in
|
||||
|
|
Loading…
Reference in a new issue