FAQ : PORT IO

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
suresh
Posts: 5
Joined: Mon Jan 16, 2012 5:38 am

FAQ : PORT IO

Post by suresh »

I have referred the Port IO topic it contains programming information. I need to know all the ports available and their usage in order to write my own additional bios code. I am developing a new OS, so I thought writing additional BIOS required for using the graphics card in my system "SAMSUNG NP-N148-DA02IN" contains Phoenix Secure Core. so where should I refere for programming information either Intel Manual or the Mother Board Manual or WHAT?
CrypticalCode0
Member
Member
Posts: 81
Joined: Wed Nov 09, 2011 2:21 am
Location: Behind a keyboard located in The Netherlands

Re: FAQ : PORT IO

Post by CrypticalCode0 »

The motherboard manual usually tells you squat, the intel manual it depends.
You should check which chips are on the system and search for their manuals.

XenOS was working on such a DB. http://forum.osdev.org/viewtopic.php?f=2&t=24577
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: FAQ : PORT IO

Post by JAAman »

in the old days, the motherboard manual would list all the I/O ports, MMIO addresses, and DMA channels in use, however...

with the exception of a small number of old devices, all I/O ports are assigned by the BIOS (and can be, but usually aren't, changed by the OS) at runtime -- which means most of the port assignments can (in theory) be different each time you boot the system, so making a list in the manual doesn't make any sense anymore

while your MB manual might have some information (although i haven't seen a port list in a MB manual in many years), and the chipset manual might have some more information, for most devices you will need to autodetect at runtime what ports they are using

as for the usage of the ports, that would be detailed in the relevant manual for the particular device using the port (the MB manual won't have any information on this, but for old standards our wiki should)


that is general information, however, in the case of graphics hardware, the BIOS code is not actually on the MB (unless you are talking about integrated graphics) rather it is on the video card (the system BIOS is supposed to contain code for using an old CGA/MGA graphics cards, and anything else overrides that with its own code) -- and any information about graphics controllers may be difficult to obtain (afaik, only intel and AMD have official programing information easily available)

realistically, there should never be a reason to extend the BIOS code just for writing an OS (no matter what hardware you are using), but since i do not know the specifics of your situation i cannot comment further
User avatar
xenos
Member
Member
Posts: 1118
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: FAQ : PORT IO

Post by xenos »

Indeed this is the type of information I'm trying to collect in my database. However, I don't have any information on that particular notebook yet.

Usually there are not so many possible sources of information:
  • If the hardware manufacturer offers a technical manual with the port assignments / hardware registers / whatever, you're lucky. You will probably find some programming information in there.
  • If there is no such information available, but someone has played around with the hardware before (for example, written a Linux driver for it), you might be able to figure out the hardware registers from looking at the code.
  • If nobody has played around with the device before, the only choice to have is to figure out the hardware registers yourself. Yon could first try to figure out which chips are contained in the device (either by disassembling it or by looking at diagnostic output from Linux or some hardware detection tools) and look for datasheets of that chips. You could also try to disassemble the BIOS code and try to figure out which ports are being accessed.
If you find out anything interested, maybe you are willing to share some parts of it? :)
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: FAQ : PORT IO

Post by neon »

CrypticalCode0 wrote:The motherboard manual usually tells you squat
The motherboard manual yes, but the specification for the manual tells you everything, including MMIO and PIO port ranges. If you want to write "BIOS code" you'll need the specification.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
suresh
Posts: 5
Joined: Mon Jan 16, 2012 5:38 am

Re: FAQ : PORT IO

Post by suresh »

DATA BASE: http://hardware.wikinet.org/wiki/Main_Page

I am working on the netbooks. This is the first netbook from SAMSUNG. I can explore more on this dealing with SAMSUNG technical support team and INTEL support team. Every one knows from the product company about the serial number like NP-N148-DA02IN. Next step is to find the mother board used, chipset, whether motherboard manual is avialable link for it. I am ready to post all my analysis on your DB.
suresh
Posts: 5
Joined: Mon Jan 16, 2012 5:38 am

Re: FAQ : PORT IO

Post by suresh »

http://motherboards.mbarron.net/home.html

Already a web site available for mother board manuals.
Post Reply