Forum FAQForum FAQ SearchSearch MemberlistMemberlist   UsergroupsUsergroups RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Wim's BIOS RSS FeedRSS Log inLog in

Adding BIOS Routines

 
Post new topic   Reply to topic    Wim's BIOS Forum Index -> In-depth High-tech BIOS section

Recommended by Wim's BIOS...

BIOS Agent scan: Upgrade your BIOS! Driver Agent scan: Instant Access to 116,215 Device Drivers Updates!

View previous topic :: View next topic  
Author Message
KachiWachi
The New Guy


Joined: 29 Mar 2002
Posts: 1372
Location: Pennsylvania, USA

PostPosted: Tue Dec 07, 2004 12:43 pm     Post subject: Adding BIOS Routines Reply with quote

Hi All!!

Is it possible to add code to a BIOS to do "setup" prior to booting?

You all know my DFI BIOS has been patched for the K6-2/III+ series CPU's. There are functions though that are not set natively by the BIOS.

There have been utilities written to this after the system has booted, or from DOS, but could these utilities somehow be merged into the BIOS as seperate sub-routines, and added to the "setup screens" so that you could adjust them at the BIOS level manually? Automatic detection is not a requirement.

Mostly we are just talking an MSR register setting, so I invision this as adding a BIOS menu item with a selection "box" to a BIOS setup screen with available space, plus code that sets the actual MSR.

Setting for SCE - ON, OFF (1 bit)
Setting for EWB - None, Speculative, Global (2 bits)
Setting for UC/UW - None, Uncacheable, Write-Combined (2 bits)

Entry for MTRR - Hardest to do...as you need to make a data entry here manually for the MTRR registers. This one will use the most code space, especially if you tried to do it automatically, or added helpful menu settings. (30 bits)

The UC/UW/MTRR would be done twice, for a total of 64 bits.

Thoughts?
_________________
CPU - DFI 586IPVG, K6-2/+ 450 (Cyrix MII 433), i430VX, 128MB EDO.
BIOS patched by BiosMan (Jan Steunebrink).
Back to top
View user's profile Send private message
atang1
BIOS Newbie


Joined: 01 Jan 2005
Posts: 17
Location: Framingham, Ma.

PostPosted: Sat Jan 01, 2005 5:55 pm     Post subject: Reply with quote

Are you working with 1 mb roms? You are having all the fun.

Since bios is shadowed, you can patch in the shadowed dram area, even changed dynamically much easier and logical too.

I have suggested to Bill Gates a few years back; that they should do the dynamic adjustments to run the cpu at overclocked speeds. Then adjust the speed to cool the cpu when the diode in the cpu got too hot. When my computers have autoupdate from windows update, these computers run faster 20-30%, as tested by Sandra.

So, I encourage you to think further, and don't stop at just convenience, but actually dynamically adjust the cpu and other components in the computer directly from the shadowed bios. You still boot from the original bios safely.
Back to top
View user's profile Send private message
KachiWachi
The New Guy


Joined: 29 Mar 2002
Posts: 1372
Location: Pennsylvania, USA

PostPosted: Sun Jan 02, 2005 2:17 pm     Post subject: Reply with quote

I'd still use the DOS/Real mode utilities if it wasn't for the fact that I now run W2K on the machine...so this is no longer possible.
_________________
CPU - DFI 586IPVG, K6-2/+ 450 (Cyrix MII 433), i430VX, 128MB EDO.
BIOS patched by BiosMan (Jan Steunebrink).
Back to top
View user's profile Send private message
atang1
BIOS Newbie


Joined: 01 Jan 2005
Posts: 17
Location: Framingham, Ma.

PostPosted: Sun Jan 02, 2005 4:02 pm     Post subject: Reply with quote

Win2k and WinNT has better dos commands then 98 and ME?
Back to top
View user's profile Send private message
KachiWachi
The New Guy


Joined: 29 Mar 2002
Posts: 1372
Location: Pennsylvania, USA

