• Robert Sprowson's avatar
    Fix for nonsense error and implement a 'todo' action · 19842c18
    Robert Sprowson authored
    An (unlikely) error during ScanBus would end up with an error block pointing to &00000004 as although the V bit was carefully preserved, R0 wasn't.
    Add a RAM flag to remember if the module is operating in no-PCI-bus mode (for PCI_RAMAlloc and PCI_RAMFree) so that the bus access SWIs can return a meaningful error.
    
    Resources/UK/Messages, Errors.s:
     New error message "NoPCIBus".
    GetAll.s:
     Remove unnecessary header includes, and use {FALSE} and {TRUE}.
    Module.s:
     Record result of OS_ReadSysInfo call to determine if there's a PCI bus or not.
     Do fail to initialise in the RAM loading case if ResourceFS register fails.
    Scan.s:
     Preserve R0 if ScanBus returns an error.
     Add some comments.
    Interface.s:
     Inspect flag and report error for those SWIs that are harmful when no bus exists, anything going via ValidateHandle doesn't need to since pci_handles will be 0 in that case.
     Relocate FindFreeHandle to Scan.s.
    
    Tested briefly with and without the "got PCI" bit set, showing the appropriate error being returned.
    
    Version 0.12. Tagged as 'PCI-0_12'
    19842c18
MkRom,fd7 629 Bytes