Re: Newer development boards

2024-06-15 Thread Andy Ruhl
Thanks all. Lots of talk about Raspberry Pi boards which is not a
surprise. I'll try running it on my Pi5 at some point soon. I have it
running on a Pi zero for some years now.

The PowerPC board for a notebook is interesting, but I'm not much of a
developer. I'm reasonably good at opening bugs though, heh.

I see some rambings here and there about Risc-V, PowerPC, MIPS.

I'll dig through some of the evb* docs to see if I find something
interesting as well.

Andy


Re: Shutdown Issues on NetBSD 10.0/amd64 with USB Boot Device

2024-06-15 Thread John D. Baker
On Sat, 15 Jun 2024 15:20:35 +0200, Matthias Petermann 
wrote:

> [ xxx.xx ] sd0(umass0:0:0:0): generic HBA error
> [ xxx.xx ] sd0d: error writing fsbd 25673345 (sd0 bn 25673345; cn 25469 
> tn 9 sn 26)

and

> [ 2.423838] sd0 at scsibus0 target 0 lun 0:  
> disk removable [ 2.423838] sd0: 29340 MB, 59611 cyl, 16 head, 63 sec, 512 
> bytes/sect x 60088320 sectors

I have seen this same behavior as well, and like you it occurs when
using a SanDisk Cruzer (Glide in my case) as the boot device.  Documented
in this thread:

  https://mail-index.netbsd.org/current-users/2024/03/16/msg045078.html

This is a new issue with NetBSD-10 and -current as NetBSD-9 and earlier
did not have issues with the SanDisk USB devices.

A USB stick by PNY does not exhibit this behavior when used as boot media
and the SanDisk device does not exhibit problems when used as ordinary
storage (i.e. not a boot device).

Did you try USB sticks by other manufacturers or just another SanDisk?

-- 
|/"\ John D. Baker, KN5UKS   NetBSD Darwin/MacOS X
|\ / jdbaker[snail]consolidated[flyspeck]net  OpenBSDFreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645


Re: Shutdown Issues on NetBSD 10.0/amd64 with USB Boot Device

2024-06-15 Thread Martin Husemann
On Sat, Jun 15, 2024 at 04:48:13PM +0200, Matthias Petermann wrote:
> [ 1.343819] uhub5 at usb5: NetBSD (0x) EHCI root hub (0x), class
> 9/0, rev 2.00/1.00, addr 1
[..]
> [ 2.413838] umass0 at uhub5 port 3 configuration 1 interface 0
> [ 2.413838] umass0: SanDisk (0x0781) Cruzer Blade (0x5567), rev
> 2.00/1.00, addr 2
> [ 2.413838] umass0: using SCSI over Bulk-Only
> [ 2.413838] scsibus0 at umass0: 2 targets, 1 lun per target
> [ 2.423838] sd0 at scsibus0 target 0 lun 0:  1.00> disk removable

OK, can you add "options EHCI_DEBUG" to your kernel config, boot a new
kernel and then do something like:

 break into ddb
 db> w ehci_debug=10
 db> c
 and the shutdown 

When you see the HBA error, break into ddb again and

 show kernhist uvmhist

If you can capture console output it is best to set $lines to 0 before doing
that (the history printed will be looongish).

(this is from memory, not sure if the names and syntax are exactly correct)

Martin


Re: Shutdown Issues on NetBSD 10.0/amd64 with USB Boot Device

2024-06-15 Thread Matthias Petermann

Hello Martin,

On 15.06.24 15:59, Martin Husemann wrote:

On Sat, Jun 15, 2024 at 03:20:35PM +0200, Matthias Petermann wrote:

[ xxx.xx ] sd0(umass0:0:0:0): generic HBA error


We need the full dmesg (or at least the relevant parts of the USB host
controller that sd0 is attach to) and you probably need to run with
some debugging enabled (details and switches for that depend on the USB
host controller) to analyze this further.



This is the dmesg from a fresh boot.

Kind regards
Matthias

