svn commit: r197501 - head/sys/dev/atkbdc

Andriy Gapon avg at icyb.net.ua
Mon Sep 28 12:44:02 UTC 2009


on 25/09/2009 23:07 paradox said the following:
> http://svn.freebsd.org/changeset/base/197501
> 
> would not be bad if someone is from developers who are develop the amd64 looked at the problem this commit
> 
> on arch amd64
> this code
> 
>  p = BIOS_PADDRTOVADDR((regs.R_ES << 4) + regs.R_BX);
>  if ((readb(p + 6) & 0x40) == 0)
> 
> page fault ot access violation when try to readb from p pointer
> 
> R_ES = 0xf000
> R_BX = 0xe6f5
> 
> as result it is a bios rom area
> on arch i386 this works but not work on amd64

It looks like on amd64 BIOS_PADDRTOVADDR should be defined in terms of the direct map.
Now, it is a twin of i386 definition.


> would be better to use BIOS_PADDRTOVADDR
> but we migrate to x86bios_offset to access rom bios area

I think that the code, as it is in svn now, does the right thing.

Not an expert, perhaps amd64 BIOS_PADDRTOVADDR should be aliased to PHYS_TO_DMAP.
Alan, what do you think?

-- 
Andriy Gapon


More information about the freebsd-current mailing list