Milan BIOS and Radeon
Moderators: Mug UK, lp, moondog/.tSCc., [ProToS], Moderator Team
Re: Milan BIOS and Radeon
I think I found the same block. It didn't mean a lot to me.
I haven't done any hardware code since uni and that was in m68k assembler.
It might be useful to get it to compile with gcc 14 so that gdb can be used.
I haven't done any hardware code since uni and that was in m68k assembler.
It might be useful to get it to compile with gcc 14 so that gdb can be used.
Re: Milan BIOS and Radeon
What's your error with gcc14? I used gcc 9.5.
You can also adapt with dbg() like that
So you'll know where it falls.
You can also adapt with dbg() like that
Code: Select all
...
if(rinfo){
dbg("rinfo non null\r\n");
if(rinfo->bios_seg_phys){
dbg("rinfo->bios_seg_phys non null\r\n");
}
}
if(pci_rsc_desc){
dbg("pci_rsc_desc non null\r\n");
if(pci_rsc_desc->start){
dbg("pci_rsc_desc->start non null\r\n");
}
}
dbg("rinfo->bios_seg_phys = pci_rsc_desc->start -> %x\r\n",
pci_rsc_desc->start);
rinfo->bios_seg_phys = pci_rsc_desc->start;
if (BIOS_IN16(0) == 0xaa55)
{
dbg("rinfo->bios_seg = %x + %x\r\n",
pci_rsc_desc->offset, pci_rsc_desc->start);
rinfo->bios_seg = (void *)(pci_rsc_desc->offset + pci_rsc_desc->start);
}
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
Re: Milan BIOS and Radeon
Adding some debug statements:
It looks like the if (BIOS_IN16(0)... is the issue.
Code: Select all
###-> pci_rsc_desc->flags = 0x702
DEBUG (radeonfb_pci_register()): flags 0xa702
DEBUG (radeonfb_pci_register()): start 0x30020000
DEBUG (radeonfb_pci_register()): offset 0x40000000
DEBUG (radeonfb_pci_register()): length 0x20000
###-> pci_rsc_desc->flags = 0xa702
DEBUG (radeonfb_pci_register()): FLG_ROM resource descriptor found
DEBUG (radeonfb_pci_register()): start = 0x30020000, size = 0x20000
DEBUG (radeonfb_pci_register()): bios_seg = (nil)
DEBUG (radeonfb_pci_register()): pci_rsc_desc->start = 0x30020000
Re: Milan BIOS and Radeon
Or the assignment line to rinfo->bios_seg_phys
Re: Milan BIOS and Radeon
Code: Select all
#define BIOS_IN16(v) ((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v) | \
((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v+1) << 8))
May be rinfo->bios_seg_phys is NULL or something is wrong with pci_read_mem_byte_fast()
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
Re: Milan BIOS and Radeon
It looks like this is the cause
Code: Select all
dbg("rinfo->bios_seg[0] (%p) was %x (expected 0xaa55)\r\n",
rinfo->bios_seg_phys, * (uint16_t *) rinfo->bios_seg_phys);
Re: Milan BIOS and Radeon
And if you comment this dbg line then will it pass?
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
Re: Milan BIOS and Radeon
I commented it and it seemed to hang, I couldn't open the task manager but ctrl-alt-del worked.
It does return0; so it won't complete the VGA bios stuff.
It does return0; so it won't complete the VGA bios stuff.
Re: Milan BIOS and Radeon
AGranlund made an interesting observation about the boot time, in this thread viewtopic.php?p=472768#p472768
Re: Milan BIOS and Radeon
In the do-while loop I thinkmedmed wrote: ↑Thu Dec 12, 2024 6:29 pmThis is handled by pci_read_mem_byte_fast() function.Code: Select all
#define BIOS_IN16(v) ((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v) | \ ((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v+1) << 8))
May be rinfo->bios_seg_phys is NULL or something is wrong with pci_read_mem_byte_fast()
Code: Select all
if (BIOS_IN16(0) == 0xaa55)
Re: Milan BIOS and Radeon
And if you print his var with dbg and %x ?PeterS wrote: ↑Fri Dec 13, 2024 3:33 pmIn the do-while loop I thinkmedmed wrote: ↑Thu Dec 12, 2024 6:29 pmThis is handled by pci_read_mem_byte_fast() function.Code: Select all
#define BIOS_IN16(v) ((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v) | \ ((unsigned short)pci_read_mem_byte_fast(rinfo->handle,rinfo->bios_seg_phys+v+1) << 8))
May be rinfo->bios_seg_phys is NULL or something is wrong with pci_read_mem_byte_fast()has to be true for it to work properly, otherwise it just returns.Code: Select all
if (BIOS_IN16(0) == 0xaa55)
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
Re: Milan BIOS and Radeon
The value is 8051
Re: Milan BIOS and Radeon
pcibios_read_mem_byte_fast uses cookie_pci
Maybe it doesn't exist or is different on the Milan.
Maybe it doesn't exist or is different on the Milan.
Re: Milan BIOS and Radeon
The card I'm using it's labelled ATi D33053 RV6P NB3.You do not have the required permissions to view the files attached to this post.
Re: Milan BIOS and Radeon
You can try to replace aa55 with the dbg numberPeterS wrote: ↑Sat Dec 14, 2024 5:26 pm 20180930130350394.jpg
The card I'm using it's labelled ATi D33053 RV6P NB3.
There are still a few around https://www.impactcomputers.com/boards- ... n-rv6p-nb3
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
Re: Milan BIOS and Radeon
I was thinking the same but haven't tried it yet.
Re: Milan BIOS and Radeon
This doesn't make sense, am I doing something dumb ?
Code: Select all
DEBUG (framebuffer_alloc()):
DEBUG (radeonfb_pci_register()): Set base addrs
DEBUG (radeonfb_pci_register()): flags 0x702
DEBUG (radeonfb_pci_register()): start 0x28000000
DEBUG (radeonfb_pci_register()): offset 0x40000000
DEBUG (radeonfb_pci_register()): length 0x8000000
DEBUG (radeonfb_pci_register()): host bridge is little endian
DEBUG (radeonfb_pci_register()): flags 0x4702
DEBUG (radeonfb_pci_register()): start 0x8c00
DEBUG (radeonfb_pci_register()): offset 0xc0000000
DEBUG (radeonfb_pci_register()): length 0x100
DEBUG (radeonfb_pci_register()): flags 0x702
DEBUG (radeonfb_pci_register()): start 0x30000000
DEBUG (radeonfb_pci_register()): offset 0x40000000
DEBUG (radeonfb_pci_register()): length 0x10000
###-> pci_rsc_desc->flags = 0x702
DEBUG (radeonfb_pci_register()): flags 0xa702
DEBUG (radeonfb_pci_register()): start 0x30020000
DEBUG (radeonfb_pci_register()): offset 0x40000000
DEBUG (radeonfb_pci_register()): length 0x20000
###-> pci_rsc_desc->flags = 0xa702
DEBUG (radeonfb_pci_register()): FLG_ROM resource descriptor found
DEBUG (radeonfb_pci_register()): start = 0x30020000, size = 0x20000
DEBUG (radeonfb_pci_register()): bios_seg = (nil)
DEBUG (radeonfb_pci_register()): pci_rsc_desc->start = 0x30020000
DEBUG (radeonfb_pci_register()): rinfo->bios_seg_phys = 0x30020000
DEBUG (radeonfb_pci_register()): 1: BIOS_IN16(0) = 0x8051
DEBUG (radeonfb_pci_register()): 2: BIOS_IN16(0) = 0xc000
Bus Error
You do not have the required permissions to view the files attached to this post.
Re: Milan BIOS and Radeon
Could the rage card be interfering with the pci values ?
Re: Milan BIOS and Radeon
I'm pretty sure the ati original driver interfer with this one. Plus this one was forked hardely from firebee driver who was design for one gpu only. We need some didier mequignon or rodolph to clear this
M.Medour - 1040STF, Mega STE + Spektrum card, Milan 040 + S3Video + ES1371.
Re: Milan BIOS and Radeon
Or DGalvez who knows the pci stuff.
Interestingly, when booting up the XBoot screen has some corruption. It might just be analogue interference.
Interestingly, when booting up the XBoot screen has some corruption. It might just be analogue interference.
Re: Milan BIOS and Radeon
I had some ideas about how to try and move forwards and I hope to try them over the next week.
1. Boot into single TOS with the existing ATI driver disabled
2. Modfiy the code to take out the check on 0xaa55 to see if anything sensible happens
1. Boot into single TOS with the existing ATI driver disabled
2. Modfiy the code to take out the check on 0xaa55 to see if anything sensible happens
Re: Milan BIOS and Radeon
I just tried booting from a floppy with the radeon.prg in the auto folder and without the Rage card.
There is no output on the vga or DVI of the Radeon.
There is no output on the vga or DVI of the Radeon.