!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/usr/src/linux-2.4.18-xfs-1.1/arch/sh/kernel/   drwxr-xr-x
Free 318.35 GB of 458.09 GB (69.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     pcibios.c (3.3 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 * $Id: pcibios.c,v 1.1 2001/08/24 12:38:19 dwmw2 Exp $
 *
 * arch/sh/kernel/pcibios.c
 *
 * This is GPL'd.
 *
 * Provided here are generic versions of:
 *    pcibios_update_resource()
 *    pcibios_align_resource()
 *    pcibios_enable_device()
 *    pcibios_set_master()
 *    pcibios_update_irq()
 *
 * These functions are collected here to reduce duplication of common
 * code amongst the many platform-specific PCI support code files.
 *
 * Platform-specific files are expected to provide:
 *    pcibios_fixup_bus()
 *    pcibios_init()
 *    pcibios_setup()
 *    pcibios_fixup_pbus_ranges()
 */

#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/init.h>

void
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
            struct resource *res, int resource)
{
    u32 new, check;
    int reg;

    new = res->start | (res->flags & PCI_REGION_FLAG_MASK);
    if (resource < 6) {
        reg = PCI_BASE_ADDRESS_0 + 4*resource;
    } else if (resource == PCI_ROM_RESOURCE) {
        res->flags |= PCI_ROM_ADDRESS_ENABLE;
        new |= PCI_ROM_ADDRESS_ENABLE;
        reg = dev->rom_base_reg;
    } else {
        /* Somebody might have asked allocation of a non-standard resource */
        return;
    }
    
    pci_write_config_dword(dev, reg, new);
    pci_read_config_dword(dev, reg, &check);
    if ((new ^ check) & ((new & PCI_BASE_ADDRESS_SPACE_IO) ? PCI_BASE_ADDRESS_IO_MASK : PCI_BASE_ADDRESS_MEM_MASK)) {
        printk(KERN_ERR "PCI: Error while updating region "
               "%s/%d (%08x != %08x)\n", dev->slot_name, resource,
               new, check);
    }
}

/*
 * We need to avoid collisions with `mirrored' VGA ports
 * and other strange ISA hardware, so we always want the
 * addresses to be allocated in the 0x000-0x0ff region
 * modulo 0x400.
 */
void pcibios_align_resource(void *data, struct resource *res, unsigned long size)
{
    if (res->flags & IORESOURCE_IO) {
        unsigned long start = res->start;

        if (start & 0x300) {
            start = (start + 0x3ff) & ~0x3ff;
            res->start = start;
        }
    }
}

int pcibios_enable_device(struct pci_dev *dev)
{
    u16 cmd, old_cmd;
    int idx;
    struct resource *r;

    pci_read_config_word(dev, PCI_COMMAND, &cmd);
    old_cmd = cmd;
    for(idx=0; idx<6; idx++) {
        r = &dev->resource[idx];
        if (!r->start && r->end) {
            printk(KERN_ERR "PCI: Device %s not available because of resource collisions\n", dev->slot_name);
            return -EINVAL;
        }
        if (r->flags & IORESOURCE_IO)
            cmd |= PCI_COMMAND_IO;
        if (r->flags & IORESOURCE_MEM)
            cmd |= PCI_COMMAND_MEMORY;
    }
    if (dev->resource[PCI_ROM_RESOURCE].start)
        cmd |= PCI_COMMAND_MEMORY;
    if (cmd != old_cmd) {
        printk(KERN_INFO "PCI: Enabling device %s (%04x -> %04x)\n", dev->name, old_cmd, cmd);
        pci_write_config_word(dev, PCI_COMMAND, cmd);
    }
    return 0;
}

/*
 *  If we set up a device for bus mastering, we need to check and set
 *  the latency timer as it may not be properly set.
 */
unsigned int pcibios_max_latency = 255;

void pcibios_set_master(struct pci_dev *dev)
{
    u8 lat;
    pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
    if (lat < 16)
        lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency;
    else if (lat > pcibios_max_latency)
        lat = pcibios_max_latency;
    else
        return;
    printk(KERN_INFO "PCI: Setting latency timer of device %s to %d\n", dev->name, lat);
    pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
}

void __init pcibios_update_irq(struct pci_dev *dev, int irq)
{
    pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0045 ]--