flat assembler
Message board for the users of flat assembler.

Index > OS Construction > HDD access

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
neville wrote:
So how can large disks be accessed in long mode, using ports and controllers? Confused
That's what drivers are for. Now you know why it is important to properly match the driver to the hardware. With the wrong driver, at best simply won't work, and at worst can destroy data.
Post 14 Sep 2008, 04:44
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
edfed wrote:

there is no 32 bits LBA addresses.


Very true.

> only LBA 28 and LBA 48

Very true.

> FAT32 is FAT28

Very true. Evil or Very Mad But it limits to 2^28 clusters , not 2^28 sectors.

> with LBA28, you can theorically access up to 2^28*2^9 = 2^37 bytes.
256 Gigabytes.

Wrong. 2^37 bytes -> 128 GiB Wink

> revolution, getting back to nihilist's first question, is it possible to use INT 13h in long mode after all?

Switch to RM ? Idea

neville wrote:

Quote:
but also there are 32-bit absolute sectors. For example, in every HD partition table.


Very true.

> And of course in INT13h EDD BIOS extensions.

64-bit Very Happy

EDIT fixed bug


Last edited by DOS386 on 14 Sep 2008, 09:16; edited 2 times in total
Post 14 Sep 2008, 07:38
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
haha!
Quote:


Wrong. 2^37 bytes -> 128 MiB


no way!
2^10 ==> kilo
2^20 ==> mega
2^30 ==> giga
2^7 ==> 128

then, ok!
wrong but 128 GiB Wink

and the fact it is in clusters dn't change anythng.
there is a limit in LBA address lines.


Last edited by edfed on 14 Sep 2008, 10:01; edited 1 time in total
Post 14 Sep 2008, 09:08
View user's profile Send private message Visit poster's website Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
In (flat) real mode it is possible to use standard (extended) system bios calls to access large disks, which work on all types of hardware.

Revolution, are you saying that for a new OS in long mode, proprietary information from every manufacturer is needed so drivers can be written for each? That would probably be almost impossible to achieve IMHO. And anyway, if the bios programmers can write an essentially "universal" driver for real mode, surely the same could be done in long mode?

_________________
FAMOS - the first memory operating system
Post 14 Sep 2008, 09:28
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
neville wrote:
Revolution, are you saying that for a new OS in long mode, proprietary information from every manufacturer is needed so drivers can be written for each?
I sure am saying that.
neville wrote:
That would probably be almost impossible to achieve IMHO. And anyway, if the bios programmers can write an essentially "universal" driver for real mode, surely the same could be done in long mode?
It already happens with Win95 and up. It is not something new. The only change nowadays is that manufacturers must have their 64bit drivers signed by MS before Vista will load it.

As for *nix OSes, it has always been a problem to get good drivers. A lot of manufacturers seem reluctant to give all the necessary details. Take the GPU cards as an example. You only get the binary driver (no source code or other information) in most cases.

[edit]Remember the BIOS is not intended to give you full capability. It is only designed to give you enough access to start your OS. After that you are expected to take over with your own code/driver to make full use of all the available features.[/edit]
Post 14 Sep 2008, 09:40
View user's profile Send private message Visit poster's website Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
And in future the BIOS will be removed. EFI/UEFI will replace it in near future. So you can not base your OS on BIOS. You can start with BIOS for now... or use it if present and EFI is not ... but not for long


You have to do your own drivers and to provide an API for it so that applications (and binary applications) can use it to perform usefull specific tasks. You do not do that then you do not have an OS yet.

In fact OS kernel concepts or memory layouts are not the problem for OS development. The real problem are the drivers.

A very mundane and not funny problem the requires a lot of work and is complicated by the fact that manufacturers do not want to share information and make it complicated for the "single man team" with low budget to do this.

Hence as long as you keep your OS in real mode or in flat RM you hardly have an OS at all and soon you will not be able to boot it at all. For example I can not start Solar OS on Intel based Mac's because they have no BIOS... only EFI... although once in memory SOL would run because I do have the basic drivers now.

You need 32bit protected mode or 64 bits long mode (lately) and a lot of drivers for a lot of hardware. BIOS is still useful for staring up but with caution...

Yes it was a good idea but it gives you too much independence from profit making firms and it has to be eliminated and it will be eliminated now because the major competitors have the needed drivers. Do not dream.
Post 14 Sep 2008, 11:07
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
I agree with bogdanontanu, I think it's time to start using hardware more and software less.
Take a tcp/ip stack as a example, we know how long it would take to code one, then you can buy this http://www.futurlec.com/TCP-IP-DevelopmentBoard.shtml
If i were starting OS Dev today, i would code it for a arm chip.
Post 14 Sep 2008, 13:30
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville
Revolution, it's very sad really, but we must stand up and fight against these evil forces. What we need is a .... revolution !! Are you up for it Wink

Bogdan, sadly I fear you speak the truth too. But we must never stop dreaming, even if we think it is futile. If those b@#$%^& big corporate "profit making firms" take everything from us, including even our dreams, then they have won. Long live the "single man teams" and their dreams! Hey, that rhymes! Very Happy

Do you remember the ABBA hit "Money, Money, Money, must be funny, its a rich man's world" ? Can we prove them wrong?

Dex, you won't be able to use "their" hardware unless they tell you how, and/or you pay them enough money, so are you going to start building your own computers now? Bring it on ! Wink

_________________
FAMOS - the first memory operating system
Post 14 Sep 2008, 19:08
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
neville wrote:
Dex, you won't be able to use "their" hardware unless they tell you how, and/or you pay them enough money, so are you going to start building your own computers now? Bring it on ! Wink

No, i am not going to make one on my own, but a group of us are Cool .
http://www.openpandora.org/
Post 15 Sep 2008, 13:17
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
i don't see the link between money and HDD access.
maybe banks use HDD, and as it is the crisis, ho my god! wall street = -2% Shocked

pandora seems top be very good, but for arm Sad

just wait for PC/104 Atom duo. slots for CF and bios redirect of console to serial port.
Post 15 Sep 2008, 19:35
View user's profile Send private message Visit poster's website Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u
edfed wrote:


pandora seems top be very good, but for arm Sad

But asm arm is easy once you know x86 and you can still use fasm, eg: FasmArm
http://board.flatassembler.net/topic.php?t=4191&start=0
Post 16 Sep 2008, 15:18
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
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
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.