/bootloader/src/ |
A D | cmdline.c | 38 for (size_t n = 0; n < entry_count; n++) { in cmdline_to_string() local 39 if ((entry[n].klen + entry[n].vlen + 3) > max) { in cmdline_to_string() 43 if (n > 0) { in cmdline_to_string() 47 memcpy(ptr, entry[n].key, entry[n].klen); in cmdline_to_string() 53 memcpy(ptr, entry[n].val, entry[n].vlen); in cmdline_to_string() 78 size_t n; in entry_add() local 79 for (n = 0; n < entry_count; n++) { in entry_add() 80 if ((entry[n].klen == klen) && !memcmp(key, entry[n].key, klen)) { in entry_add() 92 entry[n].klen = klen; in entry_add() 148 for (size_t n = 0; n < entry_count; n++) { in cmdline_get() local [all …]
|
A D | inet6.h | 101 #define ntohs(n) _swap16(n) argument 102 #define htons(n) _swap16(n) argument 103 static inline uint16_t _swap16(uint16_t n) { in _swap16() argument 104 return (n >> 8) | (n << 8); in _swap16() 109 #define ntohl(n) _swap32(n) argument 110 #define htonl(n) _swap32(n) argument 111 static inline uint32_t _swap32(uint32_t n) { in _swap32() argument 112 return (n >> 24) | ((n >> 8) & 0xFF00) | in _swap32() 113 ((n & 0xFF00) << 8) | (n << 24); in _swap32()
|
A D | diskio.c | 135 for (size_t n = 0; n < count; n++) { in disk_find_boot() local 181 disk->h = list[n]; in disk_find_boot() 188 bs->CloseProtocol(list[n], &BlockIoProtocol, img, NULL); in disk_find_boot() 254 for (unsigned n = 0; n < gpt.entries_count; n++) { in disk_find_kernel() local 255 if ((table[n].first == 0) || in disk_find_kernel() 256 (table[n].last == 0) || in disk_find_kernel() 257 (table[n].last < table[n].first)) { in disk_find_kernel() 265 disk->first = table[n].first; in disk_find_kernel() 266 disk->last = table[n].last; in disk_find_kernel() 277 unsigned c = table[n].name[i*2 + 0] | (table[n].name[i*2 + 1] << 8); in disk_find_kernel() [all …]
|
A D | inet6.c | 23 #define BAD(n, ...) \ argument 270 uint16_t sum, n; in udp6_recv() local 287 if (n < UDP_HDR_LEN) in udp6_recv() 289 if (n > len) in udp6_recv() 291 len = n - UDP_HDR_LEN; in udp6_recv() 364 uint32_t n; in eth_recv() local 380 n = ntohs(ip->length); in eth_recv() 381 if (n > len) in eth_recv() 385 len = n; in eth_recv() 415 uint16_t n; in ip6toa() local [all …]
|
A D | netifc.c | 32 uint32_t n; member 36 uint32_t n = state->n; in rand32() local 37 n ^= (n << 13); in rand32() 38 n ^= (n >> 17); in rand32() 39 n ^= (n << 5); in rand32() 40 return (state->n = n); in rand32() 43 rand32_t rstate = {.n = 0x8716253}; 151 #define TIMER_MS(n) (((uint64_t)(n)) * 10000UL) argument
|
A D | osboot.h | 15 #define BYTES_TO_PAGES(n) (((n) + PAGE_MASK) / PAGE_SIZE) argument
|
A D | osboot.c | 241 int n = netboot_poll(); in do_netboot() local 242 if (n < 1) { in do_netboot() 315 static inline void swap_to_head(const char c, char* s, const size_t n) { in swap_to_head() argument 317 if (n == 0) return; in swap_to_head() 321 for (i = 0; i < n; i++) { in swap_to_head() 328 if (i == n) return; in swap_to_head()
|
A D | pci.c | 109 uint64_t n = ((uint64_t) pci_hdr.bar[0]) | in xefi_find_pci_mmio() local 111 *mmio = n & 0xFFFFFFFFFFFFFFF0UL; in xefi_find_pci_mmio()
|
A D | zircon.c | 165 unsigned n = 0; in identify_image() local 175 if (n != 0) { in identify_image() 191 n++; in identify_image()
|
/bootloader/lib/ |
A D | string.c | 9 void* memset(void* _dst, int c, size_t n) { in memset() argument 11 while (n-- > 0) { in memset() 17 void* memcpy(void* _dst, const void* _src, size_t n) { in memcpy() argument 20 while (n-- > 0) { in memcpy() 26 int memcmp(const void* _a, const void* _b, size_t n) { in memcmp() argument 29 while (n-- > 0) { in memcmp()
|
A D | printf.c | 59 if ((flag & SIGNEDFLAG) && (long long)n < 0) { in longlong_to_string() 61 n = -n; in longlong_to_string() 67 while (n >= 10) { in longlong_to_string() 68 int digit = n % 10; in longlong_to_string() 70 n /= 10; in longlong_to_string() 74 buf[--pos] = n + '0'; in longlong_to_string() 159 unsigned long long n; in _printf_engine() local 254 n = (flags & LONGLONGFLAG) ? va_arg(ap, long long) : in _printf_engine() 266 n = (flags & LONGLONGFLAG) ? va_arg(ap, unsigned long long) : in _printf_engine() 284 n = (flags & LONGLONGFLAG) ? va_arg(ap, unsigned long long) : in _printf_engine() [all …]
|
A D | console-printf.c | 21 int n = len; in _printf_console_out() local 22 while (n > 0) { in _printf_console_out() 32 n--; in _printf_console_out()
|
/bootloader/include/ |
A D | string.h | 9 void* memset(void* dst, int c, size_t n); 10 void* memcpy(void* dst, const void* src, size_t n); 11 int memcmp(const void* a, const void* b, size_t n);
|