PostPosted: Sun Jan 02, 2005 4:27 pm     Post subject: Reply with quote

The HAL layer prevents the utilities from working...
_________________
CPU - DFI 586IPVG, K6-2/+ 450 (Cyrix MII 433), i430VX, 128MB EDO.
BIOS patched by BiosMan (Jan Steunebrink).
Back to top
View user's profile Send private message
maman
Master Flasher


Joined: 31 Mar 2002
Posts: 161
Location: Taka Bonerate National Park, Indonesia

PostPosted: Sat Mar 05, 2005 8:49 am     Post subject: Reply with quote

I think what you need here is an NT kernel mode driver to access the hardware. It's not that hard to make one an make works in win 2K/XP. I've made one it in the past to tweak my chipset's memory controller Wink
_________________
-- Human knowledge belongs to the world --
Back to top
View user's profile Send private message Visit poster's website
KachiWachi
The New Guy


Joined: 29 Mar 2002
Posts: 1372
Location: Pennsylvania, USA

PostPosted: Sat Mar 05, 2005 3:50 pm     Post subject: Reply with quote

I currently use WAMonitor v.57 to set the MSR's to my liking, however, I wanted to add the routines to the BIOS, which was the intent of this post.

I'm not smart enough to do that...and I really don't know how much space this would even require code-wise.

WAMonitor uses MSRTOUCH.EXE to set the MSR's...and the file length is 2,592 bytes. The application itself is 368,640 bytes, though I don't think much of this would be needed in the BIOS itself, since you wouldn't need all of the display stuff, etc... Would BIOS code be about the same length?

Anyone have more thoughts on this?
_________________
CPU - DFI 586IPVG, K6-2/+ 450 (Cyrix MII 433), i430VX, 128MB EDO.
BIOS patched by BiosMan (Jan Steunebrink).
Back to top
View user's profile Send private message
maman
Master Flasher


Joined: 31 Mar 2002
Posts: 161
Location: Taka Bonerate National Park, Indonesia

PostPosted: Sun Mar 06, 2005 1:58 am     Post subject: Reply with quote

I've added routines to my BIOS (Award BIOS v4.51). Using a technique that I call "POST jump table hacking". For a couple of months it's stable enough, but recently I found that there still some minor issue. You might want to check it out :
Award Bios "POST Jump Table" Hacking

I don't know for sure if you are using award bios, but the basic idea might be applicable to your testbed too.
_________________
-- Human knowledge belongs to the world --


Last edited by maman on Tue Mar 08, 2005 4:06 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
KachiWachi
The New Guy


Joined: 29 Mar 2002
Posts: 1372
Location: Pennsylvania, USA

PostPosted: Sun Mar 06, 2005 12:52 pm     Post subject: Reply with quote

Yes...the BIOS is AWARD v4.51, and has had "jump to" routines added by BiosMan Jan to patch out the HDD bugs, and to add the K6+ routines.

Again...I just don't know that much about assembly, etc... so it is something I cannot do. I don't even know if this has been tried yet, as most BIOSes do not have these particular features to begin with. So it isn't just a matter of "borrowing" known code and patching it in place...

Thanks for the article. Looks like interesting reading.
_________________
CPU - DFI 586IPVG, K6-2/+ 450 (Cyrix MII 433), i430VX, 128MB EDO.
BIOS patched by BiosMan (Jan Steunebrink).
Back to top
View user's profile Send private message
apple_rom
Use my patch at your own risk!!


Joined: 07 Jan 2003
Posts: 125
Location: Minsk

PostPosted: Tue Mar 08, 2005 3:24 pm     Post subject: Reply with quote

1. Which _code_ have to adding?
2. BIOSPatcher can adding "user-subroutines" to patched bios (ask to me, how to do).
3. Or get directly link on bios for insert this code manual (need data).
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Wim's BIOS Forum Index -> In-depth High-tech BIOS section All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group