```
[ 1.00] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 
2003,
[ 1.00] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 
2012, 2013,
[ 1.00] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 
2022, 2023,

[ 1.00] 2024
[ 1.00] The NetBSD Foundation, Inc.  All rights reserved.
[ 1.00] Copyright (c) 1982, 1986, 1989, 1991, 1993
[ 1.00] The Regents of the University of California.  All 
rights reserved.


[ 1.00] NetBSD 10.0_STABLE (GENERIC) #0: Mon May 20 13:37:36 
CEST 2024
[ 1.00] 
mpete...@celsius.lan:/home/mpeterma/Projects/OS/netbsd/obj/sys/arch/amd64/compile/GENERIC

[ 1.00] total memory = 12255 MB
[ 1.00] avail memory = 11831 MB
[ 1.00] timecounter: Timecounters tick every 10.000 msec
[ 1.00] Kernelized RAIDframe activated
[ 1.00] timecounter: Timecounter "i8254" frequency 1193182 Hz 
quality 100

[ 1.04] mainbus0 (root)
[ 1.04] ACPI: RSDP 0x000F8F50 24 (v02 HP)
[ 1.04] ACPI: XSDT 0xDDFA0100 7C (v01 HP 
ProLiant 20131001 HP   0097)
[ 1.04] ACPI: FACP 0xDDFA0290 F4 (v03 HP 
ProLiant 20131001 HP   0097)
[ 1.04] Firmware Warning (ACPI): 32/64X length mismatch in 
FADT/Gpe0Block: 64/32 (20221020/tbfadt-640)
[ 1.04] ACPI: DSDT 0xDDFA0620 006868 (v01 HP 
ProLiant 0006 INTL 20051117)

[ 1.04] ACPI: FACS 0xDDFAE000 40
[ 1.04] ACPI: APIC 0xDDFA0390 72 (v01 HP 
ProLiant 20131001 HP   0097)
[ 1.04] ACPI: MCFG 0xDDFA0410 3C (v01 HP 
ProLiant 20131001 HP   0097)
[ 1.04] ACPI: SPMI 0xDDFA0450 41 (v05 HP 
ProLiant 20131001 HP   0097)
[ 1.04] ACPI: OEMB 0xDDFAE040 72 (v01 HP 
ProLiant 20131001 HP   0097)
[ 1.04] ACPI: HPET 0xDDFAB4E0 38 (v01 HP 
ProLiant 20131001 HP   0097)
[ 1.04] ACPI: EINJ 0xDDFAB520 000130 (v01 AMIER 
AMI_EINJ 20131001 HP   0097)
[ 1.04] ACPI: BERT 0xDDFAB6B0 30 (v01 AMIER 
AMI_BERT 20131001 HP   0097)
[ 1.04] ACPI: ERST 0xDDFAB6E0 0001B0 (v01 AMIER 
AMI_ERST 20131001 HP   0097)
[ 1.04] ACPI: HEST 0xDDFAB890 A8 (v01 AMIER 
ABC_HEST 20131001 HP   0097)
[ 1.04] ACPI: SSDT 0xDDFAB940 00052A (v01 HP 
ProLiant 0001 AMD  0001)

[ 1.04] ACPI: 2 ACPI AML tables successfully acquired and loaded
[ 1.04] ioapic0 at mainbus0 apid 2: pa 0xfec0, version 0x21, 
24 pins

[ 1.04] cpu0 at mainbus0 apid 0
[ 1.04] cpu0: Use mfence to serialize rdtsc
[ 1.04] cpu0: AMD Turion(tm) II Neo N54L Dual-Core Processor, id 
0x100f63

[ 1.04] cpu0: node 0, package 0, core 0, smt 0
[ 1.04] cpu1 at mainbus0 apid 1
[ 1.04] cpu1: AMD Turion(tm) II Neo N54L Dual-Core Processor, id 
0x100f63

[ 1.04] cpu1: node 0, package 0, core 1, smt 0
[ 1.04] acpi0 at mainbus0: Intel ACPICA 20221020
[ 1.04] acpi0: X/RSDT: OemId , AslId 


[ 1.04] ACPI: Dynamic OEM Table Load:
[ 1.04] ACPI: OEMN 0x847E89608008 000624 (v01 AMDNAHP 
 0001 INTL 20051117)
[ 1.04] acpi0: MCFG: segment 0, bus 0-255, address 
0xe000

[ 1.04] acpi0: SCI interrupting at int 9
[ 1.04] acpi0: fixed power button present
[ 1.04] timecounter: Timecounter "ACPI-Safe" frequency 3579545 
Hz quality 900
[ 1.053549] hpet0 at acpi0: high precision event timer (mem 
0xfed0-0xfed00400)
[ 1.053549] timecounter: Timecounter "hpet0" frequency 14318180 Hz 
quality 2000

[ 1.053673] attimer1 at acpi0 (TMR, PNP0100): io 0x40-0x43 irq 0
[ 1.053673] pcppi1 at acpi0 (SPKR, PNP0800): io 0x61
[ 1.053673] spkr0 at pcppi1: PC Speaker
[ 1.053673] wsbell at spkr0 not configured
[ 1.053673] midi0 at pcppi1: PC speaker
[ 1.053673] sysbeep0 at pcppi1
[ 1.053673] RMEM (PNP0C01) at acpi0 not configured
[ 1.053673] acpibut0 at acpi0 (PWRB, PNP0C0C-170): ACPI Power Button
[ 1.053673] ACPI: Enabled 4 GPEs in block 00 to 1F
[ 1.053673] attimer1: attached to pcppi1
[ 1.053673] autoconfiguration error: ipmi0: 
ipmi_map_regs:bus_space_map(..., 0, 2, 0, 0x81d41700) type m 
failed 35

[ 1.053673] pci0 at mainbus0 bus 0: configuration mode 1
[ 1.053673] pci0: i/o space, memory space enabled, rd/line, 

Re: Shutdown Issues on NetBSD 10.0/amd64 with USB Boot Device

2024-06-15 Thread Martin Husemann
On Sat, Jun 15, 2024 at 03:20:35PM +0200, Matthias Petermann wrote:
> [ xxx.xx ] sd0(umass0:0:0:0): generic HBA error

We need the full dmesg (or at least the relevant parts of the USB host
controller that sd0 is attach to) and you probably need to run with 
some debugging enabled (details and switches for that depend on the USB
host controller) to analyze this further.

Martin


Shutdown Issues on NetBSD 10.0/amd64 with USB Boot Device

2024-06-15 Thread Matthias Petermann

Hello,

I am encountering a shutdown issue on a NAS system running NetBSD 
10.0/amd64. This system includes four SATA drives for storage and an 
internal USB port used for booting the OS. Here is a brief overview of 
my setup and the problem:


# System Setup

- Storage: Four SATA drives.
- Boot Device: Internal USB port with a memory stick containing NetBSD 
10.0 boot loader and root filesystem

- Filesystem: FFSv2ea with WAPBL enabled for the root filesystem.

The installation and initial operation work without issues. The system 
boots and functions as expected. However, I encounter a significant 
problem when attempting to shut down or reboot the system.


# Problem Description

When issuing a shutdown or reboot command, the system does not complete 
the process. Even on a vanilla installation (with only the root 
filesystem mounted), the system hangs during shutdown, which is 
particularly problematic for remote operation.


# Details

- The system runs from a memory stick attached as sd0.
- dk1 wedge contains a small swap partition.
- dk0 wedge contains the root filesystem.

When executing the shutdown command:

```
shutdown -p now
```

the system proceeds with the shutdown process but hangs at the final 
stage when the kernel detaches its ressources with the following messages:


```
[ xxx.xx ] dk1: detached
[ xxx.xx ] sd0(umass0:0:0:0): generic HBA error
[ xxx.xx ] sd0d: error writing fsbd 25673345 (sd0 bn 25673345; cn 
25469 tn 9 sn 26)

