Forum

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
SeaBios IDE fixed native mode...but why not Legacy mode??
2015 年 02 月 09 日
11:20:21
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline
21

roboard said
some progress update:
I just finish the spi floppy implementation tonight, and the first test seems to work. If it continues to work fine in later tests, I will push it to github on Monday.

Thank you. Some 10 years ago I implemented a simple read-only drive A: emulation int 13h hook in my ROMOS project (all in assembler) that used one 64k segment in rom space to serve fat12 image. I'm quite busy so no time for coding but I like to try recompile with your patch when avail. ASAP I can :)

2015 年 02 月 09 日
22:10:16
roboard
Admin
Forum Posts: 135
Member Since:
2013 年 10 月 05 日
Offline

Hi Glaux,
SegBIOS with my SPI floppy implementation has been pushed to github:

https://github.com/roboard/seabios/tree/86duino-bios-0.9beta-oss-spifloppy

The implementation is in src/hw/spi-floppy.c
Read/write operations are supported. But I write it for easy understanding and so do no much on optimizing performance.

You can use the BIOS engineer's build script (https://github.com/roboard/build-coreboot) to build it with the following instructions:

1. First, download coreboot/SeaBIOS source code for 86Duino:

./clone-repo.sh

2. Build cross gcc compiler, it may take several minutes:

./build-xgcc.sh

3. Build the target :

./set-target.sh target/86duino-0.9beta-oss.opt
cd seabios
git checkout 86duino-bios-0.9beta-oss-spifloppy
cd ..
make

2015 年 02 月 10 日
01:23:30
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline

The implementation is in src/hw/spi-floppy.c
Read/write operations are supported. But I write it for easy understanding and so do no much on optimizing performance.

Thank you. I understand that was a quick coding but why in function
static void spi_flash_read_sector(u32 sector_idx, u32 buf)
it's readed by 128B blocks instead o 512B? I mean there are 2 nested cycles, outer loop goes from 0 to 348 and inner loop read bytes from 0-127.
I think there should be enough memory buffer for at least one sector. I would also like to optimize it for block read (no CS# going low and high all the time). I can do it myself and perform some test. How then could I contribute to GIT repo?

2015 年 02 月 10 日
04:10:42
roboard
Admin
Forum Posts: 135
Member Since:
2013 年 10 月 05 日
Offline

Glaux said
Thank you. I understand that was a quick coding but why in function
static void spi_flash_read_sector(u32 sector_idx, u32 buf)
it's readed by 128B blocks instead o 512B? I mean there are 2 nested cycles, outer loop goes from 0 to 348 and inner loop read bytes from 0-127.

512-byte copy is feasible. But I use 128-byte copy for reducing the usage of the stack :p
You can send a pull request if you have codes to merge into the git repository :)

2015 年 02 月 10 日
08:14:11
Glaux
Moderator
Forum Posts: 70
Member Since:
2013 年 10 月 11 日
Offline
25

roboard said
512-byte copy is feasible. But I use 128-byte copy for reducing the usage of the stack :p

And what stack is used in this case and how big is set? Is it the user program who calls int13h - some default stack set by dos when program is loaded or is it some reserved memory area for seabios routines?

2015 年 02 月 11 日
02:47:19
roboard
Admin
Forum Posts: 135
Member Since:
2013 年 10 月 05 日
Offline
26

Glaux said
And what stack is used in this case and how big is set?

Actually, I don't know how seabios manages the stack, so I use the stack carefully:p
In my code, I assume the stack is from the program that calls int13h.

2015 年 07 月 18 日
06:15:54
Alex
New Member
Forum Posts: 3
Member Since:
2015 年 07 月 18 日
Offline
Forum Timezone: Asia/Taipei

Most Users Ever Online: 229

Currently Online:
3 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Dinosaur: 27

leutenecker: 13

mrZagg: 10

hippy: 9

smeezekitty: 8

lukeross: 8

tomka: 8

Ekkehard: 8

UIdahoCIT: 8

blaxxun: 7

Member Stats:

Guest Posters: 0

Members: 1564

Moderators: 15

Admins: 5

Forum Stats:

Groups: 2

Forums: 11

Topics: 248

Posts: 1111

Newest Members: RobertOwell, LamboSr, petershu, f0rkB0mb, Albert, david, line04389, cannylin, Merkiseept, physics

Moderators: Glaux: 70, uaa: 11, guigra: 17, asian55: 22, Android_Lin: 226, bcarroll: 12, cucubutter: 84, recycled-air: 12, stevemork: 16, zerozaber: 52, pongraczi: 26, jejump: 13, George Andrews III: 56, poto: 11, garpastym: 20

Administrators: eveshih: 1, anthony: 31, viky6: 0, roboard: 135, hcl: 1