update memory map doc and anticipate a gotcha
This commit is contained in:
parent
d0f39e75ca
commit
5aea0c11b7
|
@ -15,10 +15,10 @@
|
|||
# understand hardware interfaces well enough to explain to others.
|
||||
|
||||
# Memory map of a Mu computer:
|
||||
# code: currently 4 tracks loaded from the primary disk to [0x00007c00, 0x00048600)
|
||||
# code: some tracks loaded from primary disk to [0x00007c00, 0x00080000)
|
||||
# stack: grows down from 0x02000000 to 0x01000000
|
||||
# heap: [0x02000000, 0x08000000)
|
||||
# see 120allocate.subx; Qemu initializes with 128MB RAM by default
|
||||
# heap: [0x02000000, 0x80000000)
|
||||
# see 120allocate.subx; Qemu initializes with 128MB RAM by default; simulating 2GB RAM is known to work
|
||||
# Consult https://wiki.osdev.org/Memory_Map_(x86) before modifying any of
|
||||
# this. And don't forget to keep *stack-debug.subx in sync.
|
||||
|
||||
|
|
|
@ -41,6 +41,12 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ `stat --printf="%s" a.bin` -ge 492544 ] # 15 tracks * 63 sectors per track * 512 bytes per sector
|
||||
then
|
||||
echo "a.bin will overwrite BIOS/Video memory; you'll need to adjust boot.subx to load code to some other non-contiguous area of memory"
|
||||
exit 1
|
||||
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 524288 ] # 4 reads * 256 sectors * 512 bytes per sector
|
||||
|
|
|
@ -45,6 +45,12 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ `stat --printf="%s" a.bin` -ge 492544 ] # 15 tracks * 63 sectors per track * 512 bytes per sector
|
||||
then
|
||||
echo "a.bin will overwrite BIOS/Video memory; you'll need to adjust boot.subx to load code to some other non-contiguous area of memory"
|
||||
exit 1
|
||||
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 524288 ] # 4 reads * 256 sectors * 512 bytes per sector
|
||||
|
|
Loading…
Reference in New Issue