Re: Old PowerMac G5 2-socket/2-cores-each: head -r368820 kernel reports: bus_dmamem_alloc failed to align memory properly

Mark Millard via freebsd-ppc <[email protected]>
Newsgroups gmane.os.freebsd.devel.ppc
Message-ID <[email protected]>

On 2020-Dec-23, at 12:32, Mark Millard <marklmi at yahoo.com> wrote:



> On 2020-Dec-22, at 01:09, Mark Millard <marklmi at yahoo.com> wrote:
> 
>> On 2020-Dec-21, at 21:11, Brandon Bergren <bdragon at FreeBSD.org> wrote:
>> 
>>> On Mon, Dec 21, 2020, at 10:25 PM, Dennis Clarke via freebsd-ppc wrote:
>>>> On 12/21/20 11:03 PM, Mark Millard wrote:
>>>> 
>>>>> As far as I know, 32-bit powerpc for old PowerMacs still has the kernel
>>>>> gradually zeroing out user-space pages, even for single-socket/single-core
>>>>> 32-bit PowerMacs. So I run 32-bit via a chroot on a 64-bit system: the
>>>>> 64-bit kernel does not have this specific problem. (I seem to remember
>>>>> that there was a different boot failure last I tried 32-bit, but I do not
>>>>> remember any detail at this time.)
>>> 
>>> This is the bridge mode bug that we haven't figured out yet. It's specific to the G5 running a 32 bit kernel. The problem doesn't manifest on actual 32-bit MMUs.
>> 
>> . . .
>> 
>> For the "seem to remember" part of my text . . .
>> 
>> Wrong problem and wrong machine context, I'm afraid. Back on
>> Sept-22 I reported for the 2-socket G4s (typos preserved):
>> 
>> Subject: head -r365932 for 320bit powerpc unable to boot 2-socket PowerMac G4
>> 
>> QUOTE
>> I attempted to boot an update from head -r365590
>> to head -r365932 and it dies just after:
>> 
>> Kernel entry at 0x100620
>> 
>> via:
>> 
>> Invalid memory access at %SRR0: 0000ffff %SRR1: 00ffffff
>> END QUOTE
>> 
>> (I did report at the time that the G5 gets much further along
>> than the above when that same media (and content) is used to
>> try to boot the G5. But the report was about the G4 context.)
> 
> Head -r368820 booted the 2-socket PowerMac G4.
> 
> But USB is somehow messed up, resulting in no keyboard input.
> Eventually lots of: "bus_dmamem_alloc failed to align memory
> properly" tied to attempted usb activity that fails. (This
> was not a boot -v .)
> 
> 
> Dec 23 12:13:21 FBSDG4S2 kernel: usbus0 numa-domain 0 on ohci0
> Dec 23 12:13:21 FBSDG4S2 kernel: ohci1: <NEC uPD 9210 USB controller> mem 0x80081000-0x80081fff irq 63 at device 27.1 numa-domain 0 on pci1
> . . .
> Dec 23 12:13:21 FBSDG4S2 kernel: usbus0: 12Mbps Full Speed USB v1.0
> Dec 23 12:13:21 FBSDG4S2 kernel: usbus1: 12Mbps Full Speed USB v1.0
> Dec 23 12:13:21 FBSDG4S2 kernel: ugen0.1: <NEC OHCI root HUB> at usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub0 numa-domain 0 on usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub0: <NEC OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
> . . .
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 1 times
> Dec 23 12:13:21 FBSDG4S2 kernel: ugen0.2: <Mitsumi Electric Hub in Apple Extended USB Keyboard> at usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub4 numa-domain 0 on uhub0
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub4: <Mitsumi Electric Hub in Apple Extended USB Keyboard, class 9/0, rev 1.10/1.22, addr 2> on usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> . . .
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: CAM usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub_attach: port 1 power on or off failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub_attach: port 2 power on or off failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub_attach: port 3 power on or off failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub4: 3 ports with 2 removable, bus powered
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: CAM usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 1 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: CAM usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: usb_alloc_device: set address 3 failed (USB_ERR_TIMEOUT, ignored)
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: CAM usbus0
> . . .
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 3 times
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 5 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 3 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 5 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 3 times
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 5 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 3 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> . . .
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_TIMEOUT, ignored)
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 5 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: bus_dmamem_alloc failed to align memory properly.
> Dec 23 12:13:21 FBSDG4S2 kernel: Root mount waiting for: usbus0
> Dec 23 12:13:21 FBSDG4S2 syslogd: last message repeated 4 times
> Dec 23 12:13:21 FBSDG4S2 kernel: usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_TIMEOUT
> Dec 23 12:13:21 FBSDG4S2 kernel: ugen0.3: <Unknown > at usbus0 (disconnected)
> Dec 23 12:13:21 FBSDG4S2 kernel: uhub_reattach_port: could not allocate new device
> Dec 23 12:13:21 FBSDG4S2 kernel: usb_dev_suspend_peer: Setting device remote wakeup failed
> Dec 23 12:13:21 FBSDG4S2 kernel: lo0: link state changed to UP
> Dec 23 12:13:21 FBSDG4S2 kernel: gem0: link state changed to DOWN
> Dec 23 12:13:21 FBSDG4S2 kernel: gem0: link state changed to UP
> Dec 23 12:13:21 FBSDG4S2 kernel: usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_TIMEOUT
> . . .
> Dec 23 12:13:22 FBSDG4S2 ntpd[971]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): will expire in less than 5 days
> Dec 23 12:14:41 FBSDG4S2 kernel: usb_dev_suspend_peer: Setting device remote wakeup failed
> Dec 23 12:14:49 FBSDG4S2 kernel: usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_TIMEOUT
> Dec 23 12:15:25 FBSDG4S2 kernel: usb_dev_suspend_peer: Setting device remote wakeup failed
> Dec 23 12:15:33 FBSDG4S2 kernel: usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_TIMEOUT
> Dec 23 12:15:59 FBSDG4S2 su[1072]: markmi to root on /dev/pts/0
> Dec 23 12:16:09 FBSDG4S2 kernel: usb_dev_suspend_peer: Setting device remote wakeup failed
> Dec 23 12:16:17 FBSDG4S2 kernel: usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_TIMEOUT
> Dec 23 12:16:53 FBSDG4S2 kernel: usb_dev_suspend_peer: Setting device remote wakeup failed
> Dec 23 12:17:01 FBSDG4S2 kernel: usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_TIMEOUT
> Dec 23 12:17:38 FBSDG4S2 kernel: usb_dev_suspend_peer: Setting device remote wakeup failed
> Dec 23 12:17:46 FBSDG4S2 kernel: usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_TIMEOUT
> Dec 23 12:18:22 FBSDG4S2 kernel: usb_dev_suspend_peer: Setting device remote wakeup failed
> Dec 23 12:18:30 FBSDG4S2 kernel: usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_TIMEOUT
> Dec 23 12:19:06 FBSDG4S2 kernel: usb_dev_suspend_peer: Setting device remote wakeup failed
> Dec 23 12:19:14 FBSDG4S2 kernel: usb_dev_resume_peer: Clearing device remote wakeup failed: USB_ERR_TIMEOUT
> . . .
> 

I modified the kernel to report the 2 operands of the & operation in:

        } else if (vtophys(*vaddr) & (dmat->alignment - 1)) {
                printf("bus_dmamem_alloc failed to align memory properly.\n");

The context reported on below is the G4 booting and operating, a context
that ends up with no USB keyboard input:

# grep vtophys /var/log/messages
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bdaa80 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bdaa80 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda780 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff
Dec 23 21:47:34 FBSDG4S2 kernel: vtophys(*vaddr)==0x1bda480 and dmat->alignment-1==0xff



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.