RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » kiss68030 linux kernel 6.6 and libpata driver
kiss68030 linux kernel 6.6 and libpata driver [message #10519] Wed, 29 November 2023 11:55 Go to next message
hds1 is currently offline  hds1
Messages: 6
Registered: January 2023
Location: Germany
Junior Member
Hello Community,

i have written a libata driver for linux kernel 6.6 for the kiss68030 (thanks a ton for Johns and Wills work here).
The booting is slower than Wills 4.5 kernel version so. Probably i miss something really important in my driver code.
But after 14 days staring at my code i dont see the trees for the woods anymore.

I havent done installing the debian 12 release, but this is due for the next days.

The libata driver is considered alpha status.

So pls let me know if there is interest in it and i will flood the stuff to github or sum such.

Below find the boot messages with the 6.6 kernel and Wills linux distro.
Booting is approx 7 minutes. Room for improvements ....

Best
Heiko



Welcome to the KISS-68030 System

KISS-BIOS built 22:25:42 on Apr 20 2016
Copyright (C) 2011-2015 John R. Coffman <johninsd@gmail.com>
Copyright (C) 2015-2016 William R. Sowerbutts <will@sowerbutts.com>
Distributed for hobbyist use on the KISS-68030 CPU board.

RAM: 64 MB (0x4000000)
C: TS16GCF133
Boot at 20:38:31 on 2023-11-29 2460278J 1409156T

Press:
[S] for BIOS Setup
[X] to skip startup script ("0:/boot.cmd")

0:/vmlinux: 7027360 bytes, ELF.
Loading 5482976 bytes from file offset 0x1000 to memory at 0x1000
Loading 117220 bytes from file offset 0x53C000 to memory at 0x55C000
Linux kernel detected: creating bootinfo at 0x579000
Entry at 0x2000 in supervisor mode

ABCkGHIJK
[ 0.000000] Linux version 6.6.0-kiss68030 (schroete@kahlo2) (m68k-linux-gcc (GCC) 13.2.0, GNU ld (GNU Binutils) 2.41) 3
[ 0.000000] Saving 114 bytes of bootinfo
[ 0.000000] printk: bootconsole [kissPrintk0] enabled
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x0000003fffffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Kernel command line: console=ttyS0,115200n8r root=/dev/sda2 mfpic=0x40,9,0,1843200
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[ 0.000000] Memory: 59260K/65536K available (3876K kernel code, 441K rwdata, 1152K rodata, 116K init, 127K bss, 6276K Wink
[ 0.000000] SLUB: HWalign=16, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 24
[ 0.000000] ns32202 at 0xffff0040
[ 0.010000] Console: colour dummy device 80x25
[ 0.020000] Calibrating delay loop... 5.88 BogoMIPS (lpj=29440)
[ 0.150000] pid_max: default: 32768 minimum: 301
[ 0.170000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.180000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.280000] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[ 0.330000] devtmpfs: initialized
[ 0.400000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.420000] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.570000] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.590000] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[ 0.600000] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 0.630000] MF/PIC at I/O address 0x40, IDE ECB IRQ 17, UART ECB IRQ 12, UART clock 1843200 Hz
[ 0.820000] SCSI subsystem initialized
[ 0.850000] pps_core: LinuxPPS API ver. 1 registered
[ 0.860000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.870000] PTP clock support registered
[ 1.970000] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 48.140000] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 48.160000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 50.120000] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 50.370000] printk: console [ttyS0] disabled
�[ 50.400000] serial8250.0: ttyS0 at MMIO 0xffff0048 (irq = 20, base_baud = 115200) is a TI16750
[ 50.410000] printk: console [ttyS0] enabled
[ 50.410000] printk: console [ttyS0] enabled
[ 50.420000] printk: bootconsole [kissPrintk0] disabled
[ 50.420000] printk: bootconsole [kissPrintk0] disabled
[ 50.460000] serial8250 serial8250.0: unable to register port at index 1 (IO0 MEM1cef0000 IRQ485425266): -22
[ 50.570000] serial8250 serial8250.0: unable to register port at index 4 (IO535720 MEM0 IRQ0): -22
[ 50.630000] serial8250 serial8250.0: unable to register port at index 6 (IO8194e0 MEM0 IRQ0): -22
[ 50.940000] brd: module loaded
[ 50.950000] st: Version 20160209, fixed bufsize 32768, s/g segs 256
[ 50.980000] SCSI Media Changer driver v0.25
[ 51.050000] scsi host0: kiss68030_pata_driver
[ 51.080000] ata1: PATA max PIO4 irq 17
[ 51.090000] PPP generic driver version 2.4.2
[ 52.840000] ata1.00: LPM support broken, forcing max_power
[ 52.850000] ata1.00: CFA: TS16GCF133, 20170420, max UDMA/100
[ 52.860000] ata1.00: 31293360 sectors, multi 0: LBA48
[ 52.890000] ata1.00: LPM support broken, forcing max_power
[ 52.920000] scsi 0:0:0:0: Direct-Access ATA TS16GCF133 0420 PQ: 0 ANSI: 5
[ 53.040000] sd 0:0:0:0: [sda] 31293360 512-byte logical blocks: (16.0 GB/14.9 GiB)
[ 53.060000] sd 0:0:0:0: [sda] Write Protect is off
[ 53.070000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 53.090000] sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[ 53.200000] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 53.400000] sda: sda1 sda2 sda3
[ 53.590000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 78.120000] EXT4-fs (sda2): mounted filesystem 70032f90-236c-4cea-ab62-a7ee0af04a13 ro with writeback data mode. Quota.
[ 78.130000] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
[ 80.580000] devtmpfs: mounted
[ 80.580000] Freeing unused kernel image (initmem) memory: 116K
[ 80.590000] This architecture does not have kernel memory protection.
[ 80.600000] Run /sbin/init as init process
[ 94.910000] random: crng init done
Mount failed for selinuxfs on /sys/fs/selinux: No such file or directory
INIT: version 2.88 booting
Booting KISS-68030 Linux on darkstar
Setting hostname
Activating swap
[ 203.250000] Adding 1048572k swap on /dev/sda3. Priority:-2 extents:1 across:1048572k
Mounting /proc
Checking filesystems
e2fsck 1.43-WIP (15-Mar-2016)
/dev/sda2: clean, 89387/393216 files, 473825/1572864 blocks
Remounting root filesystem read-write
[ 222.350000] EXT4-fs (sda2): re-mounted 70032f90-236c-4cea-ab62-a7ee0af04a13 r/w. Quota mode: disabled.
Mounting /run
Mounting /sys
Mounting /tmp
Setting kernel variables
sysctl: cannot stat /proc/sys/net/ipv4/tcp_congestion_control: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_rmem: No such file or directory
sysctl: cannot stat /proc/sys/net/ipv4/tcp_wmem: No such file or directory
Mounting /dev
Mounting other filesystems
[ 267.400000] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Configure interface lo
Cannot find device "lo"
Cannot find device "lo"
Configure interface ppp0
Couldn't create IP socket: Address family not supported by protocol(97)
Starting daemons: cron syslogd inetd sshd ntpd
INIT: Entering runlevel: 2
/usr/sbin/syslogd: timed out waiting for child


