pbkit is not 128MB aware

Open
#549 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
embedded-iot

Research direction

Start by finding every use of MAXRAM and the pb_OldVideoStart assignment, then trace how memory size is detected and used by the affected scene kernels. Compare the PCI RAM-size result with NV_PFB_CFG1, since the issue notes that some kernels report the wrong size. Done means allocation and framebuffer handling can use memory above 64MB on 128MB systems without breaking 64MB systems.

Written by the indexing model from the issue text.

Description

Because of this, it will only allocate memory in the lower 64MB portion.

#define MAXRAM 0x03FFAFFF

Is used in many places.

HalReadWritePCISpace(0, 0, 0x84, &var, sizeof(uint32_t), FALSE);

Will give you RAM size, however some scene kernels do not set this properly even if you have 128MB, so you could also read NV_PFB_CFG1.

pb_OldVideoStart=((DWORD)XVideoGetFB())&0x03FFFFFF;
Is also probably problematic.

Dominant language
C
Stars
600
Forks
97
Avg merge
11h 48m
Merged PRs (30d)
2

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from XboxDev/nxdk

All issues in XboxDev/nxdk

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.