Lines Matching refs:ulong
51 #define KSEG_TO_PHYS(x) (((ulong)x) & ~KSEG)
53 #define ROUNDUP8(x) ((ulong)(((ulong)x)+7) & ~7)
54 #define ROUNDUP128(x) ((ulong)(((ulong)x) + 127) & ~127)
55 #define ROUNDUP8K(x) ((ulong)(((ulong)(x)) + 8191) & ~8191)
57 #define FIRST(x) ((((ulong)(x)) >> 33) & 0x3ff)
58 #define SECOND(x) ((((ulong)(x)) >> 23) & 0x3ff)
59 #define THIRD(x) ((((ulong)(x)) >> 13) & 0x3ff)
60 #define THIRD_XXX(x) ((((ulong)(x)) >> 13) & 0xfff)
61 #define PFN(x) ((((ulong)(x) & ~KSEG) >> 13))
64 #define KPTE(x) ((ulong)((((ulong)(x)) << 32) | 0x1101))
79 void JToKern(char *bootadr, ulong rpb_percpu, ulong free_pfn, ulong k_argc,
81 void JToPal(ulong bootadr);
87 ulong theLock;
89 extern void SpinLock(ulong *lock);
94 ulong rpb_percpu;
95 ulong free_pfn;
96 ulong argc;
97 ulong argv;
98 ulong envp; /* NULL */
228 ulong m5_tbb[] = { 0x1e1e1e1e1e1e1e1e, 0x1e1e1e1e1e1e1e1e,
324 ulong length;
348 ulong unix_boot_mem;
349 ulong bootadr;
353 ulong free_pfn;
364 ulong *first = 0;
365 ulong *third_rpb = 0;
366 ulong *reservedFixup = 0;
371 extern ulong _end;
376 ulong *second, *third_kernel, ptr, *tbb, size, *percpu_logout;
380 ulong kern_first_page;
381 ulong mem_size = m5Conf.mem_size;
383 ulong mem_pages = mem_size / PAGE_SIZE, cons_pages;
384 ulong mdt_bitmap_pages = mem_pages / (PAGE_SIZE*8);
386 ulong kernel_bytes, ksp, kernel_end, *unix_kernel_stack, bss,
395 ulong nextPtr;
423 first = (ulong *)unix_boot_alloc(1);
424 second = (ulong *)unix_boot_alloc(1);
425 third_rpb = (ulong *)unix_boot_alloc(1);
426 reservedFixup = (ulong*) unix_boot_alloc(1);
427 third_kernel = (ulong *)unix_boot_alloc(NUM_KERNEL_THIRD);
428 percpu_logout = (ulong*)unix_boot_alloc(1);
468 ulong *dbPage = (ulong*)unix_boot_alloc(1);
472 ulong *db = (ulong*)unix_boot_alloc(1);
505 ksp_bottom = (ulong)unix_boot_alloc(1);
507 ptr = (ulong) ksp_bottom;
535 tbb = (ulong *) (((char *) rpb) + ROUNDUP8(sizeof(struct rpb)));
536 rpb->rpb_trans_off = (ulong)tbb - (ulong)rpb;
563 ROUNDUP128(((ulong)tbb) + (sizeof(m5_tbb)));
565 rpb->rpb_percpu_off = (ulong)rpb_percpu - (ulong)rpb;
569 ((ulong)rpb_percpu + percpu_size * i);
585 nextPtr = (ulong)rpb_percpu + percpu_size * m5Conf.numCPUs;
593 rpb->rpb_ctb_off = ((ulong)rpb_ctb) - (ulong)rpb;
608 rpb_crb = (struct rpb_crb *) (((ulong)rpb_ctb) + sizeof(struct ctb_tt));
609 rpb->rpb_crb_off = ((ulong)rpb_crb) - (ulong)rpb;
619 rpb_crb->rpb_map[0].rpb_phys = KSEG_TO_PHYS(((ulong)rpb) & ~0x1fff);
625 rpb_mdt = (struct _m5_rpb_mdt *)((ulong)rpb_crb + sizeof(struct rpb_crb));
626 rpb->rpb_mdt_off = (ulong)rpb_mdt - (ulong)rpb;
667 rpb_dsr = (struct rpb_dsr *)((ulong)rpb_mdt + sizeof(struct _m5_rpb_mdt));
668 rpb->rpb_dsr_off = (ulong)rpb_dsr - (ulong)rpb;
673 rpb_lurt = (int *) ROUNDUP8((ulong)rpb_dsr + sizeof(struct rpb_dsr));
674 rpb_dsr->rpb_lurt_off = ((ulong) rpb_lurt) - (ulong) rpb_dsr;
677 rpb_name = (char *) ROUNDUP8(((ulong)rpb_lurt) + sizeof(m5_lurt));
678 rpb_dsr->rpb_sysname_off = ((ulong) rpb_name) - (ulong) rpb_dsr;
682 *(ulong *)rpb_name = sizeof(THENAME); /* put in length field */
685 rpb->rpb_size = ((ulong) &rpb_name[sum]) - (ulong)rpb;
691 ulong *rpbptr = (ulong*)((char*)rpb_dsr + sizeof(struct rpb_dsr));
694 (((ulong)rpbptr - (ulong)rpb) & (0x2000 * HWRPB_PAGES - 1));
698 *rpbptr++ = (ulong) consoleCallback;
701 (((ulong)rpbptr - (ulong)rpb) & (0x2000 * HWRPB_PAGES - 1));
704 *rpbptr++ = (ulong) consoleFixup;
718 ulong stack = (ulong)unix_boot_alloc(1);
726 if ((ulong)unix_boot_mem >= (ulong)m5Conf.kernStart) {
732 JToKern((char *)bootadr, (ulong)rpb_percpu, free_pfn, kargc, kargv, NULL);
737 JToKern(char *bootadr, ulong rpb_percpu, ulong free_pfn, ulong k_argc,
740 extern ulong palJToKern[];
755 kernel_params->argv = (ulong)k_argv;
756 kernel_params->envp = (ulong)envp;
766 JToPal(ulong bootadr)
1037 extern ulong palJToSlave[];
1049 cServe(KSEG_TO_PHYS(palJToSlave), (ulong)rpb->rpb_restart,
1061 ((ulong)rpb_percpu + size * cpu);