about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-05-15 07:49:12 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-15 07:49:12 -0700
commitc26aef11b7c55b89e85cdd8f2b7e8254b180278d (patch)
tree1bc376cbaa13d7cee8f5b09761ff2fabb8e14f29
parenta577c7fcb031afb7efe5dafc48b81f6ea3a7b06b (diff)
downloadmu-c26aef11b7c55b89e85cdd8f2b7e8254b180278d.tar.gz
grow a few buffers until shell/ loads
-rw-r--r--317abort.subx11
-rwxr-xr-xtranslate_subx4
-rwxr-xr-xtranslate_subx_emulated4
3 files changed, 11 insertions, 8 deletions
diff --git a/317abort.subx b/317abort.subx
index 99e841c0..941862f9 100644
--- a/317abort.subx
+++ b/317abort.subx
@@ -27,10 +27,10 @@ dump-call-stack:
     51/push-ecx
     52/push-edx
     53/push-ebx
-    # var labels/edx: (addr stream {start-address, label-slice} 0x1000)
+    # var labels/edx: (addr stream {start-address, label-slice} 0x4000)
     # start addresses are in ascending order
-    81 5/subop/subtract %esp 0xc000/imm32
-    68/push  0xc000/imm32
+    81 5/subop/subtract %esp 0x30000/imm32  # 0x4000 labels * 12 bytes per label
+    68/push  0x30000/imm32
     68/push  0/imm32/read
     68/push  0/imm32/write
     89/<- %edx 4/r32/esp
@@ -81,8 +81,11 @@ load-debug-symbols:  # labels: (addr stream {start-address, label-slice})
     c7 0/subop/copy *ecx 0/imm32  # write index
     c7 0/subop/copy *(ecx+4) 0/imm32  # read index
     c7 0/subop/copy *(ecx+8) 0x01000000/imm32  # stream capacity = 16MB
-    # load 0x100 sectors starting from sector 10080 = 0x2760
+    # load 0x400 sectors starting from sector 10080 = 0x2760
     (load-sectors Primary-bus-primary-drive 0x2760 0x100 %ecx)
+    (load-sectors Primary-bus-primary-drive 0x2860 0x100 %ecx)
+    (load-sectors Primary-bus-primary-drive 0x2960 0x100 %ecx)
+    (load-sectors Primary-bus-primary-drive 0x2a60 0x100 %ecx)
     # - parse pointers to portions of this stream into labels
     # var curr/ecx: (addr byte) = s->data
     81 0/subop/add %ecx 0xc/imm32
diff --git a/translate_subx b/translate_subx
index 8d97b197..7b16425c 100755
--- a/translate_subx
+++ b/translate_subx
@@ -43,13 +43,13 @@ fi
 
 # Latter half of disk is for debug info.
 dd if=labels of=code.img seek=10080 conv=notrunc  # keep this sync'd with abort.subx
-if [ `stat --printf="%s" labels` -ge 131072 ]  # 256 sectors * 512 bytes per sector, the most an ATA drive can read in a single command
+if [ `stat --printf="%s" labels` -ge 524288 ]  # 4 reads * 256 sectors * 512 bytes per sector
 then
   echo "labels won't all be loaded on abort"
   exit 1
 fi
 
-if [ `wc -l < labels` -gt 4096 ]  # 0x1000 stream capacity in abort.subx
+if [ `wc -l < labels` -gt 16384 ]  # 0x4000 stream capacity in abort.subx
 then
   echo "abort will go into infinite regress"
   exit 1
diff --git a/translate_subx_emulated b/translate_subx_emulated
index 439befcd..fb89bfaf 100755
--- a/translate_subx_emulated
+++ b/translate_subx_emulated
@@ -47,13 +47,13 @@ fi
 
 # Latter half of disk is for debug info.
 dd if=labels of=code.img seek=10080 conv=notrunc  # keep this sync'd with abort.subx
-if [ `stat --printf="%s" labels` -ge 131072 ]  # 256 sectors * 512 bytes per sector, the most an ATA drive can read in a single command
+if [ `stat --printf="%s" labels` -ge 524288 ]  # 4 reads * 256 sectors * 512 bytes per sector
 then
   echo "labels won't all be loaded on abort"
   exit 1
 fi
 
-if [ `wc -l < labels` -gt 4096 ]  # 0x1000 stream capacity in abort.subx
+if [ `wc -l < labels` -gt 16384 ]  # 0x4000 stream capacity in abort.subx
 then
   echo "abort will go into infinite regress"
   exit 1