shithub: riscv

Download patch

ref: 0d5491fb083510fda1dc3c8a9fa15d45dc0fabcc
parent: f128c6eab00bb4ebb40d0afddf7824e5bc2e179a
author: cinap_lenrek <[email protected]>
date: Sun Aug 17 23:16:11 EDT 2014

pc, pc64: fix off by one error in _multibootentry

--- a/sys/src/9/pc/l.s
+++ b/sys/src/9/pc/l.s
@@ -67,9 +67,9 @@
 	SUBL	DI, CX
 	ADDL	CX, SI
 	ADDL	CX, DI
+	INCL	CX	/* one more for post decrement */
 	STD
 	REP; MOVSB
-	CLD
 	ADDL	$KZERO, BX
 	MOVL	BX, multiboot-KZERO(SB)
 	MOVL	$_startPADDR(SB), AX
--- a/sys/src/9/pc64/l.s
+++ b/sys/src/9/pc64/l.s
@@ -62,9 +62,9 @@
 	SUBL	DI, CX
 	ADDL	CX, SI
 	ADDL	CX, DI
+	INCL	CX	/* one more for post decrement */
 	STD
 	REP; MOVSB
-	CLD
 	MOVL	BX, multibootptr-KZERO(SB)
 	MOVL	$_protected<>-KZERO(SB), AX
 	JMP*	AX