Lines Matching refs:ul

28 uint64_t mm_get_PDE(ul proc_page_table_addr, bool is_phys, ul virt_addr, bool clear);
51 memory_management_struct.kernel_code_start = (ul)&_text; in mm_init()
52 memory_management_struct.kernel_code_end = (ul)&_etext; in mm_init()
53 memory_management_struct.kernel_data_end = (ul)&_edata; in mm_init()
54 memory_management_struct.rodata_end = (ul)&_erodata; in mm_init()
55 memory_management_struct.start_brk = (ul)&_end; in mm_init()
90 ul addr_start = PAGE_2M_ALIGN(memory_management_struct.e820[i].BaseAddr); in mm_init()
92ul addr_end = ((memory_management_struct.e820[i].BaseAddr + memory_management_struct.e820[i].Lengt… in mm_init()
103ul max_addr = memory_management_struct.e820[memory_management_struct.len_e820].BaseAddr + memory_m… in mm_init()
126 …memory_management_struct.zones_struct = (struct Zone *)(((ul)memory_management_struct.pages_struct… in mm_init()
132 …gement_struct.zones_struct_len = (10 * sizeof(struct Zone) + sizeof(ul) - 1) & (~(sizeof(ul) - 1)); in mm_init()
143 ul addr_start = PAGE_2M_ALIGN(memory_management_struct.e820[i].BaseAddr); in mm_init()
144ul addr_end = (memory_management_struct.e820[i].BaseAddr + memory_management_struct.e820[i].Length… in mm_init()
196 …memory_management_struct.count_zones * sizeof(struct Zone) + sizeof(ul) - 1) & (~(sizeof(ul) - 1)); in mm_init()
204 …memory_management_struct.end_of_struct = (ul)((ul)memory_management_struct.zones_struct + memory_m… in mm_init()
207ul mms_max_page = (virt_2_phys(memory_management_struct.end_of_struct) >> PAGE_2M_SHIFT); // 内存管理单… in mm_init()
211 ul page_num; in mm_init()
213 for (ul j = 1; j <= mms_max_page; ++j) in mm_init()
238 initial_mm.data_addr_start = (ul)&_data; in mm_init()
241 initial_mm.rodata_addr_start = (ul)&_rodata; in mm_init()
242 initial_mm.rodata_addr_end = (ul)&_erodata; in mm_init()
266 unsigned long page_init(struct Page *page, ul flags) in page_init()
290 struct Page *alloc_pages(unsigned int zone_select, int num, ul flags) in alloc_pages()
292 ul zone_start = 0, zone_end = 0; in alloc_pages()
299 ul attr = flags; in alloc_pages()
333 ul page_start = (z->zone_addr_start >> PAGE_2M_SHIFT); in alloc_pages()
334 ul page_end = (z->zone_addr_end >> PAGE_2M_SHIFT); in alloc_pages()
336 ul tmp = 64 - page_start % 64; in alloc_pages()
337 for (ul j = page_start; j < page_end; j += ((j % 64) ? tmp : 64)) in alloc_pages()
341 ul *p = memory_management_struct.bmp + (j >> 6); in alloc_pages()
343 ul shift = j % 64; in alloc_pages()
344 ul tmp_num = ((1UL << num) - 1); in alloc_pages()
345 for (ul k = shift; k < 64; ++k) in alloc_pages()
351 ul start_page_num = j + k - shift; // 计算得到要开始获取的内存页的页号 in alloc_pages()
352 for (ul l = 0; l < num; ++l) in alloc_pages()
399 ul get_page_attr(struct Page *page) in get_page_attr()
417 ul set_page_attr(struct Page *page, ul flags) in set_page_attr()
451 ul page_num; in free_pages()
473 ul *global_CR3 = get_CR3(); in page_table_init()
476 ul *tmp_addr; in page_table_init()
487 …mm_map_proc_page_table((uint64_t)get_CR3(), true, (ul)phys_2_virt(p->addr_phys), p->addr_phys, PAG… in page_table_init()
530 uint64_t mm_get_PDE(ul proc_page_table_addr, bool is_phys, ul virt_addr, bool clear) in mm_get_PDE()
532 ul *tmp; in mm_get_PDE()
534 …tmp = phys_2_virt((ul *)((ul)proc_page_table_addr & (~0xfffUL)) + ((virt_addr >> PAGE_GDT_SHIFT) &… in mm_get_PDE()
536 … tmp = (ul *)((ul)proc_page_table_addr & (~0xfffUL)) + ((virt_addr >> PAGE_GDT_SHIFT) & 0x1ff); in mm_get_PDE()
542 tmp = phys_2_virt((ul *)(*tmp & (~0xfffUL)) + ((virt_addr >> PAGE_1G_SHIFT) & 0x1ff)); in mm_get_PDE()
549 tmp = phys_2_virt(((ul *)(*tmp & (~0xfffUL)) + (((ul)(virt_addr) >> PAGE_2M_SHIFT) & 0x1ff))); in mm_get_PDE()
597 ul page_start = (z->zone_addr_start >> PAGE_2M_SHIFT); in mm_find_page()
598 ul page_end = (z->zone_addr_end >> PAGE_2M_SHIFT); in mm_find_page()
600 ul tmp = 64 - page_start % 64; in mm_find_page()
601 for (ul j = page_start; j < page_end; j += ((j % 64) ? tmp : 64)) in mm_find_page()
605 ul *p = memory_management_struct.bmp + (j >> 6); in mm_find_page()
607 ul shift = j % 64; in mm_find_page()
608 for (ul k = shift; k < 64; ++k) in mm_find_page()