Plan 9 from Bell Labs’s /sources/contrib/mospak/9-pcboot-e820-regs/9-pcboot-e820-regs.diff

Copyright © 2026 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


--- sys/src/9/pcboot/l16r.s
+++ sys/src/9/pcboot/l16r.s
@@ -83,7 +83,7 @@
 	OPSIZE; ANDL $~(BY2PG-1), AX
 	OPSIZE; SHRL $4, AX
 	SW(rAX, _ES(SB))
-	CLR(rDI)
+	OPSIZE; CLR(rDI)		/* E820 may use all of EDI */
 	SW(rDI, _DI(SB))
 
 	MTSR(rAX, rES)
@@ -142,9 +142,9 @@
 	STOSW
 	STOSW
 
-	CLR(rBX)
+	OPSIZE; CLR(rBX)
 	PUSHR(rBX)			/* keep loop count on stack */
-					/* BX is the continuation value */
+					/* EBX is the continuation value */
 _e820loop:
 	POPR(rAX)
 	INC(rAX)
--- sys/src/9/pcboot/ldecomp.s
+++ sys/src/9/pcboot/ldecomp.s
@@ -67,7 +67,7 @@
 	OPSIZE; ANDL $~(BY2PG-1), AX
 	OPSIZE; SHRL $4, AX
 	SW(rAX, _ES(SB))
-	CLR(rDI)
+	OPSIZE; CLR(rDI)		/* E820 may use all of EDI */
 	SW(rDI, _DI(SB))
 
 	MTSR(rAX, rES)
@@ -126,9 +126,9 @@
 	STOSW
 	STOSW
 
-	CLR(rBX)
+	OPSIZE; CLR(rBX)
 	PUSHR(rBX)			/* keep loop count on stack */
-					/* BX is the continuation value */
+					/* EBX is the continuation value */
 _e820loop:
 	POPR(rAX)
 	INC(rAX)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2026 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.