2009-02-14 Christian Franke <franke@computer.org>

* commands/hdparm.c: New file.  Provides `hdparm' command
	which sends ATA commands via grub_disk_ata_pass_through ().

	* conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.

	* disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
	and <grub/cpu/io.h> to include/grub/ata.h.
	(enum grub_ata_addressing_t): Move to include/grub/ata.h.
	(GRUB_CDROM_SECTOR_SIZE): Remove.
	(GRUB_ATA_*): Move to include/grub/ata.h.
	(GRUB_ATAPI_*): Likewise.
	(enum grub_ata_commands): Likewise.
	(enum grub_ata_timeout_milliseconds): Likewise.
	(struct grub_ata_device): Likewise.
	(grub_ata_regset): Likewise.
	(grub_ata_regget): Likewise.
	(grub_ata_regset2): Likewise.
	(grub_ata_regget2): Likewise.
	(grub_ata_check_ready): Likewise.
	(grub_ata_wait_not_busy): Remove static, exported in
	include/grub/ata.h.
	(grub_ata_wait_drq): Likewise.
	(grub_ata_pio_read): Likewise.

	* disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
	function for hdparm.mod.

	* include/grub/ata.h: New file, contains declarations from
	disk/ata.c.
	(enum grub_ata_commands): Add new commands for commands/hdparm.c.

	* include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
	(grub_disk_ata_pass_through): New exported variable.

	* kern/disk.c (grub_disk_ata_pass_through): New variable.
This commit is contained in:
chrfranke 2009-02-14 12:57:55 +00:00
parent ac84cfb8f6
commit 9ff516f3eb
10 changed files with 904 additions and 138 deletions

View file

@ -49,6 +49,7 @@ commands/crc.c
commands/date.c
commands/echo.c
commands/halt.c
commands/hdparm.c
commands/help.c
commands/hexdump.c
commands/loadenv.c
@ -90,6 +91,7 @@ conf/sparc64-ieee1275.rmk
conf/x86_64-efi.mk
conf/x86_64-efi.rmk
disk/ata.c
disk/ata_pthru.c
disk/dmraid_nvidia.c
disk/fs_uuid.c
disk/host.c
@ -139,6 +141,7 @@ include/multiboot2.h
include/grub/acorn_filecore.h
include/grub/aout.h
include/grub/arg.h
include/grub/ata.h
include/grub/bitmap.h
include/grub/boot.h
include/grub/bufio.h