mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-29 13:03:36 +01:00
kernel: fix gint[HWURAM] not being set on fx-9860G
When switching to dynamic TLB the counting of mapped memory was no longer required at boot time. This was restored weirdly for fx-CG 50 and not at all for fx-9860G; this is now fixed.
This commit is contained in:
parent
dce5ade4e1
commit
293532024d
3 changed files with 9 additions and 4 deletions
3
TODO
3
TODO
|
@ -1,4 +1,5 @@
|
||||||
Extensions on existing code:
|
Extensions on existing code:
|
||||||
|
* stdio: support %f in printf
|
||||||
* project: add license file
|
* project: add license file
|
||||||
* kernel: group linker script symbols in a single header file
|
* kernel: group linker script symbols in a single header file
|
||||||
* kernel: be consistent about *tlb_mapped_memory() in hw_detect()
|
* kernel: be consistent about *tlb_mapped_memory() in hw_detect()
|
||||||
|
@ -20,3 +21,5 @@ Future directions.
|
||||||
* USB communication, using Yatis' reverse-engineering of the module
|
* USB communication, using Yatis' reverse-engineering of the module
|
||||||
* Make fx9860g projects work out of the box on fxcg50
|
* Make fx9860g projects work out of the box on fxcg50
|
||||||
* Use the DSP to enhance parallel computation
|
* Use the DSP to enhance parallel computation
|
||||||
|
* Dynamic memory allocation
|
||||||
|
* Base for Yatis' threads library
|
||||||
|
|
|
@ -98,10 +98,12 @@ void hw_detect(void)
|
||||||
*R4 = b4;
|
*R4 = b4;
|
||||||
|
|
||||||
gint[HWRAM] = ext ? (512 << 10) : (256 << 10);
|
gint[HWRAM] = ext ? (512 << 10) : (256 << 10);
|
||||||
/* Will be detected later on */
|
|
||||||
gint[HWURAM] = -1;
|
|
||||||
/* Traditionally 4 MiB, Graph 35+E II has 8 MiB */
|
/* Traditionally 4 MiB, Graph 35+E II has 8 MiB */
|
||||||
gint[HWROM] = (gint[HWCALC] == HWCALC_G35PE2) ? (8 << 20) : (4 << 20);
|
gint[HWROM] = (gint[HWCALC] == HWCALC_G35PE2) ? (8 << 20) : (4 << 20);
|
||||||
|
|
||||||
|
/* Mapped memory */
|
||||||
|
if(isSH3()) tlb_mapped_memory(NULL, NULL);
|
||||||
|
else utlb_mapped_memory(NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FX9860G and platform-agnostic */
|
#endif /* FX9860G and platform-agnostic */
|
||||||
|
@ -130,8 +132,7 @@ void hw_detect(void)
|
||||||
gint[HWROM] = (32 << 20);
|
gint[HWROM] = (32 << 20);
|
||||||
|
|
||||||
/* Mapped memory */
|
/* Mapped memory */
|
||||||
if(isSH3()) tlb_mapped_memory(NULL, NULL);
|
utlb_mapped_memory(NULL, NULL);
|
||||||
else utlb_mapped_memory(NULL, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FXCG50 */
|
#endif /* FXCG50 */
|
||||||
|
|
|
@ -32,6 +32,7 @@ __attribute__((constructor))
|
||||||
static void init_vram(void)
|
static void init_vram(void)
|
||||||
{
|
{
|
||||||
/* On Prizm and fx-CG Manager, move address to 0xa8000000 */
|
/* On Prizm and fx-CG Manager, move address to 0xa8000000 */
|
||||||
|
/* TODO: Detect base RAM address in BSC rather than hardcoding it */
|
||||||
if(gint[HWCALC] == HWCALC_PRIZM || gint[HWCALC] == HWCALC_FXCG_MANAGER)
|
if(gint[HWCALC] == HWCALC_PRIZM || gint[HWCALC] == HWCALC_FXCG_MANAGER)
|
||||||
{
|
{
|
||||||
main = (void *)main - 0x04000000;
|
main = (void *)main - 0x04000000;
|
||||||
|
|
Loading…
Reference in a new issue