merge mainline into net
This commit is contained in:
commit
aa6b91afe9
68 changed files with 2264 additions and 747 deletions
|
@ -170,6 +170,7 @@ struct grub_ata
|
|||
|
||||
/* Sector count. */
|
||||
grub_uint64_t size;
|
||||
grub_uint32_t log_sector_size;
|
||||
|
||||
/* CHS maximums. */
|
||||
grub_uint16_t cylinders;
|
||||
|
|
|
@ -80,7 +80,10 @@ struct grub_partition_bsd_entry
|
|||
struct grub_partition_bsd_disk_label
|
||||
{
|
||||
grub_uint32_t magic;
|
||||
grub_uint8_t padding[128];
|
||||
grub_uint16_t type;
|
||||
grub_uint8_t unused1[18];
|
||||
grub_uint8_t packname[16];
|
||||
grub_uint8_t unused2[92];
|
||||
grub_uint32_t magic2;
|
||||
grub_uint16_t checksum;
|
||||
grub_uint16_t num_partitions;
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#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_RESET 0x80000017
|
||||
#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
|
||||
|
|
|
@ -175,6 +175,11 @@ grub_err_t EXPORT_FUNC(grub_disk_write) (grub_disk_t disk,
|
|||
|
||||
grub_uint64_t EXPORT_FUNC(grub_disk_get_size) (grub_disk_t disk);
|
||||
|
||||
#if DISK_CACHE_STATS
|
||||
void
|
||||
EXPORT_FUNC(grub_disk_cache_get_performance) (unsigned long *hits, unsigned long *misses);
|
||||
#endif
|
||||
|
||||
extern void (* EXPORT_VAR(grub_disk_firmware_fini)) (void);
|
||||
extern int EXPORT_VAR(grub_disk_firmware_is_tainted);
|
||||
|
||||
|
|
|
@ -51,9 +51,11 @@
|
|||
|
||||
#define NETBSD_BTINFO_BOOTPATH 0
|
||||
#define NETBSD_BTINFO_ROOTDEVICE 1
|
||||
#define NETBSD_BTINFO_BOOTDISK 3
|
||||
#define NETBSD_BTINFO_CONSOLE 6
|
||||
#define NETBSD_BTINFO_SYMTAB 8
|
||||
#define NETBSD_BTINFO_MEMMAP 9
|
||||
#define NETBSD_BTINFO_BOOTWEDGE 10
|
||||
#define NETBSD_BTINFO_MODULES 11
|
||||
#define NETBSD_BTINFO_FRAMEBUF 12
|
||||
|
||||
|
@ -83,6 +85,15 @@ struct grub_netbsd_btinfo_bootdisk
|
|||
grub_uint32_t partition;
|
||||
};
|
||||
|
||||
struct grub_netbsd_btinfo_bootwedge {
|
||||
grub_uint32_t biosdev;
|
||||
grub_disk_addr_t startblk;
|
||||
grub_uint64_t nblks;
|
||||
grub_disk_addr_t matchblk;
|
||||
grub_uint64_t matchnblks;
|
||||
grub_uint8_t matchhash[16]; /* MD5 hash */
|
||||
} __packed;
|
||||
|
||||
struct grub_netbsd_btinfo_symtab
|
||||
{
|
||||
grub_uint32_t nsyms;
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#ifndef GRUB_VBE_MACHINE_HEADER
|
||||
#define GRUB_VBE_MACHINE_HEADER 1
|
||||
|
||||
#include <grub/video.h>
|
||||
|
||||
/* Default video mode to be used. */
|
||||
#define GRUB_VBE_DEFAULT_VIDEO_MODE 0x101
|
||||
|
||||
|
@ -169,6 +171,21 @@ struct grub_vbe_palette_data
|
|||
grub_uint8_t alignment;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct grub_vbe_flat_panel_info
|
||||
{
|
||||
grub_uint16_t horizontal_size;
|
||||
grub_uint16_t vertical_size;
|
||||
grub_uint16_t panel_type;
|
||||
grub_uint8_t red_bpp;
|
||||
grub_uint8_t green_bpp;
|
||||
grub_uint8_t blue_bpp;
|
||||
grub_uint8_t reserved_bpp;
|
||||
grub_uint32_t reserved_offscreen_mem_size;
|
||||
grub_vbe_farptr_t reserved_offscreen_mem_ptr;
|
||||
|
||||
grub_uint8_t reserved[14];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Prototypes for helper functions. */
|
||||
/* Call VESA BIOS 0x4f00 to get VBE Controller Information, return status. */
|
||||
grub_vbe_status_t
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GRUB_KERNEL_MACHINE_HEADER
|
||||
#define GRUB_KERNEL_MACHINE_HEADER 1
|
||||
#ifndef GRUB_KERNEL_CPU_HEADER
|
||||
#define GRUB_KERNEL_CPU_HEADER 1
|
||||
|
||||
#include <grub/symbol.h>
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
#define GRUB_CPU_LOONGSON_COP0_BADVADDR GRUB_CPU_REGISTER_WRAP($8)
|
||||
#define GRUB_CPU_LOONGSON_COP0_CAUSE GRUB_CPU_REGISTER_WRAP($13)
|
||||
#define GRUB_CPU_LOONGSON_COP0_EPC GRUB_CPU_REGISTER_WRAP($14)
|
||||
#define GRUB_CPU_LOONGSON_COP0_PRID GRUB_CPU_REGISTER_WRAP($15)
|
||||
#define GRUB_CPU_LOONGSON_COP0_CACHE_TAGLO GRUB_CPU_REGISTER_WRAP($28)
|
||||
#define GRUB_CPU_LOONGSON_COP0_CACHE_TAGHI GRUB_CPU_REGISTER_WRAP($29)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@
|
|||
|
||||
#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
|
||||
|
@ -66,7 +64,7 @@ grub_pci_read (grub_pci_address_t addr)
|
|||
{
|
||||
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
|
||||
return *(volatile grub_uint32_t *) (GRUB_MACHINE_PCI_CONFSPACE
|
||||
| (addr & 0x03ff));
|
||||
| (addr & 0x07ff));
|
||||
}
|
||||
|
||||
static inline grub_uint16_t
|
||||
|
@ -74,7 +72,7 @@ grub_pci_read_word (grub_pci_address_t addr)
|
|||
{
|
||||
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
|
||||
return *(volatile grub_uint16_t *) (GRUB_MACHINE_PCI_CONFSPACE
|
||||
| (addr & 0x03ff));
|
||||
| (addr & 0x07ff));
|
||||
}
|
||||
|
||||
static inline grub_uint8_t
|
||||
|
@ -82,7 +80,7 @@ grub_pci_read_byte (grub_pci_address_t addr)
|
|||
{
|
||||
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
|
||||
return *(volatile grub_uint8_t *) (GRUB_MACHINE_PCI_CONFSPACE
|
||||
| (addr & 0x03ff));
|
||||
| (addr & 0x07ff));
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -90,7 +88,7 @@ grub_pci_write (grub_pci_address_t addr, grub_uint32_t data)
|
|||
{
|
||||
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
|
||||
*(volatile grub_uint32_t *) (GRUB_MACHINE_PCI_CONFSPACE
|
||||
| (addr & 0x03ff)) = data;
|
||||
| (addr & 0x07ff)) = data;
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -98,7 +96,7 @@ grub_pci_write_word (grub_pci_address_t addr, grub_uint16_t data)
|
|||
{
|
||||
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
|
||||
*(volatile grub_uint16_t *) (GRUB_MACHINE_PCI_CONFSPACE
|
||||
| (addr & 0x03ff)) = data;
|
||||
| (addr & 0x07ff)) = data;
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -106,7 +104,7 @@ grub_pci_write_byte (grub_pci_address_t addr, grub_uint8_t data)
|
|||
{
|
||||
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
|
||||
*(volatile grub_uint8_t *) (GRUB_MACHINE_PCI_CONFSPACE
|
||||
| (addr & 0x03ff)) = data;
|
||||
| (addr & 0x07ff)) = data;
|
||||
}
|
||||
|
||||
volatile void *
|
||||
|
|
|
@ -47,7 +47,6 @@ void grub_util_write_image_at (const void *img, size_t size, off_t offset,
|
|||
|
||||
void sync (void);
|
||||
int fsync (int fno);
|
||||
void sleep(int s);
|
||||
|
||||
grub_int64_t grub_util_get_disk_size (char *name);
|
||||
|
||||
|
|
|
@ -210,6 +210,66 @@ struct grub_video_palette_data
|
|||
grub_uint8_t a; /* Reserved bits value (0-255). */
|
||||
};
|
||||
|
||||
struct grub_video_edid_info
|
||||
{
|
||||
grub_uint8_t header[8];
|
||||
grub_uint16_t manufacturer_id;
|
||||
grub_uint16_t product_id;
|
||||
grub_uint32_t serial_number;
|
||||
grub_uint8_t week_of_manufacture;
|
||||
grub_uint8_t year_of_manufacture;
|
||||
grub_uint8_t version;
|
||||
grub_uint8_t revision;
|
||||
|
||||
grub_uint8_t video_input_definition;
|
||||
grub_uint8_t max_horizontal_image_size;
|
||||
grub_uint8_t max_vertical_image_size;
|
||||
grub_uint8_t display_gamma;
|
||||
grub_uint8_t feature_support;
|
||||
#define GRUB_VIDEO_EDID_FEATURE_PREFERRED_TIMING_MODE (1 << 1)
|
||||
|
||||
grub_uint8_t red_green_lo;
|
||||
grub_uint8_t blue_white_lo;
|
||||
grub_uint8_t red_x_hi;
|
||||
grub_uint8_t red_y_hi;
|
||||
grub_uint8_t green_x_hi;
|
||||
grub_uint8_t green_y_hi;
|
||||
grub_uint8_t blue_x_hi;
|
||||
grub_uint8_t blue_y_hi;
|
||||
grub_uint8_t white_x_hi;
|
||||
grub_uint8_t white_y_hi;
|
||||
|
||||
grub_uint8_t established_timings_1;
|
||||
grub_uint8_t established_timings_2;
|
||||
grub_uint8_t manufacturer_reserved_timings;
|
||||
|
||||
grub_uint16_t standard_timings[8];
|
||||
|
||||
struct {
|
||||
grub_uint16_t pixel_clock;
|
||||
/* Only valid if the pixel clock is non-null. */
|
||||
grub_uint8_t horizontal_active_lo;
|
||||
grub_uint8_t horizontal_blanking_lo;
|
||||
grub_uint8_t horizontal_hi;
|
||||
grub_uint8_t vertical_active_lo;
|
||||
grub_uint8_t vertical_blanking_lo;
|
||||
grub_uint8_t vertical_hi;
|
||||
grub_uint8_t horizontal_sync_offset_lo;
|
||||
grub_uint8_t horizontal_sync_pulse_width_lo;
|
||||
grub_uint8_t vertical_sync_lo;
|
||||
grub_uint8_t sync_hi;
|
||||
grub_uint8_t horizontal_image_size_lo;
|
||||
grub_uint8_t vertical_image_size_lo;
|
||||
grub_uint8_t image_size_hi;
|
||||
grub_uint8_t horizontal_border;
|
||||
grub_uint8_t vertical_border;
|
||||
grub_uint8_t flags;
|
||||
} detailed_timings[4];
|
||||
|
||||
grub_uint8_t extension_flag;
|
||||
grub_uint8_t checksum;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
typedef enum grub_video_driver_id
|
||||
{
|
||||
GRUB_VIDEO_DRIVER_NONE,
|
||||
|
@ -222,6 +282,7 @@ typedef enum grub_video_driver_id
|
|||
GRUB_VIDEO_DRIVER_BOCHS,
|
||||
GRUB_VIDEO_DRIVER_SDL,
|
||||
GRUB_VIDEO_DRIVER_SIS315PRO,
|
||||
GRUB_VIDEO_DRIVER_RADEON_FULOONG2E,
|
||||
} grub_video_driver_id_t;
|
||||
|
||||
typedef enum grub_video_adapter_prio
|
||||
|
@ -312,6 +373,8 @@ struct grub_video_adapter
|
|||
|
||||
int (*iterate) (int (*hook) (const struct grub_video_mode_info *info));
|
||||
|
||||
grub_err_t (*get_edid) (struct grub_video_edid_info *edid_info);
|
||||
|
||||
void (*print_adapter_specific_info) (void);
|
||||
};
|
||||
typedef struct grub_video_adapter *grub_video_adapter_t;
|
||||
|
@ -424,6 +487,11 @@ grub_err_t EXPORT_FUNC (grub_video_set_active_render_target) (struct grub_video_
|
|||
|
||||
grub_err_t grub_video_get_active_render_target (struct grub_video_render_target **target);
|
||||
|
||||
grub_err_t EXPORT_FUNC (grub_video_edid_checksum) (struct grub_video_edid_info *edid_info);
|
||||
grub_err_t EXPORT_FUNC (grub_video_edid_preferred_mode) (struct grub_video_edid_info *edid_info,
|
||||
unsigned int *width,
|
||||
unsigned int *height);
|
||||
|
||||
grub_err_t EXPORT_FUNC (grub_video_set_mode) (const char *modestring,
|
||||
unsigned int modemask,
|
||||
unsigned int modevalue);
|
||||
|
|
|
@ -90,7 +90,7 @@ typedef union zap_leaf_chunk {
|
|||
{
|
||||
grub_uint8_t la_array[ZAP_LEAF_ARRAY_BYTES];
|
||||
grub_uint64_t la_array64;
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
grub_uint16_t la_next; /* next blk or CHAIN_END */
|
||||
} l_array;
|
||||
struct zap_leaf_free {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue