Permalink
Browse files

Clear decimal flag on entry to hypervisor via traps

  • Loading branch information...
gardners committed Aug 1, 2016
1 parent 9dc3c72 commit c87d272ea601088cad05e66f8c54cbd2fcec6308
Showing with 12 additions and 0 deletions.
  1. +7 −0 gs4510.vhdl
  2. +5 −0 kickstart_dos.a65
@@ -3229,6 +3229,13 @@ begin
hyper_map_offset_high <= reg_offset_high;
hyper_port_00 <= cpuport_ddr; hyper_port_01 <= cpuport_value;
hyper_p <= unsigned(virtual_reg_p);
-- NEVER leave the @#$%! decimal flag set when entering the hypervisor
-- (This took MONTHS to realise as the source of a MYRIAD of hypervisor
-- problems. Anyone removing this without asking Paul first will
-- be appropriately punished.)
flag_d <= '0';
-- Set registers for hypervisor mode.
-- Full hardware features available on entry to hypervisor
@@ -78,6 +78,11 @@ dos_and_process_trap:
; to hypervisor, but for now, we need to do this explicitly.
; Should be able to be removed after 20160103
sei
; XXX - We have just added a fix for this in the CPU, to CLEAR DECIMAL MODE
; on entry to the hypervisor. But I'm not taking any chances just now.
CLD
; Sub-function is selected by A.
; Bits 6-1 are the only ones used.
; Mask out bit 0 so that indirect jmp's are valid.

0 comments on commit c87d272

Please sign in to comment.