machdep.c (db27818234e734a9042648471c36a507c6c80bdc) | machdep.c (4d1dd74a5017583ecbf3aa1bc8a92d30fe3fd6f5) |
---|---|
1/*- 2 * Copyright (c) 2014 Andrew Turner 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 96 unchanged lines hidden (view full) --- 105 106struct kva_md_info kmi; 107 108int64_t dcache_line_size; /* The minimum D cache line size */ 109int64_t icache_line_size; /* The minimum I cache line size */ 110int64_t idcache_line_size; /* The minimum cache line size */ 111int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ 112 | 1/*- 2 * Copyright (c) 2014 Andrew Turner 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 96 unchanged lines hidden (view full) --- 105 106struct kva_md_info kmi; 107 108int64_t dcache_line_size; /* The minimum D cache line size */ 109int64_t icache_line_size; /* The minimum I cache line size */ 110int64_t idcache_line_size; /* The minimum cache line size */ 111int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ 112 |
113/* pagezero_* implementations are provided in support.S */ 114void pagezero_simple(void *); 115void pagezero_cache(void *); 116 117/* pagezero_simple is default pagezero */ 118void (*pagezero)(void *p) = pagezero_simple; 119 |
|
113static void 114cpu_startup(void *dummy) 115{ 116 117 identify_cpu(); 118 119 vm_ksubmap_init(&kmi); 120 bufinit(); --- 691 unchanged lines hidden (view full) --- 812 813 /* Check if dc zva is not prohibited */ 814 if (dczid_el0 & DCZID_DZP) 815 dczva_line_size = 0; 816 else { 817 /* Same as with above calculations */ 818 dczva_line_shift = DCZID_BS_SIZE(dczid_el0); 819 dczva_line_size = sizeof(int) << dczva_line_shift; | 120static void 121cpu_startup(void *dummy) 122{ 123 124 identify_cpu(); 125 126 vm_ksubmap_init(&kmi); 127 bufinit(); --- 691 unchanged lines hidden (view full) --- 819 820 /* Check if dc zva is not prohibited */ 821 if (dczid_el0 & DCZID_DZP) 822 dczva_line_size = 0; 823 else { 824 /* Same as with above calculations */ 825 dczva_line_shift = DCZID_BS_SIZE(dczid_el0); 826 dczva_line_size = sizeof(int) << dczva_line_shift; |
827 828 /* Change pagezero function */ 829 pagezero = pagezero_cache; |
|
820 } 821} 822 823void 824initarm(struct arm64_bootparams *abp) 825{ 826 struct efi_map_header *efihdr; 827 struct pcpu *pcpup; --- 192 unchanged lines hidden --- | 830 } 831} 832 833void 834initarm(struct arm64_bootparams *abp) 835{ 836 struct efi_map_header *efihdr; 837 struct pcpu *pcpup; --- 192 unchanged lines hidden --- |