2 * Copyright (c) 2003 Peter Wemm.
3 * Copyright (c) 1993 The Regents of the University of California.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Neither the name of the University nor the names of its contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 #include <machine/asmacros.h>
36 #include <machine/specialreg.h>
37 #include <machine/pmap.h>
46 movq $PAGE_SIZE/8,%rcx
65 * pagecopy(%rdi=from, %rsi=to)
69 movq $PAGE_SIZE/8,%rcx
87 * The loop takes 29 bytes. Ensure that it doesn't cross a 32-byte
92 movnti %rax,(%rdi,%rdx)
93 movnti %rax,8(%rdi,%rdx)
94 movnti %rax,16(%rdi,%rdx)
95 movnti %rax,24(%rdi,%rdx)
104 * memcmpy(b1, b2, len)
116 movzbl (%rdi,%rcx,1),%eax
117 movzbl (%rsi,%rcx,1),%r8d
123 movzbl (%rdi,%rcx,1),%eax
124 movzbl (%rsi,%rcx,1),%r8d
130 movzbl (%rdi,%rcx,1),%eax
131 movzbl (%rsi,%rcx,1),%r8d
137 movzbl (%rdi,%rcx,1),%eax
138 movzbl (%rsi,%rcx,1),%r8d
198 * memmove(dst, src, cnt)
200 * Adapted from bcopy written by:
201 * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800
210 cmpq %rcx,%r8 /* overlapping && src < dst? */
215 shrq $3,%rcx /* copy by 64-bit words */
219 andq $7,%rcx /* any bytes left? */
232 addq %rcx,%rdi /* copy backwards */
237 andq $7,%rcx /* any fractional bytes? */
242 movq %rdx,%rcx /* copy remainder by 32-bit words */
260 cmpq %rcx,%r8 /* overlapping && src < dst? */
269 addq %rcx,%rdi /* copy backwards */
282 * memcpy(dst, src, len)
285 * Note: memcpy does not support overlapping copies
293 shrq $3,%rcx /* copy by 64-bit words */
297 andq $7,%rcx /* any bytes left? */
320 * memset(dst, c, len)
328 movabs $0x0101010101010101,%rax
362 /* fillw(pat, base, cnt) */
363 /* %rdi,%rsi, %rdx */
375 /*****************************************************************************/
376 /* copyout and fubyte family */
377 /*****************************************************************************/
379 * Access user memory from inside the kernel. These routines should be
380 * the only places that do this.
382 * These routines set curpcb->pcb_onfault for the time they execute. When a
383 * protection violation occurs inside the functions, the trap handler
384 * returns to *curpcb->pcb_onfault instead of the function.
387 .macro SMAP_DISABLE smap
394 .macro SMAP_ENABLE smap
401 * copyout(from_kernel, to_user, len)
404 .macro COPYOUT smap erms
406 movq PCPU(CURPCB),%r9
407 movq $copy_fault,PCB_ONFAULT(%r9)
410 * Check explicitly for non-user addresses. If 486 write protection
411 * is being used, this check is essential because we are in kernel
412 * mode so the h/w does not provide any protection against writing
417 * First, prevent address wrapping.
423 * XXX STOP USING VM_MAXUSER_ADDRESS.
424 * It is an end address, not a max, so every time it is used correctly it
425 * looks like there is an off by one error, and of course it caused an off
426 * by one error in several places.
428 movq $VM_MAXUSER_ADDRESS,%rcx
433 * Set up arguments for rep movs*.
441 * Set return value to zero. Remaining failure mode goes through
457 movq %rax,PCB_ONFAULT(%r9)
467 movq %rax,PCB_ONFAULT(%r9)
472 ENTRY(copyout_nosmap_std)
473 COPYOUT smap=0 erms=0
474 END(copyout_nosmap_std)
476 ENTRY(copyout_smap_std)
477 COPYOUT smap=1 erms=0
478 END(copyout_smap_std)
480 ENTRY(copyout_nosmap_erms)
481 COPYOUT smap=0 erms=1
482 END(copyout_nosmap_erms)
484 ENTRY(copyout_smap_erms)
485 COPYOUT smap=1 erms=1
486 END(copyout_smap_erms)
489 * copyin(from_user, to_kernel, len)
492 .macro COPYIN smap erms
494 movq PCPU(CURPCB),%r9
495 movq $copy_fault,PCB_ONFAULT(%r9)
498 * make sure address is valid
503 movq $VM_MAXUSER_ADDRESS,%rcx
518 shrq $3,%rcx /* copy longword-wise */
522 andb $7,%cl /* copy remaining bytes */
525 movq %rax,PCB_ONFAULT(%r9)
535 movq %rax,PCB_ONFAULT(%r9)
540 ENTRY(copyin_nosmap_std)
542 END(copyin_nosmap_std)
544 ENTRY(copyin_smap_std)
548 ENTRY(copyin_nosmap_erms)
550 END(copyin_nosmap_erms)
552 ENTRY(copyin_smap_erms)
554 END(copyin_smap_erms)
557 /* Trap entry clears PSL.AC */
559 movq $0,PCB_ONFAULT(%r9)
565 * casueword32. Compare and set user integer. Returns -1 on fault,
566 * 0 if access was successful. Old value is written to *oldp.
567 * dst = %rdi, old = %esi, oldp = %rdx, new = %ecx
569 ENTRY(casueword32_nosmap)
571 movq PCPU(CURPCB),%r8
572 movq $fusufault,PCB_ONFAULT(%r8)
574 movq $VM_MAXUSER_ADDRESS-4,%rax
575 cmpq %rax,%rdi /* verify address is valid */
578 movl %esi,%eax /* old */
582 cmpxchgl %ecx,(%rdi) /* new = %ecx */
585 * The old value is in %eax. If the store succeeded it will be the
586 * value we expected (old) from before the store, otherwise it will
587 * be the current value. Save %eax into %esi to prepare the return
592 movq %rax,PCB_ONFAULT(%r8)
595 * Access the oldp after the pcb_onfault is cleared, to correctly
596 * catch corrupted pointer.
598 movl %esi,(%rdx) /* oldp = %rdx */
601 END(casueword32_nosmap)
603 ENTRY(casueword32_smap)
605 movq PCPU(CURPCB),%r8
606 movq $fusufault,PCB_ONFAULT(%r8)
608 movq $VM_MAXUSER_ADDRESS-4,%rax
609 cmpq %rax,%rdi /* verify address is valid */
612 movl %esi,%eax /* old */
617 cmpxchgl %ecx,(%rdi) /* new = %ecx */
621 * The old value is in %eax. If the store succeeded it will be the
622 * value we expected (old) from before the store, otherwise it will
623 * be the current value. Save %eax into %esi to prepare the return
628 movq %rax,PCB_ONFAULT(%r8)
631 * Access the oldp after the pcb_onfault is cleared, to correctly
632 * catch corrupted pointer.
634 movl %esi,(%rdx) /* oldp = %rdx */
637 END(casueword32_smap)
640 * casueword. Compare and set user long. Returns -1 on fault,
641 * 0 if access was successful. Old value is written to *oldp.
642 * dst = %rdi, old = %rsi, oldp = %rdx, new = %rcx
644 ENTRY(casueword_nosmap)
646 movq PCPU(CURPCB),%r8
647 movq $fusufault,PCB_ONFAULT(%r8)
649 movq $VM_MAXUSER_ADDRESS-4,%rax
650 cmpq %rax,%rdi /* verify address is valid */
653 movq %rsi,%rax /* old */
657 cmpxchgq %rcx,(%rdi) /* new = %rcx */
660 * The old value is in %rax. If the store succeeded it will be the
661 * value we expected (old) from before the store, otherwise it will
662 * be the current value.
666 movq %rax,PCB_ONFAULT(%r8)
670 END(casueword_nosmap)
672 ENTRY(casueword_smap)
674 movq PCPU(CURPCB),%r8
675 movq $fusufault,PCB_ONFAULT(%r8)
677 movq $VM_MAXUSER_ADDRESS-4,%rax
678 cmpq %rax,%rdi /* verify address is valid */
681 movq %rsi,%rax /* old */
686 cmpxchgq %rcx,(%rdi) /* new = %rcx */
690 * The old value is in %rax. If the store succeeded it will be the
691 * value we expected (old) from before the store, otherwise it will
692 * be the current value.
696 movq %rax,PCB_ONFAULT(%r8)
703 * Fetch (load) a 64-bit word, a 32-bit word, a 16-bit word, or an 8-bit
704 * byte from user memory.
705 * addr = %rdi, valp = %rsi
708 ENTRY(fueword_nosmap)
710 movq PCPU(CURPCB),%rcx
711 movq $fusufault,PCB_ONFAULT(%rcx)
713 movq $VM_MAXUSER_ADDRESS-8,%rax
714 cmpq %rax,%rdi /* verify address is valid */
719 movq %rax,PCB_ONFAULT(%rcx)
727 movq PCPU(CURPCB),%rcx
728 movq $fusufault,PCB_ONFAULT(%rcx)
730 movq $VM_MAXUSER_ADDRESS-8,%rax
731 cmpq %rax,%rdi /* verify address is valid */
738 movq %rax,PCB_ONFAULT(%rcx)
744 ENTRY(fueword32_nosmap)
746 movq PCPU(CURPCB),%rcx
747 movq $fusufault,PCB_ONFAULT(%rcx)
749 movq $VM_MAXUSER_ADDRESS-4,%rax
750 cmpq %rax,%rdi /* verify address is valid */
755 movq %rax,PCB_ONFAULT(%rcx)
759 END(fueword32_nosmap)
761 ENTRY(fueword32_smap)
763 movq PCPU(CURPCB),%rcx
764 movq $fusufault,PCB_ONFAULT(%rcx)
766 movq $VM_MAXUSER_ADDRESS-4,%rax
767 cmpq %rax,%rdi /* verify address is valid */
774 movq %rax,PCB_ONFAULT(%rcx)
780 ENTRY(fuword16_nosmap)
782 movq PCPU(CURPCB),%rcx
783 movq $fusufault,PCB_ONFAULT(%rcx)
785 movq $VM_MAXUSER_ADDRESS-2,%rax
790 movq $0,PCB_ONFAULT(%rcx)
797 movq PCPU(CURPCB),%rcx
798 movq $fusufault,PCB_ONFAULT(%rcx)
800 movq $VM_MAXUSER_ADDRESS-2,%rax
807 movq $0,PCB_ONFAULT(%rcx)
814 movq PCPU(CURPCB),%rcx
815 movq $fusufault,PCB_ONFAULT(%rcx)
817 movq $VM_MAXUSER_ADDRESS-1,%rax
822 movq $0,PCB_ONFAULT(%rcx)
829 movq PCPU(CURPCB),%rcx
830 movq $fusufault,PCB_ONFAULT(%rcx)
832 movq $VM_MAXUSER_ADDRESS-1,%rax
839 movq $0,PCB_ONFAULT(%rcx)
845 * Store a 64-bit word, a 32-bit word, a 16-bit word, or an 8-bit byte to
847 * addr = %rdi, value = %rsi
851 movq PCPU(CURPCB),%rcx
852 movq $fusufault,PCB_ONFAULT(%rcx)
854 movq $VM_MAXUSER_ADDRESS-8,%rax
855 cmpq %rax,%rdi /* verify address validity */
860 movq PCPU(CURPCB),%rcx
861 movq %rax,PCB_ONFAULT(%rcx)
868 movq PCPU(CURPCB),%rcx
869 movq $fusufault,PCB_ONFAULT(%rcx)
871 movq $VM_MAXUSER_ADDRESS-8,%rax
872 cmpq %rax,%rdi /* verify address validity */
879 movq PCPU(CURPCB),%rcx
880 movq %rax,PCB_ONFAULT(%rcx)
885 ENTRY(suword32_nosmap)
887 movq PCPU(CURPCB),%rcx
888 movq $fusufault,PCB_ONFAULT(%rcx)
890 movq $VM_MAXUSER_ADDRESS-4,%rax
891 cmpq %rax,%rdi /* verify address validity */
896 movq PCPU(CURPCB),%rcx
897 movq %rax,PCB_ONFAULT(%rcx)
904 movq PCPU(CURPCB),%rcx
905 movq $fusufault,PCB_ONFAULT(%rcx)
907 movq $VM_MAXUSER_ADDRESS-4,%rax
908 cmpq %rax,%rdi /* verify address validity */
915 movq PCPU(CURPCB),%rcx
916 movq %rax,PCB_ONFAULT(%rcx)
921 ENTRY(suword16_nosmap)
923 movq PCPU(CURPCB),%rcx
924 movq $fusufault,PCB_ONFAULT(%rcx)
926 movq $VM_MAXUSER_ADDRESS-2,%rax
927 cmpq %rax,%rdi /* verify address validity */
932 movq PCPU(CURPCB),%rcx /* restore trashed register */
933 movq %rax,PCB_ONFAULT(%rcx)
940 movq PCPU(CURPCB),%rcx
941 movq $fusufault,PCB_ONFAULT(%rcx)
943 movq $VM_MAXUSER_ADDRESS-2,%rax
944 cmpq %rax,%rdi /* verify address validity */
951 movq PCPU(CURPCB),%rcx /* restore trashed register */
952 movq %rax,PCB_ONFAULT(%rcx)
959 movq PCPU(CURPCB),%rcx
960 movq $fusufault,PCB_ONFAULT(%rcx)
962 movq $VM_MAXUSER_ADDRESS-1,%rax
963 cmpq %rax,%rdi /* verify address validity */
969 movq PCPU(CURPCB),%rcx /* restore trashed register */
970 movq %rax,PCB_ONFAULT(%rcx)
977 movq PCPU(CURPCB),%rcx
978 movq $fusufault,PCB_ONFAULT(%rcx)
980 movq $VM_MAXUSER_ADDRESS-1,%rax
981 cmpq %rax,%rdi /* verify address validity */
989 movq PCPU(CURPCB),%rcx /* restore trashed register */
990 movq %rax,PCB_ONFAULT(%rcx)
996 /* Fault entry clears PSL.AC */
998 movq PCPU(CURPCB),%rcx
1000 movq %rax,PCB_ONFAULT(%rcx)
1006 * copyinstr(from, to, maxlen, int *lencopied)
1007 * %rdi, %rsi, %rdx, %rcx
1009 * copy a string from 'from' to 'to', stop when a 0 character is reached.
1010 * return ENAMETOOLONG if string is longer than maxlen, and
1011 * EFAULT on protection violations. If lencopied is non-zero,
1012 * return the actual length in *lencopied.
1014 .macro COPYINSTR smap
1016 movq %rdx,%r8 /* %r8 = maxlen */
1017 movq PCPU(CURPCB),%r9
1018 movq $cpystrflt,PCB_ONFAULT(%r9)
1020 movq $VM_MAXUSER_ADDRESS,%rax
1022 /* make sure 'from' is within bounds */
1028 /* restrict maxlen to <= VM_MAXUSER_ADDRESS-from */
1036 jz copyinstr_toolong
1038 jz copyinstr_toolong_smap
1050 /* Success -- 0 byte reached */
1054 /* set *lencopied and return %eax */
1055 movq %rax,PCB_ONFAULT(%r9)
1072 ENTRY(copyinstr_nosmap)
1074 END(copyinstr_nosmap)
1076 ENTRY(copyinstr_smap)
1081 /* Fault entry clears PSL.AC */
1084 /* set *lencopied and return %eax */
1085 movq $0,PCB_ONFAULT(%r9)
1095 copyinstr_toolong_smap:
1098 /* rdx is zero - return ENAMETOOLONG or EFAULT */
1099 movq $VM_MAXUSER_ADDRESS,%rax
1102 movl $ENAMETOOLONG,%eax
1106 * copystr(from, to, maxlen, int *lencopied)
1107 * %rdi, %rsi, %rdx, %rcx
1111 movq %rdx,%r8 /* %r8 = maxlen */
1124 /* Success -- 0 byte reached */
1130 /* set *lencopied and return %rax */
1137 /* rdx is zero -- return ENAMETOOLONG */
1138 movl $ENAMETOOLONG,%eax
1143 * Handling of special amd64 registers and descriptor tables etc
1145 /* void lgdt(struct region_descriptor *rdp); */
1147 /* reload the descriptor table */
1150 /* flush the prefetch q */
1157 movl %eax,%fs /* Beware, use wrmsr to set 64 bit base */
1161 /* reload code selector by turning return into intersegmental return */
1169 /*****************************************************************************/
1170 /* setjump, longjump */
1171 /*****************************************************************************/
1174 movq %rbx,0(%rdi) /* save rbx */
1175 movq %rsp,8(%rdi) /* save rsp */
1176 movq %rbp,16(%rdi) /* save rbp */
1177 movq %r12,24(%rdi) /* save r12 */
1178 movq %r13,32(%rdi) /* save r13 */
1179 movq %r14,40(%rdi) /* save r14 */
1180 movq %r15,48(%rdi) /* save r15 */
1181 movq 0(%rsp),%rdx /* get rta */
1182 movq %rdx,56(%rdi) /* save rip */
1183 xorl %eax,%eax /* return(0); */
1188 movq 0(%rdi),%rbx /* restore rbx */
1189 movq 8(%rdi),%rsp /* restore rsp */
1190 movq 16(%rdi),%rbp /* restore rbp */
1191 movq 24(%rdi),%r12 /* restore r12 */
1192 movq 32(%rdi),%r13 /* restore r13 */
1193 movq 40(%rdi),%r14 /* restore r14 */
1194 movq 48(%rdi),%r15 /* restore r15 */
1195 movq 56(%rdi),%rdx /* get rta */
1196 movq %rdx,0(%rsp) /* put in return frame */
1197 xorl %eax,%eax /* return(1); */
1203 * Support for reading MSRs in the safe manner. (Instead of panic on #gp,
1207 /* int rdmsr_safe(u_int msr, uint64_t *data) */
1209 movq PCPU(CURPCB),%r8
1210 movq $msr_onfault,PCB_ONFAULT(%r8)
1212 rdmsr /* Read MSR pointed by %ecx. Returns
1213 hi byte in edx, lo in %eax */
1214 salq $32,%rdx /* sign-shift %rdx left */
1215 movl %eax,%eax /* zero-extend %eax -> %rax */
1219 movq %rax,PCB_ONFAULT(%r8)
1224 * Support for writing MSRs in the safe manner. (Instead of panic on #gp,
1228 /* int wrmsr_safe(u_int msr, uint64_t data) */
1230 movq PCPU(CURPCB),%r8
1231 movq $msr_onfault,PCB_ONFAULT(%r8)
1236 wrmsr /* Write MSR pointed by %ecx. Accepts
1237 hi byte in edx, lo in %eax. */
1239 movq %rax,PCB_ONFAULT(%r8)
1244 * MSR operations fault handler
1248 movq $0,PCB_ONFAULT(%r8)
1254 * void pmap_pti_pcid_invalidate(uint64_t ucr3, uint64_t kcr3);
1255 * Invalidates address space addressed by ucr3, then returns to kcr3.
1256 * Done in assembler to ensure no other memory accesses happen while
1260 ENTRY(pmap_pti_pcid_invalidate)
1263 movq %rdi,%cr3 /* to user page table */
1264 movq %rsi,%cr3 /* back to kernel */
1269 * void pmap_pti_pcid_invlpg(uint64_t ucr3, uint64_t kcr3, vm_offset_t va);
1270 * Invalidates virtual address va in address space ucr3, then returns to kcr3.
1273 ENTRY(pmap_pti_pcid_invlpg)
1276 movq %rdi,%cr3 /* to user page table */
1278 movq %rsi,%cr3 /* back to kernel */
1283 * void pmap_pti_pcid_invlrng(uint64_t ucr3, uint64_t kcr3, vm_offset_t sva,
1285 * Invalidates virtual addresses between sva and eva in address space ucr3,
1286 * then returns to kcr3.
1289 ENTRY(pmap_pti_pcid_invlrng)
1292 movq %rdi,%cr3 /* to user page table */
1294 addq $PAGE_SIZE,%rdx
1297 movq %rsi,%cr3 /* back to kernel */
1302 .macro ibrs_seq_label l
1305 .macro ibrs_call_label l
1308 .macro ibrs_seq count
1311 ibrs_call_label %(ll)
1313 ibrs_seq_label %(ll)
1319 /* all callers already saved %rax, %rdx, and %rcx */
1320 ENTRY(handle_ibrs_entry)
1321 cmpb $0,hw_ibrs_active(%rip)
1323 movl $MSR_IA32_SPEC_CTRL,%ecx
1325 orl $(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax
1326 orl $(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32,%edx
1328 movb $1,PCPU(IBPB_SET)
1329 testl $CPUID_STDEXT_SMEP,cpu_stdext_feature(%rip)
1333 END(handle_ibrs_entry)
1335 ENTRY(handle_ibrs_exit)
1336 cmpb $0,PCPU(IBPB_SET)
1338 movl $MSR_IA32_SPEC_CTRL,%ecx
1340 andl $~(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax
1341 andl $~((IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32),%edx
1343 movb $0,PCPU(IBPB_SET)
1345 END(handle_ibrs_exit)
1347 /* registers-neutral version, but needs stack */
1348 ENTRY(handle_ibrs_exit_rs)
1349 cmpb $0,PCPU(IBPB_SET)
1354 movl $MSR_IA32_SPEC_CTRL,%ecx
1356 andl $~(IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP),%eax
1357 andl $~((IA32_SPEC_CTRL_IBRS|IA32_SPEC_CTRL_STIBP)>>32),%edx
1362 movb $0,PCPU(IBPB_SET)
1364 END(handle_ibrs_exit_rs)
1369 * Flush L1D cache. Load enough of the data from the kernel text
1370 * to flush existing L1D content.
1372 * N.B. The function does not follow ABI calling conventions, it corrupts %rbx.
1373 * The vmm.ko caller expects that only %rax, %rdx, %rbx, %rcx, %r9, and %rflags
1374 * registers are clobbered. The NMI handler caller only needs %r13 preserved.
1377 #define L1D_FLUSH_SIZE (64 * 1024)
1379 movq $-L1D_FLUSH_SIZE, %rcx
1381 * pass 1: Preload TLB.
1382 * Kernel text is mapped using superpages. TLB preload is
1383 * done for the benefit of older CPUs which split 2M page
1384 * into 4k TLB entries.
1386 1: movb L1D_FLUSH_SIZE(%r9, %rcx), %al
1387 addq $PAGE_SIZE, %rcx
1391 movq $-L1D_FLUSH_SIZE, %rcx
1392 /* pass 2: Read each cache line. */
1393 2: movb L1D_FLUSH_SIZE(%r9, %rcx), %al
1398 #undef L1D_FLUSH_SIZE