orbital/resources/boot/grub/env-176.cfg
2017-12-08 17:09:09 -08:00

36 lines
1.2 KiB
INI

source (memdisk)/boot/grub/env-common.cfg
### OPTIONAL
# Enable bootverbose flag
# =======================
# This flags is set whenever `boothowto` has the flag 0x800 enabled.
# Since `boothowto` is hardcoded inside `hammer_time`, we patch the
# corresponding `mov` instruction.
write_dword 0x260443C 0x800 0x800
### REQUIRED
# Enable cn_mute flag
# ===================
# During initialization in `hammer_time`, the function `pmap_bootstrap` is
# called which will always call `printf` (and thus `cnputc`) on success.
# This requires the `cn_devlist` data structure to be filled by `cninit`.
# However, `cninit` is not called until after `pmap_bootstrap` has returned.
# To prevent this issue, we manually enable the `cn_mute` flag, which will be
# set or unset during `cninit` based on boot flags.
# Values:
# - 0x0 Disable cn_mute
# - 0x1 Enable cn_mute
write_dword 0x32B3A98 0x1
# Fix cn_devlist
# ==============
# This linked list should point back to its head, but for some
# inexplicable reason it points to cn_devtab, causing problems.
# during cnremove / cnadd operations.
write_dword 0x3235510 0x0
write_dword 0x3235514 0x0
write_dword 0x3235518 0x83235510
write_dword 0x323551C 0xFFFFFFFF