Lines Matching +full:0 +full:x100000
36 if (fnmatch("/proc/bus/pci/*", path, 0) == 0) { in map_mem()
59 return 0; in map_mem()
66 int i, n, r, rc = 0, result = 0; in scan_tree()
69 n = scandir(path, &namelist, 0, alphasort); in scan_tree()
70 if (n < 0) { in scan_tree()
75 for (i = 0; i < n; i++) { in scan_tree()
78 if (fnmatch(".", name, 0) == 0) in scan_tree()
80 if (fnmatch("..", name, 0) == 0) in scan_tree()
88 if (fnmatch(file, name, 0) == 0) { in scan_tree()
90 if (rc == 0) in scan_tree()
91 …fprintf(stderr, "PASS: %s 0x%lx-0x%lx is %s\n", path2, offset, offset + length, touch ? "readable"… in scan_tree()
92 else if (rc > 0) in scan_tree()
93 fprintf(stderr, "PASS: %s 0x%lx-0x%lx not mappable\n", path2, offset, offset + length); in scan_tree()
95 fprintf(stderr, "FAIL: %s 0x%lx-0x%lx not accessible\n", path2, offset, offset + length); in scan_tree()
100 if (r == 0 && S_ISDIR(buf.st_mode)) { in scan_tree()
102 if (rc < 0) in scan_tree()
122 size_t size = 0; in read_rom()
131 if (rc <= 0) { in read_rom()
139 if (rc > 0) in read_rom()
141 } while (rc > 0); in read_rom()
151 int i, n, r, rc = 0, result = 0; in scan_rom()
154 n = scandir(path, &namelist, 0, alphasort); in scan_rom()
155 if (n < 0) { in scan_rom()
160 for (i = 0; i < n; i++) { in scan_rom()
163 if (fnmatch(".", name, 0) == 0) in scan_rom()
165 if (fnmatch("..", name, 0) == 0) in scan_rom()
173 if (fnmatch(file, name, 0) == 0) { in scan_rom()
181 if (rc > 0) in scan_rom()
189 if (r == 0 && S_ISDIR(buf.st_mode)) { in scan_rom()
191 if (rc < 0) in scan_rom()
210 if (map_mem("/dev/mem", 0, 0xA0000, 1) == 0) in main()
211 fprintf(stderr, "PASS: /dev/mem 0x0-0xa0000 is readable\n"); in main()
213 fprintf(stderr, "FAIL: /dev/mem 0x0-0xa0000 not accessible\n"); in main()
222 if (map_mem("/dev/mem", 0xA0000, 0x20000, 0) == 0) in main()
223 fprintf(stderr, "PASS: /dev/mem 0xa0000-0xc0000 is mappable\n"); in main()
225 fprintf(stderr, "FAIL: /dev/mem 0xa0000-0xc0000 not accessible\n"); in main()
227 if (map_mem("/dev/mem", 0xC0000, 0x40000, 1) == 0) in main()
228 fprintf(stderr, "PASS: /dev/mem 0xc0000-0x100000 is readable\n"); in main()
230 fprintf(stderr, "FAIL: /dev/mem 0xc0000-0x100000 not accessible\n"); in main()
233 * Often you can map all the individual pieces above (0-0xA0000, in main()
234 * 0xA0000-0xC0000, and 0xC0000-0x100000), but can't map the whole in main()
239 rc = map_mem("/dev/mem", 0, 1024*1024, 0); in main()
240 if (rc == 0) in main()
241 fprintf(stderr, "PASS: /dev/mem 0x0-0x100000 is mappable\n"); in main()
242 else if (rc > 0) in main()
243 fprintf(stderr, "PASS: /dev/mem 0x0-0x100000 not mappable\n"); in main()
245 fprintf(stderr, "FAIL: /dev/mem 0x0-0x100000 not accessible\n"); in main()
247 scan_tree("/sys/class/pci_bus", "legacy_mem", 0, 0xA0000, 1); in main()
248 scan_tree("/sys/class/pci_bus", "legacy_mem", 0xA0000, 0x20000, 0); in main()
249 scan_tree("/sys/class/pci_bus", "legacy_mem", 0xC0000, 0x40000, 1); in main()
250 scan_tree("/sys/class/pci_bus", "legacy_mem", 0, 1024*1024, 0); in main()
254 scan_tree("/proc/bus/pci", "??.?", 0, 0xA0000, 1); in main()
255 scan_tree("/proc/bus/pci", "??.?", 0xA0000, 0x20000, 0); in main()
256 scan_tree("/proc/bus/pci", "??.?", 0xC0000, 0x40000, 1); in main()
257 scan_tree("/proc/bus/pci", "??.?", 0, 1024*1024, 0); in main()