[OpenBIOS] [commit] r1353 - in trunk/openbios-devel: arch/ppc/qemu drivers include/drivers
repository service
svn at openbios.org
Fri Oct 23 14:58:23 CEST 2015
Author: mcayland
Date: Fri Oct 23 14:58:22 2015
New Revision: 1353
URL: http://tracker.coreboot.org/trac/openbios/changeset/1353
Log:
ppc: add ob_ide_quiesce() and call it from the PPC CIF quiesce word
Add a new ob_ide_quiesce() function and hook it into QEMU PPC's ciface_quiesce()
routine to properly prepare the drives for transferring control to the operating
system.
Without this OS 9 becomes confused about the initial drive state on boot and
refuses to correctly detect and initialise it.
Based upon an original patch by Cormac O'Brien <cormac at c-obrien.org>.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
Modified:
trunk/openbios-devel/arch/ppc/qemu/methods.c
trunk/openbios-devel/drivers/ide.c
trunk/openbios-devel/include/drivers/drivers.h
Modified: trunk/openbios-devel/arch/ppc/qemu/methods.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/methods.c Fri Oct 23 14:58:20 2015 (r1352)
+++ trunk/openbios-devel/arch/ppc/qemu/methods.c Fri Oct 23 14:58:22 2015 (r1353)
@@ -114,6 +114,8 @@
ciface_quiesce( unsigned long args[], unsigned long ret[] )
{
usb_exit();
+
+ ob_ide_quiesce();
#if 0
unsigned long msr;
/* This seems to be the correct thing to do - but I'm not sure */
Modified: trunk/openbios-devel/drivers/ide.c
==============================================================================
--- trunk/openbios-devel/drivers/ide.c Fri Oct 23 14:58:20 2015 (r1352)
+++ trunk/openbios-devel/drivers/ide.c Fri Oct 23 14:58:22 2015 (r1353)
@@ -1488,6 +1488,28 @@
return 0;
}
+void ob_ide_quiesce(void)
+{
+ struct ide_channel *channel;
+ int i;
+
+ channel = channels;
+ while (channel) {
+ for (i = 0; i < 2; i++) {
+ struct ide_drive *drive = &channel->drives[i];
+
+ if (!drive->present)
+ continue;
+
+ ob_ide_select_drive(drive);
+ ob_ide_software_reset(drive);
+ ob_ide_device_type_check(drive);
+ }
+
+ channel = channel->next;
+ }
+}
+
#if defined(CONFIG_DRIVER_MACIO)
static unsigned char
macio_ide_inb(struct ide_channel *chan, unsigned int port)
Modified: trunk/openbios-devel/include/drivers/drivers.h
==============================================================================
--- trunk/openbios-devel/include/drivers/drivers.h Fri Oct 23 14:58:20 2015 (r1352)
+++ trunk/openbios-devel/include/drivers/drivers.h Fri Oct 23 14:58:22 2015 (r1353)
@@ -52,6 +52,7 @@
/* drivers/ide.c */
int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
uint32_t io_port1, uint32_t ctl_port1);
+void ob_ide_quiesce(void);
int macio_ide_init(const char *path, uint32_t addr, int nb_channels);
#endif
#ifdef CONFIG_DRIVER_ESP
More information about the OpenBIOS
mailing list