- fix for mactel machines

This commit is contained in:
Peter Jones 2007-10-24 17:20:26 +00:00
parent 2dd634c55b
commit feb3fcf64f
2 changed files with 62 additions and 1 deletions

56
memtest-intelmac-3.diff Normal file
View File

@ -0,0 +1,56 @@
diff -urpN memtest86+-1.70/setup.S.mactel memtest86+-1.70/setup.S
--- memtest86+-1.70/setup.S.mactel 2007-10-24 13:10:59.000000000 -0400
+++ memtest86+-1.70/setup.S 2007-10-24 13:12:26.000000000 -0400
@@ -29,6 +29,33 @@ start:
lgdt gdt_48 - start # load gdt with whatever appropriate
# that was painless, now we enable A20
+# start from grub-a20.patch
+ /*
+ * try to switch gateA20 using PORT92, the "Fast A20 and Init"
+ * register
+ */
+ mov $0x92, %dx
+ inb %dx, %al
+ /* skip the port92 code if it's unimplemented (read returns 0xff) */
+ cmpb $0xff, %al
+ jz alt_a20_done
+
+ /* set or clear bit1, the ALT_A20_GATE bit */
+ movb 4(%esp), %ah
+ testb %ah, %ah
+ jz alt_a20_cont1
+ orb $2, %al
+ jmp alt_a20_cont2
+alt_a20_cont1:
+ and $0xfd, %al
+
+ /* clear the INIT_NOW bit; don't accidently reset the machine */
+alt_a20_cont2:
+ and $0xfe, %al
+ outb %al, %dx
+
+alt_a20_done:
+# end from grub-a20.patch
call empty_8042
@@ -67,6 +94,9 @@ data32 ljmp $KERNEL_CS, $(TSTLOAD <<4) #
empty_8042:
call delay
inb $0x64, %al # 8042 status port
+ cmpb $0xff, %al # from grub-a20-patch, skip if not impl
+ jz empty_8042_ret
+
testb $1, %al # output buffer?
jz no_output
call delay
@@ -76,6 +106,7 @@ empty_8042:
no_output:
testb $2, %al # is input buffer full?
jnz empty_8042 # yes - loop
+empty_8042_ret:
ret
#
# Delay is needed after doing i/o
diff -urpN memtest86+-1.70/memsize.c.mactel memtest86+-1.70/memsize.c

View File

@ -6,7 +6,7 @@
Summary: Stand-alone memory tester for x86 and x86-64 computers Summary: Stand-alone memory tester for x86 and x86-64 computers
Name: memtest86+ Name: memtest86+
Version: 1.70 Version: 1.70
Release: 3%{?dist} Release: 4%{?dist}
License: GPL License: GPL
ExclusiveArch: %{ix86} x86_64 ExclusiveArch: %{ix86} x86_64
Group: System Environment/Base Group: System Environment/Base
@ -19,6 +19,7 @@ Patch0: additional-lib-functions.diff
Patch1: console-boot-parameter.diff Patch1: console-boot-parameter.diff
Patch2: use-strtoul-in-getval.diff Patch2: use-strtoul-in-getval.diff
Patch3: parity-bits.diff Patch3: parity-bits.diff
Patch4: memtest-intelmac-3.diff
Requires(preun): coreutils Requires(preun): coreutils
# require glibc-devel.i386 via this file: # require glibc-devel.i386 via this file:
BuildRequires: %{_includedir}/gnu/stubs-32.h BuildRequires: %{_includedir}/gnu/stubs-32.h
@ -39,6 +40,7 @@ Run 'memtest-setup' to add to your GRUB or lilo boot menu.
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1
%build %build
# Regular build flags not wanted for this binary # Regular build flags not wanted for this binary
@ -70,6 +72,9 @@ rm -rf $RPM_BUILD_ROOT
/sbin/new-memtest-pkg --remove %{version} /sbin/new-memtest-pkg --remove %{version}
%changelog %changelog
* Wed Oct 24 2007 Peter Jones <pjones@redhat.com> - 1.70-4
- Fix for mactel.
* Thu Oct 18 2007 Warren Togami <wtogami@redhat.com> - 1.70-3 * Thu Oct 18 2007 Warren Togami <wtogami@redhat.com> - 1.70-3
- one more patch from mschmidt to allow configuration of parity and bits - one more patch from mschmidt to allow configuration of parity and bits