Dimplify tags and enable USB on more platforms

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-08-30 15:13:38 +02:00
parent 23e2a517ad
commit eefe8abd52
10 changed files with 121 additions and 189 deletions

View file

@ -1,3 +1,12 @@
2010-08-30 Vladimir Serbinenko <phcoder@gmail.com>
Interrupt wrapping and code simplifications.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Remove
include/grub/machine/vga.h, include/grub/machine/vbe.h,
(KERNEL_HEADER_FILES) [i386-pc]: Add include/grub/machine/int.h.
Remove include/grub/machine/init.h.
2010-08-30 Vladimir Serbinenko <phcoder@gmail.com> 2010-08-30 Vladimir Serbinenko <phcoder@gmail.com>
* docs/grub.texi (Network): Fix reference to pxe_blksize. * docs/grub.texi (Network): Fix reference to pxe_blksize.

View file

@ -330,7 +330,7 @@ script = {
script = { script = {
mansection = 1; mansection = 1;
name = grub-mkrescue; name = grub-mkrescue;
x86_noieee1275 = util/grub-mkrescue.in; x86 = util/grub-mkrescue.in;
powerpc_ieee1275 = util/powerpc/ieee1275/grub-mkrescue.in; powerpc_ieee1275 = util/powerpc/ieee1275/grub-mkrescue.in;
enable = i386_pc; enable = i386_pc;
enable = x86_efi; enable = x86_efi;
@ -346,15 +346,17 @@ script = {
name = grub-install; name = grub-install;
mips = util/grub-install.in; mips = util/grub-install.in;
i386_noefi_noieee1275 = util/grub-install.in; i386_pc = util/grub-install.in;
i386_qemu = util/grub-install.in;
i386_coreboot = util/grub-install.in;
i386_multiboot = util/grub-install.in;
sparc64_ieee1275 = util/grub-install.in;
x86_efi = util/i386/efi/grub-install.in; x86_efi = util/i386/efi/grub-install.in;
i386_ieee1275 = util/ieee1275/grub-install.in; i386_ieee1275 = util/ieee1275/grub-install.in;
powerpc_ieee1275 = util/ieee1275/grub-install.in; powerpc_ieee1275 = util/ieee1275/grub-install.in;
enable = x86; enable = noemu;
enable = mips;
enable = powerpc_ieee1275;
}; };
script = { script = {

View file

@ -10,46 +10,38 @@ GRUB_PLATFORMS = [ "emu", "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot",
"powerpc_ieee1275" ] "powerpc_ieee1275" ]
GROUPS = {} GROUPS = {}
GROUPS["common"] = GRUB_PLATFORMS[:]
# Groups based on CPU
GROUPS["i386"] = [ "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", "i386_multiboot", "i386_ieee1275" ] GROUPS["i386"] = [ "i386_pc", "i386_efi", "i386_qemu", "i386_coreboot", "i386_multiboot", "i386_ieee1275" ]
GROUPS["x86_64"] = [ "x86_64_efi" ] GROUPS["x86_64"] = [ "x86_64_efi" ]
GROUPS["x86"] = GROUPS["i386"] + GROUPS["x86_64"] GROUPS["x86"] = GROUPS["i386"] + GROUPS["x86_64"]
GROUPS["x86_efi"] = [ "i386_efi", "x86_64_efi" ]
GROUPS["nopc"] = GRUB_PLATFORMS[:]; GROUPS["nopc"].remove("i386_pc")
GROUPS["x86_efi_pc"] = GROUPS["x86_efi"] + ["i386_pc"]
GROUPS["x86_noefi"] = GROUPS["x86"][:]; GROUPS["x86_noefi"].remove("i386_efi"); GROUPS["x86_noefi"].remove("x86_64_efi")
GROUPS["i386_noefi"] = GROUPS["i386"][:]; GROUPS["i386_noefi"].remove("i386_efi")
GROUPS["x86_noieee1275"] = GROUPS["x86"][:]; GROUPS["x86_noieee1275"].remove("i386_ieee1275")
GROUPS["i386_noieee1275"] = GROUPS["i386"][:]; GROUPS["i386_noieee1275"].remove("i386_ieee1275")
GROUPS["i386_noefi_noieee1275"] = GROUPS["i386_noefi"][:]; GROUPS["i386_noefi_noieee1275"].remove("i386_ieee1275")
GROUPS["i386_pc_qemu_coreboot"] = ["i386_pc", "i386_qemu", "i386_coreboot"]
GROUPS["i386_coreboot_multiboot"] = ["i386_coreboot", "i386_multiboot"]
GROUPS["i386_coreboot_multiboot_qemu"] = ["i386_coreboot", "i386_multiboot", "i386_qemu"]
GROUPS["i386_pc_coreboot_multiboot_qemu"] = ["i386_pc", "i386_coreboot", "i386_multiboot", "i386_qemu"]
GROUPS["mips"] = [ "mips_yeeloong" ] GROUPS["mips"] = [ "mips_yeeloong" ]
GROUPS["sparc64"] = [ "sparc64_ieee1275" ] GROUPS["sparc64"] = [ "sparc64_ieee1275" ]
GROUPS["powerpc"] = [ "powerpc_ieee1275" ] GROUPS["powerpc"] = [ "powerpc_ieee1275" ]
GROUPS["nosparc64"] = GRUB_PLATFORMS[:]; GROUPS["nosparc64"].remove("sparc64_ieee1275") # Groups based on firmware
GROUPS["x86_noefi_mips"] = GROUPS["x86_noefi"] + GROUPS["mips"] GROUPS["x86_efi"] = [ "i386_efi", "x86_64_efi" ]
GROUPS["ieee1275"] = [ "i386_ieee1275", "sparc64_ieee1275", "powerpc_ieee1275" ] GROUPS["ieee1275"] = [ "i386_ieee1275", "sparc64_ieee1275", "powerpc_ieee1275" ]
GROUPS["noieee1275"] = GRUB_PLATFORMS[:]
for i in GROUPS["ieee1275"]: GROUPS["noieee1275"].remove(i)
GROUPS["ieee1275_mips"] = GROUPS["ieee1275"] + GROUPS["mips"]
GROUPS["pci"] = GROUPS["x86"] + GROUPS["mips"]
# emu is a special case so many core functionality isn't needed on this platform
GROUPS["noemu"] = GRUB_PLATFORMS[:]; GROUPS["noemu"].remove("emu") GROUPS["noemu"] = GRUB_PLATFORMS[:]; GROUPS["noemu"].remove("emu")
GROUPS["noemu_noieee1275"] = GRUB_PLATFORMS[:]
for i in ["emu"] + GROUPS["ieee1275"]: GROUPS["noemu_noieee1275"].remove(i)
GROUPS["common"] = GRUB_PLATFORMS[:] # Groups based on hardware features
GROUPS["cmos"] = GROUPS["x86"][:] + ["mips_yeeloong"]; GROUPS["cmos"].remove("i386_efi"); GROUPS["cmos"].remove("x86_64_efi")
GROUPS["pci"] = GROUPS["x86"] + GROUPS["mips"]
GROUPS["usb"] = GROUPS["pci"]
# If gfxterm is main output console integrate it into kernel
GROUPS["videoinkernel"] = ["mips_yeeloong"]
GROUPS["videomodules"] = GRUB_PLATFORMS[:];
for i in GROUPS["videoinkernel"]: GROUPS["videomodules"].remove(i)
# Miscelaneous groups schedulded to disappear in future
GROUPS["nosparc64"] = GRUB_PLATFORMS[:]; GROUPS["nosparc64"].remove("sparc64_ieee1275")
GROUPS["i386_coreboot_multiboot_qemu"] = ["i386_coreboot", "i386_multiboot", "i386_qemu"]
GROUPS["nopc"] = GRUB_PLATFORMS[:]; GROUPS["nopc"].remove("i386_pc")
# #
# Create platform => groups reverse map, where groups covering that # Create platform => groups reverse map, where groups covering that

View file

@ -58,8 +58,6 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/command.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/device.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/disk.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dl.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/dl.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/elf.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/elfload.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/env_private.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/err.h
@ -70,23 +68,14 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/kernel.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/list.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/list.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/misc.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/misc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/net.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/parser.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/parser.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/partition.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/reader.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/symbol.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/term.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/time.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/types.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/mm_private.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/boot.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/boot.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/msdos_partition.h
if COND_i386_pc if COND_i386_pc
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/biosdisk.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/boot.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/console.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/loader.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/loader.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
@ -103,33 +92,26 @@ KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
endif endif
if COND_i386_coreboot if COND_i386_coreboot
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/boot.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/console.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
endif endif
if COND_i386_multiboot if COND_i386_multiboot
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/boot.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/console.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
endif endif
if COND_i386_qemu if COND_i386_qemu
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/boot.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/console.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/pci.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
endif endif
if COND_i386_ieee1275 if COND_i386_ieee1275
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/loader.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/msdos_partition.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/memory.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/terminfo.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/i386/pit.h
endif endif
if COND_x86_64_efi if COND_x86_64_efi
@ -164,15 +146,10 @@ endif
if COND_sparc64_ieee1275 if COND_sparc64_ieee1275
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/libgcc.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/ieee1275/ieee1275.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/machine/kernel.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sparc64/ieee1275/ieee1275.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/sparc64/ieee1275/ieee1275.h
endif endif
if COND_emu if COND_emu
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/time.h
KERNEL_HEADER_FILES += $(top_builddir)/include/grub/cpu/types.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/gzio.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/menu.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/datetime.h
KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h KERNEL_HEADER_FILES += $(top_srcdir)/include/grub/emu/misc.h
if COND_GRUB_EMU_SDL if COND_GRUB_EMU_SDL

View file

@ -36,7 +36,8 @@ kernel = {
x86_64_efi_startup = kern/x86_64/efi/startup.S; x86_64_efi_startup = kern/x86_64/efi/startup.S;
i386_qemu_startup = kern/i386/qemu/startup.S; i386_qemu_startup = kern/i386/qemu/startup.S;
i386_ieee1275_startup = kern/i386/ieee1275/startup.S; i386_ieee1275_startup = kern/i386/ieee1275/startup.S;
i386_coreboot_multiboot_startup = kern/i386/coreboot/startup.S; i386_coreboot_startup = kern/i386/coreboot/startup.S;
i386_multiboot_startup = kern/i386/coreboot/startup.S;
mips_yeeloong_startup = kern/mips/startup.S; mips_yeeloong_startup = kern/mips/startup.S;
sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S; sparc64_ieee1275_startup = kern/sparc64/ieee1275/crt0.S;
powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S; powerpc_ieee1275_startup = kern/powerpc/ieee1275/startup.S;
@ -65,7 +66,12 @@ kernel = {
noemu_nodist = symlist.c; noemu_nodist = symlist.c;
noemu_noieee1275 = kern/generic/rtc_get_time_ms.c; i386_pc = kern/generic/rtc_get_time_ms.c;
x86_efi = kern/generic/rtc_get_time_ms.c;
i386_qemu = kern/generic/rtc_get_time_ms.c;
i386_coreboot = kern/generic/rtc_get_time_ms.c;
i386_multiboot = kern/generic/rtc_get_time_ms.c;
mips_yeeloong = kern/generic/rtc_get_time_ms.c;
ieee1275 = disk/ieee1275/ofdisk.c; ieee1275 = disk/ieee1275/ofdisk.c;
ieee1275 = kern/ieee1275/cmain.c; ieee1275 = kern/ieee1275/cmain.c;
@ -74,17 +80,20 @@ kernel = {
ieee1275 = kern/ieee1275/openfw.c; ieee1275 = kern/ieee1275/openfw.c;
ieee1275 = term/ieee1275/ofconsole.c; ieee1275 = term/ieee1275/ofconsole.c;
ieee1275_mips = term/terminfo.c; ieee1275 = term/terminfo.c;
ieee1275_mips = term/tparm.c; ieee1275 = term/tparm.c;
mips = term/terminfo.c;
mips = term/tparm.c;
i386 = kern/i386/dl.c; i386 = kern/i386/dl.c;
i386_coreboot_multiboot_qemu = kern/i386/coreboot/init.c; i386_coreboot_multiboot_qemu = kern/i386/coreboot/init.c;
i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c; i386_coreboot_multiboot_qemu = term/i386/pc/vga_text.c;
i386_pc_coreboot_multiboot_qemu = term/i386/vga_common.c; i386_coreboot_multiboot_qemu = term/i386/vga_common.c;
i386_pc = term/i386/vga_common.c;
x86_noieee1275 = kern/i386/pit.c; x86 = kern/i386/pit.c;
x86_efi = disk/efi/efidisk.c; x86_efi = disk/efi/efidisk.c;
x86_efi = kern/efi/efi.c; x86_efi = kern/efi/efi.c;
@ -121,26 +130,13 @@ kernel = {
mips_yeeloong = bus/bonito.c; mips_yeeloong = bus/bonito.c;
mips_yeeloong = bus/cs5536.c; mips_yeeloong = bus/cs5536.c;
mips_yeeloong = bus/pci.c; mips_yeeloong = bus/pci.c;
mips_yeeloong = commands/extcmd.c;
mips_yeeloong = font/font.c;
mips_yeeloong = font/font_cmd.c;
mips_yeeloong = io/bufio.c;
mips_yeeloong = kern/mips/cache.S; mips_yeeloong = kern/mips/cache.S;
mips_yeeloong = kern/mips/dl.c; mips_yeeloong = kern/mips/dl.c;
mips_yeeloong = kern/mips/init.c; mips_yeeloong = kern/mips/init.c;
mips_yeeloong = kern/mips/yeeloong/init.c; mips_yeeloong = kern/mips/yeeloong/init.c;
mips_yeeloong = lib/arg.c;
mips_yeeloong = term/at_keyboard.c; mips_yeeloong = term/at_keyboard.c;
mips_yeeloong = term/gfxterm.c;
mips_yeeloong = term/serial.c; mips_yeeloong = term/serial.c;
mips_yeeloong = video/bitmap.c;
mips_yeeloong = video/bitmap_scale.c;
mips_yeeloong = video/fb/fbblit.c;
mips_yeeloong = video/fb/fbfill.c;
mips_yeeloong = video/fb/fbutil.c;
mips_yeeloong = video/fb/video_fb.c;
mips_yeeloong = video/sm712.c; mips_yeeloong = video/sm712.c;
mips_yeeloong = video/video.c;
powerpc_ieee1275 = kern/ieee1275/init.c; powerpc_ieee1275 = kern/ieee1275/init.c;
powerpc_ieee1275 = kern/powerpc/cache.S; powerpc_ieee1275 = kern/powerpc/cache.S;
@ -162,6 +158,20 @@ kernel = {
emu = kern/emu/mm.c; emu = kern/emu/mm.c;
emu = kern/emu/time.c; emu = kern/emu/time.c;
videoinkernel = lib/arg.c;
videoinkernel = term/gfxterm.c;
videoinkernel = commands/extcmd.c;
videoinkernel = font/font.c;
videoinkernel = font/font_cmd.c;
videoinkernel = io/bufio.c;
videoinkernel = video/bitmap.c;
videoinkernel = video/bitmap_scale.c;
videoinkernel = video/fb/fbblit.c;
videoinkernel = video/fb/fbfill.c;
videoinkernel = video/fb/fbutil.c;
videoinkernel = video/fb/video_fb.c;
videoinkernel = video/video.c;
extra_dist = kern/i386/realmode.S; extra_dist = kern/i386/realmode.S;
extra_dist = kern/i386/pc/lzma_decode.S; extra_dist = kern/i386/pc/lzma_decode.S;
extra_dist = kern/mips/cache_flush.S; extra_dist = kern/mips/cache_flush.S;
@ -301,8 +311,7 @@ module = {
noemu = bus/usb/usbtrans.c; noemu = bus/usb/usbtrans.c;
noemu = bus/usb/usbhub.c; noemu = bus/usb/usbhub.c;
enable = emu; enable = emu;
enable = i386; enable = usb;
enable = mips_yeeloong;
emu_condition = COND_GRUB_EMU_USB; emu_condition = COND_GRUB_EMU_USB;
}; };
@ -310,8 +319,7 @@ module = {
name = usbserial_common; name = usbserial_common;
common = bus/usb/serial/common.c; common = bus/usb/serial/common.c;
enable = emu; enable = emu;
enable = i386_pc; enable = usb;
enable = mips_yeeloong;
emu_condition = COND_GRUB_EMU_USB; emu_condition = COND_GRUB_EMU_USB;
}; };
@ -319,8 +327,7 @@ module = {
name = usbserial_pl2303; name = usbserial_pl2303;
common = bus/usb/serial/pl2303.c; common = bus/usb/serial/pl2303.c;
enable = emu; enable = emu;
enable = i386_pc; enable = usb;
enable = mips_yeeloong;
emu_condition = COND_GRUB_EMU_USB; emu_condition = COND_GRUB_EMU_USB;
}; };
@ -328,22 +335,20 @@ module = {
name = usbserial_ftdi; name = usbserial_ftdi;
common = bus/usb/serial/ftdi.c; common = bus/usb/serial/ftdi.c;
enable = emu; enable = emu;
enable = i386_pc; enable = usb;
enable = mips_yeeloong;
emu_condition = COND_GRUB_EMU_USB; emu_condition = COND_GRUB_EMU_USB;
}; };
module = { module = {
name = uhci; name = uhci;
common = bus/usb/uhci.c; common = bus/usb/uhci.c;
enable = i386_pc; enable = x86;
}; };
module = { module = {
name = ohci; name = ohci;
common = bus/usb/ohci.c; common = bus/usb/ohci.c;
enable = i386_pc; enable = pci;
enable = mips_yeeloong;
}; };
module = { module = {
@ -376,9 +381,8 @@ library = {
module = { module = {
name = cmostest; name = cmostest;
i386 = commands/i386/cmostest.c; common = commands/i386/cmostest.c;
enable = i386_pc; enable = cmos;
enable = i386_coreboot;
}; };
module = { module = {
@ -398,7 +402,7 @@ module = {
module = { module = {
name = acpi; name = acpi;
i386 = commands/acpi.c; x86 = commands/acpi.c;
x86_efi = commands/efi/acpi.c; x86_efi = commands/efi/acpi.c;
i386_pc = commands/i386/pc/acpi.c; i386_pc = commands/i386/pc/acpi.c;
i386_coreboot = commands/i386/pc/acpi.c; i386_coreboot = commands/i386/pc/acpi.c;
@ -504,7 +508,7 @@ module = {
name = hdparm; name = hdparm;
common = commands/hdparm.c; common = commands/hdparm.c;
common = lib/hexdump.c; common = lib/hexdump.c;
enable = i386_pc; enable = pci;
}; };
module = { module = {
@ -549,8 +553,7 @@ module = {
name = lspci; name = lspci;
common = commands/lspci.c; common = commands/lspci.c;
enable = x86; enable = pci;
enable = mips;
}; };
module = { module = {
@ -662,8 +665,7 @@ module = {
module = { module = {
name = usbtest; name = usbtest;
common = commands/usbtest.c; common = commands/usbtest.c;
enable = i386_pc; enable = usb;
enable = mips_yeeloong;
enable = emu; enable = emu;
emu_condition = COND_GRUB_EMU_USB; emu_condition = COND_GRUB_EMU_USB;
}; };
@ -738,15 +740,13 @@ module = {
module = { module = {
name = ata; name = ata;
common = disk/ata.c; common = disk/ata.c;
enable = x86; enable = pci;
enable = mips;
}; };
module = { module = {
name = ata_pthru; name = ata_pthru;
common = disk/ata_pthru.c; common = disk/ata_pthru.c;
enable = x86; enable = pci;
enable = mips_yeeloong;
}; };
module = { module = {
@ -758,8 +758,7 @@ module = {
module = { module = {
name = usbms; name = usbms;
common = disk/usbms.c; common = disk/usbms.c;
enable = i386_pc; enable = usb;
enable = mips_yeeloong;
enable = emu; enable = emu;
emu_condition = COND_GRUB_EMU_USB; emu_condition = COND_GRUB_EMU_USB;
}; };
@ -806,10 +805,7 @@ module = {
name = font; name = font;
common = font/font.c; common = font/font.c;
common = font/font_cmd.c; common = font/font_cmd.c;
enable = emu; enable = videomodules;
enable = x86;
enable = sparc64;
enable = powerpc;
}; };
module = { module = {
@ -977,10 +973,7 @@ module = {
module = { module = {
name = bufio; name = bufio;
common = io/bufio.c; common = io/bufio.c;
enable = emu; enable = videomodules;
enable = x86;
enable = sparc64;
enable = powerpc;
}; };
module = { module = {
@ -1023,14 +1016,11 @@ module = {
module = { module = {
name = datetime; name = datetime;
x86_noefi_mips = lib/cmos_datetime.c; cmos = lib/cmos_datetime.c;
x86_efi = lib/efi/datetime.c; x86_efi = lib/efi/datetime.c;
sparc64_ieee1275 = lib/ieee1275/datetime.c; sparc64_ieee1275 = lib/ieee1275/datetime.c;
powerpc_ieee1275 = lib/ieee1275/datetime.c; powerpc_ieee1275 = lib/ieee1275/datetime.c;
enable = x86; enable = noemu;
enable = mips;
enable = sparc64_ieee1275;
enable = powerpc_ieee1275;
}; };
module = { module = {
@ -1129,34 +1119,15 @@ module = {
module = { module = {
name = mmap; name = mmap;
i386_pc = mmap/mmap.c; common = mmap/mmap.c;
i386_pc = mmap/i386/uppermem.c; x86 = mmap/i386/uppermem.c;
i386_pc = mmap/i386/mmap.c; x86 = mmap/i386/mmap.c;
i386_pc = mmap/i386/pc/mmap.c; i386_pc = mmap/i386/pc/mmap.c;
i386_pc = mmap/i386/pc/mmap_helper.S; i386_pc = mmap/i386/pc/mmap_helper.S;
x86_efi = mmap/mmap.c;
x86_efi = mmap/i386/uppermem.c;
x86_efi = mmap/i386/mmap.c;
x86_efi = mmap/efi/mmap.c; x86_efi = mmap/efi/mmap.c;
i386_coreboot = mmap/mmap.c;
i386_coreboot = mmap/i386/uppermem.c;
i386_coreboot = mmap/i386/mmap.c;
i386_multiboot = mmap/mmap.c;
i386_multiboot = mmap/i386/uppermem.c;
i386_multiboot = mmap/i386/mmap.c;
i386_qemu = mmap/mmap.c;
i386_qemu = mmap/i386/uppermem.c;
i386_qemu = mmap/i386/mmap.c;
i386_ieee1275 = mmap/mmap.c;
i386_ieee1275 = mmap/i386/uppermem.c;
i386_ieee1275 = mmap/i386/mmap.c;
mips_yeeloong = mmap/mmap.c;
mips_yeeloong = mmap/mips/yeeloong/uppermem.c; mips_yeeloong = mmap/mips/yeeloong/uppermem.c;
enable = x86; enable = x86;
@ -1256,10 +1227,7 @@ module = {
module = { module = {
name = gfxterm; name = gfxterm;
common = term/gfxterm.c; common = term/gfxterm.c;
enable = emu; enable = videomodules;
enable = x86;
enable = sparc64;
enable = powerpc;
}; };
module = { module = {
@ -1288,8 +1256,7 @@ module = {
module = { module = {
name = usb_keyboard; name = usb_keyboard;
common = term/usb_keyboard.c; common = term/usb_keyboard.c;
enable = i386_pc; enable = usb;
enable = mips_yeeloong;
}; };
module = { module = {
@ -1334,19 +1301,13 @@ module = {
module = { module = {
name = bitmap; name = bitmap;
common = video/bitmap.c; common = video/bitmap.c;
enable = emu; enable = videomodules;
enable = x86;
enable = sparc64;
enable = powerpc;
}; };
module = { module = {
name = bitmap_scale; name = bitmap_scale;
common = video/bitmap_scale.c; common = video/bitmap_scale.c;
enable = emu; enable = videomodules;
enable = x86;
enable = sparc64;
enable = powerpc;
}; };
module = { module = {
@ -1388,19 +1349,13 @@ module = {
common = video/fb/fbblit.c; common = video/fb/fbblit.c;
common = video/fb/fbfill.c; common = video/fb/fbfill.c;
common = video/fb/fbutil.c; common = video/fb/fbutil.c;
enable = emu; enable = videomodules;
enable = x86;
enable = sparc64;
enable = powerpc;
}; };
module = { module = {
name = video; name = video;
common = video/video.c; common = video/video.c;
enable = emu; enable = videomodules;
enable = x86;
enable = sparc64;
enable = powerpc;
}; };
module = { module = {

View file

@ -57,10 +57,10 @@ struct grub_ohci_td
/* next values are not for OHCI HW */ /* next values are not for OHCI HW */
grub_uint32_t prev_td_phys; /* we need it to find previous TD grub_uint32_t prev_td_phys; /* we need it to find previous TD
* physical address in CPU endian */ * physical address in CPU endian */
grub_uint32_t link_td; /* pointer to next free/chained TD volatile struct grub_ohci_td *link_td; /* pointer to next free/chained TD
* pointer as uint32 */ * pointer as uint32 */
grub_uint32_t tr_index; /* index of TD in transfer */ grub_uint32_t tr_index; /* index of TD in transfer */
grub_uint8_t pad[4]; /* padding to 32 bytes */ grub_uint8_t pad[8 - sizeof (volatile struct grub_ohci_td *)]; /* padding to 32 bytes */
} __attribute__((packed)); } __attribute__((packed));
/* OHCI Endpoint Descriptor. */ /* OHCI Endpoint Descriptor. */
@ -334,7 +334,7 @@ grub_ohci_pci_iter (grub_pci_device_t dev,
/* Preset free TDs chain in TDs */ /* Preset free TDs chain in TDs */
grub_memset ((void*)o->td, 0, sizeof(struct grub_ohci_td) * GRUB_OHCI_TDS); grub_memset ((void*)o->td, 0, sizeof(struct grub_ohci_td) * GRUB_OHCI_TDS);
for (j=0; j < (GRUB_OHCI_TDS-1); j++) for (j=0; j < (GRUB_OHCI_TDS-1); j++)
o->td[j].link_td = (grub_uint32_t)&o->td[j+1]; o->td[j].link_td = &o->td[j+1];
grub_dprintf ("ohci", "TDs: chunk=%p, virt=%p, phys=0x%02x\n", grub_dprintf ("ohci", "TDs: chunk=%p, virt=%p, phys=0x%02x\n",
o->td_chunk, o->td, o->td_addr); o->td_chunk, o->td, o->td_addr);
@ -561,7 +561,7 @@ static void
grub_ohci_free_td (struct grub_ohci *o, grub_ohci_td_t td) grub_ohci_free_td (struct grub_ohci *o, grub_ohci_td_t td)
{ {
grub_memset ( (void*)td, 0, sizeof(struct grub_ohci_td) ); grub_memset ( (void*)td, 0, sizeof(struct grub_ohci_td) );
td->link_td = (grub_uint32_t) o->td_free; /* Cahin new free TD & rest */ td->link_td = o->td_free; /* Cahin new free TD & rest */
o->td_free = td; /* Change address of first free TD */ o->td_free = td; /* Change address of first free TD */
} }
@ -604,8 +604,8 @@ grub_ohci_transaction (grub_ohci_td_t td,
grub_uint32_t buffer; grub_uint32_t buffer;
grub_uint32_t buffer_end; grub_uint32_t buffer_end;
grub_dprintf ("ohci", "OHCI transaction td=%p type=%d, toggle=%d, size=%d\n", grub_dprintf ("ohci", "OHCI transaction td=%p type=%d, toggle=%d, size=%lu\n",
td, type, toggle, size); td, type, toggle, (unsigned long) size);
switch (type) switch (type)
{ {
@ -781,7 +781,7 @@ grub_ohci_transfer (grub_usb_controller_t dev,
} }
/* Chain TDs */ /* Chain TDs */
td_current_virt->link_td = (grub_uint32_t) td_next_virt; td_current_virt->link_td = td_next_virt;
td_current_virt->next_td = grub_cpu_to_le32 ( td_current_virt->next_td = grub_cpu_to_le32 (
grub_ohci_td_virt2phys (o, grub_ohci_td_virt2phys (o,
td_next_virt) ); td_next_virt) );

View file

@ -228,7 +228,7 @@ grub_uhci_pci_iter (grub_pci_device_t dev,
/* Link all Transfer Descriptors in a list of available Transfer /* Link all Transfer Descriptors in a list of available Transfer
Descriptors. */ Descriptors. */
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
u->td[i].linkptr = (grub_uint32_t) &u->td[i + 1]; u->td[i].linkptr = (grub_uint32_t) (grub_addr_t) &u->td[i + 1];
u->td[255 - 1].linkptr = 0; u->td[255 - 1].linkptr = 0;
u->tdfree = u->td; u->tdfree = u->td;
@ -238,20 +238,20 @@ grub_uhci_pci_iter (grub_pci_device_t dev,
/* Setup the frame list pointers. Since no isochronous transfers /* Setup the frame list pointers. Since no isochronous transfers
are and will be supported, they all point to the (same!) queue are and will be supported, they all point to the (same!) queue
head. */ head. */
fp = (grub_uint32_t) u->qh & (~15); fp = (grub_uint32_t) (grub_addr_t) u->qh & (~15);
/* Mark this as a queue head. */ /* Mark this as a queue head. */
fp |= 2; fp |= 2;
for (i = 0; i < 1024; i++) for (i = 0; i < 1024; i++)
u->framelist[i] = fp; u->framelist[i] = fp;
/* Program the framelist address into the UHCI controller. */ /* Program the framelist address into the UHCI controller. */
grub_uhci_writereg32 (u, GRUB_UHCI_REG_FLBASEADD, grub_uhci_writereg32 (u, GRUB_UHCI_REG_FLBASEADD,
(grub_uint32_t) u->framelist); (grub_uint32_t) (grub_addr_t) u->framelist);
/* Make the Queue Heads point to each other. */ /* Make the Queue Heads point to each other. */
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
{ {
/* Point to the next QH. */ /* Point to the next QH. */
u->qh[i].linkptr = (grub_uint32_t) (&u->qh[i + 1]) & (~15); u->qh[i].linkptr = (grub_uint32_t) (grub_addr_t) (&u->qh[i + 1]) & (~15);
/* This is a QH. */ /* This is a QH. */
u->qh[i].linkptr |= GRUB_UHCI_LINK_QUEUE_HEAD; u->qh[i].linkptr |= GRUB_UHCI_LINK_QUEUE_HEAD;
@ -319,7 +319,7 @@ grub_alloc_td (struct grub_uhci *u)
return NULL; return NULL;
ret = u->tdfree; ret = u->tdfree;
u->tdfree = (grub_uhci_td_t) u->tdfree->linkptr; u->tdfree = (grub_uhci_td_t) (grub_addr_t) u->tdfree->linkptr;
return ret; return ret;
} }
@ -327,7 +327,7 @@ grub_alloc_td (struct grub_uhci *u)
static void static void
grub_free_td (struct grub_uhci *u, grub_uhci_td_t td) grub_free_td (struct grub_uhci *u, grub_uhci_td_t td)
{ {
td->linkptr = (grub_uint32_t) u->tdfree; td->linkptr = (grub_uint32_t) (grub_addr_t) u->tdfree;
u->tdfree = td; u->tdfree = td;
} }
@ -352,7 +352,7 @@ grub_free_queue (struct grub_uhci *u, grub_uhci_td_t td,
/* Unlink the queue. */ /* Unlink the queue. */
tdprev = td; tdprev = td;
td = (grub_uhci_td_t) td->linkptr2; td = (grub_uhci_td_t) (grub_addr_t) td->linkptr2;
/* Free the TD. */ /* Free the TD. */
grub_free_td (u, tdprev); grub_free_td (u, tdprev);
@ -413,8 +413,8 @@ grub_uhci_transaction (struct grub_uhci *u, unsigned int endp,
} }
grub_dprintf ("uhci", grub_dprintf ("uhci",
"transaction: endp=%d, type=%d, addr=%d, toggle=%d, size=%d data=0x%x td=%p\n", "transaction: endp=%d, type=%d, addr=%d, toggle=%d, size=%lu data=0x%x td=%p\n",
endp, type, addr, toggle, size, data, td); endp, type, addr, toggle, (unsigned long) size, data, td);
/* Don't point to any TD, just terminate. */ /* Don't point to any TD, just terminate. */
td->linkptr = 1; td->linkptr = 1;
@ -484,8 +484,8 @@ grub_uhci_transfer (grub_usb_controller_t dev,
td_first = td; td_first = td;
else else
{ {
td_prev->linkptr2 = (grub_uint32_t) td; td_prev->linkptr2 = (grub_uint32_t) (grub_addr_t) td;
td_prev->linkptr = (grub_uint32_t) td; td_prev->linkptr = (grub_uint32_t) (grub_addr_t) td;
td_prev->linkptr |= 4; td_prev->linkptr |= 4;
} }
td_prev = td; td_prev = td;
@ -497,7 +497,7 @@ grub_uhci_transfer (grub_usb_controller_t dev,
/* Link it into the queue and terminate. Now the transaction can /* Link it into the queue and terminate. Now the transaction can
take place. */ take place. */
qh->elinkptr = (grub_uint32_t) td_first; qh->elinkptr = (grub_uint32_t) (grub_addr_t) td_first;
grub_dprintf ("uhci", "initiate transaction\n"); grub_dprintf ("uhci", "initiate transaction\n");
@ -508,7 +508,7 @@ grub_uhci_transfer (grub_usb_controller_t dev,
{ {
grub_uhci_td_t errtd; grub_uhci_td_t errtd;
errtd = (grub_uhci_td_t) (qh->elinkptr & ~0x0f); errtd = (grub_uhci_td_t) (grub_addr_t) (qh->elinkptr & ~0x0f);
grub_dprintf ("uhci", ">t status=0x%02x data=0x%02x td=%p\n", grub_dprintf ("uhci", ">t status=0x%02x data=0x%02x td=%p\n",
errtd->ctrl_status, errtd->buffer & (~15), errtd); errtd->ctrl_status, errtd->buffer & (~15), errtd);

View file

@ -54,8 +54,8 @@ grub_usb_control_msg (grub_usb_device_t dev,
grub_memcpy ((char *) data, data_in, size); grub_memcpy ((char *) data, data_in, size);
grub_dprintf ("usb", grub_dprintf ("usb",
"control: reqtype=0x%02x req=0x%02x val=0x%02x idx=0x%02x size=%d\n", "control: reqtype=0x%02x req=0x%02x val=0x%02x idx=0x%02x size=%lu\n",
reqtype, request, value, index, size); reqtype, request, value, index, (unsigned long)size);
/* Create a transfer. */ /* Create a transfer. */
transfer = grub_malloc (sizeof (*transfer)); transfer = grub_malloc (sizeof (*transfer));
@ -179,7 +179,8 @@ grub_usb_bulk_readwrite (grub_usb_device_t dev,
struct grub_pci_dma_chunk *data_chunk; struct grub_pci_dma_chunk *data_chunk;
grub_size_t size = size0; grub_size_t size = size0;
grub_dprintf ("usb", "bulk: size=0x%02x type=%d\n", size, type); grub_dprintf ("usb", "bulk: size=0x%02lx type=%d\n", (unsigned long) size,
type);
/* FIXME: avoid allocation any kind of buffer in a first place. */ /* FIXME: avoid allocation any kind of buffer in a first place. */
data_chunk = grub_memalign_dma32 (128, size); data_chunk = grub_memalign_dma32 (128, size);

View file

@ -34,7 +34,7 @@
#include <grub/mm.h> #include <grub/mm.h>
#include <grub/cpu/relocator.h> #include <grub/cpu/relocator.h>
#include <grub/video.h> #include <grub/video.h>
#include <grub/floppy.h> #include <grub/i386/floppy.h>
#define GRUB_LINUX_CL_OFFSET 0x9000 #define GRUB_LINUX_CL_OFFSET 0x9000
#define GRUB_LINUX_CL_END_OFFSET 0x90FF #define GRUB_LINUX_CL_END_OFFSET 0x90FF

View file

@ -123,7 +123,6 @@ static grub_uint64_t
guessfsb (void) guessfsb (void)
{ {
const grub_uint64_t sane_value = 100000000; const grub_uint64_t sane_value = 100000000;
#ifndef GRUB_MACHINE_IEEE1275
grub_uint32_t manufacturer[3], max_cpuid, capabilities, msrlow; grub_uint32_t manufacturer[3], max_cpuid, capabilities, msrlow;
grub_uint64_t start_tsc; grub_uint64_t start_tsc;
grub_uint64_t end_tsc; grub_uint64_t end_tsc;
@ -209,9 +208,6 @@ guessfsb (void)
return grub_divmod64 (2000 * tsc_ticks_per_ms, return grub_divmod64 (2000 * tsc_ticks_per_ms,
((msrlow >> 7) & 0x3e) + ((msrlow >> 14) & 1), 0); ((msrlow >> 7) & 0x3e) + ((msrlow >> 14) & 1), 0);
#else
return sane_value;
#endif
} }
struct property_descriptor struct property_descriptor