Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pci_subr.c
Context not available. | |||||
} | } | ||||
int | int | ||||
pcib_host_res_decodes(struct pcib_host_resources *hr, int type, u_long start, | pcib_host_res_decodes(struct pcib_host_resources *hr, int type, rman_res_t start, | ||||
u_long end, u_int flags) | rman_res_t end, u_int flags) | ||||
{ | { | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
int rid; | int rid; | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(hr->hr_pcib, "decoding %d %srange %#lx-%#lx\n", | device_printf(hr->hr_pcib, "decoding %d %srange %#jx-%#jx\n", | ||||
type, flags & RF_PREFETCHABLE ? "prefetchable ": "", start, | type, flags & RF_PREFETCHABLE ? "prefetchable ": "", start, | ||||
end); | end); | ||||
rid = resource_list_add_next(&hr->hr_rl, type, start, end, | rid = resource_list_add_next(&hr->hr_rl, type, start, end, | ||||
Context not available. | |||||
struct resource * | struct resource * | ||||
pcib_host_res_alloc(struct pcib_host_resources *hr, device_t dev, int type, | pcib_host_res_alloc(struct pcib_host_resources *hr, device_t dev, int type, | ||||
int *rid, u_long start, u_long end, u_long count, u_int flags) | int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
struct resource *r; | struct resource *r; | ||||
u_long new_start, new_end; | rman_res_t new_start, new_end; | ||||
if (flags & RF_PREFETCHABLE) | if (flags & RF_PREFETCHABLE) | ||||
KASSERT(type == SYS_RES_MEMORY, | KASSERT(type == SYS_RES_MEMORY, | ||||
Context not available. | |||||
if (((flags & RF_PREFETCHABLE) != 0) != | if (((flags & RF_PREFETCHABLE) != 0) != | ||||
((rle->flags & RLE_PREFETCH) != 0)) | ((rle->flags & RLE_PREFETCH) != 0)) | ||||
continue; | continue; | ||||
new_start = ulmax(start, rle->start); | new_start = ummax(start, rle->start); | ||||
new_end = ulmin(end, rle->end); | new_end = ummin(end, rle->end); | ||||
if (new_start > new_end || | if (new_start > new_end || | ||||
new_start + count - 1 > new_end || | new_start + count - 1 > new_end || | ||||
new_start + count < new_start) | new_start + count < new_start) | ||||
Context not available. | |||||
if (r != NULL) { | if (r != NULL) { | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(hr->hr_pcib, | device_printf(hr->hr_pcib, | ||||
"allocated type %d (%#lx-%#lx) for rid %x of %s\n", | "allocated type %d (%#jx-%#jx) for rid %x of %s\n", | ||||
type, rman_get_start(r), rman_get_end(r), | type, rman_get_start(r), rman_get_end(r), | ||||
*rid, pcib_child_name(dev)); | *rid, pcib_child_name(dev)); | ||||
return (r); | return (r); | ||||
Context not available. | |||||
int | int | ||||
pcib_host_res_adjust(struct pcib_host_resources *hr, device_t dev, int type, | pcib_host_res_adjust(struct pcib_host_resources *hr, device_t dev, int type, | ||||
struct resource *r, u_long start, u_long end) | struct resource *r, rman_res_t start, rman_res_t end) | ||||
{ | { | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
Context not available. | |||||
} | } | ||||
struct resource * | struct resource * | ||||
pci_domain_alloc_bus(int domain, device_t dev, int *rid, u_long start, | pci_domain_alloc_bus(int domain, device_t dev, int *rid, rman_res_t start, | ||||
u_long end, u_long count, u_int flags) | rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct pci_domain *d; | struct pci_domain *d; | ||||
struct resource *res; | struct resource *res; | ||||
Context not available. | |||||
int | int | ||||
pci_domain_adjust_bus(int domain, device_t dev, struct resource *r, | pci_domain_adjust_bus(int domain, device_t dev, struct resource *r, | ||||
u_long start, u_long end) | rman_res_t start, rman_res_t end) | ||||
{ | { | ||||
#ifdef INVARIANTS | #ifdef INVARIANTS | ||||
struct pci_domain *d; | struct pci_domain *d; | ||||
Context not available. |