Home | History | Annotate | Download | only in wii
History log of /src/sys/arch/evbppc/wii/machdep.c
RevisionDateAuthorComments
 1.10  02-Sep-2025  jmcneill wii: Allow the RESET button to reboot system when halted.
 1.9  13-Feb-2025  jmcneill wii: Early init for DVD support
 1.8  19-Oct-2024  jmcneill Improve delay() accuracy on Nintendo Wii.

The PowerPC delay() implementation converts the timebase frequency to
a number of nanoseconds per tick and uses that value to compute the
delay interval. On the Wii's Broadway processor with a timebase
frequency of 60.75 MHz, some precision is lost as each tick is
approximately 16.46 nanoseconds. The end result is that we sleep for
approximately 2.875% longer than necessary. This also has an impact
on CPU speed calculation on Broadway, which incorrectly reports itself
as 750MHz instead of 729MHz (2.875% faster).

Fix this by introducing an (optional) ticks_per_msec variable that can
be set by the platform and allows delay() to improve the accuracy of
longer delays.

Measured CPU frequency before this change:
[ 1.000000] cpu0: 750.00 MHz, 256KB WB with ECC L2 cache

Measured CPU frequency after this change:
[ 1.000000] cpu0: 729.00 MHz, 256KB WB with ECC L2 cache
 1.7  13-Oct-2024  jmcneill wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.
 1.6  05-Mar-2024  thorpej branches: 1.6.2;
Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.5  10-Feb-2024  jmcneill wii: Simplify available memory logic.

Use usable MEM2 fields in Broadway / IOS Global memory locations to
determine available memory.
 1.4  24-Jan-2024  jmcneill branches: 1.4.2;
wii: Add support for passing boot options to the kernel.
 1.3  22-Jan-2024  jmcneill wii: Add drivers for Broadway DSP and Audio interface.

