diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-05-17 10:31:34 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-05-17 10:31:34 -0400 |
commit | 49553a4bdc31c75331fc1ba602ab440937ddab97 (patch) | |
tree | d9aa85633f42129bd55b35ccee20da7009b950a5 /src/romlayout.S | |
parent | 99e08b7fc3a6c5279a0d2d23c7d485698190ac50 (diff) | |
download | seabios-hppa-49553a4bdc31c75331fc1ba602ab440937ddab97.zip seabios-hppa-49553a4bdc31c75331fc1ba602ab440937ddab97.tar.gz seabios-hppa-49553a4bdc31c75331fc1ba602ab440937ddab97.tar.bz2 |
Verify ebda segment looks sane before using during resume.
Diffstat (limited to 'src/romlayout.S')
-rw-r--r-- | src/romlayout.S | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/romlayout.S b/src/romlayout.S index eca4240..9fe5c71 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -251,8 +251,13 @@ entry_post: movw $SEG_BDA, %ax movw %ax, %ds movw BDA_ebda_seg, %ax - // XXX - should verify ebda_seg looks sane. - movw %ax, %ds + + cmpw $EBDA_SEGMENT_START, %ax + jle 2f + // EBDA segment doesn't look valid - use startup value. + movw $EBDA_SEGMENT_START, %ax + +2: movw %ax, %ds movw %ax, %ss movl $EBDA_OFFSET_TOP_STACK, %esp |