IOS version 4.0.0 07/08/06 Summary: -------- This is release candidate for IOS 4.0.0 This release contains support for both 64MB and 128MB configurations. Please note that in this release, we base the IOS version on the OS version number that is published with os.wad. All previos IOS releases have been published with OS version number 3. This version is now published with OS version number 4. In future IOS releases, we can publish using increasing minor number 4.xx or publish with increasing major number. Thus, the system can support different IOS releases published with different major numbers. To use this IOS version 4.0.0 correctly, you'll need 1) A system menu (systemmenu.rvl.101.wad) that is published with OS version 4. Existing system menu is published using OS version 3 (as default). The dvddata/swupdate/4.00 directory already contains this new system menu. 2) An rvl.bin image that is published using OS version 4. A version of this rvl.bin (from Ohizumi-san) has been checked in X86/bin as rvl.4.bin. If your system is already running either 0.7.6 or 0.7.7 and you swupdate to 4.0.0, you'll have two different IOS versions on the NAND flash. The 0.7.6/0.7.7 is published as OS version 3 and the new IOS 4.0.0 is published as OS version 4. Depending on the version of system menu or rvl.bin that you have, you will either launch using the old IOS or new IOS versions. That is, - Old system menu (published with OS version 3) -> IOS 0.7.6/0.7.7 - Old rvl.bin (published with OS version 3) -> IOS 0.7.6/0.7.7 - New system menu (published with OS version 4) -> IOS 4.0.0 - New rvl.bin (published with OS version 4) -> IOS 4.0.0 All program code, tools, and boot/os images have been checked into the main Nintendo SDK tree to perform IOS 4.0.0 update. Here are some main directories: - dvddata/swupdate/4.00 - securebuild/IOS/4.00 - rvl-64/ - rvl-128/ - securebuild/tools/arm-elf-merge/4.00 The main features of this release are: 1) Add new ATI work-around for AHM/MEM register read - New MEM flushing and RDB invalidation code 2) Add MMU support for STM 3) Fix GC compatible mode support 4) IOS is published with new os version (major number is 4) - System menu (systemmenu.rvl.101.wad) is re-published with new os version 4 - Need new rvl.bin to be published with new os version 4 (X86/bin/rvl.4.bin) 5) Updated tools - Updated arm-elf-merge tool to support SSL process - Updated publishWad.py tool to support GC compat mode 6) Complete TCP/IP stack APIs 7) Bug fixes (IOS, ES, FS, DI, SD, Net) Limitations: ------------ 1) Testing a) The following configuration was used: - NDEV2: ES 2.01 + 128 MB GDDR3 - NDEV2: ES 2.01 + 64 MB GDDR3 b) The update process was performed from: - 0.7.5 (5-block image) -> 4.0.0 swupdate - 0.7.5 (5-block image) -> 0.7.7 RC1 swupdate -> 4.0.0 swupdate - 4.0.0 swupdate -> 4.0.0 swupdate 2) See additional release notes below from each subsystem. Known Issues/Problems: ---------------------- 1) Once IOS 0.7.6 (and later) is updated on NDEV systems, old FS API tests (fs_apitest, fs_apitestasyn) SHOULD NOT be run since these tests will reformat the filesystem and delete the IOS images on the filesystem. This will cause the subsequent boot sequence to fail and requires the ARM JTAG-Jet to burn the IOS 0.7.5 (5-blockimage). a) Other NAND test programs should not do destructive operations (i.e., format, delete system directories, etc.) on IOS 0.7 systems. NAND test programs should only use /tmp directory on IOS 0.7 systems. 2) See additional release notes below from each subsystem. Procedure to perform software update to IOS 4.0.0 from IOS 0.7.6 (or later) --------------------------------------------------------------------------- 1. Update Nintendo SDK source tree - The swupdate for 64MB and 128 MB images are located under SDK/dvddata/swupdate/4.00 2. Go to SDK/dvdata/swupdate - Make sure that swupdateIRD.rvl.elf is there. 3. Assuming NDEV system is already running IOS 0.7.6 or later, - Do "ndrun ./swupdateIRD.rvl.elf" 4. Use the contoller to select 4.00 directory and hit Start button. 5. Once the software update procedure is complete, you can now run your PPC disk applications normally. You should the serial console displaying "Firmware : 4.0.0 (7/8/2006)" Subsystem Release Notes: ------------------------ A) OS 1. Features/Changes: - Added MMU and kernel support for STM process to access protected hardware registers. - New IOS_ACRRegWrite() and IOS_DDRRegWrite() available only to STM process. - STM is now built at a new virtual address with separate physical load address. arm-elf-merge also assigns a new domain to the STM driver. STM can see its domain and the "shared" domain, but no other processes can see the STM domain. If STM driver wants to communicate with other drivers, it must use shared memory. - Version numbers in LoMem: - ES now sets the version number (major/minor) in LoMem based on the TMD for the OS that it is launching. - The total number of message queues has been increased 128 for debugging purpose. - Fixed support for GC compatible mode booting (See last section for more info). - Updated arm-elf-merge.exe tool to support GC compat and SSL process. - In IOS, we now distinguish between an initial thread priority and the current thread priority: - For IOS_CreateThread: don't allow a new thread to be created with a higher priority than the caller's initial priority. - For IOS_SetPriority: don't allow the new priority to be higher than the thread's initial priority. If violation occurs, IOS_ERROR_INVALID code will be returned. - In IOS shell (ios.elf), the "run and re" commands take a new parameter process ID to run correctly in MMU environment. 2. Bug fixes - Fixed bugs in booting in GC compatible mode. - Fixed bugs in calculating correct elapsed time when adding new timers or stopping/destroying old ones. B) ES 1. Features/Changes: - Updated publishWad.py to support GC compat mode publishing. - Changed ES_DeleteTitle() behavior to not delete TMD if /data is not empty. 2. Bug fixes - Fixed bugs in CheckVersion and GetTicketViews. - Added ticket checking in OpenTitleContentFile. - Updated group ID to use default group ID 2 for non-system title. - Fixed directory/file permissions. - Fixed launched sequence for compat mode titles. C) ISFS 1. Features - Same as 0.7.7 RC1 release D) DI 1. Features/Changes - Same as 0.7.7 RC1 release - DI driver is now running in its own virtual address space with its own domain. 2. Bug fixes - Fixed tool: use environment variable to get location of PKI directory. - Changed condition on code that generates an error message. - Fixed behavior when memory allocations fail. E) USB 1. New features - Added API to fetch list of currently connected devices belonging to a particular USB class. This can be used to do "open device by class". IOSError IUSB_GetDeviceList(const char *path, USBDeviceInfo *deviceList, u8 maxDev, u8 deviceClass, u8 *numDev); 2. Known issues: - Power switching is not per-port. - No support for isochronous transfers - No support for hubs - Hot-plugging is supported on IOP side but requires testing on PPC side. F) SD 1. Bug fixes - Fixed the power on reset problem for some SD cards. - Fixed the ISD_UnregisterDeviceIntrHandler hang problem. - Fixed the register/unregister bug. - Fixed the handling of card removal while data transfer is busy. 2. Known Issues/Problems - All synchronous APIs are NOT thread safe (except ISD_RegisterDeviceIntrHandler) These APIs will be fixed to be thread safe in the next release. G) TCP/IP 1. The following APIs are supported - SOStartup() - SOCleanup() - SOSocket() - SOClose() - SOBind() - SOConnect() - SOSendTo() - SORecvFrom() - SOListen() - SOAccept() - SOPoll() - SOSetSockOpt() - SOGetHostID() - SOInetNtoA() - SONtoHl() - SONtoHs() - SOHtoNl() - SOHtoNs() - SOGetInterfaceOpt() - SOSetInterfaceOpt() - SOGetPeerName() - SOGetSockName() - SOGetSockOpt() - SOFcntl() - SOGetHostByName() - SOGetHostByAddr() - SOGetNameInfo() - SOGetLastError() - SOInetAtoN() - SOInetPtoN() - SOInetNtoP() - SOSockAtMark() - SOGetAddrInfo() - ICMPSocket() - ICMPPing() - ICMPCancel() - ICMPClose() 2. New APIs - SOSetInterface() 3. The following protocols are supported - TCP / UDP / IP / ARP / DHCP / ICMP 4. Application porting instructions/restrictions a) The socket lib on PPC is compatible with the original stack. However, only socket APIs are available on PPC. Applications which use the internal network APIs must be changed. b) The following buffers needs to be 1) 32 bytes aligned; 2) size of 32 bytes multiple; and 3) allocated from DDR (MEM2) when calling the API: optval in SOGetInterfaceOpt() optval in SOSetInterfaceOpt() buf in SORecvFrom() / SORead() / SORecv() buf in SOSendTo() / SOWrite() / SOSend() fds in SOPoll() name in SOGetHostByName() cp in SOInetAtoN() src in SOInetPtoN() dst in SOInetNtoP() config in SOStartup() c) Only socket.h should be included to access the network APIs and public structures #include 6. Changes to existing APIs a) The interface parameter in SOGetInterfaceOpt() and SOSetInterfaceOpt() is ignored. The network stack and applications no longer share the address map. Therefore, the application can not pass an address to locate the interface in the stack. The APIs will always use the default interface. b) SOGetInterfaceOpt() and SOSetInterfaceOpt() can not be used to get/set filter function pointer. c) The allocation/free function pointers are supported in SOConfig on PPC side. 7. Support for multiple interfaces - The stack does not support multiple interfaces Simultaneously. To switch the interface, applications need to call SOCleanup() to shutdown the current interface and SOStartup() to start the new interface. - Added new API SOSetInterface(interfaceId) where interfaceId - NET_IF_ETH_WIFI OR - NET_IF_ETH_USB 8. Bug fixes - Fixed bugs in porting layer timer functions for accuracy. - Fixed performance bug in USB-Ethernet driver. - Fixed "not enough IPC memory" bug found in dhcp test. - Fixed bug found in solinger test. - Fixed non-blocking mode bug in SOPoll(). - Fixed r2 timer tick bug in SOConfig structure. - Merged changes from iRD on IPDns.c and IPSocket.c. 9. Known Issues/Bugs a) The network stack contains code that accesses 32 bits from an odd address (non-32-bit aligned). Although this type of access is allowed on PPC, it is illegal on the ARM9 processor and will cause an exception. Therefore, more effort is needed to test the network stack to catch all these situations. b) The maximum number of oustanding opened sockets is currently set to 12. c) Due to kernel resource contraints, the size of the ARP cache has been reduced from 64 to 16 entries to limit the number of timers required. d) In IOP stress testing (either with NAND Flash or SD Card), there are intermittent hangs in TCP receive thread. This condition is currently being investigated. e) Two asserts in IPEther.c, Go() are intentionally disabled. f) During a stress test, the following assert has been encountered after sending/receiving over 100,000 K data. // datagram has not been sent out. Must release memory ASSERT(datagram->callback == NULL); H) GC Compatible Mode 1. To support GC compat mode, there are two NAND images: a) bc.wad - contains a compat mode boot1, which does the mode switch and memory initialization b) mios.wad - contains a minimal IOS and compat mode BS2, BS1. These two images are checked into securebuild/IOS/4.00/rvl-128. and securebuild/IOS/4.00/rvl-64. There are also "compat" sub-directory that contains the mini_ios.elf, boot1_compat.elf, BS1.img, and BS2.img. These two wad files need to be manually imported to the filesystem as titles, using, for example, the sysmenu program. 2. There are 2 ways to do a compat mode switch: - Launch bc.wad manually from, for example, sysmenu program. - Write a simple PPC program which calls ES_SwitchMode() For example, using build/tests/es/src/es_apitest.c, as a template, just make this ES API call. A new ES API has been provided: IOSError ES_SwitchMode(void); This call switches to compat mode. 3. Here are the sequence of events when GC compat mode is switched: - bc.wad performs clock switching, memory initialization, etc - bc.wad launches boot2, which includes ES, FS. ES realizes that this is compat mode and launches mios.wad instead of the standard viewer. - mios.wad includes mini IOS and BS1 and BS2 for compat mode. - mini IOS does the final parts of compat mode memory setting (ARAM emulation, making all of Napa/DDR inaccessible to the IOP due to enabling of strict flipper emulation). - mini IOS then releases PPC from reset. 4. Bug fixes - Fixed bug in loading of BS1/lomem initialization. - Fixed bug in publishWad.py (with -B -A options) - Fixed mini_ios to not reset EXI after the EXI registers have been initialized with the 16 instructions.