B2k and CONFIG_PDC_CONSOLE pb: followup
Quoted 3 lines
yup - that's fixed in 2.6 slightly better.
Look forpdc_io_reset_devices()indrivers/parisc/sba_iommu.c. You can backport and test that change to 2.4, I'd be happy to apply it.
Well, here is attached 95% of work (see attached text file PDC_WRK.diff) Please double check (may be still removing temporarely useless EXPORT_SYMBOL and finalyse chg of 'direction' type to an enum?)
But it doesn't help it just move the pb when setup SBA :( [snip]
5. Memory (1) at 0xfed10200 [49], versions 0x
d, 0x0, 0x9
CPU(s): 1 x PA8600 (PCX-W+) at 400.000000 MHz SBA found Astro 2.1 at 0xfed00000
Quoted 2 lines
The problem is if suckyio USB (or any device) is still doing DMA when we reprogram the IOMMU, it will cause an HPMC.
hmm I didn't get any hmpc but it more act as if it was sending something to write to the cdrom (iether the cdrom was connected or not) or trying to reset with wrong info?
Quoted 4 lines
The reason is we are fundementally changing how DMA works (non-coherent to coherent) and PDC doesn't reprogram the suckyIo USB accordingly. C3000 (and related systems) provides a special PDC call to disable USB. "ccio" (eg C200) systems can have the same problem with LAN boot.
Even in 2.6 I got exactly the same pb with this ?*# b2k (and unforunately I have only one b2k to test :(, just in case it was a pb on this machine?)
Quoted 2 lines
Quoted 2 lines
I also try to bypass this memcpy (and restore
pdc_suspend_usb()call) and it boot also well.
The same with patch.
Quoted 1 line
I think you've just prevented either PDC or Linux from using a PDC device.
Ok
Quoted 6 lines
Quoted 2 lines
In sumary, on the b2k, this early
memcpy()seems to break something in the laterpdc_suspend_usb()call.It's the other way around.
pdc_suspend_usb()is breakingPDC_CONSOLE. See email related to linux-2.6 c3000 serial console problems late last year.
Still have to read back again (sorry)
Quoted 3 lines
AFAIK, the memcpy just enables the PDC to use a serial console. But
pdc_suspend_usb()apperently blows away the whole suckyio chip and thus PDC can no longer use suckyio serial either. Hrmm..I t
ought
Quoted 1 line
there was a
IO_RESET_AND_CLEARpdc call in that same chunk of code.
Sorry I didn't find any IO_RESET_AND_CLEAR :(
Even though, I try to call pdc_io_reset(); just before pdc_io_reset_device();. But it doesn't help ;)
Quoted 2 lines
Anyway, Figuring out some additional info could help:
(a) know which devices migh have DMA enabled when the OS gets control
How may do this ?)
Quoted 2 lines
(b) disable just the DMA
(c) detect whenPDC_CONSOLEwants to use a device whose DMA we've disabled
I would also like to be sure that the same info are used (and btw send to pdc) by real32_call_asm and so just put some printk before this call real32_call_asm(); but it seems to create an infinite loop of print. Any idea?
Where should I found more info on all of this 'cmd' send to pdc?
Thanks in advance for additional attention,
Joel
-------------------------------------------------------------------------
Tiscali ADSL: 12 mois à 29,50 €/mois! L'Internet rapide, c'est pour tout le monde.
http://reg.tiscali.be/default.asp?lg=fr
arch/parisc/kernel/entry.S +6 -1
@@ -2227,9 +2227,12 @@ STREG %r28,TASK_PT_GR28-TASK_SZ_ALGN-FRAME_SIZE(%r30) +#ifdef CONFIG_HPUX + /* Save other hpux returns if personality is PER_HPUX */ -#define PER_HPUX 0xe /* <linux/personality.h> cannot be easily included */ +/* <linux/personality.h> cannot be easily included */ +#define PER_HPUX 0xe LDREG TASK_PERSONALITY-TASK_SZ_ALGN-FRAME_SIZE(%r30),%r19 CMPIB<>,n PER_HPUX,%r19,1f
@@ -2237,6 +2240,8 @@ STREG %r29,TASK_PT_GR29-TASK_SZ_ALGN-FRAME_SIZE(%r30) 1: +#endif /* CONFIG_HPUX */ + /* Seems to me that dp could be wrong here, if the syscall involved * calling a module, and nothing got round to restoring dp on return. */
arch/parisc/kernel/firmware.c +140 -66
357 lines not on this page · raw message
arch/parisc/kernel/inventory.c +1 -9
@@ -167,9 +167,6 @@static int __init pat_query_module (ulong pcell_loc,ulong mod_index) { -#ifdef DEBUG_PAT -pdc_pat_cell_mod_maddr_block_t io_pdc_cell; -#endif pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;unsigned long bytecnt;unsigned long temp;/* 64-bit scratch value */
@@ -209,6 +206,7 @@register_parisc_device (dev);/* advertise device */ #ifdef DEBUG_PAT +pdc_pat_cell_mod_maddr_block_t io_pdc_cell;/* dump what we see so far... */ switch (PAT_GET_ENTITY (dev->mod_info)) {unsigned long i;
@@ -527,12 +525,6 @@int i;long status =PDC_OK ; -/* -* first stop the usb controller, otherwise the machine -* might crash during iommu setup -*/ -pdc_suspend_usb (); -for (i =0 ; status !=PDC_BAD_PROC && status !=PDC_NE_MOD ; i++) {struct parisc_device *dev;struct pdc_system_map_mod_info module_result;
arch/parisc/kernel/pdc_cons.c +14 -12
@@ -41,8 +41,10 @@/* Define EARLY_BOOTUP_DEBUG to debug kernel related boot problems. * On production kernels EARLY_BOOTUP_DEBUG should be undefined. */ +/* #undef EARLY_BOOTUP_DEBUG - +*/ +#define EARLY_BOOTUP_DEBUG #include <linux/config.h> #include <linux/kernel.h>
@@ -82,7 +84,7 @@#if defined(CONFIG_PDC_CONSOLE ) || defined(CONFIG_SERIAL_MUX )#define PDC_CONSOLE_DEVICE pdc_console_device -static kdev_t pdc_console_device (struct console *c) +static kdev_t pdc_console_device (struct console *c) {return MKDEV (MUX_MAJOR ,0 ); }
@@ -91,18 +93,18 @@#endif static struct console pdc_cons = { - name: "ttyB", - write: pdc_console_write, + .name = "ttyB", + .write = pdc_console_write,#warning UPSTREAM 2.4.19 removed the next 4 lines but we did not - read: NULL, - device: PDC_CONSOLE_DEVICE, - unblank: NULL, - setup: pdc_console_setup, - flags: CON_BOOT|CON_PRINTBUFFER|CON_ENABLED, - index: -1, + .read = NULL, + .device = PDC_CONSOLE_DEVICE, + .unblank = NULL, + .setup = pdc_console_setup, + .flags = CON_BOOT|CON_PRINTBUFFER|CON_ENABLED, + .index = -1, }; -static int pdc_console_initialized; +static int pdc_console_initialized =0 ;extern unsigned long con_start;/* kernel/printk.c */ extern unsigned long log_end;/* kernel/printk.c */
@@ -164,7 +166,7 @@return ;while ((console = console_drivers) !=NULL ) -unregister_console (console_drivers); +unregister_console (console);/* Don't repeat what we've already printed */ con_start = log_end;
arch/parisc/kernel/real2.S +1 -1
@@ -13,7 +13,7 @@ .section .bss .export real_stack32 #ifdef __LP64__ - .export real_stack64 + .export real_stack64 #endif .align 64 real_stack32:
arch/parisc/kernel/sba_iommu.c +49 -27
160 lines not on this page · raw message
include/asm-parisc/pdc.h +9 -5
@@ -191,8 +191,8 @@#define PDC_IO 135/* log error info, reset IO system */ #define PDC_IO_READ_AND_CLEAR_ERRORS 0 -#define PDC_IO_READ_AND_LOG_ERRORS 1 -#define PDC_IO_SUSPEND_USB 2 +#define PDC_IO_RESET 1 +#define PDC_IO_RESET_DEVICES 2/* sets bits 6&7 (little endian) of the HcControl Register */ #define PDC_IO_USB_SUSPEND 0xC000000000000000#define PDC_IO_EEPROM_IO_ERR_TABLE_FULL -5/* return value */
@@ -476,7 +476,11 @@#define PDC_TYPE_SYSTEM_MAP 1/* 32-bit, but supports PDC_SYSTEM_MAP */ #define PDC_TYPE_SNAKE 2/* Doesn't support SYSTEM_MAP */ -#define is_pdc_pat () (pdc_type == PDC_TYPE_PAT) +#ifdef CONFIG_PARISC64 +#define is_pdc_pat () (PDC_TYPE_PAT == pdc_type) +#else +#define is_pdc_pat () (0) +#endif struct pdc_chassis_info {/* for PDC_CHASSIS_INFO */ unsigned long actcnt;/* actual number of bytes returned */
@@ -951,7 +955,8 @@int pdc_do_reset (void );int pdc_soft_power_info (unsigned long *power_reg);int pdc_soft_power_button (int sw_control); -void pdc_suspend_usb (void ); +void pdc_io_reset (void ); +void pdc_io_reset_devices (void );int pdc_iodc_getc (void );void pdc_iodc_putc (unsigned char c);void pdc_iodc_outc (unsigned char c);
@@ -963,7 +968,6 @@#ifdef __LP64__int pdc_pat_chassis_send_log (unsigned long status,unsigned long data); -int pdc_pat_cell_get_number (struct pdc_pat_cell_num *cell_info);int pdc_pat_cell_module (unsigned long *actcnt,unsigned long ploc,unsigned long mod,unsigned long view_type,void *mem_addr);