merge mainline into sgi

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-05-15 02:23:36 +02:00
commit bee1aeb9a1
49 changed files with 1148 additions and 348 deletions

View file

@ -94,7 +94,8 @@ enum grub_ata_commands
enum grub_ata_timeout_milliseconds
{
GRUB_ATA_TOUT_STD = 1000, /* 1s standard timeout. */
GRUB_ATA_TOUT_DATA = 10000 /* 10s DATA I/O timeout. */
GRUB_ATA_TOUT_DATA = 10000, /* 10s DATA I/O timeout. */
GRUB_ATA_TOUT_DEV_INIT = 10000, /* Give the device 10s on first try to spinon. */
};
struct grub_ata_device
@ -128,6 +129,8 @@ struct grub_ata_device
/* Set to 0 for ATA, set to 1 for ATAPI. */
int atapi;
int present;
struct grub_ata_device *next;
};

View file

@ -37,4 +37,14 @@ grub_arch_sync_caches (void *address __attribute__ ((unused)),
void EXPORT_FUNC(grub_arch_sync_caches) (void *address, grub_size_t len);
#endif
#ifdef _mips
void EXPORT_FUNC(grub_arch_sync_dma_caches) (void *address, grub_size_t len);
#else
static inline void
grub_arch_sync_dma_caches (void *address __attribute__ ((unused)),
grub_size_t len __attribute__ ((unused)))
{
}
#endif
#endif /* ! GRUB_CACHE_HEADER */

View file

@ -26,9 +26,11 @@
#endif
#define GRUB_CS5536_PCIID 0x208f1022
#define GRUB_CS5536_MSR_MAILBOX_ADDR 0xf4
#define GRUB_CS5536_MSR_MAILBOX_DATA0 0xf8
#define GRUB_CS5536_MSR_MAILBOX_DATA1 0xfc
#define GRUB_CS5536_MSR_MAILBOX_CONFIG_ENABLED 0x1
#define GRUB_CS5536_MSR_MAILBOX_CONFIG 0xf0
#define GRUB_CS5536_MSR_MAILBOX_ADDR 0xf4
#define GRUB_CS5536_MSR_MAILBOX_DATA0 0xf8
#define GRUB_CS5536_MSR_MAILBOX_DATA1 0xfc
#define GRUB_CS5536_MSR_IRQ_MAP_BAR 0x80000008
#define GRUB_CS5536_MSR_SMB_BAR 0x8000000b
@ -73,11 +75,15 @@
#define GRUB_CS5536_MSR_DIVIL_LEG_IO_RTC_ENABLE1 0x00000002
#define GRUB_CS5536_MSR_DIVIL_LEG_IO_MODE_X86 0x10000000
#define GRUB_CS5536_MSR_DIVIL_LEG_IO_F_REMAP 0x04000000
#define GRUB_CS5536_MSR_DIVIL_LEG_IO_UART1_COM1 0x00070000
#define GRUB_CS5536_MSR_DIVIL_LEG_IO_UART2_COM3 0x00500000
#define GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_PRIMARY_MASK 0x80000024
#define GRUB_CS5536_MSR_DIVIL_IRQ_MAPPER_LPC_MASK 0x80000025
#define GRUB_CS5536_DIVIL_LPC_INTERRUPTS 0x1002
#define GRUB_CS5536_MSR_DIVIL_LPC_SERIAL_IRQ_CONTROL 0x8000004e
#define GRUB_CS5536_MSR_DIVIL_LPC_SERIAL_IRQ_CONTROL_ENABLE 0x80
#define GRUB_CS5536_MSR_DIVIL_UART1_CONF 0x8000003a
#define GRUB_CS5536_MSR_DIVIL_UART2_CONF 0x8000003e
#define GRUB_CS5536_MSR_USB_OHCI_BASE 0x40000008
#define GRUB_CS5536_MSR_USB_EHCI_BASE 0x40000009

View file

@ -80,6 +80,6 @@
#define GRUB_CPU_LOONGSON_PCI_HIT1_SEL_HI 0xbfe00154
#define GRUB_CPU_LOONGSON_GPIOCFG 0xbfe00120
#define GRUB_CPU_LOONGSON_SHUTDOWN_GPIO 1
#define GRUB_CPU_YEELOONG_SHUTDOWN_GPIO 1
#endif

View file

@ -0,0 +1,34 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_KERNEL_MACHINE_HEADER
#define GRUB_KERNEL_MACHINE_HEADER 1
#include <grub/symbol.h>
#include <grub/cpu/kernel.h>
#define GRUB_ARCH_MACHINE_YEELOONG 0
#define GRUB_ARCH_MACHINE_FULOONG 1
#ifndef ASM_FILE
extern grub_uint32_t EXPORT_VAR (grub_arch_machine);
#endif
#endif /* ! GRUB_KERNEL_MACHINE_HEADER */

View file

@ -24,10 +24,10 @@
#include <grub/cpu/io.h>
#endif
#define GRUB_YEELOONG_OHCI_PCIID 0x00351033
#define GRUB_YEELOONG_EHCI_PCIID 0x00e01033
#define GRUB_YEELOONG_OHCI_GHOST_FUNCTION 4
#define GRUB_YEELOONG_EHCI_GHOST_FUNCTION 5
#define GRUB_LOONGSON_OHCI_PCIID 0x00351033
#define GRUB_LOONGSON_EHCI_PCIID 0x00e01033
#define GRUB_LOONGSON_OHCI_GHOST_FUNCTION 4
#define GRUB_LOONGSON_EHCI_GHOST_FUNCTION 5
#define GRUB_PCI_NUM_BUS 1
#define GRUB_PCI_NUM_DEVICES 16

View file

@ -19,11 +19,14 @@
#ifndef GRUB_MACHINE_SERIAL_HEADER
#define GRUB_MACHINE_SERIAL_HEADER 1
#define GRUB_MACHINE_SERIAL_DIVISOR_115200 2
#define GRUB_MACHINE_SERIAL_PORT 0xbff003f8
#define GRUB_MACHINE_SERIAL_PORT0_DIVISOR_115200 2
#define GRUB_MACHINE_SERIAL_PORT2_DIVISOR_115200 1
#define GRUB_MACHINE_SERIAL_PORT0 0xbff003f8
#define GRUB_MACHINE_SERIAL_PORT1 0xbfd003f8
#define GRUB_MACHINE_SERIAL_PORT2 0xbfd002f8
#ifndef ASM_FILE
#define GRUB_MACHINE_SERIAL_PORTS { GRUB_MACHINE_SERIAL_PORT }
#define GRUB_MACHINE_SERIAL_PORTS { GRUB_MACHINE_SERIAL_PORT0, GRUB_MACHINE_SERIAL_PORT1, GRUB_MACHINE_SERIAL_PORT2 }
#else
#endif

View file

@ -1 +0,0 @@
#include <grub/cpu/kernel.h>

View file

@ -100,16 +100,16 @@
#define GRUB_KERNEL_POWERPC_IEEE1275_LINK_ALIGN 4
#define GRUB_KERNEL_POWERPC_IEEE1275_LINK_ADDR 0x200000
#define GRUB_KERNEL_MIPS_YEELOONG_LINK_ADDR 0x80200000
#define GRUB_KERNEL_MIPS_LOONGSON_LINK_ADDR 0x80200000
#define GRUB_KERNEL_MIPS_YEELOONG_LINK_ALIGN 32
#define GRUB_KERNEL_MIPS_LOONGSON_LINK_ALIGN 32
#define GRUB_KERNEL_MIPS_YEELOONG_COMPRESSED_SIZE 0x8
#define GRUB_KERNEL_MIPS_YEELOONG_UNCOMPRESSED_SIZE 0xc
#define GRUB_KERNEL_MIPS_LOONGSON_COMPRESSED_SIZE 0x8
#define GRUB_KERNEL_MIPS_LOONGSON_UNCOMPRESSED_SIZE 0xc
#define GRUB_KERNEL_MIPS_YEELOONG_TOTAL_MODULE_SIZE 0x08
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX 0x0c
#define GRUB_KERNEL_MIPS_YEELOONG_PREFIX_END 0x54
#define GRUB_KERNEL_MIPS_LOONGSON_TOTAL_MODULE_SIZE 0x08
#define GRUB_KERNEL_MIPS_LOONGSON_PREFIX 0x0c
#define GRUB_KERNEL_MIPS_LOONGSON_PREFIX_END 0x54
#define GRUB_KERNEL_MIPS_ARC_LINK_ADDR 0x8a000000
@ -155,7 +155,7 @@
#define GRUB_KERNEL_POWERPC_IEEE1275_MOD_ALIGN 0x1000
#define GRUB_KERNEL_MIPS_YEELOONG_MOD_ALIGN 0x1
#define GRUB_KERNEL_MIPS_LOONGSON_MOD_ALIGN 0x1
#define GRUB_KERNEL_MIPS_ARC_MOD_ALIGN 0x1
/* Minimal gap between _end and the start of the modules. It's a hack

View file

@ -102,7 +102,7 @@ grub_serial_config_defaults (struct grub_serial_port *port)
{
struct grub_serial_config config =
{
#ifdef GRUB_MACHINE_MIPS_YEELOONG
#ifdef GRUB_MACHINE_MIPS_LOONGSON
.speed = 115200,
#else
.speed = 9600,

View file

@ -248,6 +248,14 @@ grub_term_register_input (const char *name __attribute__ ((unused)),
}
}
static inline void
grub_term_register_input_inactive (const char *name __attribute__ ((unused)),
grub_term_input_t term)
{
grub_list_push (GRUB_AS_LIST_P (&grub_term_inputs_disabled),
GRUB_AS_LIST (term));
}
static inline void
grub_term_register_input_active (const char *name __attribute__ ((unused)),
grub_term_input_t term)
@ -272,6 +280,14 @@ grub_term_register_output (const char *name __attribute__ ((unused)),
}
}
static inline void
grub_term_register_output_inactive (const char *name __attribute__ ((unused)),
grub_term_output_t term)
{
grub_list_push (GRUB_AS_LIST_P (&grub_term_outputs_disabled),
GRUB_AS_LIST (term));
}
static inline void
grub_term_register_output_active (const char *name __attribute__ ((unused)),
grub_term_output_t term)

View file

@ -211,7 +211,8 @@ typedef enum grub_video_driver_id
GRUB_VIDEO_DRIVER_VGA,
GRUB_VIDEO_DRIVER_CIRRUS,
GRUB_VIDEO_DRIVER_BOCHS,
GRUB_VIDEO_DRIVER_SDL
GRUB_VIDEO_DRIVER_SDL,
GRUB_VIDEO_DRIVER_SIS315PRO,
} grub_video_driver_id_t;
typedef enum grub_video_adapter_prio