Debian GNU/Linux stretch/sid
host: darkstar (Linux m68k 6.6.0-kiss68030)
port: ttyS0 (115200 baud)
darkstar login: root
Password:
Last login: Thu Jan 1 01:07:43 BST 1970 on ttyS0
Linux darkstar 6.6.0-kiss68030 #526 Wed Nov 29 20:25:23 CET 2023 m68k
root@darkstar:~#
CTRL-B Z for help | 115200 8N1 | NOR | Minicom 2.8 | VT102 | Online 0:9 | ttyUSB0
Re: kiss68030 linux kernel 6.6 and libpata driver [message #10521 is a reply to message #10519] Thu, 30 November 2023 18:45 Go to previous messageGo to next message
vk5hbl is currently offline  vk5hbl
Messages: 6
Registered: May 2020
Junior Member
Great work.
I am just starting to collect the parts to build one so would be interested in the files

cheers
Darren
Re: kiss68030 linux kernel 6.6 and libpata driver [message #10522 is a reply to message #10521] Fri, 01 December 2023 00:21 Go to previous messageGo to next message
hds1 is currently offline  hds1
Messages: 6
Registered: January 2023
Location: Germany
Junior Member
Hi,

just contacted Will and he has written a pata driver as well as the rtc and uart drivers.
He says that pata performance is comaparable to the ide driver.

So retrobrew may have 2 sources to choose from ...

Heiko
Re: kiss68030 linux kernel 6.6 and libpata driver [message #10540 is a reply to message #10522] Fri, 08 December 2023 04:54 Go to previous messageGo to next message
hds1 is currently offline  hds1
Messages: 6
Registered: January 2023
Location: Germany
Junior Member
Hi,

i've build a debian trixie version with kernel 6.6 for the kiss68030 board.
https://github.com/hds1/kiss-68030
Kernel sources are there as well.

The install process is merely dd'ing the images to a CF card.
Login pswd remains the same as with Wills Linux version.
Pls let me know if anything goes wrong with using this debian version.

Heiko
Re: kiss68030 linux kernel 6.6 and libpata driver [message #10588 is a reply to message #10540] Mon, 05 February 2024 02:55 Go to previous messageGo to next message
denis2342 is currently offline  denis2342
Messages: 23
Registered: February 2017
Junior Member
Hi

I can report that all works fine with the 6.6 kernel image. I had a hard time to get it useful for me because it had nothing installed to move files. No sz/rz, no pppd, no telnetd, no sshd. But in the end I got it working and it now can pull the newest SID files from the Debian package system while I'm connected with ssh 9.5 to it.

[Updated on: Mon, 05 February 2024 03:13]

Report message to a moderator

Re: kiss68030 linux kernel 6.6 and libpata driver [message #10612 is a reply to message #10588] Mon, 12 February 2024 14:45 Go to previous messageGo to next message
denis2342 is currently offline  denis2342
Messages: 23
Registered: February 2017
Junior Member
Hi hds1

I downloaded the 6.6 Kernel Code and build it myself. All works fine but there are strange messages and sometimes kernel panics like one appended at the end of this mail.

The following fixes this:

--- config.c.orig 2024-02-11 23:42:25.854176888 +0100
+++ config.c 2024-02-11 22:58:52.513181081 +0100
@@ -176,7 +176,7 @@
return;
}

- plat_data = kzalloc(sizeof(struct plat_serial8250_port), GFP_KERNEL);
+ plat_data = kzalloc(2 * sizeof(struct plat_serial8250_port), GFP_KERNEL);
uart_dev = kzalloc(sizeof(struct platform_device), GFP_KERNEL);

if(!plat_data || !uart_dev){

Short summary: the kernel iterates trough an array of structs to register the ports
and stops searching for ports when it hits an empty struct.
So simply adding an empty struct behind the correct first one fixes the problem.

denis

Kernel Panic here:

printk: console [ttyS0] disabled
serial8250 serial8250.0: detected caps 00000700 should be 00000500
serial8250.0: ttyS0 at MMIO 0xffff0048 (irq = 20, base_baud = 115200) is a 16C950/954
printk: console [ttyS0] enabled
printk: console [ttyS0] enabled
printk: bootconsole [kissPrintk0] disabled
printk: bootconsole [kissPrintk0] disabled
serial8250 serial8250.0: unable to register port at index 1 (IO0 MEM7bc50000 IRQ2076508653): -22
serial8250 serial8250.0: unable to register port at index 4 (IO56eaf8 MEM0 IRQ0): -22
serial8250 serial8250.0: unable to register port at index 6 (IO0 MEM0 IRQ0): -22
serial8250 serial8250.0: unable to register port at index 7 (IO0 MEM0 IRQ0): -22
serial8250 serial8250.0: unable to register port at index 8 (IO0 MEM0 IRQ0): -22
serial8250 serial8250.0: unable to register port at index 9 (IO0 MEM0 IRQ0): -22
Data read fault at 0x8047eb48 in Super Data (pc=0x2af32c)
BAD KERNEL BUSERR
Oops: 00000000
PC: [<002af32c>] serial8250_set_defaults+0x2c/0x158
SR: 2013 SP: (ptrval) a2: 00c34000
d0: bfffffff d1: 7fffffee d2: 08000000 d3: 00000000
d4: 08000000 d5: 00593b60 a0: 00593d50 a1: 00c27d40
Process swapper (pid: 1, task=(ptrval)Wink
Frame format=B ssw=076d isc=0281 isb=0000 daddr=8047eb48 dobuf=00000000
baddr=002af336 dibuf=00000000 ver=f
Stack from 00c27bdc:
00000000 002acae0 00593d50 00000000 00000000 00000008 00000080 00c1a390
00c5780a 002ac8de 0045c4c8 002acef6 00c27c30 00000000 00000000 005948f0
00000000 00000000 00c5780a 0056ed50 0056ed50 00000000 01000000 00000000
00010000 6d000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00047000 94042080 00006020 00000000 00ffff00 00000000
Call Trace: [<002acae0>] serial8250_register_8250_port+0x202/0x3f0
[<002ac8de>] serial8250_register_8250_port+0x0/0x3f0
Re: kiss68030 linux kernel 6.6 and libpata driver [message #10625 is a reply to message #10612] Mon, 26 February 2024 22:32 Go to previous message
hds1 is currently offline  hds1
Messages: 6
Registered: January 2023
Location: Germany
Junior Member
Hello Darren,

thanks for the feedback.
I do see/saw these messages but they never kernel paniced on my system.
So i didn't pay much attention to it.


Heiko
Previous Topic: Barebone Z80/6502, Two+ processors in one pc board
Next Topic: kiss68030 cp/m issues


Current Time: Sat Feb 08 20:52:38 PST 2025

Total time taken to generate the page: 0.00760 seconds