- cleanups
- disable tracing mmu - make scratch buffer 8k as it's declared as such... that makes things much better indeed :) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26537 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -29,7 +29,7 @@ extern uint8 gBootDriveID;
|
|||||||
extern uint32 gBootPartitionOffset;
|
extern uint32 gBootPartitionOffset;
|
||||||
|
|
||||||
#define SCRATCH_SIZE (2*4096)
|
#define SCRATCH_SIZE (2*4096)
|
||||||
static uint8 gScratchBuffer[4096];
|
static uint8 gScratchBuffer[SCRATCH_SIZE];
|
||||||
|
|
||||||
static const uint16 kParametersSizeVersion1 = sizeof(struct tos_bpb);
|
static const uint16 kParametersSizeVersion1 = sizeof(struct tos_bpb);
|
||||||
static const uint16 kParametersSizeVersion2 = 0x1e;
|
static const uint16 kParametersSizeVersion2 = 0x1e;
|
||||||
@@ -584,8 +584,8 @@ BlockHandle::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize)
|
|||||||
uint32 blocksLeft = (bufferSize + offset + fBlockSize - 1) / fBlockSize;
|
uint32 blocksLeft = (bufferSize + offset + fBlockSize - 1) / fBlockSize;
|
||||||
int32 totalBytesRead = 0;
|
int32 totalBytesRead = 0;
|
||||||
|
|
||||||
//TRACE(("BIOS reads %lu bytes from %Ld (offset = %lu), drive %u\n",
|
//TRACE(("BIOS reads %lu bytes from %Ld (offset = %lu)\n",
|
||||||
// blocksLeft * fBlockSize, pos * fBlockSize, offset, fDriveID));
|
// blocksLeft * fBlockSize, pos * fBlockSize, offset));
|
||||||
|
|
||||||
// read partial block
|
// read partial block
|
||||||
if (offset) {
|
if (offset) {
|
||||||
@@ -622,6 +622,7 @@ BlockHandle::ReadAt(void *cookie, off_t pos, void *buffer, size_t bufferSize)
|
|||||||
totalBytesRead += bytesRead;
|
totalBytesRead += bytesRead;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TRACE(("BlockHandle::%s: %d bytes read\n", __FUNCTION__, totalBytesRead));
|
||||||
return totalBytesRead;
|
return totalBytesRead;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -893,7 +894,7 @@ XHDIDrive::FillIdentifier()
|
|||||||
ssize_t
|
ssize_t
|
||||||
XHDIDrive::ReadBlocks(void *buffer, off_t first, int32 count)
|
XHDIDrive::ReadBlocks(void *buffer, off_t first, int32 count)
|
||||||
{
|
{
|
||||||
int sectorsPerBlocks = (fBlockSize / 256);
|
int sectorsPerBlock = (fBlockSize / 256);
|
||||||
int32 ret;
|
int32 ret;
|
||||||
uint16 flags = RW_READ;
|
uint16 flags = RW_READ;
|
||||||
TRACE(("XHDIDrive::%s(%Ld, %d) (%d,%d)\n", __FUNCTION__, first, count, fMajor, fMinor));
|
TRACE(("XHDIDrive::%s(%Ld, %d) (%d,%d)\n", __FUNCTION__, first, count, fMajor, fMinor));
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
*/
|
*/
|
||||||
#warning M68K: check for Physbase() < ST_RAM_TOP
|
#warning M68K: check for Physbase() < ST_RAM_TOP
|
||||||
|
|
||||||
#define TRACE_MMU
|
//#define TRACE_MMU
|
||||||
#ifdef TRACE_MMU
|
#ifdef TRACE_MMU
|
||||||
# define TRACE(x) dprintf x
|
# define TRACE(x) dprintf x
|
||||||
#else
|
#else
|
||||||
@@ -355,6 +355,7 @@ mmu_allocate(void *virtualAddress, size_t size)
|
|||||||
address += B_PAGE_SIZE;
|
address += B_PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACE(("mmu_allocate(KERNEL, %d): done\n", size));
|
||||||
return virtualAddress;
|
return virtualAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,6 +365,7 @@ mmu_allocate(void *virtualAddress, size_t size)
|
|||||||
map_page(get_next_virtual_page(), get_next_physical_page(), kDefaultPageFlags);
|
map_page(get_next_virtual_page(), get_next_physical_page(), kDefaultPageFlags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRACE(("mmu_allocate(NULL, %d): %p\n", size, address));
|
||||||
return address;
|
return address;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include "arch_040_mmu.h"
|
#include "arch_040_mmu.h"
|
||||||
|
|
||||||
|
|
||||||
#define TRACE_MMU
|
//#define TRACE_MMU
|
||||||
#ifdef TRACE_MMU
|
#ifdef TRACE_MMU
|
||||||
# define TRACE(x) dprintf x
|
# define TRACE(x) dprintf x
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ platform_start_kernel(void)
|
|||||||
mmu_init_for_kernel();
|
mmu_init_for_kernel();
|
||||||
//smp_boot_other_cpus();
|
//smp_boot_other_cpus();
|
||||||
|
|
||||||
|
#warning M68K: stop ints
|
||||||
|
|
||||||
dprintf("kernel entry at %lx\n", gKernelArgs.kernel_image.elf_header.e_entry);
|
dprintf("kernel entry at %lx\n", gKernelArgs.kernel_image.elf_header.e_entry);
|
||||||
|
|
||||||
asm("move.l %0, %%sp; " // move stack out of way
|
asm("move.l %0, %%sp; " // move stack out of way
|
||||||
|
|||||||
Reference in New Issue
Block a user