Comments (9)
I looked at this briefly last spring and I felt pretty confident that the issue was going to stem from when they changed around cromwell's memory layout: XboxDev/cromwell@5702a10
This PR from mike also felt relevant: XboxDev/cromwell#53
It suggests that Cromwell probably took an accidental dependency on some cached CPU state (or MCPX 1.0 artifacts) that get blown away by the fact that OpenXenium always boots into an XOS stub first.
I'm kind of looking back at some XOS stuff for fun, so I'll drop any other related notes here if I think they're useful.
from openxenium.
Just to follow up, I did investigate this awhile back (at least for XBlast) and I don't really think there's anything that can be done on the OX side.
The reason XBlast does not boot off an OX on 1.0 consoles is because of how strict the timing threshold was on the SMC challenges for 1.0 hardware. On 1.0 consoles the SMC must receive correct responses to the retail SMC challenges within ~125ms of power on. XBlast booting off OX does not complete them till ~150ms (based on what I traced on a scope).
Maybe the xenium CPLD logic for address translation / fetching from the flash is a 'bit' slower than dumber modchips, slowing down the XBlast boot just enough to fall outside the acceptable threshold to complete the SMC challenges.
Really, I would argue this is more of an XBlast issue than an OX issue. This is because XBlast first copies the entire 'OS' (~140kb) from flash into RAM before bothering to complete the SMC challenges... and this is particularly slow over LPC.
IMO the correct solution is that XBlast should perform the challenges in its bootloader before it copies its OS from flash to RAM. This is what the Microsoft bios' do (prior do decrypt, and decompression of the kernel), and basically every other scene bios.
Maybe it's possible that the Xenium CPLD logic could be 'improved' to speed up the flash addressing or w/e but I'm not totally convinced. But I'm not sure it's worth it tbh. Most people use XBlast only to test RAM upgrades, which would require OX xcodes to also be modified to support booting with mismatched ram chip numbers.
Anyway, just wanted to post this for context. I'm not sure there's a good fix here, besides both updating XBlast and xenium flash xcodes. But that probably falls outside the scope of this repo.
from openxenium.
I can confirm that xblast is now booting on a 1.0 after this update. It previously would fail to boot and reset the console loading XOS again. No hiccups and other bioses now seem to init faster and boot up with less noticeable lag.
from openxenium.
Just a guess but I think Xcalibur stuff is what broke it, between 2.30 and 2.31 that's about all that really changed although there were 40 commits - most being tiny code changes outside init stuff. 2.31: 98cc81d
2.30: a1b92cf
and Xcal was added in 3bb29b8
.
from openxenium.
Seems there's more too it. Pulling out all the Focus and XCal init stuff from XCodes.h
produces the same result. Perhaps they changed more in the xcodes than just xcal init between those revs? I didn't really check too well.
from openxenium.
Thank for you taking the time to dig into this. I did some what consider challenge response times in development however as I was never able to repeat this during dev I didnt look into it further.
In the CPLD I used 6 wait states for read and writes. I cantt recall exactly why I chose 6, but the access time of the legacy xenium flash chip is 100ns, so the minimum we could get away with a 4 wait states (4x33Mhz ~ 120ns) atleast on paper. I probably just increased to 6 for a safety factor.
Modern flash chips OX uses have 70ns access time, so we could get away with 3 wait states in this instance, but I would want to remain backward compatible.
With 4 wait states we could save ~60ns per byte. Which could help.
The line is here:
OpenXenium/Firmware/openxenium.vhd
Line 359 in ddff195
If you or anyone have a setup to synthesize and reprogram without too much effort it could be worth testing, but I would not be able to do this anytime soon. The legacy Xenium used less than 6, I recall it being 3 or 4 wait states and the issue seemed to still be present based on the first post in this issue so hey, maybe not.
But as you say Cromwell probably should not copy the entire OS on boot up and it would still straddle the challenge response time limit.
from openxenium.
Neat, good catch.
I actually do have a VM setup to rebuild the VHD from when I was poking at some stuff a few months back. I can dust it off and test both 3 & 4 wait states this weekend.
I'm calculating that this could save ~9-12ms on XBlast, which could be just enough to squeak under the threshold. The spread might have actually been tighter, but I won't hold my breath.
from openxenium.
I just want to confirm that dropping wait states to 4 (even 3) keeps the chip functional but does not resolve the issue. XBlast still does not boot on a 1.0.
I haven't actually taken new measurements with a scope, maybe tomorrow if I have the time I'll hook it up and try comparing a 6 wait state chip versus a 3 (maybe even a 2??) to see what the measured timing differences actually are.
haxar pinged me to say that he added an experimental commit to cromwell based on this discussion which will hopefully rectify it on that front: haxar/cromwell@1a258b1
EDIT: As a slight aside, I do feel like it perceptively speeds up boot a bit. In theory it actually should save 50-80ms off of every boot for a system with a Xenium installed.
from openxenium.
Should be fixed by v1.4 and requires the CPLD firmware to be upgraded. I am unable to test as I dont have a v1.0 Xbox so hopefully I get some feedback from some users before closing this issue.
RAM upgrade testing will still not work as XeniumOS cannot be started with partial RAM installs.
from openxenium.
Related Issues (20)
- More than 64mb of RAM but less than 128mb HOT 4
- iND-BiOS.5004.67 Refuses to boot until re-Flashed HOT 2
- How to retrieve eeprom backup without hd HOT 1
- XeniumOS, password protection HOT 5
- Schematics not readable for everyone HOT 3
- Support for Bottom Boot Flash devices HOT 3
- Xenium Blue HOT 4
- Potential replacement for Spansion S29AL016J HOT 38
- Issue with superio when lframe is shorted to d0 point like in a 1.6 install
- S29AL016J70TFI02 Not working HOT 1
- FRAG with Hitachi-LG drive connected HOT 2
- Program XeniumOS without need for modchipped Xbox HOT 2
- Pcbway issue HOT 1
- README.md slight typo
- XeniumOS hangs without DVD drive HOT 2
- 1.6 with 128MB RAM unable to boot. HOT 23
- not really an issue HOT 1
- Xenium-Tools font changed with latest NXDK HOT 1
- iMPACT project file missing. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openxenium.