RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » KISS 68020 w/ PIC & SD Card (hda: lost interrupt)
KISS 68020 w/ PIC & SD Card [message #4587] Mon, 16 April 2018 15:40 Go to next message
e013041 is currently offline  e013041
Messages: 9
Registered: November 2015
Location: Roswell, GA
Junior Member
Have any of you seen this while bringing up the Linux on the KISS 68030?

hda: 15625216 sectors (8000 MB) w/1KiB Cache
unexpected interrupt from 316
, CHS=15501/255/63
hda: cache flushes not supported
unexpected interrupt from 316
unexpected interrupt from 316
unexpected interrupt from 316
hda: lost interrupt
hda: lost interrupt
random: nonblocking pool is initialized
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
hda: lost interrupt
...

I have seen this behavior before with Linux a long time ago, but the fix is currently eluding me. Perhaps one of you might be able to point me in the right direction.
Re: KISS 68020 w/ PIC & SD Card [message #4595 is a reply to message #4587] Tue, 17 April 2018 04:06 Go to previous messageGo to next message
b1ackmai1er is currently offline  b1ackmai1er
Messages: 396
Registered: November 2017
Senior Member
https://www.greenend.org.uk/rjk/tech/lostinterrupt.html

This any help? Port mapping issue?
Re: KISS 68020 w/ PIC & SD Card [message #4599 is a reply to message #4587] Tue, 17 April 2018 14:45 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
Hey, there's an update required to the MF/PIC board in order to get the IDE interrupt routed into the NS32202. It's documented on the MF/PIC page here. Did you make this update?
Re: KISS 68020 w/ PIC & SD Card [message #4600 is a reply to message #4599] Tue, 17 April 2018 15:30 Go to previous messageGo to next message
e013041 is currently offline  e013041
Messages: 9
Registered: November 2015
Location: Roswell, GA
Junior Member
Thank you both! It was accessing the card at IRQ 17. I didn't see the errata at the very bottom of the MFC-PIC page. I will give it a shot this weekend.
Re: KISS 68020 w/ PIC & SD Card [message #4601 is a reply to message #4600] Wed, 18 April 2018 03:05 Go to previous messageGo to next message
will is currently offline  will
Messages: 213
Registered: October 2015
Senior Member
If you look in the patched kernel sources, arch/m68k/include/asm/kiss68030hw.h defines where the kernel expects hardware to be. A lot can be overridden with kernel command line parameters. Note the list of IRQ numbers at the end.

/*
 *  arch/m68k/include/asm/kiss68030hw.h
 *
 *  Copyright (C) 2015 William R Sowerbutts
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file README.legal in the main directory of this archive
 * for more details.
 */

/*
 * Recommended interrupt scheme
 * IRQ   DEVICE
 *  0    UART1
 *  1    4UARTA (future)
 *  2    4UARTB (future)
 *  3    4UARTC (future)
 *  4    4UARTD (future)
 *  5
 *  6
 *  7    IDE1
 *  8
 *  9    IDE0
 * 10    TIMERH      <-- first priority (set in kiss68030_init_IRQ)    
 * 11    TIMERL
 * 12    UART0
 * 13
 * 14    (TIMERL here temporarily for ns32202 debugging)
 * 15
 */

#include <asm/bootinfo-kiss68030.h>

#define KISS68030_ROM_BASE              0xFFF00000 /* 512KB */
#define KISS68030_ECBMEM_BASE           0xFFF80000 /* 256KB */
#define KISS68030_SRAM_BASE             0xFFFE0000 /* 64KB (32KB chip is mapped twice) */
#define KISS68030_IO_BASE               0xFFFF0000 /* 64KB */

#define KISS68030_MFPIC_ADDR            0x40
#define KISS68030_MFPIC_NS32202_OFFSET  0
#define KISS68030_MFPIC_CFGREG_OFFSET   2
#define KISS68030_MFPIC_RTC_OFFSET      3
#define KISS68030_MFPIC_8255_OFFSET     4
#define KISS68030_MFPIC_UART_OFFSET     8

#define KISS68030_MFPIC_BASE            (KISS68030_IO_BASE + KISS68030_MFPIC_ADDR)
#define KISS68030_MFPIC_NS32202         (KISS68030_MFPIC_BASE + KISS68030_MFPIC_NS32202_OFFSET)
#define KISS68030_MFPIC_CFGREG          (KISS68030_MFPIC_BASE + KISS68030_MFPIC_CFGREG_OFFSET)
#define KISS68030_MFPIC_RTC             (KISS68030_MFPIC_BASE + KISS68030_MFPIC_RTC_OFFSET)
#define KISS68030_MFPIC_8255            (KISS68030_MFPIC_BASE + KISS68030_MFPIC_8255_OFFSET)
#define KISS68030_MFPIC_UART            (KISS68030_MFPIC_BASE + KISS68030_MFPIC_UART_OFFSET)

#define PPIDE_LSB                       0 /* 8255 port A */
#define PPIDE_MSB                       1 /* 8255 port B */
#define PPIDE_SIGNALS                   2 /* 8255 port C */
#define PPIDE_CONTROL                   3 /* 8255 command register */

/* mask for bits in KISS68030_MFPIC_RTC register */
#define KISS68030_DS1302_DATA_BIT       1
#define KISS68030_DS1302_WREN_BIT       2
#define KISS68030_DS1302_CLK_BIT        4
#define KISS68030_DS1302_RESET_BIT      8

/* the KISS68030_*_IRQ defines are for the NS32202 IRQ pin numbers
 * add VEC_USER to get the corresponding 68K vector number
 * add IRQ_USER to get the corresponding linux IRQ number */
#define KISS68030_IDE_IRQ               9       /* NOTE! this requires MF/PIC board modification! */
#define KISS68030_TIMERH_IRQ            10      /* configurable 0...15 */
#define KISS68030_TIMERL_IRQ            14      /* configurable 0...15 */
#define KISS68030_UART_IRQ              12      /* assumes MFPIC OPT16/8 bit = 1 */
#define KISS68030_UART_CLK              1843200 /* Hz */
Re: KISS 68020 w/ PIC & SD Card [message #4638 is a reply to message #4587] Sun, 22 April 2018 07:56 Go to previous messageGo to next message
etchedpixels is currently offline  etchedpixels
Messages: 333
Registered: October 2015
Senior Member
You are using the prehistoric and unmaintained IDE driver layer it's only there in Linux today as a fallback and because nobody has had the guts to delete it yet. You want to be using the ATA layer.

The unexpected/lost interrupt messages don't look to me at first glance like an IDE problem but an interrupt setup (routing/edge v leve etc) type problem.

The IDE code appears to be working correctly otherwise. it identified the device, it got the (fake) geometry data, and it found a device that doesn't support cache flush (so is probably old).

Re: KISS 68020 w/ PIC & SD Card [message #4641 is a reply to message #4638] Mon, 23 April 2018 05:38 Go to previous message
e013041 is currently offline  e013041
Messages: 9
Registered: November 2015
Location: Roswell, GA
Junior Member
Woo hoo! I did the MFC-PIC modification as Will specifically stated as required in his "Booting Linux" write up (which really should be on the KISS 68030 page somewhere) and the bottom of the MFC-PIC page and spent most of Sunday afternoon tweaking and compiling the VGA3 test code on my fully functional Linux installation. So... I have now documented the symptom of not doing the MFC fix and trying to boot Wills image. Rolling Eyes
Previous Topic: 8080 emulator for the 68k
Next Topic: Mobile RBC


Current Time: Thu Mar 28 01:45:37 PDT 2024

Total time taken to generate the page: 0.00742 seconds