```

The last line repeats with long delays, and after about an hour, the 
system eventually powers down.


# Troubleshooting Steps Taken

- Tested with different memory sticks to rule out media errors.
- Turned off the swap partition, but the issue persists.

# Observation

The error messages suggest an attempt to write to the filesystem after 
it should have been unmounted. The exact cause of this behavior is unclear.


# Request for Assistance

I am seeking insights or solutions to understand and resolve this issue, 
specifically:


- What might be causing the system to attempt writing to the USB stick 
during the final shutdown phase?


- Are there any known issues with USB boot devices on NetBSD 10.0 that 
could explain this behavior?


- Any suggestions for additional troubleshooting steps or configuration 
adjustments that could help mitigate this problem?


Thank you for your assistance.

Kind regards,
Matthias


Re: Newer development boards

2024-06-15 Thread Adam Russell
If you are interested in helping out a project there is the PowerPC Notebook 
project that seems to have gotten into some jams with uboot. 
https://www.powerpc-notebook.org/en/

I don't think the board they are using is "newer", or exactly what you were 
thinking of, but it'd be great to see NetBSD on one of these things and if 
you're also helping a good project then that's win/win right?

https://www.nxp.com/design/design-center/software/qoriq-developer-resources/qoriq-t2080-development-board:T2080RDB