Cxbx-Reloaded / xbox_kernel_test_suite

Xbox kernel APIs tester written using nxdk
GNU General Public License v3.0
22 stars 6 forks source link

AvSetSavedDataAddress issues #26

Open Luca1991 opened 6 years ago

Luca1991 commented 6 years ago

As pointed out by @PatrickvL the address 0xFD000000 (NV2A_MMIO_BASE) should be valid.

Instead on my real xbox I get a black screen and the system hangs there.

Luca1991 commented 6 years ago

Okay, what I did: I called AvGetSavedDataAddress and printed the value. It was 0x0. I passed 0x0 to AvSetSavedDataAddress and now it doesn't crash. According to XboxDevWiki 0x00000000 is where main mem start (obviously).

@PatrickvL what do you think about it?

PatrickvL commented 6 years ago

Currently, Cxbx-Reloaded doesn't do anything else but store and retrieve a 32 bit number via AvSetSavedDataAddress/AvGetSavedDataAddress. The real kernel however does much more. The kernel test suite should somehow describe all the things that these API's do in the original kernel. (And what they shouldn't do with certain input.) Until we have a better understanding on that, we best keep it simple. Setting NULL isn't much of a test, but if that's the only way to prevent the real kernel from crashing, then that's what we do. Also, do add a description of why the test is so simple (and possibly create an issue to figure out how the original kernel behaves).

JayFoxRox commented 5 years ago

You need to point it at a memory page, ideally one which was made persistent. I don't remember if this takes a physical or virtual address though.

The point of this function is to preserve framebuffer contents across a reboot / XBE change.