0: [*] audio0 @ bwdsp0: Broadway DSP
playback: 16, 2ch, 48000Hz
record: unavailable
(P-) slinear_be 16/16, 2ch, { 48000 }
 1.2  21-Jan-2024  jmcneill wii: support RB_POWERDOWN
 1.1  20-Jan-2024  jmcneill evbppc: Add initial support for the Nintendo Wii
 1.4.2.5  22-Feb-2025  martin Pull up following revision(s) (requested by jmcneill in ticket #1052):

sys/kern/subr_disk_mbr.c: revision 1.59
sys/arch/evbppc/include/wii.h: revision 1.10
sys/arch/evbppc/wii/machdep.c: revision 1.9
sys/arch/evbppc/conf/files.wii: revision 1.5
sys/arch/evbppc/wii/dev/di.c: revision 1.1
sys/arch/evbppc/conf/WII: revision 1.8

Handle reading larger sectors (including 2k CD-ROM blocks).

Fall back to scan for ISO9660 sessions when MMC code fails.
disklabel now reports ISO/UDF partitions again for cd(4).

wii: Add more register definitions.

wii: Add support for Wii DVD drive.
This adds a virtual SCSI HBA driver that is able to read DVD video discs
inserted in the Wii.

wii: Early init for DVD support
 1.4.2.4  26-Oct-2024  martin Pull up following revision(s) (requested by jmcneill in ticket #986):

sys/arch/evbppc/wii/machdep.c: revision 1.8
sys/arch/powerpc/powerpc/clock.c: revision 1.19

Improve delay() accuracy on Nintendo Wii.

The PowerPC delay() implementation converts the timebase frequency to
a number of nanoseconds per tick and uses that value to compute the
delay interval. On the Wii's Broadway processor with a timebase
frequency of 60.75 MHz, some precision is lost as each tick is
approximately 16.46 nanoseconds. The end result is that we sleep for
approximately 2.875% longer than necessary. This also has an impact
on CPU speed calculation on Broadway, which incorrectly reports itself
as 750MHz instead of 729MHz (2.875% faster).

Fix this by introducing an (optional) ticks_per_msec variable that can
be set by the platform and allows delay() to improve the accuracy of
longer delays.

Measured CPU frequency before this change:
[ 1.000000] cpu0: 750.00 MHz, 256KB WB with ECC L2 cache
Measured CPU frequency after this change:
[ 1.000000] cpu0: 729.00 MHz, 256KB WB with ECC L2 cache
 1.4.2.3  14-Oct-2024  martin Pull up following revision(s) (requested by jmcneill in ticket #974):

sys/arch/evbppc/wii/dev/wiifb.c: revision 1.7
sys/arch/evbppc/wii/wii_mmuinit.S: revision 1.2
sys/arch/evbppc/wii/dev/ehci_hollywood.c: revision 1.4
sys/arch/evbppc/wii/machdep.c: revision 1.7
sys/arch/evbppc/wii/wii_locore.S: revision 1.3
sys/arch/evbppc/wii/dev/avenc.c: revision 1.2
sys/arch/evbppc/include/wii.h: revision 1.9
sys/arch/evbppc/wii/dev/vireg.h: revision 1.3
sys/arch/evbppc/wii/autoconf.c: revision 1.3

wii: Support loading the kernel from boot2

Improve hardware initialization steps so the NetBSD kernel can be launched
directly from boot2 and does not rely on any other PPC software to setup
the hardware.
 1.4.2.2  03-Feb-2024  martin Pull up following revision(s) (requested by jmcneill in ticket #561):

etc/etc.evbppc/Makefile.inc: revision 1.15
sys/arch/evbppc/wii/dev/wiifb.c: revision 1.1
sys/arch/evbppc/wii/dev/wiifb.c: revision 1.2
sys/arch/evbppc/wii/dev/bwdsp.c: revision 1.1
sys/arch/evbppc/wii/dev/wiifb.c: revision 1.3
sys/arch/evbppc/wii/dev/bwdsp.c: revision 1.2
distrib/utils/embedded/files/evbppc_wii_icon.png: revision 1.1
usr.sbin/sysinst/arch/evbppc/md.h: revision 1.4
sys/arch/evbppc/wii/dev/wiifb.c: revision 1.4
sys/arch/evbppc/wii/dev/viio.h: revision 1.1
sys/arch/evbppc/wii/dev/wiifb.c: revision 1.5
sys/arch/evbppc/wii/dev/mainbus.h: revision 1.1
distrib/utils/embedded/conf/wii.conf: revision 1.1
distrib/utils/embedded/conf/wii.conf: revision 1.2
distrib/utils/embedded/conf/wii.conf: revision 1.3
sys/dev/sdmmc/sdhcvar.h: revision 1.34
sys/dev/sdmmc/sdhc.c: revision 1.118
sys/arch/evbppc/wii/dev/resetbtn.c: revision 1.1
distrib/utils/embedded/conf/evbppc.conf: revision 1.1
sys/dev/wsfb/genfb.c: revision 1.91
sys/arch/evbppc/wii/dev/resetbtn.c: revision 1.2
sys/dev/wscons/wsconsio.h: revision 1.127
sys/arch/powerpc/oea/oea_machdep.c: revision 1.85
sys/arch/evbppc/wii/dev/hollywood.h: revision 1.1
sys/arch/evbppc/conf/std.wii: revision 1.1
sys/arch/evbppc/wii/dev/hollywood.h: revision 1.2
sys/arch/evbppc/wii/dev/hollywood.c: revision 1.1
sys/arch/evbppc/conf/std.wii: revision 1.2
sys/arch/evbppc/wii/dev/hollywood.c: revision 1.2
sys/arch/evbppc/conf/std.wii: revision 1.3
sys/arch/powerpc/oea/cpu_subr.c: revision 1.109
sys/arch/evbppc/wii/wii_mmuinit.S: revision 1.1
sys/dev/usb/usb.h: revision 1.124
sys/arch/evbppc/wii/machdep.c: revision 1.1
sys/arch/evbppc/wii/dev/rtcsram.c: revision 1.1
sys/arch/powerpc/include/oea/hid.h: revision 1.14
sys/arch/evbppc/wii/mainbus.c: revision 1.1
sys/arch/evbppc/wii/machdep.c: revision 1.2
sys/arch/evbppc/wii/dev/ehci_hollywood.c: revision 1.1
sys/arch/evbppc/wii/mainbus.c: revision 1.2
sys/arch/evbppc/wii/machdep.c: revision 1.3
sys/arch/evbppc/wii/dev/ehci_hollywood.c: revision 1.2
sys/arch/evbppc/wii/mainbus.c: revision 1.3
sys/arch/evbppc/wii/machdep.c: revision 1.4
sys/arch/evbppc/wii/dev/hwgpio.c: revision 1.1
sys/arch/evbppc/wii/dev/sdhc_hollywood.c: revision 1.1
sys/arch/evbppc/wii/dev/sdhc_hollywood.c: revision 1.2
sys/arch/evbppc/wii/wii_locore.S: revision 1.1
sys/arch/evbppc/conf/files.wii: revision 1.1
sys/arch/evbppc/wii/wii_locore.S: revision 1.2
sys/arch/evbppc/include/wii.h: revision 1.1
sys/arch/evbppc/conf/files.wii: revision 1.2
sys/arch/evbppc/wii/dev/exi.c: revision 1.1
sys/arch/evbppc/include/wii.h: revision 1.2
sys/arch/evbppc/conf/files.wii: revision 1.3
sys/arch/powerpc/powerpc/clock.c: revision 1.18
sys/arch/evbppc/include/wii.h: revision 1.3
sys/arch/evbppc/conf/files.wii: revision 1.4
sys/arch/evbppc/include/wii.h: revision 1.4
sys/arch/evbppc/wii/dev/exi.h: revision 1.1
sys/arch/evbppc/wii/dev/avenc.c: revision 1.1
sys/arch/evbppc/include/wii.h: revision 1.5
sys/arch/evbppc/include/wii.h: revision 1.6
sys/arch/evbppc/include/wii.h: revision 1.7
sys/arch/evbppc/wii/dev/avenc.h: revision 1.1
distrib/utils/embedded/mkimage: revision 1.79
sys/arch/evbppc/conf/WII: revision 1.1
sys/arch/evbppc/conf/INSTALL_WII: revision 1.1
distrib/utils/embedded/files/evbppc_wii_meta.xml: revision 1.1
sys/arch/evbppc/wii/dev/vireg.h: revision 1.1
sys/arch/evbppc/conf/WII: revision 1.2
distrib/utils/embedded/files/evbppc_wii_meta.xml: revision 1.2
sys/arch/evbppc/wii/dev/vireg.h: revision 1.2
sys/arch/evbppc/conf/WII: revision 1.3
sys/arch/evbppc/conf/WII: revision 1.4
usr.sbin/sysinst/arch/evbppc/md.c: revision 1.11
sys/arch/evbppc/wii/dev/ohci_hollywood.c: revision 1.1
sys/dev/usb/ehcivar.h: revision 1.52
sys/arch/evbppc/wii/pic_pi.c: revision 1.1
sys/arch/evbppc/wii/dev/ohci_hollywood.c: revision 1.2
etc/etc.evbppc/ttys: revision 1.8
sys/arch/evbppc/wii/dev/bwai.c: revision 1.1
sys/arch/evbppc/wii/dev/bwai.c: revision 1.2
sys/arch/evbppc/wii/dev/bwai.c: revision 1.3
sys/arch/evbppc/wii/autoconf.c: revision 1.1
sys/arch/evbppc/conf/Makefile.wii.inc: revision 1.1
sys/arch/evbppc/wii/dev/bwai.h: revision 1.1
sys/arch/evbppc/wii/autoconf.c: revision 1.2
sys/arch/evbppc/conf/Makefile.wii.inc: revision 1.2

powerpc: oea: Fix prefetchable mappings
Prefetchable mappings need PMAP_NOCACHE to get write-combine semantics.
powerpc: oea: Decode IBM750CL L2 cache information.
sdmmc: add support for optional delay after register write
wscons: Add HOLLYWOOD display and YUY2 pixel format types
wsfb: add support for optional "devcmap" property
A hardware driver can supply a pointer to a 16x 32-bit array to override
the default rasops device colour map in the "devcmap" property.
ehci: add EHCIF_32BIT_ACCESS flag to force 32-bit MMIO
fix comments: HID0 ICFI/DCFI are "flash invalidate", not "flush invalidate"
powerpc: fix delay for large (> ~5sec) values
When calculating the target timebase, promote '1000' on the RHS to ULL
to force 64-bit calculation, otherwise 'n * 1000' will overflow.
usb: increase USB_PORT_RESET_RECOVERY from 10ms to 20ms
I changed this from 250ms to 10ms back in 2021 based on a similar FreeBSD
change, but it seems to be a bit too aggressive for some platforms.
evbppc: Add initial support for the Nintendo Wii
wii: support RB_POWERDOWN
build fix: use dd with count=1 for compat with NetBSD dd(1)
wii: Add NTSC 480p support.
In addition to this, add VIIO_{GET,SET}REGS ioctl support to allow for
poking at video interface registers from userland. This is helpful for
debugging display issues.
wii: Add 128x48 icon to SD card image
wii: Fix a comment
wii: Add drivers for Broadway DSP and Audio interface.
0: [*] audio0 @ bwdsp0: Broadway DSP
playback: 16, 2ch, 48000Hz
record: unavailable
(P-) slinear_be 16/16, 2ch, { 48000 }
wii: Add screenblank support.
wii: Use screen dimming register for screen blanking.
wii: Add GPIO, I2C, and basic A/V encoder driver.
wii: Use A/V encoder volume controls instead of using a software filter.
wii: Simply DSP driver - no interrupt handler required.
wii: provide device names to intr_establish
wii$ intrctl list
interrupt id CPU0 device name(s)
pi irq 14 64769* hollywood0
hollywood irq 36 5872* ehci0
hollywood irq 39 58907* sdhc0
hollywood irq 40 4* sdhc1
hollywood irq 49 0* resetbtn0
pi irq 5 0* bwai0
wii: Add support for passing boot options to the kernel.
wii: Add External interface bus and RTC support
wii: Remove objcopy after kernel build.
HBC will do the right thing.
Add wsvt25 entries (off by default) for ttyE0-ttyE3.
Add support for "PAL" (576i) mode on Wii.
 1.4.2.1  24-Jan-2024  martin file machdep.c was added on branch netbsd-10 on 2024-02-03 11:47:07 +0000
 1